diff --git a/.github/ISSUE_TEMPLATE/module-readiness-checklist.md b/.github/ISSUE_TEMPLATE/module-readiness-checklist.md index 2d14413ad971..4d696f78d9db 100644 --- a/.github/ISSUE_TEMPLATE/module-readiness-checklist.md +++ b/.github/ISSUE_TEMPLATE/module-readiness-checklist.md @@ -10,13 +10,13 @@ This checklist is to be used for tracking the final internal audit of new Cosmos ### Release Candidate Checklist -The following checklist should be gone through once the module has been fully implemented. This audit should be performed directly on `master`, or preferably on a `alpha` or `beta` release tag that includes the module. +The following checklist should be gone through once the module has been fully implemented. This audit should be performed directly on `main`, or preferably on a `alpha` or `beta` release tag that includes the module. The module **should not** be included in any Release Candidate tag until it has passed this checklist. - [ ] API audit (at least 1 person) (@assignee) - [ ] Are Msg and Query methods and types well-named and organized? - - [ ] Is everything well documented (inline godoc as well as [`/spec/` folder](https://github.com/cosmos/cosmos-sdk/blob/master/docs/spec/SPEC-SPEC.md) in module directory) + - [ ] Is everything well documented (inline godoc as well as [`/spec/` folder](https://github.com/cosmos/cosmos-sdk/blob/main/docs/spec/SPEC-SPEC.md) in module directory) - [ ] State machine audit (at least 2 people) (@assignee1, @assignee2) - [ ] Read through MsgServer code and verify correctness upon visual inspection - [ ] Ensure all state machine code which could be confusing is properly commented diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index dd537fce565b..5306d0890f29 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -23,10 +23,10 @@ I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change -- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification -- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) -- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) +- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) +- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification @@ -47,4 +47,4 @@ I have... - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage -- [ ] manually tested (if applicable) \ No newline at end of file +- [ ] manually tested (if applicable) diff --git a/.github/PULL_REQUEST_TEMPLATE/docs.md b/.github/PULL_REQUEST_TEMPLATE/docs.md index e6a10d37eca0..8233f83261c0 100644 --- a/.github/PULL_REQUEST_TEMPLATE/docs.md +++ b/.github/PULL_REQUEST_TEMPLATE/docs.md @@ -15,9 +15,9 @@ please add links to any relevant follow up issues.* I have... - [ ] included the correct `docs:` prefix in the PR title -- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification -- [ ] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md) +- [ ] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/main/docs/DOC_WRITING_GUIDELINES.md) - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed diff --git a/.github/PULL_REQUEST_TEMPLATE/other.md b/.github/PULL_REQUEST_TEMPLATE/other.md index f98b5a068efd..b4f19151b34e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/other.md +++ b/.github/PULL_REQUEST_TEMPLATE/other.md @@ -15,7 +15,7 @@ please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title -- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed @@ -29,4 +29,4 @@ 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 all author checklist items have been addressed -- [ ] confirmed that this PR does not change production code \ No newline at end of file +- [ ] confirmed that this PR does not change production code diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6b080ef60380..968b24c94448 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,8 +2,14 @@ name: "CodeQL" on: pull_request: - paths: - - "**.go" + paths: + - "**.go" + push: + branches: + - main + - release/** + paths: + - "**.go" jobs: analyze: @@ -15,37 +21,37 @@ jobs: security-events: write steps: - - name: Checkout repository - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.17 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: 'go' - queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Checkout repository + uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: "go" + queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/cosmovisor-release.yml b/.github/workflows/cosmovisor-release.yml index 006f43803132..1a7100d5a780 100644 --- a/.github/workflows/cosmovisor-release.yml +++ b/.github/workflows/cosmovisor-release.yml @@ -13,7 +13,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 # get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/cosmovisor/}" >> $GITHUB_ENV @@ -24,7 +24,7 @@ jobs: git tag -d ${{ env.RELEASE_VERSION }} || echo "No such a tag exists before" git tag ${{ env.RELEASE_VERSION }} HEAD - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v3 with: # stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125) version: v0.179.0 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 2a5893ff4cd3..c12c2b22a922 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,15 +1,19 @@ name: Deploy docs # This job builds and deploys documenation to github pages. -# It runs on every push to master with a change in the docs folder. +# It runs on every push to main with a change in the docs folder. on: push: branches: - - master + - main + - "release/**" paths: - "docs/**" + - "x/**/*.md" jobs: build-and-deploy: + permissions: + contents: write # for JamesIves/github-pages-deploy-action to push changes in repo runs-on: ubuntu-latest container: image: tendermintdev/docker-website-deployment @@ -26,8 +30,8 @@ jobs: make build-docs LEDGER_ENABLED=false - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.3.0 + uses: JamesIves/github-pages-deploy-action@v4.3.3 with: branch: gh-pages - folder: docs/output + folder: ~/output single-commit: true diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index eeef664925f4..f13b5e644b33 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -42,7 +42,7 @@ jobs: echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build but do not Publish to Docker Hub uses: docker/build-push-action@v2 diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index c6bdb5b563ee..17b1a410dc5e 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -11,6 +11,6 @@ jobs: main: runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v4.2.0 + - uses: amannn/action-semantic-pull-request@v4.5.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b08e0666168e..28b354d0e2a0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint # Lint runs golangci-lint over the entire cosmos-sdk repository -# This workflow is run on every pull request and push to master +# This workflow is run on every pull request and push to main # The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. on: pull_request: @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 id: git_diff with: diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index 21568c7af8aa..dbab7a21cc05 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -2,24 +2,24 @@ name: Build & Push SDK Proto Builder on: push: branches: - - master + - main paths: - "contrib/devtools/dockerfile" permissions: contents: read - + jobs: build: runs-on: ubuntu-latest steps: - # set VERSION to new version when making changes, when merged to master the image will automatically be pushed + # set VERSION to new version when making changes, when merged to main the image will automatically be pushed - uses: actions/checkout@v3 - name: Prepare id: prep run: | DOCKER_IMAGE=tendermintdev/sdk-proto-gen - VERSION=v0.6 + VERSION=latest TAGS="${DOCKER_IMAGE}:${VERSION}" echo ::set-output name=tags::${TAGS} @@ -29,19 +29,18 @@ jobs: platforms: all - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUBTM_USERNAME }} password: ${{ secrets.DOCKERHUBTM_TOKEN }} - name: Publish to Docker Hub - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: ./contrib/devtools - file: ./contrib/devtools/dockerfile platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.prep.outputs.tags }} diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index 47a8f9c92ab3..c5be0bc8e4b5 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -4,18 +4,17 @@ name: Buf-Push on: push: branches: - - master + - main paths: - - 'proto/**' + - "proto/**" jobs: push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.3.1 + - uses: bufbuild/buf-setup-action@v1.4.0 - uses: bufbuild/buf-push-action@v1 with: - input: 'proto' + input: "proto" buf_token: ${{ secrets.BUF_TOKEN }} - diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 16009920feea..8a350668e881 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -4,12 +4,12 @@ name: Protobuf on: pull_request: paths: - - 'proto/**' + - "proto/**" push: branches: - - master + - main paths: - - 'proto/**' + - "proto/**" jobs: lint: @@ -17,7 +17,7 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.3.1 + - uses: bufbuild/buf-setup-action@v1.4.0 - uses: bufbuild/buf-lint-action@v1 with: input: 'proto' @@ -26,8 +26,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.3.1 + - uses: bufbuild/buf-setup-action@v1.4.0 - uses: bufbuild/buf-breaking-action@v1 with: - input: 'proto' - against: 'https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto' + input: "proto" + against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto" diff --git a/.github/workflows/tag.yml b/.github/workflows/release.yml similarity index 80% rename from .github/workflows/tag.yml rename to .github/workflows/release.yml index e85dae0be4d3..2a2eb0369991 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,12 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Unshallow run: git fetch --prune --unshallow - name: Create release - uses: goreleaser/goreleaser-action@v2.7.0 + uses: goreleaser/goreleaser-action@v3 with: - args: release --rm-dist --release-notes ./RELEASE_CHANGELOG.md + args: release --rm-dist --release-notes ./RELEASE_NOTES.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 5300b5f5affc..2eb783ddcf21 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -12,10 +12,10 @@ jobs: cleanup-runs: runs-on: ubuntu-latest steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-sims')" @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - run: make build @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - name: Install runsim @@ -52,7 +52,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - uses: actions/cache@v3 @@ -71,7 +71,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - uses: actions/cache@v3 @@ -90,7 +90,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - uses: actions/cache@v3 diff --git a/.github/workflows/test-race.yml b/.github/workflows/test-race.yml index abc5c68d7277..1b92805875d2 100644 --- a/.github/workflows/test-race.yml +++ b/.github/workflows/test-race.yml @@ -1,35 +1,34 @@ name: Tests Race # Tests Race workflow runs unit tests with the race detector -# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed +# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed on: pull_request: push: branches: - - master + - main permissions: contents: read - + jobs: cleanup-runs: runs-on: ubuntu-latest steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" install-tparse: runs-on: ubuntu-latest steps: - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - name: install tparse - run: | - export GO111MODULE="on" && go get github.com/mfridman/tparse@v0.8.3 + run: go install github.com/mfridman/tparse@v0.8.3 - uses: actions/cache@v3 with: path: ~/go/bin @@ -41,7 +40,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 id: git_diff with: @@ -61,25 +60,25 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Create a file with all core Cosmos SDK pkgs run: go list ./... > pkgs.txt - name: Split pkgs into 4 files run: split -d -n l/4 pkgs.txt pkgs.txt.part. # cache multiple - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-00" path: ./pkgs.txt.part.00 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-01" path: ./pkgs.txt.part.01 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-02" path: ./pkgs.txt.part.02 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-03" path: ./pkgs.txt.part.03 @@ -95,14 +94,14 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 with: PATTERNS: | **/**.go go.mod go.sum - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" if: env.GIT_DIFF @@ -110,7 +109,7 @@ jobs: run: | xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -timeout 30m -race -tags='cgo ledger test_ledger_mock' if: env.GIT_DIFF - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-race-output" path: ./${{ matrix.part }}-race-output.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82d0811eaabf..533b178812cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: Tests / Code Coverage # Tests / Code Coverage workflow runs unit tests and uploads a code coverage report -# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed +# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed on: pull_request: push: @@ -15,10 +15,10 @@ jobs: cleanup-runs: runs-on: ubuntu-latest steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: runs-on: ubuntu-latest strategy: @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 id: git_diff with: @@ -49,7 +49,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 id: git_diff with: @@ -61,7 +61,7 @@ jobs: # GIT_DIFF is passed to the scripts run: bash scripts/module-tests.sh if: env.GIT_DIFF - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-go-submodules-coverage" path: ./coverage-go-submod-profile.out @@ -72,25 +72,25 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Create a file with all core Cosmos SDK pkgs - run: go list ./... > pkgs.txt + run: go list ./... > pkgs.txt - name: Split pkgs into 4 files run: split -d -n l/4 pkgs.txt pkgs.txt.part. # cache multiple - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-00" path: ./pkgs.txt.part.00 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-01" path: ./pkgs.txt.part.01 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-02" path: ./pkgs.txt.part.02 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-03" path: ./pkgs.txt.part.03 @@ -106,14 +106,14 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 with: PATTERNS: | **/**.go go.mod go.sum - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" if: env.GIT_DIFF @@ -121,7 +121,7 @@ jobs: run: | cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='norace ledger test_ledger_mock' if: env.GIT_DIFF - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-coverage" path: ./${{ matrix.part }}profile.out @@ -137,23 +137,23 @@ jobs: **/**.go go.mod go.sum - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-00-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-01-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-02-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-03-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-go-submodules-coverage" if: env.GIT_DIFF @@ -173,7 +173,7 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: env.GIT_DIFF - - uses: codecov/codecov-action@v2.1.0 + - uses: codecov/codecov-action@v3 with: file: ./coverage.txt if: env.GIT_DIFF @@ -185,7 +185,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: technote-space/get-diff-action@v6.0.1 id: git_diff with: @@ -201,18 +201,18 @@ jobs: run: | ./contrib/localnet_liveness.sh 100 5 50 localhost if: env.GIT_DIFF - + install-runsim: runs-on: ubuntu-latest needs: build steps: - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - name: Install runsim - run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 + run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 - uses: actions/cache@v3 with: path: ~/go/bin @@ -225,7 +225,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - uses: technote-space/get-diff-action@v6.0.1 diff --git a/.gitignore b/.gitignore index a7006f21365a..146e44fc94f5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ private # Build vendor build -docs/output docs/_build docs/tutorial docs/node_modules diff --git a/.mergify.yml b/.mergify.yml index f43e68bc80a4..107930132efe 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,11 +4,11 @@ queue_rules: - "#approved-reviews-by>1" pull_request_rules: - - name: automerge to master with label automerge and branch protection passing + - name: automerge to main with label automerge and branch protection passing conditions: - "#approved-reviews-by>1" - - base=master - - label=automerge + - base=main + - label=A:automerge actions: queue: name: default @@ -18,7 +18,7 @@ pull_request_rules: {{ body }} - name: backport patches to v0.46.x branch conditions: - - base=master + - base=main - label=backport/0.46.x actions: backport: @@ -26,7 +26,7 @@ pull_request_rules: - release/v0.46.x - name: backport patches to v0.45.x branch conditions: - - base=master + - base=main - label=backport/0.45.x actions: backport: @@ -34,7 +34,7 @@ pull_request_rules: - release/v0.45.x - name: backport patches to v0.44.x branch conditions: - - base=master + - base=main - label=backport/0.44.x actions: backport: @@ -42,7 +42,7 @@ pull_request_rules: - release/v0.44.x - name: backport patches to v0.42.x branch conditions: - - base=master + - base=main - label=backport/0.42.x (Stargate) actions: backport: diff --git a/CHANGELOG.md b/CHANGELOG.md index b33577878e81..acb29e78271b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,10 +35,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -## [Unreleased] +## [v0.46.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.0) - 2022-07-26 ### Features +* (types) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) Add a `Priority` field on `sdk.Context`, which represents the CheckTx priority field. It is only used during CheckTx. +* (gRPC) [#11889](https://github.com/cosmos/cosmos-sdk/pull/11889) Support custom read and write gRPC options in `app.toml`. See `max-recv-msg-size` and `max-send-msg-size` respectively. * (cli) [\#11738](https://github.com/cosmos/cosmos-sdk/pull/11738) Add `tx auth multi-sign` as alias of `tx auth multisign` for consistency with `multi-send`. * (cli) [\#11738](https://github.com/cosmos/cosmos-sdk/pull/11738) Add `tx bank multi-send` command for bulk send of coins to multiple accounts. * (grpc) [\#11642](https://github.com/cosmos/cosmos-sdk/pull/11642) Implement `ABCIQuery` in the Tendermint gRPC service, which proxies ABCI `Query` requests directly to the application. @@ -47,10 +49,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (tx) [#\11533](https://github.com/cosmos/cosmos-sdk/pull/11533) Register [`EIP191`](https://eips.ethereum.org/EIPS/eip-191) as an available `SignMode` for chains to use. * (x/genutil) [\#11500](https://github.com/cosmos/cosmos-sdk/pull/11500) Fix GenTx validation and adjust error messages * [\#11430](https://github.com/cosmos/cosmos-sdk/pull/11430) Introduce a new `grpc-only` flag, such that when enabled, will start the node in a query-only mode. Note, gRPC MUST be enabled with this flag. -* (x/upgrade) [\#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `MsgSoftwareUpgrade` and has been added to support v1beta2 msgs-based gov proposals. * (x/bank) [\#11417](https://github.com/cosmos/cosmos-sdk/pull/11417) Introduce a new `SpendableBalances` gRPC query that retrieves an account's total (paginated) spendable balances. * [\#11441](https://github.com/cosmos/cosmos-sdk/pull/11441) Added a new method, `IsLTE`, for `types.Coin`. This method is used to check if a `types.Coin` is less than or equal to another `types.Coin`. -* (x/upgrade) [\#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `MsgSoftwareUpgrade` and has been added to support v1beta2 msgs-based gov proposals. +* (x/upgrade) [\#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `MsgSoftwareUpgrade` and `MsgCancelUpgrade` have been added to support v1beta2 msgs-based gov proposals. * [\#11308](https://github.com/cosmos/cosmos-sdk/pull/11308) Added a mandatory metadata field to Vote in x/gov v1beta2. * [\#10977](https://github.com/cosmos/cosmos-sdk/pull/10977) Now every cosmos message protobuf definition must be extended with a ``cosmos.msg.v1.signer`` option to signal the signer fields in a language agnostic way. * [\#10710](https://github.com/cosmos/cosmos-sdk/pull/10710) Chain-id shouldn't be required for creating a transaction with both --generate-only and --offline flags. @@ -62,7 +63,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#9533](https://github.com/cosmos/cosmos-sdk/pull/9533) Added a new gRPC method, `DenomOwners`, in `x/bank` to query for all account holders of a specific denomination. * (bank) [\#9618](https://github.com/cosmos/cosmos-sdk/pull/9618) Update bank.Metadata: add URI and URIHash attributes. * (store) [\#8664](https://github.com/cosmos/cosmos-sdk/pull/8664) Implementation of ADR-038 file StreamingService -* [\#9837](https://github.com/cosmos/cosmos-sdk/issues/9837) `--generate-only` flag will accept the keyname now. +* [\#9837](https://github.com/cosmos/cosmos-sdk/issues/9837) `--generate-only` flag can be used with a keyname from the keyring. * [\#10326](https://github.com/cosmos/cosmos-sdk/pull/10326) `x/authz` add all grants by granter query. * [\#10944](https://github.com/cosmos/cosmos-sdk/pull/10944) `x/authz` add all grants by grantee query * [\#10348](https://github.com/cosmos/cosmos-sdk/pull/10348) Add `fee.{payer,granter}` and `tip` fields to StdSignDoc for signing tipped transactions. @@ -85,15 +86,28 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#10962](https://github.com/cosmos/cosmos-sdk/pull/10962) ADR-040: Add state migration from iavl (v1Store) to smt (v2Store) * (types) [\#10948](https://github.com/cosmos/cosmos-sdk/issues/10948) Add `app-db-backend` to the `app.toml` config to replace the compile-time `types.DBbackend` variable. * (authz)[\#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Support grant with no expire time. +* (rosetta) [\#11590](https://github.com/cosmos/cosmos-sdk/pull/11590) Add fee suggestion for rosetta and enable offline mode. Also force set events about Fees to Success to pass reconciliation test. +* (types) [\#11959](https://github.com/cosmos/cosmos-sdk/pull/11959) Added `sdk.Coins.Find` helper method to find a coin by denom. +* (upgrade) [#12603](https://github.com/cosmos/cosmos-sdk/pull/12603) feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces +* (telemetry) [#12405](https://github.com/cosmos/cosmos-sdk/pull/12405) Add _query_ calls metric to telemetry. +* (cli) [#12028](https://github.com/cosmos/cosmos-sdk/pull/12028) Add the `tendermint key-migrate` to perform Tendermint v0.35 DB key migration. +* (query) [#12253](https://github.com/cosmos/cosmos-sdk/pull/12253) Add `GenericFilteredPaginate` to the `query` package to improve UX. ### API Breaking Changes +* (x/auth/ante) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) The `MempoolFeeDecorator` has been removed. Instead, the `DeductFeeDecorator` takes a new argument of type `TxFeeChecker`, to define custom fee models. If `nil` is passed to this `TxFeeChecker` argument, then it will default to `checkTxFeeWithValidatorMinGasPrices`, which is the exact same behavior as the old `MempoolFeeDecorator` (i.e. checking fees against validator's own min gas price). +* (x/auth/ante) [#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) The `ExtensionOptionsDecorator` takes an argument of type `ExtensionOptionChecker`. For backwards-compatibility, you can pass `nil`, which defaults to the old behavior of rejecting all tx extensions. +* (crypto/keyring) [#11932](https://github.com/cosmos/cosmos-sdk/pull/11932) Remove `Unsafe*` interfaces from keyring package. Please use interface casting if you wish to access those unsafe functions. +* (types) [#11881](https://github.com/cosmos/cosmos-sdk/issues/11881) Rename `AccAddressFromHex` to `AccAddressFromHexUnsafe`. +* (types) [#11788](https://github.com/cosmos/cosmos-sdk/pull/11788) The `Int` and `Uint` types have been moved to their own dedicated module, `math`. Aliases are kept in the SDK's root `types` package, however, it is encouraged to utilize the new `math` module. As a result, the `Int#ToDec` API has been removed. * (grpc) [\#11642](https://github.com/cosmos/cosmos-sdk/pull/11642) The `RegisterTendermintService` method in the `tmservice` package now requires a `abciQueryFn` query function parameter. +* [\#11496](https://github.com/cosmos/cosmos-sdk/pull/11496) Refactor abstractions for snapshot and pruning; snapshot intervals eventually pruned; unit tests. +* (types) [\#11689](https://github.com/cosmos/cosmos-sdk/pull/11689) Make `Coins#Sub` and `Coins#SafeSub` consistent with `Coins#Add`. * (store)[\#11152](https://github.com/cosmos/cosmos-sdk/pull/11152) Remove `keep-every` from pruning options. * [\#10950](https://github.com/cosmos/cosmos-sdk/pull/10950) Add `envPrefix` parameter to `cmd.Execute`. * (x/mint) [\#10441](https://github.com/cosmos/cosmos-sdk/pull/10441) The `NewAppModule` function now accepts an inflation calculation function as an argument. * [\#10295](https://github.com/cosmos/cosmos-sdk/pull/10295) Remove store type aliases from /types -* [\#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) Migrate keys from `Info` -> `Record` +* [\#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) Migrate keys from `Info` (serialized as amino) -> `Record` (serialized as proto) * Add new `codec.Codec` argument in: * `keyring.NewInMemory` * `keyring.New` @@ -131,12 +145,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#10248](https://github.com/cosmos/cosmos-sdk/pull/10248) Remove unused `KeyPowerReduction` variable from x/staking types. * (x/bank) [\#9832](https://github.com/cosmos/cosmos-sdk/pull/9832) `AddressFromBalancesStore` renamed to `AddressAndDenomFromBalancesStore`. * (tests) [\#9938](https://github.com/cosmos/cosmos-sdk/pull/9938) `simapp.Setup` accepts additional `testing.T` argument. -* (baseapp) [\#9920](https://github.com/cosmos/cosmos-sdk/pull/9920) BaseApp `{Check,Deliver,Simulate}Tx` methods are now replaced by a middleware stack. - * Replace the Antehandler interface with the `tx.Handler` and `tx.Middleware` interfaces. - * Replace `baseapp.SetAnteHandler` with `baseapp.SetTxHandler`. - * Move Msg routers from BaseApp to middlewares. - * Move Baseapp panic recovery into a middleware. - * Rename simulation helper methods `baseapp.{Check,Deliver}` to `baseapp.Sim{Check,Deliver}**`. +* (baseapp) [\#11979](https://github.com/cosmos/cosmos-sdk/pull/11979) Rename baseapp simulation helper methods `baseapp.{Check,Deliver}` to `baseapp.Sim{Check,Deliver}`. * (x/gov) [\#10373](https://github.com/cosmos/cosmos-sdk/pull/10373) Removed gov `keeper.{MustMarshal, MustUnmarshal}`. * [\#10348](https://github.com/cosmos/cosmos-sdk/pull/10348) StdSignBytes takes a new argument of type `*tx.Tip` for signing over tips using LEGACY_AMINO_JSON. * [\#10208](https://github.com/cosmos/cosmos-sdk/pull/10208) The `x/auth/signing.Tx` interface now also includes a new `GetTip() *tx.Tip` method for verifying tipped transactions. The `x/auth/types` expected BankKeeper interface now expects the `SendCoins` method too. @@ -156,27 +165,28 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#11274](https://github.com/cosmos/cosmos-sdk/pull/11274) `types/errors.New` now is an alias for `types/errors.Register` and should only be used in initialization code. * (authz)[\#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) `authz.NewMsgGrant` `expiration` is now a pointer. When `nil` is used then no expiration will be set (grant won't expire). * (x/distribution)[\#11457](https://github.com/cosmos/cosmos-sdk/pull/11457) Add amount field to `distr.MsgWithdrawDelegatorRewardResponse` and `distr.MsgWithdrawValidatorCommissionResponse`. +* [\#11334](https://github.com/cosmos/cosmos-sdk/pull/11334) Move `x/gov/types/v1beta2` to `x/gov/types/v1`. * (x/auth/middleware) [#11413](https://github.com/cosmos/cosmos-sdk/pull/11413) Refactor tx middleware to be extensible on tx fee logic. Merged `MempoolFeeMiddleware` and `TxPriorityMiddleware` functionalities into `DeductFeeMiddleware`, make the logic extensible using the `TxFeeChecker` option, the current fee logic is preserved by the default `checkTxFeeWithValidatorMinGasPrices` implementation. Change `RejectExtensionOptionsMiddleware` to `NewExtensionOptionsMiddleware` which is extensible with the `ExtensionOptionChecker` option. Unpack the tx extension options `Any`s to interface `TxExtensionOptionI`. -* (migrations) [#1156](https://github.com/cosmos/cosmos-sdk/pull/11556#issuecomment-1091385011) Remove migration code from 0.42 and below. To use previous migrations, checkout previous versions of the cosmos-sdk. - +* (migrations) [#11556](https://github.com/cosmos/cosmos-sdk/pull/11556#issuecomment-1091385011) Remove migration code from 0.42 and below. To use previous migrations, checkout previous versions of the cosmos-sdk. ### Client Breaking Changes +* [\#11797](https://github.com/cosmos/cosmos-sdk/pull/11797) Remove all RegisterRESTRoutes (previously deprecated) * [\#11089](https://github.com/cosmos/cosmos-sdk/pull/11089]) interacting with the node through `grpc.Dial` requires clients to pass a codec refer to [doc](docs/run-node/interact-node.md). -* [\#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/master/migrations/rest.html) to migrate to the new REST endpoints. +* [\#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints. * [\#9995](https://github.com/cosmos/cosmos-sdk/pull/9995) Increased gas cost for creating proposals. * [\#11029](https://github.com/cosmos/cosmos-sdk/pull/11029) The deprecated Vote Option field is removed in gov v1beta2 and nil in v1beta1. Use Options instead. -* [\#11013](https://github.com/cosmos/cosmos-sdk/pull/) The `tx gov submit-proposal` command has changed syntax to support the new Msg-based gov proposals. To access the old CLI command, please use `tx gov submit-legacy-proposal`. +* [\#11013](https://github.com/cosmos/cosmos-sdk/pull/11013) The `tx gov submit-proposal` command has changed syntax to support the new Msg-based gov proposals. To access the old CLI command, please use `tx gov submit-legacy-proposal`. * [\#11170](https://github.com/cosmos/cosmos-sdk/issues/11170) Fixes issue related to grpc-gateway of supply by ibc-denom. ### CLI Breaking Changes -* [\#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) ` keys migrate` CLI command now takes no arguments +* (cli) [\#11818](https://github.com/cosmos/cosmos-sdk/pull/11818) CLI transactions preview now respect the chosen `--output` flag format (json or text). +* [\#9695](https://github.com/cosmos/cosmos-sdk/pull/9695) ` keys migrate` CLI command now takes no arguments. * [\#9246](https://github.com/cosmos/cosmos-sdk/pull/9246) Removed the CLI flag `--setup-config-only` from the `testnet` command and added the subcommand `init-files`. * [\#9780](https://github.com/cosmos/cosmos-sdk/pull/9780) Use sigs.k8s.io for yaml, which might lead to minor YAML output changes * [\#10625](https://github.com/cosmos/cosmos-sdk/pull/10625) Rename `--fee-account` CLI flag to `--fee-granter` * [\#10684](https://github.com/cosmos/cosmos-sdk/pull/10684) Rename `edit-validator` command's `--moniker` flag to `--new-moniker` -* [\#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `software-upgrade` and `cancel-software-upgrade` gov proposal commands have changed to `legacy-software-upgrade` and `legacy-cancel-software-upgrade`. * (authz)[\#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Changed the default value of the `--expiration` `tx grant` CLI Flag: was now + 1year, update: null (no expire date). ### Improvements @@ -213,12 +223,28 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (gov) [\#11287](https://github.com/cosmos/cosmos-sdk/pull/11287) Fix error message when no flags are provided while executing `submit-legacy-proposal` transaction. * (x/auth) [\#11482](https://github.com/cosmos/cosmos-sdk/pull/11482) Improve panic message when attempting to register a method handler for a message that does not implement sdk.Msg * (x/staking) [\#11596](https://github.com/cosmos/cosmos-sdk/pull/11596) Add (re)delegation getters +* (errors) [\#11960](https://github.com/cosmos/cosmos-sdk/pull/11960) Removed 'redacted' error message from defaultErrEncoder +* (ante) [#12013](https://github.com/cosmos/cosmos-sdk/pull/12013) Index ante events for failed tx. +* [#12668](https://github.com/cosmos/cosmos-sdk/pull/12668) Add `authz_msg_index` event attribute to message events emitted when executing via `MsgExec` through `x/authz`. +* [#12626](https://github.com/cosmos/cosmos-sdk/pull/12626) Upgrade IAVL to v0.19.0 with fast index and error propagation. NOTE: first start will take a while to propagate into new model. +* [#12649](https://github.com/cosmos/cosmos-sdk/pull/12649) Bump tendermint to v0.34.20. +* [#12576](https://github.com/cosmos/cosmos-sdk/pull/12576) Remove dependency on cosmos/keyring and upgrade to 99designs/keyring v1.2.1 +* [#12589](https://github.com/cosmos/cosmos-sdk/pull/12589) Allow zero gas in simulation mode. +* [#12453](https://github.com/cosmos/cosmos-sdk/pull/12453) Add `NewInMemoryWithKeyring` function which allows the creation of in memory `keystore` instances with a specified set of existing items. +* [#11390](https://github.com/cosmos/cosmos-sdk/pull/11390) `LatestBlockResponse` & `BlockByHeightResponse` types' `Block` filed has been deprecated and they now contains new field `sdk_block` with `proposer_address` as `string` +* (deps) Downgrade to Tendermint [v0.34.20-rc0](https://github.com/tendermint/tendermint/releases/tag/v0.34.20-rc0). +* [#12089](https://github.com/cosmos/cosmos-sdk/pull/12089) Mark the `TipDecorator` as beta, don't include it in simapp by default. +* [#12153](https://github.com/cosmos/cosmos-sdk/pull/12153) Add a new `NewSimulationManagerFromAppModules` constructor, to simplify simulation wiring. ### Bug Fixes +* [#11969](https://github.com/cosmos/cosmos-sdk/pull/11969) Fix the panic error in `x/upgrade` when `AppVersion` is not set. +* (tests) [\#11940](https://github.com/cosmos/cosmos-sdk/pull/11940) Fix some client tests in the `x/gov` module * [\#11772](https://github.com/cosmos/cosmos-sdk/pull/11772) Limit types.Dec length to avoid overflow. -* [#11796](https://github.com/cosmos/cosmos-sdk/pull/11796) Handle EOF error case in `readLineFromBuf`, which allows successful reading of passphrases from STDIN. -* [\#11724](https://github.com/cosmos/cosmos-sdk/pull/11724) Fix data race issues with `api.Server`. +* [\#11724](https://github.com/cosmos/cosmos-sdk/pull/11724) Fix data race issues with api.Server +* [\#11693](https://github.com/cosmos/cosmos-sdk/pull/11693) Add validation for gentx cmd. +* [\#11645](https://github.com/cosmos/cosmos-sdk/pull/11645) Fix `--home` flag ignored when running help. +* [\#11558](https://github.com/cosmos/cosmos-sdk/pull/11558) Fix `--dry-run` not working when using tx command. * [\#11354](https://github.com/cosmos/cosmos-sdk/pull/11355) Added missing pagination flag for `bank q total` query. * [\#11197](https://github.com/cosmos/cosmos-sdk/pull/11197) Signing with multisig now works with multisig address which is not in the keyring. * (makefile) [\#11285](https://github.com/cosmos/cosmos-sdk/pull/11285) Fix lint-fix make target. @@ -262,10 +288,35 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (cli) [\#11337](https://github.com/cosmos/cosmos-sdk/pull/11337) Fixes `show-adress` cli cmd * (crypto) [\#11298](https://github.com/cosmos/cosmos-sdk/pull/11298) Fix cgo secp signature verification and update libscep256k1 library. * (x/authz) [\#11512](https://github.com/cosmos/cosmos-sdk/pull/11512) Fix response of a panic to error, when subtracting balances. +* (rosetta) [\#11590](https://github.com/cosmos/cosmos-sdk/pull/11590) `/block` returns an error with nil pointer when a request has both of index and hash and increase timeout for huge genesis. * (x/feegrant) [\#11813](https://github.com/cosmos/cosmos-sdk/pull/11813) Fix pagination total count in `AllowancesByGranter` query. +* (simapp) [\#11855](https://github.com/cosmos/cosmos-sdk/pull/11855) Use `sdkmath.Int` instead of `int64` for `SimulationState.InitialStake`. +* (x/capability) [\#11737](https://github.com/cosmos/cosmos-sdk/pull/11737) Use a fixed length encoding of `Capability` pointer for `FwdCapabilityKey` +* [\#11983](https://github.com/cosmos/cosmos-sdk/pull/11983) (x/feegrant, x/authz) rename grants query commands to `grants-by-grantee`, `grants-by-granter` cmds. +* (protos) [#12701](https://github.com/cosmos/cosmos-sdk/pull/12701) Fix tendermint and ics23 versions used in Makefile. Run "make proto-gen". +* (testutil/sims) [#12374](https://github.com/cosmos/cosmos-sdk/pull/12374) fix the non-determinstic behavior in simulations caused by `GenSignedMockTx` and check empty coins slice before it is used to create `banktype.MsgSend`. +* [#12448](https://github.com/cosmos/cosmos-sdk/pull/12448) Start telemetry independently from the API server. +* [#12509](https://github.com/cosmos/cosmos-sdk/pull/12509) Fix `Register{Tx,Tendermint}Service` not being called, resulting in some endpoints like the Simulate endpoint not working. +* [#12416](https://github.com/cosmos/cosmos-sdk/pull/12416) Prevent zero gas transactions in the `DeductFeeDecorator` AnteHandler decorator. +* (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation. +* (x/auth) [#12261](https://github.com/cosmos/cosmos-sdk/pull/12261) Deprecate pagination in GetTxsEventRequest/Response in favor of page and limit to align with tendermint `SignClient.TxSearch` +* (vesting) [#12190](https://github.com/cosmos/cosmos-sdk/pull/12190) Replace https://github.com/cosmos/cosmos-sdk/pull/12190 to use `NewBaseAccountWithAddress` in all vesting account message handlers. +* (linting) [#12135](https://github.com/cosmos/cosmos-sdk/pull/12135/) Fix variable naming issues per enabled linters. Run gofumpt to ensure easy reviews of ongoing linting work. +* (linting) [#12132](https://github.com/cosmos/cosmos-sdk/pull/12132) Change sdk.Int to math.Int, run `gofumpt -w -l .`, and `golangci-lint run ./... --fix` +* (cli) [#12127](https://github.com/cosmos/cosmos-sdk/pull/12127) Fix the CLI not always taking into account `--fee-payer` and `--fee-granter` flags. +* (migrations) [#12028](https://github.com/cosmos/cosmos-sdk/pull/12028) Fix v0.45->v0.46 in-place store migrations. +* (baseapp) [#12089](https://github.com/cosmos/cosmos-sdk/pull/12089) Include antehandler and runMsgs events in SimulateTx. +* (cli) [#12095](https://github.com/cosmos/cosmos-sdk/pull/12095) Fix running a tx with --dry-run returns an error +* (x/auth) [#12108](https://github.com/cosmos/cosmos-sdk/pull/12108) Fix GetBlockWithTxs error when querying block with 0 tx +* (genutil) [#12140](https://github.com/cosmos/cosmos-sdk/pull/12140) Fix staking's genesis JSON migrate in the `simd migrate v0.46` CLI command. +* (types) [#12154](https://github.com/cosmos/cosmos-sdk/pull/12154) Add `baseAccountGetter` to avoid invalid account error when create vesting account. +* (x/crisis) [#12208](https://github.com/cosmos/cosmos-sdk/pull/12208) Fix progress index of crisis invariant assertion logs. +* (types) [#12229](https://github.com/cosmos/cosmos-sdk/pull/12229) Increase sdk.Dec maxApproxRootIterations to 300 ### State Machine Breaking +* (baseapp) [\#11985](https://github.com/cosmos/cosmos-sdk/pull/11985) Add a `postHandler` to baseapp. This `postHandler` is like antehandler, but is run _after_ the `runMsgs` execution. It is in the same store branch that `runMsgs`, meaning that both `runMsgs` and `postHandler` +* (x/gov) [#11998](https://github.com/cosmos/cosmos-sdk/pull/11998) Tweak the `x/gov` `ModuleAccountInvariant` invariant to ensure deposits are `<=` total module account balance instead of strictly equal. * (x/upgrade) [\#11800](https://github.com/cosmos/cosmos-sdk/pull/11800) Fix `GetLastCompleteUpgrade` to properly return the latest upgrade. * [\#10564](https://github.com/cosmos/cosmos-sdk/pull/10564) Fix bug when updating allowance inside AllowedMsgAllowance * (x/auth)[\#9596](https://github.com/cosmos/cosmos-sdk/pull/9596) Enable creating periodic vesting accounts with a transactions instead of requiring them to be created in genesis. @@ -275,22 +326,77 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [\#9890](https://github.com/cosmos/cosmos-sdk/pull/9890) Remove duplicate denom from denom metadata key. * (x/upgrade) [\#10189](https://github.com/cosmos/cosmos-sdk/issues/10189) Removed potential sources of non-determinism in upgrades * [\#10422](https://github.com/cosmos/cosmos-sdk/pull/10422) and [\#10529](https://github.com/cosmos/cosmos-sdk/pull/10529) Add `MinCommissionRate` param to `x/staking` module. -* [#10763](https://github.com/cosmos/cosmos-sdk/pull/10763) modify the fields in `TallyParams` to use `string` instead of `bytes` +* (x/gov) [#10763](https://github.com/cosmos/cosmos-sdk/pull/10763) modify the fields in `TallyParams` to use `string` instead of `bytes` * [#10770](https://github.com/cosmos/cosmos-sdk/pull/10770) revert tx when block gas limit exceeded -* [\#10868](https://github.com/cosmos/cosmos-sdk/pull/10868) Bump gov to v1beta2. Both v1beta1 and v1beta2 queries and Msgs are accepted. +* (x/gov) [\#10868](https://github.com/cosmos/cosmos-sdk/pull/10868) Bump gov to v1beta2. Both v1beta1 and v1beta2 queries and Msgs are accepted. * [\#11011](https://github.com/cosmos/cosmos-sdk/pull/11011) Remove burning of deposits when qourum is not reached on a governance proposal and when the deposit is not fully met. * [\#11019](https://github.com/cosmos/cosmos-sdk/pull/11019) Add `MsgCreatePermanentLockedAccount` and CLI method for creating permanent locked account * (x/staking) [\#10885] (https://github.com/cosmos/cosmos-sdk/pull/10885) Add new `CancelUnbondingDelegation` - transaction to `x/staking` module. Delegators can now cancel unbonding delegation entry and re-delegate back to validator. + transaction to `x/staking` module. Delegators can now cancel unbonding delegation entry and delegate back to validator. * (x/feegrant) [\#10830](https://github.com/cosmos/cosmos-sdk/pull/10830) Expired allowances will be pruned from state. * (x/authz,x/feegrant) [\#11214](https://github.com/cosmos/cosmos-sdk/pull/11214) Fix Amino JSON encoding of authz and feegrant Msgs to be consistent with other modules. * (authz)[\#11060](https://github.com/cosmos/cosmos-sdk/pull/11060) Support grant with no expire time. +* (x/gov) [\#10868](https://github.com/cosmos/cosmos-sdk/pull/10868) Bump gov to v1. ### Deprecated * (x/upgrade) [\#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` gRPC query since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) * (types) [\#10948](https://github.com/cosmos/cosmos-sdk/issues/10948) Deprecate the types.DBBackend variable and types.NewLevelDB function. They are replaced by a new entry in `app.toml`: `app-db-backend` and `tendermint/tm-db`s `NewDB` function. If `app-db-backend` is defined, then it is used. Otherwise, if `types.DBBackend` is defined, it is used (until removed: [\#11241](https://github.com/cosmos/cosmos-sdk/issues/11241)). Otherwise, Tendermint config's `db-backend` is used. +## [v0.45.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.3) - 2022-04-12 + +### Improvements + +* [\#11562](https://github.com/cosmos/cosmos-sdk/pull/11562) Updated Tendermint to v0.34.19; `unsafe-reset-all` command has been moved to the `tendermint` sub-command. + +### Features + +* (x/upgrade) [\#11551](https://github.com/cosmos/cosmos-sdk/pull/11551) Update `ScheduleUpgrade` for chains to schedule an automated upgrade on `BeginBlock` without having to go though governance. + +## [v0.45.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.2) - 2022-04-05 + +### Features + +* (tx) [#\11533](https://github.com/cosmos/cosmos-sdk/pull/11533) Register [`EIP191`](https://eips.ethereum.org/EIPS/eip-191) as an available `SignMode` for chains to use. +* [\#11430](https://github.com/cosmos/cosmos-sdk/pull/11430) Introduce a new `grpc-only` flag, such that when enabled, will start the node in a query-only mode. Note, gRPC MUST be enabled with this flag. +* (x/bank) [\#11417](https://github.com/cosmos/cosmos-sdk/pull/11417) Introduce a new `SpendableBalances` gRPC query that retrieves an account's total (paginated) spendable balances. +* (x/bank) [\#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add safety check on bank module perms to allow module-specific mint restrictions (e.g. only minting a certain denom). +* (x/bank) [\#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add `bank.BankKeeper.WithMintCoinsRestriction` function to restrict use of bank `MintCoins` usage. This function is not on the bank `Keeper` interface, so it's not API-breaking, but only additive on the keeper implementation. +* [\#10944](https://github.com/cosmos/cosmos-sdk/pull/10944) `x/authz` add all grants by grantee query +* [\#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store +* (x/auth) [\#10880](https://github.com/cosmos/cosmos-sdk/pull/10880) Added a new query to the tx query service that returns a block with transactions fully decoded. +* [#11314](https://github.com/cosmos/cosmos-sdk/pull/11314) Add state rollback command. + +### Bug Fixes + +* [\#11354](https://github.com/cosmos/cosmos-sdk/pull/11355) Added missing pagination flag for `bank q total` query. +* [\#11197](https://github.com/cosmos/cosmos-sdk/pull/11197) Signing with multisig now works with multisig address which is not in the keyring. +* (client) [\#11283](https://github.com/cosmos/cosmos-sdk/issues/11283) Support multiple keys for tx simulation and setting automatic gas for txs. +* (store) [\#11177](https://github.com/cosmos/cosmos-sdk/pull/11177) Update the prune `everything` strategy to store the last two heights. +* (store) [\#11117](https://github.com/cosmos/cosmos-sdk/pull/11117) Fix data race in store trace component +* (x/authz) [\#11252](https://github.com/cosmos/cosmos-sdk/pull/11252) Allow insufficient funds error for authz simulation +* (crypto) [\#11298](https://github.com/cosmos/cosmos-sdk/pull/11298) Fix cgo secp signature verification and update libscep256k1 library. +* (crypto) [\#12122](https://github.com/cosmos/cosmos-sdk/pull/12122) Fix keyring migration issue. + +### Improvements + +* [\#9576](https://github.com/cosmos/cosmos-sdk/pull/9576) Add debug error message to query result when enabled +* (types) [\#11200](https://github.com/cosmos/cosmos-sdk/pull/11200) Added `Min()` and `Max()` operations on sdk.Coins. +* [#11267](https://github.com/cosmos/cosmos-sdk/pull/11267) Add hooks to allow app modules to add things to state-sync (backport #10961). + +## [v0.45.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.1) - 2022-02-03 + +### Bug Fixes + +* (grpc) [\#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist. +* [\#10990](https://github.com/cosmos/cosmos-sdk/pull/10990) Fixes missing `iavl-cache-size` config parsing in `GetConfig` method. +* [#11222](https://github.com/cosmos/cosmos-sdk/pull/11222) reject query with block height in the future + +### Improvements + +* [\#10407](https://github.com/cosmos/cosmos-sdk/pull/10407) Added validation to `x/upgrade` module's `BeginBlock` to check accidental binary downgrades +* [\#10768](https://github.com/cosmos/cosmos-sdk/pull/10768) Extra logging in in-place store migrations. + ## [v0.45.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.0) - 2022-01-18 ### State Machine Breaking @@ -331,6 +437,47 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#9829](https://github.com/cosmos/cosmos-sdk/pull/9829) Fixed Coin denom sorting not being checked during `Balance.Validate` check. Refactored the Validation logic to use `Coins.Validate` for `Balance.Coins` * [\#10061](https://github.com/cosmos/cosmos-sdk/pull/10061) and [\#10515](https://github.com/cosmos/cosmos-sdk/pull/10515) Ensure that `LegacyAminoPubKey` struct correctly unmarshals from JSON +## [v0.44.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.8) - 2022-04-12 + +### Improvements + +* [\#11563](https://github.com/cosmos/cosmos-sdk/pull/11563) Updated Tendermint to v0.34.19; `unsafe-reset-all` command has been moved to the `tendermint` sub-command. + +## [v0.44.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.7) - 2022-04-04 + +### Features + +* (x/bank) [\#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add safety check on bank module perms to allow module-specific mint restrictions (e.g. only minting a certain denom). +* (x/bank) [\#10771](https://github.com/cosmos/cosmos-sdk/pull/10771) Add `bank.BankKeeper.WithMintCoinsRestriction` function to restrict use of bank `MintCoins` usage. This function is not on the bank `Keeper` interface, so it's not API-breaking, but only additive on the keeper implementation. + +### Bug Fixes + +* [\#11354](https://github.com/cosmos/cosmos-sdk/pull/11355) Added missing pagination flag for `bank q total` query. +* (store) [\#11177](https://github.com/cosmos/cosmos-sdk/pull/11177) Update the prune `everything` strategy to store the last two heights. +* (store) [\#11117](https://github.com/cosmos/cosmos-sdk/pull/11117) Fix data race in store trace component +* (x/authz) [\#11252](https://github.com/cosmos/cosmos-sdk/pull/11252) Allow insufficient funds error for authz simulation + +### Improvements + +* [\#9576](https://github.com/cosmos/cosmos-sdk/pull/9576) Add debug error message to query result when enabled + +## [v0.44.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.6) - 2022-02-02 + +### Features + +* [\#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store + +### Bug Fixes + +* (grpc) [\#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist. +* (std/codec) [/#10595](https://github.com/cosmos/cosmos-sdk/pull/10595) Add evidence to std/codec to be able to decode evidence in client interactions. +* [#10725](https://github.com/cosmos/cosmos-sdk/pull/10725) populate `ctx.ConsensusParams` for begin/end blockers. +* [\#10061](https://github.com/cosmos/cosmos-sdk/pull/10061) and [\#10515](https://github.com/cosmos/cosmos-sdk/pull/10515) Ensure that `LegacyAminoPubKey` struct correctly unmarshals from JSON + +### Improvements + +* [#10823](https://github.com/cosmos/cosmos-sdk/pull/10823) updated ambiguous cli description for creating feegrant. + ## [v0.44.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.5) - 2021-12-02 ### Improvements @@ -419,7 +566,7 @@ Security Release. No breaking changes related to 0.44.x. ### Client Breaking Changes -* [\#10041](https://github.com/cosmos/cosmos-sdk/pull/10041) Remove broadcast & encode legacy REST endpoints. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/master/migrations/rest.html) to migrate to the new REST endpoints. +* [\#10041](https://github.com/cosmos/cosmos-sdk/pull/10041) Remove broadcast & encode legacy REST endpoints. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints. ## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10 @@ -1111,7 +1258,7 @@ sure you are aware of any relevant breaking changes. * (x/auth/vesting) [\#7209](https://github.com/cosmos/cosmos-sdk/pull/7209) Create new `MsgCreateVestingAccount` message type along with CLI handler that allows for the creation of delayed and continuous vesting types. * (x/capability) [\#5828](https://github.com/cosmos/cosmos-sdk/pull/5828) Capability module integration as outlined in [ADR 3 - Dynamic Capability Store](https://github.com/cosmos/tree/master/docs/architecture/adr-003-dynamic-capability-store.md). * (x/crisis) `x/crisis` has a new function: `AddModuleInitFlags`, which will register optional crisis module flags for the start command. - * (x/ibc) [\#5277](https://github.com/cosmos/cosmos-sdk/pull/5277) `x/ibc` changes from IBC alpha. For more details check the the [`x/ibc/core/spec`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc/core/spec) directory, or the ICS specs below: + * (x/ibc) [\#5277](https://github.com/cosmos/cosmos-sdk/pull/5277) `x/ibc` changes from IBC alpha. For more details check the [`x/ibc/core/spec`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc/core/spec) directory, or the ICS specs below: * [ICS 002 - Client Semantics](https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics) subpackage * [ICS 003 - Connection Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-003-connection-semantics) subpackage * [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-004-channel-and-packet-semantics) subpackage diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c2621f9b310..05f3ff79d0c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,11 +25,11 @@ Thank you for considering making contributions to the Cosmos SDK and related repositories! -Contributing to this repo can mean many things such as participating in +Contributing to this repo can mean many things, such as participating in discussion or proposing code changes. To ensure a smooth workflow for all contributors, the general procedure for contributing has been established: -1. Start by browsing [new issues](https://github.com/cosmos/cosmos-sdk/issues) and [discussions](https://github.com/cosmos/cosmos-sdk/discussions). If you are looking for something interesting or if you have something in your mind, there is a chance it was has been discussed. +1. Start by browsing [new issues](https://github.com/cosmos/cosmos-sdk/issues) and [discussions](https://github.com/cosmos/cosmos-sdk/discussions). If you are looking for something interesting or if you have something in your mind, there is a chance it had been discussed. * Looking for a good place to start contributing? How about checking out some [good first issues](https://github.com/cosmos/cosmos-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)? 2. Determine whether a GitHub issue or discussion is more appropriate for your needs: 1. If want to propose something new that requires specification or an additional design, or you would like to change a process, start with a [new discussion](https://github.com/cosmos/cosmos-sdk/discussions/new). With discussions, we can better handle the design process using discussion threads. A discussion usually leads to one or more issues. @@ -69,16 +69,16 @@ If you would like to join one of those calls, then please contact us on [Discord ## Architecture Decision Records (ADR) -When proposing an architecture decision for the Cosmos SDK, please start by opening an [issue](https://github.com/cosmos/cosmos-sdk/issues/new/choose) or a [discussion](https://github.com/cosmos/cosmos-sdk/discussions/new) with a summary of the proposal. Once the proposal has been discussed and there is rough alignment on a high-level approach to the design, the [ADR creation process](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/PROCESS.md) can begin. We are following this process to ensure all involved parties are in agreement before any party begins coding the proposed implementation. If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/master/docs/architecture). +When proposing an architecture decision for the Cosmos SDK, please start by opening an [issue](https://github.com/cosmos/cosmos-sdk/issues/new/choose) or a [discussion](https://github.com/cosmos/cosmos-sdk/discussions/new) with a summary of the proposal. Once the proposal has been discussed and there is rough alignment on a high-level approach to the design, the [ADR creation process](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/PROCESS.md) can begin. We are following this process to ensure all involved parties are in agreement before any party begins coding the proposed implementation. If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/main/docs/architecture). ## Development Procedure -* The latest state of development is on `master`. -* `master` must never fail `make lint test test-race`. -* No `--force` onto `master` (except when reverting a broken commit, which should seldom happen). -* Create a branch to start a wok: +* The latest state of development is on `main`. +* `main` must never fail `make lint test test-race`. +* No `--force` onto `main` (except when reverting a broken commit, which should seldom happen). +* Create a branch to start work: * Fork the repo (core developers must create a branch directly in the Cosmos SDK repo), - branch from the HEAD of `master`, make some commits, and submit a PR to `master`. + branch from the HEAD of `main`, make some commits, and submit a PR to `main`. * For core developers working within the `cosmos-sdk` repo, follow branch name conventions to ensure a clear ownership of branches: `{moniker}/{issue#}-branch-name`. * See [Branching Model](#branching-model-and-release) for more details. @@ -90,7 +90,7 @@ When proposing an architecture decision for the Cosmos SDK, please start by open before each commit is available in the `contrib/githooks/` directory. * Follow the [CODING GUIDELINES](CODING_GUIDELINES.md), which defines criteria for designing and coding a software. -Code is merged into master through pull request procedure. +Code is merged into main through pull request procedure. ### Testing @@ -100,7 +100,7 @@ Tests can be executed by running `make test` at the top level of the Cosmos SDK Before submitting a pull request: -* merge the latest master `git merge origin/master`, +* merge the latest main `git merge origin/main`, * run `make lint test` to ensure that all checks and tests pass. Then: @@ -117,9 +117,9 @@ PRs must have a category prefix that is based on the type of changes being made [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Additionally, each PR should only address a single issue. -Pull requests are merged automatically using [`automerge` action](https://mergify.io/features/auto-merge). +Pull requests are merged automatically using [`A:automerge` action](https://mergify.io/features/auto-merge). -NOTE: when merging, GitHub will squash commits and rebase on top of the master. +NOTE: when merging, GitHub will squash commits and rebase on top of the main. ### Pull Request Templates @@ -169,7 +169,7 @@ When writing documentation, follow the [Documentation Writing Guidelines](./docs We use [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependency versions. -The master branch of every Cosmos repository should just build with `go get`, +The main branch of every Cosmos repository should just build with `go get`, which means they should be kept up-to-date with their dependencies, so we can get away with telling people they can just `go get` our software. @@ -180,7 +180,7 @@ build, in which case we can fall back on `go mod tidy -v`. We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in Cosmos SDK. -For determinstic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it. +For deterministic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it. For formatting code in `.proto` files, you can run `make proto-format` command. @@ -215,15 +215,15 @@ The Cosmos SDK utilizes [semantic versioning](https://semver.org/). ### PR Targeting -Ensure that you base and target your PR on the `master` branch. +Ensure that you base and target your PR on the `main` branch. -All feature additions and all bug fixes must be targeted against `master`. Exception is for bug fixes which are only related to a released version. In that case, the related bug fix PRs must target against the release branch. +All feature additions and all bug fixes must be targeted against `main`. Exception is for bug fixes which are only related to a released version. In that case, the related bug fix PRs must target against the release branch. -If needed, we backport a commit from `master` to a release branch (excluding consensus breaking feature, API breaking and similar). +If needed, we backport a commit from `main` to a release branch (excluding consensus breaking feature, API breaking and similar). ## Code Owner Membership -In the ethos of open source projects, and out of necessity to keep the code +In the ethos of open-source projects, and out of necessity to keep the code alive, the core contributor team will strive to permit special repo privileges to developers who show an aptitude towards developing with this code base. @@ -243,7 +243,7 @@ The other code owners should then all approve this PR to publicly display their Only if unanimous consensus is reached among all the existing code-owners will an invitation be extended to a new potential-member. Likewise, when an existing member is suggested to be removed/or have their privileges reduced, the member -in question must agree on the decision for their removal or else no action +in question must agree to the decision for their removal or else no action should be taken. If however, a code-owner is demonstrably shown to intentionally have had acted maliciously or grossly negligent, code-owner privileges may be stripped with no prior warning or consent from the member in question. @@ -273,9 +273,9 @@ is broken up into three distinct stages: **Strategy Discovery**, **Concept Appro * Architecture Decision Records (ADRs) may be proposed by any contributors or maintainers of the Cosmos SDK, and should follow the guidelines outlined in the - [ADR Creation Process](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/PROCESS.md) + [ADR Creation Process](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/PROCESS.md) * After proposal, a time bound period for Request for Comment (RFC) on ADRs commences -* ADRs are intended to be iterative, and may be merged into `master` while still in a `Proposed` status +* ADRs are intended to be iterative, and may be merged into `main` while still in a `Proposed` status #### Time Bound Period diff --git a/Dockerfile b/Dockerfile index ffcbeccbc15f..026f222c594a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ # > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys add foo # > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys list # TODO: demo connecting rest-server (or is this in server now?) -FROM golang:alpine AS build-env +FROM golang:1.18-alpine AS build-env # Install minimum necessary dependencies ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 diff --git a/Makefile b/Makefile index a29e5866d384..0cc456020450 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git DOCKER := $(shell which docker) DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8 PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) +DOCS_DOMAIN=docs.cosmos.network # RocksDB is a native dependency, so we don't assume the library is installed. # Instead, it must be explicitly enabled and we warn when it is not. ENABLE_ROCKSDB ?= false @@ -192,16 +193,18 @@ godocs: # This builds a docs site for each branch/tag in `./docs/versions` # and copies each site to a version prefixed path. The last entry inside -# the `versions` file will be the default root index.html. +# the `versions` file will be the default root index.html (and it should be main). build-docs: @cd docs && \ while read -r branch path_prefix; do \ echo "building branch $${branch}" ; \ (git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \ - mkdir -p output/$${path_prefix} ; \ - cp -r .vuepress/dist/* output/$${path_prefix}/ ; \ - cp output/$${path_prefix}/index.html output ; \ + mkdir -p ~/output/$${path_prefix} ; \ + cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \ + cp ~/output/$${path_prefix}/index.html ~/output ; \ + cp ~/output/$${path_prefix}/404.html ~/output ; \ done < versions ; + @echo $(DOCS_DOMAIN) > ~/output/CNAME .PHONY: build-docs @@ -393,7 +396,7 @@ devdoc-update: ### Protobuf ### ############################################################################### -protoVer=v0.6 +protoVer=v0.7 protoImageName=tendermintdev/sdk-proto-gen:$(protoVer) containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer) containerProtoGenAny=$(PROJECT_NAME)-proto-gen-any-$(protoVer) @@ -428,13 +431,13 @@ proto-lint: @$(DOCKER_BUF) lint --error-format=json proto-check-breaking: - @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=master + @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint +TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.20/proto/tendermint GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master -CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.3 +CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.7.0 TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto TM_ABCI_TYPES = third_party/proto/tendermint/abci diff --git a/README.md b/README.md index 390abf34aa20..c00ce7ee656c 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,17 @@ parent: ![banner](docs/cosmos-sdk-image.jpg)
- - Version - - + License: Apache-2.0 - GoDoc + GoDoc Go report card - Code Coverage + Code Coverage
@@ -45,7 +42,7 @@ The Cosmos SDK is a framework for building blockchain applications. [Tendermint **WARNING**: The Cosmos SDK has mostly stabilized, but we are still making some breaking changes. -**Note**: Requires [Go 1.17+](https://golang.org/dl/) +**Note**: Requires [Go 1.18+](https://go.dev/dl) ## Quick Start @@ -75,9 +72,9 @@ The Cosmos Hub application, `gaia`, has moved to its own [cosmos/gaia repository The IBC module for the Cosmos SDK has moved to its own [cosmos/ibc-go repository](https://github.com/cosmos/ibc-go). Go there to build and integrate with the IBC module. -### Starport +### Ignite CLI -Starport is the all-in-one platform to build, launch, and maintain any crypto application on a sovereign and secured blockchain. If you are building a new app or a new module, use [Starport](https://github.com/tendermint/starport) to get started and speed up development. +Ignite CLI is the all-in-one platform to build, launch, and maintain any crypto application on a sovereign and secured blockchain. If you are building a new app or a new module, use [Ignite CLI](https://github.com/ignite-hq/cli) to get started and speed up development. ## Disambiguation diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 000000000000..82094b9d1d14 --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,71 @@ +# Cosmos SDK v0.46.0 Release Notes + +This release introduces several new important updates to the Cosmos SDK. The release notes below provide an overview of the larger high-level changes introduced in the v0.46 release series. + +That being said, this release does contain many more minor and module-level changes besides those mentioned below. For a comprehsive list of all breaking changes and improvements since the v0.45 release series, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/CHANGELOG.md). + +## New Module: `x/group` + +The previous v0.43 series focused on simplifying [keys and fee management](https://github.com/cosmos/cosmos-sdk/issues/7074) for SDK users, by adding `x/feegrant` and `x/authz`. v0.46 finishes this work by introducing `x/group`. + +`x/group` provides functionality to define on-chain groups of people that can execute arbitrary messages based on agreed upon rules. A simple use-case of `x/group` is to create on-chain multisigs (with updateable members and thresholds), but `x/group` can also be used to create more complex DAOs. + +The `x/group` module revolves around 3 concepts: + +- A **group** is simply an aggregation of accounts with associated weights. +- A **group policy** is a group with a set of rules attached, called decision policy. The decision policy defines how voting and arbitrary message execution happens (e.g. does a proposal pass on 50% yes? 2/3 yes? is there a way to veto? etc). Each group policy has its own an on-chain account, so can hold funds. Managing group membership separately from decision policies results in the least overhead and keeps membership consistent across different policies. +- Any member of a group can submit a **proposal** for a group policy account to decide upon. A proposal consists of a set of messages that will be executed if the proposal passes voting. + +If a proposal passes the decision policy's rules after its voting period, then any account can send a `MsgExec` against this proposal to execute the `sdk.Msg`s included in the proposal. + +For more details about `x/group`, please refer to [the SDK documentation](https://docs.cosmos.network/master/modules/group/) and [ADR-042](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-042-group-module.md). + +The folder structure of `x/group` contains an `internal` folder, which holds a custom ORM used only by `x/group` (and which will be replaced by the [new ORM](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-055-orm.md)) as well as a new implementation of `Dec` (for decimals) based on [`cockroachdb/apd`](https://github.com/cockroachdb/apd), which serves as a proof-of-concept for the [new `sdk.Dec`](https://github.com/cosmos/cosmos-sdk/issues/11783). + +## `Msg`-based Gov Proposals + +In an effort to [align](https://github.com/cosmos/cosmos-sdk/issues/9438) `x/gov` with `x/group`, the SDK v0.46 release introduces a new Protobuf package: `cosmos.gov.v1`. + +The biggest change compared to the previous `cosmoss.gov.v1beta1` is in `MsgSubmitProposal`: instead of defining gov router proposal handlers, the v0.46 gov execution models is based on `sdk.Msg`s: + +```diff +message MsgSubmitProposal { +- google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; ++ repeated google.protobuf.Any messages = 1 [(cosmos_proto.accepts_interface) = "sdk.Msg"]; + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false]; + string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ++ // metadata is any arbitrary metadata attached to the proposal. ++ string metadata = 4; +} +``` + +For example, instead of broadcasting a `v1beta1.MsgSubmitProposal` with content a `SoftwareUpgradeProposal`, the proposer would submit a `v1.MsgSubmitProposal` with a `/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade` message. When the proposal passes, the `sdk.Msg` will be executed by the `Msg` service router (instead of going through the gov proposal handlers). + +The `sdk.Msg`s in the proposal are executed on behalf of the `gov` module account. This means that each of the `sdk.Msg` inside the proposal must have their `GetSigners()` method return exactly one address, which is the `gov` module account's address. + +A `metadata` field has also been added to `MsgSubmitProposal` and `MsgVote`, for users to provide optional justification for their action. + +From a client perspective, the new gov v1 is purely additive. All `v1beta1` Protobuf defintions, queries and `Msg`s still work. Morever, users can also submit `v1beta1` legacy proposals using the `v1` `Msg` service, by including a `MsgExecLegacyContent` inside the `v1.MsgSubmitProposal`. It is recommended to switch to gov `v1` during v0.46, as the gov `v1beta1` backwards-compatibility might be removed in a future version. + +As an app developer, some API changes from `v1beta1` to `v1` are to be expected in the `x/gov` Keeper, and are documented in the [`UPGRADING.md` guide](TODO). + +## Baseapp PostHandlers + +A transaction's lifecycle in the SDK goes through BaseApp's `CheckTx` and `DeliverTx`, and both of them run the AnteHandlers; then, `DeliverTx` also runs the `sdk.Msg`s execution (in BaseApp's `runMsgs` function). + +In v0.46, we added "PostHandlers" to the SDK. PostHandlers are like AnteHandlers (they have the same signature), but they are run _after_ `runMsgs`. One use case for PostHandlers is transaction tips (see below), but other use cases like unused gas refund can also be enabled by PostHandlers. + +Please note that the PostHandlers run **in the same store branch** as `runMsgs`. This means that if the PostHandlers fail, then all the state from `runMsgs` will also be reverted. As a reminder, the AnteHandlers run in a separate store branch before `runMsgs`. This means that the v0.46 SDK currently creates 2 store branches when running transactions: + +- one for AnteHandlers, +- one for `runMsgs` and PostHandlers. + +## Transaction Tips and `SIGN_MODE_DIRECT_AUX` + +Transaction tips are a mechanism to pay for transaction fees using another denom than the native fee denom of the chain. + +The transaction initiator signs a partial transaction (called [`AuxSignerData`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-beta2/proto/cosmos/tx/v1beta1/tx.proto#L230-L249)) without specifying fees, but uses a new `Tip` field. They send this `AuxSignerData` to a fee relayer who will choose the transaction fees and broadcast the final transaction, and the SDK provides a mechanism that will transfer the pre-defined `Tip` to the fee payer, to cover for fees. A market between tippers and feepayers could arise, based on exchange rates between the tip denom and the fee denom. + +For this mechanism to work, the SDK introduces a new sign mode, `SIGN_MODE_DIRECT_AUX`, whereby the signer signs over the transaction body and their own signer info, but not over fees or other signers' info. This sign mode is not limited to transaction tips though, and can be used in any multi-signer transaction, where N-1 signers sign using `SIGN_MODE_DIRECT_AUX`, and only one signer, the fee payer, signs using `SIGN_MODE_DIRECT`, allowing for a better UX for the N-1 other signers. + +The transaction tips decorator is NOT enabled by default on the SDK. If you want to include transaction tips on your chain, please enable `setPosthandler` in your `app.go` and include the tips decorator inside: see [simapp/app.go](https://github.com/cosmos/cosmos-sdk/blob/d416ee86b6a000e564b88affb8d1c82b3ce72034/simapp/app.go#L447-L467) for a template. diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index ca4b7c5ce7f6..340664a6d350 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -12,25 +12,26 @@ Before making a new _major_ release we do beta and release candidate releases. F v1.0.0-beta1 → v1.0.0-beta2 → ... → v1.0.0-rc1 → v1.0.0-rc2 → ... → v1.0.0 ``` -* Release a first beta version on the `master` branch and freeze `master` from receiving any new features. After beta is released, we focus on releasing the release candidate: +* Release a first beta version on the `main` branch and freeze `main` from receiving any new features. After beta is released, we focus on releasing the release candidate: * finish audits and reviews * kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks) * perform functional tests * add more tests * release new beta version as the bugs are discovered and fixed. -* After the team feels that the `master` works fine we create a `release/vY` branch (going forward known a release branch), where `Y` is the version number, with the patch part substituted to `x` (eg: 0.42.x, 1.0.x). Ensure the release branch is protected so that pushes against the release branch are permitted only by the release manager or release coordinator. +* After the team feels that the `main` works fine we create a `release/vY` branch (going forward known a release branch), where `Y` is the version number, with the patch part substituted to `x` (eg: 0.42.x, 1.0.x). Ensure the release branch is protected so that pushes against the release branch are permitted only by the release manager or release coordinator. * **PRs targeting this branch can be merged _only_ when exceptional circumstances arise** - * update the GitHub mergify integration by adding instructions for automatically backporting commits from `master` to the `release/vY` using the `backport/Y` label. + * update the GitHub mergify integration by adding instructions for automatically backporting commits from `main` to the `release/vY` using the `backport/Y` label. * In the release branch, prepare a new version section in the `CHANGELOG.md` * All links must be link-ified: `$ python ./scripts/linkify_changelog.py CHANGELOG.md` * Copy the entries into a `RELEASE_CHANGELOG.md`, this is needed so the bot knows which entries to add to the release page on GitHub. * Create a new annotated git tag for a release candidate (eg: `git tag -a v1.1.0-rc1`) in the release branch. - * from this point we unfreeze master. + * from this point we unfreeze main. * the SDK teams collaborate and do their best to run testnets in order to validate the release. - * when bugs are found, create a PR for `master`, and backport fixes to the release branch. + * when bugs are found, create a PR for `main`, and backport fixes to the release branch. * create new release candidate tags after bugs are fixed. * After the team feels the release branch is stable and everything works, create a full release: * update `CHANGELOG.md`. + * run `gofumpt -w -l .` to format the code. * create a new annotated git tag (eg `git -a v1.1.0`) in the release branch. * Create a GitHub release. @@ -47,7 +48,7 @@ A _patch release_ is an increment of the patch number (eg: `v1.2.0` → `v1.2.1` **Patch release must not break API nor consensus.** -Updates to the release branch should come from `master` by backporting PRs (usually done by automatic cherry pick followed by a PRs to the release branch). The backports must be marked using `backport/Y` label in PR for master. +Updates to the release branch should come from `main` by backporting PRs (usually done by automatic cherry pick followed by a PRs to the release branch). The backports must be marked using `backport/Y` label in PR for main. It is the PR author's responsibility to fix merge conflicts, update changelog entries, and ensure CI passes. If a PR originates from an external contributor, a core team member assumes responsibility to perform this process instead of the original author. @@ -82,8 +83,8 @@ and must follow the [Patch Release Procedure][CONTRIBUTING.md#patch-release-proc ### Rationale -Unlike in-development `master` branch snapshots, **Cosmos-SDK** releases are subject to much wider adoption, -and by a significantly different demographic of users. During development, changes in the `master` branch +Unlike in-development `main` branch snapshots, **Cosmos-SDK** releases are subject to much wider adoption, +and by a significantly different demographic of users. During development, changes in the `main` branch affect SDK users, application developers, early adopters, and other advanced users that elect to use unstable experimental software at their own risk. @@ -97,13 +98,13 @@ poorly tested code. We never assume that any change, no matter how little or non of regression risks. Therefore, the requirements for stable changes are different than those that are candidates to be merged in -the `master` branch. When preparing future major releases, our aim is to design the most elegant, user-friendly and +the `main` branch. When preparing future major releases, our aim is to design the most elegant, user-friendly and maintainable SDK possible which often entails fundamental changes to the SDK's architecture design, rearranging and/or renaming packages as well as reducing code duplication so that we maintain common functions and data structures in one place rather than leaving them scattered all over the code base. However, once a release is published, the -priority is to minimise the risk caused by changes that are not strictly required to fix qualifying bugs; this tends to -be correlated with minimising the size of such changes. As such, the same bug may need to be fixed in different -ways in stable releases and `master` branch. +priority is to minimize the risk caused by changes that are not strictly required to fix qualifying bugs; this tends to +be correlated with minimizing the size of such changes. As such, the same bug may need to be fixed in different +ways in stable releases and `main` branch. ### Migrations @@ -126,7 +127,7 @@ To smoothen the update to the latest stable release, the SDK includes a set of C ### What does not qualify as SRU * State machine changes. -* Breaking changes in Protobuf definitions, as specified in [ADR-044](./docs/architecture/adr-044-protobuf-updates-guidelines.md). +* Breaking changes in Protobuf definitions, as specified in [ADR-044](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-044-protobuf-updates-guidelines.md). * Changes that introduces API breakages (e.g. public functions and interfaces removal/renaming). * Client-breaking changes in gRPC and HTTP request and response types. * CLI-breaking changes. @@ -148,7 +149,7 @@ Pull requests that fix bugs and add features that fall in the following categori As rule of thumb, the following changes will **NOT** be automatically accepted into stable point-releases: * **State machine changes**. -* **Protobug-breaking changes**, as specified in [ADR-044](./docs/architecture/adr-044-protobuf-updates- guidelines.md). +* **Protobug-breaking changes**, as specified in [ADR-044](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-044-protobuf-updates- guidelines.md). * **Client-breaking changes**, i.e. changes that prevent gRPC, HTTP and RPC clients to continue interacting with the node without any change. * **API-breaking changes**, i.e. changes that prevent client applications to _build without modifications_ to the client application's source code. * **CLI-breaking changes**, i.e. changes that require usage changes for CLI users. @@ -157,7 +158,7 @@ As rule of thumb, the following changes will **NOT** be automatically accepted i ### Stable Release Exception - Procedure -1. Check that the bug is either fixed or not reproducible in `master`. It is, in general, not appropriate to release bug fixes for stable releases without first testing them in `master`. Please apply the label [v0.43](https://github.com/cosmos/cosmos-sdk/milestone/26) to the issue. +1. Check that the bug is either fixed or not reproducible in `main`. It is, in general, not appropriate to release bug fixes for stable releases without first testing them in `main`. Please apply the label [v0.43](https://github.com/cosmos/cosmos-sdk/milestone/26) to the issue. 2. Add a comment to the issue and ensure it contains the following information (see the bug template below): * **[Impact]** An explanation of the bug on users and justification for backporting the fix to the stable release. diff --git a/SECURITY.md b/SECURITY.md index b2a83a0dc574..0f6563573c85 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -13,38 +13,36 @@ this [blog post](https://blog.cosmos.network/bug-bounty-program-for-tendermint-c The following is a list of examples of the kinds of bugs we're most interested in for the Cosmos SDK. See [here](https://github.com/tendermint/tendermint/blob/master/SECURITY.md) for vulnerabilities we are interested -in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com/tendermint/iavl)). +in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com/cosmos/iavl)). ### Core packages -* [`/baseapp`](https://github.com/cosmos/cosmos-sdk/tree/master/baseapp) -* [`/crypto`](https://github.com/cosmos/cosmos-sdk/tree/master/crypto) -* [`/types`](https://github.com/cosmos/cosmos-sdk/tree/master/types) -* [`/store`](https://github.com/cosmos/cosmos-sdk/tree/master/store) +* [`/baseapp`](https://github.com/cosmos/cosmos-sdk/tree/main/baseapp) +* [`/crypto`](https://github.com/cosmos/cosmos-sdk/tree/main/crypto) +* [`/types`](https://github.com/cosmos/cosmos-sdk/tree/main/types) +* [`/store`](https://github.com/cosmos/cosmos-sdk/tree/main/store) ### Modules -* [`x/auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth) -* [`x/bank`](https://github.com/cosmos/cosmos-sdk/tree/master/x/bank) -* [`x/capability`](https://github.com/cosmos/cosmos-sdk/tree/master/x/capability) -* [`x/staking`](https://github.com/cosmos/cosmos-sdk/tree/master/x/staking) -* [`x/slashing`](https://github.com/cosmos/cosmos-sdk/tree/master/x/slashing) -* [`x/evidence`](https://github.com/cosmos/cosmos-sdk/tree/master/x/evidence) -* [`x/distribution`](https://github.com/cosmos/cosmos-sdk/tree/master/x/distribution) -* [`x/ibc`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc) -* [`x/ibc-transfer`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc-transfer) -* [`x/mint`](https://github.com/cosmos/cosmos-sdk/tree/master/x/mint) +* [`x/auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) +* [`x/bank`](https://github.com/cosmos/cosmos-sdk/tree/main/x/bank) +* [`x/capability`](https://github.com/cosmos/cosmos-sdk/tree/main/x/capability) +* [`x/staking`](https://github.com/cosmos/cosmos-sdk/tree/main/x/staking) +* [`x/slashing`](https://github.com/cosmos/cosmos-sdk/tree/main/x/slashing) +* [`x/evidence`](https://github.com/cosmos/cosmos-sdk/tree/main/x/evidence) +* [`x/distribution`](https://github.com/cosmos/cosmos-sdk/tree/main/x/distribution) +* [`x/mint`](https://github.com/cosmos/cosmos-sdk/tree/main/x/mint) We are interested in bugs in other modules, however the above are most likely to have significant vulnerabilities, due to the complexity / nuance involved. We -also recommend you to read the [specification](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/README.md) of each module before digging into +also recommend you to read the [specification](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules/README.md) of each module before digging into the code. ### How we process Tx parameters * Integer operations on tx parameters, especially `sdk.Int` / `sdk.Dec` * Gas calculation & parameter choices -* Tx signature verification (see [`x/auth/ante`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth/ante)) +* Tx signature verification (see [`x/auth/ante`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/ante)) * Possible Node DoS vectors (perhaps due to gas weighting / non constant timing) ### Handling private keys @@ -59,7 +57,7 @@ The Cosmos SDK team uses the following disclosure process: 1. After a security report is received, the Cosmos SDK team works to verify the issue and confirm its severity level using Common Vulnerability Scoring System (CVSS). 1. The Cosmos SDK team collaborates with the Tendermint and Gaia teams to determine the vulnerability’s potential impact on the Cosmos Hub and partners. -1. Patches are prepared in private repositories for eligible releases of Cosmos SDK. See [Stable Release Policy](https://github.com/cosmos/cosmos-sdk/blob/master/RELEASE_PROCESS.md#stable-release-policy) for a list of eligible releases. +1. Patches are prepared in private repositories for eligible releases of Cosmos SDK. See [Stable Release Policy](https://github.com/cosmos/cosmos-sdk/blob/main/RELEASE_PROCESS.md#stable-release-policy) for a list of eligible releases. 1. If it is determined that a CVE-ID is required, we request a CVE through a CVE Numbering Authority. 1. We notify the community that a security release is coming to give users time to prepare their systems for the update. Notifications can include forum posts, tweets, and emails to partners and validators. 1. 24 hours after the notification, fixes are applied publicly and new releases are issued. diff --git a/api/cosmos/app/module/v1alpha1/module.pulsar.go b/api/cosmos/app/module/v1alpha1/module.pulsar.go deleted file mode 100644 index 7ad00374d030..000000000000 --- a/api/cosmos/app/module/v1alpha1/module.pulsar.go +++ /dev/null @@ -1,507 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package modulev1alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/app/v1alpha1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Module protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_app_module_v1alpha1_module_proto_init() - md_Module = File_cosmos_app_module_v1alpha1_module_proto.Messages().ByName("Module") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_module_v1alpha1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// 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_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(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_Module) 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_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.app.module.v1alpha1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.app.module.v1alpha1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.app.module.v1alpha1.Module 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_Module) 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.app.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.app.module.v1alpha1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.app.module.v1alpha1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.app.module.v1alpha1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.module.v1alpha1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - 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().(*Module) - 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().(*Module) - 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: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/app/module/v1alpha1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Module is the module config object for the cosmos.app v1 app module. -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_module_v1alpha1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_cosmos_app_module_v1alpha1_module_proto_rawDescGZIP(), []int{0} -} - -var File_cosmos_app_module_v1alpha1_module_proto protoreflect.FileDescriptor - -var file_cosmos_app_module_v1alpha1_module_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, - 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x3a, 0x3f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x39, 0x0a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x70, 0x12, 0x15, 0x0a, 0x13, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x42, 0x84, 0x02, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, - 0x70, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x41, 0x4d, 0xaa, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x70, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, - 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xe2, 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cosmos_app_module_v1alpha1_module_proto_rawDescOnce sync.Once - file_cosmos_app_module_v1alpha1_module_proto_rawDescData = file_cosmos_app_module_v1alpha1_module_proto_rawDesc -) - -func file_cosmos_app_module_v1alpha1_module_proto_rawDescGZIP() []byte { - file_cosmos_app_module_v1alpha1_module_proto_rawDescOnce.Do(func() { - file_cosmos_app_module_v1alpha1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_app_module_v1alpha1_module_proto_rawDescData) - }) - return file_cosmos_app_module_v1alpha1_module_proto_rawDescData -} - -var file_cosmos_app_module_v1alpha1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_app_module_v1alpha1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: cosmos.app.module.v1alpha1.Module -} -var file_cosmos_app_module_v1alpha1_module_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_app_module_v1alpha1_module_proto_init() } -func file_cosmos_app_module_v1alpha1_module_proto_init() { - if File_cosmos_app_module_v1alpha1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_app_module_v1alpha1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_app_module_v1alpha1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_app_module_v1alpha1_module_proto_goTypes, - DependencyIndexes: file_cosmos_app_module_v1alpha1_module_proto_depIdxs, - MessageInfos: file_cosmos_app_module_v1alpha1_module_proto_msgTypes, - }.Build() - File_cosmos_app_module_v1alpha1_module_proto = out.File - file_cosmos_app_module_v1alpha1_module_proto_rawDesc = nil - file_cosmos_app_module_v1alpha1_module_proto_goTypes = nil - file_cosmos_app_module_v1alpha1_module_proto_depIdxs = nil -} diff --git a/api/cosmos/app/v1alpha1/config.pulsar.go b/api/cosmos/app/v1alpha1/config.pulsar.go deleted file mode 100644 index ada2a09a13f4..000000000000 --- a/api/cosmos/app/v1alpha1/config.pulsar.go +++ /dev/null @@ -1,1232 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package appv1alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_Config_1_list)(nil) - -type _Config_1_list struct { - list *[]*ModuleConfig -} - -func (x *_Config_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Config_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Config_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModuleConfig) - (*x.list)[i] = concreteValue -} - -func (x *_Config_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModuleConfig) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Config_1_list) AppendMutable() protoreflect.Value { - v := new(ModuleConfig) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Config_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Config_1_list) NewElement() protoreflect.Value { - v := new(ModuleConfig) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Config_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Config protoreflect.MessageDescriptor - fd_Config_modules protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_config_proto_init() - md_Config = File_cosmos_app_v1alpha1_config_proto.Messages().ByName("Config") - fd_Config_modules = md_Config.Fields().ByName("modules") -} - -var _ protoreflect.Message = (*fastReflection_Config)(nil) - -type fastReflection_Config Config - -func (x *Config) ProtoReflect() protoreflect.Message { - return (*fastReflection_Config)(x) -} - -func (x *Config) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Config_messageType fastReflection_Config_messageType -var _ protoreflect.MessageType = fastReflection_Config_messageType{} - -type fastReflection_Config_messageType struct{} - -func (x fastReflection_Config_messageType) Zero() protoreflect.Message { - return (*fastReflection_Config)(nil) -} -func (x fastReflection_Config_messageType) New() protoreflect.Message { - return new(fastReflection_Config) -} -func (x fastReflection_Config_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Config -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Config) Descriptor() protoreflect.MessageDescriptor { - return md_Config -} - -// 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_Config) Type() protoreflect.MessageType { - return _fastReflection_Config_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Config) New() protoreflect.Message { - return new(fastReflection_Config) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Config) Interface() protoreflect.ProtoMessage { - return (*Config)(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_Config) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Modules) != 0 { - value := protoreflect.ValueOfList(&_Config_1_list{list: &x.Modules}) - if !f(fd_Config_modules, 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_Config) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.app.v1alpha1.Config.modules": - return len(x.Modules) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.Config")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.Config 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_Config) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.Config.modules": - x.Modules = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.Config")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.Config 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_Config) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.app.v1alpha1.Config.modules": - if len(x.Modules) == 0 { - return protoreflect.ValueOfList(&_Config_1_list{}) - } - listValue := &_Config_1_list{list: &x.Modules} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.Config")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.Config 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_Config) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.Config.modules": - lv := value.List() - clv := lv.(*_Config_1_list) - x.Modules = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.Config")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.Config 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_Config) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.Config.modules": - if x.Modules == nil { - x.Modules = []*ModuleConfig{} - } - value := &_Config_1_list{list: &x.Modules} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.Config")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.Config 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_Config) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.Config.modules": - list := []*ModuleConfig{} - return protoreflect.ValueOfList(&_Config_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.Config")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.Config 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_Config) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.Config", 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_Config) 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_Config) 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_Config) 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_Config) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Config) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Modules) > 0 { - for _, e := range x.Modules { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Config) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Modules) > 0 { - for iNdEx := len(x.Modules) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Modules[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Config) - 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: Config: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Config: 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 Modules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Modules = append(x.Modules, &ModuleConfig{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Modules[len(x.Modules)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ModuleConfig protoreflect.MessageDescriptor - fd_ModuleConfig_name protoreflect.FieldDescriptor - fd_ModuleConfig_config protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_config_proto_init() - md_ModuleConfig = File_cosmos_app_v1alpha1_config_proto.Messages().ByName("ModuleConfig") - fd_ModuleConfig_name = md_ModuleConfig.Fields().ByName("name") - fd_ModuleConfig_config = md_ModuleConfig.Fields().ByName("config") -} - -var _ protoreflect.Message = (*fastReflection_ModuleConfig)(nil) - -type fastReflection_ModuleConfig ModuleConfig - -func (x *ModuleConfig) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModuleConfig)(x) -} - -func (x *ModuleConfig) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModuleConfig_messageType fastReflection_ModuleConfig_messageType -var _ protoreflect.MessageType = fastReflection_ModuleConfig_messageType{} - -type fastReflection_ModuleConfig_messageType struct{} - -func (x fastReflection_ModuleConfig_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModuleConfig)(nil) -} -func (x fastReflection_ModuleConfig_messageType) New() protoreflect.Message { - return new(fastReflection_ModuleConfig) -} -func (x fastReflection_ModuleConfig_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleConfig -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModuleConfig) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleConfig -} - -// 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_ModuleConfig) Type() protoreflect.MessageType { - return _fastReflection_ModuleConfig_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModuleConfig) New() protoreflect.Message { - return new(fastReflection_ModuleConfig) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModuleConfig) Interface() protoreflect.ProtoMessage { - return (*ModuleConfig)(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_ModuleConfig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ModuleConfig_name, value) { - return - } - } - if x.Config != nil { - value := protoreflect.ValueOfMessage(x.Config.ProtoReflect()) - if !f(fd_ModuleConfig_config, 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_ModuleConfig) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleConfig.name": - return x.Name != "" - case "cosmos.app.v1alpha1.ModuleConfig.config": - return x.Config != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleConfig")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleConfig 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_ModuleConfig) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleConfig.name": - x.Name = "" - case "cosmos.app.v1alpha1.ModuleConfig.config": - x.Config = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleConfig")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleConfig 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_ModuleConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.app.v1alpha1.ModuleConfig.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.app.v1alpha1.ModuleConfig.config": - value := x.Config - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleConfig")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleConfig 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_ModuleConfig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleConfig.name": - x.Name = value.Interface().(string) - case "cosmos.app.v1alpha1.ModuleConfig.config": - x.Config = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleConfig")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleConfig 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_ModuleConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleConfig.config": - if x.Config == nil { - x.Config = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Config.ProtoReflect()) - case "cosmos.app.v1alpha1.ModuleConfig.name": - panic(fmt.Errorf("field name of message cosmos.app.v1alpha1.ModuleConfig is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleConfig")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleConfig 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_ModuleConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleConfig.name": - return protoreflect.ValueOfString("") - case "cosmos.app.v1alpha1.ModuleConfig.config": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleConfig")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleConfig 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_ModuleConfig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.ModuleConfig", 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_ModuleConfig) 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_ModuleConfig) 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_ModuleConfig) 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_ModuleConfig) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModuleConfig) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Config != nil { - l = options.Size(x.Config) - 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().(*ModuleConfig) - 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.Config != nil { - encoded, err := options.Marshal(x.Config) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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 { - 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().(*ModuleConfig) - 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: ModuleConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleConfig: 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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Config", 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.Config == nil { - x.Config = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Config); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/app/v1alpha1/config.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Config represents the configuration for a Cosmos SDK ABCI app. -// It is intended that all state machine logic including the version of -// baseapp and tx handlers (and possibly even Tendermint) that an app needs -// can be described in a config object. For compatibility, the framework should -// allow a mixture of declarative and imperative app wiring, however, apps -// that strive for the maximum ease of maintainability should be able to describe -// their state machine with a config object alone. -type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // modules are the module configurations for the app. - Modules []*ModuleConfig `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty"` -} - -func (x *Config) Reset() { - *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config) ProtoMessage() {} - -// Deprecated: Use Config.ProtoReflect.Descriptor instead. -func (*Config) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_config_proto_rawDescGZIP(), []int{0} -} - -func (x *Config) GetModules() []*ModuleConfig { - if x != nil { - return x.Modules - } - return nil -} - -// ModuleConfig is a module configuration for an app. -type ModuleConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the unique name of the module within the app. It should be a name - // that persists between different versions of a module so that modules - // can be smoothly upgraded to new versions. - // - // For example, for the module cosmos.bank.module.v1.Module, we may chose - // to simply name the module "bank" in the app. When we upgrade to - // cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same - // and the framework knows that the v2 module should receive all the same state - // that the v1 module had. Note: modules should provide info on which versions - // they can migrate from in the ModuleDescriptor.can_migration_from field. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // config is the config object for the module. Module config messages should - // define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - Config *anypb.Any `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *ModuleConfig) Reset() { - *x = ModuleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModuleConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModuleConfig) ProtoMessage() {} - -// Deprecated: Use ModuleConfig.ProtoReflect.Descriptor instead. -func (*ModuleConfig) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_config_proto_rawDescGZIP(), []int{1} -} - -func (x *ModuleConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ModuleConfig) GetConfig() *anypb.Any { - if x != nil { - return x.Config - } - return nil -} - -var File_cosmos_app_v1alpha1_config_proto protoreflect.FileDescriptor - -var file_cosmos_app_v1alpha1_config_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x07, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 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, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd6, 0x01, 0x0a, 0x17, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x70, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, - 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 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, 0x70, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_app_v1alpha1_config_proto_rawDescOnce sync.Once - file_cosmos_app_v1alpha1_config_proto_rawDescData = file_cosmos_app_v1alpha1_config_proto_rawDesc -) - -func file_cosmos_app_v1alpha1_config_proto_rawDescGZIP() []byte { - file_cosmos_app_v1alpha1_config_proto_rawDescOnce.Do(func() { - file_cosmos_app_v1alpha1_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_app_v1alpha1_config_proto_rawDescData) - }) - return file_cosmos_app_v1alpha1_config_proto_rawDescData -} - -var file_cosmos_app_v1alpha1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_app_v1alpha1_config_proto_goTypes = []interface{}{ - (*Config)(nil), // 0: cosmos.app.v1alpha1.Config - (*ModuleConfig)(nil), // 1: cosmos.app.v1alpha1.ModuleConfig - (*anypb.Any)(nil), // 2: google.protobuf.Any -} -var file_cosmos_app_v1alpha1_config_proto_depIdxs = []int32{ - 1, // 0: cosmos.app.v1alpha1.Config.modules:type_name -> cosmos.app.v1alpha1.ModuleConfig - 2, // 1: cosmos.app.v1alpha1.ModuleConfig.config:type_name -> google.protobuf.Any - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_app_v1alpha1_config_proto_init() } -func file_cosmos_app_v1alpha1_config_proto_init() { - if File_cosmos_app_v1alpha1_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_app_v1alpha1_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_app_v1alpha1_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModuleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_app_v1alpha1_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_app_v1alpha1_config_proto_goTypes, - DependencyIndexes: file_cosmos_app_v1alpha1_config_proto_depIdxs, - MessageInfos: file_cosmos_app_v1alpha1_config_proto_msgTypes, - }.Build() - File_cosmos_app_v1alpha1_config_proto = out.File - file_cosmos_app_v1alpha1_config_proto_rawDesc = nil - file_cosmos_app_v1alpha1_config_proto_goTypes = nil - file_cosmos_app_v1alpha1_config_proto_depIdxs = nil -} diff --git a/api/cosmos/app/v1alpha1/module.pulsar.go b/api/cosmos/app/v1alpha1/module.pulsar.go deleted file mode 100644 index a00331b63cce..000000000000 --- a/api/cosmos/app/v1alpha1/module.pulsar.go +++ /dev/null @@ -1,1969 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package appv1alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_ModuleDescriptor_2_list)(nil) - -type _ModuleDescriptor_2_list struct { - list *[]*PackageReference -} - -func (x *_ModuleDescriptor_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ModuleDescriptor_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ModuleDescriptor_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*PackageReference) - (*x.list)[i] = concreteValue -} - -func (x *_ModuleDescriptor_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*PackageReference) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ModuleDescriptor_2_list) AppendMutable() protoreflect.Value { - v := new(PackageReference) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModuleDescriptor_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ModuleDescriptor_2_list) NewElement() protoreflect.Value { - v := new(PackageReference) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModuleDescriptor_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ModuleDescriptor_3_list)(nil) - -type _ModuleDescriptor_3_list struct { - list *[]*MigrateFromInfo -} - -func (x *_ModuleDescriptor_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ModuleDescriptor_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ModuleDescriptor_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MigrateFromInfo) - (*x.list)[i] = concreteValue -} - -func (x *_ModuleDescriptor_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MigrateFromInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ModuleDescriptor_3_list) AppendMutable() protoreflect.Value { - v := new(MigrateFromInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModuleDescriptor_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ModuleDescriptor_3_list) NewElement() protoreflect.Value { - v := new(MigrateFromInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModuleDescriptor_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ModuleDescriptor protoreflect.MessageDescriptor - fd_ModuleDescriptor_go_import protoreflect.FieldDescriptor - fd_ModuleDescriptor_use_package protoreflect.FieldDescriptor - fd_ModuleDescriptor_can_migrate_from protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_module_proto_init() - md_ModuleDescriptor = File_cosmos_app_v1alpha1_module_proto.Messages().ByName("ModuleDescriptor") - fd_ModuleDescriptor_go_import = md_ModuleDescriptor.Fields().ByName("go_import") - fd_ModuleDescriptor_use_package = md_ModuleDescriptor.Fields().ByName("use_package") - fd_ModuleDescriptor_can_migrate_from = md_ModuleDescriptor.Fields().ByName("can_migrate_from") -} - -var _ protoreflect.Message = (*fastReflection_ModuleDescriptor)(nil) - -type fastReflection_ModuleDescriptor ModuleDescriptor - -func (x *ModuleDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModuleDescriptor)(x) -} - -func (x *ModuleDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModuleDescriptor_messageType fastReflection_ModuleDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_ModuleDescriptor_messageType{} - -type fastReflection_ModuleDescriptor_messageType struct{} - -func (x fastReflection_ModuleDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModuleDescriptor)(nil) -} -func (x fastReflection_ModuleDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_ModuleDescriptor) -} -func (x fastReflection_ModuleDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModuleDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleDescriptor -} - -// 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_ModuleDescriptor) Type() protoreflect.MessageType { - return _fastReflection_ModuleDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModuleDescriptor) New() protoreflect.Message { - return new(fastReflection_ModuleDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModuleDescriptor) Interface() protoreflect.ProtoMessage { - return (*ModuleDescriptor)(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_ModuleDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GoImport != "" { - value := protoreflect.ValueOfString(x.GoImport) - if !f(fd_ModuleDescriptor_go_import, value) { - return - } - } - if len(x.UsePackage) != 0 { - value := protoreflect.ValueOfList(&_ModuleDescriptor_2_list{list: &x.UsePackage}) - if !f(fd_ModuleDescriptor_use_package, value) { - return - } - } - if len(x.CanMigrateFrom) != 0 { - value := protoreflect.ValueOfList(&_ModuleDescriptor_3_list{list: &x.CanMigrateFrom}) - if !f(fd_ModuleDescriptor_can_migrate_from, 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_ModuleDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleDescriptor.go_import": - return x.GoImport != "" - case "cosmos.app.v1alpha1.ModuleDescriptor.use_package": - return len(x.UsePackage) != 0 - case "cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from": - return len(x.CanMigrateFrom) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleDescriptor")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleDescriptor 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_ModuleDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleDescriptor.go_import": - x.GoImport = "" - case "cosmos.app.v1alpha1.ModuleDescriptor.use_package": - x.UsePackage = nil - case "cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from": - x.CanMigrateFrom = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleDescriptor")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleDescriptor 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_ModuleDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.app.v1alpha1.ModuleDescriptor.go_import": - value := x.GoImport - return protoreflect.ValueOfString(value) - case "cosmos.app.v1alpha1.ModuleDescriptor.use_package": - if len(x.UsePackage) == 0 { - return protoreflect.ValueOfList(&_ModuleDescriptor_2_list{}) - } - listValue := &_ModuleDescriptor_2_list{list: &x.UsePackage} - return protoreflect.ValueOfList(listValue) - case "cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from": - if len(x.CanMigrateFrom) == 0 { - return protoreflect.ValueOfList(&_ModuleDescriptor_3_list{}) - } - listValue := &_ModuleDescriptor_3_list{list: &x.CanMigrateFrom} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleDescriptor")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleDescriptor 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_ModuleDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleDescriptor.go_import": - x.GoImport = value.Interface().(string) - case "cosmos.app.v1alpha1.ModuleDescriptor.use_package": - lv := value.List() - clv := lv.(*_ModuleDescriptor_2_list) - x.UsePackage = *clv.list - case "cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from": - lv := value.List() - clv := lv.(*_ModuleDescriptor_3_list) - x.CanMigrateFrom = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleDescriptor")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleDescriptor 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_ModuleDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleDescriptor.use_package": - if x.UsePackage == nil { - x.UsePackage = []*PackageReference{} - } - value := &_ModuleDescriptor_2_list{list: &x.UsePackage} - return protoreflect.ValueOfList(value) - case "cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from": - if x.CanMigrateFrom == nil { - x.CanMigrateFrom = []*MigrateFromInfo{} - } - value := &_ModuleDescriptor_3_list{list: &x.CanMigrateFrom} - return protoreflect.ValueOfList(value) - case "cosmos.app.v1alpha1.ModuleDescriptor.go_import": - panic(fmt.Errorf("field go_import of message cosmos.app.v1alpha1.ModuleDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleDescriptor")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleDescriptor 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_ModuleDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.ModuleDescriptor.go_import": - return protoreflect.ValueOfString("") - case "cosmos.app.v1alpha1.ModuleDescriptor.use_package": - list := []*PackageReference{} - return protoreflect.ValueOfList(&_ModuleDescriptor_2_list{list: &list}) - case "cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from": - list := []*MigrateFromInfo{} - return protoreflect.ValueOfList(&_ModuleDescriptor_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.ModuleDescriptor")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.ModuleDescriptor 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_ModuleDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.ModuleDescriptor", 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_ModuleDescriptor) 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_ModuleDescriptor) 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_ModuleDescriptor) 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_ModuleDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModuleDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.GoImport) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.UsePackage) > 0 { - for _, e := range x.UsePackage { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.CanMigrateFrom) > 0 { - for _, e := range x.CanMigrateFrom { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ModuleDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CanMigrateFrom) > 0 { - for iNdEx := len(x.CanMigrateFrom) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.CanMigrateFrom[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.UsePackage) > 0 { - for iNdEx := len(x.UsePackage) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UsePackage[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.GoImport) > 0 { - i -= len(x.GoImport) - copy(dAtA[i:], x.GoImport) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GoImport))) - 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().(*ModuleDescriptor) - 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: ModuleDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleDescriptor: 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 GoImport", 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.GoImport = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UsePackage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UsePackage = append(x.UsePackage, &PackageReference{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UsePackage[len(x.UsePackage)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CanMigrateFrom", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CanMigrateFrom = append(x.CanMigrateFrom, &MigrateFromInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CanMigrateFrom[len(x.CanMigrateFrom)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PackageReference protoreflect.MessageDescriptor - fd_PackageReference_name protoreflect.FieldDescriptor - fd_PackageReference_revision protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_module_proto_init() - md_PackageReference = File_cosmos_app_v1alpha1_module_proto.Messages().ByName("PackageReference") - fd_PackageReference_name = md_PackageReference.Fields().ByName("name") - fd_PackageReference_revision = md_PackageReference.Fields().ByName("revision") -} - -var _ protoreflect.Message = (*fastReflection_PackageReference)(nil) - -type fastReflection_PackageReference PackageReference - -func (x *PackageReference) ProtoReflect() protoreflect.Message { - return (*fastReflection_PackageReference)(x) -} - -func (x *PackageReference) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_module_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PackageReference_messageType fastReflection_PackageReference_messageType -var _ protoreflect.MessageType = fastReflection_PackageReference_messageType{} - -type fastReflection_PackageReference_messageType struct{} - -func (x fastReflection_PackageReference_messageType) Zero() protoreflect.Message { - return (*fastReflection_PackageReference)(nil) -} -func (x fastReflection_PackageReference_messageType) New() protoreflect.Message { - return new(fastReflection_PackageReference) -} -func (x fastReflection_PackageReference_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PackageReference -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PackageReference) Descriptor() protoreflect.MessageDescriptor { - return md_PackageReference -} - -// 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_PackageReference) Type() protoreflect.MessageType { - return _fastReflection_PackageReference_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PackageReference) New() protoreflect.Message { - return new(fastReflection_PackageReference) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PackageReference) Interface() protoreflect.ProtoMessage { - return (*PackageReference)(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_PackageReference) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_PackageReference_name, value) { - return - } - } - if x.Revision != uint32(0) { - value := protoreflect.ValueOfUint32(x.Revision) - if !f(fd_PackageReference_revision, 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_PackageReference) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.app.v1alpha1.PackageReference.name": - return x.Name != "" - case "cosmos.app.v1alpha1.PackageReference.revision": - return x.Revision != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.PackageReference")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.PackageReference 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_PackageReference) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.PackageReference.name": - x.Name = "" - case "cosmos.app.v1alpha1.PackageReference.revision": - x.Revision = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.PackageReference")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.PackageReference 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_PackageReference) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.app.v1alpha1.PackageReference.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.app.v1alpha1.PackageReference.revision": - value := x.Revision - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.PackageReference")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.PackageReference 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_PackageReference) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.PackageReference.name": - x.Name = value.Interface().(string) - case "cosmos.app.v1alpha1.PackageReference.revision": - x.Revision = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.PackageReference")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.PackageReference 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_PackageReference) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.PackageReference.name": - panic(fmt.Errorf("field name of message cosmos.app.v1alpha1.PackageReference is not mutable")) - case "cosmos.app.v1alpha1.PackageReference.revision": - panic(fmt.Errorf("field revision of message cosmos.app.v1alpha1.PackageReference is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.PackageReference")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.PackageReference 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_PackageReference) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.PackageReference.name": - return protoreflect.ValueOfString("") - case "cosmos.app.v1alpha1.PackageReference.revision": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.PackageReference")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.PackageReference 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_PackageReference) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.PackageReference", 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_PackageReference) 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_PackageReference) 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_PackageReference) 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_PackageReference) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PackageReference) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Revision != 0 { - n += 1 + runtime.Sov(uint64(x.Revision)) - } - 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().(*PackageReference) - 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.Revision != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Revision)) - i-- - dAtA[i] = 0x10 - } - 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 { - 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().(*PackageReference) - 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: PackageReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PackageReference: 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 - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - x.Revision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Revision |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MigrateFromInfo protoreflect.MessageDescriptor - fd_MigrateFromInfo_module protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_module_proto_init() - md_MigrateFromInfo = File_cosmos_app_v1alpha1_module_proto.Messages().ByName("MigrateFromInfo") - fd_MigrateFromInfo_module = md_MigrateFromInfo.Fields().ByName("module") -} - -var _ protoreflect.Message = (*fastReflection_MigrateFromInfo)(nil) - -type fastReflection_MigrateFromInfo MigrateFromInfo - -func (x *MigrateFromInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_MigrateFromInfo)(x) -} - -func (x *MigrateFromInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_module_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MigrateFromInfo_messageType fastReflection_MigrateFromInfo_messageType -var _ protoreflect.MessageType = fastReflection_MigrateFromInfo_messageType{} - -type fastReflection_MigrateFromInfo_messageType struct{} - -func (x fastReflection_MigrateFromInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_MigrateFromInfo)(nil) -} -func (x fastReflection_MigrateFromInfo_messageType) New() protoreflect.Message { - return new(fastReflection_MigrateFromInfo) -} -func (x fastReflection_MigrateFromInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MigrateFromInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MigrateFromInfo) Descriptor() protoreflect.MessageDescriptor { - return md_MigrateFromInfo -} - -// 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_MigrateFromInfo) Type() protoreflect.MessageType { - return _fastReflection_MigrateFromInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MigrateFromInfo) New() protoreflect.Message { - return new(fastReflection_MigrateFromInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MigrateFromInfo) Interface() protoreflect.ProtoMessage { - return (*MigrateFromInfo)(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_MigrateFromInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Module != "" { - value := protoreflect.ValueOfString(x.Module) - if !f(fd_MigrateFromInfo_module, 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_MigrateFromInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.app.v1alpha1.MigrateFromInfo.module": - return x.Module != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.MigrateFromInfo")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.MigrateFromInfo 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_MigrateFromInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.MigrateFromInfo.module": - x.Module = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.MigrateFromInfo")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.MigrateFromInfo 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_MigrateFromInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.app.v1alpha1.MigrateFromInfo.module": - value := x.Module - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.MigrateFromInfo")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.MigrateFromInfo 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_MigrateFromInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.MigrateFromInfo.module": - x.Module = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.MigrateFromInfo")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.MigrateFromInfo 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_MigrateFromInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.MigrateFromInfo.module": - panic(fmt.Errorf("field module of message cosmos.app.v1alpha1.MigrateFromInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.MigrateFromInfo")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.MigrateFromInfo 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_MigrateFromInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.MigrateFromInfo.module": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.MigrateFromInfo")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.MigrateFromInfo 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_MigrateFromInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.MigrateFromInfo", 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_MigrateFromInfo) 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_MigrateFromInfo) 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_MigrateFromInfo) 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_MigrateFromInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MigrateFromInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Module) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MigrateFromInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Module) > 0 { - i -= len(x.Module) - copy(dAtA[i:], x.Module) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Module))) - 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().(*MigrateFromInfo) - 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: MigrateFromInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MigrateFromInfo: 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 Module", 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.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/app/v1alpha1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ModuleDescriptor describes an app module. -type ModuleDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // go_import names the package that should be imported by an app to load the - // module in the runtime module registry. Either go_import must be defined here - // or the go_package option must be defined at the file level to indicate - // to users where to location the module implementation. go_import takes - // precedence over go_package when both are defined. - GoImport string `protobuf:"bytes,1,opt,name=go_import,json=goImport,proto3" json:"go_import,omitempty"` - // use_package refers to a protobuf package that this module - // uses and exposes to the world. In an app, only one module should "use" - // or own a single protobuf package. It is assumed that the module uses - // all of the .proto files in a single package. - UsePackage []*PackageReference `protobuf:"bytes,2,rep,name=use_package,json=usePackage,proto3" json:"use_package,omitempty"` - // can_migrate_from defines which module versions this module can migrate - // state from. The framework will check that one module version is able to - // migrate from a previous module version before attempting to update its - // config. It is assumed that modules can transitively migrate from earlier - // versions. For instance if v3 declares it can migrate from v2, and v2 - // declares it can migrate from v1, the framework knows how to migrate - // from v1 to v3, assuming all 3 module versions are registered at runtime. - CanMigrateFrom []*MigrateFromInfo `protobuf:"bytes,3,rep,name=can_migrate_from,json=canMigrateFrom,proto3" json:"can_migrate_from,omitempty"` -} - -func (x *ModuleDescriptor) Reset() { - *x = ModuleDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModuleDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModuleDescriptor) ProtoMessage() {} - -// Deprecated: Use ModuleDescriptor.ProtoReflect.Descriptor instead. -func (*ModuleDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_module_proto_rawDescGZIP(), []int{0} -} - -func (x *ModuleDescriptor) GetGoImport() string { - if x != nil { - return x.GoImport - } - return "" -} - -func (x *ModuleDescriptor) GetUsePackage() []*PackageReference { - if x != nil { - return x.UsePackage - } - return nil -} - -func (x *ModuleDescriptor) GetCanMigrateFrom() []*MigrateFromInfo { - if x != nil { - return x.CanMigrateFrom - } - return nil -} - -// PackageReference is a reference to a protobuf package used by a module. -type PackageReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the fully-qualified name of the package. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // revision is the optional revision of the package that is being used. - // Protobuf packages used in Cosmos should generally have a major version - // as the last part of the package name, ex. foo.bar.baz.v1. - // The revision of a package can be thought of as the minor version of a - // package which has additional backwards compatible definitions that weren't - // present in a previous version. - // - // A package should indicate its revision with a source code comment - // above the package declaration in one of its fields containing the - // test "Revision N" where N is an integer revision. All packages start - // at revision 0 the first time they are released in a module. - // - // When a new version of a module is released and items are added to existing - // .proto files, these definitions should contain comments of the form - // "Since Revision N" where N is an integer revision. - // - // When the module runtime starts up, it will check the pinned proto - // image and panic if there are runtime protobuf definitions that are not - // in the pinned descriptor which do not have - // a "Since Revision N" comment or have a "Since Revision N" comment where - // N is <= to the revision specified here. This indicates that the protobuf - // files have been updated, but the pinned file descriptor hasn't. - // - // If there are items in the pinned file descriptor with a revision - // greater than the value indicated here, this will also cause a panic - // as it may mean that the pinned descriptor for a legacy module has been - // improperly updated or that there is some other versioning discrepancy. - // Runtime protobuf definitions will also be checked for compatibility - // with pinned file descriptors to make sure there are no incompatible changes. - // - // This behavior ensures that: - // * pinned proto images are up-to-date - // * protobuf files are carefully annotated with revision comments which - // are important good client UX - // * protobuf files are changed in backwards and forwards compatible ways - Revision uint32 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"` -} - -func (x *PackageReference) Reset() { - *x = PackageReference{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_module_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PackageReference) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PackageReference) ProtoMessage() {} - -// Deprecated: Use PackageReference.ProtoReflect.Descriptor instead. -func (*PackageReference) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_module_proto_rawDescGZIP(), []int{1} -} - -func (x *PackageReference) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PackageReference) GetRevision() uint32 { - if x != nil { - return x.Revision - } - return 0 -} - -// MigrateFromInfo is information on a module version that a newer module -// can migrate from. -type MigrateFromInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module is the fully-qualified protobuf name of the module config object - // for the previous module version, ex: "cosmos.group.module.v1.Module". - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` -} - -func (x *MigrateFromInfo) Reset() { - *x = MigrateFromInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_module_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MigrateFromInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MigrateFromInfo) ProtoMessage() {} - -// Deprecated: Use MigrateFromInfo.ProtoReflect.Descriptor instead. -func (*MigrateFromInfo) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_module_proto_rawDescGZIP(), []int{2} -} - -func (x *MigrateFromInfo) GetModule() string { - if x != nil { - return x.Module - } - return "" -} - -var file_cosmos_app_v1alpha1_module_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*ModuleDescriptor)(nil), - Field: 57193479, - Name: "cosmos.app.v1alpha1.module", - Tag: "bytes,57193479,opt,name=module", - Filename: "cosmos/app/v1alpha1/module.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // module indicates that this proto type is a config object for an app module - // and optionally provides other descriptive information about the module. - // It is recommended that a new module config object and go module is versioned - // for every state machine breaking version of a module. The recommended - // pattern for doing this is to put module config objects in a separate proto - // package from the API they expose. Ex: the cosmos.group.v1 API would be - // exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc. - // - // optional cosmos.app.v1alpha1.ModuleDescriptor module = 57193479; - E_Module = &file_cosmos_app_v1alpha1_module_proto_extTypes[0] -) - -var File_cosmos_app_v1alpha1_module_proto protoreflect.FileDescriptor - -var file_cosmos_app_v1alpha1_module_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x01, 0x0a, 0x10, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1b, - 0x0a, 0x09, 0x67, 0x6f, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x67, 0x6f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x75, - 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, - 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x0f, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x61, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0xe8, - 0xa2, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x70, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, - 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 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, 0x70, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_app_v1alpha1_module_proto_rawDescOnce sync.Once - file_cosmos_app_v1alpha1_module_proto_rawDescData = file_cosmos_app_v1alpha1_module_proto_rawDesc -) - -func file_cosmos_app_v1alpha1_module_proto_rawDescGZIP() []byte { - file_cosmos_app_v1alpha1_module_proto_rawDescOnce.Do(func() { - file_cosmos_app_v1alpha1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_app_v1alpha1_module_proto_rawDescData) - }) - return file_cosmos_app_v1alpha1_module_proto_rawDescData -} - -var file_cosmos_app_v1alpha1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_app_v1alpha1_module_proto_goTypes = []interface{}{ - (*ModuleDescriptor)(nil), // 0: cosmos.app.v1alpha1.ModuleDescriptor - (*PackageReference)(nil), // 1: cosmos.app.v1alpha1.PackageReference - (*MigrateFromInfo)(nil), // 2: cosmos.app.v1alpha1.MigrateFromInfo - (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions -} -var file_cosmos_app_v1alpha1_module_proto_depIdxs = []int32{ - 1, // 0: cosmos.app.v1alpha1.ModuleDescriptor.use_package:type_name -> cosmos.app.v1alpha1.PackageReference - 2, // 1: cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from:type_name -> cosmos.app.v1alpha1.MigrateFromInfo - 3, // 2: cosmos.app.v1alpha1.module:extendee -> google.protobuf.MessageOptions - 0, // 3: cosmos.app.v1alpha1.module:type_name -> cosmos.app.v1alpha1.ModuleDescriptor - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 3, // [3:4] is the sub-list for extension type_name - 2, // [2:3] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_app_v1alpha1_module_proto_init() } -func file_cosmos_app_v1alpha1_module_proto_init() { - if File_cosmos_app_v1alpha1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_app_v1alpha1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModuleDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_app_v1alpha1_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PackageReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_app_v1alpha1_module_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MigrateFromInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_app_v1alpha1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_cosmos_app_v1alpha1_module_proto_goTypes, - DependencyIndexes: file_cosmos_app_v1alpha1_module_proto_depIdxs, - MessageInfos: file_cosmos_app_v1alpha1_module_proto_msgTypes, - ExtensionInfos: file_cosmos_app_v1alpha1_module_proto_extTypes, - }.Build() - File_cosmos_app_v1alpha1_module_proto = out.File - file_cosmos_app_v1alpha1_module_proto_rawDesc = nil - file_cosmos_app_v1alpha1_module_proto_goTypes = nil - file_cosmos_app_v1alpha1_module_proto_depIdxs = nil -} diff --git a/api/cosmos/app/v1alpha1/query.pulsar.go b/api/cosmos/app/v1alpha1/query.pulsar.go deleted file mode 100644 index fd85cae0bf8a..000000000000 --- a/api/cosmos/app/v1alpha1/query.pulsar.go +++ /dev/null @@ -1,1000 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package appv1alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryConfigRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_query_proto_init() - md_QueryConfigRequest = File_cosmos_app_v1alpha1_query_proto.Messages().ByName("QueryConfigRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryConfigRequest)(nil) - -type fastReflection_QueryConfigRequest QueryConfigRequest - -func (x *QueryConfigRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryConfigRequest)(x) -} - -func (x *QueryConfigRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryConfigRequest_messageType fastReflection_QueryConfigRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryConfigRequest_messageType{} - -type fastReflection_QueryConfigRequest_messageType struct{} - -func (x fastReflection_QueryConfigRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryConfigRequest)(nil) -} -func (x fastReflection_QueryConfigRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryConfigRequest) -} -func (x fastReflection_QueryConfigRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConfigRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryConfigRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConfigRequest -} - -// 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_QueryConfigRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryConfigRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryConfigRequest) New() protoreflect.Message { - return new(fastReflection_QueryConfigRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryConfigRequest) Interface() protoreflect.ProtoMessage { - return (*QueryConfigRequest)(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_QueryConfigRequest) 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_QueryConfigRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigRequest")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigRequest 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_QueryConfigRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigRequest")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigRequest 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_QueryConfigRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigRequest")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigRequest 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_QueryConfigRequest) 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.app.v1alpha1.QueryConfigRequest")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigRequest 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_QueryConfigRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigRequest")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigRequest 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_QueryConfigRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigRequest")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigRequest 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_QueryConfigRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.QueryConfigRequest", 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_QueryConfigRequest) 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_QueryConfigRequest) 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_QueryConfigRequest) 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_QueryConfigRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryConfigRequest) - 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().(*QueryConfigRequest) - 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().(*QueryConfigRequest) - 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: QueryConfigRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConfigRequest: 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_QueryConfigResponse protoreflect.MessageDescriptor - fd_QueryConfigResponse_config protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_app_v1alpha1_query_proto_init() - md_QueryConfigResponse = File_cosmos_app_v1alpha1_query_proto.Messages().ByName("QueryConfigResponse") - fd_QueryConfigResponse_config = md_QueryConfigResponse.Fields().ByName("config") -} - -var _ protoreflect.Message = (*fastReflection_QueryConfigResponse)(nil) - -type fastReflection_QueryConfigResponse QueryConfigResponse - -func (x *QueryConfigResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryConfigResponse)(x) -} - -func (x *QueryConfigResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_app_v1alpha1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryConfigResponse_messageType fastReflection_QueryConfigResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryConfigResponse_messageType{} - -type fastReflection_QueryConfigResponse_messageType struct{} - -func (x fastReflection_QueryConfigResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryConfigResponse)(nil) -} -func (x fastReflection_QueryConfigResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryConfigResponse) -} -func (x fastReflection_QueryConfigResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConfigResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryConfigResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConfigResponse -} - -// 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_QueryConfigResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryConfigResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryConfigResponse) New() protoreflect.Message { - return new(fastReflection_QueryConfigResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryConfigResponse) Interface() protoreflect.ProtoMessage { - return (*QueryConfigResponse)(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_QueryConfigResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Config != nil { - value := protoreflect.ValueOfMessage(x.Config.ProtoReflect()) - if !f(fd_QueryConfigResponse_config, 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_QueryConfigResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.app.v1alpha1.QueryConfigResponse.config": - return x.Config != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigResponse")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigResponse 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_QueryConfigResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.QueryConfigResponse.config": - x.Config = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigResponse")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigResponse 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_QueryConfigResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.app.v1alpha1.QueryConfigResponse.config": - value := x.Config - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigResponse")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigResponse 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_QueryConfigResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.app.v1alpha1.QueryConfigResponse.config": - x.Config = value.Message().Interface().(*Config) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigResponse")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigResponse 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_QueryConfigResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.QueryConfigResponse.config": - if x.Config == nil { - x.Config = new(Config) - } - return protoreflect.ValueOfMessage(x.Config.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigResponse")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigResponse 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_QueryConfigResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.app.v1alpha1.QueryConfigResponse.config": - m := new(Config) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.v1alpha1.QueryConfigResponse")) - } - panic(fmt.Errorf("message cosmos.app.v1alpha1.QueryConfigResponse 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_QueryConfigResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.app.v1alpha1.QueryConfigResponse", 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_QueryConfigResponse) 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_QueryConfigResponse) 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_QueryConfigResponse) 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_QueryConfigResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryConfigResponse) - 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.Config != nil { - l = options.Size(x.Config) - 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().(*QueryConfigResponse) - 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.Config != nil { - encoded, err := options.Marshal(x.Config) - 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().(*QueryConfigResponse) - 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: QueryConfigResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConfigResponse: 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 Config", 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.Config == nil { - x.Config = &Config{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Config); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/app/v1alpha1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryConfigRequest is the Query/Config request type. -type QueryConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryConfigRequest) Reset() { - *x = QueryConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryConfigRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryConfigRequest) ProtoMessage() {} - -// Deprecated: Use QueryConfigRequest.ProtoReflect.Descriptor instead. -func (*QueryConfigRequest) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryConfigRequest is the Query/Config response type. -type QueryConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // config is the current app config. - Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *QueryConfigResponse) Reset() { - *x = QueryConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_app_v1alpha1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryConfigResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryConfigResponse) ProtoMessage() {} - -// Deprecated: Use QueryConfigResponse.ProtoReflect.Descriptor instead. -func (*QueryConfigResponse) Descriptor() ([]byte, []int) { - return file_cosmos_app_v1alpha1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryConfigResponse) GetConfig() *Config { - if x != nil { - return x.Config - } - return nil -} - -var File_cosmos_app_v1alpha1_query_proto protoreflect.FileDescriptor - -var file_cosmos_app_v1alpha1_query_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, - 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4a, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x66, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x5d, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0xd5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x3b, 0x61, 0x70, 0x70, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, - 0x70, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 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, 0x70, 0x70, - 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cosmos_app_v1alpha1_query_proto_rawDescOnce sync.Once - file_cosmos_app_v1alpha1_query_proto_rawDescData = file_cosmos_app_v1alpha1_query_proto_rawDesc -) - -func file_cosmos_app_v1alpha1_query_proto_rawDescGZIP() []byte { - file_cosmos_app_v1alpha1_query_proto_rawDescOnce.Do(func() { - file_cosmos_app_v1alpha1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_app_v1alpha1_query_proto_rawDescData) - }) - return file_cosmos_app_v1alpha1_query_proto_rawDescData -} - -var file_cosmos_app_v1alpha1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_app_v1alpha1_query_proto_goTypes = []interface{}{ - (*QueryConfigRequest)(nil), // 0: cosmos.app.v1alpha1.QueryConfigRequest - (*QueryConfigResponse)(nil), // 1: cosmos.app.v1alpha1.QueryConfigResponse - (*Config)(nil), // 2: cosmos.app.v1alpha1.Config -} -var file_cosmos_app_v1alpha1_query_proto_depIdxs = []int32{ - 2, // 0: cosmos.app.v1alpha1.QueryConfigResponse.config:type_name -> cosmos.app.v1alpha1.Config - 0, // 1: cosmos.app.v1alpha1.Query.Config:input_type -> cosmos.app.v1alpha1.QueryConfigRequest - 1, // 2: cosmos.app.v1alpha1.Query.Config:output_type -> cosmos.app.v1alpha1.QueryConfigResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_app_v1alpha1_query_proto_init() } -func file_cosmos_app_v1alpha1_query_proto_init() { - if File_cosmos_app_v1alpha1_query_proto != nil { - return - } - file_cosmos_app_v1alpha1_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_app_v1alpha1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_app_v1alpha1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_app_v1alpha1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_app_v1alpha1_query_proto_goTypes, - DependencyIndexes: file_cosmos_app_v1alpha1_query_proto_depIdxs, - MessageInfos: file_cosmos_app_v1alpha1_query_proto_msgTypes, - }.Build() - File_cosmos_app_v1alpha1_query_proto = out.File - file_cosmos_app_v1alpha1_query_proto_rawDesc = nil - file_cosmos_app_v1alpha1_query_proto_goTypes = nil - file_cosmos_app_v1alpha1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/auth/v1beta1/auth.pulsar.go b/api/cosmos/auth/v1beta1/auth.pulsar.go deleted file mode 100644 index a22455468af0..000000000000 --- a/api/cosmos/auth/v1beta1/auth.pulsar.go +++ /dev/null @@ -1,2190 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_BaseAccount protoreflect.MessageDescriptor - fd_BaseAccount_address protoreflect.FieldDescriptor - fd_BaseAccount_pub_key protoreflect.FieldDescriptor - fd_BaseAccount_account_number protoreflect.FieldDescriptor - fd_BaseAccount_sequence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_auth_proto_init() - md_BaseAccount = File_cosmos_auth_v1beta1_auth_proto.Messages().ByName("BaseAccount") - fd_BaseAccount_address = md_BaseAccount.Fields().ByName("address") - fd_BaseAccount_pub_key = md_BaseAccount.Fields().ByName("pub_key") - fd_BaseAccount_account_number = md_BaseAccount.Fields().ByName("account_number") - fd_BaseAccount_sequence = md_BaseAccount.Fields().ByName("sequence") -} - -var _ protoreflect.Message = (*fastReflection_BaseAccount)(nil) - -type fastReflection_BaseAccount BaseAccount - -func (x *BaseAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_BaseAccount)(x) -} - -func (x *BaseAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BaseAccount_messageType fastReflection_BaseAccount_messageType -var _ protoreflect.MessageType = fastReflection_BaseAccount_messageType{} - -type fastReflection_BaseAccount_messageType struct{} - -func (x fastReflection_BaseAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_BaseAccount)(nil) -} -func (x fastReflection_BaseAccount_messageType) New() protoreflect.Message { - return new(fastReflection_BaseAccount) -} -func (x fastReflection_BaseAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BaseAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BaseAccount) Descriptor() protoreflect.MessageDescriptor { - return md_BaseAccount -} - -// 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_BaseAccount) Type() protoreflect.MessageType { - return _fastReflection_BaseAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BaseAccount) New() protoreflect.Message { - return new(fastReflection_BaseAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BaseAccount) Interface() protoreflect.ProtoMessage { - return (*BaseAccount)(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_BaseAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_BaseAccount_address, value) { - return - } - } - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_BaseAccount_pub_key, value) { - return - } - } - if x.AccountNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.AccountNumber) - if !f(fd_BaseAccount_account_number, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_BaseAccount_sequence, 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_BaseAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.BaseAccount.address": - return x.Address != "" - case "cosmos.auth.v1beta1.BaseAccount.pub_key": - return x.PubKey != nil - case "cosmos.auth.v1beta1.BaseAccount.account_number": - return x.AccountNumber != uint64(0) - case "cosmos.auth.v1beta1.BaseAccount.sequence": - return x.Sequence != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.BaseAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.BaseAccount 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_BaseAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.BaseAccount.address": - x.Address = "" - case "cosmos.auth.v1beta1.BaseAccount.pub_key": - x.PubKey = nil - case "cosmos.auth.v1beta1.BaseAccount.account_number": - x.AccountNumber = uint64(0) - case "cosmos.auth.v1beta1.BaseAccount.sequence": - x.Sequence = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.BaseAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.BaseAccount 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_BaseAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.BaseAccount.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.auth.v1beta1.BaseAccount.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.auth.v1beta1.BaseAccount.account_number": - value := x.AccountNumber - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1beta1.BaseAccount.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.BaseAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.BaseAccount 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_BaseAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.BaseAccount.address": - x.Address = value.Interface().(string) - case "cosmos.auth.v1beta1.BaseAccount.pub_key": - x.PubKey = value.Message().Interface().(*anypb.Any) - case "cosmos.auth.v1beta1.BaseAccount.account_number": - x.AccountNumber = value.Uint() - case "cosmos.auth.v1beta1.BaseAccount.sequence": - x.Sequence = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.BaseAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.BaseAccount 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_BaseAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.BaseAccount.pub_key": - if x.PubKey == nil { - x.PubKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "cosmos.auth.v1beta1.BaseAccount.address": - panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.BaseAccount is not mutable")) - case "cosmos.auth.v1beta1.BaseAccount.account_number": - panic(fmt.Errorf("field account_number of message cosmos.auth.v1beta1.BaseAccount is not mutable")) - case "cosmos.auth.v1beta1.BaseAccount.sequence": - panic(fmt.Errorf("field sequence of message cosmos.auth.v1beta1.BaseAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.BaseAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.BaseAccount 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_BaseAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.BaseAccount.address": - return protoreflect.ValueOfString("") - case "cosmos.auth.v1beta1.BaseAccount.pub_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.auth.v1beta1.BaseAccount.account_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1beta1.BaseAccount.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.BaseAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.BaseAccount 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_BaseAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.BaseAccount", 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_BaseAccount) 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_BaseAccount) 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_BaseAccount) 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_BaseAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BaseAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AccountNumber != 0 { - n += 1 + runtime.Sov(uint64(x.AccountNumber)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - 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().(*BaseAccount) - 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.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x20 - } - if x.AccountNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BaseAccount) - 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: BaseAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BaseAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PubKey", 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.PubKey == nil { - x.PubKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - x.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ModuleAccount_3_list)(nil) - -type _ModuleAccount_3_list struct { - list *[]string -} - -func (x *_ModuleAccount_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ModuleAccount_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ModuleAccount_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ModuleAccount_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ModuleAccount_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ModuleAccount at list field Permissions as it is not of Message kind")) -} - -func (x *_ModuleAccount_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ModuleAccount_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ModuleAccount_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ModuleAccount protoreflect.MessageDescriptor - fd_ModuleAccount_base_account protoreflect.FieldDescriptor - fd_ModuleAccount_name protoreflect.FieldDescriptor - fd_ModuleAccount_permissions protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_auth_proto_init() - md_ModuleAccount = File_cosmos_auth_v1beta1_auth_proto.Messages().ByName("ModuleAccount") - fd_ModuleAccount_base_account = md_ModuleAccount.Fields().ByName("base_account") - fd_ModuleAccount_name = md_ModuleAccount.Fields().ByName("name") - fd_ModuleAccount_permissions = md_ModuleAccount.Fields().ByName("permissions") -} - -var _ protoreflect.Message = (*fastReflection_ModuleAccount)(nil) - -type fastReflection_ModuleAccount ModuleAccount - -func (x *ModuleAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModuleAccount)(x) -} - -func (x *ModuleAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModuleAccount_messageType fastReflection_ModuleAccount_messageType -var _ protoreflect.MessageType = fastReflection_ModuleAccount_messageType{} - -type fastReflection_ModuleAccount_messageType struct{} - -func (x fastReflection_ModuleAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModuleAccount)(nil) -} -func (x fastReflection_ModuleAccount_messageType) New() protoreflect.Message { - return new(fastReflection_ModuleAccount) -} -func (x fastReflection_ModuleAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModuleAccount) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleAccount -} - -// 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_ModuleAccount) Type() protoreflect.MessageType { - return _fastReflection_ModuleAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModuleAccount) New() protoreflect.Message { - return new(fastReflection_ModuleAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModuleAccount) Interface() protoreflect.ProtoMessage { - return (*ModuleAccount)(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_ModuleAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) - if !f(fd_ModuleAccount_base_account, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ModuleAccount_name, value) { - return - } - } - if len(x.Permissions) != 0 { - value := protoreflect.ValueOfList(&_ModuleAccount_3_list{list: &x.Permissions}) - if !f(fd_ModuleAccount_permissions, 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_ModuleAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.ModuleAccount.base_account": - return x.BaseAccount != nil - case "cosmos.auth.v1beta1.ModuleAccount.name": - return x.Name != "" - case "cosmos.auth.v1beta1.ModuleAccount.permissions": - return len(x.Permissions) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.ModuleAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.ModuleAccount 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_ModuleAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.ModuleAccount.base_account": - x.BaseAccount = nil - case "cosmos.auth.v1beta1.ModuleAccount.name": - x.Name = "" - case "cosmos.auth.v1beta1.ModuleAccount.permissions": - x.Permissions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.ModuleAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.ModuleAccount 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_ModuleAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.ModuleAccount.base_account": - value := x.BaseAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.auth.v1beta1.ModuleAccount.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.auth.v1beta1.ModuleAccount.permissions": - if len(x.Permissions) == 0 { - return protoreflect.ValueOfList(&_ModuleAccount_3_list{}) - } - listValue := &_ModuleAccount_3_list{list: &x.Permissions} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.ModuleAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.ModuleAccount 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_ModuleAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.ModuleAccount.base_account": - x.BaseAccount = value.Message().Interface().(*BaseAccount) - case "cosmos.auth.v1beta1.ModuleAccount.name": - x.Name = value.Interface().(string) - case "cosmos.auth.v1beta1.ModuleAccount.permissions": - lv := value.List() - clv := lv.(*_ModuleAccount_3_list) - x.Permissions = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.ModuleAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.ModuleAccount 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_ModuleAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.ModuleAccount.base_account": - if x.BaseAccount == nil { - x.BaseAccount = new(BaseAccount) - } - return protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) - case "cosmos.auth.v1beta1.ModuleAccount.permissions": - if x.Permissions == nil { - x.Permissions = []string{} - } - value := &_ModuleAccount_3_list{list: &x.Permissions} - return protoreflect.ValueOfList(value) - case "cosmos.auth.v1beta1.ModuleAccount.name": - panic(fmt.Errorf("field name of message cosmos.auth.v1beta1.ModuleAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.ModuleAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.ModuleAccount 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_ModuleAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.ModuleAccount.base_account": - m := new(BaseAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.auth.v1beta1.ModuleAccount.name": - return protoreflect.ValueOfString("") - case "cosmos.auth.v1beta1.ModuleAccount.permissions": - list := []string{} - return protoreflect.ValueOfList(&_ModuleAccount_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.ModuleAccount")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.ModuleAccount 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_ModuleAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.ModuleAccount", 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_ModuleAccount) 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_ModuleAccount) 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_ModuleAccount) 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_ModuleAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModuleAccount) - 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.BaseAccount != nil { - l = options.Size(x.BaseAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Permissions) > 0 { - for _, s := range x.Permissions { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ModuleAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Permissions) > 0 { - for iNdEx := len(x.Permissions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Permissions[iNdEx]) - copy(dAtA[i:], x.Permissions[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permissions[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - 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] = 0x12 - } - if x.BaseAccount != nil { - encoded, err := options.Marshal(x.BaseAccount) - 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().(*ModuleAccount) - 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: ModuleAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleAccount: 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 BaseAccount", 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.BaseAccount == nil { - x.BaseAccount = &BaseAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", 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.Permissions = append(x.Permissions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_max_memo_characters protoreflect.FieldDescriptor - fd_Params_tx_sig_limit protoreflect.FieldDescriptor - fd_Params_tx_size_cost_per_byte protoreflect.FieldDescriptor - fd_Params_sig_verify_cost_ed25519 protoreflect.FieldDescriptor - fd_Params_sig_verify_cost_secp256k1 protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_auth_proto_init() - md_Params = File_cosmos_auth_v1beta1_auth_proto.Messages().ByName("Params") - fd_Params_max_memo_characters = md_Params.Fields().ByName("max_memo_characters") - fd_Params_tx_sig_limit = md_Params.Fields().ByName("tx_sig_limit") - fd_Params_tx_size_cost_per_byte = md_Params.Fields().ByName("tx_size_cost_per_byte") - fd_Params_sig_verify_cost_ed25519 = md_Params.Fields().ByName("sig_verify_cost_ed25519") - fd_Params_sig_verify_cost_secp256k1 = md_Params.Fields().ByName("sig_verify_cost_secp256k1") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_auth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MaxMemoCharacters != uint64(0) { - value := protoreflect.ValueOfUint64(x.MaxMemoCharacters) - if !f(fd_Params_max_memo_characters, value) { - return - } - } - if x.TxSigLimit != uint64(0) { - value := protoreflect.ValueOfUint64(x.TxSigLimit) - if !f(fd_Params_tx_sig_limit, value) { - return - } - } - if x.TxSizeCostPerByte != uint64(0) { - value := protoreflect.ValueOfUint64(x.TxSizeCostPerByte) - if !f(fd_Params_tx_size_cost_per_byte, value) { - return - } - } - if x.SigVerifyCostEd25519 != uint64(0) { - value := protoreflect.ValueOfUint64(x.SigVerifyCostEd25519) - if !f(fd_Params_sig_verify_cost_ed25519, value) { - return - } - } - if x.SigVerifyCostSecp256K1 != uint64(0) { - value := protoreflect.ValueOfUint64(x.SigVerifyCostSecp256K1) - if !f(fd_Params_sig_verify_cost_secp256k1, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Params.max_memo_characters": - return x.MaxMemoCharacters != uint64(0) - case "cosmos.auth.v1beta1.Params.tx_sig_limit": - return x.TxSigLimit != uint64(0) - case "cosmos.auth.v1beta1.Params.tx_size_cost_per_byte": - return x.TxSizeCostPerByte != uint64(0) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519": - return x.SigVerifyCostEd25519 != uint64(0) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1": - return x.SigVerifyCostSecp256K1 != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Params.max_memo_characters": - x.MaxMemoCharacters = uint64(0) - case "cosmos.auth.v1beta1.Params.tx_sig_limit": - x.TxSigLimit = uint64(0) - case "cosmos.auth.v1beta1.Params.tx_size_cost_per_byte": - x.TxSizeCostPerByte = uint64(0) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519": - x.SigVerifyCostEd25519 = uint64(0) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1": - x.SigVerifyCostSecp256K1 = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.Params.max_memo_characters": - value := x.MaxMemoCharacters - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1beta1.Params.tx_sig_limit": - value := x.TxSigLimit - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1beta1.Params.tx_size_cost_per_byte": - value := x.TxSizeCostPerByte - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519": - value := x.SigVerifyCostEd25519 - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1": - value := x.SigVerifyCostSecp256K1 - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Params.max_memo_characters": - x.MaxMemoCharacters = value.Uint() - case "cosmos.auth.v1beta1.Params.tx_sig_limit": - x.TxSigLimit = value.Uint() - case "cosmos.auth.v1beta1.Params.tx_size_cost_per_byte": - x.TxSizeCostPerByte = value.Uint() - case "cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519": - x.SigVerifyCostEd25519 = value.Uint() - case "cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1": - x.SigVerifyCostSecp256K1 = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Params.max_memo_characters": - panic(fmt.Errorf("field max_memo_characters of message cosmos.auth.v1beta1.Params is not mutable")) - case "cosmos.auth.v1beta1.Params.tx_sig_limit": - panic(fmt.Errorf("field tx_sig_limit of message cosmos.auth.v1beta1.Params is not mutable")) - case "cosmos.auth.v1beta1.Params.tx_size_cost_per_byte": - panic(fmt.Errorf("field tx_size_cost_per_byte of message cosmos.auth.v1beta1.Params is not mutable")) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519": - panic(fmt.Errorf("field sig_verify_cost_ed25519 of message cosmos.auth.v1beta1.Params is not mutable")) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1": - panic(fmt.Errorf("field sig_verify_cost_secp256k1 of message cosmos.auth.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Params.max_memo_characters": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1beta1.Params.tx_sig_limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1beta1.Params.tx_size_cost_per_byte": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.MaxMemoCharacters != 0 { - n += 1 + runtime.Sov(uint64(x.MaxMemoCharacters)) - } - if x.TxSigLimit != 0 { - n += 1 + runtime.Sov(uint64(x.TxSigLimit)) - } - if x.TxSizeCostPerByte != 0 { - n += 1 + runtime.Sov(uint64(x.TxSizeCostPerByte)) - } - if x.SigVerifyCostEd25519 != 0 { - n += 1 + runtime.Sov(uint64(x.SigVerifyCostEd25519)) - } - if x.SigVerifyCostSecp256K1 != 0 { - n += 1 + runtime.Sov(uint64(x.SigVerifyCostSecp256K1)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.SigVerifyCostSecp256K1 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SigVerifyCostSecp256K1)) - i-- - dAtA[i] = 0x28 - } - if x.SigVerifyCostEd25519 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SigVerifyCostEd25519)) - i-- - dAtA[i] = 0x20 - } - if x.TxSizeCostPerByte != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TxSizeCostPerByte)) - i-- - dAtA[i] = 0x18 - } - if x.TxSigLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TxSigLimit)) - i-- - dAtA[i] = 0x10 - } - if x.MaxMemoCharacters != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxMemoCharacters)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxMemoCharacters", wireType) - } - x.MaxMemoCharacters = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxMemoCharacters |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxSigLimit", wireType) - } - x.TxSigLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TxSigLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxSizeCostPerByte", wireType) - } - x.TxSizeCostPerByte = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TxSizeCostPerByte |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigVerifyCostEd25519", wireType) - } - x.SigVerifyCostEd25519 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SigVerifyCostEd25519 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigVerifyCostSecp256K1", wireType) - } - x.SigVerifyCostSecp256K1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SigVerifyCostSecp256K1 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/auth/v1beta1/auth.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BaseAccount defines a base account type. It contains all the necessary fields -// for basic account functionality. Any custom account type should extend this -// type for additional functionality (e.g. vesting). -type BaseAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey *anypb.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (x *BaseAccount) Reset() { - *x = BaseAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BaseAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BaseAccount) ProtoMessage() {} - -// Deprecated: Use BaseAccount.ProtoReflect.Descriptor instead. -func (*BaseAccount) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *BaseAccount) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *BaseAccount) GetPubKey() *anypb.Any { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *BaseAccount) GetAccountNumber() uint64 { - if x != nil { - return x.AccountNumber - } - return 0 -} - -func (x *BaseAccount) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -// ModuleAccount defines an account for modules that holds coins on a pool. -type ModuleAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseAccount *BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3" json:"base_account,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Permissions []string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"` -} - -func (x *ModuleAccount) Reset() { - *x = ModuleAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModuleAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModuleAccount) ProtoMessage() {} - -// Deprecated: Use ModuleAccount.ProtoReflect.Descriptor instead. -func (*ModuleAccount) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *ModuleAccount) GetBaseAccount() *BaseAccount { - if x != nil { - return x.BaseAccount - } - return nil -} - -func (x *ModuleAccount) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ModuleAccount) GetPermissions() []string { - if x != nil { - return x.Permissions - } - return nil -} - -// Params defines the parameters for the auth module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxMemoCharacters uint64 `protobuf:"varint,1,opt,name=max_memo_characters,json=maxMemoCharacters,proto3" json:"max_memo_characters,omitempty"` - TxSigLimit uint64 `protobuf:"varint,2,opt,name=tx_sig_limit,json=txSigLimit,proto3" json:"tx_sig_limit,omitempty"` - TxSizeCostPerByte uint64 `protobuf:"varint,3,opt,name=tx_size_cost_per_byte,json=txSizeCostPerByte,proto3" json:"tx_size_cost_per_byte,omitempty"` - SigVerifyCostEd25519 uint64 `protobuf:"varint,4,opt,name=sig_verify_cost_ed25519,json=sigVerifyCostEd25519,proto3" json:"sig_verify_cost_ed25519,omitempty"` - SigVerifyCostSecp256K1 uint64 `protobuf:"varint,5,opt,name=sig_verify_cost_secp256k1,json=sigVerifyCostSecp256k1,proto3" json:"sig_verify_cost_secp256k1,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_auth_proto_rawDescGZIP(), []int{2} -} - -func (x *Params) GetMaxMemoCharacters() uint64 { - if x != nil { - return x.MaxMemoCharacters - } - return 0 -} - -func (x *Params) GetTxSigLimit() uint64 { - if x != nil { - return x.TxSigLimit - } - return 0 -} - -func (x *Params) GetTxSizeCostPerByte() uint64 { - if x != nil { - return x.TxSizeCostPerByte - } - return 0 -} - -func (x *Params) GetSigVerifyCostEd25519() uint64 { - if x != nil { - return x.SigVerifyCostEd25519 - } - return 0 -} - -func (x *Params) GetSigVerifyCostSecp256K1() uint64 { - if x != nil { - return x.SigVerifyCostSecp256K1 - } - return 0 -} - -var File_cosmos_auth_v1beta1_auth_proto protoreflect.FileDescriptor - -var file_cosmos_auth_v1beta1_auth_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xe7, 0x01, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 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, 0x12, 0x47, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x02, 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, 0x18, 0xea, 0xde, - 0x1f, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2c, 0x6f, 0x6d, 0x69, - 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x25, - 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x3a, 0x18, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0xca, - 0xb4, 0x2d, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x22, 0xac, 0x01, 0x0a, 0x0d, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, - 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x0b, 0x62, 0x61, 0x73, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x1a, - 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x22, 0xbe, 0x02, 0x0a, 0x06, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, - 0x6f, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x68, 0x61, 0x72, 0x61, - 0x63, 0x74, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x78, 0x5f, 0x73, 0x69, 0x67, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x78, 0x53, - 0x69, 0x67, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x15, 0x74, 0x78, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x74, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x6f, - 0x73, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x17, 0x73, 0x69, 0x67, - 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x65, 0x64, 0x32, - 0x35, 0x35, 0x31, 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x18, 0xe2, 0xde, 0x1f, 0x14, - 0x53, 0x69, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x73, 0x74, 0x45, 0x44, 0x32, - 0x35, 0x35, 0x31, 0x39, 0x52, 0x14, 0x73, 0x69, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x73, 0x74, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x55, 0x0a, 0x19, 0x73, 0x69, - 0x67, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, - 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1a, 0xe2, - 0xde, 0x1f, 0x16, 0x53, 0x69, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x73, 0x74, - 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x52, 0x16, 0x73, 0x69, 0x67, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, - 0x31, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xd4, 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, 0x09, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 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 ( - file_cosmos_auth_v1beta1_auth_proto_rawDescOnce sync.Once - file_cosmos_auth_v1beta1_auth_proto_rawDescData = file_cosmos_auth_v1beta1_auth_proto_rawDesc -) - -func file_cosmos_auth_v1beta1_auth_proto_rawDescGZIP() []byte { - file_cosmos_auth_v1beta1_auth_proto_rawDescOnce.Do(func() { - file_cosmos_auth_v1beta1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1beta1_auth_proto_rawDescData) - }) - return file_cosmos_auth_v1beta1_auth_proto_rawDescData -} - -var file_cosmos_auth_v1beta1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_auth_v1beta1_auth_proto_goTypes = []interface{}{ - (*BaseAccount)(nil), // 0: cosmos.auth.v1beta1.BaseAccount - (*ModuleAccount)(nil), // 1: cosmos.auth.v1beta1.ModuleAccount - (*Params)(nil), // 2: cosmos.auth.v1beta1.Params - (*anypb.Any)(nil), // 3: google.protobuf.Any -} -var file_cosmos_auth_v1beta1_auth_proto_depIdxs = []int32{ - 3, // 0: cosmos.auth.v1beta1.BaseAccount.pub_key:type_name -> google.protobuf.Any - 0, // 1: cosmos.auth.v1beta1.ModuleAccount.base_account:type_name -> cosmos.auth.v1beta1.BaseAccount - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_auth_v1beta1_auth_proto_init() } -func file_cosmos_auth_v1beta1_auth_proto_init() { - if File_cosmos_auth_v1beta1_auth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_auth_v1beta1_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModuleAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_auth_v1beta1_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_auth_v1beta1_auth_proto_goTypes, - DependencyIndexes: file_cosmos_auth_v1beta1_auth_proto_depIdxs, - MessageInfos: file_cosmos_auth_v1beta1_auth_proto_msgTypes, - }.Build() - File_cosmos_auth_v1beta1_auth_proto = out.File - file_cosmos_auth_v1beta1_auth_proto_rawDesc = nil - file_cosmos_auth_v1beta1_auth_proto_goTypes = nil - file_cosmos_auth_v1beta1_auth_proto_depIdxs = nil -} diff --git a/api/cosmos/auth/v1beta1/genesis.pulsar.go b/api/cosmos/auth/v1beta1/genesis.pulsar.go deleted file mode 100644 index 3e35fa7a5560..000000000000 --- a/api/cosmos/auth/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,751 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*anypb.Any -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_accounts protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_auth_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_accounts = md_GenesisState.Fields().ByName("accounts") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Accounts}) - if !f(fd_GenesisState_accounts, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.GenesisState.params": - return x.Params != nil - case "cosmos.auth.v1beta1.GenesisState.accounts": - return len(x.Accounts) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.GenesisState.params": - x.Params = nil - case "cosmos.auth.v1beta1.GenesisState.accounts": - x.Accounts = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.auth.v1beta1.GenesisState.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_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.GenesisState")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "cosmos.auth.v1beta1.GenesisState.accounts": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Accounts = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "cosmos.auth.v1beta1.GenesisState.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} - } - value := &_GenesisState_2_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.GenesisState")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.auth.v1beta1.GenesisState.accounts": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.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) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.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] = 0x12 - } - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.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 - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/auth/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the auth module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines all the paramaters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // accounts are the accounts present at genesis. - Accounts []*anypb.Any `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetAccounts() []*anypb.Any { - if x != nil { - return x.Accounts - } - return nil -} - -var File_cosmos_auth_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_auth_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 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, 0x12, 0x30, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x18, 0x02, 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, 0x52, 0x08, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0xd7, 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, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 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 ( - file_cosmos_auth_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_auth_v1beta1_genesis_proto_rawDescData = file_cosmos_auth_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_auth_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_auth_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_auth_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_auth_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_auth_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_auth_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.auth.v1beta1.GenesisState - (*Params)(nil), // 1: cosmos.auth.v1beta1.Params - (*anypb.Any)(nil), // 2: google.protobuf.Any -} -var file_cosmos_auth_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.auth.v1beta1.GenesisState.params:type_name -> cosmos.auth.v1beta1.Params - 2, // 1: cosmos.auth.v1beta1.GenesisState.accounts:type_name -> google.protobuf.Any - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_auth_v1beta1_genesis_proto_init() } -func file_cosmos_auth_v1beta1_genesis_proto_init() { - if File_cosmos_auth_v1beta1_genesis_proto != nil { - return - } - file_cosmos_auth_v1beta1_auth_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_auth_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_auth_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_auth_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_auth_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_auth_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_auth_v1beta1_genesis_proto = out.File - file_cosmos_auth_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_auth_v1beta1_genesis_proto_goTypes = nil - file_cosmos_auth_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go deleted file mode 100644 index 38d7bed61743..000000000000 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ /dev/null @@ -1,6913 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryAccountsRequest protoreflect.MessageDescriptor - fd_QueryAccountsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountsRequest") - fd_QueryAccountsRequest_pagination = md_QueryAccountsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountsRequest)(nil) - -type fastReflection_QueryAccountsRequest QueryAccountsRequest - -func (x *QueryAccountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountsRequest)(x) -} - -func (x *QueryAccountsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountsRequest_messageType fastReflection_QueryAccountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountsRequest_messageType{} - -type fastReflection_QueryAccountsRequest_messageType struct{} - -func (x fastReflection_QueryAccountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountsRequest)(nil) -} -func (x fastReflection_QueryAccountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountsRequest) -} -func (x fastReflection_QueryAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsRequest -} - -// 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_QueryAccountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountsRequest)(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_QueryAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAccountsRequest_pagination, 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_QueryAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountsRequest", 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountsRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAccountsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QueryAccountsRequest) - 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: QueryAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAccountsResponse_1_list)(nil) - -type _QueryAccountsResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_QueryAccountsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAccountsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAccountsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAccountsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAccountsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAccountsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAccountsResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAccountsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAccountsResponse protoreflect.MessageDescriptor - fd_QueryAccountsResponse_accounts protoreflect.FieldDescriptor - fd_QueryAccountsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountsResponse") - fd_QueryAccountsResponse_accounts = md_QueryAccountsResponse.Fields().ByName("accounts") - fd_QueryAccountsResponse_pagination = md_QueryAccountsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountsResponse)(nil) - -type fastReflection_QueryAccountsResponse QueryAccountsResponse - -func (x *QueryAccountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountsResponse)(x) -} - -func (x *QueryAccountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountsResponse_messageType fastReflection_QueryAccountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountsResponse_messageType{} - -type fastReflection_QueryAccountsResponse_messageType struct{} - -func (x fastReflection_QueryAccountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountsResponse)(nil) -} -func (x fastReflection_QueryAccountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountsResponse) -} -func (x fastReflection_QueryAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsResponse -} - -// 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_QueryAccountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountsResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountsResponse)(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_QueryAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{list: &x.Accounts}) - if !f(fd_QueryAccountsResponse_accounts, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAccountsResponse_pagination, 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_QueryAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - return len(x.Accounts) != 0 - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - x.Accounts = nil - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{}) - } - listValue := &_QueryAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(listValue) - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - lv := value.List() - clv := lv.(*_QueryAccountsResponse_1_list) - x.Accounts = *clv.list - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} - } - value := &_QueryAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(value) - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{list: &list}) - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountsResponse", 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_QueryAccountsResponse) 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_QueryAccountsResponse) 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_QueryAccountsResponse) 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_QueryAccountsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Accounts) > 0 { - for _, e := range x.Accounts { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAccountsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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 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().(*QueryAccountsResponse) - 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: QueryAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsResponse: 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) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryAccountRequest protoreflect.MessageDescriptor - fd_QueryAccountRequest_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountRequest") - fd_QueryAccountRequest_address = md_QueryAccountRequest.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountRequest)(nil) - -type fastReflection_QueryAccountRequest QueryAccountRequest - -func (x *QueryAccountRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountRequest)(x) -} - -func (x *QueryAccountRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountRequest_messageType fastReflection_QueryAccountRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountRequest_messageType{} - -type fastReflection_QueryAccountRequest_messageType struct{} - -func (x fastReflection_QueryAccountRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountRequest)(nil) -} -func (x fastReflection_QueryAccountRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountRequest) -} -func (x fastReflection_QueryAccountRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountRequest -} - -// 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_QueryAccountRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountRequest)(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_QueryAccountRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAccountRequest_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAccountRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.QueryAccountRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountRequest", 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_QueryAccountRequest) 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_QueryAccountRequest) 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_QueryAccountRequest) 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_QueryAccountRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*QueryAccountRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountRequest) - 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: QueryAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) 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.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) 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.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) 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.QueryModuleAccountsRequest")) - } - 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_QueryModuleAccountsRequest) 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.QueryModuleAccountsRequest")) - } - 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_QueryModuleAccountsRequest) 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("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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsRequest) - 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().(*QueryModuleAccountsRequest) - 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().(*QueryModuleAccountsRequest) - 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: QueryModuleAccountsRequest: 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) - } - 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[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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": - 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_QueryAccountResponse protoreflect.MessageDescriptor - fd_QueryAccountResponse_account 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") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) - -type fastReflection_QueryAccountResponse QueryAccountResponse - -func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(x) -} - -func (x *QueryAccountResponse) 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_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} - -type fastReflection_QueryAccountResponse_messageType struct{} - -func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(nil) -} -func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) -} -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_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_QueryAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryAccountResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountResponse)(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_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. -// -// 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_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.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_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.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_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.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_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.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_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.QueryAccountResponse")) - } - 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_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.QueryAccountResponse")) - } - 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_QueryAccountResponse) 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("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_QueryAccountResponse) 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_QueryAccountResponse) 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_QueryAccountResponse) 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_QueryAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountResponse) - 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.Account != nil { - l = options.Size(x.Account) - 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().(*QueryAccountResponse) - 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.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 { - 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().(*QueryAccountResponse) - 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: QueryAccountResponse: 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) - } - 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:]) - 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_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) 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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_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 _ 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 -) - -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") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) - -type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse - -func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(x) -} - -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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} - -type fastReflection_QueryModuleAccountsResponse_messageType struct{} - -func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(nil) -} -func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) -} -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_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_QueryModuleAccountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsResponse)(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_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 - } - } -} - -// 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_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - 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.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - 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.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) 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) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) 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 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} - } - 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.QueryModuleAccountsResponse")) - } - 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_QueryModuleAccountsResponse) 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}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - 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_QueryModuleAccountsResponse) 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("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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.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) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.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 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().(*QueryModuleAccountsResponse) - 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: QueryModuleAccountsResponse: 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) - } - 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) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.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 - 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_Bech32PrefixRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_Bech32PrefixRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("Bech32PrefixRequest") -} - -var _ protoreflect.Message = (*fastReflection_Bech32PrefixRequest)(nil) - -type fastReflection_Bech32PrefixRequest Bech32PrefixRequest - -func (x *Bech32PrefixRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_Bech32PrefixRequest)(x) -} - -func (x *Bech32PrefixRequest) 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Bech32PrefixRequest_messageType fastReflection_Bech32PrefixRequest_messageType -var _ protoreflect.MessageType = fastReflection_Bech32PrefixRequest_messageType{} - -type fastReflection_Bech32PrefixRequest_messageType struct{} - -func (x fastReflection_Bech32PrefixRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_Bech32PrefixRequest)(nil) -} -func (x fastReflection_Bech32PrefixRequest_messageType) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixRequest) -} -func (x fastReflection_Bech32PrefixRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Bech32PrefixRequest) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixRequest -} - -// 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_Bech32PrefixRequest) Type() protoreflect.MessageType { - return _fastReflection_Bech32PrefixRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Bech32PrefixRequest) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Bech32PrefixRequest) Interface() protoreflect.ProtoMessage { - return (*Bech32PrefixRequest)(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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) 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.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) 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.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) 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.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) 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.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Bech32PrefixRequest", 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Bech32PrefixRequest) - 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().(*Bech32PrefixRequest) - 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().(*Bech32PrefixRequest) - 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: Bech32PrefixRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bech32PrefixRequest: 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_Bech32PrefixResponse protoreflect.MessageDescriptor - fd_Bech32PrefixResponse_bech32_prefix protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_Bech32PrefixResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("Bech32PrefixResponse") - fd_Bech32PrefixResponse_bech32_prefix = md_Bech32PrefixResponse.Fields().ByName("bech32_prefix") -} - -var _ protoreflect.Message = (*fastReflection_Bech32PrefixResponse)(nil) - -type fastReflection_Bech32PrefixResponse Bech32PrefixResponse - -func (x *Bech32PrefixResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_Bech32PrefixResponse)(x) -} - -func (x *Bech32PrefixResponse) 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Bech32PrefixResponse_messageType fastReflection_Bech32PrefixResponse_messageType -var _ protoreflect.MessageType = fastReflection_Bech32PrefixResponse_messageType{} - -type fastReflection_Bech32PrefixResponse_messageType struct{} - -func (x fastReflection_Bech32PrefixResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_Bech32PrefixResponse)(nil) -} -func (x fastReflection_Bech32PrefixResponse_messageType) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixResponse) -} -func (x fastReflection_Bech32PrefixResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Bech32PrefixResponse) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixResponse -} - -// 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_Bech32PrefixResponse) Type() protoreflect.MessageType { - return _fastReflection_Bech32PrefixResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Bech32PrefixResponse) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Bech32PrefixResponse) Interface() protoreflect.ProtoMessage { - return (*Bech32PrefixResponse)(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_Bech32PrefixResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_Bech32PrefixResponse_bech32_prefix, 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_Bech32PrefixResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - return x.Bech32Prefix != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - x.Bech32Prefix = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - x.Bech32Prefix = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - panic(fmt.Errorf("field bech32_prefix of message cosmos.auth.v1beta1.Bech32PrefixResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Bech32PrefixResponse", 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Bech32PrefixResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Bech32Prefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Bech32PrefixResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - 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().(*Bech32PrefixResponse) - 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: Bech32PrefixResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bech32PrefixResponse: 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 Bech32Prefix", 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.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AddressBytesToStringRequest protoreflect.MessageDescriptor - fd_AddressBytesToStringRequest_address_bytes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressBytesToStringRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressBytesToStringRequest") - fd_AddressBytesToStringRequest_address_bytes = md_AddressBytesToStringRequest.Fields().ByName("address_bytes") -} - -var _ protoreflect.Message = (*fastReflection_AddressBytesToStringRequest)(nil) - -type fastReflection_AddressBytesToStringRequest AddressBytesToStringRequest - -func (x *AddressBytesToStringRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressBytesToStringRequest)(x) -} - -func (x *AddressBytesToStringRequest) slowProtoReflect() protoreflect.Message { - 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressBytesToStringRequest_messageType fastReflection_AddressBytesToStringRequest_messageType -var _ protoreflect.MessageType = fastReflection_AddressBytesToStringRequest_messageType{} - -type fastReflection_AddressBytesToStringRequest_messageType struct{} - -func (x fastReflection_AddressBytesToStringRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressBytesToStringRequest)(nil) -} -func (x fastReflection_AddressBytesToStringRequest_messageType) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringRequest) -} -func (x fastReflection_AddressBytesToStringRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressBytesToStringRequest) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringRequest -} - -// 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_AddressBytesToStringRequest) Type() protoreflect.MessageType { - return _fastReflection_AddressBytesToStringRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressBytesToStringRequest) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressBytesToStringRequest) Interface() protoreflect.ProtoMessage { - return (*AddressBytesToStringRequest)(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_AddressBytesToStringRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AddressBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AddressBytes) - if !f(fd_AddressBytesToStringRequest_address_bytes, 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_AddressBytesToStringRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - return len(x.AddressBytes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - x.AddressBytes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - value := x.AddressBytes - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - x.AddressBytes = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - panic(fmt.Errorf("field address_bytes of message cosmos.auth.v1beta1.AddressBytesToStringRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressBytesToStringRequest", 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressBytesToStringRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.AddressBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AddressBytesToStringRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AddressBytes) > 0 { - i -= len(x.AddressBytes) - copy(dAtA[i:], x.AddressBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressBytes))) - 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().(*AddressBytesToStringRequest) - 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: AddressBytesToStringRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressBytesToStringRequest: 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 AddressBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AddressBytes = append(x.AddressBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AddressBytes == nil { - x.AddressBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AddressBytesToStringResponse protoreflect.MessageDescriptor - fd_AddressBytesToStringResponse_address_string protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressBytesToStringResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressBytesToStringResponse") - fd_AddressBytesToStringResponse_address_string = md_AddressBytesToStringResponse.Fields().ByName("address_string") -} - -var _ protoreflect.Message = (*fastReflection_AddressBytesToStringResponse)(nil) - -type fastReflection_AddressBytesToStringResponse AddressBytesToStringResponse - -func (x *AddressBytesToStringResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressBytesToStringResponse)(x) -} - -func (x *AddressBytesToStringResponse) slowProtoReflect() protoreflect.Message { - 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressBytesToStringResponse_messageType fastReflection_AddressBytesToStringResponse_messageType -var _ protoreflect.MessageType = fastReflection_AddressBytesToStringResponse_messageType{} - -type fastReflection_AddressBytesToStringResponse_messageType struct{} - -func (x fastReflection_AddressBytesToStringResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressBytesToStringResponse)(nil) -} -func (x fastReflection_AddressBytesToStringResponse_messageType) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringResponse) -} -func (x fastReflection_AddressBytesToStringResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressBytesToStringResponse) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringResponse -} - -// 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_AddressBytesToStringResponse) Type() protoreflect.MessageType { - return _fastReflection_AddressBytesToStringResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressBytesToStringResponse) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressBytesToStringResponse) Interface() protoreflect.ProtoMessage { - return (*AddressBytesToStringResponse)(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_AddressBytesToStringResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AddressString != "" { - value := protoreflect.ValueOfString(x.AddressString) - if !f(fd_AddressBytesToStringResponse_address_string, 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_AddressBytesToStringResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - return x.AddressString != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - x.AddressString = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - value := x.AddressString - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - x.AddressString = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - panic(fmt.Errorf("field address_string of message cosmos.auth.v1beta1.AddressBytesToStringResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressBytesToStringResponse", 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressBytesToStringResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.AddressString) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AddressBytesToStringResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AddressString) > 0 { - i -= len(x.AddressString) - copy(dAtA[i:], x.AddressString) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressString))) - 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().(*AddressBytesToStringResponse) - 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: AddressBytesToStringResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressBytesToStringResponse: 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 AddressString", 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.AddressString = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AddressStringToBytesRequest protoreflect.MessageDescriptor - fd_AddressStringToBytesRequest_address_string protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressStringToBytesRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressStringToBytesRequest") - fd_AddressStringToBytesRequest_address_string = md_AddressStringToBytesRequest.Fields().ByName("address_string") -} - -var _ protoreflect.Message = (*fastReflection_AddressStringToBytesRequest)(nil) - -type fastReflection_AddressStringToBytesRequest AddressStringToBytesRequest - -func (x *AddressStringToBytesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressStringToBytesRequest)(x) -} - -func (x *AddressStringToBytesRequest) slowProtoReflect() protoreflect.Message { - 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressStringToBytesRequest_messageType fastReflection_AddressStringToBytesRequest_messageType -var _ protoreflect.MessageType = fastReflection_AddressStringToBytesRequest_messageType{} - -type fastReflection_AddressStringToBytesRequest_messageType struct{} - -func (x fastReflection_AddressStringToBytesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressStringToBytesRequest)(nil) -} -func (x fastReflection_AddressStringToBytesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesRequest) -} -func (x fastReflection_AddressStringToBytesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressStringToBytesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesRequest -} - -// 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_AddressStringToBytesRequest) Type() protoreflect.MessageType { - return _fastReflection_AddressStringToBytesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressStringToBytesRequest) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressStringToBytesRequest) Interface() protoreflect.ProtoMessage { - return (*AddressStringToBytesRequest)(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_AddressStringToBytesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AddressString != "" { - value := protoreflect.ValueOfString(x.AddressString) - if !f(fd_AddressStringToBytesRequest_address_string, 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_AddressStringToBytesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - return x.AddressString != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - x.AddressString = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - value := x.AddressString - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - x.AddressString = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - panic(fmt.Errorf("field address_string of message cosmos.auth.v1beta1.AddressStringToBytesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressStringToBytesRequest", 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressStringToBytesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.AddressString) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AddressStringToBytesRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AddressString) > 0 { - i -= len(x.AddressString) - copy(dAtA[i:], x.AddressString) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressString))) - 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().(*AddressStringToBytesRequest) - 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: AddressStringToBytesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressStringToBytesRequest: 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 AddressString", 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.AddressString = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AddressStringToBytesResponse protoreflect.MessageDescriptor - fd_AddressStringToBytesResponse_address_bytes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressStringToBytesResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressStringToBytesResponse") - fd_AddressStringToBytesResponse_address_bytes = md_AddressStringToBytesResponse.Fields().ByName("address_bytes") -} - -var _ protoreflect.Message = (*fastReflection_AddressStringToBytesResponse)(nil) - -type fastReflection_AddressStringToBytesResponse AddressStringToBytesResponse - -func (x *AddressStringToBytesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressStringToBytesResponse)(x) -} - -func (x *AddressStringToBytesResponse) slowProtoReflect() protoreflect.Message { - 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressStringToBytesResponse_messageType fastReflection_AddressStringToBytesResponse_messageType -var _ protoreflect.MessageType = fastReflection_AddressStringToBytesResponse_messageType{} - -type fastReflection_AddressStringToBytesResponse_messageType struct{} - -func (x fastReflection_AddressStringToBytesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressStringToBytesResponse)(nil) -} -func (x fastReflection_AddressStringToBytesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesResponse) -} -func (x fastReflection_AddressStringToBytesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressStringToBytesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesResponse -} - -// 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_AddressStringToBytesResponse) Type() protoreflect.MessageType { - return _fastReflection_AddressStringToBytesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressStringToBytesResponse) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressStringToBytesResponse) Interface() protoreflect.ProtoMessage { - return (*AddressStringToBytesResponse)(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_AddressStringToBytesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AddressBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AddressBytes) - if !f(fd_AddressStringToBytesResponse_address_bytes, 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_AddressStringToBytesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - return len(x.AddressBytes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - x.AddressBytes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - value := x.AddressBytes - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - x.AddressBytes = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - panic(fmt.Errorf("field address_bytes of message cosmos.auth.v1beta1.AddressStringToBytesResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressStringToBytesResponse", 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressStringToBytesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.AddressBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AddressStringToBytesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AddressBytes) > 0 { - i -= len(x.AddressBytes) - copy(dAtA[i:], x.AddressBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressBytes))) - 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().(*AddressStringToBytesResponse) - 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: AddressStringToBytesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressStringToBytesResponse: 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 AddressBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AddressBytes = append(x.AddressBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AddressBytes == nil { - x.AddressBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/auth/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAccountsRequest) Reset() { - *x = QueryAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountsRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryAccountsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryAccountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // accounts are the existing accounts - Accounts []*anypb.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAccountsResponse) Reset() { - *x = QueryAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountsResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountsResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryAccountsResponse) GetAccounts() []*anypb.Any { - if x != nil { - return x.Accounts - } - return nil -} - -func (x *QueryAccountsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -type QueryAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address defines the address to query for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAccountRequest) Reset() { - *x = QueryAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAccountRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -type QueryModuleAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryModuleAccountsRequest) Reset() { - *x = QueryModuleAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAccountsRequest) ProtoMessage() {} - -// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountsRequest) 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_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 { - 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 *QueryAccountResponse) Reset() { - *x = QueryAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -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 -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -type QueryModuleAccountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Accounts []*anypb.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` -} - -func (x *QueryModuleAccountsResponse) Reset() { - *x = QueryModuleAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAccountsResponse) ProtoMessage() {} - -// Deprecated: Use QueryModuleAccountsResponse.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryModuleAccountsResponse) GetAccounts() []*anypb.Any { - if x != nil { - return x.Accounts - } - return nil -} - -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method -type Bech32PrefixRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Bech32PrefixRequest) Reset() { - *x = Bech32PrefixRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bech32PrefixRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bech32PrefixRequest) ProtoMessage() {} - -// Deprecated: Use Bech32PrefixRequest.ProtoReflect.Descriptor instead. -func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method -type Bech32PrefixResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bech32Prefix string `protobuf:"bytes,1,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` -} - -func (x *Bech32PrefixResponse) Reset() { - *x = Bech32PrefixResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bech32PrefixResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bech32PrefixResponse) ProtoMessage() {} - -// Deprecated: Use Bech32PrefixResponse.ProtoReflect.Descriptor instead. -func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *Bech32PrefixResponse) GetBech32Prefix() string { - if x != nil { - return x.Bech32Prefix - } - return "" -} - -// AddressBytesToStringRequest is the request type for AddressString rpc method -type AddressBytesToStringRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` -} - -func (x *AddressBytesToStringRequest) Reset() { - *x = AddressBytesToStringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressBytesToStringRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressBytesToStringRequest) ProtoMessage() {} - -// Deprecated: Use AddressBytesToStringRequest.ProtoReflect.Descriptor instead. -func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *AddressBytesToStringRequest) GetAddressBytes() []byte { - if x != nil { - return x.AddressBytes - } - return nil -} - -// AddressBytesToStringResponse is the response type for AddressString rpc method -type AddressBytesToStringResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` -} - -func (x *AddressBytesToStringResponse) Reset() { - *x = AddressBytesToStringResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressBytesToStringResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressBytesToStringResponse) ProtoMessage() {} - -// Deprecated: Use AddressBytesToStringResponse.ProtoReflect.Descriptor instead. -func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *AddressBytesToStringResponse) GetAddressString() string { - if x != nil { - return x.AddressString - } - return "" -} - -// AddressStringToBytesRequest is the request type for AccountBytes rpc method -type AddressStringToBytesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` -} - -func (x *AddressStringToBytesRequest) Reset() { - *x = AddressStringToBytesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressStringToBytesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressStringToBytesRequest) ProtoMessage() {} - -// Deprecated: Use AddressStringToBytesRequest.ProtoReflect.Descriptor instead. -func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *AddressStringToBytesRequest) GetAddressString() string { - if x != nil { - return x.AddressString - } - return "" -} - -// AddressStringToBytesResponse is the response type for AddressBytes rpc method -type AddressStringToBytesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` -} - -func (x *AddressStringToBytesResponse) Reset() { - *x = AddressStringToBytesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressStringToBytesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressStringToBytesResponse) ProtoMessage() {} - -// Deprecated: Use AddressStringToBytesResponse.ProtoReflect.Descriptor instead. -func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { - if x != nil { - return x.AddressBytes - } - return nil -} - -var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x14, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 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, 0x0c, - 0xca, 0xb4, 0x2d, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x53, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 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, 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, 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, 0x32, - 0xbd, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x88, 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, 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, 0x25, 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, 0x8f, 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, 0x2f, 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, 0x80, 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, 0x23, 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, 0xa1, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2c, 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, 0x88, 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, 0x23, 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, 0xb0, 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, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 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, 0xb1, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 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, 0x42, - 0xd5, 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, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 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 ( - file_cosmos_auth_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_auth_v1beta1_query_proto_rawDescData = file_cosmos_auth_v1beta1_query_proto_rawDesc -) - -func file_cosmos_auth_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_auth_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_auth_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_auth_v1beta1_query_proto_rawDescData -} - -var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -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 - (*v1beta1.PageRequest)(nil), // 14: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 15: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 16: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 17: cosmos.auth.v1beta1.Params -} -var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 14, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 15, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 16, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 15, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 15, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 0, // 6: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 7: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 6, // 8: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 3, // 9: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 10: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 10, // 11: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 12, // 12: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 1, // 13: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 5, // 14: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 4, // 15: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 16: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 17: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 11, // 18: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 13, // 19: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 13, // [13:20] is the sub-list for method output_type - 6, // [6:13] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cosmos_auth_v1beta1_query_proto_init() } -func file_cosmos_auth_v1beta1_query_proto_init() { - if File_cosmos_auth_v1beta1_query_proto != nil { - return - } - file_cosmos_auth_v1beta1_auth_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_auth_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountsRequest); 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[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountsResponse); 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[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountRequest); 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[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountsRequest); 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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountsResponse); 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[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixRequest); 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[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixResponse); 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[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringRequest); 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[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesRequest); 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[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_auth_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_auth_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_auth_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_auth_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_auth_v1beta1_query_proto = out.File - file_cosmos_auth_v1beta1_query_proto_rawDesc = nil - file_cosmos_auth_v1beta1_query_proto_goTypes = nil - file_cosmos_auth_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/auth/v1beta1/query_grpc.pb.go b/api/cosmos/auth/v1beta1/query_grpc.pb.go deleted file mode 100644 index 842ee3392559..000000000000 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,339 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/auth/v1beta1/query.proto - -package authv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Accounts returns all the existing accounts - // - // Since: cosmos-sdk 0.43 - Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) - // Account returns account details based on address. - Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) - // Params queries all parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing module accounts. - ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) - // Bech32 queries bech32Prefix - Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) - // AddressBytesToString converts Account Address bytes to string - AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) - // AddressStringToBytes converts Address string to bytes - AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { - out := new(QueryAccountsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Accounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { - out := new(QueryAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Account", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) { - out := new(QueryModuleAccountsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccounts", 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...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) { - out := new(AddressBytesToStringResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AddressBytesToString", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) { - out := new(AddressStringToBytesResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AddressStringToBytes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Accounts returns all the existing accounts - // - // Since: cosmos-sdk 0.43 - Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) - // Account returns account details based on address. - Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) - // Params queries all parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing module accounts. - ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) - // Bech32 queries bech32Prefix - Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) - // AddressBytesToString converts Account Address bytes to string - AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) - // AddressStringToBytes converts Address string to bytes - AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") -} -func (UnimplementedQueryServer) Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") -} -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") -} -func (UnimplementedQueryServer) Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") -} -func (UnimplementedQueryServer) AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressBytesToString not implemented") -} -func (UnimplementedQueryServer) AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressStringToBytes not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Accounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Accounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Account(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Account", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAccounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAccounts(ctx, req.(*QueryModuleAccountsRequest)) - } - 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 { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Bech32Prefix(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Bech32Prefix", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Bech32Prefix(ctx, req.(*Bech32PrefixRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressBytesToString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressBytesToStringRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressBytesToString(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AddressBytesToString", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressBytesToString(ctx, req.(*AddressBytesToStringRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressStringToBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressStringToBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AddressStringToBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressStringToBytes(ctx, req.(*AddressStringToBytesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.auth.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Accounts", - Handler: _Query_Accounts_Handler, - }, - { - MethodName: "Account", - Handler: _Query_Account_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "ModuleAccounts", - Handler: _Query_ModuleAccounts_Handler, - }, - { - MethodName: "Bech32Prefix", - Handler: _Query_Bech32Prefix_Handler, - }, - { - MethodName: "AddressBytesToString", - Handler: _Query_AddressBytesToString_Handler, - }, - { - MethodName: "AddressStringToBytes", - Handler: _Query_AddressStringToBytes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/auth/v1beta1/query.proto", -} diff --git a/api/cosmos/authz/v1beta1/authz.pulsar.go b/api/cosmos/authz/v1beta1/authz.pulsar.go deleted file mode 100644 index eb34ad4a6db1..000000000000 --- a/api/cosmos/authz/v1beta1/authz.pulsar.go +++ /dev/null @@ -1,2445 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authzv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenericAuthorization protoreflect.MessageDescriptor - fd_GenericAuthorization_msg protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_authz_proto_init() - md_GenericAuthorization = File_cosmos_authz_v1beta1_authz_proto.Messages().ByName("GenericAuthorization") - fd_GenericAuthorization_msg = md_GenericAuthorization.Fields().ByName("msg") -} - -var _ protoreflect.Message = (*fastReflection_GenericAuthorization)(nil) - -type fastReflection_GenericAuthorization GenericAuthorization - -func (x *GenericAuthorization) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenericAuthorization)(x) -} - -func (x *GenericAuthorization) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenericAuthorization_messageType fastReflection_GenericAuthorization_messageType -var _ protoreflect.MessageType = fastReflection_GenericAuthorization_messageType{} - -type fastReflection_GenericAuthorization_messageType struct{} - -func (x fastReflection_GenericAuthorization_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenericAuthorization)(nil) -} -func (x fastReflection_GenericAuthorization_messageType) New() protoreflect.Message { - return new(fastReflection_GenericAuthorization) -} -func (x fastReflection_GenericAuthorization_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenericAuthorization -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenericAuthorization) Descriptor() protoreflect.MessageDescriptor { - return md_GenericAuthorization -} - -// 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_GenericAuthorization) Type() protoreflect.MessageType { - return _fastReflection_GenericAuthorization_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenericAuthorization) New() protoreflect.Message { - return new(fastReflection_GenericAuthorization) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenericAuthorization) Interface() protoreflect.ProtoMessage { - return (*GenericAuthorization)(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_GenericAuthorization) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Msg != "" { - value := protoreflect.ValueOfString(x.Msg) - if !f(fd_GenericAuthorization_msg, 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_GenericAuthorization) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenericAuthorization.msg": - return x.Msg != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenericAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenericAuthorization 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_GenericAuthorization) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenericAuthorization.msg": - x.Msg = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenericAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenericAuthorization 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_GenericAuthorization) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.GenericAuthorization.msg": - value := x.Msg - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenericAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenericAuthorization 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_GenericAuthorization) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenericAuthorization.msg": - x.Msg = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenericAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenericAuthorization 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_GenericAuthorization) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenericAuthorization.msg": - panic(fmt.Errorf("field msg of message cosmos.authz.v1beta1.GenericAuthorization is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenericAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenericAuthorization 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_GenericAuthorization) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenericAuthorization.msg": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenericAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenericAuthorization 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_GenericAuthorization) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.GenericAuthorization", 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_GenericAuthorization) 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_GenericAuthorization) 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_GenericAuthorization) 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_GenericAuthorization) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenericAuthorization) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Msg) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenericAuthorization) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Msg) > 0 { - i -= len(x.Msg) - copy(dAtA[i:], x.Msg) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Msg))) - 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().(*GenericAuthorization) - 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: GenericAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenericAuthorization: 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 Msg", 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.Msg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Grant protoreflect.MessageDescriptor - fd_Grant_authorization protoreflect.FieldDescriptor - fd_Grant_expiration protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_authz_proto_init() - md_Grant = File_cosmos_authz_v1beta1_authz_proto.Messages().ByName("Grant") - fd_Grant_authorization = md_Grant.Fields().ByName("authorization") - fd_Grant_expiration = md_Grant.Fields().ByName("expiration") -} - -var _ protoreflect.Message = (*fastReflection_Grant)(nil) - -type fastReflection_Grant Grant - -func (x *Grant) ProtoReflect() protoreflect.Message { - return (*fastReflection_Grant)(x) -} - -func (x *Grant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Grant_messageType fastReflection_Grant_messageType -var _ protoreflect.MessageType = fastReflection_Grant_messageType{} - -type fastReflection_Grant_messageType struct{} - -func (x fastReflection_Grant_messageType) Zero() protoreflect.Message { - return (*fastReflection_Grant)(nil) -} -func (x fastReflection_Grant_messageType) New() protoreflect.Message { - return new(fastReflection_Grant) -} -func (x fastReflection_Grant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Grant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Grant) Descriptor() protoreflect.MessageDescriptor { - return md_Grant -} - -// 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_Grant) Type() protoreflect.MessageType { - return _fastReflection_Grant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Grant) New() protoreflect.Message { - return new(fastReflection_Grant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Grant) Interface() protoreflect.ProtoMessage { - return (*Grant)(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_Grant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authorization != nil { - value := protoreflect.ValueOfMessage(x.Authorization.ProtoReflect()) - if !f(fd_Grant_authorization, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_Grant_expiration, 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_Grant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.Grant.authorization": - return x.Authorization != nil - case "cosmos.authz.v1beta1.Grant.expiration": - return x.Expiration != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.Grant 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_Grant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.Grant.authorization": - x.Authorization = nil - case "cosmos.authz.v1beta1.Grant.expiration": - x.Expiration = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.Grant 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_Grant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.Grant.authorization": - value := x.Authorization - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.authz.v1beta1.Grant.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.Grant 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_Grant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.Grant.authorization": - x.Authorization = value.Message().Interface().(*anypb.Any) - case "cosmos.authz.v1beta1.Grant.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.Grant 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_Grant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.Grant.authorization": - if x.Authorization == nil { - x.Authorization = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Authorization.ProtoReflect()) - case "cosmos.authz.v1beta1.Grant.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.Grant 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_Grant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.Grant.authorization": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.authz.v1beta1.Grant.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.Grant 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_Grant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.Grant", 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_Grant) 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_Grant) 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_Grant) 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_Grant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Grant) - 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.Authorization != nil { - l = options.Size(x.Authorization) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Expiration != nil { - l = options.Size(x.Expiration) - 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().(*Grant) - 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.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Authorization != nil { - encoded, err := options.Marshal(x.Authorization) - 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().(*Grant) - 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: Grant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: 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 Authorization", 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.Authorization == nil { - x.Authorization = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authorization); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", 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.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); 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_GrantAuthorization protoreflect.MessageDescriptor - fd_GrantAuthorization_granter protoreflect.FieldDescriptor - fd_GrantAuthorization_grantee protoreflect.FieldDescriptor - fd_GrantAuthorization_authorization protoreflect.FieldDescriptor - fd_GrantAuthorization_expiration protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_authz_proto_init() - md_GrantAuthorization = File_cosmos_authz_v1beta1_authz_proto.Messages().ByName("GrantAuthorization") - fd_GrantAuthorization_granter = md_GrantAuthorization.Fields().ByName("granter") - fd_GrantAuthorization_grantee = md_GrantAuthorization.Fields().ByName("grantee") - fd_GrantAuthorization_authorization = md_GrantAuthorization.Fields().ByName("authorization") - fd_GrantAuthorization_expiration = md_GrantAuthorization.Fields().ByName("expiration") -} - -var _ protoreflect.Message = (*fastReflection_GrantAuthorization)(nil) - -type fastReflection_GrantAuthorization GrantAuthorization - -func (x *GrantAuthorization) ProtoReflect() protoreflect.Message { - return (*fastReflection_GrantAuthorization)(x) -} - -func (x *GrantAuthorization) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GrantAuthorization_messageType fastReflection_GrantAuthorization_messageType -var _ protoreflect.MessageType = fastReflection_GrantAuthorization_messageType{} - -type fastReflection_GrantAuthorization_messageType struct{} - -func (x fastReflection_GrantAuthorization_messageType) Zero() protoreflect.Message { - return (*fastReflection_GrantAuthorization)(nil) -} -func (x fastReflection_GrantAuthorization_messageType) New() protoreflect.Message { - return new(fastReflection_GrantAuthorization) -} -func (x fastReflection_GrantAuthorization_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GrantAuthorization -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GrantAuthorization) Descriptor() protoreflect.MessageDescriptor { - return md_GrantAuthorization -} - -// 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_GrantAuthorization) Type() protoreflect.MessageType { - return _fastReflection_GrantAuthorization_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GrantAuthorization) New() protoreflect.Message { - return new(fastReflection_GrantAuthorization) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GrantAuthorization) Interface() protoreflect.ProtoMessage { - return (*GrantAuthorization)(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_GrantAuthorization) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_GrantAuthorization_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_GrantAuthorization_grantee, value) { - return - } - } - if x.Authorization != nil { - value := protoreflect.ValueOfMessage(x.Authorization.ProtoReflect()) - if !f(fd_GrantAuthorization_authorization, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_GrantAuthorization_expiration, 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_GrantAuthorization) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantAuthorization.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.GrantAuthorization.grantee": - return x.Grantee != "" - case "cosmos.authz.v1beta1.GrantAuthorization.authorization": - return x.Authorization != nil - case "cosmos.authz.v1beta1.GrantAuthorization.expiration": - return x.Expiration != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantAuthorization 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_GrantAuthorization) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantAuthorization.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.GrantAuthorization.grantee": - x.Grantee = "" - case "cosmos.authz.v1beta1.GrantAuthorization.authorization": - x.Authorization = nil - case "cosmos.authz.v1beta1.GrantAuthorization.expiration": - x.Expiration = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantAuthorization 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_GrantAuthorization) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.GrantAuthorization.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.GrantAuthorization.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.GrantAuthorization.authorization": - value := x.Authorization - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.authz.v1beta1.GrantAuthorization.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantAuthorization 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_GrantAuthorization) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantAuthorization.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.GrantAuthorization.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.authz.v1beta1.GrantAuthorization.authorization": - x.Authorization = value.Message().Interface().(*anypb.Any) - case "cosmos.authz.v1beta1.GrantAuthorization.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantAuthorization 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_GrantAuthorization) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantAuthorization.authorization": - if x.Authorization == nil { - x.Authorization = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Authorization.ProtoReflect()) - case "cosmos.authz.v1beta1.GrantAuthorization.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - case "cosmos.authz.v1beta1.GrantAuthorization.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.GrantAuthorization is not mutable")) - case "cosmos.authz.v1beta1.GrantAuthorization.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.GrantAuthorization is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantAuthorization 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_GrantAuthorization) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantAuthorization.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.GrantAuthorization.grantee": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.GrantAuthorization.authorization": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.authz.v1beta1.GrantAuthorization.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantAuthorization")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantAuthorization 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_GrantAuthorization) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.GrantAuthorization", 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_GrantAuthorization) 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_GrantAuthorization) 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_GrantAuthorization) 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_GrantAuthorization) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GrantAuthorization) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Authorization != nil { - l = options.Size(x.Authorization) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Expiration != nil { - l = options.Size(x.Expiration) - 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().(*GrantAuthorization) - 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.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Authorization != nil { - encoded, err := options.Marshal(x.Authorization) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*GrantAuthorization) - 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: GrantAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantAuthorization: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authorization", 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.Authorization == nil { - x.Authorization = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authorization); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", 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.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GrantQueueItem_1_list)(nil) - -type _GrantQueueItem_1_list struct { - list *[]string -} - -func (x *_GrantQueueItem_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GrantQueueItem_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_GrantQueueItem_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_GrantQueueItem_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_GrantQueueItem_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message GrantQueueItem at list field MsgTypeUrls as it is not of Message kind")) -} - -func (x *_GrantQueueItem_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_GrantQueueItem_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_GrantQueueItem_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GrantQueueItem protoreflect.MessageDescriptor - fd_GrantQueueItem_msg_type_urls protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_authz_proto_init() - md_GrantQueueItem = File_cosmos_authz_v1beta1_authz_proto.Messages().ByName("GrantQueueItem") - fd_GrantQueueItem_msg_type_urls = md_GrantQueueItem.Fields().ByName("msg_type_urls") -} - -var _ protoreflect.Message = (*fastReflection_GrantQueueItem)(nil) - -type fastReflection_GrantQueueItem GrantQueueItem - -func (x *GrantQueueItem) ProtoReflect() protoreflect.Message { - return (*fastReflection_GrantQueueItem)(x) -} - -func (x *GrantQueueItem) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GrantQueueItem_messageType fastReflection_GrantQueueItem_messageType -var _ protoreflect.MessageType = fastReflection_GrantQueueItem_messageType{} - -type fastReflection_GrantQueueItem_messageType struct{} - -func (x fastReflection_GrantQueueItem_messageType) Zero() protoreflect.Message { - return (*fastReflection_GrantQueueItem)(nil) -} -func (x fastReflection_GrantQueueItem_messageType) New() protoreflect.Message { - return new(fastReflection_GrantQueueItem) -} -func (x fastReflection_GrantQueueItem_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GrantQueueItem -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GrantQueueItem) Descriptor() protoreflect.MessageDescriptor { - return md_GrantQueueItem -} - -// 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_GrantQueueItem) Type() protoreflect.MessageType { - return _fastReflection_GrantQueueItem_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GrantQueueItem) New() protoreflect.Message { - return new(fastReflection_GrantQueueItem) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GrantQueueItem) Interface() protoreflect.ProtoMessage { - return (*GrantQueueItem)(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_GrantQueueItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.MsgTypeUrls) != 0 { - value := protoreflect.ValueOfList(&_GrantQueueItem_1_list{list: &x.MsgTypeUrls}) - if !f(fd_GrantQueueItem_msg_type_urls, 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_GrantQueueItem) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantQueueItem.msg_type_urls": - return len(x.MsgTypeUrls) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantQueueItem")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantQueueItem 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_GrantQueueItem) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantQueueItem.msg_type_urls": - x.MsgTypeUrls = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantQueueItem")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantQueueItem 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_GrantQueueItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.GrantQueueItem.msg_type_urls": - if len(x.MsgTypeUrls) == 0 { - return protoreflect.ValueOfList(&_GrantQueueItem_1_list{}) - } - listValue := &_GrantQueueItem_1_list{list: &x.MsgTypeUrls} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantQueueItem")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantQueueItem 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_GrantQueueItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantQueueItem.msg_type_urls": - lv := value.List() - clv := lv.(*_GrantQueueItem_1_list) - x.MsgTypeUrls = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantQueueItem")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantQueueItem 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_GrantQueueItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantQueueItem.msg_type_urls": - if x.MsgTypeUrls == nil { - x.MsgTypeUrls = []string{} - } - value := &_GrantQueueItem_1_list{list: &x.MsgTypeUrls} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantQueueItem")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantQueueItem 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_GrantQueueItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GrantQueueItem.msg_type_urls": - list := []string{} - return protoreflect.ValueOfList(&_GrantQueueItem_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GrantQueueItem")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GrantQueueItem 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_GrantQueueItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.GrantQueueItem", 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_GrantQueueItem) 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_GrantQueueItem) 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_GrantQueueItem) 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_GrantQueueItem) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GrantQueueItem) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.MsgTypeUrls) > 0 { - for _, s := range x.MsgTypeUrls { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GrantQueueItem) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MsgTypeUrls) > 0 { - for iNdEx := len(x.MsgTypeUrls) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.MsgTypeUrls[iNdEx]) - copy(dAtA[i:], x.MsgTypeUrls[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrls[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GrantQueueItem) - 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: GrantQueueItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GrantQueueItem: 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 MsgTypeUrls", 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.MsgTypeUrls = append(x.MsgTypeUrls, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/authz/v1beta1/authz.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenericAuthorization gives the grantee unrestricted permissions to execute -// the provided method on behalf of the granter's account. -type GenericAuthorization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Msg, identified by it's type URL, to grant unrestricted permissions to execute - Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` -} - -func (x *GenericAuthorization) Reset() { - *x = GenericAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenericAuthorization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenericAuthorization) ProtoMessage() {} - -// Deprecated: Use GenericAuthorization.ProtoReflect.Descriptor instead. -func (*GenericAuthorization) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_authz_proto_rawDescGZIP(), []int{0} -} - -func (x *GenericAuthorization) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -// Grant gives permissions to execute -// the provide method with expiration time. -type Grant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Authorization *anypb.Any `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty"` - // time when the grant will expire and will be pruned. If null, then the grant - // doesn't have a time expiration (other conditions in `authorization` - // may apply to invalidate the grant) - Expiration *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *Grant) Reset() { - *x = Grant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Grant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Grant) ProtoMessage() {} - -// Deprecated: Use Grant.ProtoReflect.Descriptor instead. -func (*Grant) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_authz_proto_rawDescGZIP(), []int{1} -} - -func (x *Grant) GetAuthorization() *anypb.Any { - if x != nil { - return x.Authorization - } - return nil -} - -func (x *Grant) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -// It is used in genesis.proto and query.proto -type GrantAuthorization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - Authorization *anypb.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"` - Expiration *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *GrantAuthorization) Reset() { - *x = GrantAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrantAuthorization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrantAuthorization) ProtoMessage() {} - -// Deprecated: Use GrantAuthorization.ProtoReflect.Descriptor instead. -func (*GrantAuthorization) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_authz_proto_rawDescGZIP(), []int{2} -} - -func (x *GrantAuthorization) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *GrantAuthorization) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *GrantAuthorization) GetAuthorization() *anypb.Any { - if x != nil { - return x.Authorization - } - return nil -} - -func (x *GrantAuthorization) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -// GrantQueueItem contains the list of TypeURL of a sdk.Msg. -type GrantQueueItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // msg_type_urls contains the list of TypeURL of a sdk.Msg. - MsgTypeUrls []string `protobuf:"bytes,1,rep,name=msg_type_urls,json=msgTypeUrls,proto3" json:"msg_type_urls,omitempty"` -} - -func (x *GrantQueueItem) Reset() { - *x = GrantQueueItem{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_authz_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrantQueueItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrantQueueItem) ProtoMessage() {} - -// Deprecated: Use GrantQueueItem.ProtoReflect.Descriptor instead. -func (*GrantQueueItem) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_authz_proto_rawDescGZIP(), []int{3} -} - -func (x *GrantQueueItem) GetMsgTypeUrls() []string { - if x != nil { - return x.MsgTypeUrls - } - return nil -} - -var File_cosmos_authz_v1beta1_authz_proto protoreflect.FileDescriptor - -var file_cosmos_authz_v1beta1_authz_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x3a, - 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0d, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, - 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x8d, 0x02, 0x0a, 0x12, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x12, 0x4d, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 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, 0x11, 0xca, - 0xb4, 0x2d, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x34, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x49, - 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, - 0x75, 0x72, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x73, 0x67, 0x54, - 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x73, 0x42, 0xe0, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, - 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cosmos_authz_v1beta1_authz_proto_rawDescOnce sync.Once - file_cosmos_authz_v1beta1_authz_proto_rawDescData = file_cosmos_authz_v1beta1_authz_proto_rawDesc -) - -func file_cosmos_authz_v1beta1_authz_proto_rawDescGZIP() []byte { - file_cosmos_authz_v1beta1_authz_proto_rawDescOnce.Do(func() { - file_cosmos_authz_v1beta1_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_authz_v1beta1_authz_proto_rawDescData) - }) - return file_cosmos_authz_v1beta1_authz_proto_rawDescData -} - -var file_cosmos_authz_v1beta1_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_authz_v1beta1_authz_proto_goTypes = []interface{}{ - (*GenericAuthorization)(nil), // 0: cosmos.authz.v1beta1.GenericAuthorization - (*Grant)(nil), // 1: cosmos.authz.v1beta1.Grant - (*GrantAuthorization)(nil), // 2: cosmos.authz.v1beta1.GrantAuthorization - (*GrantQueueItem)(nil), // 3: cosmos.authz.v1beta1.GrantQueueItem - (*anypb.Any)(nil), // 4: google.protobuf.Any - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp -} -var file_cosmos_authz_v1beta1_authz_proto_depIdxs = []int32{ - 4, // 0: cosmos.authz.v1beta1.Grant.authorization:type_name -> google.protobuf.Any - 5, // 1: cosmos.authz.v1beta1.Grant.expiration:type_name -> google.protobuf.Timestamp - 4, // 2: cosmos.authz.v1beta1.GrantAuthorization.authorization:type_name -> google.protobuf.Any - 5, // 3: cosmos.authz.v1beta1.GrantAuthorization.expiration:type_name -> google.protobuf.Timestamp - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_cosmos_authz_v1beta1_authz_proto_init() } -func file_cosmos_authz_v1beta1_authz_proto_init() { - if File_cosmos_authz_v1beta1_authz_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_authz_v1beta1_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_authz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Grant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_authz_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_authz_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantQueueItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_authz_v1beta1_authz_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_authz_v1beta1_authz_proto_goTypes, - DependencyIndexes: file_cosmos_authz_v1beta1_authz_proto_depIdxs, - MessageInfos: file_cosmos_authz_v1beta1_authz_proto_msgTypes, - }.Build() - File_cosmos_authz_v1beta1_authz_proto = out.File - file_cosmos_authz_v1beta1_authz_proto_rawDesc = nil - file_cosmos_authz_v1beta1_authz_proto_goTypes = nil - file_cosmos_authz_v1beta1_authz_proto_depIdxs = nil -} diff --git a/api/cosmos/authz/v1beta1/event.pulsar.go b/api/cosmos/authz/v1beta1/event.pulsar.go deleted file mode 100644 index 2b021c96d15c..000000000000 --- a/api/cosmos/authz/v1beta1/event.pulsar.go +++ /dev/null @@ -1,1355 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authzv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_EventGrant protoreflect.MessageDescriptor - fd_EventGrant_msg_type_url protoreflect.FieldDescriptor - fd_EventGrant_granter protoreflect.FieldDescriptor - fd_EventGrant_grantee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_event_proto_init() - md_EventGrant = File_cosmos_authz_v1beta1_event_proto.Messages().ByName("EventGrant") - fd_EventGrant_msg_type_url = md_EventGrant.Fields().ByName("msg_type_url") - fd_EventGrant_granter = md_EventGrant.Fields().ByName("granter") - fd_EventGrant_grantee = md_EventGrant.Fields().ByName("grantee") -} - -var _ protoreflect.Message = (*fastReflection_EventGrant)(nil) - -type fastReflection_EventGrant EventGrant - -func (x *EventGrant) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventGrant)(x) -} - -func (x *EventGrant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventGrant_messageType fastReflection_EventGrant_messageType -var _ protoreflect.MessageType = fastReflection_EventGrant_messageType{} - -type fastReflection_EventGrant_messageType struct{} - -func (x fastReflection_EventGrant_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventGrant)(nil) -} -func (x fastReflection_EventGrant_messageType) New() protoreflect.Message { - return new(fastReflection_EventGrant) -} -func (x fastReflection_EventGrant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventGrant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventGrant) Descriptor() protoreflect.MessageDescriptor { - return md_EventGrant -} - -// 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_EventGrant) Type() protoreflect.MessageType { - return _fastReflection_EventGrant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventGrant) New() protoreflect.Message { - return new(fastReflection_EventGrant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventGrant) Interface() protoreflect.ProtoMessage { - return (*EventGrant)(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_EventGrant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MsgTypeUrl != "" { - value := protoreflect.ValueOfString(x.MsgTypeUrl) - if !f(fd_EventGrant_msg_type_url, value) { - return - } - } - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_EventGrant_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_EventGrant_grantee, 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_EventGrant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventGrant.msg_type_url": - return x.MsgTypeUrl != "" - case "cosmos.authz.v1beta1.EventGrant.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.EventGrant.grantee": - return x.Grantee != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventGrant 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_EventGrant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventGrant.msg_type_url": - x.MsgTypeUrl = "" - case "cosmos.authz.v1beta1.EventGrant.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.EventGrant.grantee": - x.Grantee = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventGrant 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_EventGrant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.EventGrant.msg_type_url": - value := x.MsgTypeUrl - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.EventGrant.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.EventGrant.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventGrant 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_EventGrant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventGrant.msg_type_url": - x.MsgTypeUrl = value.Interface().(string) - case "cosmos.authz.v1beta1.EventGrant.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.EventGrant.grantee": - x.Grantee = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventGrant 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_EventGrant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventGrant.msg_type_url": - panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.EventGrant is not mutable")) - case "cosmos.authz.v1beta1.EventGrant.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.EventGrant is not mutable")) - case "cosmos.authz.v1beta1.EventGrant.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.EventGrant is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventGrant 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_EventGrant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventGrant.msg_type_url": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.EventGrant.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.EventGrant.grantee": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventGrant 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_EventGrant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.EventGrant", 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_EventGrant) 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_EventGrant) 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_EventGrant) 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_EventGrant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventGrant) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.MsgTypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventGrant) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x22 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - i-- - dAtA[i] = 0x1a - } - if len(x.MsgTypeUrl) > 0 { - i -= len(x.MsgTypeUrl) - copy(dAtA[i:], x.MsgTypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) - i-- - dAtA[i] = 0x12 - } - 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().(*EventGrant) - 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: EventGrant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventGrant: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventRevoke protoreflect.MessageDescriptor - fd_EventRevoke_msg_type_url protoreflect.FieldDescriptor - fd_EventRevoke_granter protoreflect.FieldDescriptor - fd_EventRevoke_grantee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_event_proto_init() - md_EventRevoke = File_cosmos_authz_v1beta1_event_proto.Messages().ByName("EventRevoke") - fd_EventRevoke_msg_type_url = md_EventRevoke.Fields().ByName("msg_type_url") - fd_EventRevoke_granter = md_EventRevoke.Fields().ByName("granter") - fd_EventRevoke_grantee = md_EventRevoke.Fields().ByName("grantee") -} - -var _ protoreflect.Message = (*fastReflection_EventRevoke)(nil) - -type fastReflection_EventRevoke EventRevoke - -func (x *EventRevoke) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventRevoke)(x) -} - -func (x *EventRevoke) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventRevoke_messageType fastReflection_EventRevoke_messageType -var _ protoreflect.MessageType = fastReflection_EventRevoke_messageType{} - -type fastReflection_EventRevoke_messageType struct{} - -func (x fastReflection_EventRevoke_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventRevoke)(nil) -} -func (x fastReflection_EventRevoke_messageType) New() protoreflect.Message { - return new(fastReflection_EventRevoke) -} -func (x fastReflection_EventRevoke_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventRevoke -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventRevoke) Descriptor() protoreflect.MessageDescriptor { - return md_EventRevoke -} - -// 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_EventRevoke) Type() protoreflect.MessageType { - return _fastReflection_EventRevoke_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventRevoke) New() protoreflect.Message { - return new(fastReflection_EventRevoke) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventRevoke) Interface() protoreflect.ProtoMessage { - return (*EventRevoke)(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_EventRevoke) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MsgTypeUrl != "" { - value := protoreflect.ValueOfString(x.MsgTypeUrl) - if !f(fd_EventRevoke_msg_type_url, value) { - return - } - } - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_EventRevoke_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_EventRevoke_grantee, 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_EventRevoke) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventRevoke.msg_type_url": - return x.MsgTypeUrl != "" - case "cosmos.authz.v1beta1.EventRevoke.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.EventRevoke.grantee": - return x.Grantee != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevoke 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_EventRevoke) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventRevoke.msg_type_url": - x.MsgTypeUrl = "" - case "cosmos.authz.v1beta1.EventRevoke.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.EventRevoke.grantee": - x.Grantee = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevoke 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_EventRevoke) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.EventRevoke.msg_type_url": - value := x.MsgTypeUrl - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.EventRevoke.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.EventRevoke.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevoke 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_EventRevoke) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventRevoke.msg_type_url": - x.MsgTypeUrl = value.Interface().(string) - case "cosmos.authz.v1beta1.EventRevoke.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.EventRevoke.grantee": - x.Grantee = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevoke 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_EventRevoke) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventRevoke.msg_type_url": - panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.EventRevoke is not mutable")) - case "cosmos.authz.v1beta1.EventRevoke.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.EventRevoke is not mutable")) - case "cosmos.authz.v1beta1.EventRevoke.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.EventRevoke is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevoke 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_EventRevoke) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.EventRevoke.msg_type_url": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.EventRevoke.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.EventRevoke.grantee": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.EventRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.EventRevoke 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_EventRevoke) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.EventRevoke", 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_EventRevoke) 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_EventRevoke) 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_EventRevoke) 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_EventRevoke) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventRevoke) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.MsgTypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventRevoke) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x22 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - i-- - dAtA[i] = 0x1a - } - if len(x.MsgTypeUrl) > 0 { - i -= len(x.MsgTypeUrl) - copy(dAtA[i:], x.MsgTypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) - i-- - dAtA[i] = 0x12 - } - 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().(*EventRevoke) - 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: EventRevoke: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRevoke: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/authz/v1beta1/event.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// EventGrant is emitted on Msg/Grant -type EventGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Msg type URL for which an autorization is granted - MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - // Granter account address - Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"` - // Grantee account address - Grantee string `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (x *EventGrant) Reset() { - *x = EventGrant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventGrant) ProtoMessage() {} - -// Deprecated: Use EventGrant.ProtoReflect.Descriptor instead. -func (*EventGrant) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_event_proto_rawDescGZIP(), []int{0} -} - -func (x *EventGrant) GetMsgTypeUrl() string { - if x != nil { - return x.MsgTypeUrl - } - return "" -} - -func (x *EventGrant) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *EventGrant) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -// EventRevoke is emitted on Msg/Revoke -type EventRevoke struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Msg type URL for which an autorization is revoked - MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - // Granter account address - Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"` - // Grantee account address - Grantee string `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (x *EventRevoke) Reset() { - *x = EventRevoke{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventRevoke) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventRevoke) ProtoMessage() {} - -// Deprecated: Use EventRevoke.ProtoReflect.Descriptor instead. -func (*EventRevoke) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_event_proto_rawDescGZIP(), []int{1} -} - -func (x *EventRevoke) GetMsgTypeUrl() string { - if x != nil { - return x.MsgTypeUrl - } - return "" -} - -func (x *EventRevoke) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *EventRevoke) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -var File_cosmos_authz_v1beta1_event_proto protoreflect.FileDescriptor - -var file_cosmos_authz_v1beta1_event_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, - 0x65, 0x55, 0x72, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x18, 0x04, 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, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x97, 0x01, 0x0a, - 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x20, 0x0a, 0x0c, - 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x32, - 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x04, 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, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x42, 0xdc, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_authz_v1beta1_event_proto_rawDescOnce sync.Once - file_cosmos_authz_v1beta1_event_proto_rawDescData = file_cosmos_authz_v1beta1_event_proto_rawDesc -) - -func file_cosmos_authz_v1beta1_event_proto_rawDescGZIP() []byte { - file_cosmos_authz_v1beta1_event_proto_rawDescOnce.Do(func() { - file_cosmos_authz_v1beta1_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_authz_v1beta1_event_proto_rawDescData) - }) - return file_cosmos_authz_v1beta1_event_proto_rawDescData -} - -var file_cosmos_authz_v1beta1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_authz_v1beta1_event_proto_goTypes = []interface{}{ - (*EventGrant)(nil), // 0: cosmos.authz.v1beta1.EventGrant - (*EventRevoke)(nil), // 1: cosmos.authz.v1beta1.EventRevoke -} -var file_cosmos_authz_v1beta1_event_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_authz_v1beta1_event_proto_init() } -func file_cosmos_authz_v1beta1_event_proto_init() { - if File_cosmos_authz_v1beta1_event_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_authz_v1beta1_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventGrant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventRevoke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_authz_v1beta1_event_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_authz_v1beta1_event_proto_goTypes, - DependencyIndexes: file_cosmos_authz_v1beta1_event_proto_depIdxs, - MessageInfos: file_cosmos_authz_v1beta1_event_proto_msgTypes, - }.Build() - File_cosmos_authz_v1beta1_event_proto = out.File - file_cosmos_authz_v1beta1_event_proto_rawDesc = nil - file_cosmos_authz_v1beta1_event_proto_goTypes = nil - file_cosmos_authz_v1beta1_event_proto_depIdxs = nil -} diff --git a/api/cosmos/authz/v1beta1/genesis.pulsar.go b/api/cosmos/authz/v1beta1/genesis.pulsar.go deleted file mode 100644 index eeaa312004f4..000000000000 --- a/api/cosmos/authz/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,659 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authzv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[]*GrantAuthorization -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GrantAuthorization) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GrantAuthorization) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - v := new(GrantAuthorization) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - v := new(GrantAuthorization) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_authorization protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_authz_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_authorization = md_GenesisState.Fields().ByName("authorization") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Authorization) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Authorization}) - if !f(fd_GenesisState_authorization, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenesisState.authorization": - return len(x.Authorization) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenesisState.authorization": - x.Authorization = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.GenesisState.authorization": - if len(x.Authorization) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.Authorization} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenesisState.authorization": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.Authorization = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenesisState.authorization": - if x.Authorization == nil { - x.Authorization = []*GrantAuthorization{} - } - value := &_GenesisState_1_list{list: &x.Authorization} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.GenesisState.authorization": - list := []*GrantAuthorization{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Authorization) > 0 { - for _, e := range x.Authorization { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Authorization) > 0 { - for iNdEx := len(x.Authorization) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Authorization[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authorization = append(x.Authorization, &GrantAuthorization{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authorization[len(x.Authorization)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/authz/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the authz module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Authorization []*GrantAuthorization `protobuf:"bytes,1,rep,name=authorization,proto3" json:"authorization,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetAuthorization() []*GrantAuthorization { - if x != nil { - return x.Authorization - } - return nil -} - -var File_cosmos_authz_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_authz_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xde, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, - 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cosmos_authz_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_authz_v1beta1_genesis_proto_rawDescData = file_cosmos_authz_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_authz_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_authz_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_authz_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_authz_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_authz_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_authz_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_authz_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.authz.v1beta1.GenesisState - (*GrantAuthorization)(nil), // 1: cosmos.authz.v1beta1.GrantAuthorization -} -var file_cosmos_authz_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.authz.v1beta1.GenesisState.authorization:type_name -> cosmos.authz.v1beta1.GrantAuthorization - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_authz_v1beta1_genesis_proto_init() } -func file_cosmos_authz_v1beta1_genesis_proto_init() { - if File_cosmos_authz_v1beta1_genesis_proto != nil { - return - } - file_cosmos_authz_v1beta1_authz_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_authz_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_authz_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_authz_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_authz_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_authz_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_authz_v1beta1_genesis_proto = out.File - file_cosmos_authz_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_authz_v1beta1_genesis_proto_goTypes = nil - file_cosmos_authz_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/authz/v1beta1/query.pulsar.go b/api/cosmos/authz/v1beta1/query.pulsar.go deleted file mode 100644 index 468b464fba8c..000000000000 --- a/api/cosmos/authz/v1beta1/query.pulsar.go +++ /dev/null @@ -1,3940 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authzv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryGrantsRequest protoreflect.MessageDescriptor - fd_QueryGrantsRequest_granter protoreflect.FieldDescriptor - fd_QueryGrantsRequest_grantee protoreflect.FieldDescriptor - fd_QueryGrantsRequest_msg_type_url protoreflect.FieldDescriptor - fd_QueryGrantsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_query_proto_init() - md_QueryGrantsRequest = File_cosmos_authz_v1beta1_query_proto.Messages().ByName("QueryGrantsRequest") - fd_QueryGrantsRequest_granter = md_QueryGrantsRequest.Fields().ByName("granter") - fd_QueryGrantsRequest_grantee = md_QueryGrantsRequest.Fields().ByName("grantee") - fd_QueryGrantsRequest_msg_type_url = md_QueryGrantsRequest.Fields().ByName("msg_type_url") - fd_QueryGrantsRequest_pagination = md_QueryGrantsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGrantsRequest)(nil) - -type fastReflection_QueryGrantsRequest QueryGrantsRequest - -func (x *QueryGrantsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGrantsRequest)(x) -} - -func (x *QueryGrantsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGrantsRequest_messageType fastReflection_QueryGrantsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGrantsRequest_messageType{} - -type fastReflection_QueryGrantsRequest_messageType struct{} - -func (x fastReflection_QueryGrantsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGrantsRequest)(nil) -} -func (x fastReflection_QueryGrantsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGrantsRequest) -} -func (x fastReflection_QueryGrantsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGrantsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGrantsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGrantsRequest -} - -// 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_QueryGrantsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGrantsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGrantsRequest) New() protoreflect.Message { - return new(fastReflection_QueryGrantsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGrantsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGrantsRequest)(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_QueryGrantsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_QueryGrantsRequest_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_QueryGrantsRequest_grantee, value) { - return - } - } - if x.MsgTypeUrl != "" { - value := protoreflect.ValueOfString(x.MsgTypeUrl) - if !f(fd_QueryGrantsRequest_msg_type_url, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGrantsRequest_pagination, 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_QueryGrantsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsRequest.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.QueryGrantsRequest.grantee": - return x.Grantee != "" - case "cosmos.authz.v1beta1.QueryGrantsRequest.msg_type_url": - return x.MsgTypeUrl != "" - case "cosmos.authz.v1beta1.QueryGrantsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsRequest 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_QueryGrantsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsRequest.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.QueryGrantsRequest.grantee": - x.Grantee = "" - case "cosmos.authz.v1beta1.QueryGrantsRequest.msg_type_url": - x.MsgTypeUrl = "" - case "cosmos.authz.v1beta1.QueryGrantsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsRequest 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_QueryGrantsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsRequest.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.QueryGrantsRequest.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.QueryGrantsRequest.msg_type_url": - value := x.MsgTypeUrl - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.QueryGrantsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsRequest 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_QueryGrantsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsRequest.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.QueryGrantsRequest.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.authz.v1beta1.QueryGrantsRequest.msg_type_url": - x.MsgTypeUrl = value.Interface().(string) - case "cosmos.authz.v1beta1.QueryGrantsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsRequest 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_QueryGrantsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.authz.v1beta1.QueryGrantsRequest.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.QueryGrantsRequest is not mutable")) - case "cosmos.authz.v1beta1.QueryGrantsRequest.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.QueryGrantsRequest is not mutable")) - case "cosmos.authz.v1beta1.QueryGrantsRequest.msg_type_url": - panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.QueryGrantsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsRequest 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_QueryGrantsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsRequest.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.QueryGrantsRequest.grantee": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.QueryGrantsRequest.msg_type_url": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.QueryGrantsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsRequest 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_QueryGrantsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.QueryGrantsRequest", 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_QueryGrantsRequest) 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_QueryGrantsRequest) 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_QueryGrantsRequest) 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_QueryGrantsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGrantsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MsgTypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGrantsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.MsgTypeUrl) > 0 { - i -= len(x.MsgTypeUrl) - copy(dAtA[i:], x.MsgTypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*QueryGrantsRequest) - 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: QueryGrantsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGrantsRequest: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGrantsResponse_1_list)(nil) - -type _QueryGrantsResponse_1_list struct { - list *[]*Grant -} - -func (x *_QueryGrantsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGrantsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGrantsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGrantsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGrantsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Grant) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGrantsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGrantsResponse_1_list) NewElement() protoreflect.Value { - v := new(Grant) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGrantsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGrantsResponse protoreflect.MessageDescriptor - fd_QueryGrantsResponse_grants protoreflect.FieldDescriptor - fd_QueryGrantsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_query_proto_init() - md_QueryGrantsResponse = File_cosmos_authz_v1beta1_query_proto.Messages().ByName("QueryGrantsResponse") - fd_QueryGrantsResponse_grants = md_QueryGrantsResponse.Fields().ByName("grants") - fd_QueryGrantsResponse_pagination = md_QueryGrantsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGrantsResponse)(nil) - -type fastReflection_QueryGrantsResponse QueryGrantsResponse - -func (x *QueryGrantsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGrantsResponse)(x) -} - -func (x *QueryGrantsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGrantsResponse_messageType fastReflection_QueryGrantsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGrantsResponse_messageType{} - -type fastReflection_QueryGrantsResponse_messageType struct{} - -func (x fastReflection_QueryGrantsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGrantsResponse)(nil) -} -func (x fastReflection_QueryGrantsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGrantsResponse) -} -func (x fastReflection_QueryGrantsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGrantsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGrantsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGrantsResponse -} - -// 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_QueryGrantsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGrantsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGrantsResponse) New() protoreflect.Message { - return new(fastReflection_QueryGrantsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGrantsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGrantsResponse)(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_QueryGrantsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Grants) != 0 { - value := protoreflect.ValueOfList(&_QueryGrantsResponse_1_list{list: &x.Grants}) - if !f(fd_QueryGrantsResponse_grants, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGrantsResponse_pagination, 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_QueryGrantsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsResponse.grants": - return len(x.Grants) != 0 - case "cosmos.authz.v1beta1.QueryGrantsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsResponse 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_QueryGrantsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsResponse.grants": - x.Grants = nil - case "cosmos.authz.v1beta1.QueryGrantsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsResponse 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_QueryGrantsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsResponse.grants": - if len(x.Grants) == 0 { - return protoreflect.ValueOfList(&_QueryGrantsResponse_1_list{}) - } - listValue := &_QueryGrantsResponse_1_list{list: &x.Grants} - return protoreflect.ValueOfList(listValue) - case "cosmos.authz.v1beta1.QueryGrantsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsResponse 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_QueryGrantsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsResponse.grants": - lv := value.List() - clv := lv.(*_QueryGrantsResponse_1_list) - x.Grants = *clv.list - case "cosmos.authz.v1beta1.QueryGrantsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsResponse 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_QueryGrantsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsResponse.grants": - if x.Grants == nil { - x.Grants = []*Grant{} - } - value := &_QueryGrantsResponse_1_list{list: &x.Grants} - return protoreflect.ValueOfList(value) - case "cosmos.authz.v1beta1.QueryGrantsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsResponse 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_QueryGrantsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGrantsResponse.grants": - list := []*Grant{} - return protoreflect.ValueOfList(&_QueryGrantsResponse_1_list{list: &list}) - case "cosmos.authz.v1beta1.QueryGrantsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGrantsResponse 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_QueryGrantsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.QueryGrantsResponse", 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_QueryGrantsResponse) 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_QueryGrantsResponse) 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_QueryGrantsResponse) 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_QueryGrantsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGrantsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Grants) > 0 { - for _, e := range x.Grants { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGrantsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Grants) > 0 { - for iNdEx := len(x.Grants) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Grants[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGrantsResponse) - 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: QueryGrantsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGrantsResponse: 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 Grants", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Grants = append(x.Grants, &Grant{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Grants[len(x.Grants)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryGranterGrantsRequest protoreflect.MessageDescriptor - fd_QueryGranterGrantsRequest_granter protoreflect.FieldDescriptor - fd_QueryGranterGrantsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_query_proto_init() - md_QueryGranterGrantsRequest = File_cosmos_authz_v1beta1_query_proto.Messages().ByName("QueryGranterGrantsRequest") - fd_QueryGranterGrantsRequest_granter = md_QueryGranterGrantsRequest.Fields().ByName("granter") - fd_QueryGranterGrantsRequest_pagination = md_QueryGranterGrantsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGranterGrantsRequest)(nil) - -type fastReflection_QueryGranterGrantsRequest QueryGranterGrantsRequest - -func (x *QueryGranterGrantsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGranterGrantsRequest)(x) -} - -func (x *QueryGranterGrantsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGranterGrantsRequest_messageType fastReflection_QueryGranterGrantsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGranterGrantsRequest_messageType{} - -type fastReflection_QueryGranterGrantsRequest_messageType struct{} - -func (x fastReflection_QueryGranterGrantsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGranterGrantsRequest)(nil) -} -func (x fastReflection_QueryGranterGrantsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGranterGrantsRequest) -} -func (x fastReflection_QueryGranterGrantsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranterGrantsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGranterGrantsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranterGrantsRequest -} - -// 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_QueryGranterGrantsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGranterGrantsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGranterGrantsRequest) New() protoreflect.Message { - return new(fastReflection_QueryGranterGrantsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGranterGrantsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGranterGrantsRequest)(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_QueryGranterGrantsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_QueryGranterGrantsRequest_granter, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGranterGrantsRequest_pagination, 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_QueryGranterGrantsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsRequest 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_QueryGranterGrantsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsRequest 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_QueryGranterGrantsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsRequest 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_QueryGranterGrantsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsRequest 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_QueryGranterGrantsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.QueryGranterGrantsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsRequest 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_QueryGranterGrantsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsRequest 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_QueryGranterGrantsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.QueryGranterGrantsRequest", 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_QueryGranterGrantsRequest) 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_QueryGranterGrantsRequest) 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_QueryGranterGrantsRequest) 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_QueryGranterGrantsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGranterGrantsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGranterGrantsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*QueryGranterGrantsRequest) - 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: QueryGranterGrantsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGranterGrantsRequest: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGranterGrantsResponse_1_list)(nil) - -type _QueryGranterGrantsResponse_1_list struct { - list *[]*GrantAuthorization -} - -func (x *_QueryGranterGrantsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGranterGrantsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGranterGrantsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GrantAuthorization) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGranterGrantsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GrantAuthorization) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGranterGrantsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GrantAuthorization) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGranterGrantsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGranterGrantsResponse_1_list) NewElement() protoreflect.Value { - v := new(GrantAuthorization) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGranterGrantsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGranterGrantsResponse protoreflect.MessageDescriptor - fd_QueryGranterGrantsResponse_grants protoreflect.FieldDescriptor - fd_QueryGranterGrantsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_query_proto_init() - md_QueryGranterGrantsResponse = File_cosmos_authz_v1beta1_query_proto.Messages().ByName("QueryGranterGrantsResponse") - fd_QueryGranterGrantsResponse_grants = md_QueryGranterGrantsResponse.Fields().ByName("grants") - fd_QueryGranterGrantsResponse_pagination = md_QueryGranterGrantsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGranterGrantsResponse)(nil) - -type fastReflection_QueryGranterGrantsResponse QueryGranterGrantsResponse - -func (x *QueryGranterGrantsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGranterGrantsResponse)(x) -} - -func (x *QueryGranterGrantsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGranterGrantsResponse_messageType fastReflection_QueryGranterGrantsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGranterGrantsResponse_messageType{} - -type fastReflection_QueryGranterGrantsResponse_messageType struct{} - -func (x fastReflection_QueryGranterGrantsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGranterGrantsResponse)(nil) -} -func (x fastReflection_QueryGranterGrantsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGranterGrantsResponse) -} -func (x fastReflection_QueryGranterGrantsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranterGrantsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGranterGrantsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranterGrantsResponse -} - -// 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_QueryGranterGrantsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGranterGrantsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGranterGrantsResponse) New() protoreflect.Message { - return new(fastReflection_QueryGranterGrantsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGranterGrantsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGranterGrantsResponse)(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_QueryGranterGrantsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Grants) != 0 { - value := protoreflect.ValueOfList(&_QueryGranterGrantsResponse_1_list{list: &x.Grants}) - if !f(fd_QueryGranterGrantsResponse_grants, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGranterGrantsResponse_pagination, 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_QueryGranterGrantsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants": - return len(x.Grants) != 0 - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsResponse 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_QueryGranterGrantsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants": - x.Grants = nil - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsResponse 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_QueryGranterGrantsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants": - if len(x.Grants) == 0 { - return protoreflect.ValueOfList(&_QueryGranterGrantsResponse_1_list{}) - } - listValue := &_QueryGranterGrantsResponse_1_list{list: &x.Grants} - return protoreflect.ValueOfList(listValue) - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsResponse 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_QueryGranterGrantsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants": - lv := value.List() - clv := lv.(*_QueryGranterGrantsResponse_1_list) - x.Grants = *clv.list - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsResponse 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_QueryGranterGrantsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants": - if x.Grants == nil { - x.Grants = []*GrantAuthorization{} - } - value := &_QueryGranterGrantsResponse_1_list{list: &x.Grants} - return protoreflect.ValueOfList(value) - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsResponse 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_QueryGranterGrantsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants": - list := []*GrantAuthorization{} - return protoreflect.ValueOfList(&_QueryGranterGrantsResponse_1_list{list: &list}) - case "cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranterGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranterGrantsResponse 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_QueryGranterGrantsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.QueryGranterGrantsResponse", 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_QueryGranterGrantsResponse) 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_QueryGranterGrantsResponse) 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_QueryGranterGrantsResponse) 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_QueryGranterGrantsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGranterGrantsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Grants) > 0 { - for _, e := range x.Grants { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGranterGrantsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Grants) > 0 { - for iNdEx := len(x.Grants) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Grants[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGranterGrantsResponse) - 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: QueryGranterGrantsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGranterGrantsResponse: 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 Grants", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Grants = append(x.Grants, &GrantAuthorization{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Grants[len(x.Grants)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryGranteeGrantsRequest protoreflect.MessageDescriptor - fd_QueryGranteeGrantsRequest_grantee protoreflect.FieldDescriptor - fd_QueryGranteeGrantsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_query_proto_init() - md_QueryGranteeGrantsRequest = File_cosmos_authz_v1beta1_query_proto.Messages().ByName("QueryGranteeGrantsRequest") - fd_QueryGranteeGrantsRequest_grantee = md_QueryGranteeGrantsRequest.Fields().ByName("grantee") - fd_QueryGranteeGrantsRequest_pagination = md_QueryGranteeGrantsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGranteeGrantsRequest)(nil) - -type fastReflection_QueryGranteeGrantsRequest QueryGranteeGrantsRequest - -func (x *QueryGranteeGrantsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGranteeGrantsRequest)(x) -} - -func (x *QueryGranteeGrantsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGranteeGrantsRequest_messageType fastReflection_QueryGranteeGrantsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGranteeGrantsRequest_messageType{} - -type fastReflection_QueryGranteeGrantsRequest_messageType struct{} - -func (x fastReflection_QueryGranteeGrantsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGranteeGrantsRequest)(nil) -} -func (x fastReflection_QueryGranteeGrantsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGranteeGrantsRequest) -} -func (x fastReflection_QueryGranteeGrantsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranteeGrantsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGranteeGrantsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranteeGrantsRequest -} - -// 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_QueryGranteeGrantsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGranteeGrantsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGranteeGrantsRequest) New() protoreflect.Message { - return new(fastReflection_QueryGranteeGrantsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGranteeGrantsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGranteeGrantsRequest)(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_QueryGranteeGrantsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_QueryGranteeGrantsRequest_grantee, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGranteeGrantsRequest_pagination, 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_QueryGranteeGrantsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.grantee": - return x.Grantee != "" - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsRequest 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_QueryGranteeGrantsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.grantee": - x.Grantee = "" - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsRequest 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_QueryGranteeGrantsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsRequest 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_QueryGranteeGrantsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsRequest 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_QueryGranteeGrantsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.QueryGranteeGrantsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsRequest 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_QueryGranteeGrantsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.grantee": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsRequest")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsRequest 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_QueryGranteeGrantsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.QueryGranteeGrantsRequest", 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_QueryGranteeGrantsRequest) 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_QueryGranteeGrantsRequest) 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_QueryGranteeGrantsRequest) 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_QueryGranteeGrantsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGranteeGrantsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGranteeGrantsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - 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().(*QueryGranteeGrantsRequest) - 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: QueryGranteeGrantsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGranteeGrantsRequest: 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 Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGranteeGrantsResponse_1_list)(nil) - -type _QueryGranteeGrantsResponse_1_list struct { - list *[]*GrantAuthorization -} - -func (x *_QueryGranteeGrantsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGranteeGrantsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGranteeGrantsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GrantAuthorization) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGranteeGrantsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GrantAuthorization) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGranteeGrantsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GrantAuthorization) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGranteeGrantsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGranteeGrantsResponse_1_list) NewElement() protoreflect.Value { - v := new(GrantAuthorization) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGranteeGrantsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGranteeGrantsResponse protoreflect.MessageDescriptor - fd_QueryGranteeGrantsResponse_grants protoreflect.FieldDescriptor - fd_QueryGranteeGrantsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_query_proto_init() - md_QueryGranteeGrantsResponse = File_cosmos_authz_v1beta1_query_proto.Messages().ByName("QueryGranteeGrantsResponse") - fd_QueryGranteeGrantsResponse_grants = md_QueryGranteeGrantsResponse.Fields().ByName("grants") - fd_QueryGranteeGrantsResponse_pagination = md_QueryGranteeGrantsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGranteeGrantsResponse)(nil) - -type fastReflection_QueryGranteeGrantsResponse QueryGranteeGrantsResponse - -func (x *QueryGranteeGrantsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGranteeGrantsResponse)(x) -} - -func (x *QueryGranteeGrantsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_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_QueryGranteeGrantsResponse_messageType fastReflection_QueryGranteeGrantsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGranteeGrantsResponse_messageType{} - -type fastReflection_QueryGranteeGrantsResponse_messageType struct{} - -func (x fastReflection_QueryGranteeGrantsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGranteeGrantsResponse)(nil) -} -func (x fastReflection_QueryGranteeGrantsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGranteeGrantsResponse) -} -func (x fastReflection_QueryGranteeGrantsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranteeGrantsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGranteeGrantsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGranteeGrantsResponse -} - -// 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_QueryGranteeGrantsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGranteeGrantsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGranteeGrantsResponse) New() protoreflect.Message { - return new(fastReflection_QueryGranteeGrantsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGranteeGrantsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGranteeGrantsResponse)(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_QueryGranteeGrantsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Grants) != 0 { - value := protoreflect.ValueOfList(&_QueryGranteeGrantsResponse_1_list{list: &x.Grants}) - if !f(fd_QueryGranteeGrantsResponse_grants, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGranteeGrantsResponse_pagination, 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_QueryGranteeGrantsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants": - return len(x.Grants) != 0 - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsResponse 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_QueryGranteeGrantsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants": - x.Grants = nil - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsResponse 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_QueryGranteeGrantsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants": - if len(x.Grants) == 0 { - return protoreflect.ValueOfList(&_QueryGranteeGrantsResponse_1_list{}) - } - listValue := &_QueryGranteeGrantsResponse_1_list{list: &x.Grants} - return protoreflect.ValueOfList(listValue) - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsResponse 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_QueryGranteeGrantsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants": - lv := value.List() - clv := lv.(*_QueryGranteeGrantsResponse_1_list) - x.Grants = *clv.list - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsResponse 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_QueryGranteeGrantsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants": - if x.Grants == nil { - x.Grants = []*GrantAuthorization{} - } - value := &_QueryGranteeGrantsResponse_1_list{list: &x.Grants} - return protoreflect.ValueOfList(value) - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsResponse 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_QueryGranteeGrantsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants": - list := []*GrantAuthorization{} - return protoreflect.ValueOfList(&_QueryGranteeGrantsResponse_1_list{list: &list}) - case "cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.QueryGranteeGrantsResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.QueryGranteeGrantsResponse 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_QueryGranteeGrantsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.QueryGranteeGrantsResponse", 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_QueryGranteeGrantsResponse) 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_QueryGranteeGrantsResponse) 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_QueryGranteeGrantsResponse) 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_QueryGranteeGrantsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGranteeGrantsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Grants) > 0 { - for _, e := range x.Grants { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGranteeGrantsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Grants) > 0 { - for iNdEx := len(x.Grants) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Grants[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGranteeGrantsResponse) - 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: QueryGranteeGrantsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGranteeGrantsResponse: 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 Grants", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Grants = append(x.Grants, &GrantAuthorization{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Grants[len(x.Grants)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/authz/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -type QueryGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - // Optional, msg_type_url, when set, will query only grants matching given msg type. - MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGrantsRequest) Reset() { - *x = QueryGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGrantsRequest) ProtoMessage() {} - -// Deprecated: Use QueryGrantsRequest.ProtoReflect.Descriptor instead. -func (*QueryGrantsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryGrantsRequest) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *QueryGrantsRequest) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *QueryGrantsRequest) GetMsgTypeUrl() string { - if x != nil { - return x.MsgTypeUrl - } - return "" -} - -func (x *QueryGrantsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -type QueryGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authorizations is a list of grants granted for grantee by granter. - Grants []*Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGrantsResponse) Reset() { - *x = QueryGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGrantsResponse) ProtoMessage() {} - -// Deprecated: Use QueryGrantsResponse.ProtoReflect.Descriptor instead. -func (*QueryGrantsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryGrantsResponse) GetGrants() []*Grant { - if x != nil { - return x.Grants - } - return nil -} - -func (x *QueryGrantsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -type QueryGranterGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGranterGrantsRequest) Reset() { - *x = QueryGranterGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGranterGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGranterGrantsRequest) ProtoMessage() {} - -// Deprecated: Use QueryGranterGrantsRequest.ProtoReflect.Descriptor instead. -func (*QueryGranterGrantsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryGranterGrantsRequest) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *QueryGranterGrantsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -type QueryGranterGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // grants is a list of grants granted by the granter. - Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGranterGrantsResponse) Reset() { - *x = QueryGranterGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGranterGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGranterGrantsResponse) ProtoMessage() {} - -// Deprecated: Use QueryGranterGrantsResponse.ProtoReflect.Descriptor instead. -func (*QueryGranterGrantsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryGranterGrantsResponse) GetGrants() []*GrantAuthorization { - if x != nil { - return x.Grants - } - return nil -} - -func (x *QueryGranterGrantsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. -type QueryGranteeGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGranteeGrantsRequest) Reset() { - *x = QueryGranteeGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGranteeGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGranteeGrantsRequest) ProtoMessage() {} - -// Deprecated: Use QueryGranteeGrantsRequest.ProtoReflect.Descriptor instead. -func (*QueryGranteeGrantsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryGranteeGrantsRequest) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *QueryGranteeGrantsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -type QueryGranteeGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // grants is a list of grants granted to the grantee. - Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGranteeGrantsResponse) Reset() { - *x = QueryGranteeGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGranteeGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGranteeGrantsResponse) ProtoMessage() {} - -// Deprecated: Use QueryGranteeGrantsResponse.ProtoReflect.Descriptor instead. -func (*QueryGranteeGrantsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryGranteeGrantsResponse) GetGrants() []*GrantAuthorization { - if x != nil { - return x.Grants - } - return nil -} - -func (x *QueryGranteeGrantsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_authz_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_authz_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xe6, 0x01, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x20, - 0x0a, 0x0c, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x33, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, - 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 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, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x01, 0x0a, - 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xe7, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x83, 0x01, 0x0a, 0x06, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0xaa, 0x01, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x72, 0x7d, 0x12, 0xaa, 0x01, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, - 0x12, 0x2e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, - 0x42, 0xdc, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, - 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_authz_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_authz_v1beta1_query_proto_rawDescData = file_cosmos_authz_v1beta1_query_proto_rawDesc -) - -func file_cosmos_authz_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_authz_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_authz_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_authz_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_authz_v1beta1_query_proto_rawDescData -} - -var file_cosmos_authz_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_authz_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryGrantsRequest)(nil), // 0: cosmos.authz.v1beta1.QueryGrantsRequest - (*QueryGrantsResponse)(nil), // 1: cosmos.authz.v1beta1.QueryGrantsResponse - (*QueryGranterGrantsRequest)(nil), // 2: cosmos.authz.v1beta1.QueryGranterGrantsRequest - (*QueryGranterGrantsResponse)(nil), // 3: cosmos.authz.v1beta1.QueryGranterGrantsResponse - (*QueryGranteeGrantsRequest)(nil), // 4: cosmos.authz.v1beta1.QueryGranteeGrantsRequest - (*QueryGranteeGrantsResponse)(nil), // 5: cosmos.authz.v1beta1.QueryGranteeGrantsResponse - (*v1beta1.PageRequest)(nil), // 6: cosmos.base.query.v1beta1.PageRequest - (*Grant)(nil), // 7: cosmos.authz.v1beta1.Grant - (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse - (*GrantAuthorization)(nil), // 9: cosmos.authz.v1beta1.GrantAuthorization -} -var file_cosmos_authz_v1beta1_query_proto_depIdxs = []int32{ - 6, // 0: cosmos.authz.v1beta1.QueryGrantsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 7, // 1: cosmos.authz.v1beta1.QueryGrantsResponse.grants:type_name -> cosmos.authz.v1beta1.Grant - 8, // 2: cosmos.authz.v1beta1.QueryGrantsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 6, // 3: cosmos.authz.v1beta1.QueryGranterGrantsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 9, // 4: cosmos.authz.v1beta1.QueryGranterGrantsResponse.grants:type_name -> cosmos.authz.v1beta1.GrantAuthorization - 8, // 5: cosmos.authz.v1beta1.QueryGranterGrantsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 6, // 6: cosmos.authz.v1beta1.QueryGranteeGrantsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 9, // 7: cosmos.authz.v1beta1.QueryGranteeGrantsResponse.grants:type_name -> cosmos.authz.v1beta1.GrantAuthorization - 8, // 8: cosmos.authz.v1beta1.QueryGranteeGrantsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 9: cosmos.authz.v1beta1.Query.Grants:input_type -> cosmos.authz.v1beta1.QueryGrantsRequest - 2, // 10: cosmos.authz.v1beta1.Query.GranterGrants:input_type -> cosmos.authz.v1beta1.QueryGranterGrantsRequest - 4, // 11: cosmos.authz.v1beta1.Query.GranteeGrants:input_type -> cosmos.authz.v1beta1.QueryGranteeGrantsRequest - 1, // 12: cosmos.authz.v1beta1.Query.Grants:output_type -> cosmos.authz.v1beta1.QueryGrantsResponse - 3, // 13: cosmos.authz.v1beta1.Query.GranterGrants:output_type -> cosmos.authz.v1beta1.QueryGranterGrantsResponse - 5, // 14: cosmos.authz.v1beta1.Query.GranteeGrants:output_type -> cosmos.authz.v1beta1.QueryGranteeGrantsResponse - 12, // [12:15] is the sub-list for method output_type - 9, // [9:12] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_cosmos_authz_v1beta1_query_proto_init() } -func file_cosmos_authz_v1beta1_query_proto_init() { - if File_cosmos_authz_v1beta1_query_proto != nil { - return - } - file_cosmos_authz_v1beta1_authz_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_authz_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGranterGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGranterGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGranteeGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGranteeGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_authz_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_authz_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_authz_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_authz_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_authz_v1beta1_query_proto = out.File - file_cosmos_authz_v1beta1_query_proto_rawDesc = nil - file_cosmos_authz_v1beta1_query_proto_goTypes = nil - file_cosmos_authz_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/authz/v1beta1/query_grpc.pb.go b/api/cosmos/authz/v1beta1/query_grpc.pb.go deleted file mode 100644 index db335e22eb5e..000000000000 --- a/api/cosmos/authz/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/authz/v1beta1/query.proto - -package authzv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Returns list of `Authorization`, granted to the grantee by the granter. - Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) - // GranterGrants returns list of `GrantAuthorization`, granted by granter. - // - // Since: cosmos-sdk 0.46 - GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, error) - // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // - // Since: cosmos-sdk 0.46 - GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) { - out := new(QueryGrantsResponse) - err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/Grants", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, error) { - out := new(QueryGranterGrantsResponse) - err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/GranterGrants", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) { - out := new(QueryGranteeGrantsResponse) - err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/GranteeGrants", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Returns list of `Authorization`, granted to the grantee by the granter. - Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, error) - // GranterGrants returns list of `GrantAuthorization`, granted by granter. - // - // Since: cosmos-sdk 0.46 - GranterGrants(context.Context, *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error) - // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // - // Since: cosmos-sdk 0.46 - GranteeGrants(context.Context, *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Grants not implemented") -} -func (UnimplementedQueryServer) GranterGrants(context.Context, *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GranterGrants not implemented") -} -func (UnimplementedQueryServer) GranteeGrants(context.Context, *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GranteeGrants not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Grants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Grants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.authz.v1beta1.Query/Grants", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Grants(ctx, req.(*QueryGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GranterGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGranterGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GranterGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.authz.v1beta1.Query/GranterGrants", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GranterGrants(ctx, req.(*QueryGranterGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GranteeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGranteeGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GranteeGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.authz.v1beta1.Query/GranteeGrants", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GranteeGrants(ctx, req.(*QueryGranteeGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.authz.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Grants", - Handler: _Query_Grants_Handler, - }, - { - MethodName: "GranterGrants", - Handler: _Query_GranterGrants_Handler, - }, - { - MethodName: "GranteeGrants", - Handler: _Query_GranteeGrants_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/authz/v1beta1/query.proto", -} diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go deleted file mode 100644 index 3b6ab52d3cbf..000000000000 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,3362 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authzv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_MsgGrant protoreflect.MessageDescriptor - fd_MsgGrant_granter protoreflect.FieldDescriptor - fd_MsgGrant_grantee protoreflect.FieldDescriptor - fd_MsgGrant_grant protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgGrant = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgGrant") - fd_MsgGrant_granter = md_MsgGrant.Fields().ByName("granter") - fd_MsgGrant_grantee = md_MsgGrant.Fields().ByName("grantee") - fd_MsgGrant_grant = md_MsgGrant.Fields().ByName("grant") -} - -var _ protoreflect.Message = (*fastReflection_MsgGrant)(nil) - -type fastReflection_MsgGrant MsgGrant - -func (x *MsgGrant) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgGrant)(x) -} - -func (x *MsgGrant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgGrant_messageType fastReflection_MsgGrant_messageType -var _ protoreflect.MessageType = fastReflection_MsgGrant_messageType{} - -type fastReflection_MsgGrant_messageType struct{} - -func (x fastReflection_MsgGrant_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgGrant)(nil) -} -func (x fastReflection_MsgGrant_messageType) New() protoreflect.Message { - return new(fastReflection_MsgGrant) -} -func (x fastReflection_MsgGrant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgGrant) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrant -} - -// 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_MsgGrant) Type() protoreflect.MessageType { - return _fastReflection_MsgGrant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgGrant) New() protoreflect.Message { - return new(fastReflection_MsgGrant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgGrant) Interface() protoreflect.ProtoMessage { - return (*MsgGrant)(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_MsgGrant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_MsgGrant_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_MsgGrant_grantee, value) { - return - } - } - if x.Grant != nil { - value := protoreflect.ValueOfMessage(x.Grant.ProtoReflect()) - if !f(fd_MsgGrant_grant, 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_MsgGrant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgGrant.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.MsgGrant.grantee": - return x.Grantee != "" - case "cosmos.authz.v1beta1.MsgGrant.grant": - return x.Grant != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrant 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_MsgGrant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgGrant.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.MsgGrant.grantee": - x.Grantee = "" - case "cosmos.authz.v1beta1.MsgGrant.grant": - x.Grant = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrant 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_MsgGrant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.MsgGrant.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.MsgGrant.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.MsgGrant.grant": - value := x.Grant - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrant 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_MsgGrant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgGrant.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.MsgGrant.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.authz.v1beta1.MsgGrant.grant": - x.Grant = value.Message().Interface().(*Grant) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrant 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_MsgGrant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgGrant.grant": - if x.Grant == nil { - x.Grant = new(Grant) - } - return protoreflect.ValueOfMessage(x.Grant.ProtoReflect()) - case "cosmos.authz.v1beta1.MsgGrant.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.MsgGrant is not mutable")) - case "cosmos.authz.v1beta1.MsgGrant.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.MsgGrant is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrant 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_MsgGrant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgGrant.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.MsgGrant.grantee": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.MsgGrant.grant": - m := new(Grant) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrant")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrant 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_MsgGrant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgGrant", 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_MsgGrant) 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_MsgGrant) 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_MsgGrant) 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_MsgGrant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgGrant) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Grant != nil { - l = options.Size(x.Grant) - 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().(*MsgGrant) - 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.Grant != nil { - encoded, err := options.Marshal(x.Grant) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*MsgGrant) - 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: MsgGrant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrant: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grant", 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.Grant == nil { - x.Grant = &Grant{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Grant); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgExecResponse_1_list)(nil) - -type _MsgExecResponse_1_list struct { - list *[][]byte -} - -func (x *_MsgExecResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgExecResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgExecResponse at list field Results as it is not of Message kind")) -} - -func (x *_MsgExecResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecResponse_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgExecResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecResponse protoreflect.MessageDescriptor - fd_MsgExecResponse_results protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgExecResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgExecResponse") - fd_MsgExecResponse_results = md_MsgExecResponse.Fields().ByName("results") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecResponse)(nil) - -type fastReflection_MsgExecResponse MsgExecResponse - -func (x *MsgExecResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecResponse)(x) -} - -func (x *MsgExecResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExecResponse_messageType fastReflection_MsgExecResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecResponse_messageType{} - -type fastReflection_MsgExecResponse_messageType struct{} - -func (x fastReflection_MsgExecResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecResponse)(nil) -} -func (x fastReflection_MsgExecResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecResponse) -} -func (x fastReflection_MsgExecResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecResponse -} - -// 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_MsgExecResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecResponse)(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_MsgExecResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Results) != 0 { - value := protoreflect.ValueOfList(&_MsgExecResponse_1_list{list: &x.Results}) - if !f(fd_MsgExecResponse_results, 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_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - return len(x.Results) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - x.Results = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgExecResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - if len(x.Results) == 0 { - return protoreflect.ValueOfList(&_MsgExecResponse_1_list{}) - } - listValue := &_MsgExecResponse_1_list{list: &x.Results} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgExecResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - lv := value.List() - clv := lv.(*_MsgExecResponse_1_list) - x.Results = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgExecResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - if x.Results == nil { - x.Results = [][]byte{} - } - value := &_MsgExecResponse_1_list{list: &x.Results} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgExecResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExecResponse.results": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgExecResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecResponse 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_MsgExecResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgExecResponse", 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_MsgExecResponse) 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_MsgExecResponse) 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_MsgExecResponse) 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_MsgExecResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Results) > 0 { - for _, b := range x.Results { - l = len(b) - 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().(*MsgExecResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Results) > 0 { - for iNdEx := len(x.Results) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Results[iNdEx]) - copy(dAtA[i:], x.Results[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Results[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgExecResponse) - 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: MsgExecResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecResponse: 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 Results", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Results = append(x.Results, make([]byte, postIndex-iNdEx)) - copy(x.Results[len(x.Results)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgExec_2_list)(nil) - -type _MsgExec_2_list struct { - list *[]*anypb.Any -} - -func (x *_MsgExec_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExec_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgExec_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgExec_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExec_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExec_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgExec_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExec_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExec protoreflect.MessageDescriptor - fd_MsgExec_grantee protoreflect.FieldDescriptor - fd_MsgExec_msgs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgExec = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgExec") - fd_MsgExec_grantee = md_MsgExec.Fields().ByName("grantee") - fd_MsgExec_msgs = md_MsgExec.Fields().ByName("msgs") -} - -var _ protoreflect.Message = (*fastReflection_MsgExec)(nil) - -type fastReflection_MsgExec MsgExec - -func (x *MsgExec) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExec)(x) -} - -func (x *MsgExec) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExec_messageType fastReflection_MsgExec_messageType -var _ protoreflect.MessageType = fastReflection_MsgExec_messageType{} - -type fastReflection_MsgExec_messageType struct{} - -func (x fastReflection_MsgExec_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExec)(nil) -} -func (x fastReflection_MsgExec_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExec) -} -func (x fastReflection_MsgExec_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExec -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExec) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExec -} - -// 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_MsgExec) Type() protoreflect.MessageType { - return _fastReflection_MsgExec_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExec) New() protoreflect.Message { - return new(fastReflection_MsgExec) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExec) Interface() protoreflect.ProtoMessage { - return (*MsgExec)(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_MsgExec) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_MsgExec_grantee, value) { - return - } - } - if len(x.Msgs) != 0 { - value := protoreflect.ValueOfList(&_MsgExec_2_list{list: &x.Msgs}) - if !f(fd_MsgExec_msgs, 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_MsgExec) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExec.grantee": - return x.Grantee != "" - case "cosmos.authz.v1beta1.MsgExec.msgs": - return len(x.Msgs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExec 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_MsgExec) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExec.grantee": - x.Grantee = "" - case "cosmos.authz.v1beta1.MsgExec.msgs": - x.Msgs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExec 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_MsgExec) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.MsgExec.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.MsgExec.msgs": - if len(x.Msgs) == 0 { - return protoreflect.ValueOfList(&_MsgExec_2_list{}) - } - listValue := &_MsgExec_2_list{list: &x.Msgs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExec 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_MsgExec) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExec.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.authz.v1beta1.MsgExec.msgs": - lv := value.List() - clv := lv.(*_MsgExec_2_list) - x.Msgs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExec 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_MsgExec) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExec.msgs": - if x.Msgs == nil { - x.Msgs = []*anypb.Any{} - } - value := &_MsgExec_2_list{list: &x.Msgs} - return protoreflect.ValueOfList(value) - case "cosmos.authz.v1beta1.MsgExec.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.MsgExec is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExec 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_MsgExec) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgExec.grantee": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.MsgExec.msgs": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgExec_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExec 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_MsgExec) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgExec", 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_MsgExec) 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_MsgExec) 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_MsgExec) 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_MsgExec) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExec) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Msgs) > 0 { - for _, e := range x.Msgs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgExec) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Msgs) > 0 { - for iNdEx := len(x.Msgs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Msgs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - 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().(*MsgExec) - 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: MsgExec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExec: 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 Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Msgs = append(x.Msgs, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Msgs[len(x.Msgs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgGrantResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgGrantResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgGrantResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgGrantResponse)(nil) - -type fastReflection_MsgGrantResponse MsgGrantResponse - -func (x *MsgGrantResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgGrantResponse)(x) -} - -func (x *MsgGrantResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgGrantResponse_messageType fastReflection_MsgGrantResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgGrantResponse_messageType{} - -type fastReflection_MsgGrantResponse_messageType struct{} - -func (x fastReflection_MsgGrantResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgGrantResponse)(nil) -} -func (x fastReflection_MsgGrantResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgGrantResponse) -} -func (x fastReflection_MsgGrantResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgGrantResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantResponse -} - -// 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_MsgGrantResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgGrantResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgGrantResponse) New() protoreflect.Message { - return new(fastReflection_MsgGrantResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgGrantResponse) Interface() protoreflect.ProtoMessage { - return (*MsgGrantResponse)(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_MsgGrantResponse) 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_MsgGrantResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgGrantResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgGrantResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgGrantResponse) 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.authz.v1beta1.MsgGrantResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgGrantResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgGrantResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgGrantResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgGrantResponse 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_MsgGrantResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgGrantResponse", 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_MsgGrantResponse) 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_MsgGrantResponse) 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_MsgGrantResponse) 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_MsgGrantResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgGrantResponse) - 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().(*MsgGrantResponse) - 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().(*MsgGrantResponse) - 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: MsgGrantResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantResponse: 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_MsgRevoke protoreflect.MessageDescriptor - fd_MsgRevoke_granter protoreflect.FieldDescriptor - fd_MsgRevoke_grantee protoreflect.FieldDescriptor - fd_MsgRevoke_msg_type_url protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgRevoke = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgRevoke") - fd_MsgRevoke_granter = md_MsgRevoke.Fields().ByName("granter") - fd_MsgRevoke_grantee = md_MsgRevoke.Fields().ByName("grantee") - fd_MsgRevoke_msg_type_url = md_MsgRevoke.Fields().ByName("msg_type_url") -} - -var _ protoreflect.Message = (*fastReflection_MsgRevoke)(nil) - -type fastReflection_MsgRevoke MsgRevoke - -func (x *MsgRevoke) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRevoke)(x) -} - -func (x *MsgRevoke) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRevoke_messageType fastReflection_MsgRevoke_messageType -var _ protoreflect.MessageType = fastReflection_MsgRevoke_messageType{} - -type fastReflection_MsgRevoke_messageType struct{} - -func (x fastReflection_MsgRevoke_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRevoke)(nil) -} -func (x fastReflection_MsgRevoke_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRevoke) -} -func (x fastReflection_MsgRevoke_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevoke -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRevoke) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevoke -} - -// 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_MsgRevoke) Type() protoreflect.MessageType { - return _fastReflection_MsgRevoke_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRevoke) New() protoreflect.Message { - return new(fastReflection_MsgRevoke) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRevoke) Interface() protoreflect.ProtoMessage { - return (*MsgRevoke)(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_MsgRevoke) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_MsgRevoke_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_MsgRevoke_grantee, value) { - return - } - } - if x.MsgTypeUrl != "" { - value := protoreflect.ValueOfString(x.MsgTypeUrl) - if !f(fd_MsgRevoke_msg_type_url, 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_MsgRevoke) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgRevoke.granter": - return x.Granter != "" - case "cosmos.authz.v1beta1.MsgRevoke.grantee": - return x.Grantee != "" - case "cosmos.authz.v1beta1.MsgRevoke.msg_type_url": - return x.MsgTypeUrl != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevoke 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_MsgRevoke) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgRevoke.granter": - x.Granter = "" - case "cosmos.authz.v1beta1.MsgRevoke.grantee": - x.Grantee = "" - case "cosmos.authz.v1beta1.MsgRevoke.msg_type_url": - x.MsgTypeUrl = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevoke 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_MsgRevoke) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.authz.v1beta1.MsgRevoke.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.MsgRevoke.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.authz.v1beta1.MsgRevoke.msg_type_url": - value := x.MsgTypeUrl - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevoke 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_MsgRevoke) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgRevoke.granter": - x.Granter = value.Interface().(string) - case "cosmos.authz.v1beta1.MsgRevoke.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.authz.v1beta1.MsgRevoke.msg_type_url": - x.MsgTypeUrl = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevoke 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_MsgRevoke) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgRevoke.granter": - panic(fmt.Errorf("field granter of message cosmos.authz.v1beta1.MsgRevoke is not mutable")) - case "cosmos.authz.v1beta1.MsgRevoke.grantee": - panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.MsgRevoke is not mutable")) - case "cosmos.authz.v1beta1.MsgRevoke.msg_type_url": - panic(fmt.Errorf("field msg_type_url of message cosmos.authz.v1beta1.MsgRevoke is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevoke 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_MsgRevoke) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.authz.v1beta1.MsgRevoke.granter": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.MsgRevoke.grantee": - return protoreflect.ValueOfString("") - case "cosmos.authz.v1beta1.MsgRevoke.msg_type_url": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevoke")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevoke 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_MsgRevoke) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgRevoke", 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_MsgRevoke) 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_MsgRevoke) 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_MsgRevoke) 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_MsgRevoke) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRevoke) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MsgTypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRevoke) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MsgTypeUrl) > 0 { - i -= len(x.MsgTypeUrl) - copy(dAtA[i:], x.MsgTypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*MsgRevoke) - 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: MsgRevoke: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevoke: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRevokeResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_authz_v1beta1_tx_proto_init() - md_MsgRevokeResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgRevokeResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRevokeResponse)(nil) - -type fastReflection_MsgRevokeResponse MsgRevokeResponse - -func (x *MsgRevokeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRevokeResponse)(x) -} - -func (x *MsgRevokeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRevokeResponse_messageType fastReflection_MsgRevokeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRevokeResponse_messageType{} - -type fastReflection_MsgRevokeResponse_messageType struct{} - -func (x fastReflection_MsgRevokeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRevokeResponse)(nil) -} -func (x fastReflection_MsgRevokeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRevokeResponse) -} -func (x fastReflection_MsgRevokeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevokeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRevokeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevokeResponse -} - -// 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_MsgRevokeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRevokeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRevokeResponse) New() protoreflect.Message { - return new(fastReflection_MsgRevokeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRevokeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRevokeResponse)(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_MsgRevokeResponse) 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_MsgRevokeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeResponse 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_MsgRevokeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeResponse 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_MsgRevokeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeResponse 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_MsgRevokeResponse) 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.authz.v1beta1.MsgRevokeResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeResponse 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_MsgRevokeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeResponse 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_MsgRevokeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgRevokeResponse")) - } - panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgRevokeResponse 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_MsgRevokeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgRevokeResponse", 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_MsgRevokeResponse) 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_MsgRevokeResponse) 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_MsgRevokeResponse) 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_MsgRevokeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRevokeResponse) - 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().(*MsgRevokeResponse) - 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().(*MsgRevokeResponse) - 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: MsgRevokeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeResponse: 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, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/authz/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgGrant is a request type for Grant method. It declares authorization to the grantee -// on behalf of the granter with the provided expiration time. -type MsgGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - Grant *Grant `protobuf:"bytes,3,opt,name=grant,proto3" json:"grant,omitempty"` -} - -func (x *MsgGrant) Reset() { - *x = MsgGrant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgGrant) ProtoMessage() {} - -// Deprecated: Use MsgGrant.ProtoReflect.Descriptor instead. -func (*MsgGrant) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgGrant) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *MsgGrant) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *MsgGrant) GetGrant() *Grant { - if x != nil { - return x.Grant - } - return nil -} - -// MsgExecResponse defines the Msg/MsgExecResponse response type. -type MsgExecResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` -} - -func (x *MsgExecResponse) Reset() { - *x = MsgExecResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecResponse.ProtoReflect.Descriptor instead. -func (*MsgExecResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgExecResponse) GetResults() [][]byte { - if x != nil { - return x.Results - } - return nil -} - -// MsgExec attempts to execute the provided messages using -// authorizations granted to the grantee. Each message should have only -// one signer corresponding to the granter of the authorization. -type MsgExec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` - // Authorization Msg requests to execute. Each msg must implement Authorization interface - // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - // triple and validate it. - Msgs []*anypb.Any `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` -} - -func (x *MsgExec) Reset() { - *x = MsgExec{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExec) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExec) ProtoMessage() {} - -// Deprecated: Use MsgExec.ProtoReflect.Descriptor instead. -func (*MsgExec) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgExec) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *MsgExec) GetMsgs() []*anypb.Any { - if x != nil { - return x.Msgs - } - return nil -} - -// MsgGrantResponse defines the Msg/MsgGrant response type. -type MsgGrantResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgGrantResponse) Reset() { - *x = MsgGrantResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgGrantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgGrantResponse) ProtoMessage() {} - -// Deprecated: Use MsgGrantResponse.ProtoReflect.Descriptor instead. -func (*MsgGrantResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -// granter's account with that has been granted to the grantee. -type MsgRevoke struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` -} - -func (x *MsgRevoke) Reset() { - *x = MsgRevoke{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRevoke) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRevoke) ProtoMessage() {} - -// Deprecated: Use MsgRevoke.ProtoReflect.Descriptor instead. -func (*MsgRevoke) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgRevoke) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *MsgRevoke) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *MsgRevoke) GetMsgTypeUrl() string { - if x != nil { - return x.MsgTypeUrl - } - return "" -} - -// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -type MsgRevokeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRevokeResponse) Reset() { - *x = MsgRevokeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRevokeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRevokeResponse) ProtoMessage() {} - -// Deprecated: Use MsgRevokeResponse.ProtoReflect.Descriptor instead. -func (*MsgRevokeResponse) Descriptor() ([]byte, []int) { - return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - -var File_cosmos_authz_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, - 0x08, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x65, 0x12, 0x37, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x2b, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 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, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x02, 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, 0x20, 0xca, 0xb4, 0x2d, 0x1c, 0x73, - 0x64, 0x6b, 0x2e, 0x4d, 0x73, 0x67, 0x2c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6d, 0x73, 0x67, - 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, - 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x73, 0x67, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf8, - 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, - 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, - 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, - 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cosmos_authz_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_authz_v1beta1_tx_proto_rawDescData = file_cosmos_authz_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_authz_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_authz_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_authz_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_authz_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_authz_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_authz_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgGrant)(nil), // 0: cosmos.authz.v1beta1.MsgGrant - (*MsgExecResponse)(nil), // 1: cosmos.authz.v1beta1.MsgExecResponse - (*MsgExec)(nil), // 2: cosmos.authz.v1beta1.MsgExec - (*MsgGrantResponse)(nil), // 3: cosmos.authz.v1beta1.MsgGrantResponse - (*MsgRevoke)(nil), // 4: cosmos.authz.v1beta1.MsgRevoke - (*MsgRevokeResponse)(nil), // 5: cosmos.authz.v1beta1.MsgRevokeResponse - (*Grant)(nil), // 6: cosmos.authz.v1beta1.Grant - (*anypb.Any)(nil), // 7: google.protobuf.Any -} -var file_cosmos_authz_v1beta1_tx_proto_depIdxs = []int32{ - 6, // 0: cosmos.authz.v1beta1.MsgGrant.grant:type_name -> cosmos.authz.v1beta1.Grant - 7, // 1: cosmos.authz.v1beta1.MsgExec.msgs:type_name -> google.protobuf.Any - 0, // 2: cosmos.authz.v1beta1.Msg.Grant:input_type -> cosmos.authz.v1beta1.MsgGrant - 2, // 3: cosmos.authz.v1beta1.Msg.Exec:input_type -> cosmos.authz.v1beta1.MsgExec - 4, // 4: cosmos.authz.v1beta1.Msg.Revoke:input_type -> cosmos.authz.v1beta1.MsgRevoke - 3, // 5: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse - 1, // 6: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse - 5, // 7: cosmos.authz.v1beta1.Msg.Revoke:output_type -> cosmos.authz.v1beta1.MsgRevokeResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_authz_v1beta1_tx_proto_init() } -func file_cosmos_authz_v1beta1_tx_proto_init() { - if File_cosmos_authz_v1beta1_tx_proto != nil { - return - } - file_cosmos_authz_v1beta1_authz_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_authz_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgGrant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgGrantResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRevoke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_authz_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRevokeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_authz_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_authz_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_authz_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_authz_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_authz_v1beta1_tx_proto = out.File - file_cosmos_authz_v1beta1_tx_proto_rawDesc = nil - file_cosmos_authz_v1beta1_tx_proto_goTypes = nil - file_cosmos_authz_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/authz/v1beta1/tx_grpc.pb.go b/api/cosmos/authz/v1beta1/tx_grpc.pb.go deleted file mode 100644 index fc4bda1b3b03..000000000000 --- a/api/cosmos/authz/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/authz/v1beta1/tx.proto - -package authzv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // Grant grants the provided authorization to the grantee on the granter's - // account with the provided expiration time. If there is already a grant - // for the given (granter, grantee, Authorization) triple, then the grant - // will be overwritten. - Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) - // Exec attempts to execute the provided messages using - // authorizations granted to the grantee. Each message should have only - // one signer corresponding to the granter of the authorization. - Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) - // Revoke revokes any authorization corresponding to the provided method name on the - // granter's account that has been granted to the grantee. - Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) { - out := new(MsgGrantResponse) - err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/Grant", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) { - out := new(MsgExecResponse) - err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/Exec", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) { - out := new(MsgRevokeResponse) - err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/Revoke", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // Grant grants the provided authorization to the grantee on the granter's - // account with the provided expiration time. If there is already a grant - // for the given (granter, grantee, Authorization) triple, then the grant - // will be overwritten. - Grant(context.Context, *MsgGrant) (*MsgGrantResponse, error) - // Exec attempts to execute the provided messages using - // authorizations granted to the grantee. Each message should have only - // one signer corresponding to the granter of the authorization. - Exec(context.Context, *MsgExec) (*MsgExecResponse, error) - // Revoke revokes any authorization corresponding to the provided method name on the - // granter's account that has been granted to the grantee. - Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) Grant(context.Context, *MsgGrant) (*MsgGrantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Grant not implemented") -} -func (UnimplementedMsgServer) Exec(context.Context, *MsgExec) (*MsgExecResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") -} -func (UnimplementedMsgServer) Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_Grant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgGrant) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Grant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.authz.v1beta1.Msg/Grant", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Grant(ctx, req.(*MsgGrant)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgExec) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Exec(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.authz.v1beta1.Msg/Exec", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Exec(ctx, req.(*MsgExec)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRevoke) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Revoke(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.authz.v1beta1.Msg/Revoke", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Revoke(ctx, req.(*MsgRevoke)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.authz.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Grant", - Handler: _Msg_Grant_Handler, - }, - { - MethodName: "Exec", - Handler: _Msg_Exec_Handler, - }, - { - MethodName: "Revoke", - Handler: _Msg_Revoke_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/authz/v1beta1/tx.proto", -} diff --git a/api/cosmos/bank/v1beta1/authz.pulsar.go b/api/cosmos/bank/v1beta1/authz.pulsar.go deleted file mode 100644 index a8b9e390b26d..000000000000 --- a/api/cosmos/bank/v1beta1/authz.pulsar.go +++ /dev/null @@ -1,664 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package bankv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_SendAuthorization_1_list)(nil) - -type _SendAuthorization_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_SendAuthorization_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_SendAuthorization_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_SendAuthorization_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_SendAuthorization_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_SendAuthorization_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SendAuthorization_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_SendAuthorization_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SendAuthorization_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_SendAuthorization protoreflect.MessageDescriptor - fd_SendAuthorization_spend_limit protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_authz_proto_init() - md_SendAuthorization = File_cosmos_bank_v1beta1_authz_proto.Messages().ByName("SendAuthorization") - fd_SendAuthorization_spend_limit = md_SendAuthorization.Fields().ByName("spend_limit") -} - -var _ protoreflect.Message = (*fastReflection_SendAuthorization)(nil) - -type fastReflection_SendAuthorization SendAuthorization - -func (x *SendAuthorization) ProtoReflect() protoreflect.Message { - return (*fastReflection_SendAuthorization)(x) -} - -func (x *SendAuthorization) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_authz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SendAuthorization_messageType fastReflection_SendAuthorization_messageType -var _ protoreflect.MessageType = fastReflection_SendAuthorization_messageType{} - -type fastReflection_SendAuthorization_messageType struct{} - -func (x fastReflection_SendAuthorization_messageType) Zero() protoreflect.Message { - return (*fastReflection_SendAuthorization)(nil) -} -func (x fastReflection_SendAuthorization_messageType) New() protoreflect.Message { - return new(fastReflection_SendAuthorization) -} -func (x fastReflection_SendAuthorization_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SendAuthorization -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SendAuthorization) Descriptor() protoreflect.MessageDescriptor { - return md_SendAuthorization -} - -// 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_SendAuthorization) Type() protoreflect.MessageType { - return _fastReflection_SendAuthorization_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SendAuthorization) New() protoreflect.Message { - return new(fastReflection_SendAuthorization) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SendAuthorization) Interface() protoreflect.ProtoMessage { - return (*SendAuthorization)(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_SendAuthorization) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SpendLimit) != 0 { - value := protoreflect.ValueOfList(&_SendAuthorization_1_list{list: &x.SpendLimit}) - if !f(fd_SendAuthorization_spend_limit, 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_SendAuthorization) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendAuthorization.spend_limit": - return len(x.SpendLimit) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendAuthorization")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendAuthorization 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_SendAuthorization) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendAuthorization.spend_limit": - x.SpendLimit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendAuthorization")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendAuthorization 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_SendAuthorization) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.SendAuthorization.spend_limit": - if len(x.SpendLimit) == 0 { - return protoreflect.ValueOfList(&_SendAuthorization_1_list{}) - } - listValue := &_SendAuthorization_1_list{list: &x.SpendLimit} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendAuthorization")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendAuthorization 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_SendAuthorization) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendAuthorization.spend_limit": - lv := value.List() - clv := lv.(*_SendAuthorization_1_list) - x.SpendLimit = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendAuthorization")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendAuthorization 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_SendAuthorization) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendAuthorization.spend_limit": - if x.SpendLimit == nil { - x.SpendLimit = []*v1beta1.Coin{} - } - value := &_SendAuthorization_1_list{list: &x.SpendLimit} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendAuthorization")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendAuthorization 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_SendAuthorization) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendAuthorization.spend_limit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_SendAuthorization_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendAuthorization")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendAuthorization 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_SendAuthorization) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.SendAuthorization", 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_SendAuthorization) 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_SendAuthorization) 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_SendAuthorization) 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_SendAuthorization) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SendAuthorization) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SpendLimit) > 0 { - for _, e := range x.SpendLimit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SendAuthorization) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.SpendLimit) > 0 { - for iNdEx := len(x.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SpendLimit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SendAuthorization) - 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: SendAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SendAuthorization: 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 SpendLimit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SpendLimit = append(x.SpendLimit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SpendLimit[len(x.SpendLimit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/bank/v1beta1/authz.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SendAuthorization allows the grantee to spend up to spend_limit coins from -// the granter's account. -// -// Since: cosmos-sdk 0.43 -type SendAuthorization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SpendLimit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3" json:"spend_limit,omitempty"` -} - -func (x *SendAuthorization) Reset() { - *x = SendAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_authz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendAuthorization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendAuthorization) ProtoMessage() {} - -// Deprecated: Use SendAuthorization.ProtoReflect.Descriptor instead. -func (*SendAuthorization) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_authz_proto_rawDescGZIP(), []int{0} -} - -func (x *SendAuthorization) GetSpendLimit() []*v1beta1.Coin { - if x != nil { - return x.SpendLimit - } - return nil -} - -var File_cosmos_bank_v1beta1_authz_proto protoreflect.FileDescriptor - -var file_cosmos_bank_v1beta1_authz_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6c, 0x0a, - 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, - 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x11, 0xca, 0xb4, 0x2d, - 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xd5, - 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, - 0x61, 0x6e, 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, - 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 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, 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_bank_v1beta1_authz_proto_rawDescOnce sync.Once - file_cosmos_bank_v1beta1_authz_proto_rawDescData = file_cosmos_bank_v1beta1_authz_proto_rawDesc -) - -func file_cosmos_bank_v1beta1_authz_proto_rawDescGZIP() []byte { - file_cosmos_bank_v1beta1_authz_proto_rawDescOnce.Do(func() { - file_cosmos_bank_v1beta1_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_bank_v1beta1_authz_proto_rawDescData) - }) - return file_cosmos_bank_v1beta1_authz_proto_rawDescData -} - -var file_cosmos_bank_v1beta1_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_bank_v1beta1_authz_proto_goTypes = []interface{}{ - (*SendAuthorization)(nil), // 0: cosmos.bank.v1beta1.SendAuthorization - (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin -} -var file_cosmos_bank_v1beta1_authz_proto_depIdxs = []int32{ - 1, // 0: cosmos.bank.v1beta1.SendAuthorization.spend_limit:type_name -> cosmos.base.v1beta1.Coin - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_bank_v1beta1_authz_proto_init() } -func file_cosmos_bank_v1beta1_authz_proto_init() { - if File_cosmos_bank_v1beta1_authz_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_bank_v1beta1_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_bank_v1beta1_authz_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_bank_v1beta1_authz_proto_goTypes, - DependencyIndexes: file_cosmos_bank_v1beta1_authz_proto_depIdxs, - MessageInfos: file_cosmos_bank_v1beta1_authz_proto_msgTypes, - }.Build() - File_cosmos_bank_v1beta1_authz_proto = out.File - file_cosmos_bank_v1beta1_authz_proto_rawDesc = nil - file_cosmos_bank_v1beta1_authz_proto_goTypes = nil - file_cosmos_bank_v1beta1_authz_proto_depIdxs = nil -} diff --git a/api/cosmos/bank/v1beta1/bank.pulsar.go b/api/cosmos/bank/v1beta1/bank.pulsar.go deleted file mode 100644 index bda917676195..000000000000 --- a/api/cosmos/bank/v1beta1/bank.pulsar.go +++ /dev/null @@ -1,4830 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package bankv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Params_1_list)(nil) - -type _Params_1_list struct { - list *[]*SendEnabled -} - -func (x *_Params_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Params_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Params_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SendEnabled) - (*x.list)[i] = concreteValue -} - -func (x *_Params_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SendEnabled) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Params_1_list) AppendMutable() protoreflect.Value { - v := new(SendEnabled) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Params_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Params_1_list) NewElement() protoreflect.Value { - v := new(SendEnabled) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Params_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_send_enabled protoreflect.FieldDescriptor - fd_Params_default_send_enabled protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_Params = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("Params") - fd_Params_send_enabled = md_Params.Fields().ByName("send_enabled") - fd_Params_default_send_enabled = md_Params.Fields().ByName("default_send_enabled") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SendEnabled) != 0 { - value := protoreflect.ValueOfList(&_Params_1_list{list: &x.SendEnabled}) - if !f(fd_Params_send_enabled, value) { - return - } - } - if x.DefaultSendEnabled != false { - value := protoreflect.ValueOfBool(x.DefaultSendEnabled) - if !f(fd_Params_default_send_enabled, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Params.send_enabled": - return len(x.SendEnabled) != 0 - case "cosmos.bank.v1beta1.Params.default_send_enabled": - return x.DefaultSendEnabled != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Params.send_enabled": - x.SendEnabled = nil - case "cosmos.bank.v1beta1.Params.default_send_enabled": - x.DefaultSendEnabled = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.Params.send_enabled": - if len(x.SendEnabled) == 0 { - return protoreflect.ValueOfList(&_Params_1_list{}) - } - listValue := &_Params_1_list{list: &x.SendEnabled} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.Params.default_send_enabled": - value := x.DefaultSendEnabled - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Params.send_enabled": - lv := value.List() - clv := lv.(*_Params_1_list) - x.SendEnabled = *clv.list - case "cosmos.bank.v1beta1.Params.default_send_enabled": - x.DefaultSendEnabled = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Params.send_enabled": - if x.SendEnabled == nil { - x.SendEnabled = []*SendEnabled{} - } - value := &_Params_1_list{list: &x.SendEnabled} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.Params.default_send_enabled": - panic(fmt.Errorf("field default_send_enabled of message cosmos.bank.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Params.send_enabled": - list := []*SendEnabled{} - return protoreflect.ValueOfList(&_Params_1_list{list: &list}) - case "cosmos.bank.v1beta1.Params.default_send_enabled": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SendEnabled) > 0 { - for _, e := range x.SendEnabled { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.DefaultSendEnabled { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.DefaultSendEnabled { - i-- - if x.DefaultSendEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.SendEnabled) > 0 { - for iNdEx := len(x.SendEnabled) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SendEnabled[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SendEnabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SendEnabled = append(x.SendEnabled, &SendEnabled{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SendEnabled[len(x.SendEnabled)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DefaultSendEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.DefaultSendEnabled = bool(v != 0) - 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_SendEnabled protoreflect.MessageDescriptor - fd_SendEnabled_denom protoreflect.FieldDescriptor - fd_SendEnabled_enabled protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_SendEnabled = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("SendEnabled") - fd_SendEnabled_denom = md_SendEnabled.Fields().ByName("denom") - fd_SendEnabled_enabled = md_SendEnabled.Fields().ByName("enabled") -} - -var _ protoreflect.Message = (*fastReflection_SendEnabled)(nil) - -type fastReflection_SendEnabled SendEnabled - -func (x *SendEnabled) ProtoReflect() protoreflect.Message { - return (*fastReflection_SendEnabled)(x) -} - -func (x *SendEnabled) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SendEnabled_messageType fastReflection_SendEnabled_messageType -var _ protoreflect.MessageType = fastReflection_SendEnabled_messageType{} - -type fastReflection_SendEnabled_messageType struct{} - -func (x fastReflection_SendEnabled_messageType) Zero() protoreflect.Message { - return (*fastReflection_SendEnabled)(nil) -} -func (x fastReflection_SendEnabled_messageType) New() protoreflect.Message { - return new(fastReflection_SendEnabled) -} -func (x fastReflection_SendEnabled_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SendEnabled -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SendEnabled) Descriptor() protoreflect.MessageDescriptor { - return md_SendEnabled -} - -// 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_SendEnabled) Type() protoreflect.MessageType { - return _fastReflection_SendEnabled_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SendEnabled) New() protoreflect.Message { - return new(fastReflection_SendEnabled) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SendEnabled) Interface() protoreflect.ProtoMessage { - return (*SendEnabled)(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_SendEnabled) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_SendEnabled_denom, value) { - return - } - } - if x.Enabled != false { - value := protoreflect.ValueOfBool(x.Enabled) - if !f(fd_SendEnabled_enabled, 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_SendEnabled) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendEnabled.denom": - return x.Denom != "" - case "cosmos.bank.v1beta1.SendEnabled.enabled": - return x.Enabled != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendEnabled")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendEnabled 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_SendEnabled) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendEnabled.denom": - x.Denom = "" - case "cosmos.bank.v1beta1.SendEnabled.enabled": - x.Enabled = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendEnabled")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendEnabled 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_SendEnabled) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.SendEnabled.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.SendEnabled.enabled": - value := x.Enabled - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendEnabled")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendEnabled 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_SendEnabled) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendEnabled.denom": - x.Denom = value.Interface().(string) - case "cosmos.bank.v1beta1.SendEnabled.enabled": - x.Enabled = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendEnabled")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendEnabled 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_SendEnabled) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendEnabled.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.SendEnabled is not mutable")) - case "cosmos.bank.v1beta1.SendEnabled.enabled": - panic(fmt.Errorf("field enabled of message cosmos.bank.v1beta1.SendEnabled is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendEnabled")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendEnabled 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_SendEnabled) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.SendEnabled.denom": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.SendEnabled.enabled": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.SendEnabled")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.SendEnabled 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_SendEnabled) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.SendEnabled", 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_SendEnabled) 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_SendEnabled) 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_SendEnabled) 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_SendEnabled) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SendEnabled) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Enabled { - n += 2 - } - 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().(*SendEnabled) - 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.Enabled { - i-- - if x.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SendEnabled) - 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: SendEnabled: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SendEnabled: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Enabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Input_2_list)(nil) - -type _Input_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Input_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Input_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Input_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Input_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Input_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Input_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Input_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Input_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Input protoreflect.MessageDescriptor - fd_Input_address protoreflect.FieldDescriptor - fd_Input_coins protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_Input = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("Input") - fd_Input_address = md_Input.Fields().ByName("address") - fd_Input_coins = md_Input.Fields().ByName("coins") -} - -var _ protoreflect.Message = (*fastReflection_Input)(nil) - -type fastReflection_Input Input - -func (x *Input) ProtoReflect() protoreflect.Message { - return (*fastReflection_Input)(x) -} - -func (x *Input) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Input_messageType fastReflection_Input_messageType -var _ protoreflect.MessageType = fastReflection_Input_messageType{} - -type fastReflection_Input_messageType struct{} - -func (x fastReflection_Input_messageType) Zero() protoreflect.Message { - return (*fastReflection_Input)(nil) -} -func (x fastReflection_Input_messageType) New() protoreflect.Message { - return new(fastReflection_Input) -} -func (x fastReflection_Input_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Input -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Input) Descriptor() protoreflect.MessageDescriptor { - return md_Input -} - -// 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_Input) Type() protoreflect.MessageType { - return _fastReflection_Input_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Input) New() protoreflect.Message { - return new(fastReflection_Input) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Input) Interface() protoreflect.ProtoMessage { - return (*Input)(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_Input) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Input_address, value) { - return - } - } - if len(x.Coins) != 0 { - value := protoreflect.ValueOfList(&_Input_2_list{list: &x.Coins}) - if !f(fd_Input_coins, 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_Input) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Input.address": - return x.Address != "" - case "cosmos.bank.v1beta1.Input.coins": - return len(x.Coins) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Input")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Input 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_Input) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Input.address": - x.Address = "" - case "cosmos.bank.v1beta1.Input.coins": - x.Coins = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Input")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Input 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_Input) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.Input.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Input.coins": - if len(x.Coins) == 0 { - return protoreflect.ValueOfList(&_Input_2_list{}) - } - listValue := &_Input_2_list{list: &x.Coins} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Input")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Input 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_Input) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Input.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.Input.coins": - lv := value.List() - clv := lv.(*_Input_2_list) - x.Coins = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Input")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Input 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_Input) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Input.coins": - if x.Coins == nil { - x.Coins = []*v1beta1.Coin{} - } - value := &_Input_2_list{list: &x.Coins} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.Input.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.Input is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Input")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Input 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_Input) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Input.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Input.coins": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Input_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Input")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Input 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_Input) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.Input", 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_Input) 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_Input) 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_Input) 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_Input) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Input) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Coins) > 0 { - for _, e := range x.Coins { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Input) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Coins) > 0 { - for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Coins[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Input) - 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: Input: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Coins = append(x.Coins, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Output_2_list)(nil) - -type _Output_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Output_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Output_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Output_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Output_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Output_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Output_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Output_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Output_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Output protoreflect.MessageDescriptor - fd_Output_address protoreflect.FieldDescriptor - fd_Output_coins protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_Output = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("Output") - fd_Output_address = md_Output.Fields().ByName("address") - fd_Output_coins = md_Output.Fields().ByName("coins") -} - -var _ protoreflect.Message = (*fastReflection_Output)(nil) - -type fastReflection_Output Output - -func (x *Output) ProtoReflect() protoreflect.Message { - return (*fastReflection_Output)(x) -} - -func (x *Output) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Output_messageType fastReflection_Output_messageType -var _ protoreflect.MessageType = fastReflection_Output_messageType{} - -type fastReflection_Output_messageType struct{} - -func (x fastReflection_Output_messageType) Zero() protoreflect.Message { - return (*fastReflection_Output)(nil) -} -func (x fastReflection_Output_messageType) New() protoreflect.Message { - return new(fastReflection_Output) -} -func (x fastReflection_Output_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Output -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Output) Descriptor() protoreflect.MessageDescriptor { - return md_Output -} - -// 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_Output) Type() protoreflect.MessageType { - return _fastReflection_Output_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Output) New() protoreflect.Message { - return new(fastReflection_Output) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Output) Interface() protoreflect.ProtoMessage { - return (*Output)(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_Output) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Output_address, value) { - return - } - } - if len(x.Coins) != 0 { - value := protoreflect.ValueOfList(&_Output_2_list{list: &x.Coins}) - if !f(fd_Output_coins, 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_Output) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Output.address": - return x.Address != "" - case "cosmos.bank.v1beta1.Output.coins": - return len(x.Coins) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Output")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Output 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_Output) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Output.address": - x.Address = "" - case "cosmos.bank.v1beta1.Output.coins": - x.Coins = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Output")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Output 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_Output) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.Output.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Output.coins": - if len(x.Coins) == 0 { - return protoreflect.ValueOfList(&_Output_2_list{}) - } - listValue := &_Output_2_list{list: &x.Coins} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Output")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Output 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_Output) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Output.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.Output.coins": - lv := value.List() - clv := lv.(*_Output_2_list) - x.Coins = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Output")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Output 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_Output) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Output.coins": - if x.Coins == nil { - x.Coins = []*v1beta1.Coin{} - } - value := &_Output_2_list{list: &x.Coins} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.Output.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.Output is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Output")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Output 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_Output) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Output.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Output.coins": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Output_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Output")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Output 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_Output) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.Output", 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_Output) 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_Output) 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_Output) 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_Output) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Output) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Coins) > 0 { - for _, e := range x.Coins { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Output) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Coins) > 0 { - for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Coins[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Output) - 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: Output: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Coins = append(x.Coins, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Supply_1_list)(nil) - -type _Supply_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Supply_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Supply_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Supply_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Supply_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Supply_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Supply_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Supply_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Supply_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Supply protoreflect.MessageDescriptor - fd_Supply_total protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_Supply = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("Supply") - fd_Supply_total = md_Supply.Fields().ByName("total") -} - -var _ protoreflect.Message = (*fastReflection_Supply)(nil) - -type fastReflection_Supply Supply - -func (x *Supply) ProtoReflect() protoreflect.Message { - return (*fastReflection_Supply)(x) -} - -func (x *Supply) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Supply_messageType fastReflection_Supply_messageType -var _ protoreflect.MessageType = fastReflection_Supply_messageType{} - -type fastReflection_Supply_messageType struct{} - -func (x fastReflection_Supply_messageType) Zero() protoreflect.Message { - return (*fastReflection_Supply)(nil) -} -func (x fastReflection_Supply_messageType) New() protoreflect.Message { - return new(fastReflection_Supply) -} -func (x fastReflection_Supply_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Supply -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Supply) Descriptor() protoreflect.MessageDescriptor { - return md_Supply -} - -// 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_Supply) Type() protoreflect.MessageType { - return _fastReflection_Supply_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Supply) New() protoreflect.Message { - return new(fastReflection_Supply) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Supply) Interface() protoreflect.ProtoMessage { - return (*Supply)(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_Supply) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Total) != 0 { - value := protoreflect.ValueOfList(&_Supply_1_list{list: &x.Total}) - if !f(fd_Supply_total, 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_Supply) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Supply.total": - return len(x.Total) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Supply")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Supply 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_Supply) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Supply.total": - x.Total = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Supply")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Supply 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_Supply) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.Supply.total": - if len(x.Total) == 0 { - return protoreflect.ValueOfList(&_Supply_1_list{}) - } - listValue := &_Supply_1_list{list: &x.Total} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Supply")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Supply 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_Supply) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Supply.total": - lv := value.List() - clv := lv.(*_Supply_1_list) - x.Total = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Supply")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Supply 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_Supply) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Supply.total": - if x.Total == nil { - x.Total = []*v1beta1.Coin{} - } - value := &_Supply_1_list{list: &x.Total} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Supply")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Supply 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_Supply) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Supply.total": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Supply_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Supply")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Supply 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_Supply) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.Supply", 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_Supply) 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_Supply) 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_Supply) 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_Supply) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Supply) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Total) > 0 { - for _, e := range x.Total { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Supply) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Total) > 0 { - for iNdEx := len(x.Total) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Total[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Supply) - 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: Supply: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Supply: 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 Total", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Total = append(x.Total, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Total[len(x.Total)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DenomUnit_3_list)(nil) - -type _DenomUnit_3_list struct { - list *[]string -} - -func (x *_DenomUnit_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DenomUnit_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_DenomUnit_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_DenomUnit_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_DenomUnit_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DenomUnit at list field Aliases as it is not of Message kind")) -} - -func (x *_DenomUnit_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_DenomUnit_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_DenomUnit_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DenomUnit protoreflect.MessageDescriptor - fd_DenomUnit_denom protoreflect.FieldDescriptor - fd_DenomUnit_exponent protoreflect.FieldDescriptor - fd_DenomUnit_aliases protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_DenomUnit = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("DenomUnit") - fd_DenomUnit_denom = md_DenomUnit.Fields().ByName("denom") - fd_DenomUnit_exponent = md_DenomUnit.Fields().ByName("exponent") - fd_DenomUnit_aliases = md_DenomUnit.Fields().ByName("aliases") -} - -var _ protoreflect.Message = (*fastReflection_DenomUnit)(nil) - -type fastReflection_DenomUnit DenomUnit - -func (x *DenomUnit) ProtoReflect() protoreflect.Message { - return (*fastReflection_DenomUnit)(x) -} - -func (x *DenomUnit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_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_DenomUnit_messageType fastReflection_DenomUnit_messageType -var _ protoreflect.MessageType = fastReflection_DenomUnit_messageType{} - -type fastReflection_DenomUnit_messageType struct{} - -func (x fastReflection_DenomUnit_messageType) Zero() protoreflect.Message { - return (*fastReflection_DenomUnit)(nil) -} -func (x fastReflection_DenomUnit_messageType) New() protoreflect.Message { - return new(fastReflection_DenomUnit) -} -func (x fastReflection_DenomUnit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DenomUnit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DenomUnit) Descriptor() protoreflect.MessageDescriptor { - return md_DenomUnit -} - -// 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_DenomUnit) Type() protoreflect.MessageType { - return _fastReflection_DenomUnit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DenomUnit) New() protoreflect.Message { - return new(fastReflection_DenomUnit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DenomUnit) Interface() protoreflect.ProtoMessage { - return (*DenomUnit)(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_DenomUnit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_DenomUnit_denom, value) { - return - } - } - if x.Exponent != uint32(0) { - value := protoreflect.ValueOfUint32(x.Exponent) - if !f(fd_DenomUnit_exponent, value) { - return - } - } - if len(x.Aliases) != 0 { - value := protoreflect.ValueOfList(&_DenomUnit_3_list{list: &x.Aliases}) - if !f(fd_DenomUnit_aliases, 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_DenomUnit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomUnit.denom": - return x.Denom != "" - case "cosmos.bank.v1beta1.DenomUnit.exponent": - return x.Exponent != uint32(0) - case "cosmos.bank.v1beta1.DenomUnit.aliases": - return len(x.Aliases) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomUnit")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomUnit 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_DenomUnit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomUnit.denom": - x.Denom = "" - case "cosmos.bank.v1beta1.DenomUnit.exponent": - x.Exponent = uint32(0) - case "cosmos.bank.v1beta1.DenomUnit.aliases": - x.Aliases = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomUnit")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomUnit 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_DenomUnit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.DenomUnit.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.DenomUnit.exponent": - value := x.Exponent - return protoreflect.ValueOfUint32(value) - case "cosmos.bank.v1beta1.DenomUnit.aliases": - if len(x.Aliases) == 0 { - return protoreflect.ValueOfList(&_DenomUnit_3_list{}) - } - listValue := &_DenomUnit_3_list{list: &x.Aliases} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomUnit")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomUnit 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_DenomUnit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomUnit.denom": - x.Denom = value.Interface().(string) - case "cosmos.bank.v1beta1.DenomUnit.exponent": - x.Exponent = uint32(value.Uint()) - case "cosmos.bank.v1beta1.DenomUnit.aliases": - lv := value.List() - clv := lv.(*_DenomUnit_3_list) - x.Aliases = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomUnit")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomUnit 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_DenomUnit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomUnit.aliases": - if x.Aliases == nil { - x.Aliases = []string{} - } - value := &_DenomUnit_3_list{list: &x.Aliases} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.DenomUnit.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.DenomUnit is not mutable")) - case "cosmos.bank.v1beta1.DenomUnit.exponent": - panic(fmt.Errorf("field exponent of message cosmos.bank.v1beta1.DenomUnit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomUnit")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomUnit 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_DenomUnit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomUnit.denom": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.DenomUnit.exponent": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.bank.v1beta1.DenomUnit.aliases": - list := []string{} - return protoreflect.ValueOfList(&_DenomUnit_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomUnit")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomUnit 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_DenomUnit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.DenomUnit", 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_DenomUnit) 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_DenomUnit) 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_DenomUnit) 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_DenomUnit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DenomUnit) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Exponent != 0 { - n += 1 + runtime.Sov(uint64(x.Exponent)) - } - if len(x.Aliases) > 0 { - for _, s := range x.Aliases { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DenomUnit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Aliases) > 0 { - for iNdEx := len(x.Aliases) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Aliases[iNdEx]) - copy(dAtA[i:], x.Aliases[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aliases[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if x.Exponent != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Exponent)) - i-- - dAtA[i] = 0x10 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DenomUnit) - 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: DenomUnit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DenomUnit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) - } - x.Exponent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Exponent |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Aliases", 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.Aliases = append(x.Aliases, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Metadata_2_list)(nil) - -type _Metadata_2_list struct { - list *[]*DenomUnit -} - -func (x *_Metadata_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Metadata_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Metadata_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DenomUnit) - (*x.list)[i] = concreteValue -} - -func (x *_Metadata_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DenomUnit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Metadata_2_list) AppendMutable() protoreflect.Value { - v := new(DenomUnit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Metadata_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Metadata_2_list) NewElement() protoreflect.Value { - v := new(DenomUnit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Metadata_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Metadata protoreflect.MessageDescriptor - fd_Metadata_description protoreflect.FieldDescriptor - fd_Metadata_denom_units protoreflect.FieldDescriptor - fd_Metadata_base protoreflect.FieldDescriptor - fd_Metadata_display protoreflect.FieldDescriptor - fd_Metadata_name protoreflect.FieldDescriptor - fd_Metadata_symbol protoreflect.FieldDescriptor - fd_Metadata_uri protoreflect.FieldDescriptor - fd_Metadata_uri_hash protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_bank_proto_init() - md_Metadata = File_cosmos_bank_v1beta1_bank_proto.Messages().ByName("Metadata") - fd_Metadata_description = md_Metadata.Fields().ByName("description") - fd_Metadata_denom_units = md_Metadata.Fields().ByName("denom_units") - fd_Metadata_base = md_Metadata.Fields().ByName("base") - fd_Metadata_display = md_Metadata.Fields().ByName("display") - fd_Metadata_name = md_Metadata.Fields().ByName("name") - fd_Metadata_symbol = md_Metadata.Fields().ByName("symbol") - fd_Metadata_uri = md_Metadata.Fields().ByName("uri") - fd_Metadata_uri_hash = md_Metadata.Fields().ByName("uri_hash") -} - -var _ protoreflect.Message = (*fastReflection_Metadata)(nil) - -type fastReflection_Metadata Metadata - -func (x *Metadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_Metadata)(x) -} - -func (x *Metadata) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_bank_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_Metadata_messageType fastReflection_Metadata_messageType -var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} - -type fastReflection_Metadata_messageType struct{} - -func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_Metadata)(nil) -} -func (x fastReflection_Metadata_messageType) New() protoreflect.Message { - return new(fastReflection_Metadata) -} -func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata -} - -// 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_Metadata) Type() protoreflect.MessageType { - return _fastReflection_Metadata_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Metadata) New() protoreflect.Message { - return new(fastReflection_Metadata) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { - return (*Metadata)(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_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_Metadata_description, value) { - return - } - } - if len(x.DenomUnits) != 0 { - value := protoreflect.ValueOfList(&_Metadata_2_list{list: &x.DenomUnits}) - if !f(fd_Metadata_denom_units, value) { - return - } - } - if x.Base != "" { - value := protoreflect.ValueOfString(x.Base) - if !f(fd_Metadata_base, value) { - return - } - } - if x.Display != "" { - value := protoreflect.ValueOfString(x.Display) - if !f(fd_Metadata_display, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Metadata_name, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_Metadata_symbol, value) { - return - } - } - if x.Uri != "" { - value := protoreflect.ValueOfString(x.Uri) - if !f(fd_Metadata_uri, value) { - return - } - } - if x.UriHash != "" { - value := protoreflect.ValueOfString(x.UriHash) - if !f(fd_Metadata_uri_hash, 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_Metadata) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Metadata.description": - return x.Description != "" - case "cosmos.bank.v1beta1.Metadata.denom_units": - return len(x.DenomUnits) != 0 - case "cosmos.bank.v1beta1.Metadata.base": - return x.Base != "" - case "cosmos.bank.v1beta1.Metadata.display": - return x.Display != "" - case "cosmos.bank.v1beta1.Metadata.name": - return x.Name != "" - case "cosmos.bank.v1beta1.Metadata.symbol": - return x.Symbol != "" - case "cosmos.bank.v1beta1.Metadata.uri": - return x.Uri != "" - case "cosmos.bank.v1beta1.Metadata.uri_hash": - return x.UriHash != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Metadata 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_Metadata) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Metadata.description": - x.Description = "" - case "cosmos.bank.v1beta1.Metadata.denom_units": - x.DenomUnits = nil - case "cosmos.bank.v1beta1.Metadata.base": - x.Base = "" - case "cosmos.bank.v1beta1.Metadata.display": - x.Display = "" - case "cosmos.bank.v1beta1.Metadata.name": - x.Name = "" - case "cosmos.bank.v1beta1.Metadata.symbol": - x.Symbol = "" - case "cosmos.bank.v1beta1.Metadata.uri": - x.Uri = "" - case "cosmos.bank.v1beta1.Metadata.uri_hash": - x.UriHash = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Metadata 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_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.Metadata.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Metadata.denom_units": - if len(x.DenomUnits) == 0 { - return protoreflect.ValueOfList(&_Metadata_2_list{}) - } - listValue := &_Metadata_2_list{list: &x.DenomUnits} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.Metadata.base": - value := x.Base - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Metadata.display": - value := x.Display - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Metadata.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Metadata.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Metadata.uri": - value := x.Uri - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Metadata.uri_hash": - value := x.UriHash - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Metadata 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_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Metadata.description": - x.Description = value.Interface().(string) - case "cosmos.bank.v1beta1.Metadata.denom_units": - lv := value.List() - clv := lv.(*_Metadata_2_list) - x.DenomUnits = *clv.list - case "cosmos.bank.v1beta1.Metadata.base": - x.Base = value.Interface().(string) - case "cosmos.bank.v1beta1.Metadata.display": - x.Display = value.Interface().(string) - case "cosmos.bank.v1beta1.Metadata.name": - x.Name = value.Interface().(string) - case "cosmos.bank.v1beta1.Metadata.symbol": - x.Symbol = value.Interface().(string) - case "cosmos.bank.v1beta1.Metadata.uri": - x.Uri = value.Interface().(string) - case "cosmos.bank.v1beta1.Metadata.uri_hash": - x.UriHash = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Metadata 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_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Metadata.denom_units": - if x.DenomUnits == nil { - x.DenomUnits = []*DenomUnit{} - } - value := &_Metadata_2_list{list: &x.DenomUnits} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.Metadata.description": - panic(fmt.Errorf("field description of message cosmos.bank.v1beta1.Metadata is not mutable")) - case "cosmos.bank.v1beta1.Metadata.base": - panic(fmt.Errorf("field base of message cosmos.bank.v1beta1.Metadata is not mutable")) - case "cosmos.bank.v1beta1.Metadata.display": - panic(fmt.Errorf("field display of message cosmos.bank.v1beta1.Metadata is not mutable")) - case "cosmos.bank.v1beta1.Metadata.name": - panic(fmt.Errorf("field name of message cosmos.bank.v1beta1.Metadata is not mutable")) - case "cosmos.bank.v1beta1.Metadata.symbol": - panic(fmt.Errorf("field symbol of message cosmos.bank.v1beta1.Metadata is not mutable")) - case "cosmos.bank.v1beta1.Metadata.uri": - panic(fmt.Errorf("field uri of message cosmos.bank.v1beta1.Metadata is not mutable")) - case "cosmos.bank.v1beta1.Metadata.uri_hash": - panic(fmt.Errorf("field uri_hash of message cosmos.bank.v1beta1.Metadata is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Metadata 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_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Metadata.description": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Metadata.denom_units": - list := []*DenomUnit{} - return protoreflect.ValueOfList(&_Metadata_2_list{list: &list}) - case "cosmos.bank.v1beta1.Metadata.base": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Metadata.display": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Metadata.name": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Metadata.symbol": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Metadata.uri": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Metadata.uri_hash": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Metadata 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_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.Metadata", 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_Metadata) 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_Metadata) 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_Metadata) 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_Metadata) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Metadata) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.DenomUnits) > 0 { - for _, e := range x.DenomUnits { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Base) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Display) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Uri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.UriHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Metadata) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.UriHash) > 0 { - i -= len(x.UriHash) - copy(dAtA[i:], x.UriHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UriHash))) - i-- - dAtA[i] = 0x42 - } - if len(x.Uri) > 0 { - i -= len(x.Uri) - copy(dAtA[i:], x.Uri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Uri))) - i-- - dAtA[i] = 0x3a - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x32 - } - 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] = 0x2a - } - if len(x.Display) > 0 { - i -= len(x.Display) - copy(dAtA[i:], x.Display) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Display))) - i-- - dAtA[i] = 0x22 - } - if len(x.Base) > 0 { - i -= len(x.Base) - copy(dAtA[i:], x.Base) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Base))) - i-- - dAtA[i] = 0x1a - } - if len(x.DenomUnits) > 0 { - for iNdEx := len(x.DenomUnits) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DenomUnits[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 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().(*Metadata) - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: 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 Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DenomUnits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DenomUnits = append(x.DenomUnits, &DenomUnit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DenomUnits[len(x.DenomUnits)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Base", 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.Base = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Display", 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.Display = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", 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.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Uri", 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.Uri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UriHash", 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.UriHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/bank/v1beta1/bank.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the parameters for the bank module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SendEnabled []*SendEnabled `protobuf:"bytes,1,rep,name=send_enabled,json=sendEnabled,proto3" json:"send_enabled,omitempty"` - DefaultSendEnabled bool `protobuf:"varint,2,opt,name=default_send_enabled,json=defaultSendEnabled,proto3" json:"default_send_enabled,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{0} -} - -func (x *Params) GetSendEnabled() []*SendEnabled { - if x != nil { - return x.SendEnabled - } - return nil -} - -func (x *Params) GetDefaultSendEnabled() bool { - if x != nil { - return x.DefaultSendEnabled - } - return false -} - -// SendEnabled maps coin denom to a send_enabled status (whether a denom is -// sendable). -type SendEnabled struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` -} - -func (x *SendEnabled) Reset() { - *x = SendEnabled{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendEnabled) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendEnabled) ProtoMessage() {} - -// Deprecated: Use SendEnabled.ProtoReflect.Descriptor instead. -func (*SendEnabled) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{1} -} - -func (x *SendEnabled) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *SendEnabled) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// Input models transaction input. -type Input struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Coins []*v1beta1.Coin `protobuf:"bytes,2,rep,name=coins,proto3" json:"coins,omitempty"` -} - -func (x *Input) Reset() { - *x = Input{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Input) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Input) ProtoMessage() {} - -// Deprecated: Use Input.ProtoReflect.Descriptor instead. -func (*Input) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{2} -} - -func (x *Input) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Input) GetCoins() []*v1beta1.Coin { - if x != nil { - return x.Coins - } - return nil -} - -// Output models transaction outputs. -type Output struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Coins []*v1beta1.Coin `protobuf:"bytes,2,rep,name=coins,proto3" json:"coins,omitempty"` -} - -func (x *Output) Reset() { - *x = Output{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Output) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Output) ProtoMessage() {} - -// Deprecated: Use Output.ProtoReflect.Descriptor instead. -func (*Output) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{3} -} - -func (x *Output) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Output) GetCoins() []*v1beta1.Coin { - if x != nil { - return x.Coins - } - return nil -} - -// Supply represents a struct that passively keeps track of the total supply -// amounts in the network. -// This message is deprecated now that supply is indexed by denom. -// -// Deprecated: Do not use. -type Supply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total []*v1beta1.Coin `protobuf:"bytes,1,rep,name=total,proto3" json:"total,omitempty"` -} - -func (x *Supply) Reset() { - *x = Supply{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Supply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Supply) ProtoMessage() {} - -// Deprecated: Use Supply.ProtoReflect.Descriptor instead. -func (*Supply) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{4} -} - -func (x *Supply) GetTotal() []*v1beta1.Coin { - if x != nil { - return x.Total - } - return nil -} - -// DenomUnit represents a struct that describes a given -// denomination unit of the basic token. -type DenomUnit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // denom represents the string name of the given denom unit (e.g uatom). - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - // exponent represents power of 10 exponent that one must - // raise the base_denom to in order to equal the given DenomUnit's denom - // 1 denom = 10^exponent base_denom - // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - // exponent = 6, thus: 1 atom = 10^6 uatom). - Exponent uint32 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"` - // aliases is a list of string aliases for the given denom - Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` -} - -func (x *DenomUnit) Reset() { - *x = DenomUnit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DenomUnit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DenomUnit) ProtoMessage() {} - -// Deprecated: Use DenomUnit.ProtoReflect.Descriptor instead. -func (*DenomUnit) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{5} -} - -func (x *DenomUnit) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *DenomUnit) GetExponent() uint32 { - if x != nil { - return x.Exponent - } - return 0 -} - -func (x *DenomUnit) GetAliases() []string { - if x != nil { - return x.Aliases - } - return nil -} - -// Metadata represents a struct that describes -// a basic token. -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // denom_units represents the list of DenomUnit's for a given coin - DenomUnits []*DenomUnit `protobuf:"bytes,2,rep,name=denom_units,json=denomUnits,proto3" json:"denom_units,omitempty"` - // base represents the base denom (should be the DenomUnit with exponent = 0). - Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"` - // display indicates the suggested denom that should be - // displayed in clients. - Display string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty"` - // name defines the name of the token (eg: Cosmos Atom) - // - // Since: cosmos-sdk 0.43 - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - // be the same as the display. - // - // Since: cosmos-sdk 0.43 - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - // URI to a document (on or off-chain) that contains additional information. Optional. - // - // Since: cosmos-sdk 0.46 - Uri string `protobuf:"bytes,7,opt,name=uri,proto3" json:"uri,omitempty"` - // URIHash is a sha256 hash of a document pointed by URI. It's used to verify that - // the document didn't change. Optional. - // - // Since: cosmos-sdk 0.46 - UriHash string `protobuf:"bytes,8,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_bank_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP(), []int{6} -} - -func (x *Metadata) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Metadata) GetDenomUnits() []*DenomUnit { - if x != nil { - return x.DenomUnits - } - return nil -} - -func (x *Metadata) GetBase() string { - if x != nil { - return x.Base - } - return "" -} - -func (x *Metadata) GetDisplay() string { - if x != nil { - return x.Display - } - return "" -} - -func (x *Metadata) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Metadata) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *Metadata) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -func (x *Metadata) GetUriHash() string { - if x != nil { - return x.UriHash - } - return "" -} - -var File_cosmos_bank_v1beta1_bank_proto protoreflect.FileDescriptor - -var file_cosmos_bank_v1beta1_bank_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, - 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x85, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, - 0x6e, 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x30, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x47, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x18, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, - 0x22, 0xb4, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 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, 0x12, 0x61, - 0x0a, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x63, 0x6f, 0x69, 0x6e, - 0x73, 0x3a, 0x14, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, - 0x75, 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, 0x12, 0x61, 0x0a, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x22, 0xb7, 0x01, 0x0a, 0x06, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x61, - 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x3a, 0x4a, 0x18, 0x01, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0xca, 0xb4, 0x2d, - 0x3c, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, - 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x30, 0x34, 0x30, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x22, 0x57, 0x0a, - 0x09, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x8a, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x75, - 0x6e, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x12, 0x19, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xe2, - 0xde, 0x1f, 0x03, 0x55, 0x52, 0x49, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x26, 0x0a, 0x08, 0x75, - 0x72, 0x69, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe2, - 0xde, 0x1f, 0x07, 0x55, 0x52, 0x49, 0x48, 0x61, 0x73, 0x68, 0x52, 0x07, 0x75, 0x72, 0x69, 0x48, - 0x61, 0x73, 0x68, 0x42, 0xd4, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x09, 0x42, 0x61, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, - 0x6e, 0x6b, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 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, 0x42, 0x61, 0x6e, - 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cosmos_bank_v1beta1_bank_proto_rawDescOnce sync.Once - file_cosmos_bank_v1beta1_bank_proto_rawDescData = file_cosmos_bank_v1beta1_bank_proto_rawDesc -) - -func file_cosmos_bank_v1beta1_bank_proto_rawDescGZIP() []byte { - file_cosmos_bank_v1beta1_bank_proto_rawDescOnce.Do(func() { - file_cosmos_bank_v1beta1_bank_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_bank_v1beta1_bank_proto_rawDescData) - }) - return file_cosmos_bank_v1beta1_bank_proto_rawDescData -} - -var file_cosmos_bank_v1beta1_bank_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_cosmos_bank_v1beta1_bank_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: cosmos.bank.v1beta1.Params - (*SendEnabled)(nil), // 1: cosmos.bank.v1beta1.SendEnabled - (*Input)(nil), // 2: cosmos.bank.v1beta1.Input - (*Output)(nil), // 3: cosmos.bank.v1beta1.Output - (*Supply)(nil), // 4: cosmos.bank.v1beta1.Supply - (*DenomUnit)(nil), // 5: cosmos.bank.v1beta1.DenomUnit - (*Metadata)(nil), // 6: cosmos.bank.v1beta1.Metadata - (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin -} -var file_cosmos_bank_v1beta1_bank_proto_depIdxs = []int32{ - 1, // 0: cosmos.bank.v1beta1.Params.send_enabled:type_name -> cosmos.bank.v1beta1.SendEnabled - 7, // 1: cosmos.bank.v1beta1.Input.coins:type_name -> cosmos.base.v1beta1.Coin - 7, // 2: cosmos.bank.v1beta1.Output.coins:type_name -> cosmos.base.v1beta1.Coin - 7, // 3: cosmos.bank.v1beta1.Supply.total:type_name -> cosmos.base.v1beta1.Coin - 5, // 4: cosmos.bank.v1beta1.Metadata.denom_units:type_name -> cosmos.bank.v1beta1.DenomUnit - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_bank_v1beta1_bank_proto_init() } -func file_cosmos_bank_v1beta1_bank_proto_init() { - if File_cosmos_bank_v1beta1_bank_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_bank_v1beta1_bank_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_bank_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendEnabled); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_bank_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Input); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_bank_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Output); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_bank_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Supply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_bank_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DenomUnit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_bank_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_bank_v1beta1_bank_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_bank_v1beta1_bank_proto_goTypes, - DependencyIndexes: file_cosmos_bank_v1beta1_bank_proto_depIdxs, - MessageInfos: file_cosmos_bank_v1beta1_bank_proto_msgTypes, - }.Build() - File_cosmos_bank_v1beta1_bank_proto = out.File - file_cosmos_bank_v1beta1_bank_proto_rawDesc = nil - file_cosmos_bank_v1beta1_bank_proto_goTypes = nil - file_cosmos_bank_v1beta1_bank_proto_depIdxs = nil -} diff --git a/api/cosmos/bank/v1beta1/genesis.pulsar.go b/api/cosmos/bank/v1beta1/genesis.pulsar.go deleted file mode 100644 index fe5dd78ae3da..000000000000 --- a/api/cosmos/bank/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,1694 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package bankv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*Balance -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Balance) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Balance) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(Balance) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(Balance) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_4_list)(nil) - -type _GenesisState_4_list struct { - list *[]*Metadata -} - -func (x *_GenesisState_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Metadata) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Metadata) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { - v := new(Metadata) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_4_list) NewElement() protoreflect.Value { - v := new(Metadata) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_balances protoreflect.FieldDescriptor - fd_GenesisState_supply protoreflect.FieldDescriptor - fd_GenesisState_denom_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_bank_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_balances = md_GenesisState.Fields().ByName("balances") - fd_GenesisState_supply = md_GenesisState.Fields().ByName("supply") - fd_GenesisState_denom_metadata = md_GenesisState.Fields().ByName("denom_metadata") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if len(x.Balances) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Balances}) - if !f(fd_GenesisState_balances, value) { - return - } - } - if len(x.Supply) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Supply}) - if !f(fd_GenesisState_supply, value) { - return - } - } - if len(x.DenomMetadata) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.DenomMetadata}) - if !f(fd_GenesisState_denom_metadata, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.GenesisState.params": - return x.Params != nil - case "cosmos.bank.v1beta1.GenesisState.balances": - return len(x.Balances) != 0 - case "cosmos.bank.v1beta1.GenesisState.supply": - return len(x.Supply) != 0 - case "cosmos.bank.v1beta1.GenesisState.denom_metadata": - return len(x.DenomMetadata) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.GenesisState.params": - x.Params = nil - case "cosmos.bank.v1beta1.GenesisState.balances": - x.Balances = nil - case "cosmos.bank.v1beta1.GenesisState.supply": - x.Supply = nil - case "cosmos.bank.v1beta1.GenesisState.denom_metadata": - x.DenomMetadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.bank.v1beta1.GenesisState.balances": - if len(x.Balances) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.Balances} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.GenesisState.supply": - if len(x.Supply) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.Supply} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.GenesisState.denom_metadata": - if len(x.DenomMetadata) == 0 { - return protoreflect.ValueOfList(&_GenesisState_4_list{}) - } - listValue := &_GenesisState_4_list{list: &x.DenomMetadata} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "cosmos.bank.v1beta1.GenesisState.balances": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Balances = *clv.list - case "cosmos.bank.v1beta1.GenesisState.supply": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.Supply = *clv.list - case "cosmos.bank.v1beta1.GenesisState.denom_metadata": - lv := value.List() - clv := lv.(*_GenesisState_4_list) - x.DenomMetadata = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "cosmos.bank.v1beta1.GenesisState.balances": - if x.Balances == nil { - x.Balances = []*Balance{} - } - value := &_GenesisState_2_list{list: &x.Balances} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.GenesisState.supply": - if x.Supply == nil { - x.Supply = []*v1beta1.Coin{} - } - value := &_GenesisState_3_list{list: &x.Supply} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.GenesisState.denom_metadata": - if x.DenomMetadata == nil { - x.DenomMetadata = []*Metadata{} - } - value := &_GenesisState_4_list{list: &x.DenomMetadata} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.bank.v1beta1.GenesisState.balances": - list := []*Balance{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "cosmos.bank.v1beta1.GenesisState.supply": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "cosmos.bank.v1beta1.GenesisState.denom_metadata": - list := []*Metadata{} - return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Balances) > 0 { - for _, e := range x.Balances { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Supply) > 0 { - for _, e := range x.Supply { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DenomMetadata) > 0 { - for _, e := range x.DenomMetadata { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.DenomMetadata) > 0 { - for iNdEx := len(x.DenomMetadata) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DenomMetadata[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Supply) > 0 { - for iNdEx := len(x.Supply) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Supply[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Balances) > 0 { - for iNdEx := len(x.Balances) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Balances[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Balances = append(x.Balances, &Balance{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balances[len(x.Balances)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Supply = append(x.Supply, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Supply[len(x.Supply)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DenomMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DenomMetadata = append(x.DenomMetadata, &Metadata{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DenomMetadata[len(x.DenomMetadata)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Balance_2_list)(nil) - -type _Balance_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Balance_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Balance_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Balance_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Balance_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Balance_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Balance_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Balance_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Balance_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Balance protoreflect.MessageDescriptor - fd_Balance_address protoreflect.FieldDescriptor - fd_Balance_coins protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_genesis_proto_init() - md_Balance = File_cosmos_bank_v1beta1_genesis_proto.Messages().ByName("Balance") - fd_Balance_address = md_Balance.Fields().ByName("address") - fd_Balance_coins = md_Balance.Fields().ByName("coins") -} - -var _ protoreflect.Message = (*fastReflection_Balance)(nil) - -type fastReflection_Balance Balance - -func (x *Balance) ProtoReflect() protoreflect.Message { - return (*fastReflection_Balance)(x) -} - -func (x *Balance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Balance_messageType fastReflection_Balance_messageType -var _ protoreflect.MessageType = fastReflection_Balance_messageType{} - -type fastReflection_Balance_messageType struct{} - -func (x fastReflection_Balance_messageType) Zero() protoreflect.Message { - return (*fastReflection_Balance)(nil) -} -func (x fastReflection_Balance_messageType) New() protoreflect.Message { - return new(fastReflection_Balance) -} -func (x fastReflection_Balance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Balance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Balance) Descriptor() protoreflect.MessageDescriptor { - return md_Balance -} - -// 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_Balance) Type() protoreflect.MessageType { - return _fastReflection_Balance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Balance) New() protoreflect.Message { - return new(fastReflection_Balance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Balance) Interface() protoreflect.ProtoMessage { - return (*Balance)(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_Balance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Balance_address, value) { - return - } - } - if len(x.Coins) != 0 { - value := protoreflect.ValueOfList(&_Balance_2_list{list: &x.Coins}) - if !f(fd_Balance_coins, 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_Balance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Balance.address": - return x.Address != "" - case "cosmos.bank.v1beta1.Balance.coins": - return len(x.Coins) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Balance")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Balance 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_Balance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Balance.address": - x.Address = "" - case "cosmos.bank.v1beta1.Balance.coins": - x.Coins = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Balance")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Balance 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_Balance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.Balance.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.Balance.coins": - if len(x.Coins) == 0 { - return protoreflect.ValueOfList(&_Balance_2_list{}) - } - listValue := &_Balance_2_list{list: &x.Coins} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Balance")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Balance 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_Balance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Balance.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.Balance.coins": - lv := value.List() - clv := lv.(*_Balance_2_list) - x.Coins = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Balance")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Balance 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_Balance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Balance.coins": - if x.Coins == nil { - x.Coins = []*v1beta1.Coin{} - } - value := &_Balance_2_list{list: &x.Coins} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.Balance.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.Balance is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Balance")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Balance 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_Balance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.Balance.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.Balance.coins": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Balance_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.Balance")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.Balance 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_Balance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.Balance", 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_Balance) 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_Balance) 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_Balance) 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_Balance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Balance) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Coins) > 0 { - for _, e := range x.Coins { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Balance) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Coins) > 0 { - for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Coins[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Balance) - 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: Balance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Coins = append(x.Coins, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/bank/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the bank module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines all the paramaters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // balances is an array containing the balances of all the accounts. - Balances []*Balance `protobuf:"bytes,2,rep,name=balances,proto3" json:"balances,omitempty"` - // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - Supply []*v1beta1.Coin `protobuf:"bytes,3,rep,name=supply,proto3" json:"supply,omitempty"` - // denom_metadata defines the metadata of the differents coins. - DenomMetadata []*Metadata `protobuf:"bytes,4,rep,name=denom_metadata,json=denomMetadata,proto3" json:"denom_metadata,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetBalances() []*Balance { - if x != nil { - return x.Balances - } - return nil -} - -func (x *GenesisState) GetSupply() []*v1beta1.Coin { - if x != nil { - return x.Supply - } - return nil -} - -func (x *GenesisState) GetDenomMetadata() []*Metadata { - if x != nil { - return x.DenomMetadata - } - return nil -} - -// Balance defines an account address and balance pair used in the bank module's -// genesis state. -type Balance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the address of the balance holder. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // coins defines the different coins this balance holds. - Coins []*v1beta1.Coin `protobuf:"bytes,2,rep,name=coins,proto3" json:"coins,omitempty"` -} - -func (x *Balance) Reset() { - *x = Balance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Balance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Balance) ProtoMessage() {} - -// Deprecated: Use Balance.ProtoReflect.Descriptor instead. -func (*Balance) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *Balance) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Balance) GetCoins() []*v1beta1.Coin { - if x != nil { - return x.Coins - } - return nil -} - -var File_cosmos_bank_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_bank_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x02, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 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, 0x62, 0x61, 0x6e, 0x6b, 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, 0x12, 0x3e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x06, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x06, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x4a, 0x0a, 0x0e, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xaa, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 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, 0x12, 0x61, 0x0a, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x42, 0xd7, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, - 0x6b, 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, - 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_bank_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_bank_v1beta1_genesis_proto_rawDescData = file_cosmos_bank_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_bank_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_bank_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_bank_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_bank_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_bank_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_bank_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_bank_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.bank.v1beta1.GenesisState - (*Balance)(nil), // 1: cosmos.bank.v1beta1.Balance - (*Params)(nil), // 2: cosmos.bank.v1beta1.Params - (*v1beta1.Coin)(nil), // 3: cosmos.base.v1beta1.Coin - (*Metadata)(nil), // 4: cosmos.bank.v1beta1.Metadata -} -var file_cosmos_bank_v1beta1_genesis_proto_depIdxs = []int32{ - 2, // 0: cosmos.bank.v1beta1.GenesisState.params:type_name -> cosmos.bank.v1beta1.Params - 1, // 1: cosmos.bank.v1beta1.GenesisState.balances:type_name -> cosmos.bank.v1beta1.Balance - 3, // 2: cosmos.bank.v1beta1.GenesisState.supply:type_name -> cosmos.base.v1beta1.Coin - 4, // 3: cosmos.bank.v1beta1.GenesisState.denom_metadata:type_name -> cosmos.bank.v1beta1.Metadata - 3, // 4: cosmos.bank.v1beta1.Balance.coins:type_name -> cosmos.base.v1beta1.Coin - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_bank_v1beta1_genesis_proto_init() } -func file_cosmos_bank_v1beta1_genesis_proto_init() { - if File_cosmos_bank_v1beta1_genesis_proto != nil { - return - } - file_cosmos_bank_v1beta1_bank_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_bank_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Balance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_bank_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_bank_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_bank_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_bank_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_bank_v1beta1_genesis_proto = out.File - file_cosmos_bank_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_bank_v1beta1_genesis_proto_goTypes = nil - file_cosmos_bank_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/bank/v1beta1/query.pulsar.go b/api/cosmos/bank/v1beta1/query.pulsar.go deleted file mode 100644 index 5447b5b4f51c..000000000000 --- a/api/cosmos/bank/v1beta1/query.pulsar.go +++ /dev/null @@ -1,10587 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package bankv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta11 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryBalanceRequest protoreflect.MessageDescriptor - fd_QueryBalanceRequest_address protoreflect.FieldDescriptor - fd_QueryBalanceRequest_denom protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryBalanceRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryBalanceRequest") - fd_QueryBalanceRequest_address = md_QueryBalanceRequest.Fields().ByName("address") - fd_QueryBalanceRequest_denom = md_QueryBalanceRequest.Fields().ByName("denom") -} - -var _ protoreflect.Message = (*fastReflection_QueryBalanceRequest)(nil) - -type fastReflection_QueryBalanceRequest QueryBalanceRequest - -func (x *QueryBalanceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBalanceRequest)(x) -} - -func (x *QueryBalanceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBalanceRequest_messageType fastReflection_QueryBalanceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryBalanceRequest_messageType{} - -type fastReflection_QueryBalanceRequest_messageType struct{} - -func (x fastReflection_QueryBalanceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBalanceRequest)(nil) -} -func (x fastReflection_QueryBalanceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBalanceRequest) -} -func (x fastReflection_QueryBalanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBalanceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceRequest -} - -// 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_QueryBalanceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryBalanceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBalanceRequest) New() protoreflect.Message { - return new(fastReflection_QueryBalanceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBalanceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryBalanceRequest)(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_QueryBalanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryBalanceRequest_address, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_QueryBalanceRequest_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryBalanceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceRequest.address": - return x.Address != "" - case "cosmos.bank.v1beta1.QueryBalanceRequest.denom": - return x.Denom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceRequest.address": - x.Address = "" - case "cosmos.bank.v1beta1.QueryBalanceRequest.denom": - x.Denom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.QueryBalanceRequest.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceRequest.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.QueryBalanceRequest.denom": - x.Denom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceRequest.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.QueryBalanceRequest is not mutable")) - case "cosmos.bank.v1beta1.QueryBalanceRequest.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryBalanceRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceRequest.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.QueryBalanceRequest.denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryBalanceRequest", 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_QueryBalanceRequest) 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_QueryBalanceRequest) 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_QueryBalanceRequest) 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_QueryBalanceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBalanceRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBalanceRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBalanceRequest) - 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: QueryBalanceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryBalanceResponse protoreflect.MessageDescriptor - fd_QueryBalanceResponse_balance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryBalanceResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryBalanceResponse") - fd_QueryBalanceResponse_balance = md_QueryBalanceResponse.Fields().ByName("balance") -} - -var _ protoreflect.Message = (*fastReflection_QueryBalanceResponse)(nil) - -type fastReflection_QueryBalanceResponse QueryBalanceResponse - -func (x *QueryBalanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBalanceResponse)(x) -} - -func (x *QueryBalanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBalanceResponse_messageType fastReflection_QueryBalanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryBalanceResponse_messageType{} - -type fastReflection_QueryBalanceResponse_messageType struct{} - -func (x fastReflection_QueryBalanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBalanceResponse)(nil) -} -func (x fastReflection_QueryBalanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBalanceResponse) -} -func (x fastReflection_QueryBalanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBalanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceResponse -} - -// 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_QueryBalanceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryBalanceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBalanceResponse) New() protoreflect.Message { - return new(fastReflection_QueryBalanceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBalanceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryBalanceResponse)(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_QueryBalanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Balance != nil { - value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - if !f(fd_QueryBalanceResponse_balance, 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_QueryBalanceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceResponse.balance": - return x.Balance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceResponse.balance": - x.Balance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceResponse.balance": - value := x.Balance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceResponse.balance": - x.Balance = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceResponse.balance": - if x.Balance == nil { - x.Balance = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryBalanceResponse.balance": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryBalanceResponse", 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_QueryBalanceResponse) 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_QueryBalanceResponse) 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_QueryBalanceResponse) 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_QueryBalanceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBalanceResponse) - 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.Balance != nil { - l = options.Size(x.Balance) - 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().(*QueryBalanceResponse) - 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.Balance != nil { - encoded, err := options.Marshal(x.Balance) - 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().(*QueryBalanceResponse) - 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: QueryBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBalanceResponse: 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 Balance", 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.Balance == nil { - x.Balance = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); 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_QueryAllBalancesRequest protoreflect.MessageDescriptor - fd_QueryAllBalancesRequest_address protoreflect.FieldDescriptor - fd_QueryAllBalancesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryAllBalancesRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryAllBalancesRequest") - fd_QueryAllBalancesRequest_address = md_QueryAllBalancesRequest.Fields().ByName("address") - fd_QueryAllBalancesRequest_pagination = md_QueryAllBalancesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllBalancesRequest)(nil) - -type fastReflection_QueryAllBalancesRequest QueryAllBalancesRequest - -func (x *QueryAllBalancesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllBalancesRequest)(x) -} - -func (x *QueryAllBalancesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllBalancesRequest_messageType fastReflection_QueryAllBalancesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllBalancesRequest_messageType{} - -type fastReflection_QueryAllBalancesRequest_messageType struct{} - -func (x fastReflection_QueryAllBalancesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllBalancesRequest)(nil) -} -func (x fastReflection_QueryAllBalancesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllBalancesRequest) -} -func (x fastReflection_QueryAllBalancesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllBalancesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllBalancesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllBalancesRequest -} - -// 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_QueryAllBalancesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllBalancesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllBalancesRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllBalancesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllBalancesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllBalancesRequest)(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_QueryAllBalancesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAllBalancesRequest_address, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllBalancesRequest_pagination, 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_QueryAllBalancesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.address": - return x.Address != "" - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesRequest 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_QueryAllBalancesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.address": - x.Address = "" - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesRequest 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_QueryAllBalancesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesRequest 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_QueryAllBalancesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesRequest 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_QueryAllBalancesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.QueryAllBalancesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesRequest 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_QueryAllBalancesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesRequest 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_QueryAllBalancesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryAllBalancesRequest", 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_QueryAllBalancesRequest) 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_QueryAllBalancesRequest) 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_QueryAllBalancesRequest) 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_QueryAllBalancesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllBalancesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllBalancesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllBalancesRequest) - 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: QueryAllBalancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllBalancesResponse_1_list)(nil) - -type _QueryAllBalancesResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryAllBalancesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllBalancesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllBalancesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllBalancesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllBalancesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllBalancesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllBalancesResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllBalancesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllBalancesResponse protoreflect.MessageDescriptor - fd_QueryAllBalancesResponse_balances protoreflect.FieldDescriptor - fd_QueryAllBalancesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryAllBalancesResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryAllBalancesResponse") - fd_QueryAllBalancesResponse_balances = md_QueryAllBalancesResponse.Fields().ByName("balances") - fd_QueryAllBalancesResponse_pagination = md_QueryAllBalancesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllBalancesResponse)(nil) - -type fastReflection_QueryAllBalancesResponse QueryAllBalancesResponse - -func (x *QueryAllBalancesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllBalancesResponse)(x) -} - -func (x *QueryAllBalancesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllBalancesResponse_messageType fastReflection_QueryAllBalancesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllBalancesResponse_messageType{} - -type fastReflection_QueryAllBalancesResponse_messageType struct{} - -func (x fastReflection_QueryAllBalancesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllBalancesResponse)(nil) -} -func (x fastReflection_QueryAllBalancesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllBalancesResponse) -} -func (x fastReflection_QueryAllBalancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllBalancesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllBalancesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllBalancesResponse -} - -// 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_QueryAllBalancesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllBalancesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllBalancesResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllBalancesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllBalancesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllBalancesResponse)(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_QueryAllBalancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Balances) != 0 { - value := protoreflect.ValueOfList(&_QueryAllBalancesResponse_1_list{list: &x.Balances}) - if !f(fd_QueryAllBalancesResponse_balances, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllBalancesResponse_pagination, 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_QueryAllBalancesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.balances": - return len(x.Balances) != 0 - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesResponse 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_QueryAllBalancesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.balances": - x.Balances = nil - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesResponse 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_QueryAllBalancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.balances": - if len(x.Balances) == 0 { - return protoreflect.ValueOfList(&_QueryAllBalancesResponse_1_list{}) - } - listValue := &_QueryAllBalancesResponse_1_list{list: &x.Balances} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesResponse 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_QueryAllBalancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.balances": - lv := value.List() - clv := lv.(*_QueryAllBalancesResponse_1_list) - x.Balances = *clv.list - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesResponse 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_QueryAllBalancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.balances": - if x.Balances == nil { - x.Balances = []*v1beta1.Coin{} - } - value := &_QueryAllBalancesResponse_1_list{list: &x.Balances} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesResponse 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_QueryAllBalancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.balances": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryAllBalancesResponse_1_list{list: &list}) - case "cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination": - m := new(v1beta11.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryAllBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryAllBalancesResponse 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_QueryAllBalancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryAllBalancesResponse", 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_QueryAllBalancesResponse) 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_QueryAllBalancesResponse) 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_QueryAllBalancesResponse) 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_QueryAllBalancesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllBalancesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Balances) > 0 { - for _, e := range x.Balances { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllBalancesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Balances) > 0 { - for iNdEx := len(x.Balances) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Balances[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllBalancesResponse) - 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: QueryAllBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllBalancesResponse: 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 Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Balances = append(x.Balances, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balances[len(x.Balances)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QuerySpendableBalancesRequest protoreflect.MessageDescriptor - fd_QuerySpendableBalancesRequest_address protoreflect.FieldDescriptor - fd_QuerySpendableBalancesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QuerySpendableBalancesRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QuerySpendableBalancesRequest") - fd_QuerySpendableBalancesRequest_address = md_QuerySpendableBalancesRequest.Fields().ByName("address") - fd_QuerySpendableBalancesRequest_pagination = md_QuerySpendableBalancesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QuerySpendableBalancesRequest)(nil) - -type fastReflection_QuerySpendableBalancesRequest QuerySpendableBalancesRequest - -func (x *QuerySpendableBalancesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySpendableBalancesRequest)(x) -} - -func (x *QuerySpendableBalancesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySpendableBalancesRequest_messageType fastReflection_QuerySpendableBalancesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySpendableBalancesRequest_messageType{} - -type fastReflection_QuerySpendableBalancesRequest_messageType struct{} - -func (x fastReflection_QuerySpendableBalancesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySpendableBalancesRequest)(nil) -} -func (x fastReflection_QuerySpendableBalancesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySpendableBalancesRequest) -} -func (x fastReflection_QuerySpendableBalancesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySpendableBalancesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySpendableBalancesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySpendableBalancesRequest -} - -// 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_QuerySpendableBalancesRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySpendableBalancesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySpendableBalancesRequest) New() protoreflect.Message { - return new(fastReflection_QuerySpendableBalancesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySpendableBalancesRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySpendableBalancesRequest)(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_QuerySpendableBalancesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QuerySpendableBalancesRequest_address, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QuerySpendableBalancesRequest_pagination, 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_QuerySpendableBalancesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.address": - return x.Address != "" - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesRequest 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_QuerySpendableBalancesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.address": - x.Address = "" - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesRequest 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_QuerySpendableBalancesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesRequest 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_QuerySpendableBalancesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesRequest 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_QuerySpendableBalancesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.QuerySpendableBalancesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesRequest 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_QuerySpendableBalancesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesRequest 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_QuerySpendableBalancesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QuerySpendableBalancesRequest", 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_QuerySpendableBalancesRequest) 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_QuerySpendableBalancesRequest) 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_QuerySpendableBalancesRequest) 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_QuerySpendableBalancesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySpendableBalancesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QuerySpendableBalancesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySpendableBalancesRequest) - 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: QuerySpendableBalancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySpendableBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QuerySpendableBalancesResponse_1_list)(nil) - -type _QuerySpendableBalancesResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QuerySpendableBalancesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QuerySpendableBalancesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QuerySpendableBalancesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QuerySpendableBalancesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QuerySpendableBalancesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QuerySpendableBalancesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QuerySpendableBalancesResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QuerySpendableBalancesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QuerySpendableBalancesResponse protoreflect.MessageDescriptor - fd_QuerySpendableBalancesResponse_balances protoreflect.FieldDescriptor - fd_QuerySpendableBalancesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QuerySpendableBalancesResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QuerySpendableBalancesResponse") - fd_QuerySpendableBalancesResponse_balances = md_QuerySpendableBalancesResponse.Fields().ByName("balances") - fd_QuerySpendableBalancesResponse_pagination = md_QuerySpendableBalancesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QuerySpendableBalancesResponse)(nil) - -type fastReflection_QuerySpendableBalancesResponse QuerySpendableBalancesResponse - -func (x *QuerySpendableBalancesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySpendableBalancesResponse)(x) -} - -func (x *QuerySpendableBalancesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_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_QuerySpendableBalancesResponse_messageType fastReflection_QuerySpendableBalancesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySpendableBalancesResponse_messageType{} - -type fastReflection_QuerySpendableBalancesResponse_messageType struct{} - -func (x fastReflection_QuerySpendableBalancesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySpendableBalancesResponse)(nil) -} -func (x fastReflection_QuerySpendableBalancesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySpendableBalancesResponse) -} -func (x fastReflection_QuerySpendableBalancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySpendableBalancesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySpendableBalancesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySpendableBalancesResponse -} - -// 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_QuerySpendableBalancesResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySpendableBalancesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySpendableBalancesResponse) New() protoreflect.Message { - return new(fastReflection_QuerySpendableBalancesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySpendableBalancesResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySpendableBalancesResponse)(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_QuerySpendableBalancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Balances) != 0 { - value := protoreflect.ValueOfList(&_QuerySpendableBalancesResponse_1_list{list: &x.Balances}) - if !f(fd_QuerySpendableBalancesResponse_balances, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QuerySpendableBalancesResponse_pagination, 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_QuerySpendableBalancesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances": - return len(x.Balances) != 0 - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesResponse 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_QuerySpendableBalancesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances": - x.Balances = nil - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesResponse 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_QuerySpendableBalancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances": - if len(x.Balances) == 0 { - return protoreflect.ValueOfList(&_QuerySpendableBalancesResponse_1_list{}) - } - listValue := &_QuerySpendableBalancesResponse_1_list{list: &x.Balances} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesResponse 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_QuerySpendableBalancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances": - lv := value.List() - clv := lv.(*_QuerySpendableBalancesResponse_1_list) - x.Balances = *clv.list - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesResponse 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_QuerySpendableBalancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances": - if x.Balances == nil { - x.Balances = []*v1beta1.Coin{} - } - value := &_QuerySpendableBalancesResponse_1_list{list: &x.Balances} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesResponse 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_QuerySpendableBalancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QuerySpendableBalancesResponse_1_list{list: &list}) - case "cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination": - m := new(v1beta11.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySpendableBalancesResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySpendableBalancesResponse 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_QuerySpendableBalancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QuerySpendableBalancesResponse", 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_QuerySpendableBalancesResponse) 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_QuerySpendableBalancesResponse) 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_QuerySpendableBalancesResponse) 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_QuerySpendableBalancesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySpendableBalancesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Balances) > 0 { - for _, e := range x.Balances { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QuerySpendableBalancesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Balances) > 0 { - for iNdEx := len(x.Balances) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Balances[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySpendableBalancesResponse) - 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: QuerySpendableBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySpendableBalancesResponse: 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 Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Balances = append(x.Balances, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balances[len(x.Balances)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryTotalSupplyRequest protoreflect.MessageDescriptor - fd_QueryTotalSupplyRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryTotalSupplyRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryTotalSupplyRequest") - fd_QueryTotalSupplyRequest_pagination = md_QueryTotalSupplyRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryTotalSupplyRequest)(nil) - -type fastReflection_QueryTotalSupplyRequest QueryTotalSupplyRequest - -func (x *QueryTotalSupplyRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTotalSupplyRequest)(x) -} - -func (x *QueryTotalSupplyRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_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_QueryTotalSupplyRequest_messageType fastReflection_QueryTotalSupplyRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryTotalSupplyRequest_messageType{} - -type fastReflection_QueryTotalSupplyRequest_messageType struct{} - -func (x fastReflection_QueryTotalSupplyRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTotalSupplyRequest)(nil) -} -func (x fastReflection_QueryTotalSupplyRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTotalSupplyRequest) -} -func (x fastReflection_QueryTotalSupplyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTotalSupplyRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTotalSupplyRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTotalSupplyRequest -} - -// 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_QueryTotalSupplyRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryTotalSupplyRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTotalSupplyRequest) New() protoreflect.Message { - return new(fastReflection_QueryTotalSupplyRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTotalSupplyRequest) Interface() protoreflect.ProtoMessage { - return (*QueryTotalSupplyRequest)(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_QueryTotalSupplyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryTotalSupplyRequest_pagination, 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_QueryTotalSupplyRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyRequest 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_QueryTotalSupplyRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyRequest 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_QueryTotalSupplyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyRequest 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_QueryTotalSupplyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyRequest 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_QueryTotalSupplyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyRequest 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_QueryTotalSupplyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyRequest 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_QueryTotalSupplyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryTotalSupplyRequest", 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_QueryTotalSupplyRequest) 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_QueryTotalSupplyRequest) 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_QueryTotalSupplyRequest) 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_QueryTotalSupplyRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTotalSupplyRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryTotalSupplyRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QueryTotalSupplyRequest) - 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: QueryTotalSupplyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTotalSupplyRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryTotalSupplyResponse_1_list)(nil) - -type _QueryTotalSupplyResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryTotalSupplyResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryTotalSupplyResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryTotalSupplyResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryTotalSupplyResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryTotalSupplyResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryTotalSupplyResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryTotalSupplyResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryTotalSupplyResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryTotalSupplyResponse protoreflect.MessageDescriptor - fd_QueryTotalSupplyResponse_supply protoreflect.FieldDescriptor - fd_QueryTotalSupplyResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryTotalSupplyResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryTotalSupplyResponse") - fd_QueryTotalSupplyResponse_supply = md_QueryTotalSupplyResponse.Fields().ByName("supply") - fd_QueryTotalSupplyResponse_pagination = md_QueryTotalSupplyResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryTotalSupplyResponse)(nil) - -type fastReflection_QueryTotalSupplyResponse QueryTotalSupplyResponse - -func (x *QueryTotalSupplyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTotalSupplyResponse)(x) -} - -func (x *QueryTotalSupplyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTotalSupplyResponse_messageType fastReflection_QueryTotalSupplyResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryTotalSupplyResponse_messageType{} - -type fastReflection_QueryTotalSupplyResponse_messageType struct{} - -func (x fastReflection_QueryTotalSupplyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTotalSupplyResponse)(nil) -} -func (x fastReflection_QueryTotalSupplyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTotalSupplyResponse) -} -func (x fastReflection_QueryTotalSupplyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTotalSupplyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTotalSupplyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTotalSupplyResponse -} - -// 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_QueryTotalSupplyResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryTotalSupplyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTotalSupplyResponse) New() protoreflect.Message { - return new(fastReflection_QueryTotalSupplyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTotalSupplyResponse) Interface() protoreflect.ProtoMessage { - return (*QueryTotalSupplyResponse)(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_QueryTotalSupplyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Supply) != 0 { - value := protoreflect.ValueOfList(&_QueryTotalSupplyResponse_1_list{list: &x.Supply}) - if !f(fd_QueryTotalSupplyResponse_supply, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryTotalSupplyResponse_pagination, 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_QueryTotalSupplyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply": - return len(x.Supply) != 0 - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyResponse 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_QueryTotalSupplyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply": - x.Supply = nil - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyResponse 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_QueryTotalSupplyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply": - if len(x.Supply) == 0 { - return protoreflect.ValueOfList(&_QueryTotalSupplyResponse_1_list{}) - } - listValue := &_QueryTotalSupplyResponse_1_list{list: &x.Supply} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyResponse 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_QueryTotalSupplyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply": - lv := value.List() - clv := lv.(*_QueryTotalSupplyResponse_1_list) - x.Supply = *clv.list - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyResponse 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_QueryTotalSupplyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply": - if x.Supply == nil { - x.Supply = []*v1beta1.Coin{} - } - value := &_QueryTotalSupplyResponse_1_list{list: &x.Supply} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyResponse 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_QueryTotalSupplyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryTotalSupplyResponse_1_list{list: &list}) - case "cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination": - m := new(v1beta11.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryTotalSupplyResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryTotalSupplyResponse 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_QueryTotalSupplyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryTotalSupplyResponse", 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_QueryTotalSupplyResponse) 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_QueryTotalSupplyResponse) 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_QueryTotalSupplyResponse) 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_QueryTotalSupplyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTotalSupplyResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Supply) > 0 { - for _, e := range x.Supply { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryTotalSupplyResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Supply) > 0 { - for iNdEx := len(x.Supply) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Supply[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryTotalSupplyResponse) - 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: QueryTotalSupplyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTotalSupplyResponse: 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 Supply", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Supply = append(x.Supply, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Supply[len(x.Supply)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QuerySupplyOfRequest protoreflect.MessageDescriptor - fd_QuerySupplyOfRequest_denom protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QuerySupplyOfRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QuerySupplyOfRequest") - fd_QuerySupplyOfRequest_denom = md_QuerySupplyOfRequest.Fields().ByName("denom") -} - -var _ protoreflect.Message = (*fastReflection_QuerySupplyOfRequest)(nil) - -type fastReflection_QuerySupplyOfRequest QuerySupplyOfRequest - -func (x *QuerySupplyOfRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySupplyOfRequest)(x) -} - -func (x *QuerySupplyOfRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySupplyOfRequest_messageType fastReflection_QuerySupplyOfRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySupplyOfRequest_messageType{} - -type fastReflection_QuerySupplyOfRequest_messageType struct{} - -func (x fastReflection_QuerySupplyOfRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySupplyOfRequest)(nil) -} -func (x fastReflection_QuerySupplyOfRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySupplyOfRequest) -} -func (x fastReflection_QuerySupplyOfRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyOfRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySupplyOfRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyOfRequest -} - -// 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_QuerySupplyOfRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySupplyOfRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySupplyOfRequest) New() protoreflect.Message { - return new(fastReflection_QuerySupplyOfRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySupplyOfRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySupplyOfRequest)(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_QuerySupplyOfRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_QuerySupplyOfRequest_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySupplyOfRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfRequest.denom": - return x.Denom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfRequest 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_QuerySupplyOfRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfRequest.denom": - x.Denom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfRequest 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_QuerySupplyOfRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfRequest.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfRequest 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_QuerySupplyOfRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfRequest.denom": - x.Denom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfRequest 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_QuerySupplyOfRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfRequest.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QuerySupplyOfRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfRequest 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_QuerySupplyOfRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfRequest.denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfRequest 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_QuerySupplyOfRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QuerySupplyOfRequest", 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_QuerySupplyOfRequest) 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_QuerySupplyOfRequest) 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_QuerySupplyOfRequest) 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_QuerySupplyOfRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySupplyOfRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySupplyOfRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySupplyOfRequest) - 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: QuerySupplyOfRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySupplyOfRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySupplyOfResponse protoreflect.MessageDescriptor - fd_QuerySupplyOfResponse_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QuerySupplyOfResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QuerySupplyOfResponse") - fd_QuerySupplyOfResponse_amount = md_QuerySupplyOfResponse.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_QuerySupplyOfResponse)(nil) - -type fastReflection_QuerySupplyOfResponse QuerySupplyOfResponse - -func (x *QuerySupplyOfResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySupplyOfResponse)(x) -} - -func (x *QuerySupplyOfResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySupplyOfResponse_messageType fastReflection_QuerySupplyOfResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySupplyOfResponse_messageType{} - -type fastReflection_QuerySupplyOfResponse_messageType struct{} - -func (x fastReflection_QuerySupplyOfResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySupplyOfResponse)(nil) -} -func (x fastReflection_QuerySupplyOfResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySupplyOfResponse) -} -func (x fastReflection_QuerySupplyOfResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyOfResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySupplyOfResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyOfResponse -} - -// 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_QuerySupplyOfResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySupplyOfResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySupplyOfResponse) New() protoreflect.Message { - return new(fastReflection_QuerySupplyOfResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySupplyOfResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySupplyOfResponse)(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_QuerySupplyOfResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_QuerySupplyOfResponse_amount, 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_QuerySupplyOfResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfResponse.amount": - return x.Amount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfResponse 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_QuerySupplyOfResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfResponse.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfResponse 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_QuerySupplyOfResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfResponse.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfResponse 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_QuerySupplyOfResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfResponse.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfResponse 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_QuerySupplyOfResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfResponse.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfResponse 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_QuerySupplyOfResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QuerySupplyOfResponse.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QuerySupplyOfResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QuerySupplyOfResponse 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_QuerySupplyOfResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QuerySupplyOfResponse", 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_QuerySupplyOfResponse) 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_QuerySupplyOfResponse) 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_QuerySupplyOfResponse) 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_QuerySupplyOfResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySupplyOfResponse) - 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.Amount != nil { - l = options.Size(x.Amount) - 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().(*QuerySupplyOfResponse) - 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.Amount != nil { - encoded, err := options.Marshal(x.Amount) - 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().(*QuerySupplyOfResponse) - 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: QuerySupplyOfResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySupplyOfResponse: 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 Amount", 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.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); 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_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.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_bank_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_bank_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_bank_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.bank.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.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.bank.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.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.bank.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.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.bank.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.bank.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.bank.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_QueryDenomsMetadataRequest protoreflect.MessageDescriptor - fd_QueryDenomsMetadataRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomsMetadataRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomsMetadataRequest") - fd_QueryDenomsMetadataRequest_pagination = md_QueryDenomsMetadataRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDenomsMetadataRequest)(nil) - -type fastReflection_QueryDenomsMetadataRequest QueryDenomsMetadataRequest - -func (x *QueryDenomsMetadataRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomsMetadataRequest)(x) -} - -func (x *QueryDenomsMetadataRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDenomsMetadataRequest_messageType fastReflection_QueryDenomsMetadataRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomsMetadataRequest_messageType{} - -type fastReflection_QueryDenomsMetadataRequest_messageType struct{} - -func (x fastReflection_QueryDenomsMetadataRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomsMetadataRequest)(nil) -} -func (x fastReflection_QueryDenomsMetadataRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomsMetadataRequest) -} -func (x fastReflection_QueryDenomsMetadataRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomsMetadataRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDenomsMetadataRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomsMetadataRequest -} - -// 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_QueryDenomsMetadataRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomsMetadataRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomsMetadataRequest) New() protoreflect.Message { - return new(fastReflection_QueryDenomsMetadataRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomsMetadataRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDenomsMetadataRequest)(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_QueryDenomsMetadataRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDenomsMetadataRequest_pagination, 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_QueryDenomsMetadataRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataRequest 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_QueryDenomsMetadataRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataRequest 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_QueryDenomsMetadataRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataRequest 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_QueryDenomsMetadataRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataRequest 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_QueryDenomsMetadataRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataRequest 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_QueryDenomsMetadataRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataRequest 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_QueryDenomsMetadataRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomsMetadataRequest", 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_QueryDenomsMetadataRequest) 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_QueryDenomsMetadataRequest) 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_QueryDenomsMetadataRequest) 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_QueryDenomsMetadataRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomsMetadataRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDenomsMetadataRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QueryDenomsMetadataRequest) - 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: QueryDenomsMetadataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomsMetadataRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDenomsMetadataResponse_1_list)(nil) - -type _QueryDenomsMetadataResponse_1_list struct { - list *[]*Metadata -} - -func (x *_QueryDenomsMetadataResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDenomsMetadataResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDenomsMetadataResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Metadata) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDenomsMetadataResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Metadata) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDenomsMetadataResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Metadata) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDenomsMetadataResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDenomsMetadataResponse_1_list) NewElement() protoreflect.Value { - v := new(Metadata) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDenomsMetadataResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDenomsMetadataResponse protoreflect.MessageDescriptor - fd_QueryDenomsMetadataResponse_metadatas protoreflect.FieldDescriptor - fd_QueryDenomsMetadataResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomsMetadataResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomsMetadataResponse") - fd_QueryDenomsMetadataResponse_metadatas = md_QueryDenomsMetadataResponse.Fields().ByName("metadatas") - fd_QueryDenomsMetadataResponse_pagination = md_QueryDenomsMetadataResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDenomsMetadataResponse)(nil) - -type fastReflection_QueryDenomsMetadataResponse QueryDenomsMetadataResponse - -func (x *QueryDenomsMetadataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomsMetadataResponse)(x) -} - -func (x *QueryDenomsMetadataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDenomsMetadataResponse_messageType fastReflection_QueryDenomsMetadataResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomsMetadataResponse_messageType{} - -type fastReflection_QueryDenomsMetadataResponse_messageType struct{} - -func (x fastReflection_QueryDenomsMetadataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomsMetadataResponse)(nil) -} -func (x fastReflection_QueryDenomsMetadataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomsMetadataResponse) -} -func (x fastReflection_QueryDenomsMetadataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomsMetadataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDenomsMetadataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomsMetadataResponse -} - -// 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_QueryDenomsMetadataResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomsMetadataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomsMetadataResponse) New() protoreflect.Message { - return new(fastReflection_QueryDenomsMetadataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomsMetadataResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDenomsMetadataResponse)(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_QueryDenomsMetadataResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Metadatas) != 0 { - value := protoreflect.ValueOfList(&_QueryDenomsMetadataResponse_1_list{list: &x.Metadatas}) - if !f(fd_QueryDenomsMetadataResponse_metadatas, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDenomsMetadataResponse_pagination, 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_QueryDenomsMetadataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas": - return len(x.Metadatas) != 0 - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataResponse 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_QueryDenomsMetadataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas": - x.Metadatas = nil - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataResponse 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_QueryDenomsMetadataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas": - if len(x.Metadatas) == 0 { - return protoreflect.ValueOfList(&_QueryDenomsMetadataResponse_1_list{}) - } - listValue := &_QueryDenomsMetadataResponse_1_list{list: &x.Metadatas} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataResponse 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_QueryDenomsMetadataResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas": - lv := value.List() - clv := lv.(*_QueryDenomsMetadataResponse_1_list) - x.Metadatas = *clv.list - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataResponse 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_QueryDenomsMetadataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas": - if x.Metadatas == nil { - x.Metadatas = []*Metadata{} - } - value := &_QueryDenomsMetadataResponse_1_list{list: &x.Metadatas} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataResponse 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_QueryDenomsMetadataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas": - list := []*Metadata{} - return protoreflect.ValueOfList(&_QueryDenomsMetadataResponse_1_list{list: &list}) - case "cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination": - m := new(v1beta11.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomsMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomsMetadataResponse 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_QueryDenomsMetadataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomsMetadataResponse", 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_QueryDenomsMetadataResponse) 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_QueryDenomsMetadataResponse) 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_QueryDenomsMetadataResponse) 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_QueryDenomsMetadataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomsMetadataResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Metadatas) > 0 { - for _, e := range x.Metadatas { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDenomsMetadataResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Metadatas) > 0 { - for iNdEx := len(x.Metadatas) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Metadatas[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomsMetadataResponse) - 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: QueryDenomsMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomsMetadataResponse: 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 Metadatas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Metadatas = append(x.Metadatas, &Metadata{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadatas[len(x.Metadatas)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryDenomMetadataRequest protoreflect.MessageDescriptor - fd_QueryDenomMetadataRequest_denom protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomMetadataRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomMetadataRequest") - fd_QueryDenomMetadataRequest_denom = md_QueryDenomMetadataRequest.Fields().ByName("denom") -} - -var _ protoreflect.Message = (*fastReflection_QueryDenomMetadataRequest)(nil) - -type fastReflection_QueryDenomMetadataRequest QueryDenomMetadataRequest - -func (x *QueryDenomMetadataRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomMetadataRequest)(x) -} - -func (x *QueryDenomMetadataRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDenomMetadataRequest_messageType fastReflection_QueryDenomMetadataRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomMetadataRequest_messageType{} - -type fastReflection_QueryDenomMetadataRequest_messageType struct{} - -func (x fastReflection_QueryDenomMetadataRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomMetadataRequest)(nil) -} -func (x fastReflection_QueryDenomMetadataRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomMetadataRequest) -} -func (x fastReflection_QueryDenomMetadataRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomMetadataRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDenomMetadataRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomMetadataRequest -} - -// 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_QueryDenomMetadataRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomMetadataRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomMetadataRequest) New() protoreflect.Message { - return new(fastReflection_QueryDenomMetadataRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomMetadataRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDenomMetadataRequest)(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_QueryDenomMetadataRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_QueryDenomMetadataRequest_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDenomMetadataRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataRequest.denom": - return x.Denom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataRequest 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_QueryDenomMetadataRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataRequest.denom": - x.Denom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataRequest 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_QueryDenomMetadataRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataRequest.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataRequest 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_QueryDenomMetadataRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataRequest.denom": - x.Denom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataRequest 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_QueryDenomMetadataRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataRequest.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryDenomMetadataRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataRequest 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_QueryDenomMetadataRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataRequest.denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataRequest 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_QueryDenomMetadataRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomMetadataRequest", 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_QueryDenomMetadataRequest) 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_QueryDenomMetadataRequest) 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_QueryDenomMetadataRequest) 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_QueryDenomMetadataRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomMetadataRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomMetadataRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomMetadataRequest) - 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: QueryDenomMetadataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDenomMetadataResponse protoreflect.MessageDescriptor - fd_QueryDenomMetadataResponse_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomMetadataResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomMetadataResponse") - fd_QueryDenomMetadataResponse_metadata = md_QueryDenomMetadataResponse.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_QueryDenomMetadataResponse)(nil) - -type fastReflection_QueryDenomMetadataResponse QueryDenomMetadataResponse - -func (x *QueryDenomMetadataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomMetadataResponse)(x) -} - -func (x *QueryDenomMetadataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDenomMetadataResponse_messageType fastReflection_QueryDenomMetadataResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomMetadataResponse_messageType{} - -type fastReflection_QueryDenomMetadataResponse_messageType struct{} - -func (x fastReflection_QueryDenomMetadataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomMetadataResponse)(nil) -} -func (x fastReflection_QueryDenomMetadataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomMetadataResponse) -} -func (x fastReflection_QueryDenomMetadataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomMetadataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDenomMetadataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomMetadataResponse -} - -// 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_QueryDenomMetadataResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomMetadataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomMetadataResponse) New() protoreflect.Message { - return new(fastReflection_QueryDenomMetadataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomMetadataResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDenomMetadataResponse)(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_QueryDenomMetadataResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_QueryDenomMetadataResponse_metadata, 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_QueryDenomMetadataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata": - return x.Metadata != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataResponse 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_QueryDenomMetadataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata": - x.Metadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataResponse 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_QueryDenomMetadataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataResponse 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_QueryDenomMetadataResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata": - x.Metadata = value.Message().Interface().(*Metadata) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataResponse 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_QueryDenomMetadataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataResponse 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_QueryDenomMetadataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomMetadataResponse 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_QueryDenomMetadataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomMetadataResponse", 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_QueryDenomMetadataResponse) 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_QueryDenomMetadataResponse) 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_QueryDenomMetadataResponse) 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_QueryDenomMetadataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomMetadataResponse) - 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.Metadata != nil { - l = options.Size(x.Metadata) - 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().(*QueryDenomMetadataResponse) - 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.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - 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().(*QueryDenomMetadataResponse) - 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: QueryDenomMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomMetadataResponse: 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 Metadata", 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.Metadata == nil { - x.Metadata = &Metadata{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); 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_QueryDenomOwnersRequest protoreflect.MessageDescriptor - fd_QueryDenomOwnersRequest_denom protoreflect.FieldDescriptor - fd_QueryDenomOwnersRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomOwnersRequest = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersRequest") - fd_QueryDenomOwnersRequest_denom = md_QueryDenomOwnersRequest.Fields().ByName("denom") - fd_QueryDenomOwnersRequest_pagination = md_QueryDenomOwnersRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersRequest)(nil) - -type fastReflection_QueryDenomOwnersRequest QueryDenomOwnersRequest - -func (x *QueryDenomOwnersRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersRequest)(x) -} - -func (x *QueryDenomOwnersRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDenomOwnersRequest_messageType fastReflection_QueryDenomOwnersRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersRequest_messageType{} - -type fastReflection_QueryDenomOwnersRequest_messageType struct{} - -func (x fastReflection_QueryDenomOwnersRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersRequest)(nil) -} -func (x fastReflection_QueryDenomOwnersRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersRequest) -} -func (x fastReflection_QueryDenomOwnersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDenomOwnersRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersRequest -} - -// 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_QueryDenomOwnersRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomOwnersRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomOwnersRequest) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomOwnersRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDenomOwnersRequest)(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_QueryDenomOwnersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_QueryDenomOwnersRequest_denom, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDenomOwnersRequest_pagination, 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_QueryDenomOwnersRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - return x.Denom != "" - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - x.Denom = "" - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - x.Denom = value.Interface().(string) - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.QueryDenomOwnersRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.denom": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersRequest")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersRequest 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_QueryDenomOwnersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersRequest", 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_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) 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_QueryDenomOwnersRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomOwnersRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDenomOwnersRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomOwnersRequest) - 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: QueryDenomOwnersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_DenomOwner protoreflect.MessageDescriptor - fd_DenomOwner_address protoreflect.FieldDescriptor - fd_DenomOwner_balance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_DenomOwner = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("DenomOwner") - fd_DenomOwner_address = md_DenomOwner.Fields().ByName("address") - fd_DenomOwner_balance = md_DenomOwner.Fields().ByName("balance") -} - -var _ protoreflect.Message = (*fastReflection_DenomOwner)(nil) - -type fastReflection_DenomOwner DenomOwner - -func (x *DenomOwner) ProtoReflect() protoreflect.Message { - return (*fastReflection_DenomOwner)(x) -} - -func (x *DenomOwner) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DenomOwner_messageType fastReflection_DenomOwner_messageType -var _ protoreflect.MessageType = fastReflection_DenomOwner_messageType{} - -type fastReflection_DenomOwner_messageType struct{} - -func (x fastReflection_DenomOwner_messageType) Zero() protoreflect.Message { - return (*fastReflection_DenomOwner)(nil) -} -func (x fastReflection_DenomOwner_messageType) New() protoreflect.Message { - return new(fastReflection_DenomOwner) -} -func (x fastReflection_DenomOwner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DenomOwner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DenomOwner) Descriptor() protoreflect.MessageDescriptor { - return md_DenomOwner -} - -// 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_DenomOwner) Type() protoreflect.MessageType { - return _fastReflection_DenomOwner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DenomOwner) New() protoreflect.Message { - return new(fastReflection_DenomOwner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DenomOwner) Interface() protoreflect.ProtoMessage { - return (*DenomOwner)(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_DenomOwner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_DenomOwner_address, value) { - return - } - } - if x.Balance != nil { - value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - if !f(fd_DenomOwner_balance, 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_DenomOwner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - return x.Address != "" - case "cosmos.bank.v1beta1.DenomOwner.balance": - return x.Balance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - x.Address = "" - case "cosmos.bank.v1beta1.DenomOwner.balance": - x.Balance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.DenomOwner.balance": - value := x.Balance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - x.Address = value.Interface().(string) - case "cosmos.bank.v1beta1.DenomOwner.balance": - x.Balance = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.balance": - if x.Balance == nil { - x.Balance = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - case "cosmos.bank.v1beta1.DenomOwner.address": - panic(fmt.Errorf("field address of message cosmos.bank.v1beta1.DenomOwner is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.DenomOwner.address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.DenomOwner.balance": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.DenomOwner")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.DenomOwner 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_DenomOwner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.DenomOwner", 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_DenomOwner) 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_DenomOwner) 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_DenomOwner) 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_DenomOwner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DenomOwner) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Balance != nil { - l = options.Size(x.Balance) - 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().(*DenomOwner) - 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.Balance != nil { - encoded, err := options.Marshal(x.Balance) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DenomOwner) - 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: DenomOwner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DenomOwner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance == nil { - x.Balance = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDenomOwnersResponse_1_list)(nil) - -type _QueryDenomOwnersResponse_1_list struct { - list *[]*DenomOwner -} - -func (x *_QueryDenomOwnersResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDenomOwnersResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDenomOwnersResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DenomOwner) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDenomOwnersResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DenomOwner) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDenomOwnersResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DenomOwner) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDenomOwnersResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDenomOwnersResponse_1_list) NewElement() protoreflect.Value { - v := new(DenomOwner) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDenomOwnersResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDenomOwnersResponse protoreflect.MessageDescriptor - fd_QueryDenomOwnersResponse_denom_owners protoreflect.FieldDescriptor - fd_QueryDenomOwnersResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_query_proto_init() - md_QueryDenomOwnersResponse = File_cosmos_bank_v1beta1_query_proto.Messages().ByName("QueryDenomOwnersResponse") - fd_QueryDenomOwnersResponse_denom_owners = md_QueryDenomOwnersResponse.Fields().ByName("denom_owners") - fd_QueryDenomOwnersResponse_pagination = md_QueryDenomOwnersResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDenomOwnersResponse)(nil) - -type fastReflection_QueryDenomOwnersResponse QueryDenomOwnersResponse - -func (x *QueryDenomOwnersResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersResponse)(x) -} - -func (x *QueryDenomOwnersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDenomOwnersResponse_messageType fastReflection_QueryDenomOwnersResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDenomOwnersResponse_messageType{} - -type fastReflection_QueryDenomOwnersResponse_messageType struct{} - -func (x fastReflection_QueryDenomOwnersResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDenomOwnersResponse)(nil) -} -func (x fastReflection_QueryDenomOwnersResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersResponse) -} -func (x fastReflection_QueryDenomOwnersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDenomOwnersResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDenomOwnersResponse -} - -// 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_QueryDenomOwnersResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDenomOwnersResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDenomOwnersResponse) New() protoreflect.Message { - return new(fastReflection_QueryDenomOwnersResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDenomOwnersResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDenomOwnersResponse)(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_QueryDenomOwnersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.DenomOwners) != 0 { - value := protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners}) - if !f(fd_QueryDenomOwnersResponse_denom_owners, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDenomOwnersResponse_pagination, 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_QueryDenomOwnersResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": - return len(x.DenomOwners) != 0 - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": - x.DenomOwners = nil - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": - if len(x.DenomOwners) == 0 { - return protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{}) - } - listValue := &_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": - lv := value.List() - clv := lv.(*_QueryDenomOwnersResponse_1_list) - x.DenomOwners = *clv.list - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": - if x.DenomOwners == nil { - x.DenomOwners = []*DenomOwner{} - } - value := &_QueryDenomOwnersResponse_1_list{list: &x.DenomOwners} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners": - list := []*DenomOwner{} - return protoreflect.ValueOfList(&_QueryDenomOwnersResponse_1_list{list: &list}) - case "cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination": - m := new(v1beta11.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.QueryDenomOwnersResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.QueryDenomOwnersResponse 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_QueryDenomOwnersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.QueryDenomOwnersResponse", 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_QueryDenomOwnersResponse) 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_QueryDenomOwnersResponse) 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_QueryDenomOwnersResponse) 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_QueryDenomOwnersResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDenomOwnersResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.DenomOwners) > 0 { - for _, e := range x.DenomOwners { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDenomOwnersResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DenomOwners) > 0 { - for iNdEx := len(x.DenomOwners) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DenomOwners[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDenomOwnersResponse) - 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: QueryDenomOwnersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDenomOwnersResponse: 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 DenomOwners", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DenomOwners = append(x.DenomOwners, &DenomOwner{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DenomOwners[len(x.DenomOwners)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/bank/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryBalanceRequest is the request type for the Query/Balance RPC method. -type QueryBalanceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the address to query balances for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // denom is the coin denom to query balances for. - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (x *QueryBalanceRequest) Reset() { - *x = QueryBalanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryBalanceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryBalanceRequest) ProtoMessage() {} - -// Deprecated: Use QueryBalanceRequest.ProtoReflect.Descriptor instead. -func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryBalanceRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QueryBalanceRequest) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -type QueryBalanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // balance is the balance of the coin. - Balance *v1beta1.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (x *QueryBalanceResponse) Reset() { - *x = QueryBalanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryBalanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryBalanceResponse) ProtoMessage() {} - -// Deprecated: Use QueryBalanceResponse.ProtoReflect.Descriptor instead. -func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryBalanceResponse) GetBalance() *v1beta1.Coin { - if x != nil { - return x.Balance - } - return nil -} - -// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -type QueryAllBalancesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the address to query balances for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta11.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllBalancesRequest) Reset() { - *x = QueryAllBalancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllBalancesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllBalancesRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllBalancesRequest.ProtoReflect.Descriptor instead. -func (*QueryAllBalancesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAllBalancesRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QueryAllBalancesRequest) GetPagination() *v1beta11.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -type QueryAllBalancesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // balances is the balances of all the coins. - Balances []*v1beta1.Coin `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllBalancesResponse) Reset() { - *x = QueryAllBalancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllBalancesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllBalancesResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllBalancesResponse.ProtoReflect.Descriptor instead. -func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryAllBalancesResponse) GetBalances() []*v1beta1.Coin { - if x != nil { - return x.Balances - } - return nil -} - -func (x *QueryAllBalancesResponse) GetPagination() *v1beta11.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySpendableBalancesRequest defines the gRPC request structure for querying -// an account's spendable balances. -type QuerySpendableBalancesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the address to query spendable balances for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta11.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySpendableBalancesRequest) Reset() { - *x = QuerySpendableBalancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySpendableBalancesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySpendableBalancesRequest) ProtoMessage() {} - -// Deprecated: Use QuerySpendableBalancesRequest.ProtoReflect.Descriptor instead. -func (*QuerySpendableBalancesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QuerySpendableBalancesRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QuerySpendableBalancesRequest) GetPagination() *v1beta11.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for querying -// an account's spendable balances. -type QuerySpendableBalancesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // balances is the spendable balances of all the coins. - Balances []*v1beta1.Coin `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySpendableBalancesResponse) Reset() { - *x = QuerySpendableBalancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySpendableBalancesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySpendableBalancesResponse) ProtoMessage() {} - -// Deprecated: Use QuerySpendableBalancesResponse.ProtoReflect.Descriptor instead. -func (*QuerySpendableBalancesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QuerySpendableBalancesResponse) GetBalances() []*v1beta1.Coin { - if x != nil { - return x.Balances - } - return nil -} - -func (x *QuerySpendableBalancesResponse) GetPagination() *v1beta11.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -// method. -type QueryTotalSupplyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - // - // Since: cosmos-sdk 0.43 - Pagination *v1beta11.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryTotalSupplyRequest) Reset() { - *x = QueryTotalSupplyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTotalSupplyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTotalSupplyRequest) ProtoMessage() {} - -// Deprecated: Use QueryTotalSupplyRequest.ProtoReflect.Descriptor instead. -func (*QueryTotalSupplyRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryTotalSupplyRequest) GetPagination() *v1beta11.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -type QueryTotalSupplyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // supply is the supply of the coins - Supply []*v1beta1.Coin `protobuf:"bytes,1,rep,name=supply,proto3" json:"supply,omitempty"` - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryTotalSupplyResponse) Reset() { - *x = QueryTotalSupplyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTotalSupplyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTotalSupplyResponse) ProtoMessage() {} - -// Deprecated: Use QueryTotalSupplyResponse.ProtoReflect.Descriptor instead. -func (*QueryTotalSupplyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryTotalSupplyResponse) GetSupply() []*v1beta1.Coin { - if x != nil { - return x.Supply - } - return nil -} - -func (x *QueryTotalSupplyResponse) GetPagination() *v1beta11.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -type QuerySupplyOfRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // denom is the coin denom to query balances for. - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (x *QuerySupplyOfRequest) Reset() { - *x = QuerySupplyOfRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySupplyOfRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySupplyOfRequest) ProtoMessage() {} - -// Deprecated: Use QuerySupplyOfRequest.ProtoReflect.Descriptor instead. -func (*QuerySupplyOfRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QuerySupplyOfRequest) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -type QuerySupplyOfResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // amount is the supply of the coin. - Amount *v1beta1.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *QuerySupplyOfResponse) Reset() { - *x = QuerySupplyOfResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySupplyOfResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySupplyOfResponse) ProtoMessage() {} - -// Deprecated: Use QuerySupplyOfResponse.ProtoReflect.Descriptor instead. -func (*QuerySupplyOfResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QuerySupplyOfResponse) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// QueryParamsRequest defines the request type for querying x/bank parameters. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -type QueryDenomsMetadataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - Pagination *v1beta11.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDenomsMetadataRequest) Reset() { - *x = QueryDenomsMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDenomsMetadataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDenomsMetadataRequest) ProtoMessage() {} - -// Deprecated: Use QueryDenomsMetadataRequest.ProtoReflect.Descriptor instead. -func (*QueryDenomsMetadataRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryDenomsMetadataRequest) GetPagination() *v1beta11.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -// method. -type QueryDenomsMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // metadata provides the client information for all the registered tokens. - Metadatas []*Metadata `protobuf:"bytes,1,rep,name=metadatas,proto3" json:"metadatas,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDenomsMetadataResponse) Reset() { - *x = QueryDenomsMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDenomsMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDenomsMetadataResponse) ProtoMessage() {} - -// Deprecated: Use QueryDenomsMetadataResponse.ProtoReflect.Descriptor instead. -func (*QueryDenomsMetadataResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryDenomsMetadataResponse) GetMetadatas() []*Metadata { - if x != nil { - return x.Metadatas - } - return nil -} - -func (x *QueryDenomsMetadataResponse) GetPagination() *v1beta11.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -type QueryDenomMetadataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // denom is the coin denom to query the metadata for. - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (x *QueryDenomMetadataRequest) Reset() { - *x = QueryDenomMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDenomMetadataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDenomMetadataRequest) ProtoMessage() {} - -// Deprecated: Use QueryDenomMetadataRequest.ProtoReflect.Descriptor instead. -func (*QueryDenomMetadataRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryDenomMetadataRequest) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -// method. -type QueryDenomMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // metadata describes and provides all the client information for the requested token. - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *QueryDenomMetadataResponse) Reset() { - *x = QueryDenomMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDenomMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDenomMetadataResponse) ProtoMessage() {} - -// Deprecated: Use QueryDenomMetadataResponse.ProtoReflect.Descriptor instead. -func (*QueryDenomMetadataResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryDenomMetadataResponse) GetMetadata() *Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -// which queries for a paginated set of all account holders of a particular -// denomination. -type QueryDenomOwnersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // denom defines the coin denomination to query all account holders for. - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta11.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDenomOwnersRequest) Reset() { - *x = QueryDenomOwnersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDenomOwnersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDenomOwnersRequest) ProtoMessage() {} - -// Deprecated: Use QueryDenomOwnersRequest.ProtoReflect.Descriptor instead. -func (*QueryDenomOwnersRequest) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryDenomOwnersRequest) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *QueryDenomOwnersRequest) GetPagination() *v1beta11.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// DenomOwner defines structure representing an account that owns or holds a -// particular denominated token. It contains the account address and account -// balance of the denominated token. -type DenomOwner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address defines the address that owns a particular denomination. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // balance is the balance of the denominated coin for an account. - Balance *v1beta1.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (x *DenomOwner) Reset() { - *x = DenomOwner{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DenomOwner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DenomOwner) ProtoMessage() {} - -// Deprecated: Use DenomOwner.ProtoReflect.Descriptor instead. -func (*DenomOwner) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *DenomOwner) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *DenomOwner) GetBalance() *v1beta1.Coin { - if x != nil { - return x.Balance - } - return nil -} - -// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -type QueryDenomOwnersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DenomOwners []*DenomOwner `protobuf:"bytes,1,rep,name=denom_owners,json=denomOwners,proto3" json:"denom_owners,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDenomOwnersResponse) Reset() { - *x = QueryDenomOwnersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDenomOwnersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDenomOwnersResponse) ProtoMessage() {} - -// Deprecated: Use QueryDenomOwnersResponse.ProtoReflect.Descriptor instead. -func (*QueryDenomOwnersResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryDenomOwnersResponse) GetDenomOwners() []*DenomOwner { - if x != nil { - return x.DenomOwners - } - return nil -} - -func (x *QueryDenomOwnersResponse) GetPagination() *v1beta11.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_bank_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_bank_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x69, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 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, 0x12, 0x14, 0x0a, 0x05, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x4b, 0x0a, 0x14, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x17, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 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, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xcc, 0x01, 0x0a, 0x18, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x01, 0x0a, 0x1d, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x73, 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, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x00, 0x22, 0xd2, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, - 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xc8, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x63, 0x0a, 0x06, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, - 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x2c, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x50, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 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, 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, 0x62, 0x61, 0x6e, 0x6b, 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, 0x64, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa9, 0x01, - 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, - 0x09, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, - 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x31, 0x0a, 0x19, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x5d, 0x0a, 0x1a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x77, 0x0a, 0x17, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0x0a, 0x0a, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 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, 0x12, 0x39, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, - 0x0a, 0x0c, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x8e, 0x0b, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x98, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x12, 0x9b, 0x01, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb7, - 0x01, 0x0a, 0x11, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x6e, - 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x8f, 0x01, 0x0a, 0x08, 0x53, - 0x75, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, - 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x70, - 0x70, 0x6c, 0x79, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x80, 0x01, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x6e, 0x6b, 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, 0x62, 0x61, 0x6e, 0x6b, 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, 0x23, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0xa6, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x9d, 0x01, 0x0a, - 0x0b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x42, 0xd5, 0x01, 0x0a, - 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, - 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, - 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 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, 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_bank_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_bank_v1beta1_query_proto_rawDescData = file_cosmos_bank_v1beta1_query_proto_rawDesc -) - -func file_cosmos_bank_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_bank_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_bank_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_bank_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_bank_v1beta1_query_proto_rawDescData -} - -var file_cosmos_bank_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_cosmos_bank_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryBalanceRequest)(nil), // 0: cosmos.bank.v1beta1.QueryBalanceRequest - (*QueryBalanceResponse)(nil), // 1: cosmos.bank.v1beta1.QueryBalanceResponse - (*QueryAllBalancesRequest)(nil), // 2: cosmos.bank.v1beta1.QueryAllBalancesRequest - (*QueryAllBalancesResponse)(nil), // 3: cosmos.bank.v1beta1.QueryAllBalancesResponse - (*QuerySpendableBalancesRequest)(nil), // 4: cosmos.bank.v1beta1.QuerySpendableBalancesRequest - (*QuerySpendableBalancesResponse)(nil), // 5: cosmos.bank.v1beta1.QuerySpendableBalancesResponse - (*QueryTotalSupplyRequest)(nil), // 6: cosmos.bank.v1beta1.QueryTotalSupplyRequest - (*QueryTotalSupplyResponse)(nil), // 7: cosmos.bank.v1beta1.QueryTotalSupplyResponse - (*QuerySupplyOfRequest)(nil), // 8: cosmos.bank.v1beta1.QuerySupplyOfRequest - (*QuerySupplyOfResponse)(nil), // 9: cosmos.bank.v1beta1.QuerySupplyOfResponse - (*QueryParamsRequest)(nil), // 10: cosmos.bank.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 11: cosmos.bank.v1beta1.QueryParamsResponse - (*QueryDenomsMetadataRequest)(nil), // 12: cosmos.bank.v1beta1.QueryDenomsMetadataRequest - (*QueryDenomsMetadataResponse)(nil), // 13: cosmos.bank.v1beta1.QueryDenomsMetadataResponse - (*QueryDenomMetadataRequest)(nil), // 14: cosmos.bank.v1beta1.QueryDenomMetadataRequest - (*QueryDenomMetadataResponse)(nil), // 15: cosmos.bank.v1beta1.QueryDenomMetadataResponse - (*QueryDenomOwnersRequest)(nil), // 16: cosmos.bank.v1beta1.QueryDenomOwnersRequest - (*DenomOwner)(nil), // 17: cosmos.bank.v1beta1.DenomOwner - (*QueryDenomOwnersResponse)(nil), // 18: cosmos.bank.v1beta1.QueryDenomOwnersResponse - (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin - (*v1beta11.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest - (*v1beta11.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 22: cosmos.bank.v1beta1.Params - (*Metadata)(nil), // 23: cosmos.bank.v1beta1.Metadata -} -var file_cosmos_bank_v1beta1_query_proto_depIdxs = []int32{ - 19, // 0: cosmos.bank.v1beta1.QueryBalanceResponse.balance:type_name -> cosmos.base.v1beta1.Coin - 20, // 1: cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 2: cosmos.bank.v1beta1.QueryAllBalancesResponse.balances:type_name -> cosmos.base.v1beta1.Coin - 21, // 3: cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 20, // 4: cosmos.bank.v1beta1.QuerySpendableBalancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 5: cosmos.bank.v1beta1.QuerySpendableBalancesResponse.balances:type_name -> cosmos.base.v1beta1.Coin - 21, // 6: cosmos.bank.v1beta1.QuerySpendableBalancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 20, // 7: cosmos.bank.v1beta1.QueryTotalSupplyRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 8: cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply:type_name -> cosmos.base.v1beta1.Coin - 21, // 9: cosmos.bank.v1beta1.QueryTotalSupplyResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 10: cosmos.bank.v1beta1.QuerySupplyOfResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 22, // 11: cosmos.bank.v1beta1.QueryParamsResponse.params:type_name -> cosmos.bank.v1beta1.Params - 20, // 12: cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 13: cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas:type_name -> cosmos.bank.v1beta1.Metadata - 21, // 14: cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 23, // 15: cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata:type_name -> cosmos.bank.v1beta1.Metadata - 20, // 16: cosmos.bank.v1beta1.QueryDenomOwnersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 17: cosmos.bank.v1beta1.DenomOwner.balance:type_name -> cosmos.base.v1beta1.Coin - 17, // 18: cosmos.bank.v1beta1.QueryDenomOwnersResponse.denom_owners:type_name -> cosmos.bank.v1beta1.DenomOwner - 21, // 19: cosmos.bank.v1beta1.QueryDenomOwnersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 20: cosmos.bank.v1beta1.Query.Balance:input_type -> cosmos.bank.v1beta1.QueryBalanceRequest - 2, // 21: cosmos.bank.v1beta1.Query.AllBalances:input_type -> cosmos.bank.v1beta1.QueryAllBalancesRequest - 4, // 22: cosmos.bank.v1beta1.Query.SpendableBalances:input_type -> cosmos.bank.v1beta1.QuerySpendableBalancesRequest - 6, // 23: cosmos.bank.v1beta1.Query.TotalSupply:input_type -> cosmos.bank.v1beta1.QueryTotalSupplyRequest - 8, // 24: cosmos.bank.v1beta1.Query.SupplyOf:input_type -> cosmos.bank.v1beta1.QuerySupplyOfRequest - 10, // 25: cosmos.bank.v1beta1.Query.Params:input_type -> cosmos.bank.v1beta1.QueryParamsRequest - 14, // 26: cosmos.bank.v1beta1.Query.DenomMetadata:input_type -> cosmos.bank.v1beta1.QueryDenomMetadataRequest - 12, // 27: cosmos.bank.v1beta1.Query.DenomsMetadata:input_type -> cosmos.bank.v1beta1.QueryDenomsMetadataRequest - 16, // 28: cosmos.bank.v1beta1.Query.DenomOwners:input_type -> cosmos.bank.v1beta1.QueryDenomOwnersRequest - 1, // 29: cosmos.bank.v1beta1.Query.Balance:output_type -> cosmos.bank.v1beta1.QueryBalanceResponse - 3, // 30: cosmos.bank.v1beta1.Query.AllBalances:output_type -> cosmos.bank.v1beta1.QueryAllBalancesResponse - 5, // 31: cosmos.bank.v1beta1.Query.SpendableBalances:output_type -> cosmos.bank.v1beta1.QuerySpendableBalancesResponse - 7, // 32: cosmos.bank.v1beta1.Query.TotalSupply:output_type -> cosmos.bank.v1beta1.QueryTotalSupplyResponse - 9, // 33: cosmos.bank.v1beta1.Query.SupplyOf:output_type -> cosmos.bank.v1beta1.QuerySupplyOfResponse - 11, // 34: cosmos.bank.v1beta1.Query.Params:output_type -> cosmos.bank.v1beta1.QueryParamsResponse - 15, // 35: cosmos.bank.v1beta1.Query.DenomMetadata:output_type -> cosmos.bank.v1beta1.QueryDenomMetadataResponse - 13, // 36: cosmos.bank.v1beta1.Query.DenomsMetadata:output_type -> cosmos.bank.v1beta1.QueryDenomsMetadataResponse - 18, // 37: cosmos.bank.v1beta1.Query.DenomOwners:output_type -> cosmos.bank.v1beta1.QueryDenomOwnersResponse - 29, // [29:38] is the sub-list for method output_type - 20, // [20:29] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_cosmos_bank_v1beta1_query_proto_init() } -func file_cosmos_bank_v1beta1_query_proto_init() { - if File_cosmos_bank_v1beta1_query_proto != nil { - return - } - file_cosmos_bank_v1beta1_bank_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_bank_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBalanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBalanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllBalancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllBalancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySpendableBalancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySpendableBalancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTotalSupplyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTotalSupplyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySupplyOfRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySupplyOfResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomsMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomsMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomOwnersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DenomOwner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomOwnersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_bank_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_bank_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_bank_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_bank_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_bank_v1beta1_query_proto = out.File - file_cosmos_bank_v1beta1_query_proto_rawDesc = nil - file_cosmos_bank_v1beta1_query_proto_goTypes = nil - file_cosmos_bank_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/bank/v1beta1/query_grpc.pb.go b/api/cosmos/bank/v1beta1/query_grpc.pb.go deleted file mode 100644 index 6d46447f1ae7..000000000000 --- a/api/cosmos/bank/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,417 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/bank/v1beta1/query.proto - -package bankv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Balance queries the balance of a single coin for a single account. - Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) - // AllBalances queries the balance of all coins for a single account. - AllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) - // SpendableBalances queries the spenable balance of all coins for a single - // account. - SpendableBalances(ctx context.Context, in *QuerySpendableBalancesRequest, opts ...grpc.CallOption) (*QuerySpendableBalancesResponse, error) - // TotalSupply queries the total supply of all coins. - TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, error) - // SupplyOf queries the supply of a single coin. - SupplyOf(ctx context.Context, in *QuerySupplyOfRequest, opts ...grpc.CallOption) (*QuerySupplyOfResponse, error) - // Params queries the parameters of x/bank module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // DenomsMetadata queries the client metadata of a given coin denomination. - DenomMetadata(ctx context.Context, in *QueryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) - // DenomsMetadata queries the client metadata for all registered coin - // denominations. - DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) - // DenomOwners queries for all account addresses that own a particular token - // denomination. - DenomOwners(ctx context.Context, in *QueryDenomOwnersRequest, opts ...grpc.CallOption) (*QueryDenomOwnersResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { - out := new(QueryBalanceResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/Balance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { - out := new(QueryAllBalancesResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/AllBalances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SpendableBalances(ctx context.Context, in *QuerySpendableBalancesRequest, opts ...grpc.CallOption) (*QuerySpendableBalancesResponse, error) { - out := new(QuerySpendableBalancesResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/SpendableBalances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, error) { - out := new(QueryTotalSupplyResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/TotalSupply", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SupplyOf(ctx context.Context, in *QuerySupplyOfRequest, opts ...grpc.CallOption) (*QuerySupplyOfResponse, error) { - out := new(QuerySupplyOfResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/SupplyOf", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DenomMetadata(ctx context.Context, in *QueryDenomMetadataRequest, opts ...grpc.CallOption) (*QueryDenomMetadataResponse, error) { - out := new(QueryDenomMetadataResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) { - out := new(QueryDenomsMetadataResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomsMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DenomOwners(ctx context.Context, in *QueryDenomOwnersRequest, opts ...grpc.CallOption) (*QueryDenomOwnersResponse, error) { - out := new(QueryDenomOwnersResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/DenomOwners", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Balance queries the balance of a single coin for a single account. - Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) - // AllBalances queries the balance of all coins for a single account. - AllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) - // SpendableBalances queries the spenable balance of all coins for a single - // account. - SpendableBalances(context.Context, *QuerySpendableBalancesRequest) (*QuerySpendableBalancesResponse, error) - // TotalSupply queries the total supply of all coins. - TotalSupply(context.Context, *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error) - // SupplyOf queries the supply of a single coin. - SupplyOf(context.Context, *QuerySupplyOfRequest) (*QuerySupplyOfResponse, error) - // Params queries the parameters of x/bank module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // DenomsMetadata queries the client metadata of a given coin denomination. - DenomMetadata(context.Context, *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) - // DenomsMetadata queries the client metadata for all registered coin - // denominations. - DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) - // DenomOwners queries for all account addresses that own a particular token - // denomination. - DenomOwners(context.Context, *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") -} -func (UnimplementedQueryServer) AllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllBalances not implemented") -} -func (UnimplementedQueryServer) SpendableBalances(context.Context, *QuerySpendableBalancesRequest) (*QuerySpendableBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpendableBalances not implemented") -} -func (UnimplementedQueryServer) TotalSupply(context.Context, *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TotalSupply not implemented") -} -func (UnimplementedQueryServer) SupplyOf(context.Context, *QuerySupplyOfRequest) (*QuerySupplyOfResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SupplyOf not implemented") -} -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) DenomMetadata(context.Context, *QueryDenomMetadataRequest) (*QueryDenomMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomMetadata not implemented") -} -func (UnimplementedQueryServer) DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomsMetadata not implemented") -} -func (UnimplementedQueryServer) DenomOwners(context.Context, *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomOwners not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBalanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Balance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/Balance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllBalancesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllBalances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/AllBalances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllBalances(ctx, req.(*QueryAllBalancesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SpendableBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySpendableBalancesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SpendableBalances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/SpendableBalances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SpendableBalances(ctx, req.(*QuerySpendableBalancesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TotalSupply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTotalSupplyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TotalSupply(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/TotalSupply", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TotalSupply(ctx, req.(*QueryTotalSupplyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SupplyOf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySupplyOfRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SupplyOf(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/SupplyOf", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SupplyOf(ctx, req.(*QuerySupplyOfRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DenomMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDenomMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/DenomMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomMetadata(ctx, req.(*QueryDenomMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DenomsMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDenomsMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomsMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/DenomsMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomsMetadata(ctx, req.(*QueryDenomsMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DenomOwners_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDenomOwnersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomOwners(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Query/DenomOwners", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomOwners(ctx, req.(*QueryDenomOwnersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.bank.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Balance", - Handler: _Query_Balance_Handler, - }, - { - MethodName: "AllBalances", - Handler: _Query_AllBalances_Handler, - }, - { - MethodName: "SpendableBalances", - Handler: _Query_SpendableBalances_Handler, - }, - { - MethodName: "TotalSupply", - Handler: _Query_TotalSupply_Handler, - }, - { - MethodName: "SupplyOf", - Handler: _Query_SupplyOf_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "DenomMetadata", - Handler: _Query_DenomMetadata_Handler, - }, - { - MethodName: "DenomsMetadata", - Handler: _Query_DenomsMetadata_Handler, - }, - { - MethodName: "DenomOwners", - Handler: _Query_DenomOwners_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/bank/v1beta1/query.proto", -} diff --git a/api/cosmos/bank/v1beta1/tx.pulsar.go b/api/cosmos/bank/v1beta1/tx.pulsar.go deleted file mode 100644 index c6c95f934903..000000000000 --- a/api/cosmos/bank/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,2329 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package bankv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_MsgSend_3_list)(nil) - -type _MsgSend_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgSend_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSend_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSend_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSend_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSend_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSend_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSend_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSend_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgSend protoreflect.MessageDescriptor - fd_MsgSend_from_address protoreflect.FieldDescriptor - fd_MsgSend_to_address protoreflect.FieldDescriptor - fd_MsgSend_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_tx_proto_init() - md_MsgSend = File_cosmos_bank_v1beta1_tx_proto.Messages().ByName("MsgSend") - fd_MsgSend_from_address = md_MsgSend.Fields().ByName("from_address") - fd_MsgSend_to_address = md_MsgSend.Fields().ByName("to_address") - fd_MsgSend_amount = md_MsgSend.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgSend)(nil) - -type fastReflection_MsgSend MsgSend - -func (x *MsgSend) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSend)(x) -} - -func (x *MsgSend) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSend_messageType fastReflection_MsgSend_messageType -var _ protoreflect.MessageType = fastReflection_MsgSend_messageType{} - -type fastReflection_MsgSend_messageType struct{} - -func (x fastReflection_MsgSend_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSend)(nil) -} -func (x fastReflection_MsgSend_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSend) -} -func (x fastReflection_MsgSend_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSend -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSend) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSend -} - -// 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_MsgSend) Type() protoreflect.MessageType { - return _fastReflection_MsgSend_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSend) New() protoreflect.Message { - return new(fastReflection_MsgSend) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSend) Interface() protoreflect.ProtoMessage { - return (*MsgSend)(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_MsgSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.FromAddress != "" { - value := protoreflect.ValueOfString(x.FromAddress) - if !f(fd_MsgSend_from_address, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgSend_to_address, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgSend_3_list{list: &x.Amount}) - if !f(fd_MsgSend_amount, 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_MsgSend) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgSend.from_address": - return x.FromAddress != "" - case "cosmos.bank.v1beta1.MsgSend.to_address": - return x.ToAddress != "" - case "cosmos.bank.v1beta1.MsgSend.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSend 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_MsgSend) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgSend.from_address": - x.FromAddress = "" - case "cosmos.bank.v1beta1.MsgSend.to_address": - x.ToAddress = "" - case "cosmos.bank.v1beta1.MsgSend.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSend 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_MsgSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.MsgSend.from_address": - value := x.FromAddress - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.MsgSend.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.bank.v1beta1.MsgSend.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgSend_3_list{}) - } - listValue := &_MsgSend_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSend 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_MsgSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgSend.from_address": - x.FromAddress = value.Interface().(string) - case "cosmos.bank.v1beta1.MsgSend.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.bank.v1beta1.MsgSend.amount": - lv := value.List() - clv := lv.(*_MsgSend_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSend 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_MsgSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgSend.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgSend_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.MsgSend.from_address": - panic(fmt.Errorf("field from_address of message cosmos.bank.v1beta1.MsgSend is not mutable")) - case "cosmos.bank.v1beta1.MsgSend.to_address": - panic(fmt.Errorf("field to_address of message cosmos.bank.v1beta1.MsgSend is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSend 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_MsgSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgSend.from_address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.MsgSend.to_address": - return protoreflect.ValueOfString("") - case "cosmos.bank.v1beta1.MsgSend.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgSend_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSend 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_MsgSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.MsgSend", 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_MsgSend) 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_MsgSend) 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_MsgSend) 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_MsgSend) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.FromAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.FromAddress) > 0 { - i -= len(x.FromAddress) - copy(dAtA[i:], x.FromAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FromAddress))) - 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().(*MsgSend) - 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: MsgSend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: 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 FromAddress", 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.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", 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.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSendResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_tx_proto_init() - md_MsgSendResponse = File_cosmos_bank_v1beta1_tx_proto.Messages().ByName("MsgSendResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSendResponse)(nil) - -type fastReflection_MsgSendResponse MsgSendResponse - -func (x *MsgSendResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSendResponse)(x) -} - -func (x *MsgSendResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSendResponse_messageType fastReflection_MsgSendResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSendResponse_messageType{} - -type fastReflection_MsgSendResponse_messageType struct{} - -func (x fastReflection_MsgSendResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSendResponse)(nil) -} -func (x fastReflection_MsgSendResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSendResponse) -} -func (x fastReflection_MsgSendResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSendResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSendResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSendResponse -} - -// 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_MsgSendResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSendResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSendResponse) New() protoreflect.Message { - return new(fastReflection_MsgSendResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSendResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSendResponse)(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_MsgSendResponse) 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_MsgSendResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSendResponse 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_MsgSendResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSendResponse 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_MsgSendResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSendResponse 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_MsgSendResponse) 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.bank.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSendResponse 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_MsgSendResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSendResponse 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_MsgSendResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgSendResponse 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_MsgSendResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.MsgSendResponse", 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_MsgSendResponse) 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_MsgSendResponse) 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_MsgSendResponse) 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_MsgSendResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSendResponse) - 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().(*MsgSendResponse) - 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().(*MsgSendResponse) - 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: MsgSendResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgMultiSend_1_list)(nil) - -type _MsgMultiSend_1_list struct { - list *[]*Input -} - -func (x *_MsgMultiSend_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgMultiSend_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgMultiSend_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Input) - (*x.list)[i] = concreteValue -} - -func (x *_MsgMultiSend_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Input) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgMultiSend_1_list) AppendMutable() protoreflect.Value { - v := new(Input) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgMultiSend_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgMultiSend_1_list) NewElement() protoreflect.Value { - v := new(Input) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgMultiSend_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgMultiSend_2_list)(nil) - -type _MsgMultiSend_2_list struct { - list *[]*Output -} - -func (x *_MsgMultiSend_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgMultiSend_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgMultiSend_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Output) - (*x.list)[i] = concreteValue -} - -func (x *_MsgMultiSend_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Output) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgMultiSend_2_list) AppendMutable() protoreflect.Value { - v := new(Output) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgMultiSend_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgMultiSend_2_list) NewElement() protoreflect.Value { - v := new(Output) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgMultiSend_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgMultiSend protoreflect.MessageDescriptor - fd_MsgMultiSend_inputs protoreflect.FieldDescriptor - fd_MsgMultiSend_outputs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_tx_proto_init() - md_MsgMultiSend = File_cosmos_bank_v1beta1_tx_proto.Messages().ByName("MsgMultiSend") - fd_MsgMultiSend_inputs = md_MsgMultiSend.Fields().ByName("inputs") - fd_MsgMultiSend_outputs = md_MsgMultiSend.Fields().ByName("outputs") -} - -var _ protoreflect.Message = (*fastReflection_MsgMultiSend)(nil) - -type fastReflection_MsgMultiSend MsgMultiSend - -func (x *MsgMultiSend) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgMultiSend)(x) -} - -func (x *MsgMultiSend) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgMultiSend_messageType fastReflection_MsgMultiSend_messageType -var _ protoreflect.MessageType = fastReflection_MsgMultiSend_messageType{} - -type fastReflection_MsgMultiSend_messageType struct{} - -func (x fastReflection_MsgMultiSend_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgMultiSend)(nil) -} -func (x fastReflection_MsgMultiSend_messageType) New() protoreflect.Message { - return new(fastReflection_MsgMultiSend) -} -func (x fastReflection_MsgMultiSend_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMultiSend -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgMultiSend) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMultiSend -} - -// 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_MsgMultiSend) Type() protoreflect.MessageType { - return _fastReflection_MsgMultiSend_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgMultiSend) New() protoreflect.Message { - return new(fastReflection_MsgMultiSend) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgMultiSend) Interface() protoreflect.ProtoMessage { - return (*MsgMultiSend)(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_MsgMultiSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Inputs) != 0 { - value := protoreflect.ValueOfList(&_MsgMultiSend_1_list{list: &x.Inputs}) - if !f(fd_MsgMultiSend_inputs, value) { - return - } - } - if len(x.Outputs) != 0 { - value := protoreflect.ValueOfList(&_MsgMultiSend_2_list{list: &x.Outputs}) - if !f(fd_MsgMultiSend_outputs, 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_MsgMultiSend) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgMultiSend.inputs": - return len(x.Inputs) != 0 - case "cosmos.bank.v1beta1.MsgMultiSend.outputs": - return len(x.Outputs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSend 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_MsgMultiSend) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgMultiSend.inputs": - x.Inputs = nil - case "cosmos.bank.v1beta1.MsgMultiSend.outputs": - x.Outputs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSend 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_MsgMultiSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.bank.v1beta1.MsgMultiSend.inputs": - if len(x.Inputs) == 0 { - return protoreflect.ValueOfList(&_MsgMultiSend_1_list{}) - } - listValue := &_MsgMultiSend_1_list{list: &x.Inputs} - return protoreflect.ValueOfList(listValue) - case "cosmos.bank.v1beta1.MsgMultiSend.outputs": - if len(x.Outputs) == 0 { - return protoreflect.ValueOfList(&_MsgMultiSend_2_list{}) - } - listValue := &_MsgMultiSend_2_list{list: &x.Outputs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSend 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_MsgMultiSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgMultiSend.inputs": - lv := value.List() - clv := lv.(*_MsgMultiSend_1_list) - x.Inputs = *clv.list - case "cosmos.bank.v1beta1.MsgMultiSend.outputs": - lv := value.List() - clv := lv.(*_MsgMultiSend_2_list) - x.Outputs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSend 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_MsgMultiSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgMultiSend.inputs": - if x.Inputs == nil { - x.Inputs = []*Input{} - } - value := &_MsgMultiSend_1_list{list: &x.Inputs} - return protoreflect.ValueOfList(value) - case "cosmos.bank.v1beta1.MsgMultiSend.outputs": - if x.Outputs == nil { - x.Outputs = []*Output{} - } - value := &_MsgMultiSend_2_list{list: &x.Outputs} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSend 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_MsgMultiSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.bank.v1beta1.MsgMultiSend.inputs": - list := []*Input{} - return protoreflect.ValueOfList(&_MsgMultiSend_1_list{list: &list}) - case "cosmos.bank.v1beta1.MsgMultiSend.outputs": - list := []*Output{} - return protoreflect.ValueOfList(&_MsgMultiSend_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSend")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSend 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_MsgMultiSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.MsgMultiSend", 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_MsgMultiSend) 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_MsgMultiSend) 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_MsgMultiSend) 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_MsgMultiSend) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgMultiSend) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Inputs) > 0 { - for _, e := range x.Inputs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Outputs) > 0 { - for _, e := range x.Outputs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgMultiSend) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Outputs) > 0 { - for iNdEx := len(x.Outputs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Outputs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Inputs) > 0 { - for iNdEx := len(x.Inputs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Inputs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgMultiSend) - 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: MsgMultiSend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgMultiSend: 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 Inputs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Inputs = append(x.Inputs, &Input{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inputs[len(x.Inputs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Outputs = append(x.Outputs, &Output{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Outputs[len(x.Outputs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgMultiSendResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_bank_v1beta1_tx_proto_init() - md_MsgMultiSendResponse = File_cosmos_bank_v1beta1_tx_proto.Messages().ByName("MsgMultiSendResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgMultiSendResponse)(nil) - -type fastReflection_MsgMultiSendResponse MsgMultiSendResponse - -func (x *MsgMultiSendResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgMultiSendResponse)(x) -} - -func (x *MsgMultiSendResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgMultiSendResponse_messageType fastReflection_MsgMultiSendResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgMultiSendResponse_messageType{} - -type fastReflection_MsgMultiSendResponse_messageType struct{} - -func (x fastReflection_MsgMultiSendResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgMultiSendResponse)(nil) -} -func (x fastReflection_MsgMultiSendResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgMultiSendResponse) -} -func (x fastReflection_MsgMultiSendResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMultiSendResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgMultiSendResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMultiSendResponse -} - -// 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_MsgMultiSendResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgMultiSendResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgMultiSendResponse) New() protoreflect.Message { - return new(fastReflection_MsgMultiSendResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgMultiSendResponse) Interface() protoreflect.ProtoMessage { - return (*MsgMultiSendResponse)(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_MsgMultiSendResponse) 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_MsgMultiSendResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSendResponse 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_MsgMultiSendResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSendResponse 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_MsgMultiSendResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSendResponse 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_MsgMultiSendResponse) 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.bank.v1beta1.MsgMultiSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSendResponse 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_MsgMultiSendResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSendResponse 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_MsgMultiSendResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.MsgMultiSendResponse")) - } - panic(fmt.Errorf("message cosmos.bank.v1beta1.MsgMultiSendResponse 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_MsgMultiSendResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.MsgMultiSendResponse", 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_MsgMultiSendResponse) 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_MsgMultiSendResponse) 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_MsgMultiSendResponse) 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_MsgMultiSendResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgMultiSendResponse) - 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().(*MsgMultiSendResponse) - 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().(*MsgMultiSendResponse) - 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: MsgMultiSendResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgMultiSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/bank/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSend represents a message to send coins from one account to another. -type MsgSend struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgSend) Reset() { - *x = MsgSend{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSend) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSend) ProtoMessage() {} - -// Deprecated: Use MsgSend.ProtoReflect.Descriptor instead. -func (*MsgSend) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSend) GetFromAddress() string { - if x != nil { - return x.FromAddress - } - return "" -} - -func (x *MsgSend) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgSend) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgSendResponse defines the Msg/Send response type. -type MsgSendResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSendResponse) Reset() { - *x = MsgSendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSendResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSendResponse) ProtoMessage() {} - -// Deprecated: Use MsgSendResponse.ProtoReflect.Descriptor instead. -func (*MsgSendResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -type MsgMultiSend struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Inputs []*Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` -} - -func (x *MsgMultiSend) Reset() { - *x = MsgMultiSend{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgMultiSend) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgMultiSend) ProtoMessage() {} - -// Deprecated: Use MsgMultiSend.ProtoReflect.Descriptor instead. -func (*MsgMultiSend) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgMultiSend) GetInputs() []*Input { - if x != nil { - return x.Inputs - } - return nil -} - -func (x *MsgMultiSend) GetOutputs() []*Output { - if x != nil { - return x.Outputs - } - return nil -} - -// MsgMultiSendResponse defines the Msg/MultiSend response type. -type MsgMultiSendResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgMultiSendResponse) Reset() { - *x = MsgMultiSendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_bank_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgMultiSendResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgMultiSendResponse) ProtoMessage() {} - -// Deprecated: Use MsgMultiSendResponse.ProtoReflect.Descriptor instead. -func (*MsgMultiSendResponse) Descriptor() ([]byte, []int) { - return file_cosmos_bank_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -var File_cosmos_bank_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_bank_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, - 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, - 0x61, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x01, - 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x3b, 0x0a, 0x0c, 0x66, 0x72, 0x6f, - 0x6d, 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, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, - 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x19, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, - 0xb0, 0x2a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, - 0x65, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, - 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x3b, 0x0a, - 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x3a, 0x0f, 0xe8, 0xa0, 0x1f, 0x00, - 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x4d, - 0x73, 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xac, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x04, 0x53, - 0x65, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, - 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, - 0x64, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x53, 0x65, 0x6e, 0x64, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x65, 0x6e, 0x64, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xd2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, - 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x62, 0x61, 0x6e, 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, - 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 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, 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_bank_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_bank_v1beta1_tx_proto_rawDescData = file_cosmos_bank_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_bank_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_bank_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_bank_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_bank_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_bank_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_bank_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_bank_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSend)(nil), // 0: cosmos.bank.v1beta1.MsgSend - (*MsgSendResponse)(nil), // 1: cosmos.bank.v1beta1.MsgSendResponse - (*MsgMultiSend)(nil), // 2: cosmos.bank.v1beta1.MsgMultiSend - (*MsgMultiSendResponse)(nil), // 3: cosmos.bank.v1beta1.MsgMultiSendResponse - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin - (*Input)(nil), // 5: cosmos.bank.v1beta1.Input - (*Output)(nil), // 6: cosmos.bank.v1beta1.Output -} -var file_cosmos_bank_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.bank.v1beta1.MsgSend.amount:type_name -> cosmos.base.v1beta1.Coin - 5, // 1: cosmos.bank.v1beta1.MsgMultiSend.inputs:type_name -> cosmos.bank.v1beta1.Input - 6, // 2: cosmos.bank.v1beta1.MsgMultiSend.outputs:type_name -> cosmos.bank.v1beta1.Output - 0, // 3: cosmos.bank.v1beta1.Msg.Send:input_type -> cosmos.bank.v1beta1.MsgSend - 2, // 4: cosmos.bank.v1beta1.Msg.MultiSend:input_type -> cosmos.bank.v1beta1.MsgMultiSend - 1, // 5: cosmos.bank.v1beta1.Msg.Send:output_type -> cosmos.bank.v1beta1.MsgSendResponse - 3, // 6: cosmos.bank.v1beta1.Msg.MultiSend:output_type -> cosmos.bank.v1beta1.MsgMultiSendResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_cosmos_bank_v1beta1_tx_proto_init() } -func file_cosmos_bank_v1beta1_tx_proto_init() { - if File_cosmos_bank_v1beta1_tx_proto != nil { - return - } - file_cosmos_bank_v1beta1_bank_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_bank_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgMultiSend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_bank_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgMultiSendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_bank_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_bank_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_bank_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_bank_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_bank_v1beta1_tx_proto = out.File - file_cosmos_bank_v1beta1_tx_proto_rawDesc = nil - file_cosmos_bank_v1beta1_tx_proto_goTypes = nil - file_cosmos_bank_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/bank/v1beta1/tx_grpc.pb.go b/api/cosmos/bank/v1beta1/tx_grpc.pb.go deleted file mode 100644 index 6c02583a1da0..000000000000 --- a/api/cosmos/bank/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/bank/v1beta1/tx.proto - -package bankv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // Send defines a method for sending coins from one account to another account. - Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) - // MultiSend defines a method for sending coins from some accounts to other accounts. - MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) { - out := new(MsgSendResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Msg/Send", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error) { - out := new(MsgMultiSendResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Msg/MultiSend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // Send defines a method for sending coins from one account to another account. - Send(context.Context, *MsgSend) (*MsgSendResponse, error) - // MultiSend defines a method for sending coins from some accounts to other accounts. - MultiSend(context.Context, *MsgMultiSend) (*MsgMultiSendResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) Send(context.Context, *MsgSend) (*MsgSendResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") -} -func (UnimplementedMsgServer) MultiSend(context.Context, *MsgMultiSend) (*MsgMultiSendResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiSend not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSend) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Send(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Msg/Send", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Send(ctx, req.(*MsgSend)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_MultiSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgMultiSend) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MultiSend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Msg/MultiSend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MultiSend(ctx, req.(*MsgMultiSend)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.bank.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Send", - Handler: _Msg_Send_Handler, - }, - { - MethodName: "MultiSend", - Handler: _Msg_MultiSend_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/bank/v1beta1/tx.proto", -} diff --git a/api/cosmos/base/abci/v1beta1/abci.pulsar.go b/api/cosmos/base/abci/v1beta1/abci.pulsar.go deleted file mode 100644 index 8373606f820c..000000000000 --- a/api/cosmos/base/abci/v1beta1/abci.pulsar.go +++ /dev/null @@ -1,7513 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package abciv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - abci "github.com/cosmos/cosmos-sdk/api/tendermint/abci" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_TxResponse_7_list)(nil) - -type _TxResponse_7_list struct { - list *[]*ABCIMessageLog -} - -func (x *_TxResponse_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxResponse_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxResponse_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ABCIMessageLog) - (*x.list)[i] = concreteValue -} - -func (x *_TxResponse_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ABCIMessageLog) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxResponse_7_list) AppendMutable() protoreflect.Value { - v := new(ABCIMessageLog) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxResponse_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxResponse_7_list) NewElement() protoreflect.Value { - v := new(ABCIMessageLog) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxResponse_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TxResponse_13_list)(nil) - -type _TxResponse_13_list struct { - list *[]*abci.Event -} - -func (x *_TxResponse_13_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxResponse_13_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxResponse_13_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*abci.Event) - (*x.list)[i] = concreteValue -} - -func (x *_TxResponse_13_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*abci.Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxResponse_13_list) AppendMutable() protoreflect.Value { - v := new(abci.Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxResponse_13_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxResponse_13_list) NewElement() protoreflect.Value { - v := new(abci.Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxResponse_13_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TxResponse protoreflect.MessageDescriptor - fd_TxResponse_height protoreflect.FieldDescriptor - fd_TxResponse_txhash protoreflect.FieldDescriptor - fd_TxResponse_codespace protoreflect.FieldDescriptor - fd_TxResponse_code protoreflect.FieldDescriptor - fd_TxResponse_data protoreflect.FieldDescriptor - fd_TxResponse_raw_log protoreflect.FieldDescriptor - fd_TxResponse_logs protoreflect.FieldDescriptor - fd_TxResponse_info protoreflect.FieldDescriptor - fd_TxResponse_gas_wanted protoreflect.FieldDescriptor - fd_TxResponse_gas_used protoreflect.FieldDescriptor - fd_TxResponse_tx protoreflect.FieldDescriptor - fd_TxResponse_timestamp protoreflect.FieldDescriptor - fd_TxResponse_events protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_TxResponse = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("TxResponse") - fd_TxResponse_height = md_TxResponse.Fields().ByName("height") - fd_TxResponse_txhash = md_TxResponse.Fields().ByName("txhash") - fd_TxResponse_codespace = md_TxResponse.Fields().ByName("codespace") - fd_TxResponse_code = md_TxResponse.Fields().ByName("code") - fd_TxResponse_data = md_TxResponse.Fields().ByName("data") - fd_TxResponse_raw_log = md_TxResponse.Fields().ByName("raw_log") - fd_TxResponse_logs = md_TxResponse.Fields().ByName("logs") - fd_TxResponse_info = md_TxResponse.Fields().ByName("info") - fd_TxResponse_gas_wanted = md_TxResponse.Fields().ByName("gas_wanted") - fd_TxResponse_gas_used = md_TxResponse.Fields().ByName("gas_used") - fd_TxResponse_tx = md_TxResponse.Fields().ByName("tx") - fd_TxResponse_timestamp = md_TxResponse.Fields().ByName("timestamp") - fd_TxResponse_events = md_TxResponse.Fields().ByName("events") -} - -var _ protoreflect.Message = (*fastReflection_TxResponse)(nil) - -type fastReflection_TxResponse TxResponse - -func (x *TxResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxResponse)(x) -} - -func (x *TxResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TxResponse_messageType fastReflection_TxResponse_messageType -var _ protoreflect.MessageType = fastReflection_TxResponse_messageType{} - -type fastReflection_TxResponse_messageType struct{} - -func (x fastReflection_TxResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxResponse)(nil) -} -func (x fastReflection_TxResponse_messageType) New() protoreflect.Message { - return new(fastReflection_TxResponse) -} -func (x fastReflection_TxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxResponse) Descriptor() protoreflect.MessageDescriptor { - return md_TxResponse -} - -// 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_TxResponse) Type() protoreflect.MessageType { - return _fastReflection_TxResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxResponse) New() protoreflect.Message { - return new(fastReflection_TxResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxResponse) Interface() protoreflect.ProtoMessage { - return (*TxResponse)(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_TxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_TxResponse_height, value) { - return - } - } - if x.Txhash != "" { - value := protoreflect.ValueOfString(x.Txhash) - if !f(fd_TxResponse_txhash, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_TxResponse_codespace, value) { - return - } - } - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_TxResponse_code, value) { - return - } - } - if x.Data != "" { - value := protoreflect.ValueOfString(x.Data) - if !f(fd_TxResponse_data, value) { - return - } - } - if x.RawLog != "" { - value := protoreflect.ValueOfString(x.RawLog) - if !f(fd_TxResponse_raw_log, value) { - return - } - } - if len(x.Logs) != 0 { - value := protoreflect.ValueOfList(&_TxResponse_7_list{list: &x.Logs}) - if !f(fd_TxResponse_logs, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_TxResponse_info, value) { - return - } - } - if x.GasWanted != int64(0) { - value := protoreflect.ValueOfInt64(x.GasWanted) - if !f(fd_TxResponse_gas_wanted, value) { - return - } - } - if x.GasUsed != int64(0) { - value := protoreflect.ValueOfInt64(x.GasUsed) - if !f(fd_TxResponse_gas_used, value) { - return - } - } - if x.Tx != nil { - value := protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - if !f(fd_TxResponse_tx, value) { - return - } - } - if x.Timestamp != "" { - value := protoreflect.ValueOfString(x.Timestamp) - if !f(fd_TxResponse_timestamp, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_TxResponse_13_list{list: &x.Events}) - if !f(fd_TxResponse_events, 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_TxResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxResponse.height": - return x.Height != int64(0) - case "cosmos.base.abci.v1beta1.TxResponse.txhash": - return x.Txhash != "" - case "cosmos.base.abci.v1beta1.TxResponse.codespace": - return x.Codespace != "" - case "cosmos.base.abci.v1beta1.TxResponse.code": - return x.Code != uint32(0) - case "cosmos.base.abci.v1beta1.TxResponse.data": - return x.Data != "" - case "cosmos.base.abci.v1beta1.TxResponse.raw_log": - return x.RawLog != "" - case "cosmos.base.abci.v1beta1.TxResponse.logs": - return len(x.Logs) != 0 - case "cosmos.base.abci.v1beta1.TxResponse.info": - return x.Info != "" - case "cosmos.base.abci.v1beta1.TxResponse.gas_wanted": - return x.GasWanted != int64(0) - case "cosmos.base.abci.v1beta1.TxResponse.gas_used": - return x.GasUsed != int64(0) - case "cosmos.base.abci.v1beta1.TxResponse.tx": - return x.Tx != nil - case "cosmos.base.abci.v1beta1.TxResponse.timestamp": - return x.Timestamp != "" - case "cosmos.base.abci.v1beta1.TxResponse.events": - return len(x.Events) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxResponse 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_TxResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxResponse.height": - x.Height = int64(0) - case "cosmos.base.abci.v1beta1.TxResponse.txhash": - x.Txhash = "" - case "cosmos.base.abci.v1beta1.TxResponse.codespace": - x.Codespace = "" - case "cosmos.base.abci.v1beta1.TxResponse.code": - x.Code = uint32(0) - case "cosmos.base.abci.v1beta1.TxResponse.data": - x.Data = "" - case "cosmos.base.abci.v1beta1.TxResponse.raw_log": - x.RawLog = "" - case "cosmos.base.abci.v1beta1.TxResponse.logs": - x.Logs = nil - case "cosmos.base.abci.v1beta1.TxResponse.info": - x.Info = "" - case "cosmos.base.abci.v1beta1.TxResponse.gas_wanted": - x.GasWanted = int64(0) - case "cosmos.base.abci.v1beta1.TxResponse.gas_used": - x.GasUsed = int64(0) - case "cosmos.base.abci.v1beta1.TxResponse.tx": - x.Tx = nil - case "cosmos.base.abci.v1beta1.TxResponse.timestamp": - x.Timestamp = "" - case "cosmos.base.abci.v1beta1.TxResponse.events": - x.Events = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxResponse 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_TxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.TxResponse.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.abci.v1beta1.TxResponse.txhash": - value := x.Txhash - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.TxResponse.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.TxResponse.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "cosmos.base.abci.v1beta1.TxResponse.data": - value := x.Data - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.TxResponse.raw_log": - value := x.RawLog - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.TxResponse.logs": - if len(x.Logs) == 0 { - return protoreflect.ValueOfList(&_TxResponse_7_list{}) - } - listValue := &_TxResponse_7_list{list: &x.Logs} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.abci.v1beta1.TxResponse.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.TxResponse.gas_wanted": - value := x.GasWanted - return protoreflect.ValueOfInt64(value) - case "cosmos.base.abci.v1beta1.TxResponse.gas_used": - value := x.GasUsed - return protoreflect.ValueOfInt64(value) - case "cosmos.base.abci.v1beta1.TxResponse.tx": - value := x.Tx - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.abci.v1beta1.TxResponse.timestamp": - value := x.Timestamp - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.TxResponse.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_TxResponse_13_list{}) - } - listValue := &_TxResponse_13_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxResponse 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_TxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxResponse.height": - x.Height = value.Int() - case "cosmos.base.abci.v1beta1.TxResponse.txhash": - x.Txhash = value.Interface().(string) - case "cosmos.base.abci.v1beta1.TxResponse.codespace": - x.Codespace = value.Interface().(string) - case "cosmos.base.abci.v1beta1.TxResponse.code": - x.Code = uint32(value.Uint()) - case "cosmos.base.abci.v1beta1.TxResponse.data": - x.Data = value.Interface().(string) - case "cosmos.base.abci.v1beta1.TxResponse.raw_log": - x.RawLog = value.Interface().(string) - case "cosmos.base.abci.v1beta1.TxResponse.logs": - lv := value.List() - clv := lv.(*_TxResponse_7_list) - x.Logs = *clv.list - case "cosmos.base.abci.v1beta1.TxResponse.info": - x.Info = value.Interface().(string) - case "cosmos.base.abci.v1beta1.TxResponse.gas_wanted": - x.GasWanted = value.Int() - case "cosmos.base.abci.v1beta1.TxResponse.gas_used": - x.GasUsed = value.Int() - case "cosmos.base.abci.v1beta1.TxResponse.tx": - x.Tx = value.Message().Interface().(*anypb.Any) - case "cosmos.base.abci.v1beta1.TxResponse.timestamp": - x.Timestamp = value.Interface().(string) - case "cosmos.base.abci.v1beta1.TxResponse.events": - lv := value.List() - clv := lv.(*_TxResponse_13_list) - x.Events = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxResponse 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_TxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxResponse.logs": - if x.Logs == nil { - x.Logs = []*ABCIMessageLog{} - } - value := &_TxResponse_7_list{list: &x.Logs} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.TxResponse.tx": - if x.Tx == nil { - x.Tx = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - case "cosmos.base.abci.v1beta1.TxResponse.events": - if x.Events == nil { - x.Events = []*abci.Event{} - } - value := &_TxResponse_13_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.TxResponse.height": - panic(fmt.Errorf("field height of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.txhash": - panic(fmt.Errorf("field txhash of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.codespace": - panic(fmt.Errorf("field codespace of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.code": - panic(fmt.Errorf("field code of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.data": - panic(fmt.Errorf("field data of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.raw_log": - panic(fmt.Errorf("field raw_log of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.info": - panic(fmt.Errorf("field info of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.gas_wanted": - panic(fmt.Errorf("field gas_wanted of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.gas_used": - panic(fmt.Errorf("field gas_used of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - case "cosmos.base.abci.v1beta1.TxResponse.timestamp": - panic(fmt.Errorf("field timestamp of message cosmos.base.abci.v1beta1.TxResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxResponse 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_TxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxResponse.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.abci.v1beta1.TxResponse.txhash": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.TxResponse.codespace": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.TxResponse.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.base.abci.v1beta1.TxResponse.data": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.TxResponse.raw_log": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.TxResponse.logs": - list := []*ABCIMessageLog{} - return protoreflect.ValueOfList(&_TxResponse_7_list{list: &list}) - case "cosmos.base.abci.v1beta1.TxResponse.info": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.TxResponse.gas_wanted": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.abci.v1beta1.TxResponse.gas_used": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.abci.v1beta1.TxResponse.tx": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.abci.v1beta1.TxResponse.timestamp": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.TxResponse.events": - list := []*abci.Event{} - return protoreflect.ValueOfList(&_TxResponse_13_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxResponse 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_TxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.TxResponse", 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_TxResponse) 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_TxResponse) 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_TxResponse) 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_TxResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - l = len(x.Txhash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RawLog) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Logs) > 0 { - for _, e := range x.Logs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GasWanted != 0 { - n += 1 + runtime.Sov(uint64(x.GasWanted)) - } - if x.GasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.GasUsed)) - } - if x.Tx != nil { - l = options.Size(x.Tx) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Timestamp) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TxResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[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] = 0x6a - } - } - if len(x.Timestamp) > 0 { - i -= len(x.Timestamp) - copy(dAtA[i:], x.Timestamp) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Timestamp))) - i-- - dAtA[i] = 0x62 - } - if x.Tx != nil { - encoded, err := options.Marshal(x.Tx) - 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] = 0x5a - } - if x.GasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) - i-- - dAtA[i] = 0x50 - } - if x.GasWanted != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) - i-- - dAtA[i] = 0x48 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x42 - } - if len(x.Logs) > 0 { - for iNdEx := len(x.Logs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Logs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.RawLog) > 0 { - i -= len(x.RawLog) - copy(dAtA[i:], x.RawLog) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RawLog))) - i-- - dAtA[i] = 0x32 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x2a - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x20 - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x1a - } - if len(x.Txhash) > 0 { - i -= len(x.Txhash) - copy(dAtA[i:], x.Txhash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txhash))) - i-- - dAtA[i] = 0x12 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TxResponse) - 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: TxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txhash", 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.Txhash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", 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.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawLog", 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.RawLog = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Logs = append(x.Logs, &ABCIMessageLog{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Logs[len(x.Logs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - x.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - x.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tx", 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.Tx == nil { - x.Tx = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tx); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &abci.Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ABCIMessageLog_3_list)(nil) - -type _ABCIMessageLog_3_list struct { - list *[]*StringEvent -} - -func (x *_ABCIMessageLog_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ABCIMessageLog_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ABCIMessageLog_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*StringEvent) - (*x.list)[i] = concreteValue -} - -func (x *_ABCIMessageLog_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*StringEvent) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ABCIMessageLog_3_list) AppendMutable() protoreflect.Value { - v := new(StringEvent) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ABCIMessageLog_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ABCIMessageLog_3_list) NewElement() protoreflect.Value { - v := new(StringEvent) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ABCIMessageLog_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ABCIMessageLog protoreflect.MessageDescriptor - fd_ABCIMessageLog_msg_index protoreflect.FieldDescriptor - fd_ABCIMessageLog_log protoreflect.FieldDescriptor - fd_ABCIMessageLog_events protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_ABCIMessageLog = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("ABCIMessageLog") - fd_ABCIMessageLog_msg_index = md_ABCIMessageLog.Fields().ByName("msg_index") - fd_ABCIMessageLog_log = md_ABCIMessageLog.Fields().ByName("log") - fd_ABCIMessageLog_events = md_ABCIMessageLog.Fields().ByName("events") -} - -var _ protoreflect.Message = (*fastReflection_ABCIMessageLog)(nil) - -type fastReflection_ABCIMessageLog ABCIMessageLog - -func (x *ABCIMessageLog) ProtoReflect() protoreflect.Message { - return (*fastReflection_ABCIMessageLog)(x) -} - -func (x *ABCIMessageLog) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ABCIMessageLog_messageType fastReflection_ABCIMessageLog_messageType -var _ protoreflect.MessageType = fastReflection_ABCIMessageLog_messageType{} - -type fastReflection_ABCIMessageLog_messageType struct{} - -func (x fastReflection_ABCIMessageLog_messageType) Zero() protoreflect.Message { - return (*fastReflection_ABCIMessageLog)(nil) -} -func (x fastReflection_ABCIMessageLog_messageType) New() protoreflect.Message { - return new(fastReflection_ABCIMessageLog) -} -func (x fastReflection_ABCIMessageLog_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIMessageLog -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ABCIMessageLog) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIMessageLog -} - -// 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_ABCIMessageLog) Type() protoreflect.MessageType { - return _fastReflection_ABCIMessageLog_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ABCIMessageLog) New() protoreflect.Message { - return new(fastReflection_ABCIMessageLog) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ABCIMessageLog) Interface() protoreflect.ProtoMessage { - return (*ABCIMessageLog)(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_ABCIMessageLog) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MsgIndex != uint32(0) { - value := protoreflect.ValueOfUint32(x.MsgIndex) - if !f(fd_ABCIMessageLog_msg_index, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ABCIMessageLog_log, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ABCIMessageLog_3_list{list: &x.Events}) - if !f(fd_ABCIMessageLog_events, 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_ABCIMessageLog) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.ABCIMessageLog.msg_index": - return x.MsgIndex != uint32(0) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.log": - return x.Log != "" - case "cosmos.base.abci.v1beta1.ABCIMessageLog.events": - return len(x.Events) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.ABCIMessageLog")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.ABCIMessageLog 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_ABCIMessageLog) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.ABCIMessageLog.msg_index": - x.MsgIndex = uint32(0) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.log": - x.Log = "" - case "cosmos.base.abci.v1beta1.ABCIMessageLog.events": - x.Events = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.ABCIMessageLog")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.ABCIMessageLog 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_ABCIMessageLog) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.ABCIMessageLog.msg_index": - value := x.MsgIndex - return protoreflect.ValueOfUint32(value) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ABCIMessageLog_3_list{}) - } - listValue := &_ABCIMessageLog_3_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.ABCIMessageLog")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.ABCIMessageLog 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_ABCIMessageLog) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.ABCIMessageLog.msg_index": - x.MsgIndex = uint32(value.Uint()) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.log": - x.Log = value.Interface().(string) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.events": - lv := value.List() - clv := lv.(*_ABCIMessageLog_3_list) - x.Events = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.ABCIMessageLog")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.ABCIMessageLog 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_ABCIMessageLog) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.ABCIMessageLog.events": - if x.Events == nil { - x.Events = []*StringEvent{} - } - value := &_ABCIMessageLog_3_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.msg_index": - panic(fmt.Errorf("field msg_index of message cosmos.base.abci.v1beta1.ABCIMessageLog is not mutable")) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.log": - panic(fmt.Errorf("field log of message cosmos.base.abci.v1beta1.ABCIMessageLog is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.ABCIMessageLog")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.ABCIMessageLog 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_ABCIMessageLog) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.ABCIMessageLog.msg_index": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.base.abci.v1beta1.ABCIMessageLog.log": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.ABCIMessageLog.events": - list := []*StringEvent{} - return protoreflect.ValueOfList(&_ABCIMessageLog_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.ABCIMessageLog")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.ABCIMessageLog 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_ABCIMessageLog) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.ABCIMessageLog", 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_ABCIMessageLog) 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_ABCIMessageLog) 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_ABCIMessageLog) 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_ABCIMessageLog) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ABCIMessageLog) - 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.MsgIndex != 0 { - n += 1 + runtime.Sov(uint64(x.MsgIndex)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ABCIMessageLog) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x12 - } - if x.MsgIndex != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MsgIndex)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ABCIMessageLog) - 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: ABCIMessageLog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIMessageLog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgIndex", wireType) - } - x.MsgIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MsgIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &StringEvent{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_StringEvent_2_list)(nil) - -type _StringEvent_2_list struct { - list *[]*Attribute -} - -func (x *_StringEvent_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_StringEvent_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_StringEvent_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Attribute) - (*x.list)[i] = concreteValue -} - -func (x *_StringEvent_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Attribute) - *x.list = append(*x.list, concreteValue) -} - -func (x *_StringEvent_2_list) AppendMutable() protoreflect.Value { - v := new(Attribute) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_StringEvent_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_StringEvent_2_list) NewElement() protoreflect.Value { - v := new(Attribute) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_StringEvent_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_StringEvent protoreflect.MessageDescriptor - fd_StringEvent_type protoreflect.FieldDescriptor - fd_StringEvent_attributes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_StringEvent = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("StringEvent") - fd_StringEvent_type = md_StringEvent.Fields().ByName("type") - fd_StringEvent_attributes = md_StringEvent.Fields().ByName("attributes") -} - -var _ protoreflect.Message = (*fastReflection_StringEvent)(nil) - -type fastReflection_StringEvent StringEvent - -func (x *StringEvent) ProtoReflect() protoreflect.Message { - return (*fastReflection_StringEvent)(x) -} - -func (x *StringEvent) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StringEvent_messageType fastReflection_StringEvent_messageType -var _ protoreflect.MessageType = fastReflection_StringEvent_messageType{} - -type fastReflection_StringEvent_messageType struct{} - -func (x fastReflection_StringEvent_messageType) Zero() protoreflect.Message { - return (*fastReflection_StringEvent)(nil) -} -func (x fastReflection_StringEvent_messageType) New() protoreflect.Message { - return new(fastReflection_StringEvent) -} -func (x fastReflection_StringEvent_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StringEvent -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StringEvent) Descriptor() protoreflect.MessageDescriptor { - return md_StringEvent -} - -// 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_StringEvent) Type() protoreflect.MessageType { - return _fastReflection_StringEvent_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StringEvent) New() protoreflect.Message { - return new(fastReflection_StringEvent) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StringEvent) Interface() protoreflect.ProtoMessage { - return (*StringEvent)(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_StringEvent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != "" { - value := protoreflect.ValueOfString(x.Type_) - if !f(fd_StringEvent_type, value) { - return - } - } - if len(x.Attributes) != 0 { - value := protoreflect.ValueOfList(&_StringEvent_2_list{list: &x.Attributes}) - if !f(fd_StringEvent_attributes, 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_StringEvent) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.StringEvent.type": - return x.Type_ != "" - case "cosmos.base.abci.v1beta1.StringEvent.attributes": - return len(x.Attributes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.StringEvent")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.StringEvent 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_StringEvent) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.StringEvent.type": - x.Type_ = "" - case "cosmos.base.abci.v1beta1.StringEvent.attributes": - x.Attributes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.StringEvent")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.StringEvent 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_StringEvent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.StringEvent.type": - value := x.Type_ - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.StringEvent.attributes": - if len(x.Attributes) == 0 { - return protoreflect.ValueOfList(&_StringEvent_2_list{}) - } - listValue := &_StringEvent_2_list{list: &x.Attributes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.StringEvent")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.StringEvent 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_StringEvent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.StringEvent.type": - x.Type_ = value.Interface().(string) - case "cosmos.base.abci.v1beta1.StringEvent.attributes": - lv := value.List() - clv := lv.(*_StringEvent_2_list) - x.Attributes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.StringEvent")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.StringEvent 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_StringEvent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.StringEvent.attributes": - if x.Attributes == nil { - x.Attributes = []*Attribute{} - } - value := &_StringEvent_2_list{list: &x.Attributes} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.StringEvent.type": - panic(fmt.Errorf("field type of message cosmos.base.abci.v1beta1.StringEvent is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.StringEvent")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.StringEvent 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_StringEvent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.StringEvent.type": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.StringEvent.attributes": - list := []*Attribute{} - return protoreflect.ValueOfList(&_StringEvent_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.StringEvent")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.StringEvent 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_StringEvent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.StringEvent", 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_StringEvent) 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_StringEvent) 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_StringEvent) 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_StringEvent) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StringEvent) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Type_) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Attributes) > 0 { - for _, e := range x.Attributes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*StringEvent) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Attributes) > 0 { - for iNdEx := len(x.Attributes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Attributes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Type_) > 0 { - i -= len(x.Type_) - copy(dAtA[i:], x.Type_) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) - 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().(*StringEvent) - 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: StringEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StringEvent: 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 Type_", 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.Type_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Attributes = append(x.Attributes, &Attribute{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attributes[len(x.Attributes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Attribute protoreflect.MessageDescriptor - fd_Attribute_key protoreflect.FieldDescriptor - fd_Attribute_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_Attribute = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("Attribute") - fd_Attribute_key = md_Attribute.Fields().ByName("key") - fd_Attribute_value = md_Attribute.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_Attribute)(nil) - -type fastReflection_Attribute Attribute - -func (x *Attribute) ProtoReflect() protoreflect.Message { - return (*fastReflection_Attribute)(x) -} - -func (x *Attribute) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Attribute_messageType fastReflection_Attribute_messageType -var _ protoreflect.MessageType = fastReflection_Attribute_messageType{} - -type fastReflection_Attribute_messageType struct{} - -func (x fastReflection_Attribute_messageType) Zero() protoreflect.Message { - return (*fastReflection_Attribute)(nil) -} -func (x fastReflection_Attribute_messageType) New() protoreflect.Message { - return new(fastReflection_Attribute) -} -func (x fastReflection_Attribute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Attribute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Attribute) Descriptor() protoreflect.MessageDescriptor { - return md_Attribute -} - -// 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_Attribute) Type() protoreflect.MessageType { - return _fastReflection_Attribute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Attribute) New() protoreflect.Message { - return new(fastReflection_Attribute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Attribute) Interface() protoreflect.ProtoMessage { - return (*Attribute)(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_Attribute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Key != "" { - value := protoreflect.ValueOfString(x.Key) - if !f(fd_Attribute_key, value) { - return - } - } - if x.Value != "" { - value := protoreflect.ValueOfString(x.Value) - if !f(fd_Attribute_value, 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_Attribute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Attribute.key": - return x.Key != "" - case "cosmos.base.abci.v1beta1.Attribute.value": - return x.Value != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Attribute")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Attribute 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_Attribute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Attribute.key": - x.Key = "" - case "cosmos.base.abci.v1beta1.Attribute.value": - x.Value = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Attribute")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Attribute 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_Attribute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.Attribute.key": - value := x.Key - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.Attribute.value": - value := x.Value - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Attribute")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Attribute 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_Attribute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Attribute.key": - x.Key = value.Interface().(string) - case "cosmos.base.abci.v1beta1.Attribute.value": - x.Value = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Attribute")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Attribute 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_Attribute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Attribute.key": - panic(fmt.Errorf("field key of message cosmos.base.abci.v1beta1.Attribute is not mutable")) - case "cosmos.base.abci.v1beta1.Attribute.value": - panic(fmt.Errorf("field value of message cosmos.base.abci.v1beta1.Attribute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Attribute")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Attribute 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_Attribute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Attribute.key": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.Attribute.value": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Attribute")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Attribute 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_Attribute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.Attribute", 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_Attribute) 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_Attribute) 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_Attribute) 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_Attribute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Attribute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Attribute) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*Attribute) - 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: Attribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Attribute: 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 Key", 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.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GasInfo protoreflect.MessageDescriptor - fd_GasInfo_gas_wanted protoreflect.FieldDescriptor - fd_GasInfo_gas_used protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_GasInfo = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("GasInfo") - fd_GasInfo_gas_wanted = md_GasInfo.Fields().ByName("gas_wanted") - fd_GasInfo_gas_used = md_GasInfo.Fields().ByName("gas_used") -} - -var _ protoreflect.Message = (*fastReflection_GasInfo)(nil) - -type fastReflection_GasInfo GasInfo - -func (x *GasInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_GasInfo)(x) -} - -func (x *GasInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GasInfo_messageType fastReflection_GasInfo_messageType -var _ protoreflect.MessageType = fastReflection_GasInfo_messageType{} - -type fastReflection_GasInfo_messageType struct{} - -func (x fastReflection_GasInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_GasInfo)(nil) -} -func (x fastReflection_GasInfo_messageType) New() protoreflect.Message { - return new(fastReflection_GasInfo) -} -func (x fastReflection_GasInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GasInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GasInfo) Descriptor() protoreflect.MessageDescriptor { - return md_GasInfo -} - -// 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_GasInfo) Type() protoreflect.MessageType { - return _fastReflection_GasInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GasInfo) New() protoreflect.Message { - return new(fastReflection_GasInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GasInfo) Interface() protoreflect.ProtoMessage { - return (*GasInfo)(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_GasInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GasWanted != uint64(0) { - value := protoreflect.ValueOfUint64(x.GasWanted) - if !f(fd_GasInfo_gas_wanted, value) { - return - } - } - if x.GasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.GasUsed) - if !f(fd_GasInfo_gas_used, 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_GasInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.GasInfo.gas_wanted": - return x.GasWanted != uint64(0) - case "cosmos.base.abci.v1beta1.GasInfo.gas_used": - return x.GasUsed != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.GasInfo")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.GasInfo 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_GasInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.GasInfo.gas_wanted": - x.GasWanted = uint64(0) - case "cosmos.base.abci.v1beta1.GasInfo.gas_used": - x.GasUsed = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.GasInfo")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.GasInfo 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_GasInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.GasInfo.gas_wanted": - value := x.GasWanted - return protoreflect.ValueOfUint64(value) - case "cosmos.base.abci.v1beta1.GasInfo.gas_used": - value := x.GasUsed - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.GasInfo")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.GasInfo 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_GasInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.GasInfo.gas_wanted": - x.GasWanted = value.Uint() - case "cosmos.base.abci.v1beta1.GasInfo.gas_used": - x.GasUsed = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.GasInfo")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.GasInfo 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_GasInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.GasInfo.gas_wanted": - panic(fmt.Errorf("field gas_wanted of message cosmos.base.abci.v1beta1.GasInfo is not mutable")) - case "cosmos.base.abci.v1beta1.GasInfo.gas_used": - panic(fmt.Errorf("field gas_used of message cosmos.base.abci.v1beta1.GasInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.GasInfo")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.GasInfo 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_GasInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.GasInfo.gas_wanted": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.abci.v1beta1.GasInfo.gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.GasInfo")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.GasInfo 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_GasInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.GasInfo", 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_GasInfo) 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_GasInfo) 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_GasInfo) 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_GasInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GasInfo) - 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.GasWanted != 0 { - n += 1 + runtime.Sov(uint64(x.GasWanted)) - } - if x.GasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.GasUsed)) - } - 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().(*GasInfo) - 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.GasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) - i-- - dAtA[i] = 0x10 - } - if x.GasWanted != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GasInfo) - 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: GasInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GasInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - x.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasWanted |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - x.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Result_3_list)(nil) - -type _Result_3_list struct { - list *[]*abci.Event -} - -func (x *_Result_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Result_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Result_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*abci.Event) - (*x.list)[i] = concreteValue -} - -func (x *_Result_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*abci.Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Result_3_list) AppendMutable() protoreflect.Value { - v := new(abci.Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Result_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Result_3_list) NewElement() protoreflect.Value { - v := new(abci.Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Result_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Result_4_list)(nil) - -type _Result_4_list struct { - list *[]*anypb.Any -} - -func (x *_Result_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Result_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Result_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_Result_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Result_4_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Result_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Result_4_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Result_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Result protoreflect.MessageDescriptor - fd_Result_data protoreflect.FieldDescriptor - fd_Result_log protoreflect.FieldDescriptor - fd_Result_events protoreflect.FieldDescriptor - fd_Result_msg_responses protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_Result = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("Result") - fd_Result_data = md_Result.Fields().ByName("data") - fd_Result_log = md_Result.Fields().ByName("log") - fd_Result_events = md_Result.Fields().ByName("events") - fd_Result_msg_responses = md_Result.Fields().ByName("msg_responses") -} - -var _ protoreflect.Message = (*fastReflection_Result)(nil) - -type fastReflection_Result Result - -func (x *Result) ProtoReflect() protoreflect.Message { - return (*fastReflection_Result)(x) -} - -func (x *Result) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_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_Result_messageType fastReflection_Result_messageType -var _ protoreflect.MessageType = fastReflection_Result_messageType{} - -type fastReflection_Result_messageType struct{} - -func (x fastReflection_Result_messageType) Zero() protoreflect.Message { - return (*fastReflection_Result)(nil) -} -func (x fastReflection_Result_messageType) New() protoreflect.Message { - return new(fastReflection_Result) -} -func (x fastReflection_Result_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Result -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Result) Descriptor() protoreflect.MessageDescriptor { - return md_Result -} - -// 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_Result) Type() protoreflect.MessageType { - return _fastReflection_Result_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Result) New() protoreflect.Message { - return new(fastReflection_Result) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Result) Interface() protoreflect.ProtoMessage { - return (*Result)(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_Result) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_Result_data, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_Result_log, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_Result_3_list{list: &x.Events}) - if !f(fd_Result_events, value) { - return - } - } - if len(x.MsgResponses) != 0 { - value := protoreflect.ValueOfList(&_Result_4_list{list: &x.MsgResponses}) - if !f(fd_Result_msg_responses, 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_Result) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Result.data": - return len(x.Data) != 0 - case "cosmos.base.abci.v1beta1.Result.log": - return x.Log != "" - case "cosmos.base.abci.v1beta1.Result.events": - return len(x.Events) != 0 - case "cosmos.base.abci.v1beta1.Result.msg_responses": - return len(x.MsgResponses) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Result")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Result 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_Result) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Result.data": - x.Data = nil - case "cosmos.base.abci.v1beta1.Result.log": - x.Log = "" - case "cosmos.base.abci.v1beta1.Result.events": - x.Events = nil - case "cosmos.base.abci.v1beta1.Result.msg_responses": - x.MsgResponses = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Result")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Result 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_Result) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.Result.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "cosmos.base.abci.v1beta1.Result.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.Result.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_Result_3_list{}) - } - listValue := &_Result_3_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.abci.v1beta1.Result.msg_responses": - if len(x.MsgResponses) == 0 { - return protoreflect.ValueOfList(&_Result_4_list{}) - } - listValue := &_Result_4_list{list: &x.MsgResponses} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Result")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Result 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_Result) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Result.data": - x.Data = value.Bytes() - case "cosmos.base.abci.v1beta1.Result.log": - x.Log = value.Interface().(string) - case "cosmos.base.abci.v1beta1.Result.events": - lv := value.List() - clv := lv.(*_Result_3_list) - x.Events = *clv.list - case "cosmos.base.abci.v1beta1.Result.msg_responses": - lv := value.List() - clv := lv.(*_Result_4_list) - x.MsgResponses = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Result")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Result 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_Result) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Result.events": - if x.Events == nil { - x.Events = []*abci.Event{} - } - value := &_Result_3_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.Result.msg_responses": - if x.MsgResponses == nil { - x.MsgResponses = []*anypb.Any{} - } - value := &_Result_4_list{list: &x.MsgResponses} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.Result.data": - panic(fmt.Errorf("field data of message cosmos.base.abci.v1beta1.Result is not mutable")) - case "cosmos.base.abci.v1beta1.Result.log": - panic(fmt.Errorf("field log of message cosmos.base.abci.v1beta1.Result is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Result")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Result 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_Result) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.Result.data": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.abci.v1beta1.Result.log": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.Result.events": - list := []*abci.Event{} - return protoreflect.ValueOfList(&_Result_3_list{list: &list}) - case "cosmos.base.abci.v1beta1.Result.msg_responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_Result_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.Result")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.Result 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_Result) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.Result", 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_Result) 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_Result) 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_Result) 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_Result) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Result) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.MsgResponses) > 0 { - for _, e := range x.MsgResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Result) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MsgResponses) > 0 { - for iNdEx := len(x.MsgResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MsgResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x12 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - 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().(*Result) - 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: Result: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Result: 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 Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &abci.Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MsgResponses = append(x.MsgResponses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MsgResponses[len(x.MsgResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SimulationResponse protoreflect.MessageDescriptor - fd_SimulationResponse_gas_info protoreflect.FieldDescriptor - fd_SimulationResponse_result protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_SimulationResponse = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("SimulationResponse") - fd_SimulationResponse_gas_info = md_SimulationResponse.Fields().ByName("gas_info") - fd_SimulationResponse_result = md_SimulationResponse.Fields().ByName("result") -} - -var _ protoreflect.Message = (*fastReflection_SimulationResponse)(nil) - -type fastReflection_SimulationResponse SimulationResponse - -func (x *SimulationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SimulationResponse)(x) -} - -func (x *SimulationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_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_SimulationResponse_messageType fastReflection_SimulationResponse_messageType -var _ protoreflect.MessageType = fastReflection_SimulationResponse_messageType{} - -type fastReflection_SimulationResponse_messageType struct{} - -func (x fastReflection_SimulationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SimulationResponse)(nil) -} -func (x fastReflection_SimulationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SimulationResponse) -} -func (x fastReflection_SimulationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SimulationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SimulationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SimulationResponse -} - -// 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_SimulationResponse) Type() protoreflect.MessageType { - return _fastReflection_SimulationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SimulationResponse) New() protoreflect.Message { - return new(fastReflection_SimulationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SimulationResponse) Interface() protoreflect.ProtoMessage { - return (*SimulationResponse)(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_SimulationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GasInfo != nil { - value := protoreflect.ValueOfMessage(x.GasInfo.ProtoReflect()) - if !f(fd_SimulationResponse_gas_info, value) { - return - } - } - if x.Result != nil { - value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) - if !f(fd_SimulationResponse_result, 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_SimulationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SimulationResponse.gas_info": - return x.GasInfo != nil - case "cosmos.base.abci.v1beta1.SimulationResponse.result": - return x.Result != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SimulationResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SimulationResponse 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_SimulationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SimulationResponse.gas_info": - x.GasInfo = nil - case "cosmos.base.abci.v1beta1.SimulationResponse.result": - x.Result = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SimulationResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SimulationResponse 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_SimulationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.SimulationResponse.gas_info": - value := x.GasInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.abci.v1beta1.SimulationResponse.result": - value := x.Result - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SimulationResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SimulationResponse 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_SimulationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SimulationResponse.gas_info": - x.GasInfo = value.Message().Interface().(*GasInfo) - case "cosmos.base.abci.v1beta1.SimulationResponse.result": - x.Result = value.Message().Interface().(*Result) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SimulationResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SimulationResponse 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_SimulationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SimulationResponse.gas_info": - if x.GasInfo == nil { - x.GasInfo = new(GasInfo) - } - return protoreflect.ValueOfMessage(x.GasInfo.ProtoReflect()) - case "cosmos.base.abci.v1beta1.SimulationResponse.result": - if x.Result == nil { - x.Result = new(Result) - } - return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SimulationResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SimulationResponse 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_SimulationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SimulationResponse.gas_info": - m := new(GasInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.abci.v1beta1.SimulationResponse.result": - m := new(Result) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SimulationResponse")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SimulationResponse 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_SimulationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.SimulationResponse", 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_SimulationResponse) 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_SimulationResponse) 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_SimulationResponse) 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_SimulationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SimulationResponse) - 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.GasInfo != nil { - l = options.Size(x.GasInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Result != nil { - l = options.Size(x.Result) - 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().(*SimulationResponse) - 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.Result != nil { - encoded, err := options.Marshal(x.Result) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.GasInfo != nil { - encoded, err := options.Marshal(x.GasInfo) - 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().(*SimulationResponse) - 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: SimulationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulationResponse: 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 GasInfo", 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.GasInfo == nil { - x.GasInfo = &GasInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GasInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { - x.Result = &Result{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); 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_MsgData protoreflect.MessageDescriptor - fd_MsgData_msg_type protoreflect.FieldDescriptor - fd_MsgData_data protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_MsgData = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("MsgData") - fd_MsgData_msg_type = md_MsgData.Fields().ByName("msg_type") - fd_MsgData_data = md_MsgData.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_MsgData)(nil) - -type fastReflection_MsgData MsgData - -func (x *MsgData) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgData)(x) -} - -func (x *MsgData) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgData_messageType fastReflection_MsgData_messageType -var _ protoreflect.MessageType = fastReflection_MsgData_messageType{} - -type fastReflection_MsgData_messageType struct{} - -func (x fastReflection_MsgData_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgData)(nil) -} -func (x fastReflection_MsgData_messageType) New() protoreflect.Message { - return new(fastReflection_MsgData) -} -func (x fastReflection_MsgData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgData) Descriptor() protoreflect.MessageDescriptor { - return md_MsgData -} - -// 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_MsgData) Type() protoreflect.MessageType { - return _fastReflection_MsgData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgData) New() protoreflect.Message { - return new(fastReflection_MsgData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgData) Interface() protoreflect.ProtoMessage { - return (*MsgData)(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_MsgData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MsgType != "" { - value := protoreflect.ValueOfString(x.MsgType) - if !f(fd_MsgData_msg_type, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_MsgData_data, 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_MsgData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.MsgData.msg_type": - return x.MsgType != "" - case "cosmos.base.abci.v1beta1.MsgData.data": - return len(x.Data) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.MsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.MsgData 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_MsgData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.MsgData.msg_type": - x.MsgType = "" - case "cosmos.base.abci.v1beta1.MsgData.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.MsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.MsgData 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_MsgData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.MsgData.msg_type": - value := x.MsgType - return protoreflect.ValueOfString(value) - case "cosmos.base.abci.v1beta1.MsgData.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.MsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.MsgData 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_MsgData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.MsgData.msg_type": - x.MsgType = value.Interface().(string) - case "cosmos.base.abci.v1beta1.MsgData.data": - x.Data = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.MsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.MsgData 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_MsgData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.MsgData.msg_type": - panic(fmt.Errorf("field msg_type of message cosmos.base.abci.v1beta1.MsgData is not mutable")) - case "cosmos.base.abci.v1beta1.MsgData.data": - panic(fmt.Errorf("field data of message cosmos.base.abci.v1beta1.MsgData is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.MsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.MsgData 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_MsgData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.MsgData.msg_type": - return protoreflect.ValueOfString("") - case "cosmos.base.abci.v1beta1.MsgData.data": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.MsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.MsgData 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_MsgData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.MsgData", 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_MsgData) 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_MsgData) 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_MsgData) 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_MsgData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.MsgType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x12 - } - if len(x.MsgType) > 0 { - i -= len(x.MsgType) - copy(dAtA[i:], x.MsgType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgType))) - 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().(*MsgData) - 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: MsgData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgData: 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 MsgType", 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.MsgType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TxMsgData_1_list)(nil) - -type _TxMsgData_1_list struct { - list *[]*MsgData -} - -func (x *_TxMsgData_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxMsgData_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxMsgData_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MsgData) - (*x.list)[i] = concreteValue -} - -func (x *_TxMsgData_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MsgData) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxMsgData_1_list) AppendMutable() protoreflect.Value { - v := new(MsgData) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxMsgData_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxMsgData_1_list) NewElement() protoreflect.Value { - v := new(MsgData) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxMsgData_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TxMsgData_2_list)(nil) - -type _TxMsgData_2_list struct { - list *[]*anypb.Any -} - -func (x *_TxMsgData_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxMsgData_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxMsgData_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TxMsgData_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxMsgData_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxMsgData_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxMsgData_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxMsgData_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TxMsgData protoreflect.MessageDescriptor - fd_TxMsgData_data protoreflect.FieldDescriptor - fd_TxMsgData_msg_responses protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_TxMsgData = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("TxMsgData") - fd_TxMsgData_data = md_TxMsgData.Fields().ByName("data") - fd_TxMsgData_msg_responses = md_TxMsgData.Fields().ByName("msg_responses") -} - -var _ protoreflect.Message = (*fastReflection_TxMsgData)(nil) - -type fastReflection_TxMsgData TxMsgData - -func (x *TxMsgData) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxMsgData)(x) -} - -func (x *TxMsgData) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TxMsgData_messageType fastReflection_TxMsgData_messageType -var _ protoreflect.MessageType = fastReflection_TxMsgData_messageType{} - -type fastReflection_TxMsgData_messageType struct{} - -func (x fastReflection_TxMsgData_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxMsgData)(nil) -} -func (x fastReflection_TxMsgData_messageType) New() protoreflect.Message { - return new(fastReflection_TxMsgData) -} -func (x fastReflection_TxMsgData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxMsgData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxMsgData) Descriptor() protoreflect.MessageDescriptor { - return md_TxMsgData -} - -// 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_TxMsgData) Type() protoreflect.MessageType { - return _fastReflection_TxMsgData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxMsgData) New() protoreflect.Message { - return new(fastReflection_TxMsgData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxMsgData) Interface() protoreflect.ProtoMessage { - return (*TxMsgData)(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_TxMsgData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfList(&_TxMsgData_1_list{list: &x.Data}) - if !f(fd_TxMsgData_data, value) { - return - } - } - if len(x.MsgResponses) != 0 { - value := protoreflect.ValueOfList(&_TxMsgData_2_list{list: &x.MsgResponses}) - if !f(fd_TxMsgData_msg_responses, 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_TxMsgData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxMsgData.data": - return len(x.Data) != 0 - case "cosmos.base.abci.v1beta1.TxMsgData.msg_responses": - return len(x.MsgResponses) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxMsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxMsgData 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_TxMsgData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxMsgData.data": - x.Data = nil - case "cosmos.base.abci.v1beta1.TxMsgData.msg_responses": - x.MsgResponses = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxMsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxMsgData 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_TxMsgData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.TxMsgData.data": - if len(x.Data) == 0 { - return protoreflect.ValueOfList(&_TxMsgData_1_list{}) - } - listValue := &_TxMsgData_1_list{list: &x.Data} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.abci.v1beta1.TxMsgData.msg_responses": - if len(x.MsgResponses) == 0 { - return protoreflect.ValueOfList(&_TxMsgData_2_list{}) - } - listValue := &_TxMsgData_2_list{list: &x.MsgResponses} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxMsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxMsgData 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_TxMsgData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxMsgData.data": - lv := value.List() - clv := lv.(*_TxMsgData_1_list) - x.Data = *clv.list - case "cosmos.base.abci.v1beta1.TxMsgData.msg_responses": - lv := value.List() - clv := lv.(*_TxMsgData_2_list) - x.MsgResponses = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxMsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxMsgData 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_TxMsgData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxMsgData.data": - if x.Data == nil { - x.Data = []*MsgData{} - } - value := &_TxMsgData_1_list{list: &x.Data} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.TxMsgData.msg_responses": - if x.MsgResponses == nil { - x.MsgResponses = []*anypb.Any{} - } - value := &_TxMsgData_2_list{list: &x.MsgResponses} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxMsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxMsgData 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_TxMsgData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.TxMsgData.data": - list := []*MsgData{} - return protoreflect.ValueOfList(&_TxMsgData_1_list{list: &list}) - case "cosmos.base.abci.v1beta1.TxMsgData.msg_responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TxMsgData_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.TxMsgData")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.TxMsgData 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_TxMsgData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.TxMsgData", 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_TxMsgData) 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_TxMsgData) 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_TxMsgData) 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_TxMsgData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxMsgData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Data) > 0 { - for _, e := range x.Data { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.MsgResponses) > 0 { - for _, e := range x.MsgResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TxMsgData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MsgResponses) > 0 { - for iNdEx := len(x.MsgResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MsgResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Data) > 0 { - for iNdEx := len(x.Data) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Data[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TxMsgData) - 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: TxMsgData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxMsgData: 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 Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data, &MsgData{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Data[len(x.Data)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MsgResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MsgResponses = append(x.MsgResponses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MsgResponses[len(x.MsgResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_SearchTxsResult_6_list)(nil) - -type _SearchTxsResult_6_list struct { - list *[]*TxResponse -} - -func (x *_SearchTxsResult_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_SearchTxsResult_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_SearchTxsResult_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TxResponse) - (*x.list)[i] = concreteValue -} - -func (x *_SearchTxsResult_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TxResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_SearchTxsResult_6_list) AppendMutable() protoreflect.Value { - v := new(TxResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SearchTxsResult_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_SearchTxsResult_6_list) NewElement() protoreflect.Value { - v := new(TxResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SearchTxsResult_6_list) IsValid() bool { - return x.list != nil -} - -var ( - md_SearchTxsResult protoreflect.MessageDescriptor - fd_SearchTxsResult_total_count protoreflect.FieldDescriptor - fd_SearchTxsResult_count protoreflect.FieldDescriptor - fd_SearchTxsResult_page_number protoreflect.FieldDescriptor - fd_SearchTxsResult_page_total protoreflect.FieldDescriptor - fd_SearchTxsResult_limit protoreflect.FieldDescriptor - fd_SearchTxsResult_txs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_abci_v1beta1_abci_proto_init() - md_SearchTxsResult = File_cosmos_base_abci_v1beta1_abci_proto.Messages().ByName("SearchTxsResult") - fd_SearchTxsResult_total_count = md_SearchTxsResult.Fields().ByName("total_count") - fd_SearchTxsResult_count = md_SearchTxsResult.Fields().ByName("count") - fd_SearchTxsResult_page_number = md_SearchTxsResult.Fields().ByName("page_number") - fd_SearchTxsResult_page_total = md_SearchTxsResult.Fields().ByName("page_total") - fd_SearchTxsResult_limit = md_SearchTxsResult.Fields().ByName("limit") - fd_SearchTxsResult_txs = md_SearchTxsResult.Fields().ByName("txs") -} - -var _ protoreflect.Message = (*fastReflection_SearchTxsResult)(nil) - -type fastReflection_SearchTxsResult SearchTxsResult - -func (x *SearchTxsResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_SearchTxsResult)(x) -} - -func (x *SearchTxsResult) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SearchTxsResult_messageType fastReflection_SearchTxsResult_messageType -var _ protoreflect.MessageType = fastReflection_SearchTxsResult_messageType{} - -type fastReflection_SearchTxsResult_messageType struct{} - -func (x fastReflection_SearchTxsResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_SearchTxsResult)(nil) -} -func (x fastReflection_SearchTxsResult_messageType) New() protoreflect.Message { - return new(fastReflection_SearchTxsResult) -} -func (x fastReflection_SearchTxsResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SearchTxsResult -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SearchTxsResult) Descriptor() protoreflect.MessageDescriptor { - return md_SearchTxsResult -} - -// 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_SearchTxsResult) Type() protoreflect.MessageType { - return _fastReflection_SearchTxsResult_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SearchTxsResult) New() protoreflect.Message { - return new(fastReflection_SearchTxsResult) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SearchTxsResult) Interface() protoreflect.ProtoMessage { - return (*SearchTxsResult)(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_SearchTxsResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.TotalCount != uint64(0) { - value := protoreflect.ValueOfUint64(x.TotalCount) - if !f(fd_SearchTxsResult_total_count, value) { - return - } - } - if x.Count != uint64(0) { - value := protoreflect.ValueOfUint64(x.Count) - if !f(fd_SearchTxsResult_count, value) { - return - } - } - if x.PageNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.PageNumber) - if !f(fd_SearchTxsResult_page_number, value) { - return - } - } - if x.PageTotal != uint64(0) { - value := protoreflect.ValueOfUint64(x.PageTotal) - if !f(fd_SearchTxsResult_page_total, value) { - return - } - } - if x.Limit != uint64(0) { - value := protoreflect.ValueOfUint64(x.Limit) - if !f(fd_SearchTxsResult_limit, value) { - return - } - } - if len(x.Txs) != 0 { - value := protoreflect.ValueOfList(&_SearchTxsResult_6_list{list: &x.Txs}) - if !f(fd_SearchTxsResult_txs, 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_SearchTxsResult) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SearchTxsResult.total_count": - return x.TotalCount != uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.count": - return x.Count != uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_number": - return x.PageNumber != uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_total": - return x.PageTotal != uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.limit": - return x.Limit != uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.txs": - return len(x.Txs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SearchTxsResult")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SearchTxsResult 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_SearchTxsResult) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SearchTxsResult.total_count": - x.TotalCount = uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.count": - x.Count = uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_number": - x.PageNumber = uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_total": - x.PageTotal = uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.limit": - x.Limit = uint64(0) - case "cosmos.base.abci.v1beta1.SearchTxsResult.txs": - x.Txs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SearchTxsResult")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SearchTxsResult 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_SearchTxsResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.abci.v1beta1.SearchTxsResult.total_count": - value := x.TotalCount - return protoreflect.ValueOfUint64(value) - case "cosmos.base.abci.v1beta1.SearchTxsResult.count": - value := x.Count - return protoreflect.ValueOfUint64(value) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_number": - value := x.PageNumber - return protoreflect.ValueOfUint64(value) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_total": - value := x.PageTotal - return protoreflect.ValueOfUint64(value) - case "cosmos.base.abci.v1beta1.SearchTxsResult.limit": - value := x.Limit - return protoreflect.ValueOfUint64(value) - case "cosmos.base.abci.v1beta1.SearchTxsResult.txs": - if len(x.Txs) == 0 { - return protoreflect.ValueOfList(&_SearchTxsResult_6_list{}) - } - listValue := &_SearchTxsResult_6_list{list: &x.Txs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SearchTxsResult")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SearchTxsResult 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_SearchTxsResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SearchTxsResult.total_count": - x.TotalCount = value.Uint() - case "cosmos.base.abci.v1beta1.SearchTxsResult.count": - x.Count = value.Uint() - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_number": - x.PageNumber = value.Uint() - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_total": - x.PageTotal = value.Uint() - case "cosmos.base.abci.v1beta1.SearchTxsResult.limit": - x.Limit = value.Uint() - case "cosmos.base.abci.v1beta1.SearchTxsResult.txs": - lv := value.List() - clv := lv.(*_SearchTxsResult_6_list) - x.Txs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SearchTxsResult")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SearchTxsResult 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_SearchTxsResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SearchTxsResult.txs": - if x.Txs == nil { - x.Txs = []*TxResponse{} - } - value := &_SearchTxsResult_6_list{list: &x.Txs} - return protoreflect.ValueOfList(value) - case "cosmos.base.abci.v1beta1.SearchTxsResult.total_count": - panic(fmt.Errorf("field total_count of message cosmos.base.abci.v1beta1.SearchTxsResult is not mutable")) - case "cosmos.base.abci.v1beta1.SearchTxsResult.count": - panic(fmt.Errorf("field count of message cosmos.base.abci.v1beta1.SearchTxsResult is not mutable")) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_number": - panic(fmt.Errorf("field page_number of message cosmos.base.abci.v1beta1.SearchTxsResult is not mutable")) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_total": - panic(fmt.Errorf("field page_total of message cosmos.base.abci.v1beta1.SearchTxsResult is not mutable")) - case "cosmos.base.abci.v1beta1.SearchTxsResult.limit": - panic(fmt.Errorf("field limit of message cosmos.base.abci.v1beta1.SearchTxsResult is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SearchTxsResult")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SearchTxsResult 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_SearchTxsResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.abci.v1beta1.SearchTxsResult.total_count": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.abci.v1beta1.SearchTxsResult.count": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.abci.v1beta1.SearchTxsResult.page_total": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.abci.v1beta1.SearchTxsResult.limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.abci.v1beta1.SearchTxsResult.txs": - list := []*TxResponse{} - return protoreflect.ValueOfList(&_SearchTxsResult_6_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.abci.v1beta1.SearchTxsResult")) - } - panic(fmt.Errorf("message cosmos.base.abci.v1beta1.SearchTxsResult 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_SearchTxsResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.abci.v1beta1.SearchTxsResult", 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_SearchTxsResult) 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_SearchTxsResult) 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_SearchTxsResult) 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_SearchTxsResult) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SearchTxsResult) - 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.TotalCount != 0 { - n += 1 + runtime.Sov(uint64(x.TotalCount)) - } - if x.Count != 0 { - n += 1 + runtime.Sov(uint64(x.Count)) - } - if x.PageNumber != 0 { - n += 1 + runtime.Sov(uint64(x.PageNumber)) - } - if x.PageTotal != 0 { - n += 1 + runtime.Sov(uint64(x.PageTotal)) - } - if x.Limit != 0 { - n += 1 + runtime.Sov(uint64(x.Limit)) - } - if len(x.Txs) > 0 { - for _, e := range x.Txs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SearchTxsResult) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Txs) > 0 { - for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Txs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - } - if x.Limit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Limit)) - i-- - dAtA[i] = 0x28 - } - if x.PageTotal != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PageTotal)) - i-- - dAtA[i] = 0x20 - } - if x.PageNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PageNumber)) - i-- - dAtA[i] = 0x18 - } - if x.Count != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Count)) - i-- - dAtA[i] = 0x10 - } - if x.TotalCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalCount)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SearchTxsResult) - 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: SearchTxsResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SearchTxsResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalCount", wireType) - } - x.TotalCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TotalCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - x.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Count |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PageNumber", wireType) - } - x.PageNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PageNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PageTotal", wireType) - } - x.PageTotal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PageTotal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - x.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Txs = append(x.Txs, &TxResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Txs[len(x.Txs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/abci/v1beta1/abci.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// TxResponse defines a structure containing relevant tx data and metadata. The -// tags are stringified and the log is JSON decoded. -type TxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The block height - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The transaction hash. - Txhash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` - // Namespace for the Code - Codespace string `protobuf:"bytes,3,opt,name=codespace,proto3" json:"codespace,omitempty"` - // Response code. - Code uint32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"` - // Result bytes, if any. - Data string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` - // The output of the application's logger (raw string). May be - // non-deterministic. - RawLog string `protobuf:"bytes,6,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` - // The output of the application's logger (typed). May be non-deterministic. - Logs []*ABCIMessageLog `protobuf:"bytes,7,rep,name=logs,proto3" json:"logs,omitempty"` - // Additional information. May be non-deterministic. - Info string `protobuf:"bytes,8,opt,name=info,proto3" json:"info,omitempty"` - // Amount of gas requested for transaction. - GasWanted int64 `protobuf:"varint,9,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - // Amount of gas consumed by transaction. - GasUsed int64 `protobuf:"varint,10,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - // The request transaction bytes. - Tx *anypb.Any `protobuf:"bytes,11,opt,name=tx,proto3" json:"tx,omitempty"` - // Time of the previous block. For heights > 1, it's the weighted median of - // the timestamps of the valid votes in the block.LastCommit. For height == 1, - // it's genesis time. - Timestamp string `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Events defines all the events emitted by processing a transaction. Note, - // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with - // additional metadata, emitted only by processing the messages. - // - // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - Events []*abci.Event `protobuf:"bytes,13,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *TxResponse) Reset() { - *x = TxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxResponse) ProtoMessage() {} - -// Deprecated: Use TxResponse.ProtoReflect.Descriptor instead. -func (*TxResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{0} -} - -func (x *TxResponse) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *TxResponse) GetTxhash() string { - if x != nil { - return x.Txhash - } - return "" -} - -func (x *TxResponse) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -func (x *TxResponse) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *TxResponse) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *TxResponse) GetRawLog() string { - if x != nil { - return x.RawLog - } - return "" -} - -func (x *TxResponse) GetLogs() []*ABCIMessageLog { - if x != nil { - return x.Logs - } - return nil -} - -func (x *TxResponse) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *TxResponse) GetGasWanted() int64 { - if x != nil { - return x.GasWanted - } - return 0 -} - -func (x *TxResponse) GetGasUsed() int64 { - if x != nil { - return x.GasUsed - } - return 0 -} - -func (x *TxResponse) GetTx() *anypb.Any { - if x != nil { - return x.Tx - } - return nil -} - -func (x *TxResponse) GetTimestamp() string { - if x != nil { - return x.Timestamp - } - return "" -} - -func (x *TxResponse) GetEvents() []*abci.Event { - if x != nil { - return x.Events - } - return nil -} - -// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -type ABCIMessageLog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgIndex uint32 `protobuf:"varint,1,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"` - Log string `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"` - // Events contains a slice of Event objects that were emitted during some - // execution. - Events []*StringEvent `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *ABCIMessageLog) Reset() { - *x = ABCIMessageLog{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABCIMessageLog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABCIMessageLog) ProtoMessage() {} - -// Deprecated: Use ABCIMessageLog.ProtoReflect.Descriptor instead. -func (*ABCIMessageLog) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{1} -} - -func (x *ABCIMessageLog) GetMsgIndex() uint32 { - if x != nil { - return x.MsgIndex - } - return 0 -} - -func (x *ABCIMessageLog) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ABCIMessageLog) GetEvents() []*StringEvent { - if x != nil { - return x.Events - } - return nil -} - -// StringEvent defines en Event object wrapper where all the attributes -// contain key/value pairs that are strings instead of raw bytes. -type StringEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *StringEvent) Reset() { - *x = StringEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StringEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringEvent) ProtoMessage() {} - -// Deprecated: Use StringEvent.ProtoReflect.Descriptor instead. -func (*StringEvent) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{2} -} - -func (x *StringEvent) GetType_() string { - if x != nil { - return x.Type_ - } - return "" -} - -func (x *StringEvent) GetAttributes() []*Attribute { - if x != nil { - return x.Attributes - } - return nil -} - -// Attribute defines an attribute wrapper where the key and value are -// strings instead of raw bytes. -type Attribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Attribute) Reset() { - *x = Attribute{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Attribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Attribute) ProtoMessage() {} - -// Deprecated: Use Attribute.ProtoReflect.Descriptor instead. -func (*Attribute) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{3} -} - -func (x *Attribute) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Attribute) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// GasInfo defines tx execution gas context. -type GasInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // GasWanted is the maximum units of work we allow this tx to perform. - GasWanted uint64 `protobuf:"varint,1,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - // GasUsed is the amount of gas actually consumed. - GasUsed uint64 `protobuf:"varint,2,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` -} - -func (x *GasInfo) Reset() { - *x = GasInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GasInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GasInfo) ProtoMessage() {} - -// Deprecated: Use GasInfo.ProtoReflect.Descriptor instead. -func (*GasInfo) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{4} -} - -func (x *GasInfo) GetGasWanted() uint64 { - if x != nil { - return x.GasWanted - } - return 0 -} - -func (x *GasInfo) GetGasUsed() uint64 { - if x != nil { - return x.GasUsed - } - return 0 -} - -// Result is the union of ResponseFormat and ResponseCheckTx. -type Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Data is any data returned from message or handler execution. It MUST be - // length prefixed in order to separate data from multiple message executions. - // Deprecated. This field is still populated, but prefer msg_response instead - // because it also contains the Msg response typeURL. - // - // Deprecated: Do not use. - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - // Log contains the log information from message or handler execution. - Log string `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"` - // Events contains a slice of Event objects that were emitted during message - // or handler execution. - Events []*abci.Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - // msg_responses contains the Msg handler responses type packed in Anys. - // - // Since: cosmos-sdk 0.46 - MsgResponses []*anypb.Any `protobuf:"bytes,4,rep,name=msg_responses,json=msgResponses,proto3" json:"msg_responses,omitempty"` -} - -func (x *Result) Reset() { - *x = Result{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Result) ProtoMessage() {} - -// Deprecated: Use Result.ProtoReflect.Descriptor instead. -func (*Result) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{5} -} - -// Deprecated: Do not use. -func (x *Result) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *Result) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *Result) GetEvents() []*abci.Event { - if x != nil { - return x.Events - } - return nil -} - -func (x *Result) GetMsgResponses() []*anypb.Any { - if x != nil { - return x.MsgResponses - } - return nil -} - -// SimulationResponse defines the response generated when a transaction is -// successfully simulated. -type SimulationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GasInfo *GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *SimulationResponse) Reset() { - *x = SimulationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimulationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimulationResponse) ProtoMessage() {} - -// Deprecated: Use SimulationResponse.ProtoReflect.Descriptor instead. -func (*SimulationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{6} -} - -func (x *SimulationResponse) GetGasInfo() *GasInfo { - if x != nil { - return x.GasInfo - } - return nil -} - -func (x *SimulationResponse) GetResult() *Result { - if x != nil { - return x.Result - } - return nil -} - -// MsgData defines the data returned in a Result object during message -// execution. -// -// Deprecated: Do not use. -type MsgData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgType string `protobuf:"bytes,1,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *MsgData) Reset() { - *x = MsgData{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgData) ProtoMessage() {} - -// Deprecated: Use MsgData.ProtoReflect.Descriptor instead. -func (*MsgData) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{7} -} - -func (x *MsgData) GetMsgType() string { - if x != nil { - return x.MsgType - } - return "" -} - -func (x *MsgData) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -// for each message. -type TxMsgData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // data field is deprecated and not populated. - // - // Deprecated: Do not use. - Data []*MsgData `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` - // msg_responses contains the Msg handler responses packed into Anys. - // - // Since: cosmos-sdk 0.46 - MsgResponses []*anypb.Any `protobuf:"bytes,2,rep,name=msg_responses,json=msgResponses,proto3" json:"msg_responses,omitempty"` -} - -func (x *TxMsgData) Reset() { - *x = TxMsgData{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxMsgData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxMsgData) ProtoMessage() {} - -// Deprecated: Use TxMsgData.ProtoReflect.Descriptor instead. -func (*TxMsgData) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{8} -} - -// Deprecated: Do not use. -func (x *TxMsgData) GetData() []*MsgData { - if x != nil { - return x.Data - } - return nil -} - -func (x *TxMsgData) GetMsgResponses() []*anypb.Any { - if x != nil { - return x.MsgResponses - } - return nil -} - -// SearchTxsResult defines a structure for querying txs pageable -type SearchTxsResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Count of all txs - TotalCount uint64 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // Count of txs in current page - Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` - // Index of current page, start from 1 - PageNumber uint64 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` - // Count of total pages - PageTotal uint64 `protobuf:"varint,4,opt,name=page_total,json=pageTotal,proto3" json:"page_total,omitempty"` - // Max count txs per page - Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` - // List of txs in current page - Txs []*TxResponse `protobuf:"bytes,6,rep,name=txs,proto3" json:"txs,omitempty"` -} - -func (x *SearchTxsResult) Reset() { - *x = SearchTxsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchTxsResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchTxsResult) ProtoMessage() {} - -// Deprecated: Use SearchTxsResult.ProtoReflect.Descriptor instead. -func (*SearchTxsResult) Descriptor() ([]byte, []int) { - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP(), []int{9} -} - -func (x *SearchTxsResult) GetTotalCount() uint64 { - if x != nil { - return x.TotalCount - } - return 0 -} - -func (x *SearchTxsResult) GetCount() uint64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *SearchTxsResult) GetPageNumber() uint64 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *SearchTxsResult) GetPageTotal() uint64 { - if x != nil { - return x.PageTotal - } - return 0 -} - -func (x *SearchTxsResult) GetLimit() uint64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *SearchTxsResult) GetTxs() []*TxResponse { - if x != nil { - return x.Txs - } - return nil -} - -var File_cosmos_base_abci_v1beta1_abci_proto protoreflect.FileDescriptor - -var file_cosmos_base_abci_v1beta1_abci_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x61, 0x62, - 0x63, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x03, - 0x0a, 0x0a, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xe2, 0xde, 0x1f, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, - 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x61, 0x77, 0x4c, 0x6f, 0x67, 0x12, 0x55, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x41, 0x42, 0x43, 0x49, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x67, 0x42, - 0x17, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x0f, 0x41, 0x42, 0x43, 0x49, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x02, - 0x74, 0x78, 0x18, 0x0b, 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, 0x52, 0x02, - 0x74, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x34, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xa9, 0x01, 0x0a, - 0x0e, 0x41, 0x42, 0x43, 0x49, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x67, 0x12, - 0x2a, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x42, 0x0d, 0xea, 0xde, 0x1f, 0x09, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6c, - 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x53, 0x0a, - 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x42, 0x14, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x0c, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x3a, 0x04, 0x80, 0xdc, 0x20, 0x01, 0x22, 0x72, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x04, 0x80, 0xdc, 0x20, 0x01, 0x22, 0x33, 0x0a, 0x09, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x43, 0x0a, 0x07, 0x47, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, - 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, - 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, - 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x34, 0x0a, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x18, 0x04, 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, 0x52, 0x0c, - 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x3a, 0x04, 0x88, 0xa0, - 0x1f, 0x00, 0x22, 0x96, 0x01, 0x0a, 0x12, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x67, 0x61, 0x73, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x07, 0x67, 0x61, 0x73, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x40, 0x0a, 0x07, 0x4d, - 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x06, 0x18, 0x01, 0x80, 0xdc, 0x20, 0x01, 0x22, 0x87, 0x01, - 0x0a, 0x09, 0x54, 0x78, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, 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, 0x52, 0x0c, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x3a, 0x04, 0x80, 0xdc, 0x20, 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x36, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x03, 0x74, 0x78, 0x73, - 0x3a, 0x04, 0x80, 0xdc, 0x20, 0x01, 0x42, 0xf7, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x41, 0x62, 0x63, 0x69, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x61, 0x62, 0x63, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, - 0x41, 0xaa, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, - 0x41, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x18, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x41, 0x62, 0x63, 0x69, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x41, 0x62, 0x63, 0x69, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x41, - 0x62, 0x63, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xd8, 0xe1, 0x1e, 0x00, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_abci_v1beta1_abci_proto_rawDescOnce sync.Once - file_cosmos_base_abci_v1beta1_abci_proto_rawDescData = file_cosmos_base_abci_v1beta1_abci_proto_rawDesc -) - -func file_cosmos_base_abci_v1beta1_abci_proto_rawDescGZIP() []byte { - file_cosmos_base_abci_v1beta1_abci_proto_rawDescOnce.Do(func() { - file_cosmos_base_abci_v1beta1_abci_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_abci_v1beta1_abci_proto_rawDescData) - }) - return file_cosmos_base_abci_v1beta1_abci_proto_rawDescData -} - -var file_cosmos_base_abci_v1beta1_abci_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_cosmos_base_abci_v1beta1_abci_proto_goTypes = []interface{}{ - (*TxResponse)(nil), // 0: cosmos.base.abci.v1beta1.TxResponse - (*ABCIMessageLog)(nil), // 1: cosmos.base.abci.v1beta1.ABCIMessageLog - (*StringEvent)(nil), // 2: cosmos.base.abci.v1beta1.StringEvent - (*Attribute)(nil), // 3: cosmos.base.abci.v1beta1.Attribute - (*GasInfo)(nil), // 4: cosmos.base.abci.v1beta1.GasInfo - (*Result)(nil), // 5: cosmos.base.abci.v1beta1.Result - (*SimulationResponse)(nil), // 6: cosmos.base.abci.v1beta1.SimulationResponse - (*MsgData)(nil), // 7: cosmos.base.abci.v1beta1.MsgData - (*TxMsgData)(nil), // 8: cosmos.base.abci.v1beta1.TxMsgData - (*SearchTxsResult)(nil), // 9: cosmos.base.abci.v1beta1.SearchTxsResult - (*anypb.Any)(nil), // 10: google.protobuf.Any - (*abci.Event)(nil), // 11: tendermint.abci.Event -} -var file_cosmos_base_abci_v1beta1_abci_proto_depIdxs = []int32{ - 1, // 0: cosmos.base.abci.v1beta1.TxResponse.logs:type_name -> cosmos.base.abci.v1beta1.ABCIMessageLog - 10, // 1: cosmos.base.abci.v1beta1.TxResponse.tx:type_name -> google.protobuf.Any - 11, // 2: cosmos.base.abci.v1beta1.TxResponse.events:type_name -> tendermint.abci.Event - 2, // 3: cosmos.base.abci.v1beta1.ABCIMessageLog.events:type_name -> cosmos.base.abci.v1beta1.StringEvent - 3, // 4: cosmos.base.abci.v1beta1.StringEvent.attributes:type_name -> cosmos.base.abci.v1beta1.Attribute - 11, // 5: cosmos.base.abci.v1beta1.Result.events:type_name -> tendermint.abci.Event - 10, // 6: cosmos.base.abci.v1beta1.Result.msg_responses:type_name -> google.protobuf.Any - 4, // 7: cosmos.base.abci.v1beta1.SimulationResponse.gas_info:type_name -> cosmos.base.abci.v1beta1.GasInfo - 5, // 8: cosmos.base.abci.v1beta1.SimulationResponse.result:type_name -> cosmos.base.abci.v1beta1.Result - 7, // 9: cosmos.base.abci.v1beta1.TxMsgData.data:type_name -> cosmos.base.abci.v1beta1.MsgData - 10, // 10: cosmos.base.abci.v1beta1.TxMsgData.msg_responses:type_name -> google.protobuf.Any - 0, // 11: cosmos.base.abci.v1beta1.SearchTxsResult.txs:type_name -> cosmos.base.abci.v1beta1.TxResponse - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_cosmos_base_abci_v1beta1_abci_proto_init() } -func file_cosmos_base_abci_v1beta1_abci_proto_init() { - if File_cosmos_base_abci_v1beta1_abci_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABCIMessageLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Attribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GasInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxMsgData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_abci_v1beta1_abci_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchTxsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_abci_v1beta1_abci_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_abci_v1beta1_abci_proto_goTypes, - DependencyIndexes: file_cosmos_base_abci_v1beta1_abci_proto_depIdxs, - MessageInfos: file_cosmos_base_abci_v1beta1_abci_proto_msgTypes, - }.Build() - File_cosmos_base_abci_v1beta1_abci_proto = out.File - file_cosmos_base_abci_v1beta1_abci_proto_rawDesc = nil - file_cosmos_base_abci_v1beta1_abci_proto_goTypes = nil - file_cosmos_base_abci_v1beta1_abci_proto_depIdxs = nil -} diff --git a/api/cosmos/base/kv/v1beta1/kv.pulsar.go b/api/cosmos/base/kv/v1beta1/kv.pulsar.go deleted file mode 100644 index 661bbf471481..000000000000 --- a/api/cosmos/base/kv/v1beta1/kv.pulsar.go +++ /dev/null @@ -1,1198 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package kvv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Pairs_1_list)(nil) - -type _Pairs_1_list struct { - list *[]*Pair -} - -func (x *_Pairs_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Pairs_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Pairs_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Pair) - (*x.list)[i] = concreteValue -} - -func (x *_Pairs_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Pair) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Pairs_1_list) AppendMutable() protoreflect.Value { - v := new(Pair) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Pairs_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Pairs_1_list) NewElement() protoreflect.Value { - v := new(Pair) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Pairs_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Pairs protoreflect.MessageDescriptor - fd_Pairs_pairs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_kv_v1beta1_kv_proto_init() - md_Pairs = File_cosmos_base_kv_v1beta1_kv_proto.Messages().ByName("Pairs") - fd_Pairs_pairs = md_Pairs.Fields().ByName("pairs") -} - -var _ protoreflect.Message = (*fastReflection_Pairs)(nil) - -type fastReflection_Pairs Pairs - -func (x *Pairs) ProtoReflect() protoreflect.Message { - return (*fastReflection_Pairs)(x) -} - -func (x *Pairs) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_kv_v1beta1_kv_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Pairs_messageType fastReflection_Pairs_messageType -var _ protoreflect.MessageType = fastReflection_Pairs_messageType{} - -type fastReflection_Pairs_messageType struct{} - -func (x fastReflection_Pairs_messageType) Zero() protoreflect.Message { - return (*fastReflection_Pairs)(nil) -} -func (x fastReflection_Pairs_messageType) New() protoreflect.Message { - return new(fastReflection_Pairs) -} -func (x fastReflection_Pairs_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Pairs -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Pairs) Descriptor() protoreflect.MessageDescriptor { - return md_Pairs -} - -// 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_Pairs) Type() protoreflect.MessageType { - return _fastReflection_Pairs_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Pairs) New() protoreflect.Message { - return new(fastReflection_Pairs) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Pairs) Interface() protoreflect.ProtoMessage { - return (*Pairs)(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_Pairs) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Pairs) != 0 { - value := protoreflect.ValueOfList(&_Pairs_1_list{list: &x.Pairs}) - if !f(fd_Pairs_pairs, 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_Pairs) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pairs.pairs": - return len(x.Pairs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pairs")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pairs 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_Pairs) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pairs.pairs": - x.Pairs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pairs")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pairs 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_Pairs) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.kv.v1beta1.Pairs.pairs": - if len(x.Pairs) == 0 { - return protoreflect.ValueOfList(&_Pairs_1_list{}) - } - listValue := &_Pairs_1_list{list: &x.Pairs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pairs")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pairs 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_Pairs) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pairs.pairs": - lv := value.List() - clv := lv.(*_Pairs_1_list) - x.Pairs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pairs")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pairs 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_Pairs) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pairs.pairs": - if x.Pairs == nil { - x.Pairs = []*Pair{} - } - value := &_Pairs_1_list{list: &x.Pairs} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pairs")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pairs 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_Pairs) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pairs.pairs": - list := []*Pair{} - return protoreflect.ValueOfList(&_Pairs_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pairs")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pairs 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_Pairs) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.kv.v1beta1.Pairs", 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_Pairs) 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_Pairs) 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_Pairs) 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_Pairs) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Pairs) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Pairs) > 0 { - for _, e := range x.Pairs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Pairs) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Pairs) > 0 { - for iNdEx := len(x.Pairs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Pairs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Pairs) - 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: Pairs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Pairs: 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 Pairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Pairs = append(x.Pairs, &Pair{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pairs[len(x.Pairs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Pair protoreflect.MessageDescriptor - fd_Pair_key protoreflect.FieldDescriptor - fd_Pair_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_kv_v1beta1_kv_proto_init() - md_Pair = File_cosmos_base_kv_v1beta1_kv_proto.Messages().ByName("Pair") - fd_Pair_key = md_Pair.Fields().ByName("key") - fd_Pair_value = md_Pair.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_Pair)(nil) - -type fastReflection_Pair Pair - -func (x *Pair) ProtoReflect() protoreflect.Message { - return (*fastReflection_Pair)(x) -} - -func (x *Pair) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_kv_v1beta1_kv_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Pair_messageType fastReflection_Pair_messageType -var _ protoreflect.MessageType = fastReflection_Pair_messageType{} - -type fastReflection_Pair_messageType struct{} - -func (x fastReflection_Pair_messageType) Zero() protoreflect.Message { - return (*fastReflection_Pair)(nil) -} -func (x fastReflection_Pair_messageType) New() protoreflect.Message { - return new(fastReflection_Pair) -} -func (x fastReflection_Pair_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Pair -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Pair) Descriptor() protoreflect.MessageDescriptor { - return md_Pair -} - -// 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_Pair) Type() protoreflect.MessageType { - return _fastReflection_Pair_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Pair) New() protoreflect.Message { - return new(fastReflection_Pair) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Pair) Interface() protoreflect.ProtoMessage { - return (*Pair)(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_Pair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_Pair_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_Pair_value, 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_Pair) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pair.key": - return len(x.Key) != 0 - case "cosmos.base.kv.v1beta1.Pair.value": - return len(x.Value) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pair")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pair 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_Pair) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pair.key": - x.Key = nil - case "cosmos.base.kv.v1beta1.Pair.value": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pair")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pair 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_Pair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.kv.v1beta1.Pair.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.kv.v1beta1.Pair.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pair")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pair 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_Pair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pair.key": - x.Key = value.Bytes() - case "cosmos.base.kv.v1beta1.Pair.value": - x.Value = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pair")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pair 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_Pair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pair.key": - panic(fmt.Errorf("field key of message cosmos.base.kv.v1beta1.Pair is not mutable")) - case "cosmos.base.kv.v1beta1.Pair.value": - panic(fmt.Errorf("field value of message cosmos.base.kv.v1beta1.Pair is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pair")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pair 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_Pair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.kv.v1beta1.Pair.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.kv.v1beta1.Pair.value": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.kv.v1beta1.Pair")) - } - panic(fmt.Errorf("message cosmos.base.kv.v1beta1.Pair 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_Pair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.kv.v1beta1.Pair", 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_Pair) 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_Pair) 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_Pair) 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_Pair) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Pair) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Pair) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*Pair) - 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: Pair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Pair: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/kv/v1beta1/kv.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Pairs defines a repeated slice of Pair objects. -type Pairs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pairs []*Pair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"` -} - -func (x *Pairs) Reset() { - *x = Pairs{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_kv_v1beta1_kv_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pairs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pairs) ProtoMessage() {} - -// Deprecated: Use Pairs.ProtoReflect.Descriptor instead. -func (*Pairs) Descriptor() ([]byte, []int) { - return file_cosmos_base_kv_v1beta1_kv_proto_rawDescGZIP(), []int{0} -} - -func (x *Pairs) GetPairs() []*Pair { - if x != nil { - return x.Pairs - } - return nil -} - -// Pair defines a key/value bytes tuple. -type Pair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Pair) Reset() { - *x = Pair{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_kv_v1beta1_kv_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pair) ProtoMessage() {} - -// Deprecated: Use Pair.ProtoReflect.Descriptor instead. -func (*Pair) Descriptor() ([]byte, []int) { - return file_cosmos_base_kv_v1beta1_kv_proto_rawDescGZIP(), []int{1} -} - -func (x *Pair) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *Pair) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -var File_cosmos_base_kv_v1beta1_kv_proto protoreflect.FileDescriptor - -var file_cosmos_base_kv_v1beta1_kv_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x6b, 0x76, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6b, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6b, - 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x41, 0x0a, 0x05, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x70, 0x61, 0x69, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6b, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x69, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x70, 0x61, 0x69, - 0x72, 0x73, 0x22, 0x2e, 0x0a, 0x04, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0xe3, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6b, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x07, 0x4b, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x6b, 0x76, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6b, 0x76, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x42, 0x4b, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x2e, 0x4b, 0x76, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x4b, 0x76, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x4b, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x4b, 0x76, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_kv_v1beta1_kv_proto_rawDescOnce sync.Once - file_cosmos_base_kv_v1beta1_kv_proto_rawDescData = file_cosmos_base_kv_v1beta1_kv_proto_rawDesc -) - -func file_cosmos_base_kv_v1beta1_kv_proto_rawDescGZIP() []byte { - file_cosmos_base_kv_v1beta1_kv_proto_rawDescOnce.Do(func() { - file_cosmos_base_kv_v1beta1_kv_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_kv_v1beta1_kv_proto_rawDescData) - }) - return file_cosmos_base_kv_v1beta1_kv_proto_rawDescData -} - -var file_cosmos_base_kv_v1beta1_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_base_kv_v1beta1_kv_proto_goTypes = []interface{}{ - (*Pairs)(nil), // 0: cosmos.base.kv.v1beta1.Pairs - (*Pair)(nil), // 1: cosmos.base.kv.v1beta1.Pair -} -var file_cosmos_base_kv_v1beta1_kv_proto_depIdxs = []int32{ - 1, // 0: cosmos.base.kv.v1beta1.Pairs.pairs:type_name -> cosmos.base.kv.v1beta1.Pair - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_base_kv_v1beta1_kv_proto_init() } -func file_cosmos_base_kv_v1beta1_kv_proto_init() { - if File_cosmos_base_kv_v1beta1_kv_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_kv_v1beta1_kv_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pairs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_kv_v1beta1_kv_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_kv_v1beta1_kv_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_kv_v1beta1_kv_proto_goTypes, - DependencyIndexes: file_cosmos_base_kv_v1beta1_kv_proto_depIdxs, - MessageInfos: file_cosmos_base_kv_v1beta1_kv_proto_msgTypes, - }.Build() - File_cosmos_base_kv_v1beta1_kv_proto = out.File - file_cosmos_base_kv_v1beta1_kv_proto_rawDesc = nil - file_cosmos_base_kv_v1beta1_kv_proto_goTypes = nil - file_cosmos_base_kv_v1beta1_kv_proto_depIdxs = nil -} diff --git a/api/cosmos/base/query/v1beta1/pagination.pulsar.go b/api/cosmos/base/query/v1beta1/pagination.pulsar.go deleted file mode 100644 index ec8b00853c3e..000000000000 --- a/api/cosmos/base/query/v1beta1/pagination.pulsar.go +++ /dev/null @@ -1,1381 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package queryv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_PageRequest protoreflect.MessageDescriptor - fd_PageRequest_key protoreflect.FieldDescriptor - fd_PageRequest_offset protoreflect.FieldDescriptor - fd_PageRequest_limit protoreflect.FieldDescriptor - fd_PageRequest_count_total protoreflect.FieldDescriptor - fd_PageRequest_reverse protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_query_v1beta1_pagination_proto_init() - md_PageRequest = File_cosmos_base_query_v1beta1_pagination_proto.Messages().ByName("PageRequest") - fd_PageRequest_key = md_PageRequest.Fields().ByName("key") - fd_PageRequest_offset = md_PageRequest.Fields().ByName("offset") - fd_PageRequest_limit = md_PageRequest.Fields().ByName("limit") - fd_PageRequest_count_total = md_PageRequest.Fields().ByName("count_total") - fd_PageRequest_reverse = md_PageRequest.Fields().ByName("reverse") -} - -var _ protoreflect.Message = (*fastReflection_PageRequest)(nil) - -type fastReflection_PageRequest PageRequest - -func (x *PageRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_PageRequest)(x) -} - -func (x *PageRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_query_v1beta1_pagination_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PageRequest_messageType fastReflection_PageRequest_messageType -var _ protoreflect.MessageType = fastReflection_PageRequest_messageType{} - -type fastReflection_PageRequest_messageType struct{} - -func (x fastReflection_PageRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_PageRequest)(nil) -} -func (x fastReflection_PageRequest_messageType) New() protoreflect.Message { - return new(fastReflection_PageRequest) -} -func (x fastReflection_PageRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PageRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PageRequest) Descriptor() protoreflect.MessageDescriptor { - return md_PageRequest -} - -// 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_PageRequest) Type() protoreflect.MessageType { - return _fastReflection_PageRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PageRequest) New() protoreflect.Message { - return new(fastReflection_PageRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PageRequest) Interface() protoreflect.ProtoMessage { - return (*PageRequest)(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_PageRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PageRequest_key, value) { - return - } - } - if x.Offset != uint64(0) { - value := protoreflect.ValueOfUint64(x.Offset) - if !f(fd_PageRequest_offset, value) { - return - } - } - if x.Limit != uint64(0) { - value := protoreflect.ValueOfUint64(x.Limit) - if !f(fd_PageRequest_limit, value) { - return - } - } - if x.CountTotal != false { - value := protoreflect.ValueOfBool(x.CountTotal) - if !f(fd_PageRequest_count_total, value) { - return - } - } - if x.Reverse != false { - value := protoreflect.ValueOfBool(x.Reverse) - if !f(fd_PageRequest_reverse, 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_PageRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageRequest.key": - return len(x.Key) != 0 - case "cosmos.base.query.v1beta1.PageRequest.offset": - return x.Offset != uint64(0) - case "cosmos.base.query.v1beta1.PageRequest.limit": - return x.Limit != uint64(0) - case "cosmos.base.query.v1beta1.PageRequest.count_total": - return x.CountTotal != false - case "cosmos.base.query.v1beta1.PageRequest.reverse": - return x.Reverse != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageRequest")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageRequest 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_PageRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageRequest.key": - x.Key = nil - case "cosmos.base.query.v1beta1.PageRequest.offset": - x.Offset = uint64(0) - case "cosmos.base.query.v1beta1.PageRequest.limit": - x.Limit = uint64(0) - case "cosmos.base.query.v1beta1.PageRequest.count_total": - x.CountTotal = false - case "cosmos.base.query.v1beta1.PageRequest.reverse": - x.Reverse = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageRequest")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageRequest 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_PageRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.query.v1beta1.PageRequest.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.query.v1beta1.PageRequest.offset": - value := x.Offset - return protoreflect.ValueOfUint64(value) - case "cosmos.base.query.v1beta1.PageRequest.limit": - value := x.Limit - return protoreflect.ValueOfUint64(value) - case "cosmos.base.query.v1beta1.PageRequest.count_total": - value := x.CountTotal - return protoreflect.ValueOfBool(value) - case "cosmos.base.query.v1beta1.PageRequest.reverse": - value := x.Reverse - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageRequest")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageRequest 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_PageRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageRequest.key": - x.Key = value.Bytes() - case "cosmos.base.query.v1beta1.PageRequest.offset": - x.Offset = value.Uint() - case "cosmos.base.query.v1beta1.PageRequest.limit": - x.Limit = value.Uint() - case "cosmos.base.query.v1beta1.PageRequest.count_total": - x.CountTotal = value.Bool() - case "cosmos.base.query.v1beta1.PageRequest.reverse": - x.Reverse = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageRequest")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageRequest 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_PageRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageRequest.key": - panic(fmt.Errorf("field key of message cosmos.base.query.v1beta1.PageRequest is not mutable")) - case "cosmos.base.query.v1beta1.PageRequest.offset": - panic(fmt.Errorf("field offset of message cosmos.base.query.v1beta1.PageRequest is not mutable")) - case "cosmos.base.query.v1beta1.PageRequest.limit": - panic(fmt.Errorf("field limit of message cosmos.base.query.v1beta1.PageRequest is not mutable")) - case "cosmos.base.query.v1beta1.PageRequest.count_total": - panic(fmt.Errorf("field count_total of message cosmos.base.query.v1beta1.PageRequest is not mutable")) - case "cosmos.base.query.v1beta1.PageRequest.reverse": - panic(fmt.Errorf("field reverse of message cosmos.base.query.v1beta1.PageRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageRequest")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageRequest 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_PageRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageRequest.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.query.v1beta1.PageRequest.offset": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.query.v1beta1.PageRequest.limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.query.v1beta1.PageRequest.count_total": - return protoreflect.ValueOfBool(false) - case "cosmos.base.query.v1beta1.PageRequest.reverse": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageRequest")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageRequest 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_PageRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.query.v1beta1.PageRequest", 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_PageRequest) 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_PageRequest) 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_PageRequest) 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_PageRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PageRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Offset != 0 { - n += 1 + runtime.Sov(uint64(x.Offset)) - } - if x.Limit != 0 { - n += 1 + runtime.Sov(uint64(x.Limit)) - } - if x.CountTotal { - n += 2 - } - if x.Reverse { - n += 2 - } - 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().(*PageRequest) - 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.Reverse { - i-- - if x.Reverse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if x.CountTotal { - i-- - if x.CountTotal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.Limit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Limit)) - i-- - dAtA[i] = 0x18 - } - if x.Offset != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Offset)) - i-- - dAtA[i] = 0x10 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*PageRequest) - 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: PageRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PageRequest: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - x.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Offset |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - x.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CountTotal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.CountTotal = bool(v != 0) - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reverse", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Reverse = bool(v != 0) - 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_PageResponse protoreflect.MessageDescriptor - fd_PageResponse_next_key protoreflect.FieldDescriptor - fd_PageResponse_total protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_query_v1beta1_pagination_proto_init() - md_PageResponse = File_cosmos_base_query_v1beta1_pagination_proto.Messages().ByName("PageResponse") - fd_PageResponse_next_key = md_PageResponse.Fields().ByName("next_key") - fd_PageResponse_total = md_PageResponse.Fields().ByName("total") -} - -var _ protoreflect.Message = (*fastReflection_PageResponse)(nil) - -type fastReflection_PageResponse PageResponse - -func (x *PageResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_PageResponse)(x) -} - -func (x *PageResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_query_v1beta1_pagination_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PageResponse_messageType fastReflection_PageResponse_messageType -var _ protoreflect.MessageType = fastReflection_PageResponse_messageType{} - -type fastReflection_PageResponse_messageType struct{} - -func (x fastReflection_PageResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_PageResponse)(nil) -} -func (x fastReflection_PageResponse_messageType) New() protoreflect.Message { - return new(fastReflection_PageResponse) -} -func (x fastReflection_PageResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PageResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PageResponse) Descriptor() protoreflect.MessageDescriptor { - return md_PageResponse -} - -// 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_PageResponse) Type() protoreflect.MessageType { - return _fastReflection_PageResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PageResponse) New() protoreflect.Message { - return new(fastReflection_PageResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PageResponse) Interface() protoreflect.ProtoMessage { - return (*PageResponse)(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_PageResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.NextKey) != 0 { - value := protoreflect.ValueOfBytes(x.NextKey) - if !f(fd_PageResponse_next_key, value) { - return - } - } - if x.Total != uint64(0) { - value := protoreflect.ValueOfUint64(x.Total) - if !f(fd_PageResponse_total, 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_PageResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageResponse.next_key": - return len(x.NextKey) != 0 - case "cosmos.base.query.v1beta1.PageResponse.total": - return x.Total != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageResponse")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageResponse 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_PageResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageResponse.next_key": - x.NextKey = nil - case "cosmos.base.query.v1beta1.PageResponse.total": - x.Total = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageResponse")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageResponse 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_PageResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.query.v1beta1.PageResponse.next_key": - value := x.NextKey - return protoreflect.ValueOfBytes(value) - case "cosmos.base.query.v1beta1.PageResponse.total": - value := x.Total - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageResponse")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageResponse 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_PageResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageResponse.next_key": - x.NextKey = value.Bytes() - case "cosmos.base.query.v1beta1.PageResponse.total": - x.Total = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageResponse")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageResponse 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_PageResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageResponse.next_key": - panic(fmt.Errorf("field next_key of message cosmos.base.query.v1beta1.PageResponse is not mutable")) - case "cosmos.base.query.v1beta1.PageResponse.total": - panic(fmt.Errorf("field total of message cosmos.base.query.v1beta1.PageResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageResponse")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageResponse 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_PageResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.query.v1beta1.PageResponse.next_key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.query.v1beta1.PageResponse.total": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.query.v1beta1.PageResponse")) - } - panic(fmt.Errorf("message cosmos.base.query.v1beta1.PageResponse 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_PageResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.query.v1beta1.PageResponse", 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_PageResponse) 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_PageResponse) 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_PageResponse) 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_PageResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PageResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.NextKey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Total != 0 { - n += 1 + runtime.Sov(uint64(x.Total)) - } - 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().(*PageResponse) - 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.Total != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Total)) - i-- - dAtA[i] = 0x10 - } - if len(x.NextKey) > 0 { - i -= len(x.NextKey) - copy(dAtA[i:], x.NextKey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextKey))) - 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().(*PageResponse) - 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: PageResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PageResponse: 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 NextKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NextKey = append(x.NextKey[:0], dAtA[iNdEx:postIndex]...) - if x.NextKey == nil { - x.NextKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - x.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Total |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/query/v1beta1/pagination.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PageRequest is to be embedded in gRPC request messages for efficient -// pagination. Ex: -// -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } -type PageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // offset is a numeric offset that can be used when key is unavailable. - // It is less efficient than using key. Only one of offset or key should - // be set. - Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. - // count_total is only respected when offset is used. It is ignored when key - // is set. - CountTotal bool `protobuf:"varint,4,opt,name=count_total,json=countTotal,proto3" json:"count_total,omitempty"` - // reverse is set to true if results are to be returned in the descending order. - // - // Since: cosmos-sdk 0.43 - Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"` -} - -func (x *PageRequest) Reset() { - *x = PageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_query_v1beta1_pagination_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PageRequest) ProtoMessage() {} - -// Deprecated: Use PageRequest.ProtoReflect.Descriptor instead. -func (*PageRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_query_v1beta1_pagination_proto_rawDescGZIP(), []int{0} -} - -func (x *PageRequest) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *PageRequest) GetOffset() uint64 { - if x != nil { - return x.Offset - } - return 0 -} - -func (x *PageRequest) GetLimit() uint64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *PageRequest) GetCountTotal() bool { - if x != nil { - return x.CountTotal - } - return false -} - -func (x *PageRequest) GetReverse() bool { - if x != nil { - return x.Reverse - } - return false -} - -// PageResponse is to be embedded in gRPC response messages where the -// corresponding request message has used PageRequest. -// -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } -type PageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently. It will be empty if - // there are no more results. - NextKey []byte `protobuf:"bytes,1,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"` - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` -} - -func (x *PageResponse) Reset() { - *x = PageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_query_v1beta1_pagination_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PageResponse) ProtoMessage() {} - -// Deprecated: Use PageResponse.ProtoReflect.Descriptor instead. -func (*PageResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_query_v1beta1_pagination_proto_rawDescGZIP(), []int{1} -} - -func (x *PageResponse) GetNextKey() []byte { - if x != nil { - return x.NextKey - } - return nil -} - -func (x *PageResponse) GetTotal() uint64 { - if x != nil { - return x.Total - } - return 0 -} - -var File_cosmos_base_query_v1beta1_pagination_proto protoreflect.FileDescriptor - -var file_cosmos_base_query_v1beta1_pagination_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x88, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x0c, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x42, 0x80, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x51, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, - 0x65, 0x5c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_query_v1beta1_pagination_proto_rawDescOnce sync.Once - file_cosmos_base_query_v1beta1_pagination_proto_rawDescData = file_cosmos_base_query_v1beta1_pagination_proto_rawDesc -) - -func file_cosmos_base_query_v1beta1_pagination_proto_rawDescGZIP() []byte { - file_cosmos_base_query_v1beta1_pagination_proto_rawDescOnce.Do(func() { - file_cosmos_base_query_v1beta1_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_query_v1beta1_pagination_proto_rawDescData) - }) - return file_cosmos_base_query_v1beta1_pagination_proto_rawDescData -} - -var file_cosmos_base_query_v1beta1_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_base_query_v1beta1_pagination_proto_goTypes = []interface{}{ - (*PageRequest)(nil), // 0: cosmos.base.query.v1beta1.PageRequest - (*PageResponse)(nil), // 1: cosmos.base.query.v1beta1.PageResponse -} -var file_cosmos_base_query_v1beta1_pagination_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_base_query_v1beta1_pagination_proto_init() } -func file_cosmos_base_query_v1beta1_pagination_proto_init() { - if File_cosmos_base_query_v1beta1_pagination_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_query_v1beta1_pagination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_query_v1beta1_pagination_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_query_v1beta1_pagination_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_query_v1beta1_pagination_proto_goTypes, - DependencyIndexes: file_cosmos_base_query_v1beta1_pagination_proto_depIdxs, - MessageInfos: file_cosmos_base_query_v1beta1_pagination_proto_msgTypes, - }.Build() - File_cosmos_base_query_v1beta1_pagination_proto = out.File - file_cosmos_base_query_v1beta1_pagination_proto_rawDesc = nil - file_cosmos_base_query_v1beta1_pagination_proto_goTypes = nil - file_cosmos_base_query_v1beta1_pagination_proto_depIdxs = nil -} diff --git a/api/cosmos/base/reflection/v1beta1/reflection.pulsar.go b/api/cosmos/base/reflection/v1beta1/reflection.pulsar.go deleted file mode 100644 index 47e397297249..000000000000 --- a/api/cosmos/base/reflection/v1beta1/reflection.pulsar.go +++ /dev/null @@ -1,2083 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package reflectionv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_ListAllInterfacesRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v1beta1_reflection_proto_init() - md_ListAllInterfacesRequest = File_cosmos_base_reflection_v1beta1_reflection_proto.Messages().ByName("ListAllInterfacesRequest") -} - -var _ protoreflect.Message = (*fastReflection_ListAllInterfacesRequest)(nil) - -type fastReflection_ListAllInterfacesRequest ListAllInterfacesRequest - -func (x *ListAllInterfacesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListAllInterfacesRequest)(x) -} - -func (x *ListAllInterfacesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListAllInterfacesRequest_messageType fastReflection_ListAllInterfacesRequest_messageType -var _ protoreflect.MessageType = fastReflection_ListAllInterfacesRequest_messageType{} - -type fastReflection_ListAllInterfacesRequest_messageType struct{} - -func (x fastReflection_ListAllInterfacesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListAllInterfacesRequest)(nil) -} -func (x fastReflection_ListAllInterfacesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_ListAllInterfacesRequest) -} -func (x fastReflection_ListAllInterfacesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListAllInterfacesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListAllInterfacesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_ListAllInterfacesRequest -} - -// 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_ListAllInterfacesRequest) Type() protoreflect.MessageType { - return _fastReflection_ListAllInterfacesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListAllInterfacesRequest) New() protoreflect.Message { - return new(fastReflection_ListAllInterfacesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListAllInterfacesRequest) Interface() protoreflect.ProtoMessage { - return (*ListAllInterfacesRequest)(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_ListAllInterfacesRequest) 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_ListAllInterfacesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesRequest 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_ListAllInterfacesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesRequest 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_ListAllInterfacesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesRequest 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_ListAllInterfacesRequest) 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.base.reflection.v1beta1.ListAllInterfacesRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesRequest 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_ListAllInterfacesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesRequest 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_ListAllInterfacesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesRequest 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_ListAllInterfacesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", 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_ListAllInterfacesRequest) 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_ListAllInterfacesRequest) 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_ListAllInterfacesRequest) 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_ListAllInterfacesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListAllInterfacesRequest) - 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().(*ListAllInterfacesRequest) - 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().(*ListAllInterfacesRequest) - 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: ListAllInterfacesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListAllInterfacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ListAllInterfacesResponse_1_list)(nil) - -type _ListAllInterfacesResponse_1_list struct { - list *[]string -} - -func (x *_ListAllInterfacesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ListAllInterfacesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ListAllInterfacesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ListAllInterfacesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ListAllInterfacesResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ListAllInterfacesResponse at list field InterfaceNames as it is not of Message kind")) -} - -func (x *_ListAllInterfacesResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ListAllInterfacesResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ListAllInterfacesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ListAllInterfacesResponse protoreflect.MessageDescriptor - fd_ListAllInterfacesResponse_interface_names protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v1beta1_reflection_proto_init() - md_ListAllInterfacesResponse = File_cosmos_base_reflection_v1beta1_reflection_proto.Messages().ByName("ListAllInterfacesResponse") - fd_ListAllInterfacesResponse_interface_names = md_ListAllInterfacesResponse.Fields().ByName("interface_names") -} - -var _ protoreflect.Message = (*fastReflection_ListAllInterfacesResponse)(nil) - -type fastReflection_ListAllInterfacesResponse ListAllInterfacesResponse - -func (x *ListAllInterfacesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListAllInterfacesResponse)(x) -} - -func (x *ListAllInterfacesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListAllInterfacesResponse_messageType fastReflection_ListAllInterfacesResponse_messageType -var _ protoreflect.MessageType = fastReflection_ListAllInterfacesResponse_messageType{} - -type fastReflection_ListAllInterfacesResponse_messageType struct{} - -func (x fastReflection_ListAllInterfacesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListAllInterfacesResponse)(nil) -} -func (x fastReflection_ListAllInterfacesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ListAllInterfacesResponse) -} -func (x fastReflection_ListAllInterfacesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListAllInterfacesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListAllInterfacesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ListAllInterfacesResponse -} - -// 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_ListAllInterfacesResponse) Type() protoreflect.MessageType { - return _fastReflection_ListAllInterfacesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListAllInterfacesResponse) New() protoreflect.Message { - return new(fastReflection_ListAllInterfacesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListAllInterfacesResponse) Interface() protoreflect.ProtoMessage { - return (*ListAllInterfacesResponse)(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_ListAllInterfacesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.InterfaceNames) != 0 { - value := protoreflect.ValueOfList(&_ListAllInterfacesResponse_1_list{list: &x.InterfaceNames}) - if !f(fd_ListAllInterfacesResponse_interface_names, 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_ListAllInterfacesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interface_names": - return len(x.InterfaceNames) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesResponse 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_ListAllInterfacesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interface_names": - x.InterfaceNames = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesResponse 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_ListAllInterfacesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interface_names": - if len(x.InterfaceNames) == 0 { - return protoreflect.ValueOfList(&_ListAllInterfacesResponse_1_list{}) - } - listValue := &_ListAllInterfacesResponse_1_list{list: &x.InterfaceNames} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesResponse 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_ListAllInterfacesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interface_names": - lv := value.List() - clv := lv.(*_ListAllInterfacesResponse_1_list) - x.InterfaceNames = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesResponse 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_ListAllInterfacesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interface_names": - if x.InterfaceNames == nil { - x.InterfaceNames = []string{} - } - value := &_ListAllInterfacesResponse_1_list{list: &x.InterfaceNames} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesResponse 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_ListAllInterfacesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interface_names": - list := []string{} - return protoreflect.ValueOfList(&_ListAllInterfacesResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListAllInterfacesResponse 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_ListAllInterfacesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", 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_ListAllInterfacesResponse) 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_ListAllInterfacesResponse) 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_ListAllInterfacesResponse) 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_ListAllInterfacesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListAllInterfacesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.InterfaceNames) > 0 { - for _, s := range x.InterfaceNames { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListAllInterfacesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InterfaceNames) > 0 { - for iNdEx := len(x.InterfaceNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.InterfaceNames[iNdEx]) - copy(dAtA[i:], x.InterfaceNames[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InterfaceNames[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ListAllInterfacesResponse) - 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: ListAllInterfacesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListAllInterfacesResponse: 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 InterfaceNames", 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.InterfaceNames = append(x.InterfaceNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ListImplementationsRequest protoreflect.MessageDescriptor - fd_ListImplementationsRequest_interface_name protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v1beta1_reflection_proto_init() - md_ListImplementationsRequest = File_cosmos_base_reflection_v1beta1_reflection_proto.Messages().ByName("ListImplementationsRequest") - fd_ListImplementationsRequest_interface_name = md_ListImplementationsRequest.Fields().ByName("interface_name") -} - -var _ protoreflect.Message = (*fastReflection_ListImplementationsRequest)(nil) - -type fastReflection_ListImplementationsRequest ListImplementationsRequest - -func (x *ListImplementationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListImplementationsRequest)(x) -} - -func (x *ListImplementationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListImplementationsRequest_messageType fastReflection_ListImplementationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_ListImplementationsRequest_messageType{} - -type fastReflection_ListImplementationsRequest_messageType struct{} - -func (x fastReflection_ListImplementationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListImplementationsRequest)(nil) -} -func (x fastReflection_ListImplementationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_ListImplementationsRequest) -} -func (x fastReflection_ListImplementationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListImplementationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListImplementationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_ListImplementationsRequest -} - -// 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_ListImplementationsRequest) Type() protoreflect.MessageType { - return _fastReflection_ListImplementationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListImplementationsRequest) New() protoreflect.Message { - return new(fastReflection_ListImplementationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListImplementationsRequest) Interface() protoreflect.ProtoMessage { - return (*ListImplementationsRequest)(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_ListImplementationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.InterfaceName != "" { - value := protoreflect.ValueOfString(x.InterfaceName) - if !f(fd_ListImplementationsRequest_interface_name, 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_ListImplementationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsRequest.interface_name": - return x.InterfaceName != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsRequest 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_ListImplementationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsRequest.interface_name": - x.InterfaceName = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsRequest 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_ListImplementationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsRequest.interface_name": - value := x.InterfaceName - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsRequest 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_ListImplementationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsRequest.interface_name": - x.InterfaceName = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsRequest 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_ListImplementationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsRequest.interface_name": - panic(fmt.Errorf("field interface_name of message cosmos.base.reflection.v1beta1.ListImplementationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsRequest 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_ListImplementationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsRequest.interface_name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsRequest 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_ListImplementationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v1beta1.ListImplementationsRequest", 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_ListImplementationsRequest) 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_ListImplementationsRequest) 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_ListImplementationsRequest) 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_ListImplementationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListImplementationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.InterfaceName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListImplementationsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InterfaceName) > 0 { - i -= len(x.InterfaceName) - copy(dAtA[i:], x.InterfaceName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InterfaceName))) - 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().(*ListImplementationsRequest) - 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: ListImplementationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListImplementationsRequest: 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 InterfaceName", 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.InterfaceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ListImplementationsResponse_1_list)(nil) - -type _ListImplementationsResponse_1_list struct { - list *[]string -} - -func (x *_ListImplementationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ListImplementationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ListImplementationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ListImplementationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ListImplementationsResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ListImplementationsResponse at list field ImplementationMessageNames as it is not of Message kind")) -} - -func (x *_ListImplementationsResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ListImplementationsResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ListImplementationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ListImplementationsResponse protoreflect.MessageDescriptor - fd_ListImplementationsResponse_implementation_message_names protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v1beta1_reflection_proto_init() - md_ListImplementationsResponse = File_cosmos_base_reflection_v1beta1_reflection_proto.Messages().ByName("ListImplementationsResponse") - fd_ListImplementationsResponse_implementation_message_names = md_ListImplementationsResponse.Fields().ByName("implementation_message_names") -} - -var _ protoreflect.Message = (*fastReflection_ListImplementationsResponse)(nil) - -type fastReflection_ListImplementationsResponse ListImplementationsResponse - -func (x *ListImplementationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListImplementationsResponse)(x) -} - -func (x *ListImplementationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListImplementationsResponse_messageType fastReflection_ListImplementationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_ListImplementationsResponse_messageType{} - -type fastReflection_ListImplementationsResponse_messageType struct{} - -func (x fastReflection_ListImplementationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListImplementationsResponse)(nil) -} -func (x fastReflection_ListImplementationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ListImplementationsResponse) -} -func (x fastReflection_ListImplementationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListImplementationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListImplementationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ListImplementationsResponse -} - -// 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_ListImplementationsResponse) Type() protoreflect.MessageType { - return _fastReflection_ListImplementationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListImplementationsResponse) New() protoreflect.Message { - return new(fastReflection_ListImplementationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListImplementationsResponse) Interface() protoreflect.ProtoMessage { - return (*ListImplementationsResponse)(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_ListImplementationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ImplementationMessageNames) != 0 { - value := protoreflect.ValueOfList(&_ListImplementationsResponse_1_list{list: &x.ImplementationMessageNames}) - if !f(fd_ListImplementationsResponse_implementation_message_names, 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_ListImplementationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementation_message_names": - return len(x.ImplementationMessageNames) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsResponse 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_ListImplementationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementation_message_names": - x.ImplementationMessageNames = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsResponse 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_ListImplementationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementation_message_names": - if len(x.ImplementationMessageNames) == 0 { - return protoreflect.ValueOfList(&_ListImplementationsResponse_1_list{}) - } - listValue := &_ListImplementationsResponse_1_list{list: &x.ImplementationMessageNames} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsResponse 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_ListImplementationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementation_message_names": - lv := value.List() - clv := lv.(*_ListImplementationsResponse_1_list) - x.ImplementationMessageNames = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsResponse 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_ListImplementationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementation_message_names": - if x.ImplementationMessageNames == nil { - x.ImplementationMessageNames = []string{} - } - value := &_ListImplementationsResponse_1_list{list: &x.ImplementationMessageNames} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsResponse 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_ListImplementationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementation_message_names": - list := []string{} - return protoreflect.ValueOfList(&_ListImplementationsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v1beta1.ListImplementationsResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v1beta1.ListImplementationsResponse 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_ListImplementationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v1beta1.ListImplementationsResponse", 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_ListImplementationsResponse) 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_ListImplementationsResponse) 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_ListImplementationsResponse) 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_ListImplementationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListImplementationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.ImplementationMessageNames) > 0 { - for _, s := range x.ImplementationMessageNames { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListImplementationsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ImplementationMessageNames) > 0 { - for iNdEx := len(x.ImplementationMessageNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.ImplementationMessageNames[iNdEx]) - copy(dAtA[i:], x.ImplementationMessageNames[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ImplementationMessageNames[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ListImplementationsResponse) - 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: ListImplementationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListImplementationsResponse: 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 ImplementationMessageNames", 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.ImplementationMessageNames = append(x.ImplementationMessageNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/reflection/v1beta1/reflection.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -type ListAllInterfacesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListAllInterfacesRequest) Reset() { - *x = ListAllInterfacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAllInterfacesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAllInterfacesRequest) ProtoMessage() {} - -// Deprecated: Use ListAllInterfacesRequest.ProtoReflect.Descriptor instead. -func (*ListAllInterfacesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescGZIP(), []int{0} -} - -// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -type ListAllInterfacesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // interface_names is an array of all the registered interfaces. - InterfaceNames []string `protobuf:"bytes,1,rep,name=interface_names,json=interfaceNames,proto3" json:"interface_names,omitempty"` -} - -func (x *ListAllInterfacesResponse) Reset() { - *x = ListAllInterfacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAllInterfacesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAllInterfacesResponse) ProtoMessage() {} - -// Deprecated: Use ListAllInterfacesResponse.ProtoReflect.Descriptor instead. -func (*ListAllInterfacesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescGZIP(), []int{1} -} - -func (x *ListAllInterfacesResponse) GetInterfaceNames() []string { - if x != nil { - return x.InterfaceNames - } - return nil -} - -// ListImplementationsRequest is the request type of the ListImplementations -// RPC. -type ListImplementationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // interface_name defines the interface to query the implementations for. - InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"` -} - -func (x *ListImplementationsRequest) Reset() { - *x = ListImplementationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListImplementationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListImplementationsRequest) ProtoMessage() {} - -// Deprecated: Use ListImplementationsRequest.ProtoReflect.Descriptor instead. -func (*ListImplementationsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescGZIP(), []int{2} -} - -func (x *ListImplementationsRequest) GetInterfaceName() string { - if x != nil { - return x.InterfaceName - } - return "" -} - -// ListImplementationsResponse is the response type of the ListImplementations -// RPC. -type ListImplementationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ImplementationMessageNames []string `protobuf:"bytes,1,rep,name=implementation_message_names,json=implementationMessageNames,proto3" json:"implementation_message_names,omitempty"` -} - -func (x *ListImplementationsResponse) Reset() { - *x = ListImplementationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListImplementationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListImplementationsResponse) ProtoMessage() {} - -// Deprecated: Use ListImplementationsResponse.ProtoReflect.Descriptor instead. -func (*ListImplementationsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescGZIP(), []int{3} -} - -func (x *ListImplementationsResponse) GetImplementationMessageNames() []string { - if x != nil { - return x.ImplementationMessageNames - } - return nil -} - -var File_cosmos_base_reflection_v1beta1_reflection_proto protoreflect.FileDescriptor - -var file_cosmos_base_reflection_v1beta1_reflection_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x19, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x22, 0x43, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5f, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, - 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x1c, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1a, 0x69, 0x6d, 0x70, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x32, 0xb8, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbc, 0x01, - 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, - 0x12, 0x2a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0xe3, 0x01, 0x0a, - 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x42, 0xa3, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x52, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x72, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x42, 0x52, 0xaa, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x42, 0x61, 0x73, 0x65, 0x5c, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, - 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescOnce sync.Once - file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescData = file_cosmos_base_reflection_v1beta1_reflection_proto_rawDesc -) - -func file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescGZIP() []byte { - file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescOnce.Do(func() { - file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescData) - }) - return file_cosmos_base_reflection_v1beta1_reflection_proto_rawDescData -} - -var file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_base_reflection_v1beta1_reflection_proto_goTypes = []interface{}{ - (*ListAllInterfacesRequest)(nil), // 0: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest - (*ListAllInterfacesResponse)(nil), // 1: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse - (*ListImplementationsRequest)(nil), // 2: cosmos.base.reflection.v1beta1.ListImplementationsRequest - (*ListImplementationsResponse)(nil), // 3: cosmos.base.reflection.v1beta1.ListImplementationsResponse -} -var file_cosmos_base_reflection_v1beta1_reflection_proto_depIdxs = []int32{ - 0, // 0: cosmos.base.reflection.v1beta1.ReflectionService.ListAllInterfaces:input_type -> cosmos.base.reflection.v1beta1.ListAllInterfacesRequest - 2, // 1: cosmos.base.reflection.v1beta1.ReflectionService.ListImplementations:input_type -> cosmos.base.reflection.v1beta1.ListImplementationsRequest - 1, // 2: cosmos.base.reflection.v1beta1.ReflectionService.ListAllInterfaces:output_type -> cosmos.base.reflection.v1beta1.ListAllInterfacesResponse - 3, // 3: cosmos.base.reflection.v1beta1.ReflectionService.ListImplementations:output_type -> cosmos.base.reflection.v1beta1.ListImplementationsResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_base_reflection_v1beta1_reflection_proto_init() } -func file_cosmos_base_reflection_v1beta1_reflection_proto_init() { - if File_cosmos_base_reflection_v1beta1_reflection_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllInterfacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllInterfacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListImplementationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListImplementationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_reflection_v1beta1_reflection_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_base_reflection_v1beta1_reflection_proto_goTypes, - DependencyIndexes: file_cosmos_base_reflection_v1beta1_reflection_proto_depIdxs, - MessageInfos: file_cosmos_base_reflection_v1beta1_reflection_proto_msgTypes, - }.Build() - File_cosmos_base_reflection_v1beta1_reflection_proto = out.File - file_cosmos_base_reflection_v1beta1_reflection_proto_rawDesc = nil - file_cosmos_base_reflection_v1beta1_reflection_proto_goTypes = nil - file_cosmos_base_reflection_v1beta1_reflection_proto_depIdxs = nil -} diff --git a/api/cosmos/base/reflection/v1beta1/reflection_grpc.pb.go b/api/cosmos/base/reflection/v1beta1/reflection_grpc.pb.go deleted file mode 100644 index c8d3451d55bf..000000000000 --- a/api/cosmos/base/reflection/v1beta1/reflection_grpc.pb.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/base/reflection/v1beta1/reflection.proto - -package reflectionv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ReflectionServiceClient is the client API for ReflectionService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ReflectionServiceClient interface { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - ListAllInterfaces(ctx context.Context, in *ListAllInterfacesRequest, opts ...grpc.CallOption) (*ListAllInterfacesResponse, error) - // ListImplementations list all the concrete types that implement a given - // interface. - ListImplementations(ctx context.Context, in *ListImplementationsRequest, opts ...grpc.CallOption) (*ListImplementationsResponse, error) -} - -type reflectionServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewReflectionServiceClient(cc grpc.ClientConnInterface) ReflectionServiceClient { - return &reflectionServiceClient{cc} -} - -func (c *reflectionServiceClient) ListAllInterfaces(ctx context.Context, in *ListAllInterfacesRequest, opts ...grpc.CallOption) (*ListAllInterfacesResponse, error) { - out := new(ListAllInterfacesResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reflectionServiceClient) ListImplementations(ctx context.Context, in *ListImplementationsRequest, opts ...grpc.CallOption) (*ListImplementationsResponse, error) { - out := new(ListImplementationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ReflectionServiceServer is the server API for ReflectionService service. -// All implementations must embed UnimplementedReflectionServiceServer -// for forward compatibility -type ReflectionServiceServer interface { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - ListAllInterfaces(context.Context, *ListAllInterfacesRequest) (*ListAllInterfacesResponse, error) - // ListImplementations list all the concrete types that implement a given - // interface. - ListImplementations(context.Context, *ListImplementationsRequest) (*ListImplementationsResponse, error) - mustEmbedUnimplementedReflectionServiceServer() -} - -// UnimplementedReflectionServiceServer must be embedded to have forward compatible implementations. -type UnimplementedReflectionServiceServer struct { -} - -func (UnimplementedReflectionServiceServer) ListAllInterfaces(context.Context, *ListAllInterfacesRequest) (*ListAllInterfacesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListAllInterfaces not implemented") -} -func (UnimplementedReflectionServiceServer) ListImplementations(context.Context, *ListImplementationsRequest) (*ListImplementationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListImplementations not implemented") -} -func (UnimplementedReflectionServiceServer) mustEmbedUnimplementedReflectionServiceServer() {} - -// UnsafeReflectionServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ReflectionServiceServer will -// result in compilation errors. -type UnsafeReflectionServiceServer interface { - mustEmbedUnimplementedReflectionServiceServer() -} - -func RegisterReflectionServiceServer(s grpc.ServiceRegistrar, srv ReflectionServiceServer) { - s.RegisterService(&ReflectionService_ServiceDesc, srv) -} - -func _ReflectionService_ListAllInterfaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAllInterfacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).ListAllInterfaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).ListAllInterfaces(ctx, req.(*ListAllInterfacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReflectionService_ListImplementations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListImplementationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).ListImplementations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).ListImplementations(ctx, req.(*ListImplementationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ReflectionService_ServiceDesc is the grpc.ServiceDesc for ReflectionService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ReflectionService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.base.reflection.v1beta1.ReflectionService", - HandlerType: (*ReflectionServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListAllInterfaces", - Handler: _ReflectionService_ListAllInterfaces_Handler, - }, - { - MethodName: "ListImplementations", - Handler: _ReflectionService_ListImplementations_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/base/reflection/v1beta1/reflection.proto", -} diff --git a/api/cosmos/base/reflection/v2alpha1/reflection.pulsar.go b/api/cosmos/base/reflection/v2alpha1/reflection.pulsar.go deleted file mode 100644 index 65385e6c1605..000000000000 --- a/api/cosmos/base/reflection/v2alpha1/reflection.pulsar.go +++ /dev/null @@ -1,14025 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package reflectionv2alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_AppDescriptor protoreflect.MessageDescriptor - fd_AppDescriptor_authn protoreflect.FieldDescriptor - fd_AppDescriptor_chain protoreflect.FieldDescriptor - fd_AppDescriptor_codec protoreflect.FieldDescriptor - fd_AppDescriptor_configuration protoreflect.FieldDescriptor - fd_AppDescriptor_query_services protoreflect.FieldDescriptor - fd_AppDescriptor_tx protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_AppDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("AppDescriptor") - fd_AppDescriptor_authn = md_AppDescriptor.Fields().ByName("authn") - fd_AppDescriptor_chain = md_AppDescriptor.Fields().ByName("chain") - fd_AppDescriptor_codec = md_AppDescriptor.Fields().ByName("codec") - fd_AppDescriptor_configuration = md_AppDescriptor.Fields().ByName("configuration") - fd_AppDescriptor_query_services = md_AppDescriptor.Fields().ByName("query_services") - fd_AppDescriptor_tx = md_AppDescriptor.Fields().ByName("tx") -} - -var _ protoreflect.Message = (*fastReflection_AppDescriptor)(nil) - -type fastReflection_AppDescriptor AppDescriptor - -func (x *AppDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_AppDescriptor)(x) -} - -func (x *AppDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AppDescriptor_messageType fastReflection_AppDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_AppDescriptor_messageType{} - -type fastReflection_AppDescriptor_messageType struct{} - -func (x fastReflection_AppDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_AppDescriptor)(nil) -} -func (x fastReflection_AppDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_AppDescriptor) -} -func (x fastReflection_AppDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AppDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AppDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_AppDescriptor -} - -// 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_AppDescriptor) Type() protoreflect.MessageType { - return _fastReflection_AppDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AppDescriptor) New() protoreflect.Message { - return new(fastReflection_AppDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AppDescriptor) Interface() protoreflect.ProtoMessage { - return (*AppDescriptor)(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_AppDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authn != nil { - value := protoreflect.ValueOfMessage(x.Authn.ProtoReflect()) - if !f(fd_AppDescriptor_authn, value) { - return - } - } - if x.Chain != nil { - value := protoreflect.ValueOfMessage(x.Chain.ProtoReflect()) - if !f(fd_AppDescriptor_chain, value) { - return - } - } - if x.Codec != nil { - value := protoreflect.ValueOfMessage(x.Codec.ProtoReflect()) - if !f(fd_AppDescriptor_codec, value) { - return - } - } - if x.Configuration != nil { - value := protoreflect.ValueOfMessage(x.Configuration.ProtoReflect()) - if !f(fd_AppDescriptor_configuration, value) { - return - } - } - if x.QueryServices != nil { - value := protoreflect.ValueOfMessage(x.QueryServices.ProtoReflect()) - if !f(fd_AppDescriptor_query_services, value) { - return - } - } - if x.Tx != nil { - value := protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - if !f(fd_AppDescriptor_tx, 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_AppDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AppDescriptor.authn": - return x.Authn != nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.chain": - return x.Chain != nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.codec": - return x.Codec != nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.configuration": - return x.Configuration != nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.query_services": - return x.QueryServices != nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.tx": - return x.Tx != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AppDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AppDescriptor 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_AppDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AppDescriptor.authn": - x.Authn = nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.chain": - x.Chain = nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.codec": - x.Codec = nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.configuration": - x.Configuration = nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.query_services": - x.QueryServices = nil - case "cosmos.base.reflection.v2alpha1.AppDescriptor.tx": - x.Tx = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AppDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AppDescriptor 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_AppDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.AppDescriptor.authn": - value := x.Authn - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.chain": - value := x.Chain - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.codec": - value := x.Codec - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.configuration": - value := x.Configuration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.query_services": - value := x.QueryServices - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.tx": - value := x.Tx - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AppDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AppDescriptor 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_AppDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AppDescriptor.authn": - x.Authn = value.Message().Interface().(*AuthnDescriptor) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.chain": - x.Chain = value.Message().Interface().(*ChainDescriptor) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.codec": - x.Codec = value.Message().Interface().(*CodecDescriptor) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.configuration": - x.Configuration = value.Message().Interface().(*ConfigurationDescriptor) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.query_services": - x.QueryServices = value.Message().Interface().(*QueryServicesDescriptor) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.tx": - x.Tx = value.Message().Interface().(*TxDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AppDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AppDescriptor 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_AppDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AppDescriptor.authn": - if x.Authn == nil { - x.Authn = new(AuthnDescriptor) - } - return protoreflect.ValueOfMessage(x.Authn.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.chain": - if x.Chain == nil { - x.Chain = new(ChainDescriptor) - } - return protoreflect.ValueOfMessage(x.Chain.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.codec": - if x.Codec == nil { - x.Codec = new(CodecDescriptor) - } - return protoreflect.ValueOfMessage(x.Codec.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.configuration": - if x.Configuration == nil { - x.Configuration = new(ConfigurationDescriptor) - } - return protoreflect.ValueOfMessage(x.Configuration.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.query_services": - if x.QueryServices == nil { - x.QueryServices = new(QueryServicesDescriptor) - } - return protoreflect.ValueOfMessage(x.QueryServices.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.tx": - if x.Tx == nil { - x.Tx = new(TxDescriptor) - } - return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AppDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AppDescriptor 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_AppDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AppDescriptor.authn": - m := new(AuthnDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.chain": - m := new(ChainDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.codec": - m := new(CodecDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.configuration": - m := new(ConfigurationDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.query_services": - m := new(QueryServicesDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.reflection.v2alpha1.AppDescriptor.tx": - m := new(TxDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AppDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AppDescriptor 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_AppDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.AppDescriptor", 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_AppDescriptor) 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_AppDescriptor) 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_AppDescriptor) 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_AppDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AppDescriptor) - 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.Authn != nil { - l = options.Size(x.Authn) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Chain != nil { - l = options.Size(x.Chain) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Codec != nil { - l = options.Size(x.Codec) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Configuration != nil { - l = options.Size(x.Configuration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.QueryServices != nil { - l = options.Size(x.QueryServices) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Tx != nil { - l = options.Size(x.Tx) - 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().(*AppDescriptor) - 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.Tx != nil { - encoded, err := options.Marshal(x.Tx) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.QueryServices != nil { - encoded, err := options.Marshal(x.QueryServices) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.Configuration != nil { - encoded, err := options.Marshal(x.Configuration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Codec != nil { - encoded, err := options.Marshal(x.Codec) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Chain != nil { - encoded, err := options.Marshal(x.Chain) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Authn != nil { - encoded, err := options.Marshal(x.Authn) - 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().(*AppDescriptor) - 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: AppDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AppDescriptor: 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 Authn", 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.Authn == nil { - x.Authn = &AuthnDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authn); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chain", 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.Chain == nil { - x.Chain = &ChainDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Chain); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codec", 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.Codec == nil { - x.Codec = &CodecDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Codec); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Configuration", 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.Configuration == nil { - x.Configuration = &ConfigurationDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Configuration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryServices", 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.QueryServices == nil { - x.QueryServices = &QueryServicesDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.QueryServices); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tx", 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.Tx == nil { - x.Tx = &TxDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tx); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TxDescriptor_2_list)(nil) - -type _TxDescriptor_2_list struct { - list *[]*MsgDescriptor -} - -func (x *_TxDescriptor_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxDescriptor_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxDescriptor_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MsgDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_TxDescriptor_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MsgDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxDescriptor_2_list) AppendMutable() protoreflect.Value { - v := new(MsgDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxDescriptor_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxDescriptor_2_list) NewElement() protoreflect.Value { - v := new(MsgDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxDescriptor_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TxDescriptor protoreflect.MessageDescriptor - fd_TxDescriptor_fullname protoreflect.FieldDescriptor - fd_TxDescriptor_msgs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_TxDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("TxDescriptor") - fd_TxDescriptor_fullname = md_TxDescriptor.Fields().ByName("fullname") - fd_TxDescriptor_msgs = md_TxDescriptor.Fields().ByName("msgs") -} - -var _ protoreflect.Message = (*fastReflection_TxDescriptor)(nil) - -type fastReflection_TxDescriptor TxDescriptor - -func (x *TxDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxDescriptor)(x) -} - -func (x *TxDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TxDescriptor_messageType fastReflection_TxDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_TxDescriptor_messageType{} - -type fastReflection_TxDescriptor_messageType struct{} - -func (x fastReflection_TxDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxDescriptor)(nil) -} -func (x fastReflection_TxDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_TxDescriptor) -} -func (x fastReflection_TxDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_TxDescriptor -} - -// 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_TxDescriptor) Type() protoreflect.MessageType { - return _fastReflection_TxDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxDescriptor) New() protoreflect.Message { - return new(fastReflection_TxDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxDescriptor) Interface() protoreflect.ProtoMessage { - return (*TxDescriptor)(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_TxDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fullname != "" { - value := protoreflect.ValueOfString(x.Fullname) - if !f(fd_TxDescriptor_fullname, value) { - return - } - } - if len(x.Msgs) != 0 { - value := protoreflect.ValueOfList(&_TxDescriptor_2_list{list: &x.Msgs}) - if !f(fd_TxDescriptor_msgs, 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_TxDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.TxDescriptor.fullname": - return x.Fullname != "" - case "cosmos.base.reflection.v2alpha1.TxDescriptor.msgs": - return len(x.Msgs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.TxDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.TxDescriptor 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_TxDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.TxDescriptor.fullname": - x.Fullname = "" - case "cosmos.base.reflection.v2alpha1.TxDescriptor.msgs": - x.Msgs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.TxDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.TxDescriptor 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_TxDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.TxDescriptor.fullname": - value := x.Fullname - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.TxDescriptor.msgs": - if len(x.Msgs) == 0 { - return protoreflect.ValueOfList(&_TxDescriptor_2_list{}) - } - listValue := &_TxDescriptor_2_list{list: &x.Msgs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.TxDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.TxDescriptor 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_TxDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.TxDescriptor.fullname": - x.Fullname = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.TxDescriptor.msgs": - lv := value.List() - clv := lv.(*_TxDescriptor_2_list) - x.Msgs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.TxDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.TxDescriptor 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_TxDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.TxDescriptor.msgs": - if x.Msgs == nil { - x.Msgs = []*MsgDescriptor{} - } - value := &_TxDescriptor_2_list{list: &x.Msgs} - return protoreflect.ValueOfList(value) - case "cosmos.base.reflection.v2alpha1.TxDescriptor.fullname": - panic(fmt.Errorf("field fullname of message cosmos.base.reflection.v2alpha1.TxDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.TxDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.TxDescriptor 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_TxDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.TxDescriptor.fullname": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.TxDescriptor.msgs": - list := []*MsgDescriptor{} - return protoreflect.ValueOfList(&_TxDescriptor_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.TxDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.TxDescriptor 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_TxDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.TxDescriptor", 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_TxDescriptor) 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_TxDescriptor) 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_TxDescriptor) 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_TxDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fullname) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Msgs) > 0 { - for _, e := range x.Msgs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TxDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Msgs) > 0 { - for iNdEx := len(x.Msgs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Msgs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Fullname) > 0 { - i -= len(x.Fullname) - copy(dAtA[i:], x.Fullname) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fullname))) - 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().(*TxDescriptor) - 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: TxDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxDescriptor: 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 Fullname", 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.Fullname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Msgs = append(x.Msgs, &MsgDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Msgs[len(x.Msgs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_AuthnDescriptor_1_list)(nil) - -type _AuthnDescriptor_1_list struct { - list *[]*SigningModeDescriptor -} - -func (x *_AuthnDescriptor_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_AuthnDescriptor_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_AuthnDescriptor_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SigningModeDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_AuthnDescriptor_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SigningModeDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_AuthnDescriptor_1_list) AppendMutable() protoreflect.Value { - v := new(SigningModeDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_AuthnDescriptor_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_AuthnDescriptor_1_list) NewElement() protoreflect.Value { - v := new(SigningModeDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_AuthnDescriptor_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_AuthnDescriptor protoreflect.MessageDescriptor - fd_AuthnDescriptor_sign_modes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_AuthnDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("AuthnDescriptor") - fd_AuthnDescriptor_sign_modes = md_AuthnDescriptor.Fields().ByName("sign_modes") -} - -var _ protoreflect.Message = (*fastReflection_AuthnDescriptor)(nil) - -type fastReflection_AuthnDescriptor AuthnDescriptor - -func (x *AuthnDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_AuthnDescriptor)(x) -} - -func (x *AuthnDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AuthnDescriptor_messageType fastReflection_AuthnDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_AuthnDescriptor_messageType{} - -type fastReflection_AuthnDescriptor_messageType struct{} - -func (x fastReflection_AuthnDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_AuthnDescriptor)(nil) -} -func (x fastReflection_AuthnDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_AuthnDescriptor) -} -func (x fastReflection_AuthnDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AuthnDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AuthnDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_AuthnDescriptor -} - -// 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_AuthnDescriptor) Type() protoreflect.MessageType { - return _fastReflection_AuthnDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AuthnDescriptor) New() protoreflect.Message { - return new(fastReflection_AuthnDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AuthnDescriptor) Interface() protoreflect.ProtoMessage { - return (*AuthnDescriptor)(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_AuthnDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SignModes) != 0 { - value := protoreflect.ValueOfList(&_AuthnDescriptor_1_list{list: &x.SignModes}) - if !f(fd_AuthnDescriptor_sign_modes, 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_AuthnDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes": - return len(x.SignModes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AuthnDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AuthnDescriptor 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_AuthnDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes": - x.SignModes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AuthnDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AuthnDescriptor 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_AuthnDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes": - if len(x.SignModes) == 0 { - return protoreflect.ValueOfList(&_AuthnDescriptor_1_list{}) - } - listValue := &_AuthnDescriptor_1_list{list: &x.SignModes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AuthnDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AuthnDescriptor 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_AuthnDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes": - lv := value.List() - clv := lv.(*_AuthnDescriptor_1_list) - x.SignModes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AuthnDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AuthnDescriptor 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_AuthnDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes": - if x.SignModes == nil { - x.SignModes = []*SigningModeDescriptor{} - } - value := &_AuthnDescriptor_1_list{list: &x.SignModes} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AuthnDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AuthnDescriptor 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_AuthnDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes": - list := []*SigningModeDescriptor{} - return protoreflect.ValueOfList(&_AuthnDescriptor_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.AuthnDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.AuthnDescriptor 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_AuthnDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.AuthnDescriptor", 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_AuthnDescriptor) 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_AuthnDescriptor) 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_AuthnDescriptor) 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_AuthnDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AuthnDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SignModes) > 0 { - for _, e := range x.SignModes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AuthnDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.SignModes) > 0 { - for iNdEx := len(x.SignModes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SignModes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AuthnDescriptor) - 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: AuthnDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AuthnDescriptor: 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 SignModes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SignModes = append(x.SignModes, &SigningModeDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignModes[len(x.SignModes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SigningModeDescriptor protoreflect.MessageDescriptor - fd_SigningModeDescriptor_name protoreflect.FieldDescriptor - fd_SigningModeDescriptor_number protoreflect.FieldDescriptor - fd_SigningModeDescriptor_authn_info_provider_method_fullname protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_SigningModeDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("SigningModeDescriptor") - fd_SigningModeDescriptor_name = md_SigningModeDescriptor.Fields().ByName("name") - fd_SigningModeDescriptor_number = md_SigningModeDescriptor.Fields().ByName("number") - fd_SigningModeDescriptor_authn_info_provider_method_fullname = md_SigningModeDescriptor.Fields().ByName("authn_info_provider_method_fullname") -} - -var _ protoreflect.Message = (*fastReflection_SigningModeDescriptor)(nil) - -type fastReflection_SigningModeDescriptor SigningModeDescriptor - -func (x *SigningModeDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_SigningModeDescriptor)(x) -} - -func (x *SigningModeDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SigningModeDescriptor_messageType fastReflection_SigningModeDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_SigningModeDescriptor_messageType{} - -type fastReflection_SigningModeDescriptor_messageType struct{} - -func (x fastReflection_SigningModeDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_SigningModeDescriptor)(nil) -} -func (x fastReflection_SigningModeDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_SigningModeDescriptor) -} -func (x fastReflection_SigningModeDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SigningModeDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SigningModeDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_SigningModeDescriptor -} - -// 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_SigningModeDescriptor) Type() protoreflect.MessageType { - return _fastReflection_SigningModeDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SigningModeDescriptor) New() protoreflect.Message { - return new(fastReflection_SigningModeDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SigningModeDescriptor) Interface() protoreflect.ProtoMessage { - return (*SigningModeDescriptor)(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_SigningModeDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_SigningModeDescriptor_name, value) { - return - } - } - if x.Number != int32(0) { - value := protoreflect.ValueOfInt32(x.Number) - if !f(fd_SigningModeDescriptor_number, value) { - return - } - } - if x.AuthnInfoProviderMethodFullname != "" { - value := protoreflect.ValueOfString(x.AuthnInfoProviderMethodFullname) - if !f(fd_SigningModeDescriptor_authn_info_provider_method_fullname, 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_SigningModeDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.name": - return x.Name != "" - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.number": - return x.Number != int32(0) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.authn_info_provider_method_fullname": - return x.AuthnInfoProviderMethodFullname != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.SigningModeDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.SigningModeDescriptor 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_SigningModeDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.name": - x.Name = "" - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.number": - x.Number = int32(0) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.authn_info_provider_method_fullname": - x.AuthnInfoProviderMethodFullname = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.SigningModeDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.SigningModeDescriptor 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_SigningModeDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.number": - value := x.Number - return protoreflect.ValueOfInt32(value) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.authn_info_provider_method_fullname": - value := x.AuthnInfoProviderMethodFullname - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.SigningModeDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.SigningModeDescriptor 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_SigningModeDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.name": - x.Name = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.number": - x.Number = int32(value.Int()) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.authn_info_provider_method_fullname": - x.AuthnInfoProviderMethodFullname = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.SigningModeDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.SigningModeDescriptor 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_SigningModeDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.name": - panic(fmt.Errorf("field name of message cosmos.base.reflection.v2alpha1.SigningModeDescriptor is not mutable")) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.number": - panic(fmt.Errorf("field number of message cosmos.base.reflection.v2alpha1.SigningModeDescriptor is not mutable")) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.authn_info_provider_method_fullname": - panic(fmt.Errorf("field authn_info_provider_method_fullname of message cosmos.base.reflection.v2alpha1.SigningModeDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.SigningModeDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.SigningModeDescriptor 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_SigningModeDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.name": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.number": - return protoreflect.ValueOfInt32(int32(0)) - case "cosmos.base.reflection.v2alpha1.SigningModeDescriptor.authn_info_provider_method_fullname": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.SigningModeDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.SigningModeDescriptor 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_SigningModeDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.SigningModeDescriptor", 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_SigningModeDescriptor) 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_SigningModeDescriptor) 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_SigningModeDescriptor) 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_SigningModeDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SigningModeDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Number != 0 { - n += 1 + runtime.Sov(uint64(x.Number)) - } - l = len(x.AuthnInfoProviderMethodFullname) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SigningModeDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AuthnInfoProviderMethodFullname) > 0 { - i -= len(x.AuthnInfoProviderMethodFullname) - copy(dAtA[i:], x.AuthnInfoProviderMethodFullname) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthnInfoProviderMethodFullname))) - i-- - dAtA[i] = 0x1a - } - if x.Number != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Number)) - i-- - dAtA[i] = 0x10 - } - 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 { - 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().(*SigningModeDescriptor) - 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: SigningModeDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SigningModeDescriptor: 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 - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - x.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Number |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthnInfoProviderMethodFullname", 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.AuthnInfoProviderMethodFullname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ChainDescriptor protoreflect.MessageDescriptor - fd_ChainDescriptor_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_ChainDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("ChainDescriptor") - fd_ChainDescriptor_id = md_ChainDescriptor.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_ChainDescriptor)(nil) - -type fastReflection_ChainDescriptor ChainDescriptor - -func (x *ChainDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainDescriptor)(x) -} - -func (x *ChainDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ChainDescriptor_messageType fastReflection_ChainDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_ChainDescriptor_messageType{} - -type fastReflection_ChainDescriptor_messageType struct{} - -func (x fastReflection_ChainDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainDescriptor)(nil) -} -func (x fastReflection_ChainDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_ChainDescriptor) -} -func (x fastReflection_ChainDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ChainDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_ChainDescriptor -} - -// 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_ChainDescriptor) Type() protoreflect.MessageType { - return _fastReflection_ChainDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainDescriptor) New() protoreflect.Message { - return new(fastReflection_ChainDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainDescriptor) Interface() protoreflect.ProtoMessage { - return (*ChainDescriptor)(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_ChainDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_ChainDescriptor_id, 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_ChainDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ChainDescriptor.id": - return x.Id != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ChainDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ChainDescriptor 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_ChainDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ChainDescriptor.id": - x.Id = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ChainDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ChainDescriptor 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_ChainDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.ChainDescriptor.id": - value := x.Id - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ChainDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ChainDescriptor 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_ChainDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ChainDescriptor.id": - x.Id = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ChainDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ChainDescriptor 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_ChainDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ChainDescriptor.id": - panic(fmt.Errorf("field id of message cosmos.base.reflection.v2alpha1.ChainDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ChainDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ChainDescriptor 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_ChainDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ChainDescriptor.id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ChainDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ChainDescriptor 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_ChainDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.ChainDescriptor", 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_ChainDescriptor) 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_ChainDescriptor) 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_ChainDescriptor) 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_ChainDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ChainDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*ChainDescriptor) - 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: ChainDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainDescriptor: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_CodecDescriptor_1_list)(nil) - -type _CodecDescriptor_1_list struct { - list *[]*InterfaceDescriptor -} - -func (x *_CodecDescriptor_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_CodecDescriptor_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_CodecDescriptor_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*InterfaceDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_CodecDescriptor_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*InterfaceDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_CodecDescriptor_1_list) AppendMutable() protoreflect.Value { - v := new(InterfaceDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CodecDescriptor_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_CodecDescriptor_1_list) NewElement() protoreflect.Value { - v := new(InterfaceDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CodecDescriptor_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_CodecDescriptor protoreflect.MessageDescriptor - fd_CodecDescriptor_interfaces protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_CodecDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("CodecDescriptor") - fd_CodecDescriptor_interfaces = md_CodecDescriptor.Fields().ByName("interfaces") -} - -var _ protoreflect.Message = (*fastReflection_CodecDescriptor)(nil) - -type fastReflection_CodecDescriptor CodecDescriptor - -func (x *CodecDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_CodecDescriptor)(x) -} - -func (x *CodecDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_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_CodecDescriptor_messageType fastReflection_CodecDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_CodecDescriptor_messageType{} - -type fastReflection_CodecDescriptor_messageType struct{} - -func (x fastReflection_CodecDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_CodecDescriptor)(nil) -} -func (x fastReflection_CodecDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_CodecDescriptor) -} -func (x fastReflection_CodecDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CodecDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CodecDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_CodecDescriptor -} - -// 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_CodecDescriptor) Type() protoreflect.MessageType { - return _fastReflection_CodecDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CodecDescriptor) New() protoreflect.Message { - return new(fastReflection_CodecDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CodecDescriptor) Interface() protoreflect.ProtoMessage { - return (*CodecDescriptor)(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_CodecDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Interfaces) != 0 { - value := protoreflect.ValueOfList(&_CodecDescriptor_1_list{list: &x.Interfaces}) - if !f(fd_CodecDescriptor_interfaces, 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_CodecDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces": - return len(x.Interfaces) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.CodecDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.CodecDescriptor 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_CodecDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces": - x.Interfaces = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.CodecDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.CodecDescriptor 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_CodecDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces": - if len(x.Interfaces) == 0 { - return protoreflect.ValueOfList(&_CodecDescriptor_1_list{}) - } - listValue := &_CodecDescriptor_1_list{list: &x.Interfaces} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.CodecDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.CodecDescriptor 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_CodecDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces": - lv := value.List() - clv := lv.(*_CodecDescriptor_1_list) - x.Interfaces = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.CodecDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.CodecDescriptor 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_CodecDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces": - if x.Interfaces == nil { - x.Interfaces = []*InterfaceDescriptor{} - } - value := &_CodecDescriptor_1_list{list: &x.Interfaces} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.CodecDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.CodecDescriptor 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_CodecDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces": - list := []*InterfaceDescriptor{} - return protoreflect.ValueOfList(&_CodecDescriptor_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.CodecDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.CodecDescriptor 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_CodecDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.CodecDescriptor", 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_CodecDescriptor) 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_CodecDescriptor) 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_CodecDescriptor) 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_CodecDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CodecDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Interfaces) > 0 { - for _, e := range x.Interfaces { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CodecDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Interfaces) > 0 { - for iNdEx := len(x.Interfaces) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Interfaces[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CodecDescriptor) - 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: CodecDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CodecDescriptor: 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 Interfaces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Interfaces = append(x.Interfaces, &InterfaceDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Interfaces[len(x.Interfaces)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_InterfaceDescriptor_2_list)(nil) - -type _InterfaceDescriptor_2_list struct { - list *[]*InterfaceAcceptingMessageDescriptor -} - -func (x *_InterfaceDescriptor_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_InterfaceDescriptor_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_InterfaceDescriptor_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*InterfaceAcceptingMessageDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_InterfaceDescriptor_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*InterfaceAcceptingMessageDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_InterfaceDescriptor_2_list) AppendMutable() protoreflect.Value { - v := new(InterfaceAcceptingMessageDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_InterfaceDescriptor_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_InterfaceDescriptor_2_list) NewElement() protoreflect.Value { - v := new(InterfaceAcceptingMessageDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_InterfaceDescriptor_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_InterfaceDescriptor_3_list)(nil) - -type _InterfaceDescriptor_3_list struct { - list *[]*InterfaceImplementerDescriptor -} - -func (x *_InterfaceDescriptor_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_InterfaceDescriptor_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_InterfaceDescriptor_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*InterfaceImplementerDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_InterfaceDescriptor_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*InterfaceImplementerDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_InterfaceDescriptor_3_list) AppendMutable() protoreflect.Value { - v := new(InterfaceImplementerDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_InterfaceDescriptor_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_InterfaceDescriptor_3_list) NewElement() protoreflect.Value { - v := new(InterfaceImplementerDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_InterfaceDescriptor_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_InterfaceDescriptor protoreflect.MessageDescriptor - fd_InterfaceDescriptor_fullname protoreflect.FieldDescriptor - fd_InterfaceDescriptor_interface_accepting_messages protoreflect.FieldDescriptor - fd_InterfaceDescriptor_interface_implementers protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_InterfaceDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("InterfaceDescriptor") - fd_InterfaceDescriptor_fullname = md_InterfaceDescriptor.Fields().ByName("fullname") - fd_InterfaceDescriptor_interface_accepting_messages = md_InterfaceDescriptor.Fields().ByName("interface_accepting_messages") - fd_InterfaceDescriptor_interface_implementers = md_InterfaceDescriptor.Fields().ByName("interface_implementers") -} - -var _ protoreflect.Message = (*fastReflection_InterfaceDescriptor)(nil) - -type fastReflection_InterfaceDescriptor InterfaceDescriptor - -func (x *InterfaceDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_InterfaceDescriptor)(x) -} - -func (x *InterfaceDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_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_InterfaceDescriptor_messageType fastReflection_InterfaceDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_InterfaceDescriptor_messageType{} - -type fastReflection_InterfaceDescriptor_messageType struct{} - -func (x fastReflection_InterfaceDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_InterfaceDescriptor)(nil) -} -func (x fastReflection_InterfaceDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_InterfaceDescriptor) -} -func (x fastReflection_InterfaceDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_InterfaceDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_InterfaceDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_InterfaceDescriptor -} - -// 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_InterfaceDescriptor) Type() protoreflect.MessageType { - return _fastReflection_InterfaceDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_InterfaceDescriptor) New() protoreflect.Message { - return new(fastReflection_InterfaceDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_InterfaceDescriptor) Interface() protoreflect.ProtoMessage { - return (*InterfaceDescriptor)(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_InterfaceDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fullname != "" { - value := protoreflect.ValueOfString(x.Fullname) - if !f(fd_InterfaceDescriptor_fullname, value) { - return - } - } - if len(x.InterfaceAcceptingMessages) != 0 { - value := protoreflect.ValueOfList(&_InterfaceDescriptor_2_list{list: &x.InterfaceAcceptingMessages}) - if !f(fd_InterfaceDescriptor_interface_accepting_messages, value) { - return - } - } - if len(x.InterfaceImplementers) != 0 { - value := protoreflect.ValueOfList(&_InterfaceDescriptor_3_list{list: &x.InterfaceImplementers}) - if !f(fd_InterfaceDescriptor_interface_implementers, 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_InterfaceDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.fullname": - return x.Fullname != "" - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages": - return len(x.InterfaceAcceptingMessages) != 0 - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers": - return len(x.InterfaceImplementers) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceDescriptor 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_InterfaceDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.fullname": - x.Fullname = "" - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages": - x.InterfaceAcceptingMessages = nil - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers": - x.InterfaceImplementers = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceDescriptor 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_InterfaceDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.fullname": - value := x.Fullname - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages": - if len(x.InterfaceAcceptingMessages) == 0 { - return protoreflect.ValueOfList(&_InterfaceDescriptor_2_list{}) - } - listValue := &_InterfaceDescriptor_2_list{list: &x.InterfaceAcceptingMessages} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers": - if len(x.InterfaceImplementers) == 0 { - return protoreflect.ValueOfList(&_InterfaceDescriptor_3_list{}) - } - listValue := &_InterfaceDescriptor_3_list{list: &x.InterfaceImplementers} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceDescriptor 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_InterfaceDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.fullname": - x.Fullname = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages": - lv := value.List() - clv := lv.(*_InterfaceDescriptor_2_list) - x.InterfaceAcceptingMessages = *clv.list - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers": - lv := value.List() - clv := lv.(*_InterfaceDescriptor_3_list) - x.InterfaceImplementers = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceDescriptor 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_InterfaceDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages": - if x.InterfaceAcceptingMessages == nil { - x.InterfaceAcceptingMessages = []*InterfaceAcceptingMessageDescriptor{} - } - value := &_InterfaceDescriptor_2_list{list: &x.InterfaceAcceptingMessages} - return protoreflect.ValueOfList(value) - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers": - if x.InterfaceImplementers == nil { - x.InterfaceImplementers = []*InterfaceImplementerDescriptor{} - } - value := &_InterfaceDescriptor_3_list{list: &x.InterfaceImplementers} - return protoreflect.ValueOfList(value) - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.fullname": - panic(fmt.Errorf("field fullname of message cosmos.base.reflection.v2alpha1.InterfaceDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceDescriptor 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_InterfaceDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.fullname": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages": - list := []*InterfaceAcceptingMessageDescriptor{} - return protoreflect.ValueOfList(&_InterfaceDescriptor_2_list{list: &list}) - case "cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers": - list := []*InterfaceImplementerDescriptor{} - return protoreflect.ValueOfList(&_InterfaceDescriptor_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceDescriptor 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_InterfaceDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.InterfaceDescriptor", 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_InterfaceDescriptor) 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_InterfaceDescriptor) 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_InterfaceDescriptor) 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_InterfaceDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*InterfaceDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fullname) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.InterfaceAcceptingMessages) > 0 { - for _, e := range x.InterfaceAcceptingMessages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.InterfaceImplementers) > 0 { - for _, e := range x.InterfaceImplementers { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*InterfaceDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InterfaceImplementers) > 0 { - for iNdEx := len(x.InterfaceImplementers) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.InterfaceImplementers[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.InterfaceAcceptingMessages) > 0 { - for iNdEx := len(x.InterfaceAcceptingMessages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.InterfaceAcceptingMessages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Fullname) > 0 { - i -= len(x.Fullname) - copy(dAtA[i:], x.Fullname) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fullname))) - 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().(*InterfaceDescriptor) - 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: InterfaceDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InterfaceDescriptor: 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 Fullname", 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.Fullname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InterfaceAcceptingMessages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InterfaceAcceptingMessages = append(x.InterfaceAcceptingMessages, &InterfaceAcceptingMessageDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InterfaceAcceptingMessages[len(x.InterfaceAcceptingMessages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InterfaceImplementers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InterfaceImplementers = append(x.InterfaceImplementers, &InterfaceImplementerDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InterfaceImplementers[len(x.InterfaceImplementers)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_InterfaceImplementerDescriptor protoreflect.MessageDescriptor - fd_InterfaceImplementerDescriptor_fullname protoreflect.FieldDescriptor - fd_InterfaceImplementerDescriptor_type_url protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_InterfaceImplementerDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("InterfaceImplementerDescriptor") - fd_InterfaceImplementerDescriptor_fullname = md_InterfaceImplementerDescriptor.Fields().ByName("fullname") - fd_InterfaceImplementerDescriptor_type_url = md_InterfaceImplementerDescriptor.Fields().ByName("type_url") -} - -var _ protoreflect.Message = (*fastReflection_InterfaceImplementerDescriptor)(nil) - -type fastReflection_InterfaceImplementerDescriptor InterfaceImplementerDescriptor - -func (x *InterfaceImplementerDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_InterfaceImplementerDescriptor)(x) -} - -func (x *InterfaceImplementerDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_InterfaceImplementerDescriptor_messageType fastReflection_InterfaceImplementerDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_InterfaceImplementerDescriptor_messageType{} - -type fastReflection_InterfaceImplementerDescriptor_messageType struct{} - -func (x fastReflection_InterfaceImplementerDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_InterfaceImplementerDescriptor)(nil) -} -func (x fastReflection_InterfaceImplementerDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_InterfaceImplementerDescriptor) -} -func (x fastReflection_InterfaceImplementerDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_InterfaceImplementerDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_InterfaceImplementerDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_InterfaceImplementerDescriptor -} - -// 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_InterfaceImplementerDescriptor) Type() protoreflect.MessageType { - return _fastReflection_InterfaceImplementerDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_InterfaceImplementerDescriptor) New() protoreflect.Message { - return new(fastReflection_InterfaceImplementerDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_InterfaceImplementerDescriptor) Interface() protoreflect.ProtoMessage { - return (*InterfaceImplementerDescriptor)(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_InterfaceImplementerDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fullname != "" { - value := protoreflect.ValueOfString(x.Fullname) - if !f(fd_InterfaceImplementerDescriptor_fullname, value) { - return - } - } - if x.TypeUrl != "" { - value := protoreflect.ValueOfString(x.TypeUrl) - if !f(fd_InterfaceImplementerDescriptor_type_url, 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_InterfaceImplementerDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.fullname": - return x.Fullname != "" - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.type_url": - return x.TypeUrl != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor 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_InterfaceImplementerDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.fullname": - x.Fullname = "" - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.type_url": - x.TypeUrl = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor 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_InterfaceImplementerDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.fullname": - value := x.Fullname - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.type_url": - value := x.TypeUrl - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor 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_InterfaceImplementerDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.fullname": - x.Fullname = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.type_url": - x.TypeUrl = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor 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_InterfaceImplementerDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.fullname": - panic(fmt.Errorf("field fullname of message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor is not mutable")) - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.type_url": - panic(fmt.Errorf("field type_url of message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor 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_InterfaceImplementerDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.fullname": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor.type_url": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor 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_InterfaceImplementerDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", 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_InterfaceImplementerDescriptor) 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_InterfaceImplementerDescriptor) 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_InterfaceImplementerDescriptor) 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_InterfaceImplementerDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*InterfaceImplementerDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fullname) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*InterfaceImplementerDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.TypeUrl) > 0 { - i -= len(x.TypeUrl) - copy(dAtA[i:], x.TypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TypeUrl))) - i-- - dAtA[i] = 0x12 - } - if len(x.Fullname) > 0 { - i -= len(x.Fullname) - copy(dAtA[i:], x.Fullname) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fullname))) - 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().(*InterfaceImplementerDescriptor) - 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: InterfaceImplementerDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InterfaceImplementerDescriptor: 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 Fullname", 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.Fullname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", 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.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_InterfaceAcceptingMessageDescriptor_2_list)(nil) - -type _InterfaceAcceptingMessageDescriptor_2_list struct { - list *[]string -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message InterfaceAcceptingMessageDescriptor at list field FieldDescriptorNames as it is not of Message kind")) -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_InterfaceAcceptingMessageDescriptor_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_InterfaceAcceptingMessageDescriptor protoreflect.MessageDescriptor - fd_InterfaceAcceptingMessageDescriptor_fullname protoreflect.FieldDescriptor - fd_InterfaceAcceptingMessageDescriptor_field_descriptor_names protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_InterfaceAcceptingMessageDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("InterfaceAcceptingMessageDescriptor") - fd_InterfaceAcceptingMessageDescriptor_fullname = md_InterfaceAcceptingMessageDescriptor.Fields().ByName("fullname") - fd_InterfaceAcceptingMessageDescriptor_field_descriptor_names = md_InterfaceAcceptingMessageDescriptor.Fields().ByName("field_descriptor_names") -} - -var _ protoreflect.Message = (*fastReflection_InterfaceAcceptingMessageDescriptor)(nil) - -type fastReflection_InterfaceAcceptingMessageDescriptor InterfaceAcceptingMessageDescriptor - -func (x *InterfaceAcceptingMessageDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_InterfaceAcceptingMessageDescriptor)(x) -} - -func (x *InterfaceAcceptingMessageDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_InterfaceAcceptingMessageDescriptor_messageType fastReflection_InterfaceAcceptingMessageDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_InterfaceAcceptingMessageDescriptor_messageType{} - -type fastReflection_InterfaceAcceptingMessageDescriptor_messageType struct{} - -func (x fastReflection_InterfaceAcceptingMessageDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_InterfaceAcceptingMessageDescriptor)(nil) -} -func (x fastReflection_InterfaceAcceptingMessageDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_InterfaceAcceptingMessageDescriptor) -} -func (x fastReflection_InterfaceAcceptingMessageDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_InterfaceAcceptingMessageDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_InterfaceAcceptingMessageDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_InterfaceAcceptingMessageDescriptor -} - -// 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_InterfaceAcceptingMessageDescriptor) Type() protoreflect.MessageType { - return _fastReflection_InterfaceAcceptingMessageDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_InterfaceAcceptingMessageDescriptor) New() protoreflect.Message { - return new(fastReflection_InterfaceAcceptingMessageDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_InterfaceAcceptingMessageDescriptor) Interface() protoreflect.ProtoMessage { - return (*InterfaceAcceptingMessageDescriptor)(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_InterfaceAcceptingMessageDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fullname != "" { - value := protoreflect.ValueOfString(x.Fullname) - if !f(fd_InterfaceAcceptingMessageDescriptor_fullname, value) { - return - } - } - if len(x.FieldDescriptorNames) != 0 { - value := protoreflect.ValueOfList(&_InterfaceAcceptingMessageDescriptor_2_list{list: &x.FieldDescriptorNames}) - if !f(fd_InterfaceAcceptingMessageDescriptor_field_descriptor_names, 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_InterfaceAcceptingMessageDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.fullname": - return x.Fullname != "" - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.field_descriptor_names": - return len(x.FieldDescriptorNames) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor 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_InterfaceAcceptingMessageDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.fullname": - x.Fullname = "" - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.field_descriptor_names": - x.FieldDescriptorNames = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor 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_InterfaceAcceptingMessageDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.fullname": - value := x.Fullname - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.field_descriptor_names": - if len(x.FieldDescriptorNames) == 0 { - return protoreflect.ValueOfList(&_InterfaceAcceptingMessageDescriptor_2_list{}) - } - listValue := &_InterfaceAcceptingMessageDescriptor_2_list{list: &x.FieldDescriptorNames} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor 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_InterfaceAcceptingMessageDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.fullname": - x.Fullname = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.field_descriptor_names": - lv := value.List() - clv := lv.(*_InterfaceAcceptingMessageDescriptor_2_list) - x.FieldDescriptorNames = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor 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_InterfaceAcceptingMessageDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.field_descriptor_names": - if x.FieldDescriptorNames == nil { - x.FieldDescriptorNames = []string{} - } - value := &_InterfaceAcceptingMessageDescriptor_2_list{list: &x.FieldDescriptorNames} - return protoreflect.ValueOfList(value) - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.fullname": - panic(fmt.Errorf("field fullname of message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor 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_InterfaceAcceptingMessageDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.fullname": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor.field_descriptor_names": - list := []string{} - return protoreflect.ValueOfList(&_InterfaceAcceptingMessageDescriptor_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor 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_InterfaceAcceptingMessageDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", 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_InterfaceAcceptingMessageDescriptor) 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_InterfaceAcceptingMessageDescriptor) 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_InterfaceAcceptingMessageDescriptor) 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_InterfaceAcceptingMessageDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*InterfaceAcceptingMessageDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fullname) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.FieldDescriptorNames) > 0 { - for _, s := range x.FieldDescriptorNames { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*InterfaceAcceptingMessageDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.FieldDescriptorNames) > 0 { - for iNdEx := len(x.FieldDescriptorNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.FieldDescriptorNames[iNdEx]) - copy(dAtA[i:], x.FieldDescriptorNames[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FieldDescriptorNames[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Fullname) > 0 { - i -= len(x.Fullname) - copy(dAtA[i:], x.Fullname) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fullname))) - 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().(*InterfaceAcceptingMessageDescriptor) - 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: InterfaceAcceptingMessageDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InterfaceAcceptingMessageDescriptor: 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 Fullname", 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.Fullname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FieldDescriptorNames", 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.FieldDescriptorNames = append(x.FieldDescriptorNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ConfigurationDescriptor protoreflect.MessageDescriptor - fd_ConfigurationDescriptor_bech32_account_address_prefix protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_ConfigurationDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("ConfigurationDescriptor") - fd_ConfigurationDescriptor_bech32_account_address_prefix = md_ConfigurationDescriptor.Fields().ByName("bech32_account_address_prefix") -} - -var _ protoreflect.Message = (*fastReflection_ConfigurationDescriptor)(nil) - -type fastReflection_ConfigurationDescriptor ConfigurationDescriptor - -func (x *ConfigurationDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConfigurationDescriptor)(x) -} - -func (x *ConfigurationDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ConfigurationDescriptor_messageType fastReflection_ConfigurationDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_ConfigurationDescriptor_messageType{} - -type fastReflection_ConfigurationDescriptor_messageType struct{} - -func (x fastReflection_ConfigurationDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConfigurationDescriptor)(nil) -} -func (x fastReflection_ConfigurationDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_ConfigurationDescriptor) -} -func (x fastReflection_ConfigurationDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConfigurationDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConfigurationDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_ConfigurationDescriptor -} - -// 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_ConfigurationDescriptor) Type() protoreflect.MessageType { - return _fastReflection_ConfigurationDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConfigurationDescriptor) New() protoreflect.Message { - return new(fastReflection_ConfigurationDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConfigurationDescriptor) Interface() protoreflect.ProtoMessage { - return (*ConfigurationDescriptor)(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_ConfigurationDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bech32AccountAddressPrefix != "" { - value := protoreflect.ValueOfString(x.Bech32AccountAddressPrefix) - if !f(fd_ConfigurationDescriptor_bech32_account_address_prefix, 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_ConfigurationDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.bech32_account_address_prefix": - return x.Bech32AccountAddressPrefix != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor 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_ConfigurationDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.bech32_account_address_prefix": - x.Bech32AccountAddressPrefix = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor 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_ConfigurationDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.bech32_account_address_prefix": - value := x.Bech32AccountAddressPrefix - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor 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_ConfigurationDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.bech32_account_address_prefix": - x.Bech32AccountAddressPrefix = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor 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_ConfigurationDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.bech32_account_address_prefix": - panic(fmt.Errorf("field bech32_account_address_prefix of message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor 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_ConfigurationDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor.bech32_account_address_prefix": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.ConfigurationDescriptor 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_ConfigurationDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", 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_ConfigurationDescriptor) 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_ConfigurationDescriptor) 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_ConfigurationDescriptor) 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_ConfigurationDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConfigurationDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Bech32AccountAddressPrefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ConfigurationDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Bech32AccountAddressPrefix) > 0 { - i -= len(x.Bech32AccountAddressPrefix) - copy(dAtA[i:], x.Bech32AccountAddressPrefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32AccountAddressPrefix))) - 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().(*ConfigurationDescriptor) - 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: ConfigurationDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConfigurationDescriptor: 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 Bech32AccountAddressPrefix", 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.Bech32AccountAddressPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDescriptor protoreflect.MessageDescriptor - fd_MsgDescriptor_msg_type_url protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_MsgDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("MsgDescriptor") - fd_MsgDescriptor_msg_type_url = md_MsgDescriptor.Fields().ByName("msg_type_url") -} - -var _ protoreflect.Message = (*fastReflection_MsgDescriptor)(nil) - -type fastReflection_MsgDescriptor MsgDescriptor - -func (x *MsgDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDescriptor)(x) -} - -func (x *MsgDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDescriptor_messageType fastReflection_MsgDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_MsgDescriptor_messageType{} - -type fastReflection_MsgDescriptor_messageType struct{} - -func (x fastReflection_MsgDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDescriptor)(nil) -} -func (x fastReflection_MsgDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDescriptor) -} -func (x fastReflection_MsgDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDescriptor -} - -// 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_MsgDescriptor) Type() protoreflect.MessageType { - return _fastReflection_MsgDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDescriptor) New() protoreflect.Message { - return new(fastReflection_MsgDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDescriptor) Interface() protoreflect.ProtoMessage { - return (*MsgDescriptor)(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_MsgDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MsgTypeUrl != "" { - value := protoreflect.ValueOfString(x.MsgTypeUrl) - if !f(fd_MsgDescriptor_msg_type_url, 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_MsgDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.MsgDescriptor.msg_type_url": - return x.MsgTypeUrl != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.MsgDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.MsgDescriptor 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_MsgDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.MsgDescriptor.msg_type_url": - x.MsgTypeUrl = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.MsgDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.MsgDescriptor 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_MsgDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.MsgDescriptor.msg_type_url": - value := x.MsgTypeUrl - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.MsgDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.MsgDescriptor 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_MsgDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.MsgDescriptor.msg_type_url": - x.MsgTypeUrl = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.MsgDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.MsgDescriptor 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_MsgDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.MsgDescriptor.msg_type_url": - panic(fmt.Errorf("field msg_type_url of message cosmos.base.reflection.v2alpha1.MsgDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.MsgDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.MsgDescriptor 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_MsgDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.MsgDescriptor.msg_type_url": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.MsgDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.MsgDescriptor 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_MsgDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.MsgDescriptor", 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_MsgDescriptor) 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_MsgDescriptor) 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_MsgDescriptor) 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_MsgDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.MsgTypeUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MsgTypeUrl) > 0 { - i -= len(x.MsgTypeUrl) - copy(dAtA[i:], x.MsgTypeUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MsgTypeUrl))) - 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().(*MsgDescriptor) - 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: MsgDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDescriptor: 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 MsgTypeUrl", 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.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetAuthnDescriptorRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetAuthnDescriptorRequest = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetAuthnDescriptorRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetAuthnDescriptorRequest)(nil) - -type fastReflection_GetAuthnDescriptorRequest GetAuthnDescriptorRequest - -func (x *GetAuthnDescriptorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetAuthnDescriptorRequest)(x) -} - -func (x *GetAuthnDescriptorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetAuthnDescriptorRequest_messageType fastReflection_GetAuthnDescriptorRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetAuthnDescriptorRequest_messageType{} - -type fastReflection_GetAuthnDescriptorRequest_messageType struct{} - -func (x fastReflection_GetAuthnDescriptorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetAuthnDescriptorRequest)(nil) -} -func (x fastReflection_GetAuthnDescriptorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetAuthnDescriptorRequest) -} -func (x fastReflection_GetAuthnDescriptorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetAuthnDescriptorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetAuthnDescriptorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetAuthnDescriptorRequest -} - -// 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_GetAuthnDescriptorRequest) Type() protoreflect.MessageType { - return _fastReflection_GetAuthnDescriptorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetAuthnDescriptorRequest) New() protoreflect.Message { - return new(fastReflection_GetAuthnDescriptorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetAuthnDescriptorRequest) Interface() protoreflect.ProtoMessage { - return (*GetAuthnDescriptorRequest)(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_GetAuthnDescriptorRequest) 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_GetAuthnDescriptorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest 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_GetAuthnDescriptorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest 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_GetAuthnDescriptorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest 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_GetAuthnDescriptorRequest) 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.base.reflection.v2alpha1.GetAuthnDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest 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_GetAuthnDescriptorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest 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_GetAuthnDescriptorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest 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_GetAuthnDescriptorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", 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_GetAuthnDescriptorRequest) 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_GetAuthnDescriptorRequest) 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_GetAuthnDescriptorRequest) 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_GetAuthnDescriptorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetAuthnDescriptorRequest) - 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().(*GetAuthnDescriptorRequest) - 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().(*GetAuthnDescriptorRequest) - 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: GetAuthnDescriptorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetAuthnDescriptorRequest: 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_GetAuthnDescriptorResponse protoreflect.MessageDescriptor - fd_GetAuthnDescriptorResponse_authn protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetAuthnDescriptorResponse = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetAuthnDescriptorResponse") - fd_GetAuthnDescriptorResponse_authn = md_GetAuthnDescriptorResponse.Fields().ByName("authn") -} - -var _ protoreflect.Message = (*fastReflection_GetAuthnDescriptorResponse)(nil) - -type fastReflection_GetAuthnDescriptorResponse GetAuthnDescriptorResponse - -func (x *GetAuthnDescriptorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetAuthnDescriptorResponse)(x) -} - -func (x *GetAuthnDescriptorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetAuthnDescriptorResponse_messageType fastReflection_GetAuthnDescriptorResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetAuthnDescriptorResponse_messageType{} - -type fastReflection_GetAuthnDescriptorResponse_messageType struct{} - -func (x fastReflection_GetAuthnDescriptorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetAuthnDescriptorResponse)(nil) -} -func (x fastReflection_GetAuthnDescriptorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetAuthnDescriptorResponse) -} -func (x fastReflection_GetAuthnDescriptorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetAuthnDescriptorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetAuthnDescriptorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetAuthnDescriptorResponse -} - -// 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_GetAuthnDescriptorResponse) Type() protoreflect.MessageType { - return _fastReflection_GetAuthnDescriptorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetAuthnDescriptorResponse) New() protoreflect.Message { - return new(fastReflection_GetAuthnDescriptorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetAuthnDescriptorResponse) Interface() protoreflect.ProtoMessage { - return (*GetAuthnDescriptorResponse)(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_GetAuthnDescriptorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authn != nil { - value := protoreflect.ValueOfMessage(x.Authn.ProtoReflect()) - if !f(fd_GetAuthnDescriptorResponse_authn, 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_GetAuthnDescriptorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn": - return x.Authn != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse 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_GetAuthnDescriptorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn": - x.Authn = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse 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_GetAuthnDescriptorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn": - value := x.Authn - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse 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_GetAuthnDescriptorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn": - x.Authn = value.Message().Interface().(*AuthnDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse 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_GetAuthnDescriptorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn": - if x.Authn == nil { - x.Authn = new(AuthnDescriptor) - } - return protoreflect.ValueOfMessage(x.Authn.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse 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_GetAuthnDescriptorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn": - m := new(AuthnDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse 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_GetAuthnDescriptorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", 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_GetAuthnDescriptorResponse) 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_GetAuthnDescriptorResponse) 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_GetAuthnDescriptorResponse) 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_GetAuthnDescriptorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetAuthnDescriptorResponse) - 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.Authn != nil { - l = options.Size(x.Authn) - 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().(*GetAuthnDescriptorResponse) - 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.Authn != nil { - encoded, err := options.Marshal(x.Authn) - 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().(*GetAuthnDescriptorResponse) - 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: GetAuthnDescriptorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetAuthnDescriptorResponse: 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 Authn", 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.Authn == nil { - x.Authn = &AuthnDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authn); 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_GetChainDescriptorRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetChainDescriptorRequest = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetChainDescriptorRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetChainDescriptorRequest)(nil) - -type fastReflection_GetChainDescriptorRequest GetChainDescriptorRequest - -func (x *GetChainDescriptorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetChainDescriptorRequest)(x) -} - -func (x *GetChainDescriptorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetChainDescriptorRequest_messageType fastReflection_GetChainDescriptorRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetChainDescriptorRequest_messageType{} - -type fastReflection_GetChainDescriptorRequest_messageType struct{} - -func (x fastReflection_GetChainDescriptorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetChainDescriptorRequest)(nil) -} -func (x fastReflection_GetChainDescriptorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetChainDescriptorRequest) -} -func (x fastReflection_GetChainDescriptorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetChainDescriptorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetChainDescriptorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetChainDescriptorRequest -} - -// 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_GetChainDescriptorRequest) Type() protoreflect.MessageType { - return _fastReflection_GetChainDescriptorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetChainDescriptorRequest) New() protoreflect.Message { - return new(fastReflection_GetChainDescriptorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetChainDescriptorRequest) Interface() protoreflect.ProtoMessage { - return (*GetChainDescriptorRequest)(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_GetChainDescriptorRequest) 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_GetChainDescriptorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest 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_GetChainDescriptorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest 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_GetChainDescriptorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest 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_GetChainDescriptorRequest) 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.base.reflection.v2alpha1.GetChainDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest 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_GetChainDescriptorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest 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_GetChainDescriptorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest 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_GetChainDescriptorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", 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_GetChainDescriptorRequest) 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_GetChainDescriptorRequest) 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_GetChainDescriptorRequest) 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_GetChainDescriptorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetChainDescriptorRequest) - 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().(*GetChainDescriptorRequest) - 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().(*GetChainDescriptorRequest) - 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: GetChainDescriptorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetChainDescriptorRequest: 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_GetChainDescriptorResponse protoreflect.MessageDescriptor - fd_GetChainDescriptorResponse_chain protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetChainDescriptorResponse = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetChainDescriptorResponse") - fd_GetChainDescriptorResponse_chain = md_GetChainDescriptorResponse.Fields().ByName("chain") -} - -var _ protoreflect.Message = (*fastReflection_GetChainDescriptorResponse)(nil) - -type fastReflection_GetChainDescriptorResponse GetChainDescriptorResponse - -func (x *GetChainDescriptorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetChainDescriptorResponse)(x) -} - -func (x *GetChainDescriptorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetChainDescriptorResponse_messageType fastReflection_GetChainDescriptorResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetChainDescriptorResponse_messageType{} - -type fastReflection_GetChainDescriptorResponse_messageType struct{} - -func (x fastReflection_GetChainDescriptorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetChainDescriptorResponse)(nil) -} -func (x fastReflection_GetChainDescriptorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetChainDescriptorResponse) -} -func (x fastReflection_GetChainDescriptorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetChainDescriptorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetChainDescriptorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetChainDescriptorResponse -} - -// 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_GetChainDescriptorResponse) Type() protoreflect.MessageType { - return _fastReflection_GetChainDescriptorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetChainDescriptorResponse) New() protoreflect.Message { - return new(fastReflection_GetChainDescriptorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetChainDescriptorResponse) Interface() protoreflect.ProtoMessage { - return (*GetChainDescriptorResponse)(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_GetChainDescriptorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Chain != nil { - value := protoreflect.ValueOfMessage(x.Chain.ProtoReflect()) - if !f(fd_GetChainDescriptorResponse_chain, 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_GetChainDescriptorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain": - return x.Chain != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse 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_GetChainDescriptorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain": - x.Chain = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse 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_GetChainDescriptorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain": - value := x.Chain - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse 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_GetChainDescriptorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain": - x.Chain = value.Message().Interface().(*ChainDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse 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_GetChainDescriptorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain": - if x.Chain == nil { - x.Chain = new(ChainDescriptor) - } - return protoreflect.ValueOfMessage(x.Chain.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse 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_GetChainDescriptorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain": - m := new(ChainDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse 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_GetChainDescriptorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", 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_GetChainDescriptorResponse) 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_GetChainDescriptorResponse) 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_GetChainDescriptorResponse) 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_GetChainDescriptorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetChainDescriptorResponse) - 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.Chain != nil { - l = options.Size(x.Chain) - 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().(*GetChainDescriptorResponse) - 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.Chain != nil { - encoded, err := options.Marshal(x.Chain) - 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().(*GetChainDescriptorResponse) - 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: GetChainDescriptorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetChainDescriptorResponse: 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 Chain", 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.Chain == nil { - x.Chain = &ChainDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Chain); 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_GetCodecDescriptorRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetCodecDescriptorRequest = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetCodecDescriptorRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetCodecDescriptorRequest)(nil) - -type fastReflection_GetCodecDescriptorRequest GetCodecDescriptorRequest - -func (x *GetCodecDescriptorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetCodecDescriptorRequest)(x) -} - -func (x *GetCodecDescriptorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetCodecDescriptorRequest_messageType fastReflection_GetCodecDescriptorRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetCodecDescriptorRequest_messageType{} - -type fastReflection_GetCodecDescriptorRequest_messageType struct{} - -func (x fastReflection_GetCodecDescriptorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetCodecDescriptorRequest)(nil) -} -func (x fastReflection_GetCodecDescriptorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetCodecDescriptorRequest) -} -func (x fastReflection_GetCodecDescriptorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetCodecDescriptorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetCodecDescriptorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetCodecDescriptorRequest -} - -// 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_GetCodecDescriptorRequest) Type() protoreflect.MessageType { - return _fastReflection_GetCodecDescriptorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetCodecDescriptorRequest) New() protoreflect.Message { - return new(fastReflection_GetCodecDescriptorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetCodecDescriptorRequest) Interface() protoreflect.ProtoMessage { - return (*GetCodecDescriptorRequest)(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_GetCodecDescriptorRequest) 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_GetCodecDescriptorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest 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_GetCodecDescriptorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest 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_GetCodecDescriptorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest 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_GetCodecDescriptorRequest) 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.base.reflection.v2alpha1.GetCodecDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest 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_GetCodecDescriptorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest 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_GetCodecDescriptorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest 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_GetCodecDescriptorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", 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_GetCodecDescriptorRequest) 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_GetCodecDescriptorRequest) 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_GetCodecDescriptorRequest) 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_GetCodecDescriptorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetCodecDescriptorRequest) - 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().(*GetCodecDescriptorRequest) - 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().(*GetCodecDescriptorRequest) - 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: GetCodecDescriptorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetCodecDescriptorRequest: 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_GetCodecDescriptorResponse protoreflect.MessageDescriptor - fd_GetCodecDescriptorResponse_codec protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetCodecDescriptorResponse = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetCodecDescriptorResponse") - fd_GetCodecDescriptorResponse_codec = md_GetCodecDescriptorResponse.Fields().ByName("codec") -} - -var _ protoreflect.Message = (*fastReflection_GetCodecDescriptorResponse)(nil) - -type fastReflection_GetCodecDescriptorResponse GetCodecDescriptorResponse - -func (x *GetCodecDescriptorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetCodecDescriptorResponse)(x) -} - -func (x *GetCodecDescriptorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetCodecDescriptorResponse_messageType fastReflection_GetCodecDescriptorResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetCodecDescriptorResponse_messageType{} - -type fastReflection_GetCodecDescriptorResponse_messageType struct{} - -func (x fastReflection_GetCodecDescriptorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetCodecDescriptorResponse)(nil) -} -func (x fastReflection_GetCodecDescriptorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetCodecDescriptorResponse) -} -func (x fastReflection_GetCodecDescriptorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetCodecDescriptorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetCodecDescriptorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetCodecDescriptorResponse -} - -// 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_GetCodecDescriptorResponse) Type() protoreflect.MessageType { - return _fastReflection_GetCodecDescriptorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetCodecDescriptorResponse) New() protoreflect.Message { - return new(fastReflection_GetCodecDescriptorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetCodecDescriptorResponse) Interface() protoreflect.ProtoMessage { - return (*GetCodecDescriptorResponse)(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_GetCodecDescriptorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Codec != nil { - value := protoreflect.ValueOfMessage(x.Codec.ProtoReflect()) - if !f(fd_GetCodecDescriptorResponse_codec, 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_GetCodecDescriptorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec": - return x.Codec != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse 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_GetCodecDescriptorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec": - x.Codec = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse 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_GetCodecDescriptorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec": - value := x.Codec - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse 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_GetCodecDescriptorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec": - x.Codec = value.Message().Interface().(*CodecDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse 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_GetCodecDescriptorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec": - if x.Codec == nil { - x.Codec = new(CodecDescriptor) - } - return protoreflect.ValueOfMessage(x.Codec.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse 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_GetCodecDescriptorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec": - m := new(CodecDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse 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_GetCodecDescriptorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", 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_GetCodecDescriptorResponse) 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_GetCodecDescriptorResponse) 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_GetCodecDescriptorResponse) 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_GetCodecDescriptorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetCodecDescriptorResponse) - 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.Codec != nil { - l = options.Size(x.Codec) - 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().(*GetCodecDescriptorResponse) - 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.Codec != nil { - encoded, err := options.Marshal(x.Codec) - 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().(*GetCodecDescriptorResponse) - 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: GetCodecDescriptorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetCodecDescriptorResponse: 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 Codec", 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.Codec == nil { - x.Codec = &CodecDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Codec); 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_GetConfigurationDescriptorRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetConfigurationDescriptorRequest = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetConfigurationDescriptorRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetConfigurationDescriptorRequest)(nil) - -type fastReflection_GetConfigurationDescriptorRequest GetConfigurationDescriptorRequest - -func (x *GetConfigurationDescriptorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetConfigurationDescriptorRequest)(x) -} - -func (x *GetConfigurationDescriptorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetConfigurationDescriptorRequest_messageType fastReflection_GetConfigurationDescriptorRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetConfigurationDescriptorRequest_messageType{} - -type fastReflection_GetConfigurationDescriptorRequest_messageType struct{} - -func (x fastReflection_GetConfigurationDescriptorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetConfigurationDescriptorRequest)(nil) -} -func (x fastReflection_GetConfigurationDescriptorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetConfigurationDescriptorRequest) -} -func (x fastReflection_GetConfigurationDescriptorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetConfigurationDescriptorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetConfigurationDescriptorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetConfigurationDescriptorRequest -} - -// 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_GetConfigurationDescriptorRequest) Type() protoreflect.MessageType { - return _fastReflection_GetConfigurationDescriptorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetConfigurationDescriptorRequest) New() protoreflect.Message { - return new(fastReflection_GetConfigurationDescriptorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetConfigurationDescriptorRequest) Interface() protoreflect.ProtoMessage { - return (*GetConfigurationDescriptorRequest)(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_GetConfigurationDescriptorRequest) 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_GetConfigurationDescriptorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest 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_GetConfigurationDescriptorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest 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_GetConfigurationDescriptorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest 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_GetConfigurationDescriptorRequest) 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.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest 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_GetConfigurationDescriptorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest 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_GetConfigurationDescriptorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest 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_GetConfigurationDescriptorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", 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_GetConfigurationDescriptorRequest) 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_GetConfigurationDescriptorRequest) 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_GetConfigurationDescriptorRequest) 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_GetConfigurationDescriptorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetConfigurationDescriptorRequest) - 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().(*GetConfigurationDescriptorRequest) - 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().(*GetConfigurationDescriptorRequest) - 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: GetConfigurationDescriptorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetConfigurationDescriptorRequest: 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_GetConfigurationDescriptorResponse protoreflect.MessageDescriptor - fd_GetConfigurationDescriptorResponse_config protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetConfigurationDescriptorResponse = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetConfigurationDescriptorResponse") - fd_GetConfigurationDescriptorResponse_config = md_GetConfigurationDescriptorResponse.Fields().ByName("config") -} - -var _ protoreflect.Message = (*fastReflection_GetConfigurationDescriptorResponse)(nil) - -type fastReflection_GetConfigurationDescriptorResponse GetConfigurationDescriptorResponse - -func (x *GetConfigurationDescriptorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetConfigurationDescriptorResponse)(x) -} - -func (x *GetConfigurationDescriptorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetConfigurationDescriptorResponse_messageType fastReflection_GetConfigurationDescriptorResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetConfigurationDescriptorResponse_messageType{} - -type fastReflection_GetConfigurationDescriptorResponse_messageType struct{} - -func (x fastReflection_GetConfigurationDescriptorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetConfigurationDescriptorResponse)(nil) -} -func (x fastReflection_GetConfigurationDescriptorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetConfigurationDescriptorResponse) -} -func (x fastReflection_GetConfigurationDescriptorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetConfigurationDescriptorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetConfigurationDescriptorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetConfigurationDescriptorResponse -} - -// 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_GetConfigurationDescriptorResponse) Type() protoreflect.MessageType { - return _fastReflection_GetConfigurationDescriptorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetConfigurationDescriptorResponse) New() protoreflect.Message { - return new(fastReflection_GetConfigurationDescriptorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetConfigurationDescriptorResponse) Interface() protoreflect.ProtoMessage { - return (*GetConfigurationDescriptorResponse)(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_GetConfigurationDescriptorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Config != nil { - value := protoreflect.ValueOfMessage(x.Config.ProtoReflect()) - if !f(fd_GetConfigurationDescriptorResponse_config, 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_GetConfigurationDescriptorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config": - return x.Config != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse 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_GetConfigurationDescriptorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config": - x.Config = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse 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_GetConfigurationDescriptorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config": - value := x.Config - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse 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_GetConfigurationDescriptorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config": - x.Config = value.Message().Interface().(*ConfigurationDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse 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_GetConfigurationDescriptorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config": - if x.Config == nil { - x.Config = new(ConfigurationDescriptor) - } - return protoreflect.ValueOfMessage(x.Config.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse 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_GetConfigurationDescriptorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config": - m := new(ConfigurationDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse 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_GetConfigurationDescriptorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", 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_GetConfigurationDescriptorResponse) 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_GetConfigurationDescriptorResponse) 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_GetConfigurationDescriptorResponse) 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_GetConfigurationDescriptorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetConfigurationDescriptorResponse) - 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.Config != nil { - l = options.Size(x.Config) - 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().(*GetConfigurationDescriptorResponse) - 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.Config != nil { - encoded, err := options.Marshal(x.Config) - 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().(*GetConfigurationDescriptorResponse) - 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: GetConfigurationDescriptorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetConfigurationDescriptorResponse: 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 Config", 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.Config == nil { - x.Config = &ConfigurationDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Config); 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_GetQueryServicesDescriptorRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetQueryServicesDescriptorRequest = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetQueryServicesDescriptorRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetQueryServicesDescriptorRequest)(nil) - -type fastReflection_GetQueryServicesDescriptorRequest GetQueryServicesDescriptorRequest - -func (x *GetQueryServicesDescriptorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetQueryServicesDescriptorRequest)(x) -} - -func (x *GetQueryServicesDescriptorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetQueryServicesDescriptorRequest_messageType fastReflection_GetQueryServicesDescriptorRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetQueryServicesDescriptorRequest_messageType{} - -type fastReflection_GetQueryServicesDescriptorRequest_messageType struct{} - -func (x fastReflection_GetQueryServicesDescriptorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetQueryServicesDescriptorRequest)(nil) -} -func (x fastReflection_GetQueryServicesDescriptorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetQueryServicesDescriptorRequest) -} -func (x fastReflection_GetQueryServicesDescriptorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetQueryServicesDescriptorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetQueryServicesDescriptorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetQueryServicesDescriptorRequest -} - -// 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_GetQueryServicesDescriptorRequest) Type() protoreflect.MessageType { - return _fastReflection_GetQueryServicesDescriptorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetQueryServicesDescriptorRequest) New() protoreflect.Message { - return new(fastReflection_GetQueryServicesDescriptorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetQueryServicesDescriptorRequest) Interface() protoreflect.ProtoMessage { - return (*GetQueryServicesDescriptorRequest)(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_GetQueryServicesDescriptorRequest) 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_GetQueryServicesDescriptorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest 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_GetQueryServicesDescriptorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest 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_GetQueryServicesDescriptorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest 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_GetQueryServicesDescriptorRequest) 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.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest 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_GetQueryServicesDescriptorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest 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_GetQueryServicesDescriptorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest 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_GetQueryServicesDescriptorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", 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_GetQueryServicesDescriptorRequest) 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_GetQueryServicesDescriptorRequest) 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_GetQueryServicesDescriptorRequest) 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_GetQueryServicesDescriptorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetQueryServicesDescriptorRequest) - 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().(*GetQueryServicesDescriptorRequest) - 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().(*GetQueryServicesDescriptorRequest) - 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: GetQueryServicesDescriptorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetQueryServicesDescriptorRequest: 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_GetQueryServicesDescriptorResponse protoreflect.MessageDescriptor - fd_GetQueryServicesDescriptorResponse_queries protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetQueryServicesDescriptorResponse = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetQueryServicesDescriptorResponse") - fd_GetQueryServicesDescriptorResponse_queries = md_GetQueryServicesDescriptorResponse.Fields().ByName("queries") -} - -var _ protoreflect.Message = (*fastReflection_GetQueryServicesDescriptorResponse)(nil) - -type fastReflection_GetQueryServicesDescriptorResponse GetQueryServicesDescriptorResponse - -func (x *GetQueryServicesDescriptorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetQueryServicesDescriptorResponse)(x) -} - -func (x *GetQueryServicesDescriptorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetQueryServicesDescriptorResponse_messageType fastReflection_GetQueryServicesDescriptorResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetQueryServicesDescriptorResponse_messageType{} - -type fastReflection_GetQueryServicesDescriptorResponse_messageType struct{} - -func (x fastReflection_GetQueryServicesDescriptorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetQueryServicesDescriptorResponse)(nil) -} -func (x fastReflection_GetQueryServicesDescriptorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetQueryServicesDescriptorResponse) -} -func (x fastReflection_GetQueryServicesDescriptorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetQueryServicesDescriptorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetQueryServicesDescriptorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetQueryServicesDescriptorResponse -} - -// 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_GetQueryServicesDescriptorResponse) Type() protoreflect.MessageType { - return _fastReflection_GetQueryServicesDescriptorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetQueryServicesDescriptorResponse) New() protoreflect.Message { - return new(fastReflection_GetQueryServicesDescriptorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetQueryServicesDescriptorResponse) Interface() protoreflect.ProtoMessage { - return (*GetQueryServicesDescriptorResponse)(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_GetQueryServicesDescriptorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Queries != nil { - value := protoreflect.ValueOfMessage(x.Queries.ProtoReflect()) - if !f(fd_GetQueryServicesDescriptorResponse_queries, 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_GetQueryServicesDescriptorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries": - return x.Queries != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse 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_GetQueryServicesDescriptorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries": - x.Queries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse 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_GetQueryServicesDescriptorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries": - value := x.Queries - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse 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_GetQueryServicesDescriptorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries": - x.Queries = value.Message().Interface().(*QueryServicesDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse 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_GetQueryServicesDescriptorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries": - if x.Queries == nil { - x.Queries = new(QueryServicesDescriptor) - } - return protoreflect.ValueOfMessage(x.Queries.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse 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_GetQueryServicesDescriptorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries": - m := new(QueryServicesDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse 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_GetQueryServicesDescriptorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", 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_GetQueryServicesDescriptorResponse) 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_GetQueryServicesDescriptorResponse) 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_GetQueryServicesDescriptorResponse) 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_GetQueryServicesDescriptorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetQueryServicesDescriptorResponse) - 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.Queries != nil { - l = options.Size(x.Queries) - 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().(*GetQueryServicesDescriptorResponse) - 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.Queries != nil { - encoded, err := options.Marshal(x.Queries) - 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().(*GetQueryServicesDescriptorResponse) - 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: GetQueryServicesDescriptorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetQueryServicesDescriptorResponse: 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 Queries", 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.Queries == nil { - x.Queries = &QueryServicesDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Queries); 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_GetTxDescriptorRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetTxDescriptorRequest = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetTxDescriptorRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetTxDescriptorRequest)(nil) - -type fastReflection_GetTxDescriptorRequest GetTxDescriptorRequest - -func (x *GetTxDescriptorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetTxDescriptorRequest)(x) -} - -func (x *GetTxDescriptorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetTxDescriptorRequest_messageType fastReflection_GetTxDescriptorRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetTxDescriptorRequest_messageType{} - -type fastReflection_GetTxDescriptorRequest_messageType struct{} - -func (x fastReflection_GetTxDescriptorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetTxDescriptorRequest)(nil) -} -func (x fastReflection_GetTxDescriptorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetTxDescriptorRequest) -} -func (x fastReflection_GetTxDescriptorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxDescriptorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetTxDescriptorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxDescriptorRequest -} - -// 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_GetTxDescriptorRequest) Type() protoreflect.MessageType { - return _fastReflection_GetTxDescriptorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetTxDescriptorRequest) New() protoreflect.Message { - return new(fastReflection_GetTxDescriptorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetTxDescriptorRequest) Interface() protoreflect.ProtoMessage { - return (*GetTxDescriptorRequest)(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_GetTxDescriptorRequest) 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_GetTxDescriptorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest 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_GetTxDescriptorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest 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_GetTxDescriptorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest 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_GetTxDescriptorRequest) 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.base.reflection.v2alpha1.GetTxDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest 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_GetTxDescriptorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest 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_GetTxDescriptorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest 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_GetTxDescriptorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", 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_GetTxDescriptorRequest) 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_GetTxDescriptorRequest) 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_GetTxDescriptorRequest) 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_GetTxDescriptorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetTxDescriptorRequest) - 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().(*GetTxDescriptorRequest) - 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().(*GetTxDescriptorRequest) - 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: GetTxDescriptorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetTxDescriptorRequest: 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_GetTxDescriptorResponse protoreflect.MessageDescriptor - fd_GetTxDescriptorResponse_tx protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_GetTxDescriptorResponse = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("GetTxDescriptorResponse") - fd_GetTxDescriptorResponse_tx = md_GetTxDescriptorResponse.Fields().ByName("tx") -} - -var _ protoreflect.Message = (*fastReflection_GetTxDescriptorResponse)(nil) - -type fastReflection_GetTxDescriptorResponse GetTxDescriptorResponse - -func (x *GetTxDescriptorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetTxDescriptorResponse)(x) -} - -func (x *GetTxDescriptorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetTxDescriptorResponse_messageType fastReflection_GetTxDescriptorResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetTxDescriptorResponse_messageType{} - -type fastReflection_GetTxDescriptorResponse_messageType struct{} - -func (x fastReflection_GetTxDescriptorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetTxDescriptorResponse)(nil) -} -func (x fastReflection_GetTxDescriptorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetTxDescriptorResponse) -} -func (x fastReflection_GetTxDescriptorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxDescriptorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetTxDescriptorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxDescriptorResponse -} - -// 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_GetTxDescriptorResponse) Type() protoreflect.MessageType { - return _fastReflection_GetTxDescriptorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetTxDescriptorResponse) New() protoreflect.Message { - return new(fastReflection_GetTxDescriptorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetTxDescriptorResponse) Interface() protoreflect.ProtoMessage { - return (*GetTxDescriptorResponse)(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_GetTxDescriptorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Tx != nil { - value := protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - if !f(fd_GetTxDescriptorResponse_tx, 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_GetTxDescriptorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx": - return x.Tx != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse 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_GetTxDescriptorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx": - x.Tx = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse 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_GetTxDescriptorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx": - value := x.Tx - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse 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_GetTxDescriptorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx": - x.Tx = value.Message().Interface().(*TxDescriptor) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse 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_GetTxDescriptorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx": - if x.Tx == nil { - x.Tx = new(TxDescriptor) - } - return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse 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_GetTxDescriptorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx": - m := new(TxDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse 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_GetTxDescriptorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", 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_GetTxDescriptorResponse) 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_GetTxDescriptorResponse) 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_GetTxDescriptorResponse) 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_GetTxDescriptorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetTxDescriptorResponse) - 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.Tx != nil { - l = options.Size(x.Tx) - 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().(*GetTxDescriptorResponse) - 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.Tx != nil { - encoded, err := options.Marshal(x.Tx) - 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().(*GetTxDescriptorResponse) - 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: GetTxDescriptorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetTxDescriptorResponse: 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 Tx", 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.Tx == nil { - x.Tx = &TxDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tx); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryServicesDescriptor_1_list)(nil) - -type _QueryServicesDescriptor_1_list struct { - list *[]*QueryServiceDescriptor -} - -func (x *_QueryServicesDescriptor_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryServicesDescriptor_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryServicesDescriptor_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*QueryServiceDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_QueryServicesDescriptor_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*QueryServiceDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryServicesDescriptor_1_list) AppendMutable() protoreflect.Value { - v := new(QueryServiceDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryServicesDescriptor_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryServicesDescriptor_1_list) NewElement() protoreflect.Value { - v := new(QueryServiceDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryServicesDescriptor_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryServicesDescriptor protoreflect.MessageDescriptor - fd_QueryServicesDescriptor_query_services protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_QueryServicesDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("QueryServicesDescriptor") - fd_QueryServicesDescriptor_query_services = md_QueryServicesDescriptor.Fields().ByName("query_services") -} - -var _ protoreflect.Message = (*fastReflection_QueryServicesDescriptor)(nil) - -type fastReflection_QueryServicesDescriptor QueryServicesDescriptor - -func (x *QueryServicesDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryServicesDescriptor)(x) -} - -func (x *QueryServicesDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryServicesDescriptor_messageType fastReflection_QueryServicesDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_QueryServicesDescriptor_messageType{} - -type fastReflection_QueryServicesDescriptor_messageType struct{} - -func (x fastReflection_QueryServicesDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryServicesDescriptor)(nil) -} -func (x fastReflection_QueryServicesDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_QueryServicesDescriptor) -} -func (x fastReflection_QueryServicesDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServicesDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryServicesDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServicesDescriptor -} - -// 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_QueryServicesDescriptor) Type() protoreflect.MessageType { - return _fastReflection_QueryServicesDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryServicesDescriptor) New() protoreflect.Message { - return new(fastReflection_QueryServicesDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryServicesDescriptor) Interface() protoreflect.ProtoMessage { - return (*QueryServicesDescriptor)(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_QueryServicesDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.QueryServices) != 0 { - value := protoreflect.ValueOfList(&_QueryServicesDescriptor_1_list{list: &x.QueryServices}) - if !f(fd_QueryServicesDescriptor_query_services, 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_QueryServicesDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services": - return len(x.QueryServices) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServicesDescriptor 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_QueryServicesDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services": - x.QueryServices = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServicesDescriptor 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_QueryServicesDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services": - if len(x.QueryServices) == 0 { - return protoreflect.ValueOfList(&_QueryServicesDescriptor_1_list{}) - } - listValue := &_QueryServicesDescriptor_1_list{list: &x.QueryServices} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServicesDescriptor 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_QueryServicesDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services": - lv := value.List() - clv := lv.(*_QueryServicesDescriptor_1_list) - x.QueryServices = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServicesDescriptor 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_QueryServicesDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services": - if x.QueryServices == nil { - x.QueryServices = []*QueryServiceDescriptor{} - } - value := &_QueryServicesDescriptor_1_list{list: &x.QueryServices} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServicesDescriptor 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_QueryServicesDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services": - list := []*QueryServiceDescriptor{} - return protoreflect.ValueOfList(&_QueryServicesDescriptor_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServicesDescriptor 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_QueryServicesDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", 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_QueryServicesDescriptor) 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_QueryServicesDescriptor) 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_QueryServicesDescriptor) 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_QueryServicesDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryServicesDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.QueryServices) > 0 { - for _, e := range x.QueryServices { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryServicesDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.QueryServices) > 0 { - for iNdEx := len(x.QueryServices) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.QueryServices[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryServicesDescriptor) - 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: QueryServicesDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServicesDescriptor: 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 QueryServices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.QueryServices = append(x.QueryServices, &QueryServiceDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.QueryServices[len(x.QueryServices)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryServiceDescriptor_3_list)(nil) - -type _QueryServiceDescriptor_3_list struct { - list *[]*QueryMethodDescriptor -} - -func (x *_QueryServiceDescriptor_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryServiceDescriptor_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryServiceDescriptor_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*QueryMethodDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_QueryServiceDescriptor_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*QueryMethodDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryServiceDescriptor_3_list) AppendMutable() protoreflect.Value { - v := new(QueryMethodDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryServiceDescriptor_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryServiceDescriptor_3_list) NewElement() protoreflect.Value { - v := new(QueryMethodDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryServiceDescriptor_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryServiceDescriptor protoreflect.MessageDescriptor - fd_QueryServiceDescriptor_fullname protoreflect.FieldDescriptor - fd_QueryServiceDescriptor_is_module protoreflect.FieldDescriptor - fd_QueryServiceDescriptor_methods protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_QueryServiceDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("QueryServiceDescriptor") - fd_QueryServiceDescriptor_fullname = md_QueryServiceDescriptor.Fields().ByName("fullname") - fd_QueryServiceDescriptor_is_module = md_QueryServiceDescriptor.Fields().ByName("is_module") - fd_QueryServiceDescriptor_methods = md_QueryServiceDescriptor.Fields().ByName("methods") -} - -var _ protoreflect.Message = (*fastReflection_QueryServiceDescriptor)(nil) - -type fastReflection_QueryServiceDescriptor QueryServiceDescriptor - -func (x *QueryServiceDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryServiceDescriptor)(x) -} - -func (x *QueryServiceDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryServiceDescriptor_messageType fastReflection_QueryServiceDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_QueryServiceDescriptor_messageType{} - -type fastReflection_QueryServiceDescriptor_messageType struct{} - -func (x fastReflection_QueryServiceDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryServiceDescriptor)(nil) -} -func (x fastReflection_QueryServiceDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_QueryServiceDescriptor) -} -func (x fastReflection_QueryServiceDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryServiceDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceDescriptor -} - -// 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_QueryServiceDescriptor) Type() protoreflect.MessageType { - return _fastReflection_QueryServiceDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryServiceDescriptor) New() protoreflect.Message { - return new(fastReflection_QueryServiceDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryServiceDescriptor) Interface() protoreflect.ProtoMessage { - return (*QueryServiceDescriptor)(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_QueryServiceDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fullname != "" { - value := protoreflect.ValueOfString(x.Fullname) - if !f(fd_QueryServiceDescriptor_fullname, value) { - return - } - } - if x.IsModule != false { - value := protoreflect.ValueOfBool(x.IsModule) - if !f(fd_QueryServiceDescriptor_is_module, value) { - return - } - } - if len(x.Methods) != 0 { - value := protoreflect.ValueOfList(&_QueryServiceDescriptor_3_list{list: &x.Methods}) - if !f(fd_QueryServiceDescriptor_methods, 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_QueryServiceDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.fullname": - return x.Fullname != "" - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.is_module": - return x.IsModule != false - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods": - return len(x.Methods) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor 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_QueryServiceDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.fullname": - x.Fullname = "" - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.is_module": - x.IsModule = false - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods": - x.Methods = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor 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_QueryServiceDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.fullname": - value := x.Fullname - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.is_module": - value := x.IsModule - return protoreflect.ValueOfBool(value) - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods": - if len(x.Methods) == 0 { - return protoreflect.ValueOfList(&_QueryServiceDescriptor_3_list{}) - } - listValue := &_QueryServiceDescriptor_3_list{list: &x.Methods} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor 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_QueryServiceDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.fullname": - x.Fullname = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.is_module": - x.IsModule = value.Bool() - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods": - lv := value.List() - clv := lv.(*_QueryServiceDescriptor_3_list) - x.Methods = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor 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_QueryServiceDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods": - if x.Methods == nil { - x.Methods = []*QueryMethodDescriptor{} - } - value := &_QueryServiceDescriptor_3_list{list: &x.Methods} - return protoreflect.ValueOfList(value) - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.fullname": - panic(fmt.Errorf("field fullname of message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor is not mutable")) - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.is_module": - panic(fmt.Errorf("field is_module of message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor 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_QueryServiceDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.fullname": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.is_module": - return protoreflect.ValueOfBool(false) - case "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods": - list := []*QueryMethodDescriptor{} - return protoreflect.ValueOfList(&_QueryServiceDescriptor_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryServiceDescriptor 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_QueryServiceDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", 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_QueryServiceDescriptor) 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_QueryServiceDescriptor) 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_QueryServiceDescriptor) 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_QueryServiceDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryServiceDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fullname) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsModule { - n += 2 - } - if len(x.Methods) > 0 { - for _, e := range x.Methods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryServiceDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Methods) > 0 { - for iNdEx := len(x.Methods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Methods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.IsModule { - i-- - if x.IsModule { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Fullname) > 0 { - i -= len(x.Fullname) - copy(dAtA[i:], x.Fullname) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fullname))) - 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().(*QueryServiceDescriptor) - 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: QueryServiceDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceDescriptor: 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 Fullname", 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.Fullname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsModule", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsModule = bool(v != 0) - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Methods = append(x.Methods, &QueryMethodDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Methods[len(x.Methods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryMethodDescriptor protoreflect.MessageDescriptor - fd_QueryMethodDescriptor_name protoreflect.FieldDescriptor - fd_QueryMethodDescriptor_full_query_path protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_init() - md_QueryMethodDescriptor = File_cosmos_base_reflection_v2alpha1_reflection_proto.Messages().ByName("QueryMethodDescriptor") - fd_QueryMethodDescriptor_name = md_QueryMethodDescriptor.Fields().ByName("name") - fd_QueryMethodDescriptor_full_query_path = md_QueryMethodDescriptor.Fields().ByName("full_query_path") -} - -var _ protoreflect.Message = (*fastReflection_QueryMethodDescriptor)(nil) - -type fastReflection_QueryMethodDescriptor QueryMethodDescriptor - -func (x *QueryMethodDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryMethodDescriptor)(x) -} - -func (x *QueryMethodDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryMethodDescriptor_messageType fastReflection_QueryMethodDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_QueryMethodDescriptor_messageType{} - -type fastReflection_QueryMethodDescriptor_messageType struct{} - -func (x fastReflection_QueryMethodDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryMethodDescriptor)(nil) -} -func (x fastReflection_QueryMethodDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_QueryMethodDescriptor) -} -func (x fastReflection_QueryMethodDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryMethodDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryMethodDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_QueryMethodDescriptor -} - -// 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_QueryMethodDescriptor) Type() protoreflect.MessageType { - return _fastReflection_QueryMethodDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryMethodDescriptor) New() protoreflect.Message { - return new(fastReflection_QueryMethodDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryMethodDescriptor) Interface() protoreflect.ProtoMessage { - return (*QueryMethodDescriptor)(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_QueryMethodDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_QueryMethodDescriptor_name, value) { - return - } - } - if x.FullQueryPath != "" { - value := protoreflect.ValueOfString(x.FullQueryPath) - if !f(fd_QueryMethodDescriptor_full_query_path, 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_QueryMethodDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.name": - return x.Name != "" - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.full_query_path": - return x.FullQueryPath != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor 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_QueryMethodDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.name": - x.Name = "" - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.full_query_path": - x.FullQueryPath = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor 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_QueryMethodDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.full_query_path": - value := x.FullQueryPath - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor 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_QueryMethodDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.name": - x.Name = value.Interface().(string) - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.full_query_path": - x.FullQueryPath = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor 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_QueryMethodDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.name": - panic(fmt.Errorf("field name of message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor is not mutable")) - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.full_query_path": - panic(fmt.Errorf("field full_query_path of message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor 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_QueryMethodDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.name": - return protoreflect.ValueOfString("") - case "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor.full_query_path": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")) - } - panic(fmt.Errorf("message cosmos.base.reflection.v2alpha1.QueryMethodDescriptor 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_QueryMethodDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", 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_QueryMethodDescriptor) 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_QueryMethodDescriptor) 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_QueryMethodDescriptor) 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_QueryMethodDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryMethodDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.FullQueryPath) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryMethodDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.FullQueryPath) > 0 { - i -= len(x.FullQueryPath) - copy(dAtA[i:], x.FullQueryPath) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FullQueryPath))) - i-- - dAtA[i] = 0x12 - } - 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 { - 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().(*QueryMethodDescriptor) - 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: QueryMethodDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMethodDescriptor: 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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FullQueryPath", 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.FullQueryPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/reflection/v2alpha1/reflection.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// AppDescriptor describes a cosmos-sdk based application -type AppDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // AuthnDescriptor provides information on how to authenticate transactions on the application - // NOTE: experimental and subject to change in future releases. - Authn *AuthnDescriptor `protobuf:"bytes,1,opt,name=authn,proto3" json:"authn,omitempty"` - // chain provides the chain descriptor - Chain *ChainDescriptor `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"` - // codec provides metadata information regarding codec related types - Codec *CodecDescriptor `protobuf:"bytes,3,opt,name=codec,proto3" json:"codec,omitempty"` - // configuration provides metadata information regarding the sdk.Config type - Configuration *ConfigurationDescriptor `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` - // query_services provides metadata information regarding the available queriable endpoints - QueryServices *QueryServicesDescriptor `protobuf:"bytes,5,opt,name=query_services,json=queryServices,proto3" json:"query_services,omitempty"` - // tx provides metadata information regarding how to send transactions to the given application - Tx *TxDescriptor `protobuf:"bytes,6,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (x *AppDescriptor) Reset() { - *x = AppDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AppDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AppDescriptor) ProtoMessage() {} - -// Deprecated: Use AppDescriptor.ProtoReflect.Descriptor instead. -func (*AppDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{0} -} - -func (x *AppDescriptor) GetAuthn() *AuthnDescriptor { - if x != nil { - return x.Authn - } - return nil -} - -func (x *AppDescriptor) GetChain() *ChainDescriptor { - if x != nil { - return x.Chain - } - return nil -} - -func (x *AppDescriptor) GetCodec() *CodecDescriptor { - if x != nil { - return x.Codec - } - return nil -} - -func (x *AppDescriptor) GetConfiguration() *ConfigurationDescriptor { - if x != nil { - return x.Configuration - } - return nil -} - -func (x *AppDescriptor) GetQueryServices() *QueryServicesDescriptor { - if x != nil { - return x.QueryServices - } - return nil -} - -func (x *AppDescriptor) GetTx() *TxDescriptor { - if x != nil { - return x.Tx - } - return nil -} - -// TxDescriptor describes the accepted transaction type -type TxDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - // it is not meant to support polymorphism of transaction types, it is supposed to be used by - // reflection clients to understand if they can handle a specific transaction type in an application. - Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"` - // msgs lists the accepted application messages (sdk.Msg) - Msgs []*MsgDescriptor `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` -} - -func (x *TxDescriptor) Reset() { - *x = TxDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxDescriptor) ProtoMessage() {} - -// Deprecated: Use TxDescriptor.ProtoReflect.Descriptor instead. -func (*TxDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{1} -} - -func (x *TxDescriptor) GetFullname() string { - if x != nil { - return x.Fullname - } - return "" -} - -func (x *TxDescriptor) GetMsgs() []*MsgDescriptor { - if x != nil { - return x.Msgs - } - return nil -} - -// AuthnDescriptor provides information on how to sign transactions without relying -// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -type AuthnDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sign_modes defines the supported signature algorithm - SignModes []*SigningModeDescriptor `protobuf:"bytes,1,rep,name=sign_modes,json=signModes,proto3" json:"sign_modes,omitempty"` -} - -func (x *AuthnDescriptor) Reset() { - *x = AuthnDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthnDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthnDescriptor) ProtoMessage() {} - -// Deprecated: Use AuthnDescriptor.ProtoReflect.Descriptor instead. -func (*AuthnDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{2} -} - -func (x *AuthnDescriptor) GetSignModes() []*SigningModeDescriptor { - if x != nil { - return x.SignModes - } - return nil -} - -// SigningModeDescriptor provides information on a signing flow of the application -// NOTE(fdymylja): here we could go as far as providing an entire flow on how -// to sign a message given a SigningModeDescriptor, but it's better to think about -// this another time -type SigningModeDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name defines the unique name of the signing mode - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // number is the unique int32 identifier for the sign_mode enum - Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` - // authn_info_provider_method_fullname defines the fullname of the method to call to get - // the metadata required to authenticate using the provided sign_modes - AuthnInfoProviderMethodFullname string `protobuf:"bytes,3,opt,name=authn_info_provider_method_fullname,json=authnInfoProviderMethodFullname,proto3" json:"authn_info_provider_method_fullname,omitempty"` -} - -func (x *SigningModeDescriptor) Reset() { - *x = SigningModeDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SigningModeDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SigningModeDescriptor) ProtoMessage() {} - -// Deprecated: Use SigningModeDescriptor.ProtoReflect.Descriptor instead. -func (*SigningModeDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{3} -} - -func (x *SigningModeDescriptor) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SigningModeDescriptor) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *SigningModeDescriptor) GetAuthnInfoProviderMethodFullname() string { - if x != nil { - return x.AuthnInfoProviderMethodFullname - } - return "" -} - -// ChainDescriptor describes chain information of the application -type ChainDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the chain id - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *ChainDescriptor) Reset() { - *x = ChainDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChainDescriptor) ProtoMessage() {} - -// Deprecated: Use ChainDescriptor.ProtoReflect.Descriptor instead. -func (*ChainDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{4} -} - -func (x *ChainDescriptor) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// CodecDescriptor describes the registered interfaces and provides metadata information on the types -type CodecDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // interfaces is a list of the registerted interfaces descriptors - Interfaces []*InterfaceDescriptor `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"` -} - -func (x *CodecDescriptor) Reset() { - *x = CodecDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CodecDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CodecDescriptor) ProtoMessage() {} - -// Deprecated: Use CodecDescriptor.ProtoReflect.Descriptor instead. -func (*CodecDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{5} -} - -func (x *CodecDescriptor) GetInterfaces() []*InterfaceDescriptor { - if x != nil { - return x.Interfaces - } - return nil -} - -// InterfaceDescriptor describes the implementation of an interface -type InterfaceDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fullname is the name of the interface - Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"` - // interface_accepting_messages contains information regarding the proto messages which contain the interface as - // google.protobuf.Any field - InterfaceAcceptingMessages []*InterfaceAcceptingMessageDescriptor `protobuf:"bytes,2,rep,name=interface_accepting_messages,json=interfaceAcceptingMessages,proto3" json:"interface_accepting_messages,omitempty"` - // interface_implementers is a list of the descriptors of the interface implementers - InterfaceImplementers []*InterfaceImplementerDescriptor `protobuf:"bytes,3,rep,name=interface_implementers,json=interfaceImplementers,proto3" json:"interface_implementers,omitempty"` -} - -func (x *InterfaceDescriptor) Reset() { - *x = InterfaceDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterfaceDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterfaceDescriptor) ProtoMessage() {} - -// Deprecated: Use InterfaceDescriptor.ProtoReflect.Descriptor instead. -func (*InterfaceDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{6} -} - -func (x *InterfaceDescriptor) GetFullname() string { - if x != nil { - return x.Fullname - } - return "" -} - -func (x *InterfaceDescriptor) GetInterfaceAcceptingMessages() []*InterfaceAcceptingMessageDescriptor { - if x != nil { - return x.InterfaceAcceptingMessages - } - return nil -} - -func (x *InterfaceDescriptor) GetInterfaceImplementers() []*InterfaceImplementerDescriptor { - if x != nil { - return x.InterfaceImplementers - } - return nil -} - -// InterfaceImplementerDescriptor describes an interface implementer -type InterfaceImplementerDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fullname is the protobuf queryable name of the interface implementer - Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"` - // type_url defines the type URL used when marshalling the type as any - // this is required so we can provide type safe google.protobuf.Any marshalling and - // unmarshalling, making sure that we don't accept just 'any' type - // in our interface fields - TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` -} - -func (x *InterfaceImplementerDescriptor) Reset() { - *x = InterfaceImplementerDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterfaceImplementerDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterfaceImplementerDescriptor) ProtoMessage() {} - -// Deprecated: Use InterfaceImplementerDescriptor.ProtoReflect.Descriptor instead. -func (*InterfaceImplementerDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{7} -} - -func (x *InterfaceImplementerDescriptor) GetFullname() string { - if x != nil { - return x.Fullname - } - return "" -} - -func (x *InterfaceImplementerDescriptor) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -// an interface represented as a google.protobuf.Any -type InterfaceAcceptingMessageDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fullname is the protobuf fullname of the type containing the interface - Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"` - // field_descriptor_names is a list of the protobuf name (not fullname) of the field - // which contains the interface as google.protobuf.Any (the interface is the same, but - // it can be in multiple fields of the same proto message) - FieldDescriptorNames []string `protobuf:"bytes,2,rep,name=field_descriptor_names,json=fieldDescriptorNames,proto3" json:"field_descriptor_names,omitempty"` -} - -func (x *InterfaceAcceptingMessageDescriptor) Reset() { - *x = InterfaceAcceptingMessageDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InterfaceAcceptingMessageDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InterfaceAcceptingMessageDescriptor) ProtoMessage() {} - -// Deprecated: Use InterfaceAcceptingMessageDescriptor.ProtoReflect.Descriptor instead. -func (*InterfaceAcceptingMessageDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{8} -} - -func (x *InterfaceAcceptingMessageDescriptor) GetFullname() string { - if x != nil { - return x.Fullname - } - return "" -} - -func (x *InterfaceAcceptingMessageDescriptor) GetFieldDescriptorNames() []string { - if x != nil { - return x.FieldDescriptorNames - } - return nil -} - -// ConfigurationDescriptor contains metadata information on the sdk.Config -type ConfigurationDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bech32_account_address_prefix is the account address prefix - Bech32AccountAddressPrefix string `protobuf:"bytes,1,opt,name=bech32_account_address_prefix,json=bech32AccountAddressPrefix,proto3" json:"bech32_account_address_prefix,omitempty"` -} - -func (x *ConfigurationDescriptor) Reset() { - *x = ConfigurationDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfigurationDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigurationDescriptor) ProtoMessage() {} - -// Deprecated: Use ConfigurationDescriptor.ProtoReflect.Descriptor instead. -func (*ConfigurationDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{9} -} - -func (x *ConfigurationDescriptor) GetBech32AccountAddressPrefix() string { - if x != nil { - return x.Bech32AccountAddressPrefix - } - return "" -} - -// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -type MsgDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // msg_type_url contains the TypeURL of a sdk.Msg. - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` -} - -func (x *MsgDescriptor) Reset() { - *x = MsgDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDescriptor) ProtoMessage() {} - -// Deprecated: Use MsgDescriptor.ProtoReflect.Descriptor instead. -func (*MsgDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgDescriptor) GetMsgTypeUrl() string { - if x != nil { - return x.MsgTypeUrl - } - return "" -} - -// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -type GetAuthnDescriptorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetAuthnDescriptorRequest) Reset() { - *x = GetAuthnDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAuthnDescriptorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAuthnDescriptorRequest) ProtoMessage() {} - -// Deprecated: Use GetAuthnDescriptorRequest.ProtoReflect.Descriptor instead. -func (*GetAuthnDescriptorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{11} -} - -// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -type GetAuthnDescriptorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authn describes how to authenticate to the application when sending transactions - Authn *AuthnDescriptor `protobuf:"bytes,1,opt,name=authn,proto3" json:"authn,omitempty"` -} - -func (x *GetAuthnDescriptorResponse) Reset() { - *x = GetAuthnDescriptorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAuthnDescriptorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAuthnDescriptorResponse) ProtoMessage() {} - -// Deprecated: Use GetAuthnDescriptorResponse.ProtoReflect.Descriptor instead. -func (*GetAuthnDescriptorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{12} -} - -func (x *GetAuthnDescriptorResponse) GetAuthn() *AuthnDescriptor { - if x != nil { - return x.Authn - } - return nil -} - -// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -type GetChainDescriptorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetChainDescriptorRequest) Reset() { - *x = GetChainDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChainDescriptorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChainDescriptorRequest) ProtoMessage() {} - -// Deprecated: Use GetChainDescriptorRequest.ProtoReflect.Descriptor instead. -func (*GetChainDescriptorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{13} -} - -// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -type GetChainDescriptorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // chain describes application chain information - Chain *ChainDescriptor `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` -} - -func (x *GetChainDescriptorResponse) Reset() { - *x = GetChainDescriptorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChainDescriptorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChainDescriptorResponse) ProtoMessage() {} - -// Deprecated: Use GetChainDescriptorResponse.ProtoReflect.Descriptor instead. -func (*GetChainDescriptorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{14} -} - -func (x *GetChainDescriptorResponse) GetChain() *ChainDescriptor { - if x != nil { - return x.Chain - } - return nil -} - -// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -type GetCodecDescriptorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetCodecDescriptorRequest) Reset() { - *x = GetCodecDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetCodecDescriptorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCodecDescriptorRequest) ProtoMessage() {} - -// Deprecated: Use GetCodecDescriptorRequest.ProtoReflect.Descriptor instead. -func (*GetCodecDescriptorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{15} -} - -// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -type GetCodecDescriptorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // codec describes the application codec such as registered interfaces and implementations - Codec *CodecDescriptor `protobuf:"bytes,1,opt,name=codec,proto3" json:"codec,omitempty"` -} - -func (x *GetCodecDescriptorResponse) Reset() { - *x = GetCodecDescriptorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetCodecDescriptorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCodecDescriptorResponse) ProtoMessage() {} - -// Deprecated: Use GetCodecDescriptorResponse.ProtoReflect.Descriptor instead. -func (*GetCodecDescriptorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{16} -} - -func (x *GetCodecDescriptorResponse) GetCodec() *CodecDescriptor { - if x != nil { - return x.Codec - } - return nil -} - -// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -type GetConfigurationDescriptorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetConfigurationDescriptorRequest) Reset() { - *x = GetConfigurationDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigurationDescriptorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationDescriptorRequest) ProtoMessage() {} - -// Deprecated: Use GetConfigurationDescriptorRequest.ProtoReflect.Descriptor instead. -func (*GetConfigurationDescriptorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{17} -} - -// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -type GetConfigurationDescriptorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // config describes the application's sdk.Config - Config *ConfigurationDescriptor `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *GetConfigurationDescriptorResponse) Reset() { - *x = GetConfigurationDescriptorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigurationDescriptorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationDescriptorResponse) ProtoMessage() {} - -// Deprecated: Use GetConfigurationDescriptorResponse.ProtoReflect.Descriptor instead. -func (*GetConfigurationDescriptorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{18} -} - -func (x *GetConfigurationDescriptorResponse) GetConfig() *ConfigurationDescriptor { - if x != nil { - return x.Config - } - return nil -} - -// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -type GetQueryServicesDescriptorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetQueryServicesDescriptorRequest) Reset() { - *x = GetQueryServicesDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetQueryServicesDescriptorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetQueryServicesDescriptorRequest) ProtoMessage() {} - -// Deprecated: Use GetQueryServicesDescriptorRequest.ProtoReflect.Descriptor instead. -func (*GetQueryServicesDescriptorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{19} -} - -// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -type GetQueryServicesDescriptorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // queries provides information on the available queryable services - Queries *QueryServicesDescriptor `protobuf:"bytes,1,opt,name=queries,proto3" json:"queries,omitempty"` -} - -func (x *GetQueryServicesDescriptorResponse) Reset() { - *x = GetQueryServicesDescriptorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetQueryServicesDescriptorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetQueryServicesDescriptorResponse) ProtoMessage() {} - -// Deprecated: Use GetQueryServicesDescriptorResponse.ProtoReflect.Descriptor instead. -func (*GetQueryServicesDescriptorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{20} -} - -func (x *GetQueryServicesDescriptorResponse) GetQueries() *QueryServicesDescriptor { - if x != nil { - return x.Queries - } - return nil -} - -// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -type GetTxDescriptorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetTxDescriptorRequest) Reset() { - *x = GetTxDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxDescriptorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxDescriptorRequest) ProtoMessage() {} - -// Deprecated: Use GetTxDescriptorRequest.ProtoReflect.Descriptor instead. -func (*GetTxDescriptorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{21} -} - -// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -type GetTxDescriptorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tx provides information on msgs that can be forwarded to the application - // alongside the accepted transaction protobuf type - Tx *TxDescriptor `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (x *GetTxDescriptorResponse) Reset() { - *x = GetTxDescriptorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxDescriptorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxDescriptorResponse) ProtoMessage() {} - -// Deprecated: Use GetTxDescriptorResponse.ProtoReflect.Descriptor instead. -func (*GetTxDescriptorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{22} -} - -func (x *GetTxDescriptorResponse) GetTx() *TxDescriptor { - if x != nil { - return x.Tx - } - return nil -} - -// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -type QueryServicesDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // query_services is a list of cosmos-sdk QueryServiceDescriptor - QueryServices []*QueryServiceDescriptor `protobuf:"bytes,1,rep,name=query_services,json=queryServices,proto3" json:"query_services,omitempty"` -} - -func (x *QueryServicesDescriptor) Reset() { - *x = QueryServicesDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryServicesDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryServicesDescriptor) ProtoMessage() {} - -// Deprecated: Use QueryServicesDescriptor.ProtoReflect.Descriptor instead. -func (*QueryServicesDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{23} -} - -func (x *QueryServicesDescriptor) GetQueryServices() []*QueryServiceDescriptor { - if x != nil { - return x.QueryServices - } - return nil -} - -// QueryServiceDescriptor describes a cosmos-sdk queryable service -type QueryServiceDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fullname is the protobuf fullname of the service descriptor - Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"` - // is_module describes if this service is actually exposed by an application's module - IsModule bool `protobuf:"varint,2,opt,name=is_module,json=isModule,proto3" json:"is_module,omitempty"` - // methods provides a list of query service methods - Methods []*QueryMethodDescriptor `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"` -} - -func (x *QueryServiceDescriptor) Reset() { - *x = QueryServiceDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryServiceDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryServiceDescriptor) ProtoMessage() {} - -// Deprecated: Use QueryServiceDescriptor.ProtoReflect.Descriptor instead. -func (*QueryServiceDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{24} -} - -func (x *QueryServiceDescriptor) GetFullname() string { - if x != nil { - return x.Fullname - } - return "" -} - -func (x *QueryServiceDescriptor) GetIsModule() bool { - if x != nil { - return x.IsModule - } - return false -} - -func (x *QueryServiceDescriptor) GetMethods() []*QueryMethodDescriptor { - if x != nil { - return x.Methods - } - return nil -} - -// QueryMethodDescriptor describes a queryable method of a query service -// no other info is provided beside method name and tendermint queryable path -// because it would be redundant with the grpc reflection service -type QueryMethodDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the protobuf name (not fullname) of the method - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // full_query_path is the path that can be used to query - // this method via tendermint abci.Query - FullQueryPath string `protobuf:"bytes,2,opt,name=full_query_path,json=fullQueryPath,proto3" json:"full_query_path,omitempty"` -} - -func (x *QueryMethodDescriptor) Reset() { - *x = QueryMethodDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryMethodDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryMethodDescriptor) ProtoMessage() {} - -// Deprecated: Use QueryMethodDescriptor.ProtoReflect.Descriptor instead. -func (*QueryMethodDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP(), []int{25} -} - -func (x *QueryMethodDescriptor) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *QueryMethodDescriptor) GetFullQueryPath() string { - if x != nil { - return x.FullQueryPath - } - return "" -} - -var File_cosmos_base_reflection_v2alpha1_reflection_proto protoreflect.FileDescriptor - -var file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xe7, 0x03, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x12, 0x46, 0x0a, 0x05, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x5e, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x02, - 0x74, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x02, 0x74, 0x78, 0x22, 0x6e, 0x0a, 0x0c, 0x54, - 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, - 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x22, 0x68, 0x0a, 0x0f, 0x41, - 0x75, 0x74, 0x68, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x55, - 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x23, 0x61, - 0x75, 0x74, 0x68, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x0f, - 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, - 0x54, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x1c, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x44, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x12, 0x76, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, - 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x6d, - 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x6d, - 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x22, 0x57, 0x0a, 0x1e, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x65, 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, - 0x55, 0x72, 0x6c, 0x22, 0x77, 0x0a, 0x23, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, - 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, - 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x17, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x1d, 0x62, 0x65, 0x63, 0x68, 0x33, - 0x32, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, - 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x31, 0x0a, 0x0d, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x6d, - 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x1b, 0x0a, - 0x19, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, 0x1a, 0x47, 0x65, - 0x74, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, - 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x05, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x64, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, - 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x22, 0x23, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x76, 0x0a, 0x22, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x50, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x22, 0x23, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x78, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, - 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x52, 0x02, 0x74, 0x78, 0x22, 0x79, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x12, 0x5e, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x53, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, - 0x75, 0x6c, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x74, 0x68, 0x32, 0xa7, 0x0a, 0x0a, - 0x11, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0xcb, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6e, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x5f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6e, - 0x12, 0xcb, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0xcb, - 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x63, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0xeb, 0x01, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x43, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, - 0x70, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xec, 0x01, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x5f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0xca, 0x01, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x54, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x37, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x78, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x42, 0xaa, 0x02, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, - 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x52, 0xaa, 0x02, 0x1f, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, - 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x52, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xe2, 0x02, 0x2b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x52, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x52, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescOnce sync.Once - file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescData = file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDesc -) - -func file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescGZIP() []byte { - file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescOnce.Do(func() { - file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescData) - }) - return file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDescData -} - -var file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_cosmos_base_reflection_v2alpha1_reflection_proto_goTypes = []interface{}{ - (*AppDescriptor)(nil), // 0: cosmos.base.reflection.v2alpha1.AppDescriptor - (*TxDescriptor)(nil), // 1: cosmos.base.reflection.v2alpha1.TxDescriptor - (*AuthnDescriptor)(nil), // 2: cosmos.base.reflection.v2alpha1.AuthnDescriptor - (*SigningModeDescriptor)(nil), // 3: cosmos.base.reflection.v2alpha1.SigningModeDescriptor - (*ChainDescriptor)(nil), // 4: cosmos.base.reflection.v2alpha1.ChainDescriptor - (*CodecDescriptor)(nil), // 5: cosmos.base.reflection.v2alpha1.CodecDescriptor - (*InterfaceDescriptor)(nil), // 6: cosmos.base.reflection.v2alpha1.InterfaceDescriptor - (*InterfaceImplementerDescriptor)(nil), // 7: cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor - (*InterfaceAcceptingMessageDescriptor)(nil), // 8: cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor - (*ConfigurationDescriptor)(nil), // 9: cosmos.base.reflection.v2alpha1.ConfigurationDescriptor - (*MsgDescriptor)(nil), // 10: cosmos.base.reflection.v2alpha1.MsgDescriptor - (*GetAuthnDescriptorRequest)(nil), // 11: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest - (*GetAuthnDescriptorResponse)(nil), // 12: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse - (*GetChainDescriptorRequest)(nil), // 13: cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest - (*GetChainDescriptorResponse)(nil), // 14: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse - (*GetCodecDescriptorRequest)(nil), // 15: cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest - (*GetCodecDescriptorResponse)(nil), // 16: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse - (*GetConfigurationDescriptorRequest)(nil), // 17: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest - (*GetConfigurationDescriptorResponse)(nil), // 18: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse - (*GetQueryServicesDescriptorRequest)(nil), // 19: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest - (*GetQueryServicesDescriptorResponse)(nil), // 20: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse - (*GetTxDescriptorRequest)(nil), // 21: cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest - (*GetTxDescriptorResponse)(nil), // 22: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse - (*QueryServicesDescriptor)(nil), // 23: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor - (*QueryServiceDescriptor)(nil), // 24: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor - (*QueryMethodDescriptor)(nil), // 25: cosmos.base.reflection.v2alpha1.QueryMethodDescriptor -} -var file_cosmos_base_reflection_v2alpha1_reflection_proto_depIdxs = []int32{ - 2, // 0: cosmos.base.reflection.v2alpha1.AppDescriptor.authn:type_name -> cosmos.base.reflection.v2alpha1.AuthnDescriptor - 4, // 1: cosmos.base.reflection.v2alpha1.AppDescriptor.chain:type_name -> cosmos.base.reflection.v2alpha1.ChainDescriptor - 5, // 2: cosmos.base.reflection.v2alpha1.AppDescriptor.codec:type_name -> cosmos.base.reflection.v2alpha1.CodecDescriptor - 9, // 3: cosmos.base.reflection.v2alpha1.AppDescriptor.configuration:type_name -> cosmos.base.reflection.v2alpha1.ConfigurationDescriptor - 23, // 4: cosmos.base.reflection.v2alpha1.AppDescriptor.query_services:type_name -> cosmos.base.reflection.v2alpha1.QueryServicesDescriptor - 1, // 5: cosmos.base.reflection.v2alpha1.AppDescriptor.tx:type_name -> cosmos.base.reflection.v2alpha1.TxDescriptor - 10, // 6: cosmos.base.reflection.v2alpha1.TxDescriptor.msgs:type_name -> cosmos.base.reflection.v2alpha1.MsgDescriptor - 3, // 7: cosmos.base.reflection.v2alpha1.AuthnDescriptor.sign_modes:type_name -> cosmos.base.reflection.v2alpha1.SigningModeDescriptor - 6, // 8: cosmos.base.reflection.v2alpha1.CodecDescriptor.interfaces:type_name -> cosmos.base.reflection.v2alpha1.InterfaceDescriptor - 8, // 9: cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_accepting_messages:type_name -> cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor - 7, // 10: cosmos.base.reflection.v2alpha1.InterfaceDescriptor.interface_implementers:type_name -> cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor - 2, // 11: cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse.authn:type_name -> cosmos.base.reflection.v2alpha1.AuthnDescriptor - 4, // 12: cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse.chain:type_name -> cosmos.base.reflection.v2alpha1.ChainDescriptor - 5, // 13: cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse.codec:type_name -> cosmos.base.reflection.v2alpha1.CodecDescriptor - 9, // 14: cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse.config:type_name -> cosmos.base.reflection.v2alpha1.ConfigurationDescriptor - 23, // 15: cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse.queries:type_name -> cosmos.base.reflection.v2alpha1.QueryServicesDescriptor - 1, // 16: cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse.tx:type_name -> cosmos.base.reflection.v2alpha1.TxDescriptor - 24, // 17: cosmos.base.reflection.v2alpha1.QueryServicesDescriptor.query_services:type_name -> cosmos.base.reflection.v2alpha1.QueryServiceDescriptor - 25, // 18: cosmos.base.reflection.v2alpha1.QueryServiceDescriptor.methods:type_name -> cosmos.base.reflection.v2alpha1.QueryMethodDescriptor - 11, // 19: cosmos.base.reflection.v2alpha1.ReflectionService.GetAuthnDescriptor:input_type -> cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest - 13, // 20: cosmos.base.reflection.v2alpha1.ReflectionService.GetChainDescriptor:input_type -> cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest - 15, // 21: cosmos.base.reflection.v2alpha1.ReflectionService.GetCodecDescriptor:input_type -> cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest - 17, // 22: cosmos.base.reflection.v2alpha1.ReflectionService.GetConfigurationDescriptor:input_type -> cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest - 19, // 23: cosmos.base.reflection.v2alpha1.ReflectionService.GetQueryServicesDescriptor:input_type -> cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest - 21, // 24: cosmos.base.reflection.v2alpha1.ReflectionService.GetTxDescriptor:input_type -> cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest - 12, // 25: cosmos.base.reflection.v2alpha1.ReflectionService.GetAuthnDescriptor:output_type -> cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse - 14, // 26: cosmos.base.reflection.v2alpha1.ReflectionService.GetChainDescriptor:output_type -> cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse - 16, // 27: cosmos.base.reflection.v2alpha1.ReflectionService.GetCodecDescriptor:output_type -> cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse - 18, // 28: cosmos.base.reflection.v2alpha1.ReflectionService.GetConfigurationDescriptor:output_type -> cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse - 20, // 29: cosmos.base.reflection.v2alpha1.ReflectionService.GetQueryServicesDescriptor:output_type -> cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse - 22, // 30: cosmos.base.reflection.v2alpha1.ReflectionService.GetTxDescriptor:output_type -> cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse - 25, // [25:31] is the sub-list for method output_type - 19, // [19:25] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_cosmos_base_reflection_v2alpha1_reflection_proto_init() } -func file_cosmos_base_reflection_v2alpha1_reflection_proto_init() { - if File_cosmos_base_reflection_v2alpha1_reflection_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AppDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthnDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SigningModeDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CodecDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterfaceDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterfaceImplementerDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterfaceAcceptingMessageDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigurationDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAuthnDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAuthnDescriptorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChainDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChainDescriptorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCodecDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCodecDescriptorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigurationDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigurationDescriptorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetQueryServicesDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetQueryServicesDescriptorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTxDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTxDescriptorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryServicesDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryServiceDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryMethodDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDesc, - NumEnums: 0, - NumMessages: 26, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_base_reflection_v2alpha1_reflection_proto_goTypes, - DependencyIndexes: file_cosmos_base_reflection_v2alpha1_reflection_proto_depIdxs, - MessageInfos: file_cosmos_base_reflection_v2alpha1_reflection_proto_msgTypes, - }.Build() - File_cosmos_base_reflection_v2alpha1_reflection_proto = out.File - file_cosmos_base_reflection_v2alpha1_reflection_proto_rawDesc = nil - file_cosmos_base_reflection_v2alpha1_reflection_proto_goTypes = nil - file_cosmos_base_reflection_v2alpha1_reflection_proto_depIdxs = nil -} diff --git a/api/cosmos/base/reflection/v2alpha1/reflection_grpc.pb.go b/api/cosmos/base/reflection/v2alpha1/reflection_grpc.pb.go deleted file mode 100644 index 60ec6a58b3f0..000000000000 --- a/api/cosmos/base/reflection/v2alpha1/reflection_grpc.pb.go +++ /dev/null @@ -1,301 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/base/reflection/v2alpha1/reflection.proto - -package reflectionv2alpha1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ReflectionServiceClient is the client API for ReflectionService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ReflectionServiceClient interface { - // GetAuthnDescriptor returns information on how to authenticate transactions in the application - // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - // future releases of the cosmos-sdk. - GetAuthnDescriptor(ctx context.Context, in *GetAuthnDescriptorRequest, opts ...grpc.CallOption) (*GetAuthnDescriptorResponse, error) - // GetChainDescriptor returns the description of the chain - GetChainDescriptor(ctx context.Context, in *GetChainDescriptorRequest, opts ...grpc.CallOption) (*GetChainDescriptorResponse, error) - // GetCodecDescriptor returns the descriptor of the codec of the application - GetCodecDescriptor(ctx context.Context, in *GetCodecDescriptorRequest, opts ...grpc.CallOption) (*GetCodecDescriptorResponse, error) - // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - GetConfigurationDescriptor(ctx context.Context, in *GetConfigurationDescriptorRequest, opts ...grpc.CallOption) (*GetConfigurationDescriptorResponse, error) - // GetQueryServicesDescriptor returns the available gRPC queryable services of the application - GetQueryServicesDescriptor(ctx context.Context, in *GetQueryServicesDescriptorRequest, opts ...grpc.CallOption) (*GetQueryServicesDescriptorResponse, error) - // GetTxDescriptor returns information on the used transaction object and available msgs that can be used - GetTxDescriptor(ctx context.Context, in *GetTxDescriptorRequest, opts ...grpc.CallOption) (*GetTxDescriptorResponse, error) -} - -type reflectionServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewReflectionServiceClient(cc grpc.ClientConnInterface) ReflectionServiceClient { - return &reflectionServiceClient{cc} -} - -func (c *reflectionServiceClient) GetAuthnDescriptor(ctx context.Context, in *GetAuthnDescriptorRequest, opts ...grpc.CallOption) (*GetAuthnDescriptorResponse, error) { - out := new(GetAuthnDescriptorResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reflectionServiceClient) GetChainDescriptor(ctx context.Context, in *GetChainDescriptorRequest, opts ...grpc.CallOption) (*GetChainDescriptorResponse, error) { - out := new(GetChainDescriptorResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reflectionServiceClient) GetCodecDescriptor(ctx context.Context, in *GetCodecDescriptorRequest, opts ...grpc.CallOption) (*GetCodecDescriptorResponse, error) { - out := new(GetCodecDescriptorResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reflectionServiceClient) GetConfigurationDescriptor(ctx context.Context, in *GetConfigurationDescriptorRequest, opts ...grpc.CallOption) (*GetConfigurationDescriptorResponse, error) { - out := new(GetConfigurationDescriptorResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reflectionServiceClient) GetQueryServicesDescriptor(ctx context.Context, in *GetQueryServicesDescriptorRequest, opts ...grpc.CallOption) (*GetQueryServicesDescriptorResponse, error) { - out := new(GetQueryServicesDescriptorResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reflectionServiceClient) GetTxDescriptor(ctx context.Context, in *GetTxDescriptorRequest, opts ...grpc.CallOption) (*GetTxDescriptorResponse, error) { - out := new(GetTxDescriptorResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ReflectionServiceServer is the server API for ReflectionService service. -// All implementations must embed UnimplementedReflectionServiceServer -// for forward compatibility -type ReflectionServiceServer interface { - // GetAuthnDescriptor returns information on how to authenticate transactions in the application - // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - // future releases of the cosmos-sdk. - GetAuthnDescriptor(context.Context, *GetAuthnDescriptorRequest) (*GetAuthnDescriptorResponse, error) - // GetChainDescriptor returns the description of the chain - GetChainDescriptor(context.Context, *GetChainDescriptorRequest) (*GetChainDescriptorResponse, error) - // GetCodecDescriptor returns the descriptor of the codec of the application - GetCodecDescriptor(context.Context, *GetCodecDescriptorRequest) (*GetCodecDescriptorResponse, error) - // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - GetConfigurationDescriptor(context.Context, *GetConfigurationDescriptorRequest) (*GetConfigurationDescriptorResponse, error) - // GetQueryServicesDescriptor returns the available gRPC queryable services of the application - GetQueryServicesDescriptor(context.Context, *GetQueryServicesDescriptorRequest) (*GetQueryServicesDescriptorResponse, error) - // GetTxDescriptor returns information on the used transaction object and available msgs that can be used - GetTxDescriptor(context.Context, *GetTxDescriptorRequest) (*GetTxDescriptorResponse, error) - mustEmbedUnimplementedReflectionServiceServer() -} - -// UnimplementedReflectionServiceServer must be embedded to have forward compatible implementations. -type UnimplementedReflectionServiceServer struct { -} - -func (UnimplementedReflectionServiceServer) GetAuthnDescriptor(context.Context, *GetAuthnDescriptorRequest) (*GetAuthnDescriptorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAuthnDescriptor not implemented") -} -func (UnimplementedReflectionServiceServer) GetChainDescriptor(context.Context, *GetChainDescriptorRequest) (*GetChainDescriptorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChainDescriptor not implemented") -} -func (UnimplementedReflectionServiceServer) GetCodecDescriptor(context.Context, *GetCodecDescriptorRequest) (*GetCodecDescriptorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCodecDescriptor not implemented") -} -func (UnimplementedReflectionServiceServer) GetConfigurationDescriptor(context.Context, *GetConfigurationDescriptorRequest) (*GetConfigurationDescriptorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfigurationDescriptor not implemented") -} -func (UnimplementedReflectionServiceServer) GetQueryServicesDescriptor(context.Context, *GetQueryServicesDescriptorRequest) (*GetQueryServicesDescriptorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetQueryServicesDescriptor not implemented") -} -func (UnimplementedReflectionServiceServer) GetTxDescriptor(context.Context, *GetTxDescriptorRequest) (*GetTxDescriptorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTxDescriptor not implemented") -} -func (UnimplementedReflectionServiceServer) mustEmbedUnimplementedReflectionServiceServer() {} - -// UnsafeReflectionServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ReflectionServiceServer will -// result in compilation errors. -type UnsafeReflectionServiceServer interface { - mustEmbedUnimplementedReflectionServiceServer() -} - -func RegisterReflectionServiceServer(s grpc.ServiceRegistrar, srv ReflectionServiceServer) { - s.RegisterService(&ReflectionService_ServiceDesc, srv) -} - -func _ReflectionService_GetAuthnDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAuthnDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).GetAuthnDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).GetAuthnDescriptor(ctx, req.(*GetAuthnDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReflectionService_GetChainDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetChainDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).GetChainDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).GetChainDescriptor(ctx, req.(*GetChainDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReflectionService_GetCodecDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCodecDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).GetCodecDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).GetCodecDescriptor(ctx, req.(*GetCodecDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReflectionService_GetConfigurationDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigurationDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).GetConfigurationDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).GetConfigurationDescriptor(ctx, req.(*GetConfigurationDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReflectionService_GetQueryServicesDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetQueryServicesDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).GetQueryServicesDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).GetQueryServicesDescriptor(ctx, req.(*GetQueryServicesDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReflectionService_GetTxDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTxDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReflectionServiceServer).GetTxDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).GetTxDescriptor(ctx, req.(*GetTxDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ReflectionService_ServiceDesc is the grpc.ServiceDesc for ReflectionService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ReflectionService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.base.reflection.v2alpha1.ReflectionService", - HandlerType: (*ReflectionServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAuthnDescriptor", - Handler: _ReflectionService_GetAuthnDescriptor_Handler, - }, - { - MethodName: "GetChainDescriptor", - Handler: _ReflectionService_GetChainDescriptor_Handler, - }, - { - MethodName: "GetCodecDescriptor", - Handler: _ReflectionService_GetCodecDescriptor_Handler, - }, - { - MethodName: "GetConfigurationDescriptor", - Handler: _ReflectionService_GetConfigurationDescriptor_Handler, - }, - { - MethodName: "GetQueryServicesDescriptor", - Handler: _ReflectionService_GetQueryServicesDescriptor_Handler, - }, - { - MethodName: "GetTxDescriptor", - Handler: _ReflectionService_GetTxDescriptor_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/base/reflection/v2alpha1/reflection.proto", -} diff --git a/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go b/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go deleted file mode 100644 index e17853f53792..000000000000 --- a/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go +++ /dev/null @@ -1,5779 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package snapshotsv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Snapshot protoreflect.MessageDescriptor - fd_Snapshot_height protoreflect.FieldDescriptor - fd_Snapshot_format protoreflect.FieldDescriptor - fd_Snapshot_chunks protoreflect.FieldDescriptor - fd_Snapshot_hash protoreflect.FieldDescriptor - fd_Snapshot_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_Snapshot = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("Snapshot") - fd_Snapshot_height = md_Snapshot.Fields().ByName("height") - fd_Snapshot_format = md_Snapshot.Fields().ByName("format") - fd_Snapshot_chunks = md_Snapshot.Fields().ByName("chunks") - fd_Snapshot_hash = md_Snapshot.Fields().ByName("hash") - fd_Snapshot_metadata = md_Snapshot.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_Snapshot)(nil) - -type fastReflection_Snapshot Snapshot - -func (x *Snapshot) ProtoReflect() protoreflect.Message { - return (*fastReflection_Snapshot)(x) -} - -func (x *Snapshot) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Snapshot_messageType fastReflection_Snapshot_messageType -var _ protoreflect.MessageType = fastReflection_Snapshot_messageType{} - -type fastReflection_Snapshot_messageType struct{} - -func (x fastReflection_Snapshot_messageType) Zero() protoreflect.Message { - return (*fastReflection_Snapshot)(nil) -} -func (x fastReflection_Snapshot_messageType) New() protoreflect.Message { - return new(fastReflection_Snapshot) -} -func (x fastReflection_Snapshot_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Snapshot -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Snapshot) Descriptor() protoreflect.MessageDescriptor { - return md_Snapshot -} - -// 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_Snapshot) Type() protoreflect.MessageType { - return _fastReflection_Snapshot_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Snapshot) New() protoreflect.Message { - return new(fastReflection_Snapshot) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Snapshot) Interface() protoreflect.ProtoMessage { - return (*Snapshot)(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_Snapshot) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != uint64(0) { - value := protoreflect.ValueOfUint64(x.Height) - if !f(fd_Snapshot_height, value) { - return - } - } - if x.Format != uint32(0) { - value := protoreflect.ValueOfUint32(x.Format) - if !f(fd_Snapshot_format, value) { - return - } - } - if x.Chunks != uint32(0) { - value := protoreflect.ValueOfUint32(x.Chunks) - if !f(fd_Snapshot_chunks, value) { - return - } - } - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_Snapshot_hash, value) { - return - } - } - if x.Metadata != nil { - value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - if !f(fd_Snapshot_metadata, 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_Snapshot) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Snapshot.height": - return x.Height != uint64(0) - case "cosmos.base.snapshots.v1beta1.Snapshot.format": - return x.Format != uint32(0) - case "cosmos.base.snapshots.v1beta1.Snapshot.chunks": - return x.Chunks != uint32(0) - case "cosmos.base.snapshots.v1beta1.Snapshot.hash": - return len(x.Hash) != 0 - case "cosmos.base.snapshots.v1beta1.Snapshot.metadata": - return x.Metadata != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Snapshot")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Snapshot 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_Snapshot) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Snapshot.height": - x.Height = uint64(0) - case "cosmos.base.snapshots.v1beta1.Snapshot.format": - x.Format = uint32(0) - case "cosmos.base.snapshots.v1beta1.Snapshot.chunks": - x.Chunks = uint32(0) - case "cosmos.base.snapshots.v1beta1.Snapshot.hash": - x.Hash = nil - case "cosmos.base.snapshots.v1beta1.Snapshot.metadata": - x.Metadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Snapshot")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Snapshot 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_Snapshot) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.Snapshot.height": - value := x.Height - return protoreflect.ValueOfUint64(value) - case "cosmos.base.snapshots.v1beta1.Snapshot.format": - value := x.Format - return protoreflect.ValueOfUint32(value) - case "cosmos.base.snapshots.v1beta1.Snapshot.chunks": - value := x.Chunks - return protoreflect.ValueOfUint32(value) - case "cosmos.base.snapshots.v1beta1.Snapshot.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - case "cosmos.base.snapshots.v1beta1.Snapshot.metadata": - value := x.Metadata - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Snapshot")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Snapshot 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_Snapshot) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Snapshot.height": - x.Height = value.Uint() - case "cosmos.base.snapshots.v1beta1.Snapshot.format": - x.Format = uint32(value.Uint()) - case "cosmos.base.snapshots.v1beta1.Snapshot.chunks": - x.Chunks = uint32(value.Uint()) - case "cosmos.base.snapshots.v1beta1.Snapshot.hash": - x.Hash = value.Bytes() - case "cosmos.base.snapshots.v1beta1.Snapshot.metadata": - x.Metadata = value.Message().Interface().(*Metadata) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Snapshot")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Snapshot 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_Snapshot) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Snapshot.metadata": - if x.Metadata == nil { - x.Metadata = new(Metadata) - } - return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) - case "cosmos.base.snapshots.v1beta1.Snapshot.height": - panic(fmt.Errorf("field height of message cosmos.base.snapshots.v1beta1.Snapshot is not mutable")) - case "cosmos.base.snapshots.v1beta1.Snapshot.format": - panic(fmt.Errorf("field format of message cosmos.base.snapshots.v1beta1.Snapshot is not mutable")) - case "cosmos.base.snapshots.v1beta1.Snapshot.chunks": - panic(fmt.Errorf("field chunks of message cosmos.base.snapshots.v1beta1.Snapshot is not mutable")) - case "cosmos.base.snapshots.v1beta1.Snapshot.hash": - panic(fmt.Errorf("field hash of message cosmos.base.snapshots.v1beta1.Snapshot is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Snapshot")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Snapshot 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_Snapshot) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Snapshot.height": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.base.snapshots.v1beta1.Snapshot.format": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.base.snapshots.v1beta1.Snapshot.chunks": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.base.snapshots.v1beta1.Snapshot.hash": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.snapshots.v1beta1.Snapshot.metadata": - m := new(Metadata) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Snapshot")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Snapshot 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_Snapshot) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.Snapshot", 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_Snapshot) 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_Snapshot) 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_Snapshot) 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_Snapshot) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Snapshot) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Format != 0 { - n += 1 + runtime.Sov(uint64(x.Format)) - } - if x.Chunks != 0 { - n += 1 + runtime.Sov(uint64(x.Chunks)) - } - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Metadata != nil { - l = options.Size(x.Metadata) - 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().(*Snapshot) - 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.Metadata != nil { - encoded, err := options.Marshal(x.Metadata) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0x22 - } - if x.Chunks != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Chunks)) - i-- - dAtA[i] = 0x18 - } - if x.Format != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Format)) - i-- - dAtA[i] = 0x10 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Snapshot) - 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: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - x.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - x.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { - x.Metadata = &Metadata{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Metadata_1_list)(nil) - -type _Metadata_1_list struct { - list *[][]byte -} - -func (x *_Metadata_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Metadata_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_Metadata_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Metadata_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Metadata_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Metadata at list field ChunkHashes as it is not of Message kind")) -} - -func (x *_Metadata_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Metadata_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_Metadata_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Metadata protoreflect.MessageDescriptor - fd_Metadata_chunk_hashes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_Metadata = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("Metadata") - fd_Metadata_chunk_hashes = md_Metadata.Fields().ByName("chunk_hashes") -} - -var _ protoreflect.Message = (*fastReflection_Metadata)(nil) - -type fastReflection_Metadata Metadata - -func (x *Metadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_Metadata)(x) -} - -func (x *Metadata) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType -var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} - -type fastReflection_Metadata_messageType struct{} - -func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_Metadata)(nil) -} -func (x fastReflection_Metadata_messageType) New() protoreflect.Message { - return new(fastReflection_Metadata) -} -func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata -} - -// 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_Metadata) Type() protoreflect.MessageType { - return _fastReflection_Metadata_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Metadata) New() protoreflect.Message { - return new(fastReflection_Metadata) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { - return (*Metadata)(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_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ChunkHashes) != 0 { - value := protoreflect.ValueOfList(&_Metadata_1_list{list: &x.ChunkHashes}) - if !f(fd_Metadata_chunk_hashes, 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_Metadata) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Metadata.chunk_hashes": - return len(x.ChunkHashes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Metadata 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_Metadata) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Metadata.chunk_hashes": - x.ChunkHashes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Metadata 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_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.Metadata.chunk_hashes": - if len(x.ChunkHashes) == 0 { - return protoreflect.ValueOfList(&_Metadata_1_list{}) - } - listValue := &_Metadata_1_list{list: &x.ChunkHashes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Metadata 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_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Metadata.chunk_hashes": - lv := value.List() - clv := lv.(*_Metadata_1_list) - x.ChunkHashes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Metadata 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_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Metadata.chunk_hashes": - if x.ChunkHashes == nil { - x.ChunkHashes = [][]byte{} - } - value := &_Metadata_1_list{list: &x.ChunkHashes} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Metadata 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_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.Metadata.chunk_hashes": - list := [][]byte{} - return protoreflect.ValueOfList(&_Metadata_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.Metadata")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.Metadata 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_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.Metadata", 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_Metadata) 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_Metadata) 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_Metadata) 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_Metadata) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Metadata) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.ChunkHashes) > 0 { - for _, b := range x.ChunkHashes { - l = len(b) - 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().(*Metadata) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ChunkHashes) > 0 { - for iNdEx := len(x.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.ChunkHashes[iNdEx]) - copy(dAtA[i:], x.ChunkHashes[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChunkHashes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Metadata) - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: 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 ChunkHashes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChunkHashes = append(x.ChunkHashes, make([]byte, postIndex-iNdEx)) - copy(x.ChunkHashes[len(x.ChunkHashes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SnapshotItem protoreflect.MessageDescriptor - fd_SnapshotItem_store protoreflect.FieldDescriptor - fd_SnapshotItem_iavl protoreflect.FieldDescriptor - fd_SnapshotItem_extension protoreflect.FieldDescriptor - fd_SnapshotItem_extension_payload protoreflect.FieldDescriptor - fd_SnapshotItem_kv protoreflect.FieldDescriptor - fd_SnapshotItem_schema protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotItem = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotItem") - fd_SnapshotItem_store = md_SnapshotItem.Fields().ByName("store") - fd_SnapshotItem_iavl = md_SnapshotItem.Fields().ByName("iavl") - fd_SnapshotItem_extension = md_SnapshotItem.Fields().ByName("extension") - fd_SnapshotItem_extension_payload = md_SnapshotItem.Fields().ByName("extension_payload") - fd_SnapshotItem_kv = md_SnapshotItem.Fields().ByName("kv") - fd_SnapshotItem_schema = md_SnapshotItem.Fields().ByName("schema") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotItem)(nil) - -type fastReflection_SnapshotItem SnapshotItem - -func (x *SnapshotItem) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotItem)(x) -} - -func (x *SnapshotItem) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SnapshotItem_messageType fastReflection_SnapshotItem_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotItem_messageType{} - -type fastReflection_SnapshotItem_messageType struct{} - -func (x fastReflection_SnapshotItem_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotItem)(nil) -} -func (x fastReflection_SnapshotItem_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotItem) -} -func (x fastReflection_SnapshotItem_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotItem -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotItem) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotItem -} - -// 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_SnapshotItem) Type() protoreflect.MessageType { - return _fastReflection_SnapshotItem_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotItem) New() protoreflect.Message { - return new(fastReflection_SnapshotItem) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotItem) Interface() protoreflect.ProtoMessage { - return (*SnapshotItem)(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_SnapshotItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Item != nil { - switch o := x.Item.(type) { - case *SnapshotItem_Store: - v := o.Store - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SnapshotItem_store, value) { - return - } - case *SnapshotItem_Iavl: - v := o.Iavl - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SnapshotItem_iavl, value) { - return - } - case *SnapshotItem_Extension: - v := o.Extension - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SnapshotItem_extension, value) { - return - } - case *SnapshotItem_ExtensionPayload: - v := o.ExtensionPayload - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SnapshotItem_extension_payload, value) { - return - } - case *SnapshotItem_Kv: - v := o.Kv - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SnapshotItem_kv, value) { - return - } - case *SnapshotItem_Schema: - v := o.Schema - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SnapshotItem_schema, 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_SnapshotItem) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.store": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*SnapshotItem_Store); ok { - return true - } else { - return false - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.iavl": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*SnapshotItem_Iavl); ok { - return true - } else { - return false - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*SnapshotItem_Extension); ok { - return true - } else { - return false - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*SnapshotItem_ExtensionPayload); ok { - return true - } else { - return false - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.kv": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*SnapshotItem_Kv); ok { - return true - } else { - return false - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.schema": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*SnapshotItem_Schema); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotItem 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_SnapshotItem) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.store": - x.Item = nil - case "cosmos.base.snapshots.v1beta1.SnapshotItem.iavl": - x.Item = nil - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension": - x.Item = nil - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload": - x.Item = nil - case "cosmos.base.snapshots.v1beta1.SnapshotItem.kv": - x.Item = nil - case "cosmos.base.snapshots.v1beta1.SnapshotItem.schema": - x.Item = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotItem 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_SnapshotItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.store": - if x.Item == nil { - return protoreflect.ValueOfMessage((*SnapshotStoreItem)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*SnapshotItem_Store); ok { - return protoreflect.ValueOfMessage(v.Store.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SnapshotStoreItem)(nil).ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.iavl": - if x.Item == nil { - return protoreflect.ValueOfMessage((*SnapshotIAVLItem)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*SnapshotItem_Iavl); ok { - return protoreflect.ValueOfMessage(v.Iavl.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SnapshotIAVLItem)(nil).ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension": - if x.Item == nil { - return protoreflect.ValueOfMessage((*SnapshotExtensionMeta)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*SnapshotItem_Extension); ok { - return protoreflect.ValueOfMessage(v.Extension.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SnapshotExtensionMeta)(nil).ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload": - if x.Item == nil { - return protoreflect.ValueOfMessage((*SnapshotExtensionPayload)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*SnapshotItem_ExtensionPayload); ok { - return protoreflect.ValueOfMessage(v.ExtensionPayload.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SnapshotExtensionPayload)(nil).ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.kv": - if x.Item == nil { - return protoreflect.ValueOfMessage((*SnapshotKVItem)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*SnapshotItem_Kv); ok { - return protoreflect.ValueOfMessage(v.Kv.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SnapshotKVItem)(nil).ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.schema": - if x.Item == nil { - return protoreflect.ValueOfMessage((*SnapshotSchema)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*SnapshotItem_Schema); ok { - return protoreflect.ValueOfMessage(v.Schema.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SnapshotSchema)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotItem 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_SnapshotItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.store": - cv := value.Message().Interface().(*SnapshotStoreItem) - x.Item = &SnapshotItem_Store{Store: cv} - case "cosmos.base.snapshots.v1beta1.SnapshotItem.iavl": - cv := value.Message().Interface().(*SnapshotIAVLItem) - x.Item = &SnapshotItem_Iavl{Iavl: cv} - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension": - cv := value.Message().Interface().(*SnapshotExtensionMeta) - x.Item = &SnapshotItem_Extension{Extension: cv} - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload": - cv := value.Message().Interface().(*SnapshotExtensionPayload) - x.Item = &SnapshotItem_ExtensionPayload{ExtensionPayload: cv} - case "cosmos.base.snapshots.v1beta1.SnapshotItem.kv": - cv := value.Message().Interface().(*SnapshotKVItem) - x.Item = &SnapshotItem_Kv{Kv: cv} - case "cosmos.base.snapshots.v1beta1.SnapshotItem.schema": - cv := value.Message().Interface().(*SnapshotSchema) - x.Item = &SnapshotItem_Schema{Schema: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotItem 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_SnapshotItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.store": - if x.Item == nil { - value := &SnapshotStoreItem{} - oneofValue := &SnapshotItem_Store{Store: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *SnapshotItem_Store: - return protoreflect.ValueOfMessage(m.Store.ProtoReflect()) - default: - value := &SnapshotStoreItem{} - oneofValue := &SnapshotItem_Store{Store: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.iavl": - if x.Item == nil { - value := &SnapshotIAVLItem{} - oneofValue := &SnapshotItem_Iavl{Iavl: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *SnapshotItem_Iavl: - return protoreflect.ValueOfMessage(m.Iavl.ProtoReflect()) - default: - value := &SnapshotIAVLItem{} - oneofValue := &SnapshotItem_Iavl{Iavl: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension": - if x.Item == nil { - value := &SnapshotExtensionMeta{} - oneofValue := &SnapshotItem_Extension{Extension: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *SnapshotItem_Extension: - return protoreflect.ValueOfMessage(m.Extension.ProtoReflect()) - default: - value := &SnapshotExtensionMeta{} - oneofValue := &SnapshotItem_Extension{Extension: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload": - if x.Item == nil { - value := &SnapshotExtensionPayload{} - oneofValue := &SnapshotItem_ExtensionPayload{ExtensionPayload: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *SnapshotItem_ExtensionPayload: - return protoreflect.ValueOfMessage(m.ExtensionPayload.ProtoReflect()) - default: - value := &SnapshotExtensionPayload{} - oneofValue := &SnapshotItem_ExtensionPayload{ExtensionPayload: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.kv": - if x.Item == nil { - value := &SnapshotKVItem{} - oneofValue := &SnapshotItem_Kv{Kv: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *SnapshotItem_Kv: - return protoreflect.ValueOfMessage(m.Kv.ProtoReflect()) - default: - value := &SnapshotKVItem{} - oneofValue := &SnapshotItem_Kv{Kv: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.base.snapshots.v1beta1.SnapshotItem.schema": - if x.Item == nil { - value := &SnapshotSchema{} - oneofValue := &SnapshotItem_Schema{Schema: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *SnapshotItem_Schema: - return protoreflect.ValueOfMessage(m.Schema.ProtoReflect()) - default: - value := &SnapshotSchema{} - oneofValue := &SnapshotItem_Schema{Schema: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotItem 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_SnapshotItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.store": - value := &SnapshotStoreItem{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.snapshots.v1beta1.SnapshotItem.iavl": - value := &SnapshotIAVLItem{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension": - value := &SnapshotExtensionMeta{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload": - value := &SnapshotExtensionPayload{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.snapshots.v1beta1.SnapshotItem.kv": - value := &SnapshotKVItem{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.snapshots.v1beta1.SnapshotItem.schema": - value := &SnapshotSchema{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotItem 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_SnapshotItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotItem.item": - if x.Item == nil { - return nil - } - switch x.Item.(type) { - case *SnapshotItem_Store: - return x.Descriptor().Fields().ByName("store") - case *SnapshotItem_Iavl: - return x.Descriptor().Fields().ByName("iavl") - case *SnapshotItem_Extension: - return x.Descriptor().Fields().ByName("extension") - case *SnapshotItem_ExtensionPayload: - return x.Descriptor().Fields().ByName("extension_payload") - case *SnapshotItem_Kv: - return x.Descriptor().Fields().ByName("kv") - case *SnapshotItem_Schema: - return x.Descriptor().Fields().ByName("schema") - } - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotItem", 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_SnapshotItem) 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_SnapshotItem) 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_SnapshotItem) 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_SnapshotItem) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotItem) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Item.(type) { - case *SnapshotItem_Store: - if x == nil { - break - } - l = options.Size(x.Store) - n += 1 + l + runtime.Sov(uint64(l)) - case *SnapshotItem_Iavl: - if x == nil { - break - } - l = options.Size(x.Iavl) - n += 1 + l + runtime.Sov(uint64(l)) - case *SnapshotItem_Extension: - if x == nil { - break - } - l = options.Size(x.Extension) - n += 1 + l + runtime.Sov(uint64(l)) - case *SnapshotItem_ExtensionPayload: - if x == nil { - break - } - l = options.Size(x.ExtensionPayload) - n += 1 + l + runtime.Sov(uint64(l)) - case *SnapshotItem_Kv: - if x == nil { - break - } - l = options.Size(x.Kv) - n += 1 + l + runtime.Sov(uint64(l)) - case *SnapshotItem_Schema: - if x == nil { - break - } - l = options.Size(x.Schema) - 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().(*SnapshotItem) - 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) - } - switch x := x.Item.(type) { - case *SnapshotItem_Store: - encoded, err := options.Marshal(x.Store) - 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 - case *SnapshotItem_Iavl: - encoded, err := options.Marshal(x.Iavl) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - case *SnapshotItem_Extension: - encoded, err := options.Marshal(x.Extension) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - case *SnapshotItem_ExtensionPayload: - encoded, err := options.Marshal(x.ExtensionPayload) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - case *SnapshotItem_Kv: - encoded, err := options.Marshal(x.Kv) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - case *SnapshotItem_Schema: - encoded, err := options.Marshal(x.Schema) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if 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().(*SnapshotItem) - 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: SnapshotItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotItem: 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 Store", 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 - } - v := &SnapshotStoreItem{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &SnapshotItem_Store{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iavl", 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 - } - v := &SnapshotIAVLItem{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &SnapshotItem_Iavl{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Extension", 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 - } - v := &SnapshotExtensionMeta{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &SnapshotItem_Extension{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", 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 - } - v := &SnapshotExtensionPayload{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &SnapshotItem_ExtensionPayload{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kv", 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 - } - v := &SnapshotKVItem{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &SnapshotItem_Kv{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", 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 - } - v := &SnapshotSchema{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &SnapshotItem_Schema{v} - 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_SnapshotStoreItem protoreflect.MessageDescriptor - fd_SnapshotStoreItem_name protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotStoreItem = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotStoreItem") - fd_SnapshotStoreItem_name = md_SnapshotStoreItem.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotStoreItem)(nil) - -type fastReflection_SnapshotStoreItem SnapshotStoreItem - -func (x *SnapshotStoreItem) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotStoreItem)(x) -} - -func (x *SnapshotStoreItem) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SnapshotStoreItem_messageType fastReflection_SnapshotStoreItem_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotStoreItem_messageType{} - -type fastReflection_SnapshotStoreItem_messageType struct{} - -func (x fastReflection_SnapshotStoreItem_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotStoreItem)(nil) -} -func (x fastReflection_SnapshotStoreItem_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotStoreItem) -} -func (x fastReflection_SnapshotStoreItem_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotStoreItem -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotStoreItem) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotStoreItem -} - -// 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_SnapshotStoreItem) Type() protoreflect.MessageType { - return _fastReflection_SnapshotStoreItem_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotStoreItem) New() protoreflect.Message { - return new(fastReflection_SnapshotStoreItem) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotStoreItem) Interface() protoreflect.ProtoMessage { - return (*SnapshotStoreItem)(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_SnapshotStoreItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_SnapshotStoreItem_name, 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_SnapshotStoreItem) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotStoreItem.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotStoreItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotStoreItem 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_SnapshotStoreItem) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotStoreItem.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotStoreItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotStoreItem 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_SnapshotStoreItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotStoreItem.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotStoreItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotStoreItem 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_SnapshotStoreItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotStoreItem.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotStoreItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotStoreItem 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_SnapshotStoreItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotStoreItem.name": - panic(fmt.Errorf("field name of message cosmos.base.snapshots.v1beta1.SnapshotStoreItem is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotStoreItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotStoreItem 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_SnapshotStoreItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotStoreItem.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotStoreItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotStoreItem 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_SnapshotStoreItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotStoreItem", 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_SnapshotStoreItem) 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_SnapshotStoreItem) 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_SnapshotStoreItem) 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_SnapshotStoreItem) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotStoreItem) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SnapshotStoreItem) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.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 { - 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().(*SnapshotStoreItem) - 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: SnapshotStoreItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotStoreItem: 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:]) - 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_SnapshotIAVLItem protoreflect.MessageDescriptor - fd_SnapshotIAVLItem_key protoreflect.FieldDescriptor - fd_SnapshotIAVLItem_value protoreflect.FieldDescriptor - fd_SnapshotIAVLItem_version protoreflect.FieldDescriptor - fd_SnapshotIAVLItem_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotIAVLItem = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotIAVLItem") - fd_SnapshotIAVLItem_key = md_SnapshotIAVLItem.Fields().ByName("key") - fd_SnapshotIAVLItem_value = md_SnapshotIAVLItem.Fields().ByName("value") - fd_SnapshotIAVLItem_version = md_SnapshotIAVLItem.Fields().ByName("version") - fd_SnapshotIAVLItem_height = md_SnapshotIAVLItem.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotIAVLItem)(nil) - -type fastReflection_SnapshotIAVLItem SnapshotIAVLItem - -func (x *SnapshotIAVLItem) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotIAVLItem)(x) -} - -func (x *SnapshotIAVLItem) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SnapshotIAVLItem_messageType fastReflection_SnapshotIAVLItem_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotIAVLItem_messageType{} - -type fastReflection_SnapshotIAVLItem_messageType struct{} - -func (x fastReflection_SnapshotIAVLItem_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotIAVLItem)(nil) -} -func (x fastReflection_SnapshotIAVLItem_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotIAVLItem) -} -func (x fastReflection_SnapshotIAVLItem_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotIAVLItem -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotIAVLItem) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotIAVLItem -} - -// 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_SnapshotIAVLItem) Type() protoreflect.MessageType { - return _fastReflection_SnapshotIAVLItem_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotIAVLItem) New() protoreflect.Message { - return new(fastReflection_SnapshotIAVLItem) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotIAVLItem) Interface() protoreflect.ProtoMessage { - return (*SnapshotIAVLItem)(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_SnapshotIAVLItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_SnapshotIAVLItem_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_SnapshotIAVLItem_value, value) { - return - } - } - if x.Version != int64(0) { - value := protoreflect.ValueOfInt64(x.Version) - if !f(fd_SnapshotIAVLItem_version, value) { - return - } - } - if x.Height != int32(0) { - value := protoreflect.ValueOfInt32(x.Height) - if !f(fd_SnapshotIAVLItem_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SnapshotIAVLItem) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.key": - return len(x.Key) != 0 - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.value": - return len(x.Value) != 0 - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.version": - return x.Version != int64(0) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.height": - return x.Height != int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem 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_SnapshotIAVLItem) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.key": - x.Key = nil - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.value": - x.Value = nil - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.version": - x.Version = int64(0) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.height": - x.Height = int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem 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_SnapshotIAVLItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.version": - value := x.Version - return protoreflect.ValueOfInt64(value) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.height": - value := x.Height - return protoreflect.ValueOfInt32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem 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_SnapshotIAVLItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.key": - x.Key = value.Bytes() - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.value": - x.Value = value.Bytes() - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.version": - x.Version = value.Int() - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.height": - x.Height = int32(value.Int()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem 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_SnapshotIAVLItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.key": - panic(fmt.Errorf("field key of message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem is not mutable")) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.value": - panic(fmt.Errorf("field value of message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem is not mutable")) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.version": - panic(fmt.Errorf("field version of message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem is not mutable")) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.height": - panic(fmt.Errorf("field height of message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem 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_SnapshotIAVLItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.value": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.version": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem.height": - return protoreflect.ValueOfInt32(int32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotIAVLItem 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_SnapshotIAVLItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", 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_SnapshotIAVLItem) 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_SnapshotIAVLItem) 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_SnapshotIAVLItem) 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_SnapshotIAVLItem) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotIAVLItem) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SnapshotIAVLItem) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x20 - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x18 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*SnapshotIAVLItem) - 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: SnapshotIAVLItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotIAVLItem: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SnapshotExtensionMeta protoreflect.MessageDescriptor - fd_SnapshotExtensionMeta_name protoreflect.FieldDescriptor - fd_SnapshotExtensionMeta_format protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotExtensionMeta = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotExtensionMeta") - fd_SnapshotExtensionMeta_name = md_SnapshotExtensionMeta.Fields().ByName("name") - fd_SnapshotExtensionMeta_format = md_SnapshotExtensionMeta.Fields().ByName("format") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotExtensionMeta)(nil) - -type fastReflection_SnapshotExtensionMeta SnapshotExtensionMeta - -func (x *SnapshotExtensionMeta) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotExtensionMeta)(x) -} - -func (x *SnapshotExtensionMeta) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_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_SnapshotExtensionMeta_messageType fastReflection_SnapshotExtensionMeta_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotExtensionMeta_messageType{} - -type fastReflection_SnapshotExtensionMeta_messageType struct{} - -func (x fastReflection_SnapshotExtensionMeta_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotExtensionMeta)(nil) -} -func (x fastReflection_SnapshotExtensionMeta_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotExtensionMeta) -} -func (x fastReflection_SnapshotExtensionMeta_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotExtensionMeta -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotExtensionMeta) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotExtensionMeta -} - -// 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_SnapshotExtensionMeta) Type() protoreflect.MessageType { - return _fastReflection_SnapshotExtensionMeta_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotExtensionMeta) New() protoreflect.Message { - return new(fastReflection_SnapshotExtensionMeta) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotExtensionMeta) Interface() protoreflect.ProtoMessage { - return (*SnapshotExtensionMeta)(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_SnapshotExtensionMeta) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_SnapshotExtensionMeta_name, value) { - return - } - } - if x.Format != uint32(0) { - value := protoreflect.ValueOfUint32(x.Format) - if !f(fd_SnapshotExtensionMeta_format, 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_SnapshotExtensionMeta) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.name": - return x.Name != "" - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.format": - return x.Format != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta 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_SnapshotExtensionMeta) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.name": - x.Name = "" - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.format": - x.Format = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta 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_SnapshotExtensionMeta) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.format": - value := x.Format - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta 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_SnapshotExtensionMeta) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.name": - x.Name = value.Interface().(string) - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.format": - x.Format = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta 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_SnapshotExtensionMeta) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.name": - panic(fmt.Errorf("field name of message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta is not mutable")) - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.format": - panic(fmt.Errorf("field format of message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta 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_SnapshotExtensionMeta) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.name": - return protoreflect.ValueOfString("") - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta.format": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta 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_SnapshotExtensionMeta) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", 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_SnapshotExtensionMeta) 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_SnapshotExtensionMeta) 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_SnapshotExtensionMeta) 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_SnapshotExtensionMeta) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotExtensionMeta) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Format != 0 { - n += 1 + runtime.Sov(uint64(x.Format)) - } - 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().(*SnapshotExtensionMeta) - 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.Format != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Format)) - i-- - dAtA[i] = 0x10 - } - 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 { - 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().(*SnapshotExtensionMeta) - 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: SnapshotExtensionMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotExtensionMeta: 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 - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - x.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SnapshotExtensionPayload protoreflect.MessageDescriptor - fd_SnapshotExtensionPayload_payload protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotExtensionPayload = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotExtensionPayload") - fd_SnapshotExtensionPayload_payload = md_SnapshotExtensionPayload.Fields().ByName("payload") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotExtensionPayload)(nil) - -type fastReflection_SnapshotExtensionPayload SnapshotExtensionPayload - -func (x *SnapshotExtensionPayload) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotExtensionPayload)(x) -} - -func (x *SnapshotExtensionPayload) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_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_SnapshotExtensionPayload_messageType fastReflection_SnapshotExtensionPayload_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotExtensionPayload_messageType{} - -type fastReflection_SnapshotExtensionPayload_messageType struct{} - -func (x fastReflection_SnapshotExtensionPayload_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotExtensionPayload)(nil) -} -func (x fastReflection_SnapshotExtensionPayload_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotExtensionPayload) -} -func (x fastReflection_SnapshotExtensionPayload_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotExtensionPayload -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotExtensionPayload) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotExtensionPayload -} - -// 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_SnapshotExtensionPayload) Type() protoreflect.MessageType { - return _fastReflection_SnapshotExtensionPayload_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotExtensionPayload) New() protoreflect.Message { - return new(fastReflection_SnapshotExtensionPayload) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotExtensionPayload) Interface() protoreflect.ProtoMessage { - return (*SnapshotExtensionPayload)(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_SnapshotExtensionPayload) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Payload) != 0 { - value := protoreflect.ValueOfBytes(x.Payload) - if !f(fd_SnapshotExtensionPayload_payload, 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_SnapshotExtensionPayload) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.payload": - return len(x.Payload) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload 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_SnapshotExtensionPayload) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.payload": - x.Payload = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload 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_SnapshotExtensionPayload) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.payload": - value := x.Payload - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload 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_SnapshotExtensionPayload) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.payload": - x.Payload = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload 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_SnapshotExtensionPayload) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.payload": - panic(fmt.Errorf("field payload of message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload 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_SnapshotExtensionPayload) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload.payload": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload 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_SnapshotExtensionPayload) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", 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_SnapshotExtensionPayload) 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_SnapshotExtensionPayload) 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_SnapshotExtensionPayload) 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_SnapshotExtensionPayload) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotExtensionPayload) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Payload) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SnapshotExtensionPayload) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Payload) > 0 { - i -= len(x.Payload) - copy(dAtA[i:], x.Payload) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) - 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().(*SnapshotExtensionPayload) - 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: SnapshotExtensionPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotExtensionPayload: 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 Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Payload = append(x.Payload[:0], dAtA[iNdEx:postIndex]...) - if x.Payload == nil { - x.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SnapshotKVItem protoreflect.MessageDescriptor - fd_SnapshotKVItem_key protoreflect.FieldDescriptor - fd_SnapshotKVItem_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotKVItem = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotKVItem") - fd_SnapshotKVItem_key = md_SnapshotKVItem.Fields().ByName("key") - fd_SnapshotKVItem_value = md_SnapshotKVItem.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotKVItem)(nil) - -type fastReflection_SnapshotKVItem SnapshotKVItem - -func (x *SnapshotKVItem) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotKVItem)(x) -} - -func (x *SnapshotKVItem) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SnapshotKVItem_messageType fastReflection_SnapshotKVItem_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotKVItem_messageType{} - -type fastReflection_SnapshotKVItem_messageType struct{} - -func (x fastReflection_SnapshotKVItem_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotKVItem)(nil) -} -func (x fastReflection_SnapshotKVItem_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotKVItem) -} -func (x fastReflection_SnapshotKVItem_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotKVItem -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotKVItem) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotKVItem -} - -// 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_SnapshotKVItem) Type() protoreflect.MessageType { - return _fastReflection_SnapshotKVItem_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotKVItem) New() protoreflect.Message { - return new(fastReflection_SnapshotKVItem) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotKVItem) Interface() protoreflect.ProtoMessage { - return (*SnapshotKVItem)(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_SnapshotKVItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_SnapshotKVItem_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_SnapshotKVItem_value, 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_SnapshotKVItem) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.key": - return len(x.Key) != 0 - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.value": - return len(x.Value) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotKVItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotKVItem 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_SnapshotKVItem) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.key": - x.Key = nil - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.value": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotKVItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotKVItem 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_SnapshotKVItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotKVItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotKVItem 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_SnapshotKVItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.key": - x.Key = value.Bytes() - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.value": - x.Value = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotKVItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotKVItem 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_SnapshotKVItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.key": - panic(fmt.Errorf("field key of message cosmos.base.snapshots.v1beta1.SnapshotKVItem is not mutable")) - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.value": - panic(fmt.Errorf("field value of message cosmos.base.snapshots.v1beta1.SnapshotKVItem is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotKVItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotKVItem 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_SnapshotKVItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.snapshots.v1beta1.SnapshotKVItem.value": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotKVItem")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotKVItem 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_SnapshotKVItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotKVItem", 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_SnapshotKVItem) 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_SnapshotKVItem) 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_SnapshotKVItem) 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_SnapshotKVItem) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotKVItem) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SnapshotKVItem) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*SnapshotKVItem) - 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: SnapshotKVItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotKVItem: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_SnapshotSchema_1_list)(nil) - -type _SnapshotSchema_1_list struct { - list *[][]byte -} - -func (x *_SnapshotSchema_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_SnapshotSchema_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_SnapshotSchema_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_SnapshotSchema_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_SnapshotSchema_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message SnapshotSchema at list field Keys as it is not of Message kind")) -} - -func (x *_SnapshotSchema_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_SnapshotSchema_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_SnapshotSchema_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_SnapshotSchema protoreflect.MessageDescriptor - fd_SnapshotSchema_keys protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() - md_SnapshotSchema = File_cosmos_base_snapshots_v1beta1_snapshot_proto.Messages().ByName("SnapshotSchema") - fd_SnapshotSchema_keys = md_SnapshotSchema.Fields().ByName("keys") -} - -var _ protoreflect.Message = (*fastReflection_SnapshotSchema)(nil) - -type fastReflection_SnapshotSchema SnapshotSchema - -func (x *SnapshotSchema) ProtoReflect() protoreflect.Message { - return (*fastReflection_SnapshotSchema)(x) -} - -func (x *SnapshotSchema) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SnapshotSchema_messageType fastReflection_SnapshotSchema_messageType -var _ protoreflect.MessageType = fastReflection_SnapshotSchema_messageType{} - -type fastReflection_SnapshotSchema_messageType struct{} - -func (x fastReflection_SnapshotSchema_messageType) Zero() protoreflect.Message { - return (*fastReflection_SnapshotSchema)(nil) -} -func (x fastReflection_SnapshotSchema_messageType) New() protoreflect.Message { - return new(fastReflection_SnapshotSchema) -} -func (x fastReflection_SnapshotSchema_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotSchema -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SnapshotSchema) Descriptor() protoreflect.MessageDescriptor { - return md_SnapshotSchema -} - -// 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_SnapshotSchema) Type() protoreflect.MessageType { - return _fastReflection_SnapshotSchema_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SnapshotSchema) New() protoreflect.Message { - return new(fastReflection_SnapshotSchema) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SnapshotSchema) Interface() protoreflect.ProtoMessage { - return (*SnapshotSchema)(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_SnapshotSchema) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Keys) != 0 { - value := protoreflect.ValueOfList(&_SnapshotSchema_1_list{list: &x.Keys}) - if !f(fd_SnapshotSchema_keys, 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_SnapshotSchema) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotSchema.keys": - return len(x.Keys) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotSchema")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotSchema 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_SnapshotSchema) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotSchema.keys": - x.Keys = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotSchema")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotSchema 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_SnapshotSchema) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotSchema.keys": - if len(x.Keys) == 0 { - return protoreflect.ValueOfList(&_SnapshotSchema_1_list{}) - } - listValue := &_SnapshotSchema_1_list{list: &x.Keys} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotSchema")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotSchema 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_SnapshotSchema) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotSchema.keys": - lv := value.List() - clv := lv.(*_SnapshotSchema_1_list) - x.Keys = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotSchema")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotSchema 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_SnapshotSchema) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotSchema.keys": - if x.Keys == nil { - x.Keys = [][]byte{} - } - value := &_SnapshotSchema_1_list{list: &x.Keys} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotSchema")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotSchema 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_SnapshotSchema) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.snapshots.v1beta1.SnapshotSchema.keys": - list := [][]byte{} - return protoreflect.ValueOfList(&_SnapshotSchema_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.snapshots.v1beta1.SnapshotSchema")) - } - panic(fmt.Errorf("message cosmos.base.snapshots.v1beta1.SnapshotSchema 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_SnapshotSchema) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.snapshots.v1beta1.SnapshotSchema", 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_SnapshotSchema) 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_SnapshotSchema) 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_SnapshotSchema) 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_SnapshotSchema) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SnapshotSchema) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Keys) > 0 { - for _, b := range x.Keys { - l = len(b) - 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().(*SnapshotSchema) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Keys) > 0 { - for iNdEx := len(x.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Keys[iNdEx]) - copy(dAtA[i:], x.Keys[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keys[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SnapshotSchema) - 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: SnapshotSchema: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnapshotSchema: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Keys = append(x.Keys, make([]byte, postIndex-iNdEx)) - copy(x.Keys[len(x.Keys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/snapshots/v1beta1/snapshot.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Snapshot contains Tendermint state sync snapshot info. -type Snapshot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Snapshot) Reset() { - *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Snapshot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Snapshot) ProtoMessage() {} - -// Deprecated: Use Snapshot.ProtoReflect.Descriptor instead. -func (*Snapshot) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{0} -} - -func (x *Snapshot) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Snapshot) GetFormat() uint32 { - if x != nil { - return x.Format - } - return 0 -} - -func (x *Snapshot) GetChunks() uint32 { - if x != nil { - return x.Chunks - } - return 0 -} - -func (x *Snapshot) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *Snapshot) GetMetadata() *Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// Metadata contains SDK-specific snapshot metadata. -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` // SHA-256 chunk hashes -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{1} -} - -func (x *Metadata) GetChunkHashes() [][]byte { - if x != nil { - return x.ChunkHashes - } - return nil -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -type SnapshotItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // item is the specific type of snapshot item. - // - // Types that are assignable to Item: - // *SnapshotItem_Store - // *SnapshotItem_Iavl - // *SnapshotItem_Extension - // *SnapshotItem_ExtensionPayload - // *SnapshotItem_Kv - // *SnapshotItem_Schema - Item isSnapshotItem_Item `protobuf_oneof:"item"` -} - -func (x *SnapshotItem) Reset() { - *x = SnapshotItem{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotItem) ProtoMessage() {} - -// Deprecated: Use SnapshotItem.ProtoReflect.Descriptor instead. -func (*SnapshotItem) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{2} -} - -func (x *SnapshotItem) GetItem() isSnapshotItem_Item { - if x != nil { - return x.Item - } - return nil -} - -func (x *SnapshotItem) GetStore() *SnapshotStoreItem { - if x, ok := x.GetItem().(*SnapshotItem_Store); ok { - return x.Store - } - return nil -} - -func (x *SnapshotItem) GetIavl() *SnapshotIAVLItem { - if x, ok := x.GetItem().(*SnapshotItem_Iavl); ok { - return x.Iavl - } - return nil -} - -func (x *SnapshotItem) GetExtension() *SnapshotExtensionMeta { - if x, ok := x.GetItem().(*SnapshotItem_Extension); ok { - return x.Extension - } - return nil -} - -func (x *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { - if x, ok := x.GetItem().(*SnapshotItem_ExtensionPayload); ok { - return x.ExtensionPayload - } - return nil -} - -func (x *SnapshotItem) GetKv() *SnapshotKVItem { - if x, ok := x.GetItem().(*SnapshotItem_Kv); ok { - return x.Kv - } - return nil -} - -func (x *SnapshotItem) GetSchema() *SnapshotSchema { - if x, ok := x.GetItem().(*SnapshotItem_Schema); ok { - return x.Schema - } - return nil -} - -type isSnapshotItem_Item interface { - isSnapshotItem_Item() -} - -type SnapshotItem_Store struct { - Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof"` -} - -type SnapshotItem_Iavl struct { - Iavl *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof"` -} - -type SnapshotItem_Extension struct { - Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof"` -} - -type SnapshotItem_ExtensionPayload struct { - ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof"` -} - -type SnapshotItem_Kv struct { - Kv *SnapshotKVItem `protobuf:"bytes,5,opt,name=kv,proto3,oneof"` -} - -type SnapshotItem_Schema struct { - Schema *SnapshotSchema `protobuf:"bytes,6,opt,name=schema,proto3,oneof"` -} - -func (*SnapshotItem_Store) isSnapshotItem_Item() {} - -func (*SnapshotItem_Iavl) isSnapshotItem_Item() {} - -func (*SnapshotItem_Extension) isSnapshotItem_Item() {} - -func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} - -func (*SnapshotItem_Kv) isSnapshotItem_Item() {} - -func (*SnapshotItem_Schema) isSnapshotItem_Item() {} - -// SnapshotStoreItem contains metadata about a snapshotted store. -type SnapshotStoreItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *SnapshotStoreItem) Reset() { - *x = SnapshotStoreItem{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotStoreItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotStoreItem) ProtoMessage() {} - -// Deprecated: Use SnapshotStoreItem.ProtoReflect.Descriptor instead. -func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{3} -} - -func (x *SnapshotStoreItem) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// SnapshotIAVLItem is an exported IAVL node. -type SnapshotIAVLItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // version is block height - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // height is depth of the tree. - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *SnapshotIAVLItem) Reset() { - *x = SnapshotIAVLItem{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotIAVLItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotIAVLItem) ProtoMessage() {} - -// Deprecated: Use SnapshotIAVLItem.ProtoReflect.Descriptor instead. -func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{4} -} - -func (x *SnapshotIAVLItem) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *SnapshotIAVLItem) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *SnapshotIAVLItem) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *SnapshotIAVLItem) GetHeight() int32 { - if x != nil { - return x.Height - } - return 0 -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -type SnapshotExtensionMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` -} - -func (x *SnapshotExtensionMeta) Reset() { - *x = SnapshotExtensionMeta{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotExtensionMeta) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotExtensionMeta) ProtoMessage() {} - -// Deprecated: Use SnapshotExtensionMeta.ProtoReflect.Descriptor instead. -func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{5} -} - -func (x *SnapshotExtensionMeta) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SnapshotExtensionMeta) GetFormat() uint32 { - if x != nil { - return x.Format - } - return 0 -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -type SnapshotExtensionPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (x *SnapshotExtensionPayload) Reset() { - *x = SnapshotExtensionPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotExtensionPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotExtensionPayload) ProtoMessage() {} - -// Deprecated: Use SnapshotExtensionPayload.ProtoReflect.Descriptor instead. -func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{6} -} - -func (x *SnapshotExtensionPayload) GetPayload() []byte { - if x != nil { - return x.Payload - } - return nil -} - -// SnapshotKVItem is an exported Key/Value Pair -type SnapshotKVItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *SnapshotKVItem) Reset() { - *x = SnapshotKVItem{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotKVItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotKVItem) ProtoMessage() {} - -// Deprecated: Use SnapshotKVItem.ProtoReflect.Descriptor instead. -func (*SnapshotKVItem) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{7} -} - -func (x *SnapshotKVItem) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *SnapshotKVItem) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -// SnapshotSchema is an exported schema of smt store -type SnapshotSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keys [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *SnapshotSchema) Reset() { - *x = SnapshotSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SnapshotSchema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SnapshotSchema) ProtoMessage() {} - -// Deprecated: Use SnapshotSchema.ProtoReflect.Descriptor instead. -func (*SnapshotSchema) Descriptor() ([]byte, []int) { - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP(), []int{8} -} - -func (x *SnapshotSchema) GetKeys() [][]byte { - if x != nil { - return x.Keys - } - return nil -} - -var File_cosmos_base_snapshots_v1beta1_snapshot_proto protoreflect.FileDescriptor - -var file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x49, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 0x81, 0x04, 0x0a, 0x0c, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x69, 0x61, 0x76, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x41, 0x56, 0x4c, 0x49, 0x74, 0x65, 0x6d, - 0x42, 0x08, 0xe2, 0xde, 0x1f, 0x04, 0x49, 0x41, 0x56, 0x4c, 0x48, 0x00, 0x52, 0x04, 0x69, 0x61, - 0x76, 0x6c, 0x12, 0x54, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x09, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x10, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x47, 0x0a, 0x02, 0x6b, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4b, 0x56, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x06, 0xe2, 0xde, 0x1f, - 0x02, 0x4b, 0x56, 0x48, 0x00, 0x52, 0x02, 0x6b, 0x76, 0x12, 0x47, 0x0a, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x27, 0x0a, 0x11, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x6c, 0x0a, 0x10, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, - 0x41, 0x56, 0x4c, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x22, 0x43, 0x0a, 0x15, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x34, 0x0a, 0x18, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x38, 0x0a, 0x0e, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4b, 0x56, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x9a, 0x02, 0x0a, - 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x42, 0x0d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x53, 0xaa, 0x02, 0x1d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x29, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescOnce sync.Once - file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescData = file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDesc -) - -func file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescGZIP() []byte { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescOnce.Do(func() { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescData) - }) - return file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDescData -} - -var file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_cosmos_base_snapshots_v1beta1_snapshot_proto_goTypes = []interface{}{ - (*Snapshot)(nil), // 0: cosmos.base.snapshots.v1beta1.Snapshot - (*Metadata)(nil), // 1: cosmos.base.snapshots.v1beta1.Metadata - (*SnapshotItem)(nil), // 2: cosmos.base.snapshots.v1beta1.SnapshotItem - (*SnapshotStoreItem)(nil), // 3: cosmos.base.snapshots.v1beta1.SnapshotStoreItem - (*SnapshotIAVLItem)(nil), // 4: cosmos.base.snapshots.v1beta1.SnapshotIAVLItem - (*SnapshotExtensionMeta)(nil), // 5: cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta - (*SnapshotExtensionPayload)(nil), // 6: cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload - (*SnapshotKVItem)(nil), // 7: cosmos.base.snapshots.v1beta1.SnapshotKVItem - (*SnapshotSchema)(nil), // 8: cosmos.base.snapshots.v1beta1.SnapshotSchema -} -var file_cosmos_base_snapshots_v1beta1_snapshot_proto_depIdxs = []int32{ - 1, // 0: cosmos.base.snapshots.v1beta1.Snapshot.metadata:type_name -> cosmos.base.snapshots.v1beta1.Metadata - 3, // 1: cosmos.base.snapshots.v1beta1.SnapshotItem.store:type_name -> cosmos.base.snapshots.v1beta1.SnapshotStoreItem - 4, // 2: cosmos.base.snapshots.v1beta1.SnapshotItem.iavl:type_name -> cosmos.base.snapshots.v1beta1.SnapshotIAVLItem - 5, // 3: cosmos.base.snapshots.v1beta1.SnapshotItem.extension:type_name -> cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta - 6, // 4: cosmos.base.snapshots.v1beta1.SnapshotItem.extension_payload:type_name -> cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload - 7, // 5: cosmos.base.snapshots.v1beta1.SnapshotItem.kv:type_name -> cosmos.base.snapshots.v1beta1.SnapshotKVItem - 8, // 6: cosmos.base.snapshots.v1beta1.SnapshotItem.schema:type_name -> cosmos.base.snapshots.v1beta1.SnapshotSchema - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] 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 -} - -func init() { file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() } -func file_cosmos_base_snapshots_v1beta1_snapshot_proto_init() { - if File_cosmos_base_snapshots_v1beta1_snapshot_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotStoreItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotIAVLItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotExtensionMeta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotExtensionPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotKVItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SnapshotSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*SnapshotItem_Store)(nil), - (*SnapshotItem_Iavl)(nil), - (*SnapshotItem_Extension)(nil), - (*SnapshotItem_ExtensionPayload)(nil), - (*SnapshotItem_Kv)(nil), - (*SnapshotItem_Schema)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_snapshots_v1beta1_snapshot_proto_goTypes, - DependencyIndexes: file_cosmos_base_snapshots_v1beta1_snapshot_proto_depIdxs, - MessageInfos: file_cosmos_base_snapshots_v1beta1_snapshot_proto_msgTypes, - }.Build() - File_cosmos_base_snapshots_v1beta1_snapshot_proto = out.File - file_cosmos_base_snapshots_v1beta1_snapshot_proto_rawDesc = nil - file_cosmos_base_snapshots_v1beta1_snapshot_proto_goTypes = nil - file_cosmos_base_snapshots_v1beta1_snapshot_proto_depIdxs = nil -} diff --git a/api/cosmos/base/store/v1beta1/commit_info.pulsar.go b/api/cosmos/base/store/v1beta1/commit_info.pulsar.go deleted file mode 100644 index db9fe3973b12..000000000000 --- a/api/cosmos/base/store/v1beta1/commit_info.pulsar.go +++ /dev/null @@ -1,1810 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package storev1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_CommitInfo_2_list)(nil) - -type _CommitInfo_2_list struct { - list *[]*StoreInfo -} - -func (x *_CommitInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_CommitInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_CommitInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*StoreInfo) - (*x.list)[i] = concreteValue -} - -func (x *_CommitInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*StoreInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_CommitInfo_2_list) AppendMutable() protoreflect.Value { - v := new(StoreInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CommitInfo_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_CommitInfo_2_list) NewElement() protoreflect.Value { - v := new(StoreInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CommitInfo_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_CommitInfo protoreflect.MessageDescriptor - fd_CommitInfo_version protoreflect.FieldDescriptor - fd_CommitInfo_store_infos protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_store_v1beta1_commit_info_proto_init() - md_CommitInfo = File_cosmos_base_store_v1beta1_commit_info_proto.Messages().ByName("CommitInfo") - fd_CommitInfo_version = md_CommitInfo.Fields().ByName("version") - fd_CommitInfo_store_infos = md_CommitInfo.Fields().ByName("store_infos") -} - -var _ protoreflect.Message = (*fastReflection_CommitInfo)(nil) - -type fastReflection_CommitInfo CommitInfo - -func (x *CommitInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommitInfo)(x) -} - -func (x *CommitInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommitInfo_messageType fastReflection_CommitInfo_messageType -var _ protoreflect.MessageType = fastReflection_CommitInfo_messageType{} - -type fastReflection_CommitInfo_messageType struct{} - -func (x fastReflection_CommitInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommitInfo)(nil) -} -func (x fastReflection_CommitInfo_messageType) New() protoreflect.Message { - return new(fastReflection_CommitInfo) -} -func (x fastReflection_CommitInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommitInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommitInfo) Descriptor() protoreflect.MessageDescriptor { - return md_CommitInfo -} - -// 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_CommitInfo) Type() protoreflect.MessageType { - return _fastReflection_CommitInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommitInfo) New() protoreflect.Message { - return new(fastReflection_CommitInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommitInfo) Interface() protoreflect.ProtoMessage { - return (*CommitInfo)(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_CommitInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != int64(0) { - value := protoreflect.ValueOfInt64(x.Version) - if !f(fd_CommitInfo_version, value) { - return - } - } - if len(x.StoreInfos) != 0 { - value := protoreflect.ValueOfList(&_CommitInfo_2_list{list: &x.StoreInfos}) - if !f(fd_CommitInfo_store_infos, 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_CommitInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitInfo.version": - return x.Version != int64(0) - case "cosmos.base.store.v1beta1.CommitInfo.store_infos": - return len(x.StoreInfos) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitInfo 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_CommitInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitInfo.version": - x.Version = int64(0) - case "cosmos.base.store.v1beta1.CommitInfo.store_infos": - x.StoreInfos = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitInfo 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_CommitInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.store.v1beta1.CommitInfo.version": - value := x.Version - return protoreflect.ValueOfInt64(value) - case "cosmos.base.store.v1beta1.CommitInfo.store_infos": - if len(x.StoreInfos) == 0 { - return protoreflect.ValueOfList(&_CommitInfo_2_list{}) - } - listValue := &_CommitInfo_2_list{list: &x.StoreInfos} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitInfo 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_CommitInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitInfo.version": - x.Version = value.Int() - case "cosmos.base.store.v1beta1.CommitInfo.store_infos": - lv := value.List() - clv := lv.(*_CommitInfo_2_list) - x.StoreInfos = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitInfo 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_CommitInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitInfo.store_infos": - if x.StoreInfos == nil { - x.StoreInfos = []*StoreInfo{} - } - value := &_CommitInfo_2_list{list: &x.StoreInfos} - return protoreflect.ValueOfList(value) - case "cosmos.base.store.v1beta1.CommitInfo.version": - panic(fmt.Errorf("field version of message cosmos.base.store.v1beta1.CommitInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitInfo 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_CommitInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitInfo.version": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.store.v1beta1.CommitInfo.store_infos": - list := []*StoreInfo{} - return protoreflect.ValueOfList(&_CommitInfo_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitInfo 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_CommitInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.store.v1beta1.CommitInfo", 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_CommitInfo) 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_CommitInfo) 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_CommitInfo) 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_CommitInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommitInfo) - 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.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - if len(x.StoreInfos) > 0 { - for _, e := range x.StoreInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommitInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.StoreInfos) > 0 { - for iNdEx := len(x.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.StoreInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CommitInfo) - 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: CommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.StoreInfos = append(x.StoreInfos, &StoreInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StoreInfos[len(x.StoreInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_StoreInfo protoreflect.MessageDescriptor - fd_StoreInfo_name protoreflect.FieldDescriptor - fd_StoreInfo_commit_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_store_v1beta1_commit_info_proto_init() - md_StoreInfo = File_cosmos_base_store_v1beta1_commit_info_proto.Messages().ByName("StoreInfo") - fd_StoreInfo_name = md_StoreInfo.Fields().ByName("name") - fd_StoreInfo_commit_id = md_StoreInfo.Fields().ByName("commit_id") -} - -var _ protoreflect.Message = (*fastReflection_StoreInfo)(nil) - -type fastReflection_StoreInfo StoreInfo - -func (x *StoreInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_StoreInfo)(x) -} - -func (x *StoreInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StoreInfo_messageType fastReflection_StoreInfo_messageType -var _ protoreflect.MessageType = fastReflection_StoreInfo_messageType{} - -type fastReflection_StoreInfo_messageType struct{} - -func (x fastReflection_StoreInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_StoreInfo)(nil) -} -func (x fastReflection_StoreInfo_messageType) New() protoreflect.Message { - return new(fastReflection_StoreInfo) -} -func (x fastReflection_StoreInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StoreInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StoreInfo) Descriptor() protoreflect.MessageDescriptor { - return md_StoreInfo -} - -// 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_StoreInfo) Type() protoreflect.MessageType { - return _fastReflection_StoreInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StoreInfo) New() protoreflect.Message { - return new(fastReflection_StoreInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StoreInfo) Interface() protoreflect.ProtoMessage { - return (*StoreInfo)(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_StoreInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_StoreInfo_name, value) { - return - } - } - if x.CommitId != nil { - value := protoreflect.ValueOfMessage(x.CommitId.ProtoReflect()) - if !f(fd_StoreInfo_commit_id, 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_StoreInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreInfo.name": - return x.Name != "" - case "cosmos.base.store.v1beta1.StoreInfo.commit_id": - return x.CommitId != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreInfo 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_StoreInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreInfo.name": - x.Name = "" - case "cosmos.base.store.v1beta1.StoreInfo.commit_id": - x.CommitId = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreInfo 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_StoreInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.store.v1beta1.StoreInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.base.store.v1beta1.StoreInfo.commit_id": - value := x.CommitId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreInfo 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_StoreInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreInfo.name": - x.Name = value.Interface().(string) - case "cosmos.base.store.v1beta1.StoreInfo.commit_id": - x.CommitId = value.Message().Interface().(*CommitID) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreInfo 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_StoreInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreInfo.commit_id": - if x.CommitId == nil { - x.CommitId = new(CommitID) - } - return protoreflect.ValueOfMessage(x.CommitId.ProtoReflect()) - case "cosmos.base.store.v1beta1.StoreInfo.name": - panic(fmt.Errorf("field name of message cosmos.base.store.v1beta1.StoreInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreInfo 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_StoreInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreInfo.name": - return protoreflect.ValueOfString("") - case "cosmos.base.store.v1beta1.StoreInfo.commit_id": - m := new(CommitID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreInfo")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreInfo 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_StoreInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.store.v1beta1.StoreInfo", 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_StoreInfo) 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_StoreInfo) 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_StoreInfo) 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_StoreInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StoreInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CommitId != nil { - l = options.Size(x.CommitId) - 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().(*StoreInfo) - 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.CommitId != nil { - encoded, err := options.Marshal(x.CommitId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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 { - 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().(*StoreInfo) - 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: StoreInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreInfo: 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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitId", 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.CommitId == nil { - x.CommitId = &CommitID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CommitId); 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_CommitID protoreflect.MessageDescriptor - fd_CommitID_version protoreflect.FieldDescriptor - fd_CommitID_hash protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_store_v1beta1_commit_info_proto_init() - md_CommitID = File_cosmos_base_store_v1beta1_commit_info_proto.Messages().ByName("CommitID") - fd_CommitID_version = md_CommitID.Fields().ByName("version") - fd_CommitID_hash = md_CommitID.Fields().ByName("hash") -} - -var _ protoreflect.Message = (*fastReflection_CommitID)(nil) - -type fastReflection_CommitID CommitID - -func (x *CommitID) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommitID)(x) -} - -func (x *CommitID) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommitID_messageType fastReflection_CommitID_messageType -var _ protoreflect.MessageType = fastReflection_CommitID_messageType{} - -type fastReflection_CommitID_messageType struct{} - -func (x fastReflection_CommitID_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommitID)(nil) -} -func (x fastReflection_CommitID_messageType) New() protoreflect.Message { - return new(fastReflection_CommitID) -} -func (x fastReflection_CommitID_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommitID -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommitID) Descriptor() protoreflect.MessageDescriptor { - return md_CommitID -} - -// 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_CommitID) Type() protoreflect.MessageType { - return _fastReflection_CommitID_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommitID) New() protoreflect.Message { - return new(fastReflection_CommitID) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommitID) Interface() protoreflect.ProtoMessage { - return (*CommitID)(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_CommitID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != int64(0) { - value := protoreflect.ValueOfInt64(x.Version) - if !f(fd_CommitID_version, value) { - return - } - } - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_CommitID_hash, 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_CommitID) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitID.version": - return x.Version != int64(0) - case "cosmos.base.store.v1beta1.CommitID.hash": - return len(x.Hash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitID")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitID 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_CommitID) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitID.version": - x.Version = int64(0) - case "cosmos.base.store.v1beta1.CommitID.hash": - x.Hash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitID")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitID 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_CommitID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.store.v1beta1.CommitID.version": - value := x.Version - return protoreflect.ValueOfInt64(value) - case "cosmos.base.store.v1beta1.CommitID.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitID")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitID 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_CommitID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitID.version": - x.Version = value.Int() - case "cosmos.base.store.v1beta1.CommitID.hash": - x.Hash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitID")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitID 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_CommitID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitID.version": - panic(fmt.Errorf("field version of message cosmos.base.store.v1beta1.CommitID is not mutable")) - case "cosmos.base.store.v1beta1.CommitID.hash": - panic(fmt.Errorf("field hash of message cosmos.base.store.v1beta1.CommitID is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitID")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitID 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_CommitID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.CommitID.version": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.store.v1beta1.CommitID.hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.CommitID")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.CommitID 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_CommitID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.store.v1beta1.CommitID", 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_CommitID) 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_CommitID) 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_CommitID) 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_CommitID) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommitID) - 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.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommitID) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0x12 - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CommitID) - 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: CommitID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/store/v1beta1/commit_info.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -type CommitInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - StoreInfos []*StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos,omitempty"` -} - -func (x *CommitInfo) Reset() { - *x = CommitInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommitInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommitInfo) ProtoMessage() {} - -// Deprecated: Use CommitInfo.ProtoReflect.Descriptor instead. -func (*CommitInfo) Descriptor() ([]byte, []int) { - return file_cosmos_base_store_v1beta1_commit_info_proto_rawDescGZIP(), []int{0} -} - -func (x *CommitInfo) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *CommitInfo) GetStoreInfos() []*StoreInfo { - if x != nil { - return x.StoreInfos - } - return nil -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -type StoreInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - CommitId *CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` -} - -func (x *StoreInfo) Reset() { - *x = StoreInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StoreInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreInfo) ProtoMessage() {} - -// Deprecated: Use StoreInfo.ProtoReflect.Descriptor instead. -func (*StoreInfo) Descriptor() ([]byte, []int) { - return file_cosmos_base_store_v1beta1_commit_info_proto_rawDescGZIP(), []int{1} -} - -func (x *StoreInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *StoreInfo) GetCommitId() *CommitID { - if x != nil { - return x.CommitId - } - return nil -} - -// CommitID defines the committment information when a specific store is -// committed. -type CommitID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (x *CommitID) Reset() { - *x = CommitID{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommitID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommitID) ProtoMessage() {} - -// Deprecated: Use CommitID.ProtoReflect.Descriptor instead. -func (*CommitID) Descriptor() ([]byte, []int) { - return file_cosmos_base_store_v1beta1_commit_info_proto_rawDescGZIP(), []int{2} -} - -func (x *CommitID) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *CommitID) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -var File_cosmos_base_store_v1beta1_commit_info_proto protoreflect.FileDescriptor - -var file_cosmos_base_store_v1beta1_commit_info_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, - 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x22, 0x67, 0x0a, 0x09, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x44, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x08, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0x80, 0x02, 0x0a, - 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x53, - 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x19, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, - 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_store_v1beta1_commit_info_proto_rawDescOnce sync.Once - file_cosmos_base_store_v1beta1_commit_info_proto_rawDescData = file_cosmos_base_store_v1beta1_commit_info_proto_rawDesc -) - -func file_cosmos_base_store_v1beta1_commit_info_proto_rawDescGZIP() []byte { - file_cosmos_base_store_v1beta1_commit_info_proto_rawDescOnce.Do(func() { - file_cosmos_base_store_v1beta1_commit_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_store_v1beta1_commit_info_proto_rawDescData) - }) - return file_cosmos_base_store_v1beta1_commit_info_proto_rawDescData -} - -var file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_base_store_v1beta1_commit_info_proto_goTypes = []interface{}{ - (*CommitInfo)(nil), // 0: cosmos.base.store.v1beta1.CommitInfo - (*StoreInfo)(nil), // 1: cosmos.base.store.v1beta1.StoreInfo - (*CommitID)(nil), // 2: cosmos.base.store.v1beta1.CommitID -} -var file_cosmos_base_store_v1beta1_commit_info_proto_depIdxs = []int32{ - 1, // 0: cosmos.base.store.v1beta1.CommitInfo.store_infos:type_name -> cosmos.base.store.v1beta1.StoreInfo - 2, // 1: cosmos.base.store.v1beta1.StoreInfo.commit_id:type_name -> cosmos.base.store.v1beta1.CommitID - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_base_store_v1beta1_commit_info_proto_init() } -func file_cosmos_base_store_v1beta1_commit_info_proto_init() { - if File_cosmos_base_store_v1beta1_commit_info_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StoreInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_store_v1beta1_commit_info_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_store_v1beta1_commit_info_proto_goTypes, - DependencyIndexes: file_cosmos_base_store_v1beta1_commit_info_proto_depIdxs, - MessageInfos: file_cosmos_base_store_v1beta1_commit_info_proto_msgTypes, - }.Build() - File_cosmos_base_store_v1beta1_commit_info_proto = out.File - file_cosmos_base_store_v1beta1_commit_info_proto_rawDesc = nil - file_cosmos_base_store_v1beta1_commit_info_proto_goTypes = nil - file_cosmos_base_store_v1beta1_commit_info_proto_depIdxs = nil -} diff --git a/api/cosmos/base/store/v1beta1/listening.pulsar.go b/api/cosmos/base/store/v1beta1/listening.pulsar.go deleted file mode 100644 index aa56031d245c..000000000000 --- a/api/cosmos/base/store/v1beta1/listening.pulsar.go +++ /dev/null @@ -1,792 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package storev1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_StoreKVPair protoreflect.MessageDescriptor - fd_StoreKVPair_store_key protoreflect.FieldDescriptor - fd_StoreKVPair_delete protoreflect.FieldDescriptor - fd_StoreKVPair_key protoreflect.FieldDescriptor - fd_StoreKVPair_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_store_v1beta1_listening_proto_init() - md_StoreKVPair = File_cosmos_base_store_v1beta1_listening_proto.Messages().ByName("StoreKVPair") - fd_StoreKVPair_store_key = md_StoreKVPair.Fields().ByName("store_key") - fd_StoreKVPair_delete = md_StoreKVPair.Fields().ByName("delete") - fd_StoreKVPair_key = md_StoreKVPair.Fields().ByName("key") - fd_StoreKVPair_value = md_StoreKVPair.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_StoreKVPair)(nil) - -type fastReflection_StoreKVPair StoreKVPair - -func (x *StoreKVPair) ProtoReflect() protoreflect.Message { - return (*fastReflection_StoreKVPair)(x) -} - -func (x *StoreKVPair) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_store_v1beta1_listening_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StoreKVPair_messageType fastReflection_StoreKVPair_messageType -var _ protoreflect.MessageType = fastReflection_StoreKVPair_messageType{} - -type fastReflection_StoreKVPair_messageType struct{} - -func (x fastReflection_StoreKVPair_messageType) Zero() protoreflect.Message { - return (*fastReflection_StoreKVPair)(nil) -} -func (x fastReflection_StoreKVPair_messageType) New() protoreflect.Message { - return new(fastReflection_StoreKVPair) -} -func (x fastReflection_StoreKVPair_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StoreKVPair -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StoreKVPair) Descriptor() protoreflect.MessageDescriptor { - return md_StoreKVPair -} - -// 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_StoreKVPair) Type() protoreflect.MessageType { - return _fastReflection_StoreKVPair_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StoreKVPair) New() protoreflect.Message { - return new(fastReflection_StoreKVPair) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StoreKVPair) Interface() protoreflect.ProtoMessage { - return (*StoreKVPair)(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_StoreKVPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.StoreKey != "" { - value := protoreflect.ValueOfString(x.StoreKey) - if !f(fd_StoreKVPair_store_key, value) { - return - } - } - if x.Delete != false { - value := protoreflect.ValueOfBool(x.Delete) - if !f(fd_StoreKVPair_delete, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_StoreKVPair_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_StoreKVPair_value, 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_StoreKVPair) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreKVPair.store_key": - return x.StoreKey != "" - case "cosmos.base.store.v1beta1.StoreKVPair.delete": - return x.Delete != false - case "cosmos.base.store.v1beta1.StoreKVPair.key": - return len(x.Key) != 0 - case "cosmos.base.store.v1beta1.StoreKVPair.value": - return len(x.Value) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreKVPair 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_StoreKVPair) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreKVPair.store_key": - x.StoreKey = "" - case "cosmos.base.store.v1beta1.StoreKVPair.delete": - x.Delete = false - case "cosmos.base.store.v1beta1.StoreKVPair.key": - x.Key = nil - case "cosmos.base.store.v1beta1.StoreKVPair.value": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreKVPair 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_StoreKVPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.store.v1beta1.StoreKVPair.store_key": - value := x.StoreKey - return protoreflect.ValueOfString(value) - case "cosmos.base.store.v1beta1.StoreKVPair.delete": - value := x.Delete - return protoreflect.ValueOfBool(value) - case "cosmos.base.store.v1beta1.StoreKVPair.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.store.v1beta1.StoreKVPair.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreKVPair 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_StoreKVPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreKVPair.store_key": - x.StoreKey = value.Interface().(string) - case "cosmos.base.store.v1beta1.StoreKVPair.delete": - x.Delete = value.Bool() - case "cosmos.base.store.v1beta1.StoreKVPair.key": - x.Key = value.Bytes() - case "cosmos.base.store.v1beta1.StoreKVPair.value": - x.Value = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreKVPair 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_StoreKVPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreKVPair.store_key": - panic(fmt.Errorf("field store_key of message cosmos.base.store.v1beta1.StoreKVPair is not mutable")) - case "cosmos.base.store.v1beta1.StoreKVPair.delete": - panic(fmt.Errorf("field delete of message cosmos.base.store.v1beta1.StoreKVPair is not mutable")) - case "cosmos.base.store.v1beta1.StoreKVPair.key": - panic(fmt.Errorf("field key of message cosmos.base.store.v1beta1.StoreKVPair is not mutable")) - case "cosmos.base.store.v1beta1.StoreKVPair.value": - panic(fmt.Errorf("field value of message cosmos.base.store.v1beta1.StoreKVPair is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreKVPair 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_StoreKVPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.store.v1beta1.StoreKVPair.store_key": - return protoreflect.ValueOfString("") - case "cosmos.base.store.v1beta1.StoreKVPair.delete": - return protoreflect.ValueOfBool(false) - case "cosmos.base.store.v1beta1.StoreKVPair.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.store.v1beta1.StoreKVPair.value": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.store.v1beta1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.base.store.v1beta1.StoreKVPair 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_StoreKVPair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.store.v1beta1.StoreKVPair", 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_StoreKVPair) 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_StoreKVPair) 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_StoreKVPair) 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_StoreKVPair) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StoreKVPair) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.StoreKey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Delete { - n += 2 - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*StoreKVPair) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x22 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x1a - } - if x.Delete { - i-- - if x.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.StoreKey) > 0 { - i -= len(x.StoreKey) - copy(dAtA[i:], x.StoreKey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StoreKey))) - 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().(*StoreKVPair) - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreKVPair: 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 StoreKey", 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.StoreKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Delete = bool(v != 0) - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/store/v1beta1/listening.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) -// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and -// Deletes -// -// Since: cosmos-sdk 0.43 -type StoreKVPair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` // the store key for the KVStore this pair originates from - Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` // true indicates a delete operation, false indicates a set operation - Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *StoreKVPair) Reset() { - *x = StoreKVPair{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_store_v1beta1_listening_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StoreKVPair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreKVPair) ProtoMessage() {} - -// Deprecated: Use StoreKVPair.ProtoReflect.Descriptor instead. -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return file_cosmos_base_store_v1beta1_listening_proto_rawDescGZIP(), []int{0} -} - -func (x *StoreKVPair) GetStoreKey() string { - if x != nil { - return x.StoreKey - } - return "" -} - -func (x *StoreKVPair) GetDelete() bool { - if x != nil { - return x.Delete - } - return false -} - -func (x *StoreKVPair) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *StoreKVPair) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -var File_cosmos_base_store_v1beta1_listening_proto protoreflect.FileDescriptor - -var file_cosmos_base_store_v1beta1_listening_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x6a, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, - 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0xff, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x42, 0x53, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, - 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x25, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x53, 0x74, 0x6f, 0x72, - 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_store_v1beta1_listening_proto_rawDescOnce sync.Once - file_cosmos_base_store_v1beta1_listening_proto_rawDescData = file_cosmos_base_store_v1beta1_listening_proto_rawDesc -) - -func file_cosmos_base_store_v1beta1_listening_proto_rawDescGZIP() []byte { - file_cosmos_base_store_v1beta1_listening_proto_rawDescOnce.Do(func() { - file_cosmos_base_store_v1beta1_listening_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_store_v1beta1_listening_proto_rawDescData) - }) - return file_cosmos_base_store_v1beta1_listening_proto_rawDescData -} - -var file_cosmos_base_store_v1beta1_listening_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_base_store_v1beta1_listening_proto_goTypes = []interface{}{ - (*StoreKVPair)(nil), // 0: cosmos.base.store.v1beta1.StoreKVPair -} -var file_cosmos_base_store_v1beta1_listening_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_base_store_v1beta1_listening_proto_init() } -func file_cosmos_base_store_v1beta1_listening_proto_init() { - if File_cosmos_base_store_v1beta1_listening_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_store_v1beta1_listening_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StoreKVPair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_store_v1beta1_listening_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_store_v1beta1_listening_proto_goTypes, - DependencyIndexes: file_cosmos_base_store_v1beta1_listening_proto_depIdxs, - MessageInfos: file_cosmos_base_store_v1beta1_listening_proto_msgTypes, - }.Build() - File_cosmos_base_store_v1beta1_listening_proto = out.File - file_cosmos_base_store_v1beta1_listening_proto_rawDesc = nil - file_cosmos_base_store_v1beta1_listening_proto_goTypes = nil - file_cosmos_base_store_v1beta1_listening_proto_depIdxs = nil -} diff --git a/api/cosmos/base/tendermint/v1beta1/query.pulsar.go b/api/cosmos/base/tendermint/v1beta1/query.pulsar.go deleted file mode 100644 index fd2365089e9a..000000000000 --- a/api/cosmos/base/tendermint/v1beta1/query.pulsar.go +++ /dev/null @@ -1,11784 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package tendermintv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - p2p "github.com/cosmos/cosmos-sdk/api/tendermint/p2p" - types "github.com/cosmos/cosmos-sdk/api/tendermint/types" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GetValidatorSetByHeightRequest protoreflect.MessageDescriptor - fd_GetValidatorSetByHeightRequest_height protoreflect.FieldDescriptor - fd_GetValidatorSetByHeightRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetValidatorSetByHeightRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetValidatorSetByHeightRequest") - fd_GetValidatorSetByHeightRequest_height = md_GetValidatorSetByHeightRequest.Fields().ByName("height") - fd_GetValidatorSetByHeightRequest_pagination = md_GetValidatorSetByHeightRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetValidatorSetByHeightRequest)(nil) - -type fastReflection_GetValidatorSetByHeightRequest GetValidatorSetByHeightRequest - -func (x *GetValidatorSetByHeightRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightRequest)(x) -} - -func (x *GetValidatorSetByHeightRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetValidatorSetByHeightRequest_messageType fastReflection_GetValidatorSetByHeightRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetValidatorSetByHeightRequest_messageType{} - -type fastReflection_GetValidatorSetByHeightRequest_messageType struct{} - -func (x fastReflection_GetValidatorSetByHeightRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightRequest)(nil) -} -func (x fastReflection_GetValidatorSetByHeightRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightRequest) -} -func (x fastReflection_GetValidatorSetByHeightRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetValidatorSetByHeightRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightRequest -} - -// 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_GetValidatorSetByHeightRequest) Type() protoreflect.MessageType { - return _fastReflection_GetValidatorSetByHeightRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetValidatorSetByHeightRequest) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetValidatorSetByHeightRequest) Interface() protoreflect.ProtoMessage { - return (*GetValidatorSetByHeightRequest)(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_GetValidatorSetByHeightRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_GetValidatorSetByHeightRequest_height, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetValidatorSetByHeightRequest_pagination, 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_GetValidatorSetByHeightRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - return x.Height != int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest 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_GetValidatorSetByHeightRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - x.Height = int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest 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_GetValidatorSetByHeightRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest 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_GetValidatorSetByHeightRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - x.Height = value.Int() - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest 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_GetValidatorSetByHeightRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest 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_GetValidatorSetByHeightRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest 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_GetValidatorSetByHeightRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", 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_GetValidatorSetByHeightRequest) 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_GetValidatorSetByHeightRequest) 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_GetValidatorSetByHeightRequest) 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_GetValidatorSetByHeightRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetValidatorSetByHeightRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetValidatorSetByHeightRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetValidatorSetByHeightRequest) - 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: GetValidatorSetByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetValidatorSetByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GetValidatorSetByHeightResponse_2_list)(nil) - -type _GetValidatorSetByHeightResponse_2_list struct { - list *[]*Validator -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetValidatorSetByHeightResponse_2_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetValidatorSetByHeightResponse protoreflect.MessageDescriptor - fd_GetValidatorSetByHeightResponse_block_height protoreflect.FieldDescriptor - fd_GetValidatorSetByHeightResponse_validators protoreflect.FieldDescriptor - fd_GetValidatorSetByHeightResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetValidatorSetByHeightResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetValidatorSetByHeightResponse") - fd_GetValidatorSetByHeightResponse_block_height = md_GetValidatorSetByHeightResponse.Fields().ByName("block_height") - fd_GetValidatorSetByHeightResponse_validators = md_GetValidatorSetByHeightResponse.Fields().ByName("validators") - fd_GetValidatorSetByHeightResponse_pagination = md_GetValidatorSetByHeightResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetValidatorSetByHeightResponse)(nil) - -type fastReflection_GetValidatorSetByHeightResponse GetValidatorSetByHeightResponse - -func (x *GetValidatorSetByHeightResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightResponse)(x) -} - -func (x *GetValidatorSetByHeightResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetValidatorSetByHeightResponse_messageType fastReflection_GetValidatorSetByHeightResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetValidatorSetByHeightResponse_messageType{} - -type fastReflection_GetValidatorSetByHeightResponse_messageType struct{} - -func (x fastReflection_GetValidatorSetByHeightResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightResponse)(nil) -} -func (x fastReflection_GetValidatorSetByHeightResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightResponse) -} -func (x fastReflection_GetValidatorSetByHeightResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetValidatorSetByHeightResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightResponse -} - -// 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_GetValidatorSetByHeightResponse) Type() protoreflect.MessageType { - return _fastReflection_GetValidatorSetByHeightResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetValidatorSetByHeightResponse) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetValidatorSetByHeightResponse) Interface() protoreflect.ProtoMessage { - return (*GetValidatorSetByHeightResponse)(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_GetValidatorSetByHeightResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockHeight) - if !f(fd_GetValidatorSetByHeightResponse_block_height, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_GetValidatorSetByHeightResponse_2_list{list: &x.Validators}) - if !f(fd_GetValidatorSetByHeightResponse_validators, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetValidatorSetByHeightResponse_pagination, 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_GetValidatorSetByHeightResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - return x.BlockHeight != int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - return len(x.Validators) != 0 - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse 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_GetValidatorSetByHeightResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - x.BlockHeight = int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - x.Validators = nil - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse 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_GetValidatorSetByHeightResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - value := x.BlockHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_GetValidatorSetByHeightResponse_2_list{}) - } - listValue := &_GetValidatorSetByHeightResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse 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_GetValidatorSetByHeightResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - x.BlockHeight = value.Int() - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - lv := value.List() - clv := lv.(*_GetValidatorSetByHeightResponse_2_list) - x.Validators = *clv.list - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse 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_GetValidatorSetByHeightResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_GetValidatorSetByHeightResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - panic(fmt.Errorf("field block_height of message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse 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_GetValidatorSetByHeightResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_GetValidatorSetByHeightResponse_2_list{list: &list}) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse 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_GetValidatorSetByHeightResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", 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_GetValidatorSetByHeightResponse) 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_GetValidatorSetByHeightResponse) 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_GetValidatorSetByHeightResponse) 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_GetValidatorSetByHeightResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetValidatorSetByHeightResponse) - 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.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetValidatorSetByHeightResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetValidatorSetByHeightResponse) - 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: GetValidatorSetByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetValidatorSetByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - x.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_GetLatestValidatorSetRequest protoreflect.MessageDescriptor - fd_GetLatestValidatorSetRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestValidatorSetRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestValidatorSetRequest") - fd_GetLatestValidatorSetRequest_pagination = md_GetLatestValidatorSetRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestValidatorSetRequest)(nil) - -type fastReflection_GetLatestValidatorSetRequest GetLatestValidatorSetRequest - -func (x *GetLatestValidatorSetRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetRequest)(x) -} - -func (x *GetLatestValidatorSetRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestValidatorSetRequest_messageType fastReflection_GetLatestValidatorSetRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestValidatorSetRequest_messageType{} - -type fastReflection_GetLatestValidatorSetRequest_messageType struct{} - -func (x fastReflection_GetLatestValidatorSetRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetRequest)(nil) -} -func (x fastReflection_GetLatestValidatorSetRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetRequest) -} -func (x fastReflection_GetLatestValidatorSetRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestValidatorSetRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetRequest -} - -// 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_GetLatestValidatorSetRequest) Type() protoreflect.MessageType { - return _fastReflection_GetLatestValidatorSetRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestValidatorSetRequest) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestValidatorSetRequest) Interface() protoreflect.ProtoMessage { - return (*GetLatestValidatorSetRequest)(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_GetLatestValidatorSetRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetLatestValidatorSetRequest_pagination, 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_GetLatestValidatorSetRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest 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_GetLatestValidatorSetRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest 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_GetLatestValidatorSetRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest 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_GetLatestValidatorSetRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest 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_GetLatestValidatorSetRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest 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_GetLatestValidatorSetRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest 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_GetLatestValidatorSetRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest", 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_GetLatestValidatorSetRequest) 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_GetLatestValidatorSetRequest) 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_GetLatestValidatorSetRequest) 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_GetLatestValidatorSetRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestValidatorSetRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetLatestValidatorSetRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*GetLatestValidatorSetRequest) - 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: GetLatestValidatorSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestValidatorSetRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GetLatestValidatorSetResponse_2_list)(nil) - -type _GetLatestValidatorSetResponse_2_list struct { - list *[]*Validator -} - -func (x *_GetLatestValidatorSetResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetLatestValidatorSetResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetLatestValidatorSetResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_GetLatestValidatorSetResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetLatestValidatorSetResponse_2_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetLatestValidatorSetResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetLatestValidatorSetResponse_2_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetLatestValidatorSetResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetLatestValidatorSetResponse protoreflect.MessageDescriptor - fd_GetLatestValidatorSetResponse_block_height protoreflect.FieldDescriptor - fd_GetLatestValidatorSetResponse_validators protoreflect.FieldDescriptor - fd_GetLatestValidatorSetResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestValidatorSetResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestValidatorSetResponse") - fd_GetLatestValidatorSetResponse_block_height = md_GetLatestValidatorSetResponse.Fields().ByName("block_height") - fd_GetLatestValidatorSetResponse_validators = md_GetLatestValidatorSetResponse.Fields().ByName("validators") - fd_GetLatestValidatorSetResponse_pagination = md_GetLatestValidatorSetResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestValidatorSetResponse)(nil) - -type fastReflection_GetLatestValidatorSetResponse GetLatestValidatorSetResponse - -func (x *GetLatestValidatorSetResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetResponse)(x) -} - -func (x *GetLatestValidatorSetResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestValidatorSetResponse_messageType fastReflection_GetLatestValidatorSetResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestValidatorSetResponse_messageType{} - -type fastReflection_GetLatestValidatorSetResponse_messageType struct{} - -func (x fastReflection_GetLatestValidatorSetResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetResponse)(nil) -} -func (x fastReflection_GetLatestValidatorSetResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetResponse) -} -func (x fastReflection_GetLatestValidatorSetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestValidatorSetResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetResponse -} - -// 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_GetLatestValidatorSetResponse) Type() protoreflect.MessageType { - return _fastReflection_GetLatestValidatorSetResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestValidatorSetResponse) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestValidatorSetResponse) Interface() protoreflect.ProtoMessage { - return (*GetLatestValidatorSetResponse)(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_GetLatestValidatorSetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockHeight) - if !f(fd_GetLatestValidatorSetResponse_block_height, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_GetLatestValidatorSetResponse_2_list{list: &x.Validators}) - if !f(fd_GetLatestValidatorSetResponse_validators, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetLatestValidatorSetResponse_pagination, 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_GetLatestValidatorSetResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - return x.BlockHeight != int64(0) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - return len(x.Validators) != 0 - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse 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_GetLatestValidatorSetResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - x.BlockHeight = int64(0) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - x.Validators = nil - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse 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_GetLatestValidatorSetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - value := x.BlockHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_GetLatestValidatorSetResponse_2_list{}) - } - listValue := &_GetLatestValidatorSetResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse 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_GetLatestValidatorSetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - x.BlockHeight = value.Int() - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - lv := value.List() - clv := lv.(*_GetLatestValidatorSetResponse_2_list) - x.Validators = *clv.list - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse 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_GetLatestValidatorSetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_GetLatestValidatorSetResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - panic(fmt.Errorf("field block_height of message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse 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_GetLatestValidatorSetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_GetLatestValidatorSetResponse_2_list{list: &list}) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse 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_GetLatestValidatorSetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", 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_GetLatestValidatorSetResponse) 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_GetLatestValidatorSetResponse) 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_GetLatestValidatorSetResponse) 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_GetLatestValidatorSetResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestValidatorSetResponse) - 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.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetLatestValidatorSetResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetLatestValidatorSetResponse) - 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: GetLatestValidatorSetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestValidatorSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - x.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_Validator protoreflect.MessageDescriptor - fd_Validator_address protoreflect.FieldDescriptor - fd_Validator_pub_key protoreflect.FieldDescriptor - fd_Validator_voting_power protoreflect.FieldDescriptor - fd_Validator_proposer_priority protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_Validator = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("Validator") - fd_Validator_address = md_Validator.Fields().ByName("address") - fd_Validator_pub_key = md_Validator.Fields().ByName("pub_key") - fd_Validator_voting_power = md_Validator.Fields().ByName("voting_power") - fd_Validator_proposer_priority = md_Validator.Fields().ByName("proposer_priority") -} - -var _ protoreflect.Message = (*fastReflection_Validator)(nil) - -type fastReflection_Validator Validator - -func (x *Validator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Validator)(x) -} - -func (x *Validator) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Validator_messageType fastReflection_Validator_messageType -var _ protoreflect.MessageType = fastReflection_Validator_messageType{} - -type fastReflection_Validator_messageType struct{} - -func (x fastReflection_Validator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Validator)(nil) -} -func (x fastReflection_Validator_messageType) New() protoreflect.Message { - return new(fastReflection_Validator) -} -func (x fastReflection_Validator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Validator) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// 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_Validator) Type() protoreflect.MessageType { - return _fastReflection_Validator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Validator) New() protoreflect.Message { - return new(fastReflection_Validator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Validator) Interface() protoreflect.ProtoMessage { - return (*Validator)(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_Validator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Validator_address, value) { - return - } - } - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_Validator_pub_key, value) { - return - } - } - if x.VotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.VotingPower) - if !f(fd_Validator_voting_power, value) { - return - } - } - if x.ProposerPriority != int64(0) { - value := protoreflect.ValueOfInt64(x.ProposerPriority) - if !f(fd_Validator_proposer_priority, 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_Validator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - return x.Address != "" - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - return x.PubKey != nil - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - return x.VotingPower != int64(0) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - return x.ProposerPriority != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator 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_Validator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - x.Address = "" - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - x.PubKey = nil - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - x.VotingPower = int64(0) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - x.ProposerPriority = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator 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_Validator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - value := x.VotingPower - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - value := x.ProposerPriority - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator 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_Validator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - x.Address = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - x.PubKey = value.Message().Interface().(*anypb.Any) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - x.VotingPower = value.Int() - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - x.ProposerPriority = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator 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_Validator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - if x.PubKey == nil { - x.PubKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.Validator.address": - panic(fmt.Errorf("field address of message cosmos.base.tendermint.v1beta1.Validator is not mutable")) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - panic(fmt.Errorf("field voting_power of message cosmos.base.tendermint.v1beta1.Validator is not mutable")) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - panic(fmt.Errorf("field proposer_priority of message cosmos.base.tendermint.v1beta1.Validator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator 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_Validator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator 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_Validator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.Validator", 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_Validator) 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_Validator) 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_Validator) 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_Validator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.VotingPower)) - } - if x.ProposerPriority != 0 { - n += 1 + runtime.Sov(uint64(x.ProposerPriority)) - } - 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().(*Validator) - 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.ProposerPriority != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposerPriority)) - i-- - dAtA[i] = 0x20 - } - if x.VotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.VotingPower)) - i-- - dAtA[i] = 0x18 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Validator) - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PubKey", 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.PubKey == nil { - x.PubKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - x.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerPriority", wireType) - } - x.ProposerPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposerPriority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetBlockByHeightRequest protoreflect.MessageDescriptor - fd_GetBlockByHeightRequest_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetBlockByHeightRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetBlockByHeightRequest") - fd_GetBlockByHeightRequest_height = md_GetBlockByHeightRequest.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_GetBlockByHeightRequest)(nil) - -type fastReflection_GetBlockByHeightRequest GetBlockByHeightRequest - -func (x *GetBlockByHeightRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetBlockByHeightRequest)(x) -} - -func (x *GetBlockByHeightRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_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_GetBlockByHeightRequest_messageType fastReflection_GetBlockByHeightRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetBlockByHeightRequest_messageType{} - -type fastReflection_GetBlockByHeightRequest_messageType struct{} - -func (x fastReflection_GetBlockByHeightRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetBlockByHeightRequest)(nil) -} -func (x fastReflection_GetBlockByHeightRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightRequest) -} -func (x fastReflection_GetBlockByHeightRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetBlockByHeightRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightRequest -} - -// 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_GetBlockByHeightRequest) Type() protoreflect.MessageType { - return _fastReflection_GetBlockByHeightRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetBlockByHeightRequest) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetBlockByHeightRequest) Interface() protoreflect.ProtoMessage { - return (*GetBlockByHeightRequest)(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_GetBlockByHeightRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_GetBlockByHeightRequest_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetBlockByHeightRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - return x.Height != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest 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_GetBlockByHeightRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - x.Height = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest 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_GetBlockByHeightRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest 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_GetBlockByHeightRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - x.Height = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest 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_GetBlockByHeightRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest 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_GetBlockByHeightRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest 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_GetBlockByHeightRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest", 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_GetBlockByHeightRequest) 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_GetBlockByHeightRequest) 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_GetBlockByHeightRequest) 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_GetBlockByHeightRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetBlockByHeightRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if 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().(*GetBlockByHeightRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetBlockByHeightRequest) - 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: GetBlockByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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_GetBlockByHeightResponse protoreflect.MessageDescriptor - fd_GetBlockByHeightResponse_block_id protoreflect.FieldDescriptor - fd_GetBlockByHeightResponse_block protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetBlockByHeightResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetBlockByHeightResponse") - fd_GetBlockByHeightResponse_block_id = md_GetBlockByHeightResponse.Fields().ByName("block_id") - fd_GetBlockByHeightResponse_block = md_GetBlockByHeightResponse.Fields().ByName("block") -} - -var _ protoreflect.Message = (*fastReflection_GetBlockByHeightResponse)(nil) - -type fastReflection_GetBlockByHeightResponse GetBlockByHeightResponse - -func (x *GetBlockByHeightResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetBlockByHeightResponse)(x) -} - -func (x *GetBlockByHeightResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_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_GetBlockByHeightResponse_messageType fastReflection_GetBlockByHeightResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetBlockByHeightResponse_messageType{} - -type fastReflection_GetBlockByHeightResponse_messageType struct{} - -func (x fastReflection_GetBlockByHeightResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetBlockByHeightResponse)(nil) -} -func (x fastReflection_GetBlockByHeightResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightResponse) -} -func (x fastReflection_GetBlockByHeightResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetBlockByHeightResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightResponse -} - -// 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_GetBlockByHeightResponse) Type() protoreflect.MessageType { - return _fastReflection_GetBlockByHeightResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetBlockByHeightResponse) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetBlockByHeightResponse) Interface() protoreflect.ProtoMessage { - return (*GetBlockByHeightResponse)(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_GetBlockByHeightResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_GetBlockByHeightResponse_block_id, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_GetBlockByHeightResponse_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetBlockByHeightResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - return x.BlockId != nil - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - return x.Block != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse 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_GetBlockByHeightResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - x.BlockId = nil - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - x.Block = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse 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_GetBlockByHeightResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse 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_GetBlockByHeightResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - x.BlockId = value.Message().Interface().(*types.BlockID) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - x.Block = value.Message().Interface().(*types.Block) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse 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_GetBlockByHeightResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - if x.BlockId == nil { - x.BlockId = new(types.BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - if x.Block == nil { - x.Block = new(types.Block) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse 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_GetBlockByHeightResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - m := new(types.BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - m := new(types.Block) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse 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_GetBlockByHeightResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse", 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_GetBlockByHeightResponse) 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_GetBlockByHeightResponse) 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_GetBlockByHeightResponse) 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_GetBlockByHeightResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetBlockByHeightResponse) - 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.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - 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().(*GetBlockByHeightResponse) - 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.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - 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().(*GetBlockByHeightResponse) - 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: GetBlockByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockByHeightResponse: 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 BlockId", 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.BlockId == nil { - x.BlockId = &types.BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", 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.Block == nil { - x.Block = &types.Block{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); 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_GetLatestBlockRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestBlockRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestBlockRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestBlockRequest)(nil) - -type fastReflection_GetLatestBlockRequest GetLatestBlockRequest - -func (x *GetLatestBlockRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestBlockRequest)(x) -} - -func (x *GetLatestBlockRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestBlockRequest_messageType fastReflection_GetLatestBlockRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestBlockRequest_messageType{} - -type fastReflection_GetLatestBlockRequest_messageType struct{} - -func (x fastReflection_GetLatestBlockRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestBlockRequest)(nil) -} -func (x fastReflection_GetLatestBlockRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockRequest) -} -func (x fastReflection_GetLatestBlockRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestBlockRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockRequest -} - -// 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_GetLatestBlockRequest) Type() protoreflect.MessageType { - return _fastReflection_GetLatestBlockRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestBlockRequest) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestBlockRequest) Interface() protoreflect.ProtoMessage { - return (*GetLatestBlockRequest)(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_GetLatestBlockRequest) 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_GetLatestBlockRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest 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_GetLatestBlockRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest 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_GetLatestBlockRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest 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_GetLatestBlockRequest) 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.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest 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_GetLatestBlockRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest 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_GetLatestBlockRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest 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_GetLatestBlockRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestBlockRequest", 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_GetLatestBlockRequest) 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_GetLatestBlockRequest) 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_GetLatestBlockRequest) 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_GetLatestBlockRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestBlockRequest) - 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().(*GetLatestBlockRequest) - 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().(*GetLatestBlockRequest) - 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: GetLatestBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestBlockRequest: 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_GetLatestBlockResponse protoreflect.MessageDescriptor - fd_GetLatestBlockResponse_block_id protoreflect.FieldDescriptor - fd_GetLatestBlockResponse_block protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestBlockResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestBlockResponse") - fd_GetLatestBlockResponse_block_id = md_GetLatestBlockResponse.Fields().ByName("block_id") - fd_GetLatestBlockResponse_block = md_GetLatestBlockResponse.Fields().ByName("block") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestBlockResponse)(nil) - -type fastReflection_GetLatestBlockResponse GetLatestBlockResponse - -func (x *GetLatestBlockResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestBlockResponse)(x) -} - -func (x *GetLatestBlockResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestBlockResponse_messageType fastReflection_GetLatestBlockResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestBlockResponse_messageType{} - -type fastReflection_GetLatestBlockResponse_messageType struct{} - -func (x fastReflection_GetLatestBlockResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestBlockResponse)(nil) -} -func (x fastReflection_GetLatestBlockResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockResponse) -} -func (x fastReflection_GetLatestBlockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestBlockResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockResponse -} - -// 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_GetLatestBlockResponse) Type() protoreflect.MessageType { - return _fastReflection_GetLatestBlockResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestBlockResponse) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestBlockResponse) Interface() protoreflect.ProtoMessage { - return (*GetLatestBlockResponse)(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_GetLatestBlockResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_GetLatestBlockResponse_block_id, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_GetLatestBlockResponse_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetLatestBlockResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - return x.BlockId != nil - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - return x.Block != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse 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_GetLatestBlockResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - x.BlockId = nil - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - x.Block = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse 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_GetLatestBlockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse 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_GetLatestBlockResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - x.BlockId = value.Message().Interface().(*types.BlockID) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - x.Block = value.Message().Interface().(*types.Block) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse 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_GetLatestBlockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - if x.BlockId == nil { - x.BlockId = new(types.BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - if x.Block == nil { - x.Block = new(types.Block) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse 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_GetLatestBlockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - m := new(types.BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - m := new(types.Block) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse 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_GetLatestBlockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestBlockResponse", 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_GetLatestBlockResponse) 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_GetLatestBlockResponse) 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_GetLatestBlockResponse) 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_GetLatestBlockResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestBlockResponse) - 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.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - 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().(*GetLatestBlockResponse) - 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.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - 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().(*GetLatestBlockResponse) - 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: GetLatestBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestBlockResponse: 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 BlockId", 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.BlockId == nil { - x.BlockId = &types.BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", 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.Block == nil { - x.Block = &types.Block{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); 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_GetSyncingRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetSyncingRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetSyncingRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetSyncingRequest)(nil) - -type fastReflection_GetSyncingRequest GetSyncingRequest - -func (x *GetSyncingRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetSyncingRequest)(x) -} - -func (x *GetSyncingRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetSyncingRequest_messageType fastReflection_GetSyncingRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetSyncingRequest_messageType{} - -type fastReflection_GetSyncingRequest_messageType struct{} - -func (x fastReflection_GetSyncingRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetSyncingRequest)(nil) -} -func (x fastReflection_GetSyncingRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetSyncingRequest) -} -func (x fastReflection_GetSyncingRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetSyncingRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingRequest -} - -// 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_GetSyncingRequest) Type() protoreflect.MessageType { - return _fastReflection_GetSyncingRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetSyncingRequest) New() protoreflect.Message { - return new(fastReflection_GetSyncingRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetSyncingRequest) Interface() protoreflect.ProtoMessage { - return (*GetSyncingRequest)(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_GetSyncingRequest) 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_GetSyncingRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest 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_GetSyncingRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest 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_GetSyncingRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest 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_GetSyncingRequest) 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.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest 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_GetSyncingRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest 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_GetSyncingRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest 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_GetSyncingRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetSyncingRequest", 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_GetSyncingRequest) 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_GetSyncingRequest) 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_GetSyncingRequest) 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_GetSyncingRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetSyncingRequest) - 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().(*GetSyncingRequest) - 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().(*GetSyncingRequest) - 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: GetSyncingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetSyncingRequest: 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_GetSyncingResponse protoreflect.MessageDescriptor - fd_GetSyncingResponse_syncing protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetSyncingResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetSyncingResponse") - fd_GetSyncingResponse_syncing = md_GetSyncingResponse.Fields().ByName("syncing") -} - -var _ protoreflect.Message = (*fastReflection_GetSyncingResponse)(nil) - -type fastReflection_GetSyncingResponse GetSyncingResponse - -func (x *GetSyncingResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetSyncingResponse)(x) -} - -func (x *GetSyncingResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetSyncingResponse_messageType fastReflection_GetSyncingResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetSyncingResponse_messageType{} - -type fastReflection_GetSyncingResponse_messageType struct{} - -func (x fastReflection_GetSyncingResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetSyncingResponse)(nil) -} -func (x fastReflection_GetSyncingResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetSyncingResponse) -} -func (x fastReflection_GetSyncingResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetSyncingResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingResponse -} - -// 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_GetSyncingResponse) Type() protoreflect.MessageType { - return _fastReflection_GetSyncingResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetSyncingResponse) New() protoreflect.Message { - return new(fastReflection_GetSyncingResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetSyncingResponse) Interface() protoreflect.ProtoMessage { - return (*GetSyncingResponse)(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_GetSyncingResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Syncing != false { - value := protoreflect.ValueOfBool(x.Syncing) - if !f(fd_GetSyncingResponse_syncing, 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_GetSyncingResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - return x.Syncing != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse 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_GetSyncingResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - x.Syncing = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse 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_GetSyncingResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - value := x.Syncing - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse 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_GetSyncingResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - x.Syncing = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse 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_GetSyncingResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - panic(fmt.Errorf("field syncing of message cosmos.base.tendermint.v1beta1.GetSyncingResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse 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_GetSyncingResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse 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_GetSyncingResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetSyncingResponse", 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_GetSyncingResponse) 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_GetSyncingResponse) 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_GetSyncingResponse) 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_GetSyncingResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetSyncingResponse) - 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.Syncing { - n += 2 - } - 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().(*GetSyncingResponse) - 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.Syncing { - i-- - if x.Syncing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetSyncingResponse) - 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: GetSyncingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetSyncingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Syncing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Syncing = bool(v != 0) - 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_GetNodeInfoRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetNodeInfoRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetNodeInfoRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetNodeInfoRequest)(nil) - -type fastReflection_GetNodeInfoRequest GetNodeInfoRequest - -func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetNodeInfoRequest)(x) -} - -func (x *GetNodeInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetNodeInfoRequest_messageType fastReflection_GetNodeInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetNodeInfoRequest_messageType{} - -type fastReflection_GetNodeInfoRequest_messageType struct{} - -func (x fastReflection_GetNodeInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetNodeInfoRequest)(nil) -} -func (x fastReflection_GetNodeInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoRequest) -} -func (x fastReflection_GetNodeInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetNodeInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoRequest -} - -// 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_GetNodeInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_GetNodeInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetNodeInfoRequest) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetNodeInfoRequest) Interface() protoreflect.ProtoMessage { - return (*GetNodeInfoRequest)(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_GetNodeInfoRequest) 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_GetNodeInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest 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_GetNodeInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest 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_GetNodeInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest 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_GetNodeInfoRequest) 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.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest 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_GetNodeInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest 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_GetNodeInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest 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_GetNodeInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetNodeInfoRequest", 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_GetNodeInfoRequest) 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_GetNodeInfoRequest) 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_GetNodeInfoRequest) 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_GetNodeInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetNodeInfoRequest) - 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().(*GetNodeInfoRequest) - 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().(*GetNodeInfoRequest) - 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: GetNodeInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetNodeInfoRequest: 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_GetNodeInfoResponse protoreflect.MessageDescriptor - fd_GetNodeInfoResponse_node_info protoreflect.FieldDescriptor - fd_GetNodeInfoResponse_application_version protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetNodeInfoResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetNodeInfoResponse") - fd_GetNodeInfoResponse_node_info = md_GetNodeInfoResponse.Fields().ByName("node_info") - fd_GetNodeInfoResponse_application_version = md_GetNodeInfoResponse.Fields().ByName("application_version") -} - -var _ protoreflect.Message = (*fastReflection_GetNodeInfoResponse)(nil) - -type fastReflection_GetNodeInfoResponse GetNodeInfoResponse - -func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetNodeInfoResponse)(x) -} - -func (x *GetNodeInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetNodeInfoResponse_messageType fastReflection_GetNodeInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetNodeInfoResponse_messageType{} - -type fastReflection_GetNodeInfoResponse_messageType struct{} - -func (x fastReflection_GetNodeInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetNodeInfoResponse)(nil) -} -func (x fastReflection_GetNodeInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoResponse) -} -func (x fastReflection_GetNodeInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetNodeInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoResponse -} - -// 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_GetNodeInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_GetNodeInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetNodeInfoResponse) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetNodeInfoResponse) Interface() protoreflect.ProtoMessage { - return (*GetNodeInfoResponse)(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_GetNodeInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.NodeInfo != nil { - value := protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) - if !f(fd_GetNodeInfoResponse_node_info, value) { - return - } - } - if x.ApplicationVersion != nil { - value := protoreflect.ValueOfMessage(x.ApplicationVersion.ProtoReflect()) - if !f(fd_GetNodeInfoResponse_application_version, 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_GetNodeInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - return x.NodeInfo != nil - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - return x.ApplicationVersion != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse 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_GetNodeInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - x.NodeInfo = nil - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - x.ApplicationVersion = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse 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_GetNodeInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - value := x.NodeInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - value := x.ApplicationVersion - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse 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_GetNodeInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - x.NodeInfo = value.Message().Interface().(*p2p.NodeInfo) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - x.ApplicationVersion = value.Message().Interface().(*VersionInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse 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_GetNodeInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - if x.NodeInfo == nil { - x.NodeInfo = new(p2p.NodeInfo) - } - return protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - if x.ApplicationVersion == nil { - x.ApplicationVersion = new(VersionInfo) - } - return protoreflect.ValueOfMessage(x.ApplicationVersion.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse 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_GetNodeInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - m := new(p2p.NodeInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - m := new(VersionInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse 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_GetNodeInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetNodeInfoResponse", 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_GetNodeInfoResponse) 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_GetNodeInfoResponse) 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_GetNodeInfoResponse) 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_GetNodeInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetNodeInfoResponse) - 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.NodeInfo != nil { - l = options.Size(x.NodeInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ApplicationVersion != nil { - l = options.Size(x.ApplicationVersion) - 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().(*GetNodeInfoResponse) - 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.ApplicationVersion != nil { - encoded, err := options.Marshal(x.ApplicationVersion) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.NodeInfo != nil { - encoded, err := options.Marshal(x.NodeInfo) - 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().(*GetNodeInfoResponse) - 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: GetNodeInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetNodeInfoResponse: 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 NodeInfo", 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.NodeInfo == nil { - x.NodeInfo = &p2p.NodeInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NodeInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ApplicationVersion", 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.ApplicationVersion == nil { - x.ApplicationVersion = &VersionInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ApplicationVersion); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_VersionInfo_7_list)(nil) - -type _VersionInfo_7_list struct { - list *[]*Module -} - -func (x *_VersionInfo_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_VersionInfo_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_VersionInfo_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Module) - (*x.list)[i] = concreteValue -} - -func (x *_VersionInfo_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Module) - *x.list = append(*x.list, concreteValue) -} - -func (x *_VersionInfo_7_list) AppendMutable() protoreflect.Value { - v := new(Module) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_VersionInfo_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_VersionInfo_7_list) NewElement() protoreflect.Value { - v := new(Module) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_VersionInfo_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_VersionInfo protoreflect.MessageDescriptor - fd_VersionInfo_name protoreflect.FieldDescriptor - fd_VersionInfo_app_name protoreflect.FieldDescriptor - fd_VersionInfo_version protoreflect.FieldDescriptor - fd_VersionInfo_git_commit protoreflect.FieldDescriptor - fd_VersionInfo_build_tags protoreflect.FieldDescriptor - fd_VersionInfo_go_version protoreflect.FieldDescriptor - fd_VersionInfo_build_deps protoreflect.FieldDescriptor - fd_VersionInfo_cosmos_sdk_version protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_VersionInfo = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("VersionInfo") - fd_VersionInfo_name = md_VersionInfo.Fields().ByName("name") - fd_VersionInfo_app_name = md_VersionInfo.Fields().ByName("app_name") - fd_VersionInfo_version = md_VersionInfo.Fields().ByName("version") - fd_VersionInfo_git_commit = md_VersionInfo.Fields().ByName("git_commit") - fd_VersionInfo_build_tags = md_VersionInfo.Fields().ByName("build_tags") - fd_VersionInfo_go_version = md_VersionInfo.Fields().ByName("go_version") - fd_VersionInfo_build_deps = md_VersionInfo.Fields().ByName("build_deps") - fd_VersionInfo_cosmos_sdk_version = md_VersionInfo.Fields().ByName("cosmos_sdk_version") -} - -var _ protoreflect.Message = (*fastReflection_VersionInfo)(nil) - -type fastReflection_VersionInfo VersionInfo - -func (x *VersionInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_VersionInfo)(x) -} - -func (x *VersionInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_VersionInfo_messageType fastReflection_VersionInfo_messageType -var _ protoreflect.MessageType = fastReflection_VersionInfo_messageType{} - -type fastReflection_VersionInfo_messageType struct{} - -func (x fastReflection_VersionInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_VersionInfo)(nil) -} -func (x fastReflection_VersionInfo_messageType) New() protoreflect.Message { - return new(fastReflection_VersionInfo) -} -func (x fastReflection_VersionInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VersionInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VersionInfo) Descriptor() protoreflect.MessageDescriptor { - return md_VersionInfo -} - -// 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_VersionInfo) Type() protoreflect.MessageType { - return _fastReflection_VersionInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VersionInfo) New() protoreflect.Message { - return new(fastReflection_VersionInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VersionInfo) Interface() protoreflect.ProtoMessage { - return (*VersionInfo)(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_VersionInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_VersionInfo_name, value) { - return - } - } - if x.AppName != "" { - value := protoreflect.ValueOfString(x.AppName) - if !f(fd_VersionInfo_app_name, value) { - return - } - } - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_VersionInfo_version, value) { - return - } - } - if x.GitCommit != "" { - value := protoreflect.ValueOfString(x.GitCommit) - if !f(fd_VersionInfo_git_commit, value) { - return - } - } - if x.BuildTags != "" { - value := protoreflect.ValueOfString(x.BuildTags) - if !f(fd_VersionInfo_build_tags, value) { - return - } - } - if x.GoVersion != "" { - value := protoreflect.ValueOfString(x.GoVersion) - if !f(fd_VersionInfo_go_version, value) { - return - } - } - if len(x.BuildDeps) != 0 { - value := protoreflect.ValueOfList(&_VersionInfo_7_list{list: &x.BuildDeps}) - if !f(fd_VersionInfo_build_deps, value) { - return - } - } - if x.CosmosSdkVersion != "" { - value := protoreflect.ValueOfString(x.CosmosSdkVersion) - if !f(fd_VersionInfo_cosmos_sdk_version, 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_VersionInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - return x.Name != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - return x.AppName != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - return x.Version != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - return x.GitCommit != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - return x.BuildTags != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - return x.GoVersion != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - return len(x.BuildDeps) != 0 - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - return x.CosmosSdkVersion != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo 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_VersionInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - x.Name = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - x.AppName = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - x.Version = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - x.GitCommit = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - x.BuildTags = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - x.GoVersion = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - x.BuildDeps = nil - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - x.CosmosSdkVersion = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo 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_VersionInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - value := x.AppName - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - value := x.GitCommit - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - value := x.BuildTags - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - value := x.GoVersion - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - if len(x.BuildDeps) == 0 { - return protoreflect.ValueOfList(&_VersionInfo_7_list{}) - } - listValue := &_VersionInfo_7_list{list: &x.BuildDeps} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - value := x.CosmosSdkVersion - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo 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_VersionInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - x.Name = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - x.AppName = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - x.Version = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - x.GitCommit = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - x.BuildTags = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - x.GoVersion = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - lv := value.List() - clv := lv.(*_VersionInfo_7_list) - x.BuildDeps = *clv.list - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - x.CosmosSdkVersion = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo 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_VersionInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - if x.BuildDeps == nil { - x.BuildDeps = []*Module{} - } - value := &_VersionInfo_7_list{list: &x.BuildDeps} - return protoreflect.ValueOfList(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - panic(fmt.Errorf("field name of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - panic(fmt.Errorf("field app_name of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - panic(fmt.Errorf("field version of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - panic(fmt.Errorf("field git_commit of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - panic(fmt.Errorf("field build_tags of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - panic(fmt.Errorf("field go_version of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - panic(fmt.Errorf("field cosmos_sdk_version of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo 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_VersionInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - list := []*Module{} - return protoreflect.ValueOfList(&_VersionInfo_7_list{list: &list}) - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo 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_VersionInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.VersionInfo", 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_VersionInfo) 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_VersionInfo) 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_VersionInfo) 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_VersionInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VersionInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AppName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GitCommit) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BuildTags) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GoVersion) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.BuildDeps) > 0 { - for _, e := range x.BuildDeps { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.CosmosSdkVersion) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*VersionInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CosmosSdkVersion) > 0 { - i -= len(x.CosmosSdkVersion) - copy(dAtA[i:], x.CosmosSdkVersion) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CosmosSdkVersion))) - i-- - dAtA[i] = 0x42 - } - if len(x.BuildDeps) > 0 { - for iNdEx := len(x.BuildDeps) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BuildDeps[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.GoVersion) > 0 { - i -= len(x.GoVersion) - copy(dAtA[i:], x.GoVersion) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GoVersion))) - i-- - dAtA[i] = 0x32 - } - if len(x.BuildTags) > 0 { - i -= len(x.BuildTags) - copy(dAtA[i:], x.BuildTags) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BuildTags))) - i-- - dAtA[i] = 0x2a - } - if len(x.GitCommit) > 0 { - i -= len(x.GitCommit) - copy(dAtA[i:], x.GitCommit) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GitCommit))) - i-- - dAtA[i] = 0x22 - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - i-- - dAtA[i] = 0x1a - } - if len(x.AppName) > 0 { - i -= len(x.AppName) - copy(dAtA[i:], x.AppName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppName))) - i-- - dAtA[i] = 0x12 - } - 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 { - 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().(*VersionInfo) - 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: VersionInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VersionInfo: 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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppName", 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.AppName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GitCommit", 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.GitCommit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuildTags", 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.BuildTags = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GoVersion", 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.GoVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuildDeps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BuildDeps = append(x.BuildDeps, &Module{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BuildDeps[len(x.BuildDeps)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CosmosSdkVersion", 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.CosmosSdkVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Module protoreflect.MessageDescriptor - fd_Module_path protoreflect.FieldDescriptor - fd_Module_version protoreflect.FieldDescriptor - fd_Module_sum protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_Module = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("Module") - fd_Module_path = md_Module.Fields().ByName("path") - fd_Module_version = md_Module.Fields().ByName("version") - fd_Module_sum = md_Module.Fields().ByName("sum") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// 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_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Path != "" { - value := protoreflect.ValueOfString(x.Path) - if !f(fd_Module_path, value) { - return - } - } - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_Module_version, value) { - return - } - } - if x.Sum != "" { - value := protoreflect.ValueOfString(x.Sum) - if !f(fd_Module_sum, 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_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - return x.Path != "" - case "cosmos.base.tendermint.v1beta1.Module.version": - return x.Version != "" - case "cosmos.base.tendermint.v1beta1.Module.sum": - return x.Sum != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - x.Path = "" - case "cosmos.base.tendermint.v1beta1.Module.version": - x.Version = "" - case "cosmos.base.tendermint.v1beta1.Module.sum": - x.Sum = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - value := x.Path - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.Module.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.Module.sum": - value := x.Sum - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - x.Path = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.Module.version": - x.Version = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.Module.sum": - x.Sum = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - panic(fmt.Errorf("field path of message cosmos.base.tendermint.v1beta1.Module is not mutable")) - case "cosmos.base.tendermint.v1beta1.Module.version": - panic(fmt.Errorf("field version of message cosmos.base.tendermint.v1beta1.Module is not mutable")) - case "cosmos.base.tendermint.v1beta1.Module.sum": - panic(fmt.Errorf("field sum of message cosmos.base.tendermint.v1beta1.Module is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.Module.version": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.Module.sum": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Path) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sum) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Sum) > 0 { - i -= len(x.Sum) - copy(dAtA[i:], x.Sum) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sum))) - i-- - dAtA[i] = 0x1a - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - i-- - dAtA[i] = 0x12 - } - if len(x.Path) > 0 { - i -= len(x.Path) - copy(dAtA[i:], x.Path) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) - 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().(*Module) - 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: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", 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.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sum", 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.Sum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ABCIQueryRequest protoreflect.MessageDescriptor - fd_ABCIQueryRequest_data protoreflect.FieldDescriptor - fd_ABCIQueryRequest_path protoreflect.FieldDescriptor - fd_ABCIQueryRequest_height protoreflect.FieldDescriptor - fd_ABCIQueryRequest_prove protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ABCIQueryRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ABCIQueryRequest") - fd_ABCIQueryRequest_data = md_ABCIQueryRequest.Fields().ByName("data") - fd_ABCIQueryRequest_path = md_ABCIQueryRequest.Fields().ByName("path") - fd_ABCIQueryRequest_height = md_ABCIQueryRequest.Fields().ByName("height") - fd_ABCIQueryRequest_prove = md_ABCIQueryRequest.Fields().ByName("prove") -} - -var _ protoreflect.Message = (*fastReflection_ABCIQueryRequest)(nil) - -type fastReflection_ABCIQueryRequest ABCIQueryRequest - -func (x *ABCIQueryRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_ABCIQueryRequest)(x) -} - -func (x *ABCIQueryRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ABCIQueryRequest_messageType fastReflection_ABCIQueryRequest_messageType -var _ protoreflect.MessageType = fastReflection_ABCIQueryRequest_messageType{} - -type fastReflection_ABCIQueryRequest_messageType struct{} - -func (x fastReflection_ABCIQueryRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_ABCIQueryRequest)(nil) -} -func (x fastReflection_ABCIQueryRequest_messageType) New() protoreflect.Message { - return new(fastReflection_ABCIQueryRequest) -} -func (x fastReflection_ABCIQueryRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ABCIQueryRequest) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryRequest -} - -// 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_ABCIQueryRequest) Type() protoreflect.MessageType { - return _fastReflection_ABCIQueryRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ABCIQueryRequest) New() protoreflect.Message { - return new(fastReflection_ABCIQueryRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ABCIQueryRequest) Interface() protoreflect.ProtoMessage { - return (*ABCIQueryRequest)(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_ABCIQueryRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ABCIQueryRequest_data, value) { - return - } - } - if x.Path != "" { - value := protoreflect.ValueOfString(x.Path) - if !f(fd_ABCIQueryRequest_path, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_ABCIQueryRequest_height, value) { - return - } - } - if x.Prove != false { - value := protoreflect.ValueOfBool(x.Prove) - if !f(fd_ABCIQueryRequest_prove, 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_ABCIQueryRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - return len(x.Data) != 0 - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - return x.Path != "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - return x.Height != int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - return x.Prove != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest 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_ABCIQueryRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - x.Data = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - x.Path = "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - x.Height = int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - x.Prove = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest 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_ABCIQueryRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - value := x.Path - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - value := x.Prove - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest 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_ABCIQueryRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - x.Data = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - x.Path = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - x.Height = value.Int() - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - x.Prove = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest 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_ABCIQueryRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - panic(fmt.Errorf("field data of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - panic(fmt.Errorf("field path of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - panic(fmt.Errorf("field prove of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest 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_ABCIQueryRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest 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_ABCIQueryRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ABCIQueryRequest", 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_ABCIQueryRequest) 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_ABCIQueryRequest) 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_ABCIQueryRequest) 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_ABCIQueryRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ABCIQueryRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Path) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Prove { - n += 2 - } - 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().(*ABCIQueryRequest) - 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.Prove { - i-- - if x.Prove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if len(x.Path) > 0 { - i -= len(x.Path) - copy(dAtA[i:], x.Path) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) - i-- - dAtA[i] = 0x12 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - 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().(*ABCIQueryRequest) - 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: ABCIQueryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIQueryRequest: 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 Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", 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.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Prove = bool(v != 0) - 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_ABCIQueryResponse protoreflect.MessageDescriptor - fd_ABCIQueryResponse_code protoreflect.FieldDescriptor - fd_ABCIQueryResponse_log protoreflect.FieldDescriptor - fd_ABCIQueryResponse_info protoreflect.FieldDescriptor - fd_ABCIQueryResponse_index protoreflect.FieldDescriptor - fd_ABCIQueryResponse_key protoreflect.FieldDescriptor - fd_ABCIQueryResponse_value protoreflect.FieldDescriptor - fd_ABCIQueryResponse_proof_ops protoreflect.FieldDescriptor - fd_ABCIQueryResponse_height protoreflect.FieldDescriptor - fd_ABCIQueryResponse_codespace protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ABCIQueryResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ABCIQueryResponse") - fd_ABCIQueryResponse_code = md_ABCIQueryResponse.Fields().ByName("code") - fd_ABCIQueryResponse_log = md_ABCIQueryResponse.Fields().ByName("log") - fd_ABCIQueryResponse_info = md_ABCIQueryResponse.Fields().ByName("info") - fd_ABCIQueryResponse_index = md_ABCIQueryResponse.Fields().ByName("index") - fd_ABCIQueryResponse_key = md_ABCIQueryResponse.Fields().ByName("key") - fd_ABCIQueryResponse_value = md_ABCIQueryResponse.Fields().ByName("value") - fd_ABCIQueryResponse_proof_ops = md_ABCIQueryResponse.Fields().ByName("proof_ops") - fd_ABCIQueryResponse_height = md_ABCIQueryResponse.Fields().ByName("height") - fd_ABCIQueryResponse_codespace = md_ABCIQueryResponse.Fields().ByName("codespace") -} - -var _ protoreflect.Message = (*fastReflection_ABCIQueryResponse)(nil) - -type fastReflection_ABCIQueryResponse ABCIQueryResponse - -func (x *ABCIQueryResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ABCIQueryResponse)(x) -} - -func (x *ABCIQueryResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ABCIQueryResponse_messageType fastReflection_ABCIQueryResponse_messageType -var _ protoreflect.MessageType = fastReflection_ABCIQueryResponse_messageType{} - -type fastReflection_ABCIQueryResponse_messageType struct{} - -func (x fastReflection_ABCIQueryResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ABCIQueryResponse)(nil) -} -func (x fastReflection_ABCIQueryResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ABCIQueryResponse) -} -func (x fastReflection_ABCIQueryResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ABCIQueryResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryResponse -} - -// 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_ABCIQueryResponse) Type() protoreflect.MessageType { - return _fastReflection_ABCIQueryResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ABCIQueryResponse) New() protoreflect.Message { - return new(fastReflection_ABCIQueryResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ABCIQueryResponse) Interface() protoreflect.ProtoMessage { - return (*ABCIQueryResponse)(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_ABCIQueryResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ABCIQueryResponse_code, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ABCIQueryResponse_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ABCIQueryResponse_info, value) { - return - } - } - if x.Index != int64(0) { - value := protoreflect.ValueOfInt64(x.Index) - if !f(fd_ABCIQueryResponse_index, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ABCIQueryResponse_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_ABCIQueryResponse_value, value) { - return - } - } - if x.ProofOps != nil { - value := protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - if !f(fd_ABCIQueryResponse_proof_ops, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_ABCIQueryResponse_height, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_ABCIQueryResponse_codespace, 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_ABCIQueryResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - return x.Code != uint32(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - return x.Log != "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - return x.Info != "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - return x.Index != int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - return len(x.Key) != 0 - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - return len(x.Value) != 0 - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - return x.ProofOps != nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - return x.Height != int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - return x.Codespace != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse 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_ABCIQueryResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - x.Code = uint32(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - x.Log = "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - x.Info = "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - x.Index = int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - x.Key = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - x.Value = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - x.ProofOps = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - x.Height = int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - x.Codespace = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse 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_ABCIQueryResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - value := x.Index - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - value := x.ProofOps - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse 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_ABCIQueryResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - x.Code = uint32(value.Uint()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - x.Log = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - x.Info = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - x.Index = value.Int() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - x.Key = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - x.Value = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - x.ProofOps = value.Message().Interface().(*ProofOps) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - x.Height = value.Int() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - x.Codespace = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse 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_ABCIQueryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - if x.ProofOps == nil { - x.ProofOps = new(ProofOps) - } - return protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - panic(fmt.Errorf("field code of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - panic(fmt.Errorf("field log of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - panic(fmt.Errorf("field info of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - panic(fmt.Errorf("field index of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - panic(fmt.Errorf("field key of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - panic(fmt.Errorf("field value of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - panic(fmt.Errorf("field codespace of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse 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_ABCIQueryResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - m := new(ProofOps) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse 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_ABCIQueryResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ABCIQueryResponse", 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_ABCIQueryResponse) 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_ABCIQueryResponse) 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_ABCIQueryResponse) 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_ABCIQueryResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ABCIQueryResponse) - 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.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ProofOps != nil { - l = options.Size(x.ProofOps) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ABCIQueryResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x52 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x48 - } - if x.ProofOps != nil { - encoded, err := options.Marshal(x.ProofOps) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x3a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x32 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x28 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ABCIQueryResponse) - 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: ABCIQueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofOps", 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.ProofOps == nil { - x.ProofOps = &ProofOps{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofOps); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", 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.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ProofOp protoreflect.MessageDescriptor - fd_ProofOp_type protoreflect.FieldDescriptor - fd_ProofOp_key protoreflect.FieldDescriptor - fd_ProofOp_data protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ProofOp = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ProofOp") - fd_ProofOp_type = md_ProofOp.Fields().ByName("type") - fd_ProofOp_key = md_ProofOp.Fields().ByName("key") - fd_ProofOp_data = md_ProofOp.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_ProofOp)(nil) - -type fastReflection_ProofOp ProofOp - -func (x *ProofOp) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProofOp)(x) -} - -func (x *ProofOp) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProofOp_messageType fastReflection_ProofOp_messageType -var _ protoreflect.MessageType = fastReflection_ProofOp_messageType{} - -type fastReflection_ProofOp_messageType struct{} - -func (x fastReflection_ProofOp_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProofOp)(nil) -} -func (x fastReflection_ProofOp_messageType) New() protoreflect.Message { - return new(fastReflection_ProofOp) -} -func (x fastReflection_ProofOp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProofOp) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOp -} - -// 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_ProofOp) Type() protoreflect.MessageType { - return _fastReflection_ProofOp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProofOp) New() protoreflect.Message { - return new(fastReflection_ProofOp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProofOp) Interface() protoreflect.ProtoMessage { - return (*ProofOp)(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_ProofOp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != "" { - value := protoreflect.ValueOfString(x.Type_) - if !f(fd_ProofOp_type, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ProofOp_key, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ProofOp_data, 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_ProofOp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - return x.Type_ != "" - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - return len(x.Key) != 0 - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - return len(x.Data) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp 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_ProofOp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - x.Type_ = "" - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - x.Key = nil - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp 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_ProofOp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - value := x.Type_ - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp 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_ProofOp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - x.Type_ = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - x.Key = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - x.Data = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp 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_ProofOp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - panic(fmt.Errorf("field type of message cosmos.base.tendermint.v1beta1.ProofOp is not mutable")) - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - panic(fmt.Errorf("field key of message cosmos.base.tendermint.v1beta1.ProofOp is not mutable")) - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - panic(fmt.Errorf("field data of message cosmos.base.tendermint.v1beta1.ProofOp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp 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_ProofOp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp 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_ProofOp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ProofOp", 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_ProofOp) 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_ProofOp) 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_ProofOp) 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_ProofOp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Type_) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x1a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Type_) > 0 { - i -= len(x.Type_) - copy(dAtA[i:], x.Type_) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) - 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().(*ProofOp) - 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: ProofOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOp: 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 Type_", 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.Type_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ProofOps_1_list)(nil) - -type _ProofOps_1_list struct { - list *[]*ProofOp -} - -func (x *_ProofOps_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ProofOps_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ProofOps_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ProofOp) - (*x.list)[i] = concreteValue -} - -func (x *_ProofOps_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ProofOp) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ProofOps_1_list) AppendMutable() protoreflect.Value { - v := new(ProofOp) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ProofOps_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ProofOps_1_list) NewElement() protoreflect.Value { - v := new(ProofOp) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ProofOps_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ProofOps protoreflect.MessageDescriptor - fd_ProofOps_ops protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ProofOps = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ProofOps") - fd_ProofOps_ops = md_ProofOps.Fields().ByName("ops") -} - -var _ protoreflect.Message = (*fastReflection_ProofOps)(nil) - -type fastReflection_ProofOps ProofOps - -func (x *ProofOps) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProofOps)(x) -} - -func (x *ProofOps) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProofOps_messageType fastReflection_ProofOps_messageType -var _ protoreflect.MessageType = fastReflection_ProofOps_messageType{} - -type fastReflection_ProofOps_messageType struct{} - -func (x fastReflection_ProofOps_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProofOps)(nil) -} -func (x fastReflection_ProofOps_messageType) New() protoreflect.Message { - return new(fastReflection_ProofOps) -} -func (x fastReflection_ProofOps_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOps -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProofOps) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOps -} - -// 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_ProofOps) Type() protoreflect.MessageType { - return _fastReflection_ProofOps_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProofOps) New() protoreflect.Message { - return new(fastReflection_ProofOps) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProofOps) Interface() protoreflect.ProtoMessage { - return (*ProofOps)(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_ProofOps) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Ops) != 0 { - value := protoreflect.ValueOfList(&_ProofOps_1_list{list: &x.Ops}) - if !f(fd_ProofOps_ops, 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_ProofOps) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - return len(x.Ops) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps 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_ProofOps) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - x.Ops = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps 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_ProofOps) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - if len(x.Ops) == 0 { - return protoreflect.ValueOfList(&_ProofOps_1_list{}) - } - listValue := &_ProofOps_1_list{list: &x.Ops} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps 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_ProofOps) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - lv := value.List() - clv := lv.(*_ProofOps_1_list) - x.Ops = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps 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_ProofOps) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - if x.Ops == nil { - x.Ops = []*ProofOp{} - } - value := &_ProofOps_1_list{list: &x.Ops} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps 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_ProofOps) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - list := []*ProofOp{} - return protoreflect.ValueOfList(&_ProofOps_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps 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_ProofOps) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ProofOps", 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_ProofOps) 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_ProofOps) 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_ProofOps) 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_ProofOps) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Ops) > 0 { - for _, e := range x.Ops { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Ops) > 0 { - for iNdEx := len(x.Ops) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Ops[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ProofOps) - 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: ProofOps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOps: 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 Ops", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Ops = append(x.Ops, &ProofOp{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Ops[len(x.Ops)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/tendermint/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -type GetValidatorSetByHeightRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetValidatorSetByHeightRequest) Reset() { - *x = GetValidatorSetByHeightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorSetByHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorSetByHeightRequest) ProtoMessage() {} - -// Deprecated: Use GetValidatorSetByHeightRequest.ProtoReflect.Descriptor instead. -func (*GetValidatorSetByHeightRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *GetValidatorSetByHeightRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *GetValidatorSetByHeightRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -type GetValidatorSetByHeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetValidatorSetByHeightResponse) Reset() { - *x = GetValidatorSetByHeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorSetByHeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorSetByHeightResponse) ProtoMessage() {} - -// Deprecated: Use GetValidatorSetByHeightResponse.ProtoReflect.Descriptor instead. -func (*GetValidatorSetByHeightResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *GetValidatorSetByHeightResponse) GetBlockHeight() int64 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *GetValidatorSetByHeightResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *GetValidatorSetByHeightResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -type GetLatestValidatorSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetLatestValidatorSetRequest) Reset() { - *x = GetLatestValidatorSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestValidatorSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestValidatorSetRequest) ProtoMessage() {} - -// Deprecated: Use GetLatestValidatorSetRequest.ProtoReflect.Descriptor instead. -func (*GetLatestValidatorSetRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *GetLatestValidatorSetRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -type GetLatestValidatorSetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetLatestValidatorSetResponse) Reset() { - *x = GetLatestValidatorSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestValidatorSetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestValidatorSetResponse) ProtoMessage() {} - -// Deprecated: Use GetLatestValidatorSetResponse.ProtoReflect.Descriptor instead. -func (*GetLatestValidatorSetResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *GetLatestValidatorSetResponse) GetBlockHeight() int64 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *GetLatestValidatorSetResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *GetLatestValidatorSetResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// Validator is the type for the validator-set. -type Validator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey *anypb.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` - ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"` -} - -func (x *Validator) Reset() { - *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Validator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Validator) ProtoMessage() {} - -// Deprecated: Use Validator.ProtoReflect.Descriptor instead. -func (*Validator) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *Validator) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Validator) GetPubKey() *anypb.Any { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *Validator) GetVotingPower() int64 { - if x != nil { - return x.VotingPower - } - return 0 -} - -func (x *Validator) GetProposerPriority() int64 { - if x != nil { - return x.ProposerPriority - } - return 0 -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *GetBlockByHeightRequest) Reset() { - *x = GetBlockByHeightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockByHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockByHeightRequest) ProtoMessage() {} - -// Deprecated: Use GetBlockByHeightRequest.ProtoReflect.Descriptor instead. -func (*GetBlockByHeightRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *GetBlockByHeightRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockId *types.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (x *GetBlockByHeightResponse) Reset() { - *x = GetBlockByHeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockByHeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockByHeightResponse) ProtoMessage() {} - -// Deprecated: Use GetBlockByHeightResponse.ProtoReflect.Descriptor instead. -func (*GetBlockByHeightResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *GetBlockByHeightResponse) GetBlockId() *types.BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *GetBlockByHeightResponse) GetBlock() *types.Block { - if x != nil { - return x.Block - } - return nil -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -type GetLatestBlockRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetLatestBlockRequest) Reset() { - *x = GetLatestBlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestBlockRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestBlockRequest) ProtoMessage() {} - -// Deprecated: Use GetLatestBlockRequest.ProtoReflect.Descriptor instead. -func (*GetLatestBlockRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -type GetLatestBlockResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockId *types.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (x *GetLatestBlockResponse) Reset() { - *x = GetLatestBlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestBlockResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestBlockResponse) ProtoMessage() {} - -// Deprecated: Use GetLatestBlockResponse.ProtoReflect.Descriptor instead. -func (*GetLatestBlockResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *GetLatestBlockResponse) GetBlockId() *types.BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *GetLatestBlockResponse) GetBlock() *types.Block { - if x != nil { - return x.Block - } - return nil -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -type GetSyncingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetSyncingRequest) Reset() { - *x = GetSyncingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSyncingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSyncingRequest) ProtoMessage() {} - -// Deprecated: Use GetSyncingRequest.ProtoReflect.Descriptor instead. -func (*GetSyncingRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -type GetSyncingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Syncing bool `protobuf:"varint,1,opt,name=syncing,proto3" json:"syncing,omitempty"` -} - -func (x *GetSyncingResponse) Reset() { - *x = GetSyncingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSyncingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSyncingResponse) ProtoMessage() {} - -// Deprecated: Use GetSyncingResponse.ProtoReflect.Descriptor instead. -func (*GetSyncingResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *GetSyncingResponse) GetSyncing() bool { - if x != nil { - return x.Syncing - } - return false -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -type GetNodeInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetNodeInfoRequest) Reset() { - *x = GetNodeInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoRequest) ProtoMessage() {} - -// Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead. -func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. -type GetNodeInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeInfo *p2p.NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` - ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"` -} - -func (x *GetNodeInfoResponse) Reset() { - *x = GetNodeInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoResponse) ProtoMessage() {} - -// Deprecated: Use GetNodeInfoResponse.ProtoReflect.Descriptor instead. -func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *GetNodeInfoResponse) GetNodeInfo() *p2p.NodeInfo { - if x != nil { - return x.NodeInfo - } - return nil -} - -func (x *GetNodeInfoResponse) GetApplicationVersion() *VersionInfo { - if x != nil { - return x.ApplicationVersion - } - return nil -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -type VersionInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - AppName string `protobuf:"bytes,2,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` - BuildTags string `protobuf:"bytes,5,opt,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"` - GoVersion string `protobuf:"bytes,6,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` - BuildDeps []*Module `protobuf:"bytes,7,rep,name=build_deps,json=buildDeps,proto3" json:"build_deps,omitempty"` - // Since: cosmos-sdk 0.43 - CosmosSdkVersion string `protobuf:"bytes,8,opt,name=cosmos_sdk_version,json=cosmosSdkVersion,proto3" json:"cosmos_sdk_version,omitempty"` -} - -func (x *VersionInfo) Reset() { - *x = VersionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VersionInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionInfo) ProtoMessage() {} - -// Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead. -func (*VersionInfo) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *VersionInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VersionInfo) GetAppName() string { - if x != nil { - return x.AppName - } - return "" -} - -func (x *VersionInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *VersionInfo) GetGitCommit() string { - if x != nil { - return x.GitCommit - } - return "" -} - -func (x *VersionInfo) GetBuildTags() string { - if x != nil { - return x.BuildTags - } - return "" -} - -func (x *VersionInfo) GetGoVersion() string { - if x != nil { - return x.GoVersion - } - return "" -} - -func (x *VersionInfo) GetBuildDeps() []*Module { - if x != nil { - return x.BuildDeps - } - return nil -} - -func (x *VersionInfo) GetCosmosSdkVersion() string { - if x != nil { - return x.CosmosSdkVersion - } - return "" -} - -// Module is the type for VersionInfo -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module path - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // module version - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // checksum - Sum string `protobuf:"bytes,3,opt,name=sum,proto3" json:"sum,omitempty"` -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *Module) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Module) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Module) GetSum() string { - if x != nil { - return x.Sum - } - return "" -} - -// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -type ABCIQueryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` -} - -func (x *ABCIQueryRequest) Reset() { - *x = ABCIQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABCIQueryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABCIQueryRequest) ProtoMessage() {} - -// Deprecated: Use ABCIQueryRequest.ProtoReflect.Descriptor instead. -func (*ABCIQueryRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *ABCIQueryRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ABCIQueryRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ABCIQueryRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ABCIQueryRequest) GetProve() bool { - if x != nil { - return x.Prove - } - return false -} - -// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. -// -// Note: This type is a duplicate of the ResponseQuery proto type defined in -// Tendermint. -type ABCIQueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic - Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - ProofOps *ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` - Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (x *ABCIQueryResponse) Reset() { - *x = ABCIQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABCIQueryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABCIQueryResponse) ProtoMessage() {} - -// Deprecated: Use ABCIQueryResponse.ProtoReflect.Descriptor instead. -func (*ABCIQueryResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{16} -} - -func (x *ABCIQueryResponse) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ABCIQueryResponse) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ABCIQueryResponse) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *ABCIQueryResponse) GetIndex() int64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *ABCIQueryResponse) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ABCIQueryResponse) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *ABCIQueryResponse) GetProofOps() *ProofOps { - if x != nil { - return x.ProofOps - } - return nil -} - -func (x *ABCIQueryResponse) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ABCIQueryResponse) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -// ProofOp defines an operation used for calculating Merkle root. The data could -// be arbitrary format, providing nessecary data for example neighbouring node -// hash. -// -// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. -type ProofOp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *ProofOp) Reset() { - *x = ProofOp{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProofOp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProofOp) ProtoMessage() {} - -// Deprecated: Use ProofOp.ProtoReflect.Descriptor instead. -func (*ProofOp) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *ProofOp) GetType_() string { - if x != nil { - return x.Type_ - } - return "" -} - -func (x *ProofOp) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ProofOp) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -// ProofOps is Merkle proof defined by the list of ProofOps. -// -// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. -type ProofOps struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ops []*ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops,omitempty"` -} - -func (x *ProofOps) Reset() { - *x = ProofOps{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProofOps) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProofOps) ProtoMessage() {} - -// Deprecated: Use ProofOps.ProtoReflect.Descriptor instead. -func (*ProofOps) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *ProofOps) GetOps() []*ProofOp { - if x != nil { - return x.Ops - } - return nil -} - -var File_cosmos_base_tendermint_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x1e, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x79, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, - 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xd6, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x09, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 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, 0x12, 0x2d, 0x0a, 0x07, 0x70, - 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 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, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2b, 0x0a, - 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x31, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x7f, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, - 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x17, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7d, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, - 0x63, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x22, 0x14, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, 0x70, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x5c, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa8, - 0x02, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x65, - 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x65, 0x70, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x53, - 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x06, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x73, 0x75, 0x6d, 0x22, 0x68, 0x0a, 0x10, 0x41, 0x42, 0x43, 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x76, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x22, 0x8e, 0x02, - 0x0a, 0x11, 0x41, 0x42, 0x43, 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x6f, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x4f, - 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, - 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x43, - 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x4b, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x12, - 0x3f, 0x0a, 0x03, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x03, 0x6f, 0x70, 0x73, - 0x32, 0xaf, 0x0a, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa9, 0x01, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0xa4, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x53, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, - 0xb6, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x2f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0xbe, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x37, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0xd2, 0x01, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0xda, - 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3e, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x09, - 0x41, 0x42, 0x43, 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x42, 0x43, - 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x42, 0x9e, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x54, - 0xaa, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x54, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, - 0x5c, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData = file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc -) - -func file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData -} - -var file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_cosmos_base_tendermint_v1beta1_query_proto_goTypes = []interface{}{ - (*GetValidatorSetByHeightRequest)(nil), // 0: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest - (*GetValidatorSetByHeightResponse)(nil), // 1: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse - (*GetLatestValidatorSetRequest)(nil), // 2: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest - (*GetLatestValidatorSetResponse)(nil), // 3: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse - (*Validator)(nil), // 4: cosmos.base.tendermint.v1beta1.Validator - (*GetBlockByHeightRequest)(nil), // 5: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest - (*GetBlockByHeightResponse)(nil), // 6: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse - (*GetLatestBlockRequest)(nil), // 7: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest - (*GetLatestBlockResponse)(nil), // 8: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse - (*GetSyncingRequest)(nil), // 9: cosmos.base.tendermint.v1beta1.GetSyncingRequest - (*GetSyncingResponse)(nil), // 10: cosmos.base.tendermint.v1beta1.GetSyncingResponse - (*GetNodeInfoRequest)(nil), // 11: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest - (*GetNodeInfoResponse)(nil), // 12: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse - (*VersionInfo)(nil), // 13: cosmos.base.tendermint.v1beta1.VersionInfo - (*Module)(nil), // 14: cosmos.base.tendermint.v1beta1.Module - (*ABCIQueryRequest)(nil), // 15: cosmos.base.tendermint.v1beta1.ABCIQueryRequest - (*ABCIQueryResponse)(nil), // 16: cosmos.base.tendermint.v1beta1.ABCIQueryResponse - (*ProofOp)(nil), // 17: cosmos.base.tendermint.v1beta1.ProofOp - (*ProofOps)(nil), // 18: cosmos.base.tendermint.v1beta1.ProofOps - (*v1beta1.PageRequest)(nil), // 19: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 20: cosmos.base.query.v1beta1.PageResponse - (*anypb.Any)(nil), // 21: google.protobuf.Any - (*types.BlockID)(nil), // 22: tendermint.types.BlockID - (*types.Block)(nil), // 23: tendermint.types.Block - (*p2p.NodeInfo)(nil), // 24: tendermint.p2p.NodeInfo -} -var file_cosmos_base_tendermint_v1beta1_query_proto_depIdxs = []int32{ - 19, // 0: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 4, // 1: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators:type_name -> cosmos.base.tendermint.v1beta1.Validator - 20, // 2: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 3: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 4, // 4: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators:type_name -> cosmos.base.tendermint.v1beta1.Validator - 20, // 5: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 6: cosmos.base.tendermint.v1beta1.Validator.pub_key:type_name -> google.protobuf.Any - 22, // 7: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id:type_name -> tendermint.types.BlockID - 23, // 8: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block:type_name -> tendermint.types.Block - 22, // 9: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id:type_name -> tendermint.types.BlockID - 23, // 10: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block:type_name -> tendermint.types.Block - 24, // 11: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info:type_name -> tendermint.p2p.NodeInfo - 13, // 12: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version:type_name -> cosmos.base.tendermint.v1beta1.VersionInfo - 14, // 13: cosmos.base.tendermint.v1beta1.VersionInfo.build_deps:type_name -> cosmos.base.tendermint.v1beta1.Module - 18, // 14: cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops:type_name -> cosmos.base.tendermint.v1beta1.ProofOps - 17, // 15: cosmos.base.tendermint.v1beta1.ProofOps.ops:type_name -> cosmos.base.tendermint.v1beta1.ProofOp - 11, // 16: cosmos.base.tendermint.v1beta1.Service.GetNodeInfo:input_type -> cosmos.base.tendermint.v1beta1.GetNodeInfoRequest - 9, // 17: cosmos.base.tendermint.v1beta1.Service.GetSyncing:input_type -> cosmos.base.tendermint.v1beta1.GetSyncingRequest - 7, // 18: cosmos.base.tendermint.v1beta1.Service.GetLatestBlock:input_type -> cosmos.base.tendermint.v1beta1.GetLatestBlockRequest - 5, // 19: cosmos.base.tendermint.v1beta1.Service.GetBlockByHeight:input_type -> cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest - 2, // 20: cosmos.base.tendermint.v1beta1.Service.GetLatestValidatorSet:input_type -> cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest - 0, // 21: cosmos.base.tendermint.v1beta1.Service.GetValidatorSetByHeight:input_type -> cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest - 15, // 22: cosmos.base.tendermint.v1beta1.Service.ABCIQuery:input_type -> cosmos.base.tendermint.v1beta1.ABCIQueryRequest - 12, // 23: cosmos.base.tendermint.v1beta1.Service.GetNodeInfo:output_type -> cosmos.base.tendermint.v1beta1.GetNodeInfoResponse - 10, // 24: cosmos.base.tendermint.v1beta1.Service.GetSyncing:output_type -> cosmos.base.tendermint.v1beta1.GetSyncingResponse - 8, // 25: cosmos.base.tendermint.v1beta1.Service.GetLatestBlock:output_type -> cosmos.base.tendermint.v1beta1.GetLatestBlockResponse - 6, // 26: cosmos.base.tendermint.v1beta1.Service.GetBlockByHeight:output_type -> cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse - 3, // 27: cosmos.base.tendermint.v1beta1.Service.GetLatestValidatorSet:output_type -> cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse - 1, // 28: cosmos.base.tendermint.v1beta1.Service.GetValidatorSetByHeight:output_type -> cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse - 16, // 29: cosmos.base.tendermint.v1beta1.Service.ABCIQuery:output_type -> cosmos.base.tendermint.v1beta1.ABCIQueryResponse - 23, // [23:30] is the sub-list for method output_type - 16, // [16:23] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_cosmos_base_tendermint_v1beta1_query_proto_init() } -func file_cosmos_base_tendermint_v1beta1_query_proto_init() { - if File_cosmos_base_tendermint_v1beta1_query_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValidatorSetByHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValidatorSetByHeightResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestValidatorSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestValidatorSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockByHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockByHeightResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestBlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestBlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSyncingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSyncingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABCIQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABCIQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofOp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofOps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_base_tendermint_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_base_tendermint_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_base_tendermint_v1beta1_query_proto = out.File - file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc = nil - file_cosmos_base_tendermint_v1beta1_query_proto_goTypes = nil - file_cosmos_base_tendermint_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go b/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go deleted file mode 100644 index b21c4f7f8459..000000000000 --- a/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/base/tendermint/v1beta1/query.proto - -package tendermintv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceClient interface { - // GetNodeInfo queries the current node info. - GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) - // GetSyncing queries node syncing. - GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) - // GetLatestBlock returns the latest block. - GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) - // GetLatestValidatorSet queries latest validator-set. - GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) - // GetValidatorSetByHeight queries validator-set at a given height. - GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - // - // Since: cosmos-sdk 0.46 - ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) -} - -type serviceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { - out := new(GetNodeInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) { - out := new(GetSyncingResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) { - out := new(GetLatestBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) { - out := new(GetBlockByHeightResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) { - out := new(GetLatestValidatorSetResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) { - out := new(GetValidatorSetByHeightResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) { - out := new(ABCIQueryResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceServer is the server API for Service service. -// All implementations must embed UnimplementedServiceServer -// for forward compatibility -type ServiceServer interface { - // GetNodeInfo queries the current node info. - GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) - // GetSyncing queries node syncing. - GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) - // GetLatestBlock returns the latest block. - GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) - // GetLatestValidatorSet queries latest validator-set. - GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) - // GetValidatorSetByHeight queries validator-set at a given height. - GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - // - // Since: cosmos-sdk 0.46 - ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) - mustEmbedUnimplementedServiceServer() -} - -// UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (UnimplementedServiceServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") -} -func (UnimplementedServiceServer) GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSyncing not implemented") -} -func (UnimplementedServiceServer) GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestBlock not implemented") -} -func (UnimplementedServiceServer) GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented") -} -func (UnimplementedServiceServer) GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestValidatorSet not implemented") -} -func (UnimplementedServiceServer) GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetByHeight not implemented") -} -func (UnimplementedServiceServer) ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ABCIQuery not implemented") -} -func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} - -// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceServer will -// result in compilation errors. -type UnsafeServiceServer interface { - mustEmbedUnimplementedServiceServer() -} - -func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&Service_ServiceDesc, srv) -} - -func _Service_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetNodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetSyncing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSyncingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetSyncing(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetSyncing(ctx, req.(*GetSyncingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetLatestBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetLatestBlock(ctx, req.(*GetLatestBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetLatestValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestValidatorSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetLatestValidatorSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetLatestValidatorSet(ctx, req.(*GetLatestValidatorSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetValidatorSetByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorSetByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetValidatorSetByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetValidatorSetByHeight(ctx, req.(*GetValidatorSetByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_ABCIQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABCIQueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).ABCIQuery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).ABCIQuery(ctx, req.(*ABCIQueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Service_ServiceDesc is the grpc.ServiceDesc for Service service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.base.tendermint.v1beta1.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetNodeInfo", - Handler: _Service_GetNodeInfo_Handler, - }, - { - MethodName: "GetSyncing", - Handler: _Service_GetSyncing_Handler, - }, - { - MethodName: "GetLatestBlock", - Handler: _Service_GetLatestBlock_Handler, - }, - { - MethodName: "GetBlockByHeight", - Handler: _Service_GetBlockByHeight_Handler, - }, - { - MethodName: "GetLatestValidatorSet", - Handler: _Service_GetLatestValidatorSet_Handler, - }, - { - MethodName: "GetValidatorSetByHeight", - Handler: _Service_GetValidatorSetByHeight_Handler, - }, - { - MethodName: "ABCIQuery", - Handler: _Service_ABCIQuery_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/base/tendermint/v1beta1/query.proto", -} diff --git a/api/cosmos/base/v1beta1/coin.pulsar.go b/api/cosmos/base/v1beta1/coin.pulsar.go deleted file mode 100644 index 52162e9cd3c7..000000000000 --- a/api/cosmos/base/v1beta1/coin.pulsar.go +++ /dev/null @@ -1,2148 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package basev1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Coin protoreflect.MessageDescriptor - fd_Coin_denom protoreflect.FieldDescriptor - fd_Coin_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_v1beta1_coin_proto_init() - md_Coin = File_cosmos_base_v1beta1_coin_proto.Messages().ByName("Coin") - fd_Coin_denom = md_Coin.Fields().ByName("denom") - fd_Coin_amount = md_Coin.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_Coin)(nil) - -type fastReflection_Coin Coin - -func (x *Coin) ProtoReflect() protoreflect.Message { - return (*fastReflection_Coin)(x) -} - -func (x *Coin) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Coin_messageType fastReflection_Coin_messageType -var _ protoreflect.MessageType = fastReflection_Coin_messageType{} - -type fastReflection_Coin_messageType struct{} - -func (x fastReflection_Coin_messageType) Zero() protoreflect.Message { - return (*fastReflection_Coin)(nil) -} -func (x fastReflection_Coin_messageType) New() protoreflect.Message { - return new(fastReflection_Coin) -} -func (x fastReflection_Coin_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Coin -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Coin) Descriptor() protoreflect.MessageDescriptor { - return md_Coin -} - -// 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_Coin) Type() protoreflect.MessageType { - return _fastReflection_Coin_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Coin) New() protoreflect.Message { - return new(fastReflection_Coin) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Coin) Interface() protoreflect.ProtoMessage { - return (*Coin)(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_Coin) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_Coin_denom, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_Coin_amount, 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_Coin) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.v1beta1.Coin.denom": - return x.Denom != "" - case "cosmos.base.v1beta1.Coin.amount": - return x.Amount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.Coin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.Coin 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_Coin) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.v1beta1.Coin.denom": - x.Denom = "" - case "cosmos.base.v1beta1.Coin.amount": - x.Amount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.Coin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.Coin 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_Coin) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.v1beta1.Coin.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "cosmos.base.v1beta1.Coin.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.Coin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.Coin 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_Coin) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.v1beta1.Coin.denom": - x.Denom = value.Interface().(string) - case "cosmos.base.v1beta1.Coin.amount": - x.Amount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.Coin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.Coin 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_Coin) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.Coin.denom": - panic(fmt.Errorf("field denom of message cosmos.base.v1beta1.Coin is not mutable")) - case "cosmos.base.v1beta1.Coin.amount": - panic(fmt.Errorf("field amount of message cosmos.base.v1beta1.Coin is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.Coin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.Coin 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_Coin) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.Coin.denom": - return protoreflect.ValueOfString("") - case "cosmos.base.v1beta1.Coin.amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.Coin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.Coin 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_Coin) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.v1beta1.Coin", 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_Coin) 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_Coin) 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_Coin) 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_Coin) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Coin) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Coin) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Coin) - 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: Coin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Coin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DecCoin protoreflect.MessageDescriptor - fd_DecCoin_denom protoreflect.FieldDescriptor - fd_DecCoin_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_v1beta1_coin_proto_init() - md_DecCoin = File_cosmos_base_v1beta1_coin_proto.Messages().ByName("DecCoin") - fd_DecCoin_denom = md_DecCoin.Fields().ByName("denom") - fd_DecCoin_amount = md_DecCoin.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_DecCoin)(nil) - -type fastReflection_DecCoin DecCoin - -func (x *DecCoin) ProtoReflect() protoreflect.Message { - return (*fastReflection_DecCoin)(x) -} - -func (x *DecCoin) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DecCoin_messageType fastReflection_DecCoin_messageType -var _ protoreflect.MessageType = fastReflection_DecCoin_messageType{} - -type fastReflection_DecCoin_messageType struct{} - -func (x fastReflection_DecCoin_messageType) Zero() protoreflect.Message { - return (*fastReflection_DecCoin)(nil) -} -func (x fastReflection_DecCoin_messageType) New() protoreflect.Message { - return new(fastReflection_DecCoin) -} -func (x fastReflection_DecCoin_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DecCoin -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DecCoin) Descriptor() protoreflect.MessageDescriptor { - return md_DecCoin -} - -// 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_DecCoin) Type() protoreflect.MessageType { - return _fastReflection_DecCoin_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DecCoin) New() protoreflect.Message { - return new(fastReflection_DecCoin) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DecCoin) Interface() protoreflect.ProtoMessage { - return (*DecCoin)(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_DecCoin) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_DecCoin_denom, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_DecCoin_amount, 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_DecCoin) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecCoin.denom": - return x.Denom != "" - case "cosmos.base.v1beta1.DecCoin.amount": - return x.Amount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecCoin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecCoin 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_DecCoin) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecCoin.denom": - x.Denom = "" - case "cosmos.base.v1beta1.DecCoin.amount": - x.Amount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecCoin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecCoin 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_DecCoin) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.v1beta1.DecCoin.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "cosmos.base.v1beta1.DecCoin.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecCoin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecCoin 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_DecCoin) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecCoin.denom": - x.Denom = value.Interface().(string) - case "cosmos.base.v1beta1.DecCoin.amount": - x.Amount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecCoin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecCoin 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_DecCoin) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecCoin.denom": - panic(fmt.Errorf("field denom of message cosmos.base.v1beta1.DecCoin is not mutable")) - case "cosmos.base.v1beta1.DecCoin.amount": - panic(fmt.Errorf("field amount of message cosmos.base.v1beta1.DecCoin is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecCoin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecCoin 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_DecCoin) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecCoin.denom": - return protoreflect.ValueOfString("") - case "cosmos.base.v1beta1.DecCoin.amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecCoin")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecCoin 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_DecCoin) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.v1beta1.DecCoin", 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_DecCoin) 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_DecCoin) 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_DecCoin) 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_DecCoin) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DecCoin) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DecCoin) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DecCoin) - 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: DecCoin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecCoin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_IntProto protoreflect.MessageDescriptor - fd_IntProto_int protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_v1beta1_coin_proto_init() - md_IntProto = File_cosmos_base_v1beta1_coin_proto.Messages().ByName("IntProto") - fd_IntProto_int = md_IntProto.Fields().ByName("int") -} - -var _ protoreflect.Message = (*fastReflection_IntProto)(nil) - -type fastReflection_IntProto IntProto - -func (x *IntProto) ProtoReflect() protoreflect.Message { - return (*fastReflection_IntProto)(x) -} - -func (x *IntProto) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_IntProto_messageType fastReflection_IntProto_messageType -var _ protoreflect.MessageType = fastReflection_IntProto_messageType{} - -type fastReflection_IntProto_messageType struct{} - -func (x fastReflection_IntProto_messageType) Zero() protoreflect.Message { - return (*fastReflection_IntProto)(nil) -} -func (x fastReflection_IntProto_messageType) New() protoreflect.Message { - return new(fastReflection_IntProto) -} -func (x fastReflection_IntProto_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_IntProto -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_IntProto) Descriptor() protoreflect.MessageDescriptor { - return md_IntProto -} - -// 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_IntProto) Type() protoreflect.MessageType { - return _fastReflection_IntProto_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_IntProto) New() protoreflect.Message { - return new(fastReflection_IntProto) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_IntProto) Interface() protoreflect.ProtoMessage { - return (*IntProto)(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_IntProto) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Int != "" { - value := protoreflect.ValueOfString(x.Int) - if !f(fd_IntProto_int, 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_IntProto) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.v1beta1.IntProto.int": - return x.Int != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.IntProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.IntProto 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_IntProto) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.v1beta1.IntProto.int": - x.Int = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.IntProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.IntProto 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_IntProto) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.v1beta1.IntProto.int": - value := x.Int - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.IntProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.IntProto 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_IntProto) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.v1beta1.IntProto.int": - x.Int = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.IntProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.IntProto 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_IntProto) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.IntProto.int": - panic(fmt.Errorf("field int of message cosmos.base.v1beta1.IntProto is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.IntProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.IntProto 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_IntProto) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.IntProto.int": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.IntProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.IntProto 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_IntProto) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.v1beta1.IntProto", 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_IntProto) 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_IntProto) 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_IntProto) 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_IntProto) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*IntProto) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Int) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*IntProto) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Int) > 0 { - i -= len(x.Int) - copy(dAtA[i:], x.Int) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Int))) - 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().(*IntProto) - 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: IntProto: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IntProto: 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 Int", 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.Int = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DecProto protoreflect.MessageDescriptor - fd_DecProto_dec protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_v1beta1_coin_proto_init() - md_DecProto = File_cosmos_base_v1beta1_coin_proto.Messages().ByName("DecProto") - fd_DecProto_dec = md_DecProto.Fields().ByName("dec") -} - -var _ protoreflect.Message = (*fastReflection_DecProto)(nil) - -type fastReflection_DecProto DecProto - -func (x *DecProto) ProtoReflect() protoreflect.Message { - return (*fastReflection_DecProto)(x) -} - -func (x *DecProto) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DecProto_messageType fastReflection_DecProto_messageType -var _ protoreflect.MessageType = fastReflection_DecProto_messageType{} - -type fastReflection_DecProto_messageType struct{} - -func (x fastReflection_DecProto_messageType) Zero() protoreflect.Message { - return (*fastReflection_DecProto)(nil) -} -func (x fastReflection_DecProto_messageType) New() protoreflect.Message { - return new(fastReflection_DecProto) -} -func (x fastReflection_DecProto_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DecProto -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DecProto) Descriptor() protoreflect.MessageDescriptor { - return md_DecProto -} - -// 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_DecProto) Type() protoreflect.MessageType { - return _fastReflection_DecProto_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DecProto) New() protoreflect.Message { - return new(fastReflection_DecProto) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DecProto) Interface() protoreflect.ProtoMessage { - return (*DecProto)(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_DecProto) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Dec != "" { - value := protoreflect.ValueOfString(x.Dec) - if !f(fd_DecProto_dec, 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_DecProto) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecProto.dec": - return x.Dec != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecProto 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_DecProto) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecProto.dec": - x.Dec = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecProto 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_DecProto) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.v1beta1.DecProto.dec": - value := x.Dec - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecProto 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_DecProto) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecProto.dec": - x.Dec = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecProto 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_DecProto) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecProto.dec": - panic(fmt.Errorf("field dec of message cosmos.base.v1beta1.DecProto is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecProto 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_DecProto) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.v1beta1.DecProto.dec": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.v1beta1.DecProto")) - } - panic(fmt.Errorf("message cosmos.base.v1beta1.DecProto 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_DecProto) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.v1beta1.DecProto", 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_DecProto) 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_DecProto) 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_DecProto) 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_DecProto) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DecProto) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Dec) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DecProto) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Dec) > 0 { - i -= len(x.Dec) - copy(dAtA[i:], x.Dec) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Dec))) - 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().(*DecProto) - 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: DecProto: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecProto: 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 Dec", 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.Dec = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/v1beta1/coin.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Coin defines a token with a denomination and an amount. -// -// NOTE: The amount field is an Int which implements the custom method -// signatures required by gogoproto. -type Coin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Coin) Reset() { - *x = Coin{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Coin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Coin) ProtoMessage() {} - -// Deprecated: Use Coin.ProtoReflect.Descriptor instead. -func (*Coin) Descriptor() ([]byte, []int) { - return file_cosmos_base_v1beta1_coin_proto_rawDescGZIP(), []int{0} -} - -func (x *Coin) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *Coin) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -// DecCoin defines a token with a denomination and a decimal amount. -// -// NOTE: The amount field is an Dec which implements the custom method -// signatures required by gogoproto. -type DecCoin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *DecCoin) Reset() { - *x = DecCoin{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DecCoin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DecCoin) ProtoMessage() {} - -// Deprecated: Use DecCoin.ProtoReflect.Descriptor instead. -func (*DecCoin) Descriptor() ([]byte, []int) { - return file_cosmos_base_v1beta1_coin_proto_rawDescGZIP(), []int{1} -} - -func (x *DecCoin) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *DecCoin) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -// IntProto defines a Protobuf wrapper around an Int object. -type IntProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Int string `protobuf:"bytes,1,opt,name=int,proto3" json:"int,omitempty"` -} - -func (x *IntProto) Reset() { - *x = IntProto{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IntProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IntProto) ProtoMessage() {} - -// Deprecated: Use IntProto.ProtoReflect.Descriptor instead. -func (*IntProto) Descriptor() ([]byte, []int) { - return file_cosmos_base_v1beta1_coin_proto_rawDescGZIP(), []int{2} -} - -func (x *IntProto) GetInt() string { - if x != nil { - return x.Int - } - return "" -} - -// DecProto defines a Protobuf wrapper around a Dec object. -type DecProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dec string `protobuf:"bytes,1,opt,name=dec,proto3" json:"dec,omitempty"` -} - -func (x *DecProto) Reset() { - *x = DecProto{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_v1beta1_coin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DecProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DecProto) ProtoMessage() {} - -// Deprecated: Use DecProto.ProtoReflect.Descriptor instead. -func (*DecProto) Descriptor() ([]byte, []int) { - return file_cosmos_base_v1beta1_coin_proto_rawDescGZIP(), []int{3} -} - -func (x *DecProto) GetDec() string { - if x != nil { - return x.Dec - } - return "" -} - -var File_cosmos_base_v1beta1_coin_proto protoreflect.FileDescriptor - -var file_cosmos_base_v1beta1_coin_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x55, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x03, 0x49, 0x6e, - 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x58, 0x0a, - 0x07, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x31, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x03, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x03, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x69, 0x6e, 0x74, - 0x22, 0x37, 0x0a, 0x08, 0x44, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x03, - 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x03, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x03, 0x64, 0x65, 0x63, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x73, 0x65, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x42, 0x61, 0x73, 0x65, 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, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xd8, 0xe1, 0x1e, 0x00, 0x80, 0xe2, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_v1beta1_coin_proto_rawDescOnce sync.Once - file_cosmos_base_v1beta1_coin_proto_rawDescData = file_cosmos_base_v1beta1_coin_proto_rawDesc -) - -func file_cosmos_base_v1beta1_coin_proto_rawDescGZIP() []byte { - file_cosmos_base_v1beta1_coin_proto_rawDescOnce.Do(func() { - file_cosmos_base_v1beta1_coin_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_v1beta1_coin_proto_rawDescData) - }) - return file_cosmos_base_v1beta1_coin_proto_rawDescData -} - -var file_cosmos_base_v1beta1_coin_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_base_v1beta1_coin_proto_goTypes = []interface{}{ - (*Coin)(nil), // 0: cosmos.base.v1beta1.Coin - (*DecCoin)(nil), // 1: cosmos.base.v1beta1.DecCoin - (*IntProto)(nil), // 2: cosmos.base.v1beta1.IntProto - (*DecProto)(nil), // 3: cosmos.base.v1beta1.DecProto -} -var file_cosmos_base_v1beta1_coin_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_base_v1beta1_coin_proto_init() } -func file_cosmos_base_v1beta1_coin_proto_init() { - if File_cosmos_base_v1beta1_coin_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_v1beta1_coin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Coin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_v1beta1_coin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecCoin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_v1beta1_coin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IntProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_v1beta1_coin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_v1beta1_coin_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_base_v1beta1_coin_proto_goTypes, - DependencyIndexes: file_cosmos_base_v1beta1_coin_proto_depIdxs, - MessageInfos: file_cosmos_base_v1beta1_coin_proto_msgTypes, - }.Build() - File_cosmos_base_v1beta1_coin_proto = out.File - file_cosmos_base_v1beta1_coin_proto_rawDesc = nil - file_cosmos_base_v1beta1_coin_proto_goTypes = nil - file_cosmos_base_v1beta1_coin_proto_depIdxs = nil -} diff --git a/api/cosmos/capability/v1beta1/capability.pulsar.go b/api/cosmos/capability/v1beta1/capability.pulsar.go deleted file mode 100644 index fe02b64b3c73..000000000000 --- a/api/cosmos/capability/v1beta1/capability.pulsar.go +++ /dev/null @@ -1,1658 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package capabilityv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Capability protoreflect.MessageDescriptor - fd_Capability_index protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_capability_v1beta1_capability_proto_init() - md_Capability = File_cosmos_capability_v1beta1_capability_proto.Messages().ByName("Capability") - fd_Capability_index = md_Capability.Fields().ByName("index") -} - -var _ protoreflect.Message = (*fastReflection_Capability)(nil) - -type fastReflection_Capability Capability - -func (x *Capability) ProtoReflect() protoreflect.Message { - return (*fastReflection_Capability)(x) -} - -func (x *Capability) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_capability_v1beta1_capability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Capability_messageType fastReflection_Capability_messageType -var _ protoreflect.MessageType = fastReflection_Capability_messageType{} - -type fastReflection_Capability_messageType struct{} - -func (x fastReflection_Capability_messageType) Zero() protoreflect.Message { - return (*fastReflection_Capability)(nil) -} -func (x fastReflection_Capability_messageType) New() protoreflect.Message { - return new(fastReflection_Capability) -} -func (x fastReflection_Capability_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Capability -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Capability) Descriptor() protoreflect.MessageDescriptor { - return md_Capability -} - -// 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_Capability) Type() protoreflect.MessageType { - return _fastReflection_Capability_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Capability) New() protoreflect.Message { - return new(fastReflection_Capability) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Capability) Interface() protoreflect.ProtoMessage { - return (*Capability)(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_Capability) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Index != uint64(0) { - value := protoreflect.ValueOfUint64(x.Index) - if !f(fd_Capability_index, 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_Capability) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Capability.index": - return x.Index != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Capability")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Capability 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_Capability) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Capability.index": - x.Index = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Capability")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Capability 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_Capability) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.capability.v1beta1.Capability.index": - value := x.Index - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Capability")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Capability 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_Capability) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Capability.index": - x.Index = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Capability")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Capability 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_Capability) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Capability.index": - panic(fmt.Errorf("field index of message cosmos.capability.v1beta1.Capability is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Capability")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Capability 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_Capability) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Capability.index": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Capability")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Capability 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_Capability) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.capability.v1beta1.Capability", 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_Capability) 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_Capability) 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_Capability) 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_Capability) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Capability) - 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.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - 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().(*Capability) - 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.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Capability) - 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: Capability: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Owner protoreflect.MessageDescriptor - fd_Owner_module protoreflect.FieldDescriptor - fd_Owner_name protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_capability_v1beta1_capability_proto_init() - md_Owner = File_cosmos_capability_v1beta1_capability_proto.Messages().ByName("Owner") - fd_Owner_module = md_Owner.Fields().ByName("module") - fd_Owner_name = md_Owner.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_Owner)(nil) - -type fastReflection_Owner Owner - -func (x *Owner) ProtoReflect() protoreflect.Message { - return (*fastReflection_Owner)(x) -} - -func (x *Owner) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_capability_v1beta1_capability_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Owner_messageType fastReflection_Owner_messageType -var _ protoreflect.MessageType = fastReflection_Owner_messageType{} - -type fastReflection_Owner_messageType struct{} - -func (x fastReflection_Owner_messageType) Zero() protoreflect.Message { - return (*fastReflection_Owner)(nil) -} -func (x fastReflection_Owner_messageType) New() protoreflect.Message { - return new(fastReflection_Owner) -} -func (x fastReflection_Owner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Owner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Owner) Descriptor() protoreflect.MessageDescriptor { - return md_Owner -} - -// 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_Owner) Type() protoreflect.MessageType { - return _fastReflection_Owner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Owner) New() protoreflect.Message { - return new(fastReflection_Owner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Owner) Interface() protoreflect.ProtoMessage { - return (*Owner)(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_Owner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Module != "" { - value := protoreflect.ValueOfString(x.Module) - if !f(fd_Owner_module, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Owner_name, 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_Owner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Owner.module": - return x.Module != "" - case "cosmos.capability.v1beta1.Owner.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Owner")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Owner 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_Owner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Owner.module": - x.Module = "" - case "cosmos.capability.v1beta1.Owner.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Owner")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Owner 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_Owner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.capability.v1beta1.Owner.module": - value := x.Module - return protoreflect.ValueOfString(value) - case "cosmos.capability.v1beta1.Owner.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Owner")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Owner 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_Owner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Owner.module": - x.Module = value.Interface().(string) - case "cosmos.capability.v1beta1.Owner.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Owner")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Owner 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_Owner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Owner.module": - panic(fmt.Errorf("field module of message cosmos.capability.v1beta1.Owner is not mutable")) - case "cosmos.capability.v1beta1.Owner.name": - panic(fmt.Errorf("field name of message cosmos.capability.v1beta1.Owner is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Owner")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Owner 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_Owner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.Owner.module": - return protoreflect.ValueOfString("") - case "cosmos.capability.v1beta1.Owner.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.Owner")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.Owner 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_Owner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.capability.v1beta1.Owner", 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_Owner) 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_Owner) 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_Owner) 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_Owner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Owner) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Module) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Owner) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if len(x.Module) > 0 { - i -= len(x.Module) - copy(dAtA[i:], x.Module) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Module))) - 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().(*Owner) - 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: Owner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Owner: 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 Module", 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.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_CapabilityOwners_1_list)(nil) - -type _CapabilityOwners_1_list struct { - list *[]*Owner -} - -func (x *_CapabilityOwners_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_CapabilityOwners_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_CapabilityOwners_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Owner) - (*x.list)[i] = concreteValue -} - -func (x *_CapabilityOwners_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Owner) - *x.list = append(*x.list, concreteValue) -} - -func (x *_CapabilityOwners_1_list) AppendMutable() protoreflect.Value { - v := new(Owner) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CapabilityOwners_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_CapabilityOwners_1_list) NewElement() protoreflect.Value { - v := new(Owner) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CapabilityOwners_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_CapabilityOwners protoreflect.MessageDescriptor - fd_CapabilityOwners_owners protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_capability_v1beta1_capability_proto_init() - md_CapabilityOwners = File_cosmos_capability_v1beta1_capability_proto.Messages().ByName("CapabilityOwners") - fd_CapabilityOwners_owners = md_CapabilityOwners.Fields().ByName("owners") -} - -var _ protoreflect.Message = (*fastReflection_CapabilityOwners)(nil) - -type fastReflection_CapabilityOwners CapabilityOwners - -func (x *CapabilityOwners) ProtoReflect() protoreflect.Message { - return (*fastReflection_CapabilityOwners)(x) -} - -func (x *CapabilityOwners) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_capability_v1beta1_capability_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CapabilityOwners_messageType fastReflection_CapabilityOwners_messageType -var _ protoreflect.MessageType = fastReflection_CapabilityOwners_messageType{} - -type fastReflection_CapabilityOwners_messageType struct{} - -func (x fastReflection_CapabilityOwners_messageType) Zero() protoreflect.Message { - return (*fastReflection_CapabilityOwners)(nil) -} -func (x fastReflection_CapabilityOwners_messageType) New() protoreflect.Message { - return new(fastReflection_CapabilityOwners) -} -func (x fastReflection_CapabilityOwners_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CapabilityOwners -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CapabilityOwners) Descriptor() protoreflect.MessageDescriptor { - return md_CapabilityOwners -} - -// 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_CapabilityOwners) Type() protoreflect.MessageType { - return _fastReflection_CapabilityOwners_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CapabilityOwners) New() protoreflect.Message { - return new(fastReflection_CapabilityOwners) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CapabilityOwners) Interface() protoreflect.ProtoMessage { - return (*CapabilityOwners)(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_CapabilityOwners) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Owners) != 0 { - value := protoreflect.ValueOfList(&_CapabilityOwners_1_list{list: &x.Owners}) - if !f(fd_CapabilityOwners_owners, 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_CapabilityOwners) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.capability.v1beta1.CapabilityOwners.owners": - return len(x.Owners) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.CapabilityOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.CapabilityOwners 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_CapabilityOwners) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.CapabilityOwners.owners": - x.Owners = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.CapabilityOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.CapabilityOwners 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_CapabilityOwners) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.capability.v1beta1.CapabilityOwners.owners": - if len(x.Owners) == 0 { - return protoreflect.ValueOfList(&_CapabilityOwners_1_list{}) - } - listValue := &_CapabilityOwners_1_list{list: &x.Owners} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.CapabilityOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.CapabilityOwners 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_CapabilityOwners) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.CapabilityOwners.owners": - lv := value.List() - clv := lv.(*_CapabilityOwners_1_list) - x.Owners = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.CapabilityOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.CapabilityOwners 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_CapabilityOwners) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.CapabilityOwners.owners": - if x.Owners == nil { - x.Owners = []*Owner{} - } - value := &_CapabilityOwners_1_list{list: &x.Owners} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.CapabilityOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.CapabilityOwners 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_CapabilityOwners) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.CapabilityOwners.owners": - list := []*Owner{} - return protoreflect.ValueOfList(&_CapabilityOwners_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.CapabilityOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.CapabilityOwners 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_CapabilityOwners) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.capability.v1beta1.CapabilityOwners", 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_CapabilityOwners) 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_CapabilityOwners) 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_CapabilityOwners) 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_CapabilityOwners) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CapabilityOwners) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Owners) > 0 { - for _, e := range x.Owners { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CapabilityOwners) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owners) > 0 { - for iNdEx := len(x.Owners) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Owners[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CapabilityOwners) - 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: CapabilityOwners: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CapabilityOwners: 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 Owners", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Owners = append(x.Owners, &Owner{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Owners[len(x.Owners)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/capability/v1beta1/capability.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Capability defines an implementation of an object capability. The index -// provided to a Capability must be globally unique. -type Capability struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` -} - -func (x *Capability) Reset() { - *x = Capability{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_capability_v1beta1_capability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Capability) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Capability) ProtoMessage() {} - -// Deprecated: Use Capability.ProtoReflect.Descriptor instead. -func (*Capability) Descriptor() ([]byte, []int) { - return file_cosmos_capability_v1beta1_capability_proto_rawDescGZIP(), []int{0} -} - -func (x *Capability) GetIndex() uint64 { - if x != nil { - return x.Index - } - return 0 -} - -// Owner defines a single capability owner. An owner is defined by the name of -// capability and the module name. -type Owner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Owner) Reset() { - *x = Owner{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_capability_v1beta1_capability_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Owner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Owner) ProtoMessage() {} - -// Deprecated: Use Owner.ProtoReflect.Descriptor instead. -func (*Owner) Descriptor() ([]byte, []int) { - return file_cosmos_capability_v1beta1_capability_proto_rawDescGZIP(), []int{1} -} - -func (x *Owner) GetModule() string { - if x != nil { - return x.Module - } - return "" -} - -func (x *Owner) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// CapabilityOwners defines a set of owners of a single Capability. The set of -// owners must be unique. -type CapabilityOwners struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Owners []*Owner `protobuf:"bytes,1,rep,name=owners,proto3" json:"owners,omitempty"` -} - -func (x *CapabilityOwners) Reset() { - *x = CapabilityOwners{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_capability_v1beta1_capability_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CapabilityOwners) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CapabilityOwners) ProtoMessage() {} - -// Deprecated: Use CapabilityOwners.ProtoReflect.Descriptor instead. -func (*CapabilityOwners) Descriptor() ([]byte, []int) { - return file_cosmos_capability_v1beta1_capability_proto_rawDescGZIP(), []int{2} -} - -func (x *CapabilityOwners) GetOwners() []*Owner { - if x != nil { - return x.Owners - } - return nil -} - -var File_cosmos_capability_v1beta1_capability_proto protoreflect.FileDescriptor - -var file_cosmos_capability_v1beta1_capability_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, - 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x3d, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x08, 0x88, 0xa0, - 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x52, 0x0a, 0x10, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x84, 0x02, 0x0a, 0x1d, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x43, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x43, 0x58, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_capability_v1beta1_capability_proto_rawDescOnce sync.Once - file_cosmos_capability_v1beta1_capability_proto_rawDescData = file_cosmos_capability_v1beta1_capability_proto_rawDesc -) - -func file_cosmos_capability_v1beta1_capability_proto_rawDescGZIP() []byte { - file_cosmos_capability_v1beta1_capability_proto_rawDescOnce.Do(func() { - file_cosmos_capability_v1beta1_capability_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_capability_v1beta1_capability_proto_rawDescData) - }) - return file_cosmos_capability_v1beta1_capability_proto_rawDescData -} - -var file_cosmos_capability_v1beta1_capability_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_capability_v1beta1_capability_proto_goTypes = []interface{}{ - (*Capability)(nil), // 0: cosmos.capability.v1beta1.Capability - (*Owner)(nil), // 1: cosmos.capability.v1beta1.Owner - (*CapabilityOwners)(nil), // 2: cosmos.capability.v1beta1.CapabilityOwners -} -var file_cosmos_capability_v1beta1_capability_proto_depIdxs = []int32{ - 1, // 0: cosmos.capability.v1beta1.CapabilityOwners.owners:type_name -> cosmos.capability.v1beta1.Owner - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_capability_v1beta1_capability_proto_init() } -func file_cosmos_capability_v1beta1_capability_proto_init() { - if File_cosmos_capability_v1beta1_capability_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_capability_v1beta1_capability_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Capability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_capability_v1beta1_capability_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Owner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_capability_v1beta1_capability_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CapabilityOwners); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_capability_v1beta1_capability_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_capability_v1beta1_capability_proto_goTypes, - DependencyIndexes: file_cosmos_capability_v1beta1_capability_proto_depIdxs, - MessageInfos: file_cosmos_capability_v1beta1_capability_proto_msgTypes, - }.Build() - File_cosmos_capability_v1beta1_capability_proto = out.File - file_cosmos_capability_v1beta1_capability_proto_rawDesc = nil - file_cosmos_capability_v1beta1_capability_proto_goTypes = nil - file_cosmos_capability_v1beta1_capability_proto_depIdxs = nil -} diff --git a/api/cosmos/capability/v1beta1/genesis.pulsar.go b/api/cosmos/capability/v1beta1/genesis.pulsar.go deleted file mode 100644 index 4d2fee4c4140..000000000000 --- a/api/cosmos/capability/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,1270 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package capabilityv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisOwners protoreflect.MessageDescriptor - fd_GenesisOwners_index protoreflect.FieldDescriptor - fd_GenesisOwners_index_owners protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_capability_v1beta1_genesis_proto_init() - md_GenesisOwners = File_cosmos_capability_v1beta1_genesis_proto.Messages().ByName("GenesisOwners") - fd_GenesisOwners_index = md_GenesisOwners.Fields().ByName("index") - fd_GenesisOwners_index_owners = md_GenesisOwners.Fields().ByName("index_owners") -} - -var _ protoreflect.Message = (*fastReflection_GenesisOwners)(nil) - -type fastReflection_GenesisOwners GenesisOwners - -func (x *GenesisOwners) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisOwners)(x) -} - -func (x *GenesisOwners) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_capability_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisOwners_messageType fastReflection_GenesisOwners_messageType -var _ protoreflect.MessageType = fastReflection_GenesisOwners_messageType{} - -type fastReflection_GenesisOwners_messageType struct{} - -func (x fastReflection_GenesisOwners_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisOwners)(nil) -} -func (x fastReflection_GenesisOwners_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisOwners) -} -func (x fastReflection_GenesisOwners_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisOwners -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisOwners) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisOwners -} - -// 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_GenesisOwners) Type() protoreflect.MessageType { - return _fastReflection_GenesisOwners_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisOwners) New() protoreflect.Message { - return new(fastReflection_GenesisOwners) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisOwners) Interface() protoreflect.ProtoMessage { - return (*GenesisOwners)(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_GenesisOwners) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Index != uint64(0) { - value := protoreflect.ValueOfUint64(x.Index) - if !f(fd_GenesisOwners_index, value) { - return - } - } - if x.IndexOwners != nil { - value := protoreflect.ValueOfMessage(x.IndexOwners.ProtoReflect()) - if !f(fd_GenesisOwners_index_owners, 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_GenesisOwners) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisOwners.index": - return x.Index != uint64(0) - case "cosmos.capability.v1beta1.GenesisOwners.index_owners": - return x.IndexOwners != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisOwners 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_GenesisOwners) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisOwners.index": - x.Index = uint64(0) - case "cosmos.capability.v1beta1.GenesisOwners.index_owners": - x.IndexOwners = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisOwners 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_GenesisOwners) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.capability.v1beta1.GenesisOwners.index": - value := x.Index - return protoreflect.ValueOfUint64(value) - case "cosmos.capability.v1beta1.GenesisOwners.index_owners": - value := x.IndexOwners - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisOwners 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_GenesisOwners) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisOwners.index": - x.Index = value.Uint() - case "cosmos.capability.v1beta1.GenesisOwners.index_owners": - x.IndexOwners = value.Message().Interface().(*CapabilityOwners) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisOwners 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_GenesisOwners) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisOwners.index_owners": - if x.IndexOwners == nil { - x.IndexOwners = new(CapabilityOwners) - } - return protoreflect.ValueOfMessage(x.IndexOwners.ProtoReflect()) - case "cosmos.capability.v1beta1.GenesisOwners.index": - panic(fmt.Errorf("field index of message cosmos.capability.v1beta1.GenesisOwners is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisOwners 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_GenesisOwners) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisOwners.index": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.capability.v1beta1.GenesisOwners.index_owners": - m := new(CapabilityOwners) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisOwners")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisOwners 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_GenesisOwners) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.capability.v1beta1.GenesisOwners", 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_GenesisOwners) 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_GenesisOwners) 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_GenesisOwners) 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_GenesisOwners) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisOwners) - 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.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - if x.IndexOwners != nil { - l = options.Size(x.IndexOwners) - 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().(*GenesisOwners) - 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.IndexOwners != nil { - encoded, err := options.Marshal(x.IndexOwners) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisOwners) - 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: GenesisOwners: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisOwners: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IndexOwners", 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.IndexOwners == nil { - x.IndexOwners = &CapabilityOwners{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IndexOwners); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*GenesisOwners -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GenesisOwners) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GenesisOwners) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(GenesisOwners) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(GenesisOwners) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_index protoreflect.FieldDescriptor - fd_GenesisState_owners protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_capability_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_capability_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_index = md_GenesisState.Fields().ByName("index") - fd_GenesisState_owners = md_GenesisState.Fields().ByName("owners") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_capability_v1beta1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Index != uint64(0) { - value := protoreflect.ValueOfUint64(x.Index) - if !f(fd_GenesisState_index, value) { - return - } - } - if len(x.Owners) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Owners}) - if !f(fd_GenesisState_owners, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisState.index": - return x.Index != uint64(0) - case "cosmos.capability.v1beta1.GenesisState.owners": - return len(x.Owners) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisState.index": - x.Index = uint64(0) - case "cosmos.capability.v1beta1.GenesisState.owners": - x.Owners = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.capability.v1beta1.GenesisState.index": - value := x.Index - return protoreflect.ValueOfUint64(value) - case "cosmos.capability.v1beta1.GenesisState.owners": - if len(x.Owners) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.Owners} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisState.index": - x.Index = value.Uint() - case "cosmos.capability.v1beta1.GenesisState.owners": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Owners = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisState.owners": - if x.Owners == nil { - x.Owners = []*GenesisOwners{} - } - value := &_GenesisState_2_list{list: &x.Owners} - return protoreflect.ValueOfList(value) - case "cosmos.capability.v1beta1.GenesisState.index": - panic(fmt.Errorf("field index of message cosmos.capability.v1beta1.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.capability.v1beta1.GenesisState.index": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.capability.v1beta1.GenesisState.owners": - list := []*GenesisOwners{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.capability.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.capability.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.capability.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - if len(x.Owners) > 0 { - for _, e := range x.Owners { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owners) > 0 { - for iNdEx := len(x.Owners) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Owners[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owners", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Owners = append(x.Owners, &GenesisOwners{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Owners[len(x.Owners)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/capability/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisOwners defines the capability owners with their corresponding index. -type GenesisOwners struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // index is the index of the capability owner. - Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - // index_owners are the owners at the given index. - IndexOwners *CapabilityOwners `protobuf:"bytes,2,opt,name=index_owners,json=indexOwners,proto3" json:"index_owners,omitempty"` -} - -func (x *GenesisOwners) Reset() { - *x = GenesisOwners{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_capability_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisOwners) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisOwners) ProtoMessage() {} - -// Deprecated: Use GenesisOwners.ProtoReflect.Descriptor instead. -func (*GenesisOwners) Descriptor() ([]byte, []int) { - return file_cosmos_capability_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisOwners) GetIndex() uint64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *GenesisOwners) GetIndexOwners() *CapabilityOwners { - if x != nil { - return x.IndexOwners - } - return nil -} - -// GenesisState defines the capability module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // index is the capability global index. - Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - // owners represents a map from index to owners of the capability index - // index key is string to allow amino marshalling. - Owners []*GenesisOwners `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_capability_v1beta1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_capability_v1beta1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *GenesisState) GetIndex() uint64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *GenesisState) GetOwners() []*GenesisOwners { - if x != nil { - return x.Owners - } - return nil -} - -var File_cosmos_capability_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_capability_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, - 0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x22, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x06, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x42, 0x81, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_capability_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_capability_v1beta1_genesis_proto_rawDescData = file_cosmos_capability_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_capability_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_capability_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_capability_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_capability_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_capability_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_capability_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_capability_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisOwners)(nil), // 0: cosmos.capability.v1beta1.GenesisOwners - (*GenesisState)(nil), // 1: cosmos.capability.v1beta1.GenesisState - (*CapabilityOwners)(nil), // 2: cosmos.capability.v1beta1.CapabilityOwners -} -var file_cosmos_capability_v1beta1_genesis_proto_depIdxs = []int32{ - 2, // 0: cosmos.capability.v1beta1.GenesisOwners.index_owners:type_name -> cosmos.capability.v1beta1.CapabilityOwners - 0, // 1: cosmos.capability.v1beta1.GenesisState.owners:type_name -> cosmos.capability.v1beta1.GenesisOwners - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_capability_v1beta1_genesis_proto_init() } -func file_cosmos_capability_v1beta1_genesis_proto_init() { - if File_cosmos_capability_v1beta1_genesis_proto != nil { - return - } - file_cosmos_capability_v1beta1_capability_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_capability_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisOwners); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_capability_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_capability_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_capability_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_capability_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_capability_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_capability_v1beta1_genesis_proto = out.File - file_cosmos_capability_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_capability_v1beta1_genesis_proto_goTypes = nil - file_cosmos_capability_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/crisis/v1beta1/genesis.pulsar.go b/api/cosmos/crisis/v1beta1/genesis.pulsar.go deleted file mode 100644 index 2eb440839d5d..000000000000 --- a/api/cosmos/crisis/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,599 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package crisisv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_constant_fee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_crisis_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_constant_fee = md_GenesisState.Fields().ByName("constant_fee") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConstantFee != nil { - value := protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect()) - if !f(fd_GenesisState_constant_fee, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - return x.ConstantFee != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - x.ConstantFee = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - value := x.ConstantFee - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - x.ConstantFee = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - if x.ConstantFee == nil { - x.ConstantFee = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.GenesisState.constant_fee": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.ConstantFee != nil { - l = options.Size(x.ConstantFee) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ConstantFee != nil { - encoded, err := options.Marshal(x.ConstantFee) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConstantFee", 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.ConstantFee == nil { - x.ConstantFee = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConstantFee); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crisis/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the crisis module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // constant_fee is the fee used to verify the invariant in the crisis - // module. - ConstantFee *v1beta1.Coin `protobuf:"bytes,3,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetConstantFee() *v1beta1.Coin { - if x != nil { - return x.ConstantFee - } - return nil -} - -var File_cosmos_crisis_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_crisis_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, - 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x66, - 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x42, 0xe5, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, - 0x69, 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x72, 0x69, - 0x73, 0x69, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, - 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, - 0x72, 0x69, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crisis_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_crisis_v1beta1_genesis_proto_rawDescData = file_cosmos_crisis_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_crisis_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_crisis_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_crisis_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crisis_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_crisis_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_crisis_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_crisis_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.crisis.v1beta1.GenesisState - (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin -} -var file_cosmos_crisis_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.crisis.v1beta1.GenesisState.constant_fee:type_name -> cosmos.base.v1beta1.Coin - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_crisis_v1beta1_genesis_proto_init() } -func file_cosmos_crisis_v1beta1_genesis_proto_init() { - if File_cosmos_crisis_v1beta1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crisis_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crisis_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_crisis_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_crisis_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_crisis_v1beta1_genesis_proto = out.File - file_cosmos_crisis_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_crisis_v1beta1_genesis_proto_goTypes = nil - file_cosmos_crisis_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/crisis/v1beta1/tx.pulsar.go b/api/cosmos/crisis/v1beta1/tx.pulsar.go deleted file mode 100644 index 574ef5f116d1..000000000000 --- a/api/cosmos/crisis/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,1139 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package crisisv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgVerifyInvariant protoreflect.MessageDescriptor - fd_MsgVerifyInvariant_sender protoreflect.FieldDescriptor - fd_MsgVerifyInvariant_invariant_module_name protoreflect.FieldDescriptor - fd_MsgVerifyInvariant_invariant_route protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_tx_proto_init() - md_MsgVerifyInvariant = File_cosmos_crisis_v1beta1_tx_proto.Messages().ByName("MsgVerifyInvariant") - fd_MsgVerifyInvariant_sender = md_MsgVerifyInvariant.Fields().ByName("sender") - fd_MsgVerifyInvariant_invariant_module_name = md_MsgVerifyInvariant.Fields().ByName("invariant_module_name") - fd_MsgVerifyInvariant_invariant_route = md_MsgVerifyInvariant.Fields().ByName("invariant_route") -} - -var _ protoreflect.Message = (*fastReflection_MsgVerifyInvariant)(nil) - -type fastReflection_MsgVerifyInvariant MsgVerifyInvariant - -func (x *MsgVerifyInvariant) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariant)(x) -} - -func (x *MsgVerifyInvariant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVerifyInvariant_messageType fastReflection_MsgVerifyInvariant_messageType -var _ protoreflect.MessageType = fastReflection_MsgVerifyInvariant_messageType{} - -type fastReflection_MsgVerifyInvariant_messageType struct{} - -func (x fastReflection_MsgVerifyInvariant_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariant)(nil) -} -func (x fastReflection_MsgVerifyInvariant_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariant) -} -func (x fastReflection_MsgVerifyInvariant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVerifyInvariant) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariant -} - -// 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_MsgVerifyInvariant) Type() protoreflect.MessageType { - return _fastReflection_MsgVerifyInvariant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVerifyInvariant) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVerifyInvariant) Interface() protoreflect.ProtoMessage { - return (*MsgVerifyInvariant)(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_MsgVerifyInvariant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgVerifyInvariant_sender, value) { - return - } - } - if x.InvariantModuleName != "" { - value := protoreflect.ValueOfString(x.InvariantModuleName) - if !f(fd_MsgVerifyInvariant_invariant_module_name, value) { - return - } - } - if x.InvariantRoute != "" { - value := protoreflect.ValueOfString(x.InvariantRoute) - if !f(fd_MsgVerifyInvariant_invariant_route, 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_MsgVerifyInvariant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - return x.Sender != "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - return x.InvariantModuleName != "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - return x.InvariantRoute != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant 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_MsgVerifyInvariant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - x.Sender = "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - x.InvariantModuleName = "" - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - x.InvariantRoute = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant 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_MsgVerifyInvariant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - value := x.InvariantModuleName - return protoreflect.ValueOfString(value) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - value := x.InvariantRoute - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant 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_MsgVerifyInvariant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - x.Sender = value.Interface().(string) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - x.InvariantModuleName = value.Interface().(string) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - x.InvariantRoute = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant 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_MsgVerifyInvariant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - panic(fmt.Errorf("field sender of message cosmos.crisis.v1beta1.MsgVerifyInvariant is not mutable")) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - panic(fmt.Errorf("field invariant_module_name of message cosmos.crisis.v1beta1.MsgVerifyInvariant is not mutable")) - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - panic(fmt.Errorf("field invariant_route of message cosmos.crisis.v1beta1.MsgVerifyInvariant is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant 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_MsgVerifyInvariant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.sender": - return protoreflect.ValueOfString("") - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_module_name": - return protoreflect.ValueOfString("") - case "cosmos.crisis.v1beta1.MsgVerifyInvariant.invariant_route": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariant")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariant 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_MsgVerifyInvariant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.MsgVerifyInvariant", 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_MsgVerifyInvariant) 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_MsgVerifyInvariant) 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_MsgVerifyInvariant) 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_MsgVerifyInvariant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVerifyInvariant) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InvariantModuleName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InvariantRoute) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVerifyInvariant) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InvariantRoute) > 0 { - i -= len(x.InvariantRoute) - copy(dAtA[i:], x.InvariantRoute) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvariantRoute))) - i-- - dAtA[i] = 0x1a - } - if len(x.InvariantModuleName) > 0 { - i -= len(x.InvariantModuleName) - copy(dAtA[i:], x.InvariantModuleName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvariantModuleName))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - 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().(*MsgVerifyInvariant) - 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: MsgVerifyInvariant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVerifyInvariant: 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 Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvariantModuleName", 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.InvariantModuleName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvariantRoute", 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.InvariantRoute = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVerifyInvariantResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_crisis_v1beta1_tx_proto_init() - md_MsgVerifyInvariantResponse = File_cosmos_crisis_v1beta1_tx_proto.Messages().ByName("MsgVerifyInvariantResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVerifyInvariantResponse)(nil) - -type fastReflection_MsgVerifyInvariantResponse MsgVerifyInvariantResponse - -func (x *MsgVerifyInvariantResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariantResponse)(x) -} - -func (x *MsgVerifyInvariantResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVerifyInvariantResponse_messageType fastReflection_MsgVerifyInvariantResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVerifyInvariantResponse_messageType{} - -type fastReflection_MsgVerifyInvariantResponse_messageType struct{} - -func (x fastReflection_MsgVerifyInvariantResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVerifyInvariantResponse)(nil) -} -func (x fastReflection_MsgVerifyInvariantResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariantResponse) -} -func (x fastReflection_MsgVerifyInvariantResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariantResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVerifyInvariantResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVerifyInvariantResponse -} - -// 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_MsgVerifyInvariantResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVerifyInvariantResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVerifyInvariantResponse) New() protoreflect.Message { - return new(fastReflection_MsgVerifyInvariantResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVerifyInvariantResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVerifyInvariantResponse)(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_MsgVerifyInvariantResponse) 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_MsgVerifyInvariantResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse 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_MsgVerifyInvariantResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse 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_MsgVerifyInvariantResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse 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_MsgVerifyInvariantResponse) 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.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse 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_MsgVerifyInvariantResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse 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_MsgVerifyInvariantResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")) - } - panic(fmt.Errorf("message cosmos.crisis.v1beta1.MsgVerifyInvariantResponse 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_MsgVerifyInvariantResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.MsgVerifyInvariantResponse", 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_MsgVerifyInvariantResponse) 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_MsgVerifyInvariantResponse) 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_MsgVerifyInvariantResponse) 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_MsgVerifyInvariantResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVerifyInvariantResponse) - 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().(*MsgVerifyInvariantResponse) - 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().(*MsgVerifyInvariantResponse) - 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: MsgVerifyInvariantResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVerifyInvariantResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crisis/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgVerifyInvariant represents a message to verify a particular invariance. -type MsgVerifyInvariant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - InvariantModuleName string `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty"` - InvariantRoute string `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty"` -} - -func (x *MsgVerifyInvariant) Reset() { - *x = MsgVerifyInvariant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVerifyInvariant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVerifyInvariant) ProtoMessage() {} - -// Deprecated: Use MsgVerifyInvariant.ProtoReflect.Descriptor instead. -func (*MsgVerifyInvariant) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgVerifyInvariant) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgVerifyInvariant) GetInvariantModuleName() string { - if x != nil { - return x.InvariantModuleName - } - return "" -} - -func (x *MsgVerifyInvariant) GetInvariantRoute() string { - if x != nil { - return x.InvariantRoute - } - return "" -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -type MsgVerifyInvariantResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVerifyInvariantResponse) Reset() { - *x = MsgVerifyInvariantResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crisis_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVerifyInvariantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVerifyInvariantResponse) ProtoMessage() {} - -// Deprecated: Use MsgVerifyInvariantResponse.ProtoReflect.Descriptor instead. -func (*MsgVerifyInvariantResponse) Descriptor() ([]byte, []int) { - return file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -var File_cosmos_crisis_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_crisis_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, - 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, - 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, - 0x4d, 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x76, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x6f, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, - 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x1a, - 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xe0, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crisis_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_crisis_v1beta1_tx_proto_rawDescData = file_cosmos_crisis_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_crisis_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_crisis_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_crisis_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crisis_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_crisis_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_crisis_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_crisis_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgVerifyInvariant)(nil), // 0: cosmos.crisis.v1beta1.MsgVerifyInvariant - (*MsgVerifyInvariantResponse)(nil), // 1: cosmos.crisis.v1beta1.MsgVerifyInvariantResponse -} -var file_cosmos_crisis_v1beta1_tx_proto_depIdxs = []int32{ - 0, // 0: cosmos.crisis.v1beta1.Msg.VerifyInvariant:input_type -> cosmos.crisis.v1beta1.MsgVerifyInvariant - 1, // 1: cosmos.crisis.v1beta1.Msg.VerifyInvariant:output_type -> cosmos.crisis.v1beta1.MsgVerifyInvariantResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crisis_v1beta1_tx_proto_init() } -func file_cosmos_crisis_v1beta1_tx_proto_init() { - if File_cosmos_crisis_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crisis_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVerifyInvariant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crisis_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVerifyInvariantResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crisis_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_crisis_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_crisis_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_crisis_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_crisis_v1beta1_tx_proto = out.File - file_cosmos_crisis_v1beta1_tx_proto_rawDesc = nil - file_cosmos_crisis_v1beta1_tx_proto_goTypes = nil - file_cosmos_crisis_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/crisis/v1beta1/tx_grpc.pb.go b/api/cosmos/crisis/v1beta1/tx_grpc.pb.go deleted file mode 100644 index bd137cf2bb2f..000000000000 --- a/api/cosmos/crisis/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/crisis/v1beta1/tx.proto - -package crisisv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // VerifyInvariant defines a method to verify a particular invariance. - VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) { - out := new(MsgVerifyInvariantResponse) - err := c.cc.Invoke(ctx, "/cosmos.crisis.v1beta1.Msg/VerifyInvariant", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // VerifyInvariant defines a method to verify a particular invariance. - VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyInvariant not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_VerifyInvariant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVerifyInvariant) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).VerifyInvariant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.crisis.v1beta1.Msg/VerifyInvariant", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VerifyInvariant(ctx, req.(*MsgVerifyInvariant)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.crisis.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "VerifyInvariant", - Handler: _Msg_VerifyInvariant_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/crisis/v1beta1/tx.proto", -} diff --git a/api/cosmos/crypto/ed25519/keys.pulsar.go b/api/cosmos/crypto/ed25519/keys.pulsar.go deleted file mode 100644 index f4373f44a3aa..000000000000 --- a/api/cosmos/crypto/ed25519/keys.pulsar.go +++ /dev/null @@ -1,1056 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package ed25519 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_PubKey protoreflect.MessageDescriptor - fd_PubKey_key protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_ed25519_keys_proto_init() - md_PubKey = File_cosmos_crypto_ed25519_keys_proto.Messages().ByName("PubKey") - fd_PubKey_key = md_PubKey.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_PubKey)(nil) - -type fastReflection_PubKey PubKey - -func (x *PubKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PubKey)(x) -} - -func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_ed25519_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType -var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} - -type fastReflection_PubKey_messageType struct{} - -func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PubKey)(nil) -} -func (x fastReflection_PubKey_messageType) New() protoreflect.Message { - return new(fastReflection_PubKey) -} -func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// 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_PubKey) Type() protoreflect.MessageType { - return _fastReflection_PubKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PubKey) New() protoreflect.Message { - return new(fastReflection_PubKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { - return (*PubKey)(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_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PubKey_key, 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_PubKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PubKey.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PubKey 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_PubKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PubKey.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PubKey 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_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.ed25519.PubKey.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PubKey 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_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PubKey.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PubKey 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_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PubKey.key": - panic(fmt.Errorf("field key of message cosmos.crypto.ed25519.PubKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PubKey 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_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PubKey.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PubKey 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_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.ed25519.PubKey", 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_PubKey) 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_PubKey) 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_PubKey) 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_PubKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*PubKey) - 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: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PrivKey protoreflect.MessageDescriptor - fd_PrivKey_key protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_ed25519_keys_proto_init() - md_PrivKey = File_cosmos_crypto_ed25519_keys_proto.Messages().ByName("PrivKey") - fd_PrivKey_key = md_PrivKey.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_PrivKey)(nil) - -type fastReflection_PrivKey PrivKey - -func (x *PrivKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PrivKey)(x) -} - -func (x *PrivKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_ed25519_keys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PrivKey_messageType fastReflection_PrivKey_messageType -var _ protoreflect.MessageType = fastReflection_PrivKey_messageType{} - -type fastReflection_PrivKey_messageType struct{} - -func (x fastReflection_PrivKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PrivKey)(nil) -} -func (x fastReflection_PrivKey_messageType) New() protoreflect.Message { - return new(fastReflection_PrivKey) -} -func (x fastReflection_PrivKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PrivKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PrivKey) Descriptor() protoreflect.MessageDescriptor { - return md_PrivKey -} - -// 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_PrivKey) Type() protoreflect.MessageType { - return _fastReflection_PrivKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PrivKey) New() protoreflect.Message { - return new(fastReflection_PrivKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PrivKey) Interface() protoreflect.ProtoMessage { - return (*PrivKey)(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_PrivKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PrivKey_key, 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_PrivKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PrivKey.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PrivKey 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_PrivKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PrivKey.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PrivKey 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_PrivKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.ed25519.PrivKey.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PrivKey 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_PrivKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PrivKey.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PrivKey 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_PrivKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PrivKey.key": - panic(fmt.Errorf("field key of message cosmos.crypto.ed25519.PrivKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PrivKey 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_PrivKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.ed25519.PrivKey.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.ed25519.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.ed25519.PrivKey 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_PrivKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.ed25519.PrivKey", 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_PrivKey) 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_PrivKey) 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_PrivKey) 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_PrivKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PrivKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PrivKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*PrivKey) - 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: PrivKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PrivKey: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/ed25519/keys.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PubKey is an ed25519 public key for handling Tendermint keys in SDK. -// It's needed for Any serialization and SDK compatibility. -// It must not be used in a non Tendermint key context because it doesn't implement -// ADR-28. Nevertheless, you will like to use ed25519 in app user level -// then you must create a new proto message and follow ADR-28 for Address construction. -type PubKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *PubKey) Reset() { - *x = PubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_ed25519_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PubKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PubKey) ProtoMessage() {} - -// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. -func (*PubKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_ed25519_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *PubKey) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -// Deprecated: PrivKey defines a ed25519 private key. -// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -type PrivKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *PrivKey) Reset() { - *x = PrivKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_ed25519_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrivKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivKey) ProtoMessage() {} - -// Deprecated: Use PrivKey.ProtoReflect.Descriptor instead. -func (*PrivKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_ed25519_keys_proto_rawDescGZIP(), []int{1} -} - -func (x *PrivKey) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -var File_cosmos_crypto_ed25519_keys_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_ed25519_keys_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x3e, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x1c, 0xfa, 0xde, 0x1f, 0x18, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x2f, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x22, - 0x3a, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x1d, 0xfa, 0xde, 0x1f, 0x19, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2f, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x2e, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0xd4, 0x01, 0x0a, 0x19, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0xa2, 0x02, - 0x03, 0x43, 0x43, 0x45, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0xca, 0x02, 0x15, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x45, 0x64, 0x32, - 0x35, 0x35, 0x31, 0x39, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x45, 0x64, 0x32, 0x35, 0x35, - 0x31, 0x39, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_ed25519_keys_proto_rawDescOnce sync.Once - file_cosmos_crypto_ed25519_keys_proto_rawDescData = file_cosmos_crypto_ed25519_keys_proto_rawDesc -) - -func file_cosmos_crypto_ed25519_keys_proto_rawDescGZIP() []byte { - file_cosmos_crypto_ed25519_keys_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_ed25519_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_ed25519_keys_proto_rawDescData) - }) - return file_cosmos_crypto_ed25519_keys_proto_rawDescData -} - -var file_cosmos_crypto_ed25519_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_crypto_ed25519_keys_proto_goTypes = []interface{}{ - (*PubKey)(nil), // 0: cosmos.crypto.ed25519.PubKey - (*PrivKey)(nil), // 1: cosmos.crypto.ed25519.PrivKey -} -var file_cosmos_crypto_ed25519_keys_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crypto_ed25519_keys_proto_init() } -func file_cosmos_crypto_ed25519_keys_proto_init() { - if File_cosmos_crypto_ed25519_keys_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_ed25519_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PubKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_ed25519_keys_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_ed25519_keys_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_ed25519_keys_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_ed25519_keys_proto_depIdxs, - MessageInfos: file_cosmos_crypto_ed25519_keys_proto_msgTypes, - }.Build() - File_cosmos_crypto_ed25519_keys_proto = out.File - file_cosmos_crypto_ed25519_keys_proto_rawDesc = nil - file_cosmos_crypto_ed25519_keys_proto_goTypes = nil - file_cosmos_crypto_ed25519_keys_proto_depIdxs = nil -} diff --git a/api/cosmos/crypto/hd/v1/hd.pulsar.go b/api/cosmos/crypto/hd/v1/hd.pulsar.go deleted file mode 100644 index 0933470be443..000000000000 --- a/api/cosmos/crypto/hd/v1/hd.pulsar.go +++ /dev/null @@ -1,800 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package hdv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_BIP44Params protoreflect.MessageDescriptor - fd_BIP44Params_purpose protoreflect.FieldDescriptor - fd_BIP44Params_coin_type protoreflect.FieldDescriptor - fd_BIP44Params_account protoreflect.FieldDescriptor - fd_BIP44Params_change protoreflect.FieldDescriptor - fd_BIP44Params_address_index protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_hd_v1_hd_proto_init() - md_BIP44Params = File_cosmos_crypto_hd_v1_hd_proto.Messages().ByName("BIP44Params") - fd_BIP44Params_purpose = md_BIP44Params.Fields().ByName("purpose") - fd_BIP44Params_coin_type = md_BIP44Params.Fields().ByName("coin_type") - fd_BIP44Params_account = md_BIP44Params.Fields().ByName("account") - fd_BIP44Params_change = md_BIP44Params.Fields().ByName("change") - fd_BIP44Params_address_index = md_BIP44Params.Fields().ByName("address_index") -} - -var _ protoreflect.Message = (*fastReflection_BIP44Params)(nil) - -type fastReflection_BIP44Params BIP44Params - -func (x *BIP44Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_BIP44Params)(x) -} - -func (x *BIP44Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_hd_v1_hd_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BIP44Params_messageType fastReflection_BIP44Params_messageType -var _ protoreflect.MessageType = fastReflection_BIP44Params_messageType{} - -type fastReflection_BIP44Params_messageType struct{} - -func (x fastReflection_BIP44Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_BIP44Params)(nil) -} -func (x fastReflection_BIP44Params_messageType) New() protoreflect.Message { - return new(fastReflection_BIP44Params) -} -func (x fastReflection_BIP44Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BIP44Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BIP44Params) Descriptor() protoreflect.MessageDescriptor { - return md_BIP44Params -} - -// 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_BIP44Params) Type() protoreflect.MessageType { - return _fastReflection_BIP44Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BIP44Params) New() protoreflect.Message { - return new(fastReflection_BIP44Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BIP44Params) Interface() protoreflect.ProtoMessage { - return (*BIP44Params)(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_BIP44Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Purpose != uint32(0) { - value := protoreflect.ValueOfUint32(x.Purpose) - if !f(fd_BIP44Params_purpose, value) { - return - } - } - if x.CoinType != uint32(0) { - value := protoreflect.ValueOfUint32(x.CoinType) - if !f(fd_BIP44Params_coin_type, value) { - return - } - } - if x.Account != uint32(0) { - value := protoreflect.ValueOfUint32(x.Account) - if !f(fd_BIP44Params_account, value) { - return - } - } - if x.Change != false { - value := protoreflect.ValueOfBool(x.Change) - if !f(fd_BIP44Params_change, value) { - return - } - } - if x.AddressIndex != uint32(0) { - value := protoreflect.ValueOfUint32(x.AddressIndex) - if !f(fd_BIP44Params_address_index, 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_BIP44Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.hd.v1.BIP44Params.purpose": - return x.Purpose != uint32(0) - case "cosmos.crypto.hd.v1.BIP44Params.coin_type": - return x.CoinType != uint32(0) - case "cosmos.crypto.hd.v1.BIP44Params.account": - return x.Account != uint32(0) - case "cosmos.crypto.hd.v1.BIP44Params.change": - return x.Change != false - case "cosmos.crypto.hd.v1.BIP44Params.address_index": - return x.AddressIndex != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.hd.v1.BIP44Params")) - } - panic(fmt.Errorf("message cosmos.crypto.hd.v1.BIP44Params 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_BIP44Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.hd.v1.BIP44Params.purpose": - x.Purpose = uint32(0) - case "cosmos.crypto.hd.v1.BIP44Params.coin_type": - x.CoinType = uint32(0) - case "cosmos.crypto.hd.v1.BIP44Params.account": - x.Account = uint32(0) - case "cosmos.crypto.hd.v1.BIP44Params.change": - x.Change = false - case "cosmos.crypto.hd.v1.BIP44Params.address_index": - x.AddressIndex = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.hd.v1.BIP44Params")) - } - panic(fmt.Errorf("message cosmos.crypto.hd.v1.BIP44Params 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_BIP44Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.hd.v1.BIP44Params.purpose": - value := x.Purpose - return protoreflect.ValueOfUint32(value) - case "cosmos.crypto.hd.v1.BIP44Params.coin_type": - value := x.CoinType - return protoreflect.ValueOfUint32(value) - case "cosmos.crypto.hd.v1.BIP44Params.account": - value := x.Account - return protoreflect.ValueOfUint32(value) - case "cosmos.crypto.hd.v1.BIP44Params.change": - value := x.Change - return protoreflect.ValueOfBool(value) - case "cosmos.crypto.hd.v1.BIP44Params.address_index": - value := x.AddressIndex - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.hd.v1.BIP44Params")) - } - panic(fmt.Errorf("message cosmos.crypto.hd.v1.BIP44Params 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_BIP44Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.hd.v1.BIP44Params.purpose": - x.Purpose = uint32(value.Uint()) - case "cosmos.crypto.hd.v1.BIP44Params.coin_type": - x.CoinType = uint32(value.Uint()) - case "cosmos.crypto.hd.v1.BIP44Params.account": - x.Account = uint32(value.Uint()) - case "cosmos.crypto.hd.v1.BIP44Params.change": - x.Change = value.Bool() - case "cosmos.crypto.hd.v1.BIP44Params.address_index": - x.AddressIndex = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.hd.v1.BIP44Params")) - } - panic(fmt.Errorf("message cosmos.crypto.hd.v1.BIP44Params 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_BIP44Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.hd.v1.BIP44Params.purpose": - panic(fmt.Errorf("field purpose of message cosmos.crypto.hd.v1.BIP44Params is not mutable")) - case "cosmos.crypto.hd.v1.BIP44Params.coin_type": - panic(fmt.Errorf("field coin_type of message cosmos.crypto.hd.v1.BIP44Params is not mutable")) - case "cosmos.crypto.hd.v1.BIP44Params.account": - panic(fmt.Errorf("field account of message cosmos.crypto.hd.v1.BIP44Params is not mutable")) - case "cosmos.crypto.hd.v1.BIP44Params.change": - panic(fmt.Errorf("field change of message cosmos.crypto.hd.v1.BIP44Params is not mutable")) - case "cosmos.crypto.hd.v1.BIP44Params.address_index": - panic(fmt.Errorf("field address_index of message cosmos.crypto.hd.v1.BIP44Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.hd.v1.BIP44Params")) - } - panic(fmt.Errorf("message cosmos.crypto.hd.v1.BIP44Params 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_BIP44Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.hd.v1.BIP44Params.purpose": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.crypto.hd.v1.BIP44Params.coin_type": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.crypto.hd.v1.BIP44Params.account": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.crypto.hd.v1.BIP44Params.change": - return protoreflect.ValueOfBool(false) - case "cosmos.crypto.hd.v1.BIP44Params.address_index": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.hd.v1.BIP44Params")) - } - panic(fmt.Errorf("message cosmos.crypto.hd.v1.BIP44Params 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_BIP44Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.hd.v1.BIP44Params", 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_BIP44Params) 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_BIP44Params) 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_BIP44Params) 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_BIP44Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BIP44Params) - 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.Purpose != 0 { - n += 1 + runtime.Sov(uint64(x.Purpose)) - } - if x.CoinType != 0 { - n += 1 + runtime.Sov(uint64(x.CoinType)) - } - if x.Account != 0 { - n += 1 + runtime.Sov(uint64(x.Account)) - } - if x.Change { - n += 2 - } - if x.AddressIndex != 0 { - n += 1 + runtime.Sov(uint64(x.AddressIndex)) - } - 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().(*BIP44Params) - 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.AddressIndex != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AddressIndex)) - i-- - dAtA[i] = 0x28 - } - if x.Change { - i-- - if x.Change { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.Account != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Account)) - i-- - dAtA[i] = 0x18 - } - if x.CoinType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CoinType)) - i-- - dAtA[i] = 0x10 - } - if x.Purpose != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Purpose)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BIP44Params) - 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: BIP44Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BIP44Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Purpose", wireType) - } - x.Purpose = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Purpose |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoinType", wireType) - } - x.CoinType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CoinType |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - x.Account = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Account |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Change", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Change = bool(v != 0) - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - x.AddressIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AddressIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/hd/v1/hd.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BIP44Params is used as path field in ledger item in Record. -type BIP44Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation - Purpose uint32 `protobuf:"varint,1,opt,name=purpose,proto3" json:"purpose,omitempty"` - // coin_type is a constant that improves privacy - CoinType uint32 `protobuf:"varint,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` - // account splits the key space into independent user identities - Account uint32 `protobuf:"varint,3,opt,name=account,proto3" json:"account,omitempty"` - // change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - // chain. - Change bool `protobuf:"varint,4,opt,name=change,proto3" json:"change,omitempty"` - // address_index is used as child index in BIP32 derivation - AddressIndex uint32 `protobuf:"varint,5,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (x *BIP44Params) Reset() { - *x = BIP44Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_hd_v1_hd_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BIP44Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BIP44Params) ProtoMessage() {} - -// Deprecated: Use BIP44Params.ProtoReflect.Descriptor instead. -func (*BIP44Params) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_hd_v1_hd_proto_rawDescGZIP(), []int{0} -} - -func (x *BIP44Params) GetPurpose() uint32 { - if x != nil { - return x.Purpose - } - return 0 -} - -func (x *BIP44Params) GetCoinType() uint32 { - if x != nil { - return x.CoinType - } - return 0 -} - -func (x *BIP44Params) GetAccount() uint32 { - if x != nil { - return x.Account - } - return 0 -} - -func (x *BIP44Params) GetChange() bool { - if x != nil { - return x.Change - } - return false -} - -func (x *BIP44Params) GetAddressIndex() uint32 { - if x != nil { - return x.AddressIndex - } - return 0 -} - -var File_cosmos_crypto_hd_v1_hd_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_hd_v1_hd_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x68, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x68, 0x64, - 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x0b, 0x42, 0x49, - 0x50, 0x34, 0x34, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, - 0x70, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, - 0x6f, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x6f, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xd0, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2e, 0x68, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x48, 0x64, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x68, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x68, 0x64, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x43, 0x48, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x48, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x48, 0x64, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x5c, 0x48, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x48, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, 0x1e, 0x00, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_hd_v1_hd_proto_rawDescOnce sync.Once - file_cosmos_crypto_hd_v1_hd_proto_rawDescData = file_cosmos_crypto_hd_v1_hd_proto_rawDesc -) - -func file_cosmos_crypto_hd_v1_hd_proto_rawDescGZIP() []byte { - file_cosmos_crypto_hd_v1_hd_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_hd_v1_hd_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_hd_v1_hd_proto_rawDescData) - }) - return file_cosmos_crypto_hd_v1_hd_proto_rawDescData -} - -var file_cosmos_crypto_hd_v1_hd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_crypto_hd_v1_hd_proto_goTypes = []interface{}{ - (*BIP44Params)(nil), // 0: cosmos.crypto.hd.v1.BIP44Params -} -var file_cosmos_crypto_hd_v1_hd_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crypto_hd_v1_hd_proto_init() } -func file_cosmos_crypto_hd_v1_hd_proto_init() { - if File_cosmos_crypto_hd_v1_hd_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_hd_v1_hd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BIP44Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_hd_v1_hd_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_hd_v1_hd_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_hd_v1_hd_proto_depIdxs, - MessageInfos: file_cosmos_crypto_hd_v1_hd_proto_msgTypes, - }.Build() - File_cosmos_crypto_hd_v1_hd_proto = out.File - file_cosmos_crypto_hd_v1_hd_proto_rawDesc = nil - file_cosmos_crypto_hd_v1_hd_proto_goTypes = nil - file_cosmos_crypto_hd_v1_hd_proto_depIdxs = nil -} diff --git a/api/cosmos/crypto/keyring/v1/record.pulsar.go b/api/cosmos/crypto/keyring/v1/record.pulsar.go deleted file mode 100644 index 11a6ba5fc009..000000000000 --- a/api/cosmos/crypto/keyring/v1/record.pulsar.go +++ /dev/null @@ -1,3054 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package keyringv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1 "github.com/cosmos/cosmos-sdk/api/cosmos/crypto/hd/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_Record protoreflect.MessageDescriptor - fd_Record_name protoreflect.FieldDescriptor - fd_Record_pub_key protoreflect.FieldDescriptor - fd_Record_local protoreflect.FieldDescriptor - fd_Record_ledger protoreflect.FieldDescriptor - fd_Record_multi protoreflect.FieldDescriptor - fd_Record_offline protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_keyring_v1_record_proto_init() - md_Record = File_cosmos_crypto_keyring_v1_record_proto.Messages().ByName("Record") - fd_Record_name = md_Record.Fields().ByName("name") - fd_Record_pub_key = md_Record.Fields().ByName("pub_key") - fd_Record_local = md_Record.Fields().ByName("local") - fd_Record_ledger = md_Record.Fields().ByName("ledger") - fd_Record_multi = md_Record.Fields().ByName("multi") - fd_Record_offline = md_Record.Fields().ByName("offline") -} - -var _ protoreflect.Message = (*fastReflection_Record)(nil) - -type fastReflection_Record Record - -func (x *Record) ProtoReflect() protoreflect.Message { - return (*fastReflection_Record)(x) -} - -func (x *Record) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Record_messageType fastReflection_Record_messageType -var _ protoreflect.MessageType = fastReflection_Record_messageType{} - -type fastReflection_Record_messageType struct{} - -func (x fastReflection_Record_messageType) Zero() protoreflect.Message { - return (*fastReflection_Record)(nil) -} -func (x fastReflection_Record_messageType) New() protoreflect.Message { - return new(fastReflection_Record) -} -func (x fastReflection_Record_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Record -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Record) Descriptor() protoreflect.MessageDescriptor { - return md_Record -} - -// 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_Record) Type() protoreflect.MessageType { - return _fastReflection_Record_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Record) New() protoreflect.Message { - return new(fastReflection_Record) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Record) Interface() protoreflect.ProtoMessage { - return (*Record)(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_Record) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Record_name, value) { - return - } - } - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_Record_pub_key, value) { - return - } - } - if x.Item != nil { - switch o := x.Item.(type) { - case *Record_Local_: - v := o.Local - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Record_local, value) { - return - } - case *Record_Ledger_: - v := o.Ledger - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Record_ledger, value) { - return - } - case *Record_Multi_: - v := o.Multi - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Record_multi, value) { - return - } - case *Record_Offline_: - v := o.Offline - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Record_offline, 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_Record) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.name": - return x.Name != "" - case "cosmos.crypto.keyring.v1.Record.pub_key": - return x.PubKey != nil - case "cosmos.crypto.keyring.v1.Record.local": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*Record_Local_); ok { - return true - } else { - return false - } - case "cosmos.crypto.keyring.v1.Record.ledger": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*Record_Ledger_); ok { - return true - } else { - return false - } - case "cosmos.crypto.keyring.v1.Record.multi": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*Record_Multi_); ok { - return true - } else { - return false - } - case "cosmos.crypto.keyring.v1.Record.offline": - if x.Item == nil { - return false - } else if _, ok := x.Item.(*Record_Offline_); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record 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_Record) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.name": - x.Name = "" - case "cosmos.crypto.keyring.v1.Record.pub_key": - x.PubKey = nil - case "cosmos.crypto.keyring.v1.Record.local": - x.Item = nil - case "cosmos.crypto.keyring.v1.Record.ledger": - x.Item = nil - case "cosmos.crypto.keyring.v1.Record.multi": - x.Item = nil - case "cosmos.crypto.keyring.v1.Record.offline": - x.Item = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record 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_Record) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.keyring.v1.Record.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.crypto.keyring.v1.Record.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.local": - if x.Item == nil { - return protoreflect.ValueOfMessage((*Record_Local)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*Record_Local_); ok { - return protoreflect.ValueOfMessage(v.Local.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*Record_Local)(nil).ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.ledger": - if x.Item == nil { - return protoreflect.ValueOfMessage((*Record_Ledger)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*Record_Ledger_); ok { - return protoreflect.ValueOfMessage(v.Ledger.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*Record_Ledger)(nil).ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.multi": - if x.Item == nil { - return protoreflect.ValueOfMessage((*Record_Multi)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*Record_Multi_); ok { - return protoreflect.ValueOfMessage(v.Multi.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*Record_Multi)(nil).ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.offline": - if x.Item == nil { - return protoreflect.ValueOfMessage((*Record_Offline)(nil).ProtoReflect()) - } else if v, ok := x.Item.(*Record_Offline_); ok { - return protoreflect.ValueOfMessage(v.Offline.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*Record_Offline)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record 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_Record) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.name": - x.Name = value.Interface().(string) - case "cosmos.crypto.keyring.v1.Record.pub_key": - x.PubKey = value.Message().Interface().(*anypb.Any) - case "cosmos.crypto.keyring.v1.Record.local": - cv := value.Message().Interface().(*Record_Local) - x.Item = &Record_Local_{Local: cv} - case "cosmos.crypto.keyring.v1.Record.ledger": - cv := value.Message().Interface().(*Record_Ledger) - x.Item = &Record_Ledger_{Ledger: cv} - case "cosmos.crypto.keyring.v1.Record.multi": - cv := value.Message().Interface().(*Record_Multi) - x.Item = &Record_Multi_{Multi: cv} - case "cosmos.crypto.keyring.v1.Record.offline": - cv := value.Message().Interface().(*Record_Offline) - x.Item = &Record_Offline_{Offline: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record 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_Record) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.pub_key": - if x.PubKey == nil { - x.PubKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.local": - if x.Item == nil { - value := &Record_Local{} - oneofValue := &Record_Local_{Local: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *Record_Local_: - return protoreflect.ValueOfMessage(m.Local.ProtoReflect()) - default: - value := &Record_Local{} - oneofValue := &Record_Local_{Local: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.ledger": - if x.Item == nil { - value := &Record_Ledger{} - oneofValue := &Record_Ledger_{Ledger: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *Record_Ledger_: - return protoreflect.ValueOfMessage(m.Ledger.ProtoReflect()) - default: - value := &Record_Ledger{} - oneofValue := &Record_Ledger_{Ledger: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.multi": - if x.Item == nil { - value := &Record_Multi{} - oneofValue := &Record_Multi_{Multi: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *Record_Multi_: - return protoreflect.ValueOfMessage(m.Multi.ProtoReflect()) - default: - value := &Record_Multi{} - oneofValue := &Record_Multi_{Multi: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.offline": - if x.Item == nil { - value := &Record_Offline{} - oneofValue := &Record_Offline_{Offline: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Item.(type) { - case *Record_Offline_: - return protoreflect.ValueOfMessage(m.Offline.ProtoReflect()) - default: - value := &Record_Offline{} - oneofValue := &Record_Offline_{Offline: value} - x.Item = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.crypto.keyring.v1.Record.name": - panic(fmt.Errorf("field name of message cosmos.crypto.keyring.v1.Record is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record 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_Record) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.name": - return protoreflect.ValueOfString("") - case "cosmos.crypto.keyring.v1.Record.pub_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.local": - value := &Record_Local{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.ledger": - value := &Record_Ledger{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.multi": - value := &Record_Multi{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.offline": - value := &Record_Offline{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record 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_Record) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "cosmos.crypto.keyring.v1.Record.item": - if x.Item == nil { - return nil - } - switch x.Item.(type) { - case *Record_Local_: - return x.Descriptor().Fields().ByName("local") - case *Record_Ledger_: - return x.Descriptor().Fields().ByName("ledger") - case *Record_Multi_: - return x.Descriptor().Fields().ByName("multi") - case *Record_Offline_: - return x.Descriptor().Fields().ByName("offline") - } - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.keyring.v1.Record", 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_Record) 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_Record) 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_Record) 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_Record) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Record) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - switch x := x.Item.(type) { - case *Record_Local_: - if x == nil { - break - } - l = options.Size(x.Local) - n += 1 + l + runtime.Sov(uint64(l)) - case *Record_Ledger_: - if x == nil { - break - } - l = options.Size(x.Ledger) - n += 1 + l + runtime.Sov(uint64(l)) - case *Record_Multi_: - if x == nil { - break - } - l = options.Size(x.Multi) - n += 1 + l + runtime.Sov(uint64(l)) - case *Record_Offline_: - if x == nil { - break - } - l = options.Size(x.Offline) - 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().(*Record) - 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) - } - switch x := x.Item.(type) { - case *Record_Local_: - encoded, err := options.Marshal(x.Local) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - case *Record_Ledger_: - encoded, err := options.Marshal(x.Ledger) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - case *Record_Multi_: - encoded, err := options.Marshal(x.Multi) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - case *Record_Offline_: - encoded, err := options.Marshal(x.Offline) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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 { - 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().(*Record) - 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: Record: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Record: 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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PubKey", 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.PubKey == nil { - x.PubKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Local", 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 - } - v := &Record_Local{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &Record_Local_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ledger", 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 - } - v := &Record_Ledger{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &Record_Ledger_{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Multi", 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 - } - v := &Record_Multi{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &Record_Multi_{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Offline", 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 - } - v := &Record_Offline{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Item = &Record_Offline_{v} - 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_Record_Local protoreflect.MessageDescriptor - fd_Record_Local_priv_key protoreflect.FieldDescriptor - fd_Record_Local_priv_key_type protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_keyring_v1_record_proto_init() - md_Record_Local = File_cosmos_crypto_keyring_v1_record_proto.Messages().ByName("Record").Messages().ByName("Local") - fd_Record_Local_priv_key = md_Record_Local.Fields().ByName("priv_key") - fd_Record_Local_priv_key_type = md_Record_Local.Fields().ByName("priv_key_type") -} - -var _ protoreflect.Message = (*fastReflection_Record_Local)(nil) - -type fastReflection_Record_Local Record_Local - -func (x *Record_Local) ProtoReflect() protoreflect.Message { - return (*fastReflection_Record_Local)(x) -} - -func (x *Record_Local) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Record_Local_messageType fastReflection_Record_Local_messageType -var _ protoreflect.MessageType = fastReflection_Record_Local_messageType{} - -type fastReflection_Record_Local_messageType struct{} - -func (x fastReflection_Record_Local_messageType) Zero() protoreflect.Message { - return (*fastReflection_Record_Local)(nil) -} -func (x fastReflection_Record_Local_messageType) New() protoreflect.Message { - return new(fastReflection_Record_Local) -} -func (x fastReflection_Record_Local_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Local -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Record_Local) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Local -} - -// 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_Record_Local) Type() protoreflect.MessageType { - return _fastReflection_Record_Local_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Record_Local) New() protoreflect.Message { - return new(fastReflection_Record_Local) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Record_Local) Interface() protoreflect.ProtoMessage { - return (*Record_Local)(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_Record_Local) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PrivKey != nil { - value := protoreflect.ValueOfMessage(x.PrivKey.ProtoReflect()) - if !f(fd_Record_Local_priv_key, value) { - return - } - } - if x.PrivKeyType != "" { - value := protoreflect.ValueOfString(x.PrivKeyType) - if !f(fd_Record_Local_priv_key_type, 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_Record_Local) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Local.priv_key": - return x.PrivKey != nil - case "cosmos.crypto.keyring.v1.Record.Local.priv_key_type": - return x.PrivKeyType != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Local")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Local 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_Record_Local) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Local.priv_key": - x.PrivKey = nil - case "cosmos.crypto.keyring.v1.Record.Local.priv_key_type": - x.PrivKeyType = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Local")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Local 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_Record_Local) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.keyring.v1.Record.Local.priv_key": - value := x.PrivKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.Local.priv_key_type": - value := x.PrivKeyType - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Local")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Local 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_Record_Local) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Local.priv_key": - x.PrivKey = value.Message().Interface().(*anypb.Any) - case "cosmos.crypto.keyring.v1.Record.Local.priv_key_type": - x.PrivKeyType = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Local")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Local 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_Record_Local) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Local.priv_key": - if x.PrivKey == nil { - x.PrivKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PrivKey.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.Local.priv_key_type": - panic(fmt.Errorf("field priv_key_type of message cosmos.crypto.keyring.v1.Record.Local is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Local")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Local 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_Record_Local) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Local.priv_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.crypto.keyring.v1.Record.Local.priv_key_type": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Local")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Local 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_Record_Local) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.keyring.v1.Record.Local", 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_Record_Local) 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_Record_Local) 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_Record_Local) 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_Record_Local) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Record_Local) - 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.PrivKey != nil { - l = options.Size(x.PrivKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PrivKeyType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Record_Local) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.PrivKeyType) > 0 { - i -= len(x.PrivKeyType) - copy(dAtA[i:], x.PrivKeyType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PrivKeyType))) - i-- - dAtA[i] = 0x12 - } - if x.PrivKey != nil { - encoded, err := options.Marshal(x.PrivKey) - 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().(*Record_Local) - 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: Record_Local: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Record_Local: 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 PrivKey", 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.PrivKey == nil { - x.PrivKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PrivKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PrivKeyType", 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.PrivKeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Record_Ledger protoreflect.MessageDescriptor - fd_Record_Ledger_path protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_keyring_v1_record_proto_init() - md_Record_Ledger = File_cosmos_crypto_keyring_v1_record_proto.Messages().ByName("Record").Messages().ByName("Ledger") - fd_Record_Ledger_path = md_Record_Ledger.Fields().ByName("path") -} - -var _ protoreflect.Message = (*fastReflection_Record_Ledger)(nil) - -type fastReflection_Record_Ledger Record_Ledger - -func (x *Record_Ledger) ProtoReflect() protoreflect.Message { - return (*fastReflection_Record_Ledger)(x) -} - -func (x *Record_Ledger) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Record_Ledger_messageType fastReflection_Record_Ledger_messageType -var _ protoreflect.MessageType = fastReflection_Record_Ledger_messageType{} - -type fastReflection_Record_Ledger_messageType struct{} - -func (x fastReflection_Record_Ledger_messageType) Zero() protoreflect.Message { - return (*fastReflection_Record_Ledger)(nil) -} -func (x fastReflection_Record_Ledger_messageType) New() protoreflect.Message { - return new(fastReflection_Record_Ledger) -} -func (x fastReflection_Record_Ledger_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Ledger -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Record_Ledger) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Ledger -} - -// 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_Record_Ledger) Type() protoreflect.MessageType { - return _fastReflection_Record_Ledger_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Record_Ledger) New() protoreflect.Message { - return new(fastReflection_Record_Ledger) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Record_Ledger) Interface() protoreflect.ProtoMessage { - return (*Record_Ledger)(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_Record_Ledger) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Path != nil { - value := protoreflect.ValueOfMessage(x.Path.ProtoReflect()) - if !f(fd_Record_Ledger_path, 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_Record_Ledger) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Ledger.path": - return x.Path != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Ledger")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Ledger 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_Record_Ledger) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Ledger.path": - x.Path = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Ledger")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Ledger 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_Record_Ledger) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.keyring.v1.Record.Ledger.path": - value := x.Path - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Ledger")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Ledger 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_Record_Ledger) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Ledger.path": - x.Path = value.Message().Interface().(*v1.BIP44Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Ledger")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Ledger 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_Record_Ledger) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Ledger.path": - if x.Path == nil { - x.Path = new(v1.BIP44Params) - } - return protoreflect.ValueOfMessage(x.Path.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Ledger")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Ledger 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_Record_Ledger) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.keyring.v1.Record.Ledger.path": - m := new(v1.BIP44Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Ledger")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Ledger 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_Record_Ledger) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.keyring.v1.Record.Ledger", 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_Record_Ledger) 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_Record_Ledger) 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_Record_Ledger) 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_Record_Ledger) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Record_Ledger) - 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.Path != nil { - l = options.Size(x.Path) - 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().(*Record_Ledger) - 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.Path != nil { - encoded, err := options.Marshal(x.Path) - 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().(*Record_Ledger) - 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: Record_Ledger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Record_Ledger: 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 Path", 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.Path == nil { - x.Path = &v1.BIP44Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Path); 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_Record_Multi protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_crypto_keyring_v1_record_proto_init() - md_Record_Multi = File_cosmos_crypto_keyring_v1_record_proto.Messages().ByName("Record").Messages().ByName("Multi") -} - -var _ protoreflect.Message = (*fastReflection_Record_Multi)(nil) - -type fastReflection_Record_Multi Record_Multi - -func (x *Record_Multi) ProtoReflect() protoreflect.Message { - return (*fastReflection_Record_Multi)(x) -} - -func (x *Record_Multi) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Record_Multi_messageType fastReflection_Record_Multi_messageType -var _ protoreflect.MessageType = fastReflection_Record_Multi_messageType{} - -type fastReflection_Record_Multi_messageType struct{} - -func (x fastReflection_Record_Multi_messageType) Zero() protoreflect.Message { - return (*fastReflection_Record_Multi)(nil) -} -func (x fastReflection_Record_Multi_messageType) New() protoreflect.Message { - return new(fastReflection_Record_Multi) -} -func (x fastReflection_Record_Multi_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Multi -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Record_Multi) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Multi -} - -// 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_Record_Multi) Type() protoreflect.MessageType { - return _fastReflection_Record_Multi_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Record_Multi) New() protoreflect.Message { - return new(fastReflection_Record_Multi) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Record_Multi) Interface() protoreflect.ProtoMessage { - return (*Record_Multi)(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_Record_Multi) 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_Record_Multi) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Multi")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Multi 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_Record_Multi) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Multi")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Multi 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_Record_Multi) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Multi")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Multi 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_Record_Multi) 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.crypto.keyring.v1.Record.Multi")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Multi 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_Record_Multi) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Multi")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Multi 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_Record_Multi) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Multi")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Multi 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_Record_Multi) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.keyring.v1.Record.Multi", 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_Record_Multi) 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_Record_Multi) 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_Record_Multi) 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_Record_Multi) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Record_Multi) - 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().(*Record_Multi) - 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().(*Record_Multi) - 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: Record_Multi: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Record_Multi: 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_Record_Offline protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_crypto_keyring_v1_record_proto_init() - md_Record_Offline = File_cosmos_crypto_keyring_v1_record_proto.Messages().ByName("Record").Messages().ByName("Offline") -} - -var _ protoreflect.Message = (*fastReflection_Record_Offline)(nil) - -type fastReflection_Record_Offline Record_Offline - -func (x *Record_Offline) ProtoReflect() protoreflect.Message { - return (*fastReflection_Record_Offline)(x) -} - -func (x *Record_Offline) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Record_Offline_messageType fastReflection_Record_Offline_messageType -var _ protoreflect.MessageType = fastReflection_Record_Offline_messageType{} - -type fastReflection_Record_Offline_messageType struct{} - -func (x fastReflection_Record_Offline_messageType) Zero() protoreflect.Message { - return (*fastReflection_Record_Offline)(nil) -} -func (x fastReflection_Record_Offline_messageType) New() protoreflect.Message { - return new(fastReflection_Record_Offline) -} -func (x fastReflection_Record_Offline_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Offline -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Record_Offline) Descriptor() protoreflect.MessageDescriptor { - return md_Record_Offline -} - -// 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_Record_Offline) Type() protoreflect.MessageType { - return _fastReflection_Record_Offline_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Record_Offline) New() protoreflect.Message { - return new(fastReflection_Record_Offline) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Record_Offline) Interface() protoreflect.ProtoMessage { - return (*Record_Offline)(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_Record_Offline) 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_Record_Offline) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Offline")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Offline 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_Record_Offline) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Offline")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Offline 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_Record_Offline) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Offline")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Offline 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_Record_Offline) 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.crypto.keyring.v1.Record.Offline")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Offline 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_Record_Offline) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Offline")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Offline 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_Record_Offline) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.keyring.v1.Record.Offline")) - } - panic(fmt.Errorf("message cosmos.crypto.keyring.v1.Record.Offline 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_Record_Offline) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.keyring.v1.Record.Offline", 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_Record_Offline) 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_Record_Offline) 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_Record_Offline) 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_Record_Offline) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Record_Offline) - 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().(*Record_Offline) - 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().(*Record_Offline) - 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: Record_Offline: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Record_Offline: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/keyring/v1/record.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Record is used for representing a key in the keyring. -type Record struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name represents a name of Record - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // pub_key represents a public key in any format - PubKey *anypb.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - // Record contains one of the following items - // - // Types that are assignable to Item: - // *Record_Local_ - // *Record_Ledger_ - // *Record_Multi_ - // *Record_Offline_ - Item isRecord_Item `protobuf_oneof:"item"` -} - -func (x *Record) Reset() { - *x = Record{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Record) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Record) ProtoMessage() {} - -// Deprecated: Use Record.ProtoReflect.Descriptor instead. -func (*Record) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_keyring_v1_record_proto_rawDescGZIP(), []int{0} -} - -func (x *Record) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Record) GetPubKey() *anypb.Any { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *Record) GetItem() isRecord_Item { - if x != nil { - return x.Item - } - return nil -} - -func (x *Record) GetLocal() *Record_Local { - if x, ok := x.GetItem().(*Record_Local_); ok { - return x.Local - } - return nil -} - -func (x *Record) GetLedger() *Record_Ledger { - if x, ok := x.GetItem().(*Record_Ledger_); ok { - return x.Ledger - } - return nil -} - -func (x *Record) GetMulti() *Record_Multi { - if x, ok := x.GetItem().(*Record_Multi_); ok { - return x.Multi - } - return nil -} - -func (x *Record) GetOffline() *Record_Offline { - if x, ok := x.GetItem().(*Record_Offline_); ok { - return x.Offline - } - return nil -} - -type isRecord_Item interface { - isRecord_Item() -} - -type Record_Local_ struct { - // local stores the public information about a locally stored key - Local *Record_Local `protobuf:"bytes,3,opt,name=local,proto3,oneof"` -} - -type Record_Ledger_ struct { - // ledger stores the public information about a Ledger key - Ledger *Record_Ledger `protobuf:"bytes,4,opt,name=ledger,proto3,oneof"` -} - -type Record_Multi_ struct { - // Multi does not store any information. - Multi *Record_Multi `protobuf:"bytes,5,opt,name=multi,proto3,oneof"` -} - -type Record_Offline_ struct { - // Offline does not store any information. - Offline *Record_Offline `protobuf:"bytes,6,opt,name=offline,proto3,oneof"` -} - -func (*Record_Local_) isRecord_Item() {} - -func (*Record_Ledger_) isRecord_Item() {} - -func (*Record_Multi_) isRecord_Item() {} - -func (*Record_Offline_) isRecord_Item() {} - -// Item is a keyring item stored in a keyring backend. -// Local item -type Record_Local struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrivKey *anypb.Any `protobuf:"bytes,1,opt,name=priv_key,json=privKey,proto3" json:"priv_key,omitempty"` - PrivKeyType string `protobuf:"bytes,2,opt,name=priv_key_type,json=privKeyType,proto3" json:"priv_key_type,omitempty"` -} - -func (x *Record_Local) Reset() { - *x = Record_Local{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Record_Local) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Record_Local) ProtoMessage() {} - -// Deprecated: Use Record_Local.ProtoReflect.Descriptor instead. -func (*Record_Local) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_keyring_v1_record_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Record_Local) GetPrivKey() *anypb.Any { - if x != nil { - return x.PrivKey - } - return nil -} - -func (x *Record_Local) GetPrivKeyType() string { - if x != nil { - return x.PrivKeyType - } - return "" -} - -// Ledger item -type Record_Ledger struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *v1.BIP44Params `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *Record_Ledger) Reset() { - *x = Record_Ledger{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Record_Ledger) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Record_Ledger) ProtoMessage() {} - -// Deprecated: Use Record_Ledger.ProtoReflect.Descriptor instead. -func (*Record_Ledger) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_keyring_v1_record_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Record_Ledger) GetPath() *v1.BIP44Params { - if x != nil { - return x.Path - } - return nil -} - -// Multi item -type Record_Multi struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Record_Multi) Reset() { - *x = Record_Multi{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Record_Multi) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Record_Multi) ProtoMessage() {} - -// Deprecated: Use Record_Multi.ProtoReflect.Descriptor instead. -func (*Record_Multi) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_keyring_v1_record_proto_rawDescGZIP(), []int{0, 2} -} - -// Offline item -type Record_Offline struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Record_Offline) Reset() { - *x = Record_Offline{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_keyring_v1_record_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Record_Offline) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Record_Offline) ProtoMessage() {} - -// Deprecated: Use Record_Offline.ProtoReflect.Descriptor instead. -func (*Record_Offline) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_keyring_v1_record_proto_rawDescGZIP(), []int{0, 3} -} - -var File_cosmos_crypto_keyring_v1_record_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_keyring_v1_record_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x6b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2f, 0x68, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x8e, 0x04, 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 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, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3e, - 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6b, 0x65, - 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x41, - 0x0a, 0x06, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6b, - 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6c, 0x65, 0x64, 0x67, 0x65, - 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2e, 0x6b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x48, 0x00, 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x12, 0x44, 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x2e, 0x6b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x07, - 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0x5c, 0x0a, 0x05, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x12, 0x2f, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x76, 0x5f, 0x6b, 0x65, 0x79, 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, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x4b, 0x65, - 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x76, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x4b, 0x65, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3e, 0x0a, 0x06, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x12, - 0x34, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x68, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x49, 0x50, 0x34, 0x34, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x07, 0x0a, 0x05, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x1a, 0x09, - 0x0a, 0x07, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x69, 0x74, 0x65, - 0x6d, 0x42, 0xf7, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x42, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2f, 0x6b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6b, 0x65, 0x79, - 0x72, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x4b, 0xaa, 0x02, 0x18, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x4b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x5c, 0x4b, 0x65, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x4b, 0x65, 0x79, 0x72, - 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_keyring_v1_record_proto_rawDescOnce sync.Once - file_cosmos_crypto_keyring_v1_record_proto_rawDescData = file_cosmos_crypto_keyring_v1_record_proto_rawDesc -) - -func file_cosmos_crypto_keyring_v1_record_proto_rawDescGZIP() []byte { - file_cosmos_crypto_keyring_v1_record_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_keyring_v1_record_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_keyring_v1_record_proto_rawDescData) - }) - return file_cosmos_crypto_keyring_v1_record_proto_rawDescData -} - -var file_cosmos_crypto_keyring_v1_record_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cosmos_crypto_keyring_v1_record_proto_goTypes = []interface{}{ - (*Record)(nil), // 0: cosmos.crypto.keyring.v1.Record - (*Record_Local)(nil), // 1: cosmos.crypto.keyring.v1.Record.Local - (*Record_Ledger)(nil), // 2: cosmos.crypto.keyring.v1.Record.Ledger - (*Record_Multi)(nil), // 3: cosmos.crypto.keyring.v1.Record.Multi - (*Record_Offline)(nil), // 4: cosmos.crypto.keyring.v1.Record.Offline - (*anypb.Any)(nil), // 5: google.protobuf.Any - (*v1.BIP44Params)(nil), // 6: cosmos.crypto.hd.v1.BIP44Params -} -var file_cosmos_crypto_keyring_v1_record_proto_depIdxs = []int32{ - 5, // 0: cosmos.crypto.keyring.v1.Record.pub_key:type_name -> google.protobuf.Any - 1, // 1: cosmos.crypto.keyring.v1.Record.local:type_name -> cosmos.crypto.keyring.v1.Record.Local - 2, // 2: cosmos.crypto.keyring.v1.Record.ledger:type_name -> cosmos.crypto.keyring.v1.Record.Ledger - 3, // 3: cosmos.crypto.keyring.v1.Record.multi:type_name -> cosmos.crypto.keyring.v1.Record.Multi - 4, // 4: cosmos.crypto.keyring.v1.Record.offline:type_name -> cosmos.crypto.keyring.v1.Record.Offline - 5, // 5: cosmos.crypto.keyring.v1.Record.Local.priv_key:type_name -> google.protobuf.Any - 6, // 6: cosmos.crypto.keyring.v1.Record.Ledger.path:type_name -> cosmos.crypto.hd.v1.BIP44Params - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] 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 -} - -func init() { file_cosmos_crypto_keyring_v1_record_proto_init() } -func file_cosmos_crypto_keyring_v1_record_proto_init() { - if File_cosmos_crypto_keyring_v1_record_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_keyring_v1_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Record); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_keyring_v1_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Record_Local); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_keyring_v1_record_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Record_Ledger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_keyring_v1_record_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Record_Multi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_keyring_v1_record_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Record_Offline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cosmos_crypto_keyring_v1_record_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Record_Local_)(nil), - (*Record_Ledger_)(nil), - (*Record_Multi_)(nil), - (*Record_Offline_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_keyring_v1_record_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_keyring_v1_record_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_keyring_v1_record_proto_depIdxs, - MessageInfos: file_cosmos_crypto_keyring_v1_record_proto_msgTypes, - }.Build() - File_cosmos_crypto_keyring_v1_record_proto = out.File - file_cosmos_crypto_keyring_v1_record_proto_rawDesc = nil - file_cosmos_crypto_keyring_v1_record_proto_goTypes = nil - file_cosmos_crypto_keyring_v1_record_proto_depIdxs = nil -} diff --git a/api/cosmos/crypto/multisig/keys.pulsar.go b/api/cosmos/crypto/multisig/keys.pulsar.go deleted file mode 100644 index be9d932c4c6d..000000000000 --- a/api/cosmos/crypto/multisig/keys.pulsar.go +++ /dev/null @@ -1,715 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package multisig - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_LegacyAminoPubKey_2_list)(nil) - -type _LegacyAminoPubKey_2_list struct { - list *[]*anypb.Any -} - -func (x *_LegacyAminoPubKey_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LegacyAminoPubKey_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_LegacyAminoPubKey_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_LegacyAminoPubKey_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_LegacyAminoPubKey_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_LegacyAminoPubKey_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_LegacyAminoPubKey_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_LegacyAminoPubKey_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LegacyAminoPubKey protoreflect.MessageDescriptor - fd_LegacyAminoPubKey_threshold protoreflect.FieldDescriptor - fd_LegacyAminoPubKey_public_keys protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_multisig_keys_proto_init() - md_LegacyAminoPubKey = File_cosmos_crypto_multisig_keys_proto.Messages().ByName("LegacyAminoPubKey") - fd_LegacyAminoPubKey_threshold = md_LegacyAminoPubKey.Fields().ByName("threshold") - fd_LegacyAminoPubKey_public_keys = md_LegacyAminoPubKey.Fields().ByName("public_keys") -} - -var _ protoreflect.Message = (*fastReflection_LegacyAminoPubKey)(nil) - -type fastReflection_LegacyAminoPubKey LegacyAminoPubKey - -func (x *LegacyAminoPubKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_LegacyAminoPubKey)(x) -} - -func (x *LegacyAminoPubKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_multisig_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_LegacyAminoPubKey_messageType fastReflection_LegacyAminoPubKey_messageType -var _ protoreflect.MessageType = fastReflection_LegacyAminoPubKey_messageType{} - -type fastReflection_LegacyAminoPubKey_messageType struct{} - -func (x fastReflection_LegacyAminoPubKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_LegacyAminoPubKey)(nil) -} -func (x fastReflection_LegacyAminoPubKey_messageType) New() protoreflect.Message { - return new(fastReflection_LegacyAminoPubKey) -} -func (x fastReflection_LegacyAminoPubKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyAminoPubKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LegacyAminoPubKey) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyAminoPubKey -} - -// 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_LegacyAminoPubKey) Type() protoreflect.MessageType { - return _fastReflection_LegacyAminoPubKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LegacyAminoPubKey) New() protoreflect.Message { - return new(fastReflection_LegacyAminoPubKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LegacyAminoPubKey) Interface() protoreflect.ProtoMessage { - return (*LegacyAminoPubKey)(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_LegacyAminoPubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Threshold != uint32(0) { - value := protoreflect.ValueOfUint32(x.Threshold) - if !f(fd_LegacyAminoPubKey_threshold, value) { - return - } - } - if len(x.PublicKeys) != 0 { - value := protoreflect.ValueOfList(&_LegacyAminoPubKey_2_list{list: &x.PublicKeys}) - if !f(fd_LegacyAminoPubKey_public_keys, 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_LegacyAminoPubKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.multisig.LegacyAminoPubKey.threshold": - return x.Threshold != uint32(0) - case "cosmos.crypto.multisig.LegacyAminoPubKey.public_keys": - return len(x.PublicKeys) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.LegacyAminoPubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.LegacyAminoPubKey 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_LegacyAminoPubKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.multisig.LegacyAminoPubKey.threshold": - x.Threshold = uint32(0) - case "cosmos.crypto.multisig.LegacyAminoPubKey.public_keys": - x.PublicKeys = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.LegacyAminoPubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.LegacyAminoPubKey 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_LegacyAminoPubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.multisig.LegacyAminoPubKey.threshold": - value := x.Threshold - return protoreflect.ValueOfUint32(value) - case "cosmos.crypto.multisig.LegacyAminoPubKey.public_keys": - if len(x.PublicKeys) == 0 { - return protoreflect.ValueOfList(&_LegacyAminoPubKey_2_list{}) - } - listValue := &_LegacyAminoPubKey_2_list{list: &x.PublicKeys} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.LegacyAminoPubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.LegacyAminoPubKey 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_LegacyAminoPubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.multisig.LegacyAminoPubKey.threshold": - x.Threshold = uint32(value.Uint()) - case "cosmos.crypto.multisig.LegacyAminoPubKey.public_keys": - lv := value.List() - clv := lv.(*_LegacyAminoPubKey_2_list) - x.PublicKeys = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.LegacyAminoPubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.LegacyAminoPubKey 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_LegacyAminoPubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.multisig.LegacyAminoPubKey.public_keys": - if x.PublicKeys == nil { - x.PublicKeys = []*anypb.Any{} - } - value := &_LegacyAminoPubKey_2_list{list: &x.PublicKeys} - return protoreflect.ValueOfList(value) - case "cosmos.crypto.multisig.LegacyAminoPubKey.threshold": - panic(fmt.Errorf("field threshold of message cosmos.crypto.multisig.LegacyAminoPubKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.LegacyAminoPubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.LegacyAminoPubKey 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_LegacyAminoPubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.multisig.LegacyAminoPubKey.threshold": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.crypto.multisig.LegacyAminoPubKey.public_keys": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_LegacyAminoPubKey_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.LegacyAminoPubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.LegacyAminoPubKey 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_LegacyAminoPubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.multisig.LegacyAminoPubKey", 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_LegacyAminoPubKey) 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_LegacyAminoPubKey) 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_LegacyAminoPubKey) 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_LegacyAminoPubKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LegacyAminoPubKey) - 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.Threshold != 0 { - n += 1 + runtime.Sov(uint64(x.Threshold)) - } - if len(x.PublicKeys) > 0 { - for _, e := range x.PublicKeys { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*LegacyAminoPubKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.PublicKeys) > 0 { - for iNdEx := len(x.PublicKeys) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.PublicKeys[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Threshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Threshold)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LegacyAminoPubKey) - 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: LegacyAminoPubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyAminoPubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - x.Threshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Threshold |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PublicKeys = append(x.PublicKeys, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKeys[len(x.PublicKeys)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/multisig/keys.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// LegacyAminoPubKey specifies a public key type -// which nests multiple public keys and a threshold, -// it uses legacy amino address rules. -type LegacyAminoPubKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Threshold uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` - PublicKeys []*anypb.Any `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"` -} - -func (x *LegacyAminoPubKey) Reset() { - *x = LegacyAminoPubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_multisig_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LegacyAminoPubKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyAminoPubKey) ProtoMessage() {} - -// Deprecated: Use LegacyAminoPubKey.ProtoReflect.Descriptor instead. -func (*LegacyAminoPubKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_multisig_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *LegacyAminoPubKey) GetThreshold() uint32 { - if x != nil { - return x.Threshold - } - return 0 -} - -func (x *LegacyAminoPubKey) GetPublicKeys() []*anypb.Any { - if x != nil { - return x.PublicKeys - } - return nil -} - -var File_cosmos_crypto_multisig_keys_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_multisig_keys_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x11, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x50, 0x75, 0x62, 0x4b, 0x65, - 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, - 0x42, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, - 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, 0x0b, 0xe2, 0xde, 0x1f, 0x07, - 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x73, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x42, 0xda, 0x01, 0x0a, 0x1a, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0xa2, 0x02, - 0x03, 0x43, 0x43, 0x4d, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0xca, 0x02, 0x16, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_multisig_keys_proto_rawDescOnce sync.Once - file_cosmos_crypto_multisig_keys_proto_rawDescData = file_cosmos_crypto_multisig_keys_proto_rawDesc -) - -func file_cosmos_crypto_multisig_keys_proto_rawDescGZIP() []byte { - file_cosmos_crypto_multisig_keys_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_multisig_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_multisig_keys_proto_rawDescData) - }) - return file_cosmos_crypto_multisig_keys_proto_rawDescData -} - -var file_cosmos_crypto_multisig_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_crypto_multisig_keys_proto_goTypes = []interface{}{ - (*LegacyAminoPubKey)(nil), // 0: cosmos.crypto.multisig.LegacyAminoPubKey - (*anypb.Any)(nil), // 1: google.protobuf.Any -} -var file_cosmos_crypto_multisig_keys_proto_depIdxs = []int32{ - 1, // 0: cosmos.crypto.multisig.LegacyAminoPubKey.public_keys:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_crypto_multisig_keys_proto_init() } -func file_cosmos_crypto_multisig_keys_proto_init() { - if File_cosmos_crypto_multisig_keys_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_multisig_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LegacyAminoPubKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_multisig_keys_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_multisig_keys_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_multisig_keys_proto_depIdxs, - MessageInfos: file_cosmos_crypto_multisig_keys_proto_msgTypes, - }.Build() - File_cosmos_crypto_multisig_keys_proto = out.File - file_cosmos_crypto_multisig_keys_proto_rawDesc = nil - file_cosmos_crypto_multisig_keys_proto_goTypes = nil - file_cosmos_crypto_multisig_keys_proto_depIdxs = nil -} diff --git a/api/cosmos/crypto/multisig/v1beta1/multisig.pulsar.go b/api/cosmos/crypto/multisig/v1beta1/multisig.pulsar.go deleted file mode 100644 index 3a94da45fe1f..000000000000 --- a/api/cosmos/crypto/multisig/v1beta1/multisig.pulsar.go +++ /dev/null @@ -1,1178 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package multisigv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_MultiSignature_1_list)(nil) - -type _MultiSignature_1_list struct { - list *[][]byte -} - -func (x *_MultiSignature_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MultiSignature_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MultiSignature_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MultiSignature_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MultiSignature_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MultiSignature at list field Signatures as it is not of Message kind")) -} - -func (x *_MultiSignature_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MultiSignature_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MultiSignature_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MultiSignature protoreflect.MessageDescriptor - fd_MultiSignature_signatures protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_multisig_v1beta1_multisig_proto_init() - md_MultiSignature = File_cosmos_crypto_multisig_v1beta1_multisig_proto.Messages().ByName("MultiSignature") - fd_MultiSignature_signatures = md_MultiSignature.Fields().ByName("signatures") -} - -var _ protoreflect.Message = (*fastReflection_MultiSignature)(nil) - -type fastReflection_MultiSignature MultiSignature - -func (x *MultiSignature) ProtoReflect() protoreflect.Message { - return (*fastReflection_MultiSignature)(x) -} - -func (x *MultiSignature) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MultiSignature_messageType fastReflection_MultiSignature_messageType -var _ protoreflect.MessageType = fastReflection_MultiSignature_messageType{} - -type fastReflection_MultiSignature_messageType struct{} - -func (x fastReflection_MultiSignature_messageType) Zero() protoreflect.Message { - return (*fastReflection_MultiSignature)(nil) -} -func (x fastReflection_MultiSignature_messageType) New() protoreflect.Message { - return new(fastReflection_MultiSignature) -} -func (x fastReflection_MultiSignature_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MultiSignature -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MultiSignature) Descriptor() protoreflect.MessageDescriptor { - return md_MultiSignature -} - -// 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_MultiSignature) Type() protoreflect.MessageType { - return _fastReflection_MultiSignature_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MultiSignature) New() protoreflect.Message { - return new(fastReflection_MultiSignature) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MultiSignature) Interface() protoreflect.ProtoMessage { - return (*MultiSignature)(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_MultiSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_MultiSignature_1_list{list: &x.Signatures}) - if !f(fd_MultiSignature_signatures, 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_MultiSignature) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.MultiSignature.signatures": - return len(x.Signatures) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.MultiSignature")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.MultiSignature 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_MultiSignature) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.MultiSignature.signatures": - x.Signatures = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.MultiSignature")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.MultiSignature 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_MultiSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.multisig.v1beta1.MultiSignature.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_MultiSignature_1_list{}) - } - listValue := &_MultiSignature_1_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.MultiSignature")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.MultiSignature 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_MultiSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.MultiSignature.signatures": - lv := value.List() - clv := lv.(*_MultiSignature_1_list) - x.Signatures = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.MultiSignature")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.MultiSignature 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_MultiSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.MultiSignature.signatures": - if x.Signatures == nil { - x.Signatures = [][]byte{} - } - value := &_MultiSignature_1_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.MultiSignature")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.MultiSignature 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_MultiSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.MultiSignature.signatures": - list := [][]byte{} - return protoreflect.ValueOfList(&_MultiSignature_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.MultiSignature")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.MultiSignature 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_MultiSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.multisig.v1beta1.MultiSignature", 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_MultiSignature) 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_MultiSignature) 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_MultiSignature) 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_MultiSignature) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MultiSignature) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Signatures) > 0 { - for _, b := range x.Signatures { - l = len(b) - 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().(*MultiSignature) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Signatures[iNdEx]) - copy(dAtA[i:], x.Signatures[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signatures[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MultiSignature) - 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: MultiSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiSignature: 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 Signatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, make([]byte, postIndex-iNdEx)) - copy(x.Signatures[len(x.Signatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_CompactBitArray protoreflect.MessageDescriptor - fd_CompactBitArray_extra_bits_stored protoreflect.FieldDescriptor - fd_CompactBitArray_elems protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_multisig_v1beta1_multisig_proto_init() - md_CompactBitArray = File_cosmos_crypto_multisig_v1beta1_multisig_proto.Messages().ByName("CompactBitArray") - fd_CompactBitArray_extra_bits_stored = md_CompactBitArray.Fields().ByName("extra_bits_stored") - fd_CompactBitArray_elems = md_CompactBitArray.Fields().ByName("elems") -} - -var _ protoreflect.Message = (*fastReflection_CompactBitArray)(nil) - -type fastReflection_CompactBitArray CompactBitArray - -func (x *CompactBitArray) ProtoReflect() protoreflect.Message { - return (*fastReflection_CompactBitArray)(x) -} - -func (x *CompactBitArray) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CompactBitArray_messageType fastReflection_CompactBitArray_messageType -var _ protoreflect.MessageType = fastReflection_CompactBitArray_messageType{} - -type fastReflection_CompactBitArray_messageType struct{} - -func (x fastReflection_CompactBitArray_messageType) Zero() protoreflect.Message { - return (*fastReflection_CompactBitArray)(nil) -} -func (x fastReflection_CompactBitArray_messageType) New() protoreflect.Message { - return new(fastReflection_CompactBitArray) -} -func (x fastReflection_CompactBitArray_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CompactBitArray -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CompactBitArray) Descriptor() protoreflect.MessageDescriptor { - return md_CompactBitArray -} - -// 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_CompactBitArray) Type() protoreflect.MessageType { - return _fastReflection_CompactBitArray_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CompactBitArray) New() protoreflect.Message { - return new(fastReflection_CompactBitArray) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CompactBitArray) Interface() protoreflect.ProtoMessage { - return (*CompactBitArray)(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_CompactBitArray) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ExtraBitsStored != uint32(0) { - value := protoreflect.ValueOfUint32(x.ExtraBitsStored) - if !f(fd_CompactBitArray_extra_bits_stored, value) { - return - } - } - if len(x.Elems) != 0 { - value := protoreflect.ValueOfBytes(x.Elems) - if !f(fd_CompactBitArray_elems, 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_CompactBitArray) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.extra_bits_stored": - return x.ExtraBitsStored != uint32(0) - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.elems": - return len(x.Elems) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.CompactBitArray")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.CompactBitArray 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_CompactBitArray) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.extra_bits_stored": - x.ExtraBitsStored = uint32(0) - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.elems": - x.Elems = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.CompactBitArray")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.CompactBitArray 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_CompactBitArray) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.extra_bits_stored": - value := x.ExtraBitsStored - return protoreflect.ValueOfUint32(value) - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.elems": - value := x.Elems - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.CompactBitArray")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.CompactBitArray 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_CompactBitArray) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.extra_bits_stored": - x.ExtraBitsStored = uint32(value.Uint()) - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.elems": - x.Elems = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.CompactBitArray")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.CompactBitArray 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_CompactBitArray) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.extra_bits_stored": - panic(fmt.Errorf("field extra_bits_stored of message cosmos.crypto.multisig.v1beta1.CompactBitArray is not mutable")) - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.elems": - panic(fmt.Errorf("field elems of message cosmos.crypto.multisig.v1beta1.CompactBitArray is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.CompactBitArray")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.CompactBitArray 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_CompactBitArray) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.extra_bits_stored": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.crypto.multisig.v1beta1.CompactBitArray.elems": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.multisig.v1beta1.CompactBitArray")) - } - panic(fmt.Errorf("message cosmos.crypto.multisig.v1beta1.CompactBitArray 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_CompactBitArray) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.multisig.v1beta1.CompactBitArray", 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_CompactBitArray) 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_CompactBitArray) 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_CompactBitArray) 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_CompactBitArray) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CompactBitArray) - 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.ExtraBitsStored != 0 { - n += 1 + runtime.Sov(uint64(x.ExtraBitsStored)) - } - l = len(x.Elems) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CompactBitArray) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Elems) > 0 { - i -= len(x.Elems) - copy(dAtA[i:], x.Elems) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Elems))) - i-- - dAtA[i] = 0x12 - } - if x.ExtraBitsStored != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExtraBitsStored)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CompactBitArray) - 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: CompactBitArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CompactBitArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExtraBitsStored", wireType) - } - x.ExtraBitsStored = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ExtraBitsStored |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Elems = append(x.Elems[:0], dAtA[iNdEx:postIndex]...) - if x.Elems == nil { - x.Elems = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/multisig/v1beta1/multisig.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers -// signed and with which modes. -type MultiSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (x *MultiSignature) Reset() { - *x = MultiSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MultiSignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiSignature) ProtoMessage() {} - -// Deprecated: Use MultiSignature.ProtoReflect.Descriptor instead. -func (*MultiSignature) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescGZIP(), []int{0} -} - -func (x *MultiSignature) GetSignatures() [][]byte { - if x != nil { - return x.Signatures - } - return nil -} - -// CompactBitArray is an implementation of a space efficient bit array. -// This is used to ensure that the encoded data takes up a minimal amount of -// space after proto encoding. -// This is not thread safe, and is not intended for concurrent usage. -type CompactBitArray struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExtraBitsStored uint32 `protobuf:"varint,1,opt,name=extra_bits_stored,json=extraBitsStored,proto3" json:"extra_bits_stored,omitempty"` - Elems []byte `protobuf:"bytes,2,opt,name=elems,proto3" json:"elems,omitempty"` -} - -func (x *CompactBitArray) Reset() { - *x = CompactBitArray{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompactBitArray) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompactBitArray) ProtoMessage() {} - -// Deprecated: Use CompactBitArray.ProtoReflect.Descriptor instead. -func (*CompactBitArray) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescGZIP(), []int{1} -} - -func (x *CompactBitArray) GetExtraBitsStored() uint32 { - if x != nil { - return x.ExtraBitsStored - } - return 0 -} - -func (x *CompactBitArray) GetElems() []byte { - if x != nil { - return x.Elems - } - return nil -} - -var File_cosmos_crypto_multisig_v1beta1_multisig_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x04, 0xd0, 0xa1, 0x1f, 0x01, 0x22, 0x59, 0x0a, - 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x42, 0x69, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, - 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x5f, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x42, 0x69, 0x74, 0x73, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x6c, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65, 0x6c, 0x65, - 0x6d, 0x73, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0x9f, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x0d, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, - 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, - 0x69, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, - 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescOnce sync.Once - file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescData = file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDesc -) - -func file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescGZIP() []byte { - file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescData) - }) - return file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDescData -} - -var file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_crypto_multisig_v1beta1_multisig_proto_goTypes = []interface{}{ - (*MultiSignature)(nil), // 0: cosmos.crypto.multisig.v1beta1.MultiSignature - (*CompactBitArray)(nil), // 1: cosmos.crypto.multisig.v1beta1.CompactBitArray -} -var file_cosmos_crypto_multisig_v1beta1_multisig_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crypto_multisig_v1beta1_multisig_proto_init() } -func file_cosmos_crypto_multisig_v1beta1_multisig_proto_init() { - if File_cosmos_crypto_multisig_v1beta1_multisig_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MultiSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompactBitArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_multisig_v1beta1_multisig_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_multisig_v1beta1_multisig_proto_depIdxs, - MessageInfos: file_cosmos_crypto_multisig_v1beta1_multisig_proto_msgTypes, - }.Build() - File_cosmos_crypto_multisig_v1beta1_multisig_proto = out.File - file_cosmos_crypto_multisig_v1beta1_multisig_proto_rawDesc = nil - file_cosmos_crypto_multisig_v1beta1_multisig_proto_goTypes = nil - file_cosmos_crypto_multisig_v1beta1_multisig_proto_depIdxs = nil -} diff --git a/api/cosmos/crypto/secp256k1/keys.pulsar.go b/api/cosmos/crypto/secp256k1/keys.pulsar.go deleted file mode 100644 index dee51b3d5f66..000000000000 --- a/api/cosmos/crypto/secp256k1/keys.pulsar.go +++ /dev/null @@ -1,1052 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package secp256k1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_PubKey protoreflect.MessageDescriptor - fd_PubKey_key protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_secp256k1_keys_proto_init() - md_PubKey = File_cosmos_crypto_secp256k1_keys_proto.Messages().ByName("PubKey") - fd_PubKey_key = md_PubKey.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_PubKey)(nil) - -type fastReflection_PubKey PubKey - -func (x *PubKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PubKey)(x) -} - -func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_secp256k1_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType -var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} - -type fastReflection_PubKey_messageType struct{} - -func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PubKey)(nil) -} -func (x fastReflection_PubKey_messageType) New() protoreflect.Message { - return new(fastReflection_PubKey) -} -func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// 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_PubKey) Type() protoreflect.MessageType { - return _fastReflection_PubKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PubKey) New() protoreflect.Message { - return new(fastReflection_PubKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { - return (*PubKey)(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_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PubKey_key, 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_PubKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PubKey.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PubKey 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_PubKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PubKey.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PubKey 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_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.secp256k1.PubKey.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PubKey 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_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PubKey.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PubKey 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_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PubKey.key": - panic(fmt.Errorf("field key of message cosmos.crypto.secp256k1.PubKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PubKey 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_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PubKey.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PubKey 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_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.secp256k1.PubKey", 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_PubKey) 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_PubKey) 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_PubKey) 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_PubKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*PubKey) - 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: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PrivKey protoreflect.MessageDescriptor - fd_PrivKey_key protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_secp256k1_keys_proto_init() - md_PrivKey = File_cosmos_crypto_secp256k1_keys_proto.Messages().ByName("PrivKey") - fd_PrivKey_key = md_PrivKey.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_PrivKey)(nil) - -type fastReflection_PrivKey PrivKey - -func (x *PrivKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PrivKey)(x) -} - -func (x *PrivKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_secp256k1_keys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PrivKey_messageType fastReflection_PrivKey_messageType -var _ protoreflect.MessageType = fastReflection_PrivKey_messageType{} - -type fastReflection_PrivKey_messageType struct{} - -func (x fastReflection_PrivKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PrivKey)(nil) -} -func (x fastReflection_PrivKey_messageType) New() protoreflect.Message { - return new(fastReflection_PrivKey) -} -func (x fastReflection_PrivKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PrivKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PrivKey) Descriptor() protoreflect.MessageDescriptor { - return md_PrivKey -} - -// 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_PrivKey) Type() protoreflect.MessageType { - return _fastReflection_PrivKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PrivKey) New() protoreflect.Message { - return new(fastReflection_PrivKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PrivKey) Interface() protoreflect.ProtoMessage { - return (*PrivKey)(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_PrivKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PrivKey_key, 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_PrivKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PrivKey.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PrivKey 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_PrivKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PrivKey.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PrivKey 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_PrivKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.secp256k1.PrivKey.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PrivKey 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_PrivKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PrivKey.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PrivKey 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_PrivKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PrivKey.key": - panic(fmt.Errorf("field key of message cosmos.crypto.secp256k1.PrivKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PrivKey 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_PrivKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256k1.PrivKey.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256k1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256k1.PrivKey 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_PrivKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.secp256k1.PrivKey", 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_PrivKey) 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_PrivKey) 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_PrivKey) 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_PrivKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PrivKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PrivKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*PrivKey) - 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: PrivKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PrivKey: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/secp256k1/keys.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PubKey defines a secp256k1 public key -// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -// if the y-coordinate is the lexicographically largest of the two associated with -// the x-coordinate. Otherwise the first byte is a 0x03. -// This prefix is followed with the x-coordinate. -type PubKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *PubKey) Reset() { - *x = PubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_secp256k1_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PubKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PubKey) ProtoMessage() {} - -// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. -func (*PubKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_secp256k1_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *PubKey) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -// PrivKey defines a secp256k1 private key. -type PrivKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *PrivKey) Reset() { - *x = PrivKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_secp256k1_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrivKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivKey) ProtoMessage() {} - -// Deprecated: Use PrivKey.ProtoReflect.Descriptor instead. -func (*PrivKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_secp256k1_keys_proto_rawDescGZIP(), []int{1} -} - -func (x *PrivKey) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -var File_cosmos_crypto_secp256k1_keys_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_secp256k1_keys_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, - 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x1b, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x42, 0xe0, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, - 0x6b, 0x31, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x53, 0xaa, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, - 0x36, 0x6b, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x63, 0x70, - 0x32, 0x35, 0x36, 0x6b, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_secp256k1_keys_proto_rawDescOnce sync.Once - file_cosmos_crypto_secp256k1_keys_proto_rawDescData = file_cosmos_crypto_secp256k1_keys_proto_rawDesc -) - -func file_cosmos_crypto_secp256k1_keys_proto_rawDescGZIP() []byte { - file_cosmos_crypto_secp256k1_keys_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_secp256k1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_secp256k1_keys_proto_rawDescData) - }) - return file_cosmos_crypto_secp256k1_keys_proto_rawDescData -} - -var file_cosmos_crypto_secp256k1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_crypto_secp256k1_keys_proto_goTypes = []interface{}{ - (*PubKey)(nil), // 0: cosmos.crypto.secp256k1.PubKey - (*PrivKey)(nil), // 1: cosmos.crypto.secp256k1.PrivKey -} -var file_cosmos_crypto_secp256k1_keys_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crypto_secp256k1_keys_proto_init() } -func file_cosmos_crypto_secp256k1_keys_proto_init() { - if File_cosmos_crypto_secp256k1_keys_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_secp256k1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PubKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_secp256k1_keys_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_secp256k1_keys_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_secp256k1_keys_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_secp256k1_keys_proto_depIdxs, - MessageInfos: file_cosmos_crypto_secp256k1_keys_proto_msgTypes, - }.Build() - File_cosmos_crypto_secp256k1_keys_proto = out.File - file_cosmos_crypto_secp256k1_keys_proto_rawDesc = nil - file_cosmos_crypto_secp256k1_keys_proto_goTypes = nil - file_cosmos_crypto_secp256k1_keys_proto_depIdxs = nil -} diff --git a/api/cosmos/crypto/secp256r1/keys.pulsar.go b/api/cosmos/crypto/secp256r1/keys.pulsar.go deleted file mode 100644 index b2d9fc79656f..000000000000 --- a/api/cosmos/crypto/secp256r1/keys.pulsar.go +++ /dev/null @@ -1,1056 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package secp256r1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_PubKey protoreflect.MessageDescriptor - fd_PubKey_key protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_secp256r1_keys_proto_init() - md_PubKey = File_cosmos_crypto_secp256r1_keys_proto.Messages().ByName("PubKey") - fd_PubKey_key = md_PubKey.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_PubKey)(nil) - -type fastReflection_PubKey PubKey - -func (x *PubKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PubKey)(x) -} - -func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_secp256r1_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType -var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} - -type fastReflection_PubKey_messageType struct{} - -func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PubKey)(nil) -} -func (x fastReflection_PubKey_messageType) New() protoreflect.Message { - return new(fastReflection_PubKey) -} -func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// 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_PubKey) Type() protoreflect.MessageType { - return _fastReflection_PubKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PubKey) New() protoreflect.Message { - return new(fastReflection_PubKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { - return (*PubKey)(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_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PubKey_key, 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_PubKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PubKey.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PubKey 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_PubKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PubKey.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PubKey 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_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.secp256r1.PubKey.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PubKey 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_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PubKey.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PubKey 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_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PubKey.key": - panic(fmt.Errorf("field key of message cosmos.crypto.secp256r1.PubKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PubKey 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_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PubKey.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PubKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PubKey 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_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.secp256r1.PubKey", 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_PubKey) 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_PubKey) 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_PubKey) 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_PubKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*PubKey) - 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: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PrivKey protoreflect.MessageDescriptor - fd_PrivKey_secret protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_crypto_secp256r1_keys_proto_init() - md_PrivKey = File_cosmos_crypto_secp256r1_keys_proto.Messages().ByName("PrivKey") - fd_PrivKey_secret = md_PrivKey.Fields().ByName("secret") -} - -var _ protoreflect.Message = (*fastReflection_PrivKey)(nil) - -type fastReflection_PrivKey PrivKey - -func (x *PrivKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PrivKey)(x) -} - -func (x *PrivKey) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_crypto_secp256r1_keys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PrivKey_messageType fastReflection_PrivKey_messageType -var _ protoreflect.MessageType = fastReflection_PrivKey_messageType{} - -type fastReflection_PrivKey_messageType struct{} - -func (x fastReflection_PrivKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PrivKey)(nil) -} -func (x fastReflection_PrivKey_messageType) New() protoreflect.Message { - return new(fastReflection_PrivKey) -} -func (x fastReflection_PrivKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PrivKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PrivKey) Descriptor() protoreflect.MessageDescriptor { - return md_PrivKey -} - -// 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_PrivKey) Type() protoreflect.MessageType { - return _fastReflection_PrivKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PrivKey) New() protoreflect.Message { - return new(fastReflection_PrivKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PrivKey) Interface() protoreflect.ProtoMessage { - return (*PrivKey)(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_PrivKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Secret) != 0 { - value := protoreflect.ValueOfBytes(x.Secret) - if !f(fd_PrivKey_secret, 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_PrivKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PrivKey.secret": - return len(x.Secret) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PrivKey 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_PrivKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PrivKey.secret": - x.Secret = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PrivKey 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_PrivKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.crypto.secp256r1.PrivKey.secret": - value := x.Secret - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PrivKey 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_PrivKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PrivKey.secret": - x.Secret = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PrivKey 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_PrivKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PrivKey.secret": - panic(fmt.Errorf("field secret of message cosmos.crypto.secp256r1.PrivKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PrivKey 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_PrivKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.crypto.secp256r1.PrivKey.secret": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crypto.secp256r1.PrivKey")) - } - panic(fmt.Errorf("message cosmos.crypto.secp256r1.PrivKey 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_PrivKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.crypto.secp256r1.PrivKey", 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_PrivKey) 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_PrivKey) 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_PrivKey) 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_PrivKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PrivKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Secret) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PrivKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Secret) > 0 { - i -= len(x.Secret) - copy(dAtA[i:], x.Secret) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Secret))) - 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().(*PrivKey) - 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: PrivKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PrivKey: 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 Secret", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Secret = append(x.Secret[:0], dAtA[iNdEx:postIndex]...) - if x.Secret == nil { - x.Secret = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/crypto/secp256r1/keys.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PubKey defines a secp256r1 ECDSA public key. -type PubKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Point on secp256r1 curve in a compressed representation as specified in section - // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *PubKey) Reset() { - *x = PubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_secp256r1_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PubKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PubKey) ProtoMessage() {} - -// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. -func (*PubKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_secp256r1_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *PubKey) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -// PrivKey defines a secp256r1 ECDSA private key. -type PrivKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // secret number serialized using big-endian encoding - Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *PrivKey) Reset() { - *x = PrivKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_crypto_secp256r1_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrivKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivKey) ProtoMessage() {} - -// Deprecated: Use PrivKey.ProtoReflect.Descriptor instead. -func (*PrivKey) Descriptor() ([]byte, []int) { - return file_cosmos_crypto_secp256r1_keys_proto_rawDescGZIP(), []int{1} -} - -func (x *PrivKey) GetSecret() []byte { - if x != nil { - return x.Secret - } - return nil -} - -var File_cosmos_crypto_secp256r1_keys_proto protoreflect.FileDescriptor - -var file_cosmos_crypto_secp256r1_keys_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x72, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x72, 0x31, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0b, 0xda, 0xde, 0x1f, 0x07, - 0x65, 0x63, 0x64, 0x73, 0x61, 0x50, 0x4b, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x2e, 0x0a, 0x07, - 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0b, 0xda, 0xde, 0x1f, 0x07, 0x65, 0x63, 0x64, - 0x73, 0x61, 0x53, 0x4b, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0xec, 0x01, 0x0a, - 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x72, 0x31, 0x42, 0x09, 0x4b, 0x65, - 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, - 0x36, 0x72, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x53, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, - 0x36, 0x72, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x72, 0x31, 0xe2, 0x02, 0x23, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, - 0x63, 0x70, 0x32, 0x35, 0x36, 0x72, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x72, 0x31, 0xc8, - 0xe1, 0x1e, 0x00, 0xd8, 0xe1, 0x1e, 0x00, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_crypto_secp256r1_keys_proto_rawDescOnce sync.Once - file_cosmos_crypto_secp256r1_keys_proto_rawDescData = file_cosmos_crypto_secp256r1_keys_proto_rawDesc -) - -func file_cosmos_crypto_secp256r1_keys_proto_rawDescGZIP() []byte { - file_cosmos_crypto_secp256r1_keys_proto_rawDescOnce.Do(func() { - file_cosmos_crypto_secp256r1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crypto_secp256r1_keys_proto_rawDescData) - }) - return file_cosmos_crypto_secp256r1_keys_proto_rawDescData -} - -var file_cosmos_crypto_secp256r1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_crypto_secp256r1_keys_proto_goTypes = []interface{}{ - (*PubKey)(nil), // 0: cosmos.crypto.secp256r1.PubKey - (*PrivKey)(nil), // 1: cosmos.crypto.secp256r1.PrivKey -} -var file_cosmos_crypto_secp256r1_keys_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_crypto_secp256r1_keys_proto_init() } -func file_cosmos_crypto_secp256r1_keys_proto_init() { - if File_cosmos_crypto_secp256r1_keys_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_crypto_secp256r1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PubKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_crypto_secp256r1_keys_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_crypto_secp256r1_keys_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_crypto_secp256r1_keys_proto_goTypes, - DependencyIndexes: file_cosmos_crypto_secp256r1_keys_proto_depIdxs, - MessageInfos: file_cosmos_crypto_secp256r1_keys_proto_msgTypes, - }.Build() - File_cosmos_crypto_secp256r1_keys_proto = out.File - file_cosmos_crypto_secp256r1_keys_proto_rawDesc = nil - file_cosmos_crypto_secp256r1_keys_proto_goTypes = nil - file_cosmos_crypto_secp256r1_keys_proto_depIdxs = nil -} diff --git a/api/cosmos/distribution/v1beta1/distribution.pulsar.go b/api/cosmos/distribution/v1beta1/distribution.pulsar.go deleted file mode 100644 index a681cb4e6b08..000000000000 --- a/api/cosmos/distribution/v1beta1/distribution.pulsar.go +++ /dev/null @@ -1,7577 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package distributionv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_community_tax protoreflect.FieldDescriptor - fd_Params_base_proposer_reward protoreflect.FieldDescriptor - fd_Params_bonus_proposer_reward protoreflect.FieldDescriptor - fd_Params_withdraw_addr_enabled protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_Params = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("Params") - fd_Params_community_tax = md_Params.Fields().ByName("community_tax") - fd_Params_base_proposer_reward = md_Params.Fields().ByName("base_proposer_reward") - fd_Params_bonus_proposer_reward = md_Params.Fields().ByName("bonus_proposer_reward") - fd_Params_withdraw_addr_enabled = md_Params.Fields().ByName("withdraw_addr_enabled") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CommunityTax != "" { - value := protoreflect.ValueOfString(x.CommunityTax) - if !f(fd_Params_community_tax, value) { - return - } - } - if x.BaseProposerReward != "" { - value := protoreflect.ValueOfString(x.BaseProposerReward) - if !f(fd_Params_base_proposer_reward, value) { - return - } - } - if x.BonusProposerReward != "" { - value := protoreflect.ValueOfString(x.BonusProposerReward) - if !f(fd_Params_bonus_proposer_reward, value) { - return - } - } - if x.WithdrawAddrEnabled != false { - value := protoreflect.ValueOfBool(x.WithdrawAddrEnabled) - if !f(fd_Params_withdraw_addr_enabled, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.Params.community_tax": - return x.CommunityTax != "" - case "cosmos.distribution.v1beta1.Params.base_proposer_reward": - return x.BaseProposerReward != "" - case "cosmos.distribution.v1beta1.Params.bonus_proposer_reward": - return x.BonusProposerReward != "" - case "cosmos.distribution.v1beta1.Params.withdraw_addr_enabled": - return x.WithdrawAddrEnabled != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.Params.community_tax": - x.CommunityTax = "" - case "cosmos.distribution.v1beta1.Params.base_proposer_reward": - x.BaseProposerReward = "" - case "cosmos.distribution.v1beta1.Params.bonus_proposer_reward": - x.BonusProposerReward = "" - case "cosmos.distribution.v1beta1.Params.withdraw_addr_enabled": - x.WithdrawAddrEnabled = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.Params.community_tax": - value := x.CommunityTax - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.Params.base_proposer_reward": - value := x.BaseProposerReward - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.Params.bonus_proposer_reward": - value := x.BonusProposerReward - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.Params.withdraw_addr_enabled": - value := x.WithdrawAddrEnabled - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.Params.community_tax": - x.CommunityTax = value.Interface().(string) - case "cosmos.distribution.v1beta1.Params.base_proposer_reward": - x.BaseProposerReward = value.Interface().(string) - case "cosmos.distribution.v1beta1.Params.bonus_proposer_reward": - x.BonusProposerReward = value.Interface().(string) - case "cosmos.distribution.v1beta1.Params.withdraw_addr_enabled": - x.WithdrawAddrEnabled = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.Params.community_tax": - panic(fmt.Errorf("field community_tax of message cosmos.distribution.v1beta1.Params is not mutable")) - case "cosmos.distribution.v1beta1.Params.base_proposer_reward": - panic(fmt.Errorf("field base_proposer_reward of message cosmos.distribution.v1beta1.Params is not mutable")) - case "cosmos.distribution.v1beta1.Params.bonus_proposer_reward": - panic(fmt.Errorf("field bonus_proposer_reward of message cosmos.distribution.v1beta1.Params is not mutable")) - case "cosmos.distribution.v1beta1.Params.withdraw_addr_enabled": - panic(fmt.Errorf("field withdraw_addr_enabled of message cosmos.distribution.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.Params.community_tax": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.Params.base_proposer_reward": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.Params.bonus_proposer_reward": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.Params.withdraw_addr_enabled": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.CommunityTax) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BaseProposerReward) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BonusProposerReward) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.WithdrawAddrEnabled { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.WithdrawAddrEnabled { - i-- - if x.WithdrawAddrEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(x.BonusProposerReward) > 0 { - i -= len(x.BonusProposerReward) - copy(dAtA[i:], x.BonusProposerReward) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BonusProposerReward))) - i-- - dAtA[i] = 0x1a - } - if len(x.BaseProposerReward) > 0 { - i -= len(x.BaseProposerReward) - copy(dAtA[i:], x.BaseProposerReward) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseProposerReward))) - i-- - dAtA[i] = 0x12 - } - if len(x.CommunityTax) > 0 { - i -= len(x.CommunityTax) - copy(dAtA[i:], x.CommunityTax) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityTax))) - 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().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityTax", 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.CommunityTax = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseProposerReward", 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.BaseProposerReward = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BonusProposerReward", 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.BonusProposerReward = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddrEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WithdrawAddrEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorHistoricalRewards_1_list)(nil) - -type _ValidatorHistoricalRewards_1_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_ValidatorHistoricalRewards_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorHistoricalRewards_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorHistoricalRewards_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorHistoricalRewards_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorHistoricalRewards_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorHistoricalRewards_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorHistoricalRewards_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorHistoricalRewards_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorHistoricalRewards protoreflect.MessageDescriptor - fd_ValidatorHistoricalRewards_cumulative_reward_ratio protoreflect.FieldDescriptor - fd_ValidatorHistoricalRewards_reference_count protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_ValidatorHistoricalRewards = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorHistoricalRewards") - fd_ValidatorHistoricalRewards_cumulative_reward_ratio = md_ValidatorHistoricalRewards.Fields().ByName("cumulative_reward_ratio") - fd_ValidatorHistoricalRewards_reference_count = md_ValidatorHistoricalRewards.Fields().ByName("reference_count") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorHistoricalRewards)(nil) - -type fastReflection_ValidatorHistoricalRewards ValidatorHistoricalRewards - -func (x *ValidatorHistoricalRewards) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorHistoricalRewards)(x) -} - -func (x *ValidatorHistoricalRewards) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorHistoricalRewards_messageType fastReflection_ValidatorHistoricalRewards_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorHistoricalRewards_messageType{} - -type fastReflection_ValidatorHistoricalRewards_messageType struct{} - -func (x fastReflection_ValidatorHistoricalRewards_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorHistoricalRewards)(nil) -} -func (x fastReflection_ValidatorHistoricalRewards_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorHistoricalRewards) -} -func (x fastReflection_ValidatorHistoricalRewards_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorHistoricalRewards -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorHistoricalRewards) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorHistoricalRewards -} - -// 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_ValidatorHistoricalRewards) Type() protoreflect.MessageType { - return _fastReflection_ValidatorHistoricalRewards_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorHistoricalRewards) New() protoreflect.Message { - return new(fastReflection_ValidatorHistoricalRewards) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorHistoricalRewards) Interface() protoreflect.ProtoMessage { - return (*ValidatorHistoricalRewards)(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_ValidatorHistoricalRewards) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.CumulativeRewardRatio) != 0 { - value := protoreflect.ValueOfList(&_ValidatorHistoricalRewards_1_list{list: &x.CumulativeRewardRatio}) - if !f(fd_ValidatorHistoricalRewards_cumulative_reward_ratio, value) { - return - } - } - if x.ReferenceCount != uint32(0) { - value := protoreflect.ValueOfUint32(x.ReferenceCount) - if !f(fd_ValidatorHistoricalRewards_reference_count, 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_ValidatorHistoricalRewards) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": - return len(x.CumulativeRewardRatio) != 0 - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": - return x.ReferenceCount != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewards 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_ValidatorHistoricalRewards) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": - x.CumulativeRewardRatio = nil - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": - x.ReferenceCount = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewards 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_ValidatorHistoricalRewards) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": - if len(x.CumulativeRewardRatio) == 0 { - return protoreflect.ValueOfList(&_ValidatorHistoricalRewards_1_list{}) - } - listValue := &_ValidatorHistoricalRewards_1_list{list: &x.CumulativeRewardRatio} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": - value := x.ReferenceCount - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewards 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_ValidatorHistoricalRewards) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": - lv := value.List() - clv := lv.(*_ValidatorHistoricalRewards_1_list) - x.CumulativeRewardRatio = *clv.list - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": - x.ReferenceCount = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewards 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_ValidatorHistoricalRewards) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": - if x.CumulativeRewardRatio == nil { - x.CumulativeRewardRatio = []*v1beta1.DecCoin{} - } - value := &_ValidatorHistoricalRewards_1_list{list: &x.CumulativeRewardRatio} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": - panic(fmt.Errorf("field reference_count of message cosmos.distribution.v1beta1.ValidatorHistoricalRewards is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewards 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_ValidatorHistoricalRewards) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_ValidatorHistoricalRewards_1_list{list: &list}) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewards 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_ValidatorHistoricalRewards) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorHistoricalRewards", 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_ValidatorHistoricalRewards) 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_ValidatorHistoricalRewards) 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_ValidatorHistoricalRewards) 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_ValidatorHistoricalRewards) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorHistoricalRewards) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.CumulativeRewardRatio) > 0 { - for _, e := range x.CumulativeRewardRatio { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ReferenceCount != 0 { - n += 1 + runtime.Sov(uint64(x.ReferenceCount)) - } - 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().(*ValidatorHistoricalRewards) - 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.ReferenceCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ReferenceCount)) - i-- - dAtA[i] = 0x10 - } - if len(x.CumulativeRewardRatio) > 0 { - for iNdEx := len(x.CumulativeRewardRatio) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.CumulativeRewardRatio[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorHistoricalRewards) - 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: ValidatorHistoricalRewards: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorHistoricalRewards: 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 CumulativeRewardRatio", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CumulativeRewardRatio = append(x.CumulativeRewardRatio, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CumulativeRewardRatio[len(x.CumulativeRewardRatio)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ReferenceCount", wireType) - } - x.ReferenceCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ReferenceCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorCurrentRewards_1_list)(nil) - -type _ValidatorCurrentRewards_1_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_ValidatorCurrentRewards_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorCurrentRewards_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorCurrentRewards_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorCurrentRewards_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorCurrentRewards_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorCurrentRewards_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorCurrentRewards_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorCurrentRewards_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorCurrentRewards protoreflect.MessageDescriptor - fd_ValidatorCurrentRewards_rewards protoreflect.FieldDescriptor - fd_ValidatorCurrentRewards_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_ValidatorCurrentRewards = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorCurrentRewards") - fd_ValidatorCurrentRewards_rewards = md_ValidatorCurrentRewards.Fields().ByName("rewards") - fd_ValidatorCurrentRewards_period = md_ValidatorCurrentRewards.Fields().ByName("period") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorCurrentRewards)(nil) - -type fastReflection_ValidatorCurrentRewards ValidatorCurrentRewards - -func (x *ValidatorCurrentRewards) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorCurrentRewards)(x) -} - -func (x *ValidatorCurrentRewards) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorCurrentRewards_messageType fastReflection_ValidatorCurrentRewards_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorCurrentRewards_messageType{} - -type fastReflection_ValidatorCurrentRewards_messageType struct{} - -func (x fastReflection_ValidatorCurrentRewards_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorCurrentRewards)(nil) -} -func (x fastReflection_ValidatorCurrentRewards_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorCurrentRewards) -} -func (x fastReflection_ValidatorCurrentRewards_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorCurrentRewards -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorCurrentRewards) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorCurrentRewards -} - -// 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_ValidatorCurrentRewards) Type() protoreflect.MessageType { - return _fastReflection_ValidatorCurrentRewards_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorCurrentRewards) New() protoreflect.Message { - return new(fastReflection_ValidatorCurrentRewards) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorCurrentRewards) Interface() protoreflect.ProtoMessage { - return (*ValidatorCurrentRewards)(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_ValidatorCurrentRewards) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Rewards) != 0 { - value := protoreflect.ValueOfList(&_ValidatorCurrentRewards_1_list{list: &x.Rewards}) - if !f(fd_ValidatorCurrentRewards_rewards, value) { - return - } - } - if x.Period != uint64(0) { - value := protoreflect.ValueOfUint64(x.Period) - if !f(fd_ValidatorCurrentRewards_period, 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_ValidatorCurrentRewards) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards": - return len(x.Rewards) != 0 - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.period": - return x.Period != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewards 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_ValidatorCurrentRewards) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards": - x.Rewards = nil - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.period": - x.Period = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewards 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_ValidatorCurrentRewards) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards": - if len(x.Rewards) == 0 { - return protoreflect.ValueOfList(&_ValidatorCurrentRewards_1_list{}) - } - listValue := &_ValidatorCurrentRewards_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.period": - value := x.Period - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewards 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_ValidatorCurrentRewards) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards": - lv := value.List() - clv := lv.(*_ValidatorCurrentRewards_1_list) - x.Rewards = *clv.list - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.period": - x.Period = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewards 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_ValidatorCurrentRewards) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards": - if x.Rewards == nil { - x.Rewards = []*v1beta1.DecCoin{} - } - value := &_ValidatorCurrentRewards_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.period": - panic(fmt.Errorf("field period of message cosmos.distribution.v1beta1.ValidatorCurrentRewards is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewards 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_ValidatorCurrentRewards) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_ValidatorCurrentRewards_1_list{list: &list}) - case "cosmos.distribution.v1beta1.ValidatorCurrentRewards.period": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewards 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_ValidatorCurrentRewards) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorCurrentRewards", 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_ValidatorCurrentRewards) 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_ValidatorCurrentRewards) 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_ValidatorCurrentRewards) 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_ValidatorCurrentRewards) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorCurrentRewards) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Rewards) > 0 { - for _, e := range x.Rewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Period != 0 { - n += 1 + runtime.Sov(uint64(x.Period)) - } - 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().(*ValidatorCurrentRewards) - 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.Period != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) - i-- - dAtA[i] = 0x10 - } - if len(x.Rewards) > 0 { - for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Rewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorCurrentRewards) - 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: ValidatorCurrentRewards: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorCurrentRewards: 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 Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Rewards = append(x.Rewards, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - x.Period = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Period |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorAccumulatedCommission_1_list)(nil) - -type _ValidatorAccumulatedCommission_1_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_ValidatorAccumulatedCommission_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorAccumulatedCommission_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorAccumulatedCommission_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorAccumulatedCommission_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorAccumulatedCommission_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorAccumulatedCommission_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorAccumulatedCommission_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorAccumulatedCommission_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorAccumulatedCommission protoreflect.MessageDescriptor - fd_ValidatorAccumulatedCommission_commission protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_ValidatorAccumulatedCommission = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorAccumulatedCommission") - fd_ValidatorAccumulatedCommission_commission = md_ValidatorAccumulatedCommission.Fields().ByName("commission") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorAccumulatedCommission)(nil) - -type fastReflection_ValidatorAccumulatedCommission ValidatorAccumulatedCommission - -func (x *ValidatorAccumulatedCommission) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorAccumulatedCommission)(x) -} - -func (x *ValidatorAccumulatedCommission) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorAccumulatedCommission_messageType fastReflection_ValidatorAccumulatedCommission_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorAccumulatedCommission_messageType{} - -type fastReflection_ValidatorAccumulatedCommission_messageType struct{} - -func (x fastReflection_ValidatorAccumulatedCommission_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorAccumulatedCommission)(nil) -} -func (x fastReflection_ValidatorAccumulatedCommission_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorAccumulatedCommission) -} -func (x fastReflection_ValidatorAccumulatedCommission_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorAccumulatedCommission -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorAccumulatedCommission) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorAccumulatedCommission -} - -// 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_ValidatorAccumulatedCommission) Type() protoreflect.MessageType { - return _fastReflection_ValidatorAccumulatedCommission_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorAccumulatedCommission) New() protoreflect.Message { - return new(fastReflection_ValidatorAccumulatedCommission) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorAccumulatedCommission) Interface() protoreflect.ProtoMessage { - return (*ValidatorAccumulatedCommission)(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_ValidatorAccumulatedCommission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Commission) != 0 { - value := protoreflect.ValueOfList(&_ValidatorAccumulatedCommission_1_list{list: &x.Commission}) - if !f(fd_ValidatorAccumulatedCommission_commission, 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_ValidatorAccumulatedCommission) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission": - return len(x.Commission) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommission 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_ValidatorAccumulatedCommission) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission": - x.Commission = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommission 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_ValidatorAccumulatedCommission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission": - if len(x.Commission) == 0 { - return protoreflect.ValueOfList(&_ValidatorAccumulatedCommission_1_list{}) - } - listValue := &_ValidatorAccumulatedCommission_1_list{list: &x.Commission} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommission 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_ValidatorAccumulatedCommission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission": - lv := value.List() - clv := lv.(*_ValidatorAccumulatedCommission_1_list) - x.Commission = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommission 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_ValidatorAccumulatedCommission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission": - if x.Commission == nil { - x.Commission = []*v1beta1.DecCoin{} - } - value := &_ValidatorAccumulatedCommission_1_list{list: &x.Commission} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommission 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_ValidatorAccumulatedCommission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_ValidatorAccumulatedCommission_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommission 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_ValidatorAccumulatedCommission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", 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_ValidatorAccumulatedCommission) 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_ValidatorAccumulatedCommission) 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_ValidatorAccumulatedCommission) 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_ValidatorAccumulatedCommission) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorAccumulatedCommission) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Commission) > 0 { - for _, e := range x.Commission { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorAccumulatedCommission) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Commission) > 0 { - for iNdEx := len(x.Commission) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Commission[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorAccumulatedCommission) - 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: ValidatorAccumulatedCommission: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorAccumulatedCommission: 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 Commission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Commission = append(x.Commission, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission[len(x.Commission)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorOutstandingRewards_1_list)(nil) - -type _ValidatorOutstandingRewards_1_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_ValidatorOutstandingRewards_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorOutstandingRewards_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorOutstandingRewards_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorOutstandingRewards_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorOutstandingRewards_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorOutstandingRewards_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorOutstandingRewards_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorOutstandingRewards_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorOutstandingRewards protoreflect.MessageDescriptor - fd_ValidatorOutstandingRewards_rewards protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_ValidatorOutstandingRewards = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorOutstandingRewards") - fd_ValidatorOutstandingRewards_rewards = md_ValidatorOutstandingRewards.Fields().ByName("rewards") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorOutstandingRewards)(nil) - -type fastReflection_ValidatorOutstandingRewards ValidatorOutstandingRewards - -func (x *ValidatorOutstandingRewards) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorOutstandingRewards)(x) -} - -func (x *ValidatorOutstandingRewards) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorOutstandingRewards_messageType fastReflection_ValidatorOutstandingRewards_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorOutstandingRewards_messageType{} - -type fastReflection_ValidatorOutstandingRewards_messageType struct{} - -func (x fastReflection_ValidatorOutstandingRewards_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorOutstandingRewards)(nil) -} -func (x fastReflection_ValidatorOutstandingRewards_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorOutstandingRewards) -} -func (x fastReflection_ValidatorOutstandingRewards_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorOutstandingRewards -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorOutstandingRewards) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorOutstandingRewards -} - -// 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_ValidatorOutstandingRewards) Type() protoreflect.MessageType { - return _fastReflection_ValidatorOutstandingRewards_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorOutstandingRewards) New() protoreflect.Message { - return new(fastReflection_ValidatorOutstandingRewards) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorOutstandingRewards) Interface() protoreflect.ProtoMessage { - return (*ValidatorOutstandingRewards)(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_ValidatorOutstandingRewards) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Rewards) != 0 { - value := protoreflect.ValueOfList(&_ValidatorOutstandingRewards_1_list{list: &x.Rewards}) - if !f(fd_ValidatorOutstandingRewards_rewards, 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_ValidatorOutstandingRewards) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards": - return len(x.Rewards) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewards 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_ValidatorOutstandingRewards) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards": - x.Rewards = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewards 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_ValidatorOutstandingRewards) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards": - if len(x.Rewards) == 0 { - return protoreflect.ValueOfList(&_ValidatorOutstandingRewards_1_list{}) - } - listValue := &_ValidatorOutstandingRewards_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewards 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_ValidatorOutstandingRewards) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards": - lv := value.List() - clv := lv.(*_ValidatorOutstandingRewards_1_list) - x.Rewards = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewards 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_ValidatorOutstandingRewards) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards": - if x.Rewards == nil { - x.Rewards = []*v1beta1.DecCoin{} - } - value := &_ValidatorOutstandingRewards_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewards 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_ValidatorOutstandingRewards) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_ValidatorOutstandingRewards_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewards")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewards 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_ValidatorOutstandingRewards) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorOutstandingRewards", 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_ValidatorOutstandingRewards) 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_ValidatorOutstandingRewards) 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_ValidatorOutstandingRewards) 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_ValidatorOutstandingRewards) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorOutstandingRewards) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Rewards) > 0 { - for _, e := range x.Rewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorOutstandingRewards) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Rewards) > 0 { - for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Rewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorOutstandingRewards) - 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: ValidatorOutstandingRewards: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorOutstandingRewards: 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 Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Rewards = append(x.Rewards, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ValidatorSlashEvent protoreflect.MessageDescriptor - fd_ValidatorSlashEvent_validator_period protoreflect.FieldDescriptor - fd_ValidatorSlashEvent_fraction protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_ValidatorSlashEvent = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorSlashEvent") - fd_ValidatorSlashEvent_validator_period = md_ValidatorSlashEvent.Fields().ByName("validator_period") - fd_ValidatorSlashEvent_fraction = md_ValidatorSlashEvent.Fields().ByName("fraction") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorSlashEvent)(nil) - -type fastReflection_ValidatorSlashEvent ValidatorSlashEvent - -func (x *ValidatorSlashEvent) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSlashEvent)(x) -} - -func (x *ValidatorSlashEvent) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_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_ValidatorSlashEvent_messageType fastReflection_ValidatorSlashEvent_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSlashEvent_messageType{} - -type fastReflection_ValidatorSlashEvent_messageType struct{} - -func (x fastReflection_ValidatorSlashEvent_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSlashEvent)(nil) -} -func (x fastReflection_ValidatorSlashEvent_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSlashEvent) -} -func (x fastReflection_ValidatorSlashEvent_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSlashEvent -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorSlashEvent) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSlashEvent -} - -// 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_ValidatorSlashEvent) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSlashEvent_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSlashEvent) New() protoreflect.Message { - return new(fastReflection_ValidatorSlashEvent) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSlashEvent) Interface() protoreflect.ProtoMessage { - return (*ValidatorSlashEvent)(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_ValidatorSlashEvent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorPeriod != uint64(0) { - value := protoreflect.ValueOfUint64(x.ValidatorPeriod) - if !f(fd_ValidatorSlashEvent_validator_period, value) { - return - } - } - if x.Fraction != "" { - value := protoreflect.ValueOfString(x.Fraction) - if !f(fd_ValidatorSlashEvent_fraction, 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_ValidatorSlashEvent) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.validator_period": - return x.ValidatorPeriod != uint64(0) - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.fraction": - return x.Fraction != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvent")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvent 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_ValidatorSlashEvent) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.validator_period": - x.ValidatorPeriod = uint64(0) - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.fraction": - x.Fraction = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvent")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvent 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_ValidatorSlashEvent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.validator_period": - value := x.ValidatorPeriod - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.fraction": - value := x.Fraction - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvent")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvent 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_ValidatorSlashEvent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.validator_period": - x.ValidatorPeriod = value.Uint() - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.fraction": - x.Fraction = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvent")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvent 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_ValidatorSlashEvent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.validator_period": - panic(fmt.Errorf("field validator_period of message cosmos.distribution.v1beta1.ValidatorSlashEvent is not mutable")) - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.fraction": - panic(fmt.Errorf("field fraction of message cosmos.distribution.v1beta1.ValidatorSlashEvent is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvent")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvent 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_ValidatorSlashEvent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.validator_period": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.ValidatorSlashEvent.fraction": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvent")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvent 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_ValidatorSlashEvent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorSlashEvent", 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_ValidatorSlashEvent) 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_ValidatorSlashEvent) 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_ValidatorSlashEvent) 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_ValidatorSlashEvent) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorSlashEvent) - 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.ValidatorPeriod != 0 { - n += 1 + runtime.Sov(uint64(x.ValidatorPeriod)) - } - l = len(x.Fraction) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSlashEvent) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Fraction) > 0 { - i -= len(x.Fraction) - copy(dAtA[i:], x.Fraction) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fraction))) - i-- - dAtA[i] = 0x12 - } - if x.ValidatorPeriod != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorPeriod)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSlashEvent) - 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: ValidatorSlashEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorPeriod", wireType) - } - x.ValidatorPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ValidatorPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fraction", 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.Fraction = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorSlashEvents_1_list)(nil) - -type _ValidatorSlashEvents_1_list struct { - list *[]*ValidatorSlashEvent -} - -func (x *_ValidatorSlashEvents_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorSlashEvents_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorSlashEvents_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorSlashEvents_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorSlashEvents_1_list) AppendMutable() protoreflect.Value { - v := new(ValidatorSlashEvent) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorSlashEvents_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorSlashEvents_1_list) NewElement() protoreflect.Value { - v := new(ValidatorSlashEvent) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorSlashEvents_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorSlashEvents protoreflect.MessageDescriptor - fd_ValidatorSlashEvents_validator_slash_events protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_ValidatorSlashEvents = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorSlashEvents") - fd_ValidatorSlashEvents_validator_slash_events = md_ValidatorSlashEvents.Fields().ByName("validator_slash_events") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorSlashEvents)(nil) - -type fastReflection_ValidatorSlashEvents ValidatorSlashEvents - -func (x *ValidatorSlashEvents) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSlashEvents)(x) -} - -func (x *ValidatorSlashEvents) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_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_ValidatorSlashEvents_messageType fastReflection_ValidatorSlashEvents_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSlashEvents_messageType{} - -type fastReflection_ValidatorSlashEvents_messageType struct{} - -func (x fastReflection_ValidatorSlashEvents_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSlashEvents)(nil) -} -func (x fastReflection_ValidatorSlashEvents_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSlashEvents) -} -func (x fastReflection_ValidatorSlashEvents_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSlashEvents -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorSlashEvents) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSlashEvents -} - -// 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_ValidatorSlashEvents) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSlashEvents_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSlashEvents) New() protoreflect.Message { - return new(fastReflection_ValidatorSlashEvents) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSlashEvents) Interface() protoreflect.ProtoMessage { - return (*ValidatorSlashEvents)(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_ValidatorSlashEvents) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ValidatorSlashEvents) != 0 { - value := protoreflect.ValueOfList(&_ValidatorSlashEvents_1_list{list: &x.ValidatorSlashEvents}) - if !f(fd_ValidatorSlashEvents_validator_slash_events, 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_ValidatorSlashEvents) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": - return len(x.ValidatorSlashEvents) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvents")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvents 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_ValidatorSlashEvents) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": - x.ValidatorSlashEvents = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvents")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvents 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_ValidatorSlashEvents) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": - if len(x.ValidatorSlashEvents) == 0 { - return protoreflect.ValueOfList(&_ValidatorSlashEvents_1_list{}) - } - listValue := &_ValidatorSlashEvents_1_list{list: &x.ValidatorSlashEvents} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvents")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvents 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_ValidatorSlashEvents) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": - lv := value.List() - clv := lv.(*_ValidatorSlashEvents_1_list) - x.ValidatorSlashEvents = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvents")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvents 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_ValidatorSlashEvents) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": - if x.ValidatorSlashEvents == nil { - x.ValidatorSlashEvents = []*ValidatorSlashEvent{} - } - value := &_ValidatorSlashEvents_1_list{list: &x.ValidatorSlashEvents} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvents")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvents 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_ValidatorSlashEvents) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": - list := []*ValidatorSlashEvent{} - return protoreflect.ValueOfList(&_ValidatorSlashEvents_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEvents")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEvents 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_ValidatorSlashEvents) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorSlashEvents", 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_ValidatorSlashEvents) 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_ValidatorSlashEvents) 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_ValidatorSlashEvents) 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_ValidatorSlashEvents) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorSlashEvents) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.ValidatorSlashEvents) > 0 { - for _, e := range x.ValidatorSlashEvents { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSlashEvents) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorSlashEvents) > 0 { - for iNdEx := len(x.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorSlashEvents[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSlashEvents) - 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: ValidatorSlashEvents: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEvents: 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 ValidatorSlashEvents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorSlashEvents = append(x.ValidatorSlashEvents, &ValidatorSlashEvent{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSlashEvents[len(x.ValidatorSlashEvents)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_FeePool_1_list)(nil) - -type _FeePool_1_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_FeePool_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_FeePool_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_FeePool_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_FeePool_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_FeePool_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_FeePool_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_FeePool_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_FeePool_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_FeePool protoreflect.MessageDescriptor - fd_FeePool_community_pool protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_FeePool = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("FeePool") - fd_FeePool_community_pool = md_FeePool.Fields().ByName("community_pool") -} - -var _ protoreflect.Message = (*fastReflection_FeePool)(nil) - -type fastReflection_FeePool FeePool - -func (x *FeePool) ProtoReflect() protoreflect.Message { - return (*fastReflection_FeePool)(x) -} - -func (x *FeePool) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_FeePool_messageType fastReflection_FeePool_messageType -var _ protoreflect.MessageType = fastReflection_FeePool_messageType{} - -type fastReflection_FeePool_messageType struct{} - -func (x fastReflection_FeePool_messageType) Zero() protoreflect.Message { - return (*fastReflection_FeePool)(nil) -} -func (x fastReflection_FeePool_messageType) New() protoreflect.Message { - return new(fastReflection_FeePool) -} -func (x fastReflection_FeePool_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_FeePool -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_FeePool) Descriptor() protoreflect.MessageDescriptor { - return md_FeePool -} - -// 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_FeePool) Type() protoreflect.MessageType { - return _fastReflection_FeePool_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_FeePool) New() protoreflect.Message { - return new(fastReflection_FeePool) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_FeePool) Interface() protoreflect.ProtoMessage { - return (*FeePool)(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_FeePool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.CommunityPool) != 0 { - value := protoreflect.ValueOfList(&_FeePool_1_list{list: &x.CommunityPool}) - if !f(fd_FeePool_community_pool, 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_FeePool) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.FeePool.community_pool": - return len(x.CommunityPool) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.FeePool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.FeePool 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_FeePool) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.FeePool.community_pool": - x.CommunityPool = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.FeePool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.FeePool 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_FeePool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.FeePool.community_pool": - if len(x.CommunityPool) == 0 { - return protoreflect.ValueOfList(&_FeePool_1_list{}) - } - listValue := &_FeePool_1_list{list: &x.CommunityPool} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.FeePool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.FeePool 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_FeePool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.FeePool.community_pool": - lv := value.List() - clv := lv.(*_FeePool_1_list) - x.CommunityPool = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.FeePool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.FeePool 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_FeePool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.FeePool.community_pool": - if x.CommunityPool == nil { - x.CommunityPool = []*v1beta1.DecCoin{} - } - value := &_FeePool_1_list{list: &x.CommunityPool} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.FeePool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.FeePool 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_FeePool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.FeePool.community_pool": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_FeePool_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.FeePool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.FeePool 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_FeePool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.FeePool", 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_FeePool) 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_FeePool) 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_FeePool) 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_FeePool) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*FeePool) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.CommunityPool) > 0 { - for _, e := range x.CommunityPool { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*FeePool) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CommunityPool) > 0 { - for iNdEx := len(x.CommunityPool) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.CommunityPool[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*FeePool) - 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: FeePool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeePool: 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 CommunityPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPool = append(x.CommunityPool, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CommunityPool[len(x.CommunityPool)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_CommunityPoolSpendProposal_4_list)(nil) - -type _CommunityPoolSpendProposal_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_CommunityPoolSpendProposal_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_CommunityPoolSpendProposal_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_CommunityPoolSpendProposal_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_CommunityPoolSpendProposal_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_CommunityPoolSpendProposal_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CommunityPoolSpendProposal_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_CommunityPoolSpendProposal_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_CommunityPoolSpendProposal_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_CommunityPoolSpendProposal protoreflect.MessageDescriptor - fd_CommunityPoolSpendProposal_title protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposal_description protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposal_recipient protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposal_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_CommunityPoolSpendProposal = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("CommunityPoolSpendProposal") - fd_CommunityPoolSpendProposal_title = md_CommunityPoolSpendProposal.Fields().ByName("title") - fd_CommunityPoolSpendProposal_description = md_CommunityPoolSpendProposal.Fields().ByName("description") - fd_CommunityPoolSpendProposal_recipient = md_CommunityPoolSpendProposal.Fields().ByName("recipient") - fd_CommunityPoolSpendProposal_amount = md_CommunityPoolSpendProposal.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_CommunityPoolSpendProposal)(nil) - -type fastReflection_CommunityPoolSpendProposal CommunityPoolSpendProposal - -func (x *CommunityPoolSpendProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommunityPoolSpendProposal)(x) -} - -func (x *CommunityPoolSpendProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommunityPoolSpendProposal_messageType fastReflection_CommunityPoolSpendProposal_messageType -var _ protoreflect.MessageType = fastReflection_CommunityPoolSpendProposal_messageType{} - -type fastReflection_CommunityPoolSpendProposal_messageType struct{} - -func (x fastReflection_CommunityPoolSpendProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommunityPoolSpendProposal)(nil) -} -func (x fastReflection_CommunityPoolSpendProposal_messageType) New() protoreflect.Message { - return new(fastReflection_CommunityPoolSpendProposal) -} -func (x fastReflection_CommunityPoolSpendProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolSpendProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommunityPoolSpendProposal) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolSpendProposal -} - -// 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_CommunityPoolSpendProposal) Type() protoreflect.MessageType { - return _fastReflection_CommunityPoolSpendProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommunityPoolSpendProposal) New() protoreflect.Message { - return new(fastReflection_CommunityPoolSpendProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommunityPoolSpendProposal) Interface() protoreflect.ProtoMessage { - return (*CommunityPoolSpendProposal)(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_CommunityPoolSpendProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Title != "" { - value := protoreflect.ValueOfString(x.Title) - if !f(fd_CommunityPoolSpendProposal_title, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_CommunityPoolSpendProposal_description, value) { - return - } - } - if x.Recipient != "" { - value := protoreflect.ValueOfString(x.Recipient) - if !f(fd_CommunityPoolSpendProposal_recipient, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_CommunityPoolSpendProposal_4_list{list: &x.Amount}) - if !f(fd_CommunityPoolSpendProposal_amount, 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_CommunityPoolSpendProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.title": - return x.Title != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.description": - return x.Description != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.recipient": - return x.Recipient != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposal")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposal 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_CommunityPoolSpendProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.title": - x.Title = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.description": - x.Description = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.recipient": - x.Recipient = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposal")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposal 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_CommunityPoolSpendProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.title": - value := x.Title - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.recipient": - value := x.Recipient - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_CommunityPoolSpendProposal_4_list{}) - } - listValue := &_CommunityPoolSpendProposal_4_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposal")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposal 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_CommunityPoolSpendProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.title": - x.Title = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.description": - x.Description = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.recipient": - x.Recipient = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount": - lv := value.List() - clv := lv.(*_CommunityPoolSpendProposal_4_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposal")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposal 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_CommunityPoolSpendProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_CommunityPoolSpendProposal_4_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.title": - panic(fmt.Errorf("field title of message cosmos.distribution.v1beta1.CommunityPoolSpendProposal is not mutable")) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.description": - panic(fmt.Errorf("field description of message cosmos.distribution.v1beta1.CommunityPoolSpendProposal is not mutable")) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.recipient": - panic(fmt.Errorf("field recipient of message cosmos.distribution.v1beta1.CommunityPoolSpendProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposal")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposal 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_CommunityPoolSpendProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.title": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.description": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.recipient": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_CommunityPoolSpendProposal_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposal")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposal 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_CommunityPoolSpendProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.CommunityPoolSpendProposal", 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_CommunityPoolSpendProposal) 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_CommunityPoolSpendProposal) 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_CommunityPoolSpendProposal) 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_CommunityPoolSpendProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommunityPoolSpendProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Title) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Recipient) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommunityPoolSpendProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Recipient) > 0 { - i -= len(x.Recipient) - copy(dAtA[i:], x.Recipient) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) - i-- - dAtA[i] = 0x1a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x12 - } - if len(x.Title) > 0 { - i -= len(x.Title) - copy(dAtA[i:], x.Title) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) - i-- - dAtA[i] = 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().(*CommunityPoolSpendProposal) - 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: CommunityPoolSpendProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolSpendProposal: 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 Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", 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.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DelegatorStartingInfo protoreflect.MessageDescriptor - fd_DelegatorStartingInfo_previous_period protoreflect.FieldDescriptor - fd_DelegatorStartingInfo_stake protoreflect.FieldDescriptor - fd_DelegatorStartingInfo_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_DelegatorStartingInfo = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("DelegatorStartingInfo") - fd_DelegatorStartingInfo_previous_period = md_DelegatorStartingInfo.Fields().ByName("previous_period") - fd_DelegatorStartingInfo_stake = md_DelegatorStartingInfo.Fields().ByName("stake") - fd_DelegatorStartingInfo_height = md_DelegatorStartingInfo.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_DelegatorStartingInfo)(nil) - -type fastReflection_DelegatorStartingInfo DelegatorStartingInfo - -func (x *DelegatorStartingInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegatorStartingInfo)(x) -} - -func (x *DelegatorStartingInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelegatorStartingInfo_messageType fastReflection_DelegatorStartingInfo_messageType -var _ protoreflect.MessageType = fastReflection_DelegatorStartingInfo_messageType{} - -type fastReflection_DelegatorStartingInfo_messageType struct{} - -func (x fastReflection_DelegatorStartingInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegatorStartingInfo)(nil) -} -func (x fastReflection_DelegatorStartingInfo_messageType) New() protoreflect.Message { - return new(fastReflection_DelegatorStartingInfo) -} -func (x fastReflection_DelegatorStartingInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorStartingInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegatorStartingInfo) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorStartingInfo -} - -// 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_DelegatorStartingInfo) Type() protoreflect.MessageType { - return _fastReflection_DelegatorStartingInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegatorStartingInfo) New() protoreflect.Message { - return new(fastReflection_DelegatorStartingInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegatorStartingInfo) Interface() protoreflect.ProtoMessage { - return (*DelegatorStartingInfo)(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_DelegatorStartingInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PreviousPeriod != uint64(0) { - value := protoreflect.ValueOfUint64(x.PreviousPeriod) - if !f(fd_DelegatorStartingInfo_previous_period, value) { - return - } - } - if x.Stake != "" { - value := protoreflect.ValueOfString(x.Stake) - if !f(fd_DelegatorStartingInfo_stake, value) { - return - } - } - if x.Height != uint64(0) { - value := protoreflect.ValueOfUint64(x.Height) - if !f(fd_DelegatorStartingInfo_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DelegatorStartingInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.previous_period": - return x.PreviousPeriod != uint64(0) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.stake": - return x.Stake != "" - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.height": - return x.Height != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfo 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_DelegatorStartingInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.previous_period": - x.PreviousPeriod = uint64(0) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.stake": - x.Stake = "" - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.height": - x.Height = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfo 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_DelegatorStartingInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.previous_period": - value := x.PreviousPeriod - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.stake": - value := x.Stake - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.height": - value := x.Height - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfo 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_DelegatorStartingInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.previous_period": - x.PreviousPeriod = value.Uint() - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.stake": - x.Stake = value.Interface().(string) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.height": - x.Height = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfo 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_DelegatorStartingInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.previous_period": - panic(fmt.Errorf("field previous_period of message cosmos.distribution.v1beta1.DelegatorStartingInfo is not mutable")) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.stake": - panic(fmt.Errorf("field stake of message cosmos.distribution.v1beta1.DelegatorStartingInfo is not mutable")) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.height": - panic(fmt.Errorf("field height of message cosmos.distribution.v1beta1.DelegatorStartingInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfo 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_DelegatorStartingInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.previous_period": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.stake": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.DelegatorStartingInfo.height": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfo 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_DelegatorStartingInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.DelegatorStartingInfo", 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_DelegatorStartingInfo) 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_DelegatorStartingInfo) 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_DelegatorStartingInfo) 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_DelegatorStartingInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegatorStartingInfo) - 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.PreviousPeriod != 0 { - n += 1 + runtime.Sov(uint64(x.PreviousPeriod)) - } - l = len(x.Stake) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DelegatorStartingInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if len(x.Stake) > 0 { - i -= len(x.Stake) - copy(dAtA[i:], x.Stake) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Stake))) - i-- - dAtA[i] = 0x12 - } - if x.PreviousPeriod != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PreviousPeriod)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DelegatorStartingInfo) - 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: DelegatorStartingInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorStartingInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousPeriod", wireType) - } - x.PreviousPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PreviousPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", 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.Stake = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DelegationDelegatorReward_2_list)(nil) - -type _DelegationDelegatorReward_2_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_DelegationDelegatorReward_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DelegationDelegatorReward_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_DelegationDelegatorReward_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_DelegationDelegatorReward_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_DelegationDelegatorReward_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DelegationDelegatorReward_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_DelegationDelegatorReward_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DelegationDelegatorReward_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DelegationDelegatorReward protoreflect.MessageDescriptor - fd_DelegationDelegatorReward_validator_address protoreflect.FieldDescriptor - fd_DelegationDelegatorReward_reward protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_DelegationDelegatorReward = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("DelegationDelegatorReward") - fd_DelegationDelegatorReward_validator_address = md_DelegationDelegatorReward.Fields().ByName("validator_address") - fd_DelegationDelegatorReward_reward = md_DelegationDelegatorReward.Fields().ByName("reward") -} - -var _ protoreflect.Message = (*fastReflection_DelegationDelegatorReward)(nil) - -type fastReflection_DelegationDelegatorReward DelegationDelegatorReward - -func (x *DelegationDelegatorReward) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegationDelegatorReward)(x) -} - -func (x *DelegationDelegatorReward) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelegationDelegatorReward_messageType fastReflection_DelegationDelegatorReward_messageType -var _ protoreflect.MessageType = fastReflection_DelegationDelegatorReward_messageType{} - -type fastReflection_DelegationDelegatorReward_messageType struct{} - -func (x fastReflection_DelegationDelegatorReward_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegationDelegatorReward)(nil) -} -func (x fastReflection_DelegationDelegatorReward_messageType) New() protoreflect.Message { - return new(fastReflection_DelegationDelegatorReward) -} -func (x fastReflection_DelegationDelegatorReward_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegationDelegatorReward -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegationDelegatorReward) Descriptor() protoreflect.MessageDescriptor { - return md_DelegationDelegatorReward -} - -// 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_DelegationDelegatorReward) Type() protoreflect.MessageType { - return _fastReflection_DelegationDelegatorReward_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegationDelegatorReward) New() protoreflect.Message { - return new(fastReflection_DelegationDelegatorReward) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegationDelegatorReward) Interface() protoreflect.ProtoMessage { - return (*DelegationDelegatorReward)(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_DelegationDelegatorReward) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_DelegationDelegatorReward_validator_address, value) { - return - } - } - if len(x.Reward) != 0 { - value := protoreflect.ValueOfList(&_DelegationDelegatorReward_2_list{list: &x.Reward}) - if !f(fd_DelegationDelegatorReward_reward, 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_DelegationDelegatorReward) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.reward": - return len(x.Reward) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegationDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegationDelegatorReward 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_DelegationDelegatorReward) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.reward": - x.Reward = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegationDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegationDelegatorReward 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_DelegationDelegatorReward) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.reward": - if len(x.Reward) == 0 { - return protoreflect.ValueOfList(&_DelegationDelegatorReward_2_list{}) - } - listValue := &_DelegationDelegatorReward_2_list{list: &x.Reward} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegationDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegationDelegatorReward 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_DelegationDelegatorReward) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.reward": - lv := value.List() - clv := lv.(*_DelegationDelegatorReward_2_list) - x.Reward = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegationDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegationDelegatorReward 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_DelegationDelegatorReward) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.reward": - if x.Reward == nil { - x.Reward = []*v1beta1.DecCoin{} - } - value := &_DelegationDelegatorReward_2_list{list: &x.Reward} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.DelegationDelegatorReward is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegationDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegationDelegatorReward 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_DelegationDelegatorReward) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.DelegationDelegatorReward.reward": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_DelegationDelegatorReward_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegationDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegationDelegatorReward 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_DelegationDelegatorReward) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.DelegationDelegatorReward", 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_DelegationDelegatorReward) 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_DelegationDelegatorReward) 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_DelegationDelegatorReward) 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_DelegationDelegatorReward) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegationDelegatorReward) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Reward) > 0 { - for _, e := range x.Reward { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DelegationDelegatorReward) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Reward) > 0 { - for iNdEx := len(x.Reward) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Reward[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DelegationDelegatorReward) - 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: DelegationDelegatorReward: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegationDelegatorReward: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reward", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Reward = append(x.Reward, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Reward[len(x.Reward)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_CommunityPoolSpendProposalWithDeposit protoreflect.MessageDescriptor - fd_CommunityPoolSpendProposalWithDeposit_title protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposalWithDeposit_description protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposalWithDeposit_recipient protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposalWithDeposit_amount protoreflect.FieldDescriptor - fd_CommunityPoolSpendProposalWithDeposit_deposit protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_distribution_proto_init() - md_CommunityPoolSpendProposalWithDeposit = File_cosmos_distribution_v1beta1_distribution_proto.Messages().ByName("CommunityPoolSpendProposalWithDeposit") - fd_CommunityPoolSpendProposalWithDeposit_title = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("title") - fd_CommunityPoolSpendProposalWithDeposit_description = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("description") - fd_CommunityPoolSpendProposalWithDeposit_recipient = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("recipient") - fd_CommunityPoolSpendProposalWithDeposit_amount = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("amount") - fd_CommunityPoolSpendProposalWithDeposit_deposit = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("deposit") -} - -var _ protoreflect.Message = (*fastReflection_CommunityPoolSpendProposalWithDeposit)(nil) - -type fastReflection_CommunityPoolSpendProposalWithDeposit CommunityPoolSpendProposalWithDeposit - -func (x *CommunityPoolSpendProposalWithDeposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommunityPoolSpendProposalWithDeposit)(x) -} - -func (x *CommunityPoolSpendProposalWithDeposit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommunityPoolSpendProposalWithDeposit_messageType fastReflection_CommunityPoolSpendProposalWithDeposit_messageType -var _ protoreflect.MessageType = fastReflection_CommunityPoolSpendProposalWithDeposit_messageType{} - -type fastReflection_CommunityPoolSpendProposalWithDeposit_messageType struct{} - -func (x fastReflection_CommunityPoolSpendProposalWithDeposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommunityPoolSpendProposalWithDeposit)(nil) -} -func (x fastReflection_CommunityPoolSpendProposalWithDeposit_messageType) New() protoreflect.Message { - return new(fastReflection_CommunityPoolSpendProposalWithDeposit) -} -func (x fastReflection_CommunityPoolSpendProposalWithDeposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolSpendProposalWithDeposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolSpendProposalWithDeposit -} - -// 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_CommunityPoolSpendProposalWithDeposit) Type() protoreflect.MessageType { - return _fastReflection_CommunityPoolSpendProposalWithDeposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) New() protoreflect.Message { - return new(fastReflection_CommunityPoolSpendProposalWithDeposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Interface() protoreflect.ProtoMessage { - return (*CommunityPoolSpendProposalWithDeposit)(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_CommunityPoolSpendProposalWithDeposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Title != "" { - value := protoreflect.ValueOfString(x.Title) - if !f(fd_CommunityPoolSpendProposalWithDeposit_title, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_CommunityPoolSpendProposalWithDeposit_description, value) { - return - } - } - if x.Recipient != "" { - value := protoreflect.ValueOfString(x.Recipient) - if !f(fd_CommunityPoolSpendProposalWithDeposit_recipient, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_CommunityPoolSpendProposalWithDeposit_amount, value) { - return - } - } - if x.Deposit != "" { - value := protoreflect.ValueOfString(x.Deposit) - if !f(fd_CommunityPoolSpendProposalWithDeposit_deposit, 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_CommunityPoolSpendProposalWithDeposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": - return x.Title != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": - return x.Description != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": - return x.Recipient != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": - return x.Amount != "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": - return x.Deposit != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit 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_CommunityPoolSpendProposalWithDeposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": - x.Title = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": - x.Description = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": - x.Recipient = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": - x.Amount = "" - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": - x.Deposit = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit 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_CommunityPoolSpendProposalWithDeposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": - value := x.Title - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": - value := x.Recipient - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": - value := x.Deposit - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit 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_CommunityPoolSpendProposalWithDeposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": - x.Title = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": - x.Description = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": - x.Recipient = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": - x.Amount = value.Interface().(string) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": - x.Deposit = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit 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_CommunityPoolSpendProposalWithDeposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": - panic(fmt.Errorf("field title of message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": - panic(fmt.Errorf("field description of message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": - panic(fmt.Errorf("field recipient of message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": - panic(fmt.Errorf("field amount of message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": - panic(fmt.Errorf("field deposit of message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit 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_CommunityPoolSpendProposalWithDeposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit 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_CommunityPoolSpendProposalWithDeposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", 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_CommunityPoolSpendProposalWithDeposit) 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_CommunityPoolSpendProposalWithDeposit) 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_CommunityPoolSpendProposalWithDeposit) 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_CommunityPoolSpendProposalWithDeposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommunityPoolSpendProposalWithDeposit) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Title) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Recipient) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Deposit) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommunityPoolSpendProposalWithDeposit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Deposit) > 0 { - i -= len(x.Deposit) - copy(dAtA[i:], x.Deposit) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Deposit))) - i-- - dAtA[i] = 0x2a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x22 - } - if len(x.Recipient) > 0 { - i -= len(x.Recipient) - copy(dAtA[i:], x.Recipient) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) - i-- - dAtA[i] = 0x1a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x12 - } - if len(x.Title) > 0 { - i -= len(x.Title) - copy(dAtA[i:], x.Title) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) - i-- - dAtA[i] = 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().(*CommunityPoolSpendProposalWithDeposit) - 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: CommunityPoolSpendProposalWithDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: 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 Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", 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.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposit", 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.Deposit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/distribution/v1beta1/distribution.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the set of params for the distribution module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommunityTax string `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3" json:"community_tax,omitempty"` - BaseProposerReward string `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3" json:"base_proposer_reward,omitempty"` - BonusProposerReward string `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3" json:"bonus_proposer_reward,omitempty"` - WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{0} -} - -func (x *Params) GetCommunityTax() string { - if x != nil { - return x.CommunityTax - } - return "" -} - -func (x *Params) GetBaseProposerReward() string { - if x != nil { - return x.BaseProposerReward - } - return "" -} - -func (x *Params) GetBonusProposerReward() string { - if x != nil { - return x.BonusProposerReward - } - return "" -} - -func (x *Params) GetWithdrawAddrEnabled() bool { - if x != nil { - return x.WithdrawAddrEnabled - } - return false -} - -// ValidatorHistoricalRewards represents historical rewards for a validator. -// Height is implicit within the store key. -// Cumulative reward ratio is the sum from the zeroeth period -// until this period of rewards / tokens, per the spec. -// The reference count indicates the number of objects -// which might need to reference this historical entry at any point. -// ReferenceCount = -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization -type ValidatorHistoricalRewards struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CumulativeRewardRatio []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=cumulative_reward_ratio,json=cumulativeRewardRatio,proto3" json:"cumulative_reward_ratio,omitempty"` - ReferenceCount uint32 `protobuf:"varint,2,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty"` -} - -func (x *ValidatorHistoricalRewards) Reset() { - *x = ValidatorHistoricalRewards{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorHistoricalRewards) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorHistoricalRewards) ProtoMessage() {} - -// Deprecated: Use ValidatorHistoricalRewards.ProtoReflect.Descriptor instead. -func (*ValidatorHistoricalRewards) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{1} -} - -func (x *ValidatorHistoricalRewards) GetCumulativeRewardRatio() []*v1beta1.DecCoin { - if x != nil { - return x.CumulativeRewardRatio - } - return nil -} - -func (x *ValidatorHistoricalRewards) GetReferenceCount() uint32 { - if x != nil { - return x.ReferenceCount - } - return 0 -} - -// ValidatorCurrentRewards represents current rewards and current -// period for a validator kept as a running counter and incremented -// each block as long as the validator's tokens remain constant. -type ValidatorCurrentRewards struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rewards []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` - Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` -} - -func (x *ValidatorCurrentRewards) Reset() { - *x = ValidatorCurrentRewards{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorCurrentRewards) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorCurrentRewards) ProtoMessage() {} - -// Deprecated: Use ValidatorCurrentRewards.ProtoReflect.Descriptor instead. -func (*ValidatorCurrentRewards) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{2} -} - -func (x *ValidatorCurrentRewards) GetRewards() []*v1beta1.DecCoin { - if x != nil { - return x.Rewards - } - return nil -} - -func (x *ValidatorCurrentRewards) GetPeriod() uint64 { - if x != nil { - return x.Period - } - return 0 -} - -// ValidatorAccumulatedCommission represents accumulated commission -// for a validator kept as a running counter, can be withdrawn at any time. -type ValidatorAccumulatedCommission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Commission []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=commission,proto3" json:"commission,omitempty"` -} - -func (x *ValidatorAccumulatedCommission) Reset() { - *x = ValidatorAccumulatedCommission{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorAccumulatedCommission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorAccumulatedCommission) ProtoMessage() {} - -// Deprecated: Use ValidatorAccumulatedCommission.ProtoReflect.Descriptor instead. -func (*ValidatorAccumulatedCommission) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{3} -} - -func (x *ValidatorAccumulatedCommission) GetCommission() []*v1beta1.DecCoin { - if x != nil { - return x.Commission - } - return nil -} - -// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -// for a validator inexpensive to track, allows simple sanity checks. -type ValidatorOutstandingRewards struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rewards []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (x *ValidatorOutstandingRewards) Reset() { - *x = ValidatorOutstandingRewards{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorOutstandingRewards) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorOutstandingRewards) ProtoMessage() {} - -// Deprecated: Use ValidatorOutstandingRewards.ProtoReflect.Descriptor instead. -func (*ValidatorOutstandingRewards) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{4} -} - -func (x *ValidatorOutstandingRewards) GetRewards() []*v1beta1.DecCoin { - if x != nil { - return x.Rewards - } - return nil -} - -// ValidatorSlashEvent represents a validator slash event. -// Height is implicit within the store key. -// This is needed to calculate appropriate amount of staking tokens -// for delegations which are withdrawn after a slash has occurred. -type ValidatorSlashEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorPeriod uint64 `protobuf:"varint,1,opt,name=validator_period,json=validatorPeriod,proto3" json:"validator_period,omitempty"` - Fraction string `protobuf:"bytes,2,opt,name=fraction,proto3" json:"fraction,omitempty"` -} - -func (x *ValidatorSlashEvent) Reset() { - *x = ValidatorSlashEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorSlashEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorSlashEvent) ProtoMessage() {} - -// Deprecated: Use ValidatorSlashEvent.ProtoReflect.Descriptor instead. -func (*ValidatorSlashEvent) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{5} -} - -func (x *ValidatorSlashEvent) GetValidatorPeriod() uint64 { - if x != nil { - return x.ValidatorPeriod - } - return 0 -} - -func (x *ValidatorSlashEvent) GetFraction() string { - if x != nil { - return x.Fraction - } - return "" -} - -// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -type ValidatorSlashEvents struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorSlashEvents []*ValidatorSlashEvent `protobuf:"bytes,1,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events,omitempty"` -} - -func (x *ValidatorSlashEvents) Reset() { - *x = ValidatorSlashEvents{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorSlashEvents) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorSlashEvents) ProtoMessage() {} - -// Deprecated: Use ValidatorSlashEvents.ProtoReflect.Descriptor instead. -func (*ValidatorSlashEvents) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{6} -} - -func (x *ValidatorSlashEvents) GetValidatorSlashEvents() []*ValidatorSlashEvent { - if x != nil { - return x.ValidatorSlashEvents - } - return nil -} - -// FeePool is the global fee pool for distribution. -type FeePool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommunityPool []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=community_pool,json=communityPool,proto3" json:"community_pool,omitempty"` -} - -func (x *FeePool) Reset() { - *x = FeePool{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeePool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeePool) ProtoMessage() {} - -// Deprecated: Use FeePool.ProtoReflect.Descriptor instead. -func (*FeePool) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{7} -} - -func (x *FeePool) GetCommunityPool() []*v1beta1.DecCoin { - if x != nil { - return x.CommunityPool - } - return nil -} - -// CommunityPoolSpendProposal details a proposal for use of community funds, -// together with how many coins are proposed to be spent, and to which -// recipient account. -type CommunityPoolSpendProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,4,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *CommunityPoolSpendProposal) Reset() { - *x = CommunityPoolSpendProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommunityPoolSpendProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommunityPoolSpendProposal) ProtoMessage() {} - -// Deprecated: Use CommunityPoolSpendProposal.ProtoReflect.Descriptor instead. -func (*CommunityPoolSpendProposal) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{8} -} - -func (x *CommunityPoolSpendProposal) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *CommunityPoolSpendProposal) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CommunityPoolSpendProposal) GetRecipient() string { - if x != nil { - return x.Recipient - } - return "" -} - -func (x *CommunityPoolSpendProposal) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// DelegatorStartingInfo represents the starting info for a delegator reward -// period. It tracks the previous validator period, the delegation's amount of -// staking token, and the creation height (to check later on if any slashes have -// occurred). NOTE: Even though validators are slashed to whole staking tokens, -// the delegators within the validator may be left with less than a full token, -// thus sdk.Dec is used. -type DelegatorStartingInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty"` - Stake string `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` - Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *DelegatorStartingInfo) Reset() { - *x = DelegatorStartingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegatorStartingInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegatorStartingInfo) ProtoMessage() {} - -// Deprecated: Use DelegatorStartingInfo.ProtoReflect.Descriptor instead. -func (*DelegatorStartingInfo) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{9} -} - -func (x *DelegatorStartingInfo) GetPreviousPeriod() uint64 { - if x != nil { - return x.PreviousPeriod - } - return 0 -} - -func (x *DelegatorStartingInfo) GetStake() string { - if x != nil { - return x.Stake - } - return "" -} - -func (x *DelegatorStartingInfo) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -// DelegationDelegatorReward represents the properties -// of a delegator's delegation reward. -type DelegationDelegatorReward struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Reward []*v1beta1.DecCoin `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward,omitempty"` -} - -func (x *DelegationDelegatorReward) Reset() { - *x = DelegationDelegatorReward{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegationDelegatorReward) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegationDelegatorReward) ProtoMessage() {} - -// Deprecated: Use DelegationDelegatorReward.ProtoReflect.Descriptor instead. -func (*DelegationDelegatorReward) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{10} -} - -func (x *DelegationDelegatorReward) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *DelegationDelegatorReward) GetReward() []*v1beta1.DecCoin { - if x != nil { - return x.Reward - } - return nil -} - -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -// with a deposit -type CommunityPoolSpendProposalWithDeposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (x *CommunityPoolSpendProposalWithDeposit) Reset() { - *x = CommunityPoolSpendProposalWithDeposit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommunityPoolSpendProposalWithDeposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommunityPoolSpendProposalWithDeposit) ProtoMessage() {} - -// Deprecated: Use CommunityPoolSpendProposalWithDeposit.ProtoReflect.Descriptor instead. -func (*CommunityPoolSpendProposalWithDeposit) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{11} -} - -func (x *CommunityPoolSpendProposalWithDeposit) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *CommunityPoolSpendProposalWithDeposit) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CommunityPoolSpendProposalWithDeposit) GetRecipient() string { - if x != nil { - return x.Recipient - } - return "" -} - -func (x *CommunityPoolSpendProposalWithDeposit) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *CommunityPoolSpendProposalWithDeposit) GetDeposit() string { - if x != nil { - return x.Deposit - } - return "" -} - -var File_cosmos_distribution_v1beta1_distribution_proto protoreflect.FileDescriptor - -var file_cosmos_distribution_v1beta1_distribution_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, - 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x61, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, - 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x61, 0x78, 0x12, 0x6e, 0x0a, 0x14, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x61, 0x73, 0x65, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x70, 0x0a, 0x15, - 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x13, 0x62, 0x6f, 0x6e, 0x75, 0x73, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x32, - 0x0a, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0xd1, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x17, 0x63, 0x75, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x15, 0x63, 0x75, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, - 0x74, 0x69, 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9e, 0x01, 0x0a, - 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x6b, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x93, 0x01, - 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x71, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x12, 0x6b, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, - 0x22, 0x9a, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, - 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x12, 0x58, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x01, - 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x6c, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, - 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x83, 0x01, 0x0a, 0x07, 0x46, - 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x78, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, - 0x73, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, - 0x22, 0xe5, 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, - 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xc1, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x52, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, - 0x2b, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x13, 0xea, 0xde, 0x1f, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xd7, 0x01, 0x0a, - 0x19, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 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, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x69, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x3a, 0x08, 0x88, 0xa0, - 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x01, 0x22, 0xb9, 0x01, 0x0a, 0x25, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, - 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, - 0x1f, 0x01, 0x42, 0x98, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x44, 0x58, 0xaa, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x27, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_distribution_v1beta1_distribution_proto_rawDescOnce sync.Once - file_cosmos_distribution_v1beta1_distribution_proto_rawDescData = file_cosmos_distribution_v1beta1_distribution_proto_rawDesc -) - -func file_cosmos_distribution_v1beta1_distribution_proto_rawDescGZIP() []byte { - file_cosmos_distribution_v1beta1_distribution_proto_rawDescOnce.Do(func() { - file_cosmos_distribution_v1beta1_distribution_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_distribution_v1beta1_distribution_proto_rawDescData) - }) - return file_cosmos_distribution_v1beta1_distribution_proto_rawDescData -} - -var file_cosmos_distribution_v1beta1_distribution_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_cosmos_distribution_v1beta1_distribution_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: cosmos.distribution.v1beta1.Params - (*ValidatorHistoricalRewards)(nil), // 1: cosmos.distribution.v1beta1.ValidatorHistoricalRewards - (*ValidatorCurrentRewards)(nil), // 2: cosmos.distribution.v1beta1.ValidatorCurrentRewards - (*ValidatorAccumulatedCommission)(nil), // 3: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission - (*ValidatorOutstandingRewards)(nil), // 4: cosmos.distribution.v1beta1.ValidatorOutstandingRewards - (*ValidatorSlashEvent)(nil), // 5: cosmos.distribution.v1beta1.ValidatorSlashEvent - (*ValidatorSlashEvents)(nil), // 6: cosmos.distribution.v1beta1.ValidatorSlashEvents - (*FeePool)(nil), // 7: cosmos.distribution.v1beta1.FeePool - (*CommunityPoolSpendProposal)(nil), // 8: cosmos.distribution.v1beta1.CommunityPoolSpendProposal - (*DelegatorStartingInfo)(nil), // 9: cosmos.distribution.v1beta1.DelegatorStartingInfo - (*DelegationDelegatorReward)(nil), // 10: cosmos.distribution.v1beta1.DelegationDelegatorReward - (*CommunityPoolSpendProposalWithDeposit)(nil), // 11: cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit - (*v1beta1.DecCoin)(nil), // 12: cosmos.base.v1beta1.DecCoin - (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin -} -var file_cosmos_distribution_v1beta1_distribution_proto_depIdxs = []int32{ - 12, // 0: cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio:type_name -> cosmos.base.v1beta1.DecCoin - 12, // 1: cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards:type_name -> cosmos.base.v1beta1.DecCoin - 12, // 2: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission:type_name -> cosmos.base.v1beta1.DecCoin - 12, // 3: cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards:type_name -> cosmos.base.v1beta1.DecCoin - 5, // 4: cosmos.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events:type_name -> cosmos.distribution.v1beta1.ValidatorSlashEvent - 12, // 5: cosmos.distribution.v1beta1.FeePool.community_pool:type_name -> cosmos.base.v1beta1.DecCoin - 13, // 6: cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount:type_name -> cosmos.base.v1beta1.Coin - 12, // 7: cosmos.distribution.v1beta1.DelegationDelegatorReward.reward:type_name -> cosmos.base.v1beta1.DecCoin - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] 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_distribution_v1beta1_distribution_proto_init() } -func file_cosmos_distribution_v1beta1_distribution_proto_init() { - if File_cosmos_distribution_v1beta1_distribution_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorHistoricalRewards); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorCurrentRewards); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorAccumulatedCommission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorOutstandingRewards); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSlashEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSlashEvents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommunityPoolSpendProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegatorStartingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationDelegatorReward); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_distribution_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommunityPoolSpendProposalWithDeposit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_distribution_v1beta1_distribution_proto_rawDesc, - NumEnums: 0, - NumMessages: 12, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_distribution_v1beta1_distribution_proto_goTypes, - DependencyIndexes: file_cosmos_distribution_v1beta1_distribution_proto_depIdxs, - MessageInfos: file_cosmos_distribution_v1beta1_distribution_proto_msgTypes, - }.Build() - File_cosmos_distribution_v1beta1_distribution_proto = out.File - file_cosmos_distribution_v1beta1_distribution_proto_rawDesc = nil - file_cosmos_distribution_v1beta1_distribution_proto_goTypes = nil - file_cosmos_distribution_v1beta1_distribution_proto_depIdxs = nil -} diff --git a/api/cosmos/distribution/v1beta1/genesis.pulsar.go b/api/cosmos/distribution/v1beta1/genesis.pulsar.go deleted file mode 100644 index 88cf6565db21..000000000000 --- a/api/cosmos/distribution/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,6184 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package distributionv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_DelegatorWithdrawInfo protoreflect.MessageDescriptor - fd_DelegatorWithdrawInfo_delegator_address protoreflect.FieldDescriptor - fd_DelegatorWithdrawInfo_withdraw_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_DelegatorWithdrawInfo = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("DelegatorWithdrawInfo") - fd_DelegatorWithdrawInfo_delegator_address = md_DelegatorWithdrawInfo.Fields().ByName("delegator_address") - fd_DelegatorWithdrawInfo_withdraw_address = md_DelegatorWithdrawInfo.Fields().ByName("withdraw_address") -} - -var _ protoreflect.Message = (*fastReflection_DelegatorWithdrawInfo)(nil) - -type fastReflection_DelegatorWithdrawInfo DelegatorWithdrawInfo - -func (x *DelegatorWithdrawInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegatorWithdrawInfo)(x) -} - -func (x *DelegatorWithdrawInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelegatorWithdrawInfo_messageType fastReflection_DelegatorWithdrawInfo_messageType -var _ protoreflect.MessageType = fastReflection_DelegatorWithdrawInfo_messageType{} - -type fastReflection_DelegatorWithdrawInfo_messageType struct{} - -func (x fastReflection_DelegatorWithdrawInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegatorWithdrawInfo)(nil) -} -func (x fastReflection_DelegatorWithdrawInfo_messageType) New() protoreflect.Message { - return new(fastReflection_DelegatorWithdrawInfo) -} -func (x fastReflection_DelegatorWithdrawInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorWithdrawInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegatorWithdrawInfo) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorWithdrawInfo -} - -// 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_DelegatorWithdrawInfo) Type() protoreflect.MessageType { - return _fastReflection_DelegatorWithdrawInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegatorWithdrawInfo) New() protoreflect.Message { - return new(fastReflection_DelegatorWithdrawInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegatorWithdrawInfo) Interface() protoreflect.ProtoMessage { - return (*DelegatorWithdrawInfo)(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_DelegatorWithdrawInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_DelegatorWithdrawInfo_delegator_address, value) { - return - } - } - if x.WithdrawAddress != "" { - value := protoreflect.ValueOfString(x.WithdrawAddress) - if !f(fd_DelegatorWithdrawInfo_withdraw_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DelegatorWithdrawInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": - return x.WithdrawAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorWithdrawInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorWithdrawInfo 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_DelegatorWithdrawInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": - x.DelegatorAddress = "" - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": - x.WithdrawAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorWithdrawInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorWithdrawInfo 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_DelegatorWithdrawInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": - value := x.WithdrawAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorWithdrawInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorWithdrawInfo 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_DelegatorWithdrawInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": - x.WithdrawAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorWithdrawInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorWithdrawInfo 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_DelegatorWithdrawInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.DelegatorWithdrawInfo is not mutable")) - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": - panic(fmt.Errorf("field withdraw_address of message cosmos.distribution.v1beta1.DelegatorWithdrawInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorWithdrawInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorWithdrawInfo 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_DelegatorWithdrawInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorWithdrawInfo")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorWithdrawInfo 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_DelegatorWithdrawInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.DelegatorWithdrawInfo", 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_DelegatorWithdrawInfo) 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_DelegatorWithdrawInfo) 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_DelegatorWithdrawInfo) 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_DelegatorWithdrawInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegatorWithdrawInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.WithdrawAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DelegatorWithdrawInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.WithdrawAddress) > 0 { - i -= len(x.WithdrawAddress) - copy(dAtA[i:], x.WithdrawAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*DelegatorWithdrawInfo) - 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: DelegatorWithdrawInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorWithdrawInfo: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", 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.WithdrawAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorOutstandingRewardsRecord_2_list)(nil) - -type _ValidatorOutstandingRewardsRecord_2_list struct { - list *[]*v1beta1.DecCoin -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorOutstandingRewardsRecord_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorOutstandingRewardsRecord protoreflect.MessageDescriptor - fd_ValidatorOutstandingRewardsRecord_validator_address protoreflect.FieldDescriptor - fd_ValidatorOutstandingRewardsRecord_outstanding_rewards protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_ValidatorOutstandingRewardsRecord = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorOutstandingRewardsRecord") - fd_ValidatorOutstandingRewardsRecord_validator_address = md_ValidatorOutstandingRewardsRecord.Fields().ByName("validator_address") - fd_ValidatorOutstandingRewardsRecord_outstanding_rewards = md_ValidatorOutstandingRewardsRecord.Fields().ByName("outstanding_rewards") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorOutstandingRewardsRecord)(nil) - -type fastReflection_ValidatorOutstandingRewardsRecord ValidatorOutstandingRewardsRecord - -func (x *ValidatorOutstandingRewardsRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorOutstandingRewardsRecord)(x) -} - -func (x *ValidatorOutstandingRewardsRecord) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorOutstandingRewardsRecord_messageType fastReflection_ValidatorOutstandingRewardsRecord_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorOutstandingRewardsRecord_messageType{} - -type fastReflection_ValidatorOutstandingRewardsRecord_messageType struct{} - -func (x fastReflection_ValidatorOutstandingRewardsRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorOutstandingRewardsRecord)(nil) -} -func (x fastReflection_ValidatorOutstandingRewardsRecord_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorOutstandingRewardsRecord) -} -func (x fastReflection_ValidatorOutstandingRewardsRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorOutstandingRewardsRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorOutstandingRewardsRecord) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorOutstandingRewardsRecord -} - -// 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_ValidatorOutstandingRewardsRecord) Type() protoreflect.MessageType { - return _fastReflection_ValidatorOutstandingRewardsRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorOutstandingRewardsRecord) New() protoreflect.Message { - return new(fastReflection_ValidatorOutstandingRewardsRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorOutstandingRewardsRecord) Interface() protoreflect.ProtoMessage { - return (*ValidatorOutstandingRewardsRecord)(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_ValidatorOutstandingRewardsRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_ValidatorOutstandingRewardsRecord_validator_address, value) { - return - } - } - if len(x.OutstandingRewards) != 0 { - value := protoreflect.ValueOfList(&_ValidatorOutstandingRewardsRecord_2_list{list: &x.OutstandingRewards}) - if !f(fd_ValidatorOutstandingRewardsRecord_outstanding_rewards, 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_ValidatorOutstandingRewardsRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": - return len(x.OutstandingRewards) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord 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_ValidatorOutstandingRewardsRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": - x.OutstandingRewards = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord 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_ValidatorOutstandingRewardsRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": - if len(x.OutstandingRewards) == 0 { - return protoreflect.ValueOfList(&_ValidatorOutstandingRewardsRecord_2_list{}) - } - listValue := &_ValidatorOutstandingRewardsRecord_2_list{list: &x.OutstandingRewards} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord 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_ValidatorOutstandingRewardsRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": - lv := value.List() - clv := lv.(*_ValidatorOutstandingRewardsRecord_2_list) - x.OutstandingRewards = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord 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_ValidatorOutstandingRewardsRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": - if x.OutstandingRewards == nil { - x.OutstandingRewards = []*v1beta1.DecCoin{} - } - value := &_ValidatorOutstandingRewardsRecord_2_list{list: &x.OutstandingRewards} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord 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_ValidatorOutstandingRewardsRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": - list := []*v1beta1.DecCoin{} - return protoreflect.ValueOfList(&_ValidatorOutstandingRewardsRecord_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord 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_ValidatorOutstandingRewardsRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord", 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_ValidatorOutstandingRewardsRecord) 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_ValidatorOutstandingRewardsRecord) 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_ValidatorOutstandingRewardsRecord) 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_ValidatorOutstandingRewardsRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorOutstandingRewardsRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.OutstandingRewards) > 0 { - for _, e := range x.OutstandingRewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorOutstandingRewardsRecord) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.OutstandingRewards) > 0 { - for iNdEx := len(x.OutstandingRewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.OutstandingRewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorOutstandingRewardsRecord) - 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: ValidatorOutstandingRewardsRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorOutstandingRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutstandingRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OutstandingRewards = append(x.OutstandingRewards, &v1beta1.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutstandingRewards[len(x.OutstandingRewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ValidatorAccumulatedCommissionRecord protoreflect.MessageDescriptor - fd_ValidatorAccumulatedCommissionRecord_validator_address protoreflect.FieldDescriptor - fd_ValidatorAccumulatedCommissionRecord_accumulated protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_ValidatorAccumulatedCommissionRecord = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorAccumulatedCommissionRecord") - fd_ValidatorAccumulatedCommissionRecord_validator_address = md_ValidatorAccumulatedCommissionRecord.Fields().ByName("validator_address") - fd_ValidatorAccumulatedCommissionRecord_accumulated = md_ValidatorAccumulatedCommissionRecord.Fields().ByName("accumulated") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorAccumulatedCommissionRecord)(nil) - -type fastReflection_ValidatorAccumulatedCommissionRecord ValidatorAccumulatedCommissionRecord - -func (x *ValidatorAccumulatedCommissionRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorAccumulatedCommissionRecord)(x) -} - -func (x *ValidatorAccumulatedCommissionRecord) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorAccumulatedCommissionRecord_messageType fastReflection_ValidatorAccumulatedCommissionRecord_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorAccumulatedCommissionRecord_messageType{} - -type fastReflection_ValidatorAccumulatedCommissionRecord_messageType struct{} - -func (x fastReflection_ValidatorAccumulatedCommissionRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorAccumulatedCommissionRecord)(nil) -} -func (x fastReflection_ValidatorAccumulatedCommissionRecord_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorAccumulatedCommissionRecord) -} -func (x fastReflection_ValidatorAccumulatedCommissionRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorAccumulatedCommissionRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorAccumulatedCommissionRecord -} - -// 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_ValidatorAccumulatedCommissionRecord) Type() protoreflect.MessageType { - return _fastReflection_ValidatorAccumulatedCommissionRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorAccumulatedCommissionRecord) New() protoreflect.Message { - return new(fastReflection_ValidatorAccumulatedCommissionRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Interface() protoreflect.ProtoMessage { - return (*ValidatorAccumulatedCommissionRecord)(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_ValidatorAccumulatedCommissionRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_ValidatorAccumulatedCommissionRecord_validator_address, value) { - return - } - } - if x.Accumulated != nil { - value := protoreflect.ValueOfMessage(x.Accumulated.ProtoReflect()) - if !f(fd_ValidatorAccumulatedCommissionRecord_accumulated, 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_ValidatorAccumulatedCommissionRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": - return x.Accumulated != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord 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_ValidatorAccumulatedCommissionRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": - x.Accumulated = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord 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_ValidatorAccumulatedCommissionRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": - value := x.Accumulated - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord 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_ValidatorAccumulatedCommissionRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": - x.Accumulated = value.Message().Interface().(*ValidatorAccumulatedCommission) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord 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_ValidatorAccumulatedCommissionRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": - if x.Accumulated == nil { - x.Accumulated = new(ValidatorAccumulatedCommission) - } - return protoreflect.ValueOfMessage(x.Accumulated.ProtoReflect()) - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord 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_ValidatorAccumulatedCommissionRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": - m := new(ValidatorAccumulatedCommission) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord 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_ValidatorAccumulatedCommissionRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", 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_ValidatorAccumulatedCommissionRecord) 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_ValidatorAccumulatedCommissionRecord) 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_ValidatorAccumulatedCommissionRecord) 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_ValidatorAccumulatedCommissionRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorAccumulatedCommissionRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Accumulated != nil { - l = options.Size(x.Accumulated) - 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().(*ValidatorAccumulatedCommissionRecord) - 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.Accumulated != nil { - encoded, err := options.Marshal(x.Accumulated) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorAccumulatedCommissionRecord) - 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: ValidatorAccumulatedCommissionRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorAccumulatedCommissionRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulated", 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.Accumulated == nil { - x.Accumulated = &ValidatorAccumulatedCommission{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accumulated); 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_ValidatorHistoricalRewardsRecord protoreflect.MessageDescriptor - fd_ValidatorHistoricalRewardsRecord_validator_address protoreflect.FieldDescriptor - fd_ValidatorHistoricalRewardsRecord_period protoreflect.FieldDescriptor - fd_ValidatorHistoricalRewardsRecord_rewards protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_ValidatorHistoricalRewardsRecord = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorHistoricalRewardsRecord") - fd_ValidatorHistoricalRewardsRecord_validator_address = md_ValidatorHistoricalRewardsRecord.Fields().ByName("validator_address") - fd_ValidatorHistoricalRewardsRecord_period = md_ValidatorHistoricalRewardsRecord.Fields().ByName("period") - fd_ValidatorHistoricalRewardsRecord_rewards = md_ValidatorHistoricalRewardsRecord.Fields().ByName("rewards") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorHistoricalRewardsRecord)(nil) - -type fastReflection_ValidatorHistoricalRewardsRecord ValidatorHistoricalRewardsRecord - -func (x *ValidatorHistoricalRewardsRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorHistoricalRewardsRecord)(x) -} - -func (x *ValidatorHistoricalRewardsRecord) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorHistoricalRewardsRecord_messageType fastReflection_ValidatorHistoricalRewardsRecord_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorHistoricalRewardsRecord_messageType{} - -type fastReflection_ValidatorHistoricalRewardsRecord_messageType struct{} - -func (x fastReflection_ValidatorHistoricalRewardsRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorHistoricalRewardsRecord)(nil) -} -func (x fastReflection_ValidatorHistoricalRewardsRecord_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorHistoricalRewardsRecord) -} -func (x fastReflection_ValidatorHistoricalRewardsRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorHistoricalRewardsRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorHistoricalRewardsRecord) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorHistoricalRewardsRecord -} - -// 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_ValidatorHistoricalRewardsRecord) Type() protoreflect.MessageType { - return _fastReflection_ValidatorHistoricalRewardsRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorHistoricalRewardsRecord) New() protoreflect.Message { - return new(fastReflection_ValidatorHistoricalRewardsRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorHistoricalRewardsRecord) Interface() protoreflect.ProtoMessage { - return (*ValidatorHistoricalRewardsRecord)(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_ValidatorHistoricalRewardsRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_ValidatorHistoricalRewardsRecord_validator_address, value) { - return - } - } - if x.Period != uint64(0) { - value := protoreflect.ValueOfUint64(x.Period) - if !f(fd_ValidatorHistoricalRewardsRecord_period, value) { - return - } - } - if x.Rewards != nil { - value := protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) - if !f(fd_ValidatorHistoricalRewardsRecord_rewards, 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_ValidatorHistoricalRewardsRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": - return x.Period != uint64(0) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": - return x.Rewards != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord 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_ValidatorHistoricalRewardsRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": - x.Period = uint64(0) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": - x.Rewards = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord 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_ValidatorHistoricalRewardsRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": - value := x.Period - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": - value := x.Rewards - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord 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_ValidatorHistoricalRewardsRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": - x.Period = value.Uint() - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": - x.Rewards = value.Message().Interface().(*ValidatorHistoricalRewards) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord 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_ValidatorHistoricalRewardsRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": - if x.Rewards == nil { - x.Rewards = new(ValidatorHistoricalRewards) - } - return protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord is not mutable")) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": - panic(fmt.Errorf("field period of message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord 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_ValidatorHistoricalRewardsRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": - m := new(ValidatorHistoricalRewards) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord 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_ValidatorHistoricalRewardsRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord", 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_ValidatorHistoricalRewardsRecord) 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_ValidatorHistoricalRewardsRecord) 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_ValidatorHistoricalRewardsRecord) 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_ValidatorHistoricalRewardsRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorHistoricalRewardsRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Period != 0 { - n += 1 + runtime.Sov(uint64(x.Period)) - } - if x.Rewards != nil { - l = options.Size(x.Rewards) - 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().(*ValidatorHistoricalRewardsRecord) - 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.Rewards != nil { - encoded, err := options.Marshal(x.Rewards) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Period != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) - i-- - dAtA[i] = 0x10 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorHistoricalRewardsRecord) - 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: ValidatorHistoricalRewardsRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorHistoricalRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - x.Period = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Period |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", 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.Rewards == nil { - x.Rewards = &ValidatorHistoricalRewards{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards); 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_ValidatorCurrentRewardsRecord protoreflect.MessageDescriptor - fd_ValidatorCurrentRewardsRecord_validator_address protoreflect.FieldDescriptor - fd_ValidatorCurrentRewardsRecord_rewards protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_ValidatorCurrentRewardsRecord = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorCurrentRewardsRecord") - fd_ValidatorCurrentRewardsRecord_validator_address = md_ValidatorCurrentRewardsRecord.Fields().ByName("validator_address") - fd_ValidatorCurrentRewardsRecord_rewards = md_ValidatorCurrentRewardsRecord.Fields().ByName("rewards") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorCurrentRewardsRecord)(nil) - -type fastReflection_ValidatorCurrentRewardsRecord ValidatorCurrentRewardsRecord - -func (x *ValidatorCurrentRewardsRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorCurrentRewardsRecord)(x) -} - -func (x *ValidatorCurrentRewardsRecord) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorCurrentRewardsRecord_messageType fastReflection_ValidatorCurrentRewardsRecord_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorCurrentRewardsRecord_messageType{} - -type fastReflection_ValidatorCurrentRewardsRecord_messageType struct{} - -func (x fastReflection_ValidatorCurrentRewardsRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorCurrentRewardsRecord)(nil) -} -func (x fastReflection_ValidatorCurrentRewardsRecord_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorCurrentRewardsRecord) -} -func (x fastReflection_ValidatorCurrentRewardsRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorCurrentRewardsRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorCurrentRewardsRecord) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorCurrentRewardsRecord -} - -// 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_ValidatorCurrentRewardsRecord) Type() protoreflect.MessageType { - return _fastReflection_ValidatorCurrentRewardsRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorCurrentRewardsRecord) New() protoreflect.Message { - return new(fastReflection_ValidatorCurrentRewardsRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorCurrentRewardsRecord) Interface() protoreflect.ProtoMessage { - return (*ValidatorCurrentRewardsRecord)(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_ValidatorCurrentRewardsRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_ValidatorCurrentRewardsRecord_validator_address, value) { - return - } - } - if x.Rewards != nil { - value := protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) - if !f(fd_ValidatorCurrentRewardsRecord_rewards, 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_ValidatorCurrentRewardsRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": - return x.Rewards != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord 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_ValidatorCurrentRewardsRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": - x.Rewards = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord 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_ValidatorCurrentRewardsRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": - value := x.Rewards - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord 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_ValidatorCurrentRewardsRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": - x.Rewards = value.Message().Interface().(*ValidatorCurrentRewards) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord 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_ValidatorCurrentRewardsRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": - if x.Rewards == nil { - x.Rewards = new(ValidatorCurrentRewards) - } - return protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord 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_ValidatorCurrentRewardsRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": - m := new(ValidatorCurrentRewards) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord 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_ValidatorCurrentRewardsRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord", 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_ValidatorCurrentRewardsRecord) 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_ValidatorCurrentRewardsRecord) 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_ValidatorCurrentRewardsRecord) 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_ValidatorCurrentRewardsRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorCurrentRewardsRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Rewards != nil { - l = options.Size(x.Rewards) - 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().(*ValidatorCurrentRewardsRecord) - 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.Rewards != nil { - encoded, err := options.Marshal(x.Rewards) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorCurrentRewardsRecord) - 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: ValidatorCurrentRewardsRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorCurrentRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", 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.Rewards == nil { - x.Rewards = &ValidatorCurrentRewards{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards); 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_DelegatorStartingInfoRecord protoreflect.MessageDescriptor - fd_DelegatorStartingInfoRecord_delegator_address protoreflect.FieldDescriptor - fd_DelegatorStartingInfoRecord_validator_address protoreflect.FieldDescriptor - fd_DelegatorStartingInfoRecord_starting_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_DelegatorStartingInfoRecord = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("DelegatorStartingInfoRecord") - fd_DelegatorStartingInfoRecord_delegator_address = md_DelegatorStartingInfoRecord.Fields().ByName("delegator_address") - fd_DelegatorStartingInfoRecord_validator_address = md_DelegatorStartingInfoRecord.Fields().ByName("validator_address") - fd_DelegatorStartingInfoRecord_starting_info = md_DelegatorStartingInfoRecord.Fields().ByName("starting_info") -} - -var _ protoreflect.Message = (*fastReflection_DelegatorStartingInfoRecord)(nil) - -type fastReflection_DelegatorStartingInfoRecord DelegatorStartingInfoRecord - -func (x *DelegatorStartingInfoRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegatorStartingInfoRecord)(x) -} - -func (x *DelegatorStartingInfoRecord) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_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_DelegatorStartingInfoRecord_messageType fastReflection_DelegatorStartingInfoRecord_messageType -var _ protoreflect.MessageType = fastReflection_DelegatorStartingInfoRecord_messageType{} - -type fastReflection_DelegatorStartingInfoRecord_messageType struct{} - -func (x fastReflection_DelegatorStartingInfoRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegatorStartingInfoRecord)(nil) -} -func (x fastReflection_DelegatorStartingInfoRecord_messageType) New() protoreflect.Message { - return new(fastReflection_DelegatorStartingInfoRecord) -} -func (x fastReflection_DelegatorStartingInfoRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorStartingInfoRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegatorStartingInfoRecord) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorStartingInfoRecord -} - -// 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_DelegatorStartingInfoRecord) Type() protoreflect.MessageType { - return _fastReflection_DelegatorStartingInfoRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegatorStartingInfoRecord) New() protoreflect.Message { - return new(fastReflection_DelegatorStartingInfoRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegatorStartingInfoRecord) Interface() protoreflect.ProtoMessage { - return (*DelegatorStartingInfoRecord)(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_DelegatorStartingInfoRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_DelegatorStartingInfoRecord_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_DelegatorStartingInfoRecord_validator_address, value) { - return - } - } - if x.StartingInfo != nil { - value := protoreflect.ValueOfMessage(x.StartingInfo.ProtoReflect()) - if !f(fd_DelegatorStartingInfoRecord_starting_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DelegatorStartingInfoRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": - return x.StartingInfo != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord 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_DelegatorStartingInfoRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": - x.DelegatorAddress = "" - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": - x.StartingInfo = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord 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_DelegatorStartingInfoRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": - value := x.StartingInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord 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_DelegatorStartingInfoRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": - x.StartingInfo = value.Message().Interface().(*DelegatorStartingInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord 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_DelegatorStartingInfoRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": - if x.StartingInfo == nil { - x.StartingInfo = new(DelegatorStartingInfo) - } - return protoreflect.ValueOfMessage(x.StartingInfo.ProtoReflect()) - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord is not mutable")) - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord 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_DelegatorStartingInfoRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": - m := new(DelegatorStartingInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.DelegatorStartingInfoRecord 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_DelegatorStartingInfoRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.DelegatorStartingInfoRecord", 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_DelegatorStartingInfoRecord) 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_DelegatorStartingInfoRecord) 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_DelegatorStartingInfoRecord) 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_DelegatorStartingInfoRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegatorStartingInfoRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartingInfo != nil { - l = options.Size(x.StartingInfo) - 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().(*DelegatorStartingInfoRecord) - 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.StartingInfo != nil { - encoded, err := options.Marshal(x.StartingInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*DelegatorStartingInfoRecord) - 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: DelegatorStartingInfoRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorStartingInfoRecord: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartingInfo", 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.StartingInfo == nil { - x.StartingInfo = &DelegatorStartingInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartingInfo); 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_ValidatorSlashEventRecord protoreflect.MessageDescriptor - fd_ValidatorSlashEventRecord_validator_address protoreflect.FieldDescriptor - fd_ValidatorSlashEventRecord_height protoreflect.FieldDescriptor - fd_ValidatorSlashEventRecord_period protoreflect.FieldDescriptor - fd_ValidatorSlashEventRecord_validator_slash_event protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_ValidatorSlashEventRecord = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorSlashEventRecord") - fd_ValidatorSlashEventRecord_validator_address = md_ValidatorSlashEventRecord.Fields().ByName("validator_address") - fd_ValidatorSlashEventRecord_height = md_ValidatorSlashEventRecord.Fields().ByName("height") - fd_ValidatorSlashEventRecord_period = md_ValidatorSlashEventRecord.Fields().ByName("period") - fd_ValidatorSlashEventRecord_validator_slash_event = md_ValidatorSlashEventRecord.Fields().ByName("validator_slash_event") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorSlashEventRecord)(nil) - -type fastReflection_ValidatorSlashEventRecord ValidatorSlashEventRecord - -func (x *ValidatorSlashEventRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSlashEventRecord)(x) -} - -func (x *ValidatorSlashEventRecord) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_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_ValidatorSlashEventRecord_messageType fastReflection_ValidatorSlashEventRecord_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSlashEventRecord_messageType{} - -type fastReflection_ValidatorSlashEventRecord_messageType struct{} - -func (x fastReflection_ValidatorSlashEventRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSlashEventRecord)(nil) -} -func (x fastReflection_ValidatorSlashEventRecord_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSlashEventRecord) -} -func (x fastReflection_ValidatorSlashEventRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSlashEventRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorSlashEventRecord) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSlashEventRecord -} - -// 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_ValidatorSlashEventRecord) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSlashEventRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSlashEventRecord) New() protoreflect.Message { - return new(fastReflection_ValidatorSlashEventRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSlashEventRecord) Interface() protoreflect.ProtoMessage { - return (*ValidatorSlashEventRecord)(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_ValidatorSlashEventRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_ValidatorSlashEventRecord_validator_address, value) { - return - } - } - if x.Height != uint64(0) { - value := protoreflect.ValueOfUint64(x.Height) - if !f(fd_ValidatorSlashEventRecord_height, value) { - return - } - } - if x.Period != uint64(0) { - value := protoreflect.ValueOfUint64(x.Period) - if !f(fd_ValidatorSlashEventRecord_period, value) { - return - } - } - if x.ValidatorSlashEvent != nil { - value := protoreflect.ValueOfMessage(x.ValidatorSlashEvent.ProtoReflect()) - if !f(fd_ValidatorSlashEventRecord_validator_slash_event, 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_ValidatorSlashEventRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.height": - return x.Height != uint64(0) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.period": - return x.Period != uint64(0) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": - return x.ValidatorSlashEvent != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEventRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEventRecord 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_ValidatorSlashEventRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.height": - x.Height = uint64(0) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.period": - x.Period = uint64(0) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": - x.ValidatorSlashEvent = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEventRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEventRecord 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_ValidatorSlashEventRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.height": - value := x.Height - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.period": - value := x.Period - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": - value := x.ValidatorSlashEvent - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEventRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEventRecord 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_ValidatorSlashEventRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.height": - x.Height = value.Uint() - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.period": - x.Period = value.Uint() - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": - x.ValidatorSlashEvent = value.Message().Interface().(*ValidatorSlashEvent) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEventRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEventRecord 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_ValidatorSlashEventRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": - if x.ValidatorSlashEvent == nil { - x.ValidatorSlashEvent = new(ValidatorSlashEvent) - } - return protoreflect.ValueOfMessage(x.ValidatorSlashEvent.ProtoReflect()) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.ValidatorSlashEventRecord is not mutable")) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.height": - panic(fmt.Errorf("field height of message cosmos.distribution.v1beta1.ValidatorSlashEventRecord is not mutable")) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.period": - panic(fmt.Errorf("field period of message cosmos.distribution.v1beta1.ValidatorSlashEventRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEventRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEventRecord 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_ValidatorSlashEventRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.height": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.period": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": - m := new(ValidatorSlashEvent) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.ValidatorSlashEventRecord")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.ValidatorSlashEventRecord 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_ValidatorSlashEventRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.ValidatorSlashEventRecord", 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_ValidatorSlashEventRecord) 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_ValidatorSlashEventRecord) 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_ValidatorSlashEventRecord) 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_ValidatorSlashEventRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorSlashEventRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Period != 0 { - n += 1 + runtime.Sov(uint64(x.Period)) - } - if x.ValidatorSlashEvent != nil { - l = options.Size(x.ValidatorSlashEvent) - 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().(*ValidatorSlashEventRecord) - 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.ValidatorSlashEvent != nil { - encoded, err := options.Marshal(x.ValidatorSlashEvent) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Period != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) - i-- - dAtA[i] = 0x18 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x10 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSlashEventRecord) - 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: ValidatorSlashEventRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEventRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - x.Period = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Period |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvent", 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.ValidatorSlashEvent == nil { - x.ValidatorSlashEvent = &ValidatorSlashEvent{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSlashEvent); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*DelegatorWithdrawInfo -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegatorWithdrawInfo) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegatorWithdrawInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(DelegatorWithdrawInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(DelegatorWithdrawInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_5_list)(nil) - -type _GenesisState_5_list struct { - list *[]*ValidatorOutstandingRewardsRecord -} - -func (x *_GenesisState_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorOutstandingRewardsRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorOutstandingRewardsRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { - v := new(ValidatorOutstandingRewardsRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_5_list) NewElement() protoreflect.Value { - v := new(ValidatorOutstandingRewardsRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_6_list)(nil) - -type _GenesisState_6_list struct { - list *[]*ValidatorAccumulatedCommissionRecord -} - -func (x *_GenesisState_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorAccumulatedCommissionRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorAccumulatedCommissionRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { - v := new(ValidatorAccumulatedCommissionRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_6_list) NewElement() protoreflect.Value { - v := new(ValidatorAccumulatedCommissionRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_7_list)(nil) - -type _GenesisState_7_list struct { - list *[]*ValidatorHistoricalRewardsRecord -} - -func (x *_GenesisState_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorHistoricalRewardsRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorHistoricalRewardsRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { - v := new(ValidatorHistoricalRewardsRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_7_list) NewElement() protoreflect.Value { - v := new(ValidatorHistoricalRewardsRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_8_list)(nil) - -type _GenesisState_8_list struct { - list *[]*ValidatorCurrentRewardsRecord -} - -func (x *_GenesisState_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorCurrentRewardsRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorCurrentRewardsRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_8_list) AppendMutable() protoreflect.Value { - v := new(ValidatorCurrentRewardsRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_8_list) NewElement() protoreflect.Value { - v := new(ValidatorCurrentRewardsRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_8_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_9_list)(nil) - -type _GenesisState_9_list struct { - list *[]*DelegatorStartingInfoRecord -} - -func (x *_GenesisState_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegatorStartingInfoRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegatorStartingInfoRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_9_list) AppendMutable() protoreflect.Value { - v := new(DelegatorStartingInfoRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_9_list) NewElement() protoreflect.Value { - v := new(DelegatorStartingInfoRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_9_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_10_list)(nil) - -type _GenesisState_10_list struct { - list *[]*ValidatorSlashEventRecord -} - -func (x *_GenesisState_10_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_10_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_10_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEventRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_10_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEventRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_10_list) AppendMutable() protoreflect.Value { - v := new(ValidatorSlashEventRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_10_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_10_list) NewElement() protoreflect.Value { - v := new(ValidatorSlashEventRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_10_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_fee_pool protoreflect.FieldDescriptor - fd_GenesisState_delegator_withdraw_infos protoreflect.FieldDescriptor - fd_GenesisState_previous_proposer protoreflect.FieldDescriptor - fd_GenesisState_outstanding_rewards protoreflect.FieldDescriptor - fd_GenesisState_validator_accumulated_commissions protoreflect.FieldDescriptor - fd_GenesisState_validator_historical_rewards protoreflect.FieldDescriptor - fd_GenesisState_validator_current_rewards protoreflect.FieldDescriptor - fd_GenesisState_delegator_starting_infos protoreflect.FieldDescriptor - fd_GenesisState_validator_slash_events protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_distribution_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_fee_pool = md_GenesisState.Fields().ByName("fee_pool") - fd_GenesisState_delegator_withdraw_infos = md_GenesisState.Fields().ByName("delegator_withdraw_infos") - fd_GenesisState_previous_proposer = md_GenesisState.Fields().ByName("previous_proposer") - fd_GenesisState_outstanding_rewards = md_GenesisState.Fields().ByName("outstanding_rewards") - fd_GenesisState_validator_accumulated_commissions = md_GenesisState.Fields().ByName("validator_accumulated_commissions") - fd_GenesisState_validator_historical_rewards = md_GenesisState.Fields().ByName("validator_historical_rewards") - fd_GenesisState_validator_current_rewards = md_GenesisState.Fields().ByName("validator_current_rewards") - fd_GenesisState_delegator_starting_infos = md_GenesisState.Fields().ByName("delegator_starting_infos") - fd_GenesisState_validator_slash_events = md_GenesisState.Fields().ByName("validator_slash_events") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if x.FeePool != nil { - value := protoreflect.ValueOfMessage(x.FeePool.ProtoReflect()) - if !f(fd_GenesisState_fee_pool, value) { - return - } - } - if len(x.DelegatorWithdrawInfos) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.DelegatorWithdrawInfos}) - if !f(fd_GenesisState_delegator_withdraw_infos, value) { - return - } - } - if x.PreviousProposer != "" { - value := protoreflect.ValueOfString(x.PreviousProposer) - if !f(fd_GenesisState_previous_proposer, value) { - return - } - } - if len(x.OutstandingRewards) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.OutstandingRewards}) - if !f(fd_GenesisState_outstanding_rewards, value) { - return - } - } - if len(x.ValidatorAccumulatedCommissions) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.ValidatorAccumulatedCommissions}) - if !f(fd_GenesisState_validator_accumulated_commissions, value) { - return - } - } - if len(x.ValidatorHistoricalRewards) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.ValidatorHistoricalRewards}) - if !f(fd_GenesisState_validator_historical_rewards, value) { - return - } - } - if len(x.ValidatorCurrentRewards) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_8_list{list: &x.ValidatorCurrentRewards}) - if !f(fd_GenesisState_validator_current_rewards, value) { - return - } - } - if len(x.DelegatorStartingInfos) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_9_list{list: &x.DelegatorStartingInfos}) - if !f(fd_GenesisState_delegator_starting_infos, value) { - return - } - } - if len(x.ValidatorSlashEvents) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_10_list{list: &x.ValidatorSlashEvents}) - if !f(fd_GenesisState_validator_slash_events, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.GenesisState.params": - return x.Params != nil - case "cosmos.distribution.v1beta1.GenesisState.fee_pool": - return x.FeePool != nil - case "cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos": - return len(x.DelegatorWithdrawInfos) != 0 - case "cosmos.distribution.v1beta1.GenesisState.previous_proposer": - return x.PreviousProposer != "" - case "cosmos.distribution.v1beta1.GenesisState.outstanding_rewards": - return len(x.OutstandingRewards) != 0 - case "cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions": - return len(x.ValidatorAccumulatedCommissions) != 0 - case "cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards": - return len(x.ValidatorHistoricalRewards) != 0 - case "cosmos.distribution.v1beta1.GenesisState.validator_current_rewards": - return len(x.ValidatorCurrentRewards) != 0 - case "cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos": - return len(x.DelegatorStartingInfos) != 0 - case "cosmos.distribution.v1beta1.GenesisState.validator_slash_events": - return len(x.ValidatorSlashEvents) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.GenesisState.params": - x.Params = nil - case "cosmos.distribution.v1beta1.GenesisState.fee_pool": - x.FeePool = nil - case "cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos": - x.DelegatorWithdrawInfos = nil - case "cosmos.distribution.v1beta1.GenesisState.previous_proposer": - x.PreviousProposer = "" - case "cosmos.distribution.v1beta1.GenesisState.outstanding_rewards": - x.OutstandingRewards = nil - case "cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions": - x.ValidatorAccumulatedCommissions = nil - case "cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards": - x.ValidatorHistoricalRewards = nil - case "cosmos.distribution.v1beta1.GenesisState.validator_current_rewards": - x.ValidatorCurrentRewards = nil - case "cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos": - x.DelegatorStartingInfos = nil - case "cosmos.distribution.v1beta1.GenesisState.validator_slash_events": - x.ValidatorSlashEvents = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.distribution.v1beta1.GenesisState.fee_pool": - value := x.FeePool - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos": - if len(x.DelegatorWithdrawInfos) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.DelegatorWithdrawInfos} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.GenesisState.previous_proposer": - value := x.PreviousProposer - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.GenesisState.outstanding_rewards": - if len(x.OutstandingRewards) == 0 { - return protoreflect.ValueOfList(&_GenesisState_5_list{}) - } - listValue := &_GenesisState_5_list{list: &x.OutstandingRewards} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions": - if len(x.ValidatorAccumulatedCommissions) == 0 { - return protoreflect.ValueOfList(&_GenesisState_6_list{}) - } - listValue := &_GenesisState_6_list{list: &x.ValidatorAccumulatedCommissions} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards": - if len(x.ValidatorHistoricalRewards) == 0 { - return protoreflect.ValueOfList(&_GenesisState_7_list{}) - } - listValue := &_GenesisState_7_list{list: &x.ValidatorHistoricalRewards} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.GenesisState.validator_current_rewards": - if len(x.ValidatorCurrentRewards) == 0 { - return protoreflect.ValueOfList(&_GenesisState_8_list{}) - } - listValue := &_GenesisState_8_list{list: &x.ValidatorCurrentRewards} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos": - if len(x.DelegatorStartingInfos) == 0 { - return protoreflect.ValueOfList(&_GenesisState_9_list{}) - } - listValue := &_GenesisState_9_list{list: &x.DelegatorStartingInfos} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.GenesisState.validator_slash_events": - if len(x.ValidatorSlashEvents) == 0 { - return protoreflect.ValueOfList(&_GenesisState_10_list{}) - } - listValue := &_GenesisState_10_list{list: &x.ValidatorSlashEvents} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "cosmos.distribution.v1beta1.GenesisState.fee_pool": - x.FeePool = value.Message().Interface().(*FeePool) - case "cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.DelegatorWithdrawInfos = *clv.list - case "cosmos.distribution.v1beta1.GenesisState.previous_proposer": - x.PreviousProposer = value.Interface().(string) - case "cosmos.distribution.v1beta1.GenesisState.outstanding_rewards": - lv := value.List() - clv := lv.(*_GenesisState_5_list) - x.OutstandingRewards = *clv.list - case "cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions": - lv := value.List() - clv := lv.(*_GenesisState_6_list) - x.ValidatorAccumulatedCommissions = *clv.list - case "cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards": - lv := value.List() - clv := lv.(*_GenesisState_7_list) - x.ValidatorHistoricalRewards = *clv.list - case "cosmos.distribution.v1beta1.GenesisState.validator_current_rewards": - lv := value.List() - clv := lv.(*_GenesisState_8_list) - x.ValidatorCurrentRewards = *clv.list - case "cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos": - lv := value.List() - clv := lv.(*_GenesisState_9_list) - x.DelegatorStartingInfos = *clv.list - case "cosmos.distribution.v1beta1.GenesisState.validator_slash_events": - lv := value.List() - clv := lv.(*_GenesisState_10_list) - x.ValidatorSlashEvents = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "cosmos.distribution.v1beta1.GenesisState.fee_pool": - if x.FeePool == nil { - x.FeePool = new(FeePool) - } - return protoreflect.ValueOfMessage(x.FeePool.ProtoReflect()) - case "cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos": - if x.DelegatorWithdrawInfos == nil { - x.DelegatorWithdrawInfos = []*DelegatorWithdrawInfo{} - } - value := &_GenesisState_3_list{list: &x.DelegatorWithdrawInfos} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.outstanding_rewards": - if x.OutstandingRewards == nil { - x.OutstandingRewards = []*ValidatorOutstandingRewardsRecord{} - } - value := &_GenesisState_5_list{list: &x.OutstandingRewards} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions": - if x.ValidatorAccumulatedCommissions == nil { - x.ValidatorAccumulatedCommissions = []*ValidatorAccumulatedCommissionRecord{} - } - value := &_GenesisState_6_list{list: &x.ValidatorAccumulatedCommissions} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards": - if x.ValidatorHistoricalRewards == nil { - x.ValidatorHistoricalRewards = []*ValidatorHistoricalRewardsRecord{} - } - value := &_GenesisState_7_list{list: &x.ValidatorHistoricalRewards} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.validator_current_rewards": - if x.ValidatorCurrentRewards == nil { - x.ValidatorCurrentRewards = []*ValidatorCurrentRewardsRecord{} - } - value := &_GenesisState_8_list{list: &x.ValidatorCurrentRewards} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos": - if x.DelegatorStartingInfos == nil { - x.DelegatorStartingInfos = []*DelegatorStartingInfoRecord{} - } - value := &_GenesisState_9_list{list: &x.DelegatorStartingInfos} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.validator_slash_events": - if x.ValidatorSlashEvents == nil { - x.ValidatorSlashEvents = []*ValidatorSlashEventRecord{} - } - value := &_GenesisState_10_list{list: &x.ValidatorSlashEvents} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.GenesisState.previous_proposer": - panic(fmt.Errorf("field previous_proposer of message cosmos.distribution.v1beta1.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.distribution.v1beta1.GenesisState.fee_pool": - m := new(FeePool) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos": - list := []*DelegatorWithdrawInfo{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "cosmos.distribution.v1beta1.GenesisState.previous_proposer": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.GenesisState.outstanding_rewards": - list := []*ValidatorOutstandingRewardsRecord{} - return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) - case "cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions": - list := []*ValidatorAccumulatedCommissionRecord{} - return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) - case "cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards": - list := []*ValidatorHistoricalRewardsRecord{} - return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) - case "cosmos.distribution.v1beta1.GenesisState.validator_current_rewards": - list := []*ValidatorCurrentRewardsRecord{} - return protoreflect.ValueOfList(&_GenesisState_8_list{list: &list}) - case "cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos": - list := []*DelegatorStartingInfoRecord{} - return protoreflect.ValueOfList(&_GenesisState_9_list{list: &list}) - case "cosmos.distribution.v1beta1.GenesisState.validator_slash_events": - list := []*ValidatorSlashEventRecord{} - return protoreflect.ValueOfList(&_GenesisState_10_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.FeePool != nil { - l = options.Size(x.FeePool) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.DelegatorWithdrawInfos) > 0 { - for _, e := range x.DelegatorWithdrawInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.PreviousProposer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.OutstandingRewards) > 0 { - for _, e := range x.OutstandingRewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ValidatorAccumulatedCommissions) > 0 { - for _, e := range x.ValidatorAccumulatedCommissions { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ValidatorHistoricalRewards) > 0 { - for _, e := range x.ValidatorHistoricalRewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ValidatorCurrentRewards) > 0 { - for _, e := range x.ValidatorCurrentRewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DelegatorStartingInfos) > 0 { - for _, e := range x.DelegatorStartingInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ValidatorSlashEvents) > 0 { - for _, e := range x.ValidatorSlashEvents { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorSlashEvents) > 0 { - for iNdEx := len(x.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorSlashEvents[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] = 0x52 - } - } - if len(x.DelegatorStartingInfos) > 0 { - for iNdEx := len(x.DelegatorStartingInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatorStartingInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if len(x.ValidatorCurrentRewards) > 0 { - for iNdEx := len(x.ValidatorCurrentRewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorCurrentRewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.ValidatorHistoricalRewards) > 0 { - for iNdEx := len(x.ValidatorHistoricalRewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorHistoricalRewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.ValidatorAccumulatedCommissions) > 0 { - for iNdEx := len(x.ValidatorAccumulatedCommissions) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorAccumulatedCommissions[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - } - if len(x.OutstandingRewards) > 0 { - for iNdEx := len(x.OutstandingRewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.OutstandingRewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.PreviousProposer) > 0 { - i -= len(x.PreviousProposer) - copy(dAtA[i:], x.PreviousProposer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousProposer))) - i-- - dAtA[i] = 0x22 - } - if len(x.DelegatorWithdrawInfos) > 0 { - for iNdEx := len(x.DelegatorWithdrawInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatorWithdrawInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.FeePool != nil { - encoded, err := options.Marshal(x.FeePool) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeePool", 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.FeePool == nil { - x.FeePool = &FeePool{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeePool); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorWithdrawInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegatorWithdrawInfos = append(x.DelegatorWithdrawInfos, &DelegatorWithdrawInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatorWithdrawInfos[len(x.DelegatorWithdrawInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousProposer", 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.PreviousProposer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutstandingRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OutstandingRewards = append(x.OutstandingRewards, &ValidatorOutstandingRewardsRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutstandingRewards[len(x.OutstandingRewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAccumulatedCommissions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAccumulatedCommissions = append(x.ValidatorAccumulatedCommissions, &ValidatorAccumulatedCommissionRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorAccumulatedCommissions[len(x.ValidatorAccumulatedCommissions)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorHistoricalRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorHistoricalRewards = append(x.ValidatorHistoricalRewards, &ValidatorHistoricalRewardsRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorHistoricalRewards[len(x.ValidatorHistoricalRewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorCurrentRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorCurrentRewards = append(x.ValidatorCurrentRewards, &ValidatorCurrentRewardsRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorCurrentRewards[len(x.ValidatorCurrentRewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorStartingInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegatorStartingInfos = append(x.DelegatorStartingInfos, &DelegatorStartingInfoRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatorStartingInfos[len(x.DelegatorStartingInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorSlashEvents = append(x.ValidatorSlashEvents, &ValidatorSlashEventRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSlashEvents[len(x.ValidatorSlashEvents)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/distribution/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// DelegatorWithdrawInfo is the address for where distributions rewards are -// withdrawn to by default this struct is only used at genesis to feed in -// default withdraw addresses. -type DelegatorWithdrawInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address is the address of the delegator. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // withdraw_address is the address to withdraw the delegation rewards to. - WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` -} - -func (x *DelegatorWithdrawInfo) Reset() { - *x = DelegatorWithdrawInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegatorWithdrawInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegatorWithdrawInfo) ProtoMessage() {} - -// Deprecated: Use DelegatorWithdrawInfo.ProtoReflect.Descriptor instead. -func (*DelegatorWithdrawInfo) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *DelegatorWithdrawInfo) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *DelegatorWithdrawInfo) GetWithdrawAddress() string { - if x != nil { - return x.WithdrawAddress - } - return "" -} - -// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -type ValidatorOutstandingRewardsRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address is the address of the validator. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // outstanding_rewards represents the oustanding rewards of a validator. - OutstandingRewards []*v1beta1.DecCoin `protobuf:"bytes,2,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards,omitempty"` -} - -func (x *ValidatorOutstandingRewardsRecord) Reset() { - *x = ValidatorOutstandingRewardsRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorOutstandingRewardsRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorOutstandingRewardsRecord) ProtoMessage() {} - -// Deprecated: Use ValidatorOutstandingRewardsRecord.ProtoReflect.Descriptor instead. -func (*ValidatorOutstandingRewardsRecord) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *ValidatorOutstandingRewardsRecord) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *ValidatorOutstandingRewardsRecord) GetOutstandingRewards() []*v1beta1.DecCoin { - if x != nil { - return x.OutstandingRewards - } - return nil -} - -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -// json. -type ValidatorAccumulatedCommissionRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address is the address of the validator. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // accumulated is the accumulated commission of a validator. - Accumulated *ValidatorAccumulatedCommission `protobuf:"bytes,2,opt,name=accumulated,proto3" json:"accumulated,omitempty"` -} - -func (x *ValidatorAccumulatedCommissionRecord) Reset() { - *x = ValidatorAccumulatedCommissionRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorAccumulatedCommissionRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorAccumulatedCommissionRecord) ProtoMessage() {} - -// Deprecated: Use ValidatorAccumulatedCommissionRecord.ProtoReflect.Descriptor instead. -func (*ValidatorAccumulatedCommissionRecord) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{2} -} - -func (x *ValidatorAccumulatedCommissionRecord) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *ValidatorAccumulatedCommissionRecord) GetAccumulated() *ValidatorAccumulatedCommission { - if x != nil { - return x.Accumulated - } - return nil -} - -// ValidatorHistoricalRewardsRecord is used for import / export via genesis -// json. -type ValidatorHistoricalRewardsRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address is the address of the validator. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // period defines the period the historical rewards apply to. - Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` - // rewards defines the historical rewards of a validator. - Rewards *ValidatorHistoricalRewards `protobuf:"bytes,3,opt,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (x *ValidatorHistoricalRewardsRecord) Reset() { - *x = ValidatorHistoricalRewardsRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorHistoricalRewardsRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorHistoricalRewardsRecord) ProtoMessage() {} - -// Deprecated: Use ValidatorHistoricalRewardsRecord.ProtoReflect.Descriptor instead. -func (*ValidatorHistoricalRewardsRecord) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{3} -} - -func (x *ValidatorHistoricalRewardsRecord) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *ValidatorHistoricalRewardsRecord) GetPeriod() uint64 { - if x != nil { - return x.Period - } - return 0 -} - -func (x *ValidatorHistoricalRewardsRecord) GetRewards() *ValidatorHistoricalRewards { - if x != nil { - return x.Rewards - } - return nil -} - -// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -type ValidatorCurrentRewardsRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address is the address of the validator. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // rewards defines the current rewards of a validator. - Rewards *ValidatorCurrentRewards `protobuf:"bytes,2,opt,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (x *ValidatorCurrentRewardsRecord) Reset() { - *x = ValidatorCurrentRewardsRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorCurrentRewardsRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorCurrentRewardsRecord) ProtoMessage() {} - -// Deprecated: Use ValidatorCurrentRewardsRecord.ProtoReflect.Descriptor instead. -func (*ValidatorCurrentRewardsRecord) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{4} -} - -func (x *ValidatorCurrentRewardsRecord) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *ValidatorCurrentRewardsRecord) GetRewards() *ValidatorCurrentRewards { - if x != nil { - return x.Rewards - } - return nil -} - -// DelegatorStartingInfoRecord used for import / export via genesis json. -type DelegatorStartingInfoRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address is the address of the delegator. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the address of the validator. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // starting_info defines the starting info of a delegator. - StartingInfo *DelegatorStartingInfo `protobuf:"bytes,3,opt,name=starting_info,json=startingInfo,proto3" json:"starting_info,omitempty"` -} - -func (x *DelegatorStartingInfoRecord) Reset() { - *x = DelegatorStartingInfoRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegatorStartingInfoRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegatorStartingInfoRecord) ProtoMessage() {} - -// Deprecated: Use DelegatorStartingInfoRecord.ProtoReflect.Descriptor instead. -func (*DelegatorStartingInfoRecord) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{5} -} - -func (x *DelegatorStartingInfoRecord) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *DelegatorStartingInfoRecord) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *DelegatorStartingInfoRecord) GetStartingInfo() *DelegatorStartingInfo { - if x != nil { - return x.StartingInfo - } - return nil -} - -// ValidatorSlashEventRecord is used for import / export via genesis json. -type ValidatorSlashEventRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address is the address of the validator. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // height defines the block height at which the slash event occured. - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - // period is the period of the slash event. - Period uint64 `protobuf:"varint,3,opt,name=period,proto3" json:"period,omitempty"` - // validator_slash_event describes the slash event. - ValidatorSlashEvent *ValidatorSlashEvent `protobuf:"bytes,4,opt,name=validator_slash_event,json=validatorSlashEvent,proto3" json:"validator_slash_event,omitempty"` -} - -func (x *ValidatorSlashEventRecord) Reset() { - *x = ValidatorSlashEventRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorSlashEventRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorSlashEventRecord) ProtoMessage() {} - -// Deprecated: Use ValidatorSlashEventRecord.ProtoReflect.Descriptor instead. -func (*ValidatorSlashEventRecord) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{6} -} - -func (x *ValidatorSlashEventRecord) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *ValidatorSlashEventRecord) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ValidatorSlashEventRecord) GetPeriod() uint64 { - if x != nil { - return x.Period - } - return 0 -} - -func (x *ValidatorSlashEventRecord) GetValidatorSlashEvent() *ValidatorSlashEvent { - if x != nil { - return x.ValidatorSlashEvent - } - return nil -} - -// GenesisState defines the distribution module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines all the paramaters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // fee_pool defines the fee pool at genesis. - FeePool *FeePool `protobuf:"bytes,2,opt,name=fee_pool,json=feePool,proto3" json:"fee_pool,omitempty"` - // fee_pool defines the delegator withdraw infos at genesis. - DelegatorWithdrawInfos []*DelegatorWithdrawInfo `protobuf:"bytes,3,rep,name=delegator_withdraw_infos,json=delegatorWithdrawInfos,proto3" json:"delegator_withdraw_infos,omitempty"` - // fee_pool defines the previous proposer at genesis. - PreviousProposer string `protobuf:"bytes,4,opt,name=previous_proposer,json=previousProposer,proto3" json:"previous_proposer,omitempty"` - // fee_pool defines the outstanding rewards of all validators at genesis. - OutstandingRewards []*ValidatorOutstandingRewardsRecord `protobuf:"bytes,5,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards,omitempty"` - // fee_pool defines the accumulated commisions of all validators at genesis. - ValidatorAccumulatedCommissions []*ValidatorAccumulatedCommissionRecord `protobuf:"bytes,6,rep,name=validator_accumulated_commissions,json=validatorAccumulatedCommissions,proto3" json:"validator_accumulated_commissions,omitempty"` - // fee_pool defines the historical rewards of all validators at genesis. - ValidatorHistoricalRewards []*ValidatorHistoricalRewardsRecord `protobuf:"bytes,7,rep,name=validator_historical_rewards,json=validatorHistoricalRewards,proto3" json:"validator_historical_rewards,omitempty"` - // fee_pool defines the current rewards of all validators at genesis. - ValidatorCurrentRewards []*ValidatorCurrentRewardsRecord `protobuf:"bytes,8,rep,name=validator_current_rewards,json=validatorCurrentRewards,proto3" json:"validator_current_rewards,omitempty"` - // fee_pool defines the delegator starting infos at genesis. - DelegatorStartingInfos []*DelegatorStartingInfoRecord `protobuf:"bytes,9,rep,name=delegator_starting_infos,json=delegatorStartingInfos,proto3" json:"delegator_starting_infos,omitempty"` - // fee_pool defines the validator slash events at genesis. - ValidatorSlashEvents []*ValidatorSlashEventRecord `protobuf:"bytes,10,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{7} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetFeePool() *FeePool { - if x != nil { - return x.FeePool - } - return nil -} - -func (x *GenesisState) GetDelegatorWithdrawInfos() []*DelegatorWithdrawInfo { - if x != nil { - return x.DelegatorWithdrawInfos - } - return nil -} - -func (x *GenesisState) GetPreviousProposer() string { - if x != nil { - return x.PreviousProposer - } - return "" -} - -func (x *GenesisState) GetOutstandingRewards() []*ValidatorOutstandingRewardsRecord { - if x != nil { - return x.OutstandingRewards - } - return nil -} - -func (x *GenesisState) GetValidatorAccumulatedCommissions() []*ValidatorAccumulatedCommissionRecord { - if x != nil { - return x.ValidatorAccumulatedCommissions - } - return nil -} - -func (x *GenesisState) GetValidatorHistoricalRewards() []*ValidatorHistoricalRewardsRecord { - if x != nil { - return x.ValidatorHistoricalRewards - } - return nil -} - -func (x *GenesisState) GetValidatorCurrentRewards() []*ValidatorCurrentRewardsRecord { - if x != nil { - return x.ValidatorCurrentRewards - } - return nil -} - -func (x *GenesisState) GetDelegatorStartingInfos() []*DelegatorStartingInfoRecord { - if x != nil { - return x.DelegatorStartingInfos - } - return nil -} - -func (x *GenesisState) GetValidatorSlashEvents() []*ValidatorSlashEventRecord { - if x != nil { - return x.ValidatorSlashEvents - } - return nil -} - -var File_cosmos_distribution_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_distribution_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x01, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xf9, 0x01, 0x0a, 0x21, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, - 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x73, 0x74, - 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x12, 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xdc, 0x01, 0x0a, 0x24, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x45, - 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x63, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xe4, 0x01, 0x0a, 0x20, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 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, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x57, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xc6, 0x01, 0x0a, 0x1d, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x94, 0x02, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x88, 0x02, 0x0a, 0x19, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 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, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x12, 0x6a, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xde, 0x08, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x12, 0x45, 0x0a, 0x08, 0x66, 0x65, - 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x50, 0x6f, - 0x6f, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x66, 0x65, 0x65, 0x50, 0x6f, 0x6f, - 0x6c, 0x12, 0x72, 0x0a, 0x18, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x16, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x04, 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, 0x10, 0x70, 0x72, 0x65, 0x76, - 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x75, 0x0a, 0x13, - 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x12, 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x21, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, - 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x1f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x1c, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x1a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x12, 0x7c, 0x0a, 0x19, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, - 0x78, 0x0a, 0x18, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x72, 0x0a, 0x16, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x08, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0x93, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x44, 0x58, 0xaa, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x27, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_distribution_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_distribution_v1beta1_genesis_proto_rawDescData = file_cosmos_distribution_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_distribution_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_distribution_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_distribution_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_distribution_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_distribution_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_distribution_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cosmos_distribution_v1beta1_genesis_proto_goTypes = []interface{}{ - (*DelegatorWithdrawInfo)(nil), // 0: cosmos.distribution.v1beta1.DelegatorWithdrawInfo - (*ValidatorOutstandingRewardsRecord)(nil), // 1: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord - (*ValidatorAccumulatedCommissionRecord)(nil), // 2: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord - (*ValidatorHistoricalRewardsRecord)(nil), // 3: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord - (*ValidatorCurrentRewardsRecord)(nil), // 4: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord - (*DelegatorStartingInfoRecord)(nil), // 5: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord - (*ValidatorSlashEventRecord)(nil), // 6: cosmos.distribution.v1beta1.ValidatorSlashEventRecord - (*GenesisState)(nil), // 7: cosmos.distribution.v1beta1.GenesisState - (*v1beta1.DecCoin)(nil), // 8: cosmos.base.v1beta1.DecCoin - (*ValidatorAccumulatedCommission)(nil), // 9: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission - (*ValidatorHistoricalRewards)(nil), // 10: cosmos.distribution.v1beta1.ValidatorHistoricalRewards - (*ValidatorCurrentRewards)(nil), // 11: cosmos.distribution.v1beta1.ValidatorCurrentRewards - (*DelegatorStartingInfo)(nil), // 12: cosmos.distribution.v1beta1.DelegatorStartingInfo - (*ValidatorSlashEvent)(nil), // 13: cosmos.distribution.v1beta1.ValidatorSlashEvent - (*Params)(nil), // 14: cosmos.distribution.v1beta1.Params - (*FeePool)(nil), // 15: cosmos.distribution.v1beta1.FeePool -} -var file_cosmos_distribution_v1beta1_genesis_proto_depIdxs = []int32{ - 8, // 0: cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards:type_name -> cosmos.base.v1beta1.DecCoin - 9, // 1: cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated:type_name -> cosmos.distribution.v1beta1.ValidatorAccumulatedCommission - 10, // 2: cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards:type_name -> cosmos.distribution.v1beta1.ValidatorHistoricalRewards - 11, // 3: cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards:type_name -> cosmos.distribution.v1beta1.ValidatorCurrentRewards - 12, // 4: cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info:type_name -> cosmos.distribution.v1beta1.DelegatorStartingInfo - 13, // 5: cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event:type_name -> cosmos.distribution.v1beta1.ValidatorSlashEvent - 14, // 6: cosmos.distribution.v1beta1.GenesisState.params:type_name -> cosmos.distribution.v1beta1.Params - 15, // 7: cosmos.distribution.v1beta1.GenesisState.fee_pool:type_name -> cosmos.distribution.v1beta1.FeePool - 0, // 8: cosmos.distribution.v1beta1.GenesisState.delegator_withdraw_infos:type_name -> cosmos.distribution.v1beta1.DelegatorWithdrawInfo - 1, // 9: cosmos.distribution.v1beta1.GenesisState.outstanding_rewards:type_name -> cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord - 2, // 10: cosmos.distribution.v1beta1.GenesisState.validator_accumulated_commissions:type_name -> cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord - 3, // 11: cosmos.distribution.v1beta1.GenesisState.validator_historical_rewards:type_name -> cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord - 4, // 12: cosmos.distribution.v1beta1.GenesisState.validator_current_rewards:type_name -> cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord - 5, // 13: cosmos.distribution.v1beta1.GenesisState.delegator_starting_infos:type_name -> cosmos.distribution.v1beta1.DelegatorStartingInfoRecord - 6, // 14: cosmos.distribution.v1beta1.GenesisState.validator_slash_events:type_name -> cosmos.distribution.v1beta1.ValidatorSlashEventRecord - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_cosmos_distribution_v1beta1_genesis_proto_init() } -func file_cosmos_distribution_v1beta1_genesis_proto_init() { - if File_cosmos_distribution_v1beta1_genesis_proto != nil { - return - } - file_cosmos_distribution_v1beta1_distribution_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegatorWithdrawInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorOutstandingRewardsRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorAccumulatedCommissionRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorHistoricalRewardsRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorCurrentRewardsRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegatorStartingInfoRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSlashEventRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_distribution_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_distribution_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_distribution_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_distribution_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_distribution_v1beta1_genesis_proto = out.File - file_cosmos_distribution_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_distribution_v1beta1_genesis_proto_goTypes = nil - file_cosmos_distribution_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/distribution/v1beta1/query.pulsar.go b/api/cosmos/distribution/v1beta1/query.pulsar.go deleted file mode 100644 index fbbdc2bc5141..000000000000 --- a/api/cosmos/distribution/v1beta1/query.pulsar.go +++ /dev/null @@ -1,9668 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package distributionv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - v1beta11 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.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_distribution_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_distribution_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_distribution_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.distribution.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.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.distribution.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.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.distribution.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.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.distribution.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.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.distribution.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_QueryValidatorOutstandingRewardsRequest protoreflect.MessageDescriptor - fd_QueryValidatorOutstandingRewardsRequest_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryValidatorOutstandingRewardsRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorOutstandingRewardsRequest") - fd_QueryValidatorOutstandingRewardsRequest_validator_address = md_QueryValidatorOutstandingRewardsRequest.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorOutstandingRewardsRequest)(nil) - -type fastReflection_QueryValidatorOutstandingRewardsRequest QueryValidatorOutstandingRewardsRequest - -func (x *QueryValidatorOutstandingRewardsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorOutstandingRewardsRequest)(x) -} - -func (x *QueryValidatorOutstandingRewardsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorOutstandingRewardsRequest_messageType fastReflection_QueryValidatorOutstandingRewardsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorOutstandingRewardsRequest_messageType{} - -type fastReflection_QueryValidatorOutstandingRewardsRequest_messageType struct{} - -func (x fastReflection_QueryValidatorOutstandingRewardsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorOutstandingRewardsRequest)(nil) -} -func (x fastReflection_QueryValidatorOutstandingRewardsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorOutstandingRewardsRequest) -} -func (x fastReflection_QueryValidatorOutstandingRewardsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorOutstandingRewardsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorOutstandingRewardsRequest -} - -// 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_QueryValidatorOutstandingRewardsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorOutstandingRewardsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorOutstandingRewardsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorOutstandingRewardsRequest)(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_QueryValidatorOutstandingRewardsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryValidatorOutstandingRewardsRequest_validator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest 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_QueryValidatorOutstandingRewardsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest 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_QueryValidatorOutstandingRewardsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest 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_QueryValidatorOutstandingRewardsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest 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_QueryValidatorOutstandingRewardsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest 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_QueryValidatorOutstandingRewardsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest 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_QueryValidatorOutstandingRewardsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", 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_QueryValidatorOutstandingRewardsRequest) 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_QueryValidatorOutstandingRewardsRequest) 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_QueryValidatorOutstandingRewardsRequest) 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_QueryValidatorOutstandingRewardsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorOutstandingRewardsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.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().(*QueryValidatorOutstandingRewardsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 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().(*QueryValidatorOutstandingRewardsRequest) - 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: QueryValidatorOutstandingRewardsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorOutstandingRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_QueryValidatorOutstandingRewardsResponse protoreflect.MessageDescriptor - fd_QueryValidatorOutstandingRewardsResponse_rewards protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryValidatorOutstandingRewardsResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorOutstandingRewardsResponse") - fd_QueryValidatorOutstandingRewardsResponse_rewards = md_QueryValidatorOutstandingRewardsResponse.Fields().ByName("rewards") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorOutstandingRewardsResponse)(nil) - -type fastReflection_QueryValidatorOutstandingRewardsResponse QueryValidatorOutstandingRewardsResponse - -func (x *QueryValidatorOutstandingRewardsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorOutstandingRewardsResponse)(x) -} - -func (x *QueryValidatorOutstandingRewardsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorOutstandingRewardsResponse_messageType fastReflection_QueryValidatorOutstandingRewardsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorOutstandingRewardsResponse_messageType{} - -type fastReflection_QueryValidatorOutstandingRewardsResponse_messageType struct{} - -func (x fastReflection_QueryValidatorOutstandingRewardsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorOutstandingRewardsResponse)(nil) -} -func (x fastReflection_QueryValidatorOutstandingRewardsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorOutstandingRewardsResponse) -} -func (x fastReflection_QueryValidatorOutstandingRewardsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorOutstandingRewardsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorOutstandingRewardsResponse -} - -// 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_QueryValidatorOutstandingRewardsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorOutstandingRewardsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorOutstandingRewardsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorOutstandingRewardsResponse)(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_QueryValidatorOutstandingRewardsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Rewards != nil { - value := protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) - if !f(fd_QueryValidatorOutstandingRewardsResponse_rewards, 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_QueryValidatorOutstandingRewardsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": - return x.Rewards != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse 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_QueryValidatorOutstandingRewardsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": - x.Rewards = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse 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_QueryValidatorOutstandingRewardsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": - value := x.Rewards - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse 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_QueryValidatorOutstandingRewardsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": - x.Rewards = value.Message().Interface().(*ValidatorOutstandingRewards) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse 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_QueryValidatorOutstandingRewardsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": - if x.Rewards == nil { - x.Rewards = new(ValidatorOutstandingRewards) - } - return protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse 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_QueryValidatorOutstandingRewardsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": - m := new(ValidatorOutstandingRewards) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse 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_QueryValidatorOutstandingRewardsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", 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_QueryValidatorOutstandingRewardsResponse) 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_QueryValidatorOutstandingRewardsResponse) 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_QueryValidatorOutstandingRewardsResponse) 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_QueryValidatorOutstandingRewardsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorOutstandingRewardsResponse) - 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.Rewards != nil { - l = options.Size(x.Rewards) - 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().(*QueryValidatorOutstandingRewardsResponse) - 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.Rewards != nil { - encoded, err := options.Marshal(x.Rewards) - 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().(*QueryValidatorOutstandingRewardsResponse) - 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: QueryValidatorOutstandingRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: 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 Rewards", 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.Rewards == nil { - x.Rewards = &ValidatorOutstandingRewards{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards); 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_QueryValidatorCommissionRequest protoreflect.MessageDescriptor - fd_QueryValidatorCommissionRequest_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryValidatorCommissionRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorCommissionRequest") - fd_QueryValidatorCommissionRequest_validator_address = md_QueryValidatorCommissionRequest.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorCommissionRequest)(nil) - -type fastReflection_QueryValidatorCommissionRequest QueryValidatorCommissionRequest - -func (x *QueryValidatorCommissionRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorCommissionRequest)(x) -} - -func (x *QueryValidatorCommissionRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorCommissionRequest_messageType fastReflection_QueryValidatorCommissionRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorCommissionRequest_messageType{} - -type fastReflection_QueryValidatorCommissionRequest_messageType struct{} - -func (x fastReflection_QueryValidatorCommissionRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorCommissionRequest)(nil) -} -func (x fastReflection_QueryValidatorCommissionRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorCommissionRequest) -} -func (x fastReflection_QueryValidatorCommissionRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorCommissionRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorCommissionRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorCommissionRequest -} - -// 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_QueryValidatorCommissionRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorCommissionRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorCommissionRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorCommissionRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorCommissionRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorCommissionRequest)(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_QueryValidatorCommissionRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryValidatorCommissionRequest_validator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryValidatorCommissionRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest 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_QueryValidatorCommissionRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest 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_QueryValidatorCommissionRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest 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_QueryValidatorCommissionRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest 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_QueryValidatorCommissionRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest 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_QueryValidatorCommissionRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionRequest 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_QueryValidatorCommissionRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryValidatorCommissionRequest", 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_QueryValidatorCommissionRequest) 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_QueryValidatorCommissionRequest) 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_QueryValidatorCommissionRequest) 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_QueryValidatorCommissionRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorCommissionRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.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().(*QueryValidatorCommissionRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 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().(*QueryValidatorCommissionRequest) - 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: QueryValidatorCommissionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorCommissionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_QueryValidatorCommissionResponse protoreflect.MessageDescriptor - fd_QueryValidatorCommissionResponse_commission protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryValidatorCommissionResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorCommissionResponse") - fd_QueryValidatorCommissionResponse_commission = md_QueryValidatorCommissionResponse.Fields().ByName("commission") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorCommissionResponse)(nil) - -type fastReflection_QueryValidatorCommissionResponse QueryValidatorCommissionResponse - -func (x *QueryValidatorCommissionResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorCommissionResponse)(x) -} - -func (x *QueryValidatorCommissionResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_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_QueryValidatorCommissionResponse_messageType fastReflection_QueryValidatorCommissionResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorCommissionResponse_messageType{} - -type fastReflection_QueryValidatorCommissionResponse_messageType struct{} - -func (x fastReflection_QueryValidatorCommissionResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorCommissionResponse)(nil) -} -func (x fastReflection_QueryValidatorCommissionResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorCommissionResponse) -} -func (x fastReflection_QueryValidatorCommissionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorCommissionResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorCommissionResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorCommissionResponse -} - -// 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_QueryValidatorCommissionResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorCommissionResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorCommissionResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorCommissionResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorCommissionResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorCommissionResponse)(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_QueryValidatorCommissionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Commission != nil { - value := protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) - if !f(fd_QueryValidatorCommissionResponse_commission, 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_QueryValidatorCommissionResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission": - return x.Commission != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionResponse 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_QueryValidatorCommissionResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission": - x.Commission = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionResponse 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_QueryValidatorCommissionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission": - value := x.Commission - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionResponse 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_QueryValidatorCommissionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission": - x.Commission = value.Message().Interface().(*ValidatorAccumulatedCommission) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionResponse 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_QueryValidatorCommissionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission": - if x.Commission == nil { - x.Commission = new(ValidatorAccumulatedCommission) - } - return protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionResponse 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_QueryValidatorCommissionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission": - m := new(ValidatorAccumulatedCommission) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorCommissionResponse 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_QueryValidatorCommissionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryValidatorCommissionResponse", 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_QueryValidatorCommissionResponse) 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_QueryValidatorCommissionResponse) 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_QueryValidatorCommissionResponse) 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_QueryValidatorCommissionResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorCommissionResponse) - 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.Commission != nil { - l = options.Size(x.Commission) - 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().(*QueryValidatorCommissionResponse) - 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.Commission != nil { - encoded, err := options.Marshal(x.Commission) - 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().(*QueryValidatorCommissionResponse) - 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: QueryValidatorCommissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorCommissionResponse: 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 Commission", 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.Commission == nil { - x.Commission = &ValidatorAccumulatedCommission{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission); 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_QueryValidatorSlashesRequest protoreflect.MessageDescriptor - fd_QueryValidatorSlashesRequest_validator_address protoreflect.FieldDescriptor - fd_QueryValidatorSlashesRequest_starting_height protoreflect.FieldDescriptor - fd_QueryValidatorSlashesRequest_ending_height protoreflect.FieldDescriptor - fd_QueryValidatorSlashesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryValidatorSlashesRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorSlashesRequest") - fd_QueryValidatorSlashesRequest_validator_address = md_QueryValidatorSlashesRequest.Fields().ByName("validator_address") - fd_QueryValidatorSlashesRequest_starting_height = md_QueryValidatorSlashesRequest.Fields().ByName("starting_height") - fd_QueryValidatorSlashesRequest_ending_height = md_QueryValidatorSlashesRequest.Fields().ByName("ending_height") - fd_QueryValidatorSlashesRequest_pagination = md_QueryValidatorSlashesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorSlashesRequest)(nil) - -type fastReflection_QueryValidatorSlashesRequest QueryValidatorSlashesRequest - -func (x *QueryValidatorSlashesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorSlashesRequest)(x) -} - -func (x *QueryValidatorSlashesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_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_QueryValidatorSlashesRequest_messageType fastReflection_QueryValidatorSlashesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorSlashesRequest_messageType{} - -type fastReflection_QueryValidatorSlashesRequest_messageType struct{} - -func (x fastReflection_QueryValidatorSlashesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorSlashesRequest)(nil) -} -func (x fastReflection_QueryValidatorSlashesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorSlashesRequest) -} -func (x fastReflection_QueryValidatorSlashesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorSlashesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorSlashesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorSlashesRequest -} - -// 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_QueryValidatorSlashesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorSlashesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorSlashesRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorSlashesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorSlashesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorSlashesRequest)(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_QueryValidatorSlashesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryValidatorSlashesRequest_validator_address, value) { - return - } - } - if x.StartingHeight != uint64(0) { - value := protoreflect.ValueOfUint64(x.StartingHeight) - if !f(fd_QueryValidatorSlashesRequest_starting_height, value) { - return - } - } - if x.EndingHeight != uint64(0) { - value := protoreflect.ValueOfUint64(x.EndingHeight) - if !f(fd_QueryValidatorSlashesRequest_ending_height, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorSlashesRequest_pagination, 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_QueryValidatorSlashesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": - return x.ValidatorAddress != "" - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": - return x.StartingHeight != uint64(0) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": - return x.EndingHeight != uint64(0) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest 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_QueryValidatorSlashesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": - x.ValidatorAddress = "" - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": - x.StartingHeight = uint64(0) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": - x.EndingHeight = uint64(0) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest 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_QueryValidatorSlashesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": - value := x.StartingHeight - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": - value := x.EndingHeight - return protoreflect.ValueOfUint64(value) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest 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_QueryValidatorSlashesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": - x.StartingHeight = value.Uint() - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": - x.EndingHeight = value.Uint() - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest 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_QueryValidatorSlashesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest is not mutable")) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": - panic(fmt.Errorf("field starting_height of message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest is not mutable")) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": - panic(fmt.Errorf("field ending_height of message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest 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_QueryValidatorSlashesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesRequest 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_QueryValidatorSlashesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryValidatorSlashesRequest", 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_QueryValidatorSlashesRequest) 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_QueryValidatorSlashesRequest) 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_QueryValidatorSlashesRequest) 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_QueryValidatorSlashesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorSlashesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartingHeight != 0 { - n += 1 + runtime.Sov(uint64(x.StartingHeight)) - } - if x.EndingHeight != 0 { - n += 1 + runtime.Sov(uint64(x.EndingHeight)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorSlashesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.EndingHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EndingHeight)) - i-- - dAtA[i] = 0x18 - } - if x.StartingHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartingHeight)) - i-- - dAtA[i] = 0x10 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorSlashesRequest) - 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: QueryValidatorSlashesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorSlashesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartingHeight", wireType) - } - x.StartingHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartingHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndingHeight", wireType) - } - x.EndingHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EndingHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryValidatorSlashesResponse_1_list)(nil) - -type _QueryValidatorSlashesResponse_1_list struct { - list *[]*ValidatorSlashEvent -} - -func (x *_QueryValidatorSlashesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryValidatorSlashesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryValidatorSlashesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) - (*x.list)[i] = concreteValue -} - -func (x *_QueryValidatorSlashesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryValidatorSlashesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(ValidatorSlashEvent) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorSlashesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryValidatorSlashesResponse_1_list) NewElement() protoreflect.Value { - v := new(ValidatorSlashEvent) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorSlashesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryValidatorSlashesResponse protoreflect.MessageDescriptor - fd_QueryValidatorSlashesResponse_slashes protoreflect.FieldDescriptor - fd_QueryValidatorSlashesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryValidatorSlashesResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorSlashesResponse") - fd_QueryValidatorSlashesResponse_slashes = md_QueryValidatorSlashesResponse.Fields().ByName("slashes") - fd_QueryValidatorSlashesResponse_pagination = md_QueryValidatorSlashesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorSlashesResponse)(nil) - -type fastReflection_QueryValidatorSlashesResponse QueryValidatorSlashesResponse - -func (x *QueryValidatorSlashesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorSlashesResponse)(x) -} - -func (x *QueryValidatorSlashesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorSlashesResponse_messageType fastReflection_QueryValidatorSlashesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorSlashesResponse_messageType{} - -type fastReflection_QueryValidatorSlashesResponse_messageType struct{} - -func (x fastReflection_QueryValidatorSlashesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorSlashesResponse)(nil) -} -func (x fastReflection_QueryValidatorSlashesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorSlashesResponse) -} -func (x fastReflection_QueryValidatorSlashesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorSlashesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorSlashesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorSlashesResponse -} - -// 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_QueryValidatorSlashesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorSlashesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorSlashesResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorSlashesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorSlashesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorSlashesResponse)(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_QueryValidatorSlashesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Slashes) != 0 { - value := protoreflect.ValueOfList(&_QueryValidatorSlashesResponse_1_list{list: &x.Slashes}) - if !f(fd_QueryValidatorSlashesResponse_slashes, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorSlashesResponse_pagination, 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_QueryValidatorSlashesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": - return len(x.Slashes) != 0 - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesResponse 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_QueryValidatorSlashesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": - x.Slashes = nil - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesResponse 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_QueryValidatorSlashesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": - if len(x.Slashes) == 0 { - return protoreflect.ValueOfList(&_QueryValidatorSlashesResponse_1_list{}) - } - listValue := &_QueryValidatorSlashesResponse_1_list{list: &x.Slashes} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesResponse 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_QueryValidatorSlashesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": - lv := value.List() - clv := lv.(*_QueryValidatorSlashesResponse_1_list) - x.Slashes = *clv.list - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesResponse 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_QueryValidatorSlashesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": - if x.Slashes == nil { - x.Slashes = []*ValidatorSlashEvent{} - } - value := &_QueryValidatorSlashesResponse_1_list{list: &x.Slashes} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesResponse 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_QueryValidatorSlashesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": - list := []*ValidatorSlashEvent{} - return protoreflect.ValueOfList(&_QueryValidatorSlashesResponse_1_list{list: &list}) - case "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryValidatorSlashesResponse 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_QueryValidatorSlashesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryValidatorSlashesResponse", 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_QueryValidatorSlashesResponse) 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_QueryValidatorSlashesResponse) 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_QueryValidatorSlashesResponse) 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_QueryValidatorSlashesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorSlashesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Slashes) > 0 { - for _, e := range x.Slashes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorSlashesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Slashes) > 0 { - for iNdEx := len(x.Slashes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Slashes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorSlashesResponse) - 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: QueryValidatorSlashesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorSlashesResponse: 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 Slashes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Slashes = append(x.Slashes, &ValidatorSlashEvent{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Slashes[len(x.Slashes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryDelegationRewardsRequest protoreflect.MessageDescriptor - fd_QueryDelegationRewardsRequest_delegator_address protoreflect.FieldDescriptor - fd_QueryDelegationRewardsRequest_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegationRewardsRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationRewardsRequest") - fd_QueryDelegationRewardsRequest_delegator_address = md_QueryDelegationRewardsRequest.Fields().ByName("delegator_address") - fd_QueryDelegationRewardsRequest_validator_address = md_QueryDelegationRewardsRequest.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegationRewardsRequest)(nil) - -type fastReflection_QueryDelegationRewardsRequest QueryDelegationRewardsRequest - -func (x *QueryDelegationRewardsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegationRewardsRequest)(x) -} - -func (x *QueryDelegationRewardsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegationRewardsRequest_messageType fastReflection_QueryDelegationRewardsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegationRewardsRequest_messageType{} - -type fastReflection_QueryDelegationRewardsRequest_messageType struct{} - -func (x fastReflection_QueryDelegationRewardsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegationRewardsRequest)(nil) -} -func (x fastReflection_QueryDelegationRewardsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegationRewardsRequest) -} -func (x fastReflection_QueryDelegationRewardsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationRewardsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegationRewardsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationRewardsRequest -} - -// 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_QueryDelegationRewardsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegationRewardsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegationRewardsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegationRewardsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegationRewardsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegationRewardsRequest)(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_QueryDelegationRewardsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_QueryDelegationRewardsRequest_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryDelegationRewardsRequest_validator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegationRewardsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest 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_QueryDelegationRewardsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": - x.DelegatorAddress = "" - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest 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_QueryDelegationRewardsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest 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_QueryDelegationRewardsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest 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_QueryDelegationRewardsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest is not mutable")) - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest 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_QueryDelegationRewardsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsRequest 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_QueryDelegationRewardsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegationRewardsRequest", 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_QueryDelegationRewardsRequest) 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_QueryDelegationRewardsRequest) 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_QueryDelegationRewardsRequest) 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_QueryDelegationRewardsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegationRewardsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationRewardsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*QueryDelegationRewardsRequest) - 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: QueryDelegationRewardsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRewardsRequest: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDelegationRewardsResponse_1_list)(nil) - -type _QueryDelegationRewardsResponse_1_list struct { - list *[]*v1beta11.DecCoin -} - -func (x *_QueryDelegationRewardsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegationRewardsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDelegationRewardsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegationRewardsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegationRewardsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta11.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegationRewardsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegationRewardsResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta11.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegationRewardsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDelegationRewardsResponse protoreflect.MessageDescriptor - fd_QueryDelegationRewardsResponse_rewards protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegationRewardsResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationRewardsResponse") - fd_QueryDelegationRewardsResponse_rewards = md_QueryDelegationRewardsResponse.Fields().ByName("rewards") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegationRewardsResponse)(nil) - -type fastReflection_QueryDelegationRewardsResponse QueryDelegationRewardsResponse - -func (x *QueryDelegationRewardsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegationRewardsResponse)(x) -} - -func (x *QueryDelegationRewardsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegationRewardsResponse_messageType fastReflection_QueryDelegationRewardsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegationRewardsResponse_messageType{} - -type fastReflection_QueryDelegationRewardsResponse_messageType struct{} - -func (x fastReflection_QueryDelegationRewardsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegationRewardsResponse)(nil) -} -func (x fastReflection_QueryDelegationRewardsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegationRewardsResponse) -} -func (x fastReflection_QueryDelegationRewardsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationRewardsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegationRewardsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationRewardsResponse -} - -// 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_QueryDelegationRewardsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegationRewardsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegationRewardsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegationRewardsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegationRewardsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegationRewardsResponse)(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_QueryDelegationRewardsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Rewards) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegationRewardsResponse_1_list{list: &x.Rewards}) - if !f(fd_QueryDelegationRewardsResponse_rewards, 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_QueryDelegationRewardsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": - return len(x.Rewards) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsResponse 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_QueryDelegationRewardsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": - x.Rewards = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsResponse 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_QueryDelegationRewardsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": - if len(x.Rewards) == 0 { - return protoreflect.ValueOfList(&_QueryDelegationRewardsResponse_1_list{}) - } - listValue := &_QueryDelegationRewardsResponse_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsResponse 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_QueryDelegationRewardsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": - lv := value.List() - clv := lv.(*_QueryDelegationRewardsResponse_1_list) - x.Rewards = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsResponse 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_QueryDelegationRewardsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": - if x.Rewards == nil { - x.Rewards = []*v1beta11.DecCoin{} - } - value := &_QueryDelegationRewardsResponse_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsResponse 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_QueryDelegationRewardsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": - list := []*v1beta11.DecCoin{} - return protoreflect.ValueOfList(&_QueryDelegationRewardsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationRewardsResponse 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_QueryDelegationRewardsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegationRewardsResponse", 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_QueryDelegationRewardsResponse) 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_QueryDelegationRewardsResponse) 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_QueryDelegationRewardsResponse) 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_QueryDelegationRewardsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegationRewardsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Rewards) > 0 { - for _, e := range x.Rewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationRewardsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Rewards) > 0 { - for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Rewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationRewardsResponse) - 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: QueryDelegationRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRewardsResponse: 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 Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Rewards = append(x.Rewards, &v1beta11.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDelegationTotalRewardsRequest protoreflect.MessageDescriptor - fd_QueryDelegationTotalRewardsRequest_delegator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegationTotalRewardsRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationTotalRewardsRequest") - fd_QueryDelegationTotalRewardsRequest_delegator_address = md_QueryDelegationTotalRewardsRequest.Fields().ByName("delegator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegationTotalRewardsRequest)(nil) - -type fastReflection_QueryDelegationTotalRewardsRequest QueryDelegationTotalRewardsRequest - -func (x *QueryDelegationTotalRewardsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegationTotalRewardsRequest)(x) -} - -func (x *QueryDelegationTotalRewardsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegationTotalRewardsRequest_messageType fastReflection_QueryDelegationTotalRewardsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegationTotalRewardsRequest_messageType{} - -type fastReflection_QueryDelegationTotalRewardsRequest_messageType struct{} - -func (x fastReflection_QueryDelegationTotalRewardsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegationTotalRewardsRequest)(nil) -} -func (x fastReflection_QueryDelegationTotalRewardsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegationTotalRewardsRequest) -} -func (x fastReflection_QueryDelegationTotalRewardsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationTotalRewardsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegationTotalRewardsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationTotalRewardsRequest -} - -// 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_QueryDelegationTotalRewardsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegationTotalRewardsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegationTotalRewardsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegationTotalRewardsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegationTotalRewardsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegationTotalRewardsRequest)(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_QueryDelegationTotalRewardsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_QueryDelegationTotalRewardsRequest_delegator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegationTotalRewardsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": - return x.DelegatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest 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_QueryDelegationTotalRewardsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": - x.DelegatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest 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_QueryDelegationTotalRewardsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest 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_QueryDelegationTotalRewardsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": - x.DelegatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest 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_QueryDelegationTotalRewardsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest 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_QueryDelegationTotalRewardsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest 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_QueryDelegationTotalRewardsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest", 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_QueryDelegationTotalRewardsRequest) 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_QueryDelegationTotalRewardsRequest) 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_QueryDelegationTotalRewardsRequest) 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_QueryDelegationTotalRewardsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegationTotalRewardsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationTotalRewardsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*QueryDelegationTotalRewardsRequest) - 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: QueryDelegationTotalRewardsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationTotalRewardsRequest: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDelegationTotalRewardsResponse_1_list)(nil) - -type _QueryDelegationTotalRewardsResponse_1_list struct { - list *[]*DelegationDelegatorReward -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegationDelegatorReward) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegationDelegatorReward) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DelegationDelegatorReward) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) NewElement() protoreflect.Value { - v := new(DelegationDelegatorReward) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegationTotalRewardsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryDelegationTotalRewardsResponse_2_list)(nil) - -type _QueryDelegationTotalRewardsResponse_2_list struct { - list *[]*v1beta11.DecCoin -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta11.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) NewElement() protoreflect.Value { - v := new(v1beta11.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegationTotalRewardsResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDelegationTotalRewardsResponse protoreflect.MessageDescriptor - fd_QueryDelegationTotalRewardsResponse_rewards protoreflect.FieldDescriptor - fd_QueryDelegationTotalRewardsResponse_total protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegationTotalRewardsResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationTotalRewardsResponse") - fd_QueryDelegationTotalRewardsResponse_rewards = md_QueryDelegationTotalRewardsResponse.Fields().ByName("rewards") - fd_QueryDelegationTotalRewardsResponse_total = md_QueryDelegationTotalRewardsResponse.Fields().ByName("total") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegationTotalRewardsResponse)(nil) - -type fastReflection_QueryDelegationTotalRewardsResponse QueryDelegationTotalRewardsResponse - -func (x *QueryDelegationTotalRewardsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegationTotalRewardsResponse)(x) -} - -func (x *QueryDelegationTotalRewardsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegationTotalRewardsResponse_messageType fastReflection_QueryDelegationTotalRewardsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegationTotalRewardsResponse_messageType{} - -type fastReflection_QueryDelegationTotalRewardsResponse_messageType struct{} - -func (x fastReflection_QueryDelegationTotalRewardsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegationTotalRewardsResponse)(nil) -} -func (x fastReflection_QueryDelegationTotalRewardsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegationTotalRewardsResponse) -} -func (x fastReflection_QueryDelegationTotalRewardsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationTotalRewardsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegationTotalRewardsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationTotalRewardsResponse -} - -// 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_QueryDelegationTotalRewardsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegationTotalRewardsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegationTotalRewardsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegationTotalRewardsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegationTotalRewardsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegationTotalRewardsResponse)(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_QueryDelegationTotalRewardsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Rewards) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_1_list{list: &x.Rewards}) - if !f(fd_QueryDelegationTotalRewardsResponse_rewards, value) { - return - } - } - if len(x.Total) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_2_list{list: &x.Total}) - if !f(fd_QueryDelegationTotalRewardsResponse_total, 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_QueryDelegationTotalRewardsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": - return len(x.Rewards) != 0 - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": - return len(x.Total) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse 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_QueryDelegationTotalRewardsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": - x.Rewards = nil - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": - x.Total = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse 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_QueryDelegationTotalRewardsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": - if len(x.Rewards) == 0 { - return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_1_list{}) - } - listValue := &_QueryDelegationTotalRewardsResponse_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": - if len(x.Total) == 0 { - return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_2_list{}) - } - listValue := &_QueryDelegationTotalRewardsResponse_2_list{list: &x.Total} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse 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_QueryDelegationTotalRewardsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": - lv := value.List() - clv := lv.(*_QueryDelegationTotalRewardsResponse_1_list) - x.Rewards = *clv.list - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": - lv := value.List() - clv := lv.(*_QueryDelegationTotalRewardsResponse_2_list) - x.Total = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse 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_QueryDelegationTotalRewardsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": - if x.Rewards == nil { - x.Rewards = []*DelegationDelegatorReward{} - } - value := &_QueryDelegationTotalRewardsResponse_1_list{list: &x.Rewards} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": - if x.Total == nil { - x.Total = []*v1beta11.DecCoin{} - } - value := &_QueryDelegationTotalRewardsResponse_2_list{list: &x.Total} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse 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_QueryDelegationTotalRewardsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": - list := []*DelegationDelegatorReward{} - return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_1_list{list: &list}) - case "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": - list := []*v1beta11.DecCoin{} - return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse 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_QueryDelegationTotalRewardsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse", 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_QueryDelegationTotalRewardsResponse) 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_QueryDelegationTotalRewardsResponse) 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_QueryDelegationTotalRewardsResponse) 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_QueryDelegationTotalRewardsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegationTotalRewardsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Rewards) > 0 { - for _, e := range x.Rewards { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Total) > 0 { - for _, e := range x.Total { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationTotalRewardsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Total) > 0 { - for iNdEx := len(x.Total) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Total[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Rewards) > 0 { - for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Rewards[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationTotalRewardsResponse) - 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: QueryDelegationTotalRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: 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 Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Rewards = append(x.Rewards, &DelegationDelegatorReward{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Total = append(x.Total, &v1beta11.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Total[len(x.Total)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDelegatorValidatorsRequest protoreflect.MessageDescriptor - fd_QueryDelegatorValidatorsRequest_delegator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegatorValidatorsRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorsRequest") - fd_QueryDelegatorValidatorsRequest_delegator_address = md_QueryDelegatorValidatorsRequest.Fields().ByName("delegator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorsRequest)(nil) - -type fastReflection_QueryDelegatorValidatorsRequest QueryDelegatorValidatorsRequest - -func (x *QueryDelegatorValidatorsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsRequest)(x) -} - -func (x *QueryDelegatorValidatorsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorValidatorsRequest_messageType fastReflection_QueryDelegatorValidatorsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorsRequest_messageType{} - -type fastReflection_QueryDelegatorValidatorsRequest_messageType struct{} - -func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsRequest)(nil) -} -func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsRequest) -} -func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsRequest -} - -// 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_QueryDelegatorValidatorsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorValidatorsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorValidatorsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorValidatorsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorValidatorsRequest)(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_QueryDelegatorValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_QueryDelegatorValidatorsRequest_delegator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegatorValidatorsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": - return x.DelegatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": - x.DelegatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": - x.DelegatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest", 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_QueryDelegatorValidatorsRequest) 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_QueryDelegatorValidatorsRequest) 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_QueryDelegatorValidatorsRequest) 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_QueryDelegatorValidatorsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorValidatorsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorValidatorsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*QueryDelegatorValidatorsRequest) - 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: QueryDelegatorValidatorsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsRequest: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDelegatorValidatorsResponse_1_list)(nil) - -type _QueryDelegatorValidatorsResponse_1_list struct { - list *[]string -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryDelegatorValidatorsResponse at list field Validators as it is not of Message kind")) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDelegatorValidatorsResponse protoreflect.MessageDescriptor - fd_QueryDelegatorValidatorsResponse_validators protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegatorValidatorsResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorsResponse") - fd_QueryDelegatorValidatorsResponse_validators = md_QueryDelegatorValidatorsResponse.Fields().ByName("validators") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorsResponse)(nil) - -type fastReflection_QueryDelegatorValidatorsResponse QueryDelegatorValidatorsResponse - -func (x *QueryDelegatorValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsResponse)(x) -} - -func (x *QueryDelegatorValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorValidatorsResponse_messageType fastReflection_QueryDelegatorValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorsResponse_messageType{} - -type fastReflection_QueryDelegatorValidatorsResponse_messageType struct{} - -func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsResponse)(nil) -} -func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsResponse) -} -func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsResponse -} - -// 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_QueryDelegatorValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorValidatorsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorValidatorsResponse)(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_QueryDelegatorValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators}) - if !f(fd_QueryDelegatorValidatorsResponse_validators, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegatorValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": - return len(x.Validators) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": - x.Validators = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{}) - } - listValue := &_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": - lv := value.List() - clv := lv.(*_QueryDelegatorValidatorsResponse_1_list) - x.Validators = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": - if x.Validators == nil { - x.Validators = []string{} - } - value := &_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": - list := []string{} - return protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse", 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_QueryDelegatorValidatorsResponse) 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_QueryDelegatorValidatorsResponse) 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_QueryDelegatorValidatorsResponse) 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_QueryDelegatorValidatorsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Validators) > 0 { - for _, s := range x.Validators { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Validators[iNdEx]) - copy(dAtA[i:], x.Validators[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validators[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) - 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: QueryDelegatorValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var 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.Validators = append(x.Validators, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDelegatorWithdrawAddressRequest protoreflect.MessageDescriptor - fd_QueryDelegatorWithdrawAddressRequest_delegator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegatorWithdrawAddressRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorWithdrawAddressRequest") - fd_QueryDelegatorWithdrawAddressRequest_delegator_address = md_QueryDelegatorWithdrawAddressRequest.Fields().ByName("delegator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorWithdrawAddressRequest)(nil) - -type fastReflection_QueryDelegatorWithdrawAddressRequest QueryDelegatorWithdrawAddressRequest - -func (x *QueryDelegatorWithdrawAddressRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorWithdrawAddressRequest)(x) -} - -func (x *QueryDelegatorWithdrawAddressRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorWithdrawAddressRequest_messageType fastReflection_QueryDelegatorWithdrawAddressRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorWithdrawAddressRequest_messageType{} - -type fastReflection_QueryDelegatorWithdrawAddressRequest_messageType struct{} - -func (x fastReflection_QueryDelegatorWithdrawAddressRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorWithdrawAddressRequest)(nil) -} -func (x fastReflection_QueryDelegatorWithdrawAddressRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorWithdrawAddressRequest) -} -func (x fastReflection_QueryDelegatorWithdrawAddressRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorWithdrawAddressRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorWithdrawAddressRequest -} - -// 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_QueryDelegatorWithdrawAddressRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorWithdrawAddressRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorWithdrawAddressRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorWithdrawAddressRequest)(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_QueryDelegatorWithdrawAddressRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_QueryDelegatorWithdrawAddressRequest_delegator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": - return x.DelegatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest 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_QueryDelegatorWithdrawAddressRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": - x.DelegatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest 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_QueryDelegatorWithdrawAddressRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest 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_QueryDelegatorWithdrawAddressRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": - x.DelegatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest 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_QueryDelegatorWithdrawAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest 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_QueryDelegatorWithdrawAddressRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest 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_QueryDelegatorWithdrawAddressRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", 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_QueryDelegatorWithdrawAddressRequest) 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_QueryDelegatorWithdrawAddressRequest) 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_QueryDelegatorWithdrawAddressRequest) 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_QueryDelegatorWithdrawAddressRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorWithdrawAddressRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorWithdrawAddressRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*QueryDelegatorWithdrawAddressRequest) - 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: QueryDelegatorWithdrawAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorWithdrawAddressRequest: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDelegatorWithdrawAddressResponse protoreflect.MessageDescriptor - fd_QueryDelegatorWithdrawAddressResponse_withdraw_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryDelegatorWithdrawAddressResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorWithdrawAddressResponse") - fd_QueryDelegatorWithdrawAddressResponse_withdraw_address = md_QueryDelegatorWithdrawAddressResponse.Fields().ByName("withdraw_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorWithdrawAddressResponse)(nil) - -type fastReflection_QueryDelegatorWithdrawAddressResponse QueryDelegatorWithdrawAddressResponse - -func (x *QueryDelegatorWithdrawAddressResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorWithdrawAddressResponse)(x) -} - -func (x *QueryDelegatorWithdrawAddressResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorWithdrawAddressResponse_messageType fastReflection_QueryDelegatorWithdrawAddressResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorWithdrawAddressResponse_messageType{} - -type fastReflection_QueryDelegatorWithdrawAddressResponse_messageType struct{} - -func (x fastReflection_QueryDelegatorWithdrawAddressResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorWithdrawAddressResponse)(nil) -} -func (x fastReflection_QueryDelegatorWithdrawAddressResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorWithdrawAddressResponse) -} -func (x fastReflection_QueryDelegatorWithdrawAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorWithdrawAddressResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorWithdrawAddressResponse -} - -// 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_QueryDelegatorWithdrawAddressResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorWithdrawAddressResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorWithdrawAddressResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorWithdrawAddressResponse)(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_QueryDelegatorWithdrawAddressResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.WithdrawAddress != "" { - value := protoreflect.ValueOfString(x.WithdrawAddress) - if !f(fd_QueryDelegatorWithdrawAddressResponse_withdraw_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": - return x.WithdrawAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse 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_QueryDelegatorWithdrawAddressResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": - x.WithdrawAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse 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_QueryDelegatorWithdrawAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": - value := x.WithdrawAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse 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_QueryDelegatorWithdrawAddressResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": - x.WithdrawAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse 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_QueryDelegatorWithdrawAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": - panic(fmt.Errorf("field withdraw_address of message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse 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_QueryDelegatorWithdrawAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse 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_QueryDelegatorWithdrawAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", 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_QueryDelegatorWithdrawAddressResponse) 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_QueryDelegatorWithdrawAddressResponse) 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_QueryDelegatorWithdrawAddressResponse) 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_QueryDelegatorWithdrawAddressResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorWithdrawAddressResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.WithdrawAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorWithdrawAddressResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.WithdrawAddress) > 0 { - i -= len(x.WithdrawAddress) - copy(dAtA[i:], x.WithdrawAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawAddress))) - 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().(*QueryDelegatorWithdrawAddressResponse) - 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: QueryDelegatorWithdrawAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: 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 WithdrawAddress", 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.WithdrawAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryCommunityPoolRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryCommunityPoolRequest = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryCommunityPoolRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryCommunityPoolRequest)(nil) - -type fastReflection_QueryCommunityPoolRequest QueryCommunityPoolRequest - -func (x *QueryCommunityPoolRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCommunityPoolRequest)(x) -} - -func (x *QueryCommunityPoolRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCommunityPoolRequest_messageType fastReflection_QueryCommunityPoolRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryCommunityPoolRequest_messageType{} - -type fastReflection_QueryCommunityPoolRequest_messageType struct{} - -func (x fastReflection_QueryCommunityPoolRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCommunityPoolRequest)(nil) -} -func (x fastReflection_QueryCommunityPoolRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCommunityPoolRequest) -} -func (x fastReflection_QueryCommunityPoolRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCommunityPoolRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCommunityPoolRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCommunityPoolRequest -} - -// 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_QueryCommunityPoolRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryCommunityPoolRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCommunityPoolRequest) New() protoreflect.Message { - return new(fastReflection_QueryCommunityPoolRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCommunityPoolRequest) Interface() protoreflect.ProtoMessage { - return (*QueryCommunityPoolRequest)(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_QueryCommunityPoolRequest) 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_QueryCommunityPoolRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolRequest 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_QueryCommunityPoolRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolRequest 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_QueryCommunityPoolRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolRequest 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_QueryCommunityPoolRequest) 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.distribution.v1beta1.QueryCommunityPoolRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolRequest 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_QueryCommunityPoolRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolRequest 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_QueryCommunityPoolRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolRequest")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolRequest 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_QueryCommunityPoolRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryCommunityPoolRequest", 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_QueryCommunityPoolRequest) 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_QueryCommunityPoolRequest) 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_QueryCommunityPoolRequest) 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_QueryCommunityPoolRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCommunityPoolRequest) - 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().(*QueryCommunityPoolRequest) - 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().(*QueryCommunityPoolRequest) - 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: QueryCommunityPoolRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCommunityPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryCommunityPoolResponse_1_list)(nil) - -type _QueryCommunityPoolResponse_1_list struct { - list *[]*v1beta11.DecCoin -} - -func (x *_QueryCommunityPoolResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryCommunityPoolResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryCommunityPoolResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.DecCoin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryCommunityPoolResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.DecCoin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryCommunityPoolResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta11.DecCoin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryCommunityPoolResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryCommunityPoolResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta11.DecCoin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryCommunityPoolResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryCommunityPoolResponse protoreflect.MessageDescriptor - fd_QueryCommunityPoolResponse_pool protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_query_proto_init() - md_QueryCommunityPoolResponse = File_cosmos_distribution_v1beta1_query_proto.Messages().ByName("QueryCommunityPoolResponse") - fd_QueryCommunityPoolResponse_pool = md_QueryCommunityPoolResponse.Fields().ByName("pool") -} - -var _ protoreflect.Message = (*fastReflection_QueryCommunityPoolResponse)(nil) - -type fastReflection_QueryCommunityPoolResponse QueryCommunityPoolResponse - -func (x *QueryCommunityPoolResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCommunityPoolResponse)(x) -} - -func (x *QueryCommunityPoolResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCommunityPoolResponse_messageType fastReflection_QueryCommunityPoolResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryCommunityPoolResponse_messageType{} - -type fastReflection_QueryCommunityPoolResponse_messageType struct{} - -func (x fastReflection_QueryCommunityPoolResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCommunityPoolResponse)(nil) -} -func (x fastReflection_QueryCommunityPoolResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCommunityPoolResponse) -} -func (x fastReflection_QueryCommunityPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCommunityPoolResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCommunityPoolResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCommunityPoolResponse -} - -// 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_QueryCommunityPoolResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryCommunityPoolResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCommunityPoolResponse) New() protoreflect.Message { - return new(fastReflection_QueryCommunityPoolResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCommunityPoolResponse) Interface() protoreflect.ProtoMessage { - return (*QueryCommunityPoolResponse)(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_QueryCommunityPoolResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Pool) != 0 { - value := protoreflect.ValueOfList(&_QueryCommunityPoolResponse_1_list{list: &x.Pool}) - if !f(fd_QueryCommunityPoolResponse_pool, 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_QueryCommunityPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool": - return len(x.Pool) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolResponse 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_QueryCommunityPoolResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool": - x.Pool = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolResponse 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_QueryCommunityPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool": - if len(x.Pool) == 0 { - return protoreflect.ValueOfList(&_QueryCommunityPoolResponse_1_list{}) - } - listValue := &_QueryCommunityPoolResponse_1_list{list: &x.Pool} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolResponse 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_QueryCommunityPoolResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool": - lv := value.List() - clv := lv.(*_QueryCommunityPoolResponse_1_list) - x.Pool = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolResponse 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_QueryCommunityPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool": - if x.Pool == nil { - x.Pool = []*v1beta11.DecCoin{} - } - value := &_QueryCommunityPoolResponse_1_list{list: &x.Pool} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolResponse 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_QueryCommunityPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool": - list := []*v1beta11.DecCoin{} - return protoreflect.ValueOfList(&_QueryCommunityPoolResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.QueryCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.QueryCommunityPoolResponse 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_QueryCommunityPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.QueryCommunityPoolResponse", 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_QueryCommunityPoolResponse) 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_QueryCommunityPoolResponse) 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_QueryCommunityPoolResponse) 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_QueryCommunityPoolResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCommunityPoolResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Pool) > 0 { - for _, e := range x.Pool { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCommunityPoolResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Pool) > 0 { - for iNdEx := len(x.Pool) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Pool[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCommunityPoolResponse) - 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: QueryCommunityPoolResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCommunityPoolResponse: 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 Pool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Pool = append(x.Pool, &v1beta11.DecCoin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pool[len(x.Pool)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/distribution/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryValidatorOutstandingRewardsRequest is the request type for the -// Query/ValidatorOutstandingRewards RPC method. -type QueryValidatorOutstandingRewardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address defines the validator address to query for. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *QueryValidatorOutstandingRewardsRequest) Reset() { - *x = QueryValidatorOutstandingRewardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorOutstandingRewardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorOutstandingRewardsRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorOutstandingRewardsRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorOutstandingRewardsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryValidatorOutstandingRewardsRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -type QueryValidatorOutstandingRewardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rewards *ValidatorOutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (x *QueryValidatorOutstandingRewardsResponse) Reset() { - *x = QueryValidatorOutstandingRewardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorOutstandingRewardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorOutstandingRewardsResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryValidatorOutstandingRewardsResponse) GetRewards() *ValidatorOutstandingRewards { - if x != nil { - return x.Rewards - } - return nil -} - -// QueryValidatorCommissionRequest is the request type for the -// Query/ValidatorCommission RPC method -type QueryValidatorCommissionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address defines the validator address to query for. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *QueryValidatorCommissionRequest) Reset() { - *x = QueryValidatorCommissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorCommissionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorCommissionRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorCommissionRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorCommissionRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryValidatorCommissionRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -type QueryValidatorCommissionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // commission defines the commision the validator received. - Commission *ValidatorAccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission,omitempty"` -} - -func (x *QueryValidatorCommissionResponse) Reset() { - *x = QueryValidatorCommissionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorCommissionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorCommissionResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorCommissionResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryValidatorCommissionResponse) GetCommission() *ValidatorAccumulatedCommission { - if x != nil { - return x.Commission - } - return nil -} - -// QueryValidatorSlashesRequest is the request type for the -// Query/ValidatorSlashes RPC method -type QueryValidatorSlashesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address defines the validator address to query for. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // starting_height defines the optional starting height to query the slashes. - StartingHeight uint64 `protobuf:"varint,2,opt,name=starting_height,json=startingHeight,proto3" json:"starting_height,omitempty"` - // starting_height defines the optional ending height to query the slashes. - EndingHeight uint64 `protobuf:"varint,3,opt,name=ending_height,json=endingHeight,proto3" json:"ending_height,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorSlashesRequest) Reset() { - *x = QueryValidatorSlashesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorSlashesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorSlashesRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorSlashesRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorSlashesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryValidatorSlashesRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *QueryValidatorSlashesRequest) GetStartingHeight() uint64 { - if x != nil { - return x.StartingHeight - } - return 0 -} - -func (x *QueryValidatorSlashesRequest) GetEndingHeight() uint64 { - if x != nil { - return x.EndingHeight - } - return 0 -} - -func (x *QueryValidatorSlashesRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -type QueryValidatorSlashesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // slashes defines the slashes the validator received. - Slashes []*ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorSlashesResponse) Reset() { - *x = QueryValidatorSlashesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorSlashesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorSlashesResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorSlashesResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryValidatorSlashesResponse) GetSlashes() []*ValidatorSlashEvent { - if x != nil { - return x.Slashes - } - return nil -} - -func (x *QueryValidatorSlashesResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegationRewardsRequest is the request type for the -// Query/DelegationRewards RPC method. -type QueryDelegationRewardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address defines the delegator address to query for. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address defines the validator address to query for. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *QueryDelegationRewardsRequest) Reset() { - *x = QueryDelegationRewardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegationRewardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegationRewardsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegationRewardsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegationRewardsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryDelegationRewardsRequest) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *QueryDelegationRewardsRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -type QueryDelegationRewardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rewards defines the rewards accrued by a delegation. - Rewards []*v1beta11.DecCoin `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (x *QueryDelegationRewardsResponse) Reset() { - *x = QueryDelegationRewardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegationRewardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegationRewardsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegationRewardsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryDelegationRewardsResponse) GetRewards() []*v1beta11.DecCoin { - if x != nil { - return x.Rewards - } - return nil -} - -// QueryDelegationTotalRewardsRequest is the request type for the -// Query/DelegationTotalRewards RPC method. -type QueryDelegationTotalRewardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address defines the delegator address to query for. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` -} - -func (x *QueryDelegationTotalRewardsRequest) Reset() { - *x = QueryDelegationTotalRewardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegationTotalRewardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegationTotalRewardsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegationTotalRewardsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegationTotalRewardsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryDelegationTotalRewardsRequest) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -type QueryDelegationTotalRewardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rewards defines all the rewards accrued by a delegator. - Rewards []*DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` - // total defines the sum of all the rewards. - Total []*v1beta11.DecCoin `protobuf:"bytes,2,rep,name=total,proto3" json:"total,omitempty"` -} - -func (x *QueryDelegationTotalRewardsResponse) Reset() { - *x = QueryDelegationTotalRewardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegationTotalRewardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegationTotalRewardsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryDelegationTotalRewardsResponse) GetRewards() []*DelegationDelegatorReward { - if x != nil { - return x.Rewards - } - return nil -} - -func (x *QueryDelegationTotalRewardsResponse) GetTotal() []*v1beta11.DecCoin { - if x != nil { - return x.Total - } - return nil -} - -// QueryDelegatorValidatorsRequest is the request type for the -// Query/DelegatorValidators RPC method. -type QueryDelegatorValidatorsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address defines the delegator address to query for. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` -} - -func (x *QueryDelegatorValidatorsRequest) Reset() { - *x = QueryDelegatorValidatorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorValidatorsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorValidatorsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorValidatorsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorValidatorsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryDelegatorValidatorsRequest) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -type QueryDelegatorValidatorsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validators defines the validators a delegator is delegating for. - Validators []string `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (x *QueryDelegatorValidatorsResponse) Reset() { - *x = QueryDelegatorValidatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorValidatorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorValidatorsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryDelegatorValidatorsResponse) GetValidators() []string { - if x != nil { - return x.Validators - } - return nil -} - -// QueryDelegatorWithdrawAddressRequest is the request type for the -// Query/DelegatorWithdrawAddress RPC method. -type QueryDelegatorWithdrawAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address defines the delegator address to query for. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` -} - -func (x *QueryDelegatorWithdrawAddressRequest) Reset() { - *x = QueryDelegatorWithdrawAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorWithdrawAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorWithdrawAddressRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryDelegatorWithdrawAddressRequest) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -type QueryDelegatorWithdrawAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // withdraw_address defines the delegator address to query for. - WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` -} - -func (x *QueryDelegatorWithdrawAddressResponse) Reset() { - *x = QueryDelegatorWithdrawAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorWithdrawAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorWithdrawAddressResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryDelegatorWithdrawAddressResponse) GetWithdrawAddress() string { - if x != nil { - return x.WithdrawAddress - } - return "" -} - -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -// method. -type QueryCommunityPoolRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryCommunityPoolRequest) Reset() { - *x = QueryCommunityPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCommunityPoolRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCommunityPoolRequest) ProtoMessage() {} - -// Deprecated: Use QueryCommunityPoolRequest.ProtoReflect.Descriptor instead. -func (*QueryCommunityPoolRequest) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{16} -} - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -type QueryCommunityPoolResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pool defines community pool's coins. - Pool []*v1beta11.DecCoin `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"` -} - -func (x *QueryCommunityPoolResponse) Reset() { - *x = QueryCommunityPoolResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCommunityPoolResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCommunityPoolResponse) ProtoMessage() {} - -// Deprecated: Use QueryCommunityPoolResponse.ProtoReflect.Descriptor instead. -func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryCommunityPoolResponse) GetPool() []*v1beta11.DecCoin { - if x != nil { - return x.Pool - } - return nil -} - -var File_cosmos_distribution_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_distribution_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x70, 0x0a, 0x27, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x58, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x68, 0x0a, 0x1f, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x02, 0x0a, - 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, - 0x0d, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, - 0x98, 0xa0, 0x1f, 0x01, 0x22, 0xba, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x07, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 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, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x8d, 0x01, 0x0a, 0x1e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, - 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x22, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x00, 0x22, 0xe6, 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x07, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x12, 0x67, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x72, 0x0a, 0x1f, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, - 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, - 0x4c, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x77, 0x0a, - 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x76, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x43, 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1b, - 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x1a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x70, 0x6f, - 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, - 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x04, 0x70, 0x6f, 0x6f, - 0x6c, 0x32, 0xd8, 0x0f, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x98, 0x01, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x25, 0x12, 0x23, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x83, 0x02, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x44, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0xe2, 0x01, 0x0a, - 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0xd6, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x7d, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xed, 0x01, 0x0a, 0x11, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, - 0x12, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x59, 0x12, 0x57, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xe8, 0x01, 0x0a, 0x16, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x3f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, - 0x12, 0x43, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0xe2, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3c, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x48, 0x12, 0x46, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xf7, 0x01, 0x0a, 0x18, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, - 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0xb5, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, - 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x42, 0x8d, 0x02, 0x0a, - 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x44, 0x58, 0xaa, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x27, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_distribution_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_distribution_v1beta1_query_proto_rawDescData = file_cosmos_distribution_v1beta1_query_proto_rawDesc -) - -func file_cosmos_distribution_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_distribution_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_distribution_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_distribution_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_distribution_v1beta1_query_proto_rawDescData -} - -var file_cosmos_distribution_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_cosmos_distribution_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.distribution.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.distribution.v1beta1.QueryParamsResponse - (*QueryValidatorOutstandingRewardsRequest)(nil), // 2: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest - (*QueryValidatorOutstandingRewardsResponse)(nil), // 3: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse - (*QueryValidatorCommissionRequest)(nil), // 4: cosmos.distribution.v1beta1.QueryValidatorCommissionRequest - (*QueryValidatorCommissionResponse)(nil), // 5: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse - (*QueryValidatorSlashesRequest)(nil), // 6: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest - (*QueryValidatorSlashesResponse)(nil), // 7: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse - (*QueryDelegationRewardsRequest)(nil), // 8: cosmos.distribution.v1beta1.QueryDelegationRewardsRequest - (*QueryDelegationRewardsResponse)(nil), // 9: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse - (*QueryDelegationTotalRewardsRequest)(nil), // 10: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest - (*QueryDelegationTotalRewardsResponse)(nil), // 11: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse - (*QueryDelegatorValidatorsRequest)(nil), // 12: cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest - (*QueryDelegatorValidatorsResponse)(nil), // 13: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse - (*QueryDelegatorWithdrawAddressRequest)(nil), // 14: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest - (*QueryDelegatorWithdrawAddressResponse)(nil), // 15: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse - (*QueryCommunityPoolRequest)(nil), // 16: cosmos.distribution.v1beta1.QueryCommunityPoolRequest - (*QueryCommunityPoolResponse)(nil), // 17: cosmos.distribution.v1beta1.QueryCommunityPoolResponse - (*Params)(nil), // 18: cosmos.distribution.v1beta1.Params - (*ValidatorOutstandingRewards)(nil), // 19: cosmos.distribution.v1beta1.ValidatorOutstandingRewards - (*ValidatorAccumulatedCommission)(nil), // 20: cosmos.distribution.v1beta1.ValidatorAccumulatedCommission - (*v1beta1.PageRequest)(nil), // 21: cosmos.base.query.v1beta1.PageRequest - (*ValidatorSlashEvent)(nil), // 22: cosmos.distribution.v1beta1.ValidatorSlashEvent - (*v1beta1.PageResponse)(nil), // 23: cosmos.base.query.v1beta1.PageResponse - (*v1beta11.DecCoin)(nil), // 24: cosmos.base.v1beta1.DecCoin - (*DelegationDelegatorReward)(nil), // 25: cosmos.distribution.v1beta1.DelegationDelegatorReward -} -var file_cosmos_distribution_v1beta1_query_proto_depIdxs = []int32{ - 18, // 0: cosmos.distribution.v1beta1.QueryParamsResponse.params:type_name -> cosmos.distribution.v1beta1.Params - 19, // 1: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards:type_name -> cosmos.distribution.v1beta1.ValidatorOutstandingRewards - 20, // 2: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission:type_name -> cosmos.distribution.v1beta1.ValidatorAccumulatedCommission - 21, // 3: cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 22, // 4: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes:type_name -> cosmos.distribution.v1beta1.ValidatorSlashEvent - 23, // 5: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 24, // 6: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards:type_name -> cosmos.base.v1beta1.DecCoin - 25, // 7: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards:type_name -> cosmos.distribution.v1beta1.DelegationDelegatorReward - 24, // 8: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total:type_name -> cosmos.base.v1beta1.DecCoin - 24, // 9: cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool:type_name -> cosmos.base.v1beta1.DecCoin - 0, // 10: cosmos.distribution.v1beta1.Query.Params:input_type -> cosmos.distribution.v1beta1.QueryParamsRequest - 2, // 11: cosmos.distribution.v1beta1.Query.ValidatorOutstandingRewards:input_type -> cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest - 4, // 12: cosmos.distribution.v1beta1.Query.ValidatorCommission:input_type -> cosmos.distribution.v1beta1.QueryValidatorCommissionRequest - 6, // 13: cosmos.distribution.v1beta1.Query.ValidatorSlashes:input_type -> cosmos.distribution.v1beta1.QueryValidatorSlashesRequest - 8, // 14: cosmos.distribution.v1beta1.Query.DelegationRewards:input_type -> cosmos.distribution.v1beta1.QueryDelegationRewardsRequest - 10, // 15: cosmos.distribution.v1beta1.Query.DelegationTotalRewards:input_type -> cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest - 12, // 16: cosmos.distribution.v1beta1.Query.DelegatorValidators:input_type -> cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest - 14, // 17: cosmos.distribution.v1beta1.Query.DelegatorWithdrawAddress:input_type -> cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest - 16, // 18: cosmos.distribution.v1beta1.Query.CommunityPool:input_type -> cosmos.distribution.v1beta1.QueryCommunityPoolRequest - 1, // 19: cosmos.distribution.v1beta1.Query.Params:output_type -> cosmos.distribution.v1beta1.QueryParamsResponse - 3, // 20: cosmos.distribution.v1beta1.Query.ValidatorOutstandingRewards:output_type -> cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse - 5, // 21: cosmos.distribution.v1beta1.Query.ValidatorCommission:output_type -> cosmos.distribution.v1beta1.QueryValidatorCommissionResponse - 7, // 22: cosmos.distribution.v1beta1.Query.ValidatorSlashes:output_type -> cosmos.distribution.v1beta1.QueryValidatorSlashesResponse - 9, // 23: cosmos.distribution.v1beta1.Query.DelegationRewards:output_type -> cosmos.distribution.v1beta1.QueryDelegationRewardsResponse - 11, // 24: cosmos.distribution.v1beta1.Query.DelegationTotalRewards:output_type -> cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse - 13, // 25: cosmos.distribution.v1beta1.Query.DelegatorValidators:output_type -> cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse - 15, // 26: cosmos.distribution.v1beta1.Query.DelegatorWithdrawAddress:output_type -> cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse - 17, // 27: cosmos.distribution.v1beta1.Query.CommunityPool:output_type -> cosmos.distribution.v1beta1.QueryCommunityPoolResponse - 19, // [19:28] is the sub-list for method output_type - 10, // [10:19] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_cosmos_distribution_v1beta1_query_proto_init() } -func file_cosmos_distribution_v1beta1_query_proto_init() { - if File_cosmos_distribution_v1beta1_query_proto != nil { - return - } - file_cosmos_distribution_v1beta1_distribution_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_distribution_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorOutstandingRewardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorOutstandingRewardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorCommissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorCommissionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorSlashesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorSlashesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegationRewardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegationRewardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegationTotalRewardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegationTotalRewardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorValidatorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorValidatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorWithdrawAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorWithdrawAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCommunityPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCommunityPoolResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_distribution_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 18, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_distribution_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_distribution_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_distribution_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_distribution_v1beta1_query_proto = out.File - file_cosmos_distribution_v1beta1_query_proto_rawDesc = nil - file_cosmos_distribution_v1beta1_query_proto_goTypes = nil - file_cosmos_distribution_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/distribution/v1beta1/query_grpc.pb.go b/api/cosmos/distribution/v1beta1/query_grpc.pb.go deleted file mode 100644 index 1e15d39c68c3..000000000000 --- a/api/cosmos/distribution/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/distribution/v1beta1/query.proto - -package distributionv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Params queries params of the distribution module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ValidatorOutstandingRewards queries rewards of a validator address. - ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) - // ValidatorCommission queries accumulated commission for a validator. - ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) - // ValidatorSlashes queries slash events of a validator. - ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) - // DelegationRewards queries the total rewards accrued by a delegation. - DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) - // DelegationTotalRewards queries the total rewards accrued by a each - // validator. - DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) - // DelegatorValidators queries the validators of a delegator. - DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) - // DelegatorWithdrawAddress queries withdraw address of a delegator. - DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) - // CommunityPool queries the community pool coins. - CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) { - out := new(QueryValidatorOutstandingRewardsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) { - out := new(QueryValidatorCommissionResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorCommission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) { - out := new(QueryValidatorSlashesResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) { - out := new(QueryDelegationRewardsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegationRewards", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) { - out := new(QueryDelegationTotalRewardsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { - out := new(QueryDelegatorValidatorsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegatorValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) { - out := new(QueryDelegatorWithdrawAddressResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) { - out := new(QueryCommunityPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/CommunityPool", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Params queries params of the distribution module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ValidatorOutstandingRewards queries rewards of a validator address. - ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) - // ValidatorCommission queries accumulated commission for a validator. - ValidatorCommission(context.Context, *QueryValidatorCommissionRequest) (*QueryValidatorCommissionResponse, error) - // ValidatorSlashes queries slash events of a validator. - ValidatorSlashes(context.Context, *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) - // DelegationRewards queries the total rewards accrued by a delegation. - DelegationRewards(context.Context, *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) - // DelegationTotalRewards queries the total rewards accrued by a each - // validator. - DelegationTotalRewards(context.Context, *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) - // DelegatorValidators queries the validators of a delegator. - DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) - // DelegatorWithdrawAddress queries withdraw address of a delegator. - DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) - // CommunityPool queries the community pool coins. - CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorOutstandingRewards not implemented") -} -func (UnimplementedQueryServer) ValidatorCommission(context.Context, *QueryValidatorCommissionRequest) (*QueryValidatorCommissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorCommission not implemented") -} -func (UnimplementedQueryServer) ValidatorSlashes(context.Context, *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorSlashes not implemented") -} -func (UnimplementedQueryServer) DelegationRewards(context.Context, *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegationRewards not implemented") -} -func (UnimplementedQueryServer) DelegationTotalRewards(context.Context, *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegationTotalRewards not implemented") -} -func (UnimplementedQueryServer) DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidators not implemented") -} -func (UnimplementedQueryServer) DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorWithdrawAddress not implemented") -} -func (UnimplementedQueryServer) CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommunityPool not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ValidatorOutstandingRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorOutstandingRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorOutstandingRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorOutstandingRewards(ctx, req.(*QueryValidatorOutstandingRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ValidatorCommission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorCommissionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorCommission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorCommission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorCommission(ctx, req.(*QueryValidatorCommissionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ValidatorSlashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorSlashesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorSlashes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorSlashes(ctx, req.(*QueryValidatorSlashesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegationRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegationRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegationRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegationRewards", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegationRewards(ctx, req.(*QueryDelegationRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegationTotalRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegationTotalRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegationTotalRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegationTotalRewards(ctx, req.(*QueryDelegationTotalRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegatorValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegatorValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorValidators(ctx, req.(*QueryDelegatorValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegatorWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorWithdrawAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorWithdrawAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorWithdrawAddress(ctx, req.(*QueryDelegatorWithdrawAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCommunityPoolRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CommunityPool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/CommunityPool", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CommunityPool(ctx, req.(*QueryCommunityPoolRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.distribution.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "ValidatorOutstandingRewards", - Handler: _Query_ValidatorOutstandingRewards_Handler, - }, - { - MethodName: "ValidatorCommission", - Handler: _Query_ValidatorCommission_Handler, - }, - { - MethodName: "ValidatorSlashes", - Handler: _Query_ValidatorSlashes_Handler, - }, - { - MethodName: "DelegationRewards", - Handler: _Query_DelegationRewards_Handler, - }, - { - MethodName: "DelegationTotalRewards", - Handler: _Query_DelegationTotalRewards_Handler, - }, - { - MethodName: "DelegatorValidators", - Handler: _Query_DelegatorValidators_Handler, - }, - { - MethodName: "DelegatorWithdrawAddress", - Handler: _Query_DelegatorWithdrawAddress_Handler, - }, - { - MethodName: "CommunityPool", - Handler: _Query_CommunityPool_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/distribution/v1beta1/query.proto", -} diff --git a/api/cosmos/distribution/v1beta1/tx.pulsar.go b/api/cosmos/distribution/v1beta1/tx.pulsar.go deleted file mode 100644 index bda576fda0d2..000000000000 --- a/api/cosmos/distribution/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,4281 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package distributionv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgSetWithdrawAddress protoreflect.MessageDescriptor - fd_MsgSetWithdrawAddress_delegator_address protoreflect.FieldDescriptor - fd_MsgSetWithdrawAddress_withdraw_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgSetWithdrawAddress = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgSetWithdrawAddress") - fd_MsgSetWithdrawAddress_delegator_address = md_MsgSetWithdrawAddress.Fields().ByName("delegator_address") - fd_MsgSetWithdrawAddress_withdraw_address = md_MsgSetWithdrawAddress.Fields().ByName("withdraw_address") -} - -var _ protoreflect.Message = (*fastReflection_MsgSetWithdrawAddress)(nil) - -type fastReflection_MsgSetWithdrawAddress MsgSetWithdrawAddress - -func (x *MsgSetWithdrawAddress) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSetWithdrawAddress)(x) -} - -func (x *MsgSetWithdrawAddress) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSetWithdrawAddress_messageType fastReflection_MsgSetWithdrawAddress_messageType -var _ protoreflect.MessageType = fastReflection_MsgSetWithdrawAddress_messageType{} - -type fastReflection_MsgSetWithdrawAddress_messageType struct{} - -func (x fastReflection_MsgSetWithdrawAddress_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSetWithdrawAddress)(nil) -} -func (x fastReflection_MsgSetWithdrawAddress_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSetWithdrawAddress) -} -func (x fastReflection_MsgSetWithdrawAddress_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetWithdrawAddress -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSetWithdrawAddress) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetWithdrawAddress -} - -// 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_MsgSetWithdrawAddress) Type() protoreflect.MessageType { - return _fastReflection_MsgSetWithdrawAddress_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSetWithdrawAddress) New() protoreflect.Message { - return new(fastReflection_MsgSetWithdrawAddress) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSetWithdrawAddress) Interface() protoreflect.ProtoMessage { - return (*MsgSetWithdrawAddress)(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_MsgSetWithdrawAddress) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgSetWithdrawAddress_delegator_address, value) { - return - } - } - if x.WithdrawAddress != "" { - value := protoreflect.ValueOfString(x.WithdrawAddress) - if !f(fd_MsgSetWithdrawAddress_withdraw_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSetWithdrawAddress) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": - return x.WithdrawAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddress")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddress 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_MsgSetWithdrawAddress) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": - x.DelegatorAddress = "" - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": - x.WithdrawAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddress")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddress 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_MsgSetWithdrawAddress) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": - value := x.WithdrawAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddress")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddress 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_MsgSetWithdrawAddress) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": - x.WithdrawAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddress")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddress 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_MsgSetWithdrawAddress) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.MsgSetWithdrawAddress is not mutable")) - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": - panic(fmt.Errorf("field withdraw_address of message cosmos.distribution.v1beta1.MsgSetWithdrawAddress is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddress")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddress 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_MsgSetWithdrawAddress) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddress")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddress 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_MsgSetWithdrawAddress) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgSetWithdrawAddress", 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_MsgSetWithdrawAddress) 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_MsgSetWithdrawAddress) 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_MsgSetWithdrawAddress) 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_MsgSetWithdrawAddress) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSetWithdrawAddress) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.WithdrawAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSetWithdrawAddress) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.WithdrawAddress) > 0 { - i -= len(x.WithdrawAddress) - copy(dAtA[i:], x.WithdrawAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*MsgSetWithdrawAddress) - 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: MsgSetWithdrawAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetWithdrawAddress: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", 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.WithdrawAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSetWithdrawAddressResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgSetWithdrawAddressResponse = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgSetWithdrawAddressResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSetWithdrawAddressResponse)(nil) - -type fastReflection_MsgSetWithdrawAddressResponse MsgSetWithdrawAddressResponse - -func (x *MsgSetWithdrawAddressResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSetWithdrawAddressResponse)(x) -} - -func (x *MsgSetWithdrawAddressResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSetWithdrawAddressResponse_messageType fastReflection_MsgSetWithdrawAddressResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSetWithdrawAddressResponse_messageType{} - -type fastReflection_MsgSetWithdrawAddressResponse_messageType struct{} - -func (x fastReflection_MsgSetWithdrawAddressResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSetWithdrawAddressResponse)(nil) -} -func (x fastReflection_MsgSetWithdrawAddressResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSetWithdrawAddressResponse) -} -func (x fastReflection_MsgSetWithdrawAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetWithdrawAddressResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSetWithdrawAddressResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetWithdrawAddressResponse -} - -// 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_MsgSetWithdrawAddressResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSetWithdrawAddressResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSetWithdrawAddressResponse) New() protoreflect.Message { - return new(fastReflection_MsgSetWithdrawAddressResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSetWithdrawAddressResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSetWithdrawAddressResponse)(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_MsgSetWithdrawAddressResponse) 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_MsgSetWithdrawAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse 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_MsgSetWithdrawAddressResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse 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_MsgSetWithdrawAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse 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_MsgSetWithdrawAddressResponse) 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.distribution.v1beta1.MsgSetWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse 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_MsgSetWithdrawAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse 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_MsgSetWithdrawAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse 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_MsgSetWithdrawAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", 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_MsgSetWithdrawAddressResponse) 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_MsgSetWithdrawAddressResponse) 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_MsgSetWithdrawAddressResponse) 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_MsgSetWithdrawAddressResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSetWithdrawAddressResponse) - 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().(*MsgSetWithdrawAddressResponse) - 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().(*MsgSetWithdrawAddressResponse) - 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: MsgSetWithdrawAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetWithdrawAddressResponse: 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_MsgWithdrawDelegatorReward protoreflect.MessageDescriptor - fd_MsgWithdrawDelegatorReward_delegator_address protoreflect.FieldDescriptor - fd_MsgWithdrawDelegatorReward_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgWithdrawDelegatorReward = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawDelegatorReward") - fd_MsgWithdrawDelegatorReward_delegator_address = md_MsgWithdrawDelegatorReward.Fields().ByName("delegator_address") - fd_MsgWithdrawDelegatorReward_validator_address = md_MsgWithdrawDelegatorReward.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawDelegatorReward)(nil) - -type fastReflection_MsgWithdrawDelegatorReward MsgWithdrawDelegatorReward - -func (x *MsgWithdrawDelegatorReward) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawDelegatorReward)(x) -} - -func (x *MsgWithdrawDelegatorReward) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawDelegatorReward_messageType fastReflection_MsgWithdrawDelegatorReward_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawDelegatorReward_messageType{} - -type fastReflection_MsgWithdrawDelegatorReward_messageType struct{} - -func (x fastReflection_MsgWithdrawDelegatorReward_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawDelegatorReward)(nil) -} -func (x fastReflection_MsgWithdrawDelegatorReward_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawDelegatorReward) -} -func (x fastReflection_MsgWithdrawDelegatorReward_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawDelegatorReward -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawDelegatorReward) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawDelegatorReward -} - -// 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_MsgWithdrawDelegatorReward) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawDelegatorReward_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawDelegatorReward) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawDelegatorReward) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawDelegatorReward) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawDelegatorReward)(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_MsgWithdrawDelegatorReward) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgWithdrawDelegatorReward_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgWithdrawDelegatorReward_validator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgWithdrawDelegatorReward) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward 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_MsgWithdrawDelegatorReward) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": - x.DelegatorAddress = "" - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward 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_MsgWithdrawDelegatorReward) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward 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_MsgWithdrawDelegatorReward) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward 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_MsgWithdrawDelegatorReward) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward is not mutable")) - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward 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_MsgWithdrawDelegatorReward) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward 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_MsgWithdrawDelegatorReward) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", 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_MsgWithdrawDelegatorReward) 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_MsgWithdrawDelegatorReward) 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_MsgWithdrawDelegatorReward) 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_MsgWithdrawDelegatorReward) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawDelegatorReward) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawDelegatorReward) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*MsgWithdrawDelegatorReward) - 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: MsgWithdrawDelegatorReward: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawDelegatorReward: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgWithdrawDelegatorRewardResponse_1_list)(nil) - -type _MsgWithdrawDelegatorRewardResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawDelegatorRewardResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgWithdrawDelegatorRewardResponse protoreflect.MessageDescriptor - fd_MsgWithdrawDelegatorRewardResponse_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgWithdrawDelegatorRewardResponse = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawDelegatorRewardResponse") - fd_MsgWithdrawDelegatorRewardResponse_amount = md_MsgWithdrawDelegatorRewardResponse.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawDelegatorRewardResponse)(nil) - -type fastReflection_MsgWithdrawDelegatorRewardResponse MsgWithdrawDelegatorRewardResponse - -func (x *MsgWithdrawDelegatorRewardResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawDelegatorRewardResponse)(x) -} - -func (x *MsgWithdrawDelegatorRewardResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawDelegatorRewardResponse_messageType fastReflection_MsgWithdrawDelegatorRewardResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawDelegatorRewardResponse_messageType{} - -type fastReflection_MsgWithdrawDelegatorRewardResponse_messageType struct{} - -func (x fastReflection_MsgWithdrawDelegatorRewardResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawDelegatorRewardResponse)(nil) -} -func (x fastReflection_MsgWithdrawDelegatorRewardResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawDelegatorRewardResponse) -} -func (x fastReflection_MsgWithdrawDelegatorRewardResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawDelegatorRewardResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawDelegatorRewardResponse -} - -// 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_MsgWithdrawDelegatorRewardResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawDelegatorRewardResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawDelegatorRewardResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawDelegatorRewardResponse)(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_MsgWithdrawDelegatorRewardResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdrawDelegatorRewardResponse_1_list{list: &x.Amount}) - if !f(fd_MsgWithdrawDelegatorRewardResponse_amount, 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_MsgWithdrawDelegatorRewardResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse 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_MsgWithdrawDelegatorRewardResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse 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_MsgWithdrawDelegatorRewardResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgWithdrawDelegatorRewardResponse_1_list{}) - } - listValue := &_MsgWithdrawDelegatorRewardResponse_1_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse 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_MsgWithdrawDelegatorRewardResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": - lv := value.List() - clv := lv.(*_MsgWithdrawDelegatorRewardResponse_1_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse 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_MsgWithdrawDelegatorRewardResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgWithdrawDelegatorRewardResponse_1_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse 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_MsgWithdrawDelegatorRewardResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgWithdrawDelegatorRewardResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse 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_MsgWithdrawDelegatorRewardResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", 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_MsgWithdrawDelegatorRewardResponse) 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_MsgWithdrawDelegatorRewardResponse) 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_MsgWithdrawDelegatorRewardResponse) 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_MsgWithdrawDelegatorRewardResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawDelegatorRewardResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawDelegatorRewardResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawDelegatorRewardResponse) - 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: MsgWithdrawDelegatorRewardResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawDelegatorRewardResponse: 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 Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgWithdrawValidatorCommission protoreflect.MessageDescriptor - fd_MsgWithdrawValidatorCommission_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgWithdrawValidatorCommission = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawValidatorCommission") - fd_MsgWithdrawValidatorCommission_validator_address = md_MsgWithdrawValidatorCommission.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawValidatorCommission)(nil) - -type fastReflection_MsgWithdrawValidatorCommission MsgWithdrawValidatorCommission - -func (x *MsgWithdrawValidatorCommission) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawValidatorCommission)(x) -} - -func (x *MsgWithdrawValidatorCommission) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawValidatorCommission_messageType fastReflection_MsgWithdrawValidatorCommission_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawValidatorCommission_messageType{} - -type fastReflection_MsgWithdrawValidatorCommission_messageType struct{} - -func (x fastReflection_MsgWithdrawValidatorCommission_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawValidatorCommission)(nil) -} -func (x fastReflection_MsgWithdrawValidatorCommission_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawValidatorCommission) -} -func (x fastReflection_MsgWithdrawValidatorCommission_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawValidatorCommission -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawValidatorCommission) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawValidatorCommission -} - -// 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_MsgWithdrawValidatorCommission) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawValidatorCommission_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawValidatorCommission) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawValidatorCommission) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawValidatorCommission) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawValidatorCommission)(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_MsgWithdrawValidatorCommission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgWithdrawValidatorCommission_validator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgWithdrawValidatorCommission) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission 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_MsgWithdrawValidatorCommission) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission 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_MsgWithdrawValidatorCommission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission 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_MsgWithdrawValidatorCommission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission 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_MsgWithdrawValidatorCommission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission 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_MsgWithdrawValidatorCommission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission 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_MsgWithdrawValidatorCommission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", 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_MsgWithdrawValidatorCommission) 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_MsgWithdrawValidatorCommission) 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_MsgWithdrawValidatorCommission) 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_MsgWithdrawValidatorCommission) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawValidatorCommission) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.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().(*MsgWithdrawValidatorCommission) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 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().(*MsgWithdrawValidatorCommission) - 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: MsgWithdrawValidatorCommission: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawValidatorCommission: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgWithdrawValidatorCommissionResponse_1_list)(nil) - -type _MsgWithdrawValidatorCommissionResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawValidatorCommissionResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgWithdrawValidatorCommissionResponse protoreflect.MessageDescriptor - fd_MsgWithdrawValidatorCommissionResponse_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgWithdrawValidatorCommissionResponse = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawValidatorCommissionResponse") - fd_MsgWithdrawValidatorCommissionResponse_amount = md_MsgWithdrawValidatorCommissionResponse.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawValidatorCommissionResponse)(nil) - -type fastReflection_MsgWithdrawValidatorCommissionResponse MsgWithdrawValidatorCommissionResponse - -func (x *MsgWithdrawValidatorCommissionResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawValidatorCommissionResponse)(x) -} - -func (x *MsgWithdrawValidatorCommissionResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawValidatorCommissionResponse_messageType fastReflection_MsgWithdrawValidatorCommissionResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawValidatorCommissionResponse_messageType{} - -type fastReflection_MsgWithdrawValidatorCommissionResponse_messageType struct{} - -func (x fastReflection_MsgWithdrawValidatorCommissionResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawValidatorCommissionResponse)(nil) -} -func (x fastReflection_MsgWithdrawValidatorCommissionResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawValidatorCommissionResponse) -} -func (x fastReflection_MsgWithdrawValidatorCommissionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawValidatorCommissionResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawValidatorCommissionResponse -} - -// 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_MsgWithdrawValidatorCommissionResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawValidatorCommissionResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawValidatorCommissionResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawValidatorCommissionResponse)(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_MsgWithdrawValidatorCommissionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdrawValidatorCommissionResponse_1_list{list: &x.Amount}) - if !f(fd_MsgWithdrawValidatorCommissionResponse_amount, 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_MsgWithdrawValidatorCommissionResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse 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_MsgWithdrawValidatorCommissionResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse 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_MsgWithdrawValidatorCommissionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgWithdrawValidatorCommissionResponse_1_list{}) - } - listValue := &_MsgWithdrawValidatorCommissionResponse_1_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse 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_MsgWithdrawValidatorCommissionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": - lv := value.List() - clv := lv.(*_MsgWithdrawValidatorCommissionResponse_1_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse 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_MsgWithdrawValidatorCommissionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgWithdrawValidatorCommissionResponse_1_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse 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_MsgWithdrawValidatorCommissionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgWithdrawValidatorCommissionResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse 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_MsgWithdrawValidatorCommissionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", 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_MsgWithdrawValidatorCommissionResponse) 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_MsgWithdrawValidatorCommissionResponse) 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_MsgWithdrawValidatorCommissionResponse) 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_MsgWithdrawValidatorCommissionResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawValidatorCommissionResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawValidatorCommissionResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawValidatorCommissionResponse) - 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: MsgWithdrawValidatorCommissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawValidatorCommissionResponse: 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 Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgFundCommunityPool_1_list)(nil) - -type _MsgFundCommunityPool_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgFundCommunityPool_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgFundCommunityPool_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgFundCommunityPool_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgFundCommunityPool_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgFundCommunityPool_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgFundCommunityPool_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgFundCommunityPool_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgFundCommunityPool_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgFundCommunityPool protoreflect.MessageDescriptor - fd_MsgFundCommunityPool_amount protoreflect.FieldDescriptor - fd_MsgFundCommunityPool_depositor protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgFundCommunityPool = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgFundCommunityPool") - fd_MsgFundCommunityPool_amount = md_MsgFundCommunityPool.Fields().ByName("amount") - fd_MsgFundCommunityPool_depositor = md_MsgFundCommunityPool.Fields().ByName("depositor") -} - -var _ protoreflect.Message = (*fastReflection_MsgFundCommunityPool)(nil) - -type fastReflection_MsgFundCommunityPool MsgFundCommunityPool - -func (x *MsgFundCommunityPool) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgFundCommunityPool)(x) -} - -func (x *MsgFundCommunityPool) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgFundCommunityPool_messageType fastReflection_MsgFundCommunityPool_messageType -var _ protoreflect.MessageType = fastReflection_MsgFundCommunityPool_messageType{} - -type fastReflection_MsgFundCommunityPool_messageType struct{} - -func (x fastReflection_MsgFundCommunityPool_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgFundCommunityPool)(nil) -} -func (x fastReflection_MsgFundCommunityPool_messageType) New() protoreflect.Message { - return new(fastReflection_MsgFundCommunityPool) -} -func (x fastReflection_MsgFundCommunityPool_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundCommunityPool -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgFundCommunityPool) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundCommunityPool -} - -// 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_MsgFundCommunityPool) Type() protoreflect.MessageType { - return _fastReflection_MsgFundCommunityPool_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgFundCommunityPool) New() protoreflect.Message { - return new(fastReflection_MsgFundCommunityPool) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgFundCommunityPool) Interface() protoreflect.ProtoMessage { - return (*MsgFundCommunityPool)(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_MsgFundCommunityPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{list: &x.Amount}) - if !f(fd_MsgFundCommunityPool_amount, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_MsgFundCommunityPool_depositor, 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_MsgFundCommunityPool) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.amount": - return len(x.Amount) != 0 - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.depositor": - return x.Depositor != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPool 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_MsgFundCommunityPool) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.amount": - x.Amount = nil - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.depositor": - x.Depositor = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPool 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_MsgFundCommunityPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{}) - } - listValue := &_MsgFundCommunityPool_1_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPool 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_MsgFundCommunityPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.amount": - lv := value.List() - clv := lv.(*_MsgFundCommunityPool_1_list) - x.Amount = *clv.list - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.depositor": - x.Depositor = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPool 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_MsgFundCommunityPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgFundCommunityPool_1_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.depositor": - panic(fmt.Errorf("field depositor of message cosmos.distribution.v1beta1.MsgFundCommunityPool is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPool 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_MsgFundCommunityPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{list: &list}) - case "cosmos.distribution.v1beta1.MsgFundCommunityPool.depositor": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPool")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPool 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_MsgFundCommunityPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgFundCommunityPool", 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_MsgFundCommunityPool) 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_MsgFundCommunityPool) 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_MsgFundCommunityPool) 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_MsgFundCommunityPool) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgFundCommunityPool) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgFundCommunityPool) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgFundCommunityPool) - 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: MsgFundCommunityPool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPool: 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 Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgFundCommunityPoolResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_distribution_v1beta1_tx_proto_init() - md_MsgFundCommunityPoolResponse = File_cosmos_distribution_v1beta1_tx_proto.Messages().ByName("MsgFundCommunityPoolResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgFundCommunityPoolResponse)(nil) - -type fastReflection_MsgFundCommunityPoolResponse MsgFundCommunityPoolResponse - -func (x *MsgFundCommunityPoolResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgFundCommunityPoolResponse)(x) -} - -func (x *MsgFundCommunityPoolResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgFundCommunityPoolResponse_messageType fastReflection_MsgFundCommunityPoolResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgFundCommunityPoolResponse_messageType{} - -type fastReflection_MsgFundCommunityPoolResponse_messageType struct{} - -func (x fastReflection_MsgFundCommunityPoolResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgFundCommunityPoolResponse)(nil) -} -func (x fastReflection_MsgFundCommunityPoolResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgFundCommunityPoolResponse) -} -func (x fastReflection_MsgFundCommunityPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundCommunityPoolResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgFundCommunityPoolResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgFundCommunityPoolResponse -} - -// 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_MsgFundCommunityPoolResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgFundCommunityPoolResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgFundCommunityPoolResponse) New() protoreflect.Message { - return new(fastReflection_MsgFundCommunityPoolResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgFundCommunityPoolResponse) Interface() protoreflect.ProtoMessage { - return (*MsgFundCommunityPoolResponse)(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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) 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.distribution.v1beta1.MsgFundCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")) - } - panic(fmt.Errorf("message cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse 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_MsgFundCommunityPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", 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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) 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_MsgFundCommunityPoolResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgFundCommunityPoolResponse) - 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().(*MsgFundCommunityPoolResponse) - 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().(*MsgFundCommunityPoolResponse) - 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: MsgFundCommunityPoolResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/distribution/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSetWithdrawAddress sets the withdraw address for -// a delegator (or validator self-delegation). -type MsgSetWithdrawAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` -} - -func (x *MsgSetWithdrawAddress) Reset() { - *x = MsgSetWithdrawAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSetWithdrawAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSetWithdrawAddress) ProtoMessage() {} - -// Deprecated: Use MsgSetWithdrawAddress.ProtoReflect.Descriptor instead. -func (*MsgSetWithdrawAddress) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSetWithdrawAddress) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgSetWithdrawAddress) GetWithdrawAddress() string { - if x != nil { - return x.WithdrawAddress - } - return "" -} - -// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. -type MsgSetWithdrawAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSetWithdrawAddressResponse) Reset() { - *x = MsgSetWithdrawAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSetWithdrawAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSetWithdrawAddressResponse) ProtoMessage() {} - -// Deprecated: Use MsgSetWithdrawAddressResponse.ProtoReflect.Descriptor instead. -func (*MsgSetWithdrawAddressResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -// from a single validator. -type MsgWithdrawDelegatorReward struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *MsgWithdrawDelegatorReward) Reset() { - *x = MsgWithdrawDelegatorReward{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawDelegatorReward) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawDelegatorReward) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawDelegatorReward.ProtoReflect.Descriptor instead. -func (*MsgWithdrawDelegatorReward) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgWithdrawDelegatorReward) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgWithdrawDelegatorReward) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -type MsgWithdrawDelegatorRewardResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Since: cosmos-sdk 0.46 - Amount []*v1beta1.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgWithdrawDelegatorRewardResponse) Reset() { - *x = MsgWithdrawDelegatorRewardResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawDelegatorRewardResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawDelegatorRewardResponse) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawDelegatorRewardResponse.ProtoReflect.Descriptor instead. -func (*MsgWithdrawDelegatorRewardResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgWithdrawDelegatorRewardResponse) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgWithdrawValidatorCommission withdraws the full commission to the validator -// address. -type MsgWithdrawValidatorCommission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *MsgWithdrawValidatorCommission) Reset() { - *x = MsgWithdrawValidatorCommission{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawValidatorCommission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawValidatorCommission) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawValidatorCommission.ProtoReflect.Descriptor instead. -func (*MsgWithdrawValidatorCommission) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgWithdrawValidatorCommission) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -type MsgWithdrawValidatorCommissionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Since: cosmos-sdk 0.46 - Amount []*v1beta1.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgWithdrawValidatorCommissionResponse) Reset() { - *x = MsgWithdrawValidatorCommissionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawValidatorCommissionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawValidatorCommissionResponse) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawValidatorCommissionResponse.ProtoReflect.Descriptor instead. -func (*MsgWithdrawValidatorCommissionResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *MsgWithdrawValidatorCommissionResponse) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgFundCommunityPool allows an account to directly -// fund the community pool. -type MsgFundCommunityPool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount []*v1beta1.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` -} - -func (x *MsgFundCommunityPool) Reset() { - *x = MsgFundCommunityPool{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgFundCommunityPool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgFundCommunityPool) ProtoMessage() {} - -// Deprecated: Use MsgFundCommunityPool.ProtoReflect.Descriptor instead. -func (*MsgFundCommunityPool) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgFundCommunityPool) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -func (x *MsgFundCommunityPool) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -type MsgFundCommunityPoolResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgFundCommunityPoolResponse) Reset() { - *x = MsgFundCommunityPoolResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_distribution_v1beta1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgFundCommunityPoolResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgFundCommunityPoolResponse) ProtoMessage() {} - -// Deprecated: Use MsgFundCommunityPoolResponse.ProtoReflect.Descriptor instead. -func (*MsgFundCommunityPoolResponse) Descriptor() ([]byte, []int) { - return file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{7} -} - -var File_cosmos_distribution_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_distribution_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, - 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x01, - 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, - 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, - 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 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, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x89, 0x01, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x87, 0x01, - 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xcb, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x46, - 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, - 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x16, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc8, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x84, 0x01, - 0x0a, 0x12, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x3f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x1b, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x43, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, - 0x11, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, - 0x6f, 0x6c, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x64, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x8e, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x44, 0x58, 0xaa, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x44, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_distribution_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_distribution_v1beta1_tx_proto_rawDescData = file_cosmos_distribution_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_distribution_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_distribution_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_distribution_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_distribution_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_distribution_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_distribution_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cosmos_distribution_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSetWithdrawAddress)(nil), // 0: cosmos.distribution.v1beta1.MsgSetWithdrawAddress - (*MsgSetWithdrawAddressResponse)(nil), // 1: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse - (*MsgWithdrawDelegatorReward)(nil), // 2: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward - (*MsgWithdrawDelegatorRewardResponse)(nil), // 3: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse - (*MsgWithdrawValidatorCommission)(nil), // 4: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission - (*MsgWithdrawValidatorCommissionResponse)(nil), // 5: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse - (*MsgFundCommunityPool)(nil), // 6: cosmos.distribution.v1beta1.MsgFundCommunityPool - (*MsgFundCommunityPoolResponse)(nil), // 7: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin -} -var file_cosmos_distribution_v1beta1_tx_proto_depIdxs = []int32{ - 8, // 0: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 1: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 2: cosmos.distribution.v1beta1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 3: cosmos.distribution.v1beta1.Msg.SetWithdrawAddress:input_type -> cosmos.distribution.v1beta1.MsgSetWithdrawAddress - 2, // 4: cosmos.distribution.v1beta1.Msg.WithdrawDelegatorReward:input_type -> cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward - 4, // 5: cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommission:input_type -> cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission - 6, // 6: cosmos.distribution.v1beta1.Msg.FundCommunityPool:input_type -> cosmos.distribution.v1beta1.MsgFundCommunityPool - 1, // 7: cosmos.distribution.v1beta1.Msg.SetWithdrawAddress:output_type -> cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse - 3, // 8: cosmos.distribution.v1beta1.Msg.WithdrawDelegatorReward:output_type -> cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse - 5, // 9: cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommission:output_type -> cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse - 7, // 10: cosmos.distribution.v1beta1.Msg.FundCommunityPool:output_type -> cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_cosmos_distribution_v1beta1_tx_proto_init() } -func file_cosmos_distribution_v1beta1_tx_proto_init() { - if File_cosmos_distribution_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSetWithdrawAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSetWithdrawAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawDelegatorReward); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawDelegatorRewardResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawValidatorCommission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawValidatorCommissionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFundCommunityPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_distribution_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFundCommunityPoolResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_distribution_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_distribution_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_distribution_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_distribution_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_distribution_v1beta1_tx_proto = out.File - file_cosmos_distribution_v1beta1_tx_proto_rawDesc = nil - file_cosmos_distribution_v1beta1_tx_proto_goTypes = nil - file_cosmos_distribution_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/distribution/v1beta1/tx_grpc.pb.go b/api/cosmos/distribution/v1beta1/tx_grpc.pb.go deleted file mode 100644 index 22dce9ef26e9..000000000000 --- a/api/cosmos/distribution/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/distribution/v1beta1/tx.proto - -package distributionv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // SetWithdrawAddress defines a method to change the withdraw address - // for a delegator (or validator self-delegation). - SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) - // WithdrawDelegatorReward defines a method to withdraw rewards of delegator - // from a single validator. - WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) - // WithdrawValidatorCommission defines a method to withdraw the - // full commission to the validator address. - WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) - // FundCommunityPool defines a method to allow an account to directly - // fund the community pool. - FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) { - out := new(MsgSetWithdrawAddressResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) { - out := new(MsgWithdrawDelegatorRewardResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) { - out := new(MsgWithdrawValidatorCommissionResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) { - out := new(MsgFundCommunityPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // SetWithdrawAddress defines a method to change the withdraw address - // for a delegator (or validator self-delegation). - SetWithdrawAddress(context.Context, *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error) - // WithdrawDelegatorReward defines a method to withdraw rewards of delegator - // from a single validator. - WithdrawDelegatorReward(context.Context, *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error) - // WithdrawValidatorCommission defines a method to withdraw the - // full commission to the validator address. - WithdrawValidatorCommission(context.Context, *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) - // FundCommunityPool defines a method to allow an account to directly - // fund the community pool. - FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) SetWithdrawAddress(context.Context, *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetWithdrawAddress not implemented") -} -func (UnimplementedMsgServer) WithdrawDelegatorReward(context.Context, *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawDelegatorReward not implemented") -} -func (UnimplementedMsgServer) WithdrawValidatorCommission(context.Context, *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawValidatorCommission not implemented") -} -func (UnimplementedMsgServer) FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FundCommunityPool not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_SetWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetWithdrawAddress) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetWithdrawAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetWithdrawAddress(ctx, req.(*MsgSetWithdrawAddress)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_WithdrawDelegatorReward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawDelegatorReward) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).WithdrawDelegatorReward(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawDelegatorReward(ctx, req.(*MsgWithdrawDelegatorReward)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_WithdrawValidatorCommission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawValidatorCommission) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).WithdrawValidatorCommission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawValidatorCommission(ctx, req.(*MsgWithdrawValidatorCommission)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_FundCommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgFundCommunityPool) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).FundCommunityPool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).FundCommunityPool(ctx, req.(*MsgFundCommunityPool)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.distribution.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SetWithdrawAddress", - Handler: _Msg_SetWithdrawAddress_Handler, - }, - { - MethodName: "WithdrawDelegatorReward", - Handler: _Msg_WithdrawDelegatorReward_Handler, - }, - { - MethodName: "WithdrawValidatorCommission", - Handler: _Msg_WithdrawValidatorCommission_Handler, - }, - { - MethodName: "FundCommunityPool", - Handler: _Msg_FundCommunityPool_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/distribution/v1beta1/tx.proto", -} diff --git a/api/cosmos/evidence/v1beta1/evidence.pulsar.go b/api/cosmos/evidence/v1beta1/evidence.pulsar.go deleted file mode 100644 index c23f58e6ccbe..000000000000 --- a/api/cosmos/evidence/v1beta1/evidence.pulsar.go +++ /dev/null @@ -1,794 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package evidencev1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Equivocation protoreflect.MessageDescriptor - fd_Equivocation_height protoreflect.FieldDescriptor - fd_Equivocation_time protoreflect.FieldDescriptor - fd_Equivocation_power protoreflect.FieldDescriptor - fd_Equivocation_consensus_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_evidence_proto_init() - md_Equivocation = File_cosmos_evidence_v1beta1_evidence_proto.Messages().ByName("Equivocation") - fd_Equivocation_height = md_Equivocation.Fields().ByName("height") - fd_Equivocation_time = md_Equivocation.Fields().ByName("time") - fd_Equivocation_power = md_Equivocation.Fields().ByName("power") - fd_Equivocation_consensus_address = md_Equivocation.Fields().ByName("consensus_address") -} - -var _ protoreflect.Message = (*fastReflection_Equivocation)(nil) - -type fastReflection_Equivocation Equivocation - -func (x *Equivocation) ProtoReflect() protoreflect.Message { - return (*fastReflection_Equivocation)(x) -} - -func (x *Equivocation) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_evidence_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Equivocation_messageType fastReflection_Equivocation_messageType -var _ protoreflect.MessageType = fastReflection_Equivocation_messageType{} - -type fastReflection_Equivocation_messageType struct{} - -func (x fastReflection_Equivocation_messageType) Zero() protoreflect.Message { - return (*fastReflection_Equivocation)(nil) -} -func (x fastReflection_Equivocation_messageType) New() protoreflect.Message { - return new(fastReflection_Equivocation) -} -func (x fastReflection_Equivocation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Equivocation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Equivocation) Descriptor() protoreflect.MessageDescriptor { - return md_Equivocation -} - -// 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_Equivocation) Type() protoreflect.MessageType { - return _fastReflection_Equivocation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Equivocation) New() protoreflect.Message { - return new(fastReflection_Equivocation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Equivocation) Interface() protoreflect.ProtoMessage { - return (*Equivocation)(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_Equivocation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Equivocation_height, value) { - return - } - } - if x.Time != nil { - value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - if !f(fd_Equivocation_time, value) { - return - } - } - if x.Power != int64(0) { - value := protoreflect.ValueOfInt64(x.Power) - if !f(fd_Equivocation_power, value) { - return - } - } - if x.ConsensusAddress != "" { - value := protoreflect.ValueOfString(x.ConsensusAddress) - if !f(fd_Equivocation_consensus_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Equivocation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.Equivocation.height": - return x.Height != int64(0) - case "cosmos.evidence.v1beta1.Equivocation.time": - return x.Time != nil - case "cosmos.evidence.v1beta1.Equivocation.power": - return x.Power != int64(0) - case "cosmos.evidence.v1beta1.Equivocation.consensus_address": - return x.ConsensusAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.Equivocation")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.Equivocation 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_Equivocation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.Equivocation.height": - x.Height = int64(0) - case "cosmos.evidence.v1beta1.Equivocation.time": - x.Time = nil - case "cosmos.evidence.v1beta1.Equivocation.power": - x.Power = int64(0) - case "cosmos.evidence.v1beta1.Equivocation.consensus_address": - x.ConsensusAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.Equivocation")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.Equivocation 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_Equivocation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.Equivocation.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.evidence.v1beta1.Equivocation.time": - value := x.Time - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.evidence.v1beta1.Equivocation.power": - value := x.Power - return protoreflect.ValueOfInt64(value) - case "cosmos.evidence.v1beta1.Equivocation.consensus_address": - value := x.ConsensusAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.Equivocation")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.Equivocation 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_Equivocation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.Equivocation.height": - x.Height = value.Int() - case "cosmos.evidence.v1beta1.Equivocation.time": - x.Time = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.evidence.v1beta1.Equivocation.power": - x.Power = value.Int() - case "cosmos.evidence.v1beta1.Equivocation.consensus_address": - x.ConsensusAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.Equivocation")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.Equivocation 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_Equivocation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.Equivocation.time": - if x.Time == nil { - x.Time = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - case "cosmos.evidence.v1beta1.Equivocation.height": - panic(fmt.Errorf("field height of message cosmos.evidence.v1beta1.Equivocation is not mutable")) - case "cosmos.evidence.v1beta1.Equivocation.power": - panic(fmt.Errorf("field power of message cosmos.evidence.v1beta1.Equivocation is not mutable")) - case "cosmos.evidence.v1beta1.Equivocation.consensus_address": - panic(fmt.Errorf("field consensus_address of message cosmos.evidence.v1beta1.Equivocation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.Equivocation")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.Equivocation 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_Equivocation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.Equivocation.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.evidence.v1beta1.Equivocation.time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.evidence.v1beta1.Equivocation.power": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.evidence.v1beta1.Equivocation.consensus_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.Equivocation")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.Equivocation 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_Equivocation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.Equivocation", 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_Equivocation) 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_Equivocation) 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_Equivocation) 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_Equivocation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Equivocation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Time != nil { - l = options.Size(x.Time) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Power != 0 { - n += 1 + runtime.Sov(uint64(x.Power)) - } - l = len(x.ConsensusAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Equivocation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ConsensusAddress) > 0 { - i -= len(x.ConsensusAddress) - copy(dAtA[i:], x.ConsensusAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConsensusAddress))) - i-- - dAtA[i] = 0x22 - } - if x.Power != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Power)) - i-- - dAtA[i] = 0x18 - } - if x.Time != nil { - encoded, err := options.Marshal(x.Time) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Equivocation) - 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: Equivocation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Equivocation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Time", 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.Time == nil { - x.Time = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - x.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", 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.ConsensusAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/evidence/v1beta1/evidence.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Equivocation implements the Evidence interface and defines evidence of double -// signing misbehavior. -type Equivocation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` - Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` - ConsensusAddress string `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"` -} - -func (x *Equivocation) Reset() { - *x = Equivocation{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_evidence_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Equivocation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Equivocation) ProtoMessage() {} - -// Deprecated: Use Equivocation.ProtoReflect.Descriptor instead. -func (*Equivocation) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_evidence_proto_rawDescGZIP(), []int{0} -} - -func (x *Equivocation) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Equivocation) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *Equivocation) GetPower() int64 { - if x != nil { - return x.Power - } - return 0 -} - -func (x *Equivocation) GetConsensusAddress() string { - if x != nil { - return x.ConsensusAddress - } - return "" -} - -var File_cosmos_evidence_v1beta1_evidence_proto protoreflect.FileDescriptor - -var file_cosmos_evidence_v1beta1_evidence_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x0c, 0x45, 0x71, 0x75, 0x69, 0x76, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, - 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x11, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 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, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x42, 0xf8, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0d, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x45, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_evidence_v1beta1_evidence_proto_rawDescOnce sync.Once - file_cosmos_evidence_v1beta1_evidence_proto_rawDescData = file_cosmos_evidence_v1beta1_evidence_proto_rawDesc -) - -func file_cosmos_evidence_v1beta1_evidence_proto_rawDescGZIP() []byte { - file_cosmos_evidence_v1beta1_evidence_proto_rawDescOnce.Do(func() { - file_cosmos_evidence_v1beta1_evidence_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evidence_v1beta1_evidence_proto_rawDescData) - }) - return file_cosmos_evidence_v1beta1_evidence_proto_rawDescData -} - -var file_cosmos_evidence_v1beta1_evidence_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_evidence_v1beta1_evidence_proto_goTypes = []interface{}{ - (*Equivocation)(nil), // 0: cosmos.evidence.v1beta1.Equivocation - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp -} -var file_cosmos_evidence_v1beta1_evidence_proto_depIdxs = []int32{ - 1, // 0: cosmos.evidence.v1beta1.Equivocation.time:type_name -> google.protobuf.Timestamp - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_evidence_v1beta1_evidence_proto_init() } -func file_cosmos_evidence_v1beta1_evidence_proto_init() { - if File_cosmos_evidence_v1beta1_evidence_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_evidence_v1beta1_evidence_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Equivocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_evidence_v1beta1_evidence_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_evidence_v1beta1_evidence_proto_goTypes, - DependencyIndexes: file_cosmos_evidence_v1beta1_evidence_proto_depIdxs, - MessageInfos: file_cosmos_evidence_v1beta1_evidence_proto_msgTypes, - }.Build() - File_cosmos_evidence_v1beta1_evidence_proto = out.File - file_cosmos_evidence_v1beta1_evidence_proto_rawDesc = nil - file_cosmos_evidence_v1beta1_evidence_proto_goTypes = nil - file_cosmos_evidence_v1beta1_evidence_proto_depIdxs = nil -} diff --git a/api/cosmos/evidence/v1beta1/genesis.pulsar.go b/api/cosmos/evidence/v1beta1/genesis.pulsar.go deleted file mode 100644 index b862fa7d6dfa..000000000000 --- a/api/cosmos/evidence/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,654 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package evidencev1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[]*anypb.Any -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_evidence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_evidence_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_evidence = md_GenesisState.Fields().ByName("evidence") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Evidence) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Evidence}) - if !f(fd_GenesisState_evidence, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.GenesisState.evidence": - return len(x.Evidence) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.GenesisState.evidence": - x.Evidence = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.GenesisState.evidence": - if len(x.Evidence) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.Evidence} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.GenesisState.evidence": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.Evidence = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.GenesisState.evidence": - if x.Evidence == nil { - x.Evidence = []*anypb.Any{} - } - value := &_GenesisState_1_list{list: &x.Evidence} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.GenesisState.evidence": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Evidence) > 0 { - for _, e := range x.Evidence { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Evidence) > 0 { - for iNdEx := len(x.Evidence) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Evidence[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Evidence = append(x.Evidence, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence[len(x.Evidence)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/evidence/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the evidence module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // evidence defines all the evidence at genesis. - Evidence []*anypb.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetEvidence() []*anypb.Any { - if x != nil { - return x.Evidence - } - return nil -} - -var File_cosmos_evidence_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_evidence_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x65, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 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, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x42, 0xf3, 0x01, - 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x45, 0x58, 0xaa, 0x02, 0x17, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x69, 0x64, 0x65, - 0x6e, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_evidence_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_evidence_v1beta1_genesis_proto_rawDescData = file_cosmos_evidence_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_evidence_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_evidence_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_evidence_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evidence_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_evidence_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_evidence_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_evidence_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.evidence.v1beta1.GenesisState - (*anypb.Any)(nil), // 1: google.protobuf.Any -} -var file_cosmos_evidence_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.evidence.v1beta1.GenesisState.evidence:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_evidence_v1beta1_genesis_proto_init() } -func file_cosmos_evidence_v1beta1_genesis_proto_init() { - if File_cosmos_evidence_v1beta1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_evidence_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_evidence_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_evidence_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_evidence_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_evidence_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_evidence_v1beta1_genesis_proto = out.File - file_cosmos_evidence_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_evidence_v1beta1_genesis_proto_goTypes = nil - file_cosmos_evidence_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/evidence/v1beta1/query.pulsar.go b/api/cosmos/evidence/v1beta1/query.pulsar.go deleted file mode 100644 index 2c142859f3fc..000000000000 --- a/api/cosmos/evidence/v1beta1/query.pulsar.go +++ /dev/null @@ -1,2249 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package evidencev1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryEvidenceRequest protoreflect.MessageDescriptor - fd_QueryEvidenceRequest_evidence_hash protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_query_proto_init() - md_QueryEvidenceRequest = File_cosmos_evidence_v1beta1_query_proto.Messages().ByName("QueryEvidenceRequest") - fd_QueryEvidenceRequest_evidence_hash = md_QueryEvidenceRequest.Fields().ByName("evidence_hash") -} - -var _ protoreflect.Message = (*fastReflection_QueryEvidenceRequest)(nil) - -type fastReflection_QueryEvidenceRequest QueryEvidenceRequest - -func (x *QueryEvidenceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryEvidenceRequest)(x) -} - -func (x *QueryEvidenceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryEvidenceRequest_messageType fastReflection_QueryEvidenceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryEvidenceRequest_messageType{} - -type fastReflection_QueryEvidenceRequest_messageType struct{} - -func (x fastReflection_QueryEvidenceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryEvidenceRequest)(nil) -} -func (x fastReflection_QueryEvidenceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryEvidenceRequest) -} -func (x fastReflection_QueryEvidenceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEvidenceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryEvidenceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEvidenceRequest -} - -// 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_QueryEvidenceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryEvidenceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryEvidenceRequest) New() protoreflect.Message { - return new(fastReflection_QueryEvidenceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryEvidenceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryEvidenceRequest)(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_QueryEvidenceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.EvidenceHash) != 0 { - value := protoreflect.ValueOfBytes(x.EvidenceHash) - if !f(fd_QueryEvidenceRequest_evidence_hash, 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_QueryEvidenceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceRequest.evidence_hash": - return len(x.EvidenceHash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceRequest 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_QueryEvidenceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceRequest.evidence_hash": - x.EvidenceHash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceRequest 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_QueryEvidenceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceRequest.evidence_hash": - value := x.EvidenceHash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceRequest 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_QueryEvidenceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceRequest.evidence_hash": - x.EvidenceHash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceRequest 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_QueryEvidenceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceRequest.evidence_hash": - panic(fmt.Errorf("field evidence_hash of message cosmos.evidence.v1beta1.QueryEvidenceRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceRequest 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_QueryEvidenceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceRequest.evidence_hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceRequest 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_QueryEvidenceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.QueryEvidenceRequest", 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_QueryEvidenceRequest) 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_QueryEvidenceRequest) 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_QueryEvidenceRequest) 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_QueryEvidenceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryEvidenceRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.EvidenceHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryEvidenceRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.EvidenceHash) > 0 { - i -= len(x.EvidenceHash) - copy(dAtA[i:], x.EvidenceHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EvidenceHash))) - 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().(*QueryEvidenceRequest) - 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: QueryEvidenceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEvidenceRequest: 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 EvidenceHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EvidenceHash = append(x.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) - if x.EvidenceHash == nil { - x.EvidenceHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryEvidenceResponse protoreflect.MessageDescriptor - fd_QueryEvidenceResponse_evidence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_query_proto_init() - md_QueryEvidenceResponse = File_cosmos_evidence_v1beta1_query_proto.Messages().ByName("QueryEvidenceResponse") - fd_QueryEvidenceResponse_evidence = md_QueryEvidenceResponse.Fields().ByName("evidence") -} - -var _ protoreflect.Message = (*fastReflection_QueryEvidenceResponse)(nil) - -type fastReflection_QueryEvidenceResponse QueryEvidenceResponse - -func (x *QueryEvidenceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryEvidenceResponse)(x) -} - -func (x *QueryEvidenceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryEvidenceResponse_messageType fastReflection_QueryEvidenceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryEvidenceResponse_messageType{} - -type fastReflection_QueryEvidenceResponse_messageType struct{} - -func (x fastReflection_QueryEvidenceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryEvidenceResponse)(nil) -} -func (x fastReflection_QueryEvidenceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryEvidenceResponse) -} -func (x fastReflection_QueryEvidenceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEvidenceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryEvidenceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEvidenceResponse -} - -// 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_QueryEvidenceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryEvidenceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryEvidenceResponse) New() protoreflect.Message { - return new(fastReflection_QueryEvidenceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryEvidenceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryEvidenceResponse)(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_QueryEvidenceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_QueryEvidenceResponse_evidence, 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_QueryEvidenceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence": - return x.Evidence != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceResponse 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_QueryEvidenceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence": - x.Evidence = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceResponse 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_QueryEvidenceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceResponse 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_QueryEvidenceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence": - x.Evidence = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceResponse 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_QueryEvidenceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence": - if x.Evidence == nil { - x.Evidence = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceResponse 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_QueryEvidenceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryEvidenceResponse 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_QueryEvidenceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.QueryEvidenceResponse", 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_QueryEvidenceResponse) 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_QueryEvidenceResponse) 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_QueryEvidenceResponse) 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_QueryEvidenceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryEvidenceResponse) - 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.Evidence != nil { - l = options.Size(x.Evidence) - 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().(*QueryEvidenceResponse) - 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.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - 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().(*QueryEvidenceResponse) - 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: QueryEvidenceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEvidenceResponse: 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 Evidence", 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.Evidence == nil { - x.Evidence = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); 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_QueryAllEvidenceRequest protoreflect.MessageDescriptor - fd_QueryAllEvidenceRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_query_proto_init() - md_QueryAllEvidenceRequest = File_cosmos_evidence_v1beta1_query_proto.Messages().ByName("QueryAllEvidenceRequest") - fd_QueryAllEvidenceRequest_pagination = md_QueryAllEvidenceRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllEvidenceRequest)(nil) - -type fastReflection_QueryAllEvidenceRequest QueryAllEvidenceRequest - -func (x *QueryAllEvidenceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllEvidenceRequest)(x) -} - -func (x *QueryAllEvidenceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllEvidenceRequest_messageType fastReflection_QueryAllEvidenceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllEvidenceRequest_messageType{} - -type fastReflection_QueryAllEvidenceRequest_messageType struct{} - -func (x fastReflection_QueryAllEvidenceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllEvidenceRequest)(nil) -} -func (x fastReflection_QueryAllEvidenceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllEvidenceRequest) -} -func (x fastReflection_QueryAllEvidenceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEvidenceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllEvidenceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEvidenceRequest -} - -// 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_QueryAllEvidenceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllEvidenceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllEvidenceRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllEvidenceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllEvidenceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllEvidenceRequest)(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_QueryAllEvidenceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllEvidenceRequest_pagination, 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_QueryAllEvidenceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceRequest 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_QueryAllEvidenceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceRequest 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_QueryAllEvidenceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceRequest 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_QueryAllEvidenceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceRequest 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_QueryAllEvidenceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceRequest 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_QueryAllEvidenceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceRequest")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceRequest 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_QueryAllEvidenceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.QueryAllEvidenceRequest", 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_QueryAllEvidenceRequest) 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_QueryAllEvidenceRequest) 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_QueryAllEvidenceRequest) 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_QueryAllEvidenceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllEvidenceRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllEvidenceRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QueryAllEvidenceRequest) - 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: QueryAllEvidenceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEvidenceRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllEvidenceResponse_1_list)(nil) - -type _QueryAllEvidenceResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_QueryAllEvidenceResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllEvidenceResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllEvidenceResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllEvidenceResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllEvidenceResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllEvidenceResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllEvidenceResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllEvidenceResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllEvidenceResponse protoreflect.MessageDescriptor - fd_QueryAllEvidenceResponse_evidence protoreflect.FieldDescriptor - fd_QueryAllEvidenceResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_query_proto_init() - md_QueryAllEvidenceResponse = File_cosmos_evidence_v1beta1_query_proto.Messages().ByName("QueryAllEvidenceResponse") - fd_QueryAllEvidenceResponse_evidence = md_QueryAllEvidenceResponse.Fields().ByName("evidence") - fd_QueryAllEvidenceResponse_pagination = md_QueryAllEvidenceResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllEvidenceResponse)(nil) - -type fastReflection_QueryAllEvidenceResponse QueryAllEvidenceResponse - -func (x *QueryAllEvidenceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllEvidenceResponse)(x) -} - -func (x *QueryAllEvidenceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllEvidenceResponse_messageType fastReflection_QueryAllEvidenceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllEvidenceResponse_messageType{} - -type fastReflection_QueryAllEvidenceResponse_messageType struct{} - -func (x fastReflection_QueryAllEvidenceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllEvidenceResponse)(nil) -} -func (x fastReflection_QueryAllEvidenceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllEvidenceResponse) -} -func (x fastReflection_QueryAllEvidenceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEvidenceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllEvidenceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEvidenceResponse -} - -// 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_QueryAllEvidenceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllEvidenceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllEvidenceResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllEvidenceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllEvidenceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllEvidenceResponse)(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_QueryAllEvidenceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Evidence) != 0 { - value := protoreflect.ValueOfList(&_QueryAllEvidenceResponse_1_list{list: &x.Evidence}) - if !f(fd_QueryAllEvidenceResponse_evidence, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllEvidenceResponse_pagination, 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_QueryAllEvidenceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence": - return len(x.Evidence) != 0 - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceResponse 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_QueryAllEvidenceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence": - x.Evidence = nil - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceResponse 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_QueryAllEvidenceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence": - if len(x.Evidence) == 0 { - return protoreflect.ValueOfList(&_QueryAllEvidenceResponse_1_list{}) - } - listValue := &_QueryAllEvidenceResponse_1_list{list: &x.Evidence} - return protoreflect.ValueOfList(listValue) - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceResponse 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_QueryAllEvidenceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence": - lv := value.List() - clv := lv.(*_QueryAllEvidenceResponse_1_list) - x.Evidence = *clv.list - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceResponse 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_QueryAllEvidenceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence": - if x.Evidence == nil { - x.Evidence = []*anypb.Any{} - } - value := &_QueryAllEvidenceResponse_1_list{list: &x.Evidence} - return protoreflect.ValueOfList(value) - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceResponse 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_QueryAllEvidenceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_QueryAllEvidenceResponse_1_list{list: &list}) - case "cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.QueryAllEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.QueryAllEvidenceResponse 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_QueryAllEvidenceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.QueryAllEvidenceResponse", 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_QueryAllEvidenceResponse) 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_QueryAllEvidenceResponse) 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_QueryAllEvidenceResponse) 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_QueryAllEvidenceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllEvidenceResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Evidence) > 0 { - for _, e := range x.Evidence { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllEvidenceResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Evidence) > 0 { - for iNdEx := len(x.Evidence) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Evidence[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEvidenceResponse) - 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: QueryAllEvidenceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEvidenceResponse: 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 Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Evidence = append(x.Evidence, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence[len(x.Evidence)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/evidence/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -type QueryEvidenceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // evidence_hash defines the hash of the requested evidence. - EvidenceHash []byte `protobuf:"bytes,1,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` -} - -func (x *QueryEvidenceRequest) Reset() { - *x = QueryEvidenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEvidenceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEvidenceRequest) ProtoMessage() {} - -// Deprecated: Use QueryEvidenceRequest.ProtoReflect.Descriptor instead. -func (*QueryEvidenceRequest) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryEvidenceRequest) GetEvidenceHash() []byte { - if x != nil { - return x.EvidenceHash - } - return nil -} - -// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -type QueryEvidenceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // evidence returns the requested evidence. - Evidence *anypb.Any `protobuf:"bytes,1,opt,name=evidence,proto3" json:"evidence,omitempty"` -} - -func (x *QueryEvidenceResponse) Reset() { - *x = QueryEvidenceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEvidenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEvidenceResponse) ProtoMessage() {} - -// Deprecated: Use QueryEvidenceResponse.ProtoReflect.Descriptor instead. -func (*QueryEvidenceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryEvidenceResponse) GetEvidence() *anypb.Any { - if x != nil { - return x.Evidence - } - return nil -} - -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -// method. -type QueryAllEvidenceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllEvidenceRequest) Reset() { - *x = QueryAllEvidenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllEvidenceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllEvidenceRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllEvidenceRequest.ProtoReflect.Descriptor instead. -func (*QueryAllEvidenceRequest) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAllEvidenceRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -// method. -type QueryAllEvidenceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // evidence returns all evidences. - Evidence []*anypb.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllEvidenceResponse) Reset() { - *x = QueryAllEvidenceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllEvidenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllEvidenceResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllEvidenceResponse.ProtoReflect.Descriptor instead. -func (*QueryAllEvidenceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryAllEvidenceResponse) GetEvidence() []*anypb.Any { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *QueryAllEvidenceResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_evidence_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_evidence_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, - 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x75, 0x0a, 0x14, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x5d, 0x0a, 0x0d, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0xfa, 0xde, 0x1f, 0x34, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x6c, - 0x69, 0x62, 0x73, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x52, 0x0c, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x61, 0x73, 0x68, - 0x22, 0x49, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 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, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x17, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x95, - 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x69, 0x64, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x65, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 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, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xce, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0xa4, 0x01, 0x0a, 0x08, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, - 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x45, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, - 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x42, 0xf1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x45, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x45, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_evidence_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_evidence_v1beta1_query_proto_rawDescData = file_cosmos_evidence_v1beta1_query_proto_rawDesc -) - -func file_cosmos_evidence_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_evidence_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_evidence_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evidence_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_evidence_v1beta1_query_proto_rawDescData -} - -var file_cosmos_evidence_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_evidence_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryEvidenceRequest)(nil), // 0: cosmos.evidence.v1beta1.QueryEvidenceRequest - (*QueryEvidenceResponse)(nil), // 1: cosmos.evidence.v1beta1.QueryEvidenceResponse - (*QueryAllEvidenceRequest)(nil), // 2: cosmos.evidence.v1beta1.QueryAllEvidenceRequest - (*QueryAllEvidenceResponse)(nil), // 3: cosmos.evidence.v1beta1.QueryAllEvidenceResponse - (*anypb.Any)(nil), // 4: google.protobuf.Any - (*v1beta1.PageRequest)(nil), // 5: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 6: cosmos.base.query.v1beta1.PageResponse -} -var file_cosmos_evidence_v1beta1_query_proto_depIdxs = []int32{ - 4, // 0: cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence:type_name -> google.protobuf.Any - 5, // 1: cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 4, // 2: cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence:type_name -> google.protobuf.Any - 6, // 3: cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 4: cosmos.evidence.v1beta1.Query.Evidence:input_type -> cosmos.evidence.v1beta1.QueryEvidenceRequest - 2, // 5: cosmos.evidence.v1beta1.Query.AllEvidence:input_type -> cosmos.evidence.v1beta1.QueryAllEvidenceRequest - 1, // 6: cosmos.evidence.v1beta1.Query.Evidence:output_type -> cosmos.evidence.v1beta1.QueryEvidenceResponse - 3, // 7: cosmos.evidence.v1beta1.Query.AllEvidence:output_type -> cosmos.evidence.v1beta1.QueryAllEvidenceResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_cosmos_evidence_v1beta1_query_proto_init() } -func file_cosmos_evidence_v1beta1_query_proto_init() { - if File_cosmos_evidence_v1beta1_query_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_evidence_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEvidenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_evidence_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEvidenceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_evidence_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllEvidenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_evidence_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllEvidenceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_evidence_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_evidence_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_evidence_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_evidence_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_evidence_v1beta1_query_proto = out.File - file_cosmos_evidence_v1beta1_query_proto_rawDesc = nil - file_cosmos_evidence_v1beta1_query_proto_goTypes = nil - file_cosmos_evidence_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/evidence/v1beta1/query_grpc.pb.go b/api/cosmos/evidence/v1beta1/query_grpc.pb.go deleted file mode 100644 index 44326504f42f..000000000000 --- a/api/cosmos/evidence/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/evidence/v1beta1/query.proto - -package evidencev1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Evidence queries evidence based on evidence hash. - Evidence(ctx context.Context, in *QueryEvidenceRequest, opts ...grpc.CallOption) (*QueryEvidenceResponse, error) - // AllEvidence queries all evidence. - AllEvidence(ctx context.Context, in *QueryAllEvidenceRequest, opts ...grpc.CallOption) (*QueryAllEvidenceResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Evidence(ctx context.Context, in *QueryEvidenceRequest, opts ...grpc.CallOption) (*QueryEvidenceResponse, error) { - out := new(QueryEvidenceResponse) - err := c.cc.Invoke(ctx, "/cosmos.evidence.v1beta1.Query/Evidence", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllEvidence(ctx context.Context, in *QueryAllEvidenceRequest, opts ...grpc.CallOption) (*QueryAllEvidenceResponse, error) { - out := new(QueryAllEvidenceResponse) - err := c.cc.Invoke(ctx, "/cosmos.evidence.v1beta1.Query/AllEvidence", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Evidence queries evidence based on evidence hash. - Evidence(context.Context, *QueryEvidenceRequest) (*QueryEvidenceResponse, error) - // AllEvidence queries all evidence. - AllEvidence(context.Context, *QueryAllEvidenceRequest) (*QueryAllEvidenceResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Evidence(context.Context, *QueryEvidenceRequest) (*QueryEvidenceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Evidence not implemented") -} -func (UnimplementedQueryServer) AllEvidence(context.Context, *QueryAllEvidenceRequest) (*QueryAllEvidenceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllEvidence not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Evidence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEvidenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Evidence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.evidence.v1beta1.Query/Evidence", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Evidence(ctx, req.(*QueryEvidenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllEvidence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllEvidenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllEvidence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.evidence.v1beta1.Query/AllEvidence", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllEvidence(ctx, req.(*QueryAllEvidenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.evidence.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Evidence", - Handler: _Query_Evidence_Handler, - }, - { - MethodName: "AllEvidence", - Handler: _Query_AllEvidence_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/evidence/v1beta1/query.proto", -} diff --git a/api/cosmos/evidence/v1beta1/tx.pulsar.go b/api/cosmos/evidence/v1beta1/tx.pulsar.go deleted file mode 100644 index ea8fc10499d1..000000000000 --- a/api/cosmos/evidence/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,1165 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package evidencev1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_MsgSubmitEvidence protoreflect.MessageDescriptor - fd_MsgSubmitEvidence_submitter protoreflect.FieldDescriptor - fd_MsgSubmitEvidence_evidence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_tx_proto_init() - md_MsgSubmitEvidence = File_cosmos_evidence_v1beta1_tx_proto.Messages().ByName("MsgSubmitEvidence") - fd_MsgSubmitEvidence_submitter = md_MsgSubmitEvidence.Fields().ByName("submitter") - fd_MsgSubmitEvidence_evidence = md_MsgSubmitEvidence.Fields().ByName("evidence") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitEvidence)(nil) - -type fastReflection_MsgSubmitEvidence MsgSubmitEvidence - -func (x *MsgSubmitEvidence) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitEvidence)(x) -} - -func (x *MsgSubmitEvidence) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitEvidence_messageType fastReflection_MsgSubmitEvidence_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitEvidence_messageType{} - -type fastReflection_MsgSubmitEvidence_messageType struct{} - -func (x fastReflection_MsgSubmitEvidence_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitEvidence)(nil) -} -func (x fastReflection_MsgSubmitEvidence_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitEvidence) -} -func (x fastReflection_MsgSubmitEvidence_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitEvidence -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitEvidence) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitEvidence -} - -// 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_MsgSubmitEvidence) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitEvidence_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitEvidence) New() protoreflect.Message { - return new(fastReflection_MsgSubmitEvidence) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitEvidence) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitEvidence)(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_MsgSubmitEvidence) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Submitter != "" { - value := protoreflect.ValueOfString(x.Submitter) - if !f(fd_MsgSubmitEvidence_submitter, value) { - return - } - } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_MsgSubmitEvidence_evidence, 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_MsgSubmitEvidence) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.submitter": - return x.Submitter != "" - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence": - return x.Evidence != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidence")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidence 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_MsgSubmitEvidence) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.submitter": - x.Submitter = "" - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence": - x.Evidence = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidence")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidence 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_MsgSubmitEvidence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.submitter": - value := x.Submitter - return protoreflect.ValueOfString(value) - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidence")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidence 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_MsgSubmitEvidence) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.submitter": - x.Submitter = value.Interface().(string) - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence": - x.Evidence = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidence")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidence 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_MsgSubmitEvidence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence": - if x.Evidence == nil { - x.Evidence = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.submitter": - panic(fmt.Errorf("field submitter of message cosmos.evidence.v1beta1.MsgSubmitEvidence is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidence")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidence 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_MsgSubmitEvidence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.submitter": - return protoreflect.ValueOfString("") - case "cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidence")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidence 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_MsgSubmitEvidence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.MsgSubmitEvidence", 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_MsgSubmitEvidence) 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_MsgSubmitEvidence) 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_MsgSubmitEvidence) 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_MsgSubmitEvidence) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitEvidence) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Submitter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - 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().(*MsgSubmitEvidence) - 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.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Submitter) > 0 { - i -= len(x.Submitter) - copy(dAtA[i:], x.Submitter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Submitter))) - 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().(*MsgSubmitEvidence) - 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: MsgSubmitEvidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitEvidence: 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 Submitter", 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.Submitter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", 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.Evidence == nil { - x.Evidence = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); 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_MsgSubmitEvidenceResponse protoreflect.MessageDescriptor - fd_MsgSubmitEvidenceResponse_hash protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_evidence_v1beta1_tx_proto_init() - md_MsgSubmitEvidenceResponse = File_cosmos_evidence_v1beta1_tx_proto.Messages().ByName("MsgSubmitEvidenceResponse") - fd_MsgSubmitEvidenceResponse_hash = md_MsgSubmitEvidenceResponse.Fields().ByName("hash") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitEvidenceResponse)(nil) - -type fastReflection_MsgSubmitEvidenceResponse MsgSubmitEvidenceResponse - -func (x *MsgSubmitEvidenceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitEvidenceResponse)(x) -} - -func (x *MsgSubmitEvidenceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_evidence_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitEvidenceResponse_messageType fastReflection_MsgSubmitEvidenceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitEvidenceResponse_messageType{} - -type fastReflection_MsgSubmitEvidenceResponse_messageType struct{} - -func (x fastReflection_MsgSubmitEvidenceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitEvidenceResponse)(nil) -} -func (x fastReflection_MsgSubmitEvidenceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitEvidenceResponse) -} -func (x fastReflection_MsgSubmitEvidenceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitEvidenceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitEvidenceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitEvidenceResponse -} - -// 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_MsgSubmitEvidenceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitEvidenceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitEvidenceResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitEvidenceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitEvidenceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitEvidenceResponse)(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_MsgSubmitEvidenceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_MsgSubmitEvidenceResponse_hash, 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_MsgSubmitEvidenceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.hash": - return len(x.Hash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse 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_MsgSubmitEvidenceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.hash": - x.Hash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse 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_MsgSubmitEvidenceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse 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_MsgSubmitEvidenceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.hash": - x.Hash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse 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_MsgSubmitEvidenceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.hash": - panic(fmt.Errorf("field hash of message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse 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_MsgSubmitEvidenceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")) - } - panic(fmt.Errorf("message cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse 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_MsgSubmitEvidenceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse", 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_MsgSubmitEvidenceResponse) 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_MsgSubmitEvidenceResponse) 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_MsgSubmitEvidenceResponse) 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_MsgSubmitEvidenceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitEvidenceResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*MsgSubmitEvidenceResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0x22 - } - 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().(*MsgSubmitEvidenceResponse) - 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: MsgSubmitEvidenceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitEvidenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/evidence/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSubmitEvidence represents a message that supports submitting arbitrary -// Evidence of misbehavior such as equivocation or counterfactual signing. -type MsgSubmitEvidence struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"` - Evidence *anypb.Any `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` -} - -func (x *MsgSubmitEvidence) Reset() { - *x = MsgSubmitEvidence{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitEvidence) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitEvidence) ProtoMessage() {} - -// Deprecated: Use MsgSubmitEvidence.ProtoReflect.Descriptor instead. -func (*MsgSubmitEvidence) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSubmitEvidence) GetSubmitter() string { - if x != nil { - return x.Submitter - } - return "" -} - -func (x *MsgSubmitEvidence) GetEvidence() *anypb.Any { - if x != nil { - return x.Evidence - } - return nil -} - -// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -type MsgSubmitEvidenceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // hash defines the hash of the evidence. - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (x *MsgSubmitEvidenceResponse) Reset() { - *x = MsgSubmitEvidenceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_evidence_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitEvidenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitEvidenceResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitEvidenceResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitEvidenceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_evidence_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgSubmitEvidenceResponse) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -var File_cosmos_evidence_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_evidence_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, - 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x45, 0x76, - 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x3e, - 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 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, 0x45, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x3a, 0x16, - 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x32, 0x77, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, - 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xf2, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x45, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_evidence_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_evidence_v1beta1_tx_proto_rawDescData = file_cosmos_evidence_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_evidence_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_evidence_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_evidence_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evidence_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_evidence_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_evidence_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_evidence_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitEvidence)(nil), // 0: cosmos.evidence.v1beta1.MsgSubmitEvidence - (*MsgSubmitEvidenceResponse)(nil), // 1: cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse - (*anypb.Any)(nil), // 2: google.protobuf.Any -} -var file_cosmos_evidence_v1beta1_tx_proto_depIdxs = []int32{ - 2, // 0: cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence:type_name -> google.protobuf.Any - 0, // 1: cosmos.evidence.v1beta1.Msg.SubmitEvidence:input_type -> cosmos.evidence.v1beta1.MsgSubmitEvidence - 1, // 2: cosmos.evidence.v1beta1.Msg.SubmitEvidence:output_type -> cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_evidence_v1beta1_tx_proto_init() } -func file_cosmos_evidence_v1beta1_tx_proto_init() { - if File_cosmos_evidence_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_evidence_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitEvidence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_evidence_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitEvidenceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_evidence_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_evidence_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_evidence_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_evidence_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_evidence_v1beta1_tx_proto = out.File - file_cosmos_evidence_v1beta1_tx_proto_rawDesc = nil - file_cosmos_evidence_v1beta1_tx_proto_goTypes = nil - file_cosmos_evidence_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/evidence/v1beta1/tx_grpc.pb.go b/api/cosmos/evidence/v1beta1/tx_grpc.pb.go deleted file mode 100644 index 18539c537b0c..000000000000 --- a/api/cosmos/evidence/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/evidence/v1beta1/tx.proto - -package evidencev1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - // counterfactual signing. - SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, opts ...grpc.CallOption) (*MsgSubmitEvidenceResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, opts ...grpc.CallOption) (*MsgSubmitEvidenceResponse, error) { - out := new(MsgSubmitEvidenceResponse) - err := c.cc.Invoke(ctx, "/cosmos.evidence.v1beta1.Msg/SubmitEvidence", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - // counterfactual signing. - SubmitEvidence(context.Context, *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) SubmitEvidence(context.Context, *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitEvidence not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_SubmitEvidence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitEvidence) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitEvidence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.evidence.v1beta1.Msg/SubmitEvidence", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitEvidence(ctx, req.(*MsgSubmitEvidence)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.evidence.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitEvidence", - Handler: _Msg_SubmitEvidence_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/evidence/v1beta1/tx.proto", -} diff --git a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go deleted file mode 100644 index 4136d147cf2f..000000000000 --- a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go +++ /dev/null @@ -1,3043 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package feegrantv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_BasicAllowance_1_list)(nil) - -type _BasicAllowance_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_BasicAllowance_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BasicAllowance_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BasicAllowance_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_BasicAllowance_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BasicAllowance_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BasicAllowance_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BasicAllowance_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BasicAllowance_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_BasicAllowance protoreflect.MessageDescriptor - fd_BasicAllowance_spend_limit protoreflect.FieldDescriptor - fd_BasicAllowance_expiration protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_BasicAllowance = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("BasicAllowance") - fd_BasicAllowance_spend_limit = md_BasicAllowance.Fields().ByName("spend_limit") - fd_BasicAllowance_expiration = md_BasicAllowance.Fields().ByName("expiration") -} - -var _ protoreflect.Message = (*fastReflection_BasicAllowance)(nil) - -type fastReflection_BasicAllowance BasicAllowance - -func (x *BasicAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_BasicAllowance)(x) -} - -func (x *BasicAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BasicAllowance_messageType fastReflection_BasicAllowance_messageType -var _ protoreflect.MessageType = fastReflection_BasicAllowance_messageType{} - -type fastReflection_BasicAllowance_messageType struct{} - -func (x fastReflection_BasicAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_BasicAllowance)(nil) -} -func (x fastReflection_BasicAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_BasicAllowance) -} -func (x fastReflection_BasicAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BasicAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BasicAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_BasicAllowance -} - -// 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_BasicAllowance) Type() protoreflect.MessageType { - return _fastReflection_BasicAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BasicAllowance) New() protoreflect.Message { - return new(fastReflection_BasicAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BasicAllowance) Interface() protoreflect.ProtoMessage { - return (*BasicAllowance)(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_BasicAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SpendLimit) != 0 { - value := protoreflect.ValueOfList(&_BasicAllowance_1_list{list: &x.SpendLimit}) - if !f(fd_BasicAllowance_spend_limit, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_BasicAllowance_expiration, 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_BasicAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - return len(x.SpendLimit) != 0 - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - return x.Expiration != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - x.SpendLimit = nil - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - x.Expiration = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - if len(x.SpendLimit) == 0 { - return protoreflect.ValueOfList(&_BasicAllowance_1_list{}) - } - listValue := &_BasicAllowance_1_list{list: &x.SpendLimit} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - lv := value.List() - clv := lv.(*_BasicAllowance_1_list) - x.SpendLimit = *clv.list - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - if x.SpendLimit == nil { - x.SpendLimit = []*v1beta1.Coin{} - } - value := &_BasicAllowance_1_list{list: &x.SpendLimit} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_BasicAllowance_1_list{list: &list}) - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.BasicAllowance", 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_BasicAllowance) 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_BasicAllowance) 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_BasicAllowance) 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_BasicAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BasicAllowance) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SpendLimit) > 0 { - for _, e := range x.SpendLimit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Expiration != nil { - l = options.Size(x.Expiration) - 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().(*BasicAllowance) - 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.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.SpendLimit) > 0 { - for iNdEx := len(x.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SpendLimit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BasicAllowance) - 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: BasicAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BasicAllowance: 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 SpendLimit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SpendLimit = append(x.SpendLimit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SpendLimit[len(x.SpendLimit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", 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.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_PeriodicAllowance_3_list)(nil) - -type _PeriodicAllowance_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_PeriodicAllowance_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_PeriodicAllowance_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_PeriodicAllowance_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_PeriodicAllowance_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_PeriodicAllowance_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_PeriodicAllowance_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_PeriodicAllowance_4_list)(nil) - -type _PeriodicAllowance_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_PeriodicAllowance_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_PeriodicAllowance_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_PeriodicAllowance_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_PeriodicAllowance_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_PeriodicAllowance_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_PeriodicAllowance_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_PeriodicAllowance protoreflect.MessageDescriptor - fd_PeriodicAllowance_basic protoreflect.FieldDescriptor - fd_PeriodicAllowance_period protoreflect.FieldDescriptor - fd_PeriodicAllowance_period_spend_limit protoreflect.FieldDescriptor - fd_PeriodicAllowance_period_can_spend protoreflect.FieldDescriptor - fd_PeriodicAllowance_period_reset protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_PeriodicAllowance = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("PeriodicAllowance") - fd_PeriodicAllowance_basic = md_PeriodicAllowance.Fields().ByName("basic") - fd_PeriodicAllowance_period = md_PeriodicAllowance.Fields().ByName("period") - fd_PeriodicAllowance_period_spend_limit = md_PeriodicAllowance.Fields().ByName("period_spend_limit") - fd_PeriodicAllowance_period_can_spend = md_PeriodicAllowance.Fields().ByName("period_can_spend") - fd_PeriodicAllowance_period_reset = md_PeriodicAllowance.Fields().ByName("period_reset") -} - -var _ protoreflect.Message = (*fastReflection_PeriodicAllowance)(nil) - -type fastReflection_PeriodicAllowance PeriodicAllowance - -func (x *PeriodicAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_PeriodicAllowance)(x) -} - -func (x *PeriodicAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PeriodicAllowance_messageType fastReflection_PeriodicAllowance_messageType -var _ protoreflect.MessageType = fastReflection_PeriodicAllowance_messageType{} - -type fastReflection_PeriodicAllowance_messageType struct{} - -func (x fastReflection_PeriodicAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_PeriodicAllowance)(nil) -} -func (x fastReflection_PeriodicAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_PeriodicAllowance) -} -func (x fastReflection_PeriodicAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PeriodicAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PeriodicAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_PeriodicAllowance -} - -// 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_PeriodicAllowance) Type() protoreflect.MessageType { - return _fastReflection_PeriodicAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PeriodicAllowance) New() protoreflect.Message { - return new(fastReflection_PeriodicAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PeriodicAllowance) Interface() protoreflect.ProtoMessage { - return (*PeriodicAllowance)(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_PeriodicAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Basic != nil { - value := protoreflect.ValueOfMessage(x.Basic.ProtoReflect()) - if !f(fd_PeriodicAllowance_basic, value) { - return - } - } - if x.Period != nil { - value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) - if !f(fd_PeriodicAllowance_period, value) { - return - } - } - if len(x.PeriodSpendLimit) != 0 { - value := protoreflect.ValueOfList(&_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit}) - if !f(fd_PeriodicAllowance_period_spend_limit, value) { - return - } - } - if len(x.PeriodCanSpend) != 0 { - value := protoreflect.ValueOfList(&_PeriodicAllowance_4_list{list: &x.PeriodCanSpend}) - if !f(fd_PeriodicAllowance_period_can_spend, value) { - return - } - } - if x.PeriodReset != nil { - value := protoreflect.ValueOfMessage(x.PeriodReset.ProtoReflect()) - if !f(fd_PeriodicAllowance_period_reset, 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_PeriodicAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - return x.Basic != nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - return x.Period != nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - return len(x.PeriodSpendLimit) != 0 - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - return len(x.PeriodCanSpend) != 0 - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - return x.PeriodReset != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - x.Basic = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - x.Period = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - x.PeriodSpendLimit = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - x.PeriodCanSpend = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - x.PeriodReset = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - value := x.Basic - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - value := x.Period - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - if len(x.PeriodSpendLimit) == 0 { - return protoreflect.ValueOfList(&_PeriodicAllowance_3_list{}) - } - listValue := &_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - if len(x.PeriodCanSpend) == 0 { - return protoreflect.ValueOfList(&_PeriodicAllowance_4_list{}) - } - listValue := &_PeriodicAllowance_4_list{list: &x.PeriodCanSpend} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - value := x.PeriodReset - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - x.Basic = value.Message().Interface().(*BasicAllowance) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - x.Period = value.Message().Interface().(*durationpb.Duration) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - lv := value.List() - clv := lv.(*_PeriodicAllowance_3_list) - x.PeriodSpendLimit = *clv.list - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - lv := value.List() - clv := lv.(*_PeriodicAllowance_4_list) - x.PeriodCanSpend = *clv.list - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - x.PeriodReset = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - if x.Basic == nil { - x.Basic = new(BasicAllowance) - } - return protoreflect.ValueOfMessage(x.Basic.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - if x.Period == nil { - x.Period = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.Period.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - if x.PeriodSpendLimit == nil { - x.PeriodSpendLimit = []*v1beta1.Coin{} - } - value := &_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - if x.PeriodCanSpend == nil { - x.PeriodCanSpend = []*v1beta1.Coin{} - } - value := &_PeriodicAllowance_4_list{list: &x.PeriodCanSpend} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - if x.PeriodReset == nil { - x.PeriodReset = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.PeriodReset.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - m := new(BasicAllowance) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_PeriodicAllowance_3_list{list: &list}) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_PeriodicAllowance_4_list{list: &list}) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.PeriodicAllowance", 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_PeriodicAllowance) 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_PeriodicAllowance) 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_PeriodicAllowance) 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_PeriodicAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PeriodicAllowance) - 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.Basic != nil { - l = options.Size(x.Basic) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Period != nil { - l = options.Size(x.Period) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.PeriodSpendLimit) > 0 { - for _, e := range x.PeriodSpendLimit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.PeriodCanSpend) > 0 { - for _, e := range x.PeriodCanSpend { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.PeriodReset != nil { - l = options.Size(x.PeriodReset) - 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().(*PeriodicAllowance) - 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.PeriodReset != nil { - encoded, err := options.Marshal(x.PeriodReset) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.PeriodCanSpend) > 0 { - for iNdEx := len(x.PeriodCanSpend) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.PeriodCanSpend[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.PeriodSpendLimit) > 0 { - for iNdEx := len(x.PeriodSpendLimit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.PeriodSpendLimit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.Period != nil { - encoded, err := options.Marshal(x.Period) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Basic != nil { - encoded, err := options.Marshal(x.Basic) - 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().(*PeriodicAllowance) - 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: PeriodicAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeriodicAllowance: 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 Basic", 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.Basic == nil { - x.Basic = &BasicAllowance{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Basic); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", 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.Period == nil { - x.Period = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Period); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodSpendLimit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PeriodSpendLimit = append(x.PeriodSpendLimit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodSpendLimit[len(x.PeriodSpendLimit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodCanSpend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PeriodCanSpend = append(x.PeriodCanSpend, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodCanSpend[len(x.PeriodCanSpend)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodReset", 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.PeriodReset == nil { - x.PeriodReset = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodReset); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_AllowedMsgAllowance_2_list)(nil) - -type _AllowedMsgAllowance_2_list struct { - list *[]string -} - -func (x *_AllowedMsgAllowance_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_AllowedMsgAllowance_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_AllowedMsgAllowance_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_AllowedMsgAllowance_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_AllowedMsgAllowance_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message AllowedMsgAllowance at list field AllowedMessages as it is not of Message kind")) -} - -func (x *_AllowedMsgAllowance_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_AllowedMsgAllowance_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_AllowedMsgAllowance_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_AllowedMsgAllowance protoreflect.MessageDescriptor - fd_AllowedMsgAllowance_allowance protoreflect.FieldDescriptor - fd_AllowedMsgAllowance_allowed_messages protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_AllowedMsgAllowance = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("AllowedMsgAllowance") - fd_AllowedMsgAllowance_allowance = md_AllowedMsgAllowance.Fields().ByName("allowance") - fd_AllowedMsgAllowance_allowed_messages = md_AllowedMsgAllowance.Fields().ByName("allowed_messages") -} - -var _ protoreflect.Message = (*fastReflection_AllowedMsgAllowance)(nil) - -type fastReflection_AllowedMsgAllowance AllowedMsgAllowance - -func (x *AllowedMsgAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_AllowedMsgAllowance)(x) -} - -func (x *AllowedMsgAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AllowedMsgAllowance_messageType fastReflection_AllowedMsgAllowance_messageType -var _ protoreflect.MessageType = fastReflection_AllowedMsgAllowance_messageType{} - -type fastReflection_AllowedMsgAllowance_messageType struct{} - -func (x fastReflection_AllowedMsgAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_AllowedMsgAllowance)(nil) -} -func (x fastReflection_AllowedMsgAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_AllowedMsgAllowance) -} -func (x fastReflection_AllowedMsgAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AllowedMsgAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AllowedMsgAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_AllowedMsgAllowance -} - -// 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_AllowedMsgAllowance) Type() protoreflect.MessageType { - return _fastReflection_AllowedMsgAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AllowedMsgAllowance) New() protoreflect.Message { - return new(fastReflection_AllowedMsgAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AllowedMsgAllowance) Interface() protoreflect.ProtoMessage { - return (*AllowedMsgAllowance)(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_AllowedMsgAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Allowance != nil { - value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - if !f(fd_AllowedMsgAllowance_allowance, value) { - return - } - } - if len(x.AllowedMessages) != 0 { - value := protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{list: &x.AllowedMessages}) - if !f(fd_AllowedMsgAllowance_allowed_messages, 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_AllowedMsgAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - return x.Allowance != nil - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - return len(x.AllowedMessages) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - x.Allowance = nil - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - x.AllowedMessages = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - value := x.Allowance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - if len(x.AllowedMessages) == 0 { - return protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{}) - } - listValue := &_AllowedMsgAllowance_2_list{list: &x.AllowedMessages} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - x.Allowance = value.Message().Interface().(*anypb.Any) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - lv := value.List() - clv := lv.(*_AllowedMsgAllowance_2_list) - x.AllowedMessages = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - if x.Allowance == nil { - x.Allowance = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - if x.AllowedMessages == nil { - x.AllowedMessages = []string{} - } - value := &_AllowedMsgAllowance_2_list{list: &x.AllowedMessages} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - list := []string{} - return protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.AllowedMsgAllowance", 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_AllowedMsgAllowance) 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_AllowedMsgAllowance) 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_AllowedMsgAllowance) 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_AllowedMsgAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AllowedMsgAllowance) - 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.Allowance != nil { - l = options.Size(x.Allowance) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AllowedMessages) > 0 { - for _, s := range x.AllowedMessages { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AllowedMsgAllowance) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AllowedMessages) > 0 { - for iNdEx := len(x.AllowedMessages) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.AllowedMessages[iNdEx]) - copy(dAtA[i:], x.AllowedMessages[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AllowedMessages[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if x.Allowance != nil { - encoded, err := options.Marshal(x.Allowance) - 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().(*AllowedMsgAllowance) - 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: AllowedMsgAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllowedMsgAllowance: 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 Allowance", 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.Allowance == nil { - x.Allowance = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedMessages", 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.AllowedMessages = append(x.AllowedMessages, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Grant protoreflect.MessageDescriptor - fd_Grant_granter protoreflect.FieldDescriptor - fd_Grant_grantee protoreflect.FieldDescriptor - fd_Grant_allowance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_Grant = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("Grant") - fd_Grant_granter = md_Grant.Fields().ByName("granter") - fd_Grant_grantee = md_Grant.Fields().ByName("grantee") - fd_Grant_allowance = md_Grant.Fields().ByName("allowance") -} - -var _ protoreflect.Message = (*fastReflection_Grant)(nil) - -type fastReflection_Grant Grant - -func (x *Grant) ProtoReflect() protoreflect.Message { - return (*fastReflection_Grant)(x) -} - -func (x *Grant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Grant_messageType fastReflection_Grant_messageType -var _ protoreflect.MessageType = fastReflection_Grant_messageType{} - -type fastReflection_Grant_messageType struct{} - -func (x fastReflection_Grant_messageType) Zero() protoreflect.Message { - return (*fastReflection_Grant)(nil) -} -func (x fastReflection_Grant_messageType) New() protoreflect.Message { - return new(fastReflection_Grant) -} -func (x fastReflection_Grant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Grant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Grant) Descriptor() protoreflect.MessageDescriptor { - return md_Grant -} - -// 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_Grant) Type() protoreflect.MessageType { - return _fastReflection_Grant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Grant) New() protoreflect.Message { - return new(fastReflection_Grant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Grant) Interface() protoreflect.ProtoMessage { - return (*Grant)(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_Grant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_Grant_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_Grant_grantee, value) { - return - } - } - if x.Allowance != nil { - value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - if !f(fd_Grant_allowance, 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_Grant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - return x.Granter != "" - case "cosmos.feegrant.v1beta1.Grant.grantee": - return x.Grantee != "" - case "cosmos.feegrant.v1beta1.Grant.allowance": - return x.Allowance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - x.Granter = "" - case "cosmos.feegrant.v1beta1.Grant.grantee": - x.Grantee = "" - case "cosmos.feegrant.v1beta1.Grant.allowance": - x.Allowance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.Grant.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.Grant.allowance": - value := x.Allowance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - x.Granter = value.Interface().(string) - case "cosmos.feegrant.v1beta1.Grant.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.feegrant.v1beta1.Grant.allowance": - x.Allowance = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.allowance": - if x.Allowance == nil { - x.Allowance = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - case "cosmos.feegrant.v1beta1.Grant.granter": - panic(fmt.Errorf("field granter of message cosmos.feegrant.v1beta1.Grant is not mutable")) - case "cosmos.feegrant.v1beta1.Grant.grantee": - panic(fmt.Errorf("field grantee of message cosmos.feegrant.v1beta1.Grant is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.Grant.grantee": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.Grant.allowance": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.Grant", 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_Grant) 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_Grant) 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_Grant) 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_Grant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Grant) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Allowance != nil { - l = options.Size(x.Allowance) - 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().(*Grant) - 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.Allowance != nil { - encoded, err := options.Marshal(x.Allowance) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*Grant) - 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: Grant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", 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.Allowance == nil { - x.Allowance = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); 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, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/feegrant/v1beta1/feegrant.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BasicAllowance implements Allowance with a one-time grant of tokens -// that optionally expires. The grantee can use up to SpendLimit to cover fees. -type BasicAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // spend_limit specifies the maximum amount of tokens that can be spent - // by this allowance and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - SpendLimit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3" json:"spend_limit,omitempty"` - // expiration specifies an optional time when this allowance expires - Expiration *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *BasicAllowance) Reset() { - *x = BasicAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BasicAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BasicAllowance) ProtoMessage() {} - -// Deprecated: Use BasicAllowance.ProtoReflect.Descriptor instead. -func (*BasicAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{0} -} - -func (x *BasicAllowance) GetSpendLimit() []*v1beta1.Coin { - if x != nil { - return x.SpendLimit - } - return nil -} - -func (x *BasicAllowance) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -// PeriodicAllowance extends Allowance to allow for both a maximum cap, -// as well as a limit per time period. -type PeriodicAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // basic specifies a struct of `BasicAllowance` - Basic *BasicAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic,omitempty"` - // period specifies the time duration in which period_spend_limit coins can - // be spent before that allowance is reset - Period *durationpb.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"` - // period_spend_limit specifies the maximum number of coins that can be spent - // in the period - PeriodSpendLimit []*v1beta1.Coin `protobuf:"bytes,3,rep,name=period_spend_limit,json=periodSpendLimit,proto3" json:"period_spend_limit,omitempty"` - // period_can_spend is the number of coins left to be spent before the period_reset time - PeriodCanSpend []*v1beta1.Coin `protobuf:"bytes,4,rep,name=period_can_spend,json=periodCanSpend,proto3" json:"period_can_spend,omitempty"` - // period_reset is the time at which this period resets and a new one begins, - // it is calculated from the start time of the first transaction after the - // last period ended - PeriodReset *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3" json:"period_reset,omitempty"` -} - -func (x *PeriodicAllowance) Reset() { - *x = PeriodicAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeriodicAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeriodicAllowance) ProtoMessage() {} - -// Deprecated: Use PeriodicAllowance.ProtoReflect.Descriptor instead. -func (*PeriodicAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{1} -} - -func (x *PeriodicAllowance) GetBasic() *BasicAllowance { - if x != nil { - return x.Basic - } - return nil -} - -func (x *PeriodicAllowance) GetPeriod() *durationpb.Duration { - if x != nil { - return x.Period - } - return nil -} - -func (x *PeriodicAllowance) GetPeriodSpendLimit() []*v1beta1.Coin { - if x != nil { - return x.PeriodSpendLimit - } - return nil -} - -func (x *PeriodicAllowance) GetPeriodCanSpend() []*v1beta1.Coin { - if x != nil { - return x.PeriodCanSpend - } - return nil -} - -func (x *PeriodicAllowance) GetPeriodReset() *timestamppb.Timestamp { - if x != nil { - return x.PeriodReset - } - return nil -} - -// AllowedMsgAllowance creates allowance only for specified message types. -type AllowedMsgAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // allowance can be any of basic and periodic fee allowance. - Allowance *anypb.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` - // allowed_messages are the messages for which the grantee has the access. - AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"` -} - -func (x *AllowedMsgAllowance) Reset() { - *x = AllowedMsgAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AllowedMsgAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AllowedMsgAllowance) ProtoMessage() {} - -// Deprecated: Use AllowedMsgAllowance.ProtoReflect.Descriptor instead. -func (*AllowedMsgAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{2} -} - -func (x *AllowedMsgAllowance) GetAllowance() *anypb.Any { - if x != nil { - return x.Allowance - } - return nil -} - -func (x *AllowedMsgAllowance) GetAllowedMessages() []string { - if x != nil { - return x.AllowedMessages - } - return nil -} - -// Grant is stored in the KVStore to record a grant with full context -type Grant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // granter is the address of the user granting an allowance of their funds. - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is the address of the user being granted an allowance of another user's funds. - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - // allowance can be any of basic, periodic, allowed fee allowance. - Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` -} - -func (x *Grant) Reset() { - *x = Grant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Grant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Grant) ProtoMessage() {} - -// Deprecated: Use Grant.ProtoReflect.Descriptor instead. -func (*Grant) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{3} -} - -func (x *Grant) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *Grant) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *Grant) GetAllowance() *anypb.Any { - if x != nil { - return x.Allowance - } - return nil -} - -var File_cosmos_feegrant_v1beta1_feegrant_proto protoreflect.FileDescriptor - -var file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, - 0x01, 0x0a, 0x0e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x6c, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x3a, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x22, 0xe3, 0x03, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, - 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x62, 0x61, - 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, - 0x3b, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, - 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x79, 0x0a, 0x12, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x70, 0x65, - 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x75, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x43, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x47, - 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 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, 0x11, 0xca, 0xb4, 0x2d, - 0x0d, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x3a, 0x15, 0x88, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, - 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x22, 0xb6, 0x01, 0x0a, 0x05, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, - 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 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, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x42, 0xf4, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescOnce sync.Once - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData = file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc -) - -func file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP() []byte { - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescOnce.Do(func() { - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData) - }) - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData -} - -var file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes = []interface{}{ - (*BasicAllowance)(nil), // 0: cosmos.feegrant.v1beta1.BasicAllowance - (*PeriodicAllowance)(nil), // 1: cosmos.feegrant.v1beta1.PeriodicAllowance - (*AllowedMsgAllowance)(nil), // 2: cosmos.feegrant.v1beta1.AllowedMsgAllowance - (*Grant)(nil), // 3: cosmos.feegrant.v1beta1.Grant - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (*anypb.Any)(nil), // 7: google.protobuf.Any -} -var file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs = []int32{ - 4, // 0: cosmos.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin - 5, // 1: cosmos.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp - 0, // 2: cosmos.feegrant.v1beta1.PeriodicAllowance.basic:type_name -> cosmos.feegrant.v1beta1.BasicAllowance - 6, // 3: cosmos.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration - 4, // 4: cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin - 4, // 5: cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin - 5, // 6: cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp - 7, // 7: cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any - 7, // 8: cosmos.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_cosmos_feegrant_v1beta1_feegrant_proto_init() } -func file_cosmos_feegrant_v1beta1_feegrant_proto_init() { - if File_cosmos_feegrant_v1beta1_feegrant_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BasicAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeriodicAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllowedMsgAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Grant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes, - DependencyIndexes: file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs, - MessageInfos: file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes, - }.Build() - File_cosmos_feegrant_v1beta1_feegrant_proto = out.File - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = nil - file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes = nil - file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs = nil -} diff --git a/api/cosmos/feegrant/v1beta1/genesis.pulsar.go b/api/cosmos/feegrant/v1beta1/genesis.pulsar.go deleted file mode 100644 index 35a76faa792f..000000000000 --- a/api/cosmos/feegrant/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,660 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package feegrantv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[]*Grant -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - v := new(Grant) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - v := new(Grant) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_allowances protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_feegrant_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_allowances = md_GenesisState.Fields().ByName("allowances") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Allowances) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Allowances}) - if !f(fd_GenesisState_allowances, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.GenesisState.allowances": - return len(x.Allowances) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.GenesisState.allowances": - x.Allowances = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.GenesisState.allowances": - if len(x.Allowances) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.Allowances} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.GenesisState.allowances": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.Allowances = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.GenesisState.allowances": - if x.Allowances == nil { - x.Allowances = []*Grant{} - } - value := &_GenesisState_1_list{list: &x.Allowances} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.GenesisState.allowances": - list := []*Grant{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Allowances) > 0 { - for _, e := range x.Allowances { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Allowances) > 0 { - for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Allowances[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Allowances = append(x.Allowances, &Grant{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/feegrant/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState contains a set of fee allowances, persisted from the store -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetAllowances() []*Grant { - if x != nil { - return x.Allowances - } - return nil -} - -var File_cosmos_feegrant_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54, - 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x44, - 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x42, 0xf3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cosmos_feegrant_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_feegrant_v1beta1_genesis_proto_rawDescData = file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_feegrant_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_feegrant_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_feegrant_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_feegrant_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_feegrant_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_feegrant_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.feegrant.v1beta1.GenesisState - (*Grant)(nil), // 1: cosmos.feegrant.v1beta1.Grant -} -var file_cosmos_feegrant_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.feegrant.v1beta1.GenesisState.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_feegrant_v1beta1_genesis_proto_init() } -func file_cosmos_feegrant_v1beta1_genesis_proto_init() { - if File_cosmos_feegrant_v1beta1_genesis_proto != nil { - return - } - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_feegrant_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_feegrant_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_feegrant_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_feegrant_v1beta1_genesis_proto = out.File - file_cosmos_feegrant_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_feegrant_v1beta1_genesis_proto_goTypes = nil - file_cosmos_feegrant_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/feegrant/v1beta1/query.pulsar.go b/api/cosmos/feegrant/v1beta1/query.pulsar.go deleted file mode 100644 index 5b9d4ed9e87a..000000000000 --- a/api/cosmos/feegrant/v1beta1/query.pulsar.go +++ /dev/null @@ -1,3626 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package feegrantv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryAllowanceRequest protoreflect.MessageDescriptor - fd_QueryAllowanceRequest_granter protoreflect.FieldDescriptor - fd_QueryAllowanceRequest_grantee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryAllowanceRequest = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowanceRequest") - fd_QueryAllowanceRequest_granter = md_QueryAllowanceRequest.Fields().ByName("granter") - fd_QueryAllowanceRequest_grantee = md_QueryAllowanceRequest.Fields().ByName("grantee") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowanceRequest)(nil) - -type fastReflection_QueryAllowanceRequest QueryAllowanceRequest - -func (x *QueryAllowanceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowanceRequest)(x) -} - -func (x *QueryAllowanceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowanceRequest_messageType fastReflection_QueryAllowanceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowanceRequest_messageType{} - -type fastReflection_QueryAllowanceRequest_messageType struct{} - -func (x fastReflection_QueryAllowanceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowanceRequest)(nil) -} -func (x fastReflection_QueryAllowanceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowanceRequest) -} -func (x fastReflection_QueryAllowanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowanceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowanceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowanceRequest -} - -// 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_QueryAllowanceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowanceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowanceRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllowanceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowanceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllowanceRequest)(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_QueryAllowanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_QueryAllowanceRequest_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_QueryAllowanceRequest_grantee, 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_QueryAllowanceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.granter": - return x.Granter != "" - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.grantee": - return x.Grantee != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceRequest 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_QueryAllowanceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.granter": - x.Granter = "" - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.grantee": - x.Grantee = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceRequest 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_QueryAllowanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceRequest 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_QueryAllowanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.granter": - x.Granter = value.Interface().(string) - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.grantee": - x.Grantee = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceRequest 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_QueryAllowanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.granter": - panic(fmt.Errorf("field granter of message cosmos.feegrant.v1beta1.QueryAllowanceRequest is not mutable")) - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.grantee": - panic(fmt.Errorf("field grantee of message cosmos.feegrant.v1beta1.QueryAllowanceRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceRequest 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_QueryAllowanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.granter": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.QueryAllowanceRequest.grantee": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceRequest 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_QueryAllowanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryAllowanceRequest", 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_QueryAllowanceRequest) 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_QueryAllowanceRequest) 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_QueryAllowanceRequest) 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_QueryAllowanceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowanceRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowanceRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*QueryAllowanceRequest) - 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: QueryAllowanceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowanceRequest: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllowanceResponse protoreflect.MessageDescriptor - fd_QueryAllowanceResponse_allowance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryAllowanceResponse = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowanceResponse") - fd_QueryAllowanceResponse_allowance = md_QueryAllowanceResponse.Fields().ByName("allowance") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowanceResponse)(nil) - -type fastReflection_QueryAllowanceResponse QueryAllowanceResponse - -func (x *QueryAllowanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowanceResponse)(x) -} - -func (x *QueryAllowanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowanceResponse_messageType fastReflection_QueryAllowanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowanceResponse_messageType{} - -type fastReflection_QueryAllowanceResponse_messageType struct{} - -func (x fastReflection_QueryAllowanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowanceResponse)(nil) -} -func (x fastReflection_QueryAllowanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowanceResponse) -} -func (x fastReflection_QueryAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowanceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowanceResponse -} - -// 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_QueryAllowanceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowanceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowanceResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllowanceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowanceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllowanceResponse)(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_QueryAllowanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Allowance != nil { - value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - if !f(fd_QueryAllowanceResponse_allowance, 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_QueryAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance": - return x.Allowance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceResponse 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_QueryAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance": - x.Allowance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceResponse 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_QueryAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance": - value := x.Allowance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceResponse 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_QueryAllowanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance": - x.Allowance = value.Message().Interface().(*Grant) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceResponse 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_QueryAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance": - if x.Allowance == nil { - x.Allowance = new(Grant) - } - return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceResponse 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_QueryAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance": - m := new(Grant) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowanceResponse 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_QueryAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryAllowanceResponse", 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_QueryAllowanceResponse) 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_QueryAllowanceResponse) 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_QueryAllowanceResponse) 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_QueryAllowanceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowanceResponse) - 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.Allowance != nil { - l = options.Size(x.Allowance) - 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().(*QueryAllowanceResponse) - 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.Allowance != nil { - encoded, err := options.Marshal(x.Allowance) - 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().(*QueryAllowanceResponse) - 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: QueryAllowanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowanceResponse: 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 Allowance", 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.Allowance == nil { - x.Allowance = &Grant{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); 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_QueryAllowancesRequest protoreflect.MessageDescriptor - fd_QueryAllowancesRequest_grantee protoreflect.FieldDescriptor - fd_QueryAllowancesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryAllowancesRequest = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesRequest") - fd_QueryAllowancesRequest_grantee = md_QueryAllowancesRequest.Fields().ByName("grantee") - fd_QueryAllowancesRequest_pagination = md_QueryAllowancesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowancesRequest)(nil) - -type fastReflection_QueryAllowancesRequest QueryAllowancesRequest - -func (x *QueryAllowancesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowancesRequest)(x) -} - -func (x *QueryAllowancesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowancesRequest_messageType fastReflection_QueryAllowancesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowancesRequest_messageType{} - -type fastReflection_QueryAllowancesRequest_messageType struct{} - -func (x fastReflection_QueryAllowancesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowancesRequest)(nil) -} -func (x fastReflection_QueryAllowancesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesRequest) -} -func (x fastReflection_QueryAllowancesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowancesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesRequest -} - -// 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_QueryAllowancesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowancesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowancesRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowancesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllowancesRequest)(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_QueryAllowancesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_QueryAllowancesRequest_grantee, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllowancesRequest_pagination, 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_QueryAllowancesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.grantee": - return x.Grantee != "" - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesRequest 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_QueryAllowancesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.grantee": - x.Grantee = "" - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesRequest 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_QueryAllowancesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesRequest 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_QueryAllowancesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesRequest 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_QueryAllowancesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.grantee": - panic(fmt.Errorf("field grantee of message cosmos.feegrant.v1beta1.QueryAllowancesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesRequest 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_QueryAllowancesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.grantee": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesRequest 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_QueryAllowancesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryAllowancesRequest", 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_QueryAllowancesRequest) 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_QueryAllowancesRequest) 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_QueryAllowancesRequest) 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_QueryAllowancesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowancesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllowancesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - 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().(*QueryAllowancesRequest) - 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: QueryAllowancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesRequest: 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 Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllowancesResponse_1_list)(nil) - -type _QueryAllowancesResponse_1_list struct { - list *[]*Grant -} - -func (x *_QueryAllowancesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllowancesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllowancesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllowancesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllowancesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Grant) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllowancesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllowancesResponse_1_list) NewElement() protoreflect.Value { - v := new(Grant) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllowancesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllowancesResponse protoreflect.MessageDescriptor - fd_QueryAllowancesResponse_allowances protoreflect.FieldDescriptor - fd_QueryAllowancesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryAllowancesResponse = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesResponse") - fd_QueryAllowancesResponse_allowances = md_QueryAllowancesResponse.Fields().ByName("allowances") - fd_QueryAllowancesResponse_pagination = md_QueryAllowancesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowancesResponse)(nil) - -type fastReflection_QueryAllowancesResponse QueryAllowancesResponse - -func (x *QueryAllowancesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowancesResponse)(x) -} - -func (x *QueryAllowancesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowancesResponse_messageType fastReflection_QueryAllowancesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowancesResponse_messageType{} - -type fastReflection_QueryAllowancesResponse_messageType struct{} - -func (x fastReflection_QueryAllowancesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowancesResponse)(nil) -} -func (x fastReflection_QueryAllowancesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesResponse) -} -func (x fastReflection_QueryAllowancesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowancesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesResponse -} - -// 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_QueryAllowancesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowancesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowancesResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowancesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllowancesResponse)(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_QueryAllowancesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Allowances) != 0 { - value := protoreflect.ValueOfList(&_QueryAllowancesResponse_1_list{list: &x.Allowances}) - if !f(fd_QueryAllowancesResponse_allowances, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllowancesResponse_pagination, 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_QueryAllowancesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances": - return len(x.Allowances) != 0 - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesResponse 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_QueryAllowancesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances": - x.Allowances = nil - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesResponse 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_QueryAllowancesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances": - if len(x.Allowances) == 0 { - return protoreflect.ValueOfList(&_QueryAllowancesResponse_1_list{}) - } - listValue := &_QueryAllowancesResponse_1_list{list: &x.Allowances} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesResponse 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_QueryAllowancesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances": - lv := value.List() - clv := lv.(*_QueryAllowancesResponse_1_list) - x.Allowances = *clv.list - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesResponse 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_QueryAllowancesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances": - if x.Allowances == nil { - x.Allowances = []*Grant{} - } - value := &_QueryAllowancesResponse_1_list{list: &x.Allowances} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesResponse 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_QueryAllowancesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances": - list := []*Grant{} - return protoreflect.ValueOfList(&_QueryAllowancesResponse_1_list{list: &list}) - case "cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesResponse 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_QueryAllowancesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryAllowancesResponse", 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_QueryAllowancesResponse) 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_QueryAllowancesResponse) 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_QueryAllowancesResponse) 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_QueryAllowancesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowancesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Allowances) > 0 { - for _, e := range x.Allowances { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllowancesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Allowances) > 0 { - for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Allowances[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowancesResponse) - 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: QueryAllowancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesResponse: 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 Allowances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Allowances = append(x.Allowances, &Grant{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryAllowancesByGranterRequest protoreflect.MessageDescriptor - fd_QueryAllowancesByGranterRequest_granter protoreflect.FieldDescriptor - fd_QueryAllowancesByGranterRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryAllowancesByGranterRequest = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesByGranterRequest") - fd_QueryAllowancesByGranterRequest_granter = md_QueryAllowancesByGranterRequest.Fields().ByName("granter") - fd_QueryAllowancesByGranterRequest_pagination = md_QueryAllowancesByGranterRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowancesByGranterRequest)(nil) - -type fastReflection_QueryAllowancesByGranterRequest QueryAllowancesByGranterRequest - -func (x *QueryAllowancesByGranterRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowancesByGranterRequest)(x) -} - -func (x *QueryAllowancesByGranterRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllowancesByGranterRequest_messageType fastReflection_QueryAllowancesByGranterRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowancesByGranterRequest_messageType{} - -type fastReflection_QueryAllowancesByGranterRequest_messageType struct{} - -func (x fastReflection_QueryAllowancesByGranterRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowancesByGranterRequest)(nil) -} -func (x fastReflection_QueryAllowancesByGranterRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesByGranterRequest) -} -func (x fastReflection_QueryAllowancesByGranterRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesByGranterRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowancesByGranterRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesByGranterRequest -} - -// 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_QueryAllowancesByGranterRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowancesByGranterRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowancesByGranterRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesByGranterRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowancesByGranterRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllowancesByGranterRequest)(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_QueryAllowancesByGranterRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_QueryAllowancesByGranterRequest_granter, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllowancesByGranterRequest_pagination, 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_QueryAllowancesByGranterRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": - return x.Granter != "" - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest 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_QueryAllowancesByGranterRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": - x.Granter = "" - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest 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_QueryAllowancesByGranterRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest 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_QueryAllowancesByGranterRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": - x.Granter = value.Interface().(string) - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest 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_QueryAllowancesByGranterRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": - panic(fmt.Errorf("field granter of message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest 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_QueryAllowancesByGranterRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.granter": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest 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_QueryAllowancesByGranterRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest", 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_QueryAllowancesByGranterRequest) 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_QueryAllowancesByGranterRequest) 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_QueryAllowancesByGranterRequest) 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_QueryAllowancesByGranterRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowancesByGranterRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllowancesByGranterRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*QueryAllowancesByGranterRequest) - 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: QueryAllowancesByGranterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesByGranterRequest: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllowancesByGranterResponse_1_list)(nil) - -type _QueryAllowancesByGranterResponse_1_list struct { - list *[]*Grant -} - -func (x *_QueryAllowancesByGranterResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllowancesByGranterResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllowancesByGranterResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllowancesByGranterResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Grant) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllowancesByGranterResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Grant) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllowancesByGranterResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllowancesByGranterResponse_1_list) NewElement() protoreflect.Value { - v := new(Grant) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllowancesByGranterResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllowancesByGranterResponse protoreflect.MessageDescriptor - fd_QueryAllowancesByGranterResponse_allowances protoreflect.FieldDescriptor - fd_QueryAllowancesByGranterResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_query_proto_init() - md_QueryAllowancesByGranterResponse = File_cosmos_feegrant_v1beta1_query_proto.Messages().ByName("QueryAllowancesByGranterResponse") - fd_QueryAllowancesByGranterResponse_allowances = md_QueryAllowancesByGranterResponse.Fields().ByName("allowances") - fd_QueryAllowancesByGranterResponse_pagination = md_QueryAllowancesByGranterResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllowancesByGranterResponse)(nil) - -type fastReflection_QueryAllowancesByGranterResponse QueryAllowancesByGranterResponse - -func (x *QueryAllowancesByGranterResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllowancesByGranterResponse)(x) -} - -func (x *QueryAllowancesByGranterResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_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_QueryAllowancesByGranterResponse_messageType fastReflection_QueryAllowancesByGranterResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllowancesByGranterResponse_messageType{} - -type fastReflection_QueryAllowancesByGranterResponse_messageType struct{} - -func (x fastReflection_QueryAllowancesByGranterResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllowancesByGranterResponse)(nil) -} -func (x fastReflection_QueryAllowancesByGranterResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesByGranterResponse) -} -func (x fastReflection_QueryAllowancesByGranterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesByGranterResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllowancesByGranterResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllowancesByGranterResponse -} - -// 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_QueryAllowancesByGranterResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllowancesByGranterResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllowancesByGranterResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllowancesByGranterResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllowancesByGranterResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllowancesByGranterResponse)(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_QueryAllowancesByGranterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Allowances) != 0 { - value := protoreflect.ValueOfList(&_QueryAllowancesByGranterResponse_1_list{list: &x.Allowances}) - if !f(fd_QueryAllowancesByGranterResponse_allowances, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllowancesByGranterResponse_pagination, 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_QueryAllowancesByGranterResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": - return len(x.Allowances) != 0 - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse 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_QueryAllowancesByGranterResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": - x.Allowances = nil - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse 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_QueryAllowancesByGranterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": - if len(x.Allowances) == 0 { - return protoreflect.ValueOfList(&_QueryAllowancesByGranterResponse_1_list{}) - } - listValue := &_QueryAllowancesByGranterResponse_1_list{list: &x.Allowances} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse 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_QueryAllowancesByGranterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": - lv := value.List() - clv := lv.(*_QueryAllowancesByGranterResponse_1_list) - x.Allowances = *clv.list - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse 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_QueryAllowancesByGranterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": - if x.Allowances == nil { - x.Allowances = []*Grant{} - } - value := &_QueryAllowancesByGranterResponse_1_list{list: &x.Allowances} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse 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_QueryAllowancesByGranterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances": - list := []*Grant{} - return protoreflect.ValueOfList(&_QueryAllowancesByGranterResponse_1_list{list: &list}) - case "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse 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_QueryAllowancesByGranterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse", 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_QueryAllowancesByGranterResponse) 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_QueryAllowancesByGranterResponse) 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_QueryAllowancesByGranterResponse) 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_QueryAllowancesByGranterResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllowancesByGranterResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Allowances) > 0 { - for _, e := range x.Allowances { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAllowancesByGranterResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Allowances) > 0 { - for iNdEx := len(x.Allowances) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Allowances[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllowancesByGranterResponse) - 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: QueryAllowancesByGranterResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllowancesByGranterResponse: 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 Allowances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Allowances = append(x.Allowances, &Grant{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowances[len(x.Allowances)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/feegrant/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -type QueryAllowanceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // granter is the address of the user granting an allowance of their funds. - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is the address of the user being granted an allowance of another user's funds. - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (x *QueryAllowanceRequest) Reset() { - *x = QueryAllowanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllowanceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllowanceRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllowanceRequest.ProtoReflect.Descriptor instead. -func (*QueryAllowanceRequest) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryAllowanceRequest) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *QueryAllowanceRequest) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -type QueryAllowanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // allowance is a allowance granted for grantee by granter. - Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` -} - -func (x *QueryAllowanceResponse) Reset() { - *x = QueryAllowanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllowanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllowanceResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllowanceResponse.ProtoReflect.Descriptor instead. -func (*QueryAllowanceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryAllowanceResponse) GetAllowance() *Grant { - if x != nil { - return x.Allowance - } - return nil -} - -// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -type QueryAllowancesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllowancesRequest) Reset() { - *x = QueryAllowancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllowancesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllowancesRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllowancesRequest.ProtoReflect.Descriptor instead. -func (*QueryAllowancesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAllowancesRequest) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *QueryAllowancesRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -type QueryAllowancesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // allowances are allowance's granted for grantee by granter. - Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllowancesResponse) Reset() { - *x = QueryAllowancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllowancesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllowancesResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllowancesResponse.ProtoReflect.Descriptor instead. -func (*QueryAllowancesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryAllowancesResponse) GetAllowances() []*Grant { - if x != nil { - return x.Allowances - } - return nil -} - -func (x *QueryAllowancesResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -type QueryAllowancesByGranterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllowancesByGranterRequest) Reset() { - *x = QueryAllowancesByGranterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllowancesByGranterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllowancesByGranterRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllowancesByGranterRequest.ProtoReflect.Descriptor instead. -func (*QueryAllowancesByGranterRequest) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryAllowancesByGranterRequest) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *QueryAllowancesByGranterRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -type QueryAllowancesByGranterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // allowances that have been issued by the granter. - Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllowancesByGranterResponse) Reset() { - *x = QueryAllowancesByGranterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllowancesByGranterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllowancesByGranterResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllowancesByGranterResponse.ProtoReflect.Descriptor instead. -func (*QueryAllowancesByGranterResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryAllowancesByGranterResponse) GetAllowances() []*Grant { - if x != nil { - return x.Allowances - } - return nil -} - -func (x *QueryAllowancesByGranterResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_feegrant_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_feegrant_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, - 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x26, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x15, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x56, 0x0a, 0x16, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 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, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x01, 0x0a, 0x17, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x9d, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xab, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x9f, - 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, - 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, - 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, - 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, - 0x42, 0xf1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_feegrant_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_feegrant_v1beta1_query_proto_rawDescData = file_cosmos_feegrant_v1beta1_query_proto_rawDesc -) - -func file_cosmos_feegrant_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_feegrant_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_feegrant_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_feegrant_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_feegrant_v1beta1_query_proto_rawDescData -} - -var file_cosmos_feegrant_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_feegrant_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryAllowanceRequest)(nil), // 0: cosmos.feegrant.v1beta1.QueryAllowanceRequest - (*QueryAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.QueryAllowanceResponse - (*QueryAllowancesRequest)(nil), // 2: cosmos.feegrant.v1beta1.QueryAllowancesRequest - (*QueryAllowancesResponse)(nil), // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse - (*QueryAllowancesByGranterRequest)(nil), // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest - (*QueryAllowancesByGranterResponse)(nil), // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse - (*Grant)(nil), // 6: cosmos.feegrant.v1beta1.Grant - (*v1beta1.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse -} -var file_cosmos_feegrant_v1beta1_query_proto_depIdxs = []int32{ - 6, // 0: cosmos.feegrant.v1beta1.QueryAllowanceResponse.allowance:type_name -> cosmos.feegrant.v1beta1.Grant - 7, // 1: cosmos.feegrant.v1beta1.QueryAllowancesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 6, // 2: cosmos.feegrant.v1beta1.QueryAllowancesResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 8, // 3: cosmos.feegrant.v1beta1.QueryAllowancesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 7, // 4: cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 6, // 5: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.allowances:type_name -> cosmos.feegrant.v1beta1.Grant - 8, // 6: cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 7: cosmos.feegrant.v1beta1.Query.Allowance:input_type -> cosmos.feegrant.v1beta1.QueryAllowanceRequest - 2, // 8: cosmos.feegrant.v1beta1.Query.Allowances:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesRequest - 4, // 9: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:input_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest - 1, // 10: cosmos.feegrant.v1beta1.Query.Allowance:output_type -> cosmos.feegrant.v1beta1.QueryAllowanceResponse - 3, // 11: cosmos.feegrant.v1beta1.Query.Allowances:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesResponse - 5, // 12: cosmos.feegrant.v1beta1.Query.AllowancesByGranter:output_type -> cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse - 10, // [10:13] is the sub-list for method output_type - 7, // [7:10] 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 -} - -func init() { file_cosmos_feegrant_v1beta1_query_proto_init() } -func file_cosmos_feegrant_v1beta1_query_proto_init() { - if File_cosmos_feegrant_v1beta1_query_proto != nil { - return - } - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllowanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllowanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllowancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllowancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllowancesByGranterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllowancesByGranterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_feegrant_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_feegrant_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_feegrant_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_feegrant_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_feegrant_v1beta1_query_proto = out.File - file_cosmos_feegrant_v1beta1_query_proto_rawDesc = nil - file_cosmos_feegrant_v1beta1_query_proto_goTypes = nil - file_cosmos_feegrant_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go b/api/cosmos/feegrant/v1beta1/query_grpc.pb.go deleted file mode 100644 index 64cef481bdaa..000000000000 --- a/api/cosmos/feegrant/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/feegrant/v1beta1/query.proto - -package feegrantv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Allowance returns fee granted to the grantee by the granter. - Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) - // Allowances returns all the grants for address. - Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) - // AllowancesByGranter returns all the grants given by an address - // Since v0.46 - AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) { - out := new(QueryAllowanceResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/Allowance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) { - out := new(QueryAllowancesResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/Allowances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) { - out := new(QueryAllowancesByGranterResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Allowance returns fee granted to the grantee by the granter. - Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) - // Allowances returns all the grants for address. - Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) - // AllowancesByGranter returns all the grants given by an address - // Since v0.46 - AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Allowance not implemented") -} -func (UnimplementedQueryServer) Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Allowances not implemented") -} -func (UnimplementedQueryServer) AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllowancesByGranter not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Allowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllowanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Allowance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Query/Allowance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Allowance(ctx, req.(*QueryAllowanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Allowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllowancesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Allowances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Query/Allowances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Allowances(ctx, req.(*QueryAllowancesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllowancesByGranter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllowancesByGranterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllowancesByGranter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllowancesByGranter(ctx, req.(*QueryAllowancesByGranterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.feegrant.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Allowance", - Handler: _Query_Allowance_Handler, - }, - { - MethodName: "Allowances", - Handler: _Query_Allowances_Handler, - }, - { - MethodName: "AllowancesByGranter", - Handler: _Query_AllowancesByGranter_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/feegrant/v1beta1/query.proto", -} diff --git a/api/cosmos/feegrant/v1beta1/tx.pulsar.go b/api/cosmos/feegrant/v1beta1/tx.pulsar.go deleted file mode 100644 index 723d4319fb73..000000000000 --- a/api/cosmos/feegrant/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,2124 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package feegrantv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_MsgGrantAllowance protoreflect.MessageDescriptor - fd_MsgGrantAllowance_granter protoreflect.FieldDescriptor - fd_MsgGrantAllowance_grantee protoreflect.FieldDescriptor - fd_MsgGrantAllowance_allowance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_tx_proto_init() - md_MsgGrantAllowance = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgGrantAllowance") - fd_MsgGrantAllowance_granter = md_MsgGrantAllowance.Fields().ByName("granter") - fd_MsgGrantAllowance_grantee = md_MsgGrantAllowance.Fields().ByName("grantee") - fd_MsgGrantAllowance_allowance = md_MsgGrantAllowance.Fields().ByName("allowance") -} - -var _ protoreflect.Message = (*fastReflection_MsgGrantAllowance)(nil) - -type fastReflection_MsgGrantAllowance MsgGrantAllowance - -func (x *MsgGrantAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgGrantAllowance)(x) -} - -func (x *MsgGrantAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgGrantAllowance_messageType fastReflection_MsgGrantAllowance_messageType -var _ protoreflect.MessageType = fastReflection_MsgGrantAllowance_messageType{} - -type fastReflection_MsgGrantAllowance_messageType struct{} - -func (x fastReflection_MsgGrantAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgGrantAllowance)(nil) -} -func (x fastReflection_MsgGrantAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_MsgGrantAllowance) -} -func (x fastReflection_MsgGrantAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgGrantAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantAllowance -} - -// 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_MsgGrantAllowance) Type() protoreflect.MessageType { - return _fastReflection_MsgGrantAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgGrantAllowance) New() protoreflect.Message { - return new(fastReflection_MsgGrantAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgGrantAllowance) Interface() protoreflect.ProtoMessage { - return (*MsgGrantAllowance)(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_MsgGrantAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_MsgGrantAllowance_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_MsgGrantAllowance_grantee, value) { - return - } - } - if x.Allowance != nil { - value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - if !f(fd_MsgGrantAllowance_allowance, 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_MsgGrantAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.granter": - return x.Granter != "" - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.grantee": - return x.Grantee != "" - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance": - return x.Allowance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowance 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_MsgGrantAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.granter": - x.Granter = "" - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.grantee": - x.Grantee = "" - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance": - x.Allowance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowance 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_MsgGrantAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance": - value := x.Allowance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowance 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_MsgGrantAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.granter": - x.Granter = value.Interface().(string) - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance": - x.Allowance = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowance 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_MsgGrantAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance": - if x.Allowance == nil { - x.Allowance = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.granter": - panic(fmt.Errorf("field granter of message cosmos.feegrant.v1beta1.MsgGrantAllowance is not mutable")) - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.grantee": - panic(fmt.Errorf("field grantee of message cosmos.feegrant.v1beta1.MsgGrantAllowance is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowance 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_MsgGrantAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.granter": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.grantee": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowance 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_MsgGrantAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgGrantAllowance", 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_MsgGrantAllowance) 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_MsgGrantAllowance) 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_MsgGrantAllowance) 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_MsgGrantAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgGrantAllowance) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Allowance != nil { - l = options.Size(x.Allowance) - 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().(*MsgGrantAllowance) - 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.Allowance != nil { - encoded, err := options.Marshal(x.Allowance) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*MsgGrantAllowance) - 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: MsgGrantAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantAllowance: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Allowance", 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.Allowance == nil { - x.Allowance = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); 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_MsgGrantAllowanceResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_tx_proto_init() - md_MsgGrantAllowanceResponse = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgGrantAllowanceResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgGrantAllowanceResponse)(nil) - -type fastReflection_MsgGrantAllowanceResponse MsgGrantAllowanceResponse - -func (x *MsgGrantAllowanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgGrantAllowanceResponse)(x) -} - -func (x *MsgGrantAllowanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgGrantAllowanceResponse_messageType fastReflection_MsgGrantAllowanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgGrantAllowanceResponse_messageType{} - -type fastReflection_MsgGrantAllowanceResponse_messageType struct{} - -func (x fastReflection_MsgGrantAllowanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgGrantAllowanceResponse)(nil) -} -func (x fastReflection_MsgGrantAllowanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgGrantAllowanceResponse) -} -func (x fastReflection_MsgGrantAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantAllowanceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgGrantAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgGrantAllowanceResponse -} - -// 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_MsgGrantAllowanceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgGrantAllowanceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgGrantAllowanceResponse) New() protoreflect.Message { - return new(fastReflection_MsgGrantAllowanceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgGrantAllowanceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgGrantAllowanceResponse)(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_MsgGrantAllowanceResponse) 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_MsgGrantAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse 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_MsgGrantAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse 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_MsgGrantAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse 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_MsgGrantAllowanceResponse) 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.feegrant.v1beta1.MsgGrantAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse 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_MsgGrantAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse 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_MsgGrantAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse 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_MsgGrantAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", 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_MsgGrantAllowanceResponse) 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_MsgGrantAllowanceResponse) 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_MsgGrantAllowanceResponse) 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_MsgGrantAllowanceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgGrantAllowanceResponse) - 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().(*MsgGrantAllowanceResponse) - 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().(*MsgGrantAllowanceResponse) - 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: MsgGrantAllowanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGrantAllowanceResponse: 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_MsgRevokeAllowance protoreflect.MessageDescriptor - fd_MsgRevokeAllowance_granter protoreflect.FieldDescriptor - fd_MsgRevokeAllowance_grantee protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_tx_proto_init() - md_MsgRevokeAllowance = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgRevokeAllowance") - fd_MsgRevokeAllowance_granter = md_MsgRevokeAllowance.Fields().ByName("granter") - fd_MsgRevokeAllowance_grantee = md_MsgRevokeAllowance.Fields().ByName("grantee") -} - -var _ protoreflect.Message = (*fastReflection_MsgRevokeAllowance)(nil) - -type fastReflection_MsgRevokeAllowance MsgRevokeAllowance - -func (x *MsgRevokeAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRevokeAllowance)(x) -} - -func (x *MsgRevokeAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRevokeAllowance_messageType fastReflection_MsgRevokeAllowance_messageType -var _ protoreflect.MessageType = fastReflection_MsgRevokeAllowance_messageType{} - -type fastReflection_MsgRevokeAllowance_messageType struct{} - -func (x fastReflection_MsgRevokeAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRevokeAllowance)(nil) -} -func (x fastReflection_MsgRevokeAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRevokeAllowance) -} -func (x fastReflection_MsgRevokeAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevokeAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRevokeAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevokeAllowance -} - -// 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_MsgRevokeAllowance) Type() protoreflect.MessageType { - return _fastReflection_MsgRevokeAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRevokeAllowance) New() protoreflect.Message { - return new(fastReflection_MsgRevokeAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRevokeAllowance) Interface() protoreflect.ProtoMessage { - return (*MsgRevokeAllowance)(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_MsgRevokeAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_MsgRevokeAllowance_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_MsgRevokeAllowance_grantee, 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_MsgRevokeAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.granter": - return x.Granter != "" - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.grantee": - return x.Grantee != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowance 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_MsgRevokeAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.granter": - x.Granter = "" - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.grantee": - x.Grantee = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowance 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_MsgRevokeAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowance 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_MsgRevokeAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.granter": - x.Granter = value.Interface().(string) - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.grantee": - x.Grantee = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowance 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_MsgRevokeAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.granter": - panic(fmt.Errorf("field granter of message cosmos.feegrant.v1beta1.MsgRevokeAllowance is not mutable")) - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.grantee": - panic(fmt.Errorf("field grantee of message cosmos.feegrant.v1beta1.MsgRevokeAllowance is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowance 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_MsgRevokeAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.granter": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.MsgRevokeAllowance.grantee": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowance 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_MsgRevokeAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgRevokeAllowance", 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_MsgRevokeAllowance) 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_MsgRevokeAllowance) 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_MsgRevokeAllowance) 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_MsgRevokeAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRevokeAllowance) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRevokeAllowance) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*MsgRevokeAllowance) - 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: MsgRevokeAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllowance: 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 Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grantee", 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.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRevokeAllowanceResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_tx_proto_init() - md_MsgRevokeAllowanceResponse = File_cosmos_feegrant_v1beta1_tx_proto.Messages().ByName("MsgRevokeAllowanceResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRevokeAllowanceResponse)(nil) - -type fastReflection_MsgRevokeAllowanceResponse MsgRevokeAllowanceResponse - -func (x *MsgRevokeAllowanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRevokeAllowanceResponse)(x) -} - -func (x *MsgRevokeAllowanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRevokeAllowanceResponse_messageType fastReflection_MsgRevokeAllowanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRevokeAllowanceResponse_messageType{} - -type fastReflection_MsgRevokeAllowanceResponse_messageType struct{} - -func (x fastReflection_MsgRevokeAllowanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRevokeAllowanceResponse)(nil) -} -func (x fastReflection_MsgRevokeAllowanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRevokeAllowanceResponse) -} -func (x fastReflection_MsgRevokeAllowanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevokeAllowanceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRevokeAllowanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRevokeAllowanceResponse -} - -// 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_MsgRevokeAllowanceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRevokeAllowanceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRevokeAllowanceResponse) New() protoreflect.Message { - return new(fastReflection_MsgRevokeAllowanceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRevokeAllowanceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRevokeAllowanceResponse)(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_MsgRevokeAllowanceResponse) 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_MsgRevokeAllowanceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse 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_MsgRevokeAllowanceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse 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_MsgRevokeAllowanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse 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_MsgRevokeAllowanceResponse) 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.feegrant.v1beta1.MsgRevokeAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse 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_MsgRevokeAllowanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse 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_MsgRevokeAllowanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse 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_MsgRevokeAllowanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", 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_MsgRevokeAllowanceResponse) 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_MsgRevokeAllowanceResponse) 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_MsgRevokeAllowanceResponse) 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_MsgRevokeAllowanceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRevokeAllowanceResponse) - 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().(*MsgRevokeAllowanceResponse) - 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().(*MsgRevokeAllowanceResponse) - 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: MsgRevokeAllowanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRevokeAllowanceResponse: 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, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/feegrant/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -// of fees from the account of Granter. -type MsgGrantAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // granter is the address of the user granting an allowance of their funds. - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is the address of the user being granted an allowance of another user's funds. - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - // allowance can be any of basic, periodic, allowed fee allowance. - Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` -} - -func (x *MsgGrantAllowance) Reset() { - *x = MsgGrantAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgGrantAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgGrantAllowance) ProtoMessage() {} - -// Deprecated: Use MsgGrantAllowance.ProtoReflect.Descriptor instead. -func (*MsgGrantAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgGrantAllowance) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *MsgGrantAllowance) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *MsgGrantAllowance) GetAllowance() *anypb.Any { - if x != nil { - return x.Allowance - } - return nil -} - -// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -type MsgGrantAllowanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgGrantAllowanceResponse) Reset() { - *x = MsgGrantAllowanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgGrantAllowanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgGrantAllowanceResponse) ProtoMessage() {} - -// Deprecated: Use MsgGrantAllowanceResponse.ProtoReflect.Descriptor instead. -func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -type MsgRevokeAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // granter is the address of the user granting an allowance of their funds. - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is the address of the user being granted an allowance of another user's funds. - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (x *MsgRevokeAllowance) Reset() { - *x = MsgRevokeAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRevokeAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRevokeAllowance) ProtoMessage() {} - -// Deprecated: Use MsgRevokeAllowance.ProtoReflect.Descriptor instead. -func (*MsgRevokeAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgRevokeAllowance) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *MsgRevokeAllowance) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -type MsgRevokeAllowanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRevokeAllowanceResponse) Reset() { - *x = MsgRevokeAllowanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRevokeAllowanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRevokeAllowanceResponse) ProtoMessage() {} - -// Deprecated: Use MsgRevokeAllowanceResponse.ProtoReflect.Descriptor instead. -func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -var File_cosmos_feegrant_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x11, 0x4d, - 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 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, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x3a, - 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x1b, 0x0a, - 0x19, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, 0x0a, - 0x0e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, - 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x1a, - 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xee, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_feegrant_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_feegrant_v1beta1_tx_proto_rawDescData = file_cosmos_feegrant_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_feegrant_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_feegrant_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_feegrant_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_feegrant_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_feegrant_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_feegrant_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_feegrant_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgGrantAllowance)(nil), // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance - (*MsgGrantAllowanceResponse)(nil), // 1: cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse - (*MsgRevokeAllowance)(nil), // 2: cosmos.feegrant.v1beta1.MsgRevokeAllowance - (*MsgRevokeAllowanceResponse)(nil), // 3: cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - (*anypb.Any)(nil), // 4: google.protobuf.Any -} -var file_cosmos_feegrant_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.feegrant.v1beta1.MsgGrantAllowance.allowance:type_name -> google.protobuf.Any - 0, // 1: cosmos.feegrant.v1beta1.Msg.GrantAllowance:input_type -> cosmos.feegrant.v1beta1.MsgGrantAllowance - 2, // 2: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:input_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowance - 1, // 3: cosmos.feegrant.v1beta1.Msg.GrantAllowance:output_type -> cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse - 3, // 4: cosmos.feegrant.v1beta1.Msg.RevokeAllowance:output_type -> cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_feegrant_v1beta1_tx_proto_init() } -func file_cosmos_feegrant_v1beta1_tx_proto_init() { - if File_cosmos_feegrant_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgGrantAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgGrantAllowanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRevokeAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRevokeAllowanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_feegrant_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_feegrant_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_feegrant_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_feegrant_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_feegrant_v1beta1_tx_proto = out.File - file_cosmos_feegrant_v1beta1_tx_proto_rawDesc = nil - file_cosmos_feegrant_v1beta1_tx_proto_goTypes = nil - file_cosmos_feegrant_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go b/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go deleted file mode 100644 index cf166811a63e..000000000000 --- a/api/cosmos/feegrant/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/feegrant/v1beta1/tx.proto - -package feegrantv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // GrantAllowance grants fee allowance to the grantee on the granter's - // account with the provided expiration time. - GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) - // RevokeAllowance revokes any fee allowance of granter's account that - // has been granted to the grantee. - RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) { - out := new(MsgGrantAllowanceResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/GrantAllowance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) { - out := new(MsgRevokeAllowanceResponse) - err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // GrantAllowance grants fee allowance to the grantee on the granter's - // account with the provided expiration time. - GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) - // RevokeAllowance revokes any fee allowance of granter's account that - // has been granted to the grantee. - RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GrantAllowance not implemented") -} -func (UnimplementedMsgServer) RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_GrantAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgGrantAllowance) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GrantAllowance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Msg/GrantAllowance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GrantAllowance(ctx, req.(*MsgGrantAllowance)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRevokeAllowance) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RevokeAllowance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RevokeAllowance(ctx, req.(*MsgRevokeAllowance)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.feegrant.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GrantAllowance", - Handler: _Msg_GrantAllowance_Handler, - }, - { - MethodName: "RevokeAllowance", - Handler: _Msg_RevokeAllowance_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/feegrant/v1beta1/tx.proto", -} diff --git a/api/cosmos/genutil/v1beta1/genesis.pulsar.go b/api/cosmos/genutil/v1beta1/genesis.pulsar.go deleted file mode 100644 index b709cc2b5854..000000000000 --- a/api/cosmos/genutil/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,638 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package genutilv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[][]byte -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message GenesisState at list field GenTxs as it is not of Message kind")) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_gen_txs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_genutil_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_genutil_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_gen_txs = md_GenesisState.Fields().ByName("gen_txs") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_genutil_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.GenTxs) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.GenTxs}) - if !f(fd_GenesisState_gen_txs, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.genutil.v1beta1.GenesisState.gen_txs": - return len(x.GenTxs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.genutil.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.genutil.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.genutil.v1beta1.GenesisState.gen_txs": - x.GenTxs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.genutil.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.genutil.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.genutil.v1beta1.GenesisState.gen_txs": - if len(x.GenTxs) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.GenTxs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.genutil.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.genutil.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.genutil.v1beta1.GenesisState.gen_txs": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.GenTxs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.genutil.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.genutil.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.genutil.v1beta1.GenesisState.gen_txs": - if x.GenTxs == nil { - x.GenTxs = [][]byte{} - } - value := &_GenesisState_1_list{list: &x.GenTxs} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.genutil.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.genutil.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.genutil.v1beta1.GenesisState.gen_txs": - list := [][]byte{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.genutil.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.genutil.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.genutil.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.GenTxs) > 0 { - for _, b := range x.GenTxs { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.GenTxs) > 0 { - for iNdEx := len(x.GenTxs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.GenTxs[iNdEx]) - copy(dAtA[i:], x.GenTxs[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GenTxs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenTxs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GenTxs = append(x.GenTxs, make([]byte, postIndex-iNdEx)) - copy(x.GenTxs[len(x.GenTxs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/genutil/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the raw genesis transaction in JSON. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // gen_txs defines the genesis transactions. - GenTxs [][]byte `protobuf:"bytes,1,rep,name=gen_txs,json=genTxs,proto3" json:"gen_txs,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_genutil_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_genutil_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetGenTxs() [][]byte { - if x != nil { - return x.GenTxs - } - return nil -} - -var File_cosmos_genutil_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_genutil_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x75, 0x74, 0x69, 0x6c, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x65, 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x5f, 0x74, 0x78, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x26, 0xea, 0xde, 0x1f, 0x06, 0x67, 0x65, 0x6e, 0x74, 0x78, - 0x73, 0xfa, 0xde, 0x1f, 0x18, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x6a, 0x73, - 0x6f, 0x6e, 0x2e, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x67, - 0x65, 0x6e, 0x54, 0x78, 0x73, 0x42, 0xec, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x65, 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x65, - 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x65, - 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x47, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x75, - 0x74, 0x69, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x65, 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x65, - 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x65, 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_genutil_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_genutil_v1beta1_genesis_proto_rawDescData = file_cosmos_genutil_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_genutil_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_genutil_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_genutil_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_genutil_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_genutil_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_genutil_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_genutil_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.genutil.v1beta1.GenesisState -} -var file_cosmos_genutil_v1beta1_genesis_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_genutil_v1beta1_genesis_proto_init() } -func file_cosmos_genutil_v1beta1_genesis_proto_init() { - if File_cosmos_genutil_v1beta1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_genutil_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_genutil_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_genutil_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_genutil_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_genutil_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_genutil_v1beta1_genesis_proto = out.File - file_cosmos_genutil_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_genutil_v1beta1_genesis_proto_goTypes = nil - file_cosmos_genutil_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1/genesis.pulsar.go b/api/cosmos/gov/v1/genesis.pulsar.go deleted file mode 100644 index 90ad1407781a..000000000000 --- a/api/cosmos/gov/v1/genesis.pulsar.go +++ /dev/null @@ -1,1297 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*Deposit -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(Deposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(Deposit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*Vote -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_4_list)(nil) - -type _GenesisState_4_list struct { - list *[]*Proposal -} - -func (x *_GenesisState_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { - v := new(Proposal) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_4_list) NewElement() protoreflect.Value { - v := new(Proposal) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_starting_proposal_id protoreflect.FieldDescriptor - fd_GenesisState_deposits protoreflect.FieldDescriptor - fd_GenesisState_votes protoreflect.FieldDescriptor - fd_GenesisState_proposals protoreflect.FieldDescriptor - fd_GenesisState_deposit_params protoreflect.FieldDescriptor - fd_GenesisState_voting_params protoreflect.FieldDescriptor - fd_GenesisState_tally_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_genesis_proto_init() - md_GenesisState = File_cosmos_gov_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_starting_proposal_id = md_GenesisState.Fields().ByName("starting_proposal_id") - fd_GenesisState_deposits = md_GenesisState.Fields().ByName("deposits") - fd_GenesisState_votes = md_GenesisState.Fields().ByName("votes") - fd_GenesisState_proposals = md_GenesisState.Fields().ByName("proposals") - fd_GenesisState_deposit_params = md_GenesisState.Fields().ByName("deposit_params") - fd_GenesisState_voting_params = md_GenesisState.Fields().ByName("voting_params") - fd_GenesisState_tally_params = md_GenesisState.Fields().ByName("tally_params") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.StartingProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.StartingProposalId) - if !f(fd_GenesisState_starting_proposal_id, value) { - return - } - } - if len(x.Deposits) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Deposits}) - if !f(fd_GenesisState_deposits, value) { - return - } - } - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Votes}) - if !f(fd_GenesisState_votes, value) { - return - } - } - if len(x.Proposals) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Proposals}) - if !f(fd_GenesisState_proposals, value) { - return - } - } - if x.DepositParams != nil { - value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - if !f(fd_GenesisState_deposit_params, value) { - return - } - } - if x.VotingParams != nil { - value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - if !f(fd_GenesisState_voting_params, value) { - return - } - } - if x.TallyParams != nil { - value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - if !f(fd_GenesisState_tally_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_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.GenesisState.starting_proposal_id": - return x.StartingProposalId != uint64(0) - case "cosmos.gov.v1.GenesisState.deposits": - return len(x.Deposits) != 0 - case "cosmos.gov.v1.GenesisState.votes": - return len(x.Votes) != 0 - case "cosmos.gov.v1.GenesisState.proposals": - return len(x.Proposals) != 0 - case "cosmos.gov.v1.GenesisState.deposit_params": - return x.DepositParams != nil - case "cosmos.gov.v1.GenesisState.voting_params": - return x.VotingParams != nil - case "cosmos.gov.v1.GenesisState.tally_params": - return x.TallyParams != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.GenesisState.starting_proposal_id": - x.StartingProposalId = uint64(0) - case "cosmos.gov.v1.GenesisState.deposits": - x.Deposits = nil - case "cosmos.gov.v1.GenesisState.votes": - x.Votes = nil - case "cosmos.gov.v1.GenesisState.proposals": - x.Proposals = nil - case "cosmos.gov.v1.GenesisState.deposit_params": - x.DepositParams = nil - case "cosmos.gov.v1.GenesisState.voting_params": - x.VotingParams = nil - case "cosmos.gov.v1.GenesisState.tally_params": - x.TallyParams = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.GenesisState.starting_proposal_id": - value := x.StartingProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.GenesisState.deposits": - if len(x.Deposits) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.Deposits} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.GenesisState.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.GenesisState.proposals": - if len(x.Proposals) == 0 { - return protoreflect.ValueOfList(&_GenesisState_4_list{}) - } - listValue := &_GenesisState_4_list{list: &x.Proposals} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.GenesisState.deposit_params": - value := x.DepositParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.voting_params": - value := x.VotingParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.tally_params": - value := x.TallyParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.GenesisState.starting_proposal_id": - x.StartingProposalId = value.Uint() - case "cosmos.gov.v1.GenesisState.deposits": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Deposits = *clv.list - case "cosmos.gov.v1.GenesisState.votes": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.Votes = *clv.list - case "cosmos.gov.v1.GenesisState.proposals": - lv := value.List() - clv := lv.(*_GenesisState_4_list) - x.Proposals = *clv.list - case "cosmos.gov.v1.GenesisState.deposit_params": - x.DepositParams = value.Message().Interface().(*DepositParams) - case "cosmos.gov.v1.GenesisState.voting_params": - x.VotingParams = value.Message().Interface().(*VotingParams) - case "cosmos.gov.v1.GenesisState.tally_params": - x.TallyParams = value.Message().Interface().(*TallyParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.GenesisState.deposits": - if x.Deposits == nil { - x.Deposits = []*Deposit{} - } - value := &_GenesisState_2_list{list: &x.Deposits} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.GenesisState.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_GenesisState_3_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.GenesisState.proposals": - if x.Proposals == nil { - x.Proposals = []*Proposal{} - } - value := &_GenesisState_4_list{list: &x.Proposals} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.GenesisState.deposit_params": - if x.DepositParams == nil { - x.DepositParams = new(DepositParams) - } - return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.voting_params": - if x.VotingParams == nil { - x.VotingParams = new(VotingParams) - } - return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.tally_params": - if x.TallyParams == nil { - x.TallyParams = new(TallyParams) - } - return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.starting_proposal_id": - panic(fmt.Errorf("field starting_proposal_id of message cosmos.gov.v1.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.GenesisState.starting_proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.GenesisState.deposits": - list := []*Deposit{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "cosmos.gov.v1.GenesisState.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "cosmos.gov.v1.GenesisState.proposals": - list := []*Proposal{} - return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) - case "cosmos.gov.v1.GenesisState.deposit_params": - m := new(DepositParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.voting_params": - m := new(VotingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.tally_params": - m := new(TallyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.StartingProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.StartingProposalId)) - } - if len(x.Deposits) > 0 { - for _, e := range x.Deposits { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Proposals) > 0 { - for _, e := range x.Proposals { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.DepositParams != nil { - l = options.Size(x.DepositParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingParams != nil { - l = options.Size(x.VotingParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TallyParams != nil { - l = options.Size(x.TallyParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.TallyParams != nil { - encoded, err := options.Marshal(x.TallyParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.VotingParams != nil { - encoded, err := options.Marshal(x.VotingParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.DepositParams != nil { - encoded, err := options.Marshal(x.DepositParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Proposals) > 0 { - for iNdEx := len(x.Proposals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Proposals[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Deposits) > 0 { - for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Deposits[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.StartingProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartingProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartingProposalId", wireType) - } - x.StartingProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartingProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Deposits = append(x.Deposits, &Deposit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Proposals = append(x.Proposals, &Proposal{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposals[len(x.Proposals)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", 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.DepositParams == nil { - x.DepositParams = &DepositParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingParams", 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.VotingParams == nil { - x.VotingParams = &VotingParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", 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.TallyParams == nil { - x.TallyParams = &TallyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); 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, - } -} - -// Since: cosmos-sdk 0.46 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the gov module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // starting_proposal_id is the ID of the starting proposal. - StartingProposalId uint64 `protobuf:"varint,1,opt,name=starting_proposal_id,json=startingProposalId,proto3" json:"starting_proposal_id,omitempty"` - // deposits defines all the deposits present at genesis. - Deposits []*Deposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits,omitempty"` - // votes defines all the votes present at genesis. - Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` - // proposals defines all the proposals present at genesis. - Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` - // params defines all the paramaters of related to deposit. - DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // params defines all the paramaters of related to voting. - VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // params defines all the paramaters of related to tally. - TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetStartingProposalId() uint64 { - if x != nil { - return x.StartingProposalId - } - return 0 -} - -func (x *GenesisState) GetDeposits() []*Deposit { - if x != nil { - return x.Deposits - } - return nil -} - -func (x *GenesisState) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -func (x *GenesisState) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -func (x *GenesisState) GetDepositParams() *DepositParams { - if x != nil { - return x.DepositParams - } - return nil -} - -func (x *GenesisState) GetVotingParams() *VotingParams { - if x != nil { - return x.VotingParams - } - return nil -} - -func (x *GenesisState) GetTallyParams() *TallyParams { - if x != nil { - return x.TallyParams - } - return nil -} - -var File_cosmos_gov_v1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x05, - 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x43, - 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x42, 0xad, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1_genesis_proto_rawDescOnce sync.Once - file_cosmos_gov_v1_genesis_proto_rawDescData = file_cosmos_gov_v1_genesis_proto_rawDesc -) - -func file_cosmos_gov_v1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1_genesis_proto_rawDescData) - }) - return file_cosmos_gov_v1_genesis_proto_rawDescData -} - -var file_cosmos_gov_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_gov_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.gov.v1.GenesisState - (*Deposit)(nil), // 1: cosmos.gov.v1.Deposit - (*Vote)(nil), // 2: cosmos.gov.v1.Vote - (*Proposal)(nil), // 3: cosmos.gov.v1.Proposal - (*DepositParams)(nil), // 4: cosmos.gov.v1.DepositParams - (*VotingParams)(nil), // 5: cosmos.gov.v1.VotingParams - (*TallyParams)(nil), // 6: cosmos.gov.v1.TallyParams -} -var file_cosmos_gov_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.gov.v1.GenesisState.deposits:type_name -> cosmos.gov.v1.Deposit - 2, // 1: cosmos.gov.v1.GenesisState.votes:type_name -> cosmos.gov.v1.Vote - 3, // 2: cosmos.gov.v1.GenesisState.proposals:type_name -> cosmos.gov.v1.Proposal - 4, // 3: cosmos.gov.v1.GenesisState.deposit_params:type_name -> cosmos.gov.v1.DepositParams - 5, // 4: cosmos.gov.v1.GenesisState.voting_params:type_name -> cosmos.gov.v1.VotingParams - 6, // 5: cosmos.gov.v1.GenesisState.tally_params:type_name -> cosmos.gov.v1.TallyParams - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1_genesis_proto_init() } -func file_cosmos_gov_v1_genesis_proto_init() { - if File_cosmos_gov_v1_genesis_proto != nil { - return - } - file_cosmos_gov_v1_gov_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_gov_v1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_gov_v1_genesis_proto_msgTypes, - }.Build() - File_cosmos_gov_v1_genesis_proto = out.File - file_cosmos_gov_v1_genesis_proto_rawDesc = nil - file_cosmos_gov_v1_genesis_proto_goTypes = nil - file_cosmos_gov_v1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go deleted file mode 100644 index ae8f3c9535e0..000000000000 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ /dev/null @@ -1,6077 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_WeightedVoteOption protoreflect.MessageDescriptor - fd_WeightedVoteOption_option protoreflect.FieldDescriptor - fd_WeightedVoteOption_weight protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_WeightedVoteOption = File_cosmos_gov_v1_gov_proto.Messages().ByName("WeightedVoteOption") - fd_WeightedVoteOption_option = md_WeightedVoteOption.Fields().ByName("option") - fd_WeightedVoteOption_weight = md_WeightedVoteOption.Fields().ByName("weight") -} - -var _ protoreflect.Message = (*fastReflection_WeightedVoteOption)(nil) - -type fastReflection_WeightedVoteOption WeightedVoteOption - -func (x *WeightedVoteOption) ProtoReflect() protoreflect.Message { - return (*fastReflection_WeightedVoteOption)(x) -} - -func (x *WeightedVoteOption) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_WeightedVoteOption_messageType fastReflection_WeightedVoteOption_messageType -var _ protoreflect.MessageType = fastReflection_WeightedVoteOption_messageType{} - -type fastReflection_WeightedVoteOption_messageType struct{} - -func (x fastReflection_WeightedVoteOption_messageType) Zero() protoreflect.Message { - return (*fastReflection_WeightedVoteOption)(nil) -} -func (x fastReflection_WeightedVoteOption_messageType) New() protoreflect.Message { - return new(fastReflection_WeightedVoteOption) -} -func (x fastReflection_WeightedVoteOption_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_WeightedVoteOption -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_WeightedVoteOption) Descriptor() protoreflect.MessageDescriptor { - return md_WeightedVoteOption -} - -// 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_WeightedVoteOption) Type() protoreflect.MessageType { - return _fastReflection_WeightedVoteOption_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_WeightedVoteOption) New() protoreflect.Message { - return new(fastReflection_WeightedVoteOption) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_WeightedVoteOption) Interface() protoreflect.ProtoMessage { - return (*WeightedVoteOption)(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_WeightedVoteOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_WeightedVoteOption_option, value) { - return - } - } - if x.Weight != "" { - value := protoreflect.ValueOfString(x.Weight) - if !f(fd_WeightedVoteOption_weight, 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_WeightedVoteOption) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.WeightedVoteOption.option": - return x.Option != 0 - case "cosmos.gov.v1.WeightedVoteOption.weight": - return x.Weight != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1.WeightedVoteOption 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_WeightedVoteOption) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.WeightedVoteOption.option": - x.Option = 0 - case "cosmos.gov.v1.WeightedVoteOption.weight": - x.Weight = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1.WeightedVoteOption 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_WeightedVoteOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.WeightedVoteOption.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1.WeightedVoteOption.weight": - value := x.Weight - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1.WeightedVoteOption 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_WeightedVoteOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.WeightedVoteOption.option": - x.Option = (VoteOption)(value.Enum()) - case "cosmos.gov.v1.WeightedVoteOption.weight": - x.Weight = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1.WeightedVoteOption 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_WeightedVoteOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.WeightedVoteOption.option": - panic(fmt.Errorf("field option of message cosmos.gov.v1.WeightedVoteOption is not mutable")) - case "cosmos.gov.v1.WeightedVoteOption.weight": - panic(fmt.Errorf("field weight of message cosmos.gov.v1.WeightedVoteOption is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1.WeightedVoteOption 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_WeightedVoteOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.WeightedVoteOption.option": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1.WeightedVoteOption.weight": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1.WeightedVoteOption 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_WeightedVoteOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.WeightedVoteOption", 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_WeightedVoteOption) 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_WeightedVoteOption) 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_WeightedVoteOption) 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_WeightedVoteOption) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*WeightedVoteOption) - 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.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - l = len(x.Weight) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*WeightedVoteOption) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Weight) > 0 { - i -= len(x.Weight) - copy(dAtA[i:], x.Weight) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Weight))) - i-- - dAtA[i] = 0x12 - } - if x.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*WeightedVoteOption) - 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: WeightedVoteOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WeightedVoteOption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Weight", 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.Weight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Deposit_3_list)(nil) - -type _Deposit_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Deposit_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Deposit_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Deposit_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Deposit_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Deposit_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Deposit_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Deposit_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Deposit_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Deposit protoreflect.MessageDescriptor - fd_Deposit_proposal_id protoreflect.FieldDescriptor - fd_Deposit_depositor protoreflect.FieldDescriptor - fd_Deposit_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_Deposit = File_cosmos_gov_v1_gov_proto.Messages().ByName("Deposit") - fd_Deposit_proposal_id = md_Deposit.Fields().ByName("proposal_id") - fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") - fd_Deposit_amount = md_Deposit.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_Deposit)(nil) - -type fastReflection_Deposit Deposit - -func (x *Deposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_Deposit)(x) -} - -func (x *Deposit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Deposit_messageType fastReflection_Deposit_messageType -var _ protoreflect.MessageType = fastReflection_Deposit_messageType{} - -type fastReflection_Deposit_messageType struct{} - -func (x fastReflection_Deposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_Deposit)(nil) -} -func (x fastReflection_Deposit_messageType) New() protoreflect.Message { - return new(fastReflection_Deposit) -} -func (x fastReflection_Deposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Deposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Deposit) Descriptor() protoreflect.MessageDescriptor { - return md_Deposit -} - -// 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_Deposit) Type() protoreflect.MessageType { - return _fastReflection_Deposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Deposit) New() protoreflect.Message { - return new(fastReflection_Deposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Deposit) Interface() protoreflect.ProtoMessage { - return (*Deposit)(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_Deposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_Deposit_proposal_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_Deposit_depositor, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Deposit_3_list{list: &x.Amount}) - if !f(fd_Deposit_amount, 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_Deposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.Deposit.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.Deposit.depositor": - return x.Depositor != "" - case "cosmos.gov.v1.Deposit.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Deposit 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_Deposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.Deposit.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.Deposit.depositor": - x.Depositor = "" - case "cosmos.gov.v1.Deposit.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Deposit 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_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.Deposit.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.Deposit.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.Deposit.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Deposit_3_list{}) - } - listValue := &_Deposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Deposit 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_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.Deposit.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.Deposit.depositor": - x.Depositor = value.Interface().(string) - case "cosmos.gov.v1.Deposit.amount": - lv := value.List() - clv := lv.(*_Deposit_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Deposit 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_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.Deposit.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_Deposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.Deposit.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.Deposit is not mutable")) - case "cosmos.gov.v1.Deposit.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1.Deposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Deposit 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_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.Deposit.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.Deposit.depositor": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.Deposit.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Deposit 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_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.Deposit", 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_Deposit) 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_Deposit) 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_Deposit) 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_Deposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Deposit) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Deposit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Deposit) - 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: Deposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Proposal_2_list)(nil) - -type _Proposal_2_list struct { - list *[]*anypb.Any -} - -func (x *_Proposal_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Proposal_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Proposal_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_Proposal_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Proposal_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Proposal_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Proposal_7_list)(nil) - -type _Proposal_7_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Proposal_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Proposal_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Proposal_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Proposal_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Proposal_7_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Proposal_7_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Proposal protoreflect.MessageDescriptor - fd_Proposal_id protoreflect.FieldDescriptor - fd_Proposal_messages protoreflect.FieldDescriptor - fd_Proposal_status protoreflect.FieldDescriptor - fd_Proposal_final_tally_result protoreflect.FieldDescriptor - fd_Proposal_submit_time protoreflect.FieldDescriptor - fd_Proposal_deposit_end_time protoreflect.FieldDescriptor - fd_Proposal_total_deposit protoreflect.FieldDescriptor - fd_Proposal_voting_start_time protoreflect.FieldDescriptor - fd_Proposal_voting_end_time protoreflect.FieldDescriptor - fd_Proposal_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_Proposal = File_cosmos_gov_v1_gov_proto.Messages().ByName("Proposal") - fd_Proposal_id = md_Proposal.Fields().ByName("id") - fd_Proposal_messages = md_Proposal.Fields().ByName("messages") - fd_Proposal_status = md_Proposal.Fields().ByName("status") - fd_Proposal_final_tally_result = md_Proposal.Fields().ByName("final_tally_result") - fd_Proposal_submit_time = md_Proposal.Fields().ByName("submit_time") - fd_Proposal_deposit_end_time = md_Proposal.Fields().ByName("deposit_end_time") - fd_Proposal_total_deposit = md_Proposal.Fields().ByName("total_deposit") - fd_Proposal_voting_start_time = md_Proposal.Fields().ByName("voting_start_time") - fd_Proposal_voting_end_time = md_Proposal.Fields().ByName("voting_end_time") - fd_Proposal_metadata = md_Proposal.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_Proposal)(nil) - -type fastReflection_Proposal Proposal - -func (x *Proposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_Proposal)(x) -} - -func (x *Proposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Proposal_messageType fastReflection_Proposal_messageType -var _ protoreflect.MessageType = fastReflection_Proposal_messageType{} - -type fastReflection_Proposal_messageType struct{} - -func (x fastReflection_Proposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_Proposal)(nil) -} -func (x fastReflection_Proposal_messageType) New() protoreflect.Message { - return new(fastReflection_Proposal) -} -func (x fastReflection_Proposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Proposal) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// 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_Proposal) Type() protoreflect.MessageType { - return _fastReflection_Proposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Proposal) New() protoreflect.Message { - return new(fastReflection_Proposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Proposal) Interface() protoreflect.ProtoMessage { - return (*Proposal)(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_Proposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Proposal_id, value) { - return - } - } - if len(x.Messages) != 0 { - value := protoreflect.ValueOfList(&_Proposal_2_list{list: &x.Messages}) - if !f(fd_Proposal_messages, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_Proposal_status, value) { - return - } - } - if x.FinalTallyResult != nil { - value := protoreflect.ValueOfMessage(x.FinalTallyResult.ProtoReflect()) - if !f(fd_Proposal_final_tally_result, value) { - return - } - } - if x.SubmitTime != nil { - value := protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - if !f(fd_Proposal_submit_time, value) { - return - } - } - if x.DepositEndTime != nil { - value := protoreflect.ValueOfMessage(x.DepositEndTime.ProtoReflect()) - if !f(fd_Proposal_deposit_end_time, value) { - return - } - } - if len(x.TotalDeposit) != 0 { - value := protoreflect.ValueOfList(&_Proposal_7_list{list: &x.TotalDeposit}) - if !f(fd_Proposal_total_deposit, value) { - return - } - } - if x.VotingStartTime != nil { - value := protoreflect.ValueOfMessage(x.VotingStartTime.ProtoReflect()) - if !f(fd_Proposal_voting_start_time, value) { - return - } - } - if x.VotingEndTime != nil { - value := protoreflect.ValueOfMessage(x.VotingEndTime.ProtoReflect()) - if !f(fd_Proposal_voting_end_time, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_Proposal_metadata, 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_Proposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.Proposal.id": - return x.Id != uint64(0) - case "cosmos.gov.v1.Proposal.messages": - return len(x.Messages) != 0 - case "cosmos.gov.v1.Proposal.status": - return x.Status != 0 - case "cosmos.gov.v1.Proposal.final_tally_result": - return x.FinalTallyResult != nil - case "cosmos.gov.v1.Proposal.submit_time": - return x.SubmitTime != nil - case "cosmos.gov.v1.Proposal.deposit_end_time": - return x.DepositEndTime != nil - case "cosmos.gov.v1.Proposal.total_deposit": - return len(x.TotalDeposit) != 0 - case "cosmos.gov.v1.Proposal.voting_start_time": - return x.VotingStartTime != nil - case "cosmos.gov.v1.Proposal.voting_end_time": - return x.VotingEndTime != nil - case "cosmos.gov.v1.Proposal.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Proposal 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_Proposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.Proposal.id": - x.Id = uint64(0) - case "cosmos.gov.v1.Proposal.messages": - x.Messages = nil - case "cosmos.gov.v1.Proposal.status": - x.Status = 0 - case "cosmos.gov.v1.Proposal.final_tally_result": - x.FinalTallyResult = nil - case "cosmos.gov.v1.Proposal.submit_time": - x.SubmitTime = nil - case "cosmos.gov.v1.Proposal.deposit_end_time": - x.DepositEndTime = nil - case "cosmos.gov.v1.Proposal.total_deposit": - x.TotalDeposit = nil - case "cosmos.gov.v1.Proposal.voting_start_time": - x.VotingStartTime = nil - case "cosmos.gov.v1.Proposal.voting_end_time": - x.VotingEndTime = nil - case "cosmos.gov.v1.Proposal.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Proposal 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_Proposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.Proposal.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.Proposal.messages": - if len(x.Messages) == 0 { - return protoreflect.ValueOfList(&_Proposal_2_list{}) - } - listValue := &_Proposal_2_list{list: &x.Messages} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.Proposal.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1.Proposal.final_tally_result": - value := x.FinalTallyResult - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.Proposal.submit_time": - value := x.SubmitTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.Proposal.deposit_end_time": - value := x.DepositEndTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.Proposal.total_deposit": - if len(x.TotalDeposit) == 0 { - return protoreflect.ValueOfList(&_Proposal_7_list{}) - } - listValue := &_Proposal_7_list{list: &x.TotalDeposit} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.Proposal.voting_start_time": - value := x.VotingStartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.Proposal.voting_end_time": - value := x.VotingEndTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.Proposal.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Proposal 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_Proposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.Proposal.id": - x.Id = value.Uint() - case "cosmos.gov.v1.Proposal.messages": - lv := value.List() - clv := lv.(*_Proposal_2_list) - x.Messages = *clv.list - case "cosmos.gov.v1.Proposal.status": - x.Status = (ProposalStatus)(value.Enum()) - case "cosmos.gov.v1.Proposal.final_tally_result": - x.FinalTallyResult = value.Message().Interface().(*TallyResult) - case "cosmos.gov.v1.Proposal.submit_time": - x.SubmitTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1.Proposal.deposit_end_time": - x.DepositEndTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1.Proposal.total_deposit": - lv := value.List() - clv := lv.(*_Proposal_7_list) - x.TotalDeposit = *clv.list - case "cosmos.gov.v1.Proposal.voting_start_time": - x.VotingStartTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1.Proposal.voting_end_time": - x.VotingEndTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1.Proposal.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Proposal 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_Proposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.Proposal.messages": - if x.Messages == nil { - x.Messages = []*anypb.Any{} - } - value := &_Proposal_2_list{list: &x.Messages} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.Proposal.final_tally_result": - if x.FinalTallyResult == nil { - x.FinalTallyResult = new(TallyResult) - } - return protoreflect.ValueOfMessage(x.FinalTallyResult.ProtoReflect()) - case "cosmos.gov.v1.Proposal.submit_time": - if x.SubmitTime == nil { - x.SubmitTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - case "cosmos.gov.v1.Proposal.deposit_end_time": - if x.DepositEndTime == nil { - x.DepositEndTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.DepositEndTime.ProtoReflect()) - case "cosmos.gov.v1.Proposal.total_deposit": - if x.TotalDeposit == nil { - x.TotalDeposit = []*v1beta1.Coin{} - } - value := &_Proposal_7_list{list: &x.TotalDeposit} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.Proposal.voting_start_time": - if x.VotingStartTime == nil { - x.VotingStartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.VotingStartTime.ProtoReflect()) - case "cosmos.gov.v1.Proposal.voting_end_time": - if x.VotingEndTime == nil { - x.VotingEndTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.VotingEndTime.ProtoReflect()) - case "cosmos.gov.v1.Proposal.id": - panic(fmt.Errorf("field id of message cosmos.gov.v1.Proposal is not mutable")) - case "cosmos.gov.v1.Proposal.status": - panic(fmt.Errorf("field status of message cosmos.gov.v1.Proposal is not mutable")) - case "cosmos.gov.v1.Proposal.metadata": - panic(fmt.Errorf("field metadata of message cosmos.gov.v1.Proposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Proposal 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_Proposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.Proposal.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.Proposal.messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_Proposal_2_list{list: &list}) - case "cosmos.gov.v1.Proposal.status": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1.Proposal.final_tally_result": - m := new(TallyResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.Proposal.submit_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.Proposal.deposit_end_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.Proposal.total_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Proposal_7_list{list: &list}) - case "cosmos.gov.v1.Proposal.voting_start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.Proposal.voting_end_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.Proposal.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Proposal 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_Proposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.Proposal", 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_Proposal) 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_Proposal) 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_Proposal) 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_Proposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Proposal) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if len(x.Messages) > 0 { - for _, e := range x.Messages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if x.FinalTallyResult != nil { - l = options.Size(x.FinalTallyResult) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SubmitTime != nil { - l = options.Size(x.SubmitTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DepositEndTime != nil { - l = options.Size(x.DepositEndTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.TotalDeposit) > 0 { - for _, e := range x.TotalDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.VotingStartTime != nil { - l = options.Size(x.VotingStartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingEndTime != nil { - l = options.Size(x.VotingEndTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x52 - } - if x.VotingEndTime != nil { - encoded, err := options.Marshal(x.VotingEndTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if x.VotingStartTime != nil { - encoded, err := options.Marshal(x.VotingStartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.TotalDeposit) > 0 { - for iNdEx := len(x.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TotalDeposit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.DepositEndTime != nil { - encoded, err := options.Marshal(x.DepositEndTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.SubmitTime != nil { - encoded, err := options.Marshal(x.SubmitTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.FinalTallyResult != nil { - encoded, err := options.Marshal(x.FinalTallyResult) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x18 - } - if len(x.Messages) > 0 { - for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Messages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Messages = append(x.Messages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= ProposalStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", 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.FinalTallyResult == nil { - x.FinalTallyResult = &TallyResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FinalTallyResult); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", 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.SubmitTime == nil { - x.SubmitTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SubmitTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositEndTime", 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.DepositEndTime == nil { - x.DepositEndTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositEndTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TotalDeposit = append(x.TotalDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalDeposit[len(x.TotalDeposit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingStartTime", 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.VotingStartTime == nil { - x.VotingStartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingStartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingEndTime", 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.VotingEndTime == nil { - x.VotingEndTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingEndTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TallyResult protoreflect.MessageDescriptor - fd_TallyResult_yes_count protoreflect.FieldDescriptor - fd_TallyResult_abstain_count protoreflect.FieldDescriptor - fd_TallyResult_no_count protoreflect.FieldDescriptor - fd_TallyResult_no_with_veto_count protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_TallyResult = File_cosmos_gov_v1_gov_proto.Messages().ByName("TallyResult") - fd_TallyResult_yes_count = md_TallyResult.Fields().ByName("yes_count") - fd_TallyResult_abstain_count = md_TallyResult.Fields().ByName("abstain_count") - fd_TallyResult_no_count = md_TallyResult.Fields().ByName("no_count") - fd_TallyResult_no_with_veto_count = md_TallyResult.Fields().ByName("no_with_veto_count") -} - -var _ protoreflect.Message = (*fastReflection_TallyResult)(nil) - -type fastReflection_TallyResult TallyResult - -func (x *TallyResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_TallyResult)(x) -} - -func (x *TallyResult) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TallyResult_messageType fastReflection_TallyResult_messageType -var _ protoreflect.MessageType = fastReflection_TallyResult_messageType{} - -type fastReflection_TallyResult_messageType struct{} - -func (x fastReflection_TallyResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_TallyResult)(nil) -} -func (x fastReflection_TallyResult_messageType) New() protoreflect.Message { - return new(fastReflection_TallyResult) -} -func (x fastReflection_TallyResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TallyResult -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TallyResult) Descriptor() protoreflect.MessageDescriptor { - return md_TallyResult -} - -// 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_TallyResult) Type() protoreflect.MessageType { - return _fastReflection_TallyResult_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TallyResult) New() protoreflect.Message { - return new(fastReflection_TallyResult) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TallyResult) Interface() protoreflect.ProtoMessage { - return (*TallyResult)(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_TallyResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.YesCount != "" { - value := protoreflect.ValueOfString(x.YesCount) - if !f(fd_TallyResult_yes_count, value) { - return - } - } - if x.AbstainCount != "" { - value := protoreflect.ValueOfString(x.AbstainCount) - if !f(fd_TallyResult_abstain_count, value) { - return - } - } - if x.NoCount != "" { - value := protoreflect.ValueOfString(x.NoCount) - if !f(fd_TallyResult_no_count, value) { - return - } - } - if x.NoWithVetoCount != "" { - value := protoreflect.ValueOfString(x.NoWithVetoCount) - if !f(fd_TallyResult_no_with_veto_count, 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_TallyResult) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.TallyResult.yes_count": - return x.YesCount != "" - case "cosmos.gov.v1.TallyResult.abstain_count": - return x.AbstainCount != "" - case "cosmos.gov.v1.TallyResult.no_count": - return x.NoCount != "" - case "cosmos.gov.v1.TallyResult.no_with_veto_count": - return x.NoWithVetoCount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyResult 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_TallyResult) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.TallyResult.yes_count": - x.YesCount = "" - case "cosmos.gov.v1.TallyResult.abstain_count": - x.AbstainCount = "" - case "cosmos.gov.v1.TallyResult.no_count": - x.NoCount = "" - case "cosmos.gov.v1.TallyResult.no_with_veto_count": - x.NoWithVetoCount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyResult 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_TallyResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.TallyResult.yes_count": - value := x.YesCount - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.TallyResult.abstain_count": - value := x.AbstainCount - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.TallyResult.no_count": - value := x.NoCount - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.TallyResult.no_with_veto_count": - value := x.NoWithVetoCount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyResult 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_TallyResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.TallyResult.yes_count": - x.YesCount = value.Interface().(string) - case "cosmos.gov.v1.TallyResult.abstain_count": - x.AbstainCount = value.Interface().(string) - case "cosmos.gov.v1.TallyResult.no_count": - x.NoCount = value.Interface().(string) - case "cosmos.gov.v1.TallyResult.no_with_veto_count": - x.NoWithVetoCount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyResult 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_TallyResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.TallyResult.yes_count": - panic(fmt.Errorf("field yes_count of message cosmos.gov.v1.TallyResult is not mutable")) - case "cosmos.gov.v1.TallyResult.abstain_count": - panic(fmt.Errorf("field abstain_count of message cosmos.gov.v1.TallyResult is not mutable")) - case "cosmos.gov.v1.TallyResult.no_count": - panic(fmt.Errorf("field no_count of message cosmos.gov.v1.TallyResult is not mutable")) - case "cosmos.gov.v1.TallyResult.no_with_veto_count": - panic(fmt.Errorf("field no_with_veto_count of message cosmos.gov.v1.TallyResult is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyResult 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_TallyResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.TallyResult.yes_count": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.TallyResult.abstain_count": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.TallyResult.no_count": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.TallyResult.no_with_veto_count": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyResult 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_TallyResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.TallyResult", 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_TallyResult) 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_TallyResult) 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_TallyResult) 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_TallyResult) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TallyResult) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.YesCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AbstainCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NoCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NoWithVetoCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TallyResult) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NoWithVetoCount) > 0 { - i -= len(x.NoWithVetoCount) - copy(dAtA[i:], x.NoWithVetoCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NoWithVetoCount))) - i-- - dAtA[i] = 0x22 - } - if len(x.NoCount) > 0 { - i -= len(x.NoCount) - copy(dAtA[i:], x.NoCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NoCount))) - i-- - dAtA[i] = 0x1a - } - if len(x.AbstainCount) > 0 { - i -= len(x.AbstainCount) - copy(dAtA[i:], x.AbstainCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AbstainCount))) - i-- - dAtA[i] = 0x12 - } - if len(x.YesCount) > 0 { - i -= len(x.YesCount) - copy(dAtA[i:], x.YesCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.YesCount))) - 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().(*TallyResult) - 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: TallyResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TallyResult: 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 YesCount", 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.YesCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AbstainCount", 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.AbstainCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoCount", 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.NoCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoWithVetoCount", 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.NoWithVetoCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Vote_4_list)(nil) - -type _Vote_4_list struct { - list *[]*WeightedVoteOption -} - -func (x *_Vote_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Vote_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Vote_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - (*x.list)[i] = concreteValue -} - -func (x *_Vote_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Vote_4_list) AppendMutable() protoreflect.Value { - v := new(WeightedVoteOption) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Vote_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Vote_4_list) NewElement() protoreflect.Value { - v := new(WeightedVoteOption) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Vote_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Vote protoreflect.MessageDescriptor - fd_Vote_proposal_id protoreflect.FieldDescriptor - fd_Vote_voter protoreflect.FieldDescriptor - fd_Vote_options protoreflect.FieldDescriptor - fd_Vote_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_Vote = File_cosmos_gov_v1_gov_proto.Messages().ByName("Vote") - fd_Vote_proposal_id = md_Vote.Fields().ByName("proposal_id") - fd_Vote_voter = md_Vote.Fields().ByName("voter") - fd_Vote_options = md_Vote.Fields().ByName("options") - fd_Vote_metadata = md_Vote.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_Vote)(nil) - -type fastReflection_Vote Vote - -func (x *Vote) ProtoReflect() protoreflect.Message { - return (*fastReflection_Vote)(x) -} - -func (x *Vote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Vote_messageType fastReflection_Vote_messageType -var _ protoreflect.MessageType = fastReflection_Vote_messageType{} - -type fastReflection_Vote_messageType struct{} - -func (x fastReflection_Vote_messageType) Zero() protoreflect.Message { - return (*fastReflection_Vote)(nil) -} -func (x fastReflection_Vote_messageType) New() protoreflect.Message { - return new(fastReflection_Vote) -} -func (x fastReflection_Vote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Vote) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// 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_Vote) Type() protoreflect.MessageType { - return _fastReflection_Vote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Vote) New() protoreflect.Message { - return new(fastReflection_Vote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Vote) Interface() protoreflect.ProtoMessage { - return (*Vote)(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_Vote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_Vote_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_Vote_voter, value) { - return - } - } - if len(x.Options) != 0 { - value := protoreflect.ValueOfList(&_Vote_4_list{list: &x.Options}) - if !f(fd_Vote_options, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_Vote_metadata, 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_Vote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.Vote.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.Vote.voter": - return x.Voter != "" - case "cosmos.gov.v1.Vote.options": - return len(x.Options) != 0 - case "cosmos.gov.v1.Vote.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Vote 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_Vote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.Vote.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.Vote.voter": - x.Voter = "" - case "cosmos.gov.v1.Vote.options": - x.Options = nil - case "cosmos.gov.v1.Vote.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Vote 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_Vote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.Vote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.Vote.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.Vote.options": - if len(x.Options) == 0 { - return protoreflect.ValueOfList(&_Vote_4_list{}) - } - listValue := &_Vote_4_list{list: &x.Options} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.Vote.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Vote 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_Vote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.Vote.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.Vote.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1.Vote.options": - lv := value.List() - clv := lv.(*_Vote_4_list) - x.Options = *clv.list - case "cosmos.gov.v1.Vote.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Vote 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_Vote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.Vote.options": - if x.Options == nil { - x.Options = []*WeightedVoteOption{} - } - value := &_Vote_4_list{list: &x.Options} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.Vote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.Vote is not mutable")) - case "cosmos.gov.v1.Vote.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1.Vote is not mutable")) - case "cosmos.gov.v1.Vote.metadata": - panic(fmt.Errorf("field metadata of message cosmos.gov.v1.Vote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Vote 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_Vote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.Vote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.Vote.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.Vote.options": - list := []*WeightedVoteOption{} - return protoreflect.ValueOfList(&_Vote_4_list{list: &list}) - case "cosmos.gov.v1.Vote.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.Vote 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_Vote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.Vote", 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_Vote) 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_Vote) 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_Vote) 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_Vote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Vote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Options) > 0 { - for _, e := range x.Options { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Vote) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x2a - } - if len(x.Options) > 0 { - for iNdEx := len(x.Options) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Options[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Vote) - 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Options = append(x.Options, &WeightedVoteOption{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Options[len(x.Options)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DepositParams_1_list)(nil) - -type _DepositParams_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_DepositParams_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DepositParams_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_DepositParams_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_DepositParams_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_DepositParams_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DepositParams_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_DepositParams_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DepositParams_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DepositParams protoreflect.MessageDescriptor - fd_DepositParams_min_deposit protoreflect.FieldDescriptor - fd_DepositParams_max_deposit_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_DepositParams = File_cosmos_gov_v1_gov_proto.Messages().ByName("DepositParams") - fd_DepositParams_min_deposit = md_DepositParams.Fields().ByName("min_deposit") - fd_DepositParams_max_deposit_period = md_DepositParams.Fields().ByName("max_deposit_period") -} - -var _ protoreflect.Message = (*fastReflection_DepositParams)(nil) - -type fastReflection_DepositParams DepositParams - -func (x *DepositParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_DepositParams)(x) -} - -func (x *DepositParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_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_DepositParams_messageType fastReflection_DepositParams_messageType -var _ protoreflect.MessageType = fastReflection_DepositParams_messageType{} - -type fastReflection_DepositParams_messageType struct{} - -func (x fastReflection_DepositParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_DepositParams)(nil) -} -func (x fastReflection_DepositParams_messageType) New() protoreflect.Message { - return new(fastReflection_DepositParams) -} -func (x fastReflection_DepositParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DepositParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DepositParams) Descriptor() protoreflect.MessageDescriptor { - return md_DepositParams -} - -// 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_DepositParams) Type() protoreflect.MessageType { - return _fastReflection_DepositParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DepositParams) New() protoreflect.Message { - return new(fastReflection_DepositParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DepositParams) Interface() protoreflect.ProtoMessage { - return (*DepositParams)(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_DepositParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.MinDeposit) != 0 { - value := protoreflect.ValueOfList(&_DepositParams_1_list{list: &x.MinDeposit}) - if !f(fd_DepositParams_min_deposit, value) { - return - } - } - if x.MaxDepositPeriod != nil { - value := protoreflect.ValueOfMessage(x.MaxDepositPeriod.ProtoReflect()) - if !f(fd_DepositParams_max_deposit_period, 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_DepositParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.DepositParams.min_deposit": - return len(x.MinDeposit) != 0 - case "cosmos.gov.v1.DepositParams.max_deposit_period": - return x.MaxDepositPeriod != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.DepositParams 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_DepositParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.DepositParams.min_deposit": - x.MinDeposit = nil - case "cosmos.gov.v1.DepositParams.max_deposit_period": - x.MaxDepositPeriod = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.DepositParams 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_DepositParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.DepositParams.min_deposit": - if len(x.MinDeposit) == 0 { - return protoreflect.ValueOfList(&_DepositParams_1_list{}) - } - listValue := &_DepositParams_1_list{list: &x.MinDeposit} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.DepositParams.max_deposit_period": - value := x.MaxDepositPeriod - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.DepositParams 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_DepositParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.DepositParams.min_deposit": - lv := value.List() - clv := lv.(*_DepositParams_1_list) - x.MinDeposit = *clv.list - case "cosmos.gov.v1.DepositParams.max_deposit_period": - x.MaxDepositPeriod = value.Message().Interface().(*durationpb.Duration) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.DepositParams 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_DepositParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.DepositParams.min_deposit": - if x.MinDeposit == nil { - x.MinDeposit = []*v1beta1.Coin{} - } - value := &_DepositParams_1_list{list: &x.MinDeposit} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.DepositParams.max_deposit_period": - if x.MaxDepositPeriod == nil { - x.MaxDepositPeriod = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.MaxDepositPeriod.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.DepositParams 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_DepositParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.DepositParams.min_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_DepositParams_1_list{list: &list}) - case "cosmos.gov.v1.DepositParams.max_deposit_period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.DepositParams 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_DepositParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.DepositParams", 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_DepositParams) 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_DepositParams) 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_DepositParams) 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_DepositParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DepositParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.MinDeposit) > 0 { - for _, e := range x.MinDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.MaxDepositPeriod != nil { - l = options.Size(x.MaxDepositPeriod) - 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().(*DepositParams) - 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.MaxDepositPeriod != nil { - encoded, err := options.Marshal(x.MaxDepositPeriod) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.MinDeposit) > 0 { - for iNdEx := len(x.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MinDeposit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DepositParams) - 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: DepositParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DepositParams: 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 MinDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinDeposit = append(x.MinDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinDeposit[len(x.MinDeposit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", 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.MaxDepositPeriod == nil { - x.MaxDepositPeriod = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxDepositPeriod); 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_VotingParams protoreflect.MessageDescriptor - fd_VotingParams_voting_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_VotingParams = File_cosmos_gov_v1_gov_proto.Messages().ByName("VotingParams") - fd_VotingParams_voting_period = md_VotingParams.Fields().ByName("voting_period") -} - -var _ protoreflect.Message = (*fastReflection_VotingParams)(nil) - -type fastReflection_VotingParams VotingParams - -func (x *VotingParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_VotingParams)(x) -} - -func (x *VotingParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_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_VotingParams_messageType fastReflection_VotingParams_messageType -var _ protoreflect.MessageType = fastReflection_VotingParams_messageType{} - -type fastReflection_VotingParams_messageType struct{} - -func (x fastReflection_VotingParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_VotingParams)(nil) -} -func (x fastReflection_VotingParams_messageType) New() protoreflect.Message { - return new(fastReflection_VotingParams) -} -func (x fastReflection_VotingParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VotingParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VotingParams) Descriptor() protoreflect.MessageDescriptor { - return md_VotingParams -} - -// 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_VotingParams) Type() protoreflect.MessageType { - return _fastReflection_VotingParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VotingParams) New() protoreflect.Message { - return new(fastReflection_VotingParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VotingParams) Interface() protoreflect.ProtoMessage { - return (*VotingParams)(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_VotingParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.VotingPeriod != nil { - value := protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) - if !f(fd_VotingParams_voting_period, 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_VotingParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.VotingParams.voting_period": - return x.VotingPeriod != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.VotingParams 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_VotingParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.VotingParams.voting_period": - x.VotingPeriod = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.VotingParams 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_VotingParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.VotingParams.voting_period": - value := x.VotingPeriod - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.VotingParams 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_VotingParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.VotingParams.voting_period": - x.VotingPeriod = value.Message().Interface().(*durationpb.Duration) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.VotingParams 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_VotingParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.VotingParams.voting_period": - if x.VotingPeriod == nil { - x.VotingPeriod = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.VotingParams 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_VotingParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.VotingParams.voting_period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.VotingParams 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_VotingParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.VotingParams", 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_VotingParams) 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_VotingParams) 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_VotingParams) 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_VotingParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VotingParams) - 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.VotingPeriod != nil { - l = options.Size(x.VotingPeriod) - 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().(*VotingParams) - 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.VotingPeriod != nil { - encoded, err := options.Marshal(x.VotingPeriod) - 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().(*VotingParams) - 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: VotingParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VotingParams: 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 VotingPeriod", 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.VotingPeriod == nil { - x.VotingPeriod = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingPeriod); 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_TallyParams protoreflect.MessageDescriptor - fd_TallyParams_quorum protoreflect.FieldDescriptor - fd_TallyParams_threshold protoreflect.FieldDescriptor - fd_TallyParams_veto_threshold protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_gov_proto_init() - md_TallyParams = File_cosmos_gov_v1_gov_proto.Messages().ByName("TallyParams") - fd_TallyParams_quorum = md_TallyParams.Fields().ByName("quorum") - fd_TallyParams_threshold = md_TallyParams.Fields().ByName("threshold") - fd_TallyParams_veto_threshold = md_TallyParams.Fields().ByName("veto_threshold") -} - -var _ protoreflect.Message = (*fastReflection_TallyParams)(nil) - -type fastReflection_TallyParams TallyParams - -func (x *TallyParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_TallyParams)(x) -} - -func (x *TallyParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TallyParams_messageType fastReflection_TallyParams_messageType -var _ protoreflect.MessageType = fastReflection_TallyParams_messageType{} - -type fastReflection_TallyParams_messageType struct{} - -func (x fastReflection_TallyParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_TallyParams)(nil) -} -func (x fastReflection_TallyParams_messageType) New() protoreflect.Message { - return new(fastReflection_TallyParams) -} -func (x fastReflection_TallyParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TallyParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TallyParams) Descriptor() protoreflect.MessageDescriptor { - return md_TallyParams -} - -// 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_TallyParams) Type() protoreflect.MessageType { - return _fastReflection_TallyParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TallyParams) New() protoreflect.Message { - return new(fastReflection_TallyParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TallyParams) Interface() protoreflect.ProtoMessage { - return (*TallyParams)(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_TallyParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Quorum != "" { - value := protoreflect.ValueOfString(x.Quorum) - if !f(fd_TallyParams_quorum, value) { - return - } - } - if x.Threshold != "" { - value := protoreflect.ValueOfString(x.Threshold) - if !f(fd_TallyParams_threshold, value) { - return - } - } - if x.VetoThreshold != "" { - value := protoreflect.ValueOfString(x.VetoThreshold) - if !f(fd_TallyParams_veto_threshold, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TallyParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.TallyParams.quorum": - return x.Quorum != "" - case "cosmos.gov.v1.TallyParams.threshold": - return x.Threshold != "" - case "cosmos.gov.v1.TallyParams.veto_threshold": - return x.VetoThreshold != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyParams 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_TallyParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.TallyParams.quorum": - x.Quorum = "" - case "cosmos.gov.v1.TallyParams.threshold": - x.Threshold = "" - case "cosmos.gov.v1.TallyParams.veto_threshold": - x.VetoThreshold = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyParams 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_TallyParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.TallyParams.quorum": - value := x.Quorum - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.TallyParams.threshold": - value := x.Threshold - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.TallyParams.veto_threshold": - value := x.VetoThreshold - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyParams 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_TallyParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.TallyParams.quorum": - x.Quorum = value.Interface().(string) - case "cosmos.gov.v1.TallyParams.threshold": - x.Threshold = value.Interface().(string) - case "cosmos.gov.v1.TallyParams.veto_threshold": - x.VetoThreshold = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyParams 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_TallyParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.TallyParams.quorum": - panic(fmt.Errorf("field quorum of message cosmos.gov.v1.TallyParams is not mutable")) - case "cosmos.gov.v1.TallyParams.threshold": - panic(fmt.Errorf("field threshold of message cosmos.gov.v1.TallyParams is not mutable")) - case "cosmos.gov.v1.TallyParams.veto_threshold": - panic(fmt.Errorf("field veto_threshold of message cosmos.gov.v1.TallyParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyParams 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_TallyParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.TallyParams.quorum": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.TallyParams.threshold": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.TallyParams.veto_threshold": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1.TallyParams 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_TallyParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.TallyParams", 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_TallyParams) 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_TallyParams) 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_TallyParams) 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_TallyParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TallyParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Quorum) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Threshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.VetoThreshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TallyParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.VetoThreshold) > 0 { - i -= len(x.VetoThreshold) - copy(dAtA[i:], x.VetoThreshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VetoThreshold))) - i-- - dAtA[i] = 0x1a - } - if len(x.Threshold) > 0 { - i -= len(x.Threshold) - copy(dAtA[i:], x.Threshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Threshold))) - i-- - dAtA[i] = 0x12 - } - if len(x.Quorum) > 0 { - i -= len(x.Quorum) - copy(dAtA[i:], x.Quorum) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quorum))) - 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().(*TallyParams) - 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: TallyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TallyParams: 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 Quorum", 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.Quorum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Threshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", 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.VetoThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.46 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1/gov.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// VoteOption enumerates the valid vote options for a given governance proposal. -type VoteOption int32 - -const ( - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0 - // VOTE_OPTION_YES defines a yes vote option. - VoteOption_VOTE_OPTION_YES VoteOption = 1 - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2 - // VOTE_OPTION_NO defines a no vote option. - VoteOption_VOTE_OPTION_NO VoteOption = 3 - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VoteOption_VOTE_OPTION_NO_WITH_VETO VoteOption = 4 -) - -// Enum value maps for VoteOption. -var ( - VoteOption_name = map[int32]string{ - 0: "VOTE_OPTION_UNSPECIFIED", - 1: "VOTE_OPTION_YES", - 2: "VOTE_OPTION_ABSTAIN", - 3: "VOTE_OPTION_NO", - 4: "VOTE_OPTION_NO_WITH_VETO", - } - VoteOption_value = map[string]int32{ - "VOTE_OPTION_UNSPECIFIED": 0, - "VOTE_OPTION_YES": 1, - "VOTE_OPTION_ABSTAIN": 2, - "VOTE_OPTION_NO": 3, - "VOTE_OPTION_NO_WITH_VETO": 4, - } -) - -func (x VoteOption) Enum() *VoteOption { - p := new(VoteOption) - *p = x - return p -} - -func (x VoteOption) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VoteOption) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_gov_v1_gov_proto_enumTypes[0].Descriptor() -} - -func (VoteOption) Type() protoreflect.EnumType { - return &file_cosmos_gov_v1_gov_proto_enumTypes[0] -} - -func (x VoteOption) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VoteOption.Descriptor instead. -func (VoteOption) EnumDescriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{0} -} - -// ProposalStatus enumerates the valid statuses of a proposal. -type ProposalStatus int32 - -const ( - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - ProposalStatus_PROPOSAL_STATUS_DEPOSIT_PERIOD ProposalStatus = 1 - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD ProposalStatus = 2 - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - ProposalStatus_PROPOSAL_STATUS_PASSED ProposalStatus = 3 - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - ProposalStatus_PROPOSAL_STATUS_REJECTED ProposalStatus = 4 - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - ProposalStatus_PROPOSAL_STATUS_FAILED ProposalStatus = 5 -) - -// Enum value maps for ProposalStatus. -var ( - ProposalStatus_name = map[int32]string{ - 0: "PROPOSAL_STATUS_UNSPECIFIED", - 1: "PROPOSAL_STATUS_DEPOSIT_PERIOD", - 2: "PROPOSAL_STATUS_VOTING_PERIOD", - 3: "PROPOSAL_STATUS_PASSED", - 4: "PROPOSAL_STATUS_REJECTED", - 5: "PROPOSAL_STATUS_FAILED", - } - ProposalStatus_value = map[string]int32{ - "PROPOSAL_STATUS_UNSPECIFIED": 0, - "PROPOSAL_STATUS_DEPOSIT_PERIOD": 1, - "PROPOSAL_STATUS_VOTING_PERIOD": 2, - "PROPOSAL_STATUS_PASSED": 3, - "PROPOSAL_STATUS_REJECTED": 4, - "PROPOSAL_STATUS_FAILED": 5, - } -) - -func (x ProposalStatus) Enum() *ProposalStatus { - p := new(ProposalStatus) - *p = x - return p -} - -func (x ProposalStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalStatus) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_gov_v1_gov_proto_enumTypes[1].Descriptor() -} - -func (ProposalStatus) Type() protoreflect.EnumType { - return &file_cosmos_gov_v1_gov_proto_enumTypes[1] -} - -func (x ProposalStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalStatus.Descriptor instead. -func (ProposalStatus) EnumDescriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{1} -} - -// WeightedVoteOption defines a unit of vote for vote split. -type WeightedVoteOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"` - Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *WeightedVoteOption) Reset() { - *x = WeightedVoteOption{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedVoteOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedVoteOption) ProtoMessage() {} - -// Deprecated: Use WeightedVoteOption.ProtoReflect.Descriptor instead. -func (*WeightedVoteOption) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{0} -} - -func (x *WeightedVoteOption) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -func (x *WeightedVoteOption) GetWeight() string { - if x != nil { - return x.Weight - } - return "" -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -type Deposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Deposit) Reset() { - *x = Deposit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Deposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Deposit) ProtoMessage() {} - -// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. -func (*Deposit) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{1} -} - -func (x *Deposit) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *Deposit) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -func (x *Deposit) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// Proposal defines the core field members of a governance proposal. -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Messages []*anypb.Any `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` - Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1.ProposalStatus" json:"status,omitempty"` - // final_tally_result is the final tally result of the proposal. When - // querying a proposal via gRPC, this field is not populated until the - // proposal's voting period has ended. - FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"` - SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` - DepositEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"` - TotalDeposit []*v1beta1.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"` - VotingStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3" json:"voting_start_time,omitempty"` - VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"` - // metadata is any arbitrary metadata attached to the proposal. - Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Proposal) Reset() { - *x = Proposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proposal) ProtoMessage() {} - -// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. -func (*Proposal) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{2} -} - -func (x *Proposal) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Proposal) GetMessages() []*anypb.Any { - if x != nil { - return x.Messages - } - return nil -} - -func (x *Proposal) GetStatus() ProposalStatus { - if x != nil { - return x.Status - } - return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED -} - -func (x *Proposal) GetFinalTallyResult() *TallyResult { - if x != nil { - return x.FinalTallyResult - } - return nil -} - -func (x *Proposal) GetSubmitTime() *timestamppb.Timestamp { - if x != nil { - return x.SubmitTime - } - return nil -} - -func (x *Proposal) GetDepositEndTime() *timestamppb.Timestamp { - if x != nil { - return x.DepositEndTime - } - return nil -} - -func (x *Proposal) GetTotalDeposit() []*v1beta1.Coin { - if x != nil { - return x.TotalDeposit - } - return nil -} - -func (x *Proposal) GetVotingStartTime() *timestamppb.Timestamp { - if x != nil { - return x.VotingStartTime - } - return nil -} - -func (x *Proposal) GetVotingEndTime() *timestamppb.Timestamp { - if x != nil { - return x.VotingEndTime - } - return nil -} - -func (x *Proposal) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// TallyResult defines a standard tally for a governance proposal. -type TallyResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` - AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"` - NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"` - NoWithVetoCount string `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3" json:"no_with_veto_count,omitempty"` -} - -func (x *TallyResult) Reset() { - *x = TallyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TallyResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TallyResult) ProtoMessage() {} - -// Deprecated: Use TallyResult.ProtoReflect.Descriptor instead. -func (*TallyResult) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{3} -} - -func (x *TallyResult) GetYesCount() string { - if x != nil { - return x.YesCount - } - return "" -} - -func (x *TallyResult) GetAbstainCount() string { - if x != nil { - return x.AbstainCount - } - return "" -} - -func (x *TallyResult) GetNoCount() string { - if x != nil { - return x.NoCount - } - return "" -} - -func (x *TallyResult) GetNoWithVetoCount() string { - if x != nil { - return x.NoWithVetoCount - } - return "" -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -type Vote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` - // metadata is any arbitrary metadata to attached to the vote. - Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Vote) Reset() { - *x = Vote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vote) ProtoMessage() {} - -// Deprecated: Use Vote.ProtoReflect.Descriptor instead. -func (*Vote) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{4} -} - -func (x *Vote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *Vote) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *Vote) GetOptions() []*WeightedVoteOption { - if x != nil { - return x.Options - } - return nil -} - -func (x *Vote) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// DepositParams defines the params for deposits on governance proposals. -type DepositParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum deposit for a proposal to enter voting period. - MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - MaxDepositPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3" json:"max_deposit_period,omitempty"` -} - -func (x *DepositParams) Reset() { - *x = DepositParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DepositParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DepositParams) ProtoMessage() {} - -// Deprecated: Use DepositParams.ProtoReflect.Descriptor instead. -func (*DepositParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{5} -} - -func (x *DepositParams) GetMinDeposit() []*v1beta1.Coin { - if x != nil { - return x.MinDeposit - } - return nil -} - -func (x *DepositParams) GetMaxDepositPeriod() *durationpb.Duration { - if x != nil { - return x.MaxDepositPeriod - } - return nil -} - -// VotingParams defines the params for voting on governance proposals. -type VotingParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Length of the voting period. - VotingPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"` -} - -func (x *VotingParams) Reset() { - *x = VotingParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VotingParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VotingParams) ProtoMessage() {} - -// Deprecated: Use VotingParams.ProtoReflect.Descriptor instead. -func (*VotingParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{6} -} - -func (x *VotingParams) GetVotingPeriod() *durationpb.Duration { - if x != nil { - return x.VotingPeriod - } - return nil -} - -// TallyParams defines the params for tallying votes on governance proposals. -type TallyParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - Quorum string `protobuf:"bytes,1,opt,name=quorum,proto3" json:"quorum,omitempty"` - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - Threshold string `protobuf:"bytes,2,opt,name=threshold,proto3" json:"threshold,omitempty"` - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - VetoThreshold string `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"` -} - -func (x *TallyParams) Reset() { - *x = TallyParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_gov_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TallyParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TallyParams) ProtoMessage() {} - -// Deprecated: Use TallyParams.ProtoReflect.Descriptor instead. -func (*TallyParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{7} -} - -func (x *TallyParams) GetQuorum() string { - if x != nil { - return x.Quorum - } - return "" -} - -func (x *TallyParams) GetThreshold() string { - if x != nil { - return x.Threshold - } - return "" -} - -func (x *TallyParams) GetVetoThreshold() string { - if x != nil { - return x.VetoThreshold - } - return "" -} - -var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, - 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x12, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, - 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x37, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd6, 0x04, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 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, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, - 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x45, 0x6e, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x4c, 0x0a, 0x11, 0x76, 0x6f, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, - 0x1f, 0x01, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd7, 0x01, - 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, - 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, - 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x61, 0x62, - 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x12, 0x6e, 0x6f, - 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, - 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, - 0x22, 0xd9, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, - 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, - 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x54, 0x0a, 0x0c, - 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, - 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, - 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x22, 0xea, 0xde, 0x1f, 0x10, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2c, 0x6f, - 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x43, - 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x25, 0xea, 0xde, 0x1f, 0x13, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x51, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xea, 0xde, 0x1f, - 0x18, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, - 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, - 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, - 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, - 0x10, 0x04, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, - 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, - 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, - 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x05, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, - 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, - 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1_gov_proto_rawDescOnce sync.Once - file_cosmos_gov_v1_gov_proto_rawDescData = file_cosmos_gov_v1_gov_proto_rawDesc -) - -func file_cosmos_gov_v1_gov_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1_gov_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1_gov_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1_gov_proto_rawDescData) - }) - return file_cosmos_gov_v1_gov_proto_rawDescData -} - -var file_cosmos_gov_v1_gov_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{ - (VoteOption)(0), // 0: cosmos.gov.v1.VoteOption - (ProposalStatus)(0), // 1: cosmos.gov.v1.ProposalStatus - (*WeightedVoteOption)(nil), // 2: cosmos.gov.v1.WeightedVoteOption - (*Deposit)(nil), // 3: cosmos.gov.v1.Deposit - (*Proposal)(nil), // 4: cosmos.gov.v1.Proposal - (*TallyResult)(nil), // 5: cosmos.gov.v1.TallyResult - (*Vote)(nil), // 6: cosmos.gov.v1.Vote - (*DepositParams)(nil), // 7: cosmos.gov.v1.DepositParams - (*VotingParams)(nil), // 8: cosmos.gov.v1.VotingParams - (*TallyParams)(nil), // 9: cosmos.gov.v1.TallyParams - (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 11: google.protobuf.Any - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 13: google.protobuf.Duration -} -var file_cosmos_gov_v1_gov_proto_depIdxs = []int32{ - 0, // 0: cosmos.gov.v1.WeightedVoteOption.option:type_name -> cosmos.gov.v1.VoteOption - 10, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 11, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any - 1, // 3: cosmos.gov.v1.Proposal.status:type_name -> cosmos.gov.v1.ProposalStatus - 5, // 4: cosmos.gov.v1.Proposal.final_tally_result:type_name -> cosmos.gov.v1.TallyResult - 12, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp - 12, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp - 10, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 12, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp - 12, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp - 2, // 10: cosmos.gov.v1.Vote.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 10, // 11: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 13, // 12: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration - 13, // 13: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1_gov_proto_init() } -func file_cosmos_gov_v1_gov_proto_init() { - if File_cosmos_gov_v1_gov_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1_gov_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedVoteOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Deposit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VotingParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_gov_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1_gov_proto_rawDesc, - NumEnums: 2, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_gov_v1_gov_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1_gov_proto_depIdxs, - EnumInfos: file_cosmos_gov_v1_gov_proto_enumTypes, - MessageInfos: file_cosmos_gov_v1_gov_proto_msgTypes, - }.Build() - File_cosmos_gov_v1_gov_proto = out.File - file_cosmos_gov_v1_gov_proto_rawDesc = nil - file_cosmos_gov_v1_gov_proto_goTypes = nil - file_cosmos_gov_v1_gov_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go deleted file mode 100644 index 3774f0ffa052..000000000000 --- a/api/cosmos/gov/v1/query.pulsar.go +++ /dev/null @@ -1,9039 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryProposalRequest protoreflect.MessageDescriptor - fd_QueryProposalRequest_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryProposalRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryProposalRequest") - fd_QueryProposalRequest_proposal_id = md_QueryProposalRequest.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalRequest)(nil) - -type fastReflection_QueryProposalRequest QueryProposalRequest - -func (x *QueryProposalRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalRequest)(x) -} - -func (x *QueryProposalRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalRequest_messageType fastReflection_QueryProposalRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalRequest_messageType{} - -type fastReflection_QueryProposalRequest_messageType struct{} - -func (x fastReflection_QueryProposalRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalRequest)(nil) -} -func (x fastReflection_QueryProposalRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalRequest) -} -func (x fastReflection_QueryProposalRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalRequest -} - -// 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_QueryProposalRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalRequest) New() protoreflect.Message { - return new(fastReflection_QueryProposalRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalRequest) Interface() protoreflect.ProtoMessage { - return (*QueryProposalRequest)(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_QueryProposalRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryProposalRequest_proposal_id, 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_QueryProposalRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalRequest.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalRequest 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_QueryProposalRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalRequest.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalRequest 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_QueryProposalRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryProposalRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalRequest 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_QueryProposalRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalRequest.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalRequest 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_QueryProposalRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryProposalRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalRequest 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_QueryProposalRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalRequest 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_QueryProposalRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryProposalRequest", 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_QueryProposalRequest) 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_QueryProposalRequest) 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_QueryProposalRequest) 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_QueryProposalRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*QueryProposalRequest) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalRequest) - 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: QueryProposalRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryProposalResponse protoreflect.MessageDescriptor - fd_QueryProposalResponse_proposal protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryProposalResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryProposalResponse") - fd_QueryProposalResponse_proposal = md_QueryProposalResponse.Fields().ByName("proposal") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalResponse)(nil) - -type fastReflection_QueryProposalResponse QueryProposalResponse - -func (x *QueryProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalResponse)(x) -} - -func (x *QueryProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalResponse_messageType fastReflection_QueryProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalResponse_messageType{} - -type fastReflection_QueryProposalResponse_messageType struct{} - -func (x fastReflection_QueryProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalResponse)(nil) -} -func (x fastReflection_QueryProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalResponse) -} -func (x fastReflection_QueryProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalResponse -} - -// 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_QueryProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalResponse) New() protoreflect.Message { - return new(fastReflection_QueryProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalResponse) Interface() protoreflect.ProtoMessage { - return (*QueryProposalResponse)(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_QueryProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Proposal != nil { - value := protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - if !f(fd_QueryProposalResponse_proposal, 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_QueryProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalResponse.proposal": - return x.Proposal != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalResponse 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_QueryProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalResponse.proposal": - x.Proposal = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalResponse 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_QueryProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryProposalResponse.proposal": - value := x.Proposal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalResponse 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_QueryProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalResponse.proposal": - x.Proposal = value.Message().Interface().(*Proposal) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalResponse 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_QueryProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalResponse.proposal": - if x.Proposal == nil { - x.Proposal = new(Proposal) - } - return protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalResponse 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_QueryProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalResponse.proposal": - m := new(Proposal) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalResponse 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_QueryProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryProposalResponse", 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalResponse) - 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.Proposal != nil { - l = options.Size(x.Proposal) - 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().(*QueryProposalResponse) - 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.Proposal != nil { - encoded, err := options.Marshal(x.Proposal) - 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().(*QueryProposalResponse) - 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: QueryProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalResponse: 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 Proposal", 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.Proposal == nil { - x.Proposal = &Proposal{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposal); 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_QueryProposalsRequest protoreflect.MessageDescriptor - fd_QueryProposalsRequest_proposal_status protoreflect.FieldDescriptor - fd_QueryProposalsRequest_voter protoreflect.FieldDescriptor - fd_QueryProposalsRequest_depositor protoreflect.FieldDescriptor - fd_QueryProposalsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryProposalsRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryProposalsRequest") - fd_QueryProposalsRequest_proposal_status = md_QueryProposalsRequest.Fields().ByName("proposal_status") - fd_QueryProposalsRequest_voter = md_QueryProposalsRequest.Fields().ByName("voter") - fd_QueryProposalsRequest_depositor = md_QueryProposalsRequest.Fields().ByName("depositor") - fd_QueryProposalsRequest_pagination = md_QueryProposalsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalsRequest)(nil) - -type fastReflection_QueryProposalsRequest QueryProposalsRequest - -func (x *QueryProposalsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalsRequest)(x) -} - -func (x *QueryProposalsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalsRequest_messageType fastReflection_QueryProposalsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalsRequest_messageType{} - -type fastReflection_QueryProposalsRequest_messageType struct{} - -func (x fastReflection_QueryProposalsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalsRequest)(nil) -} -func (x fastReflection_QueryProposalsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalsRequest) -} -func (x fastReflection_QueryProposalsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsRequest -} - -// 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_QueryProposalsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalsRequest) New() protoreflect.Message { - return new(fastReflection_QueryProposalsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryProposalsRequest)(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_QueryProposalsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalStatus != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ProposalStatus)) - if !f(fd_QueryProposalsRequest_proposal_status, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_QueryProposalsRequest_voter, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_QueryProposalsRequest_depositor, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryProposalsRequest_pagination, 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_QueryProposalsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsRequest.proposal_status": - return x.ProposalStatus != 0 - case "cosmos.gov.v1.QueryProposalsRequest.voter": - return x.Voter != "" - case "cosmos.gov.v1.QueryProposalsRequest.depositor": - return x.Depositor != "" - case "cosmos.gov.v1.QueryProposalsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsRequest 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_QueryProposalsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsRequest.proposal_status": - x.ProposalStatus = 0 - case "cosmos.gov.v1.QueryProposalsRequest.voter": - x.Voter = "" - case "cosmos.gov.v1.QueryProposalsRequest.depositor": - x.Depositor = "" - case "cosmos.gov.v1.QueryProposalsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsRequest 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_QueryProposalsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryProposalsRequest.proposal_status": - value := x.ProposalStatus - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1.QueryProposalsRequest.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.QueryProposalsRequest.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.QueryProposalsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsRequest 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_QueryProposalsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsRequest.proposal_status": - x.ProposalStatus = (ProposalStatus)(value.Enum()) - case "cosmos.gov.v1.QueryProposalsRequest.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1.QueryProposalsRequest.depositor": - x.Depositor = value.Interface().(string) - case "cosmos.gov.v1.QueryProposalsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsRequest 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_QueryProposalsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.gov.v1.QueryProposalsRequest.proposal_status": - panic(fmt.Errorf("field proposal_status of message cosmos.gov.v1.QueryProposalsRequest is not mutable")) - case "cosmos.gov.v1.QueryProposalsRequest.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1.QueryProposalsRequest is not mutable")) - case "cosmos.gov.v1.QueryProposalsRequest.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1.QueryProposalsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsRequest 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_QueryProposalsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsRequest.proposal_status": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1.QueryProposalsRequest.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.QueryProposalsRequest.depositor": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.QueryProposalsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsRequest 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_QueryProposalsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryProposalsRequest", 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_QueryProposalsRequest) 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_QueryProposalsRequest) 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_QueryProposalsRequest) 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_QueryProposalsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalsRequest) - 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.ProposalStatus != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalStatus)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryProposalsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x1a - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalStatus != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalStatus)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalsRequest) - 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: QueryProposalsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalStatus", wireType) - } - x.ProposalStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalStatus |= ProposalStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryProposalsResponse_1_list)(nil) - -type _QueryProposalsResponse_1_list struct { - list *[]*Proposal -} - -func (x *_QueryProposalsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryProposalsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryProposalsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - (*x.list)[i] = concreteValue -} - -func (x *_QueryProposalsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryProposalsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Proposal) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryProposalsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryProposalsResponse_1_list) NewElement() protoreflect.Value { - v := new(Proposal) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryProposalsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryProposalsResponse protoreflect.MessageDescriptor - fd_QueryProposalsResponse_proposals protoreflect.FieldDescriptor - fd_QueryProposalsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryProposalsResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryProposalsResponse") - fd_QueryProposalsResponse_proposals = md_QueryProposalsResponse.Fields().ByName("proposals") - fd_QueryProposalsResponse_pagination = md_QueryProposalsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalsResponse)(nil) - -type fastReflection_QueryProposalsResponse QueryProposalsResponse - -func (x *QueryProposalsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalsResponse)(x) -} - -func (x *QueryProposalsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalsResponse_messageType fastReflection_QueryProposalsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalsResponse_messageType{} - -type fastReflection_QueryProposalsResponse_messageType struct{} - -func (x fastReflection_QueryProposalsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalsResponse)(nil) -} -func (x fastReflection_QueryProposalsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalsResponse) -} -func (x fastReflection_QueryProposalsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsResponse -} - -// 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_QueryProposalsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalsResponse) New() protoreflect.Message { - return new(fastReflection_QueryProposalsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryProposalsResponse)(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_QueryProposalsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Proposals) != 0 { - value := protoreflect.ValueOfList(&_QueryProposalsResponse_1_list{list: &x.Proposals}) - if !f(fd_QueryProposalsResponse_proposals, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryProposalsResponse_pagination, 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_QueryProposalsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsResponse.proposals": - return len(x.Proposals) != 0 - case "cosmos.gov.v1.QueryProposalsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsResponse 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_QueryProposalsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsResponse.proposals": - x.Proposals = nil - case "cosmos.gov.v1.QueryProposalsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsResponse 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_QueryProposalsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryProposalsResponse.proposals": - if len(x.Proposals) == 0 { - return protoreflect.ValueOfList(&_QueryProposalsResponse_1_list{}) - } - listValue := &_QueryProposalsResponse_1_list{list: &x.Proposals} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.QueryProposalsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsResponse 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_QueryProposalsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsResponse.proposals": - lv := value.List() - clv := lv.(*_QueryProposalsResponse_1_list) - x.Proposals = *clv.list - case "cosmos.gov.v1.QueryProposalsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsResponse 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_QueryProposalsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsResponse.proposals": - if x.Proposals == nil { - x.Proposals = []*Proposal{} - } - value := &_QueryProposalsResponse_1_list{list: &x.Proposals} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.QueryProposalsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsResponse 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_QueryProposalsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryProposalsResponse.proposals": - list := []*Proposal{} - return protoreflect.ValueOfList(&_QueryProposalsResponse_1_list{list: &list}) - case "cosmos.gov.v1.QueryProposalsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryProposalsResponse 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_QueryProposalsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryProposalsResponse", 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_QueryProposalsResponse) 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_QueryProposalsResponse) 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_QueryProposalsResponse) 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_QueryProposalsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Proposals) > 0 { - for _, e := range x.Proposals { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryProposalsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Proposals) > 0 { - for iNdEx := len(x.Proposals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Proposals[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalsResponse) - 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: QueryProposalsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalsResponse: 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 Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Proposals = append(x.Proposals, &Proposal{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposals[len(x.Proposals)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryVoteRequest protoreflect.MessageDescriptor - fd_QueryVoteRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryVoteRequest_voter protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryVoteRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryVoteRequest") - fd_QueryVoteRequest_proposal_id = md_QueryVoteRequest.Fields().ByName("proposal_id") - fd_QueryVoteRequest_voter = md_QueryVoteRequest.Fields().ByName("voter") -} - -var _ protoreflect.Message = (*fastReflection_QueryVoteRequest)(nil) - -type fastReflection_QueryVoteRequest QueryVoteRequest - -func (x *QueryVoteRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVoteRequest)(x) -} - -func (x *QueryVoteRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVoteRequest_messageType fastReflection_QueryVoteRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVoteRequest_messageType{} - -type fastReflection_QueryVoteRequest_messageType struct{} - -func (x fastReflection_QueryVoteRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVoteRequest)(nil) -} -func (x fastReflection_QueryVoteRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVoteRequest) -} -func (x fastReflection_QueryVoteRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVoteRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteRequest -} - -// 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_QueryVoteRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVoteRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVoteRequest) New() protoreflect.Message { - return new(fastReflection_QueryVoteRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVoteRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVoteRequest)(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_QueryVoteRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryVoteRequest_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_QueryVoteRequest_voter, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryVoteRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.QueryVoteRequest.voter": - return x.Voter != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteRequest 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_QueryVoteRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.QueryVoteRequest.voter": - x.Voter = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteRequest 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_QueryVoteRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryVoteRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.QueryVoteRequest.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteRequest 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_QueryVoteRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.QueryVoteRequest.voter": - x.Voter = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteRequest 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_QueryVoteRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryVoteRequest is not mutable")) - case "cosmos.gov.v1.QueryVoteRequest.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1.QueryVoteRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteRequest 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_QueryVoteRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.QueryVoteRequest.voter": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteRequest 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_QueryVoteRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryVoteRequest", 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_QueryVoteRequest) 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_QueryVoteRequest) 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_QueryVoteRequest) 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_QueryVoteRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVoteRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryVoteRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVoteRequest) - 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: QueryVoteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryVoteResponse protoreflect.MessageDescriptor - fd_QueryVoteResponse_vote protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryVoteResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryVoteResponse") - fd_QueryVoteResponse_vote = md_QueryVoteResponse.Fields().ByName("vote") -} - -var _ protoreflect.Message = (*fastReflection_QueryVoteResponse)(nil) - -type fastReflection_QueryVoteResponse QueryVoteResponse - -func (x *QueryVoteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVoteResponse)(x) -} - -func (x *QueryVoteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVoteResponse_messageType fastReflection_QueryVoteResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVoteResponse_messageType{} - -type fastReflection_QueryVoteResponse_messageType struct{} - -func (x fastReflection_QueryVoteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVoteResponse)(nil) -} -func (x fastReflection_QueryVoteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVoteResponse) -} -func (x fastReflection_QueryVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVoteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteResponse -} - -// 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_QueryVoteResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVoteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVoteResponse) New() protoreflect.Message { - return new(fastReflection_QueryVoteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVoteResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVoteResponse)(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_QueryVoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Vote != nil { - value := protoreflect.ValueOfMessage(x.Vote.ProtoReflect()) - if !f(fd_QueryVoteResponse_vote, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteResponse.vote": - return x.Vote != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteResponse 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_QueryVoteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteResponse.vote": - x.Vote = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteResponse 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_QueryVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryVoteResponse.vote": - value := x.Vote - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteResponse 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_QueryVoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteResponse.vote": - x.Vote = value.Message().Interface().(*Vote) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteResponse 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_QueryVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteResponse.vote": - if x.Vote == nil { - x.Vote = new(Vote) - } - return protoreflect.ValueOfMessage(x.Vote.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteResponse 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_QueryVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVoteResponse.vote": - m := new(Vote) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVoteResponse 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_QueryVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryVoteResponse", 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_QueryVoteResponse) 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_QueryVoteResponse) 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_QueryVoteResponse) 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_QueryVoteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVoteResponse) - 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.Vote != nil { - l = options.Size(x.Vote) - 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().(*QueryVoteResponse) - 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.Vote != nil { - encoded, err := options.Marshal(x.Vote) - 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().(*QueryVoteResponse) - 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: QueryVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteResponse: 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 Vote", 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.Vote == nil { - x.Vote = &Vote{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Vote); 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_QueryVotesRequest protoreflect.MessageDescriptor - fd_QueryVotesRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryVotesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryVotesRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryVotesRequest") - fd_QueryVotesRequest_proposal_id = md_QueryVotesRequest.Fields().ByName("proposal_id") - fd_QueryVotesRequest_pagination = md_QueryVotesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesRequest)(nil) - -type fastReflection_QueryVotesRequest QueryVotesRequest - -func (x *QueryVotesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesRequest)(x) -} - -func (x *QueryVotesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesRequest_messageType fastReflection_QueryVotesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesRequest_messageType{} - -type fastReflection_QueryVotesRequest_messageType struct{} - -func (x fastReflection_QueryVotesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesRequest)(nil) -} -func (x fastReflection_QueryVotesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesRequest) -} -func (x fastReflection_QueryVotesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesRequest -} - -// 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_QueryVotesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesRequest) New() protoreflect.Message { - return new(fastReflection_QueryVotesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVotesRequest)(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_QueryVotesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryVotesRequest_proposal_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesRequest_pagination, 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_QueryVotesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.QueryVotesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesRequest 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_QueryVotesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.QueryVotesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesRequest 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_QueryVotesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryVotesRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.QueryVotesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesRequest 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_QueryVotesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.QueryVotesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesRequest 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_QueryVotesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.gov.v1.QueryVotesRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryVotesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesRequest 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_QueryVotesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.QueryVotesRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesRequest 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_QueryVotesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryVotesRequest", 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_QueryVotesRequest) 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_QueryVotesRequest) 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_QueryVotesRequest) 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_QueryVotesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesRequest) - 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: QueryVotesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryVotesResponse_1_list)(nil) - -type _QueryVotesResponse_1_list struct { - list *[]*Vote -} - -func (x *_QueryVotesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryVotesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryVotesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_QueryVotesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryVotesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryVotesResponse_1_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryVotesResponse protoreflect.MessageDescriptor - fd_QueryVotesResponse_votes protoreflect.FieldDescriptor - fd_QueryVotesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryVotesResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryVotesResponse") - fd_QueryVotesResponse_votes = md_QueryVotesResponse.Fields().ByName("votes") - fd_QueryVotesResponse_pagination = md_QueryVotesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesResponse)(nil) - -type fastReflection_QueryVotesResponse QueryVotesResponse - -func (x *QueryVotesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesResponse)(x) -} - -func (x *QueryVotesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesResponse_messageType fastReflection_QueryVotesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesResponse_messageType{} - -type fastReflection_QueryVotesResponse_messageType struct{} - -func (x fastReflection_QueryVotesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesResponse)(nil) -} -func (x fastReflection_QueryVotesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesResponse) -} -func (x fastReflection_QueryVotesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesResponse -} - -// 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_QueryVotesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesResponse) New() protoreflect.Message { - return new(fastReflection_QueryVotesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVotesResponse)(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_QueryVotesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_QueryVotesResponse_1_list{list: &x.Votes}) - if !f(fd_QueryVotesResponse_votes, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesResponse_pagination, 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_QueryVotesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesResponse.votes": - return len(x.Votes) != 0 - case "cosmos.gov.v1.QueryVotesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesResponse 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_QueryVotesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesResponse.votes": - x.Votes = nil - case "cosmos.gov.v1.QueryVotesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesResponse 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_QueryVotesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryVotesResponse.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_QueryVotesResponse_1_list{}) - } - listValue := &_QueryVotesResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.QueryVotesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesResponse 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_QueryVotesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesResponse.votes": - lv := value.List() - clv := lv.(*_QueryVotesResponse_1_list) - x.Votes = *clv.list - case "cosmos.gov.v1.QueryVotesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesResponse 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_QueryVotesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesResponse.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_QueryVotesResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.QueryVotesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesResponse 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_QueryVotesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryVotesResponse.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_QueryVotesResponse_1_list{list: &list}) - case "cosmos.gov.v1.QueryVotesResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryVotesResponse 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_QueryVotesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryVotesResponse", 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_QueryVotesResponse) 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_QueryVotesResponse) 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_QueryVotesResponse) 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_QueryVotesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesResponse) - 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: QueryVotesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesResponse: 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 Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryParamsRequest protoreflect.MessageDescriptor - fd_QueryParamsRequest_params_type protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryParamsRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryParamsRequest") - fd_QueryParamsRequest_params_type = md_QueryParamsRequest.Fields().ByName("params_type") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ParamsType != "" { - value := protoreflect.ValueOfString(x.ParamsType) - if !f(fd_QueryParamsRequest_params_type, 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - return x.ParamsType != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.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() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - x.ParamsType = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.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() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - value := x.ParamsType - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.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() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - x.ParamsType = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.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() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - panic(fmt.Errorf("field params_type of message cosmos.gov.v1.QueryParamsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.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() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.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.gov.v1.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 - l = len(x.ParamsType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*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 len(x.ParamsType) > 0 { - i -= len(x.ParamsType) - copy(dAtA[i:], x.ParamsType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ParamsType))) - 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().(*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 { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParamsType", 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.ParamsType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_voting_params protoreflect.FieldDescriptor - fd_QueryParamsResponse_deposit_params protoreflect.FieldDescriptor - fd_QueryParamsResponse_tally_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryParamsResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_voting_params = md_QueryParamsResponse.Fields().ByName("voting_params") - fd_QueryParamsResponse_deposit_params = md_QueryParamsResponse.Fields().ByName("deposit_params") - fd_QueryParamsResponse_tally_params = md_QueryParamsResponse.Fields().ByName("tally_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_gov_v1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.VotingParams != nil { - value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_voting_params, value) { - return - } - } - if x.DepositParams != nil { - value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_deposit_params, value) { - return - } - } - if x.TallyParams != nil { - value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_tally_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.gov.v1.QueryParamsResponse.voting_params": - return x.VotingParams != nil - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - return x.DepositParams != nil - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - return x.TallyParams != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - x.VotingParams = nil - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - x.DepositParams = nil - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - x.TallyParams = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - value := x.VotingParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - value := x.DepositParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - value := x.TallyParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - x.VotingParams = value.Message().Interface().(*VotingParams) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - x.DepositParams = value.Message().Interface().(*DepositParams) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - x.TallyParams = value.Message().Interface().(*TallyParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - if x.VotingParams == nil { - x.VotingParams = new(VotingParams) - } - return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - if x.DepositParams == nil { - x.DepositParams = new(DepositParams) - } - return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - if x.TallyParams == nil { - x.TallyParams = new(TallyParams) - } - return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - m := new(VotingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - m := new(DepositParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - m := new(TallyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.VotingParams != nil { - l = options.Size(x.VotingParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DepositParams != nil { - l = options.Size(x.DepositParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TallyParams != nil { - l = options.Size(x.TallyParams) - 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.TallyParams != nil { - encoded, err := options.Marshal(x.TallyParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.DepositParams != nil { - encoded, err := options.Marshal(x.DepositParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.VotingParams != nil { - encoded, err := options.Marshal(x.VotingParams) - 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 VotingParams", 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.VotingParams == nil { - x.VotingParams = &VotingParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", 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.DepositParams == nil { - x.DepositParams = &DepositParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", 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.TallyParams == nil { - x.TallyParams = &TallyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); 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_QueryDepositRequest protoreflect.MessageDescriptor - fd_QueryDepositRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryDepositRequest_depositor protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryDepositRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryDepositRequest") - fd_QueryDepositRequest_proposal_id = md_QueryDepositRequest.Fields().ByName("proposal_id") - fd_QueryDepositRequest_depositor = md_QueryDepositRequest.Fields().ByName("depositor") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositRequest)(nil) - -type fastReflection_QueryDepositRequest QueryDepositRequest - -func (x *QueryDepositRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositRequest)(x) -} - -func (x *QueryDepositRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositRequest_messageType fastReflection_QueryDepositRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositRequest_messageType{} - -type fastReflection_QueryDepositRequest_messageType struct{} - -func (x fastReflection_QueryDepositRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositRequest)(nil) -} -func (x fastReflection_QueryDepositRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositRequest) -} -func (x fastReflection_QueryDepositRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRequest -} - -// 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_QueryDepositRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositRequest) New() protoreflect.Message { - return new(fastReflection_QueryDepositRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDepositRequest)(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_QueryDepositRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryDepositRequest_proposal_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_QueryDepositRequest_depositor, 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_QueryDepositRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.QueryDepositRequest.depositor": - return x.Depositor != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositRequest 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_QueryDepositRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.QueryDepositRequest.depositor": - x.Depositor = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositRequest 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_QueryDepositRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryDepositRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.QueryDepositRequest.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositRequest 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_QueryDepositRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.QueryDepositRequest.depositor": - x.Depositor = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositRequest 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_QueryDepositRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryDepositRequest is not mutable")) - case "cosmos.gov.v1.QueryDepositRequest.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1.QueryDepositRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositRequest 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_QueryDepositRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.QueryDepositRequest.depositor": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositRequest 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_QueryDepositRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryDepositRequest", 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_QueryDepositRequest) 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_QueryDepositRequest) 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_QueryDepositRequest) 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_QueryDepositRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRequest) - 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: QueryDepositRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDepositResponse protoreflect.MessageDescriptor - fd_QueryDepositResponse_deposit protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryDepositResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryDepositResponse") - fd_QueryDepositResponse_deposit = md_QueryDepositResponse.Fields().ByName("deposit") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositResponse)(nil) - -type fastReflection_QueryDepositResponse QueryDepositResponse - -func (x *QueryDepositResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositResponse)(x) -} - -func (x *QueryDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositResponse_messageType fastReflection_QueryDepositResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositResponse_messageType{} - -type fastReflection_QueryDepositResponse_messageType struct{} - -func (x fastReflection_QueryDepositResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositResponse)(nil) -} -func (x fastReflection_QueryDepositResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositResponse) -} -func (x fastReflection_QueryDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositResponse -} - -// 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_QueryDepositResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositResponse) New() protoreflect.Message { - return new(fastReflection_QueryDepositResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDepositResponse)(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_QueryDepositResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Deposit != nil { - value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - if !f(fd_QueryDepositResponse_deposit, 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_QueryDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositResponse.deposit": - return x.Deposit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositResponse 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_QueryDepositResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositResponse.deposit": - x.Deposit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositResponse 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_QueryDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryDepositResponse.deposit": - value := x.Deposit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositResponse 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_QueryDepositResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositResponse.deposit": - x.Deposit = value.Message().Interface().(*Deposit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositResponse 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_QueryDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositResponse.deposit": - if x.Deposit == nil { - x.Deposit = new(Deposit) - } - return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositResponse 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_QueryDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositResponse.deposit": - m := new(Deposit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositResponse 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_QueryDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryDepositResponse", 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_QueryDepositResponse) 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_QueryDepositResponse) 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_QueryDepositResponse) 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_QueryDepositResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositResponse) - 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.Deposit != nil { - l = options.Size(x.Deposit) - 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().(*QueryDepositResponse) - 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.Deposit != nil { - encoded, err := options.Marshal(x.Deposit) - 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().(*QueryDepositResponse) - 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: QueryDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositResponse: 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 Deposit", 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.Deposit == nil { - x.Deposit = &Deposit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); 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_QueryDepositsRequest protoreflect.MessageDescriptor - fd_QueryDepositsRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryDepositsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryDepositsRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryDepositsRequest") - fd_QueryDepositsRequest_proposal_id = md_QueryDepositsRequest.Fields().ByName("proposal_id") - fd_QueryDepositsRequest_pagination = md_QueryDepositsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositsRequest)(nil) - -type fastReflection_QueryDepositsRequest QueryDepositsRequest - -func (x *QueryDepositsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositsRequest)(x) -} - -func (x *QueryDepositsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositsRequest_messageType fastReflection_QueryDepositsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositsRequest_messageType{} - -type fastReflection_QueryDepositsRequest_messageType struct{} - -func (x fastReflection_QueryDepositsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositsRequest)(nil) -} -func (x fastReflection_QueryDepositsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositsRequest) -} -func (x fastReflection_QueryDepositsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsRequest -} - -// 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_QueryDepositsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDepositsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDepositsRequest)(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_QueryDepositsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryDepositsRequest_proposal_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDepositsRequest_pagination, 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_QueryDepositsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.QueryDepositsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsRequest 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_QueryDepositsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.QueryDepositsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsRequest 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_QueryDepositsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryDepositsRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.QueryDepositsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsRequest 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_QueryDepositsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.QueryDepositsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsRequest 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_QueryDepositsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.gov.v1.QueryDepositsRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryDepositsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsRequest 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_QueryDepositsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.QueryDepositsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsRequest 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_QueryDepositsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryDepositsRequest", 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_QueryDepositsRequest) 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_QueryDepositsRequest) 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_QueryDepositsRequest) 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_QueryDepositsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositsRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDepositsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositsRequest) - 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: QueryDepositsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDepositsResponse_1_list)(nil) - -type _QueryDepositsResponse_1_list struct { - list *[]*Deposit -} - -func (x *_QueryDepositsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDepositsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDepositsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDepositsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDepositsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Deposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDepositsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDepositsResponse_1_list) NewElement() protoreflect.Value { - v := new(Deposit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDepositsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDepositsResponse protoreflect.MessageDescriptor - fd_QueryDepositsResponse_deposits protoreflect.FieldDescriptor - fd_QueryDepositsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryDepositsResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryDepositsResponse") - fd_QueryDepositsResponse_deposits = md_QueryDepositsResponse.Fields().ByName("deposits") - fd_QueryDepositsResponse_pagination = md_QueryDepositsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositsResponse)(nil) - -type fastReflection_QueryDepositsResponse QueryDepositsResponse - -func (x *QueryDepositsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositsResponse)(x) -} - -func (x *QueryDepositsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositsResponse_messageType fastReflection_QueryDepositsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositsResponse_messageType{} - -type fastReflection_QueryDepositsResponse_messageType struct{} - -func (x fastReflection_QueryDepositsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositsResponse)(nil) -} -func (x fastReflection_QueryDepositsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositsResponse) -} -func (x fastReflection_QueryDepositsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsResponse -} - -// 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_QueryDepositsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDepositsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDepositsResponse)(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_QueryDepositsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Deposits) != 0 { - value := protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &x.Deposits}) - if !f(fd_QueryDepositsResponse_deposits, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDepositsResponse_pagination, 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_QueryDepositsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsResponse.deposits": - return len(x.Deposits) != 0 - case "cosmos.gov.v1.QueryDepositsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsResponse 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_QueryDepositsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsResponse.deposits": - x.Deposits = nil - case "cosmos.gov.v1.QueryDepositsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsResponse 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_QueryDepositsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryDepositsResponse.deposits": - if len(x.Deposits) == 0 { - return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{}) - } - listValue := &_QueryDepositsResponse_1_list{list: &x.Deposits} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.QueryDepositsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsResponse 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_QueryDepositsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsResponse.deposits": - lv := value.List() - clv := lv.(*_QueryDepositsResponse_1_list) - x.Deposits = *clv.list - case "cosmos.gov.v1.QueryDepositsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsResponse 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_QueryDepositsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsResponse.deposits": - if x.Deposits == nil { - x.Deposits = []*Deposit{} - } - value := &_QueryDepositsResponse_1_list{list: &x.Deposits} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.QueryDepositsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsResponse 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_QueryDepositsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryDepositsResponse.deposits": - list := []*Deposit{} - return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &list}) - case "cosmos.gov.v1.QueryDepositsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryDepositsResponse 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_QueryDepositsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryDepositsResponse", 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_QueryDepositsResponse) 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_QueryDepositsResponse) 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_QueryDepositsResponse) 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_QueryDepositsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Deposits) > 0 { - for _, e := range x.Deposits { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDepositsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Deposits) > 0 { - for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Deposits[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositsResponse) - 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: QueryDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsResponse: 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 Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Deposits = append(x.Deposits, &Deposit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryTallyResultRequest protoreflect.MessageDescriptor - fd_QueryTallyResultRequest_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryTallyResultRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryTallyResultRequest") - fd_QueryTallyResultRequest_proposal_id = md_QueryTallyResultRequest.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryTallyResultRequest)(nil) - -type fastReflection_QueryTallyResultRequest QueryTallyResultRequest - -func (x *QueryTallyResultRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTallyResultRequest)(x) -} - -func (x *QueryTallyResultRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTallyResultRequest_messageType fastReflection_QueryTallyResultRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryTallyResultRequest_messageType{} - -type fastReflection_QueryTallyResultRequest_messageType struct{} - -func (x fastReflection_QueryTallyResultRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTallyResultRequest)(nil) -} -func (x fastReflection_QueryTallyResultRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultRequest) -} -func (x fastReflection_QueryTallyResultRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTallyResultRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultRequest -} - -// 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_QueryTallyResultRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryTallyResultRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTallyResultRequest) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTallyResultRequest) Interface() protoreflect.ProtoMessage { - return (*QueryTallyResultRequest)(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_QueryTallyResultRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryTallyResultRequest_proposal_id, 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_QueryTallyResultRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultRequest.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultRequest.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryTallyResultRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultRequest.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.QueryTallyResultRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryTallyResultRequest", 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTallyResultRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*QueryTallyResultRequest) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryTallyResultRequest) - 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: QueryTallyResultRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTallyResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryTallyResultResponse protoreflect.MessageDescriptor - fd_QueryTallyResultResponse_tally protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_query_proto_init() - md_QueryTallyResultResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryTallyResultResponse") - fd_QueryTallyResultResponse_tally = md_QueryTallyResultResponse.Fields().ByName("tally") -} - -var _ protoreflect.Message = (*fastReflection_QueryTallyResultResponse)(nil) - -type fastReflection_QueryTallyResultResponse QueryTallyResultResponse - -func (x *QueryTallyResultResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTallyResultResponse)(x) -} - -func (x *QueryTallyResultResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTallyResultResponse_messageType fastReflection_QueryTallyResultResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryTallyResultResponse_messageType{} - -type fastReflection_QueryTallyResultResponse_messageType struct{} - -func (x fastReflection_QueryTallyResultResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTallyResultResponse)(nil) -} -func (x fastReflection_QueryTallyResultResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultResponse) -} -func (x fastReflection_QueryTallyResultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTallyResultResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultResponse -} - -// 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_QueryTallyResultResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryTallyResultResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTallyResultResponse) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTallyResultResponse) Interface() protoreflect.ProtoMessage { - return (*QueryTallyResultResponse)(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_QueryTallyResultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Tally != nil { - value := protoreflect.ValueOfMessage(x.Tally.ProtoReflect()) - if !f(fd_QueryTallyResultResponse_tally, 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_QueryTallyResultResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultResponse.tally": - return x.Tally != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultResponse.tally": - x.Tally = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.QueryTallyResultResponse.tally": - value := x.Tally - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultResponse.tally": - x.Tally = value.Message().Interface().(*TallyResult) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultResponse.tally": - if x.Tally == nil { - x.Tally = new(TallyResult) - } - return protoreflect.ValueOfMessage(x.Tally.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.QueryTallyResultResponse.tally": - m := new(TallyResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.QueryTallyResultResponse", 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTallyResultResponse) - 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.Tally != nil { - l = options.Size(x.Tally) - 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().(*QueryTallyResultResponse) - 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.Tally != nil { - encoded, err := options.Marshal(x.Tally) - 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().(*QueryTallyResultResponse) - 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: QueryTallyResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTallyResultResponse: 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 Tally", 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.Tally == nil { - x.Tally = &TallyResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tally); 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, - } -} - -// Since: cosmos-sdk 0.46 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -type QueryProposalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *QueryProposalRequest) Reset() { - *x = QueryProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalRequest) ProtoMessage() {} - -// Deprecated: Use QueryProposalRequest.ProtoReflect.Descriptor instead. -func (*QueryProposalRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryProposalRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -type QueryProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` -} - -func (x *QueryProposalResponse) Reset() { - *x = QueryProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalResponse) ProtoMessage() {} - -// Deprecated: Use QueryProposalResponse.ProtoReflect.Descriptor instead. -func (*QueryProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryProposalResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -type QueryProposalsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_status defines the status of the proposals. - ProposalStatus ProposalStatus `protobuf:"varint,1,opt,name=proposal_status,json=proposalStatus,proto3,enum=cosmos.gov.v1.ProposalStatus" json:"proposal_status,omitempty"` - // voter defines the voter address for the proposals. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - // depositor defines the deposit addresses from the proposals. - Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryProposalsRequest) Reset() { - *x = QueryProposalsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalsRequest) ProtoMessage() {} - -// Deprecated: Use QueryProposalsRequest.ProtoReflect.Descriptor instead. -func (*QueryProposalsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryProposalsRequest) GetProposalStatus() ProposalStatus { - if x != nil { - return x.ProposalStatus - } - return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED -} - -func (x *QueryProposalsRequest) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *QueryProposalsRequest) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -func (x *QueryProposalsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -type QueryProposalsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryProposalsResponse) Reset() { - *x = QueryProposalsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalsResponse) ProtoMessage() {} - -// Deprecated: Use QueryProposalsResponse.ProtoReflect.Descriptor instead. -func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryProposalsResponse) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -func (x *QueryProposalsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -type QueryVoteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter defines the oter address for the proposals. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` -} - -func (x *QueryVoteRequest) Reset() { - *x = QueryVoteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVoteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVoteRequest) ProtoMessage() {} - -// Deprecated: Use QueryVoteRequest.ProtoReflect.Descriptor instead. -func (*QueryVoteRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryVoteRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryVoteRequest) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -type QueryVoteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // vote defined the queried vote. - Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` -} - -func (x *QueryVoteResponse) Reset() { - *x = QueryVoteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVoteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVoteResponse) ProtoMessage() {} - -// Deprecated: Use QueryVoteResponse.ProtoReflect.Descriptor instead. -func (*QueryVoteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryVoteResponse) GetVote() *Vote { - if x != nil { - return x.Vote - } - return nil -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -type QueryVotesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesRequest) Reset() { - *x = QueryVotesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesRequest) ProtoMessage() {} - -// Deprecated: Use QueryVotesRequest.ProtoReflect.Descriptor instead. -func (*QueryVotesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryVotesRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryVotesRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -type QueryVotesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // votes defined the queried votes. - Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesResponse) Reset() { - *x = QueryVotesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesResponse) ProtoMessage() {} - -// Deprecated: Use QueryVotesResponse.ProtoReflect.Descriptor instead. -func (*QueryVotesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryVotesResponse) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -func (x *QueryVotesResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - 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_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryParamsRequest) GetParamsType() string { - if x != nil { - return x.ParamsType - } - return "" -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // voting_params defines the parameters related to voting. - VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // deposit_params defines the parameters related to deposit. - DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // tally_params defines the parameters related to tally. - TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryParamsResponse) GetVotingParams() *VotingParams { - if x != nil { - return x.VotingParams - } - return nil -} - -func (x *QueryParamsResponse) GetDepositParams() *DepositParams { - if x != nil { - return x.DepositParams - } - return nil -} - -func (x *QueryParamsResponse) GetTallyParams() *TallyParams { - if x != nil { - return x.TallyParams - } - return nil -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -type QueryDepositRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // depositor defines the deposit addresses from the proposals. - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` -} - -func (x *QueryDepositRequest) Reset() { - *x = QueryDepositRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositRequest) ProtoMessage() {} - -// Deprecated: Use QueryDepositRequest.ProtoReflect.Descriptor instead. -func (*QueryDepositRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryDepositRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryDepositRequest) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -type QueryDepositResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // deposit defines the requested deposit. - Deposit *Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (x *QueryDepositResponse) Reset() { - *x = QueryDepositResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositResponse) ProtoMessage() {} - -// Deprecated: Use QueryDepositResponse.ProtoReflect.Descriptor instead. -func (*QueryDepositResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryDepositResponse) GetDeposit() *Deposit { - if x != nil { - return x.Deposit - } - return nil -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -type QueryDepositsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDepositsRequest) Reset() { - *x = QueryDepositsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDepositsRequest.ProtoReflect.Descriptor instead. -func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryDepositsRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryDepositsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -type QueryDepositsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDepositsResponse) Reset() { - *x = QueryDepositsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDepositsResponse.ProtoReflect.Descriptor instead. -func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryDepositsResponse) GetDeposits() []*Deposit { - if x != nil { - return x.Deposits - } - return nil -} - -func (x *QueryDepositsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -type QueryTallyResultRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *QueryTallyResultRequest) Reset() { - *x = QueryTallyResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTallyResultRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTallyResultRequest) ProtoMessage() {} - -// Deprecated: Use QueryTallyResultRequest.ProtoReflect.Descriptor instead. -func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryTallyResultRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -type QueryTallyResultResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tally defines the requested tally. - Tally *TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally,omitempty"` -} - -func (x *QueryTallyResultResponse) Reset() { - *x = QueryTallyResultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTallyResultResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTallyResultResponse) ProtoMessage() {} - -// Deprecated: Use QueryTallyResultResponse.ProtoReflect.Descriptor instead. -func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryTallyResultResponse) GetTally() *TallyResult { - if x != nil { - return x.Tally - } - return nil -} - -var File_cosmos_gov_v1_query_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x22, 0x4c, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, - 0x8f, 0x02, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x10, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x22, 0x3c, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x22, - 0x7c, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, - 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0xdb, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, - 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, - 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x3a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xda, 0x08, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, - 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, - 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, - 0x23, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, - 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, - 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0xab, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1_query_proto_rawDescOnce sync.Once - file_cosmos_gov_v1_query_proto_rawDescData = file_cosmos_gov_v1_query_proto_rawDesc -) - -func file_cosmos_gov_v1_query_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1_query_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1_query_proto_rawDescData) - }) - return file_cosmos_gov_v1_query_proto_rawDescData -} - -var file_cosmos_gov_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_cosmos_gov_v1_query_proto_goTypes = []interface{}{ - (*QueryProposalRequest)(nil), // 0: cosmos.gov.v1.QueryProposalRequest - (*QueryProposalResponse)(nil), // 1: cosmos.gov.v1.QueryProposalResponse - (*QueryProposalsRequest)(nil), // 2: cosmos.gov.v1.QueryProposalsRequest - (*QueryProposalsResponse)(nil), // 3: cosmos.gov.v1.QueryProposalsResponse - (*QueryVoteRequest)(nil), // 4: cosmos.gov.v1.QueryVoteRequest - (*QueryVoteResponse)(nil), // 5: cosmos.gov.v1.QueryVoteResponse - (*QueryVotesRequest)(nil), // 6: cosmos.gov.v1.QueryVotesRequest - (*QueryVotesResponse)(nil), // 7: cosmos.gov.v1.QueryVotesResponse - (*QueryParamsRequest)(nil), // 8: cosmos.gov.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 9: cosmos.gov.v1.QueryParamsResponse - (*QueryDepositRequest)(nil), // 10: cosmos.gov.v1.QueryDepositRequest - (*QueryDepositResponse)(nil), // 11: cosmos.gov.v1.QueryDepositResponse - (*QueryDepositsRequest)(nil), // 12: cosmos.gov.v1.QueryDepositsRequest - (*QueryDepositsResponse)(nil), // 13: cosmos.gov.v1.QueryDepositsResponse - (*QueryTallyResultRequest)(nil), // 14: cosmos.gov.v1.QueryTallyResultRequest - (*QueryTallyResultResponse)(nil), // 15: cosmos.gov.v1.QueryTallyResultResponse - (*Proposal)(nil), // 16: cosmos.gov.v1.Proposal - (ProposalStatus)(0), // 17: cosmos.gov.v1.ProposalStatus - (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse - (*Vote)(nil), // 20: cosmos.gov.v1.Vote - (*VotingParams)(nil), // 21: cosmos.gov.v1.VotingParams - (*DepositParams)(nil), // 22: cosmos.gov.v1.DepositParams - (*TallyParams)(nil), // 23: cosmos.gov.v1.TallyParams - (*Deposit)(nil), // 24: cosmos.gov.v1.Deposit - (*TallyResult)(nil), // 25: cosmos.gov.v1.TallyResult -} -var file_cosmos_gov_v1_query_proto_depIdxs = []int32{ - 16, // 0: cosmos.gov.v1.QueryProposalResponse.proposal:type_name -> cosmos.gov.v1.Proposal - 17, // 1: cosmos.gov.v1.QueryProposalsRequest.proposal_status:type_name -> cosmos.gov.v1.ProposalStatus - 18, // 2: cosmos.gov.v1.QueryProposalsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 16, // 3: cosmos.gov.v1.QueryProposalsResponse.proposals:type_name -> cosmos.gov.v1.Proposal - 19, // 4: cosmos.gov.v1.QueryProposalsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 20, // 5: cosmos.gov.v1.QueryVoteResponse.vote:type_name -> cosmos.gov.v1.Vote - 18, // 6: cosmos.gov.v1.QueryVotesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 20, // 7: cosmos.gov.v1.QueryVotesResponse.votes:type_name -> cosmos.gov.v1.Vote - 19, // 8: cosmos.gov.v1.QueryVotesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 9: cosmos.gov.v1.QueryParamsResponse.voting_params:type_name -> cosmos.gov.v1.VotingParams - 22, // 10: cosmos.gov.v1.QueryParamsResponse.deposit_params:type_name -> cosmos.gov.v1.DepositParams - 23, // 11: cosmos.gov.v1.QueryParamsResponse.tally_params:type_name -> cosmos.gov.v1.TallyParams - 24, // 12: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit - 18, // 13: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 24, // 14: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit - 19, // 15: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 25, // 16: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult - 0, // 17: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest - 2, // 18: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest - 4, // 19: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest - 6, // 20: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest - 8, // 21: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest - 10, // 22: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest - 12, // 23: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest - 14, // 24: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest - 1, // 25: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse - 3, // 26: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse - 5, // 27: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse - 7, // 28: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse - 9, // 29: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse - 11, // 30: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse - 13, // 31: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse - 15, // 32: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse - 25, // [25:33] is the sub-list for method output_type - 17, // [17:25] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1_query_proto_init() } -func file_cosmos_gov_v1_query_proto_init() { - if File_cosmos_gov_v1_query_proto != nil { - return - } - file_cosmos_gov_v1_gov_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVoteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVoteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTallyResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTallyResultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_gov_v1_query_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1_query_proto_depIdxs, - MessageInfos: file_cosmos_gov_v1_query_proto_msgTypes, - }.Build() - File_cosmos_gov_v1_query_proto = out.File - file_cosmos_gov_v1_query_proto_rawDesc = nil - file_cosmos_gov_v1_query_proto_goTypes = nil - file_cosmos_gov_v1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1/query_grpc.pb.go b/api/cosmos/gov/v1/query_grpc.pb.go deleted file mode 100644 index dea418e542e1..000000000000 --- a/api/cosmos/gov/v1/query_grpc.pb.go +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/gov/v1/query.proto - -package govv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Proposal queries proposal details based on ProposalID. - Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) - // Proposals queries all proposals based on given status. - Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) - // Vote queries voted information based on proposalID, voterAddr. - Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) - // Votes queries votes of a given proposal. - Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) - // Params queries all parameters of the gov module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. - Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) - // Deposits queries all deposits of a single proposal. - Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) - // TallyResult queries the tally of a proposal vote. - TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) { - out := new(QueryProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Proposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) { - out := new(QueryProposalsResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Proposals", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) { - out := new(QueryVoteResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Vote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) { - out := new(QueryVotesResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Votes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) { - out := new(QueryDepositResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Deposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) { - out := new(QueryDepositsResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Deposits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) { - out := new(QueryTallyResultResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/TallyResult", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Proposal queries proposal details based on ProposalID. - Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) - // Proposals queries all proposals based on given status. - Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error) - // Vote queries voted information based on proposalID, voterAddr. - Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) - // Votes queries votes of a given proposal. - Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) - // Params queries all parameters of the gov module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. - Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) - // Deposits queries all deposits of a single proposal. - Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) - // TallyResult queries the tally of a proposal vote. - TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") -} -func (UnimplementedQueryServer) Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Proposals not implemented") -} -func (UnimplementedQueryServer) Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") -} -func (UnimplementedQueryServer) Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Votes not implemented") -} -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") -} -func (UnimplementedQueryServer) Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") -} -func (UnimplementedQueryServer) TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Proposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Proposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Proposal(ctx, req.(*QueryProposalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Proposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Proposals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Proposals", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Proposals(ctx, req.(*QueryProposalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVoteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Vote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Vote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Vote(ctx, req.(*QueryVoteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Votes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVotesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Votes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Votes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Votes(ctx, req.(*QueryVotesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Deposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Deposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Deposit(ctx, req.(*QueryDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Deposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDepositsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Deposits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/Deposits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Deposits(ctx, req.(*QueryDepositsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTallyResultRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TallyResult(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Query/TallyResult", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TallyResult(ctx, req.(*QueryTallyResultRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.gov.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Proposal", - Handler: _Query_Proposal_Handler, - }, - { - MethodName: "Proposals", - Handler: _Query_Proposals_Handler, - }, - { - MethodName: "Vote", - Handler: _Query_Vote_Handler, - }, - { - MethodName: "Votes", - Handler: _Query_Votes_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Deposit", - Handler: _Query_Deposit_Handler, - }, - { - MethodName: "Deposits", - Handler: _Query_Deposits_Handler, - }, - { - MethodName: "TallyResult", - Handler: _Query_TallyResult_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/gov/v1/query.proto", -} diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go deleted file mode 100644 index 69c4b1f0f76c..000000000000 --- a/api/cosmos/gov/v1/tx.pulsar.go +++ /dev/null @@ -1,5730 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_MsgSubmitProposal_1_list)(nil) - -type _MsgSubmitProposal_1_list struct { - list *[]*anypb.Any -} - -func (x *_MsgSubmitProposal_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSubmitProposal_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSubmitProposal_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSubmitProposal_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSubmitProposal_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSubmitProposal_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgSubmitProposal_2_list)(nil) - -type _MsgSubmitProposal_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgSubmitProposal_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSubmitProposal_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSubmitProposal_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSubmitProposal_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSubmitProposal_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSubmitProposal_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgSubmitProposal protoreflect.MessageDescriptor - fd_MsgSubmitProposal_messages protoreflect.FieldDescriptor - fd_MsgSubmitProposal_initial_deposit protoreflect.FieldDescriptor - fd_MsgSubmitProposal_proposer protoreflect.FieldDescriptor - fd_MsgSubmitProposal_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgSubmitProposal = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgSubmitProposal") - fd_MsgSubmitProposal_messages = md_MsgSubmitProposal.Fields().ByName("messages") - fd_MsgSubmitProposal_initial_deposit = md_MsgSubmitProposal.Fields().ByName("initial_deposit") - fd_MsgSubmitProposal_proposer = md_MsgSubmitProposal.Fields().ByName("proposer") - fd_MsgSubmitProposal_metadata = md_MsgSubmitProposal.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitProposal)(nil) - -type fastReflection_MsgSubmitProposal MsgSubmitProposal - -func (x *MsgSubmitProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitProposal)(x) -} - -func (x *MsgSubmitProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitProposal_messageType fastReflection_MsgSubmitProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitProposal_messageType{} - -type fastReflection_MsgSubmitProposal_messageType struct{} - -func (x fastReflection_MsgSubmitProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitProposal)(nil) -} -func (x fastReflection_MsgSubmitProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposal) -} -func (x fastReflection_MsgSubmitProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposal -} - -// 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_MsgSubmitProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitProposal) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitProposal) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitProposal)(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_MsgSubmitProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Messages) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitProposal_1_list{list: &x.Messages}) - if !f(fd_MsgSubmitProposal_messages, value) { - return - } - } - if len(x.InitialDeposit) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{list: &x.InitialDeposit}) - if !f(fd_MsgSubmitProposal_initial_deposit, value) { - return - } - } - if x.Proposer != "" { - value := protoreflect.ValueOfString(x.Proposer) - if !f(fd_MsgSubmitProposal_proposer, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgSubmitProposal_metadata, 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_MsgSubmitProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposal.messages": - return len(x.Messages) != 0 - case "cosmos.gov.v1.MsgSubmitProposal.initial_deposit": - return len(x.InitialDeposit) != 0 - case "cosmos.gov.v1.MsgSubmitProposal.proposer": - return x.Proposer != "" - case "cosmos.gov.v1.MsgSubmitProposal.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposal 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_MsgSubmitProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposal.messages": - x.Messages = nil - case "cosmos.gov.v1.MsgSubmitProposal.initial_deposit": - x.InitialDeposit = nil - case "cosmos.gov.v1.MsgSubmitProposal.proposer": - x.Proposer = "" - case "cosmos.gov.v1.MsgSubmitProposal.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposal 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_MsgSubmitProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.MsgSubmitProposal.messages": - if len(x.Messages) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitProposal_1_list{}) - } - listValue := &_MsgSubmitProposal_1_list{list: &x.Messages} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.MsgSubmitProposal.initial_deposit": - if len(x.InitialDeposit) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{}) - } - listValue := &_MsgSubmitProposal_2_list{list: &x.InitialDeposit} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.MsgSubmitProposal.proposer": - value := x.Proposer - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.MsgSubmitProposal.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposal 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_MsgSubmitProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposal.messages": - lv := value.List() - clv := lv.(*_MsgSubmitProposal_1_list) - x.Messages = *clv.list - case "cosmos.gov.v1.MsgSubmitProposal.initial_deposit": - lv := value.List() - clv := lv.(*_MsgSubmitProposal_2_list) - x.InitialDeposit = *clv.list - case "cosmos.gov.v1.MsgSubmitProposal.proposer": - x.Proposer = value.Interface().(string) - case "cosmos.gov.v1.MsgSubmitProposal.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposal 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_MsgSubmitProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposal.messages": - if x.Messages == nil { - x.Messages = []*anypb.Any{} - } - value := &_MsgSubmitProposal_1_list{list: &x.Messages} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.MsgSubmitProposal.initial_deposit": - if x.InitialDeposit == nil { - x.InitialDeposit = []*v1beta1.Coin{} - } - value := &_MsgSubmitProposal_2_list{list: &x.InitialDeposit} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.MsgSubmitProposal.proposer": - panic(fmt.Errorf("field proposer of message cosmos.gov.v1.MsgSubmitProposal is not mutable")) - case "cosmos.gov.v1.MsgSubmitProposal.metadata": - panic(fmt.Errorf("field metadata of message cosmos.gov.v1.MsgSubmitProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposal 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_MsgSubmitProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposal.messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgSubmitProposal_1_list{list: &list}) - case "cosmos.gov.v1.MsgSubmitProposal.initial_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{list: &list}) - case "cosmos.gov.v1.MsgSubmitProposal.proposer": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.MsgSubmitProposal.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposal 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_MsgSubmitProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgSubmitProposal", 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_MsgSubmitProposal) 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_MsgSubmitProposal) 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_MsgSubmitProposal) 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_MsgSubmitProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Messages) > 0 { - for _, e := range x.Messages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.InitialDeposit) > 0 { - for _, e := range x.InitialDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Proposer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(x.Proposer) > 0 { - i -= len(x.Proposer) - copy(dAtA[i:], x.Proposer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proposer))) - i-- - dAtA[i] = 0x1a - } - if len(x.InitialDeposit) > 0 { - for iNdEx := len(x.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.InitialDeposit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Messages) > 0 { - for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Messages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposal) - 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: MsgSubmitProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitProposal: 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 Messages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Messages = append(x.Messages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InitialDeposit = append(x.InitialDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InitialDeposit[len(x.InitialDeposit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposer", 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.Proposer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitProposalResponse protoreflect.MessageDescriptor - fd_MsgSubmitProposalResponse_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgSubmitProposalResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgSubmitProposalResponse") - fd_MsgSubmitProposalResponse_proposal_id = md_MsgSubmitProposalResponse.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitProposalResponse)(nil) - -type fastReflection_MsgSubmitProposalResponse MsgSubmitProposalResponse - -func (x *MsgSubmitProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitProposalResponse)(x) -} - -func (x *MsgSubmitProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitProposalResponse_messageType fastReflection_MsgSubmitProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitProposalResponse_messageType{} - -type fastReflection_MsgSubmitProposalResponse_messageType struct{} - -func (x fastReflection_MsgSubmitProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitProposalResponse)(nil) -} -func (x fastReflection_MsgSubmitProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposalResponse) -} -func (x fastReflection_MsgSubmitProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposalResponse -} - -// 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_MsgSubmitProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitProposalResponse)(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_MsgSubmitProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgSubmitProposalResponse_proposal_id, 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_MsgSubmitProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposalResponse.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposalResponse.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.MsgSubmitProposalResponse.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposalResponse.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposalResponse.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.MsgSubmitProposalResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgSubmitProposalResponse.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgSubmitProposalResponse", 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitProposalResponse) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*MsgSubmitProposalResponse) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposalResponse) - 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: MsgSubmitProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgExecLegacyContent protoreflect.MessageDescriptor - fd_MsgExecLegacyContent_content protoreflect.FieldDescriptor - fd_MsgExecLegacyContent_authority protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgExecLegacyContent = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgExecLegacyContent") - fd_MsgExecLegacyContent_content = md_MsgExecLegacyContent.Fields().ByName("content") - fd_MsgExecLegacyContent_authority = md_MsgExecLegacyContent.Fields().ByName("authority") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecLegacyContent)(nil) - -type fastReflection_MsgExecLegacyContent MsgExecLegacyContent - -func (x *MsgExecLegacyContent) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecLegacyContent)(x) -} - -func (x *MsgExecLegacyContent) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExecLegacyContent_messageType fastReflection_MsgExecLegacyContent_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecLegacyContent_messageType{} - -type fastReflection_MsgExecLegacyContent_messageType struct{} - -func (x fastReflection_MsgExecLegacyContent_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecLegacyContent)(nil) -} -func (x fastReflection_MsgExecLegacyContent_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecLegacyContent) -} -func (x fastReflection_MsgExecLegacyContent_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecLegacyContent -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecLegacyContent) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecLegacyContent -} - -// 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_MsgExecLegacyContent) Type() protoreflect.MessageType { - return _fastReflection_MsgExecLegacyContent_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecLegacyContent) New() protoreflect.Message { - return new(fastReflection_MsgExecLegacyContent) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecLegacyContent) Interface() protoreflect.ProtoMessage { - return (*MsgExecLegacyContent)(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_MsgExecLegacyContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Content != nil { - value := protoreflect.ValueOfMessage(x.Content.ProtoReflect()) - if !f(fd_MsgExecLegacyContent_content, value) { - return - } - } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgExecLegacyContent_authority, 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_MsgExecLegacyContent) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.MsgExecLegacyContent.content": - return x.Content != nil - case "cosmos.gov.v1.MsgExecLegacyContent.authority": - return x.Authority != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContent")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContent 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_MsgExecLegacyContent) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgExecLegacyContent.content": - x.Content = nil - case "cosmos.gov.v1.MsgExecLegacyContent.authority": - x.Authority = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContent")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContent 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_MsgExecLegacyContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.MsgExecLegacyContent.content": - value := x.Content - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.MsgExecLegacyContent.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContent")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContent 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_MsgExecLegacyContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgExecLegacyContent.content": - x.Content = value.Message().Interface().(*anypb.Any) - case "cosmos.gov.v1.MsgExecLegacyContent.authority": - x.Authority = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContent")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContent 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_MsgExecLegacyContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgExecLegacyContent.content": - if x.Content == nil { - x.Content = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Content.ProtoReflect()) - case "cosmos.gov.v1.MsgExecLegacyContent.authority": - panic(fmt.Errorf("field authority of message cosmos.gov.v1.MsgExecLegacyContent is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContent")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContent 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_MsgExecLegacyContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgExecLegacyContent.content": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.MsgExecLegacyContent.authority": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContent")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContent 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_MsgExecLegacyContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgExecLegacyContent", 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_MsgExecLegacyContent) 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_MsgExecLegacyContent) 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_MsgExecLegacyContent) 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_MsgExecLegacyContent) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecLegacyContent) - 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.Content != nil { - l = options.Size(x.Content) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgExecLegacyContent) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0x12 - } - if x.Content != nil { - encoded, err := options.Marshal(x.Content) - 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().(*MsgExecLegacyContent) - 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: MsgExecLegacyContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecLegacyContent: 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 Content", 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.Content == nil { - x.Content = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Content); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_MsgExecLegacyContentResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgExecLegacyContentResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgExecLegacyContentResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecLegacyContentResponse)(nil) - -type fastReflection_MsgExecLegacyContentResponse MsgExecLegacyContentResponse - -func (x *MsgExecLegacyContentResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecLegacyContentResponse)(x) -} - -func (x *MsgExecLegacyContentResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExecLegacyContentResponse_messageType fastReflection_MsgExecLegacyContentResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecLegacyContentResponse_messageType{} - -type fastReflection_MsgExecLegacyContentResponse_messageType struct{} - -func (x fastReflection_MsgExecLegacyContentResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecLegacyContentResponse)(nil) -} -func (x fastReflection_MsgExecLegacyContentResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecLegacyContentResponse) -} -func (x fastReflection_MsgExecLegacyContentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecLegacyContentResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecLegacyContentResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecLegacyContentResponse -} - -// 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_MsgExecLegacyContentResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecLegacyContentResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecLegacyContentResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecLegacyContentResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecLegacyContentResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecLegacyContentResponse)(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_MsgExecLegacyContentResponse) 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_MsgExecLegacyContentResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContentResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContentResponse 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_MsgExecLegacyContentResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContentResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContentResponse 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_MsgExecLegacyContentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContentResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContentResponse 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_MsgExecLegacyContentResponse) 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.gov.v1.MsgExecLegacyContentResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContentResponse 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_MsgExecLegacyContentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContentResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContentResponse 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_MsgExecLegacyContentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgExecLegacyContentResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgExecLegacyContentResponse 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_MsgExecLegacyContentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgExecLegacyContentResponse", 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_MsgExecLegacyContentResponse) 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_MsgExecLegacyContentResponse) 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_MsgExecLegacyContentResponse) 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_MsgExecLegacyContentResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecLegacyContentResponse) - 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().(*MsgExecLegacyContentResponse) - 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().(*MsgExecLegacyContentResponse) - 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: MsgExecLegacyContentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecLegacyContentResponse: 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_MsgVote protoreflect.MessageDescriptor - fd_MsgVote_proposal_id protoreflect.FieldDescriptor - fd_MsgVote_voter protoreflect.FieldDescriptor - fd_MsgVote_option protoreflect.FieldDescriptor - fd_MsgVote_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgVote = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgVote") - fd_MsgVote_proposal_id = md_MsgVote.Fields().ByName("proposal_id") - fd_MsgVote_voter = md_MsgVote.Fields().ByName("voter") - fd_MsgVote_option = md_MsgVote.Fields().ByName("option") - fd_MsgVote_metadata = md_MsgVote.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_MsgVote)(nil) - -type fastReflection_MsgVote MsgVote - -func (x *MsgVote) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVote)(x) -} - -func (x *MsgVote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVote_messageType fastReflection_MsgVote_messageType -var _ protoreflect.MessageType = fastReflection_MsgVote_messageType{} - -type fastReflection_MsgVote_messageType struct{} - -func (x fastReflection_MsgVote_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVote)(nil) -} -func (x fastReflection_MsgVote_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVote) -} -func (x fastReflection_MsgVote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVote) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVote -} - -// 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_MsgVote) Type() protoreflect.MessageType { - return _fastReflection_MsgVote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVote) New() protoreflect.Message { - return new(fastReflection_MsgVote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVote) Interface() protoreflect.ProtoMessage { - return (*MsgVote)(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_MsgVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgVote_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_MsgVote_voter, value) { - return - } - } - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_MsgVote_option, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgVote_metadata, 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_MsgVote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVote.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.MsgVote.voter": - return x.Voter != "" - case "cosmos.gov.v1.MsgVote.option": - return x.Option != 0 - case "cosmos.gov.v1.MsgVote.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVote 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_MsgVote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVote.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.MsgVote.voter": - x.Voter = "" - case "cosmos.gov.v1.MsgVote.option": - x.Option = 0 - case "cosmos.gov.v1.MsgVote.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVote 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_MsgVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.MsgVote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.MsgVote.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.MsgVote.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1.MsgVote.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVote 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_MsgVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVote.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.MsgVote.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1.MsgVote.option": - x.Option = (VoteOption)(value.Enum()) - case "cosmos.gov.v1.MsgVote.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVote 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_MsgVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.MsgVote is not mutable")) - case "cosmos.gov.v1.MsgVote.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1.MsgVote is not mutable")) - case "cosmos.gov.v1.MsgVote.option": - panic(fmt.Errorf("field option of message cosmos.gov.v1.MsgVote is not mutable")) - case "cosmos.gov.v1.MsgVote.metadata": - panic(fmt.Errorf("field metadata of message cosmos.gov.v1.MsgVote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVote 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_MsgVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.MsgVote.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.MsgVote.option": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1.MsgVote.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVote 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_MsgVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgVote", 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_MsgVote) 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_MsgVote) 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_MsgVote) 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_MsgVote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVote) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if x.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x18 - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVote) - 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: MsgVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVoteResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgVoteResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgVoteResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteResponse)(nil) - -type fastReflection_MsgVoteResponse MsgVoteResponse - -func (x *MsgVoteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteResponse)(x) -} - -func (x *MsgVoteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteResponse_messageType fastReflection_MsgVoteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteResponse_messageType{} - -type fastReflection_MsgVoteResponse_messageType struct{} - -func (x fastReflection_MsgVoteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteResponse)(nil) -} -func (x fastReflection_MsgVoteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteResponse) -} -func (x fastReflection_MsgVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteResponse -} - -// 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_MsgVoteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteResponse) New() protoreflect.Message { - return new(fastReflection_MsgVoteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVoteResponse)(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_MsgVoteResponse) 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_MsgVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteResponse 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_MsgVoteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteResponse 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_MsgVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteResponse 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_MsgVoteResponse) 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.gov.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteResponse 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_MsgVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteResponse 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_MsgVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteResponse 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_MsgVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgVoteResponse", 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteResponse) - 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().(*MsgVoteResponse) - 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().(*MsgVoteResponse) - 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: MsgVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgVoteWeighted_3_list)(nil) - -type _MsgVoteWeighted_3_list struct { - list *[]*WeightedVoteOption -} - -func (x *_MsgVoteWeighted_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgVoteWeighted_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgVoteWeighted_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - (*x.list)[i] = concreteValue -} - -func (x *_MsgVoteWeighted_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgVoteWeighted_3_list) AppendMutable() protoreflect.Value { - v := new(WeightedVoteOption) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgVoteWeighted_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgVoteWeighted_3_list) NewElement() protoreflect.Value { - v := new(WeightedVoteOption) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgVoteWeighted_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgVoteWeighted protoreflect.MessageDescriptor - fd_MsgVoteWeighted_proposal_id protoreflect.FieldDescriptor - fd_MsgVoteWeighted_voter protoreflect.FieldDescriptor - fd_MsgVoteWeighted_options protoreflect.FieldDescriptor - fd_MsgVoteWeighted_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgVoteWeighted = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgVoteWeighted") - fd_MsgVoteWeighted_proposal_id = md_MsgVoteWeighted.Fields().ByName("proposal_id") - fd_MsgVoteWeighted_voter = md_MsgVoteWeighted.Fields().ByName("voter") - fd_MsgVoteWeighted_options = md_MsgVoteWeighted.Fields().ByName("options") - fd_MsgVoteWeighted_metadata = md_MsgVoteWeighted.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteWeighted)(nil) - -type fastReflection_MsgVoteWeighted MsgVoteWeighted - -func (x *MsgVoteWeighted) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteWeighted)(x) -} - -func (x *MsgVoteWeighted) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteWeighted_messageType fastReflection_MsgVoteWeighted_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteWeighted_messageType{} - -type fastReflection_MsgVoteWeighted_messageType struct{} - -func (x fastReflection_MsgVoteWeighted_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteWeighted)(nil) -} -func (x fastReflection_MsgVoteWeighted_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeighted) -} -func (x fastReflection_MsgVoteWeighted_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeighted -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteWeighted) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeighted -} - -// 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_MsgVoteWeighted) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteWeighted_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteWeighted) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeighted) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteWeighted) Interface() protoreflect.ProtoMessage { - return (*MsgVoteWeighted)(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_MsgVoteWeighted) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgVoteWeighted_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_MsgVoteWeighted_voter, value) { - return - } - } - if len(x.Options) != 0 { - value := protoreflect.ValueOfList(&_MsgVoteWeighted_3_list{list: &x.Options}) - if !f(fd_MsgVoteWeighted_options, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgVoteWeighted_metadata, 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_MsgVoteWeighted) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVoteWeighted.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.MsgVoteWeighted.voter": - return x.Voter != "" - case "cosmos.gov.v1.MsgVoteWeighted.options": - return len(x.Options) != 0 - case "cosmos.gov.v1.MsgVoteWeighted.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeighted 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_MsgVoteWeighted) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVoteWeighted.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.MsgVoteWeighted.voter": - x.Voter = "" - case "cosmos.gov.v1.MsgVoteWeighted.options": - x.Options = nil - case "cosmos.gov.v1.MsgVoteWeighted.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeighted 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_MsgVoteWeighted) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.MsgVoteWeighted.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.MsgVoteWeighted.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.MsgVoteWeighted.options": - if len(x.Options) == 0 { - return protoreflect.ValueOfList(&_MsgVoteWeighted_3_list{}) - } - listValue := &_MsgVoteWeighted_3_list{list: &x.Options} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.MsgVoteWeighted.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeighted 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_MsgVoteWeighted) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVoteWeighted.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.MsgVoteWeighted.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1.MsgVoteWeighted.options": - lv := value.List() - clv := lv.(*_MsgVoteWeighted_3_list) - x.Options = *clv.list - case "cosmos.gov.v1.MsgVoteWeighted.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeighted 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_MsgVoteWeighted) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVoteWeighted.options": - if x.Options == nil { - x.Options = []*WeightedVoteOption{} - } - value := &_MsgVoteWeighted_3_list{list: &x.Options} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.MsgVoteWeighted.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.MsgVoteWeighted is not mutable")) - case "cosmos.gov.v1.MsgVoteWeighted.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1.MsgVoteWeighted is not mutable")) - case "cosmos.gov.v1.MsgVoteWeighted.metadata": - panic(fmt.Errorf("field metadata of message cosmos.gov.v1.MsgVoteWeighted is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeighted 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_MsgVoteWeighted) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgVoteWeighted.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.MsgVoteWeighted.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.MsgVoteWeighted.options": - list := []*WeightedVoteOption{} - return protoreflect.ValueOfList(&_MsgVoteWeighted_3_list{list: &list}) - case "cosmos.gov.v1.MsgVoteWeighted.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeighted 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_MsgVoteWeighted) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgVoteWeighted", 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_MsgVoteWeighted) 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_MsgVoteWeighted) 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_MsgVoteWeighted) 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_MsgVoteWeighted) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteWeighted) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Options) > 0 { - for _, e := range x.Options { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteWeighted) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(x.Options) > 0 { - for iNdEx := len(x.Options) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Options[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteWeighted) - 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: MsgVoteWeighted: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteWeighted: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Options = append(x.Options, &WeightedVoteOption{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Options[len(x.Options)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVoteWeightedResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgVoteWeightedResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgVoteWeightedResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteWeightedResponse)(nil) - -type fastReflection_MsgVoteWeightedResponse MsgVoteWeightedResponse - -func (x *MsgVoteWeightedResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteWeightedResponse)(x) -} - -func (x *MsgVoteWeightedResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteWeightedResponse_messageType fastReflection_MsgVoteWeightedResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteWeightedResponse_messageType{} - -type fastReflection_MsgVoteWeightedResponse_messageType struct{} - -func (x fastReflection_MsgVoteWeightedResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteWeightedResponse)(nil) -} -func (x fastReflection_MsgVoteWeightedResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeightedResponse) -} -func (x fastReflection_MsgVoteWeightedResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeightedResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteWeightedResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeightedResponse -} - -// 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_MsgVoteWeightedResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteWeightedResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteWeightedResponse) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeightedResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteWeightedResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVoteWeightedResponse)(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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) 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.gov.v1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgVoteWeightedResponse", 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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteWeightedResponse) - 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().(*MsgVoteWeightedResponse) - 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().(*MsgVoteWeightedResponse) - 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: MsgVoteWeightedResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteWeightedResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgDeposit_3_list)(nil) - -type _MsgDeposit_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgDeposit_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgDeposit_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgDeposit_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgDeposit_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgDeposit_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgDeposit_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgDeposit_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgDeposit_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgDeposit protoreflect.MessageDescriptor - fd_MsgDeposit_proposal_id protoreflect.FieldDescriptor - fd_MsgDeposit_depositor protoreflect.FieldDescriptor - fd_MsgDeposit_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgDeposit = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgDeposit") - fd_MsgDeposit_proposal_id = md_MsgDeposit.Fields().ByName("proposal_id") - fd_MsgDeposit_depositor = md_MsgDeposit.Fields().ByName("depositor") - fd_MsgDeposit_amount = md_MsgDeposit.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeposit)(nil) - -type fastReflection_MsgDeposit MsgDeposit - -func (x *MsgDeposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeposit)(x) -} - -func (x *MsgDeposit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeposit_messageType fastReflection_MsgDeposit_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeposit_messageType{} - -type fastReflection_MsgDeposit_messageType struct{} - -func (x fastReflection_MsgDeposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeposit)(nil) -} -func (x fastReflection_MsgDeposit_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeposit) -} -func (x fastReflection_MsgDeposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeposit) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeposit -} - -// 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_MsgDeposit) Type() protoreflect.MessageType { - return _fastReflection_MsgDeposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeposit) New() protoreflect.Message { - return new(fastReflection_MsgDeposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeposit) Interface() protoreflect.ProtoMessage { - return (*MsgDeposit)(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_MsgDeposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgDeposit_proposal_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_MsgDeposit_depositor, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgDeposit_3_list{list: &x.Amount}) - if !f(fd_MsgDeposit_amount, 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_MsgDeposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1.MsgDeposit.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1.MsgDeposit.depositor": - return x.Depositor != "" - case "cosmos.gov.v1.MsgDeposit.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDeposit 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_MsgDeposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgDeposit.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1.MsgDeposit.depositor": - x.Depositor = "" - case "cosmos.gov.v1.MsgDeposit.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDeposit 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_MsgDeposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1.MsgDeposit.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1.MsgDeposit.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1.MsgDeposit.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgDeposit_3_list{}) - } - listValue := &_MsgDeposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDeposit 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_MsgDeposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1.MsgDeposit.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1.MsgDeposit.depositor": - x.Depositor = value.Interface().(string) - case "cosmos.gov.v1.MsgDeposit.amount": - lv := value.List() - clv := lv.(*_MsgDeposit_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDeposit 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_MsgDeposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgDeposit.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgDeposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.MsgDeposit.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1.MsgDeposit is not mutable")) - case "cosmos.gov.v1.MsgDeposit.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1.MsgDeposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDeposit 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_MsgDeposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1.MsgDeposit.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1.MsgDeposit.depositor": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1.MsgDeposit.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgDeposit_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDeposit 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_MsgDeposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgDeposit", 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_MsgDeposit) 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_MsgDeposit) 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_MsgDeposit) 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_MsgDeposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeposit) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDeposit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDeposit) - 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: MsgDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDepositResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1_tx_proto_init() - md_MsgDepositResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgDepositResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgDepositResponse)(nil) - -type fastReflection_MsgDepositResponse MsgDepositResponse - -func (x *MsgDepositResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDepositResponse)(x) -} - -func (x *MsgDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDepositResponse_messageType fastReflection_MsgDepositResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDepositResponse_messageType{} - -type fastReflection_MsgDepositResponse_messageType struct{} - -func (x fastReflection_MsgDepositResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDepositResponse)(nil) -} -func (x fastReflection_MsgDepositResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDepositResponse) -} -func (x fastReflection_MsgDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDepositResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositResponse -} - -// 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_MsgDepositResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDepositResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDepositResponse) New() protoreflect.Message { - return new(fastReflection_MsgDepositResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDepositResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDepositResponse)(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_MsgDepositResponse) 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_MsgDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDepositResponse 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_MsgDepositResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDepositResponse 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_MsgDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDepositResponse 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_MsgDepositResponse) 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.gov.v1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDepositResponse 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_MsgDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDepositResponse 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_MsgDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1.MsgDepositResponse 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_MsgDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgDepositResponse", 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_MsgDepositResponse) 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_MsgDepositResponse) 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_MsgDepositResponse) 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_MsgDepositResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDepositResponse) - 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().(*MsgDepositResponse) - 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().(*MsgDepositResponse) - 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: MsgDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositResponse: 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, - } -} - -// Since: cosmos-sdk 0.46 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -type MsgSubmitProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Messages []*anypb.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - InitialDeposit []*v1beta1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` - Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` - // metadata is any arbitrary metadata attached to the proposal. - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *MsgSubmitProposal) Reset() { - *x = MsgSubmitProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitProposal) ProtoMessage() {} - -// Deprecated: Use MsgSubmitProposal.ProtoReflect.Descriptor instead. -func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSubmitProposal) GetMessages() []*anypb.Any { - if x != nil { - return x.Messages - } - return nil -} - -func (x *MsgSubmitProposal) GetInitialDeposit() []*v1beta1.Coin { - if x != nil { - return x.InitialDeposit - } - return nil -} - -func (x *MsgSubmitProposal) GetProposer() string { - if x != nil { - return x.Proposer - } - return "" -} - -func (x *MsgSubmitProposal) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -type MsgSubmitProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *MsgSubmitProposalResponse) Reset() { - *x = MsgSubmitProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitProposalResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgSubmitProposalResponse) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// MsgExecLegacyContent is used to wrap the legacy content field into a message. -// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. -type MsgExecLegacyContent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // content is the proposal's content. - Content *anypb.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - // authority must be the gov module address. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` -} - -func (x *MsgExecLegacyContent) Reset() { - *x = MsgExecLegacyContent{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecLegacyContent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecLegacyContent) ProtoMessage() {} - -// Deprecated: Use MsgExecLegacyContent.ProtoReflect.Descriptor instead. -func (*MsgExecLegacyContent) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgExecLegacyContent) GetContent() *anypb.Any { - if x != nil { - return x.Content - } - return nil -} - -func (x *MsgExecLegacyContent) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -type MsgExecLegacyContentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgExecLegacyContentResponse) Reset() { - *x = MsgExecLegacyContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecLegacyContentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecLegacyContentResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecLegacyContentResponse.ProtoReflect.Descriptor instead. -func (*MsgExecLegacyContentResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgVote defines a message to cast a vote. -type MsgVote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"` - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *MsgVote) Reset() { - *x = MsgVote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVote) ProtoMessage() {} - -// Deprecated: Use MsgVote.ProtoReflect.Descriptor instead. -func (*MsgVote) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgVote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgVote) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *MsgVote) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -func (x *MsgVote) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// MsgVoteResponse defines the Msg/Vote response type. -type MsgVoteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVoteResponse) Reset() { - *x = MsgVoteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteResponse) ProtoMessage() {} - -// Deprecated: Use MsgVoteResponse.ProtoReflect.Descriptor instead. -func (*MsgVoteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{5} -} - -// MsgVoteWeighted defines a message to cast a vote. -type MsgVoteWeighted struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *MsgVoteWeighted) Reset() { - *x = MsgVoteWeighted{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteWeighted) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteWeighted) ProtoMessage() {} - -// Deprecated: Use MsgVoteWeighted.ProtoReflect.Descriptor instead. -func (*MsgVoteWeighted) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgVoteWeighted) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgVoteWeighted) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *MsgVoteWeighted) GetOptions() []*WeightedVoteOption { - if x != nil { - return x.Options - } - return nil -} - -func (x *MsgVoteWeighted) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -type MsgVoteWeightedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVoteWeightedResponse) Reset() { - *x = MsgVoteWeightedResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteWeightedResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteWeightedResponse) ProtoMessage() {} - -// Deprecated: Use MsgVoteWeightedResponse.ProtoReflect.Descriptor instead. -func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{7} -} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -type MsgDeposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgDeposit) Reset() { - *x = MsgDeposit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeposit) ProtoMessage() {} - -// Deprecated: Use MsgDeposit.ProtoReflect.Descriptor instead. -func (*MsgDeposit) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgDeposit) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgDeposit) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -func (x *MsgDeposit) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgDepositResponse defines the Msg/Deposit response type. -type MsgDepositResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgDepositResponse) Reset() { - *x = MsgDepositResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDepositResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDepositResponse) ProtoMessage() {} - -// Deprecated: Use MsgDepositResponse.ProtoReflect.Descriptor instead. -func (*MsgDepositResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{9} -} - -var File_cosmos_gov_v1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x08, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x48, 0x0a, - 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x3b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 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, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, - 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x07, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0f, 0xea, 0xde, 0x1f, - 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, - 0x74, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, - 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbf, 0x01, 0x0a, - 0x0a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, - 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0e, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x14, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xab, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, - 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, - 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, - 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xa8, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1_tx_proto_rawDescOnce sync.Once - file_cosmos_gov_v1_tx_proto_rawDescData = file_cosmos_gov_v1_tx_proto_rawDesc -) - -func file_cosmos_gov_v1_tx_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1_tx_proto_rawDescData) - }) - return file_cosmos_gov_v1_tx_proto_rawDescData -} - -var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_cosmos_gov_v1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1.MsgSubmitProposal - (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1.MsgSubmitProposalResponse - (*MsgExecLegacyContent)(nil), // 2: cosmos.gov.v1.MsgExecLegacyContent - (*MsgExecLegacyContentResponse)(nil), // 3: cosmos.gov.v1.MsgExecLegacyContentResponse - (*MsgVote)(nil), // 4: cosmos.gov.v1.MsgVote - (*MsgVoteResponse)(nil), // 5: cosmos.gov.v1.MsgVoteResponse - (*MsgVoteWeighted)(nil), // 6: cosmos.gov.v1.MsgVoteWeighted - (*MsgVoteWeightedResponse)(nil), // 7: cosmos.gov.v1.MsgVoteWeightedResponse - (*MsgDeposit)(nil), // 8: cosmos.gov.v1.MsgDeposit - (*MsgDepositResponse)(nil), // 9: cosmos.gov.v1.MsgDepositResponse - (*anypb.Any)(nil), // 10: google.protobuf.Any - (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin - (VoteOption)(0), // 12: cosmos.gov.v1.VoteOption - (*WeightedVoteOption)(nil), // 13: cosmos.gov.v1.WeightedVoteOption -} -var file_cosmos_gov_v1_tx_proto_depIdxs = []int32{ - 10, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any - 11, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 10, // 2: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any - 12, // 3: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption - 13, // 4: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 11, // 5: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 6: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal - 2, // 7: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent - 4, // 8: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote - 6, // 9: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted - 8, // 10: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit - 1, // 11: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse - 3, // 12: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse - 5, // 13: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse - 7, // 14: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse - 9, // 15: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse - 11, // [11:16] is the sub-list for method output_type - 6, // [6:11] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1_tx_proto_init() } -func file_cosmos_gov_v1_tx_proto_init() { - if File_cosmos_gov_v1_tx_proto != nil { - return - } - file_cosmos_gov_v1_gov_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecLegacyContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecLegacyContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteWeighted); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteWeightedResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeposit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDepositResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_gov_v1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1_tx_proto_depIdxs, - MessageInfos: file_cosmos_gov_v1_tx_proto_msgTypes, - }.Build() - File_cosmos_gov_v1_tx_proto = out.File - file_cosmos_gov_v1_tx_proto_rawDesc = nil - file_cosmos_gov_v1_tx_proto_goTypes = nil - file_cosmos_gov_v1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1/tx_grpc.pb.go b/api/cosmos/gov/v1/tx_grpc.pb.go deleted file mode 100644 index 9085bf5fa03d..000000000000 --- a/api/cosmos/gov/v1/tx_grpc.pb.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/gov/v1/tx.proto - -package govv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // SubmitProposal defines a method to create new proposal given a content. - SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) - // ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - // to execute a legacy content-based proposal. - ExecLegacyContent(ctx context.Context, in *MsgExecLegacyContent, opts ...grpc.CallOption) (*MsgExecLegacyContentResponse, error) - // Vote defines a method to add a vote on a specific proposal. - Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) - // Deposit defines a method to add deposit on a specific proposal. - Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) { - out := new(MsgSubmitProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/SubmitProposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ExecLegacyContent(ctx context.Context, in *MsgExecLegacyContent, opts ...grpc.CallOption) (*MsgExecLegacyContentResponse, error) { - out := new(MsgExecLegacyContentResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/ExecLegacyContent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { - out := new(MsgVoteResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/Vote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) { - out := new(MsgVoteWeightedResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/VoteWeighted", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { - out := new(MsgDepositResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/Deposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // SubmitProposal defines a method to create new proposal given a content. - SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) - // ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - // to execute a legacy content-based proposal. - ExecLegacyContent(context.Context, *MsgExecLegacyContent) (*MsgExecLegacyContentResponse, error) - // Vote defines a method to add a vote on a specific proposal. - Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) - // Deposit defines a method to add deposit on a specific proposal. - Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") -} -func (UnimplementedMsgServer) ExecLegacyContent(context.Context, *MsgExecLegacyContent) (*MsgExecLegacyContentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExecLegacyContent not implemented") -} -func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") -} -func (UnimplementedMsgServer) VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteWeighted not implemented") -} -func (UnimplementedMsgServer) Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Msg/SubmitProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitProposal(ctx, req.(*MsgSubmitProposal)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ExecLegacyContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgExecLegacyContent) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ExecLegacyContent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Msg/ExecLegacyContent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ExecLegacyContent(ctx, req.(*MsgExecLegacyContent)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVote) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Vote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Msg/Vote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_VoteWeighted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVoteWeighted) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).VoteWeighted(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Msg/VoteWeighted", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VoteWeighted(ctx, req.(*MsgVoteWeighted)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeposit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Deposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1.Msg/Deposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.gov.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitProposal", - Handler: _Msg_SubmitProposal_Handler, - }, - { - MethodName: "ExecLegacyContent", - Handler: _Msg_ExecLegacyContent_Handler, - }, - { - MethodName: "Vote", - Handler: _Msg_Vote_Handler, - }, - { - MethodName: "VoteWeighted", - Handler: _Msg_VoteWeighted_Handler, - }, - { - MethodName: "Deposit", - Handler: _Msg_Deposit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/gov/v1/tx.proto", -} diff --git a/api/cosmos/gov/v1beta1/genesis.pulsar.go b/api/cosmos/gov/v1beta1/genesis.pulsar.go deleted file mode 100644 index de1083e347f3..000000000000 --- a/api/cosmos/gov/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,1307 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*Deposit -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(Deposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(Deposit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*Vote -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_4_list)(nil) - -type _GenesisState_4_list struct { - list *[]*Proposal -} - -func (x *_GenesisState_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { - v := new(Proposal) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_4_list) NewElement() protoreflect.Value { - v := new(Proposal) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_starting_proposal_id protoreflect.FieldDescriptor - fd_GenesisState_deposits protoreflect.FieldDescriptor - fd_GenesisState_votes protoreflect.FieldDescriptor - fd_GenesisState_proposals protoreflect.FieldDescriptor - fd_GenesisState_deposit_params protoreflect.FieldDescriptor - fd_GenesisState_voting_params protoreflect.FieldDescriptor - fd_GenesisState_tally_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_gov_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_starting_proposal_id = md_GenesisState.Fields().ByName("starting_proposal_id") - fd_GenesisState_deposits = md_GenesisState.Fields().ByName("deposits") - fd_GenesisState_votes = md_GenesisState.Fields().ByName("votes") - fd_GenesisState_proposals = md_GenesisState.Fields().ByName("proposals") - fd_GenesisState_deposit_params = md_GenesisState.Fields().ByName("deposit_params") - fd_GenesisState_voting_params = md_GenesisState.Fields().ByName("voting_params") - fd_GenesisState_tally_params = md_GenesisState.Fields().ByName("tally_params") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.StartingProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.StartingProposalId) - if !f(fd_GenesisState_starting_proposal_id, value) { - return - } - } - if len(x.Deposits) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Deposits}) - if !f(fd_GenesisState_deposits, value) { - return - } - } - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Votes}) - if !f(fd_GenesisState_votes, value) { - return - } - } - if len(x.Proposals) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Proposals}) - if !f(fd_GenesisState_proposals, value) { - return - } - } - if x.DepositParams != nil { - value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - if !f(fd_GenesisState_deposit_params, value) { - return - } - } - if x.VotingParams != nil { - value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - if !f(fd_GenesisState_voting_params, value) { - return - } - } - if x.TallyParams != nil { - value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - if !f(fd_GenesisState_tally_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_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.GenesisState.starting_proposal_id": - return x.StartingProposalId != uint64(0) - case "cosmos.gov.v1beta1.GenesisState.deposits": - return len(x.Deposits) != 0 - case "cosmos.gov.v1beta1.GenesisState.votes": - return len(x.Votes) != 0 - case "cosmos.gov.v1beta1.GenesisState.proposals": - return len(x.Proposals) != 0 - case "cosmos.gov.v1beta1.GenesisState.deposit_params": - return x.DepositParams != nil - case "cosmos.gov.v1beta1.GenesisState.voting_params": - return x.VotingParams != nil - case "cosmos.gov.v1beta1.GenesisState.tally_params": - return x.TallyParams != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.GenesisState.starting_proposal_id": - x.StartingProposalId = uint64(0) - case "cosmos.gov.v1beta1.GenesisState.deposits": - x.Deposits = nil - case "cosmos.gov.v1beta1.GenesisState.votes": - x.Votes = nil - case "cosmos.gov.v1beta1.GenesisState.proposals": - x.Proposals = nil - case "cosmos.gov.v1beta1.GenesisState.deposit_params": - x.DepositParams = nil - case "cosmos.gov.v1beta1.GenesisState.voting_params": - x.VotingParams = nil - case "cosmos.gov.v1beta1.GenesisState.tally_params": - x.TallyParams = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.GenesisState.starting_proposal_id": - value := x.StartingProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.GenesisState.deposits": - if len(x.Deposits) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.Deposits} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.GenesisState.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.GenesisState.proposals": - if len(x.Proposals) == 0 { - return protoreflect.ValueOfList(&_GenesisState_4_list{}) - } - listValue := &_GenesisState_4_list{list: &x.Proposals} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.GenesisState.deposit_params": - value := x.DepositParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.voting_params": - value := x.VotingParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.tally_params": - value := x.TallyParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.GenesisState.starting_proposal_id": - x.StartingProposalId = value.Uint() - case "cosmos.gov.v1beta1.GenesisState.deposits": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Deposits = *clv.list - case "cosmos.gov.v1beta1.GenesisState.votes": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.Votes = *clv.list - case "cosmos.gov.v1beta1.GenesisState.proposals": - lv := value.List() - clv := lv.(*_GenesisState_4_list) - x.Proposals = *clv.list - case "cosmos.gov.v1beta1.GenesisState.deposit_params": - x.DepositParams = value.Message().Interface().(*DepositParams) - case "cosmos.gov.v1beta1.GenesisState.voting_params": - x.VotingParams = value.Message().Interface().(*VotingParams) - case "cosmos.gov.v1beta1.GenesisState.tally_params": - x.TallyParams = value.Message().Interface().(*TallyParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.GenesisState.deposits": - if x.Deposits == nil { - x.Deposits = []*Deposit{} - } - value := &_GenesisState_2_list{list: &x.Deposits} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.GenesisState.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_GenesisState_3_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.GenesisState.proposals": - if x.Proposals == nil { - x.Proposals = []*Proposal{} - } - value := &_GenesisState_4_list{list: &x.Proposals} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.GenesisState.deposit_params": - if x.DepositParams == nil { - x.DepositParams = new(DepositParams) - } - return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.voting_params": - if x.VotingParams == nil { - x.VotingParams = new(VotingParams) - } - return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.tally_params": - if x.TallyParams == nil { - x.TallyParams = new(TallyParams) - } - return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.starting_proposal_id": - panic(fmt.Errorf("field starting_proposal_id of message cosmos.gov.v1beta1.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.GenesisState.starting_proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.GenesisState.deposits": - list := []*Deposit{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "cosmos.gov.v1beta1.GenesisState.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "cosmos.gov.v1beta1.GenesisState.proposals": - list := []*Proposal{} - return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) - case "cosmos.gov.v1beta1.GenesisState.deposit_params": - m := new(DepositParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.voting_params": - m := new(VotingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.GenesisState.tally_params": - m := new(TallyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.StartingProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.StartingProposalId)) - } - if len(x.Deposits) > 0 { - for _, e := range x.Deposits { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Proposals) > 0 { - for _, e := range x.Proposals { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.DepositParams != nil { - l = options.Size(x.DepositParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingParams != nil { - l = options.Size(x.VotingParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TallyParams != nil { - l = options.Size(x.TallyParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.TallyParams != nil { - encoded, err := options.Marshal(x.TallyParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.VotingParams != nil { - encoded, err := options.Marshal(x.VotingParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.DepositParams != nil { - encoded, err := options.Marshal(x.DepositParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Proposals) > 0 { - for iNdEx := len(x.Proposals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Proposals[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Deposits) > 0 { - for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Deposits[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.StartingProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartingProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartingProposalId", wireType) - } - x.StartingProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartingProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Deposits = append(x.Deposits, &Deposit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Proposals = append(x.Proposals, &Proposal{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposals[len(x.Proposals)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", 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.DepositParams == nil { - x.DepositParams = &DepositParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingParams", 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.VotingParams == nil { - x.VotingParams = &VotingParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", 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.TallyParams == nil { - x.TallyParams = &TallyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the gov module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // starting_proposal_id is the ID of the starting proposal. - StartingProposalId uint64 `protobuf:"varint,1,opt,name=starting_proposal_id,json=startingProposalId,proto3" json:"starting_proposal_id,omitempty"` - // deposits defines all the deposits present at genesis. - Deposits []*Deposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits,omitempty"` - // votes defines all the votes present at genesis. - Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` - // proposals defines all the proposals present at genesis. - Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` - // params defines all the paramaters of related to deposit. - DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // params defines all the paramaters of related to voting. - VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // params defines all the paramaters of related to tally. - TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetStartingProposalId() uint64 { - if x != nil { - return x.StartingProposalId - } - return 0 -} - -func (x *GenesisState) GetDeposits() []*Deposit { - if x != nil { - return x.Deposits - } - return nil -} - -func (x *GenesisState) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -func (x *GenesisState) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -func (x *GenesisState) GetDepositParams() *DepositParams { - if x != nil { - return x.DepositParams - } - return nil -} - -func (x *GenesisState) GetVotingParams() *VotingParams { - if x != nil { - return x.VotingParams - } - return nil -} - -func (x *GenesisState) GetTallyParams() *TallyParams { - if x != nil { - return x.TallyParams - } - return nil -} - -var File_cosmos_gov_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x04, 0x0a, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x49, 0x0a, - 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x10, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x08, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, - 0x65, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, - 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x42, 0x11, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x09, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x09, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4b, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xd0, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x6f, - 0x76, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, - 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_gov_v1beta1_genesis_proto_rawDescData = file_cosmos_gov_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_gov_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_gov_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_gov_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_gov_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.gov.v1beta1.GenesisState - (*Deposit)(nil), // 1: cosmos.gov.v1beta1.Deposit - (*Vote)(nil), // 2: cosmos.gov.v1beta1.Vote - (*Proposal)(nil), // 3: cosmos.gov.v1beta1.Proposal - (*DepositParams)(nil), // 4: cosmos.gov.v1beta1.DepositParams - (*VotingParams)(nil), // 5: cosmos.gov.v1beta1.VotingParams - (*TallyParams)(nil), // 6: cosmos.gov.v1beta1.TallyParams -} -var file_cosmos_gov_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.gov.v1beta1.GenesisState.deposits:type_name -> cosmos.gov.v1beta1.Deposit - 2, // 1: cosmos.gov.v1beta1.GenesisState.votes:type_name -> cosmos.gov.v1beta1.Vote - 3, // 2: cosmos.gov.v1beta1.GenesisState.proposals:type_name -> cosmos.gov.v1beta1.Proposal - 4, // 3: cosmos.gov.v1beta1.GenesisState.deposit_params:type_name -> cosmos.gov.v1beta1.DepositParams - 5, // 4: cosmos.gov.v1beta1.GenesisState.voting_params:type_name -> cosmos.gov.v1beta1.VotingParams - 6, // 5: cosmos.gov.v1beta1.GenesisState.tally_params:type_name -> cosmos.gov.v1beta1.TallyParams - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1beta1_genesis_proto_init() } -func file_cosmos_gov_v1beta1_genesis_proto_init() { - if File_cosmos_gov_v1beta1_genesis_proto != nil { - return - } - file_cosmos_gov_v1beta1_gov_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_gov_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_gov_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_gov_v1beta1_genesis_proto = out.File - file_cosmos_gov_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_gov_v1beta1_genesis_proto_goTypes = nil - file_cosmos_gov_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1beta1/gov.pulsar.go b/api/cosmos/gov/v1beta1/gov.pulsar.go deleted file mode 100644 index 4bbb3bf88d0b..000000000000 --- a/api/cosmos/gov/v1beta1/gov.pulsar.go +++ /dev/null @@ -1,6542 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_WeightedVoteOption protoreflect.MessageDescriptor - fd_WeightedVoteOption_option protoreflect.FieldDescriptor - fd_WeightedVoteOption_weight protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_WeightedVoteOption = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("WeightedVoteOption") - fd_WeightedVoteOption_option = md_WeightedVoteOption.Fields().ByName("option") - fd_WeightedVoteOption_weight = md_WeightedVoteOption.Fields().ByName("weight") -} - -var _ protoreflect.Message = (*fastReflection_WeightedVoteOption)(nil) - -type fastReflection_WeightedVoteOption WeightedVoteOption - -func (x *WeightedVoteOption) ProtoReflect() protoreflect.Message { - return (*fastReflection_WeightedVoteOption)(x) -} - -func (x *WeightedVoteOption) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_WeightedVoteOption_messageType fastReflection_WeightedVoteOption_messageType -var _ protoreflect.MessageType = fastReflection_WeightedVoteOption_messageType{} - -type fastReflection_WeightedVoteOption_messageType struct{} - -func (x fastReflection_WeightedVoteOption_messageType) Zero() protoreflect.Message { - return (*fastReflection_WeightedVoteOption)(nil) -} -func (x fastReflection_WeightedVoteOption_messageType) New() protoreflect.Message { - return new(fastReflection_WeightedVoteOption) -} -func (x fastReflection_WeightedVoteOption_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_WeightedVoteOption -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_WeightedVoteOption) Descriptor() protoreflect.MessageDescriptor { - return md_WeightedVoteOption -} - -// 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_WeightedVoteOption) Type() protoreflect.MessageType { - return _fastReflection_WeightedVoteOption_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_WeightedVoteOption) New() protoreflect.Message { - return new(fastReflection_WeightedVoteOption) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_WeightedVoteOption) Interface() protoreflect.ProtoMessage { - return (*WeightedVoteOption)(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_WeightedVoteOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_WeightedVoteOption_option, value) { - return - } - } - if x.Weight != "" { - value := protoreflect.ValueOfString(x.Weight) - if !f(fd_WeightedVoteOption_weight, 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_WeightedVoteOption) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.WeightedVoteOption.option": - return x.Option != 0 - case "cosmos.gov.v1beta1.WeightedVoteOption.weight": - return x.Weight != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.WeightedVoteOption 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_WeightedVoteOption) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.WeightedVoteOption.option": - x.Option = 0 - case "cosmos.gov.v1beta1.WeightedVoteOption.weight": - x.Weight = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.WeightedVoteOption 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_WeightedVoteOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.WeightedVoteOption.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1beta1.WeightedVoteOption.weight": - value := x.Weight - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.WeightedVoteOption 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_WeightedVoteOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.WeightedVoteOption.option": - x.Option = (VoteOption)(value.Enum()) - case "cosmos.gov.v1beta1.WeightedVoteOption.weight": - x.Weight = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.WeightedVoteOption 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_WeightedVoteOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.WeightedVoteOption.option": - panic(fmt.Errorf("field option of message cosmos.gov.v1beta1.WeightedVoteOption is not mutable")) - case "cosmos.gov.v1beta1.WeightedVoteOption.weight": - panic(fmt.Errorf("field weight of message cosmos.gov.v1beta1.WeightedVoteOption is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.WeightedVoteOption 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_WeightedVoteOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.WeightedVoteOption.option": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1beta1.WeightedVoteOption.weight": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.WeightedVoteOption")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.WeightedVoteOption 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_WeightedVoteOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.WeightedVoteOption", 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_WeightedVoteOption) 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_WeightedVoteOption) 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_WeightedVoteOption) 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_WeightedVoteOption) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*WeightedVoteOption) - 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.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - l = len(x.Weight) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*WeightedVoteOption) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Weight) > 0 { - i -= len(x.Weight) - copy(dAtA[i:], x.Weight) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Weight))) - i-- - dAtA[i] = 0x12 - } - if x.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*WeightedVoteOption) - 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: WeightedVoteOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WeightedVoteOption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Weight", 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.Weight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TextProposal protoreflect.MessageDescriptor - fd_TextProposal_title protoreflect.FieldDescriptor - fd_TextProposal_description protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_TextProposal = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("TextProposal") - fd_TextProposal_title = md_TextProposal.Fields().ByName("title") - fd_TextProposal_description = md_TextProposal.Fields().ByName("description") -} - -var _ protoreflect.Message = (*fastReflection_TextProposal)(nil) - -type fastReflection_TextProposal TextProposal - -func (x *TextProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_TextProposal)(x) -} - -func (x *TextProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TextProposal_messageType fastReflection_TextProposal_messageType -var _ protoreflect.MessageType = fastReflection_TextProposal_messageType{} - -type fastReflection_TextProposal_messageType struct{} - -func (x fastReflection_TextProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_TextProposal)(nil) -} -func (x fastReflection_TextProposal_messageType) New() protoreflect.Message { - return new(fastReflection_TextProposal) -} -func (x fastReflection_TextProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TextProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TextProposal) Descriptor() protoreflect.MessageDescriptor { - return md_TextProposal -} - -// 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_TextProposal) Type() protoreflect.MessageType { - return _fastReflection_TextProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TextProposal) New() protoreflect.Message { - return new(fastReflection_TextProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TextProposal) Interface() protoreflect.ProtoMessage { - return (*TextProposal)(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_TextProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Title != "" { - value := protoreflect.ValueOfString(x.Title) - if !f(fd_TextProposal_title, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_TextProposal_description, 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_TextProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TextProposal.title": - return x.Title != "" - case "cosmos.gov.v1beta1.TextProposal.description": - return x.Description != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TextProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TextProposal 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_TextProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TextProposal.title": - x.Title = "" - case "cosmos.gov.v1beta1.TextProposal.description": - x.Description = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TextProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TextProposal 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_TextProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.TextProposal.title": - value := x.Title - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.TextProposal.description": - value := x.Description - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TextProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TextProposal 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_TextProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TextProposal.title": - x.Title = value.Interface().(string) - case "cosmos.gov.v1beta1.TextProposal.description": - x.Description = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TextProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TextProposal 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_TextProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TextProposal.title": - panic(fmt.Errorf("field title of message cosmos.gov.v1beta1.TextProposal is not mutable")) - case "cosmos.gov.v1beta1.TextProposal.description": - panic(fmt.Errorf("field description of message cosmos.gov.v1beta1.TextProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TextProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TextProposal 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_TextProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TextProposal.title": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.TextProposal.description": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TextProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TextProposal 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_TextProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.TextProposal", 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_TextProposal) 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_TextProposal) 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_TextProposal) 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_TextProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TextProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Title) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.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().(*TextProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x12 - } - if len(x.Title) > 0 { - i -= len(x.Title) - copy(dAtA[i:], x.Title) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) - i-- - dAtA[i] = 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().(*TextProposal) - 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: TextProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TextProposal: 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 Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Deposit_3_list)(nil) - -type _Deposit_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Deposit_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Deposit_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Deposit_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Deposit_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Deposit_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Deposit_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Deposit_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Deposit_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Deposit protoreflect.MessageDescriptor - fd_Deposit_proposal_id protoreflect.FieldDescriptor - fd_Deposit_depositor protoreflect.FieldDescriptor - fd_Deposit_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_Deposit = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("Deposit") - fd_Deposit_proposal_id = md_Deposit.Fields().ByName("proposal_id") - fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") - fd_Deposit_amount = md_Deposit.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_Deposit)(nil) - -type fastReflection_Deposit Deposit - -func (x *Deposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_Deposit)(x) -} - -func (x *Deposit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Deposit_messageType fastReflection_Deposit_messageType -var _ protoreflect.MessageType = fastReflection_Deposit_messageType{} - -type fastReflection_Deposit_messageType struct{} - -func (x fastReflection_Deposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_Deposit)(nil) -} -func (x fastReflection_Deposit_messageType) New() protoreflect.Message { - return new(fastReflection_Deposit) -} -func (x fastReflection_Deposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Deposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Deposit) Descriptor() protoreflect.MessageDescriptor { - return md_Deposit -} - -// 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_Deposit) Type() protoreflect.MessageType { - return _fastReflection_Deposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Deposit) New() protoreflect.Message { - return new(fastReflection_Deposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Deposit) Interface() protoreflect.ProtoMessage { - return (*Deposit)(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_Deposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_Deposit_proposal_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_Deposit_depositor, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Deposit_3_list{list: &x.Amount}) - if !f(fd_Deposit_amount, 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_Deposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Deposit.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.Deposit.depositor": - return x.Depositor != "" - case "cosmos.gov.v1beta1.Deposit.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Deposit 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_Deposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Deposit.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.Deposit.depositor": - x.Depositor = "" - case "cosmos.gov.v1beta1.Deposit.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Deposit 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_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.Deposit.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.Deposit.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.Deposit.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Deposit_3_list{}) - } - listValue := &_Deposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Deposit 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_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Deposit.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.Deposit.depositor": - x.Depositor = value.Interface().(string) - case "cosmos.gov.v1beta1.Deposit.amount": - lv := value.List() - clv := lv.(*_Deposit_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Deposit 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_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Deposit.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_Deposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.Deposit.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.Deposit is not mutable")) - case "cosmos.gov.v1beta1.Deposit.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1beta1.Deposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Deposit 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_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Deposit.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.Deposit.depositor": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.Deposit.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Deposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Deposit 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_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.Deposit", 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_Deposit) 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_Deposit) 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_Deposit) 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_Deposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Deposit) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Deposit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Deposit) - 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: Deposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Proposal_7_list)(nil) - -type _Proposal_7_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Proposal_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Proposal_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Proposal_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Proposal_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Proposal_7_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Proposal_7_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Proposal protoreflect.MessageDescriptor - fd_Proposal_proposal_id protoreflect.FieldDescriptor - fd_Proposal_content protoreflect.FieldDescriptor - fd_Proposal_status protoreflect.FieldDescriptor - fd_Proposal_final_tally_result protoreflect.FieldDescriptor - fd_Proposal_submit_time protoreflect.FieldDescriptor - fd_Proposal_deposit_end_time protoreflect.FieldDescriptor - fd_Proposal_total_deposit protoreflect.FieldDescriptor - fd_Proposal_voting_start_time protoreflect.FieldDescriptor - fd_Proposal_voting_end_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_Proposal = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("Proposal") - fd_Proposal_proposal_id = md_Proposal.Fields().ByName("proposal_id") - fd_Proposal_content = md_Proposal.Fields().ByName("content") - fd_Proposal_status = md_Proposal.Fields().ByName("status") - fd_Proposal_final_tally_result = md_Proposal.Fields().ByName("final_tally_result") - fd_Proposal_submit_time = md_Proposal.Fields().ByName("submit_time") - fd_Proposal_deposit_end_time = md_Proposal.Fields().ByName("deposit_end_time") - fd_Proposal_total_deposit = md_Proposal.Fields().ByName("total_deposit") - fd_Proposal_voting_start_time = md_Proposal.Fields().ByName("voting_start_time") - fd_Proposal_voting_end_time = md_Proposal.Fields().ByName("voting_end_time") -} - -var _ protoreflect.Message = (*fastReflection_Proposal)(nil) - -type fastReflection_Proposal Proposal - -func (x *Proposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_Proposal)(x) -} - -func (x *Proposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Proposal_messageType fastReflection_Proposal_messageType -var _ protoreflect.MessageType = fastReflection_Proposal_messageType{} - -type fastReflection_Proposal_messageType struct{} - -func (x fastReflection_Proposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_Proposal)(nil) -} -func (x fastReflection_Proposal_messageType) New() protoreflect.Message { - return new(fastReflection_Proposal) -} -func (x fastReflection_Proposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Proposal) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// 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_Proposal) Type() protoreflect.MessageType { - return _fastReflection_Proposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Proposal) New() protoreflect.Message { - return new(fastReflection_Proposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Proposal) Interface() protoreflect.ProtoMessage { - return (*Proposal)(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_Proposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_Proposal_proposal_id, value) { - return - } - } - if x.Content != nil { - value := protoreflect.ValueOfMessage(x.Content.ProtoReflect()) - if !f(fd_Proposal_content, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_Proposal_status, value) { - return - } - } - if x.FinalTallyResult != nil { - value := protoreflect.ValueOfMessage(x.FinalTallyResult.ProtoReflect()) - if !f(fd_Proposal_final_tally_result, value) { - return - } - } - if x.SubmitTime != nil { - value := protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - if !f(fd_Proposal_submit_time, value) { - return - } - } - if x.DepositEndTime != nil { - value := protoreflect.ValueOfMessage(x.DepositEndTime.ProtoReflect()) - if !f(fd_Proposal_deposit_end_time, value) { - return - } - } - if len(x.TotalDeposit) != 0 { - value := protoreflect.ValueOfList(&_Proposal_7_list{list: &x.TotalDeposit}) - if !f(fd_Proposal_total_deposit, value) { - return - } - } - if x.VotingStartTime != nil { - value := protoreflect.ValueOfMessage(x.VotingStartTime.ProtoReflect()) - if !f(fd_Proposal_voting_start_time, value) { - return - } - } - if x.VotingEndTime != nil { - value := protoreflect.ValueOfMessage(x.VotingEndTime.ProtoReflect()) - if !f(fd_Proposal_voting_end_time, 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_Proposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Proposal.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.Proposal.content": - return x.Content != nil - case "cosmos.gov.v1beta1.Proposal.status": - return x.Status != 0 - case "cosmos.gov.v1beta1.Proposal.final_tally_result": - return x.FinalTallyResult != nil - case "cosmos.gov.v1beta1.Proposal.submit_time": - return x.SubmitTime != nil - case "cosmos.gov.v1beta1.Proposal.deposit_end_time": - return x.DepositEndTime != nil - case "cosmos.gov.v1beta1.Proposal.total_deposit": - return len(x.TotalDeposit) != 0 - case "cosmos.gov.v1beta1.Proposal.voting_start_time": - return x.VotingStartTime != nil - case "cosmos.gov.v1beta1.Proposal.voting_end_time": - return x.VotingEndTime != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Proposal 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_Proposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Proposal.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.Proposal.content": - x.Content = nil - case "cosmos.gov.v1beta1.Proposal.status": - x.Status = 0 - case "cosmos.gov.v1beta1.Proposal.final_tally_result": - x.FinalTallyResult = nil - case "cosmos.gov.v1beta1.Proposal.submit_time": - x.SubmitTime = nil - case "cosmos.gov.v1beta1.Proposal.deposit_end_time": - x.DepositEndTime = nil - case "cosmos.gov.v1beta1.Proposal.total_deposit": - x.TotalDeposit = nil - case "cosmos.gov.v1beta1.Proposal.voting_start_time": - x.VotingStartTime = nil - case "cosmos.gov.v1beta1.Proposal.voting_end_time": - x.VotingEndTime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Proposal 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_Proposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.Proposal.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.Proposal.content": - value := x.Content - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1beta1.Proposal.final_tally_result": - value := x.FinalTallyResult - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.submit_time": - value := x.SubmitTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.deposit_end_time": - value := x.DepositEndTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.total_deposit": - if len(x.TotalDeposit) == 0 { - return protoreflect.ValueOfList(&_Proposal_7_list{}) - } - listValue := &_Proposal_7_list{list: &x.TotalDeposit} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.Proposal.voting_start_time": - value := x.VotingStartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.voting_end_time": - value := x.VotingEndTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Proposal 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_Proposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Proposal.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.Proposal.content": - x.Content = value.Message().Interface().(*anypb.Any) - case "cosmos.gov.v1beta1.Proposal.status": - x.Status = (ProposalStatus)(value.Enum()) - case "cosmos.gov.v1beta1.Proposal.final_tally_result": - x.FinalTallyResult = value.Message().Interface().(*TallyResult) - case "cosmos.gov.v1beta1.Proposal.submit_time": - x.SubmitTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1beta1.Proposal.deposit_end_time": - x.DepositEndTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1beta1.Proposal.total_deposit": - lv := value.List() - clv := lv.(*_Proposal_7_list) - x.TotalDeposit = *clv.list - case "cosmos.gov.v1beta1.Proposal.voting_start_time": - x.VotingStartTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.gov.v1beta1.Proposal.voting_end_time": - x.VotingEndTime = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Proposal 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_Proposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Proposal.content": - if x.Content == nil { - x.Content = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Content.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.final_tally_result": - if x.FinalTallyResult == nil { - x.FinalTallyResult = new(TallyResult) - } - return protoreflect.ValueOfMessage(x.FinalTallyResult.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.submit_time": - if x.SubmitTime == nil { - x.SubmitTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.deposit_end_time": - if x.DepositEndTime == nil { - x.DepositEndTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.DepositEndTime.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.total_deposit": - if x.TotalDeposit == nil { - x.TotalDeposit = []*v1beta1.Coin{} - } - value := &_Proposal_7_list{list: &x.TotalDeposit} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.Proposal.voting_start_time": - if x.VotingStartTime == nil { - x.VotingStartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.VotingStartTime.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.voting_end_time": - if x.VotingEndTime == nil { - x.VotingEndTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.VotingEndTime.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.Proposal is not mutable")) - case "cosmos.gov.v1beta1.Proposal.status": - panic(fmt.Errorf("field status of message cosmos.gov.v1beta1.Proposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Proposal 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_Proposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Proposal.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.Proposal.content": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.status": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1beta1.Proposal.final_tally_result": - m := new(TallyResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.submit_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.deposit_end_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.total_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Proposal_7_list{list: &list}) - case "cosmos.gov.v1beta1.Proposal.voting_start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.Proposal.voting_end_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Proposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Proposal 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_Proposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.Proposal", 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_Proposal) 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_Proposal) 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_Proposal) 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_Proposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Proposal) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Content != nil { - l = options.Size(x.Content) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if x.FinalTallyResult != nil { - l = options.Size(x.FinalTallyResult) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SubmitTime != nil { - l = options.Size(x.SubmitTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DepositEndTime != nil { - l = options.Size(x.DepositEndTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.TotalDeposit) > 0 { - for _, e := range x.TotalDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.VotingStartTime != nil { - l = options.Size(x.VotingStartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingEndTime != nil { - l = options.Size(x.VotingEndTime) - 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().(*Proposal) - 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.VotingEndTime != nil { - encoded, err := options.Marshal(x.VotingEndTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if x.VotingStartTime != nil { - encoded, err := options.Marshal(x.VotingStartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.TotalDeposit) > 0 { - for iNdEx := len(x.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TotalDeposit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.DepositEndTime != nil { - encoded, err := options.Marshal(x.DepositEndTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.SubmitTime != nil { - encoded, err := options.Marshal(x.SubmitTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.FinalTallyResult != nil { - encoded, err := options.Marshal(x.FinalTallyResult) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x18 - } - if x.Content != nil { - encoded, err := options.Marshal(x.Content) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Content", 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.Content == nil { - x.Content = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Content); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= ProposalStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", 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.FinalTallyResult == nil { - x.FinalTallyResult = &TallyResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FinalTallyResult); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", 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.SubmitTime == nil { - x.SubmitTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SubmitTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositEndTime", 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.DepositEndTime == nil { - x.DepositEndTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositEndTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TotalDeposit = append(x.TotalDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalDeposit[len(x.TotalDeposit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingStartTime", 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.VotingStartTime == nil { - x.VotingStartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingStartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingEndTime", 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.VotingEndTime == nil { - x.VotingEndTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingEndTime); 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_TallyResult protoreflect.MessageDescriptor - fd_TallyResult_yes protoreflect.FieldDescriptor - fd_TallyResult_abstain protoreflect.FieldDescriptor - fd_TallyResult_no protoreflect.FieldDescriptor - fd_TallyResult_no_with_veto protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_TallyResult = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("TallyResult") - fd_TallyResult_yes = md_TallyResult.Fields().ByName("yes") - fd_TallyResult_abstain = md_TallyResult.Fields().ByName("abstain") - fd_TallyResult_no = md_TallyResult.Fields().ByName("no") - fd_TallyResult_no_with_veto = md_TallyResult.Fields().ByName("no_with_veto") -} - -var _ protoreflect.Message = (*fastReflection_TallyResult)(nil) - -type fastReflection_TallyResult TallyResult - -func (x *TallyResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_TallyResult)(x) -} - -func (x *TallyResult) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TallyResult_messageType fastReflection_TallyResult_messageType -var _ protoreflect.MessageType = fastReflection_TallyResult_messageType{} - -type fastReflection_TallyResult_messageType struct{} - -func (x fastReflection_TallyResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_TallyResult)(nil) -} -func (x fastReflection_TallyResult_messageType) New() protoreflect.Message { - return new(fastReflection_TallyResult) -} -func (x fastReflection_TallyResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TallyResult -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TallyResult) Descriptor() protoreflect.MessageDescriptor { - return md_TallyResult -} - -// 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_TallyResult) Type() protoreflect.MessageType { - return _fastReflection_TallyResult_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TallyResult) New() protoreflect.Message { - return new(fastReflection_TallyResult) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TallyResult) Interface() protoreflect.ProtoMessage { - return (*TallyResult)(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_TallyResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Yes != "" { - value := protoreflect.ValueOfString(x.Yes) - if !f(fd_TallyResult_yes, value) { - return - } - } - if x.Abstain != "" { - value := protoreflect.ValueOfString(x.Abstain) - if !f(fd_TallyResult_abstain, value) { - return - } - } - if x.No != "" { - value := protoreflect.ValueOfString(x.No) - if !f(fd_TallyResult_no, value) { - return - } - } - if x.NoWithVeto != "" { - value := protoreflect.ValueOfString(x.NoWithVeto) - if !f(fd_TallyResult_no_with_veto, 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_TallyResult) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyResult.yes": - return x.Yes != "" - case "cosmos.gov.v1beta1.TallyResult.abstain": - return x.Abstain != "" - case "cosmos.gov.v1beta1.TallyResult.no": - return x.No != "" - case "cosmos.gov.v1beta1.TallyResult.no_with_veto": - return x.NoWithVeto != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyResult 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_TallyResult) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyResult.yes": - x.Yes = "" - case "cosmos.gov.v1beta1.TallyResult.abstain": - x.Abstain = "" - case "cosmos.gov.v1beta1.TallyResult.no": - x.No = "" - case "cosmos.gov.v1beta1.TallyResult.no_with_veto": - x.NoWithVeto = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyResult 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_TallyResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.TallyResult.yes": - value := x.Yes - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.TallyResult.abstain": - value := x.Abstain - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.TallyResult.no": - value := x.No - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.TallyResult.no_with_veto": - value := x.NoWithVeto - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyResult 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_TallyResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyResult.yes": - x.Yes = value.Interface().(string) - case "cosmos.gov.v1beta1.TallyResult.abstain": - x.Abstain = value.Interface().(string) - case "cosmos.gov.v1beta1.TallyResult.no": - x.No = value.Interface().(string) - case "cosmos.gov.v1beta1.TallyResult.no_with_veto": - x.NoWithVeto = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyResult 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_TallyResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyResult.yes": - panic(fmt.Errorf("field yes of message cosmos.gov.v1beta1.TallyResult is not mutable")) - case "cosmos.gov.v1beta1.TallyResult.abstain": - panic(fmt.Errorf("field abstain of message cosmos.gov.v1beta1.TallyResult is not mutable")) - case "cosmos.gov.v1beta1.TallyResult.no": - panic(fmt.Errorf("field no of message cosmos.gov.v1beta1.TallyResult is not mutable")) - case "cosmos.gov.v1beta1.TallyResult.no_with_veto": - panic(fmt.Errorf("field no_with_veto of message cosmos.gov.v1beta1.TallyResult is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyResult 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_TallyResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyResult.yes": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.TallyResult.abstain": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.TallyResult.no": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.TallyResult.no_with_veto": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyResult 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_TallyResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.TallyResult", 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_TallyResult) 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_TallyResult) 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_TallyResult) 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_TallyResult) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TallyResult) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Yes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Abstain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.No) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NoWithVeto) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TallyResult) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NoWithVeto) > 0 { - i -= len(x.NoWithVeto) - copy(dAtA[i:], x.NoWithVeto) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NoWithVeto))) - i-- - dAtA[i] = 0x22 - } - if len(x.No) > 0 { - i -= len(x.No) - copy(dAtA[i:], x.No) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.No))) - i-- - dAtA[i] = 0x1a - } - if len(x.Abstain) > 0 { - i -= len(x.Abstain) - copy(dAtA[i:], x.Abstain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Abstain))) - i-- - dAtA[i] = 0x12 - } - if len(x.Yes) > 0 { - i -= len(x.Yes) - copy(dAtA[i:], x.Yes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Yes))) - 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().(*TallyResult) - 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: TallyResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TallyResult: 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 Yes", 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.Yes = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Abstain", 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.Abstain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field No", 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.No = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoWithVeto", 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.NoWithVeto = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Vote_4_list)(nil) - -type _Vote_4_list struct { - list *[]*WeightedVoteOption -} - -func (x *_Vote_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Vote_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Vote_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - (*x.list)[i] = concreteValue -} - -func (x *_Vote_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Vote_4_list) AppendMutable() protoreflect.Value { - v := new(WeightedVoteOption) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Vote_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Vote_4_list) NewElement() protoreflect.Value { - v := new(WeightedVoteOption) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Vote_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Vote protoreflect.MessageDescriptor - fd_Vote_proposal_id protoreflect.FieldDescriptor - fd_Vote_voter protoreflect.FieldDescriptor - fd_Vote_option protoreflect.FieldDescriptor - fd_Vote_options protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_Vote = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("Vote") - fd_Vote_proposal_id = md_Vote.Fields().ByName("proposal_id") - fd_Vote_voter = md_Vote.Fields().ByName("voter") - fd_Vote_option = md_Vote.Fields().ByName("option") - fd_Vote_options = md_Vote.Fields().ByName("options") -} - -var _ protoreflect.Message = (*fastReflection_Vote)(nil) - -type fastReflection_Vote Vote - -func (x *Vote) ProtoReflect() protoreflect.Message { - return (*fastReflection_Vote)(x) -} - -func (x *Vote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_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_Vote_messageType fastReflection_Vote_messageType -var _ protoreflect.MessageType = fastReflection_Vote_messageType{} - -type fastReflection_Vote_messageType struct{} - -func (x fastReflection_Vote_messageType) Zero() protoreflect.Message { - return (*fastReflection_Vote)(nil) -} -func (x fastReflection_Vote_messageType) New() protoreflect.Message { - return new(fastReflection_Vote) -} -func (x fastReflection_Vote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Vote) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// 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_Vote) Type() protoreflect.MessageType { - return _fastReflection_Vote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Vote) New() protoreflect.Message { - return new(fastReflection_Vote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Vote) Interface() protoreflect.ProtoMessage { - return (*Vote)(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_Vote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_Vote_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_Vote_voter, value) { - return - } - } - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_Vote_option, value) { - return - } - } - if len(x.Options) != 0 { - value := protoreflect.ValueOfList(&_Vote_4_list{list: &x.Options}) - if !f(fd_Vote_options, 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_Vote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Vote.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.Vote.voter": - return x.Voter != "" - case "cosmos.gov.v1beta1.Vote.option": - return x.Option != 0 - case "cosmos.gov.v1beta1.Vote.options": - return len(x.Options) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Vote 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_Vote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Vote.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.Vote.voter": - x.Voter = "" - case "cosmos.gov.v1beta1.Vote.option": - x.Option = 0 - case "cosmos.gov.v1beta1.Vote.options": - x.Options = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Vote 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_Vote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.Vote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.Vote.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.Vote.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1beta1.Vote.options": - if len(x.Options) == 0 { - return protoreflect.ValueOfList(&_Vote_4_list{}) - } - listValue := &_Vote_4_list{list: &x.Options} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Vote 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_Vote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Vote.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.Vote.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1beta1.Vote.option": - x.Option = (VoteOption)(value.Enum()) - case "cosmos.gov.v1beta1.Vote.options": - lv := value.List() - clv := lv.(*_Vote_4_list) - x.Options = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Vote 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_Vote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Vote.options": - if x.Options == nil { - x.Options = []*WeightedVoteOption{} - } - value := &_Vote_4_list{list: &x.Options} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.Vote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.Vote is not mutable")) - case "cosmos.gov.v1beta1.Vote.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1beta1.Vote is not mutable")) - case "cosmos.gov.v1beta1.Vote.option": - panic(fmt.Errorf("field option of message cosmos.gov.v1beta1.Vote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Vote 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_Vote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.Vote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.Vote.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.Vote.option": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1beta1.Vote.options": - list := []*WeightedVoteOption{} - return protoreflect.ValueOfList(&_Vote_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.Vote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.Vote 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_Vote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.Vote", 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_Vote) 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_Vote) 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_Vote) 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_Vote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Vote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - if len(x.Options) > 0 { - for _, e := range x.Options { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Vote) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Options) > 0 { - for iNdEx := len(x.Options) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Options[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x18 - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Vote) - 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Options = append(x.Options, &WeightedVoteOption{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Options[len(x.Options)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DepositParams_1_list)(nil) - -type _DepositParams_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_DepositParams_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DepositParams_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_DepositParams_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_DepositParams_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_DepositParams_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DepositParams_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_DepositParams_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DepositParams_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DepositParams protoreflect.MessageDescriptor - fd_DepositParams_min_deposit protoreflect.FieldDescriptor - fd_DepositParams_max_deposit_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_DepositParams = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("DepositParams") - fd_DepositParams_min_deposit = md_DepositParams.Fields().ByName("min_deposit") - fd_DepositParams_max_deposit_period = md_DepositParams.Fields().ByName("max_deposit_period") -} - -var _ protoreflect.Message = (*fastReflection_DepositParams)(nil) - -type fastReflection_DepositParams DepositParams - -func (x *DepositParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_DepositParams)(x) -} - -func (x *DepositParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_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_DepositParams_messageType fastReflection_DepositParams_messageType -var _ protoreflect.MessageType = fastReflection_DepositParams_messageType{} - -type fastReflection_DepositParams_messageType struct{} - -func (x fastReflection_DepositParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_DepositParams)(nil) -} -func (x fastReflection_DepositParams_messageType) New() protoreflect.Message { - return new(fastReflection_DepositParams) -} -func (x fastReflection_DepositParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DepositParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DepositParams) Descriptor() protoreflect.MessageDescriptor { - return md_DepositParams -} - -// 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_DepositParams) Type() protoreflect.MessageType { - return _fastReflection_DepositParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DepositParams) New() protoreflect.Message { - return new(fastReflection_DepositParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DepositParams) Interface() protoreflect.ProtoMessage { - return (*DepositParams)(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_DepositParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.MinDeposit) != 0 { - value := protoreflect.ValueOfList(&_DepositParams_1_list{list: &x.MinDeposit}) - if !f(fd_DepositParams_min_deposit, value) { - return - } - } - if x.MaxDepositPeriod != nil { - value := protoreflect.ValueOfMessage(x.MaxDepositPeriod.ProtoReflect()) - if !f(fd_DepositParams_max_deposit_period, 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_DepositParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.DepositParams.min_deposit": - return len(x.MinDeposit) != 0 - case "cosmos.gov.v1beta1.DepositParams.max_deposit_period": - return x.MaxDepositPeriod != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.DepositParams 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_DepositParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.DepositParams.min_deposit": - x.MinDeposit = nil - case "cosmos.gov.v1beta1.DepositParams.max_deposit_period": - x.MaxDepositPeriod = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.DepositParams 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_DepositParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.DepositParams.min_deposit": - if len(x.MinDeposit) == 0 { - return protoreflect.ValueOfList(&_DepositParams_1_list{}) - } - listValue := &_DepositParams_1_list{list: &x.MinDeposit} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.DepositParams.max_deposit_period": - value := x.MaxDepositPeriod - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.DepositParams 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_DepositParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.DepositParams.min_deposit": - lv := value.List() - clv := lv.(*_DepositParams_1_list) - x.MinDeposit = *clv.list - case "cosmos.gov.v1beta1.DepositParams.max_deposit_period": - x.MaxDepositPeriod = value.Message().Interface().(*durationpb.Duration) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.DepositParams 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_DepositParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.DepositParams.min_deposit": - if x.MinDeposit == nil { - x.MinDeposit = []*v1beta1.Coin{} - } - value := &_DepositParams_1_list{list: &x.MinDeposit} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.DepositParams.max_deposit_period": - if x.MaxDepositPeriod == nil { - x.MaxDepositPeriod = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.MaxDepositPeriod.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.DepositParams 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_DepositParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.DepositParams.min_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_DepositParams_1_list{list: &list}) - case "cosmos.gov.v1beta1.DepositParams.max_deposit_period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.DepositParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.DepositParams 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_DepositParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.DepositParams", 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_DepositParams) 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_DepositParams) 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_DepositParams) 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_DepositParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DepositParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.MinDeposit) > 0 { - for _, e := range x.MinDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.MaxDepositPeriod != nil { - l = options.Size(x.MaxDepositPeriod) - 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().(*DepositParams) - 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.MaxDepositPeriod != nil { - encoded, err := options.Marshal(x.MaxDepositPeriod) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.MinDeposit) > 0 { - for iNdEx := len(x.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MinDeposit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DepositParams) - 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: DepositParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DepositParams: 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 MinDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinDeposit = append(x.MinDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinDeposit[len(x.MinDeposit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", 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.MaxDepositPeriod == nil { - x.MaxDepositPeriod = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxDepositPeriod); 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_VotingParams protoreflect.MessageDescriptor - fd_VotingParams_voting_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_VotingParams = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("VotingParams") - fd_VotingParams_voting_period = md_VotingParams.Fields().ByName("voting_period") -} - -var _ protoreflect.Message = (*fastReflection_VotingParams)(nil) - -type fastReflection_VotingParams VotingParams - -func (x *VotingParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_VotingParams)(x) -} - -func (x *VotingParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_VotingParams_messageType fastReflection_VotingParams_messageType -var _ protoreflect.MessageType = fastReflection_VotingParams_messageType{} - -type fastReflection_VotingParams_messageType struct{} - -func (x fastReflection_VotingParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_VotingParams)(nil) -} -func (x fastReflection_VotingParams_messageType) New() protoreflect.Message { - return new(fastReflection_VotingParams) -} -func (x fastReflection_VotingParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VotingParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VotingParams) Descriptor() protoreflect.MessageDescriptor { - return md_VotingParams -} - -// 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_VotingParams) Type() protoreflect.MessageType { - return _fastReflection_VotingParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VotingParams) New() protoreflect.Message { - return new(fastReflection_VotingParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VotingParams) Interface() protoreflect.ProtoMessage { - return (*VotingParams)(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_VotingParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.VotingPeriod != nil { - value := protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) - if !f(fd_VotingParams_voting_period, 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_VotingParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.VotingParams.voting_period": - return x.VotingPeriod != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.VotingParams 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_VotingParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.VotingParams.voting_period": - x.VotingPeriod = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.VotingParams 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_VotingParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.VotingParams.voting_period": - value := x.VotingPeriod - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.VotingParams 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_VotingParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.VotingParams.voting_period": - x.VotingPeriod = value.Message().Interface().(*durationpb.Duration) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.VotingParams 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_VotingParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.VotingParams.voting_period": - if x.VotingPeriod == nil { - x.VotingPeriod = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.VotingParams 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_VotingParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.VotingParams.voting_period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.VotingParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.VotingParams 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_VotingParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.VotingParams", 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_VotingParams) 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_VotingParams) 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_VotingParams) 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_VotingParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VotingParams) - 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.VotingPeriod != nil { - l = options.Size(x.VotingPeriod) - 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().(*VotingParams) - 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.VotingPeriod != nil { - encoded, err := options.Marshal(x.VotingPeriod) - 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().(*VotingParams) - 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: VotingParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VotingParams: 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 VotingPeriod", 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.VotingPeriod == nil { - x.VotingPeriod = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingPeriod); 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_TallyParams protoreflect.MessageDescriptor - fd_TallyParams_quorum protoreflect.FieldDescriptor - fd_TallyParams_threshold protoreflect.FieldDescriptor - fd_TallyParams_veto_threshold protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_gov_proto_init() - md_TallyParams = File_cosmos_gov_v1beta1_gov_proto.Messages().ByName("TallyParams") - fd_TallyParams_quorum = md_TallyParams.Fields().ByName("quorum") - fd_TallyParams_threshold = md_TallyParams.Fields().ByName("threshold") - fd_TallyParams_veto_threshold = md_TallyParams.Fields().ByName("veto_threshold") -} - -var _ protoreflect.Message = (*fastReflection_TallyParams)(nil) - -type fastReflection_TallyParams TallyParams - -func (x *TallyParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_TallyParams)(x) -} - -func (x *TallyParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TallyParams_messageType fastReflection_TallyParams_messageType -var _ protoreflect.MessageType = fastReflection_TallyParams_messageType{} - -type fastReflection_TallyParams_messageType struct{} - -func (x fastReflection_TallyParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_TallyParams)(nil) -} -func (x fastReflection_TallyParams_messageType) New() protoreflect.Message { - return new(fastReflection_TallyParams) -} -func (x fastReflection_TallyParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TallyParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TallyParams) Descriptor() protoreflect.MessageDescriptor { - return md_TallyParams -} - -// 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_TallyParams) Type() protoreflect.MessageType { - return _fastReflection_TallyParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TallyParams) New() protoreflect.Message { - return new(fastReflection_TallyParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TallyParams) Interface() protoreflect.ProtoMessage { - return (*TallyParams)(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_TallyParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Quorum) != 0 { - value := protoreflect.ValueOfBytes(x.Quorum) - if !f(fd_TallyParams_quorum, value) { - return - } - } - if len(x.Threshold) != 0 { - value := protoreflect.ValueOfBytes(x.Threshold) - if !f(fd_TallyParams_threshold, value) { - return - } - } - if len(x.VetoThreshold) != 0 { - value := protoreflect.ValueOfBytes(x.VetoThreshold) - if !f(fd_TallyParams_veto_threshold, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TallyParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyParams.quorum": - return len(x.Quorum) != 0 - case "cosmos.gov.v1beta1.TallyParams.threshold": - return len(x.Threshold) != 0 - case "cosmos.gov.v1beta1.TallyParams.veto_threshold": - return len(x.VetoThreshold) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyParams 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_TallyParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyParams.quorum": - x.Quorum = nil - case "cosmos.gov.v1beta1.TallyParams.threshold": - x.Threshold = nil - case "cosmos.gov.v1beta1.TallyParams.veto_threshold": - x.VetoThreshold = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyParams 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_TallyParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.TallyParams.quorum": - value := x.Quorum - return protoreflect.ValueOfBytes(value) - case "cosmos.gov.v1beta1.TallyParams.threshold": - value := x.Threshold - return protoreflect.ValueOfBytes(value) - case "cosmos.gov.v1beta1.TallyParams.veto_threshold": - value := x.VetoThreshold - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyParams 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_TallyParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyParams.quorum": - x.Quorum = value.Bytes() - case "cosmos.gov.v1beta1.TallyParams.threshold": - x.Threshold = value.Bytes() - case "cosmos.gov.v1beta1.TallyParams.veto_threshold": - x.VetoThreshold = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyParams 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_TallyParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyParams.quorum": - panic(fmt.Errorf("field quorum of message cosmos.gov.v1beta1.TallyParams is not mutable")) - case "cosmos.gov.v1beta1.TallyParams.threshold": - panic(fmt.Errorf("field threshold of message cosmos.gov.v1beta1.TallyParams is not mutable")) - case "cosmos.gov.v1beta1.TallyParams.veto_threshold": - panic(fmt.Errorf("field veto_threshold of message cosmos.gov.v1beta1.TallyParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyParams 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_TallyParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.TallyParams.quorum": - return protoreflect.ValueOfBytes(nil) - case "cosmos.gov.v1beta1.TallyParams.threshold": - return protoreflect.ValueOfBytes(nil) - case "cosmos.gov.v1beta1.TallyParams.veto_threshold": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.TallyParams")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.TallyParams 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_TallyParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.TallyParams", 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_TallyParams) 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_TallyParams) 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_TallyParams) 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_TallyParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TallyParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Quorum) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Threshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.VetoThreshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TallyParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.VetoThreshold) > 0 { - i -= len(x.VetoThreshold) - copy(dAtA[i:], x.VetoThreshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VetoThreshold))) - i-- - dAtA[i] = 0x1a - } - if len(x.Threshold) > 0 { - i -= len(x.Threshold) - copy(dAtA[i:], x.Threshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Threshold))) - i-- - dAtA[i] = 0x12 - } - if len(x.Quorum) > 0 { - i -= len(x.Quorum) - copy(dAtA[i:], x.Quorum) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quorum))) - 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().(*TallyParams) - 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: TallyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TallyParams: 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 Quorum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Quorum = append(x.Quorum[:0], dAtA[iNdEx:postIndex]...) - if x.Quorum == nil { - x.Quorum = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Threshold = append(x.Threshold[:0], dAtA[iNdEx:postIndex]...) - if x.Threshold == nil { - x.Threshold = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.VetoThreshold = append(x.VetoThreshold[:0], dAtA[iNdEx:postIndex]...) - if x.VetoThreshold == nil { - x.VetoThreshold = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1beta1/gov.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// VoteOption enumerates the valid vote options for a given governance proposal. -type VoteOption int32 - -const ( - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0 - // VOTE_OPTION_YES defines a yes vote option. - VoteOption_VOTE_OPTION_YES VoteOption = 1 - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2 - // VOTE_OPTION_NO defines a no vote option. - VoteOption_VOTE_OPTION_NO VoteOption = 3 - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VoteOption_VOTE_OPTION_NO_WITH_VETO VoteOption = 4 -) - -// Enum value maps for VoteOption. -var ( - VoteOption_name = map[int32]string{ - 0: "VOTE_OPTION_UNSPECIFIED", - 1: "VOTE_OPTION_YES", - 2: "VOTE_OPTION_ABSTAIN", - 3: "VOTE_OPTION_NO", - 4: "VOTE_OPTION_NO_WITH_VETO", - } - VoteOption_value = map[string]int32{ - "VOTE_OPTION_UNSPECIFIED": 0, - "VOTE_OPTION_YES": 1, - "VOTE_OPTION_ABSTAIN": 2, - "VOTE_OPTION_NO": 3, - "VOTE_OPTION_NO_WITH_VETO": 4, - } -) - -func (x VoteOption) Enum() *VoteOption { - p := new(VoteOption) - *p = x - return p -} - -func (x VoteOption) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VoteOption) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_gov_v1beta1_gov_proto_enumTypes[0].Descriptor() -} - -func (VoteOption) Type() protoreflect.EnumType { - return &file_cosmos_gov_v1beta1_gov_proto_enumTypes[0] -} - -func (x VoteOption) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VoteOption.Descriptor instead. -func (VoteOption) EnumDescriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{0} -} - -// ProposalStatus enumerates the valid statuses of a proposal. -type ProposalStatus int32 - -const ( - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - ProposalStatus_PROPOSAL_STATUS_DEPOSIT_PERIOD ProposalStatus = 1 - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD ProposalStatus = 2 - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - ProposalStatus_PROPOSAL_STATUS_PASSED ProposalStatus = 3 - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - ProposalStatus_PROPOSAL_STATUS_REJECTED ProposalStatus = 4 - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - ProposalStatus_PROPOSAL_STATUS_FAILED ProposalStatus = 5 -) - -// Enum value maps for ProposalStatus. -var ( - ProposalStatus_name = map[int32]string{ - 0: "PROPOSAL_STATUS_UNSPECIFIED", - 1: "PROPOSAL_STATUS_DEPOSIT_PERIOD", - 2: "PROPOSAL_STATUS_VOTING_PERIOD", - 3: "PROPOSAL_STATUS_PASSED", - 4: "PROPOSAL_STATUS_REJECTED", - 5: "PROPOSAL_STATUS_FAILED", - } - ProposalStatus_value = map[string]int32{ - "PROPOSAL_STATUS_UNSPECIFIED": 0, - "PROPOSAL_STATUS_DEPOSIT_PERIOD": 1, - "PROPOSAL_STATUS_VOTING_PERIOD": 2, - "PROPOSAL_STATUS_PASSED": 3, - "PROPOSAL_STATUS_REJECTED": 4, - "PROPOSAL_STATUS_FAILED": 5, - } -) - -func (x ProposalStatus) Enum() *ProposalStatus { - p := new(ProposalStatus) - *p = x - return p -} - -func (x ProposalStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalStatus) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_gov_v1beta1_gov_proto_enumTypes[1].Descriptor() -} - -func (ProposalStatus) Type() protoreflect.EnumType { - return &file_cosmos_gov_v1beta1_gov_proto_enumTypes[1] -} - -func (x ProposalStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalStatus.Descriptor instead. -func (ProposalStatus) EnumDescriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{1} -} - -// WeightedVoteOption defines a unit of vote for vote split. -// -// Since: cosmos-sdk 0.43 -type WeightedVoteOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` - Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *WeightedVoteOption) Reset() { - *x = WeightedVoteOption{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedVoteOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedVoteOption) ProtoMessage() {} - -// Deprecated: Use WeightedVoteOption.ProtoReflect.Descriptor instead. -func (*WeightedVoteOption) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{0} -} - -func (x *WeightedVoteOption) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -func (x *WeightedVoteOption) GetWeight() string { - if x != nil { - return x.Weight - } - return "" -} - -// TextProposal defines a standard text proposal whose changes need to be -// manually updated in case of approval. -type TextProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *TextProposal) Reset() { - *x = TextProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TextProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TextProposal) ProtoMessage() {} - -// Deprecated: Use TextProposal.ProtoReflect.Descriptor instead. -func (*TextProposal) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{1} -} - -func (x *TextProposal) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *TextProposal) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -type Deposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Deposit) Reset() { - *x = Deposit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Deposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Deposit) ProtoMessage() {} - -// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. -func (*Deposit) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{2} -} - -func (x *Deposit) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *Deposit) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -func (x *Deposit) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// Proposal defines the core field members of a governance proposal. -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Content *anypb.Any `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` - Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"status,omitempty"` - // final_tally_result is the final tally result of the proposal. When - // querying a proposal via gRPC, this field is not populated until the - // proposal's voting period has ended. - FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"` - SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` - DepositEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"` - TotalDeposit []*v1beta1.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"` - VotingStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3" json:"voting_start_time,omitempty"` - VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"` -} - -func (x *Proposal) Reset() { - *x = Proposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proposal) ProtoMessage() {} - -// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. -func (*Proposal) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{3} -} - -func (x *Proposal) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *Proposal) GetContent() *anypb.Any { - if x != nil { - return x.Content - } - return nil -} - -func (x *Proposal) GetStatus() ProposalStatus { - if x != nil { - return x.Status - } - return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED -} - -func (x *Proposal) GetFinalTallyResult() *TallyResult { - if x != nil { - return x.FinalTallyResult - } - return nil -} - -func (x *Proposal) GetSubmitTime() *timestamppb.Timestamp { - if x != nil { - return x.SubmitTime - } - return nil -} - -func (x *Proposal) GetDepositEndTime() *timestamppb.Timestamp { - if x != nil { - return x.DepositEndTime - } - return nil -} - -func (x *Proposal) GetTotalDeposit() []*v1beta1.Coin { - if x != nil { - return x.TotalDeposit - } - return nil -} - -func (x *Proposal) GetVotingStartTime() *timestamppb.Timestamp { - if x != nil { - return x.VotingStartTime - } - return nil -} - -func (x *Proposal) GetVotingEndTime() *timestamppb.Timestamp { - if x != nil { - return x.VotingEndTime - } - return nil -} - -// TallyResult defines a standard tally for a governance proposal. -type TallyResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Yes string `protobuf:"bytes,1,opt,name=yes,proto3" json:"yes,omitempty"` - Abstain string `protobuf:"bytes,2,opt,name=abstain,proto3" json:"abstain,omitempty"` - No string `protobuf:"bytes,3,opt,name=no,proto3" json:"no,omitempty"` - NoWithVeto string `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3" json:"no_with_veto,omitempty"` -} - -func (x *TallyResult) Reset() { - *x = TallyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TallyResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TallyResult) ProtoMessage() {} - -// Deprecated: Use TallyResult.ProtoReflect.Descriptor instead. -func (*TallyResult) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{4} -} - -func (x *TallyResult) GetYes() string { - if x != nil { - return x.Yes - } - return "" -} - -func (x *TallyResult) GetAbstain() string { - if x != nil { - return x.Abstain - } - return "" -} - -func (x *TallyResult) GetNo() string { - if x != nil { - return x.No - } - return "" -} - -func (x *TallyResult) GetNoWithVeto() string { - if x != nil { - return x.NoWithVeto - } - return "" -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -type Vote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - // Deprecated: Prefer to use `options` instead. This field is set in queries - // if and only if `len(options) == 1` and that option has weight 1. In all - // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - // - // Deprecated: Do not use. - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` - // Since: cosmos-sdk 0.43 - Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *Vote) Reset() { - *x = Vote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vote) ProtoMessage() {} - -// Deprecated: Use Vote.ProtoReflect.Descriptor instead. -func (*Vote) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{5} -} - -func (x *Vote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *Vote) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -// Deprecated: Do not use. -func (x *Vote) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -func (x *Vote) GetOptions() []*WeightedVoteOption { - if x != nil { - return x.Options - } - return nil -} - -// DepositParams defines the params for deposits on governance proposals. -type DepositParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum deposit for a proposal to enter voting period. - MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - MaxDepositPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3" json:"max_deposit_period,omitempty"` -} - -func (x *DepositParams) Reset() { - *x = DepositParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DepositParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DepositParams) ProtoMessage() {} - -// Deprecated: Use DepositParams.ProtoReflect.Descriptor instead. -func (*DepositParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{6} -} - -func (x *DepositParams) GetMinDeposit() []*v1beta1.Coin { - if x != nil { - return x.MinDeposit - } - return nil -} - -func (x *DepositParams) GetMaxDepositPeriod() *durationpb.Duration { - if x != nil { - return x.MaxDepositPeriod - } - return nil -} - -// VotingParams defines the params for voting on governance proposals. -type VotingParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Length of the voting period. - VotingPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"` -} - -func (x *VotingParams) Reset() { - *x = VotingParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VotingParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VotingParams) ProtoMessage() {} - -// Deprecated: Use VotingParams.ProtoReflect.Descriptor instead. -func (*VotingParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{7} -} - -func (x *VotingParams) GetVotingPeriod() *durationpb.Duration { - if x != nil { - return x.VotingPeriod - } - return nil -} - -// TallyParams defines the params for tallying votes on governance proposals. -type TallyParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - Quorum []byte `protobuf:"bytes,1,opt,name=quorum,proto3" json:"quorum,omitempty"` - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - Threshold []byte `protobuf:"bytes,2,opt,name=threshold,proto3" json:"threshold,omitempty"` - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - VetoThreshold []byte `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"` -} - -func (x *TallyParams) Reset() { - *x = TallyParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_gov_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TallyParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TallyParams) ProtoMessage() {} - -// Deprecated: Use TallyParams.ProtoReflect.Descriptor instead. -func (*TallyParams) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP(), []int{8} -} - -func (x *TallyParams) GetQuorum() []byte { - if x != nil { - return x.Quorum - } - return nil -} - -func (x *TallyParams) GetThreshold() []byte { - if x != nil { - return x.Threshold - } - return nil -} - -func (x *TallyParams) GetVetoThreshold() []byte { - if x != nil { - return x.VetoThreshold - } - return nil -} - -var File_cosmos_gov_v1beta1_gov_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1beta1_gov_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa2, 0x01, 0x0a, 0x12, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, - 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x22, 0x57, 0x0a, 0x0c, 0x54, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0f, 0xe8, 0xa0, - 0x1f, 0x01, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xd1, 0x01, - 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x22, 0xa8, 0x05, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x3b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 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, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x45, 0x0a, - 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, - 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x45, 0x6e, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x70, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x11, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, - 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, - 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x45, - 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xe9, 0x02, 0x0a, - 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x03, - 0x79, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x07, - 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x62, 0x73, - 0x74, 0x61, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x02, - 0x6e, 0x6f, 0x12, 0x5e, 0x0a, 0x0c, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, - 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0a, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, - 0x74, 0x6f, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xed, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, - 0x65, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, 0xea, 0xde, 0x1f, 0x02, 0x69, 0x64, 0x52, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x08, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x8a, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x6d, - 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x49, 0xc8, 0xde, 0x1f, - 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x71, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x28, 0xc8, 0xde, 0x1f, 0x00, 0xea, - 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, - 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x73, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x63, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, - 0x17, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, - 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0xc1, 0x02, 0x0a, 0x0b, 0x54, - 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5a, 0x0a, 0x06, 0x71, 0x75, - 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x42, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x10, 0x71, 0x75, - 0x6f, 0x72, 0x75, 0x6d, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, - 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x63, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x45, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x13, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x76, - 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0xea, 0xde, 0x1f, 0x18, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, - 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0xe6, - 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, - 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, 0x0b, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0f, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, - 0x1a, 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x59, 0x65, 0x73, 0x12, - 0x2a, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, - 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x1a, 0x11, 0x8a, 0x9d, 0x20, 0x0d, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0e, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x1a, - 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x12, 0x32, 0x0a, - 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, - 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x1a, 0x14, 0x8a, 0x9d, 0x20, - 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, - 0x6f, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0xcc, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x1b, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0d, 0x8a, 0x9d, 0x20, - 0x09, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4e, 0x69, 0x6c, 0x12, 0x3b, 0x0a, 0x1e, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, - 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x1a, 0x17, - 0x8a, 0x9d, 0x20, 0x13, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, - 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x1a, 0x16, 0x8a, 0x9d, 0x20, 0x12, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x12, 0x2c, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x10, - 0x8a, 0x9d, 0x20, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x73, 0x73, 0x65, 0x64, - 0x12, 0x30, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x1a, 0x12, - 0x8a, 0x9d, 0x20, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x1a, 0x10, - 0x8a, 0x9d, 0x20, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xd8, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x47, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0xd8, 0xe1, 0x1e, 0x00, 0x80, 0xe2, 0x1e, - 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1beta1_gov_proto_rawDescOnce sync.Once - file_cosmos_gov_v1beta1_gov_proto_rawDescData = file_cosmos_gov_v1beta1_gov_proto_rawDesc -) - -func file_cosmos_gov_v1beta1_gov_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1beta1_gov_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1beta1_gov_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1beta1_gov_proto_rawDescData) - }) - return file_cosmos_gov_v1beta1_gov_proto_rawDescData -} - -var file_cosmos_gov_v1beta1_gov_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cosmos_gov_v1beta1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_cosmos_gov_v1beta1_gov_proto_goTypes = []interface{}{ - (VoteOption)(0), // 0: cosmos.gov.v1beta1.VoteOption - (ProposalStatus)(0), // 1: cosmos.gov.v1beta1.ProposalStatus - (*WeightedVoteOption)(nil), // 2: cosmos.gov.v1beta1.WeightedVoteOption - (*TextProposal)(nil), // 3: cosmos.gov.v1beta1.TextProposal - (*Deposit)(nil), // 4: cosmos.gov.v1beta1.Deposit - (*Proposal)(nil), // 5: cosmos.gov.v1beta1.Proposal - (*TallyResult)(nil), // 6: cosmos.gov.v1beta1.TallyResult - (*Vote)(nil), // 7: cosmos.gov.v1beta1.Vote - (*DepositParams)(nil), // 8: cosmos.gov.v1beta1.DepositParams - (*VotingParams)(nil), // 9: cosmos.gov.v1beta1.VotingParams - (*TallyParams)(nil), // 10: cosmos.gov.v1beta1.TallyParams - (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 12: google.protobuf.Any - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 14: google.protobuf.Duration -} -var file_cosmos_gov_v1beta1_gov_proto_depIdxs = []int32{ - 0, // 0: cosmos.gov.v1beta1.WeightedVoteOption.option:type_name -> cosmos.gov.v1beta1.VoteOption - 11, // 1: cosmos.gov.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 12, // 2: cosmos.gov.v1beta1.Proposal.content:type_name -> google.protobuf.Any - 1, // 3: cosmos.gov.v1beta1.Proposal.status:type_name -> cosmos.gov.v1beta1.ProposalStatus - 6, // 4: cosmos.gov.v1beta1.Proposal.final_tally_result:type_name -> cosmos.gov.v1beta1.TallyResult - 13, // 5: cosmos.gov.v1beta1.Proposal.submit_time:type_name -> google.protobuf.Timestamp - 13, // 6: cosmos.gov.v1beta1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp - 11, // 7: cosmos.gov.v1beta1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 13, // 8: cosmos.gov.v1beta1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp - 13, // 9: cosmos.gov.v1beta1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp - 0, // 10: cosmos.gov.v1beta1.Vote.option:type_name -> cosmos.gov.v1beta1.VoteOption - 2, // 11: cosmos.gov.v1beta1.Vote.options:type_name -> cosmos.gov.v1beta1.WeightedVoteOption - 11, // 12: cosmos.gov.v1beta1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 14, // 13: cosmos.gov.v1beta1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration - 14, // 14: cosmos.gov.v1beta1.VotingParams.voting_period:type_name -> google.protobuf.Duration - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1beta1_gov_proto_init() } -func file_cosmos_gov_v1beta1_gov_proto_init() { - if File_cosmos_gov_v1beta1_gov_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1beta1_gov_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedVoteOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TextProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Deposit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VotingParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_gov_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1beta1_gov_proto_rawDesc, - NumEnums: 2, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_gov_v1beta1_gov_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1beta1_gov_proto_depIdxs, - EnumInfos: file_cosmos_gov_v1beta1_gov_proto_enumTypes, - MessageInfos: file_cosmos_gov_v1beta1_gov_proto_msgTypes, - }.Build() - File_cosmos_gov_v1beta1_gov_proto = out.File - file_cosmos_gov_v1beta1_gov_proto_rawDesc = nil - file_cosmos_gov_v1beta1_gov_proto_goTypes = nil - file_cosmos_gov_v1beta1_gov_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1beta1/query.pulsar.go b/api/cosmos/gov/v1beta1/query.pulsar.go deleted file mode 100644 index 87ef0ba3c9bf..000000000000 --- a/api/cosmos/gov/v1beta1/query.pulsar.go +++ /dev/null @@ -1,9059 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryProposalRequest protoreflect.MessageDescriptor - fd_QueryProposalRequest_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryProposalRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryProposalRequest") - fd_QueryProposalRequest_proposal_id = md_QueryProposalRequest.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalRequest)(nil) - -type fastReflection_QueryProposalRequest QueryProposalRequest - -func (x *QueryProposalRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalRequest)(x) -} - -func (x *QueryProposalRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalRequest_messageType fastReflection_QueryProposalRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalRequest_messageType{} - -type fastReflection_QueryProposalRequest_messageType struct{} - -func (x fastReflection_QueryProposalRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalRequest)(nil) -} -func (x fastReflection_QueryProposalRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalRequest) -} -func (x fastReflection_QueryProposalRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalRequest -} - -// 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_QueryProposalRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalRequest) New() protoreflect.Message { - return new(fastReflection_QueryProposalRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalRequest) Interface() protoreflect.ProtoMessage { - return (*QueryProposalRequest)(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_QueryProposalRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryProposalRequest_proposal_id, 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_QueryProposalRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalRequest.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalRequest 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_QueryProposalRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalRequest.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalRequest 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_QueryProposalRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryProposalRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalRequest 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_QueryProposalRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalRequest.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalRequest 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_QueryProposalRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.QueryProposalRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalRequest 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_QueryProposalRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalRequest 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_QueryProposalRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryProposalRequest", 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_QueryProposalRequest) 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_QueryProposalRequest) 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_QueryProposalRequest) 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_QueryProposalRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*QueryProposalRequest) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalRequest) - 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: QueryProposalRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryProposalResponse protoreflect.MessageDescriptor - fd_QueryProposalResponse_proposal protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryProposalResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryProposalResponse") - fd_QueryProposalResponse_proposal = md_QueryProposalResponse.Fields().ByName("proposal") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalResponse)(nil) - -type fastReflection_QueryProposalResponse QueryProposalResponse - -func (x *QueryProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalResponse)(x) -} - -func (x *QueryProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalResponse_messageType fastReflection_QueryProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalResponse_messageType{} - -type fastReflection_QueryProposalResponse_messageType struct{} - -func (x fastReflection_QueryProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalResponse)(nil) -} -func (x fastReflection_QueryProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalResponse) -} -func (x fastReflection_QueryProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalResponse -} - -// 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_QueryProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalResponse) New() protoreflect.Message { - return new(fastReflection_QueryProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalResponse) Interface() protoreflect.ProtoMessage { - return (*QueryProposalResponse)(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_QueryProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Proposal != nil { - value := protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - if !f(fd_QueryProposalResponse_proposal, 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_QueryProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalResponse.proposal": - return x.Proposal != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalResponse 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_QueryProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalResponse.proposal": - x.Proposal = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalResponse 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_QueryProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryProposalResponse.proposal": - value := x.Proposal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalResponse 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_QueryProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalResponse.proposal": - x.Proposal = value.Message().Interface().(*Proposal) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalResponse 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_QueryProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalResponse.proposal": - if x.Proposal == nil { - x.Proposal = new(Proposal) - } - return protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalResponse 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_QueryProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalResponse.proposal": - m := new(Proposal) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalResponse 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_QueryProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryProposalResponse", 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalResponse) - 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.Proposal != nil { - l = options.Size(x.Proposal) - 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().(*QueryProposalResponse) - 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.Proposal != nil { - encoded, err := options.Marshal(x.Proposal) - 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().(*QueryProposalResponse) - 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: QueryProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalResponse: 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 Proposal", 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.Proposal == nil { - x.Proposal = &Proposal{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposal); 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_QueryProposalsRequest protoreflect.MessageDescriptor - fd_QueryProposalsRequest_proposal_status protoreflect.FieldDescriptor - fd_QueryProposalsRequest_voter protoreflect.FieldDescriptor - fd_QueryProposalsRequest_depositor protoreflect.FieldDescriptor - fd_QueryProposalsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryProposalsRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryProposalsRequest") - fd_QueryProposalsRequest_proposal_status = md_QueryProposalsRequest.Fields().ByName("proposal_status") - fd_QueryProposalsRequest_voter = md_QueryProposalsRequest.Fields().ByName("voter") - fd_QueryProposalsRequest_depositor = md_QueryProposalsRequest.Fields().ByName("depositor") - fd_QueryProposalsRequest_pagination = md_QueryProposalsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalsRequest)(nil) - -type fastReflection_QueryProposalsRequest QueryProposalsRequest - -func (x *QueryProposalsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalsRequest)(x) -} - -func (x *QueryProposalsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalsRequest_messageType fastReflection_QueryProposalsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalsRequest_messageType{} - -type fastReflection_QueryProposalsRequest_messageType struct{} - -func (x fastReflection_QueryProposalsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalsRequest)(nil) -} -func (x fastReflection_QueryProposalsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalsRequest) -} -func (x fastReflection_QueryProposalsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsRequest -} - -// 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_QueryProposalsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalsRequest) New() protoreflect.Message { - return new(fastReflection_QueryProposalsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryProposalsRequest)(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_QueryProposalsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalStatus != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ProposalStatus)) - if !f(fd_QueryProposalsRequest_proposal_status, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_QueryProposalsRequest_voter, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_QueryProposalsRequest_depositor, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryProposalsRequest_pagination, 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_QueryProposalsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status": - return x.ProposalStatus != 0 - case "cosmos.gov.v1beta1.QueryProposalsRequest.voter": - return x.Voter != "" - case "cosmos.gov.v1beta1.QueryProposalsRequest.depositor": - return x.Depositor != "" - case "cosmos.gov.v1beta1.QueryProposalsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsRequest 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_QueryProposalsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status": - x.ProposalStatus = 0 - case "cosmos.gov.v1beta1.QueryProposalsRequest.voter": - x.Voter = "" - case "cosmos.gov.v1beta1.QueryProposalsRequest.depositor": - x.Depositor = "" - case "cosmos.gov.v1beta1.QueryProposalsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsRequest 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_QueryProposalsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status": - value := x.ProposalStatus - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.gov.v1beta1.QueryProposalsRequest.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.QueryProposalsRequest.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.QueryProposalsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsRequest 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_QueryProposalsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status": - x.ProposalStatus = (ProposalStatus)(value.Enum()) - case "cosmos.gov.v1beta1.QueryProposalsRequest.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1beta1.QueryProposalsRequest.depositor": - x.Depositor = value.Interface().(string) - case "cosmos.gov.v1beta1.QueryProposalsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsRequest 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_QueryProposalsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status": - panic(fmt.Errorf("field proposal_status of message cosmos.gov.v1beta1.QueryProposalsRequest is not mutable")) - case "cosmos.gov.v1beta1.QueryProposalsRequest.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1beta1.QueryProposalsRequest is not mutable")) - case "cosmos.gov.v1beta1.QueryProposalsRequest.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1beta1.QueryProposalsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsRequest 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_QueryProposalsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status": - return protoreflect.ValueOfEnum(0) - case "cosmos.gov.v1beta1.QueryProposalsRequest.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.QueryProposalsRequest.depositor": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.QueryProposalsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsRequest 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_QueryProposalsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryProposalsRequest", 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_QueryProposalsRequest) 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_QueryProposalsRequest) 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_QueryProposalsRequest) 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_QueryProposalsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalsRequest) - 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.ProposalStatus != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalStatus)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryProposalsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x1a - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalStatus != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalStatus)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalsRequest) - 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: QueryProposalsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalStatus", wireType) - } - x.ProposalStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalStatus |= ProposalStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryProposalsResponse_1_list)(nil) - -type _QueryProposalsResponse_1_list struct { - list *[]*Proposal -} - -func (x *_QueryProposalsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryProposalsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryProposalsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - (*x.list)[i] = concreteValue -} - -func (x *_QueryProposalsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryProposalsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Proposal) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryProposalsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryProposalsResponse_1_list) NewElement() protoreflect.Value { - v := new(Proposal) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryProposalsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryProposalsResponse protoreflect.MessageDescriptor - fd_QueryProposalsResponse_proposals protoreflect.FieldDescriptor - fd_QueryProposalsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryProposalsResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryProposalsResponse") - fd_QueryProposalsResponse_proposals = md_QueryProposalsResponse.Fields().ByName("proposals") - fd_QueryProposalsResponse_pagination = md_QueryProposalsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalsResponse)(nil) - -type fastReflection_QueryProposalsResponse QueryProposalsResponse - -func (x *QueryProposalsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalsResponse)(x) -} - -func (x *QueryProposalsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalsResponse_messageType fastReflection_QueryProposalsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalsResponse_messageType{} - -type fastReflection_QueryProposalsResponse_messageType struct{} - -func (x fastReflection_QueryProposalsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalsResponse)(nil) -} -func (x fastReflection_QueryProposalsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalsResponse) -} -func (x fastReflection_QueryProposalsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsResponse -} - -// 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_QueryProposalsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalsResponse) New() protoreflect.Message { - return new(fastReflection_QueryProposalsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryProposalsResponse)(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_QueryProposalsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Proposals) != 0 { - value := protoreflect.ValueOfList(&_QueryProposalsResponse_1_list{list: &x.Proposals}) - if !f(fd_QueryProposalsResponse_proposals, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryProposalsResponse_pagination, 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_QueryProposalsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsResponse.proposals": - return len(x.Proposals) != 0 - case "cosmos.gov.v1beta1.QueryProposalsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsResponse 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_QueryProposalsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsResponse.proposals": - x.Proposals = nil - case "cosmos.gov.v1beta1.QueryProposalsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsResponse 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_QueryProposalsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsResponse.proposals": - if len(x.Proposals) == 0 { - return protoreflect.ValueOfList(&_QueryProposalsResponse_1_list{}) - } - listValue := &_QueryProposalsResponse_1_list{list: &x.Proposals} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.QueryProposalsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsResponse 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_QueryProposalsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsResponse.proposals": - lv := value.List() - clv := lv.(*_QueryProposalsResponse_1_list) - x.Proposals = *clv.list - case "cosmos.gov.v1beta1.QueryProposalsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsResponse 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_QueryProposalsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsResponse.proposals": - if x.Proposals == nil { - x.Proposals = []*Proposal{} - } - value := &_QueryProposalsResponse_1_list{list: &x.Proposals} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.QueryProposalsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsResponse 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_QueryProposalsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryProposalsResponse.proposals": - list := []*Proposal{} - return protoreflect.ValueOfList(&_QueryProposalsResponse_1_list{list: &list}) - case "cosmos.gov.v1beta1.QueryProposalsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryProposalsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryProposalsResponse 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_QueryProposalsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryProposalsResponse", 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_QueryProposalsResponse) 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_QueryProposalsResponse) 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_QueryProposalsResponse) 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_QueryProposalsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Proposals) > 0 { - for _, e := range x.Proposals { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryProposalsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Proposals) > 0 { - for iNdEx := len(x.Proposals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Proposals[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalsResponse) - 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: QueryProposalsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalsResponse: 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 Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Proposals = append(x.Proposals, &Proposal{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposals[len(x.Proposals)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryVoteRequest protoreflect.MessageDescriptor - fd_QueryVoteRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryVoteRequest_voter protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryVoteRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryVoteRequest") - fd_QueryVoteRequest_proposal_id = md_QueryVoteRequest.Fields().ByName("proposal_id") - fd_QueryVoteRequest_voter = md_QueryVoteRequest.Fields().ByName("voter") -} - -var _ protoreflect.Message = (*fastReflection_QueryVoteRequest)(nil) - -type fastReflection_QueryVoteRequest QueryVoteRequest - -func (x *QueryVoteRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVoteRequest)(x) -} - -func (x *QueryVoteRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVoteRequest_messageType fastReflection_QueryVoteRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVoteRequest_messageType{} - -type fastReflection_QueryVoteRequest_messageType struct{} - -func (x fastReflection_QueryVoteRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVoteRequest)(nil) -} -func (x fastReflection_QueryVoteRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVoteRequest) -} -func (x fastReflection_QueryVoteRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVoteRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteRequest -} - -// 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_QueryVoteRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVoteRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVoteRequest) New() protoreflect.Message { - return new(fastReflection_QueryVoteRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVoteRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVoteRequest)(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_QueryVoteRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryVoteRequest_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_QueryVoteRequest_voter, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryVoteRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.QueryVoteRequest.voter": - return x.Voter != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteRequest 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_QueryVoteRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.QueryVoteRequest.voter": - x.Voter = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteRequest 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_QueryVoteRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryVoteRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.QueryVoteRequest.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteRequest 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_QueryVoteRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.QueryVoteRequest.voter": - x.Voter = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteRequest 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_QueryVoteRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.QueryVoteRequest is not mutable")) - case "cosmos.gov.v1beta1.QueryVoteRequest.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1beta1.QueryVoteRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteRequest 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_QueryVoteRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.QueryVoteRequest.voter": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteRequest 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_QueryVoteRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryVoteRequest", 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_QueryVoteRequest) 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_QueryVoteRequest) 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_QueryVoteRequest) 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_QueryVoteRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVoteRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryVoteRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVoteRequest) - 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: QueryVoteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryVoteResponse protoreflect.MessageDescriptor - fd_QueryVoteResponse_vote protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryVoteResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryVoteResponse") - fd_QueryVoteResponse_vote = md_QueryVoteResponse.Fields().ByName("vote") -} - -var _ protoreflect.Message = (*fastReflection_QueryVoteResponse)(nil) - -type fastReflection_QueryVoteResponse QueryVoteResponse - -func (x *QueryVoteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVoteResponse)(x) -} - -func (x *QueryVoteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_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_QueryVoteResponse_messageType fastReflection_QueryVoteResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVoteResponse_messageType{} - -type fastReflection_QueryVoteResponse_messageType struct{} - -func (x fastReflection_QueryVoteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVoteResponse)(nil) -} -func (x fastReflection_QueryVoteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVoteResponse) -} -func (x fastReflection_QueryVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVoteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteResponse -} - -// 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_QueryVoteResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVoteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVoteResponse) New() protoreflect.Message { - return new(fastReflection_QueryVoteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVoteResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVoteResponse)(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_QueryVoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Vote != nil { - value := protoreflect.ValueOfMessage(x.Vote.ProtoReflect()) - if !f(fd_QueryVoteResponse_vote, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteResponse.vote": - return x.Vote != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteResponse 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_QueryVoteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteResponse.vote": - x.Vote = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteResponse 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_QueryVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryVoteResponse.vote": - value := x.Vote - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteResponse 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_QueryVoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteResponse.vote": - x.Vote = value.Message().Interface().(*Vote) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteResponse 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_QueryVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteResponse.vote": - if x.Vote == nil { - x.Vote = new(Vote) - } - return protoreflect.ValueOfMessage(x.Vote.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteResponse 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_QueryVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVoteResponse.vote": - m := new(Vote) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVoteResponse 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_QueryVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryVoteResponse", 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_QueryVoteResponse) 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_QueryVoteResponse) 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_QueryVoteResponse) 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_QueryVoteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVoteResponse) - 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.Vote != nil { - l = options.Size(x.Vote) - 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().(*QueryVoteResponse) - 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.Vote != nil { - encoded, err := options.Marshal(x.Vote) - 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().(*QueryVoteResponse) - 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: QueryVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteResponse: 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 Vote", 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.Vote == nil { - x.Vote = &Vote{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Vote); 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_QueryVotesRequest protoreflect.MessageDescriptor - fd_QueryVotesRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryVotesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryVotesRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryVotesRequest") - fd_QueryVotesRequest_proposal_id = md_QueryVotesRequest.Fields().ByName("proposal_id") - fd_QueryVotesRequest_pagination = md_QueryVotesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesRequest)(nil) - -type fastReflection_QueryVotesRequest QueryVotesRequest - -func (x *QueryVotesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesRequest)(x) -} - -func (x *QueryVotesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_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_QueryVotesRequest_messageType fastReflection_QueryVotesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesRequest_messageType{} - -type fastReflection_QueryVotesRequest_messageType struct{} - -func (x fastReflection_QueryVotesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesRequest)(nil) -} -func (x fastReflection_QueryVotesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesRequest) -} -func (x fastReflection_QueryVotesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesRequest -} - -// 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_QueryVotesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesRequest) New() protoreflect.Message { - return new(fastReflection_QueryVotesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVotesRequest)(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_QueryVotesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryVotesRequest_proposal_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesRequest_pagination, 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_QueryVotesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.QueryVotesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesRequest 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_QueryVotesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.QueryVotesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesRequest 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_QueryVotesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryVotesRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.QueryVotesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesRequest 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_QueryVotesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.QueryVotesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesRequest 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_QueryVotesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryVotesRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.QueryVotesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesRequest 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_QueryVotesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.QueryVotesRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesRequest 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_QueryVotesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryVotesRequest", 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_QueryVotesRequest) 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_QueryVotesRequest) 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_QueryVotesRequest) 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_QueryVotesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesRequest) - 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: QueryVotesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryVotesResponse_1_list)(nil) - -type _QueryVotesResponse_1_list struct { - list *[]*Vote -} - -func (x *_QueryVotesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryVotesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryVotesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_QueryVotesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryVotesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryVotesResponse_1_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryVotesResponse protoreflect.MessageDescriptor - fd_QueryVotesResponse_votes protoreflect.FieldDescriptor - fd_QueryVotesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryVotesResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryVotesResponse") - fd_QueryVotesResponse_votes = md_QueryVotesResponse.Fields().ByName("votes") - fd_QueryVotesResponse_pagination = md_QueryVotesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesResponse)(nil) - -type fastReflection_QueryVotesResponse QueryVotesResponse - -func (x *QueryVotesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesResponse)(x) -} - -func (x *QueryVotesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesResponse_messageType fastReflection_QueryVotesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesResponse_messageType{} - -type fastReflection_QueryVotesResponse_messageType struct{} - -func (x fastReflection_QueryVotesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesResponse)(nil) -} -func (x fastReflection_QueryVotesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesResponse) -} -func (x fastReflection_QueryVotesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesResponse -} - -// 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_QueryVotesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesResponse) New() protoreflect.Message { - return new(fastReflection_QueryVotesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVotesResponse)(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_QueryVotesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_QueryVotesResponse_1_list{list: &x.Votes}) - if !f(fd_QueryVotesResponse_votes, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesResponse_pagination, 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_QueryVotesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesResponse.votes": - return len(x.Votes) != 0 - case "cosmos.gov.v1beta1.QueryVotesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesResponse 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_QueryVotesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesResponse.votes": - x.Votes = nil - case "cosmos.gov.v1beta1.QueryVotesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesResponse 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_QueryVotesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryVotesResponse.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_QueryVotesResponse_1_list{}) - } - listValue := &_QueryVotesResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.QueryVotesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesResponse 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_QueryVotesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesResponse.votes": - lv := value.List() - clv := lv.(*_QueryVotesResponse_1_list) - x.Votes = *clv.list - case "cosmos.gov.v1beta1.QueryVotesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesResponse 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_QueryVotesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesResponse.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_QueryVotesResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.QueryVotesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesResponse 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_QueryVotesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryVotesResponse.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_QueryVotesResponse_1_list{list: &list}) - case "cosmos.gov.v1beta1.QueryVotesResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryVotesResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryVotesResponse 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_QueryVotesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryVotesResponse", 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_QueryVotesResponse) 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_QueryVotesResponse) 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_QueryVotesResponse) 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_QueryVotesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesResponse) - 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: QueryVotesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesResponse: 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 Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryParamsRequest protoreflect.MessageDescriptor - fd_QueryParamsRequest_params_type protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") - fd_QueryParamsRequest_params_type = md_QueryParamsRequest.Fields().ByName("params_type") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ParamsType != "" { - value := protoreflect.ValueOfString(x.ParamsType) - if !f(fd_QueryParamsRequest_params_type, 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryParamsRequest.params_type": - return x.ParamsType != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.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() { - case "cosmos.gov.v1beta1.QueryParamsRequest.params_type": - x.ParamsType = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.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() { - case "cosmos.gov.v1beta1.QueryParamsRequest.params_type": - value := x.ParamsType - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.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() { - case "cosmos.gov.v1beta1.QueryParamsRequest.params_type": - x.ParamsType = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.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() { - case "cosmos.gov.v1beta1.QueryParamsRequest.params_type": - panic(fmt.Errorf("field params_type of message cosmos.gov.v1beta1.QueryParamsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.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() { - case "cosmos.gov.v1beta1.QueryParamsRequest.params_type": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.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 - l = len(x.ParamsType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*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 len(x.ParamsType) > 0 { - i -= len(x.ParamsType) - copy(dAtA[i:], x.ParamsType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ParamsType))) - 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().(*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 { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParamsType", 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.ParamsType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_voting_params protoreflect.FieldDescriptor - fd_QueryParamsResponse_deposit_params protoreflect.FieldDescriptor - fd_QueryParamsResponse_tally_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_voting_params = md_QueryParamsResponse.Fields().ByName("voting_params") - fd_QueryParamsResponse_deposit_params = md_QueryParamsResponse.Fields().ByName("deposit_params") - fd_QueryParamsResponse_tally_params = md_QueryParamsResponse.Fields().ByName("tally_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_gov_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.VotingParams != nil { - value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_voting_params, value) { - return - } - } - if x.DepositParams != nil { - value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_deposit_params, value) { - return - } - } - if x.TallyParams != nil { - value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_tally_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.gov.v1beta1.QueryParamsResponse.voting_params": - return x.VotingParams != nil - case "cosmos.gov.v1beta1.QueryParamsResponse.deposit_params": - return x.DepositParams != nil - case "cosmos.gov.v1beta1.QueryParamsResponse.tally_params": - return x.TallyParams != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.v1beta1.QueryParamsResponse.voting_params": - x.VotingParams = nil - case "cosmos.gov.v1beta1.QueryParamsResponse.deposit_params": - x.DepositParams = nil - case "cosmos.gov.v1beta1.QueryParamsResponse.tally_params": - x.TallyParams = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.v1beta1.QueryParamsResponse.voting_params": - value := x.VotingParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryParamsResponse.deposit_params": - value := x.DepositParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryParamsResponse.tally_params": - value := x.TallyParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.v1beta1.QueryParamsResponse.voting_params": - x.VotingParams = value.Message().Interface().(*VotingParams) - case "cosmos.gov.v1beta1.QueryParamsResponse.deposit_params": - x.DepositParams = value.Message().Interface().(*DepositParams) - case "cosmos.gov.v1beta1.QueryParamsResponse.tally_params": - x.TallyParams = value.Message().Interface().(*TallyParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.v1beta1.QueryParamsResponse.voting_params": - if x.VotingParams == nil { - x.VotingParams = new(VotingParams) - } - return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryParamsResponse.deposit_params": - if x.DepositParams == nil { - x.DepositParams = new(DepositParams) - } - return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryParamsResponse.tally_params": - if x.TallyParams == nil { - x.TallyParams = new(TallyParams) - } - return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.v1beta1.QueryParamsResponse.voting_params": - m := new(VotingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryParamsResponse.deposit_params": - m := new(DepositParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryParamsResponse.tally_params": - m := new(TallyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.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.gov.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.VotingParams != nil { - l = options.Size(x.VotingParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DepositParams != nil { - l = options.Size(x.DepositParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TallyParams != nil { - l = options.Size(x.TallyParams) - 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.TallyParams != nil { - encoded, err := options.Marshal(x.TallyParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.DepositParams != nil { - encoded, err := options.Marshal(x.DepositParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.VotingParams != nil { - encoded, err := options.Marshal(x.VotingParams) - 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 VotingParams", 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.VotingParams == nil { - x.VotingParams = &VotingParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", 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.DepositParams == nil { - x.DepositParams = &DepositParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", 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.TallyParams == nil { - x.TallyParams = &TallyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); 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_QueryDepositRequest protoreflect.MessageDescriptor - fd_QueryDepositRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryDepositRequest_depositor protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryDepositRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryDepositRequest") - fd_QueryDepositRequest_proposal_id = md_QueryDepositRequest.Fields().ByName("proposal_id") - fd_QueryDepositRequest_depositor = md_QueryDepositRequest.Fields().ByName("depositor") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositRequest)(nil) - -type fastReflection_QueryDepositRequest QueryDepositRequest - -func (x *QueryDepositRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositRequest)(x) -} - -func (x *QueryDepositRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositRequest_messageType fastReflection_QueryDepositRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositRequest_messageType{} - -type fastReflection_QueryDepositRequest_messageType struct{} - -func (x fastReflection_QueryDepositRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositRequest)(nil) -} -func (x fastReflection_QueryDepositRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositRequest) -} -func (x fastReflection_QueryDepositRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRequest -} - -// 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_QueryDepositRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositRequest) New() protoreflect.Message { - return new(fastReflection_QueryDepositRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDepositRequest)(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_QueryDepositRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryDepositRequest_proposal_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_QueryDepositRequest_depositor, 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_QueryDepositRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.QueryDepositRequest.depositor": - return x.Depositor != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.QueryDepositRequest.depositor": - x.Depositor = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryDepositRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.QueryDepositRequest.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.QueryDepositRequest.depositor": - x.Depositor = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.QueryDepositRequest is not mutable")) - case "cosmos.gov.v1beta1.QueryDepositRequest.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1beta1.QueryDepositRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositRequest 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_QueryDepositRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.QueryDepositRequest.depositor": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositRequest 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_QueryDepositRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryDepositRequest", 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_QueryDepositRequest) 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_QueryDepositRequest) 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_QueryDepositRequest) 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_QueryDepositRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRequest) - 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: QueryDepositRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDepositResponse protoreflect.MessageDescriptor - fd_QueryDepositResponse_deposit protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryDepositResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryDepositResponse") - fd_QueryDepositResponse_deposit = md_QueryDepositResponse.Fields().ByName("deposit") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositResponse)(nil) - -type fastReflection_QueryDepositResponse QueryDepositResponse - -func (x *QueryDepositResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositResponse)(x) -} - -func (x *QueryDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositResponse_messageType fastReflection_QueryDepositResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositResponse_messageType{} - -type fastReflection_QueryDepositResponse_messageType struct{} - -func (x fastReflection_QueryDepositResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositResponse)(nil) -} -func (x fastReflection_QueryDepositResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositResponse) -} -func (x fastReflection_QueryDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositResponse -} - -// 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_QueryDepositResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositResponse) New() protoreflect.Message { - return new(fastReflection_QueryDepositResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDepositResponse)(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_QueryDepositResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Deposit != nil { - value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - if !f(fd_QueryDepositResponse_deposit, 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_QueryDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositResponse.deposit": - return x.Deposit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositResponse.deposit": - x.Deposit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryDepositResponse.deposit": - value := x.Deposit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositResponse.deposit": - x.Deposit = value.Message().Interface().(*Deposit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositResponse.deposit": - if x.Deposit == nil { - x.Deposit = new(Deposit) - } - return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositResponse 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_QueryDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositResponse.deposit": - m := new(Deposit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositResponse 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_QueryDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryDepositResponse", 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_QueryDepositResponse) 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_QueryDepositResponse) 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_QueryDepositResponse) 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_QueryDepositResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositResponse) - 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.Deposit != nil { - l = options.Size(x.Deposit) - 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().(*QueryDepositResponse) - 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.Deposit != nil { - encoded, err := options.Marshal(x.Deposit) - 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().(*QueryDepositResponse) - 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: QueryDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositResponse: 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 Deposit", 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.Deposit == nil { - x.Deposit = &Deposit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); 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_QueryDepositsRequest protoreflect.MessageDescriptor - fd_QueryDepositsRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryDepositsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryDepositsRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryDepositsRequest") - fd_QueryDepositsRequest_proposal_id = md_QueryDepositsRequest.Fields().ByName("proposal_id") - fd_QueryDepositsRequest_pagination = md_QueryDepositsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositsRequest)(nil) - -type fastReflection_QueryDepositsRequest QueryDepositsRequest - -func (x *QueryDepositsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositsRequest)(x) -} - -func (x *QueryDepositsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositsRequest_messageType fastReflection_QueryDepositsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositsRequest_messageType{} - -type fastReflection_QueryDepositsRequest_messageType struct{} - -func (x fastReflection_QueryDepositsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositsRequest)(nil) -} -func (x fastReflection_QueryDepositsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositsRequest) -} -func (x fastReflection_QueryDepositsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsRequest -} - -// 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_QueryDepositsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDepositsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDepositsRequest)(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_QueryDepositsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryDepositsRequest_proposal_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDepositsRequest_pagination, 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_QueryDepositsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.QueryDepositsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.QueryDepositsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.QueryDepositsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.QueryDepositsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.gov.v1beta1.QueryDepositsRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.QueryDepositsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.QueryDepositsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryDepositsRequest", 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_QueryDepositsRequest) 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_QueryDepositsRequest) 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_QueryDepositsRequest) 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_QueryDepositsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositsRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDepositsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositsRequest) - 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: QueryDepositsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDepositsResponse_1_list)(nil) - -type _QueryDepositsResponse_1_list struct { - list *[]*Deposit -} - -func (x *_QueryDepositsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDepositsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDepositsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDepositsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDepositsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Deposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDepositsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDepositsResponse_1_list) NewElement() protoreflect.Value { - v := new(Deposit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDepositsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDepositsResponse protoreflect.MessageDescriptor - fd_QueryDepositsResponse_deposits protoreflect.FieldDescriptor - fd_QueryDepositsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryDepositsResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryDepositsResponse") - fd_QueryDepositsResponse_deposits = md_QueryDepositsResponse.Fields().ByName("deposits") - fd_QueryDepositsResponse_pagination = md_QueryDepositsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositsResponse)(nil) - -type fastReflection_QueryDepositsResponse QueryDepositsResponse - -func (x *QueryDepositsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositsResponse)(x) -} - -func (x *QueryDepositsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositsResponse_messageType fastReflection_QueryDepositsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositsResponse_messageType{} - -type fastReflection_QueryDepositsResponse_messageType struct{} - -func (x fastReflection_QueryDepositsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositsResponse)(nil) -} -func (x fastReflection_QueryDepositsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositsResponse) -} -func (x fastReflection_QueryDepositsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositsResponse -} - -// 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_QueryDepositsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDepositsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDepositsResponse)(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_QueryDepositsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Deposits) != 0 { - value := protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &x.Deposits}) - if !f(fd_QueryDepositsResponse_deposits, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDepositsResponse_pagination, 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_QueryDepositsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsResponse.deposits": - return len(x.Deposits) != 0 - case "cosmos.gov.v1beta1.QueryDepositsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsResponse.deposits": - x.Deposits = nil - case "cosmos.gov.v1beta1.QueryDepositsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsResponse.deposits": - if len(x.Deposits) == 0 { - return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{}) - } - listValue := &_QueryDepositsResponse_1_list{list: &x.Deposits} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.QueryDepositsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsResponse.deposits": - lv := value.List() - clv := lv.(*_QueryDepositsResponse_1_list) - x.Deposits = *clv.list - case "cosmos.gov.v1beta1.QueryDepositsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsResponse.deposits": - if x.Deposits == nil { - x.Deposits = []*Deposit{} - } - value := &_QueryDepositsResponse_1_list{list: &x.Deposits} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.QueryDepositsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryDepositsResponse.deposits": - list := []*Deposit{} - return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &list}) - case "cosmos.gov.v1beta1.QueryDepositsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryDepositsResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryDepositsResponse", 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_QueryDepositsResponse) 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_QueryDepositsResponse) 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_QueryDepositsResponse) 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_QueryDepositsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Deposits) > 0 { - for _, e := range x.Deposits { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDepositsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Deposits) > 0 { - for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Deposits[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositsResponse) - 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: QueryDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsResponse: 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 Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Deposits = append(x.Deposits, &Deposit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryTallyResultRequest protoreflect.MessageDescriptor - fd_QueryTallyResultRequest_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryTallyResultRequest = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryTallyResultRequest") - fd_QueryTallyResultRequest_proposal_id = md_QueryTallyResultRequest.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryTallyResultRequest)(nil) - -type fastReflection_QueryTallyResultRequest QueryTallyResultRequest - -func (x *QueryTallyResultRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTallyResultRequest)(x) -} - -func (x *QueryTallyResultRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTallyResultRequest_messageType fastReflection_QueryTallyResultRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryTallyResultRequest_messageType{} - -type fastReflection_QueryTallyResultRequest_messageType struct{} - -func (x fastReflection_QueryTallyResultRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTallyResultRequest)(nil) -} -func (x fastReflection_QueryTallyResultRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultRequest) -} -func (x fastReflection_QueryTallyResultRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTallyResultRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultRequest -} - -// 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_QueryTallyResultRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryTallyResultRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTallyResultRequest) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTallyResultRequest) Interface() protoreflect.ProtoMessage { - return (*QueryTallyResultRequest)(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_QueryTallyResultRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryTallyResultRequest_proposal_id, 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_QueryTallyResultRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultRequest.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultRequest 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_QueryTallyResultRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultRequest.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultRequest 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_QueryTallyResultRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultRequest 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_QueryTallyResultRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultRequest.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultRequest 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_QueryTallyResultRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.QueryTallyResultRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultRequest 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_QueryTallyResultRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultRequest 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_QueryTallyResultRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryTallyResultRequest", 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTallyResultRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*QueryTallyResultRequest) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryTallyResultRequest) - 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: QueryTallyResultRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTallyResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryTallyResultResponse protoreflect.MessageDescriptor - fd_QueryTallyResultResponse_tally protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_query_proto_init() - md_QueryTallyResultResponse = File_cosmos_gov_v1beta1_query_proto.Messages().ByName("QueryTallyResultResponse") - fd_QueryTallyResultResponse_tally = md_QueryTallyResultResponse.Fields().ByName("tally") -} - -var _ protoreflect.Message = (*fastReflection_QueryTallyResultResponse)(nil) - -type fastReflection_QueryTallyResultResponse QueryTallyResultResponse - -func (x *QueryTallyResultResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTallyResultResponse)(x) -} - -func (x *QueryTallyResultResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTallyResultResponse_messageType fastReflection_QueryTallyResultResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryTallyResultResponse_messageType{} - -type fastReflection_QueryTallyResultResponse_messageType struct{} - -func (x fastReflection_QueryTallyResultResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTallyResultResponse)(nil) -} -func (x fastReflection_QueryTallyResultResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultResponse) -} -func (x fastReflection_QueryTallyResultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTallyResultResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultResponse -} - -// 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_QueryTallyResultResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryTallyResultResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTallyResultResponse) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTallyResultResponse) Interface() protoreflect.ProtoMessage { - return (*QueryTallyResultResponse)(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_QueryTallyResultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Tally != nil { - value := protoreflect.ValueOfMessage(x.Tally.ProtoReflect()) - if !f(fd_QueryTallyResultResponse_tally, 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_QueryTallyResultResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultResponse.tally": - return x.Tally != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultResponse 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_QueryTallyResultResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultResponse.tally": - x.Tally = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultResponse 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_QueryTallyResultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultResponse.tally": - value := x.Tally - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultResponse 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_QueryTallyResultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultResponse.tally": - x.Tally = value.Message().Interface().(*TallyResult) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultResponse 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_QueryTallyResultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultResponse.tally": - if x.Tally == nil { - x.Tally = new(TallyResult) - } - return protoreflect.ValueOfMessage(x.Tally.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultResponse 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_QueryTallyResultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.QueryTallyResultResponse.tally": - m := new(TallyResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.QueryTallyResultResponse 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_QueryTallyResultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.QueryTallyResultResponse", 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTallyResultResponse) - 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.Tally != nil { - l = options.Size(x.Tally) - 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().(*QueryTallyResultResponse) - 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.Tally != nil { - encoded, err := options.Marshal(x.Tally) - 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().(*QueryTallyResultResponse) - 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: QueryTallyResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTallyResultResponse: 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 Tally", 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.Tally == nil { - x.Tally = &TallyResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tally); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -type QueryProposalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *QueryProposalRequest) Reset() { - *x = QueryProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalRequest) ProtoMessage() {} - -// Deprecated: Use QueryProposalRequest.ProtoReflect.Descriptor instead. -func (*QueryProposalRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryProposalRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -type QueryProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` -} - -func (x *QueryProposalResponse) Reset() { - *x = QueryProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalResponse) ProtoMessage() {} - -// Deprecated: Use QueryProposalResponse.ProtoReflect.Descriptor instead. -func (*QueryProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryProposalResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -type QueryProposalsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_status defines the status of the proposals. - ProposalStatus ProposalStatus `protobuf:"varint,1,opt,name=proposal_status,json=proposalStatus,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"proposal_status,omitempty"` - // voter defines the voter address for the proposals. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - // depositor defines the deposit addresses from the proposals. - Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryProposalsRequest) Reset() { - *x = QueryProposalsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalsRequest) ProtoMessage() {} - -// Deprecated: Use QueryProposalsRequest.ProtoReflect.Descriptor instead. -func (*QueryProposalsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryProposalsRequest) GetProposalStatus() ProposalStatus { - if x != nil { - return x.ProposalStatus - } - return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED -} - -func (x *QueryProposalsRequest) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *QueryProposalsRequest) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -func (x *QueryProposalsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -type QueryProposalsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryProposalsResponse) Reset() { - *x = QueryProposalsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalsResponse) ProtoMessage() {} - -// Deprecated: Use QueryProposalsResponse.ProtoReflect.Descriptor instead. -func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryProposalsResponse) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -func (x *QueryProposalsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -type QueryVoteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter defines the oter address for the proposals. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` -} - -func (x *QueryVoteRequest) Reset() { - *x = QueryVoteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVoteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVoteRequest) ProtoMessage() {} - -// Deprecated: Use QueryVoteRequest.ProtoReflect.Descriptor instead. -func (*QueryVoteRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryVoteRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryVoteRequest) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -type QueryVoteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // vote defined the queried vote. - Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` -} - -func (x *QueryVoteResponse) Reset() { - *x = QueryVoteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVoteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVoteResponse) ProtoMessage() {} - -// Deprecated: Use QueryVoteResponse.ProtoReflect.Descriptor instead. -func (*QueryVoteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryVoteResponse) GetVote() *Vote { - if x != nil { - return x.Vote - } - return nil -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -type QueryVotesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesRequest) Reset() { - *x = QueryVotesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesRequest) ProtoMessage() {} - -// Deprecated: Use QueryVotesRequest.ProtoReflect.Descriptor instead. -func (*QueryVotesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryVotesRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryVotesRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -type QueryVotesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // votes defined the queried votes. - Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesResponse) Reset() { - *x = QueryVotesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesResponse) ProtoMessage() {} - -// Deprecated: Use QueryVotesResponse.ProtoReflect.Descriptor instead. -func (*QueryVotesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryVotesResponse) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -func (x *QueryVotesResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - 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_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryParamsRequest) GetParamsType() string { - if x != nil { - return x.ParamsType - } - return "" -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // voting_params defines the parameters related to voting. - VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // deposit_params defines the parameters related to deposit. - DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // tally_params defines the parameters related to tally. - TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryParamsResponse) GetVotingParams() *VotingParams { - if x != nil { - return x.VotingParams - } - return nil -} - -func (x *QueryParamsResponse) GetDepositParams() *DepositParams { - if x != nil { - return x.DepositParams - } - return nil -} - -func (x *QueryParamsResponse) GetTallyParams() *TallyParams { - if x != nil { - return x.TallyParams - } - return nil -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -type QueryDepositRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // depositor defines the deposit addresses from the proposals. - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` -} - -func (x *QueryDepositRequest) Reset() { - *x = QueryDepositRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositRequest) ProtoMessage() {} - -// Deprecated: Use QueryDepositRequest.ProtoReflect.Descriptor instead. -func (*QueryDepositRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryDepositRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryDepositRequest) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -type QueryDepositResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // deposit defines the requested deposit. - Deposit *Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (x *QueryDepositResponse) Reset() { - *x = QueryDepositResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositResponse) ProtoMessage() {} - -// Deprecated: Use QueryDepositResponse.ProtoReflect.Descriptor instead. -func (*QueryDepositResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryDepositResponse) GetDeposit() *Deposit { - if x != nil { - return x.Deposit - } - return nil -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -type QueryDepositsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDepositsRequest) Reset() { - *x = QueryDepositsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDepositsRequest.ProtoReflect.Descriptor instead. -func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryDepositsRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryDepositsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -type QueryDepositsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDepositsResponse) Reset() { - *x = QueryDepositsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDepositsResponse.ProtoReflect.Descriptor instead. -func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryDepositsResponse) GetDeposits() []*Deposit { - if x != nil { - return x.Deposits - } - return nil -} - -func (x *QueryDepositsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -type QueryTallyResultRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id defines the unique id of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *QueryTallyResultRequest) Reset() { - *x = QueryTallyResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTallyResultRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTallyResultRequest) ProtoMessage() {} - -// Deprecated: Use QueryTallyResultRequest.ProtoReflect.Descriptor instead. -func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryTallyResultRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -type QueryTallyResultResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tally defines the requested tally. - Tally *TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally,omitempty"` -} - -func (x *QueryTallyResultResponse) Reset() { - *x = QueryTallyResultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTallyResultResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTallyResultResponse) ProtoMessage() {} - -// Deprecated: Use QueryTallyResultResponse.ProtoReflect.Descriptor instead. -func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryTallyResultResponse) GetTally() *TallyResult { - if x != nil { - return x.Tally - } - return nil -} - -var File_cosmos_gov_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, - 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x57, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, - 0x9e, 0x02, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x46, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, - 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, - 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x47, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x76, 0x6f, - 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, - 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x22, 0x7c, - 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x01, 0x0a, - 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x13, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4e, - 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x48, - 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x6c, - 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x78, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x00, 0x22, 0x53, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9f, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x17, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x57, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x32, - 0xd4, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x94, 0x01, 0x0a, 0x08, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x12, 0x89, 0x01, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x29, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x96, 0x01, 0x0a, - 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, - 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, - 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x06, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 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, 0x27, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 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, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, 0x40, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, - 0x12, 0x9d, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x28, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0xce, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, - 0x6f, 0x76, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_gov_v1beta1_query_proto_rawDescData = file_cosmos_gov_v1beta1_query_proto_rawDesc -) - -func file_cosmos_gov_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_gov_v1beta1_query_proto_rawDescData -} - -var file_cosmos_gov_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_cosmos_gov_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryProposalRequest)(nil), // 0: cosmos.gov.v1beta1.QueryProposalRequest - (*QueryProposalResponse)(nil), // 1: cosmos.gov.v1beta1.QueryProposalResponse - (*QueryProposalsRequest)(nil), // 2: cosmos.gov.v1beta1.QueryProposalsRequest - (*QueryProposalsResponse)(nil), // 3: cosmos.gov.v1beta1.QueryProposalsResponse - (*QueryVoteRequest)(nil), // 4: cosmos.gov.v1beta1.QueryVoteRequest - (*QueryVoteResponse)(nil), // 5: cosmos.gov.v1beta1.QueryVoteResponse - (*QueryVotesRequest)(nil), // 6: cosmos.gov.v1beta1.QueryVotesRequest - (*QueryVotesResponse)(nil), // 7: cosmos.gov.v1beta1.QueryVotesResponse - (*QueryParamsRequest)(nil), // 8: cosmos.gov.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 9: cosmos.gov.v1beta1.QueryParamsResponse - (*QueryDepositRequest)(nil), // 10: cosmos.gov.v1beta1.QueryDepositRequest - (*QueryDepositResponse)(nil), // 11: cosmos.gov.v1beta1.QueryDepositResponse - (*QueryDepositsRequest)(nil), // 12: cosmos.gov.v1beta1.QueryDepositsRequest - (*QueryDepositsResponse)(nil), // 13: cosmos.gov.v1beta1.QueryDepositsResponse - (*QueryTallyResultRequest)(nil), // 14: cosmos.gov.v1beta1.QueryTallyResultRequest - (*QueryTallyResultResponse)(nil), // 15: cosmos.gov.v1beta1.QueryTallyResultResponse - (*Proposal)(nil), // 16: cosmos.gov.v1beta1.Proposal - (ProposalStatus)(0), // 17: cosmos.gov.v1beta1.ProposalStatus - (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse - (*Vote)(nil), // 20: cosmos.gov.v1beta1.Vote - (*VotingParams)(nil), // 21: cosmos.gov.v1beta1.VotingParams - (*DepositParams)(nil), // 22: cosmos.gov.v1beta1.DepositParams - (*TallyParams)(nil), // 23: cosmos.gov.v1beta1.TallyParams - (*Deposit)(nil), // 24: cosmos.gov.v1beta1.Deposit - (*TallyResult)(nil), // 25: cosmos.gov.v1beta1.TallyResult -} -var file_cosmos_gov_v1beta1_query_proto_depIdxs = []int32{ - 16, // 0: cosmos.gov.v1beta1.QueryProposalResponse.proposal:type_name -> cosmos.gov.v1beta1.Proposal - 17, // 1: cosmos.gov.v1beta1.QueryProposalsRequest.proposal_status:type_name -> cosmos.gov.v1beta1.ProposalStatus - 18, // 2: cosmos.gov.v1beta1.QueryProposalsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 16, // 3: cosmos.gov.v1beta1.QueryProposalsResponse.proposals:type_name -> cosmos.gov.v1beta1.Proposal - 19, // 4: cosmos.gov.v1beta1.QueryProposalsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 20, // 5: cosmos.gov.v1beta1.QueryVoteResponse.vote:type_name -> cosmos.gov.v1beta1.Vote - 18, // 6: cosmos.gov.v1beta1.QueryVotesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 20, // 7: cosmos.gov.v1beta1.QueryVotesResponse.votes:type_name -> cosmos.gov.v1beta1.Vote - 19, // 8: cosmos.gov.v1beta1.QueryVotesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 9: cosmos.gov.v1beta1.QueryParamsResponse.voting_params:type_name -> cosmos.gov.v1beta1.VotingParams - 22, // 10: cosmos.gov.v1beta1.QueryParamsResponse.deposit_params:type_name -> cosmos.gov.v1beta1.DepositParams - 23, // 11: cosmos.gov.v1beta1.QueryParamsResponse.tally_params:type_name -> cosmos.gov.v1beta1.TallyParams - 24, // 12: cosmos.gov.v1beta1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1beta1.Deposit - 18, // 13: cosmos.gov.v1beta1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 24, // 14: cosmos.gov.v1beta1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1beta1.Deposit - 19, // 15: cosmos.gov.v1beta1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 25, // 16: cosmos.gov.v1beta1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1beta1.TallyResult - 0, // 17: cosmos.gov.v1beta1.Query.Proposal:input_type -> cosmos.gov.v1beta1.QueryProposalRequest - 2, // 18: cosmos.gov.v1beta1.Query.Proposals:input_type -> cosmos.gov.v1beta1.QueryProposalsRequest - 4, // 19: cosmos.gov.v1beta1.Query.Vote:input_type -> cosmos.gov.v1beta1.QueryVoteRequest - 6, // 20: cosmos.gov.v1beta1.Query.Votes:input_type -> cosmos.gov.v1beta1.QueryVotesRequest - 8, // 21: cosmos.gov.v1beta1.Query.Params:input_type -> cosmos.gov.v1beta1.QueryParamsRequest - 10, // 22: cosmos.gov.v1beta1.Query.Deposit:input_type -> cosmos.gov.v1beta1.QueryDepositRequest - 12, // 23: cosmos.gov.v1beta1.Query.Deposits:input_type -> cosmos.gov.v1beta1.QueryDepositsRequest - 14, // 24: cosmos.gov.v1beta1.Query.TallyResult:input_type -> cosmos.gov.v1beta1.QueryTallyResultRequest - 1, // 25: cosmos.gov.v1beta1.Query.Proposal:output_type -> cosmos.gov.v1beta1.QueryProposalResponse - 3, // 26: cosmos.gov.v1beta1.Query.Proposals:output_type -> cosmos.gov.v1beta1.QueryProposalsResponse - 5, // 27: cosmos.gov.v1beta1.Query.Vote:output_type -> cosmos.gov.v1beta1.QueryVoteResponse - 7, // 28: cosmos.gov.v1beta1.Query.Votes:output_type -> cosmos.gov.v1beta1.QueryVotesResponse - 9, // 29: cosmos.gov.v1beta1.Query.Params:output_type -> cosmos.gov.v1beta1.QueryParamsResponse - 11, // 30: cosmos.gov.v1beta1.Query.Deposit:output_type -> cosmos.gov.v1beta1.QueryDepositResponse - 13, // 31: cosmos.gov.v1beta1.Query.Deposits:output_type -> cosmos.gov.v1beta1.QueryDepositsResponse - 15, // 32: cosmos.gov.v1beta1.Query.TallyResult:output_type -> cosmos.gov.v1beta1.QueryTallyResultResponse - 25, // [25:33] is the sub-list for method output_type - 17, // [17:25] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1beta1_query_proto_init() } -func file_cosmos_gov_v1beta1_query_proto_init() { - if File_cosmos_gov_v1beta1_query_proto != nil { - return - } - file_cosmos_gov_v1beta1_gov_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVoteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVoteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTallyResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTallyResultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_gov_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_gov_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_gov_v1beta1_query_proto = out.File - file_cosmos_gov_v1beta1_query_proto_rawDesc = nil - file_cosmos_gov_v1beta1_query_proto_goTypes = nil - file_cosmos_gov_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1beta1/query_grpc.pb.go b/api/cosmos/gov/v1beta1/query_grpc.pb.go deleted file mode 100644 index 8315a84f8375..000000000000 --- a/api/cosmos/gov/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/gov/v1beta1/query.proto - -package govv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Proposal queries proposal details based on ProposalID. - Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) - // Proposals queries all proposals based on given status. - Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) - // Vote queries voted information based on proposalID, voterAddr. - Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) - // Votes queries votes of a given proposal. - Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) - // Params queries all parameters of the gov module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. - Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) - // Deposits queries all deposits of a single proposal. - Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) - // TallyResult queries the tally of a proposal vote. - TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) { - out := new(QueryProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Proposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error) { - out := new(QueryProposalsResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Proposals", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) { - out := new(QueryVoteResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Vote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error) { - out := new(QueryVotesResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Votes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) { - out := new(QueryDepositResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Deposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) { - out := new(QueryDepositsResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/Deposits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) { - out := new(QueryTallyResultResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Query/TallyResult", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Proposal queries proposal details based on ProposalID. - Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) - // Proposals queries all proposals based on given status. - Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error) - // Vote queries voted information based on proposalID, voterAddr. - Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) - // Votes queries votes of a given proposal. - Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) - // Params queries all parameters of the gov module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Deposit queries single deposit information based proposalID, depositAddr. - Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) - // Deposits queries all deposits of a single proposal. - Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) - // TallyResult queries the tally of a proposal vote. - TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") -} -func (UnimplementedQueryServer) Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Proposals not implemented") -} -func (UnimplementedQueryServer) Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") -} -func (UnimplementedQueryServer) Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Votes not implemented") -} -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") -} -func (UnimplementedQueryServer) Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") -} -func (UnimplementedQueryServer) TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Proposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Proposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Proposal(ctx, req.(*QueryProposalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Proposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Proposals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Proposals", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Proposals(ctx, req.(*QueryProposalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVoteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Vote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Vote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Vote(ctx, req.(*QueryVoteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Votes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVotesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Votes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Votes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Votes(ctx, req.(*QueryVotesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Deposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Deposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Deposit(ctx, req.(*QueryDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Deposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDepositsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Deposits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/Deposits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Deposits(ctx, req.(*QueryDepositsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTallyResultRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TallyResult(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Query/TallyResult", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TallyResult(ctx, req.(*QueryTallyResultRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.gov.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Proposal", - Handler: _Query_Proposal_Handler, - }, - { - MethodName: "Proposals", - Handler: _Query_Proposals_Handler, - }, - { - MethodName: "Vote", - Handler: _Query_Vote_Handler, - }, - { - MethodName: "Votes", - Handler: _Query_Votes_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Deposit", - Handler: _Query_Deposit_Handler, - }, - { - MethodName: "Deposits", - Handler: _Query_Deposits_Handler, - }, - { - MethodName: "TallyResult", - Handler: _Query_TallyResult_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/gov/v1beta1/query.proto", -} diff --git a/api/cosmos/gov/v1beta1/tx.pulsar.go b/api/cosmos/gov/v1beta1/tx.pulsar.go deleted file mode 100644 index 06f185b840aa..000000000000 --- a/api/cosmos/gov/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,4493 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package govv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_MsgSubmitProposal_2_list)(nil) - -type _MsgSubmitProposal_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgSubmitProposal_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSubmitProposal_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSubmitProposal_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSubmitProposal_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSubmitProposal_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSubmitProposal_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgSubmitProposal protoreflect.MessageDescriptor - fd_MsgSubmitProposal_content protoreflect.FieldDescriptor - fd_MsgSubmitProposal_initial_deposit protoreflect.FieldDescriptor - fd_MsgSubmitProposal_proposer protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgSubmitProposal = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgSubmitProposal") - fd_MsgSubmitProposal_content = md_MsgSubmitProposal.Fields().ByName("content") - fd_MsgSubmitProposal_initial_deposit = md_MsgSubmitProposal.Fields().ByName("initial_deposit") - fd_MsgSubmitProposal_proposer = md_MsgSubmitProposal.Fields().ByName("proposer") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitProposal)(nil) - -type fastReflection_MsgSubmitProposal MsgSubmitProposal - -func (x *MsgSubmitProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitProposal)(x) -} - -func (x *MsgSubmitProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitProposal_messageType fastReflection_MsgSubmitProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitProposal_messageType{} - -type fastReflection_MsgSubmitProposal_messageType struct{} - -func (x fastReflection_MsgSubmitProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitProposal)(nil) -} -func (x fastReflection_MsgSubmitProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposal) -} -func (x fastReflection_MsgSubmitProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposal -} - -// 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_MsgSubmitProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitProposal) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitProposal) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitProposal)(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_MsgSubmitProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Content != nil { - value := protoreflect.ValueOfMessage(x.Content.ProtoReflect()) - if !f(fd_MsgSubmitProposal_content, value) { - return - } - } - if len(x.InitialDeposit) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{list: &x.InitialDeposit}) - if !f(fd_MsgSubmitProposal_initial_deposit, value) { - return - } - } - if x.Proposer != "" { - value := protoreflect.ValueOfString(x.Proposer) - if !f(fd_MsgSubmitProposal_proposer, 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_MsgSubmitProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposal.content": - return x.Content != nil - case "cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit": - return len(x.InitialDeposit) != 0 - case "cosmos.gov.v1beta1.MsgSubmitProposal.proposer": - return x.Proposer != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposal 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_MsgSubmitProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposal.content": - x.Content = nil - case "cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit": - x.InitialDeposit = nil - case "cosmos.gov.v1beta1.MsgSubmitProposal.proposer": - x.Proposer = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposal 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_MsgSubmitProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposal.content": - value := x.Content - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit": - if len(x.InitialDeposit) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{}) - } - listValue := &_MsgSubmitProposal_2_list{list: &x.InitialDeposit} - return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1beta1.MsgSubmitProposal.proposer": - value := x.Proposer - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposal 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_MsgSubmitProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposal.content": - x.Content = value.Message().Interface().(*anypb.Any) - case "cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit": - lv := value.List() - clv := lv.(*_MsgSubmitProposal_2_list) - x.InitialDeposit = *clv.list - case "cosmos.gov.v1beta1.MsgSubmitProposal.proposer": - x.Proposer = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposal 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_MsgSubmitProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposal.content": - if x.Content == nil { - x.Content = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Content.ProtoReflect()) - case "cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit": - if x.InitialDeposit == nil { - x.InitialDeposit = []*v1beta1.Coin{} - } - value := &_MsgSubmitProposal_2_list{list: &x.InitialDeposit} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.MsgSubmitProposal.proposer": - panic(fmt.Errorf("field proposer of message cosmos.gov.v1beta1.MsgSubmitProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposal 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_MsgSubmitProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposal.content": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{list: &list}) - case "cosmos.gov.v1beta1.MsgSubmitProposal.proposer": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposal 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_MsgSubmitProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgSubmitProposal", 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_MsgSubmitProposal) 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_MsgSubmitProposal) 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_MsgSubmitProposal) 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_MsgSubmitProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitProposal) - 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.Content != nil { - l = options.Size(x.Content) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.InitialDeposit) > 0 { - for _, e := range x.InitialDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Proposer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Proposer) > 0 { - i -= len(x.Proposer) - copy(dAtA[i:], x.Proposer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proposer))) - i-- - dAtA[i] = 0x1a - } - if len(x.InitialDeposit) > 0 { - for iNdEx := len(x.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.InitialDeposit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Content != nil { - encoded, err := options.Marshal(x.Content) - 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().(*MsgSubmitProposal) - 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: MsgSubmitProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitProposal: 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 Content", 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.Content == nil { - x.Content = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Content); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InitialDeposit = append(x.InitialDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InitialDeposit[len(x.InitialDeposit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposer", 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.Proposer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitProposalResponse protoreflect.MessageDescriptor - fd_MsgSubmitProposalResponse_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgSubmitProposalResponse = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgSubmitProposalResponse") - fd_MsgSubmitProposalResponse_proposal_id = md_MsgSubmitProposalResponse.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitProposalResponse)(nil) - -type fastReflection_MsgSubmitProposalResponse MsgSubmitProposalResponse - -func (x *MsgSubmitProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitProposalResponse)(x) -} - -func (x *MsgSubmitProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitProposalResponse_messageType fastReflection_MsgSubmitProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitProposalResponse_messageType{} - -type fastReflection_MsgSubmitProposalResponse_messageType struct{} - -func (x fastReflection_MsgSubmitProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitProposalResponse)(nil) -} -func (x fastReflection_MsgSubmitProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposalResponse) -} -func (x fastReflection_MsgSubmitProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposalResponse -} - -// 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_MsgSubmitProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitProposalResponse)(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_MsgSubmitProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgSubmitProposalResponse_proposal_id, 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_MsgSubmitProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposalResponse.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposalResponse.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposalResponse.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposalResponse.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposalResponse.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.MsgSubmitProposalResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgSubmitProposalResponse.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgSubmitProposalResponse", 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitProposalResponse) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*MsgSubmitProposalResponse) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposalResponse) - 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: MsgSubmitProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVote protoreflect.MessageDescriptor - fd_MsgVote_proposal_id protoreflect.FieldDescriptor - fd_MsgVote_voter protoreflect.FieldDescriptor - fd_MsgVote_option protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgVote = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgVote") - fd_MsgVote_proposal_id = md_MsgVote.Fields().ByName("proposal_id") - fd_MsgVote_voter = md_MsgVote.Fields().ByName("voter") - fd_MsgVote_option = md_MsgVote.Fields().ByName("option") -} - -var _ protoreflect.Message = (*fastReflection_MsgVote)(nil) - -type fastReflection_MsgVote MsgVote - -func (x *MsgVote) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVote)(x) -} - -func (x *MsgVote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVote_messageType fastReflection_MsgVote_messageType -var _ protoreflect.MessageType = fastReflection_MsgVote_messageType{} - -type fastReflection_MsgVote_messageType struct{} - -func (x fastReflection_MsgVote_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVote)(nil) -} -func (x fastReflection_MsgVote_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVote) -} -func (x fastReflection_MsgVote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVote) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVote -} - -// 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_MsgVote) Type() protoreflect.MessageType { - return _fastReflection_MsgVote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVote) New() protoreflect.Message { - return new(fastReflection_MsgVote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVote) Interface() protoreflect.ProtoMessage { - return (*MsgVote)(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_MsgVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgVote_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_MsgVote_voter, value) { - return - } - } - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_MsgVote_option, 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_MsgVote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVote.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.MsgVote.voter": - return x.Voter != "" - case "cosmos.gov.v1beta1.MsgVote.option": - return x.Option != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVote 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_MsgVote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVote.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.MsgVote.voter": - x.Voter = "" - case "cosmos.gov.v1beta1.MsgVote.option": - x.Option = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVote 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_MsgVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.MsgVote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.MsgVote.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.MsgVote.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVote 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_MsgVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVote.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.MsgVote.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1beta1.MsgVote.option": - x.Option = (VoteOption)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVote 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_MsgVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.MsgVote is not mutable")) - case "cosmos.gov.v1beta1.MsgVote.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1beta1.MsgVote is not mutable")) - case "cosmos.gov.v1beta1.MsgVote.option": - panic(fmt.Errorf("field option of message cosmos.gov.v1beta1.MsgVote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVote 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_MsgVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.MsgVote.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.MsgVote.option": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVote 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_MsgVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgVote", 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_MsgVote) 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_MsgVote) 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_MsgVote) 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_MsgVote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - 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().(*MsgVote) - 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.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x18 - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVote) - 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: MsgVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVoteResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgVoteResponse = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgVoteResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteResponse)(nil) - -type fastReflection_MsgVoteResponse MsgVoteResponse - -func (x *MsgVoteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteResponse)(x) -} - -func (x *MsgVoteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteResponse_messageType fastReflection_MsgVoteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteResponse_messageType{} - -type fastReflection_MsgVoteResponse_messageType struct{} - -func (x fastReflection_MsgVoteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteResponse)(nil) -} -func (x fastReflection_MsgVoteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteResponse) -} -func (x fastReflection_MsgVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteResponse -} - -// 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_MsgVoteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteResponse) New() protoreflect.Message { - return new(fastReflection_MsgVoteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVoteResponse)(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_MsgVoteResponse) 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_MsgVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteResponse 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_MsgVoteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteResponse 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_MsgVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteResponse 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_MsgVoteResponse) 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.gov.v1beta1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteResponse 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_MsgVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteResponse 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_MsgVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteResponse 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_MsgVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgVoteResponse", 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteResponse) - 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().(*MsgVoteResponse) - 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().(*MsgVoteResponse) - 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: MsgVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgVoteWeighted_3_list)(nil) - -type _MsgVoteWeighted_3_list struct { - list *[]*WeightedVoteOption -} - -func (x *_MsgVoteWeighted_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgVoteWeighted_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgVoteWeighted_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - (*x.list)[i] = concreteValue -} - -func (x *_MsgVoteWeighted_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*WeightedVoteOption) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgVoteWeighted_3_list) AppendMutable() protoreflect.Value { - v := new(WeightedVoteOption) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgVoteWeighted_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgVoteWeighted_3_list) NewElement() protoreflect.Value { - v := new(WeightedVoteOption) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgVoteWeighted_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgVoteWeighted protoreflect.MessageDescriptor - fd_MsgVoteWeighted_proposal_id protoreflect.FieldDescriptor - fd_MsgVoteWeighted_voter protoreflect.FieldDescriptor - fd_MsgVoteWeighted_options protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgVoteWeighted = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgVoteWeighted") - fd_MsgVoteWeighted_proposal_id = md_MsgVoteWeighted.Fields().ByName("proposal_id") - fd_MsgVoteWeighted_voter = md_MsgVoteWeighted.Fields().ByName("voter") - fd_MsgVoteWeighted_options = md_MsgVoteWeighted.Fields().ByName("options") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteWeighted)(nil) - -type fastReflection_MsgVoteWeighted MsgVoteWeighted - -func (x *MsgVoteWeighted) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteWeighted)(x) -} - -func (x *MsgVoteWeighted) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteWeighted_messageType fastReflection_MsgVoteWeighted_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteWeighted_messageType{} - -type fastReflection_MsgVoteWeighted_messageType struct{} - -func (x fastReflection_MsgVoteWeighted_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteWeighted)(nil) -} -func (x fastReflection_MsgVoteWeighted_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeighted) -} -func (x fastReflection_MsgVoteWeighted_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeighted -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteWeighted) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeighted -} - -// 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_MsgVoteWeighted) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteWeighted_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteWeighted) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeighted) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteWeighted) Interface() protoreflect.ProtoMessage { - return (*MsgVoteWeighted)(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_MsgVoteWeighted) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgVoteWeighted_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_MsgVoteWeighted_voter, value) { - return - } - } - if len(x.Options) != 0 { - value := protoreflect.ValueOfList(&_MsgVoteWeighted_3_list{list: &x.Options}) - if !f(fd_MsgVoteWeighted_options, 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_MsgVoteWeighted) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVoteWeighted.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.MsgVoteWeighted.voter": - return x.Voter != "" - case "cosmos.gov.v1beta1.MsgVoteWeighted.options": - return len(x.Options) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeighted 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_MsgVoteWeighted) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVoteWeighted.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.MsgVoteWeighted.voter": - x.Voter = "" - case "cosmos.gov.v1beta1.MsgVoteWeighted.options": - x.Options = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeighted 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_MsgVoteWeighted) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.MsgVoteWeighted.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.MsgVoteWeighted.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.MsgVoteWeighted.options": - if len(x.Options) == 0 { - return protoreflect.ValueOfList(&_MsgVoteWeighted_3_list{}) - } - listValue := &_MsgVoteWeighted_3_list{list: &x.Options} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeighted 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_MsgVoteWeighted) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVoteWeighted.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.MsgVoteWeighted.voter": - x.Voter = value.Interface().(string) - case "cosmos.gov.v1beta1.MsgVoteWeighted.options": - lv := value.List() - clv := lv.(*_MsgVoteWeighted_3_list) - x.Options = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeighted 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_MsgVoteWeighted) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVoteWeighted.options": - if x.Options == nil { - x.Options = []*WeightedVoteOption{} - } - value := &_MsgVoteWeighted_3_list{list: &x.Options} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.MsgVoteWeighted.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.MsgVoteWeighted is not mutable")) - case "cosmos.gov.v1beta1.MsgVoteWeighted.voter": - panic(fmt.Errorf("field voter of message cosmos.gov.v1beta1.MsgVoteWeighted is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeighted 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_MsgVoteWeighted) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgVoteWeighted.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.MsgVoteWeighted.voter": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.MsgVoteWeighted.options": - list := []*WeightedVoteOption{} - return protoreflect.ValueOfList(&_MsgVoteWeighted_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeighted")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeighted 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_MsgVoteWeighted) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgVoteWeighted", 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_MsgVoteWeighted) 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_MsgVoteWeighted) 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_MsgVoteWeighted) 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_MsgVoteWeighted) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteWeighted) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Options) > 0 { - for _, e := range x.Options { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteWeighted) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Options) > 0 { - for iNdEx := len(x.Options) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Options[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteWeighted) - 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: MsgVoteWeighted: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteWeighted: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Options = append(x.Options, &WeightedVoteOption{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Options[len(x.Options)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVoteWeightedResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgVoteWeightedResponse = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgVoteWeightedResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteWeightedResponse)(nil) - -type fastReflection_MsgVoteWeightedResponse MsgVoteWeightedResponse - -func (x *MsgVoteWeightedResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteWeightedResponse)(x) -} - -func (x *MsgVoteWeightedResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteWeightedResponse_messageType fastReflection_MsgVoteWeightedResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteWeightedResponse_messageType{} - -type fastReflection_MsgVoteWeightedResponse_messageType struct{} - -func (x fastReflection_MsgVoteWeightedResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteWeightedResponse)(nil) -} -func (x fastReflection_MsgVoteWeightedResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeightedResponse) -} -func (x fastReflection_MsgVoteWeightedResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeightedResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteWeightedResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteWeightedResponse -} - -// 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_MsgVoteWeightedResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteWeightedResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteWeightedResponse) New() protoreflect.Message { - return new(fastReflection_MsgVoteWeightedResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteWeightedResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVoteWeightedResponse)(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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) 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.gov.v1beta1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgVoteWeightedResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgVoteWeightedResponse 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_MsgVoteWeightedResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgVoteWeightedResponse", 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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) 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_MsgVoteWeightedResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteWeightedResponse) - 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().(*MsgVoteWeightedResponse) - 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().(*MsgVoteWeightedResponse) - 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: MsgVoteWeightedResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteWeightedResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgDeposit_3_list)(nil) - -type _MsgDeposit_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgDeposit_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgDeposit_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgDeposit_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgDeposit_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgDeposit_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgDeposit_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgDeposit_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgDeposit_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgDeposit protoreflect.MessageDescriptor - fd_MsgDeposit_proposal_id protoreflect.FieldDescriptor - fd_MsgDeposit_depositor protoreflect.FieldDescriptor - fd_MsgDeposit_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgDeposit = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgDeposit") - fd_MsgDeposit_proposal_id = md_MsgDeposit.Fields().ByName("proposal_id") - fd_MsgDeposit_depositor = md_MsgDeposit.Fields().ByName("depositor") - fd_MsgDeposit_amount = md_MsgDeposit.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeposit)(nil) - -type fastReflection_MsgDeposit MsgDeposit - -func (x *MsgDeposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeposit)(x) -} - -func (x *MsgDeposit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeposit_messageType fastReflection_MsgDeposit_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeposit_messageType{} - -type fastReflection_MsgDeposit_messageType struct{} - -func (x fastReflection_MsgDeposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeposit)(nil) -} -func (x fastReflection_MsgDeposit_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeposit) -} -func (x fastReflection_MsgDeposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeposit) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeposit -} - -// 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_MsgDeposit) Type() protoreflect.MessageType { - return _fastReflection_MsgDeposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeposit) New() protoreflect.Message { - return new(fastReflection_MsgDeposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeposit) Interface() protoreflect.ProtoMessage { - return (*MsgDeposit)(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_MsgDeposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgDeposit_proposal_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_MsgDeposit_depositor, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgDeposit_3_list{list: &x.Amount}) - if !f(fd_MsgDeposit_amount, 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_MsgDeposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgDeposit.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.gov.v1beta1.MsgDeposit.depositor": - return x.Depositor != "" - case "cosmos.gov.v1beta1.MsgDeposit.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDeposit 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_MsgDeposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgDeposit.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.gov.v1beta1.MsgDeposit.depositor": - x.Depositor = "" - case "cosmos.gov.v1beta1.MsgDeposit.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDeposit 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_MsgDeposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.gov.v1beta1.MsgDeposit.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.gov.v1beta1.MsgDeposit.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "cosmos.gov.v1beta1.MsgDeposit.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgDeposit_3_list{}) - } - listValue := &_MsgDeposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDeposit 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_MsgDeposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgDeposit.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.gov.v1beta1.MsgDeposit.depositor": - x.Depositor = value.Interface().(string) - case "cosmos.gov.v1beta1.MsgDeposit.amount": - lv := value.List() - clv := lv.(*_MsgDeposit_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDeposit 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_MsgDeposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgDeposit.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgDeposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.gov.v1beta1.MsgDeposit.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.gov.v1beta1.MsgDeposit is not mutable")) - case "cosmos.gov.v1beta1.MsgDeposit.depositor": - panic(fmt.Errorf("field depositor of message cosmos.gov.v1beta1.MsgDeposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDeposit 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_MsgDeposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.gov.v1beta1.MsgDeposit.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.gov.v1beta1.MsgDeposit.depositor": - return protoreflect.ValueOfString("") - case "cosmos.gov.v1beta1.MsgDeposit.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgDeposit_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDeposit")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDeposit 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_MsgDeposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgDeposit", 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_MsgDeposit) 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_MsgDeposit) 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_MsgDeposit) 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_MsgDeposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeposit) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDeposit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDeposit) - 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: MsgDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDepositResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_gov_v1beta1_tx_proto_init() - md_MsgDepositResponse = File_cosmos_gov_v1beta1_tx_proto.Messages().ByName("MsgDepositResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgDepositResponse)(nil) - -type fastReflection_MsgDepositResponse MsgDepositResponse - -func (x *MsgDepositResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDepositResponse)(x) -} - -func (x *MsgDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDepositResponse_messageType fastReflection_MsgDepositResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDepositResponse_messageType{} - -type fastReflection_MsgDepositResponse_messageType struct{} - -func (x fastReflection_MsgDepositResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDepositResponse)(nil) -} -func (x fastReflection_MsgDepositResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDepositResponse) -} -func (x fastReflection_MsgDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDepositResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositResponse -} - -// 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_MsgDepositResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDepositResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDepositResponse) New() protoreflect.Message { - return new(fastReflection_MsgDepositResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDepositResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDepositResponse)(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_MsgDepositResponse) 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_MsgDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDepositResponse 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_MsgDepositResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDepositResponse 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_MsgDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDepositResponse 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_MsgDepositResponse) 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.gov.v1beta1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDepositResponse 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_MsgDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDepositResponse 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_MsgDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1beta1.MsgDepositResponse")) - } - panic(fmt.Errorf("message cosmos.gov.v1beta1.MsgDepositResponse 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_MsgDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1beta1.MsgDepositResponse", 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_MsgDepositResponse) 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_MsgDepositResponse) 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_MsgDepositResponse) 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_MsgDepositResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDepositResponse) - 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().(*MsgDepositResponse) - 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().(*MsgDepositResponse) - 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: MsgDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/gov/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -type MsgSubmitProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Content *anypb.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - InitialDeposit []*v1beta1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` - Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` -} - -func (x *MsgSubmitProposal) Reset() { - *x = MsgSubmitProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitProposal) ProtoMessage() {} - -// Deprecated: Use MsgSubmitProposal.ProtoReflect.Descriptor instead. -func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSubmitProposal) GetContent() *anypb.Any { - if x != nil { - return x.Content - } - return nil -} - -func (x *MsgSubmitProposal) GetInitialDeposit() []*v1beta1.Coin { - if x != nil { - return x.InitialDeposit - } - return nil -} - -func (x *MsgSubmitProposal) GetProposer() string { - if x != nil { - return x.Proposer - } - return "" -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -type MsgSubmitProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *MsgSubmitProposalResponse) Reset() { - *x = MsgSubmitProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitProposalResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgSubmitProposalResponse) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// MsgVote defines a message to cast a vote. -type MsgVote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` -} - -func (x *MsgVote) Reset() { - *x = MsgVote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVote) ProtoMessage() {} - -// Deprecated: Use MsgVote.ProtoReflect.Descriptor instead. -func (*MsgVote) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgVote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgVote) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *MsgVote) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -// MsgVoteResponse defines the Msg/Vote response type. -type MsgVoteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVoteResponse) Reset() { - *x = MsgVoteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteResponse) ProtoMessage() {} - -// Deprecated: Use MsgVoteResponse.ProtoReflect.Descriptor instead. -func (*MsgVoteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgVoteWeighted defines a message to cast a vote. -// -// Since: cosmos-sdk 0.43 -type MsgVoteWeighted struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *MsgVoteWeighted) Reset() { - *x = MsgVoteWeighted{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteWeighted) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteWeighted) ProtoMessage() {} - -// Deprecated: Use MsgVoteWeighted.ProtoReflect.Descriptor instead. -func (*MsgVoteWeighted) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgVoteWeighted) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgVoteWeighted) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *MsgVoteWeighted) GetOptions() []*WeightedVoteOption { - if x != nil { - return x.Options - } - return nil -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -// -// Since: cosmos-sdk 0.43 -type MsgVoteWeightedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVoteWeightedResponse) Reset() { - *x = MsgVoteWeightedResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteWeightedResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteWeightedResponse) ProtoMessage() {} - -// Deprecated: Use MsgVoteWeightedResponse.ProtoReflect.Descriptor instead. -func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -type MsgDeposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgDeposit) Reset() { - *x = MsgDeposit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeposit) ProtoMessage() {} - -// Deprecated: Use MsgDeposit.ProtoReflect.Descriptor instead. -func (*MsgDeposit) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgDeposit) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgDeposit) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} - -func (x *MsgDeposit) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgDepositResponse defines the Msg/Deposit response type. -type MsgDepositResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgDepositResponse) Reset() { - *x = MsgDepositResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_gov_v1beta1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDepositResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDepositResponse) ProtoMessage() {} - -// Deprecated: Use MsgDepositResponse.ProtoReflect.Descriptor instead. -func (*MsgDepositResponse) Descriptor() ([]byte, []int) { - return file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP(), []int{7} -} - -var File_cosmos_gov_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_gov_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 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, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x34, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x3a, 0x1d, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x80, 0xdc, 0x20, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x30, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x22, 0xae, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, - 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x36, - 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1a, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x80, 0xdc, 0x20, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, - 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0f, - 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, - 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x1a, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x80, 0xdc, 0x20, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, - 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x0a, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0f, - 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x80, 0xdc, 0x20, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xec, - 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x66, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, - 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, - 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, - 0x6f, 0x74, 0x65, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x1a, 0x2b, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xcb, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, - 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_gov_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_gov_v1beta1_tx_proto_rawDescData = file_cosmos_gov_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_gov_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_gov_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_gov_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_gov_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_gov_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_gov_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cosmos_gov_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1beta1.MsgSubmitProposal - (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1beta1.MsgSubmitProposalResponse - (*MsgVote)(nil), // 2: cosmos.gov.v1beta1.MsgVote - (*MsgVoteResponse)(nil), // 3: cosmos.gov.v1beta1.MsgVoteResponse - (*MsgVoteWeighted)(nil), // 4: cosmos.gov.v1beta1.MsgVoteWeighted - (*MsgVoteWeightedResponse)(nil), // 5: cosmos.gov.v1beta1.MsgVoteWeightedResponse - (*MsgDeposit)(nil), // 6: cosmos.gov.v1beta1.MsgDeposit - (*MsgDepositResponse)(nil), // 7: cosmos.gov.v1beta1.MsgDepositResponse - (*anypb.Any)(nil), // 8: google.protobuf.Any - (*v1beta1.Coin)(nil), // 9: cosmos.base.v1beta1.Coin - (VoteOption)(0), // 10: cosmos.gov.v1beta1.VoteOption - (*WeightedVoteOption)(nil), // 11: cosmos.gov.v1beta1.WeightedVoteOption -} -var file_cosmos_gov_v1beta1_tx_proto_depIdxs = []int32{ - 8, // 0: cosmos.gov.v1beta1.MsgSubmitProposal.content:type_name -> google.protobuf.Any - 9, // 1: cosmos.gov.v1beta1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 10, // 2: cosmos.gov.v1beta1.MsgVote.option:type_name -> cosmos.gov.v1beta1.VoteOption - 11, // 3: cosmos.gov.v1beta1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1beta1.WeightedVoteOption - 9, // 4: cosmos.gov.v1beta1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 5: cosmos.gov.v1beta1.Msg.SubmitProposal:input_type -> cosmos.gov.v1beta1.MsgSubmitProposal - 2, // 6: cosmos.gov.v1beta1.Msg.Vote:input_type -> cosmos.gov.v1beta1.MsgVote - 4, // 7: cosmos.gov.v1beta1.Msg.VoteWeighted:input_type -> cosmos.gov.v1beta1.MsgVoteWeighted - 6, // 8: cosmos.gov.v1beta1.Msg.Deposit:input_type -> cosmos.gov.v1beta1.MsgDeposit - 1, // 9: cosmos.gov.v1beta1.Msg.SubmitProposal:output_type -> cosmos.gov.v1beta1.MsgSubmitProposalResponse - 3, // 10: cosmos.gov.v1beta1.Msg.Vote:output_type -> cosmos.gov.v1beta1.MsgVoteResponse - 5, // 11: cosmos.gov.v1beta1.Msg.VoteWeighted:output_type -> cosmos.gov.v1beta1.MsgVoteWeightedResponse - 7, // 12: cosmos.gov.v1beta1.Msg.Deposit:output_type -> cosmos.gov.v1beta1.MsgDepositResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_gov_v1beta1_tx_proto_init() } -func file_cosmos_gov_v1beta1_tx_proto_init() { - if File_cosmos_gov_v1beta1_tx_proto != nil { - return - } - file_cosmos_gov_v1beta1_gov_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_gov_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteWeighted); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteWeightedResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeposit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_gov_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDepositResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_gov_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_gov_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_gov_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_gov_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_gov_v1beta1_tx_proto = out.File - file_cosmos_gov_v1beta1_tx_proto_rawDesc = nil - file_cosmos_gov_v1beta1_tx_proto_goTypes = nil - file_cosmos_gov_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/gov/v1beta1/tx_grpc.pb.go b/api/cosmos/gov/v1beta1/tx_grpc.pb.go deleted file mode 100644 index a20bf48ec444..000000000000 --- a/api/cosmos/gov/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/gov/v1beta1/tx.proto - -package govv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // SubmitProposal defines a method to create new proposal given a content. - SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) - // Vote defines a method to add a vote on a specific proposal. - Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - // - // Since: cosmos-sdk 0.43 - VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) - // Deposit defines a method to add deposit on a specific proposal. - Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) { - out := new(MsgSubmitProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/SubmitProposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { - out := new(MsgVoteResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/Vote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) { - out := new(MsgVoteWeightedResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/VoteWeighted", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { - out := new(MsgDepositResponse) - err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/Deposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // SubmitProposal defines a method to create new proposal given a content. - SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) - // Vote defines a method to add a vote on a specific proposal. - Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - // - // Since: cosmos-sdk 0.43 - VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) - // Deposit defines a method to add deposit on a specific proposal. - Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") -} -func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") -} -func (UnimplementedMsgServer) VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteWeighted not implemented") -} -func (UnimplementedMsgServer) Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Msg/SubmitProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitProposal(ctx, req.(*MsgSubmitProposal)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVote) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Vote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Msg/Vote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_VoteWeighted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVoteWeighted) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).VoteWeighted(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Msg/VoteWeighted", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VoteWeighted(ctx, req.(*MsgVoteWeighted)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeposit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Deposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.gov.v1beta1.Msg/Deposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.gov.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitProposal", - Handler: _Msg_SubmitProposal_Handler, - }, - { - MethodName: "Vote", - Handler: _Msg_Vote_Handler, - }, - { - MethodName: "VoteWeighted", - Handler: _Msg_VoteWeighted_Handler, - }, - { - MethodName: "Deposit", - Handler: _Msg_Deposit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/gov/v1beta1/tx.proto", -} diff --git a/api/cosmos/group/v1/events.pulsar.go b/api/cosmos/group/v1/events.pulsar.go deleted file mode 100644 index 9678ef871b90..000000000000 --- a/api/cosmos/group/v1/events.pulsar.go +++ /dev/null @@ -1,4391 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package groupv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_EventCreateGroup protoreflect.MessageDescriptor - fd_EventCreateGroup_group_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventCreateGroup = File_cosmos_group_v1_events_proto.Messages().ByName("EventCreateGroup") - fd_EventCreateGroup_group_id = md_EventCreateGroup.Fields().ByName("group_id") -} - -var _ protoreflect.Message = (*fastReflection_EventCreateGroup)(nil) - -type fastReflection_EventCreateGroup EventCreateGroup - -func (x *EventCreateGroup) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventCreateGroup)(x) -} - -func (x *EventCreateGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventCreateGroup_messageType fastReflection_EventCreateGroup_messageType -var _ protoreflect.MessageType = fastReflection_EventCreateGroup_messageType{} - -type fastReflection_EventCreateGroup_messageType struct{} - -func (x fastReflection_EventCreateGroup_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventCreateGroup)(nil) -} -func (x fastReflection_EventCreateGroup_messageType) New() protoreflect.Message { - return new(fastReflection_EventCreateGroup) -} -func (x fastReflection_EventCreateGroup_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventCreateGroup -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventCreateGroup) Descriptor() protoreflect.MessageDescriptor { - return md_EventCreateGroup -} - -// 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_EventCreateGroup) Type() protoreflect.MessageType { - return _fastReflection_EventCreateGroup_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventCreateGroup) New() protoreflect.Message { - return new(fastReflection_EventCreateGroup) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventCreateGroup) Interface() protoreflect.ProtoMessage { - return (*EventCreateGroup)(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_EventCreateGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_EventCreateGroup_group_id, 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_EventCreateGroup) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroup.group_id": - return x.GroupId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroup 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_EventCreateGroup) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroup.group_id": - x.GroupId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroup 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_EventCreateGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventCreateGroup.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroup 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_EventCreateGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroup.group_id": - x.GroupId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroup 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_EventCreateGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroup.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.EventCreateGroup is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroup 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_EventCreateGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroup.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroup 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_EventCreateGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventCreateGroup", 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_EventCreateGroup) 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_EventCreateGroup) 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_EventCreateGroup) 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_EventCreateGroup) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventCreateGroup) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - 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().(*EventCreateGroup) - 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.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventCreateGroup) - 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: EventCreateGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventCreateGroup: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventUpdateGroup protoreflect.MessageDescriptor - fd_EventUpdateGroup_group_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventUpdateGroup = File_cosmos_group_v1_events_proto.Messages().ByName("EventUpdateGroup") - fd_EventUpdateGroup_group_id = md_EventUpdateGroup.Fields().ByName("group_id") -} - -var _ protoreflect.Message = (*fastReflection_EventUpdateGroup)(nil) - -type fastReflection_EventUpdateGroup EventUpdateGroup - -func (x *EventUpdateGroup) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventUpdateGroup)(x) -} - -func (x *EventUpdateGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventUpdateGroup_messageType fastReflection_EventUpdateGroup_messageType -var _ protoreflect.MessageType = fastReflection_EventUpdateGroup_messageType{} - -type fastReflection_EventUpdateGroup_messageType struct{} - -func (x fastReflection_EventUpdateGroup_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventUpdateGroup)(nil) -} -func (x fastReflection_EventUpdateGroup_messageType) New() protoreflect.Message { - return new(fastReflection_EventUpdateGroup) -} -func (x fastReflection_EventUpdateGroup_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventUpdateGroup -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventUpdateGroup) Descriptor() protoreflect.MessageDescriptor { - return md_EventUpdateGroup -} - -// 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_EventUpdateGroup) Type() protoreflect.MessageType { - return _fastReflection_EventUpdateGroup_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventUpdateGroup) New() protoreflect.Message { - return new(fastReflection_EventUpdateGroup) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventUpdateGroup) Interface() protoreflect.ProtoMessage { - return (*EventUpdateGroup)(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_EventUpdateGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_EventUpdateGroup_group_id, 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_EventUpdateGroup) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroup.group_id": - return x.GroupId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroup 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_EventUpdateGroup) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroup.group_id": - x.GroupId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroup 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_EventUpdateGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventUpdateGroup.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroup 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_EventUpdateGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroup.group_id": - x.GroupId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroup 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_EventUpdateGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroup.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.EventUpdateGroup is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroup 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_EventUpdateGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroup.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroup 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_EventUpdateGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventUpdateGroup", 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_EventUpdateGroup) 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_EventUpdateGroup) 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_EventUpdateGroup) 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_EventUpdateGroup) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventUpdateGroup) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - 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().(*EventUpdateGroup) - 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.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventUpdateGroup) - 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: EventUpdateGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventUpdateGroup: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventCreateGroupPolicy protoreflect.MessageDescriptor - fd_EventCreateGroupPolicy_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventCreateGroupPolicy = File_cosmos_group_v1_events_proto.Messages().ByName("EventCreateGroupPolicy") - fd_EventCreateGroupPolicy_address = md_EventCreateGroupPolicy.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_EventCreateGroupPolicy)(nil) - -type fastReflection_EventCreateGroupPolicy EventCreateGroupPolicy - -func (x *EventCreateGroupPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventCreateGroupPolicy)(x) -} - -func (x *EventCreateGroupPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventCreateGroupPolicy_messageType fastReflection_EventCreateGroupPolicy_messageType -var _ protoreflect.MessageType = fastReflection_EventCreateGroupPolicy_messageType{} - -type fastReflection_EventCreateGroupPolicy_messageType struct{} - -func (x fastReflection_EventCreateGroupPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventCreateGroupPolicy)(nil) -} -func (x fastReflection_EventCreateGroupPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_EventCreateGroupPolicy) -} -func (x fastReflection_EventCreateGroupPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventCreateGroupPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventCreateGroupPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_EventCreateGroupPolicy -} - -// 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_EventCreateGroupPolicy) Type() protoreflect.MessageType { - return _fastReflection_EventCreateGroupPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventCreateGroupPolicy) New() protoreflect.Message { - return new(fastReflection_EventCreateGroupPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventCreateGroupPolicy) Interface() protoreflect.ProtoMessage { - return (*EventCreateGroupPolicy)(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_EventCreateGroupPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_EventCreateGroupPolicy_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EventCreateGroupPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroupPolicy.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroupPolicy 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_EventCreateGroupPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroupPolicy.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroupPolicy 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_EventCreateGroupPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventCreateGroupPolicy.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroupPolicy 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_EventCreateGroupPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroupPolicy.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroupPolicy 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_EventCreateGroupPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroupPolicy.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.EventCreateGroupPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroupPolicy 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_EventCreateGroupPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventCreateGroupPolicy.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventCreateGroupPolicy 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_EventCreateGroupPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventCreateGroupPolicy", 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_EventCreateGroupPolicy) 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_EventCreateGroupPolicy) 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_EventCreateGroupPolicy) 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_EventCreateGroupPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventCreateGroupPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*EventCreateGroupPolicy) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventCreateGroupPolicy) - 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: EventCreateGroupPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventCreateGroupPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_EventUpdateGroupPolicy protoreflect.MessageDescriptor - fd_EventUpdateGroupPolicy_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventUpdateGroupPolicy = File_cosmos_group_v1_events_proto.Messages().ByName("EventUpdateGroupPolicy") - fd_EventUpdateGroupPolicy_address = md_EventUpdateGroupPolicy.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_EventUpdateGroupPolicy)(nil) - -type fastReflection_EventUpdateGroupPolicy EventUpdateGroupPolicy - -func (x *EventUpdateGroupPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventUpdateGroupPolicy)(x) -} - -func (x *EventUpdateGroupPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventUpdateGroupPolicy_messageType fastReflection_EventUpdateGroupPolicy_messageType -var _ protoreflect.MessageType = fastReflection_EventUpdateGroupPolicy_messageType{} - -type fastReflection_EventUpdateGroupPolicy_messageType struct{} - -func (x fastReflection_EventUpdateGroupPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventUpdateGroupPolicy)(nil) -} -func (x fastReflection_EventUpdateGroupPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_EventUpdateGroupPolicy) -} -func (x fastReflection_EventUpdateGroupPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventUpdateGroupPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventUpdateGroupPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_EventUpdateGroupPolicy -} - -// 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_EventUpdateGroupPolicy) Type() protoreflect.MessageType { - return _fastReflection_EventUpdateGroupPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventUpdateGroupPolicy) New() protoreflect.Message { - return new(fastReflection_EventUpdateGroupPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventUpdateGroupPolicy) Interface() protoreflect.ProtoMessage { - return (*EventUpdateGroupPolicy)(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_EventUpdateGroupPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_EventUpdateGroupPolicy_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EventUpdateGroupPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroupPolicy.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroupPolicy 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_EventUpdateGroupPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroupPolicy.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroupPolicy 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_EventUpdateGroupPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventUpdateGroupPolicy.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroupPolicy 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_EventUpdateGroupPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroupPolicy.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroupPolicy 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_EventUpdateGroupPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroupPolicy.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.EventUpdateGroupPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroupPolicy 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_EventUpdateGroupPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventUpdateGroupPolicy.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventUpdateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventUpdateGroupPolicy 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_EventUpdateGroupPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventUpdateGroupPolicy", 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_EventUpdateGroupPolicy) 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_EventUpdateGroupPolicy) 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_EventUpdateGroupPolicy) 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_EventUpdateGroupPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventUpdateGroupPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*EventUpdateGroupPolicy) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventUpdateGroupPolicy) - 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: EventUpdateGroupPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventUpdateGroupPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_EventSubmitProposal protoreflect.MessageDescriptor - fd_EventSubmitProposal_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventSubmitProposal = File_cosmos_group_v1_events_proto.Messages().ByName("EventSubmitProposal") - fd_EventSubmitProposal_proposal_id = md_EventSubmitProposal.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_EventSubmitProposal)(nil) - -type fastReflection_EventSubmitProposal EventSubmitProposal - -func (x *EventSubmitProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventSubmitProposal)(x) -} - -func (x *EventSubmitProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventSubmitProposal_messageType fastReflection_EventSubmitProposal_messageType -var _ protoreflect.MessageType = fastReflection_EventSubmitProposal_messageType{} - -type fastReflection_EventSubmitProposal_messageType struct{} - -func (x fastReflection_EventSubmitProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventSubmitProposal)(nil) -} -func (x fastReflection_EventSubmitProposal_messageType) New() protoreflect.Message { - return new(fastReflection_EventSubmitProposal) -} -func (x fastReflection_EventSubmitProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventSubmitProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventSubmitProposal) Descriptor() protoreflect.MessageDescriptor { - return md_EventSubmitProposal -} - -// 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_EventSubmitProposal) Type() protoreflect.MessageType { - return _fastReflection_EventSubmitProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventSubmitProposal) New() protoreflect.Message { - return new(fastReflection_EventSubmitProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventSubmitProposal) Interface() protoreflect.ProtoMessage { - return (*EventSubmitProposal)(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_EventSubmitProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_EventSubmitProposal_proposal_id, 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_EventSubmitProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventSubmitProposal.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventSubmitProposal 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_EventSubmitProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventSubmitProposal.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventSubmitProposal 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_EventSubmitProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventSubmitProposal.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventSubmitProposal 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_EventSubmitProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventSubmitProposal.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventSubmitProposal 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_EventSubmitProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventSubmitProposal.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.EventSubmitProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventSubmitProposal 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_EventSubmitProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventSubmitProposal.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventSubmitProposal 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_EventSubmitProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventSubmitProposal", 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_EventSubmitProposal) 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_EventSubmitProposal) 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_EventSubmitProposal) 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_EventSubmitProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventSubmitProposal) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*EventSubmitProposal) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventSubmitProposal) - 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: EventSubmitProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventWithdrawProposal protoreflect.MessageDescriptor - fd_EventWithdrawProposal_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventWithdrawProposal = File_cosmos_group_v1_events_proto.Messages().ByName("EventWithdrawProposal") - fd_EventWithdrawProposal_proposal_id = md_EventWithdrawProposal.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_EventWithdrawProposal)(nil) - -type fastReflection_EventWithdrawProposal EventWithdrawProposal - -func (x *EventWithdrawProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventWithdrawProposal)(x) -} - -func (x *EventWithdrawProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_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_EventWithdrawProposal_messageType fastReflection_EventWithdrawProposal_messageType -var _ protoreflect.MessageType = fastReflection_EventWithdrawProposal_messageType{} - -type fastReflection_EventWithdrawProposal_messageType struct{} - -func (x fastReflection_EventWithdrawProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventWithdrawProposal)(nil) -} -func (x fastReflection_EventWithdrawProposal_messageType) New() protoreflect.Message { - return new(fastReflection_EventWithdrawProposal) -} -func (x fastReflection_EventWithdrawProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventWithdrawProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventWithdrawProposal) Descriptor() protoreflect.MessageDescriptor { - return md_EventWithdrawProposal -} - -// 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_EventWithdrawProposal) Type() protoreflect.MessageType { - return _fastReflection_EventWithdrawProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventWithdrawProposal) New() protoreflect.Message { - return new(fastReflection_EventWithdrawProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventWithdrawProposal) Interface() protoreflect.ProtoMessage { - return (*EventWithdrawProposal)(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_EventWithdrawProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_EventWithdrawProposal_proposal_id, 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_EventWithdrawProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventWithdrawProposal.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventWithdrawProposal 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_EventWithdrawProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventWithdrawProposal.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventWithdrawProposal 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_EventWithdrawProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventWithdrawProposal.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventWithdrawProposal 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_EventWithdrawProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventWithdrawProposal.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventWithdrawProposal 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_EventWithdrawProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventWithdrawProposal.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.EventWithdrawProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventWithdrawProposal 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_EventWithdrawProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventWithdrawProposal.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventWithdrawProposal 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_EventWithdrawProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventWithdrawProposal", 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_EventWithdrawProposal) 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_EventWithdrawProposal) 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_EventWithdrawProposal) 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_EventWithdrawProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventWithdrawProposal) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*EventWithdrawProposal) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventWithdrawProposal) - 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: EventWithdrawProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventVote protoreflect.MessageDescriptor - fd_EventVote_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventVote = File_cosmos_group_v1_events_proto.Messages().ByName("EventVote") - fd_EventVote_proposal_id = md_EventVote.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_EventVote)(nil) - -type fastReflection_EventVote EventVote - -func (x *EventVote) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventVote)(x) -} - -func (x *EventVote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_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_EventVote_messageType fastReflection_EventVote_messageType -var _ protoreflect.MessageType = fastReflection_EventVote_messageType{} - -type fastReflection_EventVote_messageType struct{} - -func (x fastReflection_EventVote_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventVote)(nil) -} -func (x fastReflection_EventVote_messageType) New() protoreflect.Message { - return new(fastReflection_EventVote) -} -func (x fastReflection_EventVote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventVote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventVote) Descriptor() protoreflect.MessageDescriptor { - return md_EventVote -} - -// 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_EventVote) Type() protoreflect.MessageType { - return _fastReflection_EventVote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventVote) New() protoreflect.Message { - return new(fastReflection_EventVote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventVote) Interface() protoreflect.ProtoMessage { - return (*EventVote)(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_EventVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_EventVote_proposal_id, 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_EventVote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventVote.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventVote 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_EventVote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventVote.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventVote 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_EventVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventVote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventVote 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_EventVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventVote.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventVote 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_EventVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventVote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.EventVote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventVote 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_EventVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventVote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventVote 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_EventVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventVote", 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_EventVote) 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_EventVote) 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_EventVote) 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_EventVote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventVote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*EventVote) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventVote) - 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: EventVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventExec protoreflect.MessageDescriptor - fd_EventExec_proposal_id protoreflect.FieldDescriptor - fd_EventExec_result protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventExec = File_cosmos_group_v1_events_proto.Messages().ByName("EventExec") - fd_EventExec_proposal_id = md_EventExec.Fields().ByName("proposal_id") - fd_EventExec_result = md_EventExec.Fields().ByName("result") -} - -var _ protoreflect.Message = (*fastReflection_EventExec)(nil) - -type fastReflection_EventExec EventExec - -func (x *EventExec) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventExec)(x) -} - -func (x *EventExec) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventExec_messageType fastReflection_EventExec_messageType -var _ protoreflect.MessageType = fastReflection_EventExec_messageType{} - -type fastReflection_EventExec_messageType struct{} - -func (x fastReflection_EventExec_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventExec)(nil) -} -func (x fastReflection_EventExec_messageType) New() protoreflect.Message { - return new(fastReflection_EventExec) -} -func (x fastReflection_EventExec_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventExec -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventExec) Descriptor() protoreflect.MessageDescriptor { - return md_EventExec -} - -// 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_EventExec) Type() protoreflect.MessageType { - return _fastReflection_EventExec_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventExec) New() protoreflect.Message { - return new(fastReflection_EventExec) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventExec) Interface() protoreflect.ProtoMessage { - return (*EventExec)(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_EventExec) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_EventExec_proposal_id, value) { - return - } - } - if x.Result != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Result)) - if !f(fd_EventExec_result, 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_EventExec) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventExec.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.EventExec.result": - return x.Result != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventExec 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_EventExec) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventExec.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.EventExec.result": - x.Result = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventExec 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_EventExec) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventExec.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.EventExec.result": - value := x.Result - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventExec 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_EventExec) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventExec.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.EventExec.result": - x.Result = (ProposalExecutorResult)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventExec 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_EventExec) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventExec.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.EventExec is not mutable")) - case "cosmos.group.v1.EventExec.result": - panic(fmt.Errorf("field result of message cosmos.group.v1.EventExec is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventExec 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_EventExec) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventExec.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.EventExec.result": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventExec 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_EventExec) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventExec", 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_EventExec) 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_EventExec) 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_EventExec) 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_EventExec) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventExec) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Result != 0 { - n += 1 + runtime.Sov(uint64(x.Result)) - } - 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().(*EventExec) - 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.Result != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) - i-- - dAtA[i] = 0x10 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventExec) - 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: EventExec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventExec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - x.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Result |= ProposalExecutorResult(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventLeaveGroup protoreflect.MessageDescriptor - fd_EventLeaveGroup_group_id protoreflect.FieldDescriptor - fd_EventLeaveGroup_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_events_proto_init() - md_EventLeaveGroup = File_cosmos_group_v1_events_proto.Messages().ByName("EventLeaveGroup") - fd_EventLeaveGroup_group_id = md_EventLeaveGroup.Fields().ByName("group_id") - fd_EventLeaveGroup_address = md_EventLeaveGroup.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_EventLeaveGroup)(nil) - -type fastReflection_EventLeaveGroup EventLeaveGroup - -func (x *EventLeaveGroup) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventLeaveGroup)(x) -} - -func (x *EventLeaveGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_events_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventLeaveGroup_messageType fastReflection_EventLeaveGroup_messageType -var _ protoreflect.MessageType = fastReflection_EventLeaveGroup_messageType{} - -type fastReflection_EventLeaveGroup_messageType struct{} - -func (x fastReflection_EventLeaveGroup_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventLeaveGroup)(nil) -} -func (x fastReflection_EventLeaveGroup_messageType) New() protoreflect.Message { - return new(fastReflection_EventLeaveGroup) -} -func (x fastReflection_EventLeaveGroup_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventLeaveGroup -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventLeaveGroup) Descriptor() protoreflect.MessageDescriptor { - return md_EventLeaveGroup -} - -// 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_EventLeaveGroup) Type() protoreflect.MessageType { - return _fastReflection_EventLeaveGroup_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventLeaveGroup) New() protoreflect.Message { - return new(fastReflection_EventLeaveGroup) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventLeaveGroup) Interface() protoreflect.ProtoMessage { - return (*EventLeaveGroup)(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_EventLeaveGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_EventLeaveGroup_group_id, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_EventLeaveGroup_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EventLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.EventLeaveGroup.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.EventLeaveGroup.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventLeaveGroup 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_EventLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.EventLeaveGroup.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.EventLeaveGroup.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventLeaveGroup 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_EventLeaveGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.EventLeaveGroup.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.EventLeaveGroup.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventLeaveGroup 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_EventLeaveGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.EventLeaveGroup.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.EventLeaveGroup.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventLeaveGroup 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_EventLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventLeaveGroup.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.EventLeaveGroup is not mutable")) - case "cosmos.group.v1.EventLeaveGroup.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.EventLeaveGroup is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventLeaveGroup 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_EventLeaveGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.EventLeaveGroup.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.EventLeaveGroup.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.EventLeaveGroup 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_EventLeaveGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.EventLeaveGroup", 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_EventLeaveGroup) 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_EventLeaveGroup) 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_EventLeaveGroup) 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_EventLeaveGroup) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventLeaveGroup) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventLeaveGroup) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventLeaveGroup) - 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: EventLeaveGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventLeaveGroup: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/group/v1/events.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// EventCreateGroup is an event emitted when a group is created. -type EventCreateGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` -} - -func (x *EventCreateGroup) Reset() { - *x = EventCreateGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventCreateGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventCreateGroup) ProtoMessage() {} - -// Deprecated: Use EventCreateGroup.ProtoReflect.Descriptor instead. -func (*EventCreateGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{0} -} - -func (x *EventCreateGroup) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -// EventUpdateGroup is an event emitted when a group is updated. -type EventUpdateGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` -} - -func (x *EventUpdateGroup) Reset() { - *x = EventUpdateGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventUpdateGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventUpdateGroup) ProtoMessage() {} - -// Deprecated: Use EventUpdateGroup.ProtoReflect.Descriptor instead. -func (*EventUpdateGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{1} -} - -func (x *EventUpdateGroup) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -// EventCreateGroupPolicy is an event emitted when a group policy is created. -type EventCreateGroupPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of the group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *EventCreateGroupPolicy) Reset() { - *x = EventCreateGroupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventCreateGroupPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventCreateGroupPolicy) ProtoMessage() {} - -// Deprecated: Use EventCreateGroupPolicy.ProtoReflect.Descriptor instead. -func (*EventCreateGroupPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{2} -} - -func (x *EventCreateGroupPolicy) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// EventUpdateGroupPolicy is an event emitted when a group policy is updated. -type EventUpdateGroupPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of the group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *EventUpdateGroupPolicy) Reset() { - *x = EventUpdateGroupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventUpdateGroupPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventUpdateGroupPolicy) ProtoMessage() {} - -// Deprecated: Use EventUpdateGroupPolicy.ProtoReflect.Descriptor instead. -func (*EventUpdateGroupPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{3} -} - -func (x *EventUpdateGroupPolicy) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// EventSubmitProposal is an event emitted when a proposal is created. -type EventSubmitProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *EventSubmitProposal) Reset() { - *x = EventSubmitProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventSubmitProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventSubmitProposal) ProtoMessage() {} - -// Deprecated: Use EventSubmitProposal.ProtoReflect.Descriptor instead. -func (*EventSubmitProposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{4} -} - -func (x *EventSubmitProposal) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// EventWithdrawProposal is an event emitted when a proposal is withdrawn. -type EventWithdrawProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *EventWithdrawProposal) Reset() { - *x = EventWithdrawProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventWithdrawProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventWithdrawProposal) ProtoMessage() {} - -// Deprecated: Use EventWithdrawProposal.ProtoReflect.Descriptor instead. -func (*EventWithdrawProposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{5} -} - -func (x *EventWithdrawProposal) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// EventVote is an event emitted when a voter votes on a proposal. -type EventVote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *EventVote) Reset() { - *x = EventVote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventVote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventVote) ProtoMessage() {} - -// Deprecated: Use EventVote.ProtoReflect.Descriptor instead. -func (*EventVote) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{6} -} - -func (x *EventVote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// EventExec is an event emitted when a proposal is executed. -type EventExec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // result is the proposal execution result. - Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` -} - -func (x *EventExec) Reset() { - *x = EventExec{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventExec) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventExec) ProtoMessage() {} - -// Deprecated: Use EventExec.ProtoReflect.Descriptor instead. -func (*EventExec) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{7} -} - -func (x *EventExec) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *EventExec) GetResult() ProposalExecutorResult { - if x != nil { - return x.Result - } - return ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED -} - -// EventLeaveGroup is an event emitted when group member leaves the group. -type EventLeaveGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // address is the account address of the group member. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *EventLeaveGroup) Reset() { - *x = EventLeaveGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_events_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventLeaveGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventLeaveGroup) ProtoMessage() {} - -// Deprecated: Use EventLeaveGroup.ProtoReflect.Descriptor instead. -func (*EventLeaveGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_events_proto_rawDescGZIP(), []int{8} -} - -func (x *EventLeaveGroup) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *EventLeaveGroup) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -var File_cosmos_group_v1_events_proto protoreflect.FileDescriptor - -var file_cosmos_group_v1_events_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x16, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x4c, 0x0a, 0x16, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x36, 0x0a, 0x13, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x74, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x22, 0x6d, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x3f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0x60, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x32, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x42, 0xba, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_group_v1_events_proto_rawDescOnce sync.Once - file_cosmos_group_v1_events_proto_rawDescData = file_cosmos_group_v1_events_proto_rawDesc -) - -func file_cosmos_group_v1_events_proto_rawDescGZIP() []byte { - file_cosmos_group_v1_events_proto_rawDescOnce.Do(func() { - file_cosmos_group_v1_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_group_v1_events_proto_rawDescData) - }) - return file_cosmos_group_v1_events_proto_rawDescData -} - -var file_cosmos_group_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_cosmos_group_v1_events_proto_goTypes = []interface{}{ - (*EventCreateGroup)(nil), // 0: cosmos.group.v1.EventCreateGroup - (*EventUpdateGroup)(nil), // 1: cosmos.group.v1.EventUpdateGroup - (*EventCreateGroupPolicy)(nil), // 2: cosmos.group.v1.EventCreateGroupPolicy - (*EventUpdateGroupPolicy)(nil), // 3: cosmos.group.v1.EventUpdateGroupPolicy - (*EventSubmitProposal)(nil), // 4: cosmos.group.v1.EventSubmitProposal - (*EventWithdrawProposal)(nil), // 5: cosmos.group.v1.EventWithdrawProposal - (*EventVote)(nil), // 6: cosmos.group.v1.EventVote - (*EventExec)(nil), // 7: cosmos.group.v1.EventExec - (*EventLeaveGroup)(nil), // 8: cosmos.group.v1.EventLeaveGroup - (ProposalExecutorResult)(0), // 9: cosmos.group.v1.ProposalExecutorResult -} -var file_cosmos_group_v1_events_proto_depIdxs = []int32{ - 9, // 0: cosmos.group.v1.EventExec.result:type_name -> cosmos.group.v1.ProposalExecutorResult - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_group_v1_events_proto_init() } -func file_cosmos_group_v1_events_proto_init() { - if File_cosmos_group_v1_events_proto != nil { - return - } - file_cosmos_group_v1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_group_v1_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventCreateGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventUpdateGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventCreateGroupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventUpdateGroupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventSubmitProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventWithdrawProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventVote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventExec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_events_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventLeaveGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_group_v1_events_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_group_v1_events_proto_goTypes, - DependencyIndexes: file_cosmos_group_v1_events_proto_depIdxs, - MessageInfos: file_cosmos_group_v1_events_proto_msgTypes, - }.Build() - File_cosmos_group_v1_events_proto = out.File - file_cosmos_group_v1_events_proto_rawDesc = nil - file_cosmos_group_v1_events_proto_goTypes = nil - file_cosmos_group_v1_events_proto_depIdxs = nil -} diff --git a/api/cosmos/group/v1/genesis.pulsar.go b/api/cosmos/group/v1/genesis.pulsar.go deleted file mode 100644 index 4993a5a826a9..000000000000 --- a/api/cosmos/group/v1/genesis.pulsar.go +++ /dev/null @@ -1,1442 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package groupv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*GroupInfo -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupInfo) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(GroupInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(GroupInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*GroupMember -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupMember) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupMember) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(GroupMember) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(GroupMember) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_5_list)(nil) - -type _GenesisState_5_list struct { - list *[]*GroupPolicyInfo -} - -func (x *_GenesisState_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupPolicyInfo) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupPolicyInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { - v := new(GroupPolicyInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_5_list) NewElement() protoreflect.Value { - v := new(GroupPolicyInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_7_list)(nil) - -type _GenesisState_7_list struct { - list *[]*Proposal -} - -func (x *_GenesisState_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { - v := new(Proposal) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_7_list) NewElement() protoreflect.Value { - v := new(Proposal) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_8_list)(nil) - -type _GenesisState_8_list struct { - list *[]*Vote -} - -func (x *_GenesisState_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_8_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_8_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_8_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_group_seq protoreflect.FieldDescriptor - fd_GenesisState_groups protoreflect.FieldDescriptor - fd_GenesisState_group_members protoreflect.FieldDescriptor - fd_GenesisState_group_policy_seq protoreflect.FieldDescriptor - fd_GenesisState_group_policies protoreflect.FieldDescriptor - fd_GenesisState_proposal_seq protoreflect.FieldDescriptor - fd_GenesisState_proposals protoreflect.FieldDescriptor - fd_GenesisState_votes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_genesis_proto_init() - md_GenesisState = File_cosmos_group_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_group_seq = md_GenesisState.Fields().ByName("group_seq") - fd_GenesisState_groups = md_GenesisState.Fields().ByName("groups") - fd_GenesisState_group_members = md_GenesisState.Fields().ByName("group_members") - fd_GenesisState_group_policy_seq = md_GenesisState.Fields().ByName("group_policy_seq") - fd_GenesisState_group_policies = md_GenesisState.Fields().ByName("group_policies") - fd_GenesisState_proposal_seq = md_GenesisState.Fields().ByName("proposal_seq") - fd_GenesisState_proposals = md_GenesisState.Fields().ByName("proposals") - fd_GenesisState_votes = md_GenesisState.Fields().ByName("votes") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupSeq != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupSeq) - if !f(fd_GenesisState_group_seq, value) { - return - } - } - if len(x.Groups) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Groups}) - if !f(fd_GenesisState_groups, value) { - return - } - } - if len(x.GroupMembers) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.GroupMembers}) - if !f(fd_GenesisState_group_members, value) { - return - } - } - if x.GroupPolicySeq != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupPolicySeq) - if !f(fd_GenesisState_group_policy_seq, value) { - return - } - } - if len(x.GroupPolicies) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.GroupPolicies}) - if !f(fd_GenesisState_group_policies, value) { - return - } - } - if x.ProposalSeq != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalSeq) - if !f(fd_GenesisState_proposal_seq, value) { - return - } - } - if len(x.Proposals) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.Proposals}) - if !f(fd_GenesisState_proposals, value) { - return - } - } - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_8_list{list: &x.Votes}) - if !f(fd_GenesisState_votes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.GenesisState.group_seq": - return x.GroupSeq != uint64(0) - case "cosmos.group.v1.GenesisState.groups": - return len(x.Groups) != 0 - case "cosmos.group.v1.GenesisState.group_members": - return len(x.GroupMembers) != 0 - case "cosmos.group.v1.GenesisState.group_policy_seq": - return x.GroupPolicySeq != uint64(0) - case "cosmos.group.v1.GenesisState.group_policies": - return len(x.GroupPolicies) != 0 - case "cosmos.group.v1.GenesisState.proposal_seq": - return x.ProposalSeq != uint64(0) - case "cosmos.group.v1.GenesisState.proposals": - return len(x.Proposals) != 0 - case "cosmos.group.v1.GenesisState.votes": - return len(x.Votes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.group.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.GenesisState.group_seq": - x.GroupSeq = uint64(0) - case "cosmos.group.v1.GenesisState.groups": - x.Groups = nil - case "cosmos.group.v1.GenesisState.group_members": - x.GroupMembers = nil - case "cosmos.group.v1.GenesisState.group_policy_seq": - x.GroupPolicySeq = uint64(0) - case "cosmos.group.v1.GenesisState.group_policies": - x.GroupPolicies = nil - case "cosmos.group.v1.GenesisState.proposal_seq": - x.ProposalSeq = uint64(0) - case "cosmos.group.v1.GenesisState.proposals": - x.Proposals = nil - case "cosmos.group.v1.GenesisState.votes": - x.Votes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.group.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.GenesisState.group_seq": - value := x.GroupSeq - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GenesisState.groups": - if len(x.Groups) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.Groups} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.GenesisState.group_members": - if len(x.GroupMembers) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.GroupMembers} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.GenesisState.group_policy_seq": - value := x.GroupPolicySeq - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GenesisState.group_policies": - if len(x.GroupPolicies) == 0 { - return protoreflect.ValueOfList(&_GenesisState_5_list{}) - } - listValue := &_GenesisState_5_list{list: &x.GroupPolicies} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.GenesisState.proposal_seq": - value := x.ProposalSeq - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GenesisState.proposals": - if len(x.Proposals) == 0 { - return protoreflect.ValueOfList(&_GenesisState_7_list{}) - } - listValue := &_GenesisState_7_list{list: &x.Proposals} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.GenesisState.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_GenesisState_8_list{}) - } - listValue := &_GenesisState_8_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.group.v1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.GenesisState.group_seq": - x.GroupSeq = value.Uint() - case "cosmos.group.v1.GenesisState.groups": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Groups = *clv.list - case "cosmos.group.v1.GenesisState.group_members": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.GroupMembers = *clv.list - case "cosmos.group.v1.GenesisState.group_policy_seq": - x.GroupPolicySeq = value.Uint() - case "cosmos.group.v1.GenesisState.group_policies": - lv := value.List() - clv := lv.(*_GenesisState_5_list) - x.GroupPolicies = *clv.list - case "cosmos.group.v1.GenesisState.proposal_seq": - x.ProposalSeq = value.Uint() - case "cosmos.group.v1.GenesisState.proposals": - lv := value.List() - clv := lv.(*_GenesisState_7_list) - x.Proposals = *clv.list - case "cosmos.group.v1.GenesisState.votes": - lv := value.List() - clv := lv.(*_GenesisState_8_list) - x.Votes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.group.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GenesisState.groups": - if x.Groups == nil { - x.Groups = []*GroupInfo{} - } - value := &_GenesisState_2_list{list: &x.Groups} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.GenesisState.group_members": - if x.GroupMembers == nil { - x.GroupMembers = []*GroupMember{} - } - value := &_GenesisState_3_list{list: &x.GroupMembers} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.GenesisState.group_policies": - if x.GroupPolicies == nil { - x.GroupPolicies = []*GroupPolicyInfo{} - } - value := &_GenesisState_5_list{list: &x.GroupPolicies} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.GenesisState.proposals": - if x.Proposals == nil { - x.Proposals = []*Proposal{} - } - value := &_GenesisState_7_list{list: &x.Proposals} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.GenesisState.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_GenesisState_8_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.GenesisState.group_seq": - panic(fmt.Errorf("field group_seq of message cosmos.group.v1.GenesisState is not mutable")) - case "cosmos.group.v1.GenesisState.group_policy_seq": - panic(fmt.Errorf("field group_policy_seq of message cosmos.group.v1.GenesisState is not mutable")) - case "cosmos.group.v1.GenesisState.proposal_seq": - panic(fmt.Errorf("field proposal_seq of message cosmos.group.v1.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.group.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GenesisState.group_seq": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GenesisState.groups": - list := []*GroupInfo{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "cosmos.group.v1.GenesisState.group_members": - list := []*GroupMember{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "cosmos.group.v1.GenesisState.group_policy_seq": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GenesisState.group_policies": - list := []*GroupPolicyInfo{} - return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) - case "cosmos.group.v1.GenesisState.proposal_seq": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GenesisState.proposals": - list := []*Proposal{} - return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) - case "cosmos.group.v1.GenesisState.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_GenesisState_8_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.group.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.GroupSeq != 0 { - n += 1 + runtime.Sov(uint64(x.GroupSeq)) - } - if len(x.Groups) > 0 { - for _, e := range x.Groups { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.GroupMembers) > 0 { - for _, e := range x.GroupMembers { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.GroupPolicySeq != 0 { - n += 1 + runtime.Sov(uint64(x.GroupPolicySeq)) - } - if len(x.GroupPolicies) > 0 { - for _, e := range x.GroupPolicies { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ProposalSeq != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalSeq)) - } - if len(x.Proposals) > 0 { - for _, e := range x.Proposals { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.Proposals) > 0 { - for iNdEx := len(x.Proposals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Proposals[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.ProposalSeq != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalSeq)) - i-- - dAtA[i] = 0x30 - } - if len(x.GroupPolicies) > 0 { - for iNdEx := len(x.GroupPolicies) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GroupPolicies[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if x.GroupPolicySeq != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupPolicySeq)) - i-- - dAtA[i] = 0x20 - } - if len(x.GroupMembers) > 0 { - for iNdEx := len(x.GroupMembers) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GroupMembers[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Groups) > 0 { - for iNdEx := len(x.Groups) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Groups[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.GroupSeq != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupSeq)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupSeq", wireType) - } - x.GroupSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupSeq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Groups = append(x.Groups, &GroupInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Groups[len(x.Groups)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupMembers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GroupMembers = append(x.GroupMembers, &GroupMember{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GroupMembers[len(x.GroupMembers)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicySeq", wireType) - } - x.GroupPolicySeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupPolicySeq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GroupPolicies = append(x.GroupPolicies, &GroupPolicyInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GroupPolicies[len(x.GroupPolicies)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalSeq", wireType) - } - x.ProposalSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalSeq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Proposals = append(x.Proposals, &Proposal{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposals[len(x.Proposals)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/group/v1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the group module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_seq is the group table orm.Sequence, - // it is used to get the next group ID. - GroupSeq uint64 `protobuf:"varint,1,opt,name=group_seq,json=groupSeq,proto3" json:"group_seq,omitempty"` - // groups is the list of groups info. - Groups []*GroupInfo `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` - // group_members is the list of groups members. - GroupMembers []*GroupMember `protobuf:"bytes,3,rep,name=group_members,json=groupMembers,proto3" json:"group_members,omitempty"` - // group_policy_seq is the group policy table orm.Sequence, - // it is used to generate the next group policy account address. - GroupPolicySeq uint64 `protobuf:"varint,4,opt,name=group_policy_seq,json=groupPolicySeq,proto3" json:"group_policy_seq,omitempty"` - // group_policies is the list of group policies info. - GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,5,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"` - // proposal_seq is the proposal table orm.Sequence, - // it is used to get the next proposal ID. - ProposalSeq uint64 `protobuf:"varint,6,opt,name=proposal_seq,json=proposalSeq,proto3" json:"proposal_seq,omitempty"` - // proposals is the list of proposals. - Proposals []*Proposal `protobuf:"bytes,7,rep,name=proposals,proto3" json:"proposals,omitempty"` - // votes is the list of votes. - Votes []*Vote `protobuf:"bytes,8,rep,name=votes,proto3" json:"votes,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetGroupSeq() uint64 { - if x != nil { - return x.GroupSeq - } - return 0 -} - -func (x *GenesisState) GetGroups() []*GroupInfo { - if x != nil { - return x.Groups - } - return nil -} - -func (x *GenesisState) GetGroupMembers() []*GroupMember { - if x != nil { - return x.GroupMembers - } - return nil -} - -func (x *GenesisState) GetGroupPolicySeq() uint64 { - if x != nil { - return x.GroupPolicySeq - } - return 0 -} - -func (x *GenesisState) GetGroupPolicies() []*GroupPolicyInfo { - if x != nil { - return x.GroupPolicies - } - return nil -} - -func (x *GenesisState) GetProposalSeq() uint64 { - if x != nil { - return x.ProposalSeq - } - return 0 -} - -func (x *GenesisState) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -func (x *GenesisState) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -var File_cosmos_group_v1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_group_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x03, - 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x71, 0x12, 0x32, 0x0a, 0x06, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, - 0x41, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x71, 0x12, 0x47, 0x0a, 0x0e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x42, 0xbb, - 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_group_v1_genesis_proto_rawDescOnce sync.Once - file_cosmos_group_v1_genesis_proto_rawDescData = file_cosmos_group_v1_genesis_proto_rawDesc -) - -func file_cosmos_group_v1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_group_v1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_group_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_group_v1_genesis_proto_rawDescData) - }) - return file_cosmos_group_v1_genesis_proto_rawDescData -} - -var file_cosmos_group_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_group_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.group.v1.GenesisState - (*GroupInfo)(nil), // 1: cosmos.group.v1.GroupInfo - (*GroupMember)(nil), // 2: cosmos.group.v1.GroupMember - (*GroupPolicyInfo)(nil), // 3: cosmos.group.v1.GroupPolicyInfo - (*Proposal)(nil), // 4: cosmos.group.v1.Proposal - (*Vote)(nil), // 5: cosmos.group.v1.Vote -} -var file_cosmos_group_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.group.v1.GenesisState.groups:type_name -> cosmos.group.v1.GroupInfo - 2, // 1: cosmos.group.v1.GenesisState.group_members:type_name -> cosmos.group.v1.GroupMember - 3, // 2: cosmos.group.v1.GenesisState.group_policies:type_name -> cosmos.group.v1.GroupPolicyInfo - 4, // 3: cosmos.group.v1.GenesisState.proposals:type_name -> cosmos.group.v1.Proposal - 5, // 4: cosmos.group.v1.GenesisState.votes:type_name -> cosmos.group.v1.Vote - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_group_v1_genesis_proto_init() } -func file_cosmos_group_v1_genesis_proto_init() { - if File_cosmos_group_v1_genesis_proto != nil { - return - } - file_cosmos_group_v1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_group_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_group_v1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_group_v1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_group_v1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_group_v1_genesis_proto_msgTypes, - }.Build() - File_cosmos_group_v1_genesis_proto = out.File - file_cosmos_group_v1_genesis_proto_rawDesc = nil - file_cosmos_group_v1_genesis_proto_goTypes = nil - file_cosmos_group_v1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/group/v1/query.pulsar.go b/api/cosmos/group/v1/query.pulsar.go deleted file mode 100644 index 24c8b4479d5f..000000000000 --- a/api/cosmos/group/v1/query.pulsar.go +++ /dev/null @@ -1,14770 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package groupv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryGroupInfoRequest protoreflect.MessageDescriptor - fd_QueryGroupInfoRequest_group_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupInfoRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupInfoRequest") - fd_QueryGroupInfoRequest_group_id = md_QueryGroupInfoRequest.Fields().ByName("group_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupInfoRequest)(nil) - -type fastReflection_QueryGroupInfoRequest QueryGroupInfoRequest - -func (x *QueryGroupInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupInfoRequest)(x) -} - -func (x *QueryGroupInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupInfoRequest_messageType fastReflection_QueryGroupInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupInfoRequest_messageType{} - -type fastReflection_QueryGroupInfoRequest_messageType struct{} - -func (x fastReflection_QueryGroupInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupInfoRequest)(nil) -} -func (x fastReflection_QueryGroupInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupInfoRequest) -} -func (x fastReflection_QueryGroupInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupInfoRequest -} - -// 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_QueryGroupInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupInfoRequest)(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_QueryGroupInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_QueryGroupInfoRequest_group_id, 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_QueryGroupInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoRequest.group_id": - return x.GroupId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoRequest 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_QueryGroupInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoRequest.group_id": - x.GroupId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoRequest 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_QueryGroupInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupInfoRequest.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoRequest 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_QueryGroupInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoRequest.group_id": - x.GroupId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoRequest 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_QueryGroupInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoRequest.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.QueryGroupInfoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoRequest 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_QueryGroupInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoRequest.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoRequest 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_QueryGroupInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupInfoRequest", 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_QueryGroupInfoRequest) 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_QueryGroupInfoRequest) 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_QueryGroupInfoRequest) 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_QueryGroupInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupInfoRequest) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - 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().(*QueryGroupInfoRequest) - 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.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupInfoRequest) - 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: QueryGroupInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGroupInfoResponse protoreflect.MessageDescriptor - fd_QueryGroupInfoResponse_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupInfoResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupInfoResponse") - fd_QueryGroupInfoResponse_info = md_QueryGroupInfoResponse.Fields().ByName("info") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupInfoResponse)(nil) - -type fastReflection_QueryGroupInfoResponse QueryGroupInfoResponse - -func (x *QueryGroupInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupInfoResponse)(x) -} - -func (x *QueryGroupInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupInfoResponse_messageType fastReflection_QueryGroupInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupInfoResponse_messageType{} - -type fastReflection_QueryGroupInfoResponse_messageType struct{} - -func (x fastReflection_QueryGroupInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupInfoResponse)(nil) -} -func (x fastReflection_QueryGroupInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupInfoResponse) -} -func (x fastReflection_QueryGroupInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupInfoResponse -} - -// 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_QueryGroupInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupInfoResponse)(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_QueryGroupInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Info != nil { - value := protoreflect.ValueOfMessage(x.Info.ProtoReflect()) - if !f(fd_QueryGroupInfoResponse_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGroupInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoResponse.info": - return x.Info != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoResponse 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_QueryGroupInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoResponse.info": - x.Info = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoResponse 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_QueryGroupInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupInfoResponse.info": - value := x.Info - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoResponse 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_QueryGroupInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoResponse.info": - x.Info = value.Message().Interface().(*GroupInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoResponse 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_QueryGroupInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoResponse.info": - if x.Info == nil { - x.Info = new(GroupInfo) - } - return protoreflect.ValueOfMessage(x.Info.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoResponse 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_QueryGroupInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupInfoResponse.info": - m := new(GroupInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupInfoResponse 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_QueryGroupInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupInfoResponse", 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_QueryGroupInfoResponse) 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_QueryGroupInfoResponse) 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_QueryGroupInfoResponse) 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_QueryGroupInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupInfoResponse) - 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.Info != nil { - l = options.Size(x.Info) - 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().(*QueryGroupInfoResponse) - 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.Info != nil { - encoded, err := options.Marshal(x.Info) - 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().(*QueryGroupInfoResponse) - 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: QueryGroupInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupInfoResponse: 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 Info", 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.Info == nil { - x.Info = &GroupInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info); 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_QueryGroupPolicyInfoRequest protoreflect.MessageDescriptor - fd_QueryGroupPolicyInfoRequest_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupPolicyInfoRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupPolicyInfoRequest") - fd_QueryGroupPolicyInfoRequest_address = md_QueryGroupPolicyInfoRequest.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupPolicyInfoRequest)(nil) - -type fastReflection_QueryGroupPolicyInfoRequest QueryGroupPolicyInfoRequest - -func (x *QueryGroupPolicyInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupPolicyInfoRequest)(x) -} - -func (x *QueryGroupPolicyInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupPolicyInfoRequest_messageType fastReflection_QueryGroupPolicyInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupPolicyInfoRequest_messageType{} - -type fastReflection_QueryGroupPolicyInfoRequest_messageType struct{} - -func (x fastReflection_QueryGroupPolicyInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupPolicyInfoRequest)(nil) -} -func (x fastReflection_QueryGroupPolicyInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupPolicyInfoRequest) -} -func (x fastReflection_QueryGroupPolicyInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPolicyInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupPolicyInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPolicyInfoRequest -} - -// 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_QueryGroupPolicyInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupPolicyInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupPolicyInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupPolicyInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupPolicyInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupPolicyInfoRequest)(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_QueryGroupPolicyInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryGroupPolicyInfoRequest_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGroupPolicyInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoRequest.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoRequest 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_QueryGroupPolicyInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoRequest.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoRequest 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_QueryGroupPolicyInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoRequest 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_QueryGroupPolicyInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoRequest.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoRequest 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_QueryGroupPolicyInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoRequest.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.QueryGroupPolicyInfoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoRequest 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_QueryGroupPolicyInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoRequest.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoRequest 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_QueryGroupPolicyInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupPolicyInfoRequest", 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_QueryGroupPolicyInfoRequest) 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_QueryGroupPolicyInfoRequest) 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_QueryGroupPolicyInfoRequest) 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_QueryGroupPolicyInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupPolicyInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*QueryGroupPolicyInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupPolicyInfoRequest) - 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: QueryGroupPolicyInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupPolicyInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_QueryGroupPolicyInfoResponse protoreflect.MessageDescriptor - fd_QueryGroupPolicyInfoResponse_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupPolicyInfoResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupPolicyInfoResponse") - fd_QueryGroupPolicyInfoResponse_info = md_QueryGroupPolicyInfoResponse.Fields().ByName("info") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupPolicyInfoResponse)(nil) - -type fastReflection_QueryGroupPolicyInfoResponse QueryGroupPolicyInfoResponse - -func (x *QueryGroupPolicyInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupPolicyInfoResponse)(x) -} - -func (x *QueryGroupPolicyInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupPolicyInfoResponse_messageType fastReflection_QueryGroupPolicyInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupPolicyInfoResponse_messageType{} - -type fastReflection_QueryGroupPolicyInfoResponse_messageType struct{} - -func (x fastReflection_QueryGroupPolicyInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupPolicyInfoResponse)(nil) -} -func (x fastReflection_QueryGroupPolicyInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupPolicyInfoResponse) -} -func (x fastReflection_QueryGroupPolicyInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPolicyInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupPolicyInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPolicyInfoResponse -} - -// 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_QueryGroupPolicyInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupPolicyInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupPolicyInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupPolicyInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupPolicyInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupPolicyInfoResponse)(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_QueryGroupPolicyInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Info != nil { - value := protoreflect.ValueOfMessage(x.Info.ProtoReflect()) - if !f(fd_QueryGroupPolicyInfoResponse_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGroupPolicyInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoResponse.info": - return x.Info != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoResponse 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_QueryGroupPolicyInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoResponse.info": - x.Info = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoResponse 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_QueryGroupPolicyInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoResponse.info": - value := x.Info - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoResponse 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_QueryGroupPolicyInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoResponse.info": - x.Info = value.Message().Interface().(*GroupPolicyInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoResponse 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_QueryGroupPolicyInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoResponse.info": - if x.Info == nil { - x.Info = new(GroupPolicyInfo) - } - return protoreflect.ValueOfMessage(x.Info.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoResponse 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_QueryGroupPolicyInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPolicyInfoResponse.info": - m := new(GroupPolicyInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPolicyInfoResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPolicyInfoResponse 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_QueryGroupPolicyInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupPolicyInfoResponse", 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_QueryGroupPolicyInfoResponse) 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_QueryGroupPolicyInfoResponse) 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_QueryGroupPolicyInfoResponse) 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_QueryGroupPolicyInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupPolicyInfoResponse) - 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.Info != nil { - l = options.Size(x.Info) - 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().(*QueryGroupPolicyInfoResponse) - 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.Info != nil { - encoded, err := options.Marshal(x.Info) - 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().(*QueryGroupPolicyInfoResponse) - 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: QueryGroupPolicyInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupPolicyInfoResponse: 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 Info", 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.Info == nil { - x.Info = &GroupPolicyInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info); 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_QueryGroupMembersRequest protoreflect.MessageDescriptor - fd_QueryGroupMembersRequest_group_id protoreflect.FieldDescriptor - fd_QueryGroupMembersRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupMembersRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupMembersRequest") - fd_QueryGroupMembersRequest_group_id = md_QueryGroupMembersRequest.Fields().ByName("group_id") - fd_QueryGroupMembersRequest_pagination = md_QueryGroupMembersRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupMembersRequest)(nil) - -type fastReflection_QueryGroupMembersRequest QueryGroupMembersRequest - -func (x *QueryGroupMembersRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupMembersRequest)(x) -} - -func (x *QueryGroupMembersRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupMembersRequest_messageType fastReflection_QueryGroupMembersRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupMembersRequest_messageType{} - -type fastReflection_QueryGroupMembersRequest_messageType struct{} - -func (x fastReflection_QueryGroupMembersRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupMembersRequest)(nil) -} -func (x fastReflection_QueryGroupMembersRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupMembersRequest) -} -func (x fastReflection_QueryGroupMembersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupMembersRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupMembersRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupMembersRequest -} - -// 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_QueryGroupMembersRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupMembersRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupMembersRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupMembersRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupMembersRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupMembersRequest)(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_QueryGroupMembersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_QueryGroupMembersRequest_group_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupMembersRequest_pagination, 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_QueryGroupMembersRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersRequest.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.QueryGroupMembersRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersRequest 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_QueryGroupMembersRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersRequest.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.QueryGroupMembersRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersRequest 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_QueryGroupMembersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupMembersRequest.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.QueryGroupMembersRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersRequest 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_QueryGroupMembersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersRequest.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.QueryGroupMembersRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersRequest 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_QueryGroupMembersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryGroupMembersRequest.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.QueryGroupMembersRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersRequest 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_QueryGroupMembersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersRequest.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.QueryGroupMembersRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersRequest 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_QueryGroupMembersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupMembersRequest", 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_QueryGroupMembersRequest) 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_QueryGroupMembersRequest) 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_QueryGroupMembersRequest) 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_QueryGroupMembersRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupMembersRequest) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupMembersRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupMembersRequest) - 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: QueryGroupMembersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupMembersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGroupMembersResponse_1_list)(nil) - -type _QueryGroupMembersResponse_1_list struct { - list *[]*GroupMember -} - -func (x *_QueryGroupMembersResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupMembersResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupMembersResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupMember) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupMembersResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupMember) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupMembersResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GroupMember) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupMembersResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupMembersResponse_1_list) NewElement() protoreflect.Value { - v := new(GroupMember) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupMembersResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGroupMembersResponse protoreflect.MessageDescriptor - fd_QueryGroupMembersResponse_members protoreflect.FieldDescriptor - fd_QueryGroupMembersResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupMembersResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupMembersResponse") - fd_QueryGroupMembersResponse_members = md_QueryGroupMembersResponse.Fields().ByName("members") - fd_QueryGroupMembersResponse_pagination = md_QueryGroupMembersResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupMembersResponse)(nil) - -type fastReflection_QueryGroupMembersResponse QueryGroupMembersResponse - -func (x *QueryGroupMembersResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupMembersResponse)(x) -} - -func (x *QueryGroupMembersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupMembersResponse_messageType fastReflection_QueryGroupMembersResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupMembersResponse_messageType{} - -type fastReflection_QueryGroupMembersResponse_messageType struct{} - -func (x fastReflection_QueryGroupMembersResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupMembersResponse)(nil) -} -func (x fastReflection_QueryGroupMembersResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupMembersResponse) -} -func (x fastReflection_QueryGroupMembersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupMembersResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupMembersResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupMembersResponse -} - -// 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_QueryGroupMembersResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupMembersResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupMembersResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupMembersResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupMembersResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupMembersResponse)(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_QueryGroupMembersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Members) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupMembersResponse_1_list{list: &x.Members}) - if !f(fd_QueryGroupMembersResponse_members, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupMembersResponse_pagination, 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_QueryGroupMembersResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersResponse.members": - return len(x.Members) != 0 - case "cosmos.group.v1.QueryGroupMembersResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersResponse 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_QueryGroupMembersResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersResponse.members": - x.Members = nil - case "cosmos.group.v1.QueryGroupMembersResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersResponse 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_QueryGroupMembersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupMembersResponse.members": - if len(x.Members) == 0 { - return protoreflect.ValueOfList(&_QueryGroupMembersResponse_1_list{}) - } - listValue := &_QueryGroupMembersResponse_1_list{list: &x.Members} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryGroupMembersResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersResponse 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_QueryGroupMembersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersResponse.members": - lv := value.List() - clv := lv.(*_QueryGroupMembersResponse_1_list) - x.Members = *clv.list - case "cosmos.group.v1.QueryGroupMembersResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersResponse 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_QueryGroupMembersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersResponse.members": - if x.Members == nil { - x.Members = []*GroupMember{} - } - value := &_QueryGroupMembersResponse_1_list{list: &x.Members} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryGroupMembersResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersResponse 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_QueryGroupMembersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupMembersResponse.members": - list := []*GroupMember{} - return protoreflect.ValueOfList(&_QueryGroupMembersResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryGroupMembersResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupMembersResponse 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_QueryGroupMembersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupMembersResponse", 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_QueryGroupMembersResponse) 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_QueryGroupMembersResponse) 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_QueryGroupMembersResponse) 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_QueryGroupMembersResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupMembersResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Members) > 0 { - for _, e := range x.Members { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupMembersResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Members) > 0 { - for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Members[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupMembersResponse) - 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: QueryGroupMembersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupMembersResponse: 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 Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Members = append(x.Members, &GroupMember{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryGroupsByAdminRequest protoreflect.MessageDescriptor - fd_QueryGroupsByAdminRequest_admin protoreflect.FieldDescriptor - fd_QueryGroupsByAdminRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupsByAdminRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupsByAdminRequest") - fd_QueryGroupsByAdminRequest_admin = md_QueryGroupsByAdminRequest.Fields().ByName("admin") - fd_QueryGroupsByAdminRequest_pagination = md_QueryGroupsByAdminRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupsByAdminRequest)(nil) - -type fastReflection_QueryGroupsByAdminRequest QueryGroupsByAdminRequest - -func (x *QueryGroupsByAdminRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupsByAdminRequest)(x) -} - -func (x *QueryGroupsByAdminRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupsByAdminRequest_messageType fastReflection_QueryGroupsByAdminRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupsByAdminRequest_messageType{} - -type fastReflection_QueryGroupsByAdminRequest_messageType struct{} - -func (x fastReflection_QueryGroupsByAdminRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupsByAdminRequest)(nil) -} -func (x fastReflection_QueryGroupsByAdminRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByAdminRequest) -} -func (x fastReflection_QueryGroupsByAdminRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByAdminRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupsByAdminRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByAdminRequest -} - -// 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_QueryGroupsByAdminRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupsByAdminRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupsByAdminRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByAdminRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupsByAdminRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupsByAdminRequest)(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_QueryGroupsByAdminRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_QueryGroupsByAdminRequest_admin, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupsByAdminRequest_pagination, 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_QueryGroupsByAdminRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminRequest.admin": - return x.Admin != "" - case "cosmos.group.v1.QueryGroupsByAdminRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminRequest 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_QueryGroupsByAdminRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminRequest.admin": - x.Admin = "" - case "cosmos.group.v1.QueryGroupsByAdminRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminRequest 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_QueryGroupsByAdminRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminRequest.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.QueryGroupsByAdminRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminRequest 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_QueryGroupsByAdminRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminRequest.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.QueryGroupsByAdminRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminRequest 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_QueryGroupsByAdminRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryGroupsByAdminRequest.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.QueryGroupsByAdminRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminRequest 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_QueryGroupsByAdminRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminRequest.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.QueryGroupsByAdminRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminRequest 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_QueryGroupsByAdminRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupsByAdminRequest", 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_QueryGroupsByAdminRequest) 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_QueryGroupsByAdminRequest) 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_QueryGroupsByAdminRequest) 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_QueryGroupsByAdminRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupsByAdminRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupsByAdminRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*QueryGroupsByAdminRequest) - 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: QueryGroupsByAdminRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupsByAdminRequest: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGroupsByAdminResponse_1_list)(nil) - -type _QueryGroupsByAdminResponse_1_list struct { - list *[]*GroupInfo -} - -func (x *_QueryGroupsByAdminResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupsByAdminResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupsByAdminResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupsByAdminResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupsByAdminResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GroupInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupsByAdminResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupsByAdminResponse_1_list) NewElement() protoreflect.Value { - v := new(GroupInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupsByAdminResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGroupsByAdminResponse protoreflect.MessageDescriptor - fd_QueryGroupsByAdminResponse_groups protoreflect.FieldDescriptor - fd_QueryGroupsByAdminResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupsByAdminResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupsByAdminResponse") - fd_QueryGroupsByAdminResponse_groups = md_QueryGroupsByAdminResponse.Fields().ByName("groups") - fd_QueryGroupsByAdminResponse_pagination = md_QueryGroupsByAdminResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupsByAdminResponse)(nil) - -type fastReflection_QueryGroupsByAdminResponse QueryGroupsByAdminResponse - -func (x *QueryGroupsByAdminResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupsByAdminResponse)(x) -} - -func (x *QueryGroupsByAdminResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupsByAdminResponse_messageType fastReflection_QueryGroupsByAdminResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupsByAdminResponse_messageType{} - -type fastReflection_QueryGroupsByAdminResponse_messageType struct{} - -func (x fastReflection_QueryGroupsByAdminResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupsByAdminResponse)(nil) -} -func (x fastReflection_QueryGroupsByAdminResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByAdminResponse) -} -func (x fastReflection_QueryGroupsByAdminResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByAdminResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupsByAdminResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByAdminResponse -} - -// 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_QueryGroupsByAdminResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupsByAdminResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupsByAdminResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByAdminResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupsByAdminResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupsByAdminResponse)(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_QueryGroupsByAdminResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Groups) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupsByAdminResponse_1_list{list: &x.Groups}) - if !f(fd_QueryGroupsByAdminResponse_groups, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupsByAdminResponse_pagination, 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_QueryGroupsByAdminResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminResponse.groups": - return len(x.Groups) != 0 - case "cosmos.group.v1.QueryGroupsByAdminResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminResponse 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_QueryGroupsByAdminResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminResponse.groups": - x.Groups = nil - case "cosmos.group.v1.QueryGroupsByAdminResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminResponse 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_QueryGroupsByAdminResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminResponse.groups": - if len(x.Groups) == 0 { - return protoreflect.ValueOfList(&_QueryGroupsByAdminResponse_1_list{}) - } - listValue := &_QueryGroupsByAdminResponse_1_list{list: &x.Groups} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryGroupsByAdminResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminResponse 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_QueryGroupsByAdminResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminResponse.groups": - lv := value.List() - clv := lv.(*_QueryGroupsByAdminResponse_1_list) - x.Groups = *clv.list - case "cosmos.group.v1.QueryGroupsByAdminResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminResponse 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_QueryGroupsByAdminResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminResponse.groups": - if x.Groups == nil { - x.Groups = []*GroupInfo{} - } - value := &_QueryGroupsByAdminResponse_1_list{list: &x.Groups} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryGroupsByAdminResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminResponse 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_QueryGroupsByAdminResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByAdminResponse.groups": - list := []*GroupInfo{} - return protoreflect.ValueOfList(&_QueryGroupsByAdminResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryGroupsByAdminResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByAdminResponse 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_QueryGroupsByAdminResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupsByAdminResponse", 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_QueryGroupsByAdminResponse) 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_QueryGroupsByAdminResponse) 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_QueryGroupsByAdminResponse) 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_QueryGroupsByAdminResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupsByAdminResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Groups) > 0 { - for _, e := range x.Groups { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupsByAdminResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Groups) > 0 { - for iNdEx := len(x.Groups) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Groups[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupsByAdminResponse) - 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: QueryGroupsByAdminResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupsByAdminResponse: 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 Groups", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Groups = append(x.Groups, &GroupInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Groups[len(x.Groups)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryGroupPoliciesByGroupRequest protoreflect.MessageDescriptor - fd_QueryGroupPoliciesByGroupRequest_group_id protoreflect.FieldDescriptor - fd_QueryGroupPoliciesByGroupRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupPoliciesByGroupRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupPoliciesByGroupRequest") - fd_QueryGroupPoliciesByGroupRequest_group_id = md_QueryGroupPoliciesByGroupRequest.Fields().ByName("group_id") - fd_QueryGroupPoliciesByGroupRequest_pagination = md_QueryGroupPoliciesByGroupRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupPoliciesByGroupRequest)(nil) - -type fastReflection_QueryGroupPoliciesByGroupRequest QueryGroupPoliciesByGroupRequest - -func (x *QueryGroupPoliciesByGroupRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByGroupRequest)(x) -} - -func (x *QueryGroupPoliciesByGroupRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupPoliciesByGroupRequest_messageType fastReflection_QueryGroupPoliciesByGroupRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupPoliciesByGroupRequest_messageType{} - -type fastReflection_QueryGroupPoliciesByGroupRequest_messageType struct{} - -func (x fastReflection_QueryGroupPoliciesByGroupRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByGroupRequest)(nil) -} -func (x fastReflection_QueryGroupPoliciesByGroupRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByGroupRequest) -} -func (x fastReflection_QueryGroupPoliciesByGroupRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByGroupRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupPoliciesByGroupRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByGroupRequest -} - -// 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_QueryGroupPoliciesByGroupRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupPoliciesByGroupRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupPoliciesByGroupRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByGroupRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupPoliciesByGroupRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupPoliciesByGroupRequest)(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_QueryGroupPoliciesByGroupRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_QueryGroupPoliciesByGroupRequest_group_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupPoliciesByGroupRequest_pagination, 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_QueryGroupPoliciesByGroupRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupRequest 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_QueryGroupPoliciesByGroupRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupRequest 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_QueryGroupPoliciesByGroupRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupRequest 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_QueryGroupPoliciesByGroupRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupRequest 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_QueryGroupPoliciesByGroupRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.QueryGroupPoliciesByGroupRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupRequest 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_QueryGroupPoliciesByGroupRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupRequest 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_QueryGroupPoliciesByGroupRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupPoliciesByGroupRequest", 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_QueryGroupPoliciesByGroupRequest) 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_QueryGroupPoliciesByGroupRequest) 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_QueryGroupPoliciesByGroupRequest) 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_QueryGroupPoliciesByGroupRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupPoliciesByGroupRequest) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupPoliciesByGroupRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupPoliciesByGroupRequest) - 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: QueryGroupPoliciesByGroupRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupPoliciesByGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGroupPoliciesByGroupResponse_1_list)(nil) - -type _QueryGroupPoliciesByGroupResponse_1_list struct { - list *[]*GroupPolicyInfo -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupPolicyInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupPolicyInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GroupPolicyInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) NewElement() protoreflect.Value { - v := new(GroupPolicyInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupPoliciesByGroupResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGroupPoliciesByGroupResponse protoreflect.MessageDescriptor - fd_QueryGroupPoliciesByGroupResponse_group_policies protoreflect.FieldDescriptor - fd_QueryGroupPoliciesByGroupResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupPoliciesByGroupResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupPoliciesByGroupResponse") - fd_QueryGroupPoliciesByGroupResponse_group_policies = md_QueryGroupPoliciesByGroupResponse.Fields().ByName("group_policies") - fd_QueryGroupPoliciesByGroupResponse_pagination = md_QueryGroupPoliciesByGroupResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupPoliciesByGroupResponse)(nil) - -type fastReflection_QueryGroupPoliciesByGroupResponse QueryGroupPoliciesByGroupResponse - -func (x *QueryGroupPoliciesByGroupResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByGroupResponse)(x) -} - -func (x *QueryGroupPoliciesByGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupPoliciesByGroupResponse_messageType fastReflection_QueryGroupPoliciesByGroupResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupPoliciesByGroupResponse_messageType{} - -type fastReflection_QueryGroupPoliciesByGroupResponse_messageType struct{} - -func (x fastReflection_QueryGroupPoliciesByGroupResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByGroupResponse)(nil) -} -func (x fastReflection_QueryGroupPoliciesByGroupResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByGroupResponse) -} -func (x fastReflection_QueryGroupPoliciesByGroupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByGroupResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupPoliciesByGroupResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByGroupResponse -} - -// 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_QueryGroupPoliciesByGroupResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupPoliciesByGroupResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupPoliciesByGroupResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByGroupResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupPoliciesByGroupResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupPoliciesByGroupResponse)(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_QueryGroupPoliciesByGroupResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.GroupPolicies) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupPoliciesByGroupResponse_1_list{list: &x.GroupPolicies}) - if !f(fd_QueryGroupPoliciesByGroupResponse_group_policies, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupPoliciesByGroupResponse_pagination, 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_QueryGroupPoliciesByGroupResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies": - return len(x.GroupPolicies) != 0 - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupResponse 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_QueryGroupPoliciesByGroupResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies": - x.GroupPolicies = nil - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupResponse 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_QueryGroupPoliciesByGroupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies": - if len(x.GroupPolicies) == 0 { - return protoreflect.ValueOfList(&_QueryGroupPoliciesByGroupResponse_1_list{}) - } - listValue := &_QueryGroupPoliciesByGroupResponse_1_list{list: &x.GroupPolicies} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupResponse 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_QueryGroupPoliciesByGroupResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies": - lv := value.List() - clv := lv.(*_QueryGroupPoliciesByGroupResponse_1_list) - x.GroupPolicies = *clv.list - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupResponse 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_QueryGroupPoliciesByGroupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies": - if x.GroupPolicies == nil { - x.GroupPolicies = []*GroupPolicyInfo{} - } - value := &_QueryGroupPoliciesByGroupResponse_1_list{list: &x.GroupPolicies} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupResponse 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_QueryGroupPoliciesByGroupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies": - list := []*GroupPolicyInfo{} - return protoreflect.ValueOfList(&_QueryGroupPoliciesByGroupResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByGroupResponse 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_QueryGroupPoliciesByGroupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupPoliciesByGroupResponse", 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_QueryGroupPoliciesByGroupResponse) 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_QueryGroupPoliciesByGroupResponse) 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_QueryGroupPoliciesByGroupResponse) 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_QueryGroupPoliciesByGroupResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupPoliciesByGroupResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.GroupPolicies) > 0 { - for _, e := range x.GroupPolicies { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupPoliciesByGroupResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.GroupPolicies) > 0 { - for iNdEx := len(x.GroupPolicies) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GroupPolicies[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupPoliciesByGroupResponse) - 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: QueryGroupPoliciesByGroupResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupPoliciesByGroupResponse: 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 GroupPolicies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GroupPolicies = append(x.GroupPolicies, &GroupPolicyInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GroupPolicies[len(x.GroupPolicies)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryGroupPoliciesByAdminRequest protoreflect.MessageDescriptor - fd_QueryGroupPoliciesByAdminRequest_admin protoreflect.FieldDescriptor - fd_QueryGroupPoliciesByAdminRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupPoliciesByAdminRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupPoliciesByAdminRequest") - fd_QueryGroupPoliciesByAdminRequest_admin = md_QueryGroupPoliciesByAdminRequest.Fields().ByName("admin") - fd_QueryGroupPoliciesByAdminRequest_pagination = md_QueryGroupPoliciesByAdminRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupPoliciesByAdminRequest)(nil) - -type fastReflection_QueryGroupPoliciesByAdminRequest QueryGroupPoliciesByAdminRequest - -func (x *QueryGroupPoliciesByAdminRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByAdminRequest)(x) -} - -func (x *QueryGroupPoliciesByAdminRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupPoliciesByAdminRequest_messageType fastReflection_QueryGroupPoliciesByAdminRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupPoliciesByAdminRequest_messageType{} - -type fastReflection_QueryGroupPoliciesByAdminRequest_messageType struct{} - -func (x fastReflection_QueryGroupPoliciesByAdminRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByAdminRequest)(nil) -} -func (x fastReflection_QueryGroupPoliciesByAdminRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByAdminRequest) -} -func (x fastReflection_QueryGroupPoliciesByAdminRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByAdminRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupPoliciesByAdminRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByAdminRequest -} - -// 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_QueryGroupPoliciesByAdminRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupPoliciesByAdminRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupPoliciesByAdminRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByAdminRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupPoliciesByAdminRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupPoliciesByAdminRequest)(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_QueryGroupPoliciesByAdminRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_QueryGroupPoliciesByAdminRequest_admin, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupPoliciesByAdminRequest_pagination, 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_QueryGroupPoliciesByAdminRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.admin": - return x.Admin != "" - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminRequest 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_QueryGroupPoliciesByAdminRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.admin": - x.Admin = "" - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminRequest 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_QueryGroupPoliciesByAdminRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminRequest 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_QueryGroupPoliciesByAdminRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminRequest 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_QueryGroupPoliciesByAdminRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.QueryGroupPoliciesByAdminRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminRequest 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_QueryGroupPoliciesByAdminRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminRequest 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_QueryGroupPoliciesByAdminRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupPoliciesByAdminRequest", 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_QueryGroupPoliciesByAdminRequest) 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_QueryGroupPoliciesByAdminRequest) 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_QueryGroupPoliciesByAdminRequest) 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_QueryGroupPoliciesByAdminRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupPoliciesByAdminRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupPoliciesByAdminRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*QueryGroupPoliciesByAdminRequest) - 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: QueryGroupPoliciesByAdminRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupPoliciesByAdminRequest: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGroupPoliciesByAdminResponse_1_list)(nil) - -type _QueryGroupPoliciesByAdminResponse_1_list struct { - list *[]*GroupPolicyInfo -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupPolicyInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupPolicyInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GroupPolicyInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) NewElement() protoreflect.Value { - v := new(GroupPolicyInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupPoliciesByAdminResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGroupPoliciesByAdminResponse protoreflect.MessageDescriptor - fd_QueryGroupPoliciesByAdminResponse_group_policies protoreflect.FieldDescriptor - fd_QueryGroupPoliciesByAdminResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupPoliciesByAdminResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupPoliciesByAdminResponse") - fd_QueryGroupPoliciesByAdminResponse_group_policies = md_QueryGroupPoliciesByAdminResponse.Fields().ByName("group_policies") - fd_QueryGroupPoliciesByAdminResponse_pagination = md_QueryGroupPoliciesByAdminResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupPoliciesByAdminResponse)(nil) - -type fastReflection_QueryGroupPoliciesByAdminResponse QueryGroupPoliciesByAdminResponse - -func (x *QueryGroupPoliciesByAdminResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByAdminResponse)(x) -} - -func (x *QueryGroupPoliciesByAdminResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupPoliciesByAdminResponse_messageType fastReflection_QueryGroupPoliciesByAdminResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupPoliciesByAdminResponse_messageType{} - -type fastReflection_QueryGroupPoliciesByAdminResponse_messageType struct{} - -func (x fastReflection_QueryGroupPoliciesByAdminResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupPoliciesByAdminResponse)(nil) -} -func (x fastReflection_QueryGroupPoliciesByAdminResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByAdminResponse) -} -func (x fastReflection_QueryGroupPoliciesByAdminResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByAdminResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupPoliciesByAdminResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupPoliciesByAdminResponse -} - -// 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_QueryGroupPoliciesByAdminResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupPoliciesByAdminResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupPoliciesByAdminResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupPoliciesByAdminResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupPoliciesByAdminResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupPoliciesByAdminResponse)(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_QueryGroupPoliciesByAdminResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.GroupPolicies) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupPoliciesByAdminResponse_1_list{list: &x.GroupPolicies}) - if !f(fd_QueryGroupPoliciesByAdminResponse_group_policies, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupPoliciesByAdminResponse_pagination, 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_QueryGroupPoliciesByAdminResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies": - return len(x.GroupPolicies) != 0 - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminResponse 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_QueryGroupPoliciesByAdminResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies": - x.GroupPolicies = nil - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminResponse 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_QueryGroupPoliciesByAdminResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies": - if len(x.GroupPolicies) == 0 { - return protoreflect.ValueOfList(&_QueryGroupPoliciesByAdminResponse_1_list{}) - } - listValue := &_QueryGroupPoliciesByAdminResponse_1_list{list: &x.GroupPolicies} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminResponse 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_QueryGroupPoliciesByAdminResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies": - lv := value.List() - clv := lv.(*_QueryGroupPoliciesByAdminResponse_1_list) - x.GroupPolicies = *clv.list - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminResponse 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_QueryGroupPoliciesByAdminResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies": - if x.GroupPolicies == nil { - x.GroupPolicies = []*GroupPolicyInfo{} - } - value := &_QueryGroupPoliciesByAdminResponse_1_list{list: &x.GroupPolicies} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminResponse 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_QueryGroupPoliciesByAdminResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies": - list := []*GroupPolicyInfo{} - return protoreflect.ValueOfList(&_QueryGroupPoliciesByAdminResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupPoliciesByAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupPoliciesByAdminResponse 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_QueryGroupPoliciesByAdminResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupPoliciesByAdminResponse", 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_QueryGroupPoliciesByAdminResponse) 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_QueryGroupPoliciesByAdminResponse) 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_QueryGroupPoliciesByAdminResponse) 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_QueryGroupPoliciesByAdminResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupPoliciesByAdminResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.GroupPolicies) > 0 { - for _, e := range x.GroupPolicies { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupPoliciesByAdminResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.GroupPolicies) > 0 { - for iNdEx := len(x.GroupPolicies) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GroupPolicies[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupPoliciesByAdminResponse) - 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: QueryGroupPoliciesByAdminResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupPoliciesByAdminResponse: 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 GroupPolicies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GroupPolicies = append(x.GroupPolicies, &GroupPolicyInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GroupPolicies[len(x.GroupPolicies)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryProposalRequest protoreflect.MessageDescriptor - fd_QueryProposalRequest_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryProposalRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryProposalRequest") - fd_QueryProposalRequest_proposal_id = md_QueryProposalRequest.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalRequest)(nil) - -type fastReflection_QueryProposalRequest QueryProposalRequest - -func (x *QueryProposalRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalRequest)(x) -} - -func (x *QueryProposalRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalRequest_messageType fastReflection_QueryProposalRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalRequest_messageType{} - -type fastReflection_QueryProposalRequest_messageType struct{} - -func (x fastReflection_QueryProposalRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalRequest)(nil) -} -func (x fastReflection_QueryProposalRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalRequest) -} -func (x fastReflection_QueryProposalRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalRequest -} - -// 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_QueryProposalRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalRequest) New() protoreflect.Message { - return new(fastReflection_QueryProposalRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalRequest) Interface() protoreflect.ProtoMessage { - return (*QueryProposalRequest)(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_QueryProposalRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryProposalRequest_proposal_id, 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_QueryProposalRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalRequest.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalRequest 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_QueryProposalRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalRequest.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalRequest 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_QueryProposalRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryProposalRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalRequest 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_QueryProposalRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalRequest.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalRequest 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_QueryProposalRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.QueryProposalRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalRequest 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_QueryProposalRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalRequest 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_QueryProposalRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryProposalRequest", 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_QueryProposalRequest) 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_QueryProposalRequest) 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_QueryProposalRequest) 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_QueryProposalRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*QueryProposalRequest) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalRequest) - 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: QueryProposalRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryProposalResponse protoreflect.MessageDescriptor - fd_QueryProposalResponse_proposal protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryProposalResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryProposalResponse") - fd_QueryProposalResponse_proposal = md_QueryProposalResponse.Fields().ByName("proposal") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalResponse)(nil) - -type fastReflection_QueryProposalResponse QueryProposalResponse - -func (x *QueryProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalResponse)(x) -} - -func (x *QueryProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalResponse_messageType fastReflection_QueryProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalResponse_messageType{} - -type fastReflection_QueryProposalResponse_messageType struct{} - -func (x fastReflection_QueryProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalResponse)(nil) -} -func (x fastReflection_QueryProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalResponse) -} -func (x fastReflection_QueryProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalResponse -} - -// 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_QueryProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalResponse) New() protoreflect.Message { - return new(fastReflection_QueryProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalResponse) Interface() protoreflect.ProtoMessage { - return (*QueryProposalResponse)(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_QueryProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Proposal != nil { - value := protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - if !f(fd_QueryProposalResponse_proposal, 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_QueryProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalResponse.proposal": - return x.Proposal != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalResponse 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_QueryProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalResponse.proposal": - x.Proposal = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalResponse 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_QueryProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryProposalResponse.proposal": - value := x.Proposal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalResponse 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_QueryProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalResponse.proposal": - x.Proposal = value.Message().Interface().(*Proposal) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalResponse 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_QueryProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalResponse.proposal": - if x.Proposal == nil { - x.Proposal = new(Proposal) - } - return protoreflect.ValueOfMessage(x.Proposal.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalResponse 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_QueryProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalResponse.proposal": - m := new(Proposal) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalResponse 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_QueryProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryProposalResponse", 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) 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_QueryProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalResponse) - 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.Proposal != nil { - l = options.Size(x.Proposal) - 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().(*QueryProposalResponse) - 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.Proposal != nil { - encoded, err := options.Marshal(x.Proposal) - 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().(*QueryProposalResponse) - 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: QueryProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalResponse: 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 Proposal", 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.Proposal == nil { - x.Proposal = &Proposal{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposal); 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_QueryProposalsByGroupPolicyRequest protoreflect.MessageDescriptor - fd_QueryProposalsByGroupPolicyRequest_address protoreflect.FieldDescriptor - fd_QueryProposalsByGroupPolicyRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryProposalsByGroupPolicyRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryProposalsByGroupPolicyRequest") - fd_QueryProposalsByGroupPolicyRequest_address = md_QueryProposalsByGroupPolicyRequest.Fields().ByName("address") - fd_QueryProposalsByGroupPolicyRequest_pagination = md_QueryProposalsByGroupPolicyRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalsByGroupPolicyRequest)(nil) - -type fastReflection_QueryProposalsByGroupPolicyRequest QueryProposalsByGroupPolicyRequest - -func (x *QueryProposalsByGroupPolicyRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalsByGroupPolicyRequest)(x) -} - -func (x *QueryProposalsByGroupPolicyRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalsByGroupPolicyRequest_messageType fastReflection_QueryProposalsByGroupPolicyRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalsByGroupPolicyRequest_messageType{} - -type fastReflection_QueryProposalsByGroupPolicyRequest_messageType struct{} - -func (x fastReflection_QueryProposalsByGroupPolicyRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalsByGroupPolicyRequest)(nil) -} -func (x fastReflection_QueryProposalsByGroupPolicyRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalsByGroupPolicyRequest) -} -func (x fastReflection_QueryProposalsByGroupPolicyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsByGroupPolicyRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalsByGroupPolicyRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsByGroupPolicyRequest -} - -// 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_QueryProposalsByGroupPolicyRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalsByGroupPolicyRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalsByGroupPolicyRequest) New() protoreflect.Message { - return new(fastReflection_QueryProposalsByGroupPolicyRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalsByGroupPolicyRequest) Interface() protoreflect.ProtoMessage { - return (*QueryProposalsByGroupPolicyRequest)(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_QueryProposalsByGroupPolicyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryProposalsByGroupPolicyRequest_address, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryProposalsByGroupPolicyRequest_pagination, 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_QueryProposalsByGroupPolicyRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.address": - return x.Address != "" - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyRequest 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_QueryProposalsByGroupPolicyRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.address": - x.Address = "" - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyRequest 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_QueryProposalsByGroupPolicyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyRequest 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_QueryProposalsByGroupPolicyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyRequest 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_QueryProposalsByGroupPolicyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.QueryProposalsByGroupPolicyRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyRequest 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_QueryProposalsByGroupPolicyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyRequest 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_QueryProposalsByGroupPolicyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryProposalsByGroupPolicyRequest", 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_QueryProposalsByGroupPolicyRequest) 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_QueryProposalsByGroupPolicyRequest) 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_QueryProposalsByGroupPolicyRequest) 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_QueryProposalsByGroupPolicyRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalsByGroupPolicyRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryProposalsByGroupPolicyRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalsByGroupPolicyRequest) - 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: QueryProposalsByGroupPolicyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalsByGroupPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryProposalsByGroupPolicyResponse_1_list)(nil) - -type _QueryProposalsByGroupPolicyResponse_1_list struct { - list *[]*Proposal -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - (*x.list)[i] = concreteValue -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Proposal) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Proposal) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) NewElement() protoreflect.Value { - v := new(Proposal) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryProposalsByGroupPolicyResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryProposalsByGroupPolicyResponse protoreflect.MessageDescriptor - fd_QueryProposalsByGroupPolicyResponse_proposals protoreflect.FieldDescriptor - fd_QueryProposalsByGroupPolicyResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryProposalsByGroupPolicyResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryProposalsByGroupPolicyResponse") - fd_QueryProposalsByGroupPolicyResponse_proposals = md_QueryProposalsByGroupPolicyResponse.Fields().ByName("proposals") - fd_QueryProposalsByGroupPolicyResponse_pagination = md_QueryProposalsByGroupPolicyResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryProposalsByGroupPolicyResponse)(nil) - -type fastReflection_QueryProposalsByGroupPolicyResponse QueryProposalsByGroupPolicyResponse - -func (x *QueryProposalsByGroupPolicyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryProposalsByGroupPolicyResponse)(x) -} - -func (x *QueryProposalsByGroupPolicyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryProposalsByGroupPolicyResponse_messageType fastReflection_QueryProposalsByGroupPolicyResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryProposalsByGroupPolicyResponse_messageType{} - -type fastReflection_QueryProposalsByGroupPolicyResponse_messageType struct{} - -func (x fastReflection_QueryProposalsByGroupPolicyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryProposalsByGroupPolicyResponse)(nil) -} -func (x fastReflection_QueryProposalsByGroupPolicyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryProposalsByGroupPolicyResponse) -} -func (x fastReflection_QueryProposalsByGroupPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsByGroupPolicyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryProposalsByGroupPolicyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryProposalsByGroupPolicyResponse -} - -// 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_QueryProposalsByGroupPolicyResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryProposalsByGroupPolicyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryProposalsByGroupPolicyResponse) New() protoreflect.Message { - return new(fastReflection_QueryProposalsByGroupPolicyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryProposalsByGroupPolicyResponse) Interface() protoreflect.ProtoMessage { - return (*QueryProposalsByGroupPolicyResponse)(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_QueryProposalsByGroupPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Proposals) != 0 { - value := protoreflect.ValueOfList(&_QueryProposalsByGroupPolicyResponse_1_list{list: &x.Proposals}) - if !f(fd_QueryProposalsByGroupPolicyResponse_proposals, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryProposalsByGroupPolicyResponse_pagination, 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_QueryProposalsByGroupPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals": - return len(x.Proposals) != 0 - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyResponse 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_QueryProposalsByGroupPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals": - x.Proposals = nil - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyResponse 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_QueryProposalsByGroupPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals": - if len(x.Proposals) == 0 { - return protoreflect.ValueOfList(&_QueryProposalsByGroupPolicyResponse_1_list{}) - } - listValue := &_QueryProposalsByGroupPolicyResponse_1_list{list: &x.Proposals} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyResponse 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_QueryProposalsByGroupPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals": - lv := value.List() - clv := lv.(*_QueryProposalsByGroupPolicyResponse_1_list) - x.Proposals = *clv.list - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyResponse 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_QueryProposalsByGroupPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals": - if x.Proposals == nil { - x.Proposals = []*Proposal{} - } - value := &_QueryProposalsByGroupPolicyResponse_1_list{list: &x.Proposals} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyResponse 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_QueryProposalsByGroupPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals": - list := []*Proposal{} - return protoreflect.ValueOfList(&_QueryProposalsByGroupPolicyResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryProposalsByGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryProposalsByGroupPolicyResponse 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_QueryProposalsByGroupPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryProposalsByGroupPolicyResponse", 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_QueryProposalsByGroupPolicyResponse) 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_QueryProposalsByGroupPolicyResponse) 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_QueryProposalsByGroupPolicyResponse) 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_QueryProposalsByGroupPolicyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryProposalsByGroupPolicyResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Proposals) > 0 { - for _, e := range x.Proposals { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryProposalsByGroupPolicyResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Proposals) > 0 { - for iNdEx := len(x.Proposals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Proposals[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryProposalsByGroupPolicyResponse) - 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: QueryProposalsByGroupPolicyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProposalsByGroupPolicyResponse: 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 Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Proposals = append(x.Proposals, &Proposal{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposals[len(x.Proposals)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryVoteByProposalVoterRequest protoreflect.MessageDescriptor - fd_QueryVoteByProposalVoterRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryVoteByProposalVoterRequest_voter protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryVoteByProposalVoterRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryVoteByProposalVoterRequest") - fd_QueryVoteByProposalVoterRequest_proposal_id = md_QueryVoteByProposalVoterRequest.Fields().ByName("proposal_id") - fd_QueryVoteByProposalVoterRequest_voter = md_QueryVoteByProposalVoterRequest.Fields().ByName("voter") -} - -var _ protoreflect.Message = (*fastReflection_QueryVoteByProposalVoterRequest)(nil) - -type fastReflection_QueryVoteByProposalVoterRequest QueryVoteByProposalVoterRequest - -func (x *QueryVoteByProposalVoterRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVoteByProposalVoterRequest)(x) -} - -func (x *QueryVoteByProposalVoterRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVoteByProposalVoterRequest_messageType fastReflection_QueryVoteByProposalVoterRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVoteByProposalVoterRequest_messageType{} - -type fastReflection_QueryVoteByProposalVoterRequest_messageType struct{} - -func (x fastReflection_QueryVoteByProposalVoterRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVoteByProposalVoterRequest)(nil) -} -func (x fastReflection_QueryVoteByProposalVoterRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVoteByProposalVoterRequest) -} -func (x fastReflection_QueryVoteByProposalVoterRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteByProposalVoterRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVoteByProposalVoterRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteByProposalVoterRequest -} - -// 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_QueryVoteByProposalVoterRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVoteByProposalVoterRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVoteByProposalVoterRequest) New() protoreflect.Message { - return new(fastReflection_QueryVoteByProposalVoterRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVoteByProposalVoterRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVoteByProposalVoterRequest)(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_QueryVoteByProposalVoterRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryVoteByProposalVoterRequest_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_QueryVoteByProposalVoterRequest_voter, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryVoteByProposalVoterRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.voter": - return x.Voter != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterRequest 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_QueryVoteByProposalVoterRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.voter": - x.Voter = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterRequest 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_QueryVoteByProposalVoterRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterRequest 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_QueryVoteByProposalVoterRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.voter": - x.Voter = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterRequest 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_QueryVoteByProposalVoterRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.QueryVoteByProposalVoterRequest is not mutable")) - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.voter": - panic(fmt.Errorf("field voter of message cosmos.group.v1.QueryVoteByProposalVoterRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterRequest 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_QueryVoteByProposalVoterRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.QueryVoteByProposalVoterRequest.voter": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterRequest 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_QueryVoteByProposalVoterRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryVoteByProposalVoterRequest", 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_QueryVoteByProposalVoterRequest) 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_QueryVoteByProposalVoterRequest) 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_QueryVoteByProposalVoterRequest) 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_QueryVoteByProposalVoterRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVoteByProposalVoterRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryVoteByProposalVoterRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVoteByProposalVoterRequest) - 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: QueryVoteByProposalVoterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteByProposalVoterRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryVoteByProposalVoterResponse protoreflect.MessageDescriptor - fd_QueryVoteByProposalVoterResponse_vote protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryVoteByProposalVoterResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryVoteByProposalVoterResponse") - fd_QueryVoteByProposalVoterResponse_vote = md_QueryVoteByProposalVoterResponse.Fields().ByName("vote") -} - -var _ protoreflect.Message = (*fastReflection_QueryVoteByProposalVoterResponse)(nil) - -type fastReflection_QueryVoteByProposalVoterResponse QueryVoteByProposalVoterResponse - -func (x *QueryVoteByProposalVoterResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVoteByProposalVoterResponse)(x) -} - -func (x *QueryVoteByProposalVoterResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVoteByProposalVoterResponse_messageType fastReflection_QueryVoteByProposalVoterResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVoteByProposalVoterResponse_messageType{} - -type fastReflection_QueryVoteByProposalVoterResponse_messageType struct{} - -func (x fastReflection_QueryVoteByProposalVoterResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVoteByProposalVoterResponse)(nil) -} -func (x fastReflection_QueryVoteByProposalVoterResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVoteByProposalVoterResponse) -} -func (x fastReflection_QueryVoteByProposalVoterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteByProposalVoterResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVoteByProposalVoterResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVoteByProposalVoterResponse -} - -// 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_QueryVoteByProposalVoterResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVoteByProposalVoterResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVoteByProposalVoterResponse) New() protoreflect.Message { - return new(fastReflection_QueryVoteByProposalVoterResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVoteByProposalVoterResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVoteByProposalVoterResponse)(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_QueryVoteByProposalVoterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Vote != nil { - value := protoreflect.ValueOfMessage(x.Vote.ProtoReflect()) - if !f(fd_QueryVoteByProposalVoterResponse_vote, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryVoteByProposalVoterResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterResponse.vote": - return x.Vote != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterResponse 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_QueryVoteByProposalVoterResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterResponse.vote": - x.Vote = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterResponse 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_QueryVoteByProposalVoterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterResponse.vote": - value := x.Vote - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterResponse 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_QueryVoteByProposalVoterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterResponse.vote": - x.Vote = value.Message().Interface().(*Vote) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterResponse 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_QueryVoteByProposalVoterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterResponse.vote": - if x.Vote == nil { - x.Vote = new(Vote) - } - return protoreflect.ValueOfMessage(x.Vote.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterResponse 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_QueryVoteByProposalVoterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVoteByProposalVoterResponse.vote": - m := new(Vote) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVoteByProposalVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVoteByProposalVoterResponse 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_QueryVoteByProposalVoterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryVoteByProposalVoterResponse", 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_QueryVoteByProposalVoterResponse) 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_QueryVoteByProposalVoterResponse) 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_QueryVoteByProposalVoterResponse) 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_QueryVoteByProposalVoterResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVoteByProposalVoterResponse) - 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.Vote != nil { - l = options.Size(x.Vote) - 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().(*QueryVoteByProposalVoterResponse) - 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.Vote != nil { - encoded, err := options.Marshal(x.Vote) - 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().(*QueryVoteByProposalVoterResponse) - 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: QueryVoteByProposalVoterResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteByProposalVoterResponse: 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 Vote", 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.Vote == nil { - x.Vote = &Vote{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Vote); 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_QueryVotesByProposalRequest protoreflect.MessageDescriptor - fd_QueryVotesByProposalRequest_proposal_id protoreflect.FieldDescriptor - fd_QueryVotesByProposalRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryVotesByProposalRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryVotesByProposalRequest") - fd_QueryVotesByProposalRequest_proposal_id = md_QueryVotesByProposalRequest.Fields().ByName("proposal_id") - fd_QueryVotesByProposalRequest_pagination = md_QueryVotesByProposalRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesByProposalRequest)(nil) - -type fastReflection_QueryVotesByProposalRequest QueryVotesByProposalRequest - -func (x *QueryVotesByProposalRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesByProposalRequest)(x) -} - -func (x *QueryVotesByProposalRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesByProposalRequest_messageType fastReflection_QueryVotesByProposalRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesByProposalRequest_messageType{} - -type fastReflection_QueryVotesByProposalRequest_messageType struct{} - -func (x fastReflection_QueryVotesByProposalRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesByProposalRequest)(nil) -} -func (x fastReflection_QueryVotesByProposalRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesByProposalRequest) -} -func (x fastReflection_QueryVotesByProposalRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByProposalRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesByProposalRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByProposalRequest -} - -// 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_QueryVotesByProposalRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesByProposalRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesByProposalRequest) New() protoreflect.Message { - return new(fastReflection_QueryVotesByProposalRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesByProposalRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVotesByProposalRequest)(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_QueryVotesByProposalRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryVotesByProposalRequest_proposal_id, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesByProposalRequest_pagination, 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_QueryVotesByProposalRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalRequest.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.QueryVotesByProposalRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalRequest 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_QueryVotesByProposalRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalRequest.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.QueryVotesByProposalRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalRequest 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_QueryVotesByProposalRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryVotesByProposalRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.QueryVotesByProposalRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalRequest 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_QueryVotesByProposalRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalRequest.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.QueryVotesByProposalRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalRequest 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_QueryVotesByProposalRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryVotesByProposalRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.QueryVotesByProposalRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalRequest 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_QueryVotesByProposalRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.QueryVotesByProposalRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalRequest 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_QueryVotesByProposalRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryVotesByProposalRequest", 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_QueryVotesByProposalRequest) 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_QueryVotesByProposalRequest) 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_QueryVotesByProposalRequest) 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_QueryVotesByProposalRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesByProposalRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesByProposalRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesByProposalRequest) - 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: QueryVotesByProposalRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesByProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryVotesByProposalResponse_1_list)(nil) - -type _QueryVotesByProposalResponse_1_list struct { - list *[]*Vote -} - -func (x *_QueryVotesByProposalResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryVotesByProposalResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryVotesByProposalResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_QueryVotesByProposalResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryVotesByProposalResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesByProposalResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryVotesByProposalResponse_1_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesByProposalResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryVotesByProposalResponse protoreflect.MessageDescriptor - fd_QueryVotesByProposalResponse_votes protoreflect.FieldDescriptor - fd_QueryVotesByProposalResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryVotesByProposalResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryVotesByProposalResponse") - fd_QueryVotesByProposalResponse_votes = md_QueryVotesByProposalResponse.Fields().ByName("votes") - fd_QueryVotesByProposalResponse_pagination = md_QueryVotesByProposalResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesByProposalResponse)(nil) - -type fastReflection_QueryVotesByProposalResponse QueryVotesByProposalResponse - -func (x *QueryVotesByProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesByProposalResponse)(x) -} - -func (x *QueryVotesByProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesByProposalResponse_messageType fastReflection_QueryVotesByProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesByProposalResponse_messageType{} - -type fastReflection_QueryVotesByProposalResponse_messageType struct{} - -func (x fastReflection_QueryVotesByProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesByProposalResponse)(nil) -} -func (x fastReflection_QueryVotesByProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesByProposalResponse) -} -func (x fastReflection_QueryVotesByProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesByProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByProposalResponse -} - -// 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_QueryVotesByProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesByProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesByProposalResponse) New() protoreflect.Message { - return new(fastReflection_QueryVotesByProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesByProposalResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVotesByProposalResponse)(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_QueryVotesByProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_QueryVotesByProposalResponse_1_list{list: &x.Votes}) - if !f(fd_QueryVotesByProposalResponse_votes, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesByProposalResponse_pagination, 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_QueryVotesByProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalResponse.votes": - return len(x.Votes) != 0 - case "cosmos.group.v1.QueryVotesByProposalResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalResponse 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_QueryVotesByProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalResponse.votes": - x.Votes = nil - case "cosmos.group.v1.QueryVotesByProposalResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalResponse 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_QueryVotesByProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryVotesByProposalResponse.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_QueryVotesByProposalResponse_1_list{}) - } - listValue := &_QueryVotesByProposalResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryVotesByProposalResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalResponse 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_QueryVotesByProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalResponse.votes": - lv := value.List() - clv := lv.(*_QueryVotesByProposalResponse_1_list) - x.Votes = *clv.list - case "cosmos.group.v1.QueryVotesByProposalResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalResponse 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_QueryVotesByProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalResponse.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_QueryVotesByProposalResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryVotesByProposalResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalResponse 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_QueryVotesByProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByProposalResponse.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_QueryVotesByProposalResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryVotesByProposalResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByProposalResponse 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_QueryVotesByProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryVotesByProposalResponse", 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_QueryVotesByProposalResponse) 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_QueryVotesByProposalResponse) 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_QueryVotesByProposalResponse) 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_QueryVotesByProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesByProposalResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesByProposalResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesByProposalResponse) - 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: QueryVotesByProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesByProposalResponse: 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 Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryVotesByVoterRequest protoreflect.MessageDescriptor - fd_QueryVotesByVoterRequest_voter protoreflect.FieldDescriptor - fd_QueryVotesByVoterRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryVotesByVoterRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryVotesByVoterRequest") - fd_QueryVotesByVoterRequest_voter = md_QueryVotesByVoterRequest.Fields().ByName("voter") - fd_QueryVotesByVoterRequest_pagination = md_QueryVotesByVoterRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesByVoterRequest)(nil) - -type fastReflection_QueryVotesByVoterRequest QueryVotesByVoterRequest - -func (x *QueryVotesByVoterRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesByVoterRequest)(x) -} - -func (x *QueryVotesByVoterRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesByVoterRequest_messageType fastReflection_QueryVotesByVoterRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesByVoterRequest_messageType{} - -type fastReflection_QueryVotesByVoterRequest_messageType struct{} - -func (x fastReflection_QueryVotesByVoterRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesByVoterRequest)(nil) -} -func (x fastReflection_QueryVotesByVoterRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesByVoterRequest) -} -func (x fastReflection_QueryVotesByVoterRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByVoterRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesByVoterRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByVoterRequest -} - -// 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_QueryVotesByVoterRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesByVoterRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesByVoterRequest) New() protoreflect.Message { - return new(fastReflection_QueryVotesByVoterRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesByVoterRequest) Interface() protoreflect.ProtoMessage { - return (*QueryVotesByVoterRequest)(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_QueryVotesByVoterRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_QueryVotesByVoterRequest_voter, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesByVoterRequest_pagination, 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_QueryVotesByVoterRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterRequest.voter": - return x.Voter != "" - case "cosmos.group.v1.QueryVotesByVoterRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterRequest 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_QueryVotesByVoterRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterRequest.voter": - x.Voter = "" - case "cosmos.group.v1.QueryVotesByVoterRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterRequest 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_QueryVotesByVoterRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryVotesByVoterRequest.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.QueryVotesByVoterRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterRequest 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_QueryVotesByVoterRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterRequest.voter": - x.Voter = value.Interface().(string) - case "cosmos.group.v1.QueryVotesByVoterRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterRequest 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_QueryVotesByVoterRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryVotesByVoterRequest.voter": - panic(fmt.Errorf("field voter of message cosmos.group.v1.QueryVotesByVoterRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterRequest 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_QueryVotesByVoterRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterRequest.voter": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.QueryVotesByVoterRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterRequest 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_QueryVotesByVoterRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryVotesByVoterRequest", 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_QueryVotesByVoterRequest) 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_QueryVotesByVoterRequest) 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_QueryVotesByVoterRequest) 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_QueryVotesByVoterRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesByVoterRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesByVoterRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 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().(*QueryVotesByVoterRequest) - 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: QueryVotesByVoterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesByVoterRequest: 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 Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryVotesByVoterResponse_1_list)(nil) - -type _QueryVotesByVoterResponse_1_list struct { - list *[]*Vote -} - -func (x *_QueryVotesByVoterResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryVotesByVoterResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryVotesByVoterResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - (*x.list)[i] = concreteValue -} - -func (x *_QueryVotesByVoterResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Vote) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryVotesByVoterResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Vote) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesByVoterResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryVotesByVoterResponse_1_list) NewElement() protoreflect.Value { - v := new(Vote) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryVotesByVoterResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryVotesByVoterResponse protoreflect.MessageDescriptor - fd_QueryVotesByVoterResponse_votes protoreflect.FieldDescriptor - fd_QueryVotesByVoterResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryVotesByVoterResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryVotesByVoterResponse") - fd_QueryVotesByVoterResponse_votes = md_QueryVotesByVoterResponse.Fields().ByName("votes") - fd_QueryVotesByVoterResponse_pagination = md_QueryVotesByVoterResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryVotesByVoterResponse)(nil) - -type fastReflection_QueryVotesByVoterResponse QueryVotesByVoterResponse - -func (x *QueryVotesByVoterResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryVotesByVoterResponse)(x) -} - -func (x *QueryVotesByVoterResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryVotesByVoterResponse_messageType fastReflection_QueryVotesByVoterResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryVotesByVoterResponse_messageType{} - -type fastReflection_QueryVotesByVoterResponse_messageType struct{} - -func (x fastReflection_QueryVotesByVoterResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryVotesByVoterResponse)(nil) -} -func (x fastReflection_QueryVotesByVoterResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryVotesByVoterResponse) -} -func (x fastReflection_QueryVotesByVoterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByVoterResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryVotesByVoterResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryVotesByVoterResponse -} - -// 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_QueryVotesByVoterResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryVotesByVoterResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryVotesByVoterResponse) New() protoreflect.Message { - return new(fastReflection_QueryVotesByVoterResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryVotesByVoterResponse) Interface() protoreflect.ProtoMessage { - return (*QueryVotesByVoterResponse)(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_QueryVotesByVoterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_QueryVotesByVoterResponse_1_list{list: &x.Votes}) - if !f(fd_QueryVotesByVoterResponse_votes, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryVotesByVoterResponse_pagination, 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_QueryVotesByVoterResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterResponse.votes": - return len(x.Votes) != 0 - case "cosmos.group.v1.QueryVotesByVoterResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterResponse 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_QueryVotesByVoterResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterResponse.votes": - x.Votes = nil - case "cosmos.group.v1.QueryVotesByVoterResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterResponse 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_QueryVotesByVoterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryVotesByVoterResponse.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_QueryVotesByVoterResponse_1_list{}) - } - listValue := &_QueryVotesByVoterResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryVotesByVoterResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterResponse 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_QueryVotesByVoterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterResponse.votes": - lv := value.List() - clv := lv.(*_QueryVotesByVoterResponse_1_list) - x.Votes = *clv.list - case "cosmos.group.v1.QueryVotesByVoterResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterResponse 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_QueryVotesByVoterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterResponse.votes": - if x.Votes == nil { - x.Votes = []*Vote{} - } - value := &_QueryVotesByVoterResponse_1_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryVotesByVoterResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterResponse 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_QueryVotesByVoterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryVotesByVoterResponse.votes": - list := []*Vote{} - return protoreflect.ValueOfList(&_QueryVotesByVoterResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryVotesByVoterResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryVotesByVoterResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryVotesByVoterResponse 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_QueryVotesByVoterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryVotesByVoterResponse", 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_QueryVotesByVoterResponse) 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_QueryVotesByVoterResponse) 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_QueryVotesByVoterResponse) 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_QueryVotesByVoterResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryVotesByVoterResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryVotesByVoterResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryVotesByVoterResponse) - 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: QueryVotesByVoterResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVotesByVoterResponse: 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 Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &Vote{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryGroupsByMemberRequest protoreflect.MessageDescriptor - fd_QueryGroupsByMemberRequest_address protoreflect.FieldDescriptor - fd_QueryGroupsByMemberRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupsByMemberRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupsByMemberRequest") - fd_QueryGroupsByMemberRequest_address = md_QueryGroupsByMemberRequest.Fields().ByName("address") - fd_QueryGroupsByMemberRequest_pagination = md_QueryGroupsByMemberRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupsByMemberRequest)(nil) - -type fastReflection_QueryGroupsByMemberRequest QueryGroupsByMemberRequest - -func (x *QueryGroupsByMemberRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupsByMemberRequest)(x) -} - -func (x *QueryGroupsByMemberRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupsByMemberRequest_messageType fastReflection_QueryGroupsByMemberRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupsByMemberRequest_messageType{} - -type fastReflection_QueryGroupsByMemberRequest_messageType struct{} - -func (x fastReflection_QueryGroupsByMemberRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupsByMemberRequest)(nil) -} -func (x fastReflection_QueryGroupsByMemberRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByMemberRequest) -} -func (x fastReflection_QueryGroupsByMemberRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByMemberRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupsByMemberRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByMemberRequest -} - -// 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_QueryGroupsByMemberRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupsByMemberRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupsByMemberRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByMemberRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupsByMemberRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupsByMemberRequest)(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_QueryGroupsByMemberRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryGroupsByMemberRequest_address, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupsByMemberRequest_pagination, 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_QueryGroupsByMemberRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberRequest.address": - return x.Address != "" - case "cosmos.group.v1.QueryGroupsByMemberRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberRequest 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_QueryGroupsByMemberRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberRequest.address": - x.Address = "" - case "cosmos.group.v1.QueryGroupsByMemberRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberRequest 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_QueryGroupsByMemberRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.QueryGroupsByMemberRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberRequest 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_QueryGroupsByMemberRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberRequest.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.QueryGroupsByMemberRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberRequest 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_QueryGroupsByMemberRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.group.v1.QueryGroupsByMemberRequest.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.QueryGroupsByMemberRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberRequest 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_QueryGroupsByMemberRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberRequest.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.QueryGroupsByMemberRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberRequest 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_QueryGroupsByMemberRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupsByMemberRequest", 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_QueryGroupsByMemberRequest) 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_QueryGroupsByMemberRequest) 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_QueryGroupsByMemberRequest) 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_QueryGroupsByMemberRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupsByMemberRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupsByMemberRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupsByMemberRequest) - 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: QueryGroupsByMemberRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupsByMemberRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGroupsByMemberResponse_1_list)(nil) - -type _QueryGroupsByMemberResponse_1_list struct { - list *[]*GroupInfo -} - -func (x *_QueryGroupsByMemberResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupsByMemberResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupsByMemberResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupsByMemberResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*GroupInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupsByMemberResponse_1_list) AppendMutable() protoreflect.Value { - v := new(GroupInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupsByMemberResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupsByMemberResponse_1_list) NewElement() protoreflect.Value { - v := new(GroupInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupsByMemberResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGroupsByMemberResponse protoreflect.MessageDescriptor - fd_QueryGroupsByMemberResponse_groups protoreflect.FieldDescriptor - fd_QueryGroupsByMemberResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryGroupsByMemberResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryGroupsByMemberResponse") - fd_QueryGroupsByMemberResponse_groups = md_QueryGroupsByMemberResponse.Fields().ByName("groups") - fd_QueryGroupsByMemberResponse_pagination = md_QueryGroupsByMemberResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryGroupsByMemberResponse)(nil) - -type fastReflection_QueryGroupsByMemberResponse QueryGroupsByMemberResponse - -func (x *QueryGroupsByMemberResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupsByMemberResponse)(x) -} - -func (x *QueryGroupsByMemberResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGroupsByMemberResponse_messageType fastReflection_QueryGroupsByMemberResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupsByMemberResponse_messageType{} - -type fastReflection_QueryGroupsByMemberResponse_messageType struct{} - -func (x fastReflection_QueryGroupsByMemberResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupsByMemberResponse)(nil) -} -func (x fastReflection_QueryGroupsByMemberResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByMemberResponse) -} -func (x fastReflection_QueryGroupsByMemberResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByMemberResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGroupsByMemberResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupsByMemberResponse -} - -// 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_QueryGroupsByMemberResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupsByMemberResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupsByMemberResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupsByMemberResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupsByMemberResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupsByMemberResponse)(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_QueryGroupsByMemberResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Groups) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupsByMemberResponse_1_list{list: &x.Groups}) - if !f(fd_QueryGroupsByMemberResponse_groups, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryGroupsByMemberResponse_pagination, 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_QueryGroupsByMemberResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberResponse.groups": - return len(x.Groups) != 0 - case "cosmos.group.v1.QueryGroupsByMemberResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberResponse 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_QueryGroupsByMemberResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberResponse.groups": - x.Groups = nil - case "cosmos.group.v1.QueryGroupsByMemberResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberResponse 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_QueryGroupsByMemberResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberResponse.groups": - if len(x.Groups) == 0 { - return protoreflect.ValueOfList(&_QueryGroupsByMemberResponse_1_list{}) - } - listValue := &_QueryGroupsByMemberResponse_1_list{list: &x.Groups} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.QueryGroupsByMemberResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberResponse 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_QueryGroupsByMemberResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberResponse.groups": - lv := value.List() - clv := lv.(*_QueryGroupsByMemberResponse_1_list) - x.Groups = *clv.list - case "cosmos.group.v1.QueryGroupsByMemberResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberResponse 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_QueryGroupsByMemberResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberResponse.groups": - if x.Groups == nil { - x.Groups = []*GroupInfo{} - } - value := &_QueryGroupsByMemberResponse_1_list{list: &x.Groups} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.QueryGroupsByMemberResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberResponse 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_QueryGroupsByMemberResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryGroupsByMemberResponse.groups": - list := []*GroupInfo{} - return protoreflect.ValueOfList(&_QueryGroupsByMemberResponse_1_list{list: &list}) - case "cosmos.group.v1.QueryGroupsByMemberResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryGroupsByMemberResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryGroupsByMemberResponse 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_QueryGroupsByMemberResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryGroupsByMemberResponse", 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_QueryGroupsByMemberResponse) 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_QueryGroupsByMemberResponse) 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_QueryGroupsByMemberResponse) 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_QueryGroupsByMemberResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupsByMemberResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Groups) > 0 { - for _, e := range x.Groups { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryGroupsByMemberResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Groups) > 0 { - for iNdEx := len(x.Groups) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Groups[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupsByMemberResponse) - 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: QueryGroupsByMemberResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupsByMemberResponse: 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 Groups", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Groups = append(x.Groups, &GroupInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Groups[len(x.Groups)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryTallyResultRequest protoreflect.MessageDescriptor - fd_QueryTallyResultRequest_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryTallyResultRequest = File_cosmos_group_v1_query_proto.Messages().ByName("QueryTallyResultRequest") - fd_QueryTallyResultRequest_proposal_id = md_QueryTallyResultRequest.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryTallyResultRequest)(nil) - -type fastReflection_QueryTallyResultRequest QueryTallyResultRequest - -func (x *QueryTallyResultRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTallyResultRequest)(x) -} - -func (x *QueryTallyResultRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTallyResultRequest_messageType fastReflection_QueryTallyResultRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryTallyResultRequest_messageType{} - -type fastReflection_QueryTallyResultRequest_messageType struct{} - -func (x fastReflection_QueryTallyResultRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTallyResultRequest)(nil) -} -func (x fastReflection_QueryTallyResultRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultRequest) -} -func (x fastReflection_QueryTallyResultRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTallyResultRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultRequest -} - -// 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_QueryTallyResultRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryTallyResultRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTallyResultRequest) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTallyResultRequest) Interface() protoreflect.ProtoMessage { - return (*QueryTallyResultRequest)(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_QueryTallyResultRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_QueryTallyResultRequest_proposal_id, 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_QueryTallyResultRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultRequest.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultRequest.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryTallyResultRequest.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultRequest.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultRequest.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.QueryTallyResultRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultRequest.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultRequest")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultRequest 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_QueryTallyResultRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryTallyResultRequest", 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) 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_QueryTallyResultRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTallyResultRequest) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*QueryTallyResultRequest) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryTallyResultRequest) - 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: QueryTallyResultRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTallyResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryTallyResultResponse protoreflect.MessageDescriptor - fd_QueryTallyResultResponse_tally protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_query_proto_init() - md_QueryTallyResultResponse = File_cosmos_group_v1_query_proto.Messages().ByName("QueryTallyResultResponse") - fd_QueryTallyResultResponse_tally = md_QueryTallyResultResponse.Fields().ByName("tally") -} - -var _ protoreflect.Message = (*fastReflection_QueryTallyResultResponse)(nil) - -type fastReflection_QueryTallyResultResponse QueryTallyResultResponse - -func (x *QueryTallyResultResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryTallyResultResponse)(x) -} - -func (x *QueryTallyResultResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_query_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryTallyResultResponse_messageType fastReflection_QueryTallyResultResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryTallyResultResponse_messageType{} - -type fastReflection_QueryTallyResultResponse_messageType struct{} - -func (x fastReflection_QueryTallyResultResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryTallyResultResponse)(nil) -} -func (x fastReflection_QueryTallyResultResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultResponse) -} -func (x fastReflection_QueryTallyResultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryTallyResultResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryTallyResultResponse -} - -// 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_QueryTallyResultResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryTallyResultResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryTallyResultResponse) New() protoreflect.Message { - return new(fastReflection_QueryTallyResultResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryTallyResultResponse) Interface() protoreflect.ProtoMessage { - return (*QueryTallyResultResponse)(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_QueryTallyResultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Tally != nil { - value := protoreflect.ValueOfMessage(x.Tally.ProtoReflect()) - if !f(fd_QueryTallyResultResponse_tally, 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_QueryTallyResultResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultResponse.tally": - return x.Tally != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultResponse.tally": - x.Tally = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.QueryTallyResultResponse.tally": - value := x.Tally - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultResponse.tally": - x.Tally = value.Message().Interface().(*TallyResult) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultResponse.tally": - if x.Tally == nil { - x.Tally = new(TallyResult) - } - return protoreflect.ValueOfMessage(x.Tally.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.QueryTallyResultResponse.tally": - m := new(TallyResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.QueryTallyResultResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.QueryTallyResultResponse 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_QueryTallyResultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.QueryTallyResultResponse", 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) 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_QueryTallyResultResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryTallyResultResponse) - 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.Tally != nil { - l = options.Size(x.Tally) - 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().(*QueryTallyResultResponse) - 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.Tally != nil { - encoded, err := options.Marshal(x.Tally) - 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().(*QueryTallyResultResponse) - 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: QueryTallyResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTallyResultResponse: 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 Tally", 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.Tally == nil { - x.Tally = &TallyResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tally); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/group/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryGroupInfoRequest is the Query/GroupInfo request type. -type QueryGroupInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` -} - -func (x *QueryGroupInfoRequest) Reset() { - *x = QueryGroupInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryGroupInfoRequest) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -// QueryGroupInfoResponse is the Query/GroupInfo response type. -type QueryGroupInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // info is the GroupInfo for the group. - Info *GroupInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (x *QueryGroupInfoResponse) Reset() { - *x = QueryGroupInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryGroupInfoResponse) GetInfo() *GroupInfo { - if x != nil { - return x.Info - } - return nil -} - -// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. -type QueryGroupPolicyInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of the group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryGroupPolicyInfoRequest) Reset() { - *x = QueryGroupPolicyInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupPolicyInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupPolicyInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupPolicyInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupPolicyInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryGroupPolicyInfoRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. -type QueryGroupPolicyInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // info is the GroupPolicyInfo for the group policy. - Info *GroupPolicyInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (x *QueryGroupPolicyInfoResponse) Reset() { - *x = QueryGroupPolicyInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupPolicyInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupPolicyInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupPolicyInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupPolicyInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryGroupPolicyInfoResponse) GetInfo() *GroupPolicyInfo { - if x != nil { - return x.Info - } - return nil -} - -// QueryGroupMembersRequest is the Query/GroupMembers request type. -type QueryGroupMembersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupMembersRequest) Reset() { - *x = QueryGroupMembersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupMembersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupMembersRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupMembersRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupMembersRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryGroupMembersRequest) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *QueryGroupMembersRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. -type QueryGroupMembersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // members are the members of the group with given group_id. - Members []*GroupMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupMembersResponse) Reset() { - *x = QueryGroupMembersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupMembersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupMembersResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupMembersResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupMembersResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryGroupMembersResponse) GetMembers() []*GroupMember { - if x != nil { - return x.Members - } - return nil -} - -func (x *QueryGroupMembersResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. -type QueryGroupsByAdminRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of a group's admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupsByAdminRequest) Reset() { - *x = QueryGroupsByAdminRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupsByAdminRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupsByAdminRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupsByAdminRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupsByAdminRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryGroupsByAdminRequest) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *QueryGroupsByAdminRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. -type QueryGroupsByAdminResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // groups are the groups info with the provided admin. - Groups []*GroupInfo `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupsByAdminResponse) Reset() { - *x = QueryGroupsByAdminResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupsByAdminResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupsByAdminResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupsByAdminResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupsByAdminResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryGroupsByAdminResponse) GetGroups() []*GroupInfo { - if x != nil { - return x.Groups - } - return nil -} - -func (x *QueryGroupsByAdminResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. -type QueryGroupPoliciesByGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group policy's group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupPoliciesByGroupRequest) Reset() { - *x = QueryGroupPoliciesByGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupPoliciesByGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupPoliciesByGroupRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupPoliciesByGroupRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupPoliciesByGroupRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryGroupPoliciesByGroupRequest) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *QueryGroupPoliciesByGroupRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. -type QueryGroupPoliciesByGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_policies are the group policies info associated with the provided group. - GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,1,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupPoliciesByGroupResponse) Reset() { - *x = QueryGroupPoliciesByGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupPoliciesByGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupPoliciesByGroupResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupPoliciesByGroupResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupPoliciesByGroupResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryGroupPoliciesByGroupResponse) GetGroupPolicies() []*GroupPolicyInfo { - if x != nil { - return x.GroupPolicies - } - return nil -} - -func (x *QueryGroupPoliciesByGroupResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. -type QueryGroupPoliciesByAdminRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the admin address of the group policy. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupPoliciesByAdminRequest) Reset() { - *x = QueryGroupPoliciesByAdminRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupPoliciesByAdminRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupPoliciesByAdminRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupPoliciesByAdminRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupPoliciesByAdminRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryGroupPoliciesByAdminRequest) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *QueryGroupPoliciesByAdminRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. -type QueryGroupPoliciesByAdminResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_policies are the group policies info with provided admin. - GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,1,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupPoliciesByAdminResponse) Reset() { - *x = QueryGroupPoliciesByAdminResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupPoliciesByAdminResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupPoliciesByAdminResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupPoliciesByAdminResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupPoliciesByAdminResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryGroupPoliciesByAdminResponse) GetGroupPolicies() []*GroupPolicyInfo { - if x != nil { - return x.GroupPolicies - } - return nil -} - -func (x *QueryGroupPoliciesByAdminResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryProposalRequest is the Query/Proposal request type. -type QueryProposalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of a proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *QueryProposalRequest) Reset() { - *x = QueryProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalRequest) ProtoMessage() {} - -// Deprecated: Use QueryProposalRequest.ProtoReflect.Descriptor instead. -func (*QueryProposalRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryProposalRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// QueryProposalResponse is the Query/Proposal response type. -type QueryProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal is the proposal info. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` -} - -func (x *QueryProposalResponse) Reset() { - *x = QueryProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalResponse) ProtoMessage() {} - -// Deprecated: Use QueryProposalResponse.ProtoReflect.Descriptor instead. -func (*QueryProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryProposalResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. -type QueryProposalsByGroupPolicyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of the group policy related to proposals. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryProposalsByGroupPolicyRequest) Reset() { - *x = QueryProposalsByGroupPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalsByGroupPolicyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalsByGroupPolicyRequest) ProtoMessage() {} - -// Deprecated: Use QueryProposalsByGroupPolicyRequest.ProtoReflect.Descriptor instead. -func (*QueryProposalsByGroupPolicyRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryProposalsByGroupPolicyRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QueryProposalsByGroupPolicyRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. -type QueryProposalsByGroupPolicyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposals are the proposals with given group policy. - Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryProposalsByGroupPolicyResponse) Reset() { - *x = QueryProposalsByGroupPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryProposalsByGroupPolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryProposalsByGroupPolicyResponse) ProtoMessage() {} - -// Deprecated: Use QueryProposalsByGroupPolicyResponse.ProtoReflect.Descriptor instead. -func (*QueryProposalsByGroupPolicyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryProposalsByGroupPolicyResponse) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -func (x *QueryProposalsByGroupPolicyResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. -type QueryVoteByProposalVoterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of a proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter is a proposal voter account address. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` -} - -func (x *QueryVoteByProposalVoterRequest) Reset() { - *x = QueryVoteByProposalVoterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVoteByProposalVoterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVoteByProposalVoterRequest) ProtoMessage() {} - -// Deprecated: Use QueryVoteByProposalVoterRequest.ProtoReflect.Descriptor instead. -func (*QueryVoteByProposalVoterRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryVoteByProposalVoterRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryVoteByProposalVoterRequest) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. -type QueryVoteByProposalVoterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // vote is the vote with given proposal_id and voter. - Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` -} - -func (x *QueryVoteByProposalVoterResponse) Reset() { - *x = QueryVoteByProposalVoterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVoteByProposalVoterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVoteByProposalVoterResponse) ProtoMessage() {} - -// Deprecated: Use QueryVoteByProposalVoterResponse.ProtoReflect.Descriptor instead. -func (*QueryVoteByProposalVoterResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryVoteByProposalVoterResponse) GetVote() *Vote { - if x != nil { - return x.Vote - } - return nil -} - -// QueryVotesByProposalRequest is the Query/VotesByProposal request type. -type QueryVotesByProposalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique ID of a proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesByProposalRequest) Reset() { - *x = QueryVotesByProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesByProposalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesByProposalRequest) ProtoMessage() {} - -// Deprecated: Use QueryVotesByProposalRequest.ProtoReflect.Descriptor instead. -func (*QueryVotesByProposalRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryVotesByProposalRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *QueryVotesByProposalRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVotesByProposalResponse is the Query/VotesByProposal response type. -type QueryVotesByProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // votes are the list of votes for given proposal_id. - Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesByProposalResponse) Reset() { - *x = QueryVotesByProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesByProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesByProposalResponse) ProtoMessage() {} - -// Deprecated: Use QueryVotesByProposalResponse.ProtoReflect.Descriptor instead. -func (*QueryVotesByProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryVotesByProposalResponse) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -func (x *QueryVotesByProposalResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVotesByVoterRequest is the Query/VotesByVoter request type. -type QueryVotesByVoterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // voter is a proposal voter account address. - Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesByVoterRequest) Reset() { - *x = QueryVotesByVoterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesByVoterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesByVoterRequest) ProtoMessage() {} - -// Deprecated: Use QueryVotesByVoterRequest.ProtoReflect.Descriptor instead. -func (*QueryVotesByVoterRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{20} -} - -func (x *QueryVotesByVoterRequest) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *QueryVotesByVoterRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryVotesByVoterResponse is the Query/VotesByVoter response type. -type QueryVotesByVoterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // votes are the list of votes by given voter. - Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryVotesByVoterResponse) Reset() { - *x = QueryVotesByVoterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryVotesByVoterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryVotesByVoterResponse) ProtoMessage() {} - -// Deprecated: Use QueryVotesByVoterResponse.ProtoReflect.Descriptor instead. -func (*QueryVotesByVoterResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{21} -} - -func (x *QueryVotesByVoterResponse) GetVotes() []*Vote { - if x != nil { - return x.Votes - } - return nil -} - -func (x *QueryVotesByVoterResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. -type QueryGroupsByMemberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the group member address. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupsByMemberRequest) Reset() { - *x = QueryGroupsByMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupsByMemberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupsByMemberRequest) ProtoMessage() {} - -// Deprecated: Use QueryGroupsByMemberRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupsByMemberRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{22} -} - -func (x *QueryGroupsByMemberRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QueryGroupsByMemberRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. -type QueryGroupsByMemberResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // groups are the groups info with the provided group member. - Groups []*GroupInfo `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryGroupsByMemberResponse) Reset() { - *x = QueryGroupsByMemberResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGroupsByMemberResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGroupsByMemberResponse) ProtoMessage() {} - -// Deprecated: Use QueryGroupsByMemberResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupsByMemberResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{23} -} - -func (x *QueryGroupsByMemberResponse) GetGroups() []*GroupInfo { - if x != nil { - return x.Groups - } - return nil -} - -func (x *QueryGroupsByMemberResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryTallyResultRequest is the Query/TallyResult request type. -type QueryTallyResultRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal_id is the unique id of a proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *QueryTallyResultRequest) Reset() { - *x = QueryTallyResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTallyResultRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTallyResultRequest) ProtoMessage() {} - -// Deprecated: Use QueryTallyResultRequest.ProtoReflect.Descriptor instead. -func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{24} -} - -func (x *QueryTallyResultRequest) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// QueryTallyResultResponse is the Query/TallyResult response type. -type QueryTallyResultResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tally defines the requested tally. - Tally *TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally,omitempty"` -} - -func (x *QueryTallyResultResponse) Reset() { - *x = QueryTallyResultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_query_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryTallyResultResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryTallyResultResponse) ProtoMessage() {} - -// Deprecated: Use QueryTallyResultResponse.ProtoReflect.Descriptor instead. -func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_query_proto_rawDescGZIP(), []int{25} -} - -func (x *QueryTallyResultResponse) GetTally() *TallyResult { - if x != nil { - return x.Tally - } - return nil -} - -var File_cosmos_group_v1_query_proto protoreflect.FileDescriptor - -var file_cosmos_group_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x51, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x54, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7d, 0x0a, - 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x01, 0x0a, - 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x19, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x32, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x01, - 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x46, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, - 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x21, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x47, 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x37, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x15, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0xa0, 0x01, 0x0a, 0x22, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x42, 0x79, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa7, - 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x72, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, - 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, - 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x20, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x29, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x1b, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, - 0x74, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, - 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x18, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x91, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, - 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, - 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 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, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x9a, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x42, - 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x32, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x17, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x32, 0x85, - 0x11, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x09, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, - 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, - 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x98, - 0x01, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, - 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x0d, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x7b, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5f, - 0x62, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x31, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x42, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x5f, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x7b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x7d, 0x12, 0x8a, 0x01, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xc1, 0x01, 0x0a, 0x16, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xc1, - 0x01, 0x0a, 0x13, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, - 0x74, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x6f, 0x74, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x0f, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, - 0x74, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, - 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, - 0x74, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2f, - 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x96, 0x01, - 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x29, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, - 0x76, 0x6f, 0x74, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x2f, 0x7b, - 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x42, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x42, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, - 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x54, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0xb9, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_group_v1_query_proto_rawDescOnce sync.Once - file_cosmos_group_v1_query_proto_rawDescData = file_cosmos_group_v1_query_proto_rawDesc -) - -func file_cosmos_group_v1_query_proto_rawDescGZIP() []byte { - file_cosmos_group_v1_query_proto_rawDescOnce.Do(func() { - file_cosmos_group_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_group_v1_query_proto_rawDescData) - }) - return file_cosmos_group_v1_query_proto_rawDescData -} - -var file_cosmos_group_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_cosmos_group_v1_query_proto_goTypes = []interface{}{ - (*QueryGroupInfoRequest)(nil), // 0: cosmos.group.v1.QueryGroupInfoRequest - (*QueryGroupInfoResponse)(nil), // 1: cosmos.group.v1.QueryGroupInfoResponse - (*QueryGroupPolicyInfoRequest)(nil), // 2: cosmos.group.v1.QueryGroupPolicyInfoRequest - (*QueryGroupPolicyInfoResponse)(nil), // 3: cosmos.group.v1.QueryGroupPolicyInfoResponse - (*QueryGroupMembersRequest)(nil), // 4: cosmos.group.v1.QueryGroupMembersRequest - (*QueryGroupMembersResponse)(nil), // 5: cosmos.group.v1.QueryGroupMembersResponse - (*QueryGroupsByAdminRequest)(nil), // 6: cosmos.group.v1.QueryGroupsByAdminRequest - (*QueryGroupsByAdminResponse)(nil), // 7: cosmos.group.v1.QueryGroupsByAdminResponse - (*QueryGroupPoliciesByGroupRequest)(nil), // 8: cosmos.group.v1.QueryGroupPoliciesByGroupRequest - (*QueryGroupPoliciesByGroupResponse)(nil), // 9: cosmos.group.v1.QueryGroupPoliciesByGroupResponse - (*QueryGroupPoliciesByAdminRequest)(nil), // 10: cosmos.group.v1.QueryGroupPoliciesByAdminRequest - (*QueryGroupPoliciesByAdminResponse)(nil), // 11: cosmos.group.v1.QueryGroupPoliciesByAdminResponse - (*QueryProposalRequest)(nil), // 12: cosmos.group.v1.QueryProposalRequest - (*QueryProposalResponse)(nil), // 13: cosmos.group.v1.QueryProposalResponse - (*QueryProposalsByGroupPolicyRequest)(nil), // 14: cosmos.group.v1.QueryProposalsByGroupPolicyRequest - (*QueryProposalsByGroupPolicyResponse)(nil), // 15: cosmos.group.v1.QueryProposalsByGroupPolicyResponse - (*QueryVoteByProposalVoterRequest)(nil), // 16: cosmos.group.v1.QueryVoteByProposalVoterRequest - (*QueryVoteByProposalVoterResponse)(nil), // 17: cosmos.group.v1.QueryVoteByProposalVoterResponse - (*QueryVotesByProposalRequest)(nil), // 18: cosmos.group.v1.QueryVotesByProposalRequest - (*QueryVotesByProposalResponse)(nil), // 19: cosmos.group.v1.QueryVotesByProposalResponse - (*QueryVotesByVoterRequest)(nil), // 20: cosmos.group.v1.QueryVotesByVoterRequest - (*QueryVotesByVoterResponse)(nil), // 21: cosmos.group.v1.QueryVotesByVoterResponse - (*QueryGroupsByMemberRequest)(nil), // 22: cosmos.group.v1.QueryGroupsByMemberRequest - (*QueryGroupsByMemberResponse)(nil), // 23: cosmos.group.v1.QueryGroupsByMemberResponse - (*QueryTallyResultRequest)(nil), // 24: cosmos.group.v1.QueryTallyResultRequest - (*QueryTallyResultResponse)(nil), // 25: cosmos.group.v1.QueryTallyResultResponse - (*GroupInfo)(nil), // 26: cosmos.group.v1.GroupInfo - (*GroupPolicyInfo)(nil), // 27: cosmos.group.v1.GroupPolicyInfo - (*v1beta1.PageRequest)(nil), // 28: cosmos.base.query.v1beta1.PageRequest - (*GroupMember)(nil), // 29: cosmos.group.v1.GroupMember - (*v1beta1.PageResponse)(nil), // 30: cosmos.base.query.v1beta1.PageResponse - (*Proposal)(nil), // 31: cosmos.group.v1.Proposal - (*Vote)(nil), // 32: cosmos.group.v1.Vote - (*TallyResult)(nil), // 33: cosmos.group.v1.TallyResult -} -var file_cosmos_group_v1_query_proto_depIdxs = []int32{ - 26, // 0: cosmos.group.v1.QueryGroupInfoResponse.info:type_name -> cosmos.group.v1.GroupInfo - 27, // 1: cosmos.group.v1.QueryGroupPolicyInfoResponse.info:type_name -> cosmos.group.v1.GroupPolicyInfo - 28, // 2: cosmos.group.v1.QueryGroupMembersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 29, // 3: cosmos.group.v1.QueryGroupMembersResponse.members:type_name -> cosmos.group.v1.GroupMember - 30, // 4: cosmos.group.v1.QueryGroupMembersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 5: cosmos.group.v1.QueryGroupsByAdminRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 26, // 6: cosmos.group.v1.QueryGroupsByAdminResponse.groups:type_name -> cosmos.group.v1.GroupInfo - 30, // 7: cosmos.group.v1.QueryGroupsByAdminResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 8: cosmos.group.v1.QueryGroupPoliciesByGroupRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 9: cosmos.group.v1.QueryGroupPoliciesByGroupResponse.group_policies:type_name -> cosmos.group.v1.GroupPolicyInfo - 30, // 10: cosmos.group.v1.QueryGroupPoliciesByGroupResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 11: cosmos.group.v1.QueryGroupPoliciesByAdminRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 12: cosmos.group.v1.QueryGroupPoliciesByAdminResponse.group_policies:type_name -> cosmos.group.v1.GroupPolicyInfo - 30, // 13: cosmos.group.v1.QueryGroupPoliciesByAdminResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 31, // 14: cosmos.group.v1.QueryProposalResponse.proposal:type_name -> cosmos.group.v1.Proposal - 28, // 15: cosmos.group.v1.QueryProposalsByGroupPolicyRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 31, // 16: cosmos.group.v1.QueryProposalsByGroupPolicyResponse.proposals:type_name -> cosmos.group.v1.Proposal - 30, // 17: cosmos.group.v1.QueryProposalsByGroupPolicyResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 32, // 18: cosmos.group.v1.QueryVoteByProposalVoterResponse.vote:type_name -> cosmos.group.v1.Vote - 28, // 19: cosmos.group.v1.QueryVotesByProposalRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 32, // 20: cosmos.group.v1.QueryVotesByProposalResponse.votes:type_name -> cosmos.group.v1.Vote - 30, // 21: cosmos.group.v1.QueryVotesByProposalResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 22: cosmos.group.v1.QueryVotesByVoterRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 32, // 23: cosmos.group.v1.QueryVotesByVoterResponse.votes:type_name -> cosmos.group.v1.Vote - 30, // 24: cosmos.group.v1.QueryVotesByVoterResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 25: cosmos.group.v1.QueryGroupsByMemberRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 26, // 26: cosmos.group.v1.QueryGroupsByMemberResponse.groups:type_name -> cosmos.group.v1.GroupInfo - 30, // 27: cosmos.group.v1.QueryGroupsByMemberResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 33, // 28: cosmos.group.v1.QueryTallyResultResponse.tally:type_name -> cosmos.group.v1.TallyResult - 0, // 29: cosmos.group.v1.Query.GroupInfo:input_type -> cosmos.group.v1.QueryGroupInfoRequest - 2, // 30: cosmos.group.v1.Query.GroupPolicyInfo:input_type -> cosmos.group.v1.QueryGroupPolicyInfoRequest - 4, // 31: cosmos.group.v1.Query.GroupMembers:input_type -> cosmos.group.v1.QueryGroupMembersRequest - 6, // 32: cosmos.group.v1.Query.GroupsByAdmin:input_type -> cosmos.group.v1.QueryGroupsByAdminRequest - 8, // 33: cosmos.group.v1.Query.GroupPoliciesByGroup:input_type -> cosmos.group.v1.QueryGroupPoliciesByGroupRequest - 10, // 34: cosmos.group.v1.Query.GroupPoliciesByAdmin:input_type -> cosmos.group.v1.QueryGroupPoliciesByAdminRequest - 12, // 35: cosmos.group.v1.Query.Proposal:input_type -> cosmos.group.v1.QueryProposalRequest - 14, // 36: cosmos.group.v1.Query.ProposalsByGroupPolicy:input_type -> cosmos.group.v1.QueryProposalsByGroupPolicyRequest - 16, // 37: cosmos.group.v1.Query.VoteByProposalVoter:input_type -> cosmos.group.v1.QueryVoteByProposalVoterRequest - 18, // 38: cosmos.group.v1.Query.VotesByProposal:input_type -> cosmos.group.v1.QueryVotesByProposalRequest - 20, // 39: cosmos.group.v1.Query.VotesByVoter:input_type -> cosmos.group.v1.QueryVotesByVoterRequest - 22, // 40: cosmos.group.v1.Query.GroupsByMember:input_type -> cosmos.group.v1.QueryGroupsByMemberRequest - 24, // 41: cosmos.group.v1.Query.TallyResult:input_type -> cosmos.group.v1.QueryTallyResultRequest - 1, // 42: cosmos.group.v1.Query.GroupInfo:output_type -> cosmos.group.v1.QueryGroupInfoResponse - 3, // 43: cosmos.group.v1.Query.GroupPolicyInfo:output_type -> cosmos.group.v1.QueryGroupPolicyInfoResponse - 5, // 44: cosmos.group.v1.Query.GroupMembers:output_type -> cosmos.group.v1.QueryGroupMembersResponse - 7, // 45: cosmos.group.v1.Query.GroupsByAdmin:output_type -> cosmos.group.v1.QueryGroupsByAdminResponse - 9, // 46: cosmos.group.v1.Query.GroupPoliciesByGroup:output_type -> cosmos.group.v1.QueryGroupPoliciesByGroupResponse - 11, // 47: cosmos.group.v1.Query.GroupPoliciesByAdmin:output_type -> cosmos.group.v1.QueryGroupPoliciesByAdminResponse - 13, // 48: cosmos.group.v1.Query.Proposal:output_type -> cosmos.group.v1.QueryProposalResponse - 15, // 49: cosmos.group.v1.Query.ProposalsByGroupPolicy:output_type -> cosmos.group.v1.QueryProposalsByGroupPolicyResponse - 17, // 50: cosmos.group.v1.Query.VoteByProposalVoter:output_type -> cosmos.group.v1.QueryVoteByProposalVoterResponse - 19, // 51: cosmos.group.v1.Query.VotesByProposal:output_type -> cosmos.group.v1.QueryVotesByProposalResponse - 21, // 52: cosmos.group.v1.Query.VotesByVoter:output_type -> cosmos.group.v1.QueryVotesByVoterResponse - 23, // 53: cosmos.group.v1.Query.GroupsByMember:output_type -> cosmos.group.v1.QueryGroupsByMemberResponse - 25, // 54: cosmos.group.v1.Query.TallyResult:output_type -> cosmos.group.v1.QueryTallyResultResponse - 42, // [42:55] is the sub-list for method output_type - 29, // [29:42] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name -} - -func init() { file_cosmos_group_v1_query_proto_init() } -func file_cosmos_group_v1_query_proto_init() { - if File_cosmos_group_v1_query_proto != nil { - return - } - file_cosmos_group_v1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_group_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupPolicyInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupPolicyInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupMembersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupMembersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupsByAdminRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupsByAdminResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupPoliciesByGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupPoliciesByGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupPoliciesByAdminRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupPoliciesByAdminResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalsByGroupPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryProposalsByGroupPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVoteByProposalVoterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVoteByProposalVoterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesByProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesByProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesByVoterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryVotesByVoterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupsByMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupsByMemberResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTallyResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryTallyResultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_group_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 26, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_group_v1_query_proto_goTypes, - DependencyIndexes: file_cosmos_group_v1_query_proto_depIdxs, - MessageInfos: file_cosmos_group_v1_query_proto_msgTypes, - }.Build() - File_cosmos_group_v1_query_proto = out.File - file_cosmos_group_v1_query_proto_rawDesc = nil - file_cosmos_group_v1_query_proto_goTypes = nil - file_cosmos_group_v1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/group/v1/query_grpc.pb.go b/api/cosmos/group/v1/query_grpc.pb.go deleted file mode 100644 index 03f1d8977ce6..000000000000 --- a/api/cosmos/group/v1/query_grpc.pb.go +++ /dev/null @@ -1,563 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/group/v1/query.proto - -package groupv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // GroupInfo queries group info based on group id. - GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error) - // GroupPolicyInfo queries group policy info based on account address of group policy. - GroupPolicyInfo(ctx context.Context, in *QueryGroupPolicyInfoRequest, opts ...grpc.CallOption) (*QueryGroupPolicyInfoResponse, error) - // GroupMembers queries members of a group - GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error) - // GroupsByAdmin queries groups by admin address. - GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error) - // GroupPoliciesByGroup queries group policies by group id. - GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error) - // GroupsByAdmin queries group policies by admin address. - GroupPoliciesByAdmin(ctx context.Context, in *QueryGroupPoliciesByAdminRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByAdminResponse, error) - // Proposal queries a proposal based on proposal id. - Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) - // ProposalsByGroupPolicy queries proposals based on account address of group policy. - ProposalsByGroupPolicy(ctx context.Context, in *QueryProposalsByGroupPolicyRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupPolicyResponse, error) - // VoteByProposalVoter queries a vote by proposal id and voter. - VoteByProposalVoter(ctx context.Context, in *QueryVoteByProposalVoterRequest, opts ...grpc.CallOption) (*QueryVoteByProposalVoterResponse, error) - // VotesByProposal queries a vote by proposal. - VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error) - // VotesByVoter queries a vote by voter. - VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error) - // GroupsByMember queries groups by member address. - GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error) - // TallyResult queries the tally of a proposal votes. - TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error) { - out := new(QueryGroupInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GroupPolicyInfo(ctx context.Context, in *QueryGroupPolicyInfoRequest, opts ...grpc.CallOption) (*QueryGroupPolicyInfoResponse, error) { - out := new(QueryGroupPolicyInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupPolicyInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error) { - out := new(QueryGroupMembersResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupMembers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error) { - out := new(QueryGroupsByAdminResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupsByAdmin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error) { - out := new(QueryGroupPoliciesByGroupResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupPoliciesByGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GroupPoliciesByAdmin(ctx context.Context, in *QueryGroupPoliciesByAdminRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByAdminResponse, error) { - out := new(QueryGroupPoliciesByAdminResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupPoliciesByAdmin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) { - out := new(QueryProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/Proposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ProposalsByGroupPolicy(ctx context.Context, in *QueryProposalsByGroupPolicyRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupPolicyResponse, error) { - out := new(QueryProposalsByGroupPolicyResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/ProposalsByGroupPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) VoteByProposalVoter(ctx context.Context, in *QueryVoteByProposalVoterRequest, opts ...grpc.CallOption) (*QueryVoteByProposalVoterResponse, error) { - out := new(QueryVoteByProposalVoterResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/VoteByProposalVoter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error) { - out := new(QueryVotesByProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/VotesByProposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error) { - out := new(QueryVotesByVoterResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/VotesByVoter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error) { - out := new(QueryGroupsByMemberResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/GroupsByMember", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) { - out := new(QueryTallyResultResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Query/TallyResult", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // GroupInfo queries group info based on group id. - GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) - // GroupPolicyInfo queries group policy info based on account address of group policy. - GroupPolicyInfo(context.Context, *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error) - // GroupMembers queries members of a group - GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) - // GroupsByAdmin queries groups by admin address. - GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) - // GroupPoliciesByGroup queries group policies by group id. - GroupPoliciesByGroup(context.Context, *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error) - // GroupsByAdmin queries group policies by admin address. - GroupPoliciesByAdmin(context.Context, *QueryGroupPoliciesByAdminRequest) (*QueryGroupPoliciesByAdminResponse, error) - // Proposal queries a proposal based on proposal id. - Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) - // ProposalsByGroupPolicy queries proposals based on account address of group policy. - ProposalsByGroupPolicy(context.Context, *QueryProposalsByGroupPolicyRequest) (*QueryProposalsByGroupPolicyResponse, error) - // VoteByProposalVoter queries a vote by proposal id and voter. - VoteByProposalVoter(context.Context, *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error) - // VotesByProposal queries a vote by proposal. - VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error) - // VotesByVoter queries a vote by voter. - VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) - // GroupsByMember queries groups by member address. - GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error) - // TallyResult queries the tally of a proposal votes. - TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupInfo not implemented") -} -func (UnimplementedQueryServer) GroupPolicyInfo(context.Context, *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupPolicyInfo not implemented") -} -func (UnimplementedQueryServer) GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupMembers not implemented") -} -func (UnimplementedQueryServer) GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupsByAdmin not implemented") -} -func (UnimplementedQueryServer) GroupPoliciesByGroup(context.Context, *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupPoliciesByGroup not implemented") -} -func (UnimplementedQueryServer) GroupPoliciesByAdmin(context.Context, *QueryGroupPoliciesByAdminRequest) (*QueryGroupPoliciesByAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupPoliciesByAdmin not implemented") -} -func (UnimplementedQueryServer) Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") -} -func (UnimplementedQueryServer) ProposalsByGroupPolicy(context.Context, *QueryProposalsByGroupPolicyRequest) (*QueryProposalsByGroupPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalsByGroupPolicy not implemented") -} -func (UnimplementedQueryServer) VoteByProposalVoter(context.Context, *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteByProposalVoter not implemented") -} -func (UnimplementedQueryServer) VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VotesByProposal not implemented") -} -func (UnimplementedQueryServer) VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VotesByVoter not implemented") -} -func (UnimplementedQueryServer) GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupsByMember not implemented") -} -func (UnimplementedQueryServer) TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupInfo(ctx, req.(*QueryGroupInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GroupPolicyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupPolicyInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupPolicyInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupPolicyInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupPolicyInfo(ctx, req.(*QueryGroupPolicyInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupMembersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupMembers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupMembers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupMembers(ctx, req.(*QueryGroupMembersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GroupsByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupsByAdminRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupsByAdmin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupsByAdmin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupsByAdmin(ctx, req.(*QueryGroupsByAdminRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GroupPoliciesByGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupPoliciesByGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupPoliciesByGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupPoliciesByGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupPoliciesByGroup(ctx, req.(*QueryGroupPoliciesByGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GroupPoliciesByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupPoliciesByAdminRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupPoliciesByAdmin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupPoliciesByAdmin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupPoliciesByAdmin(ctx, req.(*QueryGroupPoliciesByAdminRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Proposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/Proposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Proposal(ctx, req.(*QueryProposalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ProposalsByGroupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalsByGroupPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ProposalsByGroupPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/ProposalsByGroupPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ProposalsByGroupPolicy(ctx, req.(*QueryProposalsByGroupPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_VoteByProposalVoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVoteByProposalVoterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).VoteByProposalVoter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/VoteByProposalVoter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).VoteByProposalVoter(ctx, req.(*QueryVoteByProposalVoterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_VotesByProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVotesByProposalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).VotesByProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/VotesByProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).VotesByProposal(ctx, req.(*QueryVotesByProposalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_VotesByVoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryVotesByVoterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).VotesByVoter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/VotesByVoter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).VotesByVoter(ctx, req.(*QueryVotesByVoterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GroupsByMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupsByMemberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GroupsByMember(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/GroupsByMember", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupsByMember(ctx, req.(*QueryGroupsByMemberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTallyResultRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TallyResult(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Query/TallyResult", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TallyResult(ctx, req.(*QueryTallyResultRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.group.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GroupInfo", - Handler: _Query_GroupInfo_Handler, - }, - { - MethodName: "GroupPolicyInfo", - Handler: _Query_GroupPolicyInfo_Handler, - }, - { - MethodName: "GroupMembers", - Handler: _Query_GroupMembers_Handler, - }, - { - MethodName: "GroupsByAdmin", - Handler: _Query_GroupsByAdmin_Handler, - }, - { - MethodName: "GroupPoliciesByGroup", - Handler: _Query_GroupPoliciesByGroup_Handler, - }, - { - MethodName: "GroupPoliciesByAdmin", - Handler: _Query_GroupPoliciesByAdmin_Handler, - }, - { - MethodName: "Proposal", - Handler: _Query_Proposal_Handler, - }, - { - MethodName: "ProposalsByGroupPolicy", - Handler: _Query_ProposalsByGroupPolicy_Handler, - }, - { - MethodName: "VoteByProposalVoter", - Handler: _Query_VoteByProposalVoter_Handler, - }, - { - MethodName: "VotesByProposal", - Handler: _Query_VotesByProposal_Handler, - }, - { - MethodName: "VotesByVoter", - Handler: _Query_VotesByVoter_Handler, - }, - { - MethodName: "GroupsByMember", - Handler: _Query_GroupsByMember_Handler, - }, - { - MethodName: "TallyResult", - Handler: _Query_TallyResult_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/group/v1/query.proto", -} diff --git a/api/cosmos/group/v1/tx.pulsar.go b/api/cosmos/group/v1/tx.pulsar.go deleted file mode 100644 index 78e15d6d1944..000000000000 --- a/api/cosmos/group/v1/tx.pulsar.go +++ /dev/null @@ -1,15582 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package groupv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_MsgCreateGroup_2_list)(nil) - -type _MsgCreateGroup_2_list struct { - list *[]*Member -} - -func (x *_MsgCreateGroup_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgCreateGroup_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgCreateGroup_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - (*x.list)[i] = concreteValue -} - -func (x *_MsgCreateGroup_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgCreateGroup_2_list) AppendMutable() protoreflect.Value { - v := new(Member) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreateGroup_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgCreateGroup_2_list) NewElement() protoreflect.Value { - v := new(Member) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreateGroup_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgCreateGroup protoreflect.MessageDescriptor - fd_MsgCreateGroup_admin protoreflect.FieldDescriptor - fd_MsgCreateGroup_members protoreflect.FieldDescriptor - fd_MsgCreateGroup_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgCreateGroup = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgCreateGroup") - fd_MsgCreateGroup_admin = md_MsgCreateGroup.Fields().ByName("admin") - fd_MsgCreateGroup_members = md_MsgCreateGroup.Fields().ByName("members") - fd_MsgCreateGroup_metadata = md_MsgCreateGroup.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateGroup)(nil) - -type fastReflection_MsgCreateGroup MsgCreateGroup - -func (x *MsgCreateGroup) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateGroup)(x) -} - -func (x *MsgCreateGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateGroup_messageType fastReflection_MsgCreateGroup_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateGroup_messageType{} - -type fastReflection_MsgCreateGroup_messageType struct{} - -func (x fastReflection_MsgCreateGroup_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateGroup)(nil) -} -func (x fastReflection_MsgCreateGroup_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroup) -} -func (x fastReflection_MsgCreateGroup_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroup -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateGroup) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroup -} - -// 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_MsgCreateGroup) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateGroup_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateGroup) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroup) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateGroup) Interface() protoreflect.ProtoMessage { - return (*MsgCreateGroup)(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_MsgCreateGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgCreateGroup_admin, value) { - return - } - } - if len(x.Members) != 0 { - value := protoreflect.ValueOfList(&_MsgCreateGroup_2_list{list: &x.Members}) - if !f(fd_MsgCreateGroup_members, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgCreateGroup_metadata, 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_MsgCreateGroup) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroup.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgCreateGroup.members": - return len(x.Members) != 0 - case "cosmos.group.v1.MsgCreateGroup.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroup 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_MsgCreateGroup) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroup.admin": - x.Admin = "" - case "cosmos.group.v1.MsgCreateGroup.members": - x.Members = nil - case "cosmos.group.v1.MsgCreateGroup.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroup 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_MsgCreateGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgCreateGroup.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgCreateGroup.members": - if len(x.Members) == 0 { - return protoreflect.ValueOfList(&_MsgCreateGroup_2_list{}) - } - listValue := &_MsgCreateGroup_2_list{list: &x.Members} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.MsgCreateGroup.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroup 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_MsgCreateGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroup.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgCreateGroup.members": - lv := value.List() - clv := lv.(*_MsgCreateGroup_2_list) - x.Members = *clv.list - case "cosmos.group.v1.MsgCreateGroup.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroup 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_MsgCreateGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroup.members": - if x.Members == nil { - x.Members = []*Member{} - } - value := &_MsgCreateGroup_2_list{list: &x.Members} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.MsgCreateGroup.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgCreateGroup is not mutable")) - case "cosmos.group.v1.MsgCreateGroup.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.MsgCreateGroup is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroup 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_MsgCreateGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroup.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgCreateGroup.members": - list := []*Member{} - return protoreflect.ValueOfList(&_MsgCreateGroup_2_list{list: &list}) - case "cosmos.group.v1.MsgCreateGroup.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroup 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_MsgCreateGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgCreateGroup", 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_MsgCreateGroup) 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_MsgCreateGroup) 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_MsgCreateGroup) 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_MsgCreateGroup) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateGroup) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Members) > 0 { - for _, e := range x.Members { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateGroup) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Members) > 0 { - for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Members[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgCreateGroup) - 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: MsgCreateGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroup: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Members = append(x.Members, &Member{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCreateGroupResponse protoreflect.MessageDescriptor - fd_MsgCreateGroupResponse_group_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgCreateGroupResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgCreateGroupResponse") - fd_MsgCreateGroupResponse_group_id = md_MsgCreateGroupResponse.Fields().ByName("group_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateGroupResponse)(nil) - -type fastReflection_MsgCreateGroupResponse MsgCreateGroupResponse - -func (x *MsgCreateGroupResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateGroupResponse)(x) -} - -func (x *MsgCreateGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateGroupResponse_messageType fastReflection_MsgCreateGroupResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateGroupResponse_messageType{} - -type fastReflection_MsgCreateGroupResponse_messageType struct{} - -func (x fastReflection_MsgCreateGroupResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateGroupResponse)(nil) -} -func (x fastReflection_MsgCreateGroupResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupResponse) -} -func (x fastReflection_MsgCreateGroupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateGroupResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupResponse -} - -// 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_MsgCreateGroupResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateGroupResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateGroupResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateGroupResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateGroupResponse)(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_MsgCreateGroupResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgCreateGroupResponse_group_id, 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_MsgCreateGroupResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupResponse.group_id": - return x.GroupId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupResponse 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_MsgCreateGroupResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupResponse.group_id": - x.GroupId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupResponse 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_MsgCreateGroupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgCreateGroupResponse.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupResponse 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_MsgCreateGroupResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupResponse.group_id": - x.GroupId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupResponse 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_MsgCreateGroupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupResponse.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgCreateGroupResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupResponse 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_MsgCreateGroupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupResponse.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupResponse 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_MsgCreateGroupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgCreateGroupResponse", 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_MsgCreateGroupResponse) 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_MsgCreateGroupResponse) 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_MsgCreateGroupResponse) 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_MsgCreateGroupResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateGroupResponse) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - 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().(*MsgCreateGroupResponse) - 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.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateGroupResponse) - 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: MsgCreateGroupResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgUpdateGroupMembers_3_list)(nil) - -type _MsgUpdateGroupMembers_3_list struct { - list *[]*Member -} - -func (x *_MsgUpdateGroupMembers_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgUpdateGroupMembers_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgUpdateGroupMembers_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - (*x.list)[i] = concreteValue -} - -func (x *_MsgUpdateGroupMembers_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgUpdateGroupMembers_3_list) AppendMutable() protoreflect.Value { - v := new(Member) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgUpdateGroupMembers_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgUpdateGroupMembers_3_list) NewElement() protoreflect.Value { - v := new(Member) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgUpdateGroupMembers_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgUpdateGroupMembers protoreflect.MessageDescriptor - fd_MsgUpdateGroupMembers_admin protoreflect.FieldDescriptor - fd_MsgUpdateGroupMembers_group_id protoreflect.FieldDescriptor - fd_MsgUpdateGroupMembers_member_updates protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupMembers = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupMembers") - fd_MsgUpdateGroupMembers_admin = md_MsgUpdateGroupMembers.Fields().ByName("admin") - fd_MsgUpdateGroupMembers_group_id = md_MsgUpdateGroupMembers.Fields().ByName("group_id") - fd_MsgUpdateGroupMembers_member_updates = md_MsgUpdateGroupMembers.Fields().ByName("member_updates") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupMembers)(nil) - -type fastReflection_MsgUpdateGroupMembers MsgUpdateGroupMembers - -func (x *MsgUpdateGroupMembers) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMembers)(x) -} - -func (x *MsgUpdateGroupMembers) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupMembers_messageType fastReflection_MsgUpdateGroupMembers_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupMembers_messageType{} - -type fastReflection_MsgUpdateGroupMembers_messageType struct{} - -func (x fastReflection_MsgUpdateGroupMembers_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMembers)(nil) -} -func (x fastReflection_MsgUpdateGroupMembers_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMembers) -} -func (x fastReflection_MsgUpdateGroupMembers_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMembers -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupMembers) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMembers -} - -// 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_MsgUpdateGroupMembers) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupMembers_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupMembers) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMembers) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupMembers) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupMembers)(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_MsgUpdateGroupMembers) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgUpdateGroupMembers_admin, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgUpdateGroupMembers_group_id, value) { - return - } - } - if len(x.MemberUpdates) != 0 { - value := protoreflect.ValueOfList(&_MsgUpdateGroupMembers_3_list{list: &x.MemberUpdates}) - if !f(fd_MsgUpdateGroupMembers_member_updates, 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_MsgUpdateGroupMembers) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMembers.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgUpdateGroupMembers.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.MsgUpdateGroupMembers.member_updates": - return len(x.MemberUpdates) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembers")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembers 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_MsgUpdateGroupMembers) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMembers.admin": - x.Admin = "" - case "cosmos.group.v1.MsgUpdateGroupMembers.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.MsgUpdateGroupMembers.member_updates": - x.MemberUpdates = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembers")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembers 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_MsgUpdateGroupMembers) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMembers.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupMembers.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgUpdateGroupMembers.member_updates": - if len(x.MemberUpdates) == 0 { - return protoreflect.ValueOfList(&_MsgUpdateGroupMembers_3_list{}) - } - listValue := &_MsgUpdateGroupMembers_3_list{list: &x.MemberUpdates} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembers")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembers 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_MsgUpdateGroupMembers) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMembers.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupMembers.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.MsgUpdateGroupMembers.member_updates": - lv := value.List() - clv := lv.(*_MsgUpdateGroupMembers_3_list) - x.MemberUpdates = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembers")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembers 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_MsgUpdateGroupMembers) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMembers.member_updates": - if x.MemberUpdates == nil { - x.MemberUpdates = []*Member{} - } - value := &_MsgUpdateGroupMembers_3_list{list: &x.MemberUpdates} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.MsgUpdateGroupMembers.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgUpdateGroupMembers is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupMembers.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgUpdateGroupMembers is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembers")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembers 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_MsgUpdateGroupMembers) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMembers.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupMembers.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgUpdateGroupMembers.member_updates": - list := []*Member{} - return protoreflect.ValueOfList(&_MsgUpdateGroupMembers_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembers")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembers 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_MsgUpdateGroupMembers) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupMembers", 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_MsgUpdateGroupMembers) 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_MsgUpdateGroupMembers) 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_MsgUpdateGroupMembers) 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_MsgUpdateGroupMembers) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupMembers) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if len(x.MemberUpdates) > 0 { - for _, e := range x.MemberUpdates { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateGroupMembers) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MemberUpdates) > 0 { - for iNdEx := len(x.MemberUpdates) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MemberUpdates[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgUpdateGroupMembers) - 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: MsgUpdateGroupMembers: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupMembers: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MemberUpdates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MemberUpdates = append(x.MemberUpdates, &Member{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MemberUpdates[len(x.MemberUpdates)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateGroupMembersResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupMembersResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupMembersResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupMembersResponse)(nil) - -type fastReflection_MsgUpdateGroupMembersResponse MsgUpdateGroupMembersResponse - -func (x *MsgUpdateGroupMembersResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMembersResponse)(x) -} - -func (x *MsgUpdateGroupMembersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupMembersResponse_messageType fastReflection_MsgUpdateGroupMembersResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupMembersResponse_messageType{} - -type fastReflection_MsgUpdateGroupMembersResponse_messageType struct{} - -func (x fastReflection_MsgUpdateGroupMembersResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMembersResponse)(nil) -} -func (x fastReflection_MsgUpdateGroupMembersResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMembersResponse) -} -func (x fastReflection_MsgUpdateGroupMembersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMembersResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupMembersResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMembersResponse -} - -// 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_MsgUpdateGroupMembersResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupMembersResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupMembersResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMembersResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupMembersResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupMembersResponse)(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_MsgUpdateGroupMembersResponse) 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_MsgUpdateGroupMembersResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembersResponse 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_MsgUpdateGroupMembersResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembersResponse 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_MsgUpdateGroupMembersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembersResponse 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_MsgUpdateGroupMembersResponse) 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.group.v1.MsgUpdateGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembersResponse 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_MsgUpdateGroupMembersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembersResponse 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_MsgUpdateGroupMembersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMembersResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMembersResponse 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_MsgUpdateGroupMembersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupMembersResponse", 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_MsgUpdateGroupMembersResponse) 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_MsgUpdateGroupMembersResponse) 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_MsgUpdateGroupMembersResponse) 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_MsgUpdateGroupMembersResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupMembersResponse) - 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().(*MsgUpdateGroupMembersResponse) - 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().(*MsgUpdateGroupMembersResponse) - 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: MsgUpdateGroupMembersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupMembersResponse: 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_MsgUpdateGroupAdmin protoreflect.MessageDescriptor - fd_MsgUpdateGroupAdmin_admin protoreflect.FieldDescriptor - fd_MsgUpdateGroupAdmin_group_id protoreflect.FieldDescriptor - fd_MsgUpdateGroupAdmin_new_admin protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupAdmin = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupAdmin") - fd_MsgUpdateGroupAdmin_admin = md_MsgUpdateGroupAdmin.Fields().ByName("admin") - fd_MsgUpdateGroupAdmin_group_id = md_MsgUpdateGroupAdmin.Fields().ByName("group_id") - fd_MsgUpdateGroupAdmin_new_admin = md_MsgUpdateGroupAdmin.Fields().ByName("new_admin") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupAdmin)(nil) - -type fastReflection_MsgUpdateGroupAdmin MsgUpdateGroupAdmin - -func (x *MsgUpdateGroupAdmin) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupAdmin)(x) -} - -func (x *MsgUpdateGroupAdmin) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupAdmin_messageType fastReflection_MsgUpdateGroupAdmin_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupAdmin_messageType{} - -type fastReflection_MsgUpdateGroupAdmin_messageType struct{} - -func (x fastReflection_MsgUpdateGroupAdmin_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupAdmin)(nil) -} -func (x fastReflection_MsgUpdateGroupAdmin_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupAdmin) -} -func (x fastReflection_MsgUpdateGroupAdmin_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupAdmin -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupAdmin) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupAdmin -} - -// 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_MsgUpdateGroupAdmin) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupAdmin_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupAdmin) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupAdmin) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupAdmin) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupAdmin)(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_MsgUpdateGroupAdmin) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgUpdateGroupAdmin_admin, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgUpdateGroupAdmin_group_id, value) { - return - } - } - if x.NewAdmin != "" { - value := protoreflect.ValueOfString(x.NewAdmin) - if !f(fd_MsgUpdateGroupAdmin_new_admin, 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_MsgUpdateGroupAdmin) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupAdmin.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgUpdateGroupAdmin.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.MsgUpdateGroupAdmin.new_admin": - return x.NewAdmin != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdmin 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_MsgUpdateGroupAdmin) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupAdmin.admin": - x.Admin = "" - case "cosmos.group.v1.MsgUpdateGroupAdmin.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.MsgUpdateGroupAdmin.new_admin": - x.NewAdmin = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdmin 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_MsgUpdateGroupAdmin) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgUpdateGroupAdmin.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupAdmin.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgUpdateGroupAdmin.new_admin": - value := x.NewAdmin - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdmin 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_MsgUpdateGroupAdmin) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupAdmin.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupAdmin.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.MsgUpdateGroupAdmin.new_admin": - x.NewAdmin = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdmin 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_MsgUpdateGroupAdmin) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupAdmin.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgUpdateGroupAdmin is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupAdmin.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgUpdateGroupAdmin is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupAdmin.new_admin": - panic(fmt.Errorf("field new_admin of message cosmos.group.v1.MsgUpdateGroupAdmin is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdmin 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_MsgUpdateGroupAdmin) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupAdmin.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupAdmin.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgUpdateGroupAdmin.new_admin": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdmin 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_MsgUpdateGroupAdmin) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupAdmin", 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_MsgUpdateGroupAdmin) 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_MsgUpdateGroupAdmin) 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_MsgUpdateGroupAdmin) 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_MsgUpdateGroupAdmin) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupAdmin) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - l = len(x.NewAdmin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateGroupAdmin) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NewAdmin) > 0 { - i -= len(x.NewAdmin) - copy(dAtA[i:], x.NewAdmin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewAdmin))) - i-- - dAtA[i] = 0x1a - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgUpdateGroupAdmin) - 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: MsgUpdateGroupAdmin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupAdmin: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", 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.NewAdmin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateGroupAdminResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupAdminResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupAdminResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupAdminResponse)(nil) - -type fastReflection_MsgUpdateGroupAdminResponse MsgUpdateGroupAdminResponse - -func (x *MsgUpdateGroupAdminResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupAdminResponse)(x) -} - -func (x *MsgUpdateGroupAdminResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupAdminResponse_messageType fastReflection_MsgUpdateGroupAdminResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupAdminResponse_messageType{} - -type fastReflection_MsgUpdateGroupAdminResponse_messageType struct{} - -func (x fastReflection_MsgUpdateGroupAdminResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupAdminResponse)(nil) -} -func (x fastReflection_MsgUpdateGroupAdminResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupAdminResponse) -} -func (x fastReflection_MsgUpdateGroupAdminResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupAdminResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupAdminResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupAdminResponse -} - -// 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_MsgUpdateGroupAdminResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupAdminResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupAdminResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupAdminResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupAdminResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupAdminResponse)(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_MsgUpdateGroupAdminResponse) 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_MsgUpdateGroupAdminResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdminResponse 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_MsgUpdateGroupAdminResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdminResponse 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_MsgUpdateGroupAdminResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdminResponse 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_MsgUpdateGroupAdminResponse) 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.group.v1.MsgUpdateGroupAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdminResponse 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_MsgUpdateGroupAdminResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdminResponse 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_MsgUpdateGroupAdminResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupAdminResponse 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_MsgUpdateGroupAdminResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupAdminResponse", 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_MsgUpdateGroupAdminResponse) 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_MsgUpdateGroupAdminResponse) 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_MsgUpdateGroupAdminResponse) 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_MsgUpdateGroupAdminResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupAdminResponse) - 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().(*MsgUpdateGroupAdminResponse) - 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().(*MsgUpdateGroupAdminResponse) - 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: MsgUpdateGroupAdminResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupAdminResponse: 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_MsgUpdateGroupMetadata protoreflect.MessageDescriptor - fd_MsgUpdateGroupMetadata_admin protoreflect.FieldDescriptor - fd_MsgUpdateGroupMetadata_group_id protoreflect.FieldDescriptor - fd_MsgUpdateGroupMetadata_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupMetadata = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupMetadata") - fd_MsgUpdateGroupMetadata_admin = md_MsgUpdateGroupMetadata.Fields().ByName("admin") - fd_MsgUpdateGroupMetadata_group_id = md_MsgUpdateGroupMetadata.Fields().ByName("group_id") - fd_MsgUpdateGroupMetadata_metadata = md_MsgUpdateGroupMetadata.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupMetadata)(nil) - -type fastReflection_MsgUpdateGroupMetadata MsgUpdateGroupMetadata - -func (x *MsgUpdateGroupMetadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMetadata)(x) -} - -func (x *MsgUpdateGroupMetadata) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupMetadata_messageType fastReflection_MsgUpdateGroupMetadata_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupMetadata_messageType{} - -type fastReflection_MsgUpdateGroupMetadata_messageType struct{} - -func (x fastReflection_MsgUpdateGroupMetadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMetadata)(nil) -} -func (x fastReflection_MsgUpdateGroupMetadata_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMetadata) -} -func (x fastReflection_MsgUpdateGroupMetadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMetadata -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupMetadata) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMetadata -} - -// 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_MsgUpdateGroupMetadata) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupMetadata_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupMetadata) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMetadata) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupMetadata) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupMetadata)(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_MsgUpdateGroupMetadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgUpdateGroupMetadata_admin, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgUpdateGroupMetadata_group_id, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgUpdateGroupMetadata_metadata, 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_MsgUpdateGroupMetadata) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMetadata.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgUpdateGroupMetadata.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.MsgUpdateGroupMetadata.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadata 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_MsgUpdateGroupMetadata) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMetadata.admin": - x.Admin = "" - case "cosmos.group.v1.MsgUpdateGroupMetadata.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.MsgUpdateGroupMetadata.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadata 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_MsgUpdateGroupMetadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMetadata.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupMetadata.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgUpdateGroupMetadata.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadata 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_MsgUpdateGroupMetadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMetadata.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupMetadata.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.MsgUpdateGroupMetadata.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadata 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_MsgUpdateGroupMetadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMetadata.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgUpdateGroupMetadata is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupMetadata.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgUpdateGroupMetadata is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupMetadata.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.MsgUpdateGroupMetadata is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadata 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_MsgUpdateGroupMetadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupMetadata.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupMetadata.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgUpdateGroupMetadata.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadata 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_MsgUpdateGroupMetadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupMetadata", 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_MsgUpdateGroupMetadata) 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_MsgUpdateGroupMetadata) 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_MsgUpdateGroupMetadata) 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_MsgUpdateGroupMetadata) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupMetadata) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateGroupMetadata) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgUpdateGroupMetadata) - 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: MsgUpdateGroupMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupMetadata: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateGroupMetadataResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupMetadataResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupMetadataResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupMetadataResponse)(nil) - -type fastReflection_MsgUpdateGroupMetadataResponse MsgUpdateGroupMetadataResponse - -func (x *MsgUpdateGroupMetadataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMetadataResponse)(x) -} - -func (x *MsgUpdateGroupMetadataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupMetadataResponse_messageType fastReflection_MsgUpdateGroupMetadataResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupMetadataResponse_messageType{} - -type fastReflection_MsgUpdateGroupMetadataResponse_messageType struct{} - -func (x fastReflection_MsgUpdateGroupMetadataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupMetadataResponse)(nil) -} -func (x fastReflection_MsgUpdateGroupMetadataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMetadataResponse) -} -func (x fastReflection_MsgUpdateGroupMetadataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMetadataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupMetadataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupMetadataResponse -} - -// 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_MsgUpdateGroupMetadataResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupMetadataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupMetadataResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupMetadataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupMetadataResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupMetadataResponse)(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_MsgUpdateGroupMetadataResponse) 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_MsgUpdateGroupMetadataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadataResponse 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_MsgUpdateGroupMetadataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadataResponse 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_MsgUpdateGroupMetadataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadataResponse 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_MsgUpdateGroupMetadataResponse) 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.group.v1.MsgUpdateGroupMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadataResponse 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_MsgUpdateGroupMetadataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadataResponse 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_MsgUpdateGroupMetadataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupMetadataResponse 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_MsgUpdateGroupMetadataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupMetadataResponse", 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_MsgUpdateGroupMetadataResponse) 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_MsgUpdateGroupMetadataResponse) 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_MsgUpdateGroupMetadataResponse) 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_MsgUpdateGroupMetadataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupMetadataResponse) - 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().(*MsgUpdateGroupMetadataResponse) - 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().(*MsgUpdateGroupMetadataResponse) - 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: MsgUpdateGroupMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupMetadataResponse: 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_MsgCreateGroupPolicy protoreflect.MessageDescriptor - fd_MsgCreateGroupPolicy_admin protoreflect.FieldDescriptor - fd_MsgCreateGroupPolicy_group_id protoreflect.FieldDescriptor - fd_MsgCreateGroupPolicy_metadata protoreflect.FieldDescriptor - fd_MsgCreateGroupPolicy_decision_policy protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgCreateGroupPolicy = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgCreateGroupPolicy") - fd_MsgCreateGroupPolicy_admin = md_MsgCreateGroupPolicy.Fields().ByName("admin") - fd_MsgCreateGroupPolicy_group_id = md_MsgCreateGroupPolicy.Fields().ByName("group_id") - fd_MsgCreateGroupPolicy_metadata = md_MsgCreateGroupPolicy.Fields().ByName("metadata") - fd_MsgCreateGroupPolicy_decision_policy = md_MsgCreateGroupPolicy.Fields().ByName("decision_policy") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateGroupPolicy)(nil) - -type fastReflection_MsgCreateGroupPolicy MsgCreateGroupPolicy - -func (x *MsgCreateGroupPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateGroupPolicy)(x) -} - -func (x *MsgCreateGroupPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateGroupPolicy_messageType fastReflection_MsgCreateGroupPolicy_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateGroupPolicy_messageType{} - -type fastReflection_MsgCreateGroupPolicy_messageType struct{} - -func (x fastReflection_MsgCreateGroupPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateGroupPolicy)(nil) -} -func (x fastReflection_MsgCreateGroupPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupPolicy) -} -func (x fastReflection_MsgCreateGroupPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateGroupPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupPolicy -} - -// 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_MsgCreateGroupPolicy) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateGroupPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateGroupPolicy) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateGroupPolicy) Interface() protoreflect.ProtoMessage { - return (*MsgCreateGroupPolicy)(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_MsgCreateGroupPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgCreateGroupPolicy_admin, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgCreateGroupPolicy_group_id, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgCreateGroupPolicy_metadata, value) { - return - } - } - if x.DecisionPolicy != nil { - value := protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - if !f(fd_MsgCreateGroupPolicy_decision_policy, 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_MsgCreateGroupPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicy.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgCreateGroupPolicy.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.MsgCreateGroupPolicy.metadata": - return x.Metadata != "" - case "cosmos.group.v1.MsgCreateGroupPolicy.decision_policy": - return x.DecisionPolicy != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicy 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_MsgCreateGroupPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicy.admin": - x.Admin = "" - case "cosmos.group.v1.MsgCreateGroupPolicy.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.MsgCreateGroupPolicy.metadata": - x.Metadata = "" - case "cosmos.group.v1.MsgCreateGroupPolicy.decision_policy": - x.DecisionPolicy = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicy 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_MsgCreateGroupPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicy.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgCreateGroupPolicy.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgCreateGroupPolicy.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgCreateGroupPolicy.decision_policy": - value := x.DecisionPolicy - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicy 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_MsgCreateGroupPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicy.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgCreateGroupPolicy.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.MsgCreateGroupPolicy.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.MsgCreateGroupPolicy.decision_policy": - x.DecisionPolicy = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicy 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_MsgCreateGroupPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicy.decision_policy": - if x.DecisionPolicy == nil { - x.DecisionPolicy = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - case "cosmos.group.v1.MsgCreateGroupPolicy.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgCreateGroupPolicy is not mutable")) - case "cosmos.group.v1.MsgCreateGroupPolicy.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgCreateGroupPolicy is not mutable")) - case "cosmos.group.v1.MsgCreateGroupPolicy.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.MsgCreateGroupPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicy 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_MsgCreateGroupPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicy.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgCreateGroupPolicy.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgCreateGroupPolicy.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgCreateGroupPolicy.decision_policy": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicy 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_MsgCreateGroupPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgCreateGroupPolicy", 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_MsgCreateGroupPolicy) 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_MsgCreateGroupPolicy) 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_MsgCreateGroupPolicy) 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_MsgCreateGroupPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateGroupPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DecisionPolicy != nil { - l = options.Size(x.DecisionPolicy) - 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().(*MsgCreateGroupPolicy) - 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.DecisionPolicy != nil { - encoded, err := options.Marshal(x.DecisionPolicy) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgCreateGroupPolicy) - 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: MsgCreateGroupPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupPolicy: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", 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.DecisionPolicy == nil { - x.DecisionPolicy = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DecisionPolicy); 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_MsgCreateGroupPolicyResponse protoreflect.MessageDescriptor - fd_MsgCreateGroupPolicyResponse_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgCreateGroupPolicyResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgCreateGroupPolicyResponse") - fd_MsgCreateGroupPolicyResponse_address = md_MsgCreateGroupPolicyResponse.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateGroupPolicyResponse)(nil) - -type fastReflection_MsgCreateGroupPolicyResponse MsgCreateGroupPolicyResponse - -func (x *MsgCreateGroupPolicyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateGroupPolicyResponse)(x) -} - -func (x *MsgCreateGroupPolicyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateGroupPolicyResponse_messageType fastReflection_MsgCreateGroupPolicyResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateGroupPolicyResponse_messageType{} - -type fastReflection_MsgCreateGroupPolicyResponse_messageType struct{} - -func (x fastReflection_MsgCreateGroupPolicyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateGroupPolicyResponse)(nil) -} -func (x fastReflection_MsgCreateGroupPolicyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupPolicyResponse) -} -func (x fastReflection_MsgCreateGroupPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupPolicyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateGroupPolicyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupPolicyResponse -} - -// 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_MsgCreateGroupPolicyResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateGroupPolicyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateGroupPolicyResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupPolicyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateGroupPolicyResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateGroupPolicyResponse)(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_MsgCreateGroupPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgCreateGroupPolicyResponse_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCreateGroupPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicyResponse.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicyResponse 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_MsgCreateGroupPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicyResponse.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicyResponse 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_MsgCreateGroupPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicyResponse.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicyResponse 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_MsgCreateGroupPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicyResponse.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicyResponse 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_MsgCreateGroupPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicyResponse.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgCreateGroupPolicyResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicyResponse 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_MsgCreateGroupPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupPolicyResponse.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupPolicyResponse 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_MsgCreateGroupPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgCreateGroupPolicyResponse", 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_MsgCreateGroupPolicyResponse) 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_MsgCreateGroupPolicyResponse) 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_MsgCreateGroupPolicyResponse) 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_MsgCreateGroupPolicyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateGroupPolicyResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*MsgCreateGroupPolicyResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateGroupPolicyResponse) - 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: MsgCreateGroupPolicyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_MsgUpdateGroupPolicyAdmin protoreflect.MessageDescriptor - fd_MsgUpdateGroupPolicyAdmin_admin protoreflect.FieldDescriptor - fd_MsgUpdateGroupPolicyAdmin_address protoreflect.FieldDescriptor - fd_MsgUpdateGroupPolicyAdmin_new_admin protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupPolicyAdmin = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupPolicyAdmin") - fd_MsgUpdateGroupPolicyAdmin_admin = md_MsgUpdateGroupPolicyAdmin.Fields().ByName("admin") - fd_MsgUpdateGroupPolicyAdmin_address = md_MsgUpdateGroupPolicyAdmin.Fields().ByName("address") - fd_MsgUpdateGroupPolicyAdmin_new_admin = md_MsgUpdateGroupPolicyAdmin.Fields().ByName("new_admin") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupPolicyAdmin)(nil) - -type fastReflection_MsgUpdateGroupPolicyAdmin MsgUpdateGroupPolicyAdmin - -func (x *MsgUpdateGroupPolicyAdmin) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyAdmin)(x) -} - -func (x *MsgUpdateGroupPolicyAdmin) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupPolicyAdmin_messageType fastReflection_MsgUpdateGroupPolicyAdmin_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupPolicyAdmin_messageType{} - -type fastReflection_MsgUpdateGroupPolicyAdmin_messageType struct{} - -func (x fastReflection_MsgUpdateGroupPolicyAdmin_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyAdmin)(nil) -} -func (x fastReflection_MsgUpdateGroupPolicyAdmin_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyAdmin) -} -func (x fastReflection_MsgUpdateGroupPolicyAdmin_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyAdmin -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupPolicyAdmin) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyAdmin -} - -// 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_MsgUpdateGroupPolicyAdmin) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupPolicyAdmin_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupPolicyAdmin) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyAdmin) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupPolicyAdmin) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupPolicyAdmin)(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_MsgUpdateGroupPolicyAdmin) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgUpdateGroupPolicyAdmin_admin, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgUpdateGroupPolicyAdmin_address, value) { - return - } - } - if x.NewAdmin != "" { - value := protoreflect.ValueOfString(x.NewAdmin) - if !f(fd_MsgUpdateGroupPolicyAdmin_new_admin, 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_MsgUpdateGroupPolicyAdmin) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.address": - return x.Address != "" - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.new_admin": - return x.NewAdmin != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdmin 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_MsgUpdateGroupPolicyAdmin) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.admin": - x.Admin = "" - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.address": - x.Address = "" - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.new_admin": - x.NewAdmin = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdmin 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_MsgUpdateGroupPolicyAdmin) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.new_admin": - value := x.NewAdmin - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdmin 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_MsgUpdateGroupPolicyAdmin) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.new_admin": - x.NewAdmin = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdmin 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_MsgUpdateGroupPolicyAdmin) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgUpdateGroupPolicyAdmin is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgUpdateGroupPolicyAdmin is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.new_admin": - panic(fmt.Errorf("field new_admin of message cosmos.group.v1.MsgUpdateGroupPolicyAdmin is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdmin 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_MsgUpdateGroupPolicyAdmin) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupPolicyAdmin.new_admin": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdmin")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdmin 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_MsgUpdateGroupPolicyAdmin) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupPolicyAdmin", 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_MsgUpdateGroupPolicyAdmin) 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_MsgUpdateGroupPolicyAdmin) 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_MsgUpdateGroupPolicyAdmin) 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_MsgUpdateGroupPolicyAdmin) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupPolicyAdmin) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NewAdmin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateGroupPolicyAdmin) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NewAdmin) > 0 { - i -= len(x.NewAdmin) - copy(dAtA[i:], x.NewAdmin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewAdmin))) - i-- - dAtA[i] = 0x1a - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgUpdateGroupPolicyAdmin) - 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: MsgUpdateGroupPolicyAdmin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupPolicyAdmin: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", 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.NewAdmin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgCreateGroupWithPolicy_2_list)(nil) - -type _MsgCreateGroupWithPolicy_2_list struct { - list *[]*Member -} - -func (x *_MsgCreateGroupWithPolicy_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgCreateGroupWithPolicy_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgCreateGroupWithPolicy_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - (*x.list)[i] = concreteValue -} - -func (x *_MsgCreateGroupWithPolicy_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgCreateGroupWithPolicy_2_list) AppendMutable() protoreflect.Value { - v := new(Member) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreateGroupWithPolicy_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgCreateGroupWithPolicy_2_list) NewElement() protoreflect.Value { - v := new(Member) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreateGroupWithPolicy_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgCreateGroupWithPolicy protoreflect.MessageDescriptor - fd_MsgCreateGroupWithPolicy_admin protoreflect.FieldDescriptor - fd_MsgCreateGroupWithPolicy_members protoreflect.FieldDescriptor - fd_MsgCreateGroupWithPolicy_group_metadata protoreflect.FieldDescriptor - fd_MsgCreateGroupWithPolicy_group_policy_metadata protoreflect.FieldDescriptor - fd_MsgCreateGroupWithPolicy_group_policy_as_admin protoreflect.FieldDescriptor - fd_MsgCreateGroupWithPolicy_decision_policy protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgCreateGroupWithPolicy = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgCreateGroupWithPolicy") - fd_MsgCreateGroupWithPolicy_admin = md_MsgCreateGroupWithPolicy.Fields().ByName("admin") - fd_MsgCreateGroupWithPolicy_members = md_MsgCreateGroupWithPolicy.Fields().ByName("members") - fd_MsgCreateGroupWithPolicy_group_metadata = md_MsgCreateGroupWithPolicy.Fields().ByName("group_metadata") - fd_MsgCreateGroupWithPolicy_group_policy_metadata = md_MsgCreateGroupWithPolicy.Fields().ByName("group_policy_metadata") - fd_MsgCreateGroupWithPolicy_group_policy_as_admin = md_MsgCreateGroupWithPolicy.Fields().ByName("group_policy_as_admin") - fd_MsgCreateGroupWithPolicy_decision_policy = md_MsgCreateGroupWithPolicy.Fields().ByName("decision_policy") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateGroupWithPolicy)(nil) - -type fastReflection_MsgCreateGroupWithPolicy MsgCreateGroupWithPolicy - -func (x *MsgCreateGroupWithPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateGroupWithPolicy)(x) -} - -func (x *MsgCreateGroupWithPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateGroupWithPolicy_messageType fastReflection_MsgCreateGroupWithPolicy_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateGroupWithPolicy_messageType{} - -type fastReflection_MsgCreateGroupWithPolicy_messageType struct{} - -func (x fastReflection_MsgCreateGroupWithPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateGroupWithPolicy)(nil) -} -func (x fastReflection_MsgCreateGroupWithPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupWithPolicy) -} -func (x fastReflection_MsgCreateGroupWithPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupWithPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateGroupWithPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupWithPolicy -} - -// 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_MsgCreateGroupWithPolicy) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateGroupWithPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateGroupWithPolicy) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupWithPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateGroupWithPolicy) Interface() protoreflect.ProtoMessage { - return (*MsgCreateGroupWithPolicy)(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_MsgCreateGroupWithPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgCreateGroupWithPolicy_admin, value) { - return - } - } - if len(x.Members) != 0 { - value := protoreflect.ValueOfList(&_MsgCreateGroupWithPolicy_2_list{list: &x.Members}) - if !f(fd_MsgCreateGroupWithPolicy_members, value) { - return - } - } - if x.GroupMetadata != "" { - value := protoreflect.ValueOfString(x.GroupMetadata) - if !f(fd_MsgCreateGroupWithPolicy_group_metadata, value) { - return - } - } - if x.GroupPolicyMetadata != "" { - value := protoreflect.ValueOfString(x.GroupPolicyMetadata) - if !f(fd_MsgCreateGroupWithPolicy_group_policy_metadata, value) { - return - } - } - if x.GroupPolicyAsAdmin != false { - value := protoreflect.ValueOfBool(x.GroupPolicyAsAdmin) - if !f(fd_MsgCreateGroupWithPolicy_group_policy_as_admin, value) { - return - } - } - if x.DecisionPolicy != nil { - value := protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - if !f(fd_MsgCreateGroupWithPolicy_decision_policy, 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_MsgCreateGroupWithPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicy.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgCreateGroupWithPolicy.members": - return len(x.Members) != 0 - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_metadata": - return x.GroupMetadata != "" - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_metadata": - return x.GroupPolicyMetadata != "" - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_as_admin": - return x.GroupPolicyAsAdmin != false - case "cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy": - return x.DecisionPolicy != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicy.admin": - x.Admin = "" - case "cosmos.group.v1.MsgCreateGroupWithPolicy.members": - x.Members = nil - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_metadata": - x.GroupMetadata = "" - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_metadata": - x.GroupPolicyMetadata = "" - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_as_admin": - x.GroupPolicyAsAdmin = false - case "cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy": - x.DecisionPolicy = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicy.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.members": - if len(x.Members) == 0 { - return protoreflect.ValueOfList(&_MsgCreateGroupWithPolicy_2_list{}) - } - listValue := &_MsgCreateGroupWithPolicy_2_list{list: &x.Members} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_metadata": - value := x.GroupMetadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_metadata": - value := x.GroupPolicyMetadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_as_admin": - value := x.GroupPolicyAsAdmin - return protoreflect.ValueOfBool(value) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy": - value := x.DecisionPolicy - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicy.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.members": - lv := value.List() - clv := lv.(*_MsgCreateGroupWithPolicy_2_list) - x.Members = *clv.list - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_metadata": - x.GroupMetadata = value.Interface().(string) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_metadata": - x.GroupPolicyMetadata = value.Interface().(string) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_as_admin": - x.GroupPolicyAsAdmin = value.Bool() - case "cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy": - x.DecisionPolicy = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicy.members": - if x.Members == nil { - x.Members = []*Member{} - } - value := &_MsgCreateGroupWithPolicy_2_list{list: &x.Members} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy": - if x.DecisionPolicy == nil { - x.DecisionPolicy = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgCreateGroupWithPolicy is not mutable")) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_metadata": - panic(fmt.Errorf("field group_metadata of message cosmos.group.v1.MsgCreateGroupWithPolicy is not mutable")) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_metadata": - panic(fmt.Errorf("field group_policy_metadata of message cosmos.group.v1.MsgCreateGroupWithPolicy is not mutable")) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_as_admin": - panic(fmt.Errorf("field group_policy_as_admin of message cosmos.group.v1.MsgCreateGroupWithPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicy.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgCreateGroupWithPolicy.members": - list := []*Member{} - return protoreflect.ValueOfList(&_MsgCreateGroupWithPolicy_2_list{list: &list}) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgCreateGroupWithPolicy.group_policy_as_admin": - return protoreflect.ValueOfBool(false) - case "cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicy 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_MsgCreateGroupWithPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgCreateGroupWithPolicy", 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_MsgCreateGroupWithPolicy) 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_MsgCreateGroupWithPolicy) 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_MsgCreateGroupWithPolicy) 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_MsgCreateGroupWithPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateGroupWithPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Members) > 0 { - for _, e := range x.Members { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.GroupMetadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GroupPolicyMetadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupPolicyAsAdmin { - n += 2 - } - if x.DecisionPolicy != nil { - l = options.Size(x.DecisionPolicy) - 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().(*MsgCreateGroupWithPolicy) - 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.DecisionPolicy != nil { - encoded, err := options.Marshal(x.DecisionPolicy) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.GroupPolicyAsAdmin { - i-- - if x.GroupPolicyAsAdmin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(x.GroupPolicyMetadata) > 0 { - i -= len(x.GroupPolicyMetadata) - copy(dAtA[i:], x.GroupPolicyMetadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GroupPolicyMetadata))) - i-- - dAtA[i] = 0x22 - } - if len(x.GroupMetadata) > 0 { - i -= len(x.GroupMetadata) - copy(dAtA[i:], x.GroupMetadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GroupMetadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Members) > 0 { - for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Members[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgCreateGroupWithPolicy) - 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: MsgCreateGroupWithPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupWithPolicy: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Members = append(x.Members, &Member{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupMetadata", 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.GroupMetadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyMetadata", 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.GroupPolicyMetadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAsAdmin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.GroupPolicyAsAdmin = bool(v != 0) - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", 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.DecisionPolicy == nil { - x.DecisionPolicy = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DecisionPolicy); 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_MsgCreateGroupWithPolicyResponse protoreflect.MessageDescriptor - fd_MsgCreateGroupWithPolicyResponse_group_id protoreflect.FieldDescriptor - fd_MsgCreateGroupWithPolicyResponse_group_policy_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgCreateGroupWithPolicyResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgCreateGroupWithPolicyResponse") - fd_MsgCreateGroupWithPolicyResponse_group_id = md_MsgCreateGroupWithPolicyResponse.Fields().ByName("group_id") - fd_MsgCreateGroupWithPolicyResponse_group_policy_address = md_MsgCreateGroupWithPolicyResponse.Fields().ByName("group_policy_address") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateGroupWithPolicyResponse)(nil) - -type fastReflection_MsgCreateGroupWithPolicyResponse MsgCreateGroupWithPolicyResponse - -func (x *MsgCreateGroupWithPolicyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateGroupWithPolicyResponse)(x) -} - -func (x *MsgCreateGroupWithPolicyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateGroupWithPolicyResponse_messageType fastReflection_MsgCreateGroupWithPolicyResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateGroupWithPolicyResponse_messageType{} - -type fastReflection_MsgCreateGroupWithPolicyResponse_messageType struct{} - -func (x fastReflection_MsgCreateGroupWithPolicyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateGroupWithPolicyResponse)(nil) -} -func (x fastReflection_MsgCreateGroupWithPolicyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupWithPolicyResponse) -} -func (x fastReflection_MsgCreateGroupWithPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupWithPolicyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateGroupWithPolicyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateGroupWithPolicyResponse -} - -// 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_MsgCreateGroupWithPolicyResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateGroupWithPolicyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateGroupWithPolicyResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateGroupWithPolicyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateGroupWithPolicyResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateGroupWithPolicyResponse)(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_MsgCreateGroupWithPolicyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgCreateGroupWithPolicyResponse_group_id, value) { - return - } - } - if x.GroupPolicyAddress != "" { - value := protoreflect.ValueOfString(x.GroupPolicyAddress) - if !f(fd_MsgCreateGroupWithPolicyResponse_group_policy_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCreateGroupWithPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_policy_address": - return x.GroupPolicyAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_policy_address": - x.GroupPolicyAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_policy_address": - value := x.GroupPolicyAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_policy_address": - x.GroupPolicyAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgCreateGroupWithPolicyResponse is not mutable")) - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_policy_address": - panic(fmt.Errorf("field group_policy_address of message cosmos.group.v1.MsgCreateGroupWithPolicyResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgCreateGroupWithPolicyResponse.group_policy_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgCreateGroupWithPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgCreateGroupWithPolicyResponse 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_MsgCreateGroupWithPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgCreateGroupWithPolicyResponse", 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_MsgCreateGroupWithPolicyResponse) 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_MsgCreateGroupWithPolicyResponse) 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_MsgCreateGroupWithPolicyResponse) 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_MsgCreateGroupWithPolicyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateGroupWithPolicyResponse) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - l = len(x.GroupPolicyAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateGroupWithPolicyResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.GroupPolicyAddress) > 0 { - i -= len(x.GroupPolicyAddress) - copy(dAtA[i:], x.GroupPolicyAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GroupPolicyAddress))) - i-- - dAtA[i] = 0x12 - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateGroupWithPolicyResponse) - 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: MsgCreateGroupWithPolicyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateGroupWithPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", 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.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateGroupPolicyAdminResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupPolicyAdminResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupPolicyAdminResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupPolicyAdminResponse)(nil) - -type fastReflection_MsgUpdateGroupPolicyAdminResponse MsgUpdateGroupPolicyAdminResponse - -func (x *MsgUpdateGroupPolicyAdminResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyAdminResponse)(x) -} - -func (x *MsgUpdateGroupPolicyAdminResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType{} - -type fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType struct{} - -func (x fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyAdminResponse)(nil) -} -func (x fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyAdminResponse) -} -func (x fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyAdminResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupPolicyAdminResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyAdminResponse -} - -// 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_MsgUpdateGroupPolicyAdminResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupPolicyAdminResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupPolicyAdminResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyAdminResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupPolicyAdminResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupPolicyAdminResponse)(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_MsgUpdateGroupPolicyAdminResponse) 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_MsgUpdateGroupPolicyAdminResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse 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_MsgUpdateGroupPolicyAdminResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse 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_MsgUpdateGroupPolicyAdminResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse 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_MsgUpdateGroupPolicyAdminResponse) 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.group.v1.MsgUpdateGroupPolicyAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse 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_MsgUpdateGroupPolicyAdminResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse 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_MsgUpdateGroupPolicyAdminResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse 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_MsgUpdateGroupPolicyAdminResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", 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_MsgUpdateGroupPolicyAdminResponse) 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_MsgUpdateGroupPolicyAdminResponse) 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_MsgUpdateGroupPolicyAdminResponse) 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_MsgUpdateGroupPolicyAdminResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupPolicyAdminResponse) - 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().(*MsgUpdateGroupPolicyAdminResponse) - 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().(*MsgUpdateGroupPolicyAdminResponse) - 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: MsgUpdateGroupPolicyAdminResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupPolicyAdminResponse: 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_MsgUpdateGroupPolicyDecisionPolicy protoreflect.MessageDescriptor - fd_MsgUpdateGroupPolicyDecisionPolicy_admin protoreflect.FieldDescriptor - fd_MsgUpdateGroupPolicyDecisionPolicy_address protoreflect.FieldDescriptor - fd_MsgUpdateGroupPolicyDecisionPolicy_decision_policy protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupPolicyDecisionPolicy = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupPolicyDecisionPolicy") - fd_MsgUpdateGroupPolicyDecisionPolicy_admin = md_MsgUpdateGroupPolicyDecisionPolicy.Fields().ByName("admin") - fd_MsgUpdateGroupPolicyDecisionPolicy_address = md_MsgUpdateGroupPolicyDecisionPolicy.Fields().ByName("address") - fd_MsgUpdateGroupPolicyDecisionPolicy_decision_policy = md_MsgUpdateGroupPolicyDecisionPolicy.Fields().ByName("decision_policy") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupPolicyDecisionPolicy)(nil) - -type fastReflection_MsgUpdateGroupPolicyDecisionPolicy MsgUpdateGroupPolicyDecisionPolicy - -func (x *MsgUpdateGroupPolicyDecisionPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyDecisionPolicy)(x) -} - -func (x *MsgUpdateGroupPolicyDecisionPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType{} - -type fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType struct{} - -func (x fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyDecisionPolicy)(nil) -} -func (x fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyDecisionPolicy) -} -func (x fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyDecisionPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupPolicyDecisionPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyDecisionPolicy -} - -// 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_MsgUpdateGroupPolicyDecisionPolicy) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupPolicyDecisionPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupPolicyDecisionPolicy) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyDecisionPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupPolicyDecisionPolicy) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupPolicyDecisionPolicy)(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_MsgUpdateGroupPolicyDecisionPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgUpdateGroupPolicyDecisionPolicy_admin, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgUpdateGroupPolicyDecisionPolicy_address, value) { - return - } - } - if x.DecisionPolicy != nil { - value := protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - if !f(fd_MsgUpdateGroupPolicyDecisionPolicy_decision_policy, 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_MsgUpdateGroupPolicyDecisionPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.address": - return x.Address != "" - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy": - return x.DecisionPolicy != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy 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_MsgUpdateGroupPolicyDecisionPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.admin": - x.Admin = "" - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.address": - x.Address = "" - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy": - x.DecisionPolicy = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy 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_MsgUpdateGroupPolicyDecisionPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy": - value := x.DecisionPolicy - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy 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_MsgUpdateGroupPolicyDecisionPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy": - x.DecisionPolicy = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy 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_MsgUpdateGroupPolicyDecisionPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy": - if x.DecisionPolicy == nil { - x.DecisionPolicy = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy 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_MsgUpdateGroupPolicyDecisionPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy 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_MsgUpdateGroupPolicyDecisionPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", 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_MsgUpdateGroupPolicyDecisionPolicy) 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_MsgUpdateGroupPolicyDecisionPolicy) 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_MsgUpdateGroupPolicyDecisionPolicy) 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_MsgUpdateGroupPolicyDecisionPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupPolicyDecisionPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DecisionPolicy != nil { - l = options.Size(x.DecisionPolicy) - 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().(*MsgUpdateGroupPolicyDecisionPolicy) - 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.DecisionPolicy != nil { - encoded, err := options.Marshal(x.DecisionPolicy) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgUpdateGroupPolicyDecisionPolicy) - 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: MsgUpdateGroupPolicyDecisionPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupPolicyDecisionPolicy: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", 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.DecisionPolicy == nil { - x.DecisionPolicy = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DecisionPolicy); 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_MsgUpdateGroupPolicyDecisionPolicyResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupPolicyDecisionPolicyResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupPolicyDecisionPolicyResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse)(nil) - -type fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse MsgUpdateGroupPolicyDecisionPolicyResponse - -func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse)(x) -} - -func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType{} - -type fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType struct{} - -func (x fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse)(nil) -} -func (x fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse) -} -func (x fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyDecisionPolicyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyDecisionPolicyResponse -} - -// 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_MsgUpdateGroupPolicyDecisionPolicyResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupPolicyDecisionPolicyResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupPolicyDecisionPolicyResponse)(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_MsgUpdateGroupPolicyDecisionPolicyResponse) 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_MsgUpdateGroupPolicyDecisionPolicyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse 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_MsgUpdateGroupPolicyDecisionPolicyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse 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_MsgUpdateGroupPolicyDecisionPolicyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse 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_MsgUpdateGroupPolicyDecisionPolicyResponse) 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.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse 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_MsgUpdateGroupPolicyDecisionPolicyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse 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_MsgUpdateGroupPolicyDecisionPolicyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse 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_MsgUpdateGroupPolicyDecisionPolicyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", 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_MsgUpdateGroupPolicyDecisionPolicyResponse) 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_MsgUpdateGroupPolicyDecisionPolicyResponse) 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_MsgUpdateGroupPolicyDecisionPolicyResponse) 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_MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupPolicyDecisionPolicyResponse) - 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().(*MsgUpdateGroupPolicyDecisionPolicyResponse) - 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().(*MsgUpdateGroupPolicyDecisionPolicyResponse) - 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: MsgUpdateGroupPolicyDecisionPolicyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupPolicyDecisionPolicyResponse: 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_MsgUpdateGroupPolicyMetadata protoreflect.MessageDescriptor - fd_MsgUpdateGroupPolicyMetadata_admin protoreflect.FieldDescriptor - fd_MsgUpdateGroupPolicyMetadata_address protoreflect.FieldDescriptor - fd_MsgUpdateGroupPolicyMetadata_metadata protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupPolicyMetadata = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupPolicyMetadata") - fd_MsgUpdateGroupPolicyMetadata_admin = md_MsgUpdateGroupPolicyMetadata.Fields().ByName("admin") - fd_MsgUpdateGroupPolicyMetadata_address = md_MsgUpdateGroupPolicyMetadata.Fields().ByName("address") - fd_MsgUpdateGroupPolicyMetadata_metadata = md_MsgUpdateGroupPolicyMetadata.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupPolicyMetadata)(nil) - -type fastReflection_MsgUpdateGroupPolicyMetadata MsgUpdateGroupPolicyMetadata - -func (x *MsgUpdateGroupPolicyMetadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyMetadata)(x) -} - -func (x *MsgUpdateGroupPolicyMetadata) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupPolicyMetadata_messageType fastReflection_MsgUpdateGroupPolicyMetadata_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupPolicyMetadata_messageType{} - -type fastReflection_MsgUpdateGroupPolicyMetadata_messageType struct{} - -func (x fastReflection_MsgUpdateGroupPolicyMetadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyMetadata)(nil) -} -func (x fastReflection_MsgUpdateGroupPolicyMetadata_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyMetadata) -} -func (x fastReflection_MsgUpdateGroupPolicyMetadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyMetadata -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupPolicyMetadata) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyMetadata -} - -// 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_MsgUpdateGroupPolicyMetadata) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupPolicyMetadata_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupPolicyMetadata) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyMetadata) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupPolicyMetadata) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupPolicyMetadata)(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_MsgUpdateGroupPolicyMetadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgUpdateGroupPolicyMetadata_admin, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgUpdateGroupPolicyMetadata_address, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgUpdateGroupPolicyMetadata_metadata, 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_MsgUpdateGroupPolicyMetadata) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.admin": - return x.Admin != "" - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.address": - return x.Address != "" - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.metadata": - return x.Metadata != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadata 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_MsgUpdateGroupPolicyMetadata) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.admin": - x.Admin = "" - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.address": - x.Address = "" - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.metadata": - x.Metadata = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadata 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_MsgUpdateGroupPolicyMetadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadata 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_MsgUpdateGroupPolicyMetadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.metadata": - x.Metadata = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadata 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_MsgUpdateGroupPolicyMetadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.MsgUpdateGroupPolicyMetadata is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgUpdateGroupPolicyMetadata is not mutable")) - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.MsgUpdateGroupPolicyMetadata is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadata 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_MsgUpdateGroupPolicyMetadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgUpdateGroupPolicyMetadata.metadata": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadata")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadata 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_MsgUpdateGroupPolicyMetadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupPolicyMetadata", 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_MsgUpdateGroupPolicyMetadata) 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_MsgUpdateGroupPolicyMetadata) 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_MsgUpdateGroupPolicyMetadata) 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_MsgUpdateGroupPolicyMetadata) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupPolicyMetadata) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateGroupPolicyMetadata) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - 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().(*MsgUpdateGroupPolicyMetadata) - 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: MsgUpdateGroupPolicyMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupPolicyMetadata: 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 Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateGroupPolicyMetadataResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgUpdateGroupPolicyMetadataResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgUpdateGroupPolicyMetadataResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateGroupPolicyMetadataResponse)(nil) - -type fastReflection_MsgUpdateGroupPolicyMetadataResponse MsgUpdateGroupPolicyMetadataResponse - -func (x *MsgUpdateGroupPolicyMetadataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyMetadataResponse)(x) -} - -func (x *MsgUpdateGroupPolicyMetadataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType{} - -type fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType struct{} - -func (x fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateGroupPolicyMetadataResponse)(nil) -} -func (x fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyMetadataResponse) -} -func (x fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyMetadataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateGroupPolicyMetadataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateGroupPolicyMetadataResponse -} - -// 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_MsgUpdateGroupPolicyMetadataResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateGroupPolicyMetadataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateGroupPolicyMetadataResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateGroupPolicyMetadataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateGroupPolicyMetadataResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateGroupPolicyMetadataResponse)(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_MsgUpdateGroupPolicyMetadataResponse) 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_MsgUpdateGroupPolicyMetadataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse 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_MsgUpdateGroupPolicyMetadataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse 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_MsgUpdateGroupPolicyMetadataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse 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_MsgUpdateGroupPolicyMetadataResponse) 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.group.v1.MsgUpdateGroupPolicyMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse 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_MsgUpdateGroupPolicyMetadataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse 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_MsgUpdateGroupPolicyMetadataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse 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_MsgUpdateGroupPolicyMetadataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", 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_MsgUpdateGroupPolicyMetadataResponse) 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_MsgUpdateGroupPolicyMetadataResponse) 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_MsgUpdateGroupPolicyMetadataResponse) 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_MsgUpdateGroupPolicyMetadataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateGroupPolicyMetadataResponse) - 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().(*MsgUpdateGroupPolicyMetadataResponse) - 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().(*MsgUpdateGroupPolicyMetadataResponse) - 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: MsgUpdateGroupPolicyMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateGroupPolicyMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgSubmitProposal_2_list)(nil) - -type _MsgSubmitProposal_2_list struct { - list *[]string -} - -func (x *_MsgSubmitProposal_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSubmitProposal_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_MsgSubmitProposal_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgSubmitProposal_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSubmitProposal_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgSubmitProposal at list field Proposers as it is not of Message kind")) -} - -func (x *_MsgSubmitProposal_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgSubmitProposal_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgSubmitProposal_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgSubmitProposal_4_list)(nil) - -type _MsgSubmitProposal_4_list struct { - list *[]*anypb.Any -} - -func (x *_MsgSubmitProposal_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSubmitProposal_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSubmitProposal_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSubmitProposal_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSubmitProposal_4_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSubmitProposal_4_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitProposal_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgSubmitProposal protoreflect.MessageDescriptor - fd_MsgSubmitProposal_address protoreflect.FieldDescriptor - fd_MsgSubmitProposal_proposers protoreflect.FieldDescriptor - fd_MsgSubmitProposal_metadata protoreflect.FieldDescriptor - fd_MsgSubmitProposal_messages protoreflect.FieldDescriptor - fd_MsgSubmitProposal_exec protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgSubmitProposal = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgSubmitProposal") - fd_MsgSubmitProposal_address = md_MsgSubmitProposal.Fields().ByName("address") - fd_MsgSubmitProposal_proposers = md_MsgSubmitProposal.Fields().ByName("proposers") - fd_MsgSubmitProposal_metadata = md_MsgSubmitProposal.Fields().ByName("metadata") - fd_MsgSubmitProposal_messages = md_MsgSubmitProposal.Fields().ByName("messages") - fd_MsgSubmitProposal_exec = md_MsgSubmitProposal.Fields().ByName("exec") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitProposal)(nil) - -type fastReflection_MsgSubmitProposal MsgSubmitProposal - -func (x *MsgSubmitProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitProposal)(x) -} - -func (x *MsgSubmitProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitProposal_messageType fastReflection_MsgSubmitProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitProposal_messageType{} - -type fastReflection_MsgSubmitProposal_messageType struct{} - -func (x fastReflection_MsgSubmitProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitProposal)(nil) -} -func (x fastReflection_MsgSubmitProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposal) -} -func (x fastReflection_MsgSubmitProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposal -} - -// 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_MsgSubmitProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitProposal) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitProposal) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitProposal)(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_MsgSubmitProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgSubmitProposal_address, value) { - return - } - } - if len(x.Proposers) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{list: &x.Proposers}) - if !f(fd_MsgSubmitProposal_proposers, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgSubmitProposal_metadata, value) { - return - } - } - if len(x.Messages) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitProposal_4_list{list: &x.Messages}) - if !f(fd_MsgSubmitProposal_messages, value) { - return - } - } - if x.Exec != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Exec)) - if !f(fd_MsgSubmitProposal_exec, 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_MsgSubmitProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposal.address": - return x.Address != "" - case "cosmos.group.v1.MsgSubmitProposal.proposers": - return len(x.Proposers) != 0 - case "cosmos.group.v1.MsgSubmitProposal.metadata": - return x.Metadata != "" - case "cosmos.group.v1.MsgSubmitProposal.messages": - return len(x.Messages) != 0 - case "cosmos.group.v1.MsgSubmitProposal.exec": - return x.Exec != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposal 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_MsgSubmitProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposal.address": - x.Address = "" - case "cosmos.group.v1.MsgSubmitProposal.proposers": - x.Proposers = nil - case "cosmos.group.v1.MsgSubmitProposal.metadata": - x.Metadata = "" - case "cosmos.group.v1.MsgSubmitProposal.messages": - x.Messages = nil - case "cosmos.group.v1.MsgSubmitProposal.exec": - x.Exec = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposal 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_MsgSubmitProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgSubmitProposal.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgSubmitProposal.proposers": - if len(x.Proposers) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{}) - } - listValue := &_MsgSubmitProposal_2_list{list: &x.Proposers} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.MsgSubmitProposal.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgSubmitProposal.messages": - if len(x.Messages) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitProposal_4_list{}) - } - listValue := &_MsgSubmitProposal_4_list{list: &x.Messages} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.MsgSubmitProposal.exec": - value := x.Exec - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposal 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_MsgSubmitProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposal.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.MsgSubmitProposal.proposers": - lv := value.List() - clv := lv.(*_MsgSubmitProposal_2_list) - x.Proposers = *clv.list - case "cosmos.group.v1.MsgSubmitProposal.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.MsgSubmitProposal.messages": - lv := value.List() - clv := lv.(*_MsgSubmitProposal_4_list) - x.Messages = *clv.list - case "cosmos.group.v1.MsgSubmitProposal.exec": - x.Exec = (Exec)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposal 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_MsgSubmitProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposal.proposers": - if x.Proposers == nil { - x.Proposers = []string{} - } - value := &_MsgSubmitProposal_2_list{list: &x.Proposers} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.MsgSubmitProposal.messages": - if x.Messages == nil { - x.Messages = []*anypb.Any{} - } - value := &_MsgSubmitProposal_4_list{list: &x.Messages} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.MsgSubmitProposal.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgSubmitProposal is not mutable")) - case "cosmos.group.v1.MsgSubmitProposal.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.MsgSubmitProposal is not mutable")) - case "cosmos.group.v1.MsgSubmitProposal.exec": - panic(fmt.Errorf("field exec of message cosmos.group.v1.MsgSubmitProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposal 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_MsgSubmitProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposal.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgSubmitProposal.proposers": - list := []string{} - return protoreflect.ValueOfList(&_MsgSubmitProposal_2_list{list: &list}) - case "cosmos.group.v1.MsgSubmitProposal.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgSubmitProposal.messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgSubmitProposal_4_list{list: &list}) - case "cosmos.group.v1.MsgSubmitProposal.exec": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposal 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_MsgSubmitProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgSubmitProposal", 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_MsgSubmitProposal) 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_MsgSubmitProposal) 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_MsgSubmitProposal) 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_MsgSubmitProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Proposers) > 0 { - for _, s := range x.Proposers { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Messages) > 0 { - for _, e := range x.Messages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Exec != 0 { - n += 1 + runtime.Sov(uint64(x.Exec)) - } - 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().(*MsgSubmitProposal) - 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.Exec != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Exec)) - i-- - dAtA[i] = 0x28 - } - if len(x.Messages) > 0 { - for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Messages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Proposers) > 0 { - for iNdEx := len(x.Proposers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Proposers[iNdEx]) - copy(dAtA[i:], x.Proposers[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proposers[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposal) - 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: MsgSubmitProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposers", 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.Proposers = append(x.Proposers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Messages = append(x.Messages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) - } - x.Exec = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Exec |= Exec(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitProposalResponse protoreflect.MessageDescriptor - fd_MsgSubmitProposalResponse_proposal_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgSubmitProposalResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgSubmitProposalResponse") - fd_MsgSubmitProposalResponse_proposal_id = md_MsgSubmitProposalResponse.Fields().ByName("proposal_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitProposalResponse)(nil) - -type fastReflection_MsgSubmitProposalResponse MsgSubmitProposalResponse - -func (x *MsgSubmitProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitProposalResponse)(x) -} - -func (x *MsgSubmitProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitProposalResponse_messageType fastReflection_MsgSubmitProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitProposalResponse_messageType{} - -type fastReflection_MsgSubmitProposalResponse_messageType struct{} - -func (x fastReflection_MsgSubmitProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitProposalResponse)(nil) -} -func (x fastReflection_MsgSubmitProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposalResponse) -} -func (x fastReflection_MsgSubmitProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitProposalResponse -} - -// 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_MsgSubmitProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitProposalResponse)(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_MsgSubmitProposalResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgSubmitProposalResponse_proposal_id, 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_MsgSubmitProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposalResponse.proposal_id": - return x.ProposalId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposalResponse.proposal_id": - x.ProposalId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgSubmitProposalResponse.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposalResponse.proposal_id": - x.ProposalId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposalResponse.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.MsgSubmitProposalResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgSubmitProposalResponse.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgSubmitProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgSubmitProposalResponse 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_MsgSubmitProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgSubmitProposalResponse", 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) 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_MsgSubmitProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitProposalResponse) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - 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().(*MsgSubmitProposalResponse) - 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.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitProposalResponse) - 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: MsgSubmitProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgWithdrawProposal protoreflect.MessageDescriptor - fd_MsgWithdrawProposal_proposal_id protoreflect.FieldDescriptor - fd_MsgWithdrawProposal_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgWithdrawProposal = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgWithdrawProposal") - fd_MsgWithdrawProposal_proposal_id = md_MsgWithdrawProposal.Fields().ByName("proposal_id") - fd_MsgWithdrawProposal_address = md_MsgWithdrawProposal.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawProposal)(nil) - -type fastReflection_MsgWithdrawProposal MsgWithdrawProposal - -func (x *MsgWithdrawProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawProposal)(x) -} - -func (x *MsgWithdrawProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawProposal_messageType fastReflection_MsgWithdrawProposal_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawProposal_messageType{} - -type fastReflection_MsgWithdrawProposal_messageType struct{} - -func (x fastReflection_MsgWithdrawProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawProposal)(nil) -} -func (x fastReflection_MsgWithdrawProposal_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawProposal) -} -func (x fastReflection_MsgWithdrawProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawProposal) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawProposal -} - -// 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_MsgWithdrawProposal) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawProposal) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawProposal) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawProposal)(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_MsgWithdrawProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgWithdrawProposal_proposal_id, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgWithdrawProposal_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgWithdrawProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgWithdrawProposal.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.MsgWithdrawProposal.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposal 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_MsgWithdrawProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgWithdrawProposal.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.MsgWithdrawProposal.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposal 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_MsgWithdrawProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgWithdrawProposal.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgWithdrawProposal.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposal 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_MsgWithdrawProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgWithdrawProposal.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.MsgWithdrawProposal.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposal 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_MsgWithdrawProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgWithdrawProposal.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.MsgWithdrawProposal is not mutable")) - case "cosmos.group.v1.MsgWithdrawProposal.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgWithdrawProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposal 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_MsgWithdrawProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgWithdrawProposal.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgWithdrawProposal.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposal 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_MsgWithdrawProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgWithdrawProposal", 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_MsgWithdrawProposal) 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_MsgWithdrawProposal) 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_MsgWithdrawProposal) 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_MsgWithdrawProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawProposal) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawProposal) - 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: MsgWithdrawProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_MsgWithdrawProposalResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgWithdrawProposalResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgWithdrawProposalResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawProposalResponse)(nil) - -type fastReflection_MsgWithdrawProposalResponse MsgWithdrawProposalResponse - -func (x *MsgWithdrawProposalResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawProposalResponse)(x) -} - -func (x *MsgWithdrawProposalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawProposalResponse_messageType fastReflection_MsgWithdrawProposalResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawProposalResponse_messageType{} - -type fastReflection_MsgWithdrawProposalResponse_messageType struct{} - -func (x fastReflection_MsgWithdrawProposalResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawProposalResponse)(nil) -} -func (x fastReflection_MsgWithdrawProposalResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawProposalResponse) -} -func (x fastReflection_MsgWithdrawProposalResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawProposalResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawProposalResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawProposalResponse -} - -// 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_MsgWithdrawProposalResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawProposalResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawProposalResponse) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawProposalResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawProposalResponse) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawProposalResponse)(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_MsgWithdrawProposalResponse) 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_MsgWithdrawProposalResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposalResponse 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_MsgWithdrawProposalResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposalResponse 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_MsgWithdrawProposalResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposalResponse 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_MsgWithdrawProposalResponse) 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.group.v1.MsgWithdrawProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposalResponse 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_MsgWithdrawProposalResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposalResponse 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_MsgWithdrawProposalResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgWithdrawProposalResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgWithdrawProposalResponse 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_MsgWithdrawProposalResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgWithdrawProposalResponse", 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_MsgWithdrawProposalResponse) 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_MsgWithdrawProposalResponse) 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_MsgWithdrawProposalResponse) 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_MsgWithdrawProposalResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawProposalResponse) - 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().(*MsgWithdrawProposalResponse) - 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().(*MsgWithdrawProposalResponse) - 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: MsgWithdrawProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawProposalResponse: 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_MsgVote protoreflect.MessageDescriptor - fd_MsgVote_proposal_id protoreflect.FieldDescriptor - fd_MsgVote_voter protoreflect.FieldDescriptor - fd_MsgVote_option protoreflect.FieldDescriptor - fd_MsgVote_metadata protoreflect.FieldDescriptor - fd_MsgVote_exec protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgVote = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgVote") - fd_MsgVote_proposal_id = md_MsgVote.Fields().ByName("proposal_id") - fd_MsgVote_voter = md_MsgVote.Fields().ByName("voter") - fd_MsgVote_option = md_MsgVote.Fields().ByName("option") - fd_MsgVote_metadata = md_MsgVote.Fields().ByName("metadata") - fd_MsgVote_exec = md_MsgVote.Fields().ByName("exec") -} - -var _ protoreflect.Message = (*fastReflection_MsgVote)(nil) - -type fastReflection_MsgVote MsgVote - -func (x *MsgVote) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVote)(x) -} - -func (x *MsgVote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVote_messageType fastReflection_MsgVote_messageType -var _ protoreflect.MessageType = fastReflection_MsgVote_messageType{} - -type fastReflection_MsgVote_messageType struct{} - -func (x fastReflection_MsgVote_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVote)(nil) -} -func (x fastReflection_MsgVote_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVote) -} -func (x fastReflection_MsgVote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVote) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVote -} - -// 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_MsgVote) Type() protoreflect.MessageType { - return _fastReflection_MsgVote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVote) New() protoreflect.Message { - return new(fastReflection_MsgVote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVote) Interface() protoreflect.ProtoMessage { - return (*MsgVote)(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_MsgVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgVote_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_MsgVote_voter, value) { - return - } - } - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_MsgVote_option, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_MsgVote_metadata, value) { - return - } - } - if x.Exec != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Exec)) - if !f(fd_MsgVote_exec, 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_MsgVote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgVote.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.MsgVote.voter": - return x.Voter != "" - case "cosmos.group.v1.MsgVote.option": - return x.Option != 0 - case "cosmos.group.v1.MsgVote.metadata": - return x.Metadata != "" - case "cosmos.group.v1.MsgVote.exec": - return x.Exec != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVote 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_MsgVote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgVote.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.MsgVote.voter": - x.Voter = "" - case "cosmos.group.v1.MsgVote.option": - x.Option = 0 - case "cosmos.group.v1.MsgVote.metadata": - x.Metadata = "" - case "cosmos.group.v1.MsgVote.exec": - x.Exec = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVote 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_MsgVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgVote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgVote.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgVote.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.group.v1.MsgVote.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgVote.exec": - value := x.Exec - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVote 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_MsgVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgVote.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.MsgVote.voter": - x.Voter = value.Interface().(string) - case "cosmos.group.v1.MsgVote.option": - x.Option = (VoteOption)(value.Enum()) - case "cosmos.group.v1.MsgVote.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.MsgVote.exec": - x.Exec = (Exec)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVote 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_MsgVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgVote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.MsgVote is not mutable")) - case "cosmos.group.v1.MsgVote.voter": - panic(fmt.Errorf("field voter of message cosmos.group.v1.MsgVote is not mutable")) - case "cosmos.group.v1.MsgVote.option": - panic(fmt.Errorf("field option of message cosmos.group.v1.MsgVote is not mutable")) - case "cosmos.group.v1.MsgVote.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.MsgVote is not mutable")) - case "cosmos.group.v1.MsgVote.exec": - panic(fmt.Errorf("field exec of message cosmos.group.v1.MsgVote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVote 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_MsgVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgVote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgVote.voter": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgVote.option": - return protoreflect.ValueOfEnum(0) - case "cosmos.group.v1.MsgVote.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgVote.exec": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVote")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVote 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_MsgVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgVote", 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_MsgVote) 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_MsgVote) 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_MsgVote) 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_MsgVote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Exec != 0 { - n += 1 + runtime.Sov(uint64(x.Exec)) - } - 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().(*MsgVote) - 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.Exec != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Exec)) - i-- - dAtA[i] = 0x28 - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if x.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x18 - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVote) - 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: MsgVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) - } - x.Exec = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Exec |= Exec(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgVoteResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgVoteResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgVoteResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgVoteResponse)(nil) - -type fastReflection_MsgVoteResponse MsgVoteResponse - -func (x *MsgVoteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteResponse)(x) -} - -func (x *MsgVoteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgVoteResponse_messageType fastReflection_MsgVoteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteResponse_messageType{} - -type fastReflection_MsgVoteResponse_messageType struct{} - -func (x fastReflection_MsgVoteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteResponse)(nil) -} -func (x fastReflection_MsgVoteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteResponse) -} -func (x fastReflection_MsgVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgVoteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteResponse -} - -// 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_MsgVoteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteResponse) New() protoreflect.Message { - return new(fastReflection_MsgVoteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVoteResponse)(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_MsgVoteResponse) 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_MsgVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVoteResponse 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_MsgVoteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVoteResponse 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_MsgVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVoteResponse 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_MsgVoteResponse) 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.group.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVoteResponse 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_MsgVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVoteResponse 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_MsgVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgVoteResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgVoteResponse 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_MsgVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgVoteResponse", 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) 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_MsgVoteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteResponse) - 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().(*MsgVoteResponse) - 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().(*MsgVoteResponse) - 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: MsgVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteResponse: 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_MsgExec protoreflect.MessageDescriptor - fd_MsgExec_proposal_id protoreflect.FieldDescriptor - fd_MsgExec_signer protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgExec = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgExec") - fd_MsgExec_proposal_id = md_MsgExec.Fields().ByName("proposal_id") - fd_MsgExec_signer = md_MsgExec.Fields().ByName("signer") -} - -var _ protoreflect.Message = (*fastReflection_MsgExec)(nil) - -type fastReflection_MsgExec MsgExec - -func (x *MsgExec) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExec)(x) -} - -func (x *MsgExec) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExec_messageType fastReflection_MsgExec_messageType -var _ protoreflect.MessageType = fastReflection_MsgExec_messageType{} - -type fastReflection_MsgExec_messageType struct{} - -func (x fastReflection_MsgExec_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExec)(nil) -} -func (x fastReflection_MsgExec_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExec) -} -func (x fastReflection_MsgExec_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExec -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExec) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExec -} - -// 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_MsgExec) Type() protoreflect.MessageType { - return _fastReflection_MsgExec_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExec) New() protoreflect.Message { - return new(fastReflection_MsgExec) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExec) Interface() protoreflect.ProtoMessage { - return (*MsgExec)(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_MsgExec) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_MsgExec_proposal_id, value) { - return - } - } - if x.Signer != "" { - value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgExec_signer, 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_MsgExec) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgExec.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.MsgExec.signer": - return x.Signer != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExec 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_MsgExec) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgExec.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.MsgExec.signer": - x.Signer = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExec 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_MsgExec) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgExec.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.MsgExec.signer": - value := x.Signer - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExec 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_MsgExec) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgExec.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.MsgExec.signer": - x.Signer = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExec 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_MsgExec) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgExec.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.MsgExec is not mutable")) - case "cosmos.group.v1.MsgExec.signer": - panic(fmt.Errorf("field signer of message cosmos.group.v1.MsgExec is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExec 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_MsgExec) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgExec.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.MsgExec.signer": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExec")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExec 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_MsgExec) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgExec", 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_MsgExec) 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_MsgExec) 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_MsgExec) 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_MsgExec) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExec) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Signer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgExec) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signer) > 0 { - i -= len(x.Signer) - copy(dAtA[i:], x.Signer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgExec) - 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: MsgExec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgExecResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgExecResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgExecResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecResponse)(nil) - -type fastReflection_MsgExecResponse MsgExecResponse - -func (x *MsgExecResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecResponse)(x) -} - -func (x *MsgExecResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExecResponse_messageType fastReflection_MsgExecResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecResponse_messageType{} - -type fastReflection_MsgExecResponse_messageType struct{} - -func (x fastReflection_MsgExecResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecResponse)(nil) -} -func (x fastReflection_MsgExecResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecResponse) -} -func (x fastReflection_MsgExecResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecResponse -} - -// 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_MsgExecResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecResponse)(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_MsgExecResponse) 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_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExecResponse 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_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExecResponse 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_MsgExecResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExecResponse 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_MsgExecResponse) 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.group.v1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExecResponse 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_MsgExecResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExecResponse 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_MsgExecResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgExecResponse 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_MsgExecResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgExecResponse", 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_MsgExecResponse) 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_MsgExecResponse) 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_MsgExecResponse) 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_MsgExecResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecResponse) - 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().(*MsgExecResponse) - 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().(*MsgExecResponse) - 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: MsgExecResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecResponse: 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_MsgLeaveGroup protoreflect.MessageDescriptor - fd_MsgLeaveGroup_address protoreflect.FieldDescriptor - fd_MsgLeaveGroup_group_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgLeaveGroup = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgLeaveGroup") - fd_MsgLeaveGroup_address = md_MsgLeaveGroup.Fields().ByName("address") - fd_MsgLeaveGroup_group_id = md_MsgLeaveGroup.Fields().ByName("group_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgLeaveGroup)(nil) - -type fastReflection_MsgLeaveGroup MsgLeaveGroup - -func (x *MsgLeaveGroup) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgLeaveGroup)(x) -} - -func (x *MsgLeaveGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgLeaveGroup_messageType fastReflection_MsgLeaveGroup_messageType -var _ protoreflect.MessageType = fastReflection_MsgLeaveGroup_messageType{} - -type fastReflection_MsgLeaveGroup_messageType struct{} - -func (x fastReflection_MsgLeaveGroup_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgLeaveGroup)(nil) -} -func (x fastReflection_MsgLeaveGroup_messageType) New() protoreflect.Message { - return new(fastReflection_MsgLeaveGroup) -} -func (x fastReflection_MsgLeaveGroup_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLeaveGroup -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgLeaveGroup) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLeaveGroup -} - -// 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_MsgLeaveGroup) Type() protoreflect.MessageType { - return _fastReflection_MsgLeaveGroup_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgLeaveGroup) New() protoreflect.Message { - return new(fastReflection_MsgLeaveGroup) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgLeaveGroup) Interface() protoreflect.ProtoMessage { - return (*MsgLeaveGroup)(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_MsgLeaveGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgLeaveGroup_address, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgLeaveGroup_group_id, 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_MsgLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.MsgLeaveGroup.address": - return x.Address != "" - case "cosmos.group.v1.MsgLeaveGroup.group_id": - return x.GroupId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroup 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_MsgLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.MsgLeaveGroup.address": - x.Address = "" - case "cosmos.group.v1.MsgLeaveGroup.group_id": - x.GroupId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroup 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_MsgLeaveGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.MsgLeaveGroup.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.MsgLeaveGroup.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroup 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_MsgLeaveGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.MsgLeaveGroup.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.MsgLeaveGroup.group_id": - x.GroupId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroup 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_MsgLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgLeaveGroup.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.MsgLeaveGroup is not mutable")) - case "cosmos.group.v1.MsgLeaveGroup.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.MsgLeaveGroup is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroup 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_MsgLeaveGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.MsgLeaveGroup.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.MsgLeaveGroup.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroup")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroup 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_MsgLeaveGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgLeaveGroup", 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_MsgLeaveGroup) 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_MsgLeaveGroup) 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_MsgLeaveGroup) 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_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgLeaveGroup) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - 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().(*MsgLeaveGroup) - 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.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgLeaveGroup) - 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: MsgLeaveGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLeaveGroup: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgLeaveGroupResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_group_v1_tx_proto_init() - md_MsgLeaveGroupResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgLeaveGroupResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgLeaveGroupResponse)(nil) - -type fastReflection_MsgLeaveGroupResponse MsgLeaveGroupResponse - -func (x *MsgLeaveGroupResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgLeaveGroupResponse)(x) -} - -func (x *MsgLeaveGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgLeaveGroupResponse_messageType fastReflection_MsgLeaveGroupResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgLeaveGroupResponse_messageType{} - -type fastReflection_MsgLeaveGroupResponse_messageType struct{} - -func (x fastReflection_MsgLeaveGroupResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgLeaveGroupResponse)(nil) -} -func (x fastReflection_MsgLeaveGroupResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgLeaveGroupResponse) -} -func (x fastReflection_MsgLeaveGroupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLeaveGroupResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgLeaveGroupResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLeaveGroupResponse -} - -// 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_MsgLeaveGroupResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgLeaveGroupResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgLeaveGroupResponse) New() protoreflect.Message { - return new(fastReflection_MsgLeaveGroupResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgLeaveGroupResponse) Interface() protoreflect.ProtoMessage { - return (*MsgLeaveGroupResponse)(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_MsgLeaveGroupResponse) 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_MsgLeaveGroupResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroupResponse 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_MsgLeaveGroupResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroupResponse 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_MsgLeaveGroupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroupResponse 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_MsgLeaveGroupResponse) 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.group.v1.MsgLeaveGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroupResponse 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_MsgLeaveGroupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroupResponse 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_MsgLeaveGroupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgLeaveGroupResponse")) - } - panic(fmt.Errorf("message cosmos.group.v1.MsgLeaveGroupResponse 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_MsgLeaveGroupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.MsgLeaveGroupResponse", 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_MsgLeaveGroupResponse) 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_MsgLeaveGroupResponse) 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_MsgLeaveGroupResponse) 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_MsgLeaveGroupResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgLeaveGroupResponse) - 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().(*MsgLeaveGroupResponse) - 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().(*MsgLeaveGroupResponse) - 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: MsgLeaveGroupResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLeaveGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/group/v1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Exec defines modes of execution of a proposal on creation or on new vote. -type Exec int32 - -const ( - // An empty value means that there should be a separate - // MsgExec request for the proposal to execute. - Exec_EXEC_UNSPECIFIED Exec = 0 - // Try to execute the proposal immediately. - // If the proposal is not allowed per the DecisionPolicy, - // the proposal will still be open and could - // be executed at a later point. - Exec_EXEC_TRY Exec = 1 -) - -// Enum value maps for Exec. -var ( - Exec_name = map[int32]string{ - 0: "EXEC_UNSPECIFIED", - 1: "EXEC_TRY", - } - Exec_value = map[string]int32{ - "EXEC_UNSPECIFIED": 0, - "EXEC_TRY": 1, - } -) - -func (x Exec) Enum() *Exec { - p := new(Exec) - *p = x - return p -} - -func (x Exec) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Exec) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_group_v1_tx_proto_enumTypes[0].Descriptor() -} - -func (Exec) Type() protoreflect.EnumType { - return &file_cosmos_group_v1_tx_proto_enumTypes[0] -} - -func (x Exec) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Exec.Descriptor instead. -func (Exec) EnumDescriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{0} -} - -// MsgCreateGroup is the Msg/CreateGroup request type. -type MsgCreateGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // members defines the group members. - Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - // metadata is any arbitrary metadata to attached to the group. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *MsgCreateGroup) Reset() { - *x = MsgCreateGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateGroup) ProtoMessage() {} - -// Deprecated: Use MsgCreateGroup.ProtoReflect.Descriptor instead. -func (*MsgCreateGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgCreateGroup) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgCreateGroup) GetMembers() []*Member { - if x != nil { - return x.Members - } - return nil -} - -func (x *MsgCreateGroup) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// MsgCreateGroupResponse is the Msg/CreateGroup response type. -type MsgCreateGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the newly created group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` -} - -func (x *MsgCreateGroupResponse) Reset() { - *x = MsgCreateGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateGroupResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateGroupResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateGroupResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgCreateGroupResponse) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. -type MsgUpdateGroupMembers struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // member_updates is the list of members to update, - // set weight to 0 to remove a member. - MemberUpdates []*Member `protobuf:"bytes,3,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates,omitempty"` -} - -func (x *MsgUpdateGroupMembers) Reset() { - *x = MsgUpdateGroupMembers{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupMembers) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupMembers) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupMembers.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupMembers) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgUpdateGroupMembers) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgUpdateGroupMembers) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *MsgUpdateGroupMembers) GetMemberUpdates() []*Member { - if x != nil { - return x.MemberUpdates - } - return nil -} - -// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. -type MsgUpdateGroupMembersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateGroupMembersResponse) Reset() { - *x = MsgUpdateGroupMembersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupMembersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupMembersResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupMembersResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupMembersResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. -type MsgUpdateGroupAdmin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the current account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // new_admin is the group new admin account address. - NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` -} - -func (x *MsgUpdateGroupAdmin) Reset() { - *x = MsgUpdateGroupAdmin{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupAdmin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupAdmin) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupAdmin.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupAdmin) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgUpdateGroupAdmin) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgUpdateGroupAdmin) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *MsgUpdateGroupAdmin) GetNewAdmin() string { - if x != nil { - return x.NewAdmin - } - return "" -} - -// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. -type MsgUpdateGroupAdminResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateGroupAdminResponse) Reset() { - *x = MsgUpdateGroupAdminResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupAdminResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupAdminResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupAdminResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupAdminResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{5} -} - -// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. -type MsgUpdateGroupMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // metadata is the updated group's metadata. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *MsgUpdateGroupMetadata) Reset() { - *x = MsgUpdateGroupMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupMetadata) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupMetadata.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupMetadata) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgUpdateGroupMetadata) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgUpdateGroupMetadata) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *MsgUpdateGroupMetadata) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. -type MsgUpdateGroupMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateGroupMetadataResponse) Reset() { - *x = MsgUpdateGroupMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupMetadataResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupMetadataResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupMetadataResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{7} -} - -// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. -type MsgCreateGroupPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // metadata is any arbitrary metadata attached to the group policy. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // decision_policy specifies the group policy's decision policy. - DecisionPolicy *anypb.Any `protobuf:"bytes,4,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` -} - -func (x *MsgCreateGroupPolicy) Reset() { - *x = MsgCreateGroupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateGroupPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateGroupPolicy) ProtoMessage() {} - -// Deprecated: Use MsgCreateGroupPolicy.ProtoReflect.Descriptor instead. -func (*MsgCreateGroupPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgCreateGroupPolicy) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgCreateGroupPolicy) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *MsgCreateGroupPolicy) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *MsgCreateGroupPolicy) GetDecisionPolicy() *anypb.Any { - if x != nil { - return x.DecisionPolicy - } - return nil -} - -// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. -type MsgCreateGroupPolicyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of the newly created group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *MsgCreateGroupPolicyResponse) Reset() { - *x = MsgCreateGroupPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateGroupPolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateGroupPolicyResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateGroupPolicyResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateGroupPolicyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{9} -} - -func (x *MsgCreateGroupPolicyResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. -type MsgUpdateGroupPolicyAdmin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the account address of the group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // new_admin is the new group policy admin. - NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` -} - -func (x *MsgUpdateGroupPolicyAdmin) Reset() { - *x = MsgUpdateGroupPolicyAdmin{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupPolicyAdmin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupPolicyAdmin) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupPolicyAdmin.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupPolicyAdmin) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgUpdateGroupPolicyAdmin) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgUpdateGroupPolicyAdmin) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgUpdateGroupPolicyAdmin) GetNewAdmin() string { - if x != nil { - return x.NewAdmin - } - return "" -} - -// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. -type MsgCreateGroupWithPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group and group policy admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // members defines the group members. - Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - // group_metadata is any arbitrary metadata attached to the group. - GroupMetadata string `protobuf:"bytes,3,opt,name=group_metadata,json=groupMetadata,proto3" json:"group_metadata,omitempty"` - // group_policy_metadata is any arbitrary metadata attached to the group policy. - GroupPolicyMetadata string `protobuf:"bytes,4,opt,name=group_policy_metadata,json=groupPolicyMetadata,proto3" json:"group_policy_metadata,omitempty"` - // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. - GroupPolicyAsAdmin bool `protobuf:"varint,5,opt,name=group_policy_as_admin,json=groupPolicyAsAdmin,proto3" json:"group_policy_as_admin,omitempty"` - // decision_policy specifies the group policy's decision policy. - DecisionPolicy *anypb.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` -} - -func (x *MsgCreateGroupWithPolicy) Reset() { - *x = MsgCreateGroupWithPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateGroupWithPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateGroupWithPolicy) ProtoMessage() {} - -// Deprecated: Use MsgCreateGroupWithPolicy.ProtoReflect.Descriptor instead. -func (*MsgCreateGroupWithPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{11} -} - -func (x *MsgCreateGroupWithPolicy) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgCreateGroupWithPolicy) GetMembers() []*Member { - if x != nil { - return x.Members - } - return nil -} - -func (x *MsgCreateGroupWithPolicy) GetGroupMetadata() string { - if x != nil { - return x.GroupMetadata - } - return "" -} - -func (x *MsgCreateGroupWithPolicy) GetGroupPolicyMetadata() string { - if x != nil { - return x.GroupPolicyMetadata - } - return "" -} - -func (x *MsgCreateGroupWithPolicy) GetGroupPolicyAsAdmin() bool { - if x != nil { - return x.GroupPolicyAsAdmin - } - return false -} - -func (x *MsgCreateGroupWithPolicy) GetDecisionPolicy() *anypb.Any { - if x != nil { - return x.DecisionPolicy - } - return nil -} - -// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. -type MsgCreateGroupWithPolicyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the newly created group with policy. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // group_policy_address is the account address of the newly created group policy. - GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` -} - -func (x *MsgCreateGroupWithPolicyResponse) Reset() { - *x = MsgCreateGroupWithPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateGroupWithPolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateGroupWithPolicyResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateGroupWithPolicyResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateGroupWithPolicyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{12} -} - -func (x *MsgCreateGroupWithPolicyResponse) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *MsgCreateGroupWithPolicyResponse) GetGroupPolicyAddress() string { - if x != nil { - return x.GroupPolicyAddress - } - return "" -} - -// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. -type MsgUpdateGroupPolicyAdminResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateGroupPolicyAdminResponse) Reset() { - *x = MsgUpdateGroupPolicyAdminResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupPolicyAdminResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupPolicyAdminResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupPolicyAdminResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupPolicyAdminResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{13} -} - -// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. -type MsgUpdateGroupPolicyDecisionPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the account address of group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // decision_policy is the updated group policy's decision policy. - DecisionPolicy *anypb.Any `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` -} - -func (x *MsgUpdateGroupPolicyDecisionPolicy) Reset() { - *x = MsgUpdateGroupPolicyDecisionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupPolicyDecisionPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupPolicyDecisionPolicy) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupPolicyDecisionPolicy.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupPolicyDecisionPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{14} -} - -func (x *MsgUpdateGroupPolicyDecisionPolicy) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgUpdateGroupPolicyDecisionPolicy) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() *anypb.Any { - if x != nil { - return x.DecisionPolicy - } - return nil -} - -// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. -type MsgUpdateGroupPolicyDecisionPolicyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) Reset() { - *x = MsgUpdateGroupPolicyDecisionPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupPolicyDecisionPolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupPolicyDecisionPolicyResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{15} -} - -// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. -type MsgUpdateGroupPolicyMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the account address of group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // metadata is the updated group policy metadata. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *MsgUpdateGroupPolicyMetadata) Reset() { - *x = MsgUpdateGroupPolicyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupPolicyMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupPolicyMetadata) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupPolicyMetadata.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupPolicyMetadata) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{16} -} - -func (x *MsgUpdateGroupPolicyMetadata) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *MsgUpdateGroupPolicyMetadata) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgUpdateGroupPolicyMetadata) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. -type MsgUpdateGroupPolicyMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateGroupPolicyMetadataResponse) Reset() { - *x = MsgUpdateGroupPolicyMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateGroupPolicyMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateGroupPolicyMetadataResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateGroupPolicyMetadataResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateGroupPolicyMetadataResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{17} -} - -// MsgSubmitProposal is the Msg/SubmitProposal request type. -type MsgSubmitProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // proposers are the account addresses of the proposers. - // Proposers signatures will be counted as yes votes. - Proposers []string `protobuf:"bytes,2,rep,name=proposers,proto3" json:"proposers,omitempty"` - // metadata is any arbitrary metadata to attached to the proposal. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - Messages []*anypb.Any `protobuf:"bytes,4,rep,name=messages,proto3" json:"messages,omitempty"` - // exec defines the mode of execution of the proposal, - // whether it should be executed immediately on creation or not. - // If so, proposers signatures are considered as Yes votes. - Exec Exec `protobuf:"varint,5,opt,name=exec,proto3,enum=cosmos.group.v1.Exec" json:"exec,omitempty"` -} - -func (x *MsgSubmitProposal) Reset() { - *x = MsgSubmitProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitProposal) ProtoMessage() {} - -// Deprecated: Use MsgSubmitProposal.ProtoReflect.Descriptor instead. -func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{18} -} - -func (x *MsgSubmitProposal) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgSubmitProposal) GetProposers() []string { - if x != nil { - return x.Proposers - } - return nil -} - -func (x *MsgSubmitProposal) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *MsgSubmitProposal) GetMessages() []*anypb.Any { - if x != nil { - return x.Messages - } - return nil -} - -func (x *MsgSubmitProposal) GetExec() Exec { - if x != nil { - return x.Exec - } - return Exec_EXEC_UNSPECIFIED -} - -// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. -type MsgSubmitProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (x *MsgSubmitProposalResponse) Reset() { - *x = MsgSubmitProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitProposalResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{19} -} - -func (x *MsgSubmitProposalResponse) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -// MsgWithdrawProposal is the Msg/WithdrawProposal request type. -type MsgWithdrawProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // address is the admin of the group policy or one of the proposer of the proposal. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *MsgWithdrawProposal) Reset() { - *x = MsgWithdrawProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawProposal) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawProposal.ProtoReflect.Descriptor instead. -func (*MsgWithdrawProposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{20} -} - -func (x *MsgWithdrawProposal) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgWithdrawProposal) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. -type MsgWithdrawProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgWithdrawProposalResponse) Reset() { - *x = MsgWithdrawProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawProposalResponse) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawProposalResponse.ProtoReflect.Descriptor instead. -func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{21} -} - -// MsgVote is the Msg/Vote request type. -type MsgVote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter is the voter account address. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - // option is the voter's choice on the proposal. - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.group.v1.VoteOption" json:"option,omitempty"` - // metadata is any arbitrary metadata to attached to the vote. - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // exec defines whether the proposal should be executed - // immediately after voting or not. - Exec Exec `protobuf:"varint,5,opt,name=exec,proto3,enum=cosmos.group.v1.Exec" json:"exec,omitempty"` -} - -func (x *MsgVote) Reset() { - *x = MsgVote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVote) ProtoMessage() {} - -// Deprecated: Use MsgVote.ProtoReflect.Descriptor instead. -func (*MsgVote) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{22} -} - -func (x *MsgVote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgVote) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *MsgVote) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -func (x *MsgVote) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *MsgVote) GetExec() Exec { - if x != nil { - return x.Exec - } - return Exec_EXEC_UNSPECIFIED -} - -// MsgVoteResponse is the Msg/Vote response type. -type MsgVoteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgVoteResponse) Reset() { - *x = MsgVoteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgVoteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgVoteResponse) ProtoMessage() {} - -// Deprecated: Use MsgVoteResponse.ProtoReflect.Descriptor instead. -func (*MsgVoteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{23} -} - -// MsgExec is the Msg/Exec request type. -type MsgExec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // signer is the account address used to execute the proposal. - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (x *MsgExec) Reset() { - *x = MsgExec{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExec) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExec) ProtoMessage() {} - -// Deprecated: Use MsgExec.ProtoReflect.Descriptor instead. -func (*MsgExec) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{24} -} - -func (x *MsgExec) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *MsgExec) GetSigner() string { - if x != nil { - return x.Signer - } - return "" -} - -// MsgExecResponse is the Msg/Exec request type. -type MsgExecResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgExecResponse) Reset() { - *x = MsgExecResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecResponse.ProtoReflect.Descriptor instead. -func (*MsgExecResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{25} -} - -// MsgLeaveGroup is the Msg/LeaveGroup request type. -type MsgLeaveGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of the group member. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` -} - -func (x *MsgLeaveGroup) Reset() { - *x = MsgLeaveGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgLeaveGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgLeaveGroup) ProtoMessage() {} - -// Deprecated: Use MsgLeaveGroup.ProtoReflect.Descriptor instead. -func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{26} -} - -func (x *MsgLeaveGroup) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgLeaveGroup) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. -type MsgLeaveGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgLeaveGroupResponse) Reset() { - *x = MsgLeaveGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_tx_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgLeaveGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgLeaveGroupResponse) ProtoMessage() {} - -// Deprecated: Use MsgLeaveGroupResponse.ProtoReflect.Descriptor instead. -func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{27} -} - -var File_cosmos_group_v1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, - 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x22, 0x33, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x0e, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x1f, 0x0a, - 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, - 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x64, 0x12, 0x35, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, - 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, - 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, - 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 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, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x52, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0xc2, 0x01, 0x0a, 0x19, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x09, - 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, - 0xea, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x37, 0x0a, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x15, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x31, 0x0a, 0x15, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x73, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 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, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x89, 0x01, 0x0a, - 0x20, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, - 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x14, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xeb, 0x01, - 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 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, 0x44, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, - 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x2c, 0x0a, 0x2a, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x1c, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf2, - 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 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, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, - 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, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x78, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x04, 0x65, 0x78, 0x65, 0x63, 0x3a, - 0x12, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x73, 0x22, 0x3c, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x22, 0x6a, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1d, 0x0a, - 0x1b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x01, 0x0a, - 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x06, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x78, - 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, - 0x04, 0x65, 0x78, 0x65, 0x63, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, - 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x6c, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 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, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x2a, 0x0a, 0x04, 0x45, 0x78, 0x65, - 0x63, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x45, 0x43, 0x5f, - 0x54, 0x52, 0x59, 0x10, 0x01, 0x32, 0xc3, 0x0b, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x57, 0x0a, - 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x2c, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x13, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x2f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, - 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x31, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x78, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x1f, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x81, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x35, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, - 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, - 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, - 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x42, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb6, 0x01, 0x0a, 0x13, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, - 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, - 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_group_v1_tx_proto_rawDescOnce sync.Once - file_cosmos_group_v1_tx_proto_rawDescData = file_cosmos_group_v1_tx_proto_rawDesc -) - -func file_cosmos_group_v1_tx_proto_rawDescGZIP() []byte { - file_cosmos_group_v1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_group_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_group_v1_tx_proto_rawDescData) - }) - return file_cosmos_group_v1_tx_proto_rawDescData -} - -var file_cosmos_group_v1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_group_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_cosmos_group_v1_tx_proto_goTypes = []interface{}{ - (Exec)(0), // 0: cosmos.group.v1.Exec - (*MsgCreateGroup)(nil), // 1: cosmos.group.v1.MsgCreateGroup - (*MsgCreateGroupResponse)(nil), // 2: cosmos.group.v1.MsgCreateGroupResponse - (*MsgUpdateGroupMembers)(nil), // 3: cosmos.group.v1.MsgUpdateGroupMembers - (*MsgUpdateGroupMembersResponse)(nil), // 4: cosmos.group.v1.MsgUpdateGroupMembersResponse - (*MsgUpdateGroupAdmin)(nil), // 5: cosmos.group.v1.MsgUpdateGroupAdmin - (*MsgUpdateGroupAdminResponse)(nil), // 6: cosmos.group.v1.MsgUpdateGroupAdminResponse - (*MsgUpdateGroupMetadata)(nil), // 7: cosmos.group.v1.MsgUpdateGroupMetadata - (*MsgUpdateGroupMetadataResponse)(nil), // 8: cosmos.group.v1.MsgUpdateGroupMetadataResponse - (*MsgCreateGroupPolicy)(nil), // 9: cosmos.group.v1.MsgCreateGroupPolicy - (*MsgCreateGroupPolicyResponse)(nil), // 10: cosmos.group.v1.MsgCreateGroupPolicyResponse - (*MsgUpdateGroupPolicyAdmin)(nil), // 11: cosmos.group.v1.MsgUpdateGroupPolicyAdmin - (*MsgCreateGroupWithPolicy)(nil), // 12: cosmos.group.v1.MsgCreateGroupWithPolicy - (*MsgCreateGroupWithPolicyResponse)(nil), // 13: cosmos.group.v1.MsgCreateGroupWithPolicyResponse - (*MsgUpdateGroupPolicyAdminResponse)(nil), // 14: cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse - (*MsgUpdateGroupPolicyDecisionPolicy)(nil), // 15: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy - (*MsgUpdateGroupPolicyDecisionPolicyResponse)(nil), // 16: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse - (*MsgUpdateGroupPolicyMetadata)(nil), // 17: cosmos.group.v1.MsgUpdateGroupPolicyMetadata - (*MsgUpdateGroupPolicyMetadataResponse)(nil), // 18: cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse - (*MsgSubmitProposal)(nil), // 19: cosmos.group.v1.MsgSubmitProposal - (*MsgSubmitProposalResponse)(nil), // 20: cosmos.group.v1.MsgSubmitProposalResponse - (*MsgWithdrawProposal)(nil), // 21: cosmos.group.v1.MsgWithdrawProposal - (*MsgWithdrawProposalResponse)(nil), // 22: cosmos.group.v1.MsgWithdrawProposalResponse - (*MsgVote)(nil), // 23: cosmos.group.v1.MsgVote - (*MsgVoteResponse)(nil), // 24: cosmos.group.v1.MsgVoteResponse - (*MsgExec)(nil), // 25: cosmos.group.v1.MsgExec - (*MsgExecResponse)(nil), // 26: cosmos.group.v1.MsgExecResponse - (*MsgLeaveGroup)(nil), // 27: cosmos.group.v1.MsgLeaveGroup - (*MsgLeaveGroupResponse)(nil), // 28: cosmos.group.v1.MsgLeaveGroupResponse - (*Member)(nil), // 29: cosmos.group.v1.Member - (*anypb.Any)(nil), // 30: google.protobuf.Any - (VoteOption)(0), // 31: cosmos.group.v1.VoteOption -} -var file_cosmos_group_v1_tx_proto_depIdxs = []int32{ - 29, // 0: cosmos.group.v1.MsgCreateGroup.members:type_name -> cosmos.group.v1.Member - 29, // 1: cosmos.group.v1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1.Member - 30, // 2: cosmos.group.v1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any - 29, // 3: cosmos.group.v1.MsgCreateGroupWithPolicy.members:type_name -> cosmos.group.v1.Member - 30, // 4: cosmos.group.v1.MsgCreateGroupWithPolicy.decision_policy:type_name -> google.protobuf.Any - 30, // 5: cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any - 30, // 6: cosmos.group.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any - 0, // 7: cosmos.group.v1.MsgSubmitProposal.exec:type_name -> cosmos.group.v1.Exec - 31, // 8: cosmos.group.v1.MsgVote.option:type_name -> cosmos.group.v1.VoteOption - 0, // 9: cosmos.group.v1.MsgVote.exec:type_name -> cosmos.group.v1.Exec - 1, // 10: cosmos.group.v1.Msg.CreateGroup:input_type -> cosmos.group.v1.MsgCreateGroup - 3, // 11: cosmos.group.v1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1.MsgUpdateGroupMembers - 5, // 12: cosmos.group.v1.Msg.UpdateGroupAdmin:input_type -> cosmos.group.v1.MsgUpdateGroupAdmin - 7, // 13: cosmos.group.v1.Msg.UpdateGroupMetadata:input_type -> cosmos.group.v1.MsgUpdateGroupMetadata - 9, // 14: cosmos.group.v1.Msg.CreateGroupPolicy:input_type -> cosmos.group.v1.MsgCreateGroupPolicy - 12, // 15: cosmos.group.v1.Msg.CreateGroupWithPolicy:input_type -> cosmos.group.v1.MsgCreateGroupWithPolicy - 11, // 16: cosmos.group.v1.Msg.UpdateGroupPolicyAdmin:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyAdmin - 15, // 17: cosmos.group.v1.Msg.UpdateGroupPolicyDecisionPolicy:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy - 17, // 18: cosmos.group.v1.Msg.UpdateGroupPolicyMetadata:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyMetadata - 19, // 19: cosmos.group.v1.Msg.SubmitProposal:input_type -> cosmos.group.v1.MsgSubmitProposal - 21, // 20: cosmos.group.v1.Msg.WithdrawProposal:input_type -> cosmos.group.v1.MsgWithdrawProposal - 23, // 21: cosmos.group.v1.Msg.Vote:input_type -> cosmos.group.v1.MsgVote - 25, // 22: cosmos.group.v1.Msg.Exec:input_type -> cosmos.group.v1.MsgExec - 27, // 23: cosmos.group.v1.Msg.LeaveGroup:input_type -> cosmos.group.v1.MsgLeaveGroup - 2, // 24: cosmos.group.v1.Msg.CreateGroup:output_type -> cosmos.group.v1.MsgCreateGroupResponse - 4, // 25: cosmos.group.v1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1.MsgUpdateGroupMembersResponse - 6, // 26: cosmos.group.v1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1.MsgUpdateGroupAdminResponse - 8, // 27: cosmos.group.v1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1.MsgUpdateGroupMetadataResponse - 10, // 28: cosmos.group.v1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1.MsgCreateGroupPolicyResponse - 13, // 29: cosmos.group.v1.Msg.CreateGroupWithPolicy:output_type -> cosmos.group.v1.MsgCreateGroupWithPolicyResponse - 14, // 30: cosmos.group.v1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse - 16, // 31: cosmos.group.v1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse - 18, // 32: cosmos.group.v1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse - 20, // 33: cosmos.group.v1.Msg.SubmitProposal:output_type -> cosmos.group.v1.MsgSubmitProposalResponse - 22, // 34: cosmos.group.v1.Msg.WithdrawProposal:output_type -> cosmos.group.v1.MsgWithdrawProposalResponse - 24, // 35: cosmos.group.v1.Msg.Vote:output_type -> cosmos.group.v1.MsgVoteResponse - 26, // 36: cosmos.group.v1.Msg.Exec:output_type -> cosmos.group.v1.MsgExecResponse - 28, // 37: cosmos.group.v1.Msg.LeaveGroup:output_type -> cosmos.group.v1.MsgLeaveGroupResponse - 24, // [24:38] is the sub-list for method output_type - 10, // [10:24] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_cosmos_group_v1_tx_proto_init() } -func file_cosmos_group_v1_tx_proto_init() { - if File_cosmos_group_v1_tx_proto != nil { - return - } - file_cosmos_group_v1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_group_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupMembers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupMembersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupAdmin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupAdminResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateGroupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateGroupPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyAdmin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateGroupWithPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateGroupWithPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyAdminResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyDecisionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyDecisionPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateGroupPolicyMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgLeaveGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_tx_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgLeaveGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_group_v1_tx_proto_rawDesc, - NumEnums: 1, - NumMessages: 28, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_group_v1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_group_v1_tx_proto_depIdxs, - EnumInfos: file_cosmos_group_v1_tx_proto_enumTypes, - MessageInfos: file_cosmos_group_v1_tx_proto_msgTypes, - }.Build() - File_cosmos_group_v1_tx_proto = out.File - file_cosmos_group_v1_tx_proto_rawDesc = nil - file_cosmos_group_v1_tx_proto_goTypes = nil - file_cosmos_group_v1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/group/v1/tx_grpc.pb.go b/api/cosmos/group/v1/tx_grpc.pb.go deleted file mode 100644 index a53f8a42c695..000000000000 --- a/api/cosmos/group/v1/tx_grpc.pb.go +++ /dev/null @@ -1,601 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/group/v1/tx.proto - -package groupv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. - CreateGroup(ctx context.Context, in *MsgCreateGroup, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error) - // UpdateGroupMembers updates the group members with given group id and admin address. - UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembers, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error) - // UpdateGroupAdmin updates the group admin with given group id and previous admin address. - UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error) - // UpdateGroupMetadata updates the group metadata with given group id and admin address. - UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) - // CreateGroupPolicy creates a new group policy using given DecisionPolicy. - CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error) - // CreateGroupWithPolicy creates a new group with policy. - CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) - // UpdateGroupPolicyAdmin updates a group policy admin. - UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) - // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. - UpdateGroupPolicyDecisionPolicy(ctx context.Context, in *MsgUpdateGroupPolicyDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) - // UpdateGroupPolicyMetadata updates a group policy metadata. - UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) - // SubmitProposal submits a new proposal. - SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. - WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) - // Vote allows a voter to vote on a proposal. - Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) - // Exec executes a proposal. - Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) - // LeaveGroup allows a group member to leave the group. - LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateGroup(ctx context.Context, in *MsgCreateGroup, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error) { - out := new(MsgCreateGroupResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/CreateGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembers, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error) { - out := new(MsgUpdateGroupMembersResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/UpdateGroupMembers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error) { - out := new(MsgUpdateGroupAdminResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/UpdateGroupAdmin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) { - out := new(MsgUpdateGroupMetadataResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/UpdateGroupMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error) { - out := new(MsgCreateGroupPolicyResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/CreateGroupPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) { - out := new(MsgCreateGroupWithPolicyResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/CreateGroupWithPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) { - out := new(MsgUpdateGroupPolicyAdminResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateGroupPolicyDecisionPolicy(ctx context.Context, in *MsgUpdateGroupPolicyDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) { - out := new(MsgUpdateGroupPolicyDecisionPolicyResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) { - out := new(MsgUpdateGroupPolicyMetadataResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) { - out := new(MsgSubmitProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/SubmitProposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) { - out := new(MsgWithdrawProposalResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/WithdrawProposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { - out := new(MsgVoteResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/Vote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) { - out := new(MsgExecResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/Exec", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) { - out := new(MsgLeaveGroupResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1.Msg/LeaveGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. - CreateGroup(context.Context, *MsgCreateGroup) (*MsgCreateGroupResponse, error) - // UpdateGroupMembers updates the group members with given group id and admin address. - UpdateGroupMembers(context.Context, *MsgUpdateGroupMembers) (*MsgUpdateGroupMembersResponse, error) - // UpdateGroupAdmin updates the group admin with given group id and previous admin address. - UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdmin) (*MsgUpdateGroupAdminResponse, error) - // UpdateGroupMetadata updates the group metadata with given group id and admin address. - UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) - // CreateGroupPolicy creates a new group policy using given DecisionPolicy. - CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) - // CreateGroupWithPolicy creates a new group with policy. - CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) - // UpdateGroupPolicyAdmin updates a group policy admin. - UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) - // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. - UpdateGroupPolicyDecisionPolicy(context.Context, *MsgUpdateGroupPolicyDecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) - // UpdateGroupPolicyMetadata updates a group policy metadata. - UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) - // SubmitProposal submits a new proposal. - SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. - WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) - // Vote allows a voter to vote on a proposal. - Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) - // Exec executes a proposal. - Exec(context.Context, *MsgExec) (*MsgExecResponse, error) - // LeaveGroup allows a group member to leave the group. - LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) CreateGroup(context.Context, *MsgCreateGroup) (*MsgCreateGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") -} -func (UnimplementedMsgServer) UpdateGroupMembers(context.Context, *MsgUpdateGroupMembers) (*MsgUpdateGroupMembersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMembers not implemented") -} -func (UnimplementedMsgServer) UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdmin) (*MsgUpdateGroupAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAdmin not implemented") -} -func (UnimplementedMsgServer) UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMetadata not implemented") -} -func (UnimplementedMsgServer) CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroupPolicy not implemented") -} -func (UnimplementedMsgServer) CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroupWithPolicy not implemented") -} -func (UnimplementedMsgServer) UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyAdmin not implemented") -} -func (UnimplementedMsgServer) UpdateGroupPolicyDecisionPolicy(context.Context, *MsgUpdateGroupPolicyDecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyDecisionPolicy not implemented") -} -func (UnimplementedMsgServer) UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyMetadata not implemented") -} -func (UnimplementedMsgServer) SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") -} -func (UnimplementedMsgServer) WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawProposal not implemented") -} -func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") -} -func (UnimplementedMsgServer) Exec(context.Context, *MsgExec) (*MsgExecResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") -} -func (UnimplementedMsgServer) LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaveGroup not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/CreateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateGroup(ctx, req.(*MsgCreateGroup)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupMembers) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateGroupMembers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/UpdateGroupMembers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupMembers(ctx, req.(*MsgUpdateGroupMembers)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateGroupAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupAdmin) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateGroupAdmin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/UpdateGroupAdmin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupAdmin(ctx, req.(*MsgUpdateGroupAdmin)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateGroupMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupMetadata) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateGroupMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/UpdateGroupMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupMetadata(ctx, req.(*MsgUpdateGroupMetadata)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreateGroupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateGroupPolicy) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateGroupPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/CreateGroupPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateGroupPolicy(ctx, req.(*MsgCreateGroupPolicy)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreateGroupWithPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateGroupWithPolicy) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateGroupWithPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/CreateGroupWithPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateGroupWithPolicy(ctx, req.(*MsgCreateGroupWithPolicy)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateGroupPolicyAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupPolicyAdmin) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateGroupPolicyAdmin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupPolicyAdmin(ctx, req.(*MsgUpdateGroupPolicyAdmin)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateGroupPolicyDecisionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupPolicyDecisionPolicy) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateGroupPolicyDecisionPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupPolicyDecisionPolicy(ctx, req.(*MsgUpdateGroupPolicyDecisionPolicy)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateGroupPolicyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupPolicyMetadata) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateGroupPolicyMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupPolicyMetadata(ctx, req.(*MsgUpdateGroupPolicyMetadata)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/SubmitProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitProposal(ctx, req.(*MsgSubmitProposal)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_WithdrawProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).WithdrawProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/WithdrawProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawProposal(ctx, req.(*MsgWithdrawProposal)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVote) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Vote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/Vote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgExec) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Exec(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/Exec", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Exec(ctx, req.(*MsgExec)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_LeaveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgLeaveGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).LeaveGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.group.v1.Msg/LeaveGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).LeaveGroup(ctx, req.(*MsgLeaveGroup)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.group.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateGroup", - Handler: _Msg_CreateGroup_Handler, - }, - { - MethodName: "UpdateGroupMembers", - Handler: _Msg_UpdateGroupMembers_Handler, - }, - { - MethodName: "UpdateGroupAdmin", - Handler: _Msg_UpdateGroupAdmin_Handler, - }, - { - MethodName: "UpdateGroupMetadata", - Handler: _Msg_UpdateGroupMetadata_Handler, - }, - { - MethodName: "CreateGroupPolicy", - Handler: _Msg_CreateGroupPolicy_Handler, - }, - { - MethodName: "CreateGroupWithPolicy", - Handler: _Msg_CreateGroupWithPolicy_Handler, - }, - { - MethodName: "UpdateGroupPolicyAdmin", - Handler: _Msg_UpdateGroupPolicyAdmin_Handler, - }, - { - MethodName: "UpdateGroupPolicyDecisionPolicy", - Handler: _Msg_UpdateGroupPolicyDecisionPolicy_Handler, - }, - { - MethodName: "UpdateGroupPolicyMetadata", - Handler: _Msg_UpdateGroupPolicyMetadata_Handler, - }, - { - MethodName: "SubmitProposal", - Handler: _Msg_SubmitProposal_Handler, - }, - { - MethodName: "WithdrawProposal", - Handler: _Msg_WithdrawProposal_Handler, - }, - { - MethodName: "Vote", - Handler: _Msg_Vote_Handler, - }, - { - MethodName: "Exec", - Handler: _Msg_Exec_Handler, - }, - { - MethodName: "LeaveGroup", - Handler: _Msg_LeaveGroup_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/group/v1/tx.proto", -} diff --git a/api/cosmos/group/v1/types.pulsar.go b/api/cosmos/group/v1/types.pulsar.go deleted file mode 100644 index e392f942395c..000000000000 --- a/api/cosmos/group/v1/types.pulsar.go +++ /dev/null @@ -1,8672 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package groupv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Member protoreflect.MessageDescriptor - fd_Member_address protoreflect.FieldDescriptor - fd_Member_weight protoreflect.FieldDescriptor - fd_Member_metadata protoreflect.FieldDescriptor - fd_Member_added_at protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_Member = File_cosmos_group_v1_types_proto.Messages().ByName("Member") - fd_Member_address = md_Member.Fields().ByName("address") - fd_Member_weight = md_Member.Fields().ByName("weight") - fd_Member_metadata = md_Member.Fields().ByName("metadata") - fd_Member_added_at = md_Member.Fields().ByName("added_at") -} - -var _ protoreflect.Message = (*fastReflection_Member)(nil) - -type fastReflection_Member Member - -func (x *Member) ProtoReflect() protoreflect.Message { - return (*fastReflection_Member)(x) -} - -func (x *Member) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Member_messageType fastReflection_Member_messageType -var _ protoreflect.MessageType = fastReflection_Member_messageType{} - -type fastReflection_Member_messageType struct{} - -func (x fastReflection_Member_messageType) Zero() protoreflect.Message { - return (*fastReflection_Member)(nil) -} -func (x fastReflection_Member_messageType) New() protoreflect.Message { - return new(fastReflection_Member) -} -func (x fastReflection_Member_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Member -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Member) Descriptor() protoreflect.MessageDescriptor { - return md_Member -} - -// 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_Member) Type() protoreflect.MessageType { - return _fastReflection_Member_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Member) New() protoreflect.Message { - return new(fastReflection_Member) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Member) Interface() protoreflect.ProtoMessage { - return (*Member)(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_Member) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Member_address, value) { - return - } - } - if x.Weight != "" { - value := protoreflect.ValueOfString(x.Weight) - if !f(fd_Member_weight, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_Member_metadata, value) { - return - } - } - if x.AddedAt != nil { - value := protoreflect.ValueOfMessage(x.AddedAt.ProtoReflect()) - if !f(fd_Member_added_at, 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_Member) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.Member.address": - return x.Address != "" - case "cosmos.group.v1.Member.weight": - return x.Weight != "" - case "cosmos.group.v1.Member.metadata": - return x.Metadata != "" - case "cosmos.group.v1.Member.added_at": - return x.AddedAt != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Member")) - } - panic(fmt.Errorf("message cosmos.group.v1.Member 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_Member) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.Member.address": - x.Address = "" - case "cosmos.group.v1.Member.weight": - x.Weight = "" - case "cosmos.group.v1.Member.metadata": - x.Metadata = "" - case "cosmos.group.v1.Member.added_at": - x.AddedAt = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Member")) - } - panic(fmt.Errorf("message cosmos.group.v1.Member 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_Member) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.Member.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Member.weight": - value := x.Weight - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Member.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Member.added_at": - value := x.AddedAt - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Member")) - } - panic(fmt.Errorf("message cosmos.group.v1.Member 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_Member) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.Member.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.Member.weight": - x.Weight = value.Interface().(string) - case "cosmos.group.v1.Member.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.Member.added_at": - x.AddedAt = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Member")) - } - panic(fmt.Errorf("message cosmos.group.v1.Member 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_Member) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Member.added_at": - if x.AddedAt == nil { - x.AddedAt = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.AddedAt.ProtoReflect()) - case "cosmos.group.v1.Member.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.Member is not mutable")) - case "cosmos.group.v1.Member.weight": - panic(fmt.Errorf("field weight of message cosmos.group.v1.Member is not mutable")) - case "cosmos.group.v1.Member.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.Member is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Member")) - } - panic(fmt.Errorf("message cosmos.group.v1.Member 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_Member) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Member.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Member.weight": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Member.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Member.added_at": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Member")) - } - panic(fmt.Errorf("message cosmos.group.v1.Member 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_Member) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.Member", 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_Member) 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_Member) 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_Member) 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_Member) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Member) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Weight) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AddedAt != nil { - l = options.Size(x.AddedAt) - 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().(*Member) - 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.AddedAt != nil { - encoded, err := options.Marshal(x.AddedAt) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Weight) > 0 { - i -= len(x.Weight) - copy(dAtA[i:], x.Weight) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Weight))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Member) - 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: Member: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Weight", 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.Weight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddedAt", 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.AddedAt == nil { - x.AddedAt = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AddedAt); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Members_1_list)(nil) - -type _Members_1_list struct { - list *[]*Member -} - -func (x *_Members_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Members_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Members_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - (*x.list)[i] = concreteValue -} - -func (x *_Members_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Members_1_list) AppendMutable() protoreflect.Value { - v := new(Member) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Members_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Members_1_list) NewElement() protoreflect.Value { - v := new(Member) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Members_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Members protoreflect.MessageDescriptor - fd_Members_members protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_Members = File_cosmos_group_v1_types_proto.Messages().ByName("Members") - fd_Members_members = md_Members.Fields().ByName("members") -} - -var _ protoreflect.Message = (*fastReflection_Members)(nil) - -type fastReflection_Members Members - -func (x *Members) ProtoReflect() protoreflect.Message { - return (*fastReflection_Members)(x) -} - -func (x *Members) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Members_messageType fastReflection_Members_messageType -var _ protoreflect.MessageType = fastReflection_Members_messageType{} - -type fastReflection_Members_messageType struct{} - -func (x fastReflection_Members_messageType) Zero() protoreflect.Message { - return (*fastReflection_Members)(nil) -} -func (x fastReflection_Members_messageType) New() protoreflect.Message { - return new(fastReflection_Members) -} -func (x fastReflection_Members_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Members -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Members) Descriptor() protoreflect.MessageDescriptor { - return md_Members -} - -// 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_Members) Type() protoreflect.MessageType { - return _fastReflection_Members_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Members) New() protoreflect.Message { - return new(fastReflection_Members) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Members) Interface() protoreflect.ProtoMessage { - return (*Members)(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_Members) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Members) != 0 { - value := protoreflect.ValueOfList(&_Members_1_list{list: &x.Members}) - if !f(fd_Members_members, 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_Members) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.Members.members": - return len(x.Members) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Members")) - } - panic(fmt.Errorf("message cosmos.group.v1.Members 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_Members) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.Members.members": - x.Members = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Members")) - } - panic(fmt.Errorf("message cosmos.group.v1.Members 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_Members) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.Members.members": - if len(x.Members) == 0 { - return protoreflect.ValueOfList(&_Members_1_list{}) - } - listValue := &_Members_1_list{list: &x.Members} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Members")) - } - panic(fmt.Errorf("message cosmos.group.v1.Members 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_Members) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.Members.members": - lv := value.List() - clv := lv.(*_Members_1_list) - x.Members = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Members")) - } - panic(fmt.Errorf("message cosmos.group.v1.Members 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_Members) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Members.members": - if x.Members == nil { - x.Members = []*Member{} - } - value := &_Members_1_list{list: &x.Members} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Members")) - } - panic(fmt.Errorf("message cosmos.group.v1.Members 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_Members) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Members.members": - list := []*Member{} - return protoreflect.ValueOfList(&_Members_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Members")) - } - panic(fmt.Errorf("message cosmos.group.v1.Members 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_Members) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.Members", 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_Members) 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_Members) 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_Members) 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_Members) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Members) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Members) > 0 { - for _, e := range x.Members { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Members) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Members) > 0 { - for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Members[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Members) - 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: Members: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Members: 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 Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Members = append(x.Members, &Member{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ThresholdDecisionPolicy protoreflect.MessageDescriptor - fd_ThresholdDecisionPolicy_threshold protoreflect.FieldDescriptor - fd_ThresholdDecisionPolicy_windows protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_ThresholdDecisionPolicy = File_cosmos_group_v1_types_proto.Messages().ByName("ThresholdDecisionPolicy") - fd_ThresholdDecisionPolicy_threshold = md_ThresholdDecisionPolicy.Fields().ByName("threshold") - fd_ThresholdDecisionPolicy_windows = md_ThresholdDecisionPolicy.Fields().ByName("windows") -} - -var _ protoreflect.Message = (*fastReflection_ThresholdDecisionPolicy)(nil) - -type fastReflection_ThresholdDecisionPolicy ThresholdDecisionPolicy - -func (x *ThresholdDecisionPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_ThresholdDecisionPolicy)(x) -} - -func (x *ThresholdDecisionPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ThresholdDecisionPolicy_messageType fastReflection_ThresholdDecisionPolicy_messageType -var _ protoreflect.MessageType = fastReflection_ThresholdDecisionPolicy_messageType{} - -type fastReflection_ThresholdDecisionPolicy_messageType struct{} - -func (x fastReflection_ThresholdDecisionPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_ThresholdDecisionPolicy)(nil) -} -func (x fastReflection_ThresholdDecisionPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_ThresholdDecisionPolicy) -} -func (x fastReflection_ThresholdDecisionPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ThresholdDecisionPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ThresholdDecisionPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_ThresholdDecisionPolicy -} - -// 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_ThresholdDecisionPolicy) Type() protoreflect.MessageType { - return _fastReflection_ThresholdDecisionPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ThresholdDecisionPolicy) New() protoreflect.Message { - return new(fastReflection_ThresholdDecisionPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ThresholdDecisionPolicy) Interface() protoreflect.ProtoMessage { - return (*ThresholdDecisionPolicy)(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_ThresholdDecisionPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Threshold != "" { - value := protoreflect.ValueOfString(x.Threshold) - if !f(fd_ThresholdDecisionPolicy_threshold, value) { - return - } - } - if x.Windows != nil { - value := protoreflect.ValueOfMessage(x.Windows.ProtoReflect()) - if !f(fd_ThresholdDecisionPolicy_windows, 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_ThresholdDecisionPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.ThresholdDecisionPolicy.threshold": - return x.Threshold != "" - case "cosmos.group.v1.ThresholdDecisionPolicy.windows": - return x.Windows != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.ThresholdDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.ThresholdDecisionPolicy 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_ThresholdDecisionPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.ThresholdDecisionPolicy.threshold": - x.Threshold = "" - case "cosmos.group.v1.ThresholdDecisionPolicy.windows": - x.Windows = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.ThresholdDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.ThresholdDecisionPolicy 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_ThresholdDecisionPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.ThresholdDecisionPolicy.threshold": - value := x.Threshold - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.ThresholdDecisionPolicy.windows": - value := x.Windows - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.ThresholdDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.ThresholdDecisionPolicy 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_ThresholdDecisionPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.ThresholdDecisionPolicy.threshold": - x.Threshold = value.Interface().(string) - case "cosmos.group.v1.ThresholdDecisionPolicy.windows": - x.Windows = value.Message().Interface().(*DecisionPolicyWindows) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.ThresholdDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.ThresholdDecisionPolicy 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_ThresholdDecisionPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.ThresholdDecisionPolicy.windows": - if x.Windows == nil { - x.Windows = new(DecisionPolicyWindows) - } - return protoreflect.ValueOfMessage(x.Windows.ProtoReflect()) - case "cosmos.group.v1.ThresholdDecisionPolicy.threshold": - panic(fmt.Errorf("field threshold of message cosmos.group.v1.ThresholdDecisionPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.ThresholdDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.ThresholdDecisionPolicy 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_ThresholdDecisionPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.ThresholdDecisionPolicy.threshold": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.ThresholdDecisionPolicy.windows": - m := new(DecisionPolicyWindows) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.ThresholdDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.ThresholdDecisionPolicy 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_ThresholdDecisionPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.ThresholdDecisionPolicy", 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_ThresholdDecisionPolicy) 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_ThresholdDecisionPolicy) 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_ThresholdDecisionPolicy) 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_ThresholdDecisionPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ThresholdDecisionPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Threshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Windows != nil { - l = options.Size(x.Windows) - 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().(*ThresholdDecisionPolicy) - 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.Windows != nil { - encoded, err := options.Marshal(x.Windows) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Threshold) > 0 { - i -= len(x.Threshold) - copy(dAtA[i:], x.Threshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Threshold))) - i-- - dAtA[i] = 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().(*ThresholdDecisionPolicy) - 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: ThresholdDecisionPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ThresholdDecisionPolicy: 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 Threshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Threshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Windows", 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.Windows == nil { - x.Windows = &DecisionPolicyWindows{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Windows); 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_PercentageDecisionPolicy protoreflect.MessageDescriptor - fd_PercentageDecisionPolicy_percentage protoreflect.FieldDescriptor - fd_PercentageDecisionPolicy_windows protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_PercentageDecisionPolicy = File_cosmos_group_v1_types_proto.Messages().ByName("PercentageDecisionPolicy") - fd_PercentageDecisionPolicy_percentage = md_PercentageDecisionPolicy.Fields().ByName("percentage") - fd_PercentageDecisionPolicy_windows = md_PercentageDecisionPolicy.Fields().ByName("windows") -} - -var _ protoreflect.Message = (*fastReflection_PercentageDecisionPolicy)(nil) - -type fastReflection_PercentageDecisionPolicy PercentageDecisionPolicy - -func (x *PercentageDecisionPolicy) ProtoReflect() protoreflect.Message { - return (*fastReflection_PercentageDecisionPolicy)(x) -} - -func (x *PercentageDecisionPolicy) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PercentageDecisionPolicy_messageType fastReflection_PercentageDecisionPolicy_messageType -var _ protoreflect.MessageType = fastReflection_PercentageDecisionPolicy_messageType{} - -type fastReflection_PercentageDecisionPolicy_messageType struct{} - -func (x fastReflection_PercentageDecisionPolicy_messageType) Zero() protoreflect.Message { - return (*fastReflection_PercentageDecisionPolicy)(nil) -} -func (x fastReflection_PercentageDecisionPolicy_messageType) New() protoreflect.Message { - return new(fastReflection_PercentageDecisionPolicy) -} -func (x fastReflection_PercentageDecisionPolicy_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PercentageDecisionPolicy -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PercentageDecisionPolicy) Descriptor() protoreflect.MessageDescriptor { - return md_PercentageDecisionPolicy -} - -// 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_PercentageDecisionPolicy) Type() protoreflect.MessageType { - return _fastReflection_PercentageDecisionPolicy_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PercentageDecisionPolicy) New() protoreflect.Message { - return new(fastReflection_PercentageDecisionPolicy) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PercentageDecisionPolicy) Interface() protoreflect.ProtoMessage { - return (*PercentageDecisionPolicy)(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_PercentageDecisionPolicy) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Percentage != "" { - value := protoreflect.ValueOfString(x.Percentage) - if !f(fd_PercentageDecisionPolicy_percentage, value) { - return - } - } - if x.Windows != nil { - value := protoreflect.ValueOfMessage(x.Windows.ProtoReflect()) - if !f(fd_PercentageDecisionPolicy_windows, 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_PercentageDecisionPolicy) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.PercentageDecisionPolicy.percentage": - return x.Percentage != "" - case "cosmos.group.v1.PercentageDecisionPolicy.windows": - return x.Windows != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.PercentageDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.PercentageDecisionPolicy 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_PercentageDecisionPolicy) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.PercentageDecisionPolicy.percentage": - x.Percentage = "" - case "cosmos.group.v1.PercentageDecisionPolicy.windows": - x.Windows = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.PercentageDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.PercentageDecisionPolicy 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_PercentageDecisionPolicy) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.PercentageDecisionPolicy.percentage": - value := x.Percentage - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.PercentageDecisionPolicy.windows": - value := x.Windows - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.PercentageDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.PercentageDecisionPolicy 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_PercentageDecisionPolicy) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.PercentageDecisionPolicy.percentage": - x.Percentage = value.Interface().(string) - case "cosmos.group.v1.PercentageDecisionPolicy.windows": - x.Windows = value.Message().Interface().(*DecisionPolicyWindows) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.PercentageDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.PercentageDecisionPolicy 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_PercentageDecisionPolicy) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.PercentageDecisionPolicy.windows": - if x.Windows == nil { - x.Windows = new(DecisionPolicyWindows) - } - return protoreflect.ValueOfMessage(x.Windows.ProtoReflect()) - case "cosmos.group.v1.PercentageDecisionPolicy.percentage": - panic(fmt.Errorf("field percentage of message cosmos.group.v1.PercentageDecisionPolicy is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.PercentageDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.PercentageDecisionPolicy 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_PercentageDecisionPolicy) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.PercentageDecisionPolicy.percentage": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.PercentageDecisionPolicy.windows": - m := new(DecisionPolicyWindows) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.PercentageDecisionPolicy")) - } - panic(fmt.Errorf("message cosmos.group.v1.PercentageDecisionPolicy 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_PercentageDecisionPolicy) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.PercentageDecisionPolicy", 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_PercentageDecisionPolicy) 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_PercentageDecisionPolicy) 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_PercentageDecisionPolicy) 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_PercentageDecisionPolicy) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PercentageDecisionPolicy) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Percentage) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Windows != nil { - l = options.Size(x.Windows) - 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().(*PercentageDecisionPolicy) - 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.Windows != nil { - encoded, err := options.Marshal(x.Windows) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Percentage) > 0 { - i -= len(x.Percentage) - copy(dAtA[i:], x.Percentage) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Percentage))) - 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().(*PercentageDecisionPolicy) - 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: PercentageDecisionPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PercentageDecisionPolicy: 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 Percentage", 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.Percentage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Windows", 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.Windows == nil { - x.Windows = &DecisionPolicyWindows{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Windows); 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_DecisionPolicyWindows protoreflect.MessageDescriptor - fd_DecisionPolicyWindows_voting_period protoreflect.FieldDescriptor - fd_DecisionPolicyWindows_min_execution_period protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_DecisionPolicyWindows = File_cosmos_group_v1_types_proto.Messages().ByName("DecisionPolicyWindows") - fd_DecisionPolicyWindows_voting_period = md_DecisionPolicyWindows.Fields().ByName("voting_period") - fd_DecisionPolicyWindows_min_execution_period = md_DecisionPolicyWindows.Fields().ByName("min_execution_period") -} - -var _ protoreflect.Message = (*fastReflection_DecisionPolicyWindows)(nil) - -type fastReflection_DecisionPolicyWindows DecisionPolicyWindows - -func (x *DecisionPolicyWindows) ProtoReflect() protoreflect.Message { - return (*fastReflection_DecisionPolicyWindows)(x) -} - -func (x *DecisionPolicyWindows) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DecisionPolicyWindows_messageType fastReflection_DecisionPolicyWindows_messageType -var _ protoreflect.MessageType = fastReflection_DecisionPolicyWindows_messageType{} - -type fastReflection_DecisionPolicyWindows_messageType struct{} - -func (x fastReflection_DecisionPolicyWindows_messageType) Zero() protoreflect.Message { - return (*fastReflection_DecisionPolicyWindows)(nil) -} -func (x fastReflection_DecisionPolicyWindows_messageType) New() protoreflect.Message { - return new(fastReflection_DecisionPolicyWindows) -} -func (x fastReflection_DecisionPolicyWindows_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DecisionPolicyWindows -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DecisionPolicyWindows) Descriptor() protoreflect.MessageDescriptor { - return md_DecisionPolicyWindows -} - -// 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_DecisionPolicyWindows) Type() protoreflect.MessageType { - return _fastReflection_DecisionPolicyWindows_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DecisionPolicyWindows) New() protoreflect.Message { - return new(fastReflection_DecisionPolicyWindows) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DecisionPolicyWindows) Interface() protoreflect.ProtoMessage { - return (*DecisionPolicyWindows)(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_DecisionPolicyWindows) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.VotingPeriod != nil { - value := protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) - if !f(fd_DecisionPolicyWindows_voting_period, value) { - return - } - } - if x.MinExecutionPeriod != nil { - value := protoreflect.ValueOfMessage(x.MinExecutionPeriod.ProtoReflect()) - if !f(fd_DecisionPolicyWindows_min_execution_period, 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_DecisionPolicyWindows) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.DecisionPolicyWindows.voting_period": - return x.VotingPeriod != nil - case "cosmos.group.v1.DecisionPolicyWindows.min_execution_period": - return x.MinExecutionPeriod != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.DecisionPolicyWindows")) - } - panic(fmt.Errorf("message cosmos.group.v1.DecisionPolicyWindows 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_DecisionPolicyWindows) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.DecisionPolicyWindows.voting_period": - x.VotingPeriod = nil - case "cosmos.group.v1.DecisionPolicyWindows.min_execution_period": - x.MinExecutionPeriod = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.DecisionPolicyWindows")) - } - panic(fmt.Errorf("message cosmos.group.v1.DecisionPolicyWindows 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_DecisionPolicyWindows) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.DecisionPolicyWindows.voting_period": - value := x.VotingPeriod - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.group.v1.DecisionPolicyWindows.min_execution_period": - value := x.MinExecutionPeriod - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.DecisionPolicyWindows")) - } - panic(fmt.Errorf("message cosmos.group.v1.DecisionPolicyWindows 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_DecisionPolicyWindows) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.DecisionPolicyWindows.voting_period": - x.VotingPeriod = value.Message().Interface().(*durationpb.Duration) - case "cosmos.group.v1.DecisionPolicyWindows.min_execution_period": - x.MinExecutionPeriod = value.Message().Interface().(*durationpb.Duration) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.DecisionPolicyWindows")) - } - panic(fmt.Errorf("message cosmos.group.v1.DecisionPolicyWindows 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_DecisionPolicyWindows) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.DecisionPolicyWindows.voting_period": - if x.VotingPeriod == nil { - x.VotingPeriod = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) - case "cosmos.group.v1.DecisionPolicyWindows.min_execution_period": - if x.MinExecutionPeriod == nil { - x.MinExecutionPeriod = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.MinExecutionPeriod.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.DecisionPolicyWindows")) - } - panic(fmt.Errorf("message cosmos.group.v1.DecisionPolicyWindows 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_DecisionPolicyWindows) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.DecisionPolicyWindows.voting_period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.group.v1.DecisionPolicyWindows.min_execution_period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.DecisionPolicyWindows")) - } - panic(fmt.Errorf("message cosmos.group.v1.DecisionPolicyWindows 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_DecisionPolicyWindows) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.DecisionPolicyWindows", 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_DecisionPolicyWindows) 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_DecisionPolicyWindows) 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_DecisionPolicyWindows) 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_DecisionPolicyWindows) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DecisionPolicyWindows) - 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.VotingPeriod != nil { - l = options.Size(x.VotingPeriod) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MinExecutionPeriod != nil { - l = options.Size(x.MinExecutionPeriod) - 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().(*DecisionPolicyWindows) - 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.MinExecutionPeriod != nil { - encoded, err := options.Marshal(x.MinExecutionPeriod) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.VotingPeriod != nil { - encoded, err := options.Marshal(x.VotingPeriod) - 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().(*DecisionPolicyWindows) - 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: DecisionPolicyWindows: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DecisionPolicyWindows: 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 VotingPeriod", 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.VotingPeriod == nil { - x.VotingPeriod = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingPeriod); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinExecutionPeriod", 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.MinExecutionPeriod == nil { - x.MinExecutionPeriod = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinExecutionPeriod); 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_GroupInfo protoreflect.MessageDescriptor - fd_GroupInfo_id protoreflect.FieldDescriptor - fd_GroupInfo_admin protoreflect.FieldDescriptor - fd_GroupInfo_metadata protoreflect.FieldDescriptor - fd_GroupInfo_version protoreflect.FieldDescriptor - fd_GroupInfo_total_weight protoreflect.FieldDescriptor - fd_GroupInfo_created_at protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_GroupInfo = File_cosmos_group_v1_types_proto.Messages().ByName("GroupInfo") - fd_GroupInfo_id = md_GroupInfo.Fields().ByName("id") - fd_GroupInfo_admin = md_GroupInfo.Fields().ByName("admin") - fd_GroupInfo_metadata = md_GroupInfo.Fields().ByName("metadata") - fd_GroupInfo_version = md_GroupInfo.Fields().ByName("version") - fd_GroupInfo_total_weight = md_GroupInfo.Fields().ByName("total_weight") - fd_GroupInfo_created_at = md_GroupInfo.Fields().ByName("created_at") -} - -var _ protoreflect.Message = (*fastReflection_GroupInfo)(nil) - -type fastReflection_GroupInfo GroupInfo - -func (x *GroupInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_GroupInfo)(x) -} - -func (x *GroupInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_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_GroupInfo_messageType fastReflection_GroupInfo_messageType -var _ protoreflect.MessageType = fastReflection_GroupInfo_messageType{} - -type fastReflection_GroupInfo_messageType struct{} - -func (x fastReflection_GroupInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_GroupInfo)(nil) -} -func (x fastReflection_GroupInfo_messageType) New() protoreflect.Message { - return new(fastReflection_GroupInfo) -} -func (x fastReflection_GroupInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GroupInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GroupInfo) Descriptor() protoreflect.MessageDescriptor { - return md_GroupInfo -} - -// 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_GroupInfo) Type() protoreflect.MessageType { - return _fastReflection_GroupInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GroupInfo) New() protoreflect.Message { - return new(fastReflection_GroupInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GroupInfo) Interface() protoreflect.ProtoMessage { - return (*GroupInfo)(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_GroupInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_GroupInfo_id, value) { - return - } - } - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_GroupInfo_admin, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_GroupInfo_metadata, value) { - return - } - } - if x.Version != uint64(0) { - value := protoreflect.ValueOfUint64(x.Version) - if !f(fd_GroupInfo_version, value) { - return - } - } - if x.TotalWeight != "" { - value := protoreflect.ValueOfString(x.TotalWeight) - if !f(fd_GroupInfo_total_weight, value) { - return - } - } - if x.CreatedAt != nil { - value := protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) - if !f(fd_GroupInfo_created_at, 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_GroupInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.GroupInfo.id": - return x.Id != uint64(0) - case "cosmos.group.v1.GroupInfo.admin": - return x.Admin != "" - case "cosmos.group.v1.GroupInfo.metadata": - return x.Metadata != "" - case "cosmos.group.v1.GroupInfo.version": - return x.Version != uint64(0) - case "cosmos.group.v1.GroupInfo.total_weight": - return x.TotalWeight != "" - case "cosmos.group.v1.GroupInfo.created_at": - return x.CreatedAt != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupInfo 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_GroupInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.GroupInfo.id": - x.Id = uint64(0) - case "cosmos.group.v1.GroupInfo.admin": - x.Admin = "" - case "cosmos.group.v1.GroupInfo.metadata": - x.Metadata = "" - case "cosmos.group.v1.GroupInfo.version": - x.Version = uint64(0) - case "cosmos.group.v1.GroupInfo.total_weight": - x.TotalWeight = "" - case "cosmos.group.v1.GroupInfo.created_at": - x.CreatedAt = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupInfo 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_GroupInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.GroupInfo.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GroupInfo.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.GroupInfo.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.GroupInfo.version": - value := x.Version - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GroupInfo.total_weight": - value := x.TotalWeight - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.GroupInfo.created_at": - value := x.CreatedAt - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupInfo 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_GroupInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.GroupInfo.id": - x.Id = value.Uint() - case "cosmos.group.v1.GroupInfo.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.GroupInfo.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.GroupInfo.version": - x.Version = value.Uint() - case "cosmos.group.v1.GroupInfo.total_weight": - x.TotalWeight = value.Interface().(string) - case "cosmos.group.v1.GroupInfo.created_at": - x.CreatedAt = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupInfo 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_GroupInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GroupInfo.created_at": - if x.CreatedAt == nil { - x.CreatedAt = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) - case "cosmos.group.v1.GroupInfo.id": - panic(fmt.Errorf("field id of message cosmos.group.v1.GroupInfo is not mutable")) - case "cosmos.group.v1.GroupInfo.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.GroupInfo is not mutable")) - case "cosmos.group.v1.GroupInfo.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.GroupInfo is not mutable")) - case "cosmos.group.v1.GroupInfo.version": - panic(fmt.Errorf("field version of message cosmos.group.v1.GroupInfo is not mutable")) - case "cosmos.group.v1.GroupInfo.total_weight": - panic(fmt.Errorf("field total_weight of message cosmos.group.v1.GroupInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupInfo 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_GroupInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GroupInfo.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GroupInfo.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.GroupInfo.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.GroupInfo.version": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GroupInfo.total_weight": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.GroupInfo.created_at": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupInfo 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_GroupInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.GroupInfo", 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_GroupInfo) 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_GroupInfo) 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_GroupInfo) 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_GroupInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GroupInfo) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - l = len(x.TotalWeight) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CreatedAt != nil { - l = options.Size(x.CreatedAt) - 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().(*GroupInfo) - 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.CreatedAt != nil { - encoded, err := options.Marshal(x.CreatedAt) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if len(x.TotalWeight) > 0 { - i -= len(x.TotalWeight) - copy(dAtA[i:], x.TotalWeight) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TotalWeight))) - i-- - dAtA[i] = 0x2a - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x20 - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GroupInfo) - 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: GroupInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GroupInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", 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.TotalWeight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", 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.CreatedAt == nil { - x.CreatedAt = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreatedAt); 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_GroupMember protoreflect.MessageDescriptor - fd_GroupMember_group_id protoreflect.FieldDescriptor - fd_GroupMember_member protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_GroupMember = File_cosmos_group_v1_types_proto.Messages().ByName("GroupMember") - fd_GroupMember_group_id = md_GroupMember.Fields().ByName("group_id") - fd_GroupMember_member = md_GroupMember.Fields().ByName("member") -} - -var _ protoreflect.Message = (*fastReflection_GroupMember)(nil) - -type fastReflection_GroupMember GroupMember - -func (x *GroupMember) ProtoReflect() protoreflect.Message { - return (*fastReflection_GroupMember)(x) -} - -func (x *GroupMember) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_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_GroupMember_messageType fastReflection_GroupMember_messageType -var _ protoreflect.MessageType = fastReflection_GroupMember_messageType{} - -type fastReflection_GroupMember_messageType struct{} - -func (x fastReflection_GroupMember_messageType) Zero() protoreflect.Message { - return (*fastReflection_GroupMember)(nil) -} -func (x fastReflection_GroupMember_messageType) New() protoreflect.Message { - return new(fastReflection_GroupMember) -} -func (x fastReflection_GroupMember_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GroupMember -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GroupMember) Descriptor() protoreflect.MessageDescriptor { - return md_GroupMember -} - -// 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_GroupMember) Type() protoreflect.MessageType { - return _fastReflection_GroupMember_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GroupMember) New() protoreflect.Message { - return new(fastReflection_GroupMember) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GroupMember) Interface() protoreflect.ProtoMessage { - return (*GroupMember)(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_GroupMember) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_GroupMember_group_id, value) { - return - } - } - if x.Member != nil { - value := protoreflect.ValueOfMessage(x.Member.ProtoReflect()) - if !f(fd_GroupMember_member, 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_GroupMember) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.GroupMember.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.GroupMember.member": - return x.Member != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupMember")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupMember 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_GroupMember) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.GroupMember.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.GroupMember.member": - x.Member = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupMember")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupMember 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_GroupMember) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.GroupMember.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GroupMember.member": - value := x.Member - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupMember")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupMember 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_GroupMember) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.GroupMember.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.GroupMember.member": - x.Member = value.Message().Interface().(*Member) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupMember")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupMember 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_GroupMember) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GroupMember.member": - if x.Member == nil { - x.Member = new(Member) - } - return protoreflect.ValueOfMessage(x.Member.ProtoReflect()) - case "cosmos.group.v1.GroupMember.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.GroupMember is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupMember")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupMember 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_GroupMember) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GroupMember.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GroupMember.member": - m := new(Member) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupMember")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupMember 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_GroupMember) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.GroupMember", 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_GroupMember) 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_GroupMember) 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_GroupMember) 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_GroupMember) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GroupMember) - 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.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if x.Member != nil { - l = options.Size(x.Member) - 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().(*GroupMember) - 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.Member != nil { - encoded, err := options.Marshal(x.Member) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GroupMember) - 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: GroupMember: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GroupMember: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Member", 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.Member == nil { - x.Member = &Member{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Member); 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_GroupPolicyInfo protoreflect.MessageDescriptor - fd_GroupPolicyInfo_address protoreflect.FieldDescriptor - fd_GroupPolicyInfo_group_id protoreflect.FieldDescriptor - fd_GroupPolicyInfo_admin protoreflect.FieldDescriptor - fd_GroupPolicyInfo_metadata protoreflect.FieldDescriptor - fd_GroupPolicyInfo_version protoreflect.FieldDescriptor - fd_GroupPolicyInfo_decision_policy protoreflect.FieldDescriptor - fd_GroupPolicyInfo_created_at protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_GroupPolicyInfo = File_cosmos_group_v1_types_proto.Messages().ByName("GroupPolicyInfo") - fd_GroupPolicyInfo_address = md_GroupPolicyInfo.Fields().ByName("address") - fd_GroupPolicyInfo_group_id = md_GroupPolicyInfo.Fields().ByName("group_id") - fd_GroupPolicyInfo_admin = md_GroupPolicyInfo.Fields().ByName("admin") - fd_GroupPolicyInfo_metadata = md_GroupPolicyInfo.Fields().ByName("metadata") - fd_GroupPolicyInfo_version = md_GroupPolicyInfo.Fields().ByName("version") - fd_GroupPolicyInfo_decision_policy = md_GroupPolicyInfo.Fields().ByName("decision_policy") - fd_GroupPolicyInfo_created_at = md_GroupPolicyInfo.Fields().ByName("created_at") -} - -var _ protoreflect.Message = (*fastReflection_GroupPolicyInfo)(nil) - -type fastReflection_GroupPolicyInfo GroupPolicyInfo - -func (x *GroupPolicyInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_GroupPolicyInfo)(x) -} - -func (x *GroupPolicyInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GroupPolicyInfo_messageType fastReflection_GroupPolicyInfo_messageType -var _ protoreflect.MessageType = fastReflection_GroupPolicyInfo_messageType{} - -type fastReflection_GroupPolicyInfo_messageType struct{} - -func (x fastReflection_GroupPolicyInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_GroupPolicyInfo)(nil) -} -func (x fastReflection_GroupPolicyInfo_messageType) New() protoreflect.Message { - return new(fastReflection_GroupPolicyInfo) -} -func (x fastReflection_GroupPolicyInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GroupPolicyInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GroupPolicyInfo) Descriptor() protoreflect.MessageDescriptor { - return md_GroupPolicyInfo -} - -// 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_GroupPolicyInfo) Type() protoreflect.MessageType { - return _fastReflection_GroupPolicyInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GroupPolicyInfo) New() protoreflect.Message { - return new(fastReflection_GroupPolicyInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GroupPolicyInfo) Interface() protoreflect.ProtoMessage { - return (*GroupPolicyInfo)(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_GroupPolicyInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_GroupPolicyInfo_address, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_GroupPolicyInfo_group_id, value) { - return - } - } - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_GroupPolicyInfo_admin, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_GroupPolicyInfo_metadata, value) { - return - } - } - if x.Version != uint64(0) { - value := protoreflect.ValueOfUint64(x.Version) - if !f(fd_GroupPolicyInfo_version, value) { - return - } - } - if x.DecisionPolicy != nil { - value := protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - if !f(fd_GroupPolicyInfo_decision_policy, value) { - return - } - } - if x.CreatedAt != nil { - value := protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) - if !f(fd_GroupPolicyInfo_created_at, 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_GroupPolicyInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.GroupPolicyInfo.address": - return x.Address != "" - case "cosmos.group.v1.GroupPolicyInfo.group_id": - return x.GroupId != uint64(0) - case "cosmos.group.v1.GroupPolicyInfo.admin": - return x.Admin != "" - case "cosmos.group.v1.GroupPolicyInfo.metadata": - return x.Metadata != "" - case "cosmos.group.v1.GroupPolicyInfo.version": - return x.Version != uint64(0) - case "cosmos.group.v1.GroupPolicyInfo.decision_policy": - return x.DecisionPolicy != nil - case "cosmos.group.v1.GroupPolicyInfo.created_at": - return x.CreatedAt != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupPolicyInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupPolicyInfo 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_GroupPolicyInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.GroupPolicyInfo.address": - x.Address = "" - case "cosmos.group.v1.GroupPolicyInfo.group_id": - x.GroupId = uint64(0) - case "cosmos.group.v1.GroupPolicyInfo.admin": - x.Admin = "" - case "cosmos.group.v1.GroupPolicyInfo.metadata": - x.Metadata = "" - case "cosmos.group.v1.GroupPolicyInfo.version": - x.Version = uint64(0) - case "cosmos.group.v1.GroupPolicyInfo.decision_policy": - x.DecisionPolicy = nil - case "cosmos.group.v1.GroupPolicyInfo.created_at": - x.CreatedAt = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupPolicyInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupPolicyInfo 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_GroupPolicyInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.GroupPolicyInfo.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.GroupPolicyInfo.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GroupPolicyInfo.admin": - value := x.Admin - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.GroupPolicyInfo.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.GroupPolicyInfo.version": - value := x.Version - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.GroupPolicyInfo.decision_policy": - value := x.DecisionPolicy - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.group.v1.GroupPolicyInfo.created_at": - value := x.CreatedAt - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupPolicyInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupPolicyInfo 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_GroupPolicyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.GroupPolicyInfo.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.GroupPolicyInfo.group_id": - x.GroupId = value.Uint() - case "cosmos.group.v1.GroupPolicyInfo.admin": - x.Admin = value.Interface().(string) - case "cosmos.group.v1.GroupPolicyInfo.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.GroupPolicyInfo.version": - x.Version = value.Uint() - case "cosmos.group.v1.GroupPolicyInfo.decision_policy": - x.DecisionPolicy = value.Message().Interface().(*anypb.Any) - case "cosmos.group.v1.GroupPolicyInfo.created_at": - x.CreatedAt = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupPolicyInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupPolicyInfo 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_GroupPolicyInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GroupPolicyInfo.decision_policy": - if x.DecisionPolicy == nil { - x.DecisionPolicy = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.DecisionPolicy.ProtoReflect()) - case "cosmos.group.v1.GroupPolicyInfo.created_at": - if x.CreatedAt == nil { - x.CreatedAt = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CreatedAt.ProtoReflect()) - case "cosmos.group.v1.GroupPolicyInfo.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.GroupPolicyInfo is not mutable")) - case "cosmos.group.v1.GroupPolicyInfo.group_id": - panic(fmt.Errorf("field group_id of message cosmos.group.v1.GroupPolicyInfo is not mutable")) - case "cosmos.group.v1.GroupPolicyInfo.admin": - panic(fmt.Errorf("field admin of message cosmos.group.v1.GroupPolicyInfo is not mutable")) - case "cosmos.group.v1.GroupPolicyInfo.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.GroupPolicyInfo is not mutable")) - case "cosmos.group.v1.GroupPolicyInfo.version": - panic(fmt.Errorf("field version of message cosmos.group.v1.GroupPolicyInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupPolicyInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupPolicyInfo 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_GroupPolicyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.GroupPolicyInfo.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.GroupPolicyInfo.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GroupPolicyInfo.admin": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.GroupPolicyInfo.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.GroupPolicyInfo.version": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.GroupPolicyInfo.decision_policy": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.group.v1.GroupPolicyInfo.created_at": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.GroupPolicyInfo")) - } - panic(fmt.Errorf("message cosmos.group.v1.GroupPolicyInfo 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_GroupPolicyInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.GroupPolicyInfo", 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_GroupPolicyInfo) 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_GroupPolicyInfo) 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_GroupPolicyInfo) 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_GroupPolicyInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GroupPolicyInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - if x.DecisionPolicy != nil { - l = options.Size(x.DecisionPolicy) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CreatedAt != nil { - l = options.Size(x.CreatedAt) - 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().(*GroupPolicyInfo) - 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.CreatedAt != nil { - encoded, err := options.Marshal(x.CreatedAt) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.DecisionPolicy != nil { - encoded, err := options.Marshal(x.DecisionPolicy) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x28 - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - i-- - dAtA[i] = 0x1a - } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GroupPolicyInfo) - 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: GroupPolicyInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GroupPolicyInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", 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.DecisionPolicy == nil { - x.DecisionPolicy = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DecisionPolicy); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", 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.CreatedAt == nil { - x.CreatedAt = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreatedAt); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Proposal_4_list)(nil) - -type _Proposal_4_list struct { - list *[]string -} - -func (x *_Proposal_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Proposal_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Proposal_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Proposal_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Proposal_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Proposal at list field Proposers as it is not of Message kind")) -} - -func (x *_Proposal_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Proposal_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Proposal_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Proposal_13_list)(nil) - -type _Proposal_13_list struct { - list *[]*anypb.Any -} - -func (x *_Proposal_13_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Proposal_13_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Proposal_13_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_Proposal_13_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Proposal_13_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_13_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Proposal_13_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Proposal_13_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Proposal protoreflect.MessageDescriptor - fd_Proposal_id protoreflect.FieldDescriptor - fd_Proposal_address protoreflect.FieldDescriptor - fd_Proposal_metadata protoreflect.FieldDescriptor - fd_Proposal_proposers protoreflect.FieldDescriptor - fd_Proposal_submit_time protoreflect.FieldDescriptor - fd_Proposal_group_version protoreflect.FieldDescriptor - fd_Proposal_group_policy_version protoreflect.FieldDescriptor - fd_Proposal_status protoreflect.FieldDescriptor - fd_Proposal_result protoreflect.FieldDescriptor - fd_Proposal_final_tally_result protoreflect.FieldDescriptor - fd_Proposal_voting_period_end protoreflect.FieldDescriptor - fd_Proposal_executor_result protoreflect.FieldDescriptor - fd_Proposal_messages protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_Proposal = File_cosmos_group_v1_types_proto.Messages().ByName("Proposal") - fd_Proposal_id = md_Proposal.Fields().ByName("id") - fd_Proposal_address = md_Proposal.Fields().ByName("address") - fd_Proposal_metadata = md_Proposal.Fields().ByName("metadata") - fd_Proposal_proposers = md_Proposal.Fields().ByName("proposers") - fd_Proposal_submit_time = md_Proposal.Fields().ByName("submit_time") - fd_Proposal_group_version = md_Proposal.Fields().ByName("group_version") - fd_Proposal_group_policy_version = md_Proposal.Fields().ByName("group_policy_version") - fd_Proposal_status = md_Proposal.Fields().ByName("status") - fd_Proposal_result = md_Proposal.Fields().ByName("result") - fd_Proposal_final_tally_result = md_Proposal.Fields().ByName("final_tally_result") - fd_Proposal_voting_period_end = md_Proposal.Fields().ByName("voting_period_end") - fd_Proposal_executor_result = md_Proposal.Fields().ByName("executor_result") - fd_Proposal_messages = md_Proposal.Fields().ByName("messages") -} - -var _ protoreflect.Message = (*fastReflection_Proposal)(nil) - -type fastReflection_Proposal Proposal - -func (x *Proposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_Proposal)(x) -} - -func (x *Proposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Proposal_messageType fastReflection_Proposal_messageType -var _ protoreflect.MessageType = fastReflection_Proposal_messageType{} - -type fastReflection_Proposal_messageType struct{} - -func (x fastReflection_Proposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_Proposal)(nil) -} -func (x fastReflection_Proposal_messageType) New() protoreflect.Message { - return new(fastReflection_Proposal) -} -func (x fastReflection_Proposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Proposal) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// 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_Proposal) Type() protoreflect.MessageType { - return _fastReflection_Proposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Proposal) New() protoreflect.Message { - return new(fastReflection_Proposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Proposal) Interface() protoreflect.ProtoMessage { - return (*Proposal)(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_Proposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Proposal_id, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Proposal_address, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_Proposal_metadata, value) { - return - } - } - if len(x.Proposers) != 0 { - value := protoreflect.ValueOfList(&_Proposal_4_list{list: &x.Proposers}) - if !f(fd_Proposal_proposers, value) { - return - } - } - if x.SubmitTime != nil { - value := protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - if !f(fd_Proposal_submit_time, value) { - return - } - } - if x.GroupVersion != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupVersion) - if !f(fd_Proposal_group_version, value) { - return - } - } - if x.GroupPolicyVersion != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupPolicyVersion) - if !f(fd_Proposal_group_policy_version, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_Proposal_status, value) { - return - } - } - if x.Result != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Result)) - if !f(fd_Proposal_result, value) { - return - } - } - if x.FinalTallyResult != nil { - value := protoreflect.ValueOfMessage(x.FinalTallyResult.ProtoReflect()) - if !f(fd_Proposal_final_tally_result, value) { - return - } - } - if x.VotingPeriodEnd != nil { - value := protoreflect.ValueOfMessage(x.VotingPeriodEnd.ProtoReflect()) - if !f(fd_Proposal_voting_period_end, value) { - return - } - } - if x.ExecutorResult != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ExecutorResult)) - if !f(fd_Proposal_executor_result, value) { - return - } - } - if len(x.Messages) != 0 { - value := protoreflect.ValueOfList(&_Proposal_13_list{list: &x.Messages}) - if !f(fd_Proposal_messages, 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_Proposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.Proposal.id": - return x.Id != uint64(0) - case "cosmos.group.v1.Proposal.address": - return x.Address != "" - case "cosmos.group.v1.Proposal.metadata": - return x.Metadata != "" - case "cosmos.group.v1.Proposal.proposers": - return len(x.Proposers) != 0 - case "cosmos.group.v1.Proposal.submit_time": - return x.SubmitTime != nil - case "cosmos.group.v1.Proposal.group_version": - return x.GroupVersion != uint64(0) - case "cosmos.group.v1.Proposal.group_policy_version": - return x.GroupPolicyVersion != uint64(0) - case "cosmos.group.v1.Proposal.status": - return x.Status != 0 - case "cosmos.group.v1.Proposal.result": - return x.Result != 0 - case "cosmos.group.v1.Proposal.final_tally_result": - return x.FinalTallyResult != nil - case "cosmos.group.v1.Proposal.voting_period_end": - return x.VotingPeriodEnd != nil - case "cosmos.group.v1.Proposal.executor_result": - return x.ExecutorResult != 0 - case "cosmos.group.v1.Proposal.messages": - return len(x.Messages) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.Proposal 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_Proposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.Proposal.id": - x.Id = uint64(0) - case "cosmos.group.v1.Proposal.address": - x.Address = "" - case "cosmos.group.v1.Proposal.metadata": - x.Metadata = "" - case "cosmos.group.v1.Proposal.proposers": - x.Proposers = nil - case "cosmos.group.v1.Proposal.submit_time": - x.SubmitTime = nil - case "cosmos.group.v1.Proposal.group_version": - x.GroupVersion = uint64(0) - case "cosmos.group.v1.Proposal.group_policy_version": - x.GroupPolicyVersion = uint64(0) - case "cosmos.group.v1.Proposal.status": - x.Status = 0 - case "cosmos.group.v1.Proposal.result": - x.Result = 0 - case "cosmos.group.v1.Proposal.final_tally_result": - x.FinalTallyResult = nil - case "cosmos.group.v1.Proposal.voting_period_end": - x.VotingPeriodEnd = nil - case "cosmos.group.v1.Proposal.executor_result": - x.ExecutorResult = 0 - case "cosmos.group.v1.Proposal.messages": - x.Messages = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.Proposal 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_Proposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.Proposal.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.Proposal.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Proposal.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Proposal.proposers": - if len(x.Proposers) == 0 { - return protoreflect.ValueOfList(&_Proposal_4_list{}) - } - listValue := &_Proposal_4_list{list: &x.Proposers} - return protoreflect.ValueOfList(listValue) - case "cosmos.group.v1.Proposal.submit_time": - value := x.SubmitTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.group.v1.Proposal.group_version": - value := x.GroupVersion - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.Proposal.group_policy_version": - value := x.GroupPolicyVersion - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.Proposal.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.group.v1.Proposal.result": - value := x.Result - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.group.v1.Proposal.final_tally_result": - value := x.FinalTallyResult - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.group.v1.Proposal.voting_period_end": - value := x.VotingPeriodEnd - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.group.v1.Proposal.executor_result": - value := x.ExecutorResult - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.group.v1.Proposal.messages": - if len(x.Messages) == 0 { - return protoreflect.ValueOfList(&_Proposal_13_list{}) - } - listValue := &_Proposal_13_list{list: &x.Messages} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.Proposal 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_Proposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.Proposal.id": - x.Id = value.Uint() - case "cosmos.group.v1.Proposal.address": - x.Address = value.Interface().(string) - case "cosmos.group.v1.Proposal.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.Proposal.proposers": - lv := value.List() - clv := lv.(*_Proposal_4_list) - x.Proposers = *clv.list - case "cosmos.group.v1.Proposal.submit_time": - x.SubmitTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.group.v1.Proposal.group_version": - x.GroupVersion = value.Uint() - case "cosmos.group.v1.Proposal.group_policy_version": - x.GroupPolicyVersion = value.Uint() - case "cosmos.group.v1.Proposal.status": - x.Status = (ProposalStatus)(value.Enum()) - case "cosmos.group.v1.Proposal.result": - x.Result = (ProposalResult)(value.Enum()) - case "cosmos.group.v1.Proposal.final_tally_result": - x.FinalTallyResult = value.Message().Interface().(*TallyResult) - case "cosmos.group.v1.Proposal.voting_period_end": - x.VotingPeriodEnd = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.group.v1.Proposal.executor_result": - x.ExecutorResult = (ProposalExecutorResult)(value.Enum()) - case "cosmos.group.v1.Proposal.messages": - lv := value.List() - clv := lv.(*_Proposal_13_list) - x.Messages = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.Proposal 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_Proposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Proposal.proposers": - if x.Proposers == nil { - x.Proposers = []string{} - } - value := &_Proposal_4_list{list: &x.Proposers} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.Proposal.submit_time": - if x.SubmitTime == nil { - x.SubmitTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - case "cosmos.group.v1.Proposal.final_tally_result": - if x.FinalTallyResult == nil { - x.FinalTallyResult = new(TallyResult) - } - return protoreflect.ValueOfMessage(x.FinalTallyResult.ProtoReflect()) - case "cosmos.group.v1.Proposal.voting_period_end": - if x.VotingPeriodEnd == nil { - x.VotingPeriodEnd = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.VotingPeriodEnd.ProtoReflect()) - case "cosmos.group.v1.Proposal.messages": - if x.Messages == nil { - x.Messages = []*anypb.Any{} - } - value := &_Proposal_13_list{list: &x.Messages} - return protoreflect.ValueOfList(value) - case "cosmos.group.v1.Proposal.id": - panic(fmt.Errorf("field id of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.address": - panic(fmt.Errorf("field address of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.group_version": - panic(fmt.Errorf("field group_version of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.group_policy_version": - panic(fmt.Errorf("field group_policy_version of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.status": - panic(fmt.Errorf("field status of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.result": - panic(fmt.Errorf("field result of message cosmos.group.v1.Proposal is not mutable")) - case "cosmos.group.v1.Proposal.executor_result": - panic(fmt.Errorf("field executor_result of message cosmos.group.v1.Proposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.Proposal 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_Proposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Proposal.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.Proposal.address": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Proposal.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Proposal.proposers": - list := []string{} - return protoreflect.ValueOfList(&_Proposal_4_list{list: &list}) - case "cosmos.group.v1.Proposal.submit_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.group.v1.Proposal.group_version": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.Proposal.group_policy_version": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.Proposal.status": - return protoreflect.ValueOfEnum(0) - case "cosmos.group.v1.Proposal.result": - return protoreflect.ValueOfEnum(0) - case "cosmos.group.v1.Proposal.final_tally_result": - m := new(TallyResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.group.v1.Proposal.voting_period_end": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.group.v1.Proposal.executor_result": - return protoreflect.ValueOfEnum(0) - case "cosmos.group.v1.Proposal.messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_Proposal_13_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Proposal")) - } - panic(fmt.Errorf("message cosmos.group.v1.Proposal 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_Proposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.Proposal", 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_Proposal) 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_Proposal) 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_Proposal) 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_Proposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Proposal) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Proposers) > 0 { - for _, s := range x.Proposers { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.SubmitTime != nil { - l = options.Size(x.SubmitTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupVersion != 0 { - n += 1 + runtime.Sov(uint64(x.GroupVersion)) - } - if x.GroupPolicyVersion != 0 { - n += 1 + runtime.Sov(uint64(x.GroupPolicyVersion)) - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if x.Result != 0 { - n += 1 + runtime.Sov(uint64(x.Result)) - } - if x.FinalTallyResult != nil { - l = options.Size(x.FinalTallyResult) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingPeriodEnd != nil { - l = options.Size(x.VotingPeriodEnd) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ExecutorResult != 0 { - n += 1 + runtime.Sov(uint64(x.ExecutorResult)) - } - if len(x.Messages) > 0 { - for _, e := range x.Messages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Messages) > 0 { - for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Messages[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] = 0x6a - } - } - if x.ExecutorResult != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExecutorResult)) - i-- - dAtA[i] = 0x60 - } - if x.VotingPeriodEnd != nil { - encoded, err := options.Marshal(x.VotingPeriodEnd) - 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] = 0x5a - } - if x.FinalTallyResult != nil { - encoded, err := options.Marshal(x.FinalTallyResult) - 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] = 0x52 - } - if x.Result != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) - i-- - dAtA[i] = 0x48 - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x40 - } - if x.GroupPolicyVersion != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupPolicyVersion)) - i-- - dAtA[i] = 0x38 - } - if x.GroupVersion != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupVersion)) - i-- - dAtA[i] = 0x30 - } - if x.SubmitTime != nil { - encoded, err := options.Marshal(x.SubmitTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Proposers) > 0 { - for iNdEx := len(x.Proposers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Proposers[iNdEx]) - copy(dAtA[i:], x.Proposers[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proposers[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposers", 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.Proposers = append(x.Proposers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", 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.SubmitTime == nil { - x.SubmitTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SubmitTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) - } - x.GroupVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyVersion", wireType) - } - x.GroupPolicyVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GroupPolicyVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= ProposalStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - x.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Result |= ProposalResult(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", 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.FinalTallyResult == nil { - x.FinalTallyResult = &TallyResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FinalTallyResult); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPeriodEnd", 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.VotingPeriodEnd == nil { - x.VotingPeriodEnd = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingPeriodEnd); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutorResult", wireType) - } - x.ExecutorResult = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ExecutorResult |= ProposalExecutorResult(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Messages = append(x.Messages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TallyResult protoreflect.MessageDescriptor - fd_TallyResult_yes_count protoreflect.FieldDescriptor - fd_TallyResult_abstain_count protoreflect.FieldDescriptor - fd_TallyResult_no_count protoreflect.FieldDescriptor - fd_TallyResult_no_with_veto_count protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_TallyResult = File_cosmos_group_v1_types_proto.Messages().ByName("TallyResult") - fd_TallyResult_yes_count = md_TallyResult.Fields().ByName("yes_count") - fd_TallyResult_abstain_count = md_TallyResult.Fields().ByName("abstain_count") - fd_TallyResult_no_count = md_TallyResult.Fields().ByName("no_count") - fd_TallyResult_no_with_veto_count = md_TallyResult.Fields().ByName("no_with_veto_count") -} - -var _ protoreflect.Message = (*fastReflection_TallyResult)(nil) - -type fastReflection_TallyResult TallyResult - -func (x *TallyResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_TallyResult)(x) -} - -func (x *TallyResult) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TallyResult_messageType fastReflection_TallyResult_messageType -var _ protoreflect.MessageType = fastReflection_TallyResult_messageType{} - -type fastReflection_TallyResult_messageType struct{} - -func (x fastReflection_TallyResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_TallyResult)(nil) -} -func (x fastReflection_TallyResult_messageType) New() protoreflect.Message { - return new(fastReflection_TallyResult) -} -func (x fastReflection_TallyResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TallyResult -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TallyResult) Descriptor() protoreflect.MessageDescriptor { - return md_TallyResult -} - -// 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_TallyResult) Type() protoreflect.MessageType { - return _fastReflection_TallyResult_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TallyResult) New() protoreflect.Message { - return new(fastReflection_TallyResult) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TallyResult) Interface() protoreflect.ProtoMessage { - return (*TallyResult)(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_TallyResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.YesCount != "" { - value := protoreflect.ValueOfString(x.YesCount) - if !f(fd_TallyResult_yes_count, value) { - return - } - } - if x.AbstainCount != "" { - value := protoreflect.ValueOfString(x.AbstainCount) - if !f(fd_TallyResult_abstain_count, value) { - return - } - } - if x.NoCount != "" { - value := protoreflect.ValueOfString(x.NoCount) - if !f(fd_TallyResult_no_count, value) { - return - } - } - if x.NoWithVetoCount != "" { - value := protoreflect.ValueOfString(x.NoWithVetoCount) - if !f(fd_TallyResult_no_with_veto_count, 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_TallyResult) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.TallyResult.yes_count": - return x.YesCount != "" - case "cosmos.group.v1.TallyResult.abstain_count": - return x.AbstainCount != "" - case "cosmos.group.v1.TallyResult.no_count": - return x.NoCount != "" - case "cosmos.group.v1.TallyResult.no_with_veto_count": - return x.NoWithVetoCount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.group.v1.TallyResult 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_TallyResult) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.TallyResult.yes_count": - x.YesCount = "" - case "cosmos.group.v1.TallyResult.abstain_count": - x.AbstainCount = "" - case "cosmos.group.v1.TallyResult.no_count": - x.NoCount = "" - case "cosmos.group.v1.TallyResult.no_with_veto_count": - x.NoWithVetoCount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.group.v1.TallyResult 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_TallyResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.TallyResult.yes_count": - value := x.YesCount - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.TallyResult.abstain_count": - value := x.AbstainCount - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.TallyResult.no_count": - value := x.NoCount - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.TallyResult.no_with_veto_count": - value := x.NoWithVetoCount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.group.v1.TallyResult 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_TallyResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.TallyResult.yes_count": - x.YesCount = value.Interface().(string) - case "cosmos.group.v1.TallyResult.abstain_count": - x.AbstainCount = value.Interface().(string) - case "cosmos.group.v1.TallyResult.no_count": - x.NoCount = value.Interface().(string) - case "cosmos.group.v1.TallyResult.no_with_veto_count": - x.NoWithVetoCount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.group.v1.TallyResult 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_TallyResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.TallyResult.yes_count": - panic(fmt.Errorf("field yes_count of message cosmos.group.v1.TallyResult is not mutable")) - case "cosmos.group.v1.TallyResult.abstain_count": - panic(fmt.Errorf("field abstain_count of message cosmos.group.v1.TallyResult is not mutable")) - case "cosmos.group.v1.TallyResult.no_count": - panic(fmt.Errorf("field no_count of message cosmos.group.v1.TallyResult is not mutable")) - case "cosmos.group.v1.TallyResult.no_with_veto_count": - panic(fmt.Errorf("field no_with_veto_count of message cosmos.group.v1.TallyResult is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.group.v1.TallyResult 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_TallyResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.TallyResult.yes_count": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.TallyResult.abstain_count": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.TallyResult.no_count": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.TallyResult.no_with_veto_count": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.TallyResult")) - } - panic(fmt.Errorf("message cosmos.group.v1.TallyResult 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_TallyResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.TallyResult", 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_TallyResult) 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_TallyResult) 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_TallyResult) 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_TallyResult) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TallyResult) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.YesCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AbstainCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NoCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NoWithVetoCount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TallyResult) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NoWithVetoCount) > 0 { - i -= len(x.NoWithVetoCount) - copy(dAtA[i:], x.NoWithVetoCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NoWithVetoCount))) - i-- - dAtA[i] = 0x22 - } - if len(x.NoCount) > 0 { - i -= len(x.NoCount) - copy(dAtA[i:], x.NoCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NoCount))) - i-- - dAtA[i] = 0x1a - } - if len(x.AbstainCount) > 0 { - i -= len(x.AbstainCount) - copy(dAtA[i:], x.AbstainCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AbstainCount))) - i-- - dAtA[i] = 0x12 - } - if len(x.YesCount) > 0 { - i -= len(x.YesCount) - copy(dAtA[i:], x.YesCount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.YesCount))) - 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().(*TallyResult) - 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: TallyResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TallyResult: 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 YesCount", 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.YesCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AbstainCount", 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.AbstainCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoCount", 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.NoCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoWithVetoCount", 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.NoWithVetoCount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Vote protoreflect.MessageDescriptor - fd_Vote_proposal_id protoreflect.FieldDescriptor - fd_Vote_voter protoreflect.FieldDescriptor - fd_Vote_option protoreflect.FieldDescriptor - fd_Vote_metadata protoreflect.FieldDescriptor - fd_Vote_submit_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_group_v1_types_proto_init() - md_Vote = File_cosmos_group_v1_types_proto.Messages().ByName("Vote") - fd_Vote_proposal_id = md_Vote.Fields().ByName("proposal_id") - fd_Vote_voter = md_Vote.Fields().ByName("voter") - fd_Vote_option = md_Vote.Fields().ByName("option") - fd_Vote_metadata = md_Vote.Fields().ByName("metadata") - fd_Vote_submit_time = md_Vote.Fields().ByName("submit_time") -} - -var _ protoreflect.Message = (*fastReflection_Vote)(nil) - -type fastReflection_Vote Vote - -func (x *Vote) ProtoReflect() protoreflect.Message { - return (*fastReflection_Vote)(x) -} - -func (x *Vote) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1_types_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Vote_messageType fastReflection_Vote_messageType -var _ protoreflect.MessageType = fastReflection_Vote_messageType{} - -type fastReflection_Vote_messageType struct{} - -func (x fastReflection_Vote_messageType) Zero() protoreflect.Message { - return (*fastReflection_Vote)(nil) -} -func (x fastReflection_Vote_messageType) New() protoreflect.Message { - return new(fastReflection_Vote) -} -func (x fastReflection_Vote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Vote) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// 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_Vote) Type() protoreflect.MessageType { - return _fastReflection_Vote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Vote) New() protoreflect.Message { - return new(fastReflection_Vote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Vote) Interface() protoreflect.ProtoMessage { - return (*Vote)(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_Vote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProposalId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProposalId) - if !f(fd_Vote_proposal_id, value) { - return - } - } - if x.Voter != "" { - value := protoreflect.ValueOfString(x.Voter) - if !f(fd_Vote_voter, value) { - return - } - } - if x.Option != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Option)) - if !f(fd_Vote_option, value) { - return - } - } - if x.Metadata != "" { - value := protoreflect.ValueOfString(x.Metadata) - if !f(fd_Vote_metadata, value) { - return - } - } - if x.SubmitTime != nil { - value := protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - if !f(fd_Vote_submit_time, 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_Vote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.group.v1.Vote.proposal_id": - return x.ProposalId != uint64(0) - case "cosmos.group.v1.Vote.voter": - return x.Voter != "" - case "cosmos.group.v1.Vote.option": - return x.Option != 0 - case "cosmos.group.v1.Vote.metadata": - return x.Metadata != "" - case "cosmos.group.v1.Vote.submit_time": - return x.SubmitTime != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.group.v1.Vote 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_Vote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.group.v1.Vote.proposal_id": - x.ProposalId = uint64(0) - case "cosmos.group.v1.Vote.voter": - x.Voter = "" - case "cosmos.group.v1.Vote.option": - x.Option = 0 - case "cosmos.group.v1.Vote.metadata": - x.Metadata = "" - case "cosmos.group.v1.Vote.submit_time": - x.SubmitTime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.group.v1.Vote 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_Vote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.group.v1.Vote.proposal_id": - value := x.ProposalId - return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1.Vote.voter": - value := x.Voter - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Vote.option": - value := x.Option - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.group.v1.Vote.metadata": - value := x.Metadata - return protoreflect.ValueOfString(value) - case "cosmos.group.v1.Vote.submit_time": - value := x.SubmitTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.group.v1.Vote 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_Vote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.group.v1.Vote.proposal_id": - x.ProposalId = value.Uint() - case "cosmos.group.v1.Vote.voter": - x.Voter = value.Interface().(string) - case "cosmos.group.v1.Vote.option": - x.Option = (VoteOption)(value.Enum()) - case "cosmos.group.v1.Vote.metadata": - x.Metadata = value.Interface().(string) - case "cosmos.group.v1.Vote.submit_time": - x.SubmitTime = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.group.v1.Vote 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_Vote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Vote.submit_time": - if x.SubmitTime == nil { - x.SubmitTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.SubmitTime.ProtoReflect()) - case "cosmos.group.v1.Vote.proposal_id": - panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.Vote is not mutable")) - case "cosmos.group.v1.Vote.voter": - panic(fmt.Errorf("field voter of message cosmos.group.v1.Vote is not mutable")) - case "cosmos.group.v1.Vote.option": - panic(fmt.Errorf("field option of message cosmos.group.v1.Vote is not mutable")) - case "cosmos.group.v1.Vote.metadata": - panic(fmt.Errorf("field metadata of message cosmos.group.v1.Vote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.group.v1.Vote 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_Vote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.group.v1.Vote.proposal_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1.Vote.voter": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Vote.option": - return protoreflect.ValueOfEnum(0) - case "cosmos.group.v1.Vote.metadata": - return protoreflect.ValueOfString("") - case "cosmos.group.v1.Vote.submit_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.Vote")) - } - panic(fmt.Errorf("message cosmos.group.v1.Vote 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_Vote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1.Vote", 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_Vote) 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_Vote) 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_Vote) 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_Vote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Vote) - 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.ProposalId != 0 { - n += 1 + runtime.Sov(uint64(x.ProposalId)) - } - l = len(x.Voter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Option != 0 { - n += 1 + runtime.Sov(uint64(x.Option)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SubmitTime != nil { - l = options.Size(x.SubmitTime) - 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().(*Vote) - 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.SubmitTime != nil { - encoded, err := options.Marshal(x.SubmitTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if x.Option != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Option)) - i-- - dAtA[i] = 0x18 - } - if len(x.Voter) > 0 { - i -= len(x.Voter) - copy(dAtA[i:], x.Voter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) - i-- - dAtA[i] = 0x12 - } - if x.ProposalId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Vote) - 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - x.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Voter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) - } - x.Option = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Option |= VoteOption(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", 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.SubmitTime == nil { - x.SubmitTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SubmitTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/group/v1/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// VoteOption enumerates the valid vote options for a given proposal. -type VoteOption int32 - -const ( - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0 - // VOTE_OPTION_YES defines a yes vote option. - VoteOption_VOTE_OPTION_YES VoteOption = 1 - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2 - // VOTE_OPTION_NO defines a no vote option. - VoteOption_VOTE_OPTION_NO VoteOption = 3 - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VoteOption_VOTE_OPTION_NO_WITH_VETO VoteOption = 4 -) - -// Enum value maps for VoteOption. -var ( - VoteOption_name = map[int32]string{ - 0: "VOTE_OPTION_UNSPECIFIED", - 1: "VOTE_OPTION_YES", - 2: "VOTE_OPTION_ABSTAIN", - 3: "VOTE_OPTION_NO", - 4: "VOTE_OPTION_NO_WITH_VETO", - } - VoteOption_value = map[string]int32{ - "VOTE_OPTION_UNSPECIFIED": 0, - "VOTE_OPTION_YES": 1, - "VOTE_OPTION_ABSTAIN": 2, - "VOTE_OPTION_NO": 3, - "VOTE_OPTION_NO_WITH_VETO": 4, - } -) - -func (x VoteOption) Enum() *VoteOption { - p := new(VoteOption) - *p = x - return p -} - -func (x VoteOption) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VoteOption) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_group_v1_types_proto_enumTypes[0].Descriptor() -} - -func (VoteOption) Type() protoreflect.EnumType { - return &file_cosmos_group_v1_types_proto_enumTypes[0] -} - -func (x VoteOption) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VoteOption.Descriptor instead. -func (VoteOption) EnumDescriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{0} -} - -// ProposalStatus defines proposal statuses. -type ProposalStatus int32 - -const ( - // An empty value is invalid and not allowed. - ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 - // Initial status of a proposal when persisted. - ProposalStatus_PROPOSAL_STATUS_SUBMITTED ProposalStatus = 1 - // Final status of a proposal when the final tally was executed. - ProposalStatus_PROPOSAL_STATUS_CLOSED ProposalStatus = 2 - // Final status of a proposal when the group was modified before the final tally. - ProposalStatus_PROPOSAL_STATUS_ABORTED ProposalStatus = 3 - // A proposal can be deleted before the voting start time by the owner. When this happens the final status - // is Withdrawn. - ProposalStatus_PROPOSAL_STATUS_WITHDRAWN ProposalStatus = 4 -) - -// Enum value maps for ProposalStatus. -var ( - ProposalStatus_name = map[int32]string{ - 0: "PROPOSAL_STATUS_UNSPECIFIED", - 1: "PROPOSAL_STATUS_SUBMITTED", - 2: "PROPOSAL_STATUS_CLOSED", - 3: "PROPOSAL_STATUS_ABORTED", - 4: "PROPOSAL_STATUS_WITHDRAWN", - } - ProposalStatus_value = map[string]int32{ - "PROPOSAL_STATUS_UNSPECIFIED": 0, - "PROPOSAL_STATUS_SUBMITTED": 1, - "PROPOSAL_STATUS_CLOSED": 2, - "PROPOSAL_STATUS_ABORTED": 3, - "PROPOSAL_STATUS_WITHDRAWN": 4, - } -) - -func (x ProposalStatus) Enum() *ProposalStatus { - p := new(ProposalStatus) - *p = x - return p -} - -func (x ProposalStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalStatus) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_group_v1_types_proto_enumTypes[1].Descriptor() -} - -func (ProposalStatus) Type() protoreflect.EnumType { - return &file_cosmos_group_v1_types_proto_enumTypes[1] -} - -func (x ProposalStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalStatus.Descriptor instead. -func (ProposalStatus) EnumDescriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{1} -} - -// ProposalResult defines types of proposal results. -type ProposalResult int32 - -const ( - // An empty value is invalid and not allowed - ProposalResult_PROPOSAL_RESULT_UNSPECIFIED ProposalResult = 0 - // Until a final tally has happened the status is unfinalized - ProposalResult_PROPOSAL_RESULT_UNFINALIZED ProposalResult = 1 - // Final result of the tally - ProposalResult_PROPOSAL_RESULT_ACCEPTED ProposalResult = 2 - // Final result of the tally - ProposalResult_PROPOSAL_RESULT_REJECTED ProposalResult = 3 -) - -// Enum value maps for ProposalResult. -var ( - ProposalResult_name = map[int32]string{ - 0: "PROPOSAL_RESULT_UNSPECIFIED", - 1: "PROPOSAL_RESULT_UNFINALIZED", - 2: "PROPOSAL_RESULT_ACCEPTED", - 3: "PROPOSAL_RESULT_REJECTED", - } - ProposalResult_value = map[string]int32{ - "PROPOSAL_RESULT_UNSPECIFIED": 0, - "PROPOSAL_RESULT_UNFINALIZED": 1, - "PROPOSAL_RESULT_ACCEPTED": 2, - "PROPOSAL_RESULT_REJECTED": 3, - } -) - -func (x ProposalResult) Enum() *ProposalResult { - p := new(ProposalResult) - *p = x - return p -} - -func (x ProposalResult) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalResult) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_group_v1_types_proto_enumTypes[2].Descriptor() -} - -func (ProposalResult) Type() protoreflect.EnumType { - return &file_cosmos_group_v1_types_proto_enumTypes[2] -} - -func (x ProposalResult) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalResult.Descriptor instead. -func (ProposalResult) EnumDescriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{2} -} - -// ProposalExecutorResult defines types of proposal executor results. -type ProposalExecutorResult int32 - -const ( - // An empty value is not allowed. - ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED ProposalExecutorResult = 0 - // We have not yet run the executor. - ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_NOT_RUN ProposalExecutorResult = 1 - // The executor was successful and proposed action updated state. - ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_SUCCESS ProposalExecutorResult = 2 - // The executor returned an error and proposed action didn't update state. - ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_FAILURE ProposalExecutorResult = 3 -) - -// Enum value maps for ProposalExecutorResult. -var ( - ProposalExecutorResult_name = map[int32]string{ - 0: "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", - 1: "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", - 2: "PROPOSAL_EXECUTOR_RESULT_SUCCESS", - 3: "PROPOSAL_EXECUTOR_RESULT_FAILURE", - } - ProposalExecutorResult_value = map[string]int32{ - "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED": 0, - "PROPOSAL_EXECUTOR_RESULT_NOT_RUN": 1, - "PROPOSAL_EXECUTOR_RESULT_SUCCESS": 2, - "PROPOSAL_EXECUTOR_RESULT_FAILURE": 3, - } -) - -func (x ProposalExecutorResult) Enum() *ProposalExecutorResult { - p := new(ProposalExecutorResult) - *p = x - return p -} - -func (x ProposalExecutorResult) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalExecutorResult) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_group_v1_types_proto_enumTypes[3].Descriptor() -} - -func (ProposalExecutorResult) Type() protoreflect.EnumType { - return &file_cosmos_group_v1_types_proto_enumTypes[3] -} - -func (x ProposalExecutorResult) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalExecutorResult.Descriptor instead. -func (ProposalExecutorResult) EnumDescriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{3} -} - -// Member represents a group member with an account address, -// non-zero weight and metadata. -type Member struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the member's account address. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // weight is the member's voting weight that should be greater than 0. - Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - // metadata is any arbitrary metadata to attached to the member. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // added_at is a timestamp specifying when a member was added. - AddedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=added_at,json=addedAt,proto3" json:"added_at,omitempty"` -} - -func (x *Member) Reset() { - *x = Member{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Member) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Member) ProtoMessage() {} - -// Deprecated: Use Member.ProtoReflect.Descriptor instead. -func (*Member) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{0} -} - -func (x *Member) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Member) GetWeight() string { - if x != nil { - return x.Weight - } - return "" -} - -func (x *Member) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *Member) GetAddedAt() *timestamppb.Timestamp { - if x != nil { - return x.AddedAt - } - return nil -} - -// Members defines a repeated slice of Member objects. -type Members struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // members is the list of members. - Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` -} - -func (x *Members) Reset() { - *x = Members{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Members) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Members) ProtoMessage() {} - -// Deprecated: Use Members.ProtoReflect.Descriptor instead. -func (*Members) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{1} -} - -func (x *Members) GetMembers() []*Member { - if x != nil { - return x.Members - } - return nil -} - -// ThresholdDecisionPolicy implements the DecisionPolicy interface -type ThresholdDecisionPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. - Threshold string `protobuf:"bytes,1,opt,name=threshold,proto3" json:"threshold,omitempty"` - // windows defines the different windows for voting and execution. - Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"` -} - -func (x *ThresholdDecisionPolicy) Reset() { - *x = ThresholdDecisionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ThresholdDecisionPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ThresholdDecisionPolicy) ProtoMessage() {} - -// Deprecated: Use ThresholdDecisionPolicy.ProtoReflect.Descriptor instead. -func (*ThresholdDecisionPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{2} -} - -func (x *ThresholdDecisionPolicy) GetThreshold() string { - if x != nil { - return x.Threshold - } - return "" -} - -func (x *ThresholdDecisionPolicy) GetWindows() *DecisionPolicyWindows { - if x != nil { - return x.Windows - } - return nil -} - -// PercentageDecisionPolicy implements the DecisionPolicy interface -type PercentageDecisionPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. - Percentage string `protobuf:"bytes,1,opt,name=percentage,proto3" json:"percentage,omitempty"` - // windows defines the different windows for voting and execution. - Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"` -} - -func (x *PercentageDecisionPolicy) Reset() { - *x = PercentageDecisionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PercentageDecisionPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PercentageDecisionPolicy) ProtoMessage() {} - -// Deprecated: Use PercentageDecisionPolicy.ProtoReflect.Descriptor instead. -func (*PercentageDecisionPolicy) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{3} -} - -func (x *PercentageDecisionPolicy) GetPercentage() string { - if x != nil { - return x.Percentage - } - return "" -} - -func (x *PercentageDecisionPolicy) GetWindows() *DecisionPolicyWindows { - if x != nil { - return x.Windows - } - return nil -} - -// DecisionPolicyWindows defines the different windows for voting and execution. -type DecisionPolicyWindows struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // voting_period is the duration from submission of a proposal to the end of voting period - // Within this times votes can be submitted with MsgVote. - VotingPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"` - // min_execution_period is the minimum duration after the proposal submission - // where members can start sending MsgExec. This means that the window for - // sending a MsgExec transaction is: - // `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - // where max_execution_period is a app-specific config, defined in the keeper. - // If not set, min_execution_period will default to 0. - // - // Please make sure to set a `min_execution_period` that is smaller than - // `voting_period + max_execution_period`, or else the above execution window - // is empty, meaning that all proposals created with this decision policy - // won't be able to be executed. - MinExecutionPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=min_execution_period,json=minExecutionPeriod,proto3" json:"min_execution_period,omitempty"` -} - -func (x *DecisionPolicyWindows) Reset() { - *x = DecisionPolicyWindows{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DecisionPolicyWindows) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DecisionPolicyWindows) ProtoMessage() {} - -// Deprecated: Use DecisionPolicyWindows.ProtoReflect.Descriptor instead. -func (*DecisionPolicyWindows) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{4} -} - -func (x *DecisionPolicyWindows) GetVotingPeriod() *durationpb.Duration { - if x != nil { - return x.VotingPeriod - } - return nil -} - -func (x *DecisionPolicyWindows) GetMinExecutionPeriod() *durationpb.Duration { - if x != nil { - return x.MinExecutionPeriod - } - return nil -} - -// GroupInfo represents the high-level on-chain information for a group. -type GroupInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the unique ID of the group. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // admin is the account address of the group's admin. - Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` - // metadata is any arbitrary metadata to attached to the group. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // version is used to track changes to a group's membership structure that - // would break existing proposals. Whenever any members weight is changed, - // or any member is added or removed this version is incremented and will - // cause proposals based on older versions of this group to fail - Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` - // total_weight is the sum of the group members' weights. - TotalWeight string `protobuf:"bytes,5,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` - // created_at is a timestamp specifying when a group was created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` -} - -func (x *GroupInfo) Reset() { - *x = GroupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInfo) ProtoMessage() {} - -// Deprecated: Use GroupInfo.ProtoReflect.Descriptor instead. -func (*GroupInfo) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{5} -} - -func (x *GroupInfo) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *GroupInfo) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *GroupInfo) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *GroupInfo) GetVersion() uint64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *GroupInfo) GetTotalWeight() string { - if x != nil { - return x.TotalWeight - } - return "" -} - -func (x *GroupInfo) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -// GroupMember represents the relationship between a group and a member. -type GroupMember struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // member is the member data. - Member *Member `protobuf:"bytes,2,opt,name=member,proto3" json:"member,omitempty"` -} - -func (x *GroupMember) Reset() { - *x = GroupMember{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupMember) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMember) ProtoMessage() {} - -// Deprecated: Use GroupMember.ProtoReflect.Descriptor instead. -func (*GroupMember) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{6} -} - -func (x *GroupMember) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *GroupMember) GetMember() *Member { - if x != nil { - return x.Member - } - return nil -} - -// GroupPolicyInfo represents the high-level on-chain information for a group policy. -type GroupPolicyInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address of group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // group_id is the unique ID of the group. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // admin is the account address of the group admin. - Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"` - // metadata is any arbitrary metadata to attached to the group policy. - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // version is used to track changes to a group's GroupPolicyInfo structure that - // would create a different result on a running proposal. - Version uint64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` - // decision_policy specifies the group policy's decision policy. - DecisionPolicy *anypb.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` - // created_at is a timestamp specifying when a group policy was created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` -} - -func (x *GroupPolicyInfo) Reset() { - *x = GroupPolicyInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupPolicyInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupPolicyInfo) ProtoMessage() {} - -// Deprecated: Use GroupPolicyInfo.ProtoReflect.Descriptor instead. -func (*GroupPolicyInfo) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{7} -} - -func (x *GroupPolicyInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *GroupPolicyInfo) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *GroupPolicyInfo) GetAdmin() string { - if x != nil { - return x.Admin - } - return "" -} - -func (x *GroupPolicyInfo) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *GroupPolicyInfo) GetVersion() uint64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *GroupPolicyInfo) GetDecisionPolicy() *anypb.Any { - if x != nil { - return x.DecisionPolicy - } - return nil -} - -func (x *GroupPolicyInfo) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -// Proposal defines a group proposal. Any member of a group can submit a proposal -// for a group policy to decide upon. -// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal -// passes as well as some optional metadata associated with the proposal. -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the unique id of the proposal. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // address is the account address of group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // metadata is any arbitrary metadata to attached to the proposal. - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // proposers are the account addresses of the proposers. - Proposers []string `protobuf:"bytes,4,rep,name=proposers,proto3" json:"proposers,omitempty"` - // submit_time is a timestamp specifying when a proposal was submitted. - SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` - // group_version tracks the version of the group that this proposal corresponds to. - // When group membership is changed, existing proposals from previous group versions will become invalid. - GroupVersion uint64 `protobuf:"varint,6,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"` - // group_policy_version tracks the version of the group policy that this proposal corresponds to. - // When a decision policy is changed, existing proposals from previous policy versions will become invalid. - GroupPolicyVersion uint64 `protobuf:"varint,7,opt,name=group_policy_version,json=groupPolicyVersion,proto3" json:"group_policy_version,omitempty"` - // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. - Status ProposalStatus `protobuf:"varint,8,opt,name=status,proto3,enum=cosmos.group.v1.ProposalStatus" json:"status,omitempty"` - // result is the final result based on the votes and election rule. Initial value is unfinalized. - // The result is persisted so that clients can always rely on this state and not have to replicate the logic. - Result ProposalResult `protobuf:"varint,9,opt,name=result,proto3,enum=cosmos.group.v1.ProposalResult" json:"result,omitempty"` - // final_tally_result contains the sums of all weighted votes for this - // proposal for each vote option, after tallying. When querying a proposal - // via gRPC, this field is not populated until the proposal's voting period - // has ended. - FinalTallyResult *TallyResult `protobuf:"bytes,10,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"` - // voting_period_end is the timestamp before which voting must be done. - // Unless a successfull MsgExec is called before (to execute a proposal whose - // tally is successful before the voting period ends), tallying will be done - // at this point, and the `final_tally_result`, as well - // as `status` and `result` fields will be accordingly updated. - VotingPeriodEnd *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=voting_period_end,json=votingPeriodEnd,proto3" json:"voting_period_end,omitempty"` - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. - ExecutorResult ProposalExecutorResult `protobuf:"varint,12,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"executor_result,omitempty"` - // messages is a list of Msgs that will be executed if the proposal passes. - Messages []*anypb.Any `protobuf:"bytes,13,rep,name=messages,proto3" json:"messages,omitempty"` -} - -func (x *Proposal) Reset() { - *x = Proposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proposal) ProtoMessage() {} - -// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. -func (*Proposal) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{8} -} - -func (x *Proposal) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Proposal) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Proposal) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *Proposal) GetProposers() []string { - if x != nil { - return x.Proposers - } - return nil -} - -func (x *Proposal) GetSubmitTime() *timestamppb.Timestamp { - if x != nil { - return x.SubmitTime - } - return nil -} - -func (x *Proposal) GetGroupVersion() uint64 { - if x != nil { - return x.GroupVersion - } - return 0 -} - -func (x *Proposal) GetGroupPolicyVersion() uint64 { - if x != nil { - return x.GroupPolicyVersion - } - return 0 -} - -func (x *Proposal) GetStatus() ProposalStatus { - if x != nil { - return x.Status - } - return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED -} - -func (x *Proposal) GetResult() ProposalResult { - if x != nil { - return x.Result - } - return ProposalResult_PROPOSAL_RESULT_UNSPECIFIED -} - -func (x *Proposal) GetFinalTallyResult() *TallyResult { - if x != nil { - return x.FinalTallyResult - } - return nil -} - -func (x *Proposal) GetVotingPeriodEnd() *timestamppb.Timestamp { - if x != nil { - return x.VotingPeriodEnd - } - return nil -} - -func (x *Proposal) GetExecutorResult() ProposalExecutorResult { - if x != nil { - return x.ExecutorResult - } - return ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED -} - -func (x *Proposal) GetMessages() []*anypb.Any { - if x != nil { - return x.Messages - } - return nil -} - -// TallyResult represents the sum of weighted votes for each vote option. -type TallyResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // yes_count is the weighted sum of yes votes. - YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` - // abstain_count is the weighted sum of abstainers. - AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"` - // no is the weighted sum of no votes. - NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"` - // no_with_veto_count is the weighted sum of veto. - NoWithVetoCount string `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3" json:"no_with_veto_count,omitempty"` -} - -func (x *TallyResult) Reset() { - *x = TallyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TallyResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TallyResult) ProtoMessage() {} - -// Deprecated: Use TallyResult.ProtoReflect.Descriptor instead. -func (*TallyResult) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{9} -} - -func (x *TallyResult) GetYesCount() string { - if x != nil { - return x.YesCount - } - return "" -} - -func (x *TallyResult) GetAbstainCount() string { - if x != nil { - return x.AbstainCount - } - return "" -} - -func (x *TallyResult) GetNoCount() string { - if x != nil { - return x.NoCount - } - return "" -} - -func (x *TallyResult) GetNoWithVetoCount() string { - if x != nil { - return x.NoWithVetoCount - } - return "" -} - -// Vote represents a vote for a proposal. -type Vote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // proposal is the unique ID of the proposal. - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter is the account address of the voter. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - // option is the voter's choice on the proposal. - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.group.v1.VoteOption" json:"option,omitempty"` - // metadata is any arbitrary metadata to attached to the vote. - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // submit_time is the timestamp when the vote was submitted. - SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` -} - -func (x *Vote) Reset() { - *x = Vote{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1_types_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vote) ProtoMessage() {} - -// Deprecated: Use Vote.ProtoReflect.Descriptor instead. -func (*Vote) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1_types_proto_rawDescGZIP(), []int{10} -} - -func (x *Vote) GetProposalId() uint64 { - if x != nil { - return x.ProposalId - } - return 0 -} - -func (x *Vote) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *Vote) GetOption() VoteOption { - if x != nil { - return x.Option - } - return VoteOption_VOTE_OPTION_UNSPECIFIED -} - -func (x *Vote) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *Vote) GetSubmitTime() *timestamppb.Timestamp { - if x != nil { - return x.SubmitTime - } - return nil -} - -var File_cosmos_group_v1_types_proto protoreflect.FileDescriptor - -var file_cosmos_group_v1_types_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x06, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 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, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, - 0x0a, 0x08, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x65, 0x64, 0x41, 0x74, 0x22, - 0x42, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x17, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x40, 0x0a, - 0x07, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x57, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x3a, - 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x22, 0x90, 0x01, 0x0a, 0x18, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x12, 0x40, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xb8, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x63, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, - 0x12, 0x48, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x55, 0x0a, 0x14, 0x6d, 0x69, - 0x6e, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x12, 0x6d, - 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x22, 0xe9, 0x01, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, - 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, - 0x1f, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x59, 0x0a, - 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xe8, 0x02, 0x0a, 0x0f, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 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, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 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, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0xe0, 0x05, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x36, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, - 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x37, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x50, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, - 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x50, 0x0a, 0x11, 0x76, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x76, 0x6f, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x6e, 0x64, 0x12, 0x50, 0x0a, 0x0f, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0e, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x30, - 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x0d, 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, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, - 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, - 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xef, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, - 0x12, 0x33, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x73, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x2a, 0x8f, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, - 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, - 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, - 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, - 0x54, 0x4f, 0x10, 0x04, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0xae, 0x01, 0x0a, 0x0e, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, - 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, - 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x42, 0x4f, - 0x52, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, - 0x41, 0x57, 0x4e, 0x10, 0x04, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x94, 0x01, 0x0a, 0x0e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, - 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, - 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, - 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1c, - 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, - 0x54, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, - 0x1e, 0x00, 0x2a, 0xba, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x28, 0x0a, - 0x24, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x10, 0x01, 0x12, 0x24, 0x0a, - 0x20, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, - 0xb9, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_group_v1_types_proto_rawDescOnce sync.Once - file_cosmos_group_v1_types_proto_rawDescData = file_cosmos_group_v1_types_proto_rawDesc -) - -func file_cosmos_group_v1_types_proto_rawDescGZIP() []byte { - file_cosmos_group_v1_types_proto_rawDescOnce.Do(func() { - file_cosmos_group_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_group_v1_types_proto_rawDescData) - }) - return file_cosmos_group_v1_types_proto_rawDescData -} - -var file_cosmos_group_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_cosmos_group_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_cosmos_group_v1_types_proto_goTypes = []interface{}{ - (VoteOption)(0), // 0: cosmos.group.v1.VoteOption - (ProposalStatus)(0), // 1: cosmos.group.v1.ProposalStatus - (ProposalResult)(0), // 2: cosmos.group.v1.ProposalResult - (ProposalExecutorResult)(0), // 3: cosmos.group.v1.ProposalExecutorResult - (*Member)(nil), // 4: cosmos.group.v1.Member - (*Members)(nil), // 5: cosmos.group.v1.Members - (*ThresholdDecisionPolicy)(nil), // 6: cosmos.group.v1.ThresholdDecisionPolicy - (*PercentageDecisionPolicy)(nil), // 7: cosmos.group.v1.PercentageDecisionPolicy - (*DecisionPolicyWindows)(nil), // 8: cosmos.group.v1.DecisionPolicyWindows - (*GroupInfo)(nil), // 9: cosmos.group.v1.GroupInfo - (*GroupMember)(nil), // 10: cosmos.group.v1.GroupMember - (*GroupPolicyInfo)(nil), // 11: cosmos.group.v1.GroupPolicyInfo - (*Proposal)(nil), // 12: cosmos.group.v1.Proposal - (*TallyResult)(nil), // 13: cosmos.group.v1.TallyResult - (*Vote)(nil), // 14: cosmos.group.v1.Vote - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 16: google.protobuf.Duration - (*anypb.Any)(nil), // 17: google.protobuf.Any -} -var file_cosmos_group_v1_types_proto_depIdxs = []int32{ - 15, // 0: cosmos.group.v1.Member.added_at:type_name -> google.protobuf.Timestamp - 4, // 1: cosmos.group.v1.Members.members:type_name -> cosmos.group.v1.Member - 8, // 2: cosmos.group.v1.ThresholdDecisionPolicy.windows:type_name -> cosmos.group.v1.DecisionPolicyWindows - 8, // 3: cosmos.group.v1.PercentageDecisionPolicy.windows:type_name -> cosmos.group.v1.DecisionPolicyWindows - 16, // 4: cosmos.group.v1.DecisionPolicyWindows.voting_period:type_name -> google.protobuf.Duration - 16, // 5: cosmos.group.v1.DecisionPolicyWindows.min_execution_period:type_name -> google.protobuf.Duration - 15, // 6: cosmos.group.v1.GroupInfo.created_at:type_name -> google.protobuf.Timestamp - 4, // 7: cosmos.group.v1.GroupMember.member:type_name -> cosmos.group.v1.Member - 17, // 8: cosmos.group.v1.GroupPolicyInfo.decision_policy:type_name -> google.protobuf.Any - 15, // 9: cosmos.group.v1.GroupPolicyInfo.created_at:type_name -> google.protobuf.Timestamp - 15, // 10: cosmos.group.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp - 1, // 11: cosmos.group.v1.Proposal.status:type_name -> cosmos.group.v1.ProposalStatus - 2, // 12: cosmos.group.v1.Proposal.result:type_name -> cosmos.group.v1.ProposalResult - 13, // 13: cosmos.group.v1.Proposal.final_tally_result:type_name -> cosmos.group.v1.TallyResult - 15, // 14: cosmos.group.v1.Proposal.voting_period_end:type_name -> google.protobuf.Timestamp - 3, // 15: cosmos.group.v1.Proposal.executor_result:type_name -> cosmos.group.v1.ProposalExecutorResult - 17, // 16: cosmos.group.v1.Proposal.messages:type_name -> google.protobuf.Any - 0, // 17: cosmos.group.v1.Vote.option:type_name -> cosmos.group.v1.VoteOption - 15, // 18: cosmos.group.v1.Vote.submit_time:type_name -> google.protobuf.Timestamp - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_cosmos_group_v1_types_proto_init() } -func file_cosmos_group_v1_types_proto_init() { - if File_cosmos_group_v1_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_group_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Member); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Members); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThresholdDecisionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PercentageDecisionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecisionPolicyWindows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMember); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupPolicyInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TallyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_group_v1_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_group_v1_types_proto_rawDesc, - NumEnums: 4, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_group_v1_types_proto_goTypes, - DependencyIndexes: file_cosmos_group_v1_types_proto_depIdxs, - EnumInfos: file_cosmos_group_v1_types_proto_enumTypes, - MessageInfos: file_cosmos_group_v1_types_proto_msgTypes, - }.Build() - File_cosmos_group_v1_types_proto = out.File - file_cosmos_group_v1_types_proto_rawDesc = nil - file_cosmos_group_v1_types_proto_goTypes = nil - file_cosmos_group_v1_types_proto_depIdxs = nil -} diff --git a/api/cosmos/mint/v1beta1/genesis.pulsar.go b/api/cosmos/mint/v1beta1/genesis.pulsar.go deleted file mode 100644 index 56d77e1d350a..000000000000 --- a/api/cosmos/mint/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,690 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package mintv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_minter protoreflect.FieldDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_mint_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_minter = md_GenesisState.Fields().ByName("minter") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Minter != nil { - value := protoreflect.ValueOfMessage(x.Minter.ProtoReflect()) - if !f(fd_GenesisState_minter, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_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_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.mint.v1beta1.GenesisState.minter": - return x.Minter != nil - case "cosmos.mint.v1beta1.GenesisState.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.GenesisState.minter": - x.Minter = nil - case "cosmos.mint.v1beta1.GenesisState.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.mint.v1beta1.GenesisState.minter": - value := x.Minter - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.mint.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.GenesisState.minter": - x.Minter = value.Message().Interface().(*Minter) - case "cosmos.mint.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.GenesisState.minter": - if x.Minter == nil { - x.Minter = new(Minter) - } - return protoreflect.ValueOfMessage(x.Minter.ProtoReflect()) - case "cosmos.mint.v1beta1.GenesisState.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.mint.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.GenesisState.minter": - m := new(Minter) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.mint.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Minter != nil { - l = options.Size(x.Minter) - n += 1 + l + runtime.Sov(uint64(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().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if 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] = 0x12 - } - if x.Minter != nil { - encoded, err := options.Marshal(x.Minter) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Minter", 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.Minter == nil { - x.Minter = &Minter{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Minter); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/mint/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the mint module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // minter is a space for holding current inflation information. - Minter *Minter `protobuf:"bytes,1,opt,name=minter,proto3" json:"minter,omitempty"` - // params defines all the paramaters of the module. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetMinter() *Minter { - if x != nil { - return x.Minter - } - return nil -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -var File_cosmos_mint_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_mint_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, - 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x39, 0x0a, 0x06, 0x6d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 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, 0x42, 0xd7, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, - 0x69, 0x6e, 0x74, 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, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_mint_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_mint_v1beta1_genesis_proto_rawDescData = file_cosmos_mint_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_mint_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_mint_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_mint_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_mint_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_mint_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_mint_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_mint_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.mint.v1beta1.GenesisState - (*Minter)(nil), // 1: cosmos.mint.v1beta1.Minter - (*Params)(nil), // 2: cosmos.mint.v1beta1.Params -} -var file_cosmos_mint_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: cosmos.mint.v1beta1.GenesisState.minter:type_name -> cosmos.mint.v1beta1.Minter - 2, // 1: cosmos.mint.v1beta1.GenesisState.params:type_name -> cosmos.mint.v1beta1.Params - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_mint_v1beta1_genesis_proto_init() } -func file_cosmos_mint_v1beta1_genesis_proto_init() { - if File_cosmos_mint_v1beta1_genesis_proto != nil { - return - } - file_cosmos_mint_v1beta1_mint_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_mint_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_mint_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_mint_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_mint_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_mint_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_mint_v1beta1_genesis_proto = out.File - file_cosmos_mint_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_mint_v1beta1_genesis_proto_goTypes = nil - file_cosmos_mint_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/mint/v1beta1/mint.pulsar.go b/api/cosmos/mint/v1beta1/mint.pulsar.go deleted file mode 100644 index 0d54bed5d149..000000000000 --- a/api/cosmos/mint/v1beta1/mint.pulsar.go +++ /dev/null @@ -1,1510 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package mintv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Minter protoreflect.MessageDescriptor - fd_Minter_inflation protoreflect.FieldDescriptor - fd_Minter_annual_provisions protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_mint_proto_init() - md_Minter = File_cosmos_mint_v1beta1_mint_proto.Messages().ByName("Minter") - fd_Minter_inflation = md_Minter.Fields().ByName("inflation") - fd_Minter_annual_provisions = md_Minter.Fields().ByName("annual_provisions") -} - -var _ protoreflect.Message = (*fastReflection_Minter)(nil) - -type fastReflection_Minter Minter - -func (x *Minter) ProtoReflect() protoreflect.Message { - return (*fastReflection_Minter)(x) -} - -func (x *Minter) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_mint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Minter_messageType fastReflection_Minter_messageType -var _ protoreflect.MessageType = fastReflection_Minter_messageType{} - -type fastReflection_Minter_messageType struct{} - -func (x fastReflection_Minter_messageType) Zero() protoreflect.Message { - return (*fastReflection_Minter)(nil) -} -func (x fastReflection_Minter_messageType) New() protoreflect.Message { - return new(fastReflection_Minter) -} -func (x fastReflection_Minter_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Minter -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Minter) Descriptor() protoreflect.MessageDescriptor { - return md_Minter -} - -// 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_Minter) Type() protoreflect.MessageType { - return _fastReflection_Minter_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Minter) New() protoreflect.Message { - return new(fastReflection_Minter) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Minter) Interface() protoreflect.ProtoMessage { - return (*Minter)(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_Minter) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Inflation != "" { - value := protoreflect.ValueOfString(x.Inflation) - if !f(fd_Minter_inflation, value) { - return - } - } - if x.AnnualProvisions != "" { - value := protoreflect.ValueOfString(x.AnnualProvisions) - if !f(fd_Minter_annual_provisions, 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_Minter) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Minter.inflation": - return x.Inflation != "" - case "cosmos.mint.v1beta1.Minter.annual_provisions": - return x.AnnualProvisions != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Minter 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_Minter) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Minter.inflation": - x.Inflation = "" - case "cosmos.mint.v1beta1.Minter.annual_provisions": - x.AnnualProvisions = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Minter 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_Minter) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.mint.v1beta1.Minter.inflation": - value := x.Inflation - return protoreflect.ValueOfString(value) - case "cosmos.mint.v1beta1.Minter.annual_provisions": - value := x.AnnualProvisions - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Minter 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_Minter) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Minter.inflation": - x.Inflation = value.Interface().(string) - case "cosmos.mint.v1beta1.Minter.annual_provisions": - x.AnnualProvisions = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Minter 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_Minter) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Minter.inflation": - panic(fmt.Errorf("field inflation of message cosmos.mint.v1beta1.Minter is not mutable")) - case "cosmos.mint.v1beta1.Minter.annual_provisions": - panic(fmt.Errorf("field annual_provisions of message cosmos.mint.v1beta1.Minter is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Minter 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_Minter) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Minter.inflation": - return protoreflect.ValueOfString("") - case "cosmos.mint.v1beta1.Minter.annual_provisions": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Minter 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_Minter) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.Minter", 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_Minter) 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_Minter) 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_Minter) 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_Minter) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Minter) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Inflation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AnnualProvisions) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Minter) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AnnualProvisions) > 0 { - i -= len(x.AnnualProvisions) - copy(dAtA[i:], x.AnnualProvisions) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AnnualProvisions))) - i-- - dAtA[i] = 0x12 - } - if len(x.Inflation) > 0 { - i -= len(x.Inflation) - copy(dAtA[i:], x.Inflation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Inflation))) - 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().(*Minter) - 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: Minter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Minter: 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 Inflation", 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.Inflation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnnualProvisions", 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.AnnualProvisions = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_mint_denom protoreflect.FieldDescriptor - fd_Params_inflation_rate_change protoreflect.FieldDescriptor - fd_Params_inflation_max protoreflect.FieldDescriptor - fd_Params_inflation_min protoreflect.FieldDescriptor - fd_Params_goal_bonded protoreflect.FieldDescriptor - fd_Params_blocks_per_year protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_mint_proto_init() - md_Params = File_cosmos_mint_v1beta1_mint_proto.Messages().ByName("Params") - fd_Params_mint_denom = md_Params.Fields().ByName("mint_denom") - fd_Params_inflation_rate_change = md_Params.Fields().ByName("inflation_rate_change") - fd_Params_inflation_max = md_Params.Fields().ByName("inflation_max") - fd_Params_inflation_min = md_Params.Fields().ByName("inflation_min") - fd_Params_goal_bonded = md_Params.Fields().ByName("goal_bonded") - fd_Params_blocks_per_year = md_Params.Fields().ByName("blocks_per_year") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_mint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MintDenom != "" { - value := protoreflect.ValueOfString(x.MintDenom) - if !f(fd_Params_mint_denom, value) { - return - } - } - if x.InflationRateChange != "" { - value := protoreflect.ValueOfString(x.InflationRateChange) - if !f(fd_Params_inflation_rate_change, value) { - return - } - } - if x.InflationMax != "" { - value := protoreflect.ValueOfString(x.InflationMax) - if !f(fd_Params_inflation_max, value) { - return - } - } - if x.InflationMin != "" { - value := protoreflect.ValueOfString(x.InflationMin) - if !f(fd_Params_inflation_min, value) { - return - } - } - if x.GoalBonded != "" { - value := protoreflect.ValueOfString(x.GoalBonded) - if !f(fd_Params_goal_bonded, value) { - return - } - } - if x.BlocksPerYear != uint64(0) { - value := protoreflect.ValueOfUint64(x.BlocksPerYear) - if !f(fd_Params_blocks_per_year, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Params.mint_denom": - return x.MintDenom != "" - case "cosmos.mint.v1beta1.Params.inflation_rate_change": - return x.InflationRateChange != "" - case "cosmos.mint.v1beta1.Params.inflation_max": - return x.InflationMax != "" - case "cosmos.mint.v1beta1.Params.inflation_min": - return x.InflationMin != "" - case "cosmos.mint.v1beta1.Params.goal_bonded": - return x.GoalBonded != "" - case "cosmos.mint.v1beta1.Params.blocks_per_year": - return x.BlocksPerYear != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Params.mint_denom": - x.MintDenom = "" - case "cosmos.mint.v1beta1.Params.inflation_rate_change": - x.InflationRateChange = "" - case "cosmos.mint.v1beta1.Params.inflation_max": - x.InflationMax = "" - case "cosmos.mint.v1beta1.Params.inflation_min": - x.InflationMin = "" - case "cosmos.mint.v1beta1.Params.goal_bonded": - x.GoalBonded = "" - case "cosmos.mint.v1beta1.Params.blocks_per_year": - x.BlocksPerYear = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.mint.v1beta1.Params.mint_denom": - value := x.MintDenom - return protoreflect.ValueOfString(value) - case "cosmos.mint.v1beta1.Params.inflation_rate_change": - value := x.InflationRateChange - return protoreflect.ValueOfString(value) - case "cosmos.mint.v1beta1.Params.inflation_max": - value := x.InflationMax - return protoreflect.ValueOfString(value) - case "cosmos.mint.v1beta1.Params.inflation_min": - value := x.InflationMin - return protoreflect.ValueOfString(value) - case "cosmos.mint.v1beta1.Params.goal_bonded": - value := x.GoalBonded - return protoreflect.ValueOfString(value) - case "cosmos.mint.v1beta1.Params.blocks_per_year": - value := x.BlocksPerYear - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Params.mint_denom": - x.MintDenom = value.Interface().(string) - case "cosmos.mint.v1beta1.Params.inflation_rate_change": - x.InflationRateChange = value.Interface().(string) - case "cosmos.mint.v1beta1.Params.inflation_max": - x.InflationMax = value.Interface().(string) - case "cosmos.mint.v1beta1.Params.inflation_min": - x.InflationMin = value.Interface().(string) - case "cosmos.mint.v1beta1.Params.goal_bonded": - x.GoalBonded = value.Interface().(string) - case "cosmos.mint.v1beta1.Params.blocks_per_year": - x.BlocksPerYear = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Params.mint_denom": - panic(fmt.Errorf("field mint_denom of message cosmos.mint.v1beta1.Params is not mutable")) - case "cosmos.mint.v1beta1.Params.inflation_rate_change": - panic(fmt.Errorf("field inflation_rate_change of message cosmos.mint.v1beta1.Params is not mutable")) - case "cosmos.mint.v1beta1.Params.inflation_max": - panic(fmt.Errorf("field inflation_max of message cosmos.mint.v1beta1.Params is not mutable")) - case "cosmos.mint.v1beta1.Params.inflation_min": - panic(fmt.Errorf("field inflation_min of message cosmos.mint.v1beta1.Params is not mutable")) - case "cosmos.mint.v1beta1.Params.goal_bonded": - panic(fmt.Errorf("field goal_bonded of message cosmos.mint.v1beta1.Params is not mutable")) - case "cosmos.mint.v1beta1.Params.blocks_per_year": - panic(fmt.Errorf("field blocks_per_year of message cosmos.mint.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.Params.mint_denom": - return protoreflect.ValueOfString("") - case "cosmos.mint.v1beta1.Params.inflation_rate_change": - return protoreflect.ValueOfString("") - case "cosmos.mint.v1beta1.Params.inflation_max": - return protoreflect.ValueOfString("") - case "cosmos.mint.v1beta1.Params.inflation_min": - return protoreflect.ValueOfString("") - case "cosmos.mint.v1beta1.Params.goal_bonded": - return protoreflect.ValueOfString("") - case "cosmos.mint.v1beta1.Params.blocks_per_year": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.MintDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InflationRateChange) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InflationMax) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InflationMin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GoalBonded) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BlocksPerYear != 0 { - n += 1 + runtime.Sov(uint64(x.BlocksPerYear)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.BlocksPerYear != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlocksPerYear)) - i-- - dAtA[i] = 0x30 - } - if len(x.GoalBonded) > 0 { - i -= len(x.GoalBonded) - copy(dAtA[i:], x.GoalBonded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GoalBonded))) - i-- - dAtA[i] = 0x2a - } - if len(x.InflationMin) > 0 { - i -= len(x.InflationMin) - copy(dAtA[i:], x.InflationMin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InflationMin))) - i-- - dAtA[i] = 0x22 - } - if len(x.InflationMax) > 0 { - i -= len(x.InflationMax) - copy(dAtA[i:], x.InflationMax) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InflationMax))) - i-- - dAtA[i] = 0x1a - } - if len(x.InflationRateChange) > 0 { - i -= len(x.InflationRateChange) - copy(dAtA[i:], x.InflationRateChange) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InflationRateChange))) - i-- - dAtA[i] = 0x12 - } - if len(x.MintDenom) > 0 { - i -= len(x.MintDenom) - copy(dAtA[i:], x.MintDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MintDenom))) - 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().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MintDenom", 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.MintDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InflationRateChange", 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.InflationRateChange = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InflationMax", 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.InflationMax = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InflationMin", 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.InflationMin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GoalBonded", 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.GoalBonded = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlocksPerYear", wireType) - } - x.BlocksPerYear = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlocksPerYear |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/mint/v1beta1/mint.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Minter represents the minting state. -type Minter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // current annual inflation rate - Inflation string `protobuf:"bytes,1,opt,name=inflation,proto3" json:"inflation,omitempty"` - // current annual expected provisions - AnnualProvisions string `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3" json:"annual_provisions,omitempty"` -} - -func (x *Minter) Reset() { - *x = Minter{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_mint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Minter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Minter) ProtoMessage() {} - -// Deprecated: Use Minter.ProtoReflect.Descriptor instead. -func (*Minter) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_mint_proto_rawDescGZIP(), []int{0} -} - -func (x *Minter) GetInflation() string { - if x != nil { - return x.Inflation - } - return "" -} - -func (x *Minter) GetAnnualProvisions() string { - if x != nil { - return x.AnnualProvisions - } - return "" -} - -// Params holds parameters for the mint module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // type of coin to mint - MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` - // maximum annual change in inflation rate - InflationRateChange string `protobuf:"bytes,2,opt,name=inflation_rate_change,json=inflationRateChange,proto3" json:"inflation_rate_change,omitempty"` - // maximum inflation rate - InflationMax string `protobuf:"bytes,3,opt,name=inflation_max,json=inflationMax,proto3" json:"inflation_max,omitempty"` - // minimum inflation rate - InflationMin string `protobuf:"bytes,4,opt,name=inflation_min,json=inflationMin,proto3" json:"inflation_min,omitempty"` - // goal of percent bonded atoms - GoalBonded string `protobuf:"bytes,5,opt,name=goal_bonded,json=goalBonded,proto3" json:"goal_bonded,omitempty"` - // expected blocks per year - BlocksPerYear uint64 `protobuf:"varint,6,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_mint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_mint_proto_rawDescGZIP(), []int{1} -} - -func (x *Params) GetMintDenom() string { - if x != nil { - return x.MintDenom - } - return "" -} - -func (x *Params) GetInflationRateChange() string { - if x != nil { - return x.InflationRateChange - } - return "" -} - -func (x *Params) GetInflationMax() string { - if x != nil { - return x.InflationMax - } - return "" -} - -func (x *Params) GetInflationMin() string { - if x != nil { - return x.InflationMin - } - return "" -} - -func (x *Params) GetGoalBonded() string { - if x != nil { - return x.GoalBonded - } - return "" -} - -func (x *Params) GetBlocksPerYear() uint64 { - if x != nil { - return x.BlocksPerYear - } - return 0 -} - -var File_cosmos_mint_v1beta1_mint_proto protoreflect.FileDescriptor - -var file_cosmos_mint_v1beta1_mint_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x5a, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, - 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xec, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x74, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x70, 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x61, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, 0x69, 0x6e, 0x66, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x12, 0x61, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, 0x69, 0x6e, - 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x0b, 0x67, 0x6f, - 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x67, - 0x6f, 0x61, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x65, 0x72, 0x59, 0x65, 0x61, - 0x72, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xd4, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x09, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, - 0x6e, 0x74, 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, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_mint_v1beta1_mint_proto_rawDescOnce sync.Once - file_cosmos_mint_v1beta1_mint_proto_rawDescData = file_cosmos_mint_v1beta1_mint_proto_rawDesc -) - -func file_cosmos_mint_v1beta1_mint_proto_rawDescGZIP() []byte { - file_cosmos_mint_v1beta1_mint_proto_rawDescOnce.Do(func() { - file_cosmos_mint_v1beta1_mint_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_mint_v1beta1_mint_proto_rawDescData) - }) - return file_cosmos_mint_v1beta1_mint_proto_rawDescData -} - -var file_cosmos_mint_v1beta1_mint_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_mint_v1beta1_mint_proto_goTypes = []interface{}{ - (*Minter)(nil), // 0: cosmos.mint.v1beta1.Minter - (*Params)(nil), // 1: cosmos.mint.v1beta1.Params -} -var file_cosmos_mint_v1beta1_mint_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_mint_v1beta1_mint_proto_init() } -func file_cosmos_mint_v1beta1_mint_proto_init() { - if File_cosmos_mint_v1beta1_mint_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_mint_v1beta1_mint_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Minter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_mint_v1beta1_mint_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_mint_v1beta1_mint_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_mint_v1beta1_mint_proto_goTypes, - DependencyIndexes: file_cosmos_mint_v1beta1_mint_proto_depIdxs, - MessageInfos: file_cosmos_mint_v1beta1_mint_proto_msgTypes, - }.Build() - File_cosmos_mint_v1beta1_mint_proto = out.File - file_cosmos_mint_v1beta1_mint_proto_rawDesc = nil - file_cosmos_mint_v1beta1_mint_proto_goTypes = nil - file_cosmos_mint_v1beta1_mint_proto_depIdxs = nil -} diff --git a/api/cosmos/mint/v1beta1/query.pulsar.go b/api/cosmos/mint/v1beta1/query.pulsar.go deleted file mode 100644 index a63353a12c89..000000000000 --- a/api/cosmos/mint/v1beta1/query.pulsar.go +++ /dev/null @@ -1,2788 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package mintv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_mint_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.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_mint_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_mint_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_mint_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.mint.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.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.mint.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.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.mint.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.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.mint.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.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.mint.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_QueryInflationRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_query_proto_init() - md_QueryInflationRequest = File_cosmos_mint_v1beta1_query_proto.Messages().ByName("QueryInflationRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryInflationRequest)(nil) - -type fastReflection_QueryInflationRequest QueryInflationRequest - -func (x *QueryInflationRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryInflationRequest)(x) -} - -func (x *QueryInflationRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryInflationRequest_messageType fastReflection_QueryInflationRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryInflationRequest_messageType{} - -type fastReflection_QueryInflationRequest_messageType struct{} - -func (x fastReflection_QueryInflationRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryInflationRequest)(nil) -} -func (x fastReflection_QueryInflationRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryInflationRequest) -} -func (x fastReflection_QueryInflationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInflationRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryInflationRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInflationRequest -} - -// 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_QueryInflationRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryInflationRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryInflationRequest) New() protoreflect.Message { - return new(fastReflection_QueryInflationRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryInflationRequest) Interface() protoreflect.ProtoMessage { - return (*QueryInflationRequest)(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_QueryInflationRequest) 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_QueryInflationRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationRequest 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_QueryInflationRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationRequest 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_QueryInflationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationRequest 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_QueryInflationRequest) 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.mint.v1beta1.QueryInflationRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationRequest 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_QueryInflationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationRequest 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_QueryInflationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationRequest 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_QueryInflationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.QueryInflationRequest", 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_QueryInflationRequest) 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_QueryInflationRequest) 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_QueryInflationRequest) 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_QueryInflationRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryInflationRequest) - 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().(*QueryInflationRequest) - 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().(*QueryInflationRequest) - 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: QueryInflationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInflationRequest: 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_QueryInflationResponse protoreflect.MessageDescriptor - fd_QueryInflationResponse_inflation protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_query_proto_init() - md_QueryInflationResponse = File_cosmos_mint_v1beta1_query_proto.Messages().ByName("QueryInflationResponse") - fd_QueryInflationResponse_inflation = md_QueryInflationResponse.Fields().ByName("inflation") -} - -var _ protoreflect.Message = (*fastReflection_QueryInflationResponse)(nil) - -type fastReflection_QueryInflationResponse QueryInflationResponse - -func (x *QueryInflationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryInflationResponse)(x) -} - -func (x *QueryInflationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryInflationResponse_messageType fastReflection_QueryInflationResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryInflationResponse_messageType{} - -type fastReflection_QueryInflationResponse_messageType struct{} - -func (x fastReflection_QueryInflationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryInflationResponse)(nil) -} -func (x fastReflection_QueryInflationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryInflationResponse) -} -func (x fastReflection_QueryInflationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInflationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryInflationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInflationResponse -} - -// 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_QueryInflationResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryInflationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryInflationResponse) New() protoreflect.Message { - return new(fastReflection_QueryInflationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryInflationResponse) Interface() protoreflect.ProtoMessage { - return (*QueryInflationResponse)(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_QueryInflationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Inflation) != 0 { - value := protoreflect.ValueOfBytes(x.Inflation) - if !f(fd_QueryInflationResponse_inflation, 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_QueryInflationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryInflationResponse.inflation": - return len(x.Inflation) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationResponse 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_QueryInflationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryInflationResponse.inflation": - x.Inflation = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationResponse 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_QueryInflationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.mint.v1beta1.QueryInflationResponse.inflation": - value := x.Inflation - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationResponse 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_QueryInflationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryInflationResponse.inflation": - x.Inflation = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationResponse 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_QueryInflationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryInflationResponse.inflation": - panic(fmt.Errorf("field inflation of message cosmos.mint.v1beta1.QueryInflationResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationResponse 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_QueryInflationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryInflationResponse.inflation": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryInflationResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryInflationResponse 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_QueryInflationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.QueryInflationResponse", 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_QueryInflationResponse) 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_QueryInflationResponse) 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_QueryInflationResponse) 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_QueryInflationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryInflationResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Inflation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryInflationResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Inflation) > 0 { - i -= len(x.Inflation) - copy(dAtA[i:], x.Inflation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Inflation))) - 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().(*QueryInflationResponse) - 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: QueryInflationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInflationResponse: 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 Inflation", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Inflation = append(x.Inflation[:0], dAtA[iNdEx:postIndex]...) - if x.Inflation == nil { - x.Inflation = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAnnualProvisionsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_query_proto_init() - md_QueryAnnualProvisionsRequest = File_cosmos_mint_v1beta1_query_proto.Messages().ByName("QueryAnnualProvisionsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryAnnualProvisionsRequest)(nil) - -type fastReflection_QueryAnnualProvisionsRequest QueryAnnualProvisionsRequest - -func (x *QueryAnnualProvisionsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAnnualProvisionsRequest)(x) -} - -func (x *QueryAnnualProvisionsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAnnualProvisionsRequest_messageType fastReflection_QueryAnnualProvisionsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAnnualProvisionsRequest_messageType{} - -type fastReflection_QueryAnnualProvisionsRequest_messageType struct{} - -func (x fastReflection_QueryAnnualProvisionsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAnnualProvisionsRequest)(nil) -} -func (x fastReflection_QueryAnnualProvisionsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAnnualProvisionsRequest) -} -func (x fastReflection_QueryAnnualProvisionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAnnualProvisionsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAnnualProvisionsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAnnualProvisionsRequest -} - -// 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_QueryAnnualProvisionsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAnnualProvisionsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAnnualProvisionsRequest) New() protoreflect.Message { - return new(fastReflection_QueryAnnualProvisionsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAnnualProvisionsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAnnualProvisionsRequest)(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_QueryAnnualProvisionsRequest) 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_QueryAnnualProvisionsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsRequest 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_QueryAnnualProvisionsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsRequest 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_QueryAnnualProvisionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsRequest 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_QueryAnnualProvisionsRequest) 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.mint.v1beta1.QueryAnnualProvisionsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsRequest 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_QueryAnnualProvisionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsRequest 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_QueryAnnualProvisionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsRequest 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_QueryAnnualProvisionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", 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_QueryAnnualProvisionsRequest) 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_QueryAnnualProvisionsRequest) 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_QueryAnnualProvisionsRequest) 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_QueryAnnualProvisionsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAnnualProvisionsRequest) - 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().(*QueryAnnualProvisionsRequest) - 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().(*QueryAnnualProvisionsRequest) - 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: QueryAnnualProvisionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnnualProvisionsRequest: 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_QueryAnnualProvisionsResponse protoreflect.MessageDescriptor - fd_QueryAnnualProvisionsResponse_annual_provisions protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_mint_v1beta1_query_proto_init() - md_QueryAnnualProvisionsResponse = File_cosmos_mint_v1beta1_query_proto.Messages().ByName("QueryAnnualProvisionsResponse") - fd_QueryAnnualProvisionsResponse_annual_provisions = md_QueryAnnualProvisionsResponse.Fields().ByName("annual_provisions") -} - -var _ protoreflect.Message = (*fastReflection_QueryAnnualProvisionsResponse)(nil) - -type fastReflection_QueryAnnualProvisionsResponse QueryAnnualProvisionsResponse - -func (x *QueryAnnualProvisionsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAnnualProvisionsResponse)(x) -} - -func (x *QueryAnnualProvisionsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_mint_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_QueryAnnualProvisionsResponse_messageType fastReflection_QueryAnnualProvisionsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAnnualProvisionsResponse_messageType{} - -type fastReflection_QueryAnnualProvisionsResponse_messageType struct{} - -func (x fastReflection_QueryAnnualProvisionsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAnnualProvisionsResponse)(nil) -} -func (x fastReflection_QueryAnnualProvisionsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAnnualProvisionsResponse) -} -func (x fastReflection_QueryAnnualProvisionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAnnualProvisionsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAnnualProvisionsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAnnualProvisionsResponse -} - -// 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_QueryAnnualProvisionsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAnnualProvisionsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAnnualProvisionsResponse) New() protoreflect.Message { - return new(fastReflection_QueryAnnualProvisionsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAnnualProvisionsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAnnualProvisionsResponse)(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_QueryAnnualProvisionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AnnualProvisions) != 0 { - value := protoreflect.ValueOfBytes(x.AnnualProvisions) - if !f(fd_QueryAnnualProvisionsResponse_annual_provisions, 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_QueryAnnualProvisionsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.annual_provisions": - return len(x.AnnualProvisions) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse 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_QueryAnnualProvisionsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.annual_provisions": - x.AnnualProvisions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse 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_QueryAnnualProvisionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.annual_provisions": - value := x.AnnualProvisions - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse 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_QueryAnnualProvisionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.annual_provisions": - x.AnnualProvisions = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse 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_QueryAnnualProvisionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.annual_provisions": - panic(fmt.Errorf("field annual_provisions of message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse 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_QueryAnnualProvisionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.annual_provisions": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")) - } - panic(fmt.Errorf("message cosmos.mint.v1beta1.QueryAnnualProvisionsResponse 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_QueryAnnualProvisionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", 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_QueryAnnualProvisionsResponse) 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_QueryAnnualProvisionsResponse) 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_QueryAnnualProvisionsResponse) 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_QueryAnnualProvisionsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAnnualProvisionsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.AnnualProvisions) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAnnualProvisionsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AnnualProvisions) > 0 { - i -= len(x.AnnualProvisions) - copy(dAtA[i:], x.AnnualProvisions) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AnnualProvisions))) - 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().(*QueryAnnualProvisionsResponse) - 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: QueryAnnualProvisionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnnualProvisionsResponse: 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 AnnualProvisions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AnnualProvisions = append(x.AnnualProvisions[:0], dAtA[iNdEx:postIndex]...) - if x.AnnualProvisions == nil { - x.AnnualProvisions = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/mint/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryInflationRequest is the request type for the Query/Inflation RPC method. -type QueryInflationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryInflationRequest) Reset() { - *x = QueryInflationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryInflationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryInflationRequest) ProtoMessage() {} - -// Deprecated: Use QueryInflationRequest.ProtoReflect.Descriptor instead. -func (*QueryInflationRequest) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -type QueryInflationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // inflation is the current minting inflation value. - Inflation []byte `protobuf:"bytes,1,opt,name=inflation,proto3" json:"inflation,omitempty"` -} - -func (x *QueryInflationResponse) Reset() { - *x = QueryInflationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryInflationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryInflationResponse) ProtoMessage() {} - -// Deprecated: Use QueryInflationResponse.ProtoReflect.Descriptor instead. -func (*QueryInflationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryInflationResponse) GetInflation() []byte { - if x != nil { - return x.Inflation - } - return nil -} - -// QueryAnnualProvisionsRequest is the request type for the -// Query/AnnualProvisions RPC method. -type QueryAnnualProvisionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryAnnualProvisionsRequest) Reset() { - *x = QueryAnnualProvisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAnnualProvisionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAnnualProvisionsRequest) ProtoMessage() {} - -// Deprecated: Use QueryAnnualProvisionsRequest.ProtoReflect.Descriptor instead. -func (*QueryAnnualProvisionsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -type QueryAnnualProvisionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // annual_provisions is the current minting annual provisions value. - AnnualProvisions []byte `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3" json:"annual_provisions,omitempty"` -} - -func (x *QueryAnnualProvisionsResponse) Reset() { - *x = QueryAnnualProvisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_mint_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAnnualProvisionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAnnualProvisionsResponse) ProtoMessage() {} - -// Deprecated: Use QueryAnnualProvisionsResponse.ProtoReflect.Descriptor instead. -func (*QueryAnnualProvisionsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_mint_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryAnnualProvisionsResponse) GetAnnualProvisions() []byte { - if x != nil { - return x.AnnualProvisions - } - return nil -} - -var File_cosmos_mint_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_mint_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, - 0x65, 0x72, 0x79, 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, 0x6d, 0x69, 0x6e, 0x74, 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, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x16, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x7c, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x6e, 0x75, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x32, 0xc5, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x6d, 0x69, 0x6e, 0x74, 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, 0x6d, 0x69, 0x6e, 0x74, 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, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x8c, - 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa9, 0x01, - 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, - 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xd5, 0x01, 0x0a, 0x17, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x4d, 0x69, 0x6e, 0x74, 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, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_mint_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_mint_v1beta1_query_proto_rawDescData = file_cosmos_mint_v1beta1_query_proto_rawDesc -) - -func file_cosmos_mint_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_mint_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_mint_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_mint_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_mint_v1beta1_query_proto_rawDescData -} - -var file_cosmos_mint_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_mint_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.mint.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.mint.v1beta1.QueryParamsResponse - (*QueryInflationRequest)(nil), // 2: cosmos.mint.v1beta1.QueryInflationRequest - (*QueryInflationResponse)(nil), // 3: cosmos.mint.v1beta1.QueryInflationResponse - (*QueryAnnualProvisionsRequest)(nil), // 4: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest - (*QueryAnnualProvisionsResponse)(nil), // 5: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse - (*Params)(nil), // 6: cosmos.mint.v1beta1.Params -} -var file_cosmos_mint_v1beta1_query_proto_depIdxs = []int32{ - 6, // 0: cosmos.mint.v1beta1.QueryParamsResponse.params:type_name -> cosmos.mint.v1beta1.Params - 0, // 1: cosmos.mint.v1beta1.Query.Params:input_type -> cosmos.mint.v1beta1.QueryParamsRequest - 2, // 2: cosmos.mint.v1beta1.Query.Inflation:input_type -> cosmos.mint.v1beta1.QueryInflationRequest - 4, // 3: cosmos.mint.v1beta1.Query.AnnualProvisions:input_type -> cosmos.mint.v1beta1.QueryAnnualProvisionsRequest - 1, // 4: cosmos.mint.v1beta1.Query.Params:output_type -> cosmos.mint.v1beta1.QueryParamsResponse - 3, // 5: cosmos.mint.v1beta1.Query.Inflation:output_type -> cosmos.mint.v1beta1.QueryInflationResponse - 5, // 6: cosmos.mint.v1beta1.Query.AnnualProvisions:output_type -> cosmos.mint.v1beta1.QueryAnnualProvisionsResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_mint_v1beta1_query_proto_init() } -func file_cosmos_mint_v1beta1_query_proto_init() { - if File_cosmos_mint_v1beta1_query_proto != nil { - return - } - file_cosmos_mint_v1beta1_mint_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_mint_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_mint_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_mint_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryInflationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_mint_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryInflationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_mint_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAnnualProvisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_mint_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAnnualProvisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_mint_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_mint_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_mint_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_mint_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_mint_v1beta1_query_proto = out.File - file_cosmos_mint_v1beta1_query_proto_rawDesc = nil - file_cosmos_mint_v1beta1_query_proto_goTypes = nil - file_cosmos_mint_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/mint/v1beta1/query_grpc.pb.go b/api/cosmos/mint/v1beta1/query_grpc.pb.go deleted file mode 100644 index ff5af8d9df65..000000000000 --- a/api/cosmos/mint/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/mint/v1beta1/query.proto - -package mintv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Params returns the total set of minting parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Inflation returns the current minting inflation value. - Inflation(ctx context.Context, in *QueryInflationRequest, opts ...grpc.CallOption) (*QueryInflationResponse, error) - // AnnualProvisions current minting annual provisions value. - AnnualProvisions(ctx context.Context, in *QueryAnnualProvisionsRequest, opts ...grpc.CallOption) (*QueryAnnualProvisionsResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Inflation(ctx context.Context, in *QueryInflationRequest, opts ...grpc.CallOption) (*QueryInflationResponse, error) { - out := new(QueryInflationResponse) - err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Query/Inflation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AnnualProvisions(ctx context.Context, in *QueryAnnualProvisionsRequest, opts ...grpc.CallOption) (*QueryAnnualProvisionsResponse, error) { - out := new(QueryAnnualProvisionsResponse) - err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Query/AnnualProvisions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Params returns the total set of minting parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Inflation returns the current minting inflation value. - Inflation(context.Context, *QueryInflationRequest) (*QueryInflationResponse, error) - // AnnualProvisions current minting annual provisions value. - AnnualProvisions(context.Context, *QueryAnnualProvisionsRequest) (*QueryAnnualProvisionsResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) Inflation(context.Context, *QueryInflationRequest) (*QueryInflationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Inflation not implemented") -} -func (UnimplementedQueryServer) AnnualProvisions(context.Context, *QueryAnnualProvisionsRequest) (*QueryAnnualProvisionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AnnualProvisions not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.mint.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Inflation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryInflationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Inflation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.mint.v1beta1.Query/Inflation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Inflation(ctx, req.(*QueryInflationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AnnualProvisions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAnnualProvisionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AnnualProvisions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.mint.v1beta1.Query/AnnualProvisions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AnnualProvisions(ctx, req.(*QueryAnnualProvisionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.mint.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Inflation", - Handler: _Query_Inflation_Handler, - }, - { - MethodName: "AnnualProvisions", - Handler: _Query_AnnualProvisions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/mint/v1beta1/query.proto", -} diff --git a/api/cosmos/msg/v1/msg.pulsar.go b/api/cosmos/msg/v1/msg.pulsar.go deleted file mode 100644 index cd11d0dfeae5..000000000000 --- a/api/cosmos/msg/v1/msg.pulsar.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package msgv1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/msg/v1/msg.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_cosmos_msg_v1_msg_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: ([]string)(nil), - Field: 11110000, - Name: "cosmos.msg.v1.signer", - Tag: "bytes,11110000,rep,name=signer", - Filename: "cosmos/msg/v1/msg.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // signer must be used in cosmos messages in order - // to signal to external clients which fields in a - // given cosmos message must be filled with signer - // information (address). - // The field must be the protobuf name of the message - // field extended with this MessageOption. - // The field must either be of string kind, or of message - // kind in case the signer information is contained within - // a message inside the cosmos message. - // - // repeated string signer = 11110000; - E_Signer = &file_cosmos_msg_v1_msg_proto_extTypes[0] -) - -var File_cosmos_msg_v1_msg_proto protoreflect.FileDescriptor - -var file_cosmos_msg_v1_msg_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x0a, 0x06, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf0, 0x8c, 0xa6, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x4d, 0x73, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x73, 0x67, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4d, 0x73, - 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x73, - 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x73, - 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4d, 0x73, 0x67, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_cosmos_msg_v1_msg_proto_goTypes = []interface{}{ - (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions -} -var file_cosmos_msg_v1_msg_proto_depIdxs = []int32{ - 0, // 0: cosmos.msg.v1.signer:extendee -> google.protobuf.MessageOptions - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_msg_v1_msg_proto_init() } -func file_cosmos_msg_v1_msg_proto_init() { - if File_cosmos_msg_v1_msg_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_msg_v1_msg_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_cosmos_msg_v1_msg_proto_goTypes, - DependencyIndexes: file_cosmos_msg_v1_msg_proto_depIdxs, - ExtensionInfos: file_cosmos_msg_v1_msg_proto_extTypes, - }.Build() - File_cosmos_msg_v1_msg_proto = out.File - file_cosmos_msg_v1_msg_proto_rawDesc = nil - file_cosmos_msg_v1_msg_proto_goTypes = nil - file_cosmos_msg_v1_msg_proto_depIdxs = nil -} diff --git a/api/cosmos/nft/v1beta1/event.pulsar.go b/api/cosmos/nft/v1beta1/event.pulsar.go deleted file mode 100644 index 3aa4241f7e50..000000000000 --- a/api/cosmos/nft/v1beta1/event.pulsar.go +++ /dev/null @@ -1,2026 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package nftv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_EventSend protoreflect.MessageDescriptor - fd_EventSend_class_id protoreflect.FieldDescriptor - fd_EventSend_id protoreflect.FieldDescriptor - fd_EventSend_sender protoreflect.FieldDescriptor - fd_EventSend_receiver protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_event_proto_init() - md_EventSend = File_cosmos_nft_v1beta1_event_proto.Messages().ByName("EventSend") - fd_EventSend_class_id = md_EventSend.Fields().ByName("class_id") - fd_EventSend_id = md_EventSend.Fields().ByName("id") - fd_EventSend_sender = md_EventSend.Fields().ByName("sender") - fd_EventSend_receiver = md_EventSend.Fields().ByName("receiver") -} - -var _ protoreflect.Message = (*fastReflection_EventSend)(nil) - -type fastReflection_EventSend EventSend - -func (x *EventSend) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventSend)(x) -} - -func (x *EventSend) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventSend_messageType fastReflection_EventSend_messageType -var _ protoreflect.MessageType = fastReflection_EventSend_messageType{} - -type fastReflection_EventSend_messageType struct{} - -func (x fastReflection_EventSend_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventSend)(nil) -} -func (x fastReflection_EventSend_messageType) New() protoreflect.Message { - return new(fastReflection_EventSend) -} -func (x fastReflection_EventSend_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventSend -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventSend) Descriptor() protoreflect.MessageDescriptor { - return md_EventSend -} - -// 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_EventSend) Type() protoreflect.MessageType { - return _fastReflection_EventSend_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventSend) New() protoreflect.Message { - return new(fastReflection_EventSend) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventSend) Interface() protoreflect.ProtoMessage { - return (*EventSend)(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_EventSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_EventSend_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_EventSend_id, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_EventSend_sender, value) { - return - } - } - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_EventSend_receiver, 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_EventSend) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventSend.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.EventSend.id": - return x.Id != "" - case "cosmos.nft.v1beta1.EventSend.sender": - return x.Sender != "" - case "cosmos.nft.v1beta1.EventSend.receiver": - return x.Receiver != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventSend 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_EventSend) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventSend.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.EventSend.id": - x.Id = "" - case "cosmos.nft.v1beta1.EventSend.sender": - x.Sender = "" - case "cosmos.nft.v1beta1.EventSend.receiver": - x.Receiver = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventSend 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_EventSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.EventSend.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventSend.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventSend.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventSend.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventSend 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_EventSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventSend.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.EventSend.id": - x.Id = value.Interface().(string) - case "cosmos.nft.v1beta1.EventSend.sender": - x.Sender = value.Interface().(string) - case "cosmos.nft.v1beta1.EventSend.receiver": - x.Receiver = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventSend 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_EventSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventSend.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.EventSend is not mutable")) - case "cosmos.nft.v1beta1.EventSend.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.EventSend is not mutable")) - case "cosmos.nft.v1beta1.EventSend.sender": - panic(fmt.Errorf("field sender of message cosmos.nft.v1beta1.EventSend is not mutable")) - case "cosmos.nft.v1beta1.EventSend.receiver": - panic(fmt.Errorf("field receiver of message cosmos.nft.v1beta1.EventSend is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventSend 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_EventSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventSend.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventSend.id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventSend.sender": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventSend.receiver": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventSend 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_EventSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.EventSend", 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_EventSend) 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_EventSend) 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_EventSend) 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_EventSend) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventSend) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventSend) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0x22 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*EventSend) - 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: EventSend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSend: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventMint protoreflect.MessageDescriptor - fd_EventMint_class_id protoreflect.FieldDescriptor - fd_EventMint_id protoreflect.FieldDescriptor - fd_EventMint_owner protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_event_proto_init() - md_EventMint = File_cosmos_nft_v1beta1_event_proto.Messages().ByName("EventMint") - fd_EventMint_class_id = md_EventMint.Fields().ByName("class_id") - fd_EventMint_id = md_EventMint.Fields().ByName("id") - fd_EventMint_owner = md_EventMint.Fields().ByName("owner") -} - -var _ protoreflect.Message = (*fastReflection_EventMint)(nil) - -type fastReflection_EventMint EventMint - -func (x *EventMint) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventMint)(x) -} - -func (x *EventMint) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventMint_messageType fastReflection_EventMint_messageType -var _ protoreflect.MessageType = fastReflection_EventMint_messageType{} - -type fastReflection_EventMint_messageType struct{} - -func (x fastReflection_EventMint_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventMint)(nil) -} -func (x fastReflection_EventMint_messageType) New() protoreflect.Message { - return new(fastReflection_EventMint) -} -func (x fastReflection_EventMint_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventMint -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventMint) Descriptor() protoreflect.MessageDescriptor { - return md_EventMint -} - -// 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_EventMint) Type() protoreflect.MessageType { - return _fastReflection_EventMint_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventMint) New() protoreflect.Message { - return new(fastReflection_EventMint) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventMint) Interface() protoreflect.ProtoMessage { - return (*EventMint)(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_EventMint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_EventMint_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_EventMint_id, value) { - return - } - } - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_EventMint_owner, 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_EventMint) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventMint.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.EventMint.id": - return x.Id != "" - case "cosmos.nft.v1beta1.EventMint.owner": - return x.Owner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventMint")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventMint 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_EventMint) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventMint.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.EventMint.id": - x.Id = "" - case "cosmos.nft.v1beta1.EventMint.owner": - x.Owner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventMint")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventMint 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_EventMint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.EventMint.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventMint.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventMint.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventMint")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventMint 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_EventMint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventMint.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.EventMint.id": - x.Id = value.Interface().(string) - case "cosmos.nft.v1beta1.EventMint.owner": - x.Owner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventMint")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventMint 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_EventMint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventMint.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.EventMint is not mutable")) - case "cosmos.nft.v1beta1.EventMint.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.EventMint is not mutable")) - case "cosmos.nft.v1beta1.EventMint.owner": - panic(fmt.Errorf("field owner of message cosmos.nft.v1beta1.EventMint is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventMint")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventMint 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_EventMint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventMint.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventMint.id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventMint.owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventMint")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventMint 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_EventMint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.EventMint", 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_EventMint) 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_EventMint) 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_EventMint) 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_EventMint) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventMint) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventMint) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*EventMint) - 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: EventMint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventMint: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventBurn protoreflect.MessageDescriptor - fd_EventBurn_class_id protoreflect.FieldDescriptor - fd_EventBurn_id protoreflect.FieldDescriptor - fd_EventBurn_owner protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_event_proto_init() - md_EventBurn = File_cosmos_nft_v1beta1_event_proto.Messages().ByName("EventBurn") - fd_EventBurn_class_id = md_EventBurn.Fields().ByName("class_id") - fd_EventBurn_id = md_EventBurn.Fields().ByName("id") - fd_EventBurn_owner = md_EventBurn.Fields().ByName("owner") -} - -var _ protoreflect.Message = (*fastReflection_EventBurn)(nil) - -type fastReflection_EventBurn EventBurn - -func (x *EventBurn) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventBurn)(x) -} - -func (x *EventBurn) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventBurn_messageType fastReflection_EventBurn_messageType -var _ protoreflect.MessageType = fastReflection_EventBurn_messageType{} - -type fastReflection_EventBurn_messageType struct{} - -func (x fastReflection_EventBurn_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventBurn)(nil) -} -func (x fastReflection_EventBurn_messageType) New() protoreflect.Message { - return new(fastReflection_EventBurn) -} -func (x fastReflection_EventBurn_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventBurn -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventBurn) Descriptor() protoreflect.MessageDescriptor { - return md_EventBurn -} - -// 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_EventBurn) Type() protoreflect.MessageType { - return _fastReflection_EventBurn_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventBurn) New() protoreflect.Message { - return new(fastReflection_EventBurn) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventBurn) Interface() protoreflect.ProtoMessage { - return (*EventBurn)(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_EventBurn) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_EventBurn_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_EventBurn_id, value) { - return - } - } - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_EventBurn_owner, 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_EventBurn) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventBurn.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.EventBurn.id": - return x.Id != "" - case "cosmos.nft.v1beta1.EventBurn.owner": - return x.Owner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventBurn")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventBurn 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_EventBurn) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventBurn.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.EventBurn.id": - x.Id = "" - case "cosmos.nft.v1beta1.EventBurn.owner": - x.Owner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventBurn")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventBurn 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_EventBurn) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.EventBurn.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventBurn.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.EventBurn.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventBurn")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventBurn 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_EventBurn) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventBurn.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.EventBurn.id": - x.Id = value.Interface().(string) - case "cosmos.nft.v1beta1.EventBurn.owner": - x.Owner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventBurn")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventBurn 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_EventBurn) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventBurn.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.EventBurn is not mutable")) - case "cosmos.nft.v1beta1.EventBurn.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.EventBurn is not mutable")) - case "cosmos.nft.v1beta1.EventBurn.owner": - panic(fmt.Errorf("field owner of message cosmos.nft.v1beta1.EventBurn is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventBurn")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventBurn 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_EventBurn) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.EventBurn.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventBurn.id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.EventBurn.owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.EventBurn")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.EventBurn 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_EventBurn) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.EventBurn", 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_EventBurn) 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_EventBurn) 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_EventBurn) 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_EventBurn) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventBurn) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventBurn) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*EventBurn) - 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: EventBurn: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventBurn: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/nft/v1beta1/event.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// EventSend is emitted on Msg/Send -type EventSend struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` - Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (x *EventSend) Reset() { - *x = EventSend{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventSend) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventSend) ProtoMessage() {} - -// Deprecated: Use EventSend.ProtoReflect.Descriptor instead. -func (*EventSend) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_event_proto_rawDescGZIP(), []int{0} -} - -func (x *EventSend) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *EventSend) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *EventSend) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *EventSend) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -// EventMint is emitted on Mint -type EventMint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *EventMint) Reset() { - *x = EventMint{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventMint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventMint) ProtoMessage() {} - -// Deprecated: Use EventMint.ProtoReflect.Descriptor instead. -func (*EventMint) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_event_proto_rawDescGZIP(), []int{1} -} - -func (x *EventMint) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *EventMint) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *EventMint) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -// EventBurn is emitted on Burn -type EventBurn struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *EventBurn) Reset() { - *x = EventBurn{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventBurn) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventBurn) ProtoMessage() {} - -// Deprecated: Use EventBurn.ProtoReflect.Descriptor instead. -func (*EventBurn) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_event_proto_rawDescGZIP(), []int{2} -} - -func (x *EventBurn) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *EventBurn) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *EventBurn) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -var File_cosmos_nft_v1beta1_event_proto protoreflect.FileDescriptor - -var file_cosmos_nft_v1beta1_event_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x22, 0x6a, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x22, 0x4c, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x4c, - 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0xce, 0x01, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, - 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6e, 0x66, 0x74, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4e, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4e, 0x66, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, - 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x4e, 0x66, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_nft_v1beta1_event_proto_rawDescOnce sync.Once - file_cosmos_nft_v1beta1_event_proto_rawDescData = file_cosmos_nft_v1beta1_event_proto_rawDesc -) - -func file_cosmos_nft_v1beta1_event_proto_rawDescGZIP() []byte { - file_cosmos_nft_v1beta1_event_proto_rawDescOnce.Do(func() { - file_cosmos_nft_v1beta1_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_nft_v1beta1_event_proto_rawDescData) - }) - return file_cosmos_nft_v1beta1_event_proto_rawDescData -} - -var file_cosmos_nft_v1beta1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_nft_v1beta1_event_proto_goTypes = []interface{}{ - (*EventSend)(nil), // 0: cosmos.nft.v1beta1.EventSend - (*EventMint)(nil), // 1: cosmos.nft.v1beta1.EventMint - (*EventBurn)(nil), // 2: cosmos.nft.v1beta1.EventBurn -} -var file_cosmos_nft_v1beta1_event_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_nft_v1beta1_event_proto_init() } -func file_cosmos_nft_v1beta1_event_proto_init() { - if File_cosmos_nft_v1beta1_event_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_nft_v1beta1_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventSend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventMint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventBurn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_nft_v1beta1_event_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_nft_v1beta1_event_proto_goTypes, - DependencyIndexes: file_cosmos_nft_v1beta1_event_proto_depIdxs, - MessageInfos: file_cosmos_nft_v1beta1_event_proto_msgTypes, - }.Build() - File_cosmos_nft_v1beta1_event_proto = out.File - file_cosmos_nft_v1beta1_event_proto_rawDesc = nil - file_cosmos_nft_v1beta1_event_proto_goTypes = nil - file_cosmos_nft_v1beta1_event_proto_depIdxs = nil -} diff --git a/api/cosmos/nft/v1beta1/genesis.pulsar.go b/api/cosmos/nft/v1beta1/genesis.pulsar.go deleted file mode 100644 index f94f08bb87f6..000000000000 --- a/api/cosmos/nft/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,1426 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package nftv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[]*Class -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Class) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Class) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - v := new(Class) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - v := new(Class) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*Entry -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Entry) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Entry) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(Entry) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(Entry) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_classes protoreflect.FieldDescriptor - fd_GenesisState_entries protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_nft_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_classes = md_GenesisState.Fields().ByName("classes") - fd_GenesisState_entries = md_GenesisState.Fields().ByName("entries") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Classes) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Classes}) - if !f(fd_GenesisState_classes, value) { - return - } - } - if len(x.Entries) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Entries}) - if !f(fd_GenesisState_entries, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.GenesisState.classes": - return len(x.Classes) != 0 - case "cosmos.nft.v1beta1.GenesisState.entries": - return len(x.Entries) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.GenesisState.classes": - x.Classes = nil - case "cosmos.nft.v1beta1.GenesisState.entries": - x.Entries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.GenesisState.classes": - if len(x.Classes) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.Classes} - return protoreflect.ValueOfList(listValue) - case "cosmos.nft.v1beta1.GenesisState.entries": - if len(x.Entries) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.Entries} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.GenesisState.classes": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.Classes = *clv.list - case "cosmos.nft.v1beta1.GenesisState.entries": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.Entries = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.GenesisState.classes": - if x.Classes == nil { - x.Classes = []*Class{} - } - value := &_GenesisState_1_list{list: &x.Classes} - return protoreflect.ValueOfList(value) - case "cosmos.nft.v1beta1.GenesisState.entries": - if x.Entries == nil { - x.Entries = []*Entry{} - } - value := &_GenesisState_2_list{list: &x.Entries} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.GenesisState.classes": - list := []*Class{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - case "cosmos.nft.v1beta1.GenesisState.entries": - list := []*Entry{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Classes) > 0 { - for _, e := range x.Classes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Entries) > 0 { - for _, e := range x.Entries { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Entries) > 0 { - for iNdEx := len(x.Entries) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Entries[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Classes) > 0 { - for iNdEx := len(x.Classes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Classes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Classes = append(x.Classes, &Class{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Classes[len(x.Classes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Entries = append(x.Entries, &Entry{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Entries[len(x.Entries)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Entry_2_list)(nil) - -type _Entry_2_list struct { - list *[]*NFT -} - -func (x *_Entry_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Entry_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Entry_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*NFT) - (*x.list)[i] = concreteValue -} - -func (x *_Entry_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*NFT) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Entry_2_list) AppendMutable() protoreflect.Value { - v := new(NFT) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Entry_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Entry_2_list) NewElement() protoreflect.Value { - v := new(NFT) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Entry_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Entry protoreflect.MessageDescriptor - fd_Entry_owner protoreflect.FieldDescriptor - fd_Entry_nfts protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_genesis_proto_init() - md_Entry = File_cosmos_nft_v1beta1_genesis_proto.Messages().ByName("Entry") - fd_Entry_owner = md_Entry.Fields().ByName("owner") - fd_Entry_nfts = md_Entry.Fields().ByName("nfts") -} - -var _ protoreflect.Message = (*fastReflection_Entry)(nil) - -type fastReflection_Entry Entry - -func (x *Entry) ProtoReflect() protoreflect.Message { - return (*fastReflection_Entry)(x) -} - -func (x *Entry) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Entry_messageType fastReflection_Entry_messageType -var _ protoreflect.MessageType = fastReflection_Entry_messageType{} - -type fastReflection_Entry_messageType struct{} - -func (x fastReflection_Entry_messageType) Zero() protoreflect.Message { - return (*fastReflection_Entry)(nil) -} -func (x fastReflection_Entry_messageType) New() protoreflect.Message { - return new(fastReflection_Entry) -} -func (x fastReflection_Entry_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Entry -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Entry) Descriptor() protoreflect.MessageDescriptor { - return md_Entry -} - -// 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_Entry) Type() protoreflect.MessageType { - return _fastReflection_Entry_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Entry) New() protoreflect.Message { - return new(fastReflection_Entry) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Entry) Interface() protoreflect.ProtoMessage { - return (*Entry)(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_Entry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_Entry_owner, value) { - return - } - } - if len(x.Nfts) != 0 { - value := protoreflect.ValueOfList(&_Entry_2_list{list: &x.Nfts}) - if !f(fd_Entry_nfts, 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_Entry) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Entry.owner": - return x.Owner != "" - case "cosmos.nft.v1beta1.Entry.nfts": - return len(x.Nfts) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Entry")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Entry 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_Entry) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Entry.owner": - x.Owner = "" - case "cosmos.nft.v1beta1.Entry.nfts": - x.Nfts = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Entry")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Entry 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_Entry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.Entry.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Entry.nfts": - if len(x.Nfts) == 0 { - return protoreflect.ValueOfList(&_Entry_2_list{}) - } - listValue := &_Entry_2_list{list: &x.Nfts} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Entry")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Entry 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_Entry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Entry.owner": - x.Owner = value.Interface().(string) - case "cosmos.nft.v1beta1.Entry.nfts": - lv := value.List() - clv := lv.(*_Entry_2_list) - x.Nfts = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Entry")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Entry 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_Entry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Entry.nfts": - if x.Nfts == nil { - x.Nfts = []*NFT{} - } - value := &_Entry_2_list{list: &x.Nfts} - return protoreflect.ValueOfList(value) - case "cosmos.nft.v1beta1.Entry.owner": - panic(fmt.Errorf("field owner of message cosmos.nft.v1beta1.Entry is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Entry")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Entry 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_Entry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Entry.owner": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Entry.nfts": - list := []*NFT{} - return protoreflect.ValueOfList(&_Entry_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Entry")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Entry 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_Entry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.Entry", 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_Entry) 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_Entry) 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_Entry) 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_Entry) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Entry) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Nfts) > 0 { - for _, e := range x.Nfts { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Entry) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Nfts) > 0 { - for iNdEx := len(x.Nfts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Nfts[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - 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().(*Entry) - 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: Entry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Entry: 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 Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nfts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Nfts = append(x.Nfts, &NFT{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nfts[len(x.Nfts)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/nft/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the nft module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // class defines the class of the nft type. - Classes []*Class `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"` - Entries []*Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetClasses() []*Class { - if x != nil { - return x.Classes - } - return nil -} - -func (x *GenesisState) GetEntries() []*Entry { - if x != nil { - return x.Entries - } - return nil -} - -// Entry Defines all nft owned by a person -type Entry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // owner is the owner address of the following nft - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // nfts is a group of nfts of the same owner - Nfts []*NFT `protobuf:"bytes,2,rep,name=nfts,proto3" json:"nfts,omitempty"` -} - -func (x *Entry) Reset() { - *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Entry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Entry) ProtoMessage() {} - -// Deprecated: Use Entry.ProtoReflect.Descriptor instead. -func (*Entry) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *Entry) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Entry) GetNfts() []*NFT { - if x != nil { - return x.Nfts - } - return nil -} - -var File_cosmos_nft_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_nft_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, - 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x66, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, - 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x65, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x4a, - 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2b, 0x0a, - 0x04, 0x6e, 0x66, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4e, 0x46, 0x54, 0x52, 0x04, 0x6e, 0x66, 0x74, 0x73, 0x42, 0xd0, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, - 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6e, 0x66, 0x74, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4e, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4e, 0x66, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, - 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x4e, 0x66, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_nft_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_nft_v1beta1_genesis_proto_rawDescData = file_cosmos_nft_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_nft_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_nft_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_nft_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_nft_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_nft_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_nft_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_nft_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.nft.v1beta1.GenesisState - (*Entry)(nil), // 1: cosmos.nft.v1beta1.Entry - (*Class)(nil), // 2: cosmos.nft.v1beta1.Class - (*NFT)(nil), // 3: cosmos.nft.v1beta1.NFT -} -var file_cosmos_nft_v1beta1_genesis_proto_depIdxs = []int32{ - 2, // 0: cosmos.nft.v1beta1.GenesisState.classes:type_name -> cosmos.nft.v1beta1.Class - 1, // 1: cosmos.nft.v1beta1.GenesisState.entries:type_name -> cosmos.nft.v1beta1.Entry - 3, // 2: cosmos.nft.v1beta1.Entry.nfts:type_name -> cosmos.nft.v1beta1.NFT - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_cosmos_nft_v1beta1_genesis_proto_init() } -func file_cosmos_nft_v1beta1_genesis_proto_init() { - if File_cosmos_nft_v1beta1_genesis_proto != nil { - return - } - file_cosmos_nft_v1beta1_nft_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_nft_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_nft_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_nft_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_nft_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_nft_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_nft_v1beta1_genesis_proto = out.File - file_cosmos_nft_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_nft_v1beta1_genesis_proto_goTypes = nil - file_cosmos_nft_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/nft/v1beta1/nft.pulsar.go b/api/cosmos/nft/v1beta1/nft.pulsar.go deleted file mode 100644 index 5918506e15f3..000000000000 --- a/api/cosmos/nft/v1beta1/nft.pulsar.go +++ /dev/null @@ -1,1824 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package nftv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_Class protoreflect.MessageDescriptor - fd_Class_id protoreflect.FieldDescriptor - fd_Class_name protoreflect.FieldDescriptor - fd_Class_symbol protoreflect.FieldDescriptor - fd_Class_description protoreflect.FieldDescriptor - fd_Class_uri protoreflect.FieldDescriptor - fd_Class_uri_hash protoreflect.FieldDescriptor - fd_Class_data protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_nft_proto_init() - md_Class = File_cosmos_nft_v1beta1_nft_proto.Messages().ByName("Class") - fd_Class_id = md_Class.Fields().ByName("id") - fd_Class_name = md_Class.Fields().ByName("name") - fd_Class_symbol = md_Class.Fields().ByName("symbol") - fd_Class_description = md_Class.Fields().ByName("description") - fd_Class_uri = md_Class.Fields().ByName("uri") - fd_Class_uri_hash = md_Class.Fields().ByName("uri_hash") - fd_Class_data = md_Class.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_Class)(nil) - -type fastReflection_Class Class - -func (x *Class) ProtoReflect() protoreflect.Message { - return (*fastReflection_Class)(x) -} - -func (x *Class) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_nft_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Class_messageType fastReflection_Class_messageType -var _ protoreflect.MessageType = fastReflection_Class_messageType{} - -type fastReflection_Class_messageType struct{} - -func (x fastReflection_Class_messageType) Zero() protoreflect.Message { - return (*fastReflection_Class)(nil) -} -func (x fastReflection_Class_messageType) New() protoreflect.Message { - return new(fastReflection_Class) -} -func (x fastReflection_Class_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Class -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Class) Descriptor() protoreflect.MessageDescriptor { - return md_Class -} - -// 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_Class) Type() protoreflect.MessageType { - return _fastReflection_Class_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Class) New() protoreflect.Message { - return new(fastReflection_Class) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Class) Interface() protoreflect.ProtoMessage { - return (*Class)(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_Class) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Class_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Class_name, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_Class_symbol, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_Class_description, value) { - return - } - } - if x.Uri != "" { - value := protoreflect.ValueOfString(x.Uri) - if !f(fd_Class_uri, value) { - return - } - } - if x.UriHash != "" { - value := protoreflect.ValueOfString(x.UriHash) - if !f(fd_Class_uri_hash, value) { - return - } - } - if x.Data != nil { - value := protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - if !f(fd_Class_data, 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_Class) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Class.id": - return x.Id != "" - case "cosmos.nft.v1beta1.Class.name": - return x.Name != "" - case "cosmos.nft.v1beta1.Class.symbol": - return x.Symbol != "" - case "cosmos.nft.v1beta1.Class.description": - return x.Description != "" - case "cosmos.nft.v1beta1.Class.uri": - return x.Uri != "" - case "cosmos.nft.v1beta1.Class.uri_hash": - return x.UriHash != "" - case "cosmos.nft.v1beta1.Class.data": - return x.Data != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Class")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Class 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_Class) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Class.id": - x.Id = "" - case "cosmos.nft.v1beta1.Class.name": - x.Name = "" - case "cosmos.nft.v1beta1.Class.symbol": - x.Symbol = "" - case "cosmos.nft.v1beta1.Class.description": - x.Description = "" - case "cosmos.nft.v1beta1.Class.uri": - x.Uri = "" - case "cosmos.nft.v1beta1.Class.uri_hash": - x.UriHash = "" - case "cosmos.nft.v1beta1.Class.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Class")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Class 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_Class) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.Class.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Class.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Class.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Class.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Class.uri": - value := x.Uri - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Class.uri_hash": - value := x.UriHash - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.Class.data": - value := x.Data - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Class")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Class 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_Class) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Class.id": - x.Id = value.Interface().(string) - case "cosmos.nft.v1beta1.Class.name": - x.Name = value.Interface().(string) - case "cosmos.nft.v1beta1.Class.symbol": - x.Symbol = value.Interface().(string) - case "cosmos.nft.v1beta1.Class.description": - x.Description = value.Interface().(string) - case "cosmos.nft.v1beta1.Class.uri": - x.Uri = value.Interface().(string) - case "cosmos.nft.v1beta1.Class.uri_hash": - x.UriHash = value.Interface().(string) - case "cosmos.nft.v1beta1.Class.data": - x.Data = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Class")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Class 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_Class) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Class.data": - if x.Data == nil { - x.Data = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - case "cosmos.nft.v1beta1.Class.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.Class is not mutable")) - case "cosmos.nft.v1beta1.Class.name": - panic(fmt.Errorf("field name of message cosmos.nft.v1beta1.Class is not mutable")) - case "cosmos.nft.v1beta1.Class.symbol": - panic(fmt.Errorf("field symbol of message cosmos.nft.v1beta1.Class is not mutable")) - case "cosmos.nft.v1beta1.Class.description": - panic(fmt.Errorf("field description of message cosmos.nft.v1beta1.Class is not mutable")) - case "cosmos.nft.v1beta1.Class.uri": - panic(fmt.Errorf("field uri of message cosmos.nft.v1beta1.Class is not mutable")) - case "cosmos.nft.v1beta1.Class.uri_hash": - panic(fmt.Errorf("field uri_hash of message cosmos.nft.v1beta1.Class is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Class")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Class 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_Class) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.Class.id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Class.name": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Class.symbol": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Class.description": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Class.uri": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Class.uri_hash": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.Class.data": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.Class")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.Class 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_Class) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.Class", 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_Class) 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_Class) 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_Class) 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_Class) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Class) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Uri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.UriHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Data != nil { - l = options.Size(x.Data) - 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().(*Class) - 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.Data != nil { - encoded, err := options.Marshal(x.Data) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.UriHash) > 0 { - i -= len(x.UriHash) - copy(dAtA[i:], x.UriHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UriHash))) - i-- - dAtA[i] = 0x32 - } - if len(x.Uri) > 0 { - i -= len(x.Uri) - copy(dAtA[i:], x.Uri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Uri))) - i-- - dAtA[i] = 0x2a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x22 - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x1a - } - 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] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*Class) - 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: Class: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Class: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", 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.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Uri", 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.Uri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UriHash", 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.UriHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data == nil { - x.Data = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Data); 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_NFT protoreflect.MessageDescriptor - fd_NFT_class_id protoreflect.FieldDescriptor - fd_NFT_id protoreflect.FieldDescriptor - fd_NFT_uri protoreflect.FieldDescriptor - fd_NFT_uri_hash protoreflect.FieldDescriptor - fd_NFT_data protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_nft_proto_init() - md_NFT = File_cosmos_nft_v1beta1_nft_proto.Messages().ByName("NFT") - fd_NFT_class_id = md_NFT.Fields().ByName("class_id") - fd_NFT_id = md_NFT.Fields().ByName("id") - fd_NFT_uri = md_NFT.Fields().ByName("uri") - fd_NFT_uri_hash = md_NFT.Fields().ByName("uri_hash") - fd_NFT_data = md_NFT.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_NFT)(nil) - -type fastReflection_NFT NFT - -func (x *NFT) ProtoReflect() protoreflect.Message { - return (*fastReflection_NFT)(x) -} - -func (x *NFT) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_nft_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_NFT_messageType fastReflection_NFT_messageType -var _ protoreflect.MessageType = fastReflection_NFT_messageType{} - -type fastReflection_NFT_messageType struct{} - -func (x fastReflection_NFT_messageType) Zero() protoreflect.Message { - return (*fastReflection_NFT)(nil) -} -func (x fastReflection_NFT_messageType) New() protoreflect.Message { - return new(fastReflection_NFT) -} -func (x fastReflection_NFT_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NFT -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_NFT) Descriptor() protoreflect.MessageDescriptor { - return md_NFT -} - -// 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_NFT) Type() protoreflect.MessageType { - return _fastReflection_NFT_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_NFT) New() protoreflect.Message { - return new(fastReflection_NFT) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_NFT) Interface() protoreflect.ProtoMessage { - return (*NFT)(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_NFT) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_NFT_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_NFT_id, value) { - return - } - } - if x.Uri != "" { - value := protoreflect.ValueOfString(x.Uri) - if !f(fd_NFT_uri, value) { - return - } - } - if x.UriHash != "" { - value := protoreflect.ValueOfString(x.UriHash) - if !f(fd_NFT_uri_hash, value) { - return - } - } - if x.Data != nil { - value := protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - if !f(fd_NFT_data, 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_NFT) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.NFT.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.NFT.id": - return x.Id != "" - case "cosmos.nft.v1beta1.NFT.uri": - return x.Uri != "" - case "cosmos.nft.v1beta1.NFT.uri_hash": - return x.UriHash != "" - case "cosmos.nft.v1beta1.NFT.data": - return x.Data != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.NFT")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.NFT 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_NFT) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.NFT.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.NFT.id": - x.Id = "" - case "cosmos.nft.v1beta1.NFT.uri": - x.Uri = "" - case "cosmos.nft.v1beta1.NFT.uri_hash": - x.UriHash = "" - case "cosmos.nft.v1beta1.NFT.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.NFT")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.NFT 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_NFT) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.NFT.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.NFT.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.NFT.uri": - value := x.Uri - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.NFT.uri_hash": - value := x.UriHash - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.NFT.data": - value := x.Data - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.NFT")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.NFT 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_NFT) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.NFT.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.NFT.id": - x.Id = value.Interface().(string) - case "cosmos.nft.v1beta1.NFT.uri": - x.Uri = value.Interface().(string) - case "cosmos.nft.v1beta1.NFT.uri_hash": - x.UriHash = value.Interface().(string) - case "cosmos.nft.v1beta1.NFT.data": - x.Data = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.NFT")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.NFT 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_NFT) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.NFT.data": - if x.Data == nil { - x.Data = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - case "cosmos.nft.v1beta1.NFT.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.NFT is not mutable")) - case "cosmos.nft.v1beta1.NFT.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.NFT is not mutable")) - case "cosmos.nft.v1beta1.NFT.uri": - panic(fmt.Errorf("field uri of message cosmos.nft.v1beta1.NFT is not mutable")) - case "cosmos.nft.v1beta1.NFT.uri_hash": - panic(fmt.Errorf("field uri_hash of message cosmos.nft.v1beta1.NFT is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.NFT")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.NFT 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_NFT) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.NFT.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.NFT.id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.NFT.uri": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.NFT.uri_hash": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.NFT.data": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.NFT")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.NFT 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_NFT) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.NFT", 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_NFT) 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_NFT) 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_NFT) 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_NFT) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NFT) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Uri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.UriHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Data != nil { - l = options.Size(x.Data) - 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().(*NFT) - 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.Data != nil { - encoded, err := options.Marshal(x.Data) - 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] = 0x52 - } - if len(x.UriHash) > 0 { - i -= len(x.UriHash) - copy(dAtA[i:], x.UriHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UriHash))) - i-- - dAtA[i] = 0x22 - } - if len(x.Uri) > 0 { - i -= len(x.Uri) - copy(dAtA[i:], x.Uri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Uri))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*NFT) - 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: NFT: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NFT: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Uri", 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.Uri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UriHash", 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.UriHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data == nil { - x.Data = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Data); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/nft/v1beta1/nft.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Class defines the class of the nft type. -type Class struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // name defines the human-readable name of the NFT classification. Optional - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // symbol is an abbreviated name for nft classification. Optional - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - // description is a brief description of nft classification. Optional - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional - Uri string `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"` - // uri_hash is a hash of the document pointed by uri. Optional - UriHash string `protobuf:"bytes,6,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` - // data is the app specific metadata of the NFT class. Optional - Data *anypb.Any `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *Class) Reset() { - *x = Class{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_nft_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Class) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Class) ProtoMessage() {} - -// Deprecated: Use Class.ProtoReflect.Descriptor instead. -func (*Class) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_nft_proto_rawDescGZIP(), []int{0} -} - -func (x *Class) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Class) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Class) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *Class) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Class) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -func (x *Class) GetUriHash() string { - if x != nil { - return x.UriHash - } - return "" -} - -func (x *Class) GetData() *anypb.Any { - if x != nil { - return x.Data - } - return nil -} - -// NFT defines the NFT. -type NFT struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // class_id associated with the NFT, similar to the contract address of ERC721 - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // id is a unique identifier of the NFT - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // uri for the NFT metadata stored off chain - Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` - // uri_hash is a hash of the document pointed by uri - UriHash string `protobuf:"bytes,4,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` - // data is an app specific data of the NFT. Optional - Data *anypb.Any `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *NFT) Reset() { - *x = NFT{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_nft_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NFT) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NFT) ProtoMessage() {} - -// Deprecated: Use NFT.ProtoReflect.Descriptor instead. -func (*NFT) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_nft_proto_rawDescGZIP(), []int{1} -} - -func (x *NFT) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *NFT) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *NFT) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -func (x *NFT) GetUriHash() string { - if x != nil { - return x.UriHash - } - return "" -} - -func (x *NFT) GetData() *anypb.Any { - if x != nil { - return x.Data - } - return nil -} - -var File_cosmos_nft_v1beta1_nft_proto protoreflect.FileDescriptor - -var file_cosmos_nft_v1beta1_nft_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x66, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, - 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, - 0x62, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x72, 0x69, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x72, 0x69, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 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, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x87, 0x01, 0x0a, - 0x03, 0x4e, 0x46, 0x54, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x69, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x72, 0x69, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x72, 0x69, 0x48, 0x61, 0x73, 0x68, 0x12, 0x28, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 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, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0xcc, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x08, 0x4e, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x6e, 0x66, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x4e, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4e, 0x66, 0x74, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_nft_v1beta1_nft_proto_rawDescOnce sync.Once - file_cosmos_nft_v1beta1_nft_proto_rawDescData = file_cosmos_nft_v1beta1_nft_proto_rawDesc -) - -func file_cosmos_nft_v1beta1_nft_proto_rawDescGZIP() []byte { - file_cosmos_nft_v1beta1_nft_proto_rawDescOnce.Do(func() { - file_cosmos_nft_v1beta1_nft_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_nft_v1beta1_nft_proto_rawDescData) - }) - return file_cosmos_nft_v1beta1_nft_proto_rawDescData -} - -var file_cosmos_nft_v1beta1_nft_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_nft_v1beta1_nft_proto_goTypes = []interface{}{ - (*Class)(nil), // 0: cosmos.nft.v1beta1.Class - (*NFT)(nil), // 1: cosmos.nft.v1beta1.NFT - (*anypb.Any)(nil), // 2: google.protobuf.Any -} -var file_cosmos_nft_v1beta1_nft_proto_depIdxs = []int32{ - 2, // 0: cosmos.nft.v1beta1.Class.data:type_name -> google.protobuf.Any - 2, // 1: cosmos.nft.v1beta1.NFT.data:type_name -> google.protobuf.Any - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_nft_v1beta1_nft_proto_init() } -func file_cosmos_nft_v1beta1_nft_proto_init() { - if File_cosmos_nft_v1beta1_nft_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_nft_v1beta1_nft_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Class); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_nft_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NFT); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_nft_v1beta1_nft_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_nft_v1beta1_nft_proto_goTypes, - DependencyIndexes: file_cosmos_nft_v1beta1_nft_proto_depIdxs, - MessageInfos: file_cosmos_nft_v1beta1_nft_proto_msgTypes, - }.Build() - File_cosmos_nft_v1beta1_nft_proto = out.File - file_cosmos_nft_v1beta1_nft_proto_rawDesc = nil - file_cosmos_nft_v1beta1_nft_proto_goTypes = nil - file_cosmos_nft_v1beta1_nft_proto_depIdxs = nil -} diff --git a/api/cosmos/nft/v1beta1/query.pulsar.go b/api/cosmos/nft/v1beta1/query.pulsar.go deleted file mode 100644 index be066f518cf5..000000000000 --- a/api/cosmos/nft/v1beta1/query.pulsar.go +++ /dev/null @@ -1,7539 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package nftv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryBalanceRequest protoreflect.MessageDescriptor - fd_QueryBalanceRequest_class_id protoreflect.FieldDescriptor - fd_QueryBalanceRequest_owner protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryBalanceRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryBalanceRequest") - fd_QueryBalanceRequest_class_id = md_QueryBalanceRequest.Fields().ByName("class_id") - fd_QueryBalanceRequest_owner = md_QueryBalanceRequest.Fields().ByName("owner") -} - -var _ protoreflect.Message = (*fastReflection_QueryBalanceRequest)(nil) - -type fastReflection_QueryBalanceRequest QueryBalanceRequest - -func (x *QueryBalanceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBalanceRequest)(x) -} - -func (x *QueryBalanceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBalanceRequest_messageType fastReflection_QueryBalanceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryBalanceRequest_messageType{} - -type fastReflection_QueryBalanceRequest_messageType struct{} - -func (x fastReflection_QueryBalanceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBalanceRequest)(nil) -} -func (x fastReflection_QueryBalanceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBalanceRequest) -} -func (x fastReflection_QueryBalanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBalanceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceRequest -} - -// 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_QueryBalanceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryBalanceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBalanceRequest) New() protoreflect.Message { - return new(fastReflection_QueryBalanceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBalanceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryBalanceRequest)(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_QueryBalanceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_QueryBalanceRequest_class_id, value) { - return - } - } - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_QueryBalanceRequest_owner, 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_QueryBalanceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceRequest.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.QueryBalanceRequest.owner": - return x.Owner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceRequest.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.QueryBalanceRequest.owner": - x.Owner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceRequest.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.QueryBalanceRequest.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceRequest.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.QueryBalanceRequest.owner": - x.Owner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceRequest.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.QueryBalanceRequest is not mutable")) - case "cosmos.nft.v1beta1.QueryBalanceRequest.owner": - panic(fmt.Errorf("field owner of message cosmos.nft.v1beta1.QueryBalanceRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceRequest.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.QueryBalanceRequest.owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceRequest 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_QueryBalanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryBalanceRequest", 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_QueryBalanceRequest) 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_QueryBalanceRequest) 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_QueryBalanceRequest) 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_QueryBalanceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBalanceRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryBalanceRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*QueryBalanceRequest) - 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: QueryBalanceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBalanceRequest: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryBalanceResponse protoreflect.MessageDescriptor - fd_QueryBalanceResponse_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryBalanceResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryBalanceResponse") - fd_QueryBalanceResponse_amount = md_QueryBalanceResponse.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_QueryBalanceResponse)(nil) - -type fastReflection_QueryBalanceResponse QueryBalanceResponse - -func (x *QueryBalanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryBalanceResponse)(x) -} - -func (x *QueryBalanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryBalanceResponse_messageType fastReflection_QueryBalanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryBalanceResponse_messageType{} - -type fastReflection_QueryBalanceResponse_messageType struct{} - -func (x fastReflection_QueryBalanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryBalanceResponse)(nil) -} -func (x fastReflection_QueryBalanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryBalanceResponse) -} -func (x fastReflection_QueryBalanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryBalanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryBalanceResponse -} - -// 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_QueryBalanceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryBalanceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryBalanceResponse) New() protoreflect.Message { - return new(fastReflection_QueryBalanceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryBalanceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryBalanceResponse)(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_QueryBalanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Amount != uint64(0) { - value := protoreflect.ValueOfUint64(x.Amount) - if !f(fd_QueryBalanceResponse_amount, 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_QueryBalanceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceResponse.amount": - return x.Amount != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceResponse.amount": - x.Amount = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceResponse.amount": - value := x.Amount - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceResponse.amount": - x.Amount = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceResponse.amount": - panic(fmt.Errorf("field amount of message cosmos.nft.v1beta1.QueryBalanceResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryBalanceResponse.amount": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryBalanceResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryBalanceResponse 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_QueryBalanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryBalanceResponse", 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_QueryBalanceResponse) 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_QueryBalanceResponse) 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_QueryBalanceResponse) 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_QueryBalanceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryBalanceResponse) - 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.Amount != 0 { - n += 1 + runtime.Sov(uint64(x.Amount)) - } - 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().(*QueryBalanceResponse) - 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.Amount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryBalanceResponse) - 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: QueryBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - x.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryOwnerRequest protoreflect.MessageDescriptor - fd_QueryOwnerRequest_class_id protoreflect.FieldDescriptor - fd_QueryOwnerRequest_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryOwnerRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryOwnerRequest") - fd_QueryOwnerRequest_class_id = md_QueryOwnerRequest.Fields().ByName("class_id") - fd_QueryOwnerRequest_id = md_QueryOwnerRequest.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_QueryOwnerRequest)(nil) - -type fastReflection_QueryOwnerRequest QueryOwnerRequest - -func (x *QueryOwnerRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryOwnerRequest)(x) -} - -func (x *QueryOwnerRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryOwnerRequest_messageType fastReflection_QueryOwnerRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryOwnerRequest_messageType{} - -type fastReflection_QueryOwnerRequest_messageType struct{} - -func (x fastReflection_QueryOwnerRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryOwnerRequest)(nil) -} -func (x fastReflection_QueryOwnerRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryOwnerRequest) -} -func (x fastReflection_QueryOwnerRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwnerRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryOwnerRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwnerRequest -} - -// 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_QueryOwnerRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryOwnerRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryOwnerRequest) New() protoreflect.Message { - return new(fastReflection_QueryOwnerRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryOwnerRequest) Interface() protoreflect.ProtoMessage { - return (*QueryOwnerRequest)(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_QueryOwnerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_QueryOwnerRequest_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_QueryOwnerRequest_id, 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_QueryOwnerRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerRequest.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.QueryOwnerRequest.id": - return x.Id != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerRequest 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_QueryOwnerRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerRequest.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.QueryOwnerRequest.id": - x.Id = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerRequest 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_QueryOwnerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerRequest.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.QueryOwnerRequest.id": - value := x.Id - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerRequest 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_QueryOwnerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerRequest.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.QueryOwnerRequest.id": - x.Id = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerRequest 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_QueryOwnerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerRequest.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.QueryOwnerRequest is not mutable")) - case "cosmos.nft.v1beta1.QueryOwnerRequest.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.QueryOwnerRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerRequest 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_QueryOwnerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerRequest.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.QueryOwnerRequest.id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerRequest 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_QueryOwnerRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryOwnerRequest", 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_QueryOwnerRequest) 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_QueryOwnerRequest) 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_QueryOwnerRequest) 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_QueryOwnerRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryOwnerRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryOwnerRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*QueryOwnerRequest) - 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: QueryOwnerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryOwnerRequest: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryOwnerResponse protoreflect.MessageDescriptor - fd_QueryOwnerResponse_owner protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryOwnerResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryOwnerResponse") - fd_QueryOwnerResponse_owner = md_QueryOwnerResponse.Fields().ByName("owner") -} - -var _ protoreflect.Message = (*fastReflection_QueryOwnerResponse)(nil) - -type fastReflection_QueryOwnerResponse QueryOwnerResponse - -func (x *QueryOwnerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryOwnerResponse)(x) -} - -func (x *QueryOwnerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryOwnerResponse_messageType fastReflection_QueryOwnerResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryOwnerResponse_messageType{} - -type fastReflection_QueryOwnerResponse_messageType struct{} - -func (x fastReflection_QueryOwnerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryOwnerResponse)(nil) -} -func (x fastReflection_QueryOwnerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryOwnerResponse) -} -func (x fastReflection_QueryOwnerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwnerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryOwnerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwnerResponse -} - -// 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_QueryOwnerResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryOwnerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryOwnerResponse) New() protoreflect.Message { - return new(fastReflection_QueryOwnerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryOwnerResponse) Interface() protoreflect.ProtoMessage { - return (*QueryOwnerResponse)(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_QueryOwnerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_QueryOwnerResponse_owner, 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_QueryOwnerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerResponse.owner": - return x.Owner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerResponse 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_QueryOwnerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerResponse.owner": - x.Owner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerResponse 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_QueryOwnerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerResponse.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerResponse 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_QueryOwnerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerResponse.owner": - x.Owner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerResponse 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_QueryOwnerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerResponse.owner": - panic(fmt.Errorf("field owner of message cosmos.nft.v1beta1.QueryOwnerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerResponse 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_QueryOwnerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryOwnerResponse.owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryOwnerResponse 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_QueryOwnerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryOwnerResponse", 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_QueryOwnerResponse) 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_QueryOwnerResponse) 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_QueryOwnerResponse) 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_QueryOwnerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryOwnerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryOwnerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - 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().(*QueryOwnerResponse) - 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: QueryOwnerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryOwnerResponse: 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 Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySupplyRequest protoreflect.MessageDescriptor - fd_QuerySupplyRequest_class_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QuerySupplyRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QuerySupplyRequest") - fd_QuerySupplyRequest_class_id = md_QuerySupplyRequest.Fields().ByName("class_id") -} - -var _ protoreflect.Message = (*fastReflection_QuerySupplyRequest)(nil) - -type fastReflection_QuerySupplyRequest QuerySupplyRequest - -func (x *QuerySupplyRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySupplyRequest)(x) -} - -func (x *QuerySupplyRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySupplyRequest_messageType fastReflection_QuerySupplyRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySupplyRequest_messageType{} - -type fastReflection_QuerySupplyRequest_messageType struct{} - -func (x fastReflection_QuerySupplyRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySupplyRequest)(nil) -} -func (x fastReflection_QuerySupplyRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySupplyRequest) -} -func (x fastReflection_QuerySupplyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySupplyRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyRequest -} - -// 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_QuerySupplyRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySupplyRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySupplyRequest) New() protoreflect.Message { - return new(fastReflection_QuerySupplyRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySupplyRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySupplyRequest)(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_QuerySupplyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_QuerySupplyRequest_class_id, 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_QuerySupplyRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyRequest.class_id": - return x.ClassId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyRequest 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_QuerySupplyRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyRequest.class_id": - x.ClassId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyRequest 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_QuerySupplyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyRequest.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyRequest 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_QuerySupplyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyRequest.class_id": - x.ClassId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyRequest 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_QuerySupplyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyRequest.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.QuerySupplyRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyRequest 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_QuerySupplyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyRequest.class_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyRequest 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_QuerySupplyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QuerySupplyRequest", 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_QuerySupplyRequest) 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_QuerySupplyRequest) 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_QuerySupplyRequest) 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_QuerySupplyRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySupplyRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySupplyRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*QuerySupplyRequest) - 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: QuerySupplyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySupplyRequest: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySupplyResponse protoreflect.MessageDescriptor - fd_QuerySupplyResponse_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QuerySupplyResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QuerySupplyResponse") - fd_QuerySupplyResponse_amount = md_QuerySupplyResponse.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_QuerySupplyResponse)(nil) - -type fastReflection_QuerySupplyResponse QuerySupplyResponse - -func (x *QuerySupplyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySupplyResponse)(x) -} - -func (x *QuerySupplyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_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_QuerySupplyResponse_messageType fastReflection_QuerySupplyResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySupplyResponse_messageType{} - -type fastReflection_QuerySupplyResponse_messageType struct{} - -func (x fastReflection_QuerySupplyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySupplyResponse)(nil) -} -func (x fastReflection_QuerySupplyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySupplyResponse) -} -func (x fastReflection_QuerySupplyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySupplyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySupplyResponse -} - -// 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_QuerySupplyResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySupplyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySupplyResponse) New() protoreflect.Message { - return new(fastReflection_QuerySupplyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySupplyResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySupplyResponse)(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_QuerySupplyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Amount != uint64(0) { - value := protoreflect.ValueOfUint64(x.Amount) - if !f(fd_QuerySupplyResponse_amount, 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_QuerySupplyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyResponse.amount": - return x.Amount != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyResponse 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_QuerySupplyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyResponse.amount": - x.Amount = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyResponse 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_QuerySupplyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyResponse.amount": - value := x.Amount - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyResponse 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_QuerySupplyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyResponse.amount": - x.Amount = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyResponse 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_QuerySupplyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyResponse.amount": - panic(fmt.Errorf("field amount of message cosmos.nft.v1beta1.QuerySupplyResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyResponse 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_QuerySupplyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QuerySupplyResponse.amount": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QuerySupplyResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QuerySupplyResponse 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_QuerySupplyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QuerySupplyResponse", 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_QuerySupplyResponse) 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_QuerySupplyResponse) 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_QuerySupplyResponse) 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_QuerySupplyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySupplyResponse) - 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.Amount != 0 { - n += 1 + runtime.Sov(uint64(x.Amount)) - } - 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().(*QuerySupplyResponse) - 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.Amount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySupplyResponse) - 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: QuerySupplyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - x.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryNFTsRequest protoreflect.MessageDescriptor - fd_QueryNFTsRequest_class_id protoreflect.FieldDescriptor - fd_QueryNFTsRequest_owner protoreflect.FieldDescriptor - fd_QueryNFTsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryNFTsRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryNFTsRequest") - fd_QueryNFTsRequest_class_id = md_QueryNFTsRequest.Fields().ByName("class_id") - fd_QueryNFTsRequest_owner = md_QueryNFTsRequest.Fields().ByName("owner") - fd_QueryNFTsRequest_pagination = md_QueryNFTsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryNFTsRequest)(nil) - -type fastReflection_QueryNFTsRequest QueryNFTsRequest - -func (x *QueryNFTsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryNFTsRequest)(x) -} - -func (x *QueryNFTsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_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_QueryNFTsRequest_messageType fastReflection_QueryNFTsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryNFTsRequest_messageType{} - -type fastReflection_QueryNFTsRequest_messageType struct{} - -func (x fastReflection_QueryNFTsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryNFTsRequest)(nil) -} -func (x fastReflection_QueryNFTsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryNFTsRequest) -} -func (x fastReflection_QueryNFTsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryNFTsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTsRequest -} - -// 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_QueryNFTsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryNFTsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryNFTsRequest) New() protoreflect.Message { - return new(fastReflection_QueryNFTsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryNFTsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryNFTsRequest)(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_QueryNFTsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_QueryNFTsRequest_class_id, value) { - return - } - } - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_QueryNFTsRequest_owner, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryNFTsRequest_pagination, 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_QueryNFTsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsRequest.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.QueryNFTsRequest.owner": - return x.Owner != "" - case "cosmos.nft.v1beta1.QueryNFTsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsRequest 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_QueryNFTsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsRequest.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.QueryNFTsRequest.owner": - x.Owner = "" - case "cosmos.nft.v1beta1.QueryNFTsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsRequest 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_QueryNFTsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsRequest.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.QueryNFTsRequest.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.QueryNFTsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsRequest 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_QueryNFTsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsRequest.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.QueryNFTsRequest.owner": - x.Owner = value.Interface().(string) - case "cosmos.nft.v1beta1.QueryNFTsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsRequest 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_QueryNFTsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.nft.v1beta1.QueryNFTsRequest.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.QueryNFTsRequest is not mutable")) - case "cosmos.nft.v1beta1.QueryNFTsRequest.owner": - panic(fmt.Errorf("field owner of message cosmos.nft.v1beta1.QueryNFTsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsRequest 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_QueryNFTsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsRequest.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.QueryNFTsRequest.owner": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.QueryNFTsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsRequest 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_QueryNFTsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryNFTsRequest", 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_QueryNFTsRequest) 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_QueryNFTsRequest) 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_QueryNFTsRequest) 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_QueryNFTsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryNFTsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryNFTsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*QueryNFTsRequest) - 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: QueryNFTsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNFTsRequest: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryNFTsResponse_1_list)(nil) - -type _QueryNFTsResponse_1_list struct { - list *[]*NFT -} - -func (x *_QueryNFTsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryNFTsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryNFTsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*NFT) - (*x.list)[i] = concreteValue -} - -func (x *_QueryNFTsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*NFT) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryNFTsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(NFT) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryNFTsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryNFTsResponse_1_list) NewElement() protoreflect.Value { - v := new(NFT) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryNFTsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryNFTsResponse protoreflect.MessageDescriptor - fd_QueryNFTsResponse_nfts protoreflect.FieldDescriptor - fd_QueryNFTsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryNFTsResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryNFTsResponse") - fd_QueryNFTsResponse_nfts = md_QueryNFTsResponse.Fields().ByName("nfts") - fd_QueryNFTsResponse_pagination = md_QueryNFTsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryNFTsResponse)(nil) - -type fastReflection_QueryNFTsResponse QueryNFTsResponse - -func (x *QueryNFTsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryNFTsResponse)(x) -} - -func (x *QueryNFTsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryNFTsResponse_messageType fastReflection_QueryNFTsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryNFTsResponse_messageType{} - -type fastReflection_QueryNFTsResponse_messageType struct{} - -func (x fastReflection_QueryNFTsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryNFTsResponse)(nil) -} -func (x fastReflection_QueryNFTsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryNFTsResponse) -} -func (x fastReflection_QueryNFTsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryNFTsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTsResponse -} - -// 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_QueryNFTsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryNFTsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryNFTsResponse) New() protoreflect.Message { - return new(fastReflection_QueryNFTsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryNFTsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryNFTsResponse)(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_QueryNFTsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Nfts) != 0 { - value := protoreflect.ValueOfList(&_QueryNFTsResponse_1_list{list: &x.Nfts}) - if !f(fd_QueryNFTsResponse_nfts, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryNFTsResponse_pagination, 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_QueryNFTsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsResponse.nfts": - return len(x.Nfts) != 0 - case "cosmos.nft.v1beta1.QueryNFTsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsResponse 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_QueryNFTsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsResponse.nfts": - x.Nfts = nil - case "cosmos.nft.v1beta1.QueryNFTsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsResponse 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_QueryNFTsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsResponse.nfts": - if len(x.Nfts) == 0 { - return protoreflect.ValueOfList(&_QueryNFTsResponse_1_list{}) - } - listValue := &_QueryNFTsResponse_1_list{list: &x.Nfts} - return protoreflect.ValueOfList(listValue) - case "cosmos.nft.v1beta1.QueryNFTsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsResponse 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_QueryNFTsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsResponse.nfts": - lv := value.List() - clv := lv.(*_QueryNFTsResponse_1_list) - x.Nfts = *clv.list - case "cosmos.nft.v1beta1.QueryNFTsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsResponse 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_QueryNFTsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsResponse.nfts": - if x.Nfts == nil { - x.Nfts = []*NFT{} - } - value := &_QueryNFTsResponse_1_list{list: &x.Nfts} - return protoreflect.ValueOfList(value) - case "cosmos.nft.v1beta1.QueryNFTsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsResponse 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_QueryNFTsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTsResponse.nfts": - list := []*NFT{} - return protoreflect.ValueOfList(&_QueryNFTsResponse_1_list{list: &list}) - case "cosmos.nft.v1beta1.QueryNFTsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTsResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTsResponse 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_QueryNFTsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryNFTsResponse", 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_QueryNFTsResponse) 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_QueryNFTsResponse) 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_QueryNFTsResponse) 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_QueryNFTsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryNFTsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Nfts) > 0 { - for _, e := range x.Nfts { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryNFTsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Nfts) > 0 { - for iNdEx := len(x.Nfts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Nfts[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryNFTsResponse) - 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: QueryNFTsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNFTsResponse: 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 Nfts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Nfts = append(x.Nfts, &NFT{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nfts[len(x.Nfts)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryNFTRequest protoreflect.MessageDescriptor - fd_QueryNFTRequest_class_id protoreflect.FieldDescriptor - fd_QueryNFTRequest_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryNFTRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryNFTRequest") - fd_QueryNFTRequest_class_id = md_QueryNFTRequest.Fields().ByName("class_id") - fd_QueryNFTRequest_id = md_QueryNFTRequest.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_QueryNFTRequest)(nil) - -type fastReflection_QueryNFTRequest QueryNFTRequest - -func (x *QueryNFTRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryNFTRequest)(x) -} - -func (x *QueryNFTRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryNFTRequest_messageType fastReflection_QueryNFTRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryNFTRequest_messageType{} - -type fastReflection_QueryNFTRequest_messageType struct{} - -func (x fastReflection_QueryNFTRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryNFTRequest)(nil) -} -func (x fastReflection_QueryNFTRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryNFTRequest) -} -func (x fastReflection_QueryNFTRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryNFTRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTRequest -} - -// 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_QueryNFTRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryNFTRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryNFTRequest) New() protoreflect.Message { - return new(fastReflection_QueryNFTRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryNFTRequest) Interface() protoreflect.ProtoMessage { - return (*QueryNFTRequest)(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_QueryNFTRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_QueryNFTRequest_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_QueryNFTRequest_id, 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_QueryNFTRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTRequest.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.QueryNFTRequest.id": - return x.Id != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTRequest 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_QueryNFTRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTRequest.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.QueryNFTRequest.id": - x.Id = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTRequest 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_QueryNFTRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryNFTRequest.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.QueryNFTRequest.id": - value := x.Id - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTRequest 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_QueryNFTRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTRequest.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.QueryNFTRequest.id": - x.Id = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTRequest 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_QueryNFTRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTRequest.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.QueryNFTRequest is not mutable")) - case "cosmos.nft.v1beta1.QueryNFTRequest.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.QueryNFTRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTRequest 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_QueryNFTRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTRequest.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.QueryNFTRequest.id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTRequest 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_QueryNFTRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryNFTRequest", 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_QueryNFTRequest) 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_QueryNFTRequest) 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_QueryNFTRequest) 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_QueryNFTRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryNFTRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryNFTRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*QueryNFTRequest) - 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: QueryNFTRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNFTRequest: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryNFTResponse protoreflect.MessageDescriptor - fd_QueryNFTResponse_nft protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryNFTResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryNFTResponse") - fd_QueryNFTResponse_nft = md_QueryNFTResponse.Fields().ByName("nft") -} - -var _ protoreflect.Message = (*fastReflection_QueryNFTResponse)(nil) - -type fastReflection_QueryNFTResponse QueryNFTResponse - -func (x *QueryNFTResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryNFTResponse)(x) -} - -func (x *QueryNFTResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryNFTResponse_messageType fastReflection_QueryNFTResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryNFTResponse_messageType{} - -type fastReflection_QueryNFTResponse_messageType struct{} - -func (x fastReflection_QueryNFTResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryNFTResponse)(nil) -} -func (x fastReflection_QueryNFTResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryNFTResponse) -} -func (x fastReflection_QueryNFTResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryNFTResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNFTResponse -} - -// 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_QueryNFTResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryNFTResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryNFTResponse) New() protoreflect.Message { - return new(fastReflection_QueryNFTResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryNFTResponse) Interface() protoreflect.ProtoMessage { - return (*QueryNFTResponse)(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_QueryNFTResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Nft != nil { - value := protoreflect.ValueOfMessage(x.Nft.ProtoReflect()) - if !f(fd_QueryNFTResponse_nft, 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_QueryNFTResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTResponse.nft": - return x.Nft != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTResponse 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_QueryNFTResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTResponse.nft": - x.Nft = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTResponse 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_QueryNFTResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryNFTResponse.nft": - value := x.Nft - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTResponse 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_QueryNFTResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTResponse.nft": - x.Nft = value.Message().Interface().(*NFT) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTResponse 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_QueryNFTResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTResponse.nft": - if x.Nft == nil { - x.Nft = new(NFT) - } - return protoreflect.ValueOfMessage(x.Nft.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTResponse 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_QueryNFTResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryNFTResponse.nft": - m := new(NFT) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryNFTResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryNFTResponse 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_QueryNFTResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryNFTResponse", 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_QueryNFTResponse) 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_QueryNFTResponse) 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_QueryNFTResponse) 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_QueryNFTResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryNFTResponse) - 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.Nft != nil { - l = options.Size(x.Nft) - 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().(*QueryNFTResponse) - 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.Nft != nil { - encoded, err := options.Marshal(x.Nft) - 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().(*QueryNFTResponse) - 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: QueryNFTResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNFTResponse: 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 Nft", 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.Nft == nil { - x.Nft = &NFT{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nft); 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_QueryClassRequest protoreflect.MessageDescriptor - fd_QueryClassRequest_class_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryClassRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryClassRequest") - fd_QueryClassRequest_class_id = md_QueryClassRequest.Fields().ByName("class_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryClassRequest)(nil) - -type fastReflection_QueryClassRequest QueryClassRequest - -func (x *QueryClassRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryClassRequest)(x) -} - -func (x *QueryClassRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryClassRequest_messageType fastReflection_QueryClassRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryClassRequest_messageType{} - -type fastReflection_QueryClassRequest_messageType struct{} - -func (x fastReflection_QueryClassRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryClassRequest)(nil) -} -func (x fastReflection_QueryClassRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryClassRequest) -} -func (x fastReflection_QueryClassRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryClassRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassRequest -} - -// 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_QueryClassRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryClassRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryClassRequest) New() protoreflect.Message { - return new(fastReflection_QueryClassRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryClassRequest) Interface() protoreflect.ProtoMessage { - return (*QueryClassRequest)(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_QueryClassRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_QueryClassRequest_class_id, 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_QueryClassRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassRequest.class_id": - return x.ClassId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassRequest 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_QueryClassRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassRequest.class_id": - x.ClassId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassRequest 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_QueryClassRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryClassRequest.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassRequest 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_QueryClassRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassRequest.class_id": - x.ClassId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassRequest 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_QueryClassRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassRequest.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.QueryClassRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassRequest 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_QueryClassRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassRequest.class_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassRequest 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_QueryClassRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryClassRequest", 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_QueryClassRequest) 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_QueryClassRequest) 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_QueryClassRequest) 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_QueryClassRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryClassRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryClassRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*QueryClassRequest) - 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: QueryClassRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClassRequest: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryClassResponse protoreflect.MessageDescriptor - fd_QueryClassResponse_class protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryClassResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryClassResponse") - fd_QueryClassResponse_class = md_QueryClassResponse.Fields().ByName("class") -} - -var _ protoreflect.Message = (*fastReflection_QueryClassResponse)(nil) - -type fastReflection_QueryClassResponse QueryClassResponse - -func (x *QueryClassResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryClassResponse)(x) -} - -func (x *QueryClassResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryClassResponse_messageType fastReflection_QueryClassResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryClassResponse_messageType{} - -type fastReflection_QueryClassResponse_messageType struct{} - -func (x fastReflection_QueryClassResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryClassResponse)(nil) -} -func (x fastReflection_QueryClassResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryClassResponse) -} -func (x fastReflection_QueryClassResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryClassResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassResponse -} - -// 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_QueryClassResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryClassResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryClassResponse) New() protoreflect.Message { - return new(fastReflection_QueryClassResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryClassResponse) Interface() protoreflect.ProtoMessage { - return (*QueryClassResponse)(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_QueryClassResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Class != nil { - value := protoreflect.ValueOfMessage(x.Class.ProtoReflect()) - if !f(fd_QueryClassResponse_class, 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_QueryClassResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassResponse.class": - return x.Class != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassResponse 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_QueryClassResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassResponse.class": - x.Class = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassResponse 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_QueryClassResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryClassResponse.class": - value := x.Class - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassResponse 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_QueryClassResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassResponse.class": - x.Class = value.Message().Interface().(*Class) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassResponse 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_QueryClassResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassResponse.class": - if x.Class == nil { - x.Class = new(Class) - } - return protoreflect.ValueOfMessage(x.Class.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassResponse 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_QueryClassResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassResponse.class": - m := new(Class) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassResponse 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_QueryClassResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryClassResponse", 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_QueryClassResponse) 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_QueryClassResponse) 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_QueryClassResponse) 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_QueryClassResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryClassResponse) - 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.Class != nil { - l = options.Size(x.Class) - 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().(*QueryClassResponse) - 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.Class != nil { - encoded, err := options.Marshal(x.Class) - 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().(*QueryClassResponse) - 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: QueryClassResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClassResponse: 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 Class", 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.Class == nil { - x.Class = &Class{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Class); 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_QueryClassesRequest protoreflect.MessageDescriptor - fd_QueryClassesRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryClassesRequest = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryClassesRequest") - fd_QueryClassesRequest_pagination = md_QueryClassesRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryClassesRequest)(nil) - -type fastReflection_QueryClassesRequest QueryClassesRequest - -func (x *QueryClassesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryClassesRequest)(x) -} - -func (x *QueryClassesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryClassesRequest_messageType fastReflection_QueryClassesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryClassesRequest_messageType{} - -type fastReflection_QueryClassesRequest_messageType struct{} - -func (x fastReflection_QueryClassesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryClassesRequest)(nil) -} -func (x fastReflection_QueryClassesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryClassesRequest) -} -func (x fastReflection_QueryClassesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryClassesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassesRequest -} - -// 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_QueryClassesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryClassesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryClassesRequest) New() protoreflect.Message { - return new(fastReflection_QueryClassesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryClassesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryClassesRequest)(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_QueryClassesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryClassesRequest_pagination, 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_QueryClassesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesRequest 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_QueryClassesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesRequest 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_QueryClassesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryClassesRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesRequest 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_QueryClassesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesRequest 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_QueryClassesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesRequest 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_QueryClassesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesRequest")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesRequest 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_QueryClassesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryClassesRequest", 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_QueryClassesRequest) 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_QueryClassesRequest) 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_QueryClassesRequest) 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_QueryClassesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryClassesRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryClassesRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QueryClassesRequest) - 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: QueryClassesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClassesRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryClassesResponse_1_list)(nil) - -type _QueryClassesResponse_1_list struct { - list *[]*Class -} - -func (x *_QueryClassesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryClassesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryClassesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Class) - (*x.list)[i] = concreteValue -} - -func (x *_QueryClassesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Class) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryClassesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Class) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryClassesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryClassesResponse_1_list) NewElement() protoreflect.Value { - v := new(Class) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryClassesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryClassesResponse protoreflect.MessageDescriptor - fd_QueryClassesResponse_classes protoreflect.FieldDescriptor - fd_QueryClassesResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_query_proto_init() - md_QueryClassesResponse = File_cosmos_nft_v1beta1_query_proto.Messages().ByName("QueryClassesResponse") - fd_QueryClassesResponse_classes = md_QueryClassesResponse.Fields().ByName("classes") - fd_QueryClassesResponse_pagination = md_QueryClassesResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryClassesResponse)(nil) - -type fastReflection_QueryClassesResponse QueryClassesResponse - -func (x *QueryClassesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryClassesResponse)(x) -} - -func (x *QueryClassesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryClassesResponse_messageType fastReflection_QueryClassesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryClassesResponse_messageType{} - -type fastReflection_QueryClassesResponse_messageType struct{} - -func (x fastReflection_QueryClassesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryClassesResponse)(nil) -} -func (x fastReflection_QueryClassesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryClassesResponse) -} -func (x fastReflection_QueryClassesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryClassesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryClassesResponse -} - -// 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_QueryClassesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryClassesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryClassesResponse) New() protoreflect.Message { - return new(fastReflection_QueryClassesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryClassesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryClassesResponse)(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_QueryClassesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Classes) != 0 { - value := protoreflect.ValueOfList(&_QueryClassesResponse_1_list{list: &x.Classes}) - if !f(fd_QueryClassesResponse_classes, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryClassesResponse_pagination, 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_QueryClassesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesResponse.classes": - return len(x.Classes) != 0 - case "cosmos.nft.v1beta1.QueryClassesResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesResponse 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_QueryClassesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesResponse.classes": - x.Classes = nil - case "cosmos.nft.v1beta1.QueryClassesResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesResponse 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_QueryClassesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.QueryClassesResponse.classes": - if len(x.Classes) == 0 { - return protoreflect.ValueOfList(&_QueryClassesResponse_1_list{}) - } - listValue := &_QueryClassesResponse_1_list{list: &x.Classes} - return protoreflect.ValueOfList(listValue) - case "cosmos.nft.v1beta1.QueryClassesResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesResponse 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_QueryClassesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesResponse.classes": - lv := value.List() - clv := lv.(*_QueryClassesResponse_1_list) - x.Classes = *clv.list - case "cosmos.nft.v1beta1.QueryClassesResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesResponse 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_QueryClassesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesResponse.classes": - if x.Classes == nil { - x.Classes = []*Class{} - } - value := &_QueryClassesResponse_1_list{list: &x.Classes} - return protoreflect.ValueOfList(value) - case "cosmos.nft.v1beta1.QueryClassesResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesResponse 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_QueryClassesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.QueryClassesResponse.classes": - list := []*Class{} - return protoreflect.ValueOfList(&_QueryClassesResponse_1_list{list: &list}) - case "cosmos.nft.v1beta1.QueryClassesResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.QueryClassesResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.QueryClassesResponse 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_QueryClassesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.QueryClassesResponse", 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_QueryClassesResponse) 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_QueryClassesResponse) 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_QueryClassesResponse) 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_QueryClassesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryClassesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Classes) > 0 { - for _, e := range x.Classes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryClassesResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Classes) > 0 { - for iNdEx := len(x.Classes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Classes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryClassesResponse) - 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: QueryClassesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClassesResponse: 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 Classes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Classes = append(x.Classes, &Class{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Classes[len(x.Classes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/nft/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryBalanceRequest is the request type for the Query/Balance RPC method -type QueryBalanceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *QueryBalanceRequest) Reset() { - *x = QueryBalanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryBalanceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryBalanceRequest) ProtoMessage() {} - -// Deprecated: Use QueryBalanceRequest.ProtoReflect.Descriptor instead. -func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryBalanceRequest) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *QueryBalanceRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method -type QueryBalanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *QueryBalanceResponse) Reset() { - *x = QueryBalanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryBalanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryBalanceResponse) ProtoMessage() {} - -// Deprecated: Use QueryBalanceResponse.ProtoReflect.Descriptor instead. -func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryBalanceResponse) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - -// QueryOwnerRequest is the request type for the Query/Owner RPC method -type QueryOwnerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *QueryOwnerRequest) Reset() { - *x = QueryOwnerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryOwnerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryOwnerRequest) ProtoMessage() {} - -// Deprecated: Use QueryOwnerRequest.ProtoReflect.Descriptor instead. -func (*QueryOwnerRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryOwnerRequest) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *QueryOwnerRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// QueryOwnerResponse is the response type for the Query/Owner RPC method -type QueryOwnerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *QueryOwnerResponse) Reset() { - *x = QueryOwnerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryOwnerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryOwnerResponse) ProtoMessage() {} - -// Deprecated: Use QueryOwnerResponse.ProtoReflect.Descriptor instead. -func (*QueryOwnerResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryOwnerResponse) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -// QuerySupplyRequest is the request type for the Query/Supply RPC method -type QuerySupplyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` -} - -func (x *QuerySupplyRequest) Reset() { - *x = QuerySupplyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySupplyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySupplyRequest) ProtoMessage() {} - -// Deprecated: Use QuerySupplyRequest.ProtoReflect.Descriptor instead. -func (*QuerySupplyRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QuerySupplyRequest) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -// QuerySupplyResponse is the response type for the Query/Supply RPC method -type QuerySupplyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *QuerySupplyResponse) Reset() { - *x = QuerySupplyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySupplyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySupplyResponse) ProtoMessage() {} - -// Deprecated: Use QuerySupplyResponse.ProtoReflect.Descriptor instead. -func (*QuerySupplyResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QuerySupplyResponse) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - -// QueryNFTstRequest is the request type for the Query/NFTs RPC method -type QueryNFTsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Pagination *v1beta1.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryNFTsRequest) Reset() { - *x = QueryNFTsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryNFTsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryNFTsRequest) ProtoMessage() {} - -// Deprecated: Use QueryNFTsRequest.ProtoReflect.Descriptor instead. -func (*QueryNFTsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryNFTsRequest) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *QueryNFTsRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *QueryNFTsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryNFTsResponse is the response type for the Query/NFTs RPC methods -type QueryNFTsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nfts []*NFT `protobuf:"bytes,1,rep,name=nfts,proto3" json:"nfts,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryNFTsResponse) Reset() { - *x = QueryNFTsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryNFTsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryNFTsResponse) ProtoMessage() {} - -// Deprecated: Use QueryNFTsResponse.ProtoReflect.Descriptor instead. -func (*QueryNFTsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryNFTsResponse) GetNfts() []*NFT { - if x != nil { - return x.Nfts - } - return nil -} - -func (x *QueryNFTsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryNFTRequest is the request type for the Query/NFT RPC method -type QueryNFTRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *QueryNFTRequest) Reset() { - *x = QueryNFTRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryNFTRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryNFTRequest) ProtoMessage() {} - -// Deprecated: Use QueryNFTRequest.ProtoReflect.Descriptor instead. -func (*QueryNFTRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryNFTRequest) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *QueryNFTRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// QueryNFTResponse is the response type for the Query/NFT RPC method -type QueryNFTResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nft *NFT `protobuf:"bytes,1,opt,name=nft,proto3" json:"nft,omitempty"` -} - -func (x *QueryNFTResponse) Reset() { - *x = QueryNFTResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryNFTResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryNFTResponse) ProtoMessage() {} - -// Deprecated: Use QueryNFTResponse.ProtoReflect.Descriptor instead. -func (*QueryNFTResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryNFTResponse) GetNft() *NFT { - if x != nil { - return x.Nft - } - return nil -} - -// QueryClassRequest is the request type for the Query/Class RPC method -type QueryClassRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` -} - -func (x *QueryClassRequest) Reset() { - *x = QueryClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryClassRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryClassRequest) ProtoMessage() {} - -// Deprecated: Use QueryClassRequest.ProtoReflect.Descriptor instead. -func (*QueryClassRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryClassRequest) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -// QueryClassResponse is the response type for the Query/Class RPC method -type QueryClassResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Class *Class `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` -} - -func (x *QueryClassResponse) Reset() { - *x = QueryClassResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryClassResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryClassResponse) ProtoMessage() {} - -// Deprecated: Use QueryClassResponse.ProtoReflect.Descriptor instead. -func (*QueryClassResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryClassResponse) GetClass() *Class { - if x != nil { - return x.Class - } - return nil -} - -// QueryClassesRequest is the request type for the Query/Classes RPC method -type QueryClassesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryClassesRequest) Reset() { - *x = QueryClassesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryClassesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryClassesRequest) ProtoMessage() {} - -// Deprecated: Use QueryClassesRequest.ProtoReflect.Descriptor instead. -func (*QueryClassesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryClassesRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryClassesResponse is the response type for the Query/Classes RPC method -type QueryClassesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Classes []*Class `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryClassesResponse) Reset() { - *x = QueryClassesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryClassesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryClassesResponse) ProtoMessage() {} - -// Deprecated: Use QueryClassesResponse.ProtoReflect.Descriptor instead. -func (*QueryClassesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryClassesResponse) GetClasses() []*Class { - if x != nil { - return x.Classes - } - return nil -} - -func (x *QueryClassesResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_nft_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_nft_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x6e, 0x66, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x22, 0x2e, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x22, 0x2f, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, - 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x8b, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, - 0x01, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x6e, 0x66, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x46, 0x54, 0x52, 0x04, 0x6e, 0x66, 0x74, - 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x0f, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4e, 0x46, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4e, 0x46, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, - 0x6e, 0x66, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, - 0x46, 0x54, 0x52, 0x03, 0x6e, 0x66, 0x74, 0x22, 0x2e, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x5d, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, - 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xbe, 0x07, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x94, - 0x01, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, - 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, - 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x2f, 0x7b, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, - 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, - 0x79, 0x2f, 0x7b, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x04, - 0x4e, 0x46, 0x54, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, - 0x46, 0x54, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, - 0x66, 0x74, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x03, 0x4e, 0x46, 0x54, 0x12, 0x23, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x46, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x46, 0x54, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x66, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x05, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x07, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x65, 0x73, 0x42, 0xce, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x6e, 0x66, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x4e, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4e, 0x66, - 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_nft_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_nft_v1beta1_query_proto_rawDescData = file_cosmos_nft_v1beta1_query_proto_rawDesc -) - -func file_cosmos_nft_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_nft_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_nft_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_nft_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_nft_v1beta1_query_proto_rawDescData -} - -var file_cosmos_nft_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_cosmos_nft_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryBalanceRequest)(nil), // 0: cosmos.nft.v1beta1.QueryBalanceRequest - (*QueryBalanceResponse)(nil), // 1: cosmos.nft.v1beta1.QueryBalanceResponse - (*QueryOwnerRequest)(nil), // 2: cosmos.nft.v1beta1.QueryOwnerRequest - (*QueryOwnerResponse)(nil), // 3: cosmos.nft.v1beta1.QueryOwnerResponse - (*QuerySupplyRequest)(nil), // 4: cosmos.nft.v1beta1.QuerySupplyRequest - (*QuerySupplyResponse)(nil), // 5: cosmos.nft.v1beta1.QuerySupplyResponse - (*QueryNFTsRequest)(nil), // 6: cosmos.nft.v1beta1.QueryNFTsRequest - (*QueryNFTsResponse)(nil), // 7: cosmos.nft.v1beta1.QueryNFTsResponse - (*QueryNFTRequest)(nil), // 8: cosmos.nft.v1beta1.QueryNFTRequest - (*QueryNFTResponse)(nil), // 9: cosmos.nft.v1beta1.QueryNFTResponse - (*QueryClassRequest)(nil), // 10: cosmos.nft.v1beta1.QueryClassRequest - (*QueryClassResponse)(nil), // 11: cosmos.nft.v1beta1.QueryClassResponse - (*QueryClassesRequest)(nil), // 12: cosmos.nft.v1beta1.QueryClassesRequest - (*QueryClassesResponse)(nil), // 13: cosmos.nft.v1beta1.QueryClassesResponse - (*v1beta1.PageRequest)(nil), // 14: cosmos.base.query.v1beta1.PageRequest - (*NFT)(nil), // 15: cosmos.nft.v1beta1.NFT - (*v1beta1.PageResponse)(nil), // 16: cosmos.base.query.v1beta1.PageResponse - (*Class)(nil), // 17: cosmos.nft.v1beta1.Class -} -var file_cosmos_nft_v1beta1_query_proto_depIdxs = []int32{ - 14, // 0: cosmos.nft.v1beta1.QueryNFTsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 15, // 1: cosmos.nft.v1beta1.QueryNFTsResponse.nfts:type_name -> cosmos.nft.v1beta1.NFT - 16, // 2: cosmos.nft.v1beta1.QueryNFTsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 15, // 3: cosmos.nft.v1beta1.QueryNFTResponse.nft:type_name -> cosmos.nft.v1beta1.NFT - 17, // 4: cosmos.nft.v1beta1.QueryClassResponse.class:type_name -> cosmos.nft.v1beta1.Class - 14, // 5: cosmos.nft.v1beta1.QueryClassesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 17, // 6: cosmos.nft.v1beta1.QueryClassesResponse.classes:type_name -> cosmos.nft.v1beta1.Class - 16, // 7: cosmos.nft.v1beta1.QueryClassesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 8: cosmos.nft.v1beta1.Query.Balance:input_type -> cosmos.nft.v1beta1.QueryBalanceRequest - 2, // 9: cosmos.nft.v1beta1.Query.Owner:input_type -> cosmos.nft.v1beta1.QueryOwnerRequest - 4, // 10: cosmos.nft.v1beta1.Query.Supply:input_type -> cosmos.nft.v1beta1.QuerySupplyRequest - 6, // 11: cosmos.nft.v1beta1.Query.NFTs:input_type -> cosmos.nft.v1beta1.QueryNFTsRequest - 8, // 12: cosmos.nft.v1beta1.Query.NFT:input_type -> cosmos.nft.v1beta1.QueryNFTRequest - 10, // 13: cosmos.nft.v1beta1.Query.Class:input_type -> cosmos.nft.v1beta1.QueryClassRequest - 12, // 14: cosmos.nft.v1beta1.Query.Classes:input_type -> cosmos.nft.v1beta1.QueryClassesRequest - 1, // 15: cosmos.nft.v1beta1.Query.Balance:output_type -> cosmos.nft.v1beta1.QueryBalanceResponse - 3, // 16: cosmos.nft.v1beta1.Query.Owner:output_type -> cosmos.nft.v1beta1.QueryOwnerResponse - 5, // 17: cosmos.nft.v1beta1.Query.Supply:output_type -> cosmos.nft.v1beta1.QuerySupplyResponse - 7, // 18: cosmos.nft.v1beta1.Query.NFTs:output_type -> cosmos.nft.v1beta1.QueryNFTsResponse - 9, // 19: cosmos.nft.v1beta1.Query.NFT:output_type -> cosmos.nft.v1beta1.QueryNFTResponse - 11, // 20: cosmos.nft.v1beta1.Query.Class:output_type -> cosmos.nft.v1beta1.QueryClassResponse - 13, // 21: cosmos.nft.v1beta1.Query.Classes:output_type -> cosmos.nft.v1beta1.QueryClassesResponse - 15, // [15:22] is the sub-list for method output_type - 8, // [8:15] 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_nft_v1beta1_query_proto_init() } -func file_cosmos_nft_v1beta1_query_proto_init() { - if File_cosmos_nft_v1beta1_query_proto != nil { - return - } - file_cosmos_nft_v1beta1_nft_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_nft_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBalanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBalanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryOwnerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryOwnerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySupplyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySupplyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryNFTsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryNFTsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryNFTRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryNFTResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryClassResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryClassesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryClassesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_nft_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_nft_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_nft_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_nft_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_nft_v1beta1_query_proto = out.File - file_cosmos_nft_v1beta1_query_proto_rawDesc = nil - file_cosmos_nft_v1beta1_query_proto_goTypes = nil - file_cosmos_nft_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/nft/v1beta1/query_grpc.pb.go b/api/cosmos/nft/v1beta1/query_grpc.pb.go deleted file mode 100644 index 08c14bf84c5f..000000000000 --- a/api/cosmos/nft/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/nft/v1beta1/query.proto - -package nftv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 - Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) - // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 - Owner(ctx context.Context, in *QueryOwnerRequest, opts ...grpc.CallOption) (*QueryOwnerResponse, error) - // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. - Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) - // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - // ERC721Enumerable - NFTs(ctx context.Context, in *QueryNFTsRequest, opts ...grpc.CallOption) (*QueryNFTsResponse, error) - // NFT queries an NFT based on its class and id. - NFT(ctx context.Context, in *QueryNFTRequest, opts ...grpc.CallOption) (*QueryNFTResponse, error) - // Class queries an NFT class based on its id - Class(ctx context.Context, in *QueryClassRequest, opts ...grpc.CallOption) (*QueryClassResponse, error) - // Classes queries all NFT classes - Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { - out := new(QueryBalanceResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Balance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Owner(ctx context.Context, in *QueryOwnerRequest, opts ...grpc.CallOption) (*QueryOwnerResponse, error) { - out := new(QueryOwnerResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Owner", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) { - out := new(QuerySupplyResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Supply", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) NFTs(ctx context.Context, in *QueryNFTsRequest, opts ...grpc.CallOption) (*QueryNFTsResponse, error) { - out := new(QueryNFTsResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/NFTs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) NFT(ctx context.Context, in *QueryNFTRequest, opts ...grpc.CallOption) (*QueryNFTResponse, error) { - out := new(QueryNFTResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/NFT", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Class(ctx context.Context, in *QueryClassRequest, opts ...grpc.CallOption) (*QueryClassResponse, error) { - out := new(QueryClassResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Class", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) { - out := new(QueryClassesResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Classes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 - Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) - // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 - Owner(context.Context, *QueryOwnerRequest) (*QueryOwnerResponse, error) - // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. - Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error) - // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - // ERC721Enumerable - NFTs(context.Context, *QueryNFTsRequest) (*QueryNFTsResponse, error) - // NFT queries an NFT based on its class and id. - NFT(context.Context, *QueryNFTRequest) (*QueryNFTResponse, error) - // Class queries an NFT class based on its id - Class(context.Context, *QueryClassRequest) (*QueryClassResponse, error) - // Classes queries all NFT classes - Classes(context.Context, *QueryClassesRequest) (*QueryClassesResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") -} -func (UnimplementedQueryServer) Owner(context.Context, *QueryOwnerRequest) (*QueryOwnerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Owner not implemented") -} -func (UnimplementedQueryServer) Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Supply not implemented") -} -func (UnimplementedQueryServer) NFTs(context.Context, *QueryNFTsRequest) (*QueryNFTsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NFTs not implemented") -} -func (UnimplementedQueryServer) NFT(context.Context, *QueryNFTRequest) (*QueryNFTResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NFT not implemented") -} -func (UnimplementedQueryServer) Class(context.Context, *QueryClassRequest) (*QueryClassResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Class not implemented") -} -func (UnimplementedQueryServer) Classes(context.Context, *QueryClassesRequest) (*QueryClassesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Classes not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBalanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Balance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/Balance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Owner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryOwnerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Owner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/Owner", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Owner(ctx, req.(*QueryOwnerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Supply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySupplyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Supply(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/Supply", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Supply(ctx, req.(*QuerySupplyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_NFTs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryNFTsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).NFTs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/NFTs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NFTs(ctx, req.(*QueryNFTsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_NFT_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryNFTRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).NFT(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/NFT", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NFT(ctx, req.(*QueryNFTRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Class_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryClassRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Class(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/Class", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Class(ctx, req.(*QueryClassRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Classes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryClassesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Classes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Query/Classes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Classes(ctx, req.(*QueryClassesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.nft.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Balance", - Handler: _Query_Balance_Handler, - }, - { - MethodName: "Owner", - Handler: _Query_Owner_Handler, - }, - { - MethodName: "Supply", - Handler: _Query_Supply_Handler, - }, - { - MethodName: "NFTs", - Handler: _Query_NFTs_Handler, - }, - { - MethodName: "NFT", - Handler: _Query_NFT_Handler, - }, - { - MethodName: "Class", - Handler: _Query_Class_Handler, - }, - { - MethodName: "Classes", - Handler: _Query_Classes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/nft/v1beta1/query.proto", -} diff --git a/api/cosmos/nft/v1beta1/tx.pulsar.go b/api/cosmos/nft/v1beta1/tx.pulsar.go deleted file mode 100644 index d40d4a76c8ff..000000000000 --- a/api/cosmos/nft/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,1201 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package nftv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgSend protoreflect.MessageDescriptor - fd_MsgSend_class_id protoreflect.FieldDescriptor - fd_MsgSend_id protoreflect.FieldDescriptor - fd_MsgSend_sender protoreflect.FieldDescriptor - fd_MsgSend_receiver protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_tx_proto_init() - md_MsgSend = File_cosmos_nft_v1beta1_tx_proto.Messages().ByName("MsgSend") - fd_MsgSend_class_id = md_MsgSend.Fields().ByName("class_id") - fd_MsgSend_id = md_MsgSend.Fields().ByName("id") - fd_MsgSend_sender = md_MsgSend.Fields().ByName("sender") - fd_MsgSend_receiver = md_MsgSend.Fields().ByName("receiver") -} - -var _ protoreflect.Message = (*fastReflection_MsgSend)(nil) - -type fastReflection_MsgSend MsgSend - -func (x *MsgSend) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSend)(x) -} - -func (x *MsgSend) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSend_messageType fastReflection_MsgSend_messageType -var _ protoreflect.MessageType = fastReflection_MsgSend_messageType{} - -type fastReflection_MsgSend_messageType struct{} - -func (x fastReflection_MsgSend_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSend)(nil) -} -func (x fastReflection_MsgSend_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSend) -} -func (x fastReflection_MsgSend_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSend -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSend) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSend -} - -// 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_MsgSend) Type() protoreflect.MessageType { - return _fastReflection_MsgSend_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSend) New() protoreflect.Message { - return new(fastReflection_MsgSend) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSend) Interface() protoreflect.ProtoMessage { - return (*MsgSend)(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_MsgSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ClassId != "" { - value := protoreflect.ValueOfString(x.ClassId) - if !f(fd_MsgSend_class_id, value) { - return - } - } - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_MsgSend_id, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgSend_sender, value) { - return - } - } - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_MsgSend_receiver, 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_MsgSend) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.nft.v1beta1.MsgSend.class_id": - return x.ClassId != "" - case "cosmos.nft.v1beta1.MsgSend.id": - return x.Id != "" - case "cosmos.nft.v1beta1.MsgSend.sender": - return x.Sender != "" - case "cosmos.nft.v1beta1.MsgSend.receiver": - return x.Receiver != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSend 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_MsgSend) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.MsgSend.class_id": - x.ClassId = "" - case "cosmos.nft.v1beta1.MsgSend.id": - x.Id = "" - case "cosmos.nft.v1beta1.MsgSend.sender": - x.Sender = "" - case "cosmos.nft.v1beta1.MsgSend.receiver": - x.Receiver = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSend 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_MsgSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.nft.v1beta1.MsgSend.class_id": - value := x.ClassId - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.MsgSend.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.MsgSend.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.nft.v1beta1.MsgSend.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSend 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_MsgSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.nft.v1beta1.MsgSend.class_id": - x.ClassId = value.Interface().(string) - case "cosmos.nft.v1beta1.MsgSend.id": - x.Id = value.Interface().(string) - case "cosmos.nft.v1beta1.MsgSend.sender": - x.Sender = value.Interface().(string) - case "cosmos.nft.v1beta1.MsgSend.receiver": - x.Receiver = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSend 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_MsgSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.MsgSend.class_id": - panic(fmt.Errorf("field class_id of message cosmos.nft.v1beta1.MsgSend is not mutable")) - case "cosmos.nft.v1beta1.MsgSend.id": - panic(fmt.Errorf("field id of message cosmos.nft.v1beta1.MsgSend is not mutable")) - case "cosmos.nft.v1beta1.MsgSend.sender": - panic(fmt.Errorf("field sender of message cosmos.nft.v1beta1.MsgSend is not mutable")) - case "cosmos.nft.v1beta1.MsgSend.receiver": - panic(fmt.Errorf("field receiver of message cosmos.nft.v1beta1.MsgSend is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSend 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_MsgSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.nft.v1beta1.MsgSend.class_id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.MsgSend.id": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.MsgSend.sender": - return protoreflect.ValueOfString("") - case "cosmos.nft.v1beta1.MsgSend.receiver": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSend")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSend 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_MsgSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.MsgSend", 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_MsgSend) 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_MsgSend) 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_MsgSend) 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_MsgSend) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ClassId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0x22 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0x12 - } - if len(x.ClassId) > 0 { - i -= len(x.ClassId) - copy(dAtA[i:], x.ClassId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClassId))) - 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().(*MsgSend) - 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: MsgSend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: 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 ClassId", 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.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSendResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_nft_v1beta1_tx_proto_init() - md_MsgSendResponse = File_cosmos_nft_v1beta1_tx_proto.Messages().ByName("MsgSendResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSendResponse)(nil) - -type fastReflection_MsgSendResponse MsgSendResponse - -func (x *MsgSendResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSendResponse)(x) -} - -func (x *MsgSendResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_nft_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSendResponse_messageType fastReflection_MsgSendResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSendResponse_messageType{} - -type fastReflection_MsgSendResponse_messageType struct{} - -func (x fastReflection_MsgSendResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSendResponse)(nil) -} -func (x fastReflection_MsgSendResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSendResponse) -} -func (x fastReflection_MsgSendResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSendResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSendResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSendResponse -} - -// 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_MsgSendResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSendResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSendResponse) New() protoreflect.Message { - return new(fastReflection_MsgSendResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSendResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSendResponse)(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_MsgSendResponse) 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_MsgSendResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSendResponse 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_MsgSendResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSendResponse 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_MsgSendResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSendResponse 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_MsgSendResponse) 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.nft.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSendResponse 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_MsgSendResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSendResponse 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_MsgSendResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.nft.v1beta1.MsgSendResponse")) - } - panic(fmt.Errorf("message cosmos.nft.v1beta1.MsgSendResponse 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_MsgSendResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.nft.v1beta1.MsgSendResponse", 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_MsgSendResponse) 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_MsgSendResponse) 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_MsgSendResponse) 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_MsgSendResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSendResponse) - 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().(*MsgSendResponse) - 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().(*MsgSendResponse) - 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: MsgSendResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/nft/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSend represents a message to send a nft from one account to another account. -type MsgSend struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // id defines the unique identification of nft - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // sender is the address of the owner of nft - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` - // receiver is the receiver address of nft - Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (x *MsgSend) Reset() { - *x = MsgSend{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSend) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSend) ProtoMessage() {} - -// Deprecated: Use MsgSend.ProtoReflect.Descriptor instead. -func (*MsgSend) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSend) GetClassId() string { - if x != nil { - return x.ClassId - } - return "" -} - -func (x *MsgSend) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *MsgSend) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgSend) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -// MsgSendResponse defines the Msg/Send response type. -type MsgSendResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSendResponse) Reset() { - *x = MsgSendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_nft_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSendResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSendResponse) ProtoMessage() {} - -// Deprecated: Use MsgSendResponse.ProtoReflect.Descriptor instead. -func (*MsgSendResponse) Descriptor() ([]byte, []int) { - return file_cosmos_nft_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -var File_cosmos_nft_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_nft_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x75, 0x0a, 0x07, 0x4d, 0x73, - 0x67, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x4f, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x04, 0x53, - 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, - 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xcb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x6e, 0x66, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4e, - 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4e, 0x66, 0x74, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_nft_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_nft_v1beta1_tx_proto_rawDescData = file_cosmos_nft_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_nft_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_nft_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_nft_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_nft_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_nft_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_nft_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_nft_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSend)(nil), // 0: cosmos.nft.v1beta1.MsgSend - (*MsgSendResponse)(nil), // 1: cosmos.nft.v1beta1.MsgSendResponse -} -var file_cosmos_nft_v1beta1_tx_proto_depIdxs = []int32{ - 0, // 0: cosmos.nft.v1beta1.Msg.Send:input_type -> cosmos.nft.v1beta1.MsgSend - 1, // 1: cosmos.nft.v1beta1.Msg.Send:output_type -> cosmos.nft.v1beta1.MsgSendResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_nft_v1beta1_tx_proto_init() } -func file_cosmos_nft_v1beta1_tx_proto_init() { - if File_cosmos_nft_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_nft_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_nft_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_nft_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_nft_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_nft_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_nft_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_nft_v1beta1_tx_proto = out.File - file_cosmos_nft_v1beta1_tx_proto_rawDesc = nil - file_cosmos_nft_v1beta1_tx_proto_goTypes = nil - file_cosmos_nft_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/nft/v1beta1/tx_grpc.pb.go b/api/cosmos/nft/v1beta1/tx_grpc.pb.go deleted file mode 100644 index b08e83389044..000000000000 --- a/api/cosmos/nft/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/nft/v1beta1/tx.proto - -package nftv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // Send defines a method to send a nft from one account to another account. - Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) { - out := new(MsgSendResponse) - err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Msg/Send", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // Send defines a method to send a nft from one account to another account. - Send(context.Context, *MsgSend) (*MsgSendResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) Send(context.Context, *MsgSend) (*MsgSendResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSend) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Send(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.nft.v1beta1.Msg/Send", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Send(ctx, req.(*MsgSend)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.nft.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Send", - Handler: _Msg_Send_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/nft/v1beta1/tx.proto", -} diff --git a/api/cosmos/orm/module/v1alpha1/module.pulsar.go b/api/cosmos/orm/module/v1alpha1/module.pulsar.go deleted file mode 100644 index ca381bb9cebe..000000000000 --- a/api/cosmos/orm/module/v1alpha1/module.pulsar.go +++ /dev/null @@ -1,507 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package modulev1alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/app/v1alpha1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Module protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_orm_module_v1alpha1_module_proto_init() - md_Module = File_cosmos_orm_module_v1alpha1_module_proto.Messages().ByName("Module") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_module_v1alpha1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// 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_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(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_Module) 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_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module 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_Module) 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.orm.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) - } - panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.module.v1alpha1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - 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().(*Module) - 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().(*Module) - 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: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/orm/module/v1alpha1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Module defines the ORM module which adds providers to the app container for -// module-scoped DB's. In the future it may provide gRPC services for interacting -// with ORM data. -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_module_v1alpha1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_cosmos_orm_module_v1alpha1_module_proto_rawDescGZIP(), []int{0} -} - -var File_cosmos_orm_module_v1alpha1_module_proto protoreflect.FileDescriptor - -var file_cosmos_orm_module_v1alpha1_module_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, - 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x3a, 0x28, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x22, 0x0a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x6f, 0x72, 0x6d, 0x42, 0x84, 0x02, 0x0a, 0x1e, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x4d, 0xaa, - 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, 0x6d, 0x2e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, 0x6d, - 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_orm_module_v1alpha1_module_proto_rawDescOnce sync.Once - file_cosmos_orm_module_v1alpha1_module_proto_rawDescData = file_cosmos_orm_module_v1alpha1_module_proto_rawDesc -) - -func file_cosmos_orm_module_v1alpha1_module_proto_rawDescGZIP() []byte { - file_cosmos_orm_module_v1alpha1_module_proto_rawDescOnce.Do(func() { - file_cosmos_orm_module_v1alpha1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_orm_module_v1alpha1_module_proto_rawDescData) - }) - return file_cosmos_orm_module_v1alpha1_module_proto_rawDescData -} - -var file_cosmos_orm_module_v1alpha1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_orm_module_v1alpha1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: cosmos.orm.module.v1alpha1.Module -} -var file_cosmos_orm_module_v1alpha1_module_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_orm_module_v1alpha1_module_proto_init() } -func file_cosmos_orm_module_v1alpha1_module_proto_init() { - if File_cosmos_orm_module_v1alpha1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_orm_module_v1alpha1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_orm_module_v1alpha1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_orm_module_v1alpha1_module_proto_goTypes, - DependencyIndexes: file_cosmos_orm_module_v1alpha1_module_proto_depIdxs, - MessageInfos: file_cosmos_orm_module_v1alpha1_module_proto_msgTypes, - }.Build() - File_cosmos_orm_module_v1alpha1_module_proto = out.File - file_cosmos_orm_module_v1alpha1_module_proto_rawDesc = nil - file_cosmos_orm_module_v1alpha1_module_proto_goTypes = nil - file_cosmos_orm_module_v1alpha1_module_proto_depIdxs = nil -} diff --git a/api/cosmos/orm/v1/orm.pulsar.go b/api/cosmos/orm/v1/orm.pulsar.go deleted file mode 100644 index 5fa1bcba696f..000000000000 --- a/api/cosmos/orm/v1/orm.pulsar.go +++ /dev/null @@ -1,2487 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package ormv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_TableDescriptor_2_list)(nil) - -type _TableDescriptor_2_list struct { - list *[]*SecondaryIndexDescriptor -} - -func (x *_TableDescriptor_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TableDescriptor_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TableDescriptor_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SecondaryIndexDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_TableDescriptor_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SecondaryIndexDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TableDescriptor_2_list) AppendMutable() protoreflect.Value { - v := new(SecondaryIndexDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TableDescriptor_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TableDescriptor_2_list) NewElement() protoreflect.Value { - v := new(SecondaryIndexDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TableDescriptor_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TableDescriptor protoreflect.MessageDescriptor - fd_TableDescriptor_primary_key protoreflect.FieldDescriptor - fd_TableDescriptor_index protoreflect.FieldDescriptor - fd_TableDescriptor_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1_orm_proto_init() - md_TableDescriptor = File_cosmos_orm_v1_orm_proto.Messages().ByName("TableDescriptor") - fd_TableDescriptor_primary_key = md_TableDescriptor.Fields().ByName("primary_key") - fd_TableDescriptor_index = md_TableDescriptor.Fields().ByName("index") - fd_TableDescriptor_id = md_TableDescriptor.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_TableDescriptor)(nil) - -type fastReflection_TableDescriptor TableDescriptor - -func (x *TableDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_TableDescriptor)(x) -} - -func (x *TableDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TableDescriptor_messageType fastReflection_TableDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_TableDescriptor_messageType{} - -type fastReflection_TableDescriptor_messageType struct{} - -func (x fastReflection_TableDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_TableDescriptor)(nil) -} -func (x fastReflection_TableDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_TableDescriptor) -} -func (x fastReflection_TableDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TableDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TableDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_TableDescriptor -} - -// 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_TableDescriptor) Type() protoreflect.MessageType { - return _fastReflection_TableDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TableDescriptor) New() protoreflect.Message { - return new(fastReflection_TableDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TableDescriptor) Interface() protoreflect.ProtoMessage { - return (*TableDescriptor)(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_TableDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PrimaryKey != nil { - value := protoreflect.ValueOfMessage(x.PrimaryKey.ProtoReflect()) - if !f(fd_TableDescriptor_primary_key, value) { - return - } - } - if len(x.Index) != 0 { - value := protoreflect.ValueOfList(&_TableDescriptor_2_list{list: &x.Index}) - if !f(fd_TableDescriptor_index, value) { - return - } - } - if x.Id != uint32(0) { - value := protoreflect.ValueOfUint32(x.Id) - if !f(fd_TableDescriptor_id, 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_TableDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1.TableDescriptor.primary_key": - return x.PrimaryKey != nil - case "cosmos.orm.v1.TableDescriptor.index": - return len(x.Index) != 0 - case "cosmos.orm.v1.TableDescriptor.id": - return x.Id != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.TableDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.TableDescriptor 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_TableDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1.TableDescriptor.primary_key": - x.PrimaryKey = nil - case "cosmos.orm.v1.TableDescriptor.index": - x.Index = nil - case "cosmos.orm.v1.TableDescriptor.id": - x.Id = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.TableDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.TableDescriptor 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_TableDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1.TableDescriptor.primary_key": - value := x.PrimaryKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.orm.v1.TableDescriptor.index": - if len(x.Index) == 0 { - return protoreflect.ValueOfList(&_TableDescriptor_2_list{}) - } - listValue := &_TableDescriptor_2_list{list: &x.Index} - return protoreflect.ValueOfList(listValue) - case "cosmos.orm.v1.TableDescriptor.id": - value := x.Id - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.TableDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.TableDescriptor 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_TableDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1.TableDescriptor.primary_key": - x.PrimaryKey = value.Message().Interface().(*PrimaryKeyDescriptor) - case "cosmos.orm.v1.TableDescriptor.index": - lv := value.List() - clv := lv.(*_TableDescriptor_2_list) - x.Index = *clv.list - case "cosmos.orm.v1.TableDescriptor.id": - x.Id = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.TableDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.TableDescriptor 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_TableDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.TableDescriptor.primary_key": - if x.PrimaryKey == nil { - x.PrimaryKey = new(PrimaryKeyDescriptor) - } - return protoreflect.ValueOfMessage(x.PrimaryKey.ProtoReflect()) - case "cosmos.orm.v1.TableDescriptor.index": - if x.Index == nil { - x.Index = []*SecondaryIndexDescriptor{} - } - value := &_TableDescriptor_2_list{list: &x.Index} - return protoreflect.ValueOfList(value) - case "cosmos.orm.v1.TableDescriptor.id": - panic(fmt.Errorf("field id of message cosmos.orm.v1.TableDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.TableDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.TableDescriptor 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_TableDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.TableDescriptor.primary_key": - m := new(PrimaryKeyDescriptor) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.orm.v1.TableDescriptor.index": - list := []*SecondaryIndexDescriptor{} - return protoreflect.ValueOfList(&_TableDescriptor_2_list{list: &list}) - case "cosmos.orm.v1.TableDescriptor.id": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.TableDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.TableDescriptor 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_TableDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1.TableDescriptor", 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_TableDescriptor) 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_TableDescriptor) 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_TableDescriptor) 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_TableDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TableDescriptor) - 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.PrimaryKey != nil { - l = options.Size(x.PrimaryKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Index) > 0 { - for _, e := range x.Index { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - 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().(*TableDescriptor) - 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.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x18 - } - if len(x.Index) > 0 { - for iNdEx := len(x.Index) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Index[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.PrimaryKey != nil { - encoded, err := options.Marshal(x.PrimaryKey) - 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().(*TableDescriptor) - 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: TableDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TableDescriptor: 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 PrimaryKey", 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.PrimaryKey == nil { - x.PrimaryKey = &PrimaryKeyDescriptor{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PrimaryKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Index = append(x.Index, &SecondaryIndexDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Index[len(x.Index)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PrimaryKeyDescriptor protoreflect.MessageDescriptor - fd_PrimaryKeyDescriptor_fields protoreflect.FieldDescriptor - fd_PrimaryKeyDescriptor_auto_increment protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1_orm_proto_init() - md_PrimaryKeyDescriptor = File_cosmos_orm_v1_orm_proto.Messages().ByName("PrimaryKeyDescriptor") - fd_PrimaryKeyDescriptor_fields = md_PrimaryKeyDescriptor.Fields().ByName("fields") - fd_PrimaryKeyDescriptor_auto_increment = md_PrimaryKeyDescriptor.Fields().ByName("auto_increment") -} - -var _ protoreflect.Message = (*fastReflection_PrimaryKeyDescriptor)(nil) - -type fastReflection_PrimaryKeyDescriptor PrimaryKeyDescriptor - -func (x *PrimaryKeyDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_PrimaryKeyDescriptor)(x) -} - -func (x *PrimaryKeyDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PrimaryKeyDescriptor_messageType fastReflection_PrimaryKeyDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_PrimaryKeyDescriptor_messageType{} - -type fastReflection_PrimaryKeyDescriptor_messageType struct{} - -func (x fastReflection_PrimaryKeyDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_PrimaryKeyDescriptor)(nil) -} -func (x fastReflection_PrimaryKeyDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_PrimaryKeyDescriptor) -} -func (x fastReflection_PrimaryKeyDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PrimaryKeyDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PrimaryKeyDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_PrimaryKeyDescriptor -} - -// 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_PrimaryKeyDescriptor) Type() protoreflect.MessageType { - return _fastReflection_PrimaryKeyDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PrimaryKeyDescriptor) New() protoreflect.Message { - return new(fastReflection_PrimaryKeyDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PrimaryKeyDescriptor) Interface() protoreflect.ProtoMessage { - return (*PrimaryKeyDescriptor)(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_PrimaryKeyDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fields != "" { - value := protoreflect.ValueOfString(x.Fields) - if !f(fd_PrimaryKeyDescriptor_fields, value) { - return - } - } - if x.AutoIncrement != false { - value := protoreflect.ValueOfBool(x.AutoIncrement) - if !f(fd_PrimaryKeyDescriptor_auto_increment, 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_PrimaryKeyDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1.PrimaryKeyDescriptor.fields": - return x.Fields != "" - case "cosmos.orm.v1.PrimaryKeyDescriptor.auto_increment": - return x.AutoIncrement != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.PrimaryKeyDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.PrimaryKeyDescriptor 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_PrimaryKeyDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1.PrimaryKeyDescriptor.fields": - x.Fields = "" - case "cosmos.orm.v1.PrimaryKeyDescriptor.auto_increment": - x.AutoIncrement = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.PrimaryKeyDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.PrimaryKeyDescriptor 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_PrimaryKeyDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1.PrimaryKeyDescriptor.fields": - value := x.Fields - return protoreflect.ValueOfString(value) - case "cosmos.orm.v1.PrimaryKeyDescriptor.auto_increment": - value := x.AutoIncrement - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.PrimaryKeyDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.PrimaryKeyDescriptor 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_PrimaryKeyDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1.PrimaryKeyDescriptor.fields": - x.Fields = value.Interface().(string) - case "cosmos.orm.v1.PrimaryKeyDescriptor.auto_increment": - x.AutoIncrement = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.PrimaryKeyDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.PrimaryKeyDescriptor 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_PrimaryKeyDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.PrimaryKeyDescriptor.fields": - panic(fmt.Errorf("field fields of message cosmos.orm.v1.PrimaryKeyDescriptor is not mutable")) - case "cosmos.orm.v1.PrimaryKeyDescriptor.auto_increment": - panic(fmt.Errorf("field auto_increment of message cosmos.orm.v1.PrimaryKeyDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.PrimaryKeyDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.PrimaryKeyDescriptor 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_PrimaryKeyDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.PrimaryKeyDescriptor.fields": - return protoreflect.ValueOfString("") - case "cosmos.orm.v1.PrimaryKeyDescriptor.auto_increment": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.PrimaryKeyDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.PrimaryKeyDescriptor 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_PrimaryKeyDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1.PrimaryKeyDescriptor", 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_PrimaryKeyDescriptor) 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_PrimaryKeyDescriptor) 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_PrimaryKeyDescriptor) 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_PrimaryKeyDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PrimaryKeyDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fields) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AutoIncrement { - n += 2 - } - 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().(*PrimaryKeyDescriptor) - 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.AutoIncrement { - i-- - if x.AutoIncrement { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Fields) > 0 { - i -= len(x.Fields) - copy(dAtA[i:], x.Fields) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fields))) - 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().(*PrimaryKeyDescriptor) - 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: PrimaryKeyDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PrimaryKeyDescriptor: 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 Fields", 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.Fields = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AutoIncrement", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.AutoIncrement = bool(v != 0) - 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_SecondaryIndexDescriptor protoreflect.MessageDescriptor - fd_SecondaryIndexDescriptor_fields protoreflect.FieldDescriptor - fd_SecondaryIndexDescriptor_id protoreflect.FieldDescriptor - fd_SecondaryIndexDescriptor_unique protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1_orm_proto_init() - md_SecondaryIndexDescriptor = File_cosmos_orm_v1_orm_proto.Messages().ByName("SecondaryIndexDescriptor") - fd_SecondaryIndexDescriptor_fields = md_SecondaryIndexDescriptor.Fields().ByName("fields") - fd_SecondaryIndexDescriptor_id = md_SecondaryIndexDescriptor.Fields().ByName("id") - fd_SecondaryIndexDescriptor_unique = md_SecondaryIndexDescriptor.Fields().ByName("unique") -} - -var _ protoreflect.Message = (*fastReflection_SecondaryIndexDescriptor)(nil) - -type fastReflection_SecondaryIndexDescriptor SecondaryIndexDescriptor - -func (x *SecondaryIndexDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_SecondaryIndexDescriptor)(x) -} - -func (x *SecondaryIndexDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SecondaryIndexDescriptor_messageType fastReflection_SecondaryIndexDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_SecondaryIndexDescriptor_messageType{} - -type fastReflection_SecondaryIndexDescriptor_messageType struct{} - -func (x fastReflection_SecondaryIndexDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_SecondaryIndexDescriptor)(nil) -} -func (x fastReflection_SecondaryIndexDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_SecondaryIndexDescriptor) -} -func (x fastReflection_SecondaryIndexDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SecondaryIndexDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SecondaryIndexDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_SecondaryIndexDescriptor -} - -// 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_SecondaryIndexDescriptor) Type() protoreflect.MessageType { - return _fastReflection_SecondaryIndexDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SecondaryIndexDescriptor) New() protoreflect.Message { - return new(fastReflection_SecondaryIndexDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SecondaryIndexDescriptor) Interface() protoreflect.ProtoMessage { - return (*SecondaryIndexDescriptor)(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_SecondaryIndexDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Fields != "" { - value := protoreflect.ValueOfString(x.Fields) - if !f(fd_SecondaryIndexDescriptor_fields, value) { - return - } - } - if x.Id != uint32(0) { - value := protoreflect.ValueOfUint32(x.Id) - if !f(fd_SecondaryIndexDescriptor_id, value) { - return - } - } - if x.Unique != false { - value := protoreflect.ValueOfBool(x.Unique) - if !f(fd_SecondaryIndexDescriptor_unique, 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_SecondaryIndexDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1.SecondaryIndexDescriptor.fields": - return x.Fields != "" - case "cosmos.orm.v1.SecondaryIndexDescriptor.id": - return x.Id != uint32(0) - case "cosmos.orm.v1.SecondaryIndexDescriptor.unique": - return x.Unique != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SecondaryIndexDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SecondaryIndexDescriptor 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_SecondaryIndexDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1.SecondaryIndexDescriptor.fields": - x.Fields = "" - case "cosmos.orm.v1.SecondaryIndexDescriptor.id": - x.Id = uint32(0) - case "cosmos.orm.v1.SecondaryIndexDescriptor.unique": - x.Unique = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SecondaryIndexDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SecondaryIndexDescriptor 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_SecondaryIndexDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1.SecondaryIndexDescriptor.fields": - value := x.Fields - return protoreflect.ValueOfString(value) - case "cosmos.orm.v1.SecondaryIndexDescriptor.id": - value := x.Id - return protoreflect.ValueOfUint32(value) - case "cosmos.orm.v1.SecondaryIndexDescriptor.unique": - value := x.Unique - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SecondaryIndexDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SecondaryIndexDescriptor 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_SecondaryIndexDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1.SecondaryIndexDescriptor.fields": - x.Fields = value.Interface().(string) - case "cosmos.orm.v1.SecondaryIndexDescriptor.id": - x.Id = uint32(value.Uint()) - case "cosmos.orm.v1.SecondaryIndexDescriptor.unique": - x.Unique = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SecondaryIndexDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SecondaryIndexDescriptor 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_SecondaryIndexDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.SecondaryIndexDescriptor.fields": - panic(fmt.Errorf("field fields of message cosmos.orm.v1.SecondaryIndexDescriptor is not mutable")) - case "cosmos.orm.v1.SecondaryIndexDescriptor.id": - panic(fmt.Errorf("field id of message cosmos.orm.v1.SecondaryIndexDescriptor is not mutable")) - case "cosmos.orm.v1.SecondaryIndexDescriptor.unique": - panic(fmt.Errorf("field unique of message cosmos.orm.v1.SecondaryIndexDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SecondaryIndexDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SecondaryIndexDescriptor 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_SecondaryIndexDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.SecondaryIndexDescriptor.fields": - return protoreflect.ValueOfString("") - case "cosmos.orm.v1.SecondaryIndexDescriptor.id": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.orm.v1.SecondaryIndexDescriptor.unique": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SecondaryIndexDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SecondaryIndexDescriptor 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_SecondaryIndexDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1.SecondaryIndexDescriptor", 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_SecondaryIndexDescriptor) 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_SecondaryIndexDescriptor) 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_SecondaryIndexDescriptor) 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_SecondaryIndexDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SecondaryIndexDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Fields) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Unique { - n += 2 - } - 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().(*SecondaryIndexDescriptor) - 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.Unique { - i-- - if x.Unique { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x10 - } - if len(x.Fields) > 0 { - i -= len(x.Fields) - copy(dAtA[i:], x.Fields) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fields))) - 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().(*SecondaryIndexDescriptor) - 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: SecondaryIndexDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SecondaryIndexDescriptor: 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 Fields", 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.Fields = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Unique", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Unique = bool(v != 0) - 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_SingletonDescriptor protoreflect.MessageDescriptor - fd_SingletonDescriptor_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1_orm_proto_init() - md_SingletonDescriptor = File_cosmos_orm_v1_orm_proto.Messages().ByName("SingletonDescriptor") - fd_SingletonDescriptor_id = md_SingletonDescriptor.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_SingletonDescriptor)(nil) - -type fastReflection_SingletonDescriptor SingletonDescriptor - -func (x *SingletonDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_SingletonDescriptor)(x) -} - -func (x *SingletonDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SingletonDescriptor_messageType fastReflection_SingletonDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_SingletonDescriptor_messageType{} - -type fastReflection_SingletonDescriptor_messageType struct{} - -func (x fastReflection_SingletonDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_SingletonDescriptor)(nil) -} -func (x fastReflection_SingletonDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_SingletonDescriptor) -} -func (x fastReflection_SingletonDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SingletonDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SingletonDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_SingletonDescriptor -} - -// 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_SingletonDescriptor) Type() protoreflect.MessageType { - return _fastReflection_SingletonDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SingletonDescriptor) New() protoreflect.Message { - return new(fastReflection_SingletonDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SingletonDescriptor) Interface() protoreflect.ProtoMessage { - return (*SingletonDescriptor)(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_SingletonDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint32(0) { - value := protoreflect.ValueOfUint32(x.Id) - if !f(fd_SingletonDescriptor_id, 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_SingletonDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1.SingletonDescriptor.id": - return x.Id != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SingletonDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SingletonDescriptor 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_SingletonDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1.SingletonDescriptor.id": - x.Id = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SingletonDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SingletonDescriptor 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_SingletonDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1.SingletonDescriptor.id": - value := x.Id - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SingletonDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SingletonDescriptor 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_SingletonDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1.SingletonDescriptor.id": - x.Id = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SingletonDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SingletonDescriptor 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_SingletonDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.SingletonDescriptor.id": - panic(fmt.Errorf("field id of message cosmos.orm.v1.SingletonDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SingletonDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SingletonDescriptor 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_SingletonDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1.SingletonDescriptor.id": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1.SingletonDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1.SingletonDescriptor 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_SingletonDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1.SingletonDescriptor", 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_SingletonDescriptor) 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_SingletonDescriptor) 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_SingletonDescriptor) 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_SingletonDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SingletonDescriptor) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - 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().(*SingletonDescriptor) - 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.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SingletonDescriptor) - 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: SingletonDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SingletonDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/orm/v1/orm.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// TableDescriptor describes an ORM table. -type TableDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // primary_key defines the primary key for the table. - PrimaryKey *PrimaryKeyDescriptor `protobuf:"bytes,1,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` - // index defines one or more secondary indexes. - Index []*SecondaryIndexDescriptor `protobuf:"bytes,2,rep,name=index,proto3" json:"index,omitempty"` - // id is a non-zero integer ID that must be unique within the - // tables and singletons in this file. It may be deprecated in the future when this - // can be auto-generated. - Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *TableDescriptor) Reset() { - *x = TableDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TableDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TableDescriptor) ProtoMessage() {} - -// Deprecated: Use TableDescriptor.ProtoReflect.Descriptor instead. -func (*TableDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1_orm_proto_rawDescGZIP(), []int{0} -} - -func (x *TableDescriptor) GetPrimaryKey() *PrimaryKeyDescriptor { - if x != nil { - return x.PrimaryKey - } - return nil -} - -func (x *TableDescriptor) GetIndex() []*SecondaryIndexDescriptor { - if x != nil { - return x.Index - } - return nil -} - -func (x *TableDescriptor) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -// PrimaryKeyDescriptor describes a table primary key. -type PrimaryKeyDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fields is a comma-separated list of fields in the primary key. Spaces are - // not allowed. Supported field types, their encodings, and any applicable constraints - // are described below. - // - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that - // is suitable for sorted iteration (not varint encoding). This type is - // well-suited for small integers. - // - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that - // is suitable for sorted iteration (not varint encoding). This type is - // well-suited for small integers such as auto-incrementing sequences. - // - fixed32, fixed64 are encoded as big-endian fixed width bytes and support - // sorted iteration. These types are well-suited for encoding fixed with - // decimals as integers. - // - string's are encoded as raw bytes in terminal key segments and null-terminated - // in non-terminal segments. Null characters are thus forbidden in strings. - // string fields support sorted iteration. - // - bytes are encoded as raw bytes in terminal segments and length-prefixed - // with a 32-bit unsigned varint in non-terminal segments. - // - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with - // an encoding that enables sorted iteration. - // - google.protobuf.Timestamp and google.protobuf.Duration are encoded - // as 12 bytes using an encoding that enables sorted iteration. - // - enum fields are encoded using varint encoding and do not support sorted - // iteration. - // - bool fields are encoded as a single byte 0 or 1. - // - // All other fields types are unsupported in keys including repeated and - // oneof fields. - // - // Primary keys are prefixed by the varint encoded table id and the byte 0x0 - // plus any additional prefix specified by the schema. - Fields string `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields,omitempty"` - // auto_increment specifies that the primary key is generated by an - // auto-incrementing integer. If this is set to true fields must only - // contain one field of that is of type uint64. - AutoIncrement bool `protobuf:"varint,2,opt,name=auto_increment,json=autoIncrement,proto3" json:"auto_increment,omitempty"` -} - -func (x *PrimaryKeyDescriptor) Reset() { - *x = PrimaryKeyDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrimaryKeyDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrimaryKeyDescriptor) ProtoMessage() {} - -// Deprecated: Use PrimaryKeyDescriptor.ProtoReflect.Descriptor instead. -func (*PrimaryKeyDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1_orm_proto_rawDescGZIP(), []int{1} -} - -func (x *PrimaryKeyDescriptor) GetFields() string { - if x != nil { - return x.Fields - } - return "" -} - -func (x *PrimaryKeyDescriptor) GetAutoIncrement() bool { - if x != nil { - return x.AutoIncrement - } - return false -} - -// PrimaryKeyDescriptor describes a table secondary index. -type SecondaryIndexDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // fields is a comma-separated list of fields in the index. The supported - // field types are the same as those for PrimaryKeyDescriptor.fields. - // Index keys are prefixed by the varint encoded table id and the varint - // encoded index id plus any additional prefix specified by the schema. - // - // In addition the the field segments, non-unique index keys are suffixed with - // any additional primary key fields not present in the index fields so that the - // primary key can be reconstructed. Unique indexes instead of being suffixed - // store the remaining primary key fields in the value.. - Fields string `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields,omitempty"` - // id is a non-zero integer ID that must be unique within the indexes for this - // table and less than 32768. It may be deprecated in the future when this can - // be auto-generated. - Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - // unique specifies that this an unique index. - Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"` -} - -func (x *SecondaryIndexDescriptor) Reset() { - *x = SecondaryIndexDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecondaryIndexDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecondaryIndexDescriptor) ProtoMessage() {} - -// Deprecated: Use SecondaryIndexDescriptor.ProtoReflect.Descriptor instead. -func (*SecondaryIndexDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1_orm_proto_rawDescGZIP(), []int{2} -} - -func (x *SecondaryIndexDescriptor) GetFields() string { - if x != nil { - return x.Fields - } - return "" -} - -func (x *SecondaryIndexDescriptor) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *SecondaryIndexDescriptor) GetUnique() bool { - if x != nil { - return x.Unique - } - return false -} - -// TableDescriptor describes an ORM singleton table which has at most one instance. -type SingletonDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is a non-zero integer ID that must be unique within the - // tables and singletons in this file. It may be deprecated in the future when this - // can be auto-generated. - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *SingletonDescriptor) Reset() { - *x = SingletonDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1_orm_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingletonDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingletonDescriptor) ProtoMessage() {} - -// Deprecated: Use SingletonDescriptor.ProtoReflect.Descriptor instead. -func (*SingletonDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1_orm_proto_rawDescGZIP(), []int{3} -} - -func (x *SingletonDescriptor) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -var file_cosmos_orm_v1_orm_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*TableDescriptor)(nil), - Field: 104503790, - Name: "cosmos.orm.v1.table", - Tag: "bytes,104503790,opt,name=table", - Filename: "cosmos/orm/v1/orm.proto", - }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*SingletonDescriptor)(nil), - Field: 104503791, - Name: "cosmos.orm.v1.singleton", - Tag: "bytes,104503791,opt,name=singleton", - Filename: "cosmos/orm/v1/orm.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // table specifies that this message will be used as an ORM table. It cannot - // be used together with the singleton option. - // - // optional cosmos.orm.v1.TableDescriptor table = 104503790; - E_Table = &file_cosmos_orm_v1_orm_proto_extTypes[0] - // singleton specifies that this message will be used as an ORM singleton. It cannot - // be used together with the table option. - // - // optional cosmos.orm.v1.SingletonDescriptor singleton = 104503791; - E_Singleton = &file_cosmos_orm_v1_orm_proto_extTypes[1] -) - -var File_cosmos_orm_v1_orm_proto protoreflect.FileDescriptor - -var file_cosmos_orm_v1_orm_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, - 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x0f, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x44, - 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x4b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x14, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, - 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, - 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x5a, 0x0a, 0x18, 0x53, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x22, 0x25, 0x0a, 0x13, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x74, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x58, 0x0a, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xee, 0xb3, 0xea, 0x31, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x64, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x74, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xef, 0xb3, 0xea, 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x52, 0x09, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x42, 0xa9, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, - 0x2e, 0x76, 0x31, 0x42, 0x08, 0x4f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x3b, - 0x6f, 0x72, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x4f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cosmos_orm_v1_orm_proto_rawDescOnce sync.Once - file_cosmos_orm_v1_orm_proto_rawDescData = file_cosmos_orm_v1_orm_proto_rawDesc -) - -func file_cosmos_orm_v1_orm_proto_rawDescGZIP() []byte { - file_cosmos_orm_v1_orm_proto_rawDescOnce.Do(func() { - file_cosmos_orm_v1_orm_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_orm_v1_orm_proto_rawDescData) - }) - return file_cosmos_orm_v1_orm_proto_rawDescData -} - -var file_cosmos_orm_v1_orm_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_orm_v1_orm_proto_goTypes = []interface{}{ - (*TableDescriptor)(nil), // 0: cosmos.orm.v1.TableDescriptor - (*PrimaryKeyDescriptor)(nil), // 1: cosmos.orm.v1.PrimaryKeyDescriptor - (*SecondaryIndexDescriptor)(nil), // 2: cosmos.orm.v1.SecondaryIndexDescriptor - (*SingletonDescriptor)(nil), // 3: cosmos.orm.v1.SingletonDescriptor - (*descriptorpb.MessageOptions)(nil), // 4: google.protobuf.MessageOptions -} -var file_cosmos_orm_v1_orm_proto_depIdxs = []int32{ - 1, // 0: cosmos.orm.v1.TableDescriptor.primary_key:type_name -> cosmos.orm.v1.PrimaryKeyDescriptor - 2, // 1: cosmos.orm.v1.TableDescriptor.index:type_name -> cosmos.orm.v1.SecondaryIndexDescriptor - 4, // 2: cosmos.orm.v1.table:extendee -> google.protobuf.MessageOptions - 4, // 3: cosmos.orm.v1.singleton:extendee -> google.protobuf.MessageOptions - 0, // 4: cosmos.orm.v1.table:type_name -> cosmos.orm.v1.TableDescriptor - 3, // 5: cosmos.orm.v1.singleton:type_name -> cosmos.orm.v1.SingletonDescriptor - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 4, // [4:6] is the sub-list for extension type_name - 2, // [2:4] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_orm_v1_orm_proto_init() } -func file_cosmos_orm_v1_orm_proto_init() { - if File_cosmos_orm_v1_orm_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_orm_v1_orm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TableDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_orm_v1_orm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrimaryKeyDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_orm_v1_orm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecondaryIndexDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_orm_v1_orm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingletonDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_orm_v1_orm_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 2, - NumServices: 0, - }, - GoTypes: file_cosmos_orm_v1_orm_proto_goTypes, - DependencyIndexes: file_cosmos_orm_v1_orm_proto_depIdxs, - MessageInfos: file_cosmos_orm_v1_orm_proto_msgTypes, - ExtensionInfos: file_cosmos_orm_v1_orm_proto_extTypes, - }.Build() - File_cosmos_orm_v1_orm_proto = out.File - file_cosmos_orm_v1_orm_proto_rawDesc = nil - file_cosmos_orm_v1_orm_proto_goTypes = nil - file_cosmos_orm_v1_orm_proto_depIdxs = nil -} diff --git a/api/cosmos/orm/v1alpha1/schema.pulsar.go b/api/cosmos/orm/v1alpha1/schema.pulsar.go deleted file mode 100644 index 5d22e96a35fe..000000000000 --- a/api/cosmos/orm/v1alpha1/schema.pulsar.go +++ /dev/null @@ -1,1456 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package ormv1alpha1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_ModuleSchemaDescriptor_1_list)(nil) - -type _ModuleSchemaDescriptor_1_list struct { - list *[]*ModuleSchemaDescriptor_FileEntry -} - -func (x *_ModuleSchemaDescriptor_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ModuleSchemaDescriptor_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ModuleSchemaDescriptor_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModuleSchemaDescriptor_FileEntry) - (*x.list)[i] = concreteValue -} - -func (x *_ModuleSchemaDescriptor_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModuleSchemaDescriptor_FileEntry) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ModuleSchemaDescriptor_1_list) AppendMutable() protoreflect.Value { - v := new(ModuleSchemaDescriptor_FileEntry) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModuleSchemaDescriptor_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ModuleSchemaDescriptor_1_list) NewElement() protoreflect.Value { - v := new(ModuleSchemaDescriptor_FileEntry) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModuleSchemaDescriptor_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ModuleSchemaDescriptor protoreflect.MessageDescriptor - fd_ModuleSchemaDescriptor_schema_file protoreflect.FieldDescriptor - fd_ModuleSchemaDescriptor_prefix protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1alpha1_schema_proto_init() - md_ModuleSchemaDescriptor = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("ModuleSchemaDescriptor") - fd_ModuleSchemaDescriptor_schema_file = md_ModuleSchemaDescriptor.Fields().ByName("schema_file") - fd_ModuleSchemaDescriptor_prefix = md_ModuleSchemaDescriptor.Fields().ByName("prefix") -} - -var _ protoreflect.Message = (*fastReflection_ModuleSchemaDescriptor)(nil) - -type fastReflection_ModuleSchemaDescriptor ModuleSchemaDescriptor - -func (x *ModuleSchemaDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModuleSchemaDescriptor)(x) -} - -func (x *ModuleSchemaDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModuleSchemaDescriptor_messageType fastReflection_ModuleSchemaDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_ModuleSchemaDescriptor_messageType{} - -type fastReflection_ModuleSchemaDescriptor_messageType struct{} - -func (x fastReflection_ModuleSchemaDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModuleSchemaDescriptor)(nil) -} -func (x fastReflection_ModuleSchemaDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_ModuleSchemaDescriptor) -} -func (x fastReflection_ModuleSchemaDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleSchemaDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModuleSchemaDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleSchemaDescriptor -} - -// 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_ModuleSchemaDescriptor) Type() protoreflect.MessageType { - return _fastReflection_ModuleSchemaDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModuleSchemaDescriptor) New() protoreflect.Message { - return new(fastReflection_ModuleSchemaDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModuleSchemaDescriptor) Interface() protoreflect.ProtoMessage { - return (*ModuleSchemaDescriptor)(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_ModuleSchemaDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SchemaFile) != 0 { - value := protoreflect.ValueOfList(&_ModuleSchemaDescriptor_1_list{list: &x.SchemaFile}) - if !f(fd_ModuleSchemaDescriptor_schema_file, value) { - return - } - } - if len(x.Prefix) != 0 { - value := protoreflect.ValueOfBytes(x.Prefix) - if !f(fd_ModuleSchemaDescriptor_prefix, 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_ModuleSchemaDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": - return len(x.SchemaFile) != 0 - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": - return len(x.Prefix) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor 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_ModuleSchemaDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": - x.SchemaFile = nil - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": - x.Prefix = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor 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_ModuleSchemaDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": - if len(x.SchemaFile) == 0 { - return protoreflect.ValueOfList(&_ModuleSchemaDescriptor_1_list{}) - } - listValue := &_ModuleSchemaDescriptor_1_list{list: &x.SchemaFile} - return protoreflect.ValueOfList(listValue) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": - value := x.Prefix - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor 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_ModuleSchemaDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": - lv := value.List() - clv := lv.(*_ModuleSchemaDescriptor_1_list) - x.SchemaFile = *clv.list - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": - x.Prefix = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor 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_ModuleSchemaDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": - if x.SchemaFile == nil { - x.SchemaFile = []*ModuleSchemaDescriptor_FileEntry{} - } - value := &_ModuleSchemaDescriptor_1_list{list: &x.SchemaFile} - return protoreflect.ValueOfList(value) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": - panic(fmt.Errorf("field prefix of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor 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_ModuleSchemaDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": - list := []*ModuleSchemaDescriptor_FileEntry{} - return protoreflect.ValueOfList(&_ModuleSchemaDescriptor_1_list{list: &list}) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor 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_ModuleSchemaDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.ModuleSchemaDescriptor", 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_ModuleSchemaDescriptor) 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_ModuleSchemaDescriptor) 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_ModuleSchemaDescriptor) 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_ModuleSchemaDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModuleSchemaDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SchemaFile) > 0 { - for _, e := range x.SchemaFile { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Prefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ModuleSchemaDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Prefix) > 0 { - i -= len(x.Prefix) - copy(dAtA[i:], x.Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Prefix))) - i-- - dAtA[i] = 0x12 - } - if len(x.SchemaFile) > 0 { - for iNdEx := len(x.SchemaFile) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SchemaFile[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ModuleSchemaDescriptor) - 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: ModuleSchemaDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleSchemaDescriptor: 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 SchemaFile", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SchemaFile = append(x.SchemaFile, &ModuleSchemaDescriptor_FileEntry{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SchemaFile[len(x.SchemaFile)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Prefix = append(x.Prefix[:0], dAtA[iNdEx:postIndex]...) - if x.Prefix == nil { - x.Prefix = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ModuleSchemaDescriptor_FileEntry protoreflect.MessageDescriptor - fd_ModuleSchemaDescriptor_FileEntry_id protoreflect.FieldDescriptor - fd_ModuleSchemaDescriptor_FileEntry_proto_file_name protoreflect.FieldDescriptor - fd_ModuleSchemaDescriptor_FileEntry_storage_type protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1alpha1_schema_proto_init() - md_ModuleSchemaDescriptor_FileEntry = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("ModuleSchemaDescriptor").Messages().ByName("FileEntry") - fd_ModuleSchemaDescriptor_FileEntry_id = md_ModuleSchemaDescriptor_FileEntry.Fields().ByName("id") - fd_ModuleSchemaDescriptor_FileEntry_proto_file_name = md_ModuleSchemaDescriptor_FileEntry.Fields().ByName("proto_file_name") - fd_ModuleSchemaDescriptor_FileEntry_storage_type = md_ModuleSchemaDescriptor_FileEntry.Fields().ByName("storage_type") -} - -var _ protoreflect.Message = (*fastReflection_ModuleSchemaDescriptor_FileEntry)(nil) - -type fastReflection_ModuleSchemaDescriptor_FileEntry ModuleSchemaDescriptor_FileEntry - -func (x *ModuleSchemaDescriptor_FileEntry) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModuleSchemaDescriptor_FileEntry)(x) -} - -func (x *ModuleSchemaDescriptor_FileEntry) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModuleSchemaDescriptor_FileEntry_messageType fastReflection_ModuleSchemaDescriptor_FileEntry_messageType -var _ protoreflect.MessageType = fastReflection_ModuleSchemaDescriptor_FileEntry_messageType{} - -type fastReflection_ModuleSchemaDescriptor_FileEntry_messageType struct{} - -func (x fastReflection_ModuleSchemaDescriptor_FileEntry_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModuleSchemaDescriptor_FileEntry)(nil) -} -func (x fastReflection_ModuleSchemaDescriptor_FileEntry_messageType) New() protoreflect.Message { - return new(fastReflection_ModuleSchemaDescriptor_FileEntry) -} -func (x fastReflection_ModuleSchemaDescriptor_FileEntry_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleSchemaDescriptor_FileEntry -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleSchemaDescriptor_FileEntry -} - -// 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_ModuleSchemaDescriptor_FileEntry) Type() protoreflect.MessageType { - return _fastReflection_ModuleSchemaDescriptor_FileEntry_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) New() protoreflect.Message { - return new(fastReflection_ModuleSchemaDescriptor_FileEntry) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Interface() protoreflect.ProtoMessage { - return (*ModuleSchemaDescriptor_FileEntry)(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_ModuleSchemaDescriptor_FileEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint32(0) { - value := protoreflect.ValueOfUint32(x.Id) - if !f(fd_ModuleSchemaDescriptor_FileEntry_id, value) { - return - } - } - if x.ProtoFileName != "" { - value := protoreflect.ValueOfString(x.ProtoFileName) - if !f(fd_ModuleSchemaDescriptor_FileEntry_proto_file_name, value) { - return - } - } - if x.StorageType != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.StorageType)) - if !f(fd_ModuleSchemaDescriptor_FileEntry_storage_type, 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_ModuleSchemaDescriptor_FileEntry) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": - return x.Id != uint32(0) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": - return x.ProtoFileName != "" - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": - return x.StorageType != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry 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_ModuleSchemaDescriptor_FileEntry) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": - x.Id = uint32(0) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": - x.ProtoFileName = "" - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": - x.StorageType = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry 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_ModuleSchemaDescriptor_FileEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": - value := x.Id - return protoreflect.ValueOfUint32(value) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": - value := x.ProtoFileName - return protoreflect.ValueOfString(value) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": - value := x.StorageType - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry 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_ModuleSchemaDescriptor_FileEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": - x.Id = uint32(value.Uint()) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": - x.ProtoFileName = value.Interface().(string) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": - x.StorageType = (StorageType)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry 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_ModuleSchemaDescriptor_FileEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": - panic(fmt.Errorf("field id of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry is not mutable")) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": - panic(fmt.Errorf("field proto_file_name of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry is not mutable")) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": - panic(fmt.Errorf("field storage_type of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry 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_ModuleSchemaDescriptor_FileEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": - return protoreflect.ValueOfString("") - case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry 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_ModuleSchemaDescriptor_FileEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry", 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_ModuleSchemaDescriptor_FileEntry) 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_ModuleSchemaDescriptor_FileEntry) 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_ModuleSchemaDescriptor_FileEntry) 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_ModuleSchemaDescriptor_FileEntry) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModuleSchemaDescriptor_FileEntry) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.ProtoFileName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StorageType != 0 { - n += 1 + runtime.Sov(uint64(x.StorageType)) - } - 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().(*ModuleSchemaDescriptor_FileEntry) - 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.StorageType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StorageType)) - i-- - dAtA[i] = 0x18 - } - if len(x.ProtoFileName) > 0 { - i -= len(x.ProtoFileName) - copy(dAtA[i:], x.ProtoFileName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProtoFileName))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ModuleSchemaDescriptor_FileEntry) - 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: ModuleSchemaDescriptor_FileEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleSchemaDescriptor_FileEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProtoFileName", 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.ProtoFileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StorageType", wireType) - } - x.StorageType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StorageType |= StorageType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/orm/v1alpha1/schema.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// StorageType -type StorageType int32 - -const ( - // STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent - // KV-storage where primary key entries are stored in merkle-tree - // backed commitment storage and indexes and seqs are stored in - // fast index storage. Note that the Cosmos SDK before store/v2alpha1 - // does not support this. - StorageType_STORAGE_TYPE_DEFAULT_UNSPECIFIED StorageType = 0 - // STORAGE_TYPE_MEMORY indicates in-memory storage that will be - // reloaded every time an app restarts. Tables with this type of storage - // will by default be ignored when importing and exporting a module's - // state from JSON. - StorageType_STORAGE_TYPE_MEMORY StorageType = 1 - // STORAGE_TYPE_TRANSIENT indicates transient storage that is reset - // at the end of every block. Tables with this type of storage - // will by default be ignored when importing and exporting a module's - // state from JSON. - StorageType_STORAGE_TYPE_TRANSIENT StorageType = 2 - // STORAGE_TYPE_INDEX indicates persistent storage which is not backed - // by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK - // before store/v2alpha1 does not support this. - StorageType_STORAGE_TYPE_INDEX StorageType = 3 - // STORAGE_TYPE_INDEX indicates persistent storage which is backed by - // a merkle-tree. With this type of storage, both primary and index keys - // will affect the app hash and this is generally less efficient - // than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index - // keys into index storage. Note that modules built with the - // Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT - // instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX - // because this is the only type of persistent storage available. - StorageType_STORAGE_TYPE_COMMITMENT StorageType = 4 -) - -// Enum value maps for StorageType. -var ( - StorageType_name = map[int32]string{ - 0: "STORAGE_TYPE_DEFAULT_UNSPECIFIED", - 1: "STORAGE_TYPE_MEMORY", - 2: "STORAGE_TYPE_TRANSIENT", - 3: "STORAGE_TYPE_INDEX", - 4: "STORAGE_TYPE_COMMITMENT", - } - StorageType_value = map[string]int32{ - "STORAGE_TYPE_DEFAULT_UNSPECIFIED": 0, - "STORAGE_TYPE_MEMORY": 1, - "STORAGE_TYPE_TRANSIENT": 2, - "STORAGE_TYPE_INDEX": 3, - "STORAGE_TYPE_COMMITMENT": 4, - } -) - -func (x StorageType) Enum() *StorageType { - p := new(StorageType) - *p = x - return p -} - -func (x StorageType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StorageType) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_orm_v1alpha1_schema_proto_enumTypes[0].Descriptor() -} - -func (StorageType) Type() protoreflect.EnumType { - return &file_cosmos_orm_v1alpha1_schema_proto_enumTypes[0] -} - -func (x StorageType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StorageType.Descriptor instead. -func (StorageType) EnumDescriptor() ([]byte, []int) { - return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0} -} - -// ModuleSchemaDescriptor describe's a module's ORM schema. -type ModuleSchemaDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SchemaFile []*ModuleSchemaDescriptor_FileEntry `protobuf:"bytes,1,rep,name=schema_file,json=schemaFile,proto3" json:"schema_file,omitempty"` - // prefix is an optional prefix that precedes all keys in this module's - // store. - Prefix []byte `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` -} - -func (x *ModuleSchemaDescriptor) Reset() { - *x = ModuleSchemaDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModuleSchemaDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModuleSchemaDescriptor) ProtoMessage() {} - -// Deprecated: Use ModuleSchemaDescriptor.ProtoReflect.Descriptor instead. -func (*ModuleSchemaDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0} -} - -func (x *ModuleSchemaDescriptor) GetSchemaFile() []*ModuleSchemaDescriptor_FileEntry { - if x != nil { - return x.SchemaFile - } - return nil -} - -func (x *ModuleSchemaDescriptor) GetPrefix() []byte { - if x != nil { - return x.Prefix - } - return nil -} - -// FileEntry describes an ORM file used in a module. -type ModuleSchemaDescriptor_FileEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is a prefix that will be varint encoded and prepended to all the - // table keys specified in the file's tables. - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // proto_file_name is the name of a file .proto in that contains - // table definitions. The .proto file must be in a package that the - // module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. - ProtoFileName string `protobuf:"bytes,2,opt,name=proto_file_name,json=protoFileName,proto3" json:"proto_file_name,omitempty"` - // storage_type optionally indicates the type of storage this file's - // tables should used. If it is left unspecified, the default KV-storage - // of the app will be used. - StorageType StorageType `protobuf:"varint,3,opt,name=storage_type,json=storageType,proto3,enum=cosmos.orm.v1alpha1.StorageType" json:"storage_type,omitempty"` -} - -func (x *ModuleSchemaDescriptor_FileEntry) Reset() { - *x = ModuleSchemaDescriptor_FileEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModuleSchemaDescriptor_FileEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModuleSchemaDescriptor_FileEntry) ProtoMessage() {} - -// Deprecated: Use ModuleSchemaDescriptor_FileEntry.ProtoReflect.Descriptor instead. -func (*ModuleSchemaDescriptor_FileEntry) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ModuleSchemaDescriptor_FileEntry) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *ModuleSchemaDescriptor_FileEntry) GetProtoFileName() string { - if x != nil { - return x.ProtoFileName - } - return "" -} - -func (x *ModuleSchemaDescriptor_FileEntry) GetStorageType() StorageType { - if x != nil { - return x.StorageType - } - return StorageType_STORAGE_TYPE_DEFAULT_UNSPECIFIED -} - -var file_cosmos_orm_v1alpha1_schema_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*ModuleSchemaDescriptor)(nil), - Field: 104503792, - Name: "cosmos.orm.v1alpha1.module_schema", - Tag: "bytes,104503792,opt,name=module_schema", - Filename: "cosmos/orm/v1alpha1/schema.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // module_schema is used to define the ORM schema for an app module. - // All module config messages that use module_schema must also declare - // themselves as app module config messages using the cosmos.app.v1.is_module - // option. - // - // optional cosmos.orm.v1alpha1.ModuleSchemaDescriptor module_schema = 104503792; - E_ModuleSchema = &file_cosmos_orm_v1alpha1_schema_proto_extTypes[0] -) - -var File_cosmos_orm_v1alpha1_schema_proto protoreflect.FileDescriptor - -var file_cosmos_orm_v1alpha1_schema_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x16, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, - 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x1a, 0x88, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2a, - 0x9d, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x24, 0x0a, 0x20, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x52, 0x59, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, - 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, - 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x3a, - 0x74, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0xf0, 0xb3, 0xea, 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0xd6, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x72, 0x6d, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x4f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, - 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 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, 0x4f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_orm_v1alpha1_schema_proto_rawDescOnce sync.Once - file_cosmos_orm_v1alpha1_schema_proto_rawDescData = file_cosmos_orm_v1alpha1_schema_proto_rawDesc -) - -func file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP() []byte { - file_cosmos_orm_v1alpha1_schema_proto_rawDescOnce.Do(func() { - file_cosmos_orm_v1alpha1_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_orm_v1alpha1_schema_proto_rawDescData) - }) - return file_cosmos_orm_v1alpha1_schema_proto_rawDescData -} - -var file_cosmos_orm_v1alpha1_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_orm_v1alpha1_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_orm_v1alpha1_schema_proto_goTypes = []interface{}{ - (StorageType)(0), // 0: cosmos.orm.v1alpha1.StorageType - (*ModuleSchemaDescriptor)(nil), // 1: cosmos.orm.v1alpha1.ModuleSchemaDescriptor - (*ModuleSchemaDescriptor_FileEntry)(nil), // 2: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry - (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions -} -var file_cosmos_orm_v1alpha1_schema_proto_depIdxs = []int32{ - 2, // 0: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file:type_name -> cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry - 0, // 1: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type:type_name -> cosmos.orm.v1alpha1.StorageType - 3, // 2: cosmos.orm.v1alpha1.module_schema:extendee -> google.protobuf.MessageOptions - 1, // 3: cosmos.orm.v1alpha1.module_schema:type_name -> cosmos.orm.v1alpha1.ModuleSchemaDescriptor - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 3, // [3:4] is the sub-list for extension type_name - 2, // [2:3] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_orm_v1alpha1_schema_proto_init() } -func file_cosmos_orm_v1alpha1_schema_proto_init() { - if File_cosmos_orm_v1alpha1_schema_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_orm_v1alpha1_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModuleSchemaDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModuleSchemaDescriptor_FileEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_orm_v1alpha1_schema_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_cosmos_orm_v1alpha1_schema_proto_goTypes, - DependencyIndexes: file_cosmos_orm_v1alpha1_schema_proto_depIdxs, - EnumInfos: file_cosmos_orm_v1alpha1_schema_proto_enumTypes, - MessageInfos: file_cosmos_orm_v1alpha1_schema_proto_msgTypes, - ExtensionInfos: file_cosmos_orm_v1alpha1_schema_proto_extTypes, - }.Build() - File_cosmos_orm_v1alpha1_schema_proto = out.File - file_cosmos_orm_v1alpha1_schema_proto_rawDesc = nil - file_cosmos_orm_v1alpha1_schema_proto_goTypes = nil - file_cosmos_orm_v1alpha1_schema_proto_depIdxs = nil -} diff --git a/api/cosmos/params/v1beta1/params.pulsar.go b/api/cosmos/params/v1beta1/params.pulsar.go deleted file mode 100644 index 3a318f417b51..000000000000 --- a/api/cosmos/params/v1beta1/params.pulsar.go +++ /dev/null @@ -1,1420 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package paramsv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_ParameterChangeProposal_3_list)(nil) - -type _ParameterChangeProposal_3_list struct { - list *[]*ParamChange -} - -func (x *_ParameterChangeProposal_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ParameterChangeProposal_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ParameterChangeProposal_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ParamChange) - (*x.list)[i] = concreteValue -} - -func (x *_ParameterChangeProposal_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ParamChange) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ParameterChangeProposal_3_list) AppendMutable() protoreflect.Value { - v := new(ParamChange) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ParameterChangeProposal_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ParameterChangeProposal_3_list) NewElement() protoreflect.Value { - v := new(ParamChange) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ParameterChangeProposal_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ParameterChangeProposal protoreflect.MessageDescriptor - fd_ParameterChangeProposal_title protoreflect.FieldDescriptor - fd_ParameterChangeProposal_description protoreflect.FieldDescriptor - fd_ParameterChangeProposal_changes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_params_v1beta1_params_proto_init() - md_ParameterChangeProposal = File_cosmos_params_v1beta1_params_proto.Messages().ByName("ParameterChangeProposal") - fd_ParameterChangeProposal_title = md_ParameterChangeProposal.Fields().ByName("title") - fd_ParameterChangeProposal_description = md_ParameterChangeProposal.Fields().ByName("description") - fd_ParameterChangeProposal_changes = md_ParameterChangeProposal.Fields().ByName("changes") -} - -var _ protoreflect.Message = (*fastReflection_ParameterChangeProposal)(nil) - -type fastReflection_ParameterChangeProposal ParameterChangeProposal - -func (x *ParameterChangeProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_ParameterChangeProposal)(x) -} - -func (x *ParameterChangeProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_params_v1beta1_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ParameterChangeProposal_messageType fastReflection_ParameterChangeProposal_messageType -var _ protoreflect.MessageType = fastReflection_ParameterChangeProposal_messageType{} - -type fastReflection_ParameterChangeProposal_messageType struct{} - -func (x fastReflection_ParameterChangeProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_ParameterChangeProposal)(nil) -} -func (x fastReflection_ParameterChangeProposal_messageType) New() protoreflect.Message { - return new(fastReflection_ParameterChangeProposal) -} -func (x fastReflection_ParameterChangeProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ParameterChangeProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ParameterChangeProposal) Descriptor() protoreflect.MessageDescriptor { - return md_ParameterChangeProposal -} - -// 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_ParameterChangeProposal) Type() protoreflect.MessageType { - return _fastReflection_ParameterChangeProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ParameterChangeProposal) New() protoreflect.Message { - return new(fastReflection_ParameterChangeProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ParameterChangeProposal) Interface() protoreflect.ProtoMessage { - return (*ParameterChangeProposal)(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_ParameterChangeProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Title != "" { - value := protoreflect.ValueOfString(x.Title) - if !f(fd_ParameterChangeProposal_title, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_ParameterChangeProposal_description, value) { - return - } - } - if len(x.Changes) != 0 { - value := protoreflect.ValueOfList(&_ParameterChangeProposal_3_list{list: &x.Changes}) - if !f(fd_ParameterChangeProposal_changes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ParameterChangeProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParameterChangeProposal.title": - return x.Title != "" - case "cosmos.params.v1beta1.ParameterChangeProposal.description": - return x.Description != "" - case "cosmos.params.v1beta1.ParameterChangeProposal.changes": - return len(x.Changes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParameterChangeProposal")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParameterChangeProposal 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_ParameterChangeProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParameterChangeProposal.title": - x.Title = "" - case "cosmos.params.v1beta1.ParameterChangeProposal.description": - x.Description = "" - case "cosmos.params.v1beta1.ParameterChangeProposal.changes": - x.Changes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParameterChangeProposal")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParameterChangeProposal 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_ParameterChangeProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.params.v1beta1.ParameterChangeProposal.title": - value := x.Title - return protoreflect.ValueOfString(value) - case "cosmos.params.v1beta1.ParameterChangeProposal.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "cosmos.params.v1beta1.ParameterChangeProposal.changes": - if len(x.Changes) == 0 { - return protoreflect.ValueOfList(&_ParameterChangeProposal_3_list{}) - } - listValue := &_ParameterChangeProposal_3_list{list: &x.Changes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParameterChangeProposal")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParameterChangeProposal 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_ParameterChangeProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParameterChangeProposal.title": - x.Title = value.Interface().(string) - case "cosmos.params.v1beta1.ParameterChangeProposal.description": - x.Description = value.Interface().(string) - case "cosmos.params.v1beta1.ParameterChangeProposal.changes": - lv := value.List() - clv := lv.(*_ParameterChangeProposal_3_list) - x.Changes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParameterChangeProposal")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParameterChangeProposal 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_ParameterChangeProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParameterChangeProposal.changes": - if x.Changes == nil { - x.Changes = []*ParamChange{} - } - value := &_ParameterChangeProposal_3_list{list: &x.Changes} - return protoreflect.ValueOfList(value) - case "cosmos.params.v1beta1.ParameterChangeProposal.title": - panic(fmt.Errorf("field title of message cosmos.params.v1beta1.ParameterChangeProposal is not mutable")) - case "cosmos.params.v1beta1.ParameterChangeProposal.description": - panic(fmt.Errorf("field description of message cosmos.params.v1beta1.ParameterChangeProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParameterChangeProposal")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParameterChangeProposal 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_ParameterChangeProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParameterChangeProposal.title": - return protoreflect.ValueOfString("") - case "cosmos.params.v1beta1.ParameterChangeProposal.description": - return protoreflect.ValueOfString("") - case "cosmos.params.v1beta1.ParameterChangeProposal.changes": - list := []*ParamChange{} - return protoreflect.ValueOfList(&_ParameterChangeProposal_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParameterChangeProposal")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParameterChangeProposal 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_ParameterChangeProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.params.v1beta1.ParameterChangeProposal", 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_ParameterChangeProposal) 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_ParameterChangeProposal) 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_ParameterChangeProposal) 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_ParameterChangeProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ParameterChangeProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Title) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Changes) > 0 { - for _, e := range x.Changes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ParameterChangeProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Changes) > 0 { - for iNdEx := len(x.Changes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Changes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x12 - } - if len(x.Title) > 0 { - i -= len(x.Title) - copy(dAtA[i:], x.Title) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) - i-- - dAtA[i] = 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().(*ParameterChangeProposal) - 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: ParameterChangeProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParameterChangeProposal: 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 Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Changes = append(x.Changes, &ParamChange{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Changes[len(x.Changes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ParamChange protoreflect.MessageDescriptor - fd_ParamChange_subspace protoreflect.FieldDescriptor - fd_ParamChange_key protoreflect.FieldDescriptor - fd_ParamChange_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_params_v1beta1_params_proto_init() - md_ParamChange = File_cosmos_params_v1beta1_params_proto.Messages().ByName("ParamChange") - fd_ParamChange_subspace = md_ParamChange.Fields().ByName("subspace") - fd_ParamChange_key = md_ParamChange.Fields().ByName("key") - fd_ParamChange_value = md_ParamChange.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_ParamChange)(nil) - -type fastReflection_ParamChange ParamChange - -func (x *ParamChange) ProtoReflect() protoreflect.Message { - return (*fastReflection_ParamChange)(x) -} - -func (x *ParamChange) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_params_v1beta1_params_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ParamChange_messageType fastReflection_ParamChange_messageType -var _ protoreflect.MessageType = fastReflection_ParamChange_messageType{} - -type fastReflection_ParamChange_messageType struct{} - -func (x fastReflection_ParamChange_messageType) Zero() protoreflect.Message { - return (*fastReflection_ParamChange)(nil) -} -func (x fastReflection_ParamChange_messageType) New() protoreflect.Message { - return new(fastReflection_ParamChange) -} -func (x fastReflection_ParamChange_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ParamChange -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ParamChange) Descriptor() protoreflect.MessageDescriptor { - return md_ParamChange -} - -// 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_ParamChange) Type() protoreflect.MessageType { - return _fastReflection_ParamChange_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ParamChange) New() protoreflect.Message { - return new(fastReflection_ParamChange) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ParamChange) Interface() protoreflect.ProtoMessage { - return (*ParamChange)(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_ParamChange) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Subspace != "" { - value := protoreflect.ValueOfString(x.Subspace) - if !f(fd_ParamChange_subspace, value) { - return - } - } - if x.Key != "" { - value := protoreflect.ValueOfString(x.Key) - if !f(fd_ParamChange_key, value) { - return - } - } - if x.Value != "" { - value := protoreflect.ValueOfString(x.Value) - if !f(fd_ParamChange_value, 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_ParamChange) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParamChange.subspace": - return x.Subspace != "" - case "cosmos.params.v1beta1.ParamChange.key": - return x.Key != "" - case "cosmos.params.v1beta1.ParamChange.value": - return x.Value != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParamChange")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParamChange 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_ParamChange) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParamChange.subspace": - x.Subspace = "" - case "cosmos.params.v1beta1.ParamChange.key": - x.Key = "" - case "cosmos.params.v1beta1.ParamChange.value": - x.Value = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParamChange")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParamChange 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_ParamChange) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.params.v1beta1.ParamChange.subspace": - value := x.Subspace - return protoreflect.ValueOfString(value) - case "cosmos.params.v1beta1.ParamChange.key": - value := x.Key - return protoreflect.ValueOfString(value) - case "cosmos.params.v1beta1.ParamChange.value": - value := x.Value - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParamChange")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParamChange 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_ParamChange) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParamChange.subspace": - x.Subspace = value.Interface().(string) - case "cosmos.params.v1beta1.ParamChange.key": - x.Key = value.Interface().(string) - case "cosmos.params.v1beta1.ParamChange.value": - x.Value = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParamChange")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParamChange 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_ParamChange) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParamChange.subspace": - panic(fmt.Errorf("field subspace of message cosmos.params.v1beta1.ParamChange is not mutable")) - case "cosmos.params.v1beta1.ParamChange.key": - panic(fmt.Errorf("field key of message cosmos.params.v1beta1.ParamChange is not mutable")) - case "cosmos.params.v1beta1.ParamChange.value": - panic(fmt.Errorf("field value of message cosmos.params.v1beta1.ParamChange is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParamChange")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParamChange 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_ParamChange) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.ParamChange.subspace": - return protoreflect.ValueOfString("") - case "cosmos.params.v1beta1.ParamChange.key": - return protoreflect.ValueOfString("") - case "cosmos.params.v1beta1.ParamChange.value": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.ParamChange")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.ParamChange 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_ParamChange) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.params.v1beta1.ParamChange", 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_ParamChange) 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_ParamChange) 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_ParamChange) 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_ParamChange) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ParamChange) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Subspace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ParamChange) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x1a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Subspace) > 0 { - i -= len(x.Subspace) - copy(dAtA[i:], x.Subspace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subspace))) - 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().(*ParamChange) - 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: ParamChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParamChange: 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 Subspace", 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.Subspace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/params/v1beta1/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ParameterChangeProposal defines a proposal to change one or more parameters. -type ParameterChangeProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Changes []*ParamChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes,omitempty"` -} - -func (x *ParameterChangeProposal) Reset() { - *x = ParameterChangeProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParameterChangeProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParameterChangeProposal) ProtoMessage() {} - -// Deprecated: Use ParameterChangeProposal.ProtoReflect.Descriptor instead. -func (*ParameterChangeProposal) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_params_proto_rawDescGZIP(), []int{0} -} - -func (x *ParameterChangeProposal) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *ParameterChangeProposal) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *ParameterChangeProposal) GetChanges() []*ParamChange { - if x != nil { - return x.Changes - } - return nil -} - -// ParamChange defines an individual parameter change, for use in -// ParameterChangeProposal. -type ParamChange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ParamChange) Reset() { - *x = ParamChange{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_params_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParamChange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParamChange) ProtoMessage() {} - -// Deprecated: Use ParamChange.ProtoReflect.Descriptor instead. -func (*ParamChange) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_params_proto_rawDescGZIP(), []int{1} -} - -func (x *ParamChange) GetSubspace() string { - if x != nil { - return x.Subspace - } - return "" -} - -func (x *ParamChange) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ParamChange) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -var File_cosmos_params_v1beta1_params_proto protoreflect.FileDescriptor - -var file_cosmos_params_v1beta1_params_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, - 0xa0, 0x1f, 0x00, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xe8, 0x01, 0x0a, - 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x50, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x15, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_params_v1beta1_params_proto_rawDescOnce sync.Once - file_cosmos_params_v1beta1_params_proto_rawDescData = file_cosmos_params_v1beta1_params_proto_rawDesc -) - -func file_cosmos_params_v1beta1_params_proto_rawDescGZIP() []byte { - file_cosmos_params_v1beta1_params_proto_rawDescOnce.Do(func() { - file_cosmos_params_v1beta1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_params_v1beta1_params_proto_rawDescData) - }) - return file_cosmos_params_v1beta1_params_proto_rawDescData -} - -var file_cosmos_params_v1beta1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_params_v1beta1_params_proto_goTypes = []interface{}{ - (*ParameterChangeProposal)(nil), // 0: cosmos.params.v1beta1.ParameterChangeProposal - (*ParamChange)(nil), // 1: cosmos.params.v1beta1.ParamChange -} -var file_cosmos_params_v1beta1_params_proto_depIdxs = []int32{ - 1, // 0: cosmos.params.v1beta1.ParameterChangeProposal.changes:type_name -> cosmos.params.v1beta1.ParamChange - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_params_v1beta1_params_proto_init() } -func file_cosmos_params_v1beta1_params_proto_init() { - if File_cosmos_params_v1beta1_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_params_v1beta1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParameterChangeProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_params_v1beta1_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParamChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_params_v1beta1_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_params_v1beta1_params_proto_goTypes, - DependencyIndexes: file_cosmos_params_v1beta1_params_proto_depIdxs, - MessageInfos: file_cosmos_params_v1beta1_params_proto_msgTypes, - }.Build() - File_cosmos_params_v1beta1_params_proto = out.File - file_cosmos_params_v1beta1_params_proto_rawDesc = nil - file_cosmos_params_v1beta1_params_proto_goTypes = nil - file_cosmos_params_v1beta1_params_proto_depIdxs = nil -} diff --git a/api/cosmos/params/v1beta1/query.pulsar.go b/api/cosmos/params/v1beta1/query.pulsar.go deleted file mode 100644 index d7052371c9f6..000000000000 --- a/api/cosmos/params/v1beta1/query.pulsar.go +++ /dev/null @@ -1,2726 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package paramsv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor - fd_QueryParamsRequest_subspace protoreflect.FieldDescriptor - fd_QueryParamsRequest_key protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_params_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_params_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") - fd_QueryParamsRequest_subspace = md_QueryParamsRequest.Fields().ByName("subspace") - fd_QueryParamsRequest_key = md_QueryParamsRequest.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Subspace != "" { - value := protoreflect.ValueOfString(x.Subspace) - if !f(fd_QueryParamsRequest_subspace, value) { - return - } - } - if x.Key != "" { - value := protoreflect.ValueOfString(x.Key) - if !f(fd_QueryParamsRequest_key, 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.params.v1beta1.QueryParamsRequest.subspace": - return x.Subspace != "" - case "cosmos.params.v1beta1.QueryParamsRequest.key": - return x.Key != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.params.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() { - case "cosmos.params.v1beta1.QueryParamsRequest.subspace": - x.Subspace = "" - case "cosmos.params.v1beta1.QueryParamsRequest.key": - x.Key = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.params.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() { - case "cosmos.params.v1beta1.QueryParamsRequest.subspace": - value := x.Subspace - return protoreflect.ValueOfString(value) - case "cosmos.params.v1beta1.QueryParamsRequest.key": - value := x.Key - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.params.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() { - case "cosmos.params.v1beta1.QueryParamsRequest.subspace": - x.Subspace = value.Interface().(string) - case "cosmos.params.v1beta1.QueryParamsRequest.key": - x.Key = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.params.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() { - case "cosmos.params.v1beta1.QueryParamsRequest.subspace": - panic(fmt.Errorf("field subspace of message cosmos.params.v1beta1.QueryParamsRequest is not mutable")) - case "cosmos.params.v1beta1.QueryParamsRequest.key": - panic(fmt.Errorf("field key of message cosmos.params.v1beta1.QueryParamsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.params.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() { - case "cosmos.params.v1beta1.QueryParamsRequest.subspace": - return protoreflect.ValueOfString("") - case "cosmos.params.v1beta1.QueryParamsRequest.key": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.params.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.params.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 - l = len(x.Subspace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*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 len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Subspace) > 0 { - i -= len(x.Subspace) - copy(dAtA[i:], x.Subspace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subspace))) - 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().(*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 { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subspace", 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.Subspace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_param protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_params_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_params_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_param = md_QueryParamsResponse.Fields().ByName("param") -} - -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_params_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.Param != nil { - value := protoreflect.ValueOfMessage(x.Param.ProtoReflect()) - if !f(fd_QueryParamsResponse_param, 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.params.v1beta1.QueryParamsResponse.param": - return x.Param != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.params.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.params.v1beta1.QueryParamsResponse.param": - x.Param = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.params.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.params.v1beta1.QueryParamsResponse.param": - value := x.Param - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.params.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.params.v1beta1.QueryParamsResponse.param": - x.Param = value.Message().Interface().(*ParamChange) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.params.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.params.v1beta1.QueryParamsResponse.param": - if x.Param == nil { - x.Param = new(ParamChange) - } - return protoreflect.ValueOfMessage(x.Param.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.params.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.params.v1beta1.QueryParamsResponse.param": - m := new(ParamChange) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.params.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.params.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.Param != nil { - l = options.Size(x.Param) - 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.Param != nil { - encoded, err := options.Marshal(x.Param) - 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 Param", 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.Param == nil { - x.Param = &ParamChange{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Param); 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_QuerySubspacesRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_params_v1beta1_query_proto_init() - md_QuerySubspacesRequest = File_cosmos_params_v1beta1_query_proto.Messages().ByName("QuerySubspacesRequest") -} - -var _ protoreflect.Message = (*fastReflection_QuerySubspacesRequest)(nil) - -type fastReflection_QuerySubspacesRequest QuerySubspacesRequest - -func (x *QuerySubspacesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySubspacesRequest)(x) -} - -func (x *QuerySubspacesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySubspacesRequest_messageType fastReflection_QuerySubspacesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySubspacesRequest_messageType{} - -type fastReflection_QuerySubspacesRequest_messageType struct{} - -func (x fastReflection_QuerySubspacesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySubspacesRequest)(nil) -} -func (x fastReflection_QuerySubspacesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySubspacesRequest) -} -func (x fastReflection_QuerySubspacesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySubspacesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySubspacesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySubspacesRequest -} - -// 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_QuerySubspacesRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySubspacesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySubspacesRequest) New() protoreflect.Message { - return new(fastReflection_QuerySubspacesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySubspacesRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySubspacesRequest)(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_QuerySubspacesRequest) 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_QuerySubspacesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesRequest")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesRequest 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_QuerySubspacesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesRequest")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesRequest 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_QuerySubspacesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesRequest")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesRequest 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_QuerySubspacesRequest) 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.params.v1beta1.QuerySubspacesRequest")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesRequest 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_QuerySubspacesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesRequest")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesRequest 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_QuerySubspacesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesRequest")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesRequest 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_QuerySubspacesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.params.v1beta1.QuerySubspacesRequest", 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_QuerySubspacesRequest) 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_QuerySubspacesRequest) 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_QuerySubspacesRequest) 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_QuerySubspacesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySubspacesRequest) - 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().(*QuerySubspacesRequest) - 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().(*QuerySubspacesRequest) - 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: QuerySubspacesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySubspacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QuerySubspacesResponse_1_list)(nil) - -type _QuerySubspacesResponse_1_list struct { - list *[]*Subspace -} - -func (x *_QuerySubspacesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QuerySubspacesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QuerySubspacesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Subspace) - (*x.list)[i] = concreteValue -} - -func (x *_QuerySubspacesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Subspace) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QuerySubspacesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Subspace) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QuerySubspacesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QuerySubspacesResponse_1_list) NewElement() protoreflect.Value { - v := new(Subspace) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QuerySubspacesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QuerySubspacesResponse protoreflect.MessageDescriptor - fd_QuerySubspacesResponse_subspaces protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_params_v1beta1_query_proto_init() - md_QuerySubspacesResponse = File_cosmos_params_v1beta1_query_proto.Messages().ByName("QuerySubspacesResponse") - fd_QuerySubspacesResponse_subspaces = md_QuerySubspacesResponse.Fields().ByName("subspaces") -} - -var _ protoreflect.Message = (*fastReflection_QuerySubspacesResponse)(nil) - -type fastReflection_QuerySubspacesResponse QuerySubspacesResponse - -func (x *QuerySubspacesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySubspacesResponse)(x) -} - -func (x *QuerySubspacesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySubspacesResponse_messageType fastReflection_QuerySubspacesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySubspacesResponse_messageType{} - -type fastReflection_QuerySubspacesResponse_messageType struct{} - -func (x fastReflection_QuerySubspacesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySubspacesResponse)(nil) -} -func (x fastReflection_QuerySubspacesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySubspacesResponse) -} -func (x fastReflection_QuerySubspacesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySubspacesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySubspacesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySubspacesResponse -} - -// 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_QuerySubspacesResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySubspacesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySubspacesResponse) New() protoreflect.Message { - return new(fastReflection_QuerySubspacesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySubspacesResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySubspacesResponse)(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_QuerySubspacesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Subspaces) != 0 { - value := protoreflect.ValueOfList(&_QuerySubspacesResponse_1_list{list: &x.Subspaces}) - if !f(fd_QuerySubspacesResponse_subspaces, 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_QuerySubspacesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.params.v1beta1.QuerySubspacesResponse.subspaces": - return len(x.Subspaces) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesResponse")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesResponse 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_QuerySubspacesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.params.v1beta1.QuerySubspacesResponse.subspaces": - x.Subspaces = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesResponse")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesResponse 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_QuerySubspacesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.params.v1beta1.QuerySubspacesResponse.subspaces": - if len(x.Subspaces) == 0 { - return protoreflect.ValueOfList(&_QuerySubspacesResponse_1_list{}) - } - listValue := &_QuerySubspacesResponse_1_list{list: &x.Subspaces} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesResponse")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesResponse 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_QuerySubspacesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.params.v1beta1.QuerySubspacesResponse.subspaces": - lv := value.List() - clv := lv.(*_QuerySubspacesResponse_1_list) - x.Subspaces = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesResponse")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesResponse 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_QuerySubspacesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.QuerySubspacesResponse.subspaces": - if x.Subspaces == nil { - x.Subspaces = []*Subspace{} - } - value := &_QuerySubspacesResponse_1_list{list: &x.Subspaces} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesResponse")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesResponse 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_QuerySubspacesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.QuerySubspacesResponse.subspaces": - list := []*Subspace{} - return protoreflect.ValueOfList(&_QuerySubspacesResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.QuerySubspacesResponse")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.QuerySubspacesResponse 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_QuerySubspacesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.params.v1beta1.QuerySubspacesResponse", 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_QuerySubspacesResponse) 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_QuerySubspacesResponse) 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_QuerySubspacesResponse) 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_QuerySubspacesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySubspacesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Subspaces) > 0 { - for _, e := range x.Subspaces { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySubspacesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Subspaces) > 0 { - for iNdEx := len(x.Subspaces) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Subspaces[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySubspacesResponse) - 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: QuerySubspacesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySubspacesResponse: 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 Subspaces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Subspaces = append(x.Subspaces, &Subspace{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Subspaces[len(x.Subspaces)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Subspace_2_list)(nil) - -type _Subspace_2_list struct { - list *[]string -} - -func (x *_Subspace_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Subspace_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Subspace_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Subspace_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Subspace_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Subspace at list field Keys as it is not of Message kind")) -} - -func (x *_Subspace_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Subspace_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Subspace_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Subspace protoreflect.MessageDescriptor - fd_Subspace_subspace protoreflect.FieldDescriptor - fd_Subspace_keys protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_params_v1beta1_query_proto_init() - md_Subspace = File_cosmos_params_v1beta1_query_proto.Messages().ByName("Subspace") - fd_Subspace_subspace = md_Subspace.Fields().ByName("subspace") - fd_Subspace_keys = md_Subspace.Fields().ByName("keys") -} - -var _ protoreflect.Message = (*fastReflection_Subspace)(nil) - -type fastReflection_Subspace Subspace - -func (x *Subspace) ProtoReflect() protoreflect.Message { - return (*fastReflection_Subspace)(x) -} - -func (x *Subspace) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Subspace_messageType fastReflection_Subspace_messageType -var _ protoreflect.MessageType = fastReflection_Subspace_messageType{} - -type fastReflection_Subspace_messageType struct{} - -func (x fastReflection_Subspace_messageType) Zero() protoreflect.Message { - return (*fastReflection_Subspace)(nil) -} -func (x fastReflection_Subspace_messageType) New() protoreflect.Message { - return new(fastReflection_Subspace) -} -func (x fastReflection_Subspace_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Subspace -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Subspace) Descriptor() protoreflect.MessageDescriptor { - return md_Subspace -} - -// 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_Subspace) Type() protoreflect.MessageType { - return _fastReflection_Subspace_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Subspace) New() protoreflect.Message { - return new(fastReflection_Subspace) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Subspace) Interface() protoreflect.ProtoMessage { - return (*Subspace)(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_Subspace) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Subspace != "" { - value := protoreflect.ValueOfString(x.Subspace) - if !f(fd_Subspace_subspace, value) { - return - } - } - if len(x.Keys) != 0 { - value := protoreflect.ValueOfList(&_Subspace_2_list{list: &x.Keys}) - if !f(fd_Subspace_keys, 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_Subspace) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.params.v1beta1.Subspace.subspace": - return x.Subspace != "" - case "cosmos.params.v1beta1.Subspace.keys": - return len(x.Keys) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.Subspace")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.Subspace 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_Subspace) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.params.v1beta1.Subspace.subspace": - x.Subspace = "" - case "cosmos.params.v1beta1.Subspace.keys": - x.Keys = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.Subspace")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.Subspace 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_Subspace) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.params.v1beta1.Subspace.subspace": - value := x.Subspace - return protoreflect.ValueOfString(value) - case "cosmos.params.v1beta1.Subspace.keys": - if len(x.Keys) == 0 { - return protoreflect.ValueOfList(&_Subspace_2_list{}) - } - listValue := &_Subspace_2_list{list: &x.Keys} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.Subspace")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.Subspace 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_Subspace) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.params.v1beta1.Subspace.subspace": - x.Subspace = value.Interface().(string) - case "cosmos.params.v1beta1.Subspace.keys": - lv := value.List() - clv := lv.(*_Subspace_2_list) - x.Keys = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.Subspace")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.Subspace 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_Subspace) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.Subspace.keys": - if x.Keys == nil { - x.Keys = []string{} - } - value := &_Subspace_2_list{list: &x.Keys} - return protoreflect.ValueOfList(value) - case "cosmos.params.v1beta1.Subspace.subspace": - panic(fmt.Errorf("field subspace of message cosmos.params.v1beta1.Subspace is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.Subspace")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.Subspace 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_Subspace) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.params.v1beta1.Subspace.subspace": - return protoreflect.ValueOfString("") - case "cosmos.params.v1beta1.Subspace.keys": - list := []string{} - return protoreflect.ValueOfList(&_Subspace_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.params.v1beta1.Subspace")) - } - panic(fmt.Errorf("message cosmos.params.v1beta1.Subspace 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_Subspace) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.params.v1beta1.Subspace", 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_Subspace) 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_Subspace) 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_Subspace) 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_Subspace) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Subspace) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Subspace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Keys) > 0 { - for _, s := range x.Keys { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.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().(*Subspace) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Keys) > 0 { - for iNdEx := len(x.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Keys[iNdEx]) - copy(dAtA[i:], x.Keys[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keys[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Subspace) > 0 { - i -= len(x.Subspace) - copy(dAtA[i:], x.Subspace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subspace))) - 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().(*Subspace) - 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: Subspace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Subspace: 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 Subspace", 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.Subspace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Keys = append(x.Keys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/params/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // subspace defines the module to query the parameter for. - Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` - // key defines the key of the parameter in the subspace. - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryParamsRequest) GetSubspace() string { - if x != nil { - return x.Subspace - } - return "" -} - -func (x *QueryParamsRequest) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // param defines the queried parameter. - Param *ParamChange `protobuf:"bytes,1,opt,name=param,proto3" json:"param,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParam() *ParamChange { - if x != nil { - return x.Param - } - return nil -} - -// QuerySubspacesRequest defines a request type for querying for all registered -// subspaces and all keys for a subspace. -type QuerySubspacesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QuerySubspacesRequest) Reset() { - *x = QuerySubspacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySubspacesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySubspacesRequest) ProtoMessage() {} - -// Deprecated: Use QuerySubspacesRequest.ProtoReflect.Descriptor instead. -func (*QuerySubspacesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -// QuerySubspacesResponse defines the response types for querying for all -// registered subspaces and all keys for a subspace. -type QuerySubspacesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subspaces []*Subspace `protobuf:"bytes,1,rep,name=subspaces,proto3" json:"subspaces,omitempty"` -} - -func (x *QuerySubspacesResponse) Reset() { - *x = QuerySubspacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySubspacesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySubspacesResponse) ProtoMessage() {} - -// Deprecated: Use QuerySubspacesResponse.ProtoReflect.Descriptor instead. -func (*QuerySubspacesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QuerySubspacesResponse) GetSubspaces() []*Subspace { - if x != nil { - return x.Subspaces - } - return nil -} - -// Subspace defines a parameter subspace name and all the keys that exist for -// the subspace. -type Subspace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` - Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *Subspace) Reset() { - *x = Subspace{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_params_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Subspace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Subspace) ProtoMessage() {} - -// Deprecated: Use Subspace.ProtoReflect.Descriptor instead. -func (*Subspace) Descriptor() ([]byte, []int) { - return file_cosmos_params_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *Subspace) GetSubspace() string { - if x != nil { - return x.Subspace - } - return "" -} - -func (x *Subspace) GetKeys() []string { - if x != nil { - return x.Keys - } - return nil -} - -var File_cosmos_params_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_params_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x55, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x17, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3d, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x73, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, - 0x3a, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x32, 0xa5, 0x02, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 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, 0x2a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, - 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x92, - 0x01, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x62, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x62, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x42, 0xe3, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x50, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cosmos_params_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_params_v1beta1_query_proto_rawDescData = file_cosmos_params_v1beta1_query_proto_rawDesc -) - -func file_cosmos_params_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_params_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_params_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_params_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_params_v1beta1_query_proto_rawDescData -} - -var file_cosmos_params_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cosmos_params_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.params.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.params.v1beta1.QueryParamsResponse - (*QuerySubspacesRequest)(nil), // 2: cosmos.params.v1beta1.QuerySubspacesRequest - (*QuerySubspacesResponse)(nil), // 3: cosmos.params.v1beta1.QuerySubspacesResponse - (*Subspace)(nil), // 4: cosmos.params.v1beta1.Subspace - (*ParamChange)(nil), // 5: cosmos.params.v1beta1.ParamChange -} -var file_cosmos_params_v1beta1_query_proto_depIdxs = []int32{ - 5, // 0: cosmos.params.v1beta1.QueryParamsResponse.param:type_name -> cosmos.params.v1beta1.ParamChange - 4, // 1: cosmos.params.v1beta1.QuerySubspacesResponse.subspaces:type_name -> cosmos.params.v1beta1.Subspace - 0, // 2: cosmos.params.v1beta1.Query.Params:input_type -> cosmos.params.v1beta1.QueryParamsRequest - 2, // 3: cosmos.params.v1beta1.Query.Subspaces:input_type -> cosmos.params.v1beta1.QuerySubspacesRequest - 1, // 4: cosmos.params.v1beta1.Query.Params:output_type -> cosmos.params.v1beta1.QueryParamsResponse - 3, // 5: cosmos.params.v1beta1.Query.Subspaces:output_type -> cosmos.params.v1beta1.QuerySubspacesResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_params_v1beta1_query_proto_init() } -func file_cosmos_params_v1beta1_query_proto_init() { - if File_cosmos_params_v1beta1_query_proto != nil { - return - } - file_cosmos_params_v1beta1_params_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_params_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_params_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_params_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySubspacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_params_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySubspacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_params_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subspace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_params_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_params_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_params_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_params_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_params_v1beta1_query_proto = out.File - file_cosmos_params_v1beta1_query_proto_rawDesc = nil - file_cosmos_params_v1beta1_query_proto_goTypes = nil - file_cosmos_params_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/params/v1beta1/query_grpc.pb.go b/api/cosmos/params/v1beta1/query_grpc.pb.go deleted file mode 100644 index dbc06a6a28a5..000000000000 --- a/api/cosmos/params/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/params/v1beta1/query.proto - -package paramsv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Params queries a specific parameter of a module, given its subspace and - // key. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Subspaces queries for all registered subspaces and all keys for a subspace. - Subspaces(ctx context.Context, in *QuerySubspacesRequest, opts ...grpc.CallOption) (*QuerySubspacesResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.params.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Subspaces(ctx context.Context, in *QuerySubspacesRequest, opts ...grpc.CallOption) (*QuerySubspacesResponse, error) { - out := new(QuerySubspacesResponse) - err := c.cc.Invoke(ctx, "/cosmos.params.v1beta1.Query/Subspaces", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Params queries a specific parameter of a module, given its subspace and - // key. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Subspaces queries for all registered subspaces and all keys for a subspace. - Subspaces(context.Context, *QuerySubspacesRequest) (*QuerySubspacesResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) Subspaces(context.Context, *QuerySubspacesRequest) (*QuerySubspacesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Subspaces not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.params.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Subspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySubspacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Subspaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.params.v1beta1.Query/Subspaces", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Subspaces(ctx, req.(*QuerySubspacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.params.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Subspaces", - Handler: _Query_Subspaces_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/params/v1beta1/query.proto", -} diff --git a/api/cosmos/slashing/v1beta1/genesis.pulsar.go b/api/cosmos/slashing/v1beta1/genesis.pulsar.go deleted file mode 100644 index 3e03a678cca0..000000000000 --- a/api/cosmos/slashing/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,2631 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package slashingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_2_list)(nil) - -type _GenesisState_2_list struct { - list *[]*SigningInfo -} - -func (x *_GenesisState_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SigningInfo) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SigningInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(SigningInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(SigningInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*ValidatorMissedBlocks -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorMissedBlocks) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorMissedBlocks) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(ValidatorMissedBlocks) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(ValidatorMissedBlocks) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_signing_infos protoreflect.FieldDescriptor - fd_GenesisState_missed_blocks protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_slashing_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_signing_infos = md_GenesisState.Fields().ByName("signing_infos") - fd_GenesisState_missed_blocks = md_GenesisState.Fields().ByName("missed_blocks") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if len(x.SigningInfos) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.SigningInfos}) - if !f(fd_GenesisState_signing_infos, value) { - return - } - } - if len(x.MissedBlocks) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.MissedBlocks}) - if !f(fd_GenesisState_missed_blocks, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.GenesisState.params": - return x.Params != nil - case "cosmos.slashing.v1beta1.GenesisState.signing_infos": - return len(x.SigningInfos) != 0 - case "cosmos.slashing.v1beta1.GenesisState.missed_blocks": - return len(x.MissedBlocks) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.GenesisState.params": - x.Params = nil - case "cosmos.slashing.v1beta1.GenesisState.signing_infos": - x.SigningInfos = nil - case "cosmos.slashing.v1beta1.GenesisState.missed_blocks": - x.MissedBlocks = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.slashing.v1beta1.GenesisState.signing_infos": - if len(x.SigningInfos) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) - } - listValue := &_GenesisState_2_list{list: &x.SigningInfos} - return protoreflect.ValueOfList(listValue) - case "cosmos.slashing.v1beta1.GenesisState.missed_blocks": - if len(x.MissedBlocks) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.MissedBlocks} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "cosmos.slashing.v1beta1.GenesisState.signing_infos": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.SigningInfos = *clv.list - case "cosmos.slashing.v1beta1.GenesisState.missed_blocks": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.MissedBlocks = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "cosmos.slashing.v1beta1.GenesisState.signing_infos": - if x.SigningInfos == nil { - x.SigningInfos = []*SigningInfo{} - } - value := &_GenesisState_2_list{list: &x.SigningInfos} - return protoreflect.ValueOfList(value) - case "cosmos.slashing.v1beta1.GenesisState.missed_blocks": - if x.MissedBlocks == nil { - x.MissedBlocks = []*ValidatorMissedBlocks{} - } - value := &_GenesisState_3_list{list: &x.MissedBlocks} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.slashing.v1beta1.GenesisState.signing_infos": - list := []*SigningInfo{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "cosmos.slashing.v1beta1.GenesisState.missed_blocks": - list := []*ValidatorMissedBlocks{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.SigningInfos) > 0 { - for _, e := range x.SigningInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.MissedBlocks) > 0 { - for _, e := range x.MissedBlocks { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MissedBlocks) > 0 { - for iNdEx := len(x.MissedBlocks) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MissedBlocks[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.SigningInfos) > 0 { - for iNdEx := len(x.SigningInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SigningInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SigningInfos = append(x.SigningInfos, &SigningInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SigningInfos[len(x.SigningInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MissedBlocks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MissedBlocks = append(x.MissedBlocks, &ValidatorMissedBlocks{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MissedBlocks[len(x.MissedBlocks)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SigningInfo protoreflect.MessageDescriptor - fd_SigningInfo_address protoreflect.FieldDescriptor - fd_SigningInfo_validator_signing_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_genesis_proto_init() - md_SigningInfo = File_cosmos_slashing_v1beta1_genesis_proto.Messages().ByName("SigningInfo") - fd_SigningInfo_address = md_SigningInfo.Fields().ByName("address") - fd_SigningInfo_validator_signing_info = md_SigningInfo.Fields().ByName("validator_signing_info") -} - -var _ protoreflect.Message = (*fastReflection_SigningInfo)(nil) - -type fastReflection_SigningInfo SigningInfo - -func (x *SigningInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_SigningInfo)(x) -} - -func (x *SigningInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SigningInfo_messageType fastReflection_SigningInfo_messageType -var _ protoreflect.MessageType = fastReflection_SigningInfo_messageType{} - -type fastReflection_SigningInfo_messageType struct{} - -func (x fastReflection_SigningInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_SigningInfo)(nil) -} -func (x fastReflection_SigningInfo_messageType) New() protoreflect.Message { - return new(fastReflection_SigningInfo) -} -func (x fastReflection_SigningInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SigningInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SigningInfo) Descriptor() protoreflect.MessageDescriptor { - return md_SigningInfo -} - -// 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_SigningInfo) Type() protoreflect.MessageType { - return _fastReflection_SigningInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SigningInfo) New() protoreflect.Message { - return new(fastReflection_SigningInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SigningInfo) Interface() protoreflect.ProtoMessage { - return (*SigningInfo)(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_SigningInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_SigningInfo_address, value) { - return - } - } - if x.ValidatorSigningInfo != nil { - value := protoreflect.ValueOfMessage(x.ValidatorSigningInfo.ProtoReflect()) - if !f(fd_SigningInfo_validator_signing_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SigningInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.SigningInfo.address": - return x.Address != "" - case "cosmos.slashing.v1beta1.SigningInfo.validator_signing_info": - return x.ValidatorSigningInfo != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.SigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.SigningInfo 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_SigningInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.SigningInfo.address": - x.Address = "" - case "cosmos.slashing.v1beta1.SigningInfo.validator_signing_info": - x.ValidatorSigningInfo = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.SigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.SigningInfo 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_SigningInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.SigningInfo.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.slashing.v1beta1.SigningInfo.validator_signing_info": - value := x.ValidatorSigningInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.SigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.SigningInfo 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_SigningInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.SigningInfo.address": - x.Address = value.Interface().(string) - case "cosmos.slashing.v1beta1.SigningInfo.validator_signing_info": - x.ValidatorSigningInfo = value.Message().Interface().(*ValidatorSigningInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.SigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.SigningInfo 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_SigningInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.SigningInfo.validator_signing_info": - if x.ValidatorSigningInfo == nil { - x.ValidatorSigningInfo = new(ValidatorSigningInfo) - } - return protoreflect.ValueOfMessage(x.ValidatorSigningInfo.ProtoReflect()) - case "cosmos.slashing.v1beta1.SigningInfo.address": - panic(fmt.Errorf("field address of message cosmos.slashing.v1beta1.SigningInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.SigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.SigningInfo 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_SigningInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.SigningInfo.address": - return protoreflect.ValueOfString("") - case "cosmos.slashing.v1beta1.SigningInfo.validator_signing_info": - m := new(ValidatorSigningInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.SigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.SigningInfo 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_SigningInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.SigningInfo", 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_SigningInfo) 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_SigningInfo) 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_SigningInfo) 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_SigningInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SigningInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ValidatorSigningInfo != nil { - l = options.Size(x.ValidatorSigningInfo) - 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().(*SigningInfo) - 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.ValidatorSigningInfo != nil { - encoded, err := options.Marshal(x.ValidatorSigningInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SigningInfo) - 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: SigningInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SigningInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSigningInfo", 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.ValidatorSigningInfo == nil { - x.ValidatorSigningInfo = &ValidatorSigningInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSigningInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorMissedBlocks_2_list)(nil) - -type _ValidatorMissedBlocks_2_list struct { - list *[]*MissedBlock -} - -func (x *_ValidatorMissedBlocks_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorMissedBlocks_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorMissedBlocks_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MissedBlock) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorMissedBlocks_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*MissedBlock) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorMissedBlocks_2_list) AppendMutable() protoreflect.Value { - v := new(MissedBlock) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorMissedBlocks_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorMissedBlocks_2_list) NewElement() protoreflect.Value { - v := new(MissedBlock) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorMissedBlocks_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorMissedBlocks protoreflect.MessageDescriptor - fd_ValidatorMissedBlocks_address protoreflect.FieldDescriptor - fd_ValidatorMissedBlocks_missed_blocks protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_genesis_proto_init() - md_ValidatorMissedBlocks = File_cosmos_slashing_v1beta1_genesis_proto.Messages().ByName("ValidatorMissedBlocks") - fd_ValidatorMissedBlocks_address = md_ValidatorMissedBlocks.Fields().ByName("address") - fd_ValidatorMissedBlocks_missed_blocks = md_ValidatorMissedBlocks.Fields().ByName("missed_blocks") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorMissedBlocks)(nil) - -type fastReflection_ValidatorMissedBlocks ValidatorMissedBlocks - -func (x *ValidatorMissedBlocks) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorMissedBlocks)(x) -} - -func (x *ValidatorMissedBlocks) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorMissedBlocks_messageType fastReflection_ValidatorMissedBlocks_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorMissedBlocks_messageType{} - -type fastReflection_ValidatorMissedBlocks_messageType struct{} - -func (x fastReflection_ValidatorMissedBlocks_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorMissedBlocks)(nil) -} -func (x fastReflection_ValidatorMissedBlocks_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorMissedBlocks) -} -func (x fastReflection_ValidatorMissedBlocks_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorMissedBlocks -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorMissedBlocks) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorMissedBlocks -} - -// 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_ValidatorMissedBlocks) Type() protoreflect.MessageType { - return _fastReflection_ValidatorMissedBlocks_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorMissedBlocks) New() protoreflect.Message { - return new(fastReflection_ValidatorMissedBlocks) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorMissedBlocks) Interface() protoreflect.ProtoMessage { - return (*ValidatorMissedBlocks)(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_ValidatorMissedBlocks) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_ValidatorMissedBlocks_address, value) { - return - } - } - if len(x.MissedBlocks) != 0 { - value := protoreflect.ValueOfList(&_ValidatorMissedBlocks_2_list{list: &x.MissedBlocks}) - if !f(fd_ValidatorMissedBlocks_missed_blocks, 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_ValidatorMissedBlocks) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.address": - return x.Address != "" - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks": - return len(x.MissedBlocks) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorMissedBlocks")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorMissedBlocks 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_ValidatorMissedBlocks) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.address": - x.Address = "" - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks": - x.MissedBlocks = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorMissedBlocks")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorMissedBlocks 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_ValidatorMissedBlocks) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks": - if len(x.MissedBlocks) == 0 { - return protoreflect.ValueOfList(&_ValidatorMissedBlocks_2_list{}) - } - listValue := &_ValidatorMissedBlocks_2_list{list: &x.MissedBlocks} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorMissedBlocks")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorMissedBlocks 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_ValidatorMissedBlocks) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.address": - x.Address = value.Interface().(string) - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks": - lv := value.List() - clv := lv.(*_ValidatorMissedBlocks_2_list) - x.MissedBlocks = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorMissedBlocks")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorMissedBlocks 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_ValidatorMissedBlocks) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks": - if x.MissedBlocks == nil { - x.MissedBlocks = []*MissedBlock{} - } - value := &_ValidatorMissedBlocks_2_list{list: &x.MissedBlocks} - return protoreflect.ValueOfList(value) - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.address": - panic(fmt.Errorf("field address of message cosmos.slashing.v1beta1.ValidatorMissedBlocks is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorMissedBlocks")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorMissedBlocks 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_ValidatorMissedBlocks) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.address": - return protoreflect.ValueOfString("") - case "cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks": - list := []*MissedBlock{} - return protoreflect.ValueOfList(&_ValidatorMissedBlocks_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorMissedBlocks")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorMissedBlocks 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_ValidatorMissedBlocks) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.ValidatorMissedBlocks", 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_ValidatorMissedBlocks) 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_ValidatorMissedBlocks) 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_ValidatorMissedBlocks) 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_ValidatorMissedBlocks) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorMissedBlocks) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.MissedBlocks) > 0 { - for _, e := range x.MissedBlocks { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorMissedBlocks) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MissedBlocks) > 0 { - for iNdEx := len(x.MissedBlocks) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.MissedBlocks[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorMissedBlocks) - 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: ValidatorMissedBlocks: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorMissedBlocks: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MissedBlocks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MissedBlocks = append(x.MissedBlocks, &MissedBlock{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MissedBlocks[len(x.MissedBlocks)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MissedBlock protoreflect.MessageDescriptor - fd_MissedBlock_index protoreflect.FieldDescriptor - fd_MissedBlock_missed protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_genesis_proto_init() - md_MissedBlock = File_cosmos_slashing_v1beta1_genesis_proto.Messages().ByName("MissedBlock") - fd_MissedBlock_index = md_MissedBlock.Fields().ByName("index") - fd_MissedBlock_missed = md_MissedBlock.Fields().ByName("missed") -} - -var _ protoreflect.Message = (*fastReflection_MissedBlock)(nil) - -type fastReflection_MissedBlock MissedBlock - -func (x *MissedBlock) ProtoReflect() protoreflect.Message { - return (*fastReflection_MissedBlock)(x) -} - -func (x *MissedBlock) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MissedBlock_messageType fastReflection_MissedBlock_messageType -var _ protoreflect.MessageType = fastReflection_MissedBlock_messageType{} - -type fastReflection_MissedBlock_messageType struct{} - -func (x fastReflection_MissedBlock_messageType) Zero() protoreflect.Message { - return (*fastReflection_MissedBlock)(nil) -} -func (x fastReflection_MissedBlock_messageType) New() protoreflect.Message { - return new(fastReflection_MissedBlock) -} -func (x fastReflection_MissedBlock_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MissedBlock -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MissedBlock) Descriptor() protoreflect.MessageDescriptor { - return md_MissedBlock -} - -// 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_MissedBlock) Type() protoreflect.MessageType { - return _fastReflection_MissedBlock_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MissedBlock) New() protoreflect.Message { - return new(fastReflection_MissedBlock) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MissedBlock) Interface() protoreflect.ProtoMessage { - return (*MissedBlock)(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_MissedBlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Index != int64(0) { - value := protoreflect.ValueOfInt64(x.Index) - if !f(fd_MissedBlock_index, value) { - return - } - } - if x.Missed != false { - value := protoreflect.ValueOfBool(x.Missed) - if !f(fd_MissedBlock_missed, 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_MissedBlock) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MissedBlock.index": - return x.Index != int64(0) - case "cosmos.slashing.v1beta1.MissedBlock.missed": - return x.Missed != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MissedBlock")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MissedBlock 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_MissedBlock) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MissedBlock.index": - x.Index = int64(0) - case "cosmos.slashing.v1beta1.MissedBlock.missed": - x.Missed = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MissedBlock")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MissedBlock 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_MissedBlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.MissedBlock.index": - value := x.Index - return protoreflect.ValueOfInt64(value) - case "cosmos.slashing.v1beta1.MissedBlock.missed": - value := x.Missed - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MissedBlock")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MissedBlock 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_MissedBlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MissedBlock.index": - x.Index = value.Int() - case "cosmos.slashing.v1beta1.MissedBlock.missed": - x.Missed = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MissedBlock")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MissedBlock 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_MissedBlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MissedBlock.index": - panic(fmt.Errorf("field index of message cosmos.slashing.v1beta1.MissedBlock is not mutable")) - case "cosmos.slashing.v1beta1.MissedBlock.missed": - panic(fmt.Errorf("field missed of message cosmos.slashing.v1beta1.MissedBlock is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MissedBlock")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MissedBlock 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_MissedBlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MissedBlock.index": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.slashing.v1beta1.MissedBlock.missed": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MissedBlock")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MissedBlock 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_MissedBlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.MissedBlock", 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_MissedBlock) 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_MissedBlock) 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_MissedBlock) 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_MissedBlock) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MissedBlock) - 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.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - if x.Missed { - n += 2 - } - 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().(*MissedBlock) - 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.Missed { - i-- - if x.Missed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MissedBlock) - 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: MissedBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MissedBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Missed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Missed = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/slashing/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the slashing module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines all the paramaters of related to deposit. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // signing_infos represents a map between validator addresses and their - // signing infos. - SigningInfos []*SigningInfo `protobuf:"bytes,2,rep,name=signing_infos,json=signingInfos,proto3" json:"signing_infos,omitempty"` - // missed_blocks represents a map between validator addresses and their - // missed blocks. - MissedBlocks []*ValidatorMissedBlocks `protobuf:"bytes,3,rep,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetSigningInfos() []*SigningInfo { - if x != nil { - return x.SigningInfos - } - return nil -} - -func (x *GenesisState) GetMissedBlocks() []*ValidatorMissedBlocks { - if x != nil { - return x.MissedBlocks - } - return nil -} - -// SigningInfo stores validator signing info of corresponding address. -type SigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the validator address. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo *ValidatorSigningInfo `protobuf:"bytes,2,opt,name=validator_signing_info,json=validatorSigningInfo,proto3" json:"validator_signing_info,omitempty"` -} - -func (x *SigningInfo) Reset() { - *x = SigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SigningInfo) ProtoMessage() {} - -// Deprecated: Use SigningInfo.ProtoReflect.Descriptor instead. -func (*SigningInfo) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *SigningInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *SigningInfo) GetValidatorSigningInfo() *ValidatorSigningInfo { - if x != nil { - return x.ValidatorSigningInfo - } - return nil -} - -// ValidatorMissedBlocks contains array of missed blocks of corresponding -// address. -type ValidatorMissedBlocks struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the validator address. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // missed_blocks is an array of missed blocks by the validator. - MissedBlocks []*MissedBlock `protobuf:"bytes,2,rep,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks,omitempty"` -} - -func (x *ValidatorMissedBlocks) Reset() { - *x = ValidatorMissedBlocks{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorMissedBlocks) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorMissedBlocks) ProtoMessage() {} - -// Deprecated: Use ValidatorMissedBlocks.ProtoReflect.Descriptor instead. -func (*ValidatorMissedBlocks) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_genesis_proto_rawDescGZIP(), []int{2} -} - -func (x *ValidatorMissedBlocks) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ValidatorMissedBlocks) GetMissedBlocks() []*MissedBlock { - if x != nil { - return x.MissedBlocks - } - return nil -} - -// MissedBlock contains height and missed status as boolean. -type MissedBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // index is the height at which the block was missed. - Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - // missed is the missed status. - Missed bool `protobuf:"varint,2,opt,name=missed,proto3" json:"missed,omitempty"` -} - -func (x *MissedBlock) Reset() { - *x = MissedBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MissedBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MissedBlock) ProtoMessage() {} - -// Deprecated: Use MissedBlock.ProtoReflect.Descriptor instead. -func (*MissedBlock) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_genesis_proto_rawDescGZIP(), []int{3} -} - -func (x *MissedBlock) GetIndex() int64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *MissedBlock) GetMissed() bool { - if x != nil { - return x.Missed - } - return false -} - -var File_cosmos_slashing_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_slashing_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x01, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 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, 0x12, 0x4f, 0x0a, 0x0d, 0x73, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x59, 0x0a, 0x0d, 0x6d, 0x69, - 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 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, 0x12, 0x69, 0x0a, 0x16, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9c, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 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, 0x12, 0x4f, 0x0a, 0x0d, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x22, 0x3b, 0x0a, 0x0b, 0x4d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x73, 0x73, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, - 0x42, 0xf3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, - 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_slashing_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_slashing_v1beta1_genesis_proto_rawDescData = file_cosmos_slashing_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_slashing_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_slashing_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_slashing_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_slashing_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_slashing_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_slashing_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_slashing_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.slashing.v1beta1.GenesisState - (*SigningInfo)(nil), // 1: cosmos.slashing.v1beta1.SigningInfo - (*ValidatorMissedBlocks)(nil), // 2: cosmos.slashing.v1beta1.ValidatorMissedBlocks - (*MissedBlock)(nil), // 3: cosmos.slashing.v1beta1.MissedBlock - (*Params)(nil), // 4: cosmos.slashing.v1beta1.Params - (*ValidatorSigningInfo)(nil), // 5: cosmos.slashing.v1beta1.ValidatorSigningInfo -} -var file_cosmos_slashing_v1beta1_genesis_proto_depIdxs = []int32{ - 4, // 0: cosmos.slashing.v1beta1.GenesisState.params:type_name -> cosmos.slashing.v1beta1.Params - 1, // 1: cosmos.slashing.v1beta1.GenesisState.signing_infos:type_name -> cosmos.slashing.v1beta1.SigningInfo - 2, // 2: cosmos.slashing.v1beta1.GenesisState.missed_blocks:type_name -> cosmos.slashing.v1beta1.ValidatorMissedBlocks - 5, // 3: cosmos.slashing.v1beta1.SigningInfo.validator_signing_info:type_name -> cosmos.slashing.v1beta1.ValidatorSigningInfo - 3, // 4: cosmos.slashing.v1beta1.ValidatorMissedBlocks.missed_blocks:type_name -> cosmos.slashing.v1beta1.MissedBlock - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_slashing_v1beta1_genesis_proto_init() } -func file_cosmos_slashing_v1beta1_genesis_proto_init() { - if File_cosmos_slashing_v1beta1_genesis_proto != nil { - return - } - file_cosmos_slashing_v1beta1_slashing_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorMissedBlocks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MissedBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_slashing_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_slashing_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_slashing_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_slashing_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_slashing_v1beta1_genesis_proto = out.File - file_cosmos_slashing_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_slashing_v1beta1_genesis_proto_goTypes = nil - file_cosmos_slashing_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/slashing/v1beta1/query.pulsar.go b/api/cosmos/slashing/v1beta1/query.pulsar.go deleted file mode 100644 index 40acdfbe3df0..000000000000 --- a/api/cosmos/slashing/v1beta1/query.pulsar.go +++ /dev/null @@ -1,3154 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package slashingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_slashing_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.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_slashing_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_slashing_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_slashing_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.slashing.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.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.slashing.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.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.slashing.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.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.slashing.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.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.slashing.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_QuerySigningInfoRequest protoreflect.MessageDescriptor - fd_QuerySigningInfoRequest_cons_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_query_proto_init() - md_QuerySigningInfoRequest = File_cosmos_slashing_v1beta1_query_proto.Messages().ByName("QuerySigningInfoRequest") - fd_QuerySigningInfoRequest_cons_address = md_QuerySigningInfoRequest.Fields().ByName("cons_address") -} - -var _ protoreflect.Message = (*fastReflection_QuerySigningInfoRequest)(nil) - -type fastReflection_QuerySigningInfoRequest QuerySigningInfoRequest - -func (x *QuerySigningInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySigningInfoRequest)(x) -} - -func (x *QuerySigningInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySigningInfoRequest_messageType fastReflection_QuerySigningInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySigningInfoRequest_messageType{} - -type fastReflection_QuerySigningInfoRequest_messageType struct{} - -func (x fastReflection_QuerySigningInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySigningInfoRequest)(nil) -} -func (x fastReflection_QuerySigningInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfoRequest) -} -func (x fastReflection_QuerySigningInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySigningInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfoRequest -} - -// 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_QuerySigningInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySigningInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySigningInfoRequest) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySigningInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySigningInfoRequest)(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_QuerySigningInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConsAddress != "" { - value := protoreflect.ValueOfString(x.ConsAddress) - if !f(fd_QuerySigningInfoRequest_cons_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySigningInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoRequest.cons_address": - return x.ConsAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoRequest 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_QuerySigningInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoRequest.cons_address": - x.ConsAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoRequest 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_QuerySigningInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoRequest.cons_address": - value := x.ConsAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoRequest 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_QuerySigningInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoRequest.cons_address": - x.ConsAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoRequest 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_QuerySigningInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoRequest.cons_address": - panic(fmt.Errorf("field cons_address of message cosmos.slashing.v1beta1.QuerySigningInfoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoRequest 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_QuerySigningInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoRequest.cons_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoRequest 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_QuerySigningInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.QuerySigningInfoRequest", 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_QuerySigningInfoRequest) 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_QuerySigningInfoRequest) 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_QuerySigningInfoRequest) 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_QuerySigningInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySigningInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ConsAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySigningInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ConsAddress) > 0 { - i -= len(x.ConsAddress) - copy(dAtA[i:], x.ConsAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConsAddress))) - 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().(*QuerySigningInfoRequest) - 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: QuerySigningInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningInfoRequest: 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 ConsAddress", 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.ConsAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySigningInfoResponse protoreflect.MessageDescriptor - fd_QuerySigningInfoResponse_val_signing_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_query_proto_init() - md_QuerySigningInfoResponse = File_cosmos_slashing_v1beta1_query_proto.Messages().ByName("QuerySigningInfoResponse") - fd_QuerySigningInfoResponse_val_signing_info = md_QuerySigningInfoResponse.Fields().ByName("val_signing_info") -} - -var _ protoreflect.Message = (*fastReflection_QuerySigningInfoResponse)(nil) - -type fastReflection_QuerySigningInfoResponse QuerySigningInfoResponse - -func (x *QuerySigningInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySigningInfoResponse)(x) -} - -func (x *QuerySigningInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySigningInfoResponse_messageType fastReflection_QuerySigningInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySigningInfoResponse_messageType{} - -type fastReflection_QuerySigningInfoResponse_messageType struct{} - -func (x fastReflection_QuerySigningInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySigningInfoResponse)(nil) -} -func (x fastReflection_QuerySigningInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfoResponse) -} -func (x fastReflection_QuerySigningInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySigningInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfoResponse -} - -// 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_QuerySigningInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySigningInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySigningInfoResponse) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySigningInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySigningInfoResponse)(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_QuerySigningInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValSigningInfo != nil { - value := protoreflect.ValueOfMessage(x.ValSigningInfo.ProtoReflect()) - if !f(fd_QuerySigningInfoResponse_val_signing_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySigningInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info": - return x.ValSigningInfo != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoResponse 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_QuerySigningInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info": - x.ValSigningInfo = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoResponse 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_QuerySigningInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info": - value := x.ValSigningInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoResponse 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_QuerySigningInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info": - x.ValSigningInfo = value.Message().Interface().(*ValidatorSigningInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoResponse 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_QuerySigningInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info": - if x.ValSigningInfo == nil { - x.ValSigningInfo = new(ValidatorSigningInfo) - } - return protoreflect.ValueOfMessage(x.ValSigningInfo.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoResponse 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_QuerySigningInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info": - m := new(ValidatorSigningInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfoResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfoResponse 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_QuerySigningInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.QuerySigningInfoResponse", 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_QuerySigningInfoResponse) 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_QuerySigningInfoResponse) 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_QuerySigningInfoResponse) 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_QuerySigningInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySigningInfoResponse) - 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.ValSigningInfo != nil { - l = options.Size(x.ValSigningInfo) - 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().(*QuerySigningInfoResponse) - 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.ValSigningInfo != nil { - encoded, err := options.Marshal(x.ValSigningInfo) - 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().(*QuerySigningInfoResponse) - 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: QuerySigningInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningInfoResponse: 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 ValSigningInfo", 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.ValSigningInfo == nil { - x.ValSigningInfo = &ValidatorSigningInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValSigningInfo); 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_QuerySigningInfosRequest protoreflect.MessageDescriptor - fd_QuerySigningInfosRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_query_proto_init() - md_QuerySigningInfosRequest = File_cosmos_slashing_v1beta1_query_proto.Messages().ByName("QuerySigningInfosRequest") - fd_QuerySigningInfosRequest_pagination = md_QuerySigningInfosRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QuerySigningInfosRequest)(nil) - -type fastReflection_QuerySigningInfosRequest QuerySigningInfosRequest - -func (x *QuerySigningInfosRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySigningInfosRequest)(x) -} - -func (x *QuerySigningInfosRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySigningInfosRequest_messageType fastReflection_QuerySigningInfosRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySigningInfosRequest_messageType{} - -type fastReflection_QuerySigningInfosRequest_messageType struct{} - -func (x fastReflection_QuerySigningInfosRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySigningInfosRequest)(nil) -} -func (x fastReflection_QuerySigningInfosRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfosRequest) -} -func (x fastReflection_QuerySigningInfosRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfosRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySigningInfosRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfosRequest -} - -// 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_QuerySigningInfosRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySigningInfosRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySigningInfosRequest) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfosRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySigningInfosRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySigningInfosRequest)(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_QuerySigningInfosRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QuerySigningInfosRequest_pagination, 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_QuerySigningInfosRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosRequest 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_QuerySigningInfosRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosRequest 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_QuerySigningInfosRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosRequest 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_QuerySigningInfosRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosRequest 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_QuerySigningInfosRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosRequest 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_QuerySigningInfosRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosRequest")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosRequest 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_QuerySigningInfosRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.QuerySigningInfosRequest", 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_QuerySigningInfosRequest) 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_QuerySigningInfosRequest) 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_QuerySigningInfosRequest) 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_QuerySigningInfosRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySigningInfosRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QuerySigningInfosRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QuerySigningInfosRequest) - 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: QuerySigningInfosRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningInfosRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QuerySigningInfosResponse_1_list)(nil) - -type _QuerySigningInfosResponse_1_list struct { - list *[]*ValidatorSigningInfo -} - -func (x *_QuerySigningInfosResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QuerySigningInfosResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QuerySigningInfosResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSigningInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QuerySigningInfosResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorSigningInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QuerySigningInfosResponse_1_list) AppendMutable() protoreflect.Value { - v := new(ValidatorSigningInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QuerySigningInfosResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QuerySigningInfosResponse_1_list) NewElement() protoreflect.Value { - v := new(ValidatorSigningInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QuerySigningInfosResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QuerySigningInfosResponse protoreflect.MessageDescriptor - fd_QuerySigningInfosResponse_info protoreflect.FieldDescriptor - fd_QuerySigningInfosResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_query_proto_init() - md_QuerySigningInfosResponse = File_cosmos_slashing_v1beta1_query_proto.Messages().ByName("QuerySigningInfosResponse") - fd_QuerySigningInfosResponse_info = md_QuerySigningInfosResponse.Fields().ByName("info") - fd_QuerySigningInfosResponse_pagination = md_QuerySigningInfosResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QuerySigningInfosResponse)(nil) - -type fastReflection_QuerySigningInfosResponse QuerySigningInfosResponse - -func (x *QuerySigningInfosResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySigningInfosResponse)(x) -} - -func (x *QuerySigningInfosResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_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_QuerySigningInfosResponse_messageType fastReflection_QuerySigningInfosResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySigningInfosResponse_messageType{} - -type fastReflection_QuerySigningInfosResponse_messageType struct{} - -func (x fastReflection_QuerySigningInfosResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySigningInfosResponse)(nil) -} -func (x fastReflection_QuerySigningInfosResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfosResponse) -} -func (x fastReflection_QuerySigningInfosResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfosResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySigningInfosResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningInfosResponse -} - -// 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_QuerySigningInfosResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySigningInfosResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySigningInfosResponse) New() protoreflect.Message { - return new(fastReflection_QuerySigningInfosResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySigningInfosResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySigningInfosResponse)(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_QuerySigningInfosResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Info) != 0 { - value := protoreflect.ValueOfList(&_QuerySigningInfosResponse_1_list{list: &x.Info}) - if !f(fd_QuerySigningInfosResponse_info, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QuerySigningInfosResponse_pagination, 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_QuerySigningInfosResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.info": - return len(x.Info) != 0 - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosResponse 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_QuerySigningInfosResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.info": - x.Info = nil - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosResponse 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_QuerySigningInfosResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.info": - if len(x.Info) == 0 { - return protoreflect.ValueOfList(&_QuerySigningInfosResponse_1_list{}) - } - listValue := &_QuerySigningInfosResponse_1_list{list: &x.Info} - return protoreflect.ValueOfList(listValue) - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosResponse 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_QuerySigningInfosResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.info": - lv := value.List() - clv := lv.(*_QuerySigningInfosResponse_1_list) - x.Info = *clv.list - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosResponse 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_QuerySigningInfosResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.info": - if x.Info == nil { - x.Info = []*ValidatorSigningInfo{} - } - value := &_QuerySigningInfosResponse_1_list{list: &x.Info} - return protoreflect.ValueOfList(value) - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosResponse 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_QuerySigningInfosResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.info": - list := []*ValidatorSigningInfo{} - return protoreflect.ValueOfList(&_QuerySigningInfosResponse_1_list{list: &list}) - case "cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.QuerySigningInfosResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.QuerySigningInfosResponse 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_QuerySigningInfosResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.QuerySigningInfosResponse", 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_QuerySigningInfosResponse) 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_QuerySigningInfosResponse) 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_QuerySigningInfosResponse) 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_QuerySigningInfosResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySigningInfosResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Info) > 0 { - for _, e := range x.Info { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QuerySigningInfosResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Info) > 0 { - for iNdEx := len(x.Info) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Info[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySigningInfosResponse) - 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: QuerySigningInfosResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningInfosResponse: 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 Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Info = append(x.Info, &ValidatorSigningInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info[len(x.Info)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/slashing/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is the request type for the Query/Params RPC method -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -// method -type QuerySigningInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // cons_address is the address to query signing info of - ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` -} - -func (x *QuerySigningInfoRequest) Reset() { - *x = QuerySigningInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySigningInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySigningInfoRequest) ProtoMessage() {} - -// Deprecated: Use QuerySigningInfoRequest.ProtoReflect.Descriptor instead. -func (*QuerySigningInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QuerySigningInfoRequest) GetConsAddress() string { - if x != nil { - return x.ConsAddress - } - return "" -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -type QuerySigningInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // val_signing_info is the signing info of requested val cons address - ValSigningInfo *ValidatorSigningInfo `protobuf:"bytes,1,opt,name=val_signing_info,json=valSigningInfo,proto3" json:"val_signing_info,omitempty"` -} - -func (x *QuerySigningInfoResponse) Reset() { - *x = QuerySigningInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySigningInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySigningInfoResponse) ProtoMessage() {} - -// Deprecated: Use QuerySigningInfoResponse.ProtoReflect.Descriptor instead. -func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QuerySigningInfoResponse) GetValSigningInfo() *ValidatorSigningInfo { - if x != nil { - return x.ValSigningInfo - } - return nil -} - -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -// method -type QuerySigningInfosRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySigningInfosRequest) Reset() { - *x = QuerySigningInfosRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySigningInfosRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySigningInfosRequest) ProtoMessage() {} - -// Deprecated: Use QuerySigningInfosRequest.ProtoReflect.Descriptor instead. -func (*QuerySigningInfosRequest) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QuerySigningInfosRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -type QuerySigningInfosResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // info is the signing info of all validators - Info []*ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QuerySigningInfosResponse) Reset() { - *x = QuerySigningInfosResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySigningInfosResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySigningInfosResponse) ProtoMessage() {} - -// Deprecated: Use QuerySigningInfosResponse.ProtoReflect.Descriptor instead. -func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QuerySigningInfosResponse) GetInfo() []*ValidatorSigningInfo { - if x != nil { - return x.Info - } - return nil -} - -func (x *QuerySigningInfosResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_slashing_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_slashing_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x54, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 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, 0x56, 0x0a, - 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, - 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, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x79, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, - 0x22, 0x62, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x47, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xf2, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8c, - 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 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, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 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, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xb1, 0x01, - 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0xf1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_slashing_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_slashing_v1beta1_query_proto_rawDescData = file_cosmos_slashing_v1beta1_query_proto_rawDesc -) - -func file_cosmos_slashing_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_slashing_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_slashing_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_slashing_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_slashing_v1beta1_query_proto_rawDescData -} - -var file_cosmos_slashing_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_slashing_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.slashing.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.slashing.v1beta1.QueryParamsResponse - (*QuerySigningInfoRequest)(nil), // 2: cosmos.slashing.v1beta1.QuerySigningInfoRequest - (*QuerySigningInfoResponse)(nil), // 3: cosmos.slashing.v1beta1.QuerySigningInfoResponse - (*QuerySigningInfosRequest)(nil), // 4: cosmos.slashing.v1beta1.QuerySigningInfosRequest - (*QuerySigningInfosResponse)(nil), // 5: cosmos.slashing.v1beta1.QuerySigningInfosResponse - (*Params)(nil), // 6: cosmos.slashing.v1beta1.Params - (*ValidatorSigningInfo)(nil), // 7: cosmos.slashing.v1beta1.ValidatorSigningInfo - (*v1beta1.PageRequest)(nil), // 8: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 9: cosmos.base.query.v1beta1.PageResponse -} -var file_cosmos_slashing_v1beta1_query_proto_depIdxs = []int32{ - 6, // 0: cosmos.slashing.v1beta1.QueryParamsResponse.params:type_name -> cosmos.slashing.v1beta1.Params - 7, // 1: cosmos.slashing.v1beta1.QuerySigningInfoResponse.val_signing_info:type_name -> cosmos.slashing.v1beta1.ValidatorSigningInfo - 8, // 2: cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 7, // 3: cosmos.slashing.v1beta1.QuerySigningInfosResponse.info:type_name -> cosmos.slashing.v1beta1.ValidatorSigningInfo - 9, // 4: cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 5: cosmos.slashing.v1beta1.Query.Params:input_type -> cosmos.slashing.v1beta1.QueryParamsRequest - 2, // 6: cosmos.slashing.v1beta1.Query.SigningInfo:input_type -> cosmos.slashing.v1beta1.QuerySigningInfoRequest - 4, // 7: cosmos.slashing.v1beta1.Query.SigningInfos:input_type -> cosmos.slashing.v1beta1.QuerySigningInfosRequest - 1, // 8: cosmos.slashing.v1beta1.Query.Params:output_type -> cosmos.slashing.v1beta1.QueryParamsResponse - 3, // 9: cosmos.slashing.v1beta1.Query.SigningInfo:output_type -> cosmos.slashing.v1beta1.QuerySigningInfoResponse - 5, // 10: cosmos.slashing.v1beta1.Query.SigningInfos:output_type -> cosmos.slashing.v1beta1.QuerySigningInfosResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_slashing_v1beta1_query_proto_init() } -func file_cosmos_slashing_v1beta1_query_proto_init() { - if File_cosmos_slashing_v1beta1_query_proto != nil { - return - } - file_cosmos_slashing_v1beta1_slashing_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_slashing_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySigningInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySigningInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySigningInfosRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySigningInfosResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_slashing_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_slashing_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_slashing_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_slashing_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_slashing_v1beta1_query_proto = out.File - file_cosmos_slashing_v1beta1_query_proto_rawDesc = nil - file_cosmos_slashing_v1beta1_query_proto_goTypes = nil - file_cosmos_slashing_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/slashing/v1beta1/query_grpc.pb.go b/api/cosmos/slashing/v1beta1/query_grpc.pb.go deleted file mode 100644 index 1a2af60fc0cd..000000000000 --- a/api/cosmos/slashing/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/slashing/v1beta1/query.proto - -package slashingv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Params queries the parameters of slashing module - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // SigningInfo queries the signing info of given cons address - SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) - // SigningInfos queries signing info of all validators - SigningInfos(ctx context.Context, in *QuerySigningInfosRequest, opts ...grpc.CallOption) (*QuerySigningInfosResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) { - out := new(QuerySigningInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Query/SigningInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SigningInfos(ctx context.Context, in *QuerySigningInfosRequest, opts ...grpc.CallOption) (*QuerySigningInfosResponse, error) { - out := new(QuerySigningInfosResponse) - err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Query/SigningInfos", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Params queries the parameters of slashing module - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // SigningInfo queries the signing info of given cons address - SigningInfo(context.Context, *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) - // SigningInfos queries signing info of all validators - SigningInfos(context.Context, *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) SigningInfo(context.Context, *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SigningInfo not implemented") -} -func (UnimplementedQueryServer) SigningInfos(context.Context, *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SigningInfos not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.slashing.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SigningInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySigningInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SigningInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.slashing.v1beta1.Query/SigningInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SigningInfo(ctx, req.(*QuerySigningInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SigningInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySigningInfosRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SigningInfos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.slashing.v1beta1.Query/SigningInfos", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SigningInfos(ctx, req.(*QuerySigningInfosRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.slashing.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "SigningInfo", - Handler: _Query_SigningInfo_Handler, - }, - { - MethodName: "SigningInfos", - Handler: _Query_SigningInfos_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/slashing/v1beta1/query.proto", -} diff --git a/api/cosmos/slashing/v1beta1/slashing.pulsar.go b/api/cosmos/slashing/v1beta1/slashing.pulsar.go deleted file mode 100644 index 4e161201bcb0..000000000000 --- a/api/cosmos/slashing/v1beta1/slashing.pulsar.go +++ /dev/null @@ -1,1723 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package slashingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_ValidatorSigningInfo protoreflect.MessageDescriptor - fd_ValidatorSigningInfo_address protoreflect.FieldDescriptor - fd_ValidatorSigningInfo_start_height protoreflect.FieldDescriptor - fd_ValidatorSigningInfo_index_offset protoreflect.FieldDescriptor - fd_ValidatorSigningInfo_jailed_until protoreflect.FieldDescriptor - fd_ValidatorSigningInfo_tombstoned protoreflect.FieldDescriptor - fd_ValidatorSigningInfo_missed_blocks_counter protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_slashing_proto_init() - md_ValidatorSigningInfo = File_cosmos_slashing_v1beta1_slashing_proto.Messages().ByName("ValidatorSigningInfo") - fd_ValidatorSigningInfo_address = md_ValidatorSigningInfo.Fields().ByName("address") - fd_ValidatorSigningInfo_start_height = md_ValidatorSigningInfo.Fields().ByName("start_height") - fd_ValidatorSigningInfo_index_offset = md_ValidatorSigningInfo.Fields().ByName("index_offset") - fd_ValidatorSigningInfo_jailed_until = md_ValidatorSigningInfo.Fields().ByName("jailed_until") - fd_ValidatorSigningInfo_tombstoned = md_ValidatorSigningInfo.Fields().ByName("tombstoned") - fd_ValidatorSigningInfo_missed_blocks_counter = md_ValidatorSigningInfo.Fields().ByName("missed_blocks_counter") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorSigningInfo)(nil) - -type fastReflection_ValidatorSigningInfo ValidatorSigningInfo - -func (x *ValidatorSigningInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSigningInfo)(x) -} - -func (x *ValidatorSigningInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_slashing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorSigningInfo_messageType fastReflection_ValidatorSigningInfo_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSigningInfo_messageType{} - -type fastReflection_ValidatorSigningInfo_messageType struct{} - -func (x fastReflection_ValidatorSigningInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSigningInfo)(nil) -} -func (x fastReflection_ValidatorSigningInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSigningInfo) -} -func (x fastReflection_ValidatorSigningInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSigningInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorSigningInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSigningInfo -} - -// 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_ValidatorSigningInfo) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSigningInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSigningInfo) New() protoreflect.Message { - return new(fastReflection_ValidatorSigningInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSigningInfo) Interface() protoreflect.ProtoMessage { - return (*ValidatorSigningInfo)(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_ValidatorSigningInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_ValidatorSigningInfo_address, value) { - return - } - } - if x.StartHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.StartHeight) - if !f(fd_ValidatorSigningInfo_start_height, value) { - return - } - } - if x.IndexOffset != int64(0) { - value := protoreflect.ValueOfInt64(x.IndexOffset) - if !f(fd_ValidatorSigningInfo_index_offset, value) { - return - } - } - if x.JailedUntil != nil { - value := protoreflect.ValueOfMessage(x.JailedUntil.ProtoReflect()) - if !f(fd_ValidatorSigningInfo_jailed_until, value) { - return - } - } - if x.Tombstoned != false { - value := protoreflect.ValueOfBool(x.Tombstoned) - if !f(fd_ValidatorSigningInfo_tombstoned, value) { - return - } - } - if x.MissedBlocksCounter != int64(0) { - value := protoreflect.ValueOfInt64(x.MissedBlocksCounter) - if !f(fd_ValidatorSigningInfo_missed_blocks_counter, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ValidatorSigningInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.address": - return x.Address != "" - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.start_height": - return x.StartHeight != int64(0) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.index_offset": - return x.IndexOffset != int64(0) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until": - return x.JailedUntil != nil - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.tombstoned": - return x.Tombstoned != false - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.missed_blocks_counter": - return x.MissedBlocksCounter != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorSigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorSigningInfo 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_ValidatorSigningInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.address": - x.Address = "" - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.start_height": - x.StartHeight = int64(0) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.index_offset": - x.IndexOffset = int64(0) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until": - x.JailedUntil = nil - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.tombstoned": - x.Tombstoned = false - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.missed_blocks_counter": - x.MissedBlocksCounter = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorSigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorSigningInfo 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_ValidatorSigningInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.start_height": - value := x.StartHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.index_offset": - value := x.IndexOffset - return protoreflect.ValueOfInt64(value) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until": - value := x.JailedUntil - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.tombstoned": - value := x.Tombstoned - return protoreflect.ValueOfBool(value) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.missed_blocks_counter": - value := x.MissedBlocksCounter - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorSigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorSigningInfo 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_ValidatorSigningInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.address": - x.Address = value.Interface().(string) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.start_height": - x.StartHeight = value.Int() - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.index_offset": - x.IndexOffset = value.Int() - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until": - x.JailedUntil = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.tombstoned": - x.Tombstoned = value.Bool() - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.missed_blocks_counter": - x.MissedBlocksCounter = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorSigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorSigningInfo 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_ValidatorSigningInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until": - if x.JailedUntil == nil { - x.JailedUntil = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.JailedUntil.ProtoReflect()) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.address": - panic(fmt.Errorf("field address of message cosmos.slashing.v1beta1.ValidatorSigningInfo is not mutable")) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.start_height": - panic(fmt.Errorf("field start_height of message cosmos.slashing.v1beta1.ValidatorSigningInfo is not mutable")) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.index_offset": - panic(fmt.Errorf("field index_offset of message cosmos.slashing.v1beta1.ValidatorSigningInfo is not mutable")) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.tombstoned": - panic(fmt.Errorf("field tombstoned of message cosmos.slashing.v1beta1.ValidatorSigningInfo is not mutable")) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.missed_blocks_counter": - panic(fmt.Errorf("field missed_blocks_counter of message cosmos.slashing.v1beta1.ValidatorSigningInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorSigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorSigningInfo 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_ValidatorSigningInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.address": - return protoreflect.ValueOfString("") - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.start_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.index_offset": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.tombstoned": - return protoreflect.ValueOfBool(false) - case "cosmos.slashing.v1beta1.ValidatorSigningInfo.missed_blocks_counter": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.ValidatorSigningInfo")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.ValidatorSigningInfo 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_ValidatorSigningInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.ValidatorSigningInfo", 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_ValidatorSigningInfo) 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_ValidatorSigningInfo) 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_ValidatorSigningInfo) 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_ValidatorSigningInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorSigningInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartHeight != 0 { - n += 1 + runtime.Sov(uint64(x.StartHeight)) - } - if x.IndexOffset != 0 { - n += 1 + runtime.Sov(uint64(x.IndexOffset)) - } - if x.JailedUntil != nil { - l = options.Size(x.JailedUntil) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Tombstoned { - n += 2 - } - if x.MissedBlocksCounter != 0 { - n += 1 + runtime.Sov(uint64(x.MissedBlocksCounter)) - } - 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().(*ValidatorSigningInfo) - 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.MissedBlocksCounter != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MissedBlocksCounter)) - i-- - dAtA[i] = 0x30 - } - if x.Tombstoned { - i-- - if x.Tombstoned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if x.JailedUntil != nil { - encoded, err := options.Marshal(x.JailedUntil) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.IndexOffset != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.IndexOffset)) - i-- - dAtA[i] = 0x18 - } - if x.StartHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartHeight)) - i-- - dAtA[i] = 0x10 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSigningInfo) - 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: ValidatorSigningInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSigningInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - x.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IndexOffset", wireType) - } - x.IndexOffset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.IndexOffset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JailedUntil", 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.JailedUntil == nil { - x.JailedUntil = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.JailedUntil); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tombstoned", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Tombstoned = bool(v != 0) - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MissedBlocksCounter", wireType) - } - x.MissedBlocksCounter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MissedBlocksCounter |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_signed_blocks_window protoreflect.FieldDescriptor - fd_Params_min_signed_per_window protoreflect.FieldDescriptor - fd_Params_downtime_jail_duration protoreflect.FieldDescriptor - fd_Params_slash_fraction_double_sign protoreflect.FieldDescriptor - fd_Params_slash_fraction_downtime protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_slashing_proto_init() - md_Params = File_cosmos_slashing_v1beta1_slashing_proto.Messages().ByName("Params") - fd_Params_signed_blocks_window = md_Params.Fields().ByName("signed_blocks_window") - fd_Params_min_signed_per_window = md_Params.Fields().ByName("min_signed_per_window") - fd_Params_downtime_jail_duration = md_Params.Fields().ByName("downtime_jail_duration") - fd_Params_slash_fraction_double_sign = md_Params.Fields().ByName("slash_fraction_double_sign") - fd_Params_slash_fraction_downtime = md_Params.Fields().ByName("slash_fraction_downtime") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_slashing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SignedBlocksWindow != int64(0) { - value := protoreflect.ValueOfInt64(x.SignedBlocksWindow) - if !f(fd_Params_signed_blocks_window, value) { - return - } - } - if len(x.MinSignedPerWindow) != 0 { - value := protoreflect.ValueOfBytes(x.MinSignedPerWindow) - if !f(fd_Params_min_signed_per_window, value) { - return - } - } - if x.DowntimeJailDuration != nil { - value := protoreflect.ValueOfMessage(x.DowntimeJailDuration.ProtoReflect()) - if !f(fd_Params_downtime_jail_duration, value) { - return - } - } - if len(x.SlashFractionDoubleSign) != 0 { - value := protoreflect.ValueOfBytes(x.SlashFractionDoubleSign) - if !f(fd_Params_slash_fraction_double_sign, value) { - return - } - } - if len(x.SlashFractionDowntime) != 0 { - value := protoreflect.ValueOfBytes(x.SlashFractionDowntime) - if !f(fd_Params_slash_fraction_downtime, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.Params.signed_blocks_window": - return x.SignedBlocksWindow != int64(0) - case "cosmos.slashing.v1beta1.Params.min_signed_per_window": - return len(x.MinSignedPerWindow) != 0 - case "cosmos.slashing.v1beta1.Params.downtime_jail_duration": - return x.DowntimeJailDuration != nil - case "cosmos.slashing.v1beta1.Params.slash_fraction_double_sign": - return len(x.SlashFractionDoubleSign) != 0 - case "cosmos.slashing.v1beta1.Params.slash_fraction_downtime": - return len(x.SlashFractionDowntime) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.Params.signed_blocks_window": - x.SignedBlocksWindow = int64(0) - case "cosmos.slashing.v1beta1.Params.min_signed_per_window": - x.MinSignedPerWindow = nil - case "cosmos.slashing.v1beta1.Params.downtime_jail_duration": - x.DowntimeJailDuration = nil - case "cosmos.slashing.v1beta1.Params.slash_fraction_double_sign": - x.SlashFractionDoubleSign = nil - case "cosmos.slashing.v1beta1.Params.slash_fraction_downtime": - x.SlashFractionDowntime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.Params.signed_blocks_window": - value := x.SignedBlocksWindow - return protoreflect.ValueOfInt64(value) - case "cosmos.slashing.v1beta1.Params.min_signed_per_window": - value := x.MinSignedPerWindow - return protoreflect.ValueOfBytes(value) - case "cosmos.slashing.v1beta1.Params.downtime_jail_duration": - value := x.DowntimeJailDuration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.slashing.v1beta1.Params.slash_fraction_double_sign": - value := x.SlashFractionDoubleSign - return protoreflect.ValueOfBytes(value) - case "cosmos.slashing.v1beta1.Params.slash_fraction_downtime": - value := x.SlashFractionDowntime - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.Params.signed_blocks_window": - x.SignedBlocksWindow = value.Int() - case "cosmos.slashing.v1beta1.Params.min_signed_per_window": - x.MinSignedPerWindow = value.Bytes() - case "cosmos.slashing.v1beta1.Params.downtime_jail_duration": - x.DowntimeJailDuration = value.Message().Interface().(*durationpb.Duration) - case "cosmos.slashing.v1beta1.Params.slash_fraction_double_sign": - x.SlashFractionDoubleSign = value.Bytes() - case "cosmos.slashing.v1beta1.Params.slash_fraction_downtime": - x.SlashFractionDowntime = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.Params.downtime_jail_duration": - if x.DowntimeJailDuration == nil { - x.DowntimeJailDuration = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.DowntimeJailDuration.ProtoReflect()) - case "cosmos.slashing.v1beta1.Params.signed_blocks_window": - panic(fmt.Errorf("field signed_blocks_window of message cosmos.slashing.v1beta1.Params is not mutable")) - case "cosmos.slashing.v1beta1.Params.min_signed_per_window": - panic(fmt.Errorf("field min_signed_per_window of message cosmos.slashing.v1beta1.Params is not mutable")) - case "cosmos.slashing.v1beta1.Params.slash_fraction_double_sign": - panic(fmt.Errorf("field slash_fraction_double_sign of message cosmos.slashing.v1beta1.Params is not mutable")) - case "cosmos.slashing.v1beta1.Params.slash_fraction_downtime": - panic(fmt.Errorf("field slash_fraction_downtime of message cosmos.slashing.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.Params.signed_blocks_window": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.slashing.v1beta1.Params.min_signed_per_window": - return protoreflect.ValueOfBytes(nil) - case "cosmos.slashing.v1beta1.Params.downtime_jail_duration": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.slashing.v1beta1.Params.slash_fraction_double_sign": - return protoreflect.ValueOfBytes(nil) - case "cosmos.slashing.v1beta1.Params.slash_fraction_downtime": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.SignedBlocksWindow != 0 { - n += 1 + runtime.Sov(uint64(x.SignedBlocksWindow)) - } - l = len(x.MinSignedPerWindow) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DowntimeJailDuration != nil { - l = options.Size(x.DowntimeJailDuration) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SlashFractionDoubleSign) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SlashFractionDowntime) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.SlashFractionDowntime) > 0 { - i -= len(x.SlashFractionDowntime) - copy(dAtA[i:], x.SlashFractionDowntime) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SlashFractionDowntime))) - i-- - dAtA[i] = 0x2a - } - if len(x.SlashFractionDoubleSign) > 0 { - i -= len(x.SlashFractionDoubleSign) - copy(dAtA[i:], x.SlashFractionDoubleSign) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SlashFractionDoubleSign))) - i-- - dAtA[i] = 0x22 - } - if x.DowntimeJailDuration != nil { - encoded, err := options.Marshal(x.DowntimeJailDuration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.MinSignedPerWindow) > 0 { - i -= len(x.MinSignedPerWindow) - copy(dAtA[i:], x.MinSignedPerWindow) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSignedPerWindow))) - i-- - dAtA[i] = 0x12 - } - if x.SignedBlocksWindow != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SignedBlocksWindow)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignedBlocksWindow", wireType) - } - x.SignedBlocksWindow = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SignedBlocksWindow |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSignedPerWindow", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinSignedPerWindow = append(x.MinSignedPerWindow[:0], dAtA[iNdEx:postIndex]...) - if x.MinSignedPerWindow == nil { - x.MinSignedPerWindow = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DowntimeJailDuration", 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.DowntimeJailDuration == nil { - x.DowntimeJailDuration = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DowntimeJailDuration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashFractionDoubleSign", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SlashFractionDoubleSign = append(x.SlashFractionDoubleSign[:0], dAtA[iNdEx:postIndex]...) - if x.SlashFractionDoubleSign == nil { - x.SlashFractionDoubleSign = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashFractionDowntime", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SlashFractionDowntime = append(x.SlashFractionDowntime[:0], dAtA[iNdEx:postIndex]...) - if x.SlashFractionDowntime == nil { - x.SlashFractionDowntime = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/slashing/v1beta1/slashing.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ValidatorSigningInfo defines a validator's signing info for monitoring their -// liveness activity. -type ValidatorSigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Height at which validator was first a candidate OR was unjailed - StartHeight int64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - // Index which is incremented each time the validator was a bonded - // in a block and may have signed a precommit or not. This in conjunction with the - // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - IndexOffset int64 `protobuf:"varint,3,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty"` - // Timestamp until which the validator is jailed due to liveness downtime. - JailedUntil *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=jailed_until,json=jailedUntil,proto3" json:"jailed_until,omitempty"` - // Whether or not a validator has been tombstoned (killed out of validator set). It is set - // once the validator commits an equivocation or for any other configured misbehiavor. - Tombstoned bool `protobuf:"varint,5,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` - // A counter kept to avoid unnecessary array reads. - // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - MissedBlocksCounter int64 `protobuf:"varint,6,opt,name=missed_blocks_counter,json=missedBlocksCounter,proto3" json:"missed_blocks_counter,omitempty"` -} - -func (x *ValidatorSigningInfo) Reset() { - *x = ValidatorSigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_slashing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorSigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorSigningInfo) ProtoMessage() {} - -// Deprecated: Use ValidatorSigningInfo.ProtoReflect.Descriptor instead. -func (*ValidatorSigningInfo) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_slashing_proto_rawDescGZIP(), []int{0} -} - -func (x *ValidatorSigningInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ValidatorSigningInfo) GetStartHeight() int64 { - if x != nil { - return x.StartHeight - } - return 0 -} - -func (x *ValidatorSigningInfo) GetIndexOffset() int64 { - if x != nil { - return x.IndexOffset - } - return 0 -} - -func (x *ValidatorSigningInfo) GetJailedUntil() *timestamppb.Timestamp { - if x != nil { - return x.JailedUntil - } - return nil -} - -func (x *ValidatorSigningInfo) GetTombstoned() bool { - if x != nil { - return x.Tombstoned - } - return false -} - -func (x *ValidatorSigningInfo) GetMissedBlocksCounter() int64 { - if x != nil { - return x.MissedBlocksCounter - } - return 0 -} - -// Params represents the parameters used for by the slashing module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"` - MinSignedPerWindow []byte `protobuf:"bytes,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3" json:"min_signed_per_window,omitempty"` - DowntimeJailDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=downtime_jail_duration,json=downtimeJailDuration,proto3" json:"downtime_jail_duration,omitempty"` - SlashFractionDoubleSign []byte `protobuf:"bytes,4,opt,name=slash_fraction_double_sign,json=slashFractionDoubleSign,proto3" json:"slash_fraction_double_sign,omitempty"` - SlashFractionDowntime []byte `protobuf:"bytes,5,opt,name=slash_fraction_downtime,json=slashFractionDowntime,proto3" json:"slash_fraction_downtime,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_slashing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_slashing_proto_rawDescGZIP(), []int{1} -} - -func (x *Params) GetSignedBlocksWindow() int64 { - if x != nil { - return x.SignedBlocksWindow - } - return 0 -} - -func (x *Params) GetMinSignedPerWindow() []byte { - if x != nil { - return x.MinSignedPerWindow - } - return nil -} - -func (x *Params) GetDowntimeJailDuration() *durationpb.Duration { - if x != nil { - return x.DowntimeJailDuration - } - return nil -} - -func (x *Params) GetSlashFractionDoubleSign() []byte { - if x != nil { - return x.SlashFractionDoubleSign - } - return nil -} - -func (x *Params) GetSlashFractionDowntime() []byte { - if x != nil { - return x.SlashFractionDowntime - } - return nil -} - -var File_cosmos_slashing_v1beta1_slashing_proto protoreflect.FileDescriptor - -var file_cosmos_slashing_v1beta1_slashing_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x02, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 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, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x47, 0x0a, 0x0c, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, - 0x1f, 0x01, 0x52, 0x0b, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x12, - 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0a, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x64, 0x12, - 0x32, 0x0a, 0x15, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, - 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xcd, 0x03, - 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x61, 0x0a, 0x15, 0x6d, 0x69, - 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x59, 0x0a, - 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6a, 0x61, 0x69, 0x6c, 0x5f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, - 0x1f, 0x01, 0x52, 0x14, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4a, 0x61, 0x69, 0x6c, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6b, 0x0a, 0x1a, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x2e, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x66, 0x0a, 0x17, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0xf8, 0x01, - 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, - 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_slashing_v1beta1_slashing_proto_rawDescOnce sync.Once - file_cosmos_slashing_v1beta1_slashing_proto_rawDescData = file_cosmos_slashing_v1beta1_slashing_proto_rawDesc -) - -func file_cosmos_slashing_v1beta1_slashing_proto_rawDescGZIP() []byte { - file_cosmos_slashing_v1beta1_slashing_proto_rawDescOnce.Do(func() { - file_cosmos_slashing_v1beta1_slashing_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_slashing_v1beta1_slashing_proto_rawDescData) - }) - return file_cosmos_slashing_v1beta1_slashing_proto_rawDescData -} - -var file_cosmos_slashing_v1beta1_slashing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_slashing_v1beta1_slashing_proto_goTypes = []interface{}{ - (*ValidatorSigningInfo)(nil), // 0: cosmos.slashing.v1beta1.ValidatorSigningInfo - (*Params)(nil), // 1: cosmos.slashing.v1beta1.Params - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration -} -var file_cosmos_slashing_v1beta1_slashing_proto_depIdxs = []int32{ - 2, // 0: cosmos.slashing.v1beta1.ValidatorSigningInfo.jailed_until:type_name -> google.protobuf.Timestamp - 3, // 1: cosmos.slashing.v1beta1.Params.downtime_jail_duration:type_name -> google.protobuf.Duration - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_slashing_v1beta1_slashing_proto_init() } -func file_cosmos_slashing_v1beta1_slashing_proto_init() { - if File_cosmos_slashing_v1beta1_slashing_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_slashing_v1beta1_slashing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_slashing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_slashing_v1beta1_slashing_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_slashing_v1beta1_slashing_proto_goTypes, - DependencyIndexes: file_cosmos_slashing_v1beta1_slashing_proto_depIdxs, - MessageInfos: file_cosmos_slashing_v1beta1_slashing_proto_msgTypes, - }.Build() - File_cosmos_slashing_v1beta1_slashing_proto = out.File - file_cosmos_slashing_v1beta1_slashing_proto_rawDesc = nil - file_cosmos_slashing_v1beta1_slashing_proto_goTypes = nil - file_cosmos_slashing_v1beta1_slashing_proto_depIdxs = nil -} diff --git a/api/cosmos/slashing/v1beta1/tx.pulsar.go b/api/cosmos/slashing/v1beta1/tx.pulsar.go deleted file mode 100644 index ac3a6b811212..000000000000 --- a/api/cosmos/slashing/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,990 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package slashingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgUnjail protoreflect.MessageDescriptor - fd_MsgUnjail_validator_addr protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_tx_proto_init() - md_MsgUnjail = File_cosmos_slashing_v1beta1_tx_proto.Messages().ByName("MsgUnjail") - fd_MsgUnjail_validator_addr = md_MsgUnjail.Fields().ByName("validator_addr") -} - -var _ protoreflect.Message = (*fastReflection_MsgUnjail)(nil) - -type fastReflection_MsgUnjail MsgUnjail - -func (x *MsgUnjail) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUnjail)(x) -} - -func (x *MsgUnjail) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUnjail_messageType fastReflection_MsgUnjail_messageType -var _ protoreflect.MessageType = fastReflection_MsgUnjail_messageType{} - -type fastReflection_MsgUnjail_messageType struct{} - -func (x fastReflection_MsgUnjail_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUnjail)(nil) -} -func (x fastReflection_MsgUnjail_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUnjail) -} -func (x fastReflection_MsgUnjail_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUnjail -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUnjail) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUnjail -} - -// 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_MsgUnjail) Type() protoreflect.MessageType { - return _fastReflection_MsgUnjail_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUnjail) New() protoreflect.Message { - return new(fastReflection_MsgUnjail) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUnjail) Interface() protoreflect.ProtoMessage { - return (*MsgUnjail)(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_MsgUnjail) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_MsgUnjail_validator_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUnjail) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MsgUnjail.validator_addr": - return x.ValidatorAddr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjail")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjail 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_MsgUnjail) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MsgUnjail.validator_addr": - x.ValidatorAddr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjail")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjail 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_MsgUnjail) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.slashing.v1beta1.MsgUnjail.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjail")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjail 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_MsgUnjail) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MsgUnjail.validator_addr": - x.ValidatorAddr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjail")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjail 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_MsgUnjail) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MsgUnjail.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.slashing.v1beta1.MsgUnjail is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjail")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjail 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_MsgUnjail) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.slashing.v1beta1.MsgUnjail.validator_addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjail")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjail 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_MsgUnjail) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.MsgUnjail", 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_MsgUnjail) 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_MsgUnjail) 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_MsgUnjail) 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_MsgUnjail) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUnjail) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUnjail) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUnjail) - 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: MsgUnjail: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnjail: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUnjailResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_slashing_v1beta1_tx_proto_init() - md_MsgUnjailResponse = File_cosmos_slashing_v1beta1_tx_proto.Messages().ByName("MsgUnjailResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUnjailResponse)(nil) - -type fastReflection_MsgUnjailResponse MsgUnjailResponse - -func (x *MsgUnjailResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUnjailResponse)(x) -} - -func (x *MsgUnjailResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_slashing_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUnjailResponse_messageType fastReflection_MsgUnjailResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUnjailResponse_messageType{} - -type fastReflection_MsgUnjailResponse_messageType struct{} - -func (x fastReflection_MsgUnjailResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUnjailResponse)(nil) -} -func (x fastReflection_MsgUnjailResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUnjailResponse) -} -func (x fastReflection_MsgUnjailResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUnjailResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUnjailResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUnjailResponse -} - -// 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_MsgUnjailResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUnjailResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUnjailResponse) New() protoreflect.Message { - return new(fastReflection_MsgUnjailResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUnjailResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUnjailResponse)(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_MsgUnjailResponse) 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_MsgUnjailResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjailResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjailResponse 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_MsgUnjailResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjailResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjailResponse 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_MsgUnjailResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjailResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjailResponse 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_MsgUnjailResponse) 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.slashing.v1beta1.MsgUnjailResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjailResponse 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_MsgUnjailResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjailResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjailResponse 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_MsgUnjailResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.slashing.v1beta1.MsgUnjailResponse")) - } - panic(fmt.Errorf("message cosmos.slashing.v1beta1.MsgUnjailResponse 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_MsgUnjailResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.slashing.v1beta1.MsgUnjailResponse", 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_MsgUnjailResponse) 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_MsgUnjailResponse) 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_MsgUnjailResponse) 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_MsgUnjailResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUnjailResponse) - 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().(*MsgUnjailResponse) - 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().(*MsgUnjailResponse) - 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: MsgUnjailResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnjailResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/slashing/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgUnjail defines the Msg/Unjail request type -type MsgUnjail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` -} - -func (x *MsgUnjail) Reset() { - *x = MsgUnjail{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUnjail) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUnjail) ProtoMessage() {} - -// Deprecated: Use MsgUnjail.ProtoReflect.Descriptor instead. -func (*MsgUnjail) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgUnjail) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -// MsgUnjailResponse defines the Msg/Unjail response type -type MsgUnjailResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUnjailResponse) Reset() { - *x = MsgUnjailResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_slashing_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUnjailResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUnjailResponse) ProtoMessage() {} - -// Deprecated: Use MsgUnjailResponse.ProtoReflect.Descriptor instead. -func (*MsgUnjailResponse) Descriptor() ([]byte, []int) { - return file_cosmos_slashing_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -var File_cosmos_slashing_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_slashing_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6a, 0x61, - 0x69, 0x6c, 0x12, 0x4a, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xea, 0xde, 0x1f, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, - 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x1b, - 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x0e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, - 0x73, 0x67, 0x55, 0x6e, 0x6a, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0x5f, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x58, 0x0a, 0x06, 0x55, 0x6e, 0x6a, 0x61, 0x69, - 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x6e, 0x6a, 0x61, 0x69, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6a, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xf2, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x17, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_slashing_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_slashing_v1beta1_tx_proto_rawDescData = file_cosmos_slashing_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_slashing_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_slashing_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_slashing_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_slashing_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_slashing_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_slashing_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_slashing_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgUnjail)(nil), // 0: cosmos.slashing.v1beta1.MsgUnjail - (*MsgUnjailResponse)(nil), // 1: cosmos.slashing.v1beta1.MsgUnjailResponse -} -var file_cosmos_slashing_v1beta1_tx_proto_depIdxs = []int32{ - 0, // 0: cosmos.slashing.v1beta1.Msg.Unjail:input_type -> cosmos.slashing.v1beta1.MsgUnjail - 1, // 1: cosmos.slashing.v1beta1.Msg.Unjail:output_type -> cosmos.slashing.v1beta1.MsgUnjailResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cosmos_slashing_v1beta1_tx_proto_init() } -func file_cosmos_slashing_v1beta1_tx_proto_init() { - if File_cosmos_slashing_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_slashing_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUnjail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_slashing_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUnjailResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_slashing_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_slashing_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_slashing_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_slashing_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_slashing_v1beta1_tx_proto = out.File - file_cosmos_slashing_v1beta1_tx_proto_rawDesc = nil - file_cosmos_slashing_v1beta1_tx_proto_goTypes = nil - file_cosmos_slashing_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/slashing/v1beta1/tx_grpc.pb.go b/api/cosmos/slashing/v1beta1/tx_grpc.pb.go deleted file mode 100644 index e3a9756f3310..000000000000 --- a/api/cosmos/slashing/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/slashing/v1beta1/tx.proto - -package slashingv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // Unjail defines a method for unjailing a jailed validator, thus returning - // them into the bonded validator set, so they can begin receiving provisions - // and rewards again. - Unjail(ctx context.Context, in *MsgUnjail, opts ...grpc.CallOption) (*MsgUnjailResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) Unjail(ctx context.Context, in *MsgUnjail, opts ...grpc.CallOption) (*MsgUnjailResponse, error) { - out := new(MsgUnjailResponse) - err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Msg/Unjail", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // Unjail defines a method for unjailing a jailed validator, thus returning - // them into the bonded validator set, so they can begin receiving provisions - // and rewards again. - Unjail(context.Context, *MsgUnjail) (*MsgUnjailResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) Unjail(context.Context, *MsgUnjail) (*MsgUnjailResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Unjail not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_Unjail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUnjail) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Unjail(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.slashing.v1beta1.Msg/Unjail", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Unjail(ctx, req.(*MsgUnjail)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.slashing.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Unjail", - Handler: _Msg_Unjail_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/slashing/v1beta1/tx.proto", -} diff --git a/api/cosmos/staking/v1beta1/authz.pulsar.go b/api/cosmos/staking/v1beta1/authz.pulsar.go deleted file mode 100644 index 9c7fd6d84029..000000000000 --- a/api/cosmos/staking/v1beta1/authz.pulsar.go +++ /dev/null @@ -1,1562 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_StakeAuthorization protoreflect.MessageDescriptor - fd_StakeAuthorization_max_tokens protoreflect.FieldDescriptor - fd_StakeAuthorization_allow_list protoreflect.FieldDescriptor - fd_StakeAuthorization_deny_list protoreflect.FieldDescriptor - fd_StakeAuthorization_authorization_type protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_authz_proto_init() - md_StakeAuthorization = File_cosmos_staking_v1beta1_authz_proto.Messages().ByName("StakeAuthorization") - fd_StakeAuthorization_max_tokens = md_StakeAuthorization.Fields().ByName("max_tokens") - fd_StakeAuthorization_allow_list = md_StakeAuthorization.Fields().ByName("allow_list") - fd_StakeAuthorization_deny_list = md_StakeAuthorization.Fields().ByName("deny_list") - fd_StakeAuthorization_authorization_type = md_StakeAuthorization.Fields().ByName("authorization_type") -} - -var _ protoreflect.Message = (*fastReflection_StakeAuthorization)(nil) - -type fastReflection_StakeAuthorization StakeAuthorization - -func (x *StakeAuthorization) ProtoReflect() protoreflect.Message { - return (*fastReflection_StakeAuthorization)(x) -} - -func (x *StakeAuthorization) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_authz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StakeAuthorization_messageType fastReflection_StakeAuthorization_messageType -var _ protoreflect.MessageType = fastReflection_StakeAuthorization_messageType{} - -type fastReflection_StakeAuthorization_messageType struct{} - -func (x fastReflection_StakeAuthorization_messageType) Zero() protoreflect.Message { - return (*fastReflection_StakeAuthorization)(nil) -} -func (x fastReflection_StakeAuthorization_messageType) New() protoreflect.Message { - return new(fastReflection_StakeAuthorization) -} -func (x fastReflection_StakeAuthorization_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StakeAuthorization -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StakeAuthorization) Descriptor() protoreflect.MessageDescriptor { - return md_StakeAuthorization -} - -// 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_StakeAuthorization) Type() protoreflect.MessageType { - return _fastReflection_StakeAuthorization_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StakeAuthorization) New() protoreflect.Message { - return new(fastReflection_StakeAuthorization) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StakeAuthorization) Interface() protoreflect.ProtoMessage { - return (*StakeAuthorization)(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_StakeAuthorization) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MaxTokens != nil { - value := protoreflect.ValueOfMessage(x.MaxTokens.ProtoReflect()) - if !f(fd_StakeAuthorization_max_tokens, value) { - return - } - } - if x.Validators != nil { - switch o := x.Validators.(type) { - case *StakeAuthorization_AllowList: - v := o.AllowList - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_StakeAuthorization_allow_list, value) { - return - } - case *StakeAuthorization_DenyList: - v := o.DenyList - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_StakeAuthorization_deny_list, value) { - return - } - } - } - if x.AuthorizationType != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.AuthorizationType)) - if !f(fd_StakeAuthorization_authorization_type, 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_StakeAuthorization) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.max_tokens": - return x.MaxTokens != nil - case "cosmos.staking.v1beta1.StakeAuthorization.allow_list": - if x.Validators == nil { - return false - } else if _, ok := x.Validators.(*StakeAuthorization_AllowList); ok { - return true - } else { - return false - } - case "cosmos.staking.v1beta1.StakeAuthorization.deny_list": - if x.Validators == nil { - return false - } else if _, ok := x.Validators.(*StakeAuthorization_DenyList); ok { - return true - } else { - return false - } - case "cosmos.staking.v1beta1.StakeAuthorization.authorization_type": - return x.AuthorizationType != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization 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_StakeAuthorization) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.max_tokens": - x.MaxTokens = nil - case "cosmos.staking.v1beta1.StakeAuthorization.allow_list": - x.Validators = nil - case "cosmos.staking.v1beta1.StakeAuthorization.deny_list": - x.Validators = nil - case "cosmos.staking.v1beta1.StakeAuthorization.authorization_type": - x.AuthorizationType = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization 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_StakeAuthorization) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.max_tokens": - value := x.MaxTokens - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.StakeAuthorization.allow_list": - if x.Validators == nil { - return protoreflect.ValueOfMessage((*StakeAuthorization_Validators)(nil).ProtoReflect()) - } else if v, ok := x.Validators.(*StakeAuthorization_AllowList); ok { - return protoreflect.ValueOfMessage(v.AllowList.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*StakeAuthorization_Validators)(nil).ProtoReflect()) - } - case "cosmos.staking.v1beta1.StakeAuthorization.deny_list": - if x.Validators == nil { - return protoreflect.ValueOfMessage((*StakeAuthorization_Validators)(nil).ProtoReflect()) - } else if v, ok := x.Validators.(*StakeAuthorization_DenyList); ok { - return protoreflect.ValueOfMessage(v.DenyList.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*StakeAuthorization_Validators)(nil).ProtoReflect()) - } - case "cosmos.staking.v1beta1.StakeAuthorization.authorization_type": - value := x.AuthorizationType - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization 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_StakeAuthorization) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.max_tokens": - x.MaxTokens = value.Message().Interface().(*v1beta1.Coin) - case "cosmos.staking.v1beta1.StakeAuthorization.allow_list": - cv := value.Message().Interface().(*StakeAuthorization_Validators) - x.Validators = &StakeAuthorization_AllowList{AllowList: cv} - case "cosmos.staking.v1beta1.StakeAuthorization.deny_list": - cv := value.Message().Interface().(*StakeAuthorization_Validators) - x.Validators = &StakeAuthorization_DenyList{DenyList: cv} - case "cosmos.staking.v1beta1.StakeAuthorization.authorization_type": - x.AuthorizationType = (AuthorizationType)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization 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_StakeAuthorization) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.max_tokens": - if x.MaxTokens == nil { - x.MaxTokens = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.MaxTokens.ProtoReflect()) - case "cosmos.staking.v1beta1.StakeAuthorization.allow_list": - if x.Validators == nil { - value := &StakeAuthorization_Validators{} - oneofValue := &StakeAuthorization_AllowList{AllowList: value} - x.Validators = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Validators.(type) { - case *StakeAuthorization_AllowList: - return protoreflect.ValueOfMessage(m.AllowList.ProtoReflect()) - default: - value := &StakeAuthorization_Validators{} - oneofValue := &StakeAuthorization_AllowList{AllowList: value} - x.Validators = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.staking.v1beta1.StakeAuthorization.deny_list": - if x.Validators == nil { - value := &StakeAuthorization_Validators{} - oneofValue := &StakeAuthorization_DenyList{DenyList: value} - x.Validators = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Validators.(type) { - case *StakeAuthorization_DenyList: - return protoreflect.ValueOfMessage(m.DenyList.ProtoReflect()) - default: - value := &StakeAuthorization_Validators{} - oneofValue := &StakeAuthorization_DenyList{DenyList: value} - x.Validators = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.staking.v1beta1.StakeAuthorization.authorization_type": - panic(fmt.Errorf("field authorization_type of message cosmos.staking.v1beta1.StakeAuthorization is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization 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_StakeAuthorization) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.max_tokens": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.StakeAuthorization.allow_list": - value := &StakeAuthorization_Validators{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.StakeAuthorization.deny_list": - value := &StakeAuthorization_Validators{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.StakeAuthorization.authorization_type": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization 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_StakeAuthorization) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.validators": - if x.Validators == nil { - return nil - } - switch x.Validators.(type) { - case *StakeAuthorization_AllowList: - return x.Descriptor().Fields().ByName("allow_list") - case *StakeAuthorization_DenyList: - return x.Descriptor().Fields().ByName("deny_list") - } - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.StakeAuthorization", 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_StakeAuthorization) 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_StakeAuthorization) 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_StakeAuthorization) 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_StakeAuthorization) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StakeAuthorization) - 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.MaxTokens != nil { - l = options.Size(x.MaxTokens) - n += 1 + l + runtime.Sov(uint64(l)) - } - switch x := x.Validators.(type) { - case *StakeAuthorization_AllowList: - if x == nil { - break - } - l = options.Size(x.AllowList) - n += 1 + l + runtime.Sov(uint64(l)) - case *StakeAuthorization_DenyList: - if x == nil { - break - } - l = options.Size(x.DenyList) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AuthorizationType != 0 { - n += 1 + runtime.Sov(uint64(x.AuthorizationType)) - } - 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().(*StakeAuthorization) - 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) - } - switch x := x.Validators.(type) { - case *StakeAuthorization_AllowList: - encoded, err := options.Marshal(x.AllowList) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - case *StakeAuthorization_DenyList: - encoded, err := options.Marshal(x.DenyList) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.AuthorizationType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AuthorizationType)) - i-- - dAtA[i] = 0x20 - } - if x.MaxTokens != nil { - encoded, err := options.Marshal(x.MaxTokens) - 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().(*StakeAuthorization) - 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: StakeAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StakeAuthorization: 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 MaxTokens", 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.MaxTokens == nil { - x.MaxTokens = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxTokens); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowList", 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 - } - v := &StakeAuthorization_Validators{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Validators = &StakeAuthorization_AllowList{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DenyList", 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 - } - v := &StakeAuthorization_Validators{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Validators = &StakeAuthorization_DenyList{v} - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthorizationType", wireType) - } - x.AuthorizationType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AuthorizationType |= AuthorizationType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_StakeAuthorization_Validators_1_list)(nil) - -type _StakeAuthorization_Validators_1_list struct { - list *[]string -} - -func (x *_StakeAuthorization_Validators_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_StakeAuthorization_Validators_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_StakeAuthorization_Validators_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_StakeAuthorization_Validators_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_StakeAuthorization_Validators_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message StakeAuthorization_Validators at list field Address as it is not of Message kind")) -} - -func (x *_StakeAuthorization_Validators_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_StakeAuthorization_Validators_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_StakeAuthorization_Validators_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_StakeAuthorization_Validators protoreflect.MessageDescriptor - fd_StakeAuthorization_Validators_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_authz_proto_init() - md_StakeAuthorization_Validators = File_cosmos_staking_v1beta1_authz_proto.Messages().ByName("StakeAuthorization").Messages().ByName("Validators") - fd_StakeAuthorization_Validators_address = md_StakeAuthorization_Validators.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_StakeAuthorization_Validators)(nil) - -type fastReflection_StakeAuthorization_Validators StakeAuthorization_Validators - -func (x *StakeAuthorization_Validators) ProtoReflect() protoreflect.Message { - return (*fastReflection_StakeAuthorization_Validators)(x) -} - -func (x *StakeAuthorization_Validators) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_authz_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StakeAuthorization_Validators_messageType fastReflection_StakeAuthorization_Validators_messageType -var _ protoreflect.MessageType = fastReflection_StakeAuthorization_Validators_messageType{} - -type fastReflection_StakeAuthorization_Validators_messageType struct{} - -func (x fastReflection_StakeAuthorization_Validators_messageType) Zero() protoreflect.Message { - return (*fastReflection_StakeAuthorization_Validators)(nil) -} -func (x fastReflection_StakeAuthorization_Validators_messageType) New() protoreflect.Message { - return new(fastReflection_StakeAuthorization_Validators) -} -func (x fastReflection_StakeAuthorization_Validators_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StakeAuthorization_Validators -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StakeAuthorization_Validators) Descriptor() protoreflect.MessageDescriptor { - return md_StakeAuthorization_Validators -} - -// 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_StakeAuthorization_Validators) Type() protoreflect.MessageType { - return _fastReflection_StakeAuthorization_Validators_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StakeAuthorization_Validators) New() protoreflect.Message { - return new(fastReflection_StakeAuthorization_Validators) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StakeAuthorization_Validators) Interface() protoreflect.ProtoMessage { - return (*StakeAuthorization_Validators)(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_StakeAuthorization_Validators) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Address) != 0 { - value := protoreflect.ValueOfList(&_StakeAuthorization_Validators_1_list{list: &x.Address}) - if !f(fd_StakeAuthorization_Validators_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_StakeAuthorization_Validators) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.Validators.address": - return len(x.Address) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization.Validators")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization.Validators 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_StakeAuthorization_Validators) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.Validators.address": - x.Address = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization.Validators")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization.Validators 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_StakeAuthorization_Validators) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.Validators.address": - if len(x.Address) == 0 { - return protoreflect.ValueOfList(&_StakeAuthorization_Validators_1_list{}) - } - listValue := &_StakeAuthorization_Validators_1_list{list: &x.Address} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization.Validators")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization.Validators 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_StakeAuthorization_Validators) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.Validators.address": - lv := value.List() - clv := lv.(*_StakeAuthorization_Validators_1_list) - x.Address = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization.Validators")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization.Validators 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_StakeAuthorization_Validators) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.Validators.address": - if x.Address == nil { - x.Address = []string{} - } - value := &_StakeAuthorization_Validators_1_list{list: &x.Address} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization.Validators")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization.Validators 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_StakeAuthorization_Validators) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.StakeAuthorization.Validators.address": - list := []string{} - return protoreflect.ValueOfList(&_StakeAuthorization_Validators_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.StakeAuthorization.Validators")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.StakeAuthorization.Validators 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_StakeAuthorization_Validators) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.StakeAuthorization.Validators", 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_StakeAuthorization_Validators) 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_StakeAuthorization_Validators) 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_StakeAuthorization_Validators) 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_StakeAuthorization_Validators) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StakeAuthorization_Validators) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Address) > 0 { - for _, s := range x.Address { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*StakeAuthorization_Validators) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - for iNdEx := len(x.Address) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Address[iNdEx]) - copy(dAtA[i:], x.Address[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*StakeAuthorization_Validators) - 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: StakeAuthorization_Validators: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StakeAuthorization_Validators: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = append(x.Address, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/staking/v1beta1/authz.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// AuthorizationType defines the type of staking module authorization type -// -// Since: cosmos-sdk 0.43 -type AuthorizationType int32 - -const ( - // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - AuthorizationType_AUTHORIZATION_TYPE_UNSPECIFIED AuthorizationType = 0 - // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - AuthorizationType_AUTHORIZATION_TYPE_DELEGATE AuthorizationType = 1 - // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE AuthorizationType = 2 - // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE AuthorizationType = 3 -) - -// Enum value maps for AuthorizationType. -var ( - AuthorizationType_name = map[int32]string{ - 0: "AUTHORIZATION_TYPE_UNSPECIFIED", - 1: "AUTHORIZATION_TYPE_DELEGATE", - 2: "AUTHORIZATION_TYPE_UNDELEGATE", - 3: "AUTHORIZATION_TYPE_REDELEGATE", - } - AuthorizationType_value = map[string]int32{ - "AUTHORIZATION_TYPE_UNSPECIFIED": 0, - "AUTHORIZATION_TYPE_DELEGATE": 1, - "AUTHORIZATION_TYPE_UNDELEGATE": 2, - "AUTHORIZATION_TYPE_REDELEGATE": 3, - } -) - -func (x AuthorizationType) Enum() *AuthorizationType { - p := new(AuthorizationType) - *p = x - return p -} - -func (x AuthorizationType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AuthorizationType) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_staking_v1beta1_authz_proto_enumTypes[0].Descriptor() -} - -func (AuthorizationType) Type() protoreflect.EnumType { - return &file_cosmos_staking_v1beta1_authz_proto_enumTypes[0] -} - -func (x AuthorizationType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AuthorizationType.Descriptor instead. -func (AuthorizationType) EnumDescriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_authz_proto_rawDescGZIP(), []int{0} -} - -// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -// -// Since: cosmos-sdk 0.43 -type StakeAuthorization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - // empty, there is no spend limit and any amount of coins can be delegated. - MaxTokens *v1beta1.Coin `protobuf:"bytes,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` - // validators is the oneof that represents either allow_list or deny_list - // - // Types that are assignable to Validators: - // *StakeAuthorization_AllowList - // *StakeAuthorization_DenyList - Validators isStakeAuthorization_Validators `protobuf_oneof:"validators"` - // authorization_type defines one of AuthorizationType. - AuthorizationType AuthorizationType `protobuf:"varint,4,opt,name=authorization_type,json=authorizationType,proto3,enum=cosmos.staking.v1beta1.AuthorizationType" json:"authorization_type,omitempty"` -} - -func (x *StakeAuthorization) Reset() { - *x = StakeAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_authz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StakeAuthorization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StakeAuthorization) ProtoMessage() {} - -// Deprecated: Use StakeAuthorization.ProtoReflect.Descriptor instead. -func (*StakeAuthorization) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_authz_proto_rawDescGZIP(), []int{0} -} - -func (x *StakeAuthorization) GetMaxTokens() *v1beta1.Coin { - if x != nil { - return x.MaxTokens - } - return nil -} - -func (x *StakeAuthorization) GetValidators() isStakeAuthorization_Validators { - if x != nil { - return x.Validators - } - return nil -} - -func (x *StakeAuthorization) GetAllowList() *StakeAuthorization_Validators { - if x, ok := x.GetValidators().(*StakeAuthorization_AllowList); ok { - return x.AllowList - } - return nil -} - -func (x *StakeAuthorization) GetDenyList() *StakeAuthorization_Validators { - if x, ok := x.GetValidators().(*StakeAuthorization_DenyList); ok { - return x.DenyList - } - return nil -} - -func (x *StakeAuthorization) GetAuthorizationType() AuthorizationType { - if x != nil { - return x.AuthorizationType - } - return AuthorizationType_AUTHORIZATION_TYPE_UNSPECIFIED -} - -type isStakeAuthorization_Validators interface { - isStakeAuthorization_Validators() -} - -type StakeAuthorization_AllowList struct { - // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - // account. - AllowList *StakeAuthorization_Validators `protobuf:"bytes,2,opt,name=allow_list,json=allowList,proto3,oneof"` -} - -type StakeAuthorization_DenyList struct { - // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - DenyList *StakeAuthorization_Validators `protobuf:"bytes,3,opt,name=deny_list,json=denyList,proto3,oneof"` -} - -func (*StakeAuthorization_AllowList) isStakeAuthorization_Validators() {} - -func (*StakeAuthorization_DenyList) isStakeAuthorization_Validators() {} - -// Validators defines list of validator addresses. -type StakeAuthorization_Validators struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address []string `protobuf:"bytes,1,rep,name=address,proto3" json:"address,omitempty"` -} - -func (x *StakeAuthorization_Validators) Reset() { - *x = StakeAuthorization_Validators{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_authz_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StakeAuthorization_Validators) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StakeAuthorization_Validators) ProtoMessage() {} - -// Deprecated: Use StakeAuthorization_Validators.ProtoReflect.Descriptor instead. -func (*StakeAuthorization_Validators) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_authz_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *StakeAuthorization_Validators) GetAddress() []string { - if x != nil { - return x.Address - } - return nil -} - -var File_cosmos_staking_v1beta1_authz_proto protoreflect.FileDescriptor - -var file_cosmos_staking_v1beta1_authz_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x03, - 0x0a, 0x12, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x2b, 0xaa, 0xdf, 0x1f, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x56, 0x0a, 0x0a, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x09, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x00, 0x52, - 0x08, 0x64, 0x65, 0x6e, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x12, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x1a, 0x40, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, - 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, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2a, 0x9e, 0x01, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x1e, - 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x45, 0x10, - 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, - 0x54, 0x45, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x44, 0x45, 0x4c, - 0x45, 0x47, 0x41, 0x54, 0x45, 0x10, 0x03, 0x42, 0xea, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_staking_v1beta1_authz_proto_rawDescOnce sync.Once - file_cosmos_staking_v1beta1_authz_proto_rawDescData = file_cosmos_staking_v1beta1_authz_proto_rawDesc -) - -func file_cosmos_staking_v1beta1_authz_proto_rawDescGZIP() []byte { - file_cosmos_staking_v1beta1_authz_proto_rawDescOnce.Do(func() { - file_cosmos_staking_v1beta1_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_staking_v1beta1_authz_proto_rawDescData) - }) - return file_cosmos_staking_v1beta1_authz_proto_rawDescData -} - -var file_cosmos_staking_v1beta1_authz_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_staking_v1beta1_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_staking_v1beta1_authz_proto_goTypes = []interface{}{ - (AuthorizationType)(0), // 0: cosmos.staking.v1beta1.AuthorizationType - (*StakeAuthorization)(nil), // 1: cosmos.staking.v1beta1.StakeAuthorization - (*StakeAuthorization_Validators)(nil), // 2: cosmos.staking.v1beta1.StakeAuthorization.Validators - (*v1beta1.Coin)(nil), // 3: cosmos.base.v1beta1.Coin -} -var file_cosmos_staking_v1beta1_authz_proto_depIdxs = []int32{ - 3, // 0: cosmos.staking.v1beta1.StakeAuthorization.max_tokens:type_name -> cosmos.base.v1beta1.Coin - 2, // 1: cosmos.staking.v1beta1.StakeAuthorization.allow_list:type_name -> cosmos.staking.v1beta1.StakeAuthorization.Validators - 2, // 2: cosmos.staking.v1beta1.StakeAuthorization.deny_list:type_name -> cosmos.staking.v1beta1.StakeAuthorization.Validators - 0, // 3: cosmos.staking.v1beta1.StakeAuthorization.authorization_type:type_name -> cosmos.staking.v1beta1.AuthorizationType - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_cosmos_staking_v1beta1_authz_proto_init() } -func file_cosmos_staking_v1beta1_authz_proto_init() { - if File_cosmos_staking_v1beta1_authz_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_staking_v1beta1_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakeAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_authz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakeAuthorization_Validators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cosmos_staking_v1beta1_authz_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*StakeAuthorization_AllowList)(nil), - (*StakeAuthorization_DenyList)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_staking_v1beta1_authz_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_staking_v1beta1_authz_proto_goTypes, - DependencyIndexes: file_cosmos_staking_v1beta1_authz_proto_depIdxs, - EnumInfos: file_cosmos_staking_v1beta1_authz_proto_enumTypes, - MessageInfos: file_cosmos_staking_v1beta1_authz_proto_msgTypes, - }.Build() - File_cosmos_staking_v1beta1_authz_proto = out.File - file_cosmos_staking_v1beta1_authz_proto_rawDesc = nil - file_cosmos_staking_v1beta1_authz_proto_goTypes = nil - file_cosmos_staking_v1beta1_authz_proto_depIdxs = nil -} diff --git a/api/cosmos/staking/v1beta1/genesis.pulsar.go b/api/cosmos/staking/v1beta1/genesis.pulsar.go deleted file mode 100644 index e2131703420a..000000000000 --- a/api/cosmos/staking/v1beta1/genesis.pulsar.go +++ /dev/null @@ -1,2052 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*LastValidatorPower -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LastValidatorPower) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LastValidatorPower) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(LastValidatorPower) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(LastValidatorPower) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_4_list)(nil) - -type _GenesisState_4_list struct { - list *[]*Validator -} - -func (x *_GenesisState_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_4_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_5_list)(nil) - -type _GenesisState_5_list struct { - list *[]*Delegation -} - -func (x *_GenesisState_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Delegation) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Delegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { - v := new(Delegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_5_list) NewElement() protoreflect.Value { - v := new(Delegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_6_list)(nil) - -type _GenesisState_6_list struct { - list *[]*UnbondingDelegation -} - -func (x *_GenesisState_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegation) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { - v := new(UnbondingDelegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_6_list) NewElement() protoreflect.Value { - v := new(UnbondingDelegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_7_list)(nil) - -type _GenesisState_7_list struct { - list *[]*Redelegation -} - -func (x *_GenesisState_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Redelegation) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Redelegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { - v := new(Redelegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_7_list) NewElement() protoreflect.Value { - v := new(Redelegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_last_total_power protoreflect.FieldDescriptor - fd_GenesisState_last_validator_powers protoreflect.FieldDescriptor - fd_GenesisState_validators protoreflect.FieldDescriptor - fd_GenesisState_delegations protoreflect.FieldDescriptor - fd_GenesisState_unbonding_delegations protoreflect.FieldDescriptor - fd_GenesisState_redelegations protoreflect.FieldDescriptor - fd_GenesisState_exported protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_genesis_proto_init() - md_GenesisState = File_cosmos_staking_v1beta1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_last_total_power = md_GenesisState.Fields().ByName("last_total_power") - fd_GenesisState_last_validator_powers = md_GenesisState.Fields().ByName("last_validator_powers") - fd_GenesisState_validators = md_GenesisState.Fields().ByName("validators") - fd_GenesisState_delegations = md_GenesisState.Fields().ByName("delegations") - fd_GenesisState_unbonding_delegations = md_GenesisState.Fields().ByName("unbonding_delegations") - fd_GenesisState_redelegations = md_GenesisState.Fields().ByName("redelegations") - fd_GenesisState_exported = md_GenesisState.Fields().ByName("exported") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if len(x.LastTotalPower) != 0 { - value := protoreflect.ValueOfBytes(x.LastTotalPower) - if !f(fd_GenesisState_last_total_power, value) { - return - } - } - if len(x.LastValidatorPowers) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.LastValidatorPowers}) - if !f(fd_GenesisState_last_validator_powers, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Validators}) - if !f(fd_GenesisState_validators, value) { - return - } - } - if len(x.Delegations) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.Delegations}) - if !f(fd_GenesisState_delegations, value) { - return - } - } - if len(x.UnbondingDelegations) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.UnbondingDelegations}) - if !f(fd_GenesisState_unbonding_delegations, value) { - return - } - } - if len(x.Redelegations) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.Redelegations}) - if !f(fd_GenesisState_redelegations, value) { - return - } - } - if x.Exported != false { - value := protoreflect.ValueOfBool(x.Exported) - if !f(fd_GenesisState_exported, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.GenesisState.params": - return x.Params != nil - case "cosmos.staking.v1beta1.GenesisState.last_total_power": - return len(x.LastTotalPower) != 0 - case "cosmos.staking.v1beta1.GenesisState.last_validator_powers": - return len(x.LastValidatorPowers) != 0 - case "cosmos.staking.v1beta1.GenesisState.validators": - return len(x.Validators) != 0 - case "cosmos.staking.v1beta1.GenesisState.delegations": - return len(x.Delegations) != 0 - case "cosmos.staking.v1beta1.GenesisState.unbonding_delegations": - return len(x.UnbondingDelegations) != 0 - case "cosmos.staking.v1beta1.GenesisState.redelegations": - return len(x.Redelegations) != 0 - case "cosmos.staking.v1beta1.GenesisState.exported": - return x.Exported != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.GenesisState.params": - x.Params = nil - case "cosmos.staking.v1beta1.GenesisState.last_total_power": - x.LastTotalPower = nil - case "cosmos.staking.v1beta1.GenesisState.last_validator_powers": - x.LastValidatorPowers = nil - case "cosmos.staking.v1beta1.GenesisState.validators": - x.Validators = nil - case "cosmos.staking.v1beta1.GenesisState.delegations": - x.Delegations = nil - case "cosmos.staking.v1beta1.GenesisState.unbonding_delegations": - x.UnbondingDelegations = nil - case "cosmos.staking.v1beta1.GenesisState.redelegations": - x.Redelegations = nil - case "cosmos.staking.v1beta1.GenesisState.exported": - x.Exported = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.GenesisState.last_total_power": - value := x.LastTotalPower - return protoreflect.ValueOfBytes(value) - case "cosmos.staking.v1beta1.GenesisState.last_validator_powers": - if len(x.LastValidatorPowers) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.LastValidatorPowers} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.GenesisState.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_GenesisState_4_list{}) - } - listValue := &_GenesisState_4_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.GenesisState.delegations": - if len(x.Delegations) == 0 { - return protoreflect.ValueOfList(&_GenesisState_5_list{}) - } - listValue := &_GenesisState_5_list{list: &x.Delegations} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.GenesisState.unbonding_delegations": - if len(x.UnbondingDelegations) == 0 { - return protoreflect.ValueOfList(&_GenesisState_6_list{}) - } - listValue := &_GenesisState_6_list{list: &x.UnbondingDelegations} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.GenesisState.redelegations": - if len(x.Redelegations) == 0 { - return protoreflect.ValueOfList(&_GenesisState_7_list{}) - } - listValue := &_GenesisState_7_list{list: &x.Redelegations} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.GenesisState.exported": - value := x.Exported - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "cosmos.staking.v1beta1.GenesisState.last_total_power": - x.LastTotalPower = value.Bytes() - case "cosmos.staking.v1beta1.GenesisState.last_validator_powers": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.LastValidatorPowers = *clv.list - case "cosmos.staking.v1beta1.GenesisState.validators": - lv := value.List() - clv := lv.(*_GenesisState_4_list) - x.Validators = *clv.list - case "cosmos.staking.v1beta1.GenesisState.delegations": - lv := value.List() - clv := lv.(*_GenesisState_5_list) - x.Delegations = *clv.list - case "cosmos.staking.v1beta1.GenesisState.unbonding_delegations": - lv := value.List() - clv := lv.(*_GenesisState_6_list) - x.UnbondingDelegations = *clv.list - case "cosmos.staking.v1beta1.GenesisState.redelegations": - lv := value.List() - clv := lv.(*_GenesisState_7_list) - x.Redelegations = *clv.list - case "cosmos.staking.v1beta1.GenesisState.exported": - x.Exported = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "cosmos.staking.v1beta1.GenesisState.last_validator_powers": - if x.LastValidatorPowers == nil { - x.LastValidatorPowers = []*LastValidatorPower{} - } - value := &_GenesisState_3_list{list: &x.LastValidatorPowers} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.GenesisState.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_GenesisState_4_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.GenesisState.delegations": - if x.Delegations == nil { - x.Delegations = []*Delegation{} - } - value := &_GenesisState_5_list{list: &x.Delegations} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.GenesisState.unbonding_delegations": - if x.UnbondingDelegations == nil { - x.UnbondingDelegations = []*UnbondingDelegation{} - } - value := &_GenesisState_6_list{list: &x.UnbondingDelegations} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.GenesisState.redelegations": - if x.Redelegations == nil { - x.Redelegations = []*Redelegation{} - } - value := &_GenesisState_7_list{list: &x.Redelegations} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.GenesisState.last_total_power": - panic(fmt.Errorf("field last_total_power of message cosmos.staking.v1beta1.GenesisState is not mutable")) - case "cosmos.staking.v1beta1.GenesisState.exported": - panic(fmt.Errorf("field exported of message cosmos.staking.v1beta1.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.GenesisState.last_total_power": - return protoreflect.ValueOfBytes(nil) - case "cosmos.staking.v1beta1.GenesisState.last_validator_powers": - list := []*LastValidatorPower{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "cosmos.staking.v1beta1.GenesisState.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) - case "cosmos.staking.v1beta1.GenesisState.delegations": - list := []*Delegation{} - return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) - case "cosmos.staking.v1beta1.GenesisState.unbonding_delegations": - list := []*UnbondingDelegation{} - return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) - case "cosmos.staking.v1beta1.GenesisState.redelegations": - list := []*Redelegation{} - return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) - case "cosmos.staking.v1beta1.GenesisState.exported": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.GenesisState")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LastTotalPower) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.LastValidatorPowers) > 0 { - for _, e := range x.LastValidatorPowers { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Delegations) > 0 { - for _, e := range x.Delegations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.UnbondingDelegations) > 0 { - for _, e := range x.UnbondingDelegations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Redelegations) > 0 { - for _, e := range x.Redelegations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Exported { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Exported { - i-- - if x.Exported { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(x.Redelegations) > 0 { - for iNdEx := len(x.Redelegations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Redelegations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.UnbondingDelegations) > 0 { - for iNdEx := len(x.UnbondingDelegations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UnbondingDelegations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - } - if len(x.Delegations) > 0 { - for iNdEx := len(x.Delegations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Delegations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.LastValidatorPowers) > 0 { - for iNdEx := len(x.LastValidatorPowers) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LastValidatorPowers[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.LastTotalPower) > 0 { - i -= len(x.LastTotalPower) - copy(dAtA[i:], x.LastTotalPower) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LastTotalPower))) - i-- - dAtA[i] = 0x12 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastTotalPower", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LastTotalPower = append(x.LastTotalPower[:0], dAtA[iNdEx:postIndex]...) - if x.LastTotalPower == nil { - x.LastTotalPower = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastValidatorPowers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LastValidatorPowers = append(x.LastValidatorPowers, &LastValidatorPower{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastValidatorPowers[len(x.LastValidatorPowers)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Delegations = append(x.Delegations, &Delegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Delegations[len(x.Delegations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UnbondingDelegations = append(x.UnbondingDelegations, &UnbondingDelegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingDelegations[len(x.UnbondingDelegations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Redelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Redelegations = append(x.Redelegations, &Redelegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Redelegations[len(x.Redelegations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exported", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Exported = bool(v != 0) - 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_LastValidatorPower protoreflect.MessageDescriptor - fd_LastValidatorPower_address protoreflect.FieldDescriptor - fd_LastValidatorPower_power protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_genesis_proto_init() - md_LastValidatorPower = File_cosmos_staking_v1beta1_genesis_proto.Messages().ByName("LastValidatorPower") - fd_LastValidatorPower_address = md_LastValidatorPower.Fields().ByName("address") - fd_LastValidatorPower_power = md_LastValidatorPower.Fields().ByName("power") -} - -var _ protoreflect.Message = (*fastReflection_LastValidatorPower)(nil) - -type fastReflection_LastValidatorPower LastValidatorPower - -func (x *LastValidatorPower) ProtoReflect() protoreflect.Message { - return (*fastReflection_LastValidatorPower)(x) -} - -func (x *LastValidatorPower) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_LastValidatorPower_messageType fastReflection_LastValidatorPower_messageType -var _ protoreflect.MessageType = fastReflection_LastValidatorPower_messageType{} - -type fastReflection_LastValidatorPower_messageType struct{} - -func (x fastReflection_LastValidatorPower_messageType) Zero() protoreflect.Message { - return (*fastReflection_LastValidatorPower)(nil) -} -func (x fastReflection_LastValidatorPower_messageType) New() protoreflect.Message { - return new(fastReflection_LastValidatorPower) -} -func (x fastReflection_LastValidatorPower_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LastValidatorPower -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LastValidatorPower) Descriptor() protoreflect.MessageDescriptor { - return md_LastValidatorPower -} - -// 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_LastValidatorPower) Type() protoreflect.MessageType { - return _fastReflection_LastValidatorPower_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LastValidatorPower) New() protoreflect.Message { - return new(fastReflection_LastValidatorPower) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LastValidatorPower) Interface() protoreflect.ProtoMessage { - return (*LastValidatorPower)(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_LastValidatorPower) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_LastValidatorPower_address, value) { - return - } - } - if x.Power != int64(0) { - value := protoreflect.ValueOfInt64(x.Power) - if !f(fd_LastValidatorPower_power, 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_LastValidatorPower) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.LastValidatorPower.address": - return x.Address != "" - case "cosmos.staking.v1beta1.LastValidatorPower.power": - return x.Power != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.LastValidatorPower")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.LastValidatorPower 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_LastValidatorPower) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.LastValidatorPower.address": - x.Address = "" - case "cosmos.staking.v1beta1.LastValidatorPower.power": - x.Power = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.LastValidatorPower")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.LastValidatorPower 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_LastValidatorPower) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.LastValidatorPower.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.LastValidatorPower.power": - value := x.Power - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.LastValidatorPower")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.LastValidatorPower 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_LastValidatorPower) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.LastValidatorPower.address": - x.Address = value.Interface().(string) - case "cosmos.staking.v1beta1.LastValidatorPower.power": - x.Power = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.LastValidatorPower")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.LastValidatorPower 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_LastValidatorPower) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.LastValidatorPower.address": - panic(fmt.Errorf("field address of message cosmos.staking.v1beta1.LastValidatorPower is not mutable")) - case "cosmos.staking.v1beta1.LastValidatorPower.power": - panic(fmt.Errorf("field power of message cosmos.staking.v1beta1.LastValidatorPower is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.LastValidatorPower")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.LastValidatorPower 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_LastValidatorPower) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.LastValidatorPower.address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.LastValidatorPower.power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.LastValidatorPower")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.LastValidatorPower 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_LastValidatorPower) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.LastValidatorPower", 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_LastValidatorPower) 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_LastValidatorPower) 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_LastValidatorPower) 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_LastValidatorPower) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LastValidatorPower) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Power != 0 { - n += 1 + runtime.Sov(uint64(x.Power)) - } - 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().(*LastValidatorPower) - 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.Power != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Power)) - i-- - dAtA[i] = 0x10 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LastValidatorPower) - 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: LastValidatorPower: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LastValidatorPower: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - x.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/staking/v1beta1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the staking module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines all the paramaters of related to deposit. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - LastTotalPower []byte `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3" json:"last_total_power,omitempty"` - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - LastValidatorPowers []*LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers,omitempty"` - // delegations defines the validator set at genesis. - Validators []*Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators,omitempty"` - // delegations defines the delegations active at genesis. - Delegations []*Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations,omitempty"` - // unbonding_delegations defines the unbonding delegations active at genesis. - UnbondingDelegations []*UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations,omitempty"` - // redelegations defines the redelegations active at genesis. - Redelegations []*Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations,omitempty"` - Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetLastTotalPower() []byte { - if x != nil { - return x.LastTotalPower - } - return nil -} - -func (x *GenesisState) GetLastValidatorPowers() []*LastValidatorPower { - if x != nil { - return x.LastValidatorPowers - } - return nil -} - -func (x *GenesisState) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *GenesisState) GetDelegations() []*Delegation { - if x != nil { - return x.Delegations - } - return nil -} - -func (x *GenesisState) GetUnbondingDelegations() []*UnbondingDelegation { - if x != nil { - return x.UnbondingDelegations - } - return nil -} - -func (x *GenesisState) GetRedelegations() []*Redelegation { - if x != nil { - return x.Redelegations - } - return nil -} - -func (x *GenesisState) GetExported() bool { - if x != nil { - return x.Exported - } - return false -} - -// LastValidatorPower required for validator set update logic. -type LastValidatorPower struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the address of the validator. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // power defines the power of the validator. - Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` -} - -func (x *LastValidatorPower) Reset() { - *x = LastValidatorPower{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LastValidatorPower) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LastValidatorPower) ProtoMessage() {} - -// Deprecated: Use LastValidatorPower.ProtoReflect.Descriptor instead. -func (*LastValidatorPower) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *LastValidatorPower) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *LastValidatorPower) GetPower() int64 { - if x != nil { - return x.Power - } - return 0 -} - -var File_cosmos_staking_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_cosmos_staking_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x04, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 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, 0x12, 0x58, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x2e, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, - 0x6c, 0x61, 0x73, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x64, - 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x13, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, - 0x77, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x4a, 0x0a, - 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x66, 0x0a, 0x15, 0x75, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, 0x75, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, - 0x68, 0x0a, 0x12, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x50, 0x6f, 0x77, 0x65, 0x72, 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, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x3a, - 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xec, 0x01, 0x0a, 0x1a, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_staking_v1beta1_genesis_proto_rawDescOnce sync.Once - file_cosmos_staking_v1beta1_genesis_proto_rawDescData = file_cosmos_staking_v1beta1_genesis_proto_rawDesc -) - -func file_cosmos_staking_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_cosmos_staking_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_cosmos_staking_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_staking_v1beta1_genesis_proto_rawDescData) - }) - return file_cosmos_staking_v1beta1_genesis_proto_rawDescData -} - -var file_cosmos_staking_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cosmos_staking_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.staking.v1beta1.GenesisState - (*LastValidatorPower)(nil), // 1: cosmos.staking.v1beta1.LastValidatorPower - (*Params)(nil), // 2: cosmos.staking.v1beta1.Params - (*Validator)(nil), // 3: cosmos.staking.v1beta1.Validator - (*Delegation)(nil), // 4: cosmos.staking.v1beta1.Delegation - (*UnbondingDelegation)(nil), // 5: cosmos.staking.v1beta1.UnbondingDelegation - (*Redelegation)(nil), // 6: cosmos.staking.v1beta1.Redelegation -} -var file_cosmos_staking_v1beta1_genesis_proto_depIdxs = []int32{ - 2, // 0: cosmos.staking.v1beta1.GenesisState.params:type_name -> cosmos.staking.v1beta1.Params - 1, // 1: cosmos.staking.v1beta1.GenesisState.last_validator_powers:type_name -> cosmos.staking.v1beta1.LastValidatorPower - 3, // 2: cosmos.staking.v1beta1.GenesisState.validators:type_name -> cosmos.staking.v1beta1.Validator - 4, // 3: cosmos.staking.v1beta1.GenesisState.delegations:type_name -> cosmos.staking.v1beta1.Delegation - 5, // 4: cosmos.staking.v1beta1.GenesisState.unbonding_delegations:type_name -> cosmos.staking.v1beta1.UnbondingDelegation - 6, // 5: cosmos.staking.v1beta1.GenesisState.redelegations:type_name -> cosmos.staking.v1beta1.Redelegation - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cosmos_staking_v1beta1_genesis_proto_init() } -func file_cosmos_staking_v1beta1_genesis_proto_init() { - if File_cosmos_staking_v1beta1_genesis_proto != nil { - return - } - file_cosmos_staking_v1beta1_staking_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_staking_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LastValidatorPower); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_staking_v1beta1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_staking_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_cosmos_staking_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_cosmos_staking_v1beta1_genesis_proto_msgTypes, - }.Build() - File_cosmos_staking_v1beta1_genesis_proto = out.File - file_cosmos_staking_v1beta1_genesis_proto_rawDesc = nil - file_cosmos_staking_v1beta1_genesis_proto_goTypes = nil - file_cosmos_staking_v1beta1_genesis_proto_depIdxs = nil -} diff --git a/api/cosmos/staking/v1beta1/query.pulsar.go b/api/cosmos/staking/v1beta1/query.pulsar.go deleted file mode 100644 index 83c06d6653ca..000000000000 --- a/api/cosmos/staking/v1beta1/query.pulsar.go +++ /dev/null @@ -1,15848 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryValidatorsRequest protoreflect.MessageDescriptor - fd_QueryValidatorsRequest_status protoreflect.FieldDescriptor - fd_QueryValidatorsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorsRequest") - fd_QueryValidatorsRequest_status = md_QueryValidatorsRequest.Fields().ByName("status") - fd_QueryValidatorsRequest_pagination = md_QueryValidatorsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorsRequest)(nil) - -type fastReflection_QueryValidatorsRequest QueryValidatorsRequest - -func (x *QueryValidatorsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorsRequest)(x) -} - -func (x *QueryValidatorsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorsRequest_messageType fastReflection_QueryValidatorsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorsRequest_messageType{} - -type fastReflection_QueryValidatorsRequest_messageType struct{} - -func (x fastReflection_QueryValidatorsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorsRequest)(nil) -} -func (x fastReflection_QueryValidatorsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorsRequest) -} -func (x fastReflection_QueryValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorsRequest -} - -// 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_QueryValidatorsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorsRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorsRequest)(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_QueryValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Status != "" { - value := protoreflect.ValueOfString(x.Status) - if !f(fd_QueryValidatorsRequest_status, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorsRequest_pagination, 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_QueryValidatorsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsRequest.status": - return x.Status != "" - case "cosmos.staking.v1beta1.QueryValidatorsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsRequest 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_QueryValidatorsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsRequest.status": - x.Status = "" - case "cosmos.staking.v1beta1.QueryValidatorsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsRequest 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_QueryValidatorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsRequest.status": - value := x.Status - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryValidatorsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsRequest 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_QueryValidatorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsRequest.status": - x.Status = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryValidatorsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsRequest 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_QueryValidatorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryValidatorsRequest.status": - panic(fmt.Errorf("field status of message cosmos.staking.v1beta1.QueryValidatorsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsRequest 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_QueryValidatorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsRequest.status": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryValidatorsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsRequest 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_QueryValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorsRequest", 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_QueryValidatorsRequest) 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_QueryValidatorsRequest) 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_QueryValidatorsRequest) 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_QueryValidatorsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Status) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Status) > 0 { - i -= len(x.Status) - copy(dAtA[i:], x.Status) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Status))) - 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().(*QueryValidatorsRequest) - 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: QueryValidatorsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorsRequest: 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 Status", 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.Status = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryValidatorsResponse_1_list)(nil) - -type _QueryValidatorsResponse_1_list struct { - list *[]*Validator -} - -func (x *_QueryValidatorsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryValidatorsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_QueryValidatorsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryValidatorsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryValidatorsResponse_1_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryValidatorsResponse protoreflect.MessageDescriptor - fd_QueryValidatorsResponse_validators protoreflect.FieldDescriptor - fd_QueryValidatorsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorsResponse") - fd_QueryValidatorsResponse_validators = md_QueryValidatorsResponse.Fields().ByName("validators") - fd_QueryValidatorsResponse_pagination = md_QueryValidatorsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorsResponse)(nil) - -type fastReflection_QueryValidatorsResponse QueryValidatorsResponse - -func (x *QueryValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorsResponse)(x) -} - -func (x *QueryValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorsResponse_messageType fastReflection_QueryValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorsResponse_messageType{} - -type fastReflection_QueryValidatorsResponse_messageType struct{} - -func (x fastReflection_QueryValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorsResponse)(nil) -} -func (x fastReflection_QueryValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorsResponse) -} -func (x fastReflection_QueryValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorsResponse -} - -// 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_QueryValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorsResponse)(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_QueryValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_QueryValidatorsResponse_1_list{list: &x.Validators}) - if !f(fd_QueryValidatorsResponse_validators, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorsResponse_pagination, 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_QueryValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsResponse.validators": - return len(x.Validators) != 0 - case "cosmos.staking.v1beta1.QueryValidatorsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsResponse 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_QueryValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsResponse.validators": - x.Validators = nil - case "cosmos.staking.v1beta1.QueryValidatorsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsResponse 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_QueryValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_QueryValidatorsResponse_1_list{}) - } - listValue := &_QueryValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryValidatorsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsResponse 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_QueryValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsResponse.validators": - lv := value.List() - clv := lv.(*_QueryValidatorsResponse_1_list) - x.Validators = *clv.list - case "cosmos.staking.v1beta1.QueryValidatorsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsResponse 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_QueryValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_QueryValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryValidatorsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsResponse 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_QueryValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorsResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_QueryValidatorsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryValidatorsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorsResponse 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_QueryValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorsResponse", 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_QueryValidatorsResponse) 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_QueryValidatorsResponse) 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_QueryValidatorsResponse) 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_QueryValidatorsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorsResponse) - 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: QueryValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryValidatorRequest protoreflect.MessageDescriptor - fd_QueryValidatorRequest_validator_addr protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorRequest") - fd_QueryValidatorRequest_validator_addr = md_QueryValidatorRequest.Fields().ByName("validator_addr") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorRequest)(nil) - -type fastReflection_QueryValidatorRequest QueryValidatorRequest - -func (x *QueryValidatorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorRequest)(x) -} - -func (x *QueryValidatorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorRequest_messageType fastReflection_QueryValidatorRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorRequest_messageType{} - -type fastReflection_QueryValidatorRequest_messageType struct{} - -func (x fastReflection_QueryValidatorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorRequest)(nil) -} -func (x fastReflection_QueryValidatorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorRequest) -} -func (x fastReflection_QueryValidatorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorRequest -} - -// 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_QueryValidatorRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorRequest)(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_QueryValidatorRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_QueryValidatorRequest_validator_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryValidatorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorRequest.validator_addr": - return x.ValidatorAddr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorRequest 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_QueryValidatorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorRequest.validator_addr": - x.ValidatorAddr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorRequest 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_QueryValidatorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorRequest.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorRequest 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_QueryValidatorRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorRequest.validator_addr": - x.ValidatorAddr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorRequest 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_QueryValidatorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorRequest.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.staking.v1beta1.QueryValidatorRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorRequest 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_QueryValidatorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorRequest.validator_addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorRequest 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_QueryValidatorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorRequest", 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_QueryValidatorRequest) 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_QueryValidatorRequest) 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_QueryValidatorRequest) 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_QueryValidatorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorRequest) - 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: QueryValidatorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryValidatorResponse protoreflect.MessageDescriptor - fd_QueryValidatorResponse_validator protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorResponse") - fd_QueryValidatorResponse_validator = md_QueryValidatorResponse.Fields().ByName("validator") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorResponse)(nil) - -type fastReflection_QueryValidatorResponse QueryValidatorResponse - -func (x *QueryValidatorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorResponse)(x) -} - -func (x *QueryValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorResponse_messageType fastReflection_QueryValidatorResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorResponse_messageType{} - -type fastReflection_QueryValidatorResponse_messageType struct{} - -func (x fastReflection_QueryValidatorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorResponse)(nil) -} -func (x fastReflection_QueryValidatorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorResponse) -} -func (x fastReflection_QueryValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorResponse -} - -// 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_QueryValidatorResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorResponse)(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_QueryValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_QueryValidatorResponse_validator, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorResponse.validator": - return x.Validator != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorResponse 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_QueryValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorResponse.validator": - x.Validator = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorResponse 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_QueryValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorResponse.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorResponse 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_QueryValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorResponse.validator": - x.Validator = value.Message().Interface().(*Validator) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorResponse 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_QueryValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorResponse.validator": - if x.Validator == nil { - x.Validator = new(Validator) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorResponse 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_QueryValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorResponse.validator": - m := new(Validator) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorResponse 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_QueryValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorResponse", 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_QueryValidatorResponse) 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_QueryValidatorResponse) 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_QueryValidatorResponse) 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_QueryValidatorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorResponse) - 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.Validator != nil { - l = options.Size(x.Validator) - 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().(*QueryValidatorResponse) - 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.Validator != nil { - encoded, err := options.Marshal(x.Validator) - 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().(*QueryValidatorResponse) - 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: QueryValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorResponse: 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 Validator", 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.Validator == nil { - x.Validator = &Validator{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); 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_QueryValidatorDelegationsRequest protoreflect.MessageDescriptor - fd_QueryValidatorDelegationsRequest_validator_addr protoreflect.FieldDescriptor - fd_QueryValidatorDelegationsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorDelegationsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorDelegationsRequest") - fd_QueryValidatorDelegationsRequest_validator_addr = md_QueryValidatorDelegationsRequest.Fields().ByName("validator_addr") - fd_QueryValidatorDelegationsRequest_pagination = md_QueryValidatorDelegationsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorDelegationsRequest)(nil) - -type fastReflection_QueryValidatorDelegationsRequest QueryValidatorDelegationsRequest - -func (x *QueryValidatorDelegationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorDelegationsRequest)(x) -} - -func (x *QueryValidatorDelegationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorDelegationsRequest_messageType fastReflection_QueryValidatorDelegationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorDelegationsRequest_messageType{} - -type fastReflection_QueryValidatorDelegationsRequest_messageType struct{} - -func (x fastReflection_QueryValidatorDelegationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorDelegationsRequest)(nil) -} -func (x fastReflection_QueryValidatorDelegationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorDelegationsRequest) -} -func (x fastReflection_QueryValidatorDelegationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorDelegationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorDelegationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorDelegationsRequest -} - -// 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_QueryValidatorDelegationsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorDelegationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorDelegationsRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorDelegationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorDelegationsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorDelegationsRequest)(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_QueryValidatorDelegationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_QueryValidatorDelegationsRequest_validator_addr, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorDelegationsRequest_pagination, 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_QueryValidatorDelegationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.validator_addr": - return x.ValidatorAddr != "" - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest 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_QueryValidatorDelegationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.validator_addr": - x.ValidatorAddr = "" - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest 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_QueryValidatorDelegationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest 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_QueryValidatorDelegationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.validator_addr": - x.ValidatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest 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_QueryValidatorDelegationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest 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_QueryValidatorDelegationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.validator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsRequest 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_QueryValidatorDelegationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", 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_QueryValidatorDelegationsRequest) 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_QueryValidatorDelegationsRequest) 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_QueryValidatorDelegationsRequest) 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_QueryValidatorDelegationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorDelegationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorDelegationsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorDelegationsRequest) - 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: QueryValidatorDelegationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryValidatorDelegationsResponse_1_list)(nil) - -type _QueryValidatorDelegationsResponse_1_list struct { - list *[]*DelegationResponse -} - -func (x *_QueryValidatorDelegationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryValidatorDelegationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryValidatorDelegationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegationResponse) - (*x.list)[i] = concreteValue -} - -func (x *_QueryValidatorDelegationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegationResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryValidatorDelegationsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DelegationResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorDelegationsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryValidatorDelegationsResponse_1_list) NewElement() protoreflect.Value { - v := new(DelegationResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorDelegationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryValidatorDelegationsResponse protoreflect.MessageDescriptor - fd_QueryValidatorDelegationsResponse_delegation_responses protoreflect.FieldDescriptor - fd_QueryValidatorDelegationsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorDelegationsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorDelegationsResponse") - fd_QueryValidatorDelegationsResponse_delegation_responses = md_QueryValidatorDelegationsResponse.Fields().ByName("delegation_responses") - fd_QueryValidatorDelegationsResponse_pagination = md_QueryValidatorDelegationsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorDelegationsResponse)(nil) - -type fastReflection_QueryValidatorDelegationsResponse QueryValidatorDelegationsResponse - -func (x *QueryValidatorDelegationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorDelegationsResponse)(x) -} - -func (x *QueryValidatorDelegationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_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_QueryValidatorDelegationsResponse_messageType fastReflection_QueryValidatorDelegationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorDelegationsResponse_messageType{} - -type fastReflection_QueryValidatorDelegationsResponse_messageType struct{} - -func (x fastReflection_QueryValidatorDelegationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorDelegationsResponse)(nil) -} -func (x fastReflection_QueryValidatorDelegationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorDelegationsResponse) -} -func (x fastReflection_QueryValidatorDelegationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorDelegationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorDelegationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorDelegationsResponse -} - -// 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_QueryValidatorDelegationsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorDelegationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorDelegationsResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorDelegationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorDelegationsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorDelegationsResponse)(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_QueryValidatorDelegationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.DelegationResponses) != 0 { - value := protoreflect.ValueOfList(&_QueryValidatorDelegationsResponse_1_list{list: &x.DelegationResponses}) - if !f(fd_QueryValidatorDelegationsResponse_delegation_responses, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorDelegationsResponse_pagination, 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_QueryValidatorDelegationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses": - return len(x.DelegationResponses) != 0 - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsResponse 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_QueryValidatorDelegationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses": - x.DelegationResponses = nil - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsResponse 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_QueryValidatorDelegationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses": - if len(x.DelegationResponses) == 0 { - return protoreflect.ValueOfList(&_QueryValidatorDelegationsResponse_1_list{}) - } - listValue := &_QueryValidatorDelegationsResponse_1_list{list: &x.DelegationResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsResponse 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_QueryValidatorDelegationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses": - lv := value.List() - clv := lv.(*_QueryValidatorDelegationsResponse_1_list) - x.DelegationResponses = *clv.list - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsResponse 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_QueryValidatorDelegationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses": - if x.DelegationResponses == nil { - x.DelegationResponses = []*DelegationResponse{} - } - value := &_QueryValidatorDelegationsResponse_1_list{list: &x.DelegationResponses} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsResponse 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_QueryValidatorDelegationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses": - list := []*DelegationResponse{} - return protoreflect.ValueOfList(&_QueryValidatorDelegationsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorDelegationsResponse 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_QueryValidatorDelegationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", 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_QueryValidatorDelegationsResponse) 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_QueryValidatorDelegationsResponse) 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_QueryValidatorDelegationsResponse) 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_QueryValidatorDelegationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorDelegationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.DelegationResponses) > 0 { - for _, e := range x.DelegationResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorDelegationsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegationResponses) > 0 { - for iNdEx := len(x.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegationResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorDelegationsResponse) - 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: QueryValidatorDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorDelegationsResponse: 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 DelegationResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegationResponses = append(x.DelegationResponses, &DelegationResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegationResponses[len(x.DelegationResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryValidatorUnbondingDelegationsRequest protoreflect.MessageDescriptor - fd_QueryValidatorUnbondingDelegationsRequest_validator_addr protoreflect.FieldDescriptor - fd_QueryValidatorUnbondingDelegationsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorUnbondingDelegationsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorUnbondingDelegationsRequest") - fd_QueryValidatorUnbondingDelegationsRequest_validator_addr = md_QueryValidatorUnbondingDelegationsRequest.Fields().ByName("validator_addr") - fd_QueryValidatorUnbondingDelegationsRequest_pagination = md_QueryValidatorUnbondingDelegationsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorUnbondingDelegationsRequest)(nil) - -type fastReflection_QueryValidatorUnbondingDelegationsRequest QueryValidatorUnbondingDelegationsRequest - -func (x *QueryValidatorUnbondingDelegationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorUnbondingDelegationsRequest)(x) -} - -func (x *QueryValidatorUnbondingDelegationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_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_QueryValidatorUnbondingDelegationsRequest_messageType fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType{} - -type fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType struct{} - -func (x fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorUnbondingDelegationsRequest)(nil) -} -func (x fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorUnbondingDelegationsRequest) -} -func (x fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorUnbondingDelegationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorUnbondingDelegationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorUnbondingDelegationsRequest -} - -// 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_QueryValidatorUnbondingDelegationsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorUnbondingDelegationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorUnbondingDelegationsRequest) New() protoreflect.Message { - return new(fastReflection_QueryValidatorUnbondingDelegationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorUnbondingDelegationsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorUnbondingDelegationsRequest)(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_QueryValidatorUnbondingDelegationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_QueryValidatorUnbondingDelegationsRequest_validator_addr, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorUnbondingDelegationsRequest_pagination, 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_QueryValidatorUnbondingDelegationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.validator_addr": - return x.ValidatorAddr != "" - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest 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_QueryValidatorUnbondingDelegationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.validator_addr": - x.ValidatorAddr = "" - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest 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_QueryValidatorUnbondingDelegationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest 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_QueryValidatorUnbondingDelegationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.validator_addr": - x.ValidatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest 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_QueryValidatorUnbondingDelegationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest 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_QueryValidatorUnbondingDelegationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.validator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest 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_QueryValidatorUnbondingDelegationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", 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_QueryValidatorUnbondingDelegationsRequest) 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_QueryValidatorUnbondingDelegationsRequest) 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_QueryValidatorUnbondingDelegationsRequest) 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_QueryValidatorUnbondingDelegationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorUnbondingDelegationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorUnbondingDelegationsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorUnbondingDelegationsRequest) - 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: QueryValidatorUnbondingDelegationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorUnbondingDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryValidatorUnbondingDelegationsResponse_1_list)(nil) - -type _QueryValidatorUnbondingDelegationsResponse_1_list struct { - list *[]*UnbondingDelegation -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegation) - (*x.list)[i] = concreteValue -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(UnbondingDelegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) NewElement() protoreflect.Value { - v := new(UnbondingDelegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryValidatorUnbondingDelegationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryValidatorUnbondingDelegationsResponse protoreflect.MessageDescriptor - fd_QueryValidatorUnbondingDelegationsResponse_unbonding_responses protoreflect.FieldDescriptor - fd_QueryValidatorUnbondingDelegationsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryValidatorUnbondingDelegationsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryValidatorUnbondingDelegationsResponse") - fd_QueryValidatorUnbondingDelegationsResponse_unbonding_responses = md_QueryValidatorUnbondingDelegationsResponse.Fields().ByName("unbonding_responses") - fd_QueryValidatorUnbondingDelegationsResponse_pagination = md_QueryValidatorUnbondingDelegationsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryValidatorUnbondingDelegationsResponse)(nil) - -type fastReflection_QueryValidatorUnbondingDelegationsResponse QueryValidatorUnbondingDelegationsResponse - -func (x *QueryValidatorUnbondingDelegationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryValidatorUnbondingDelegationsResponse)(x) -} - -func (x *QueryValidatorUnbondingDelegationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType{} - -type fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType struct{} - -func (x fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryValidatorUnbondingDelegationsResponse)(nil) -} -func (x fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryValidatorUnbondingDelegationsResponse) -} -func (x fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorUnbondingDelegationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryValidatorUnbondingDelegationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryValidatorUnbondingDelegationsResponse -} - -// 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_QueryValidatorUnbondingDelegationsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryValidatorUnbondingDelegationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryValidatorUnbondingDelegationsResponse) New() protoreflect.Message { - return new(fastReflection_QueryValidatorUnbondingDelegationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryValidatorUnbondingDelegationsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryValidatorUnbondingDelegationsResponse)(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_QueryValidatorUnbondingDelegationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.UnbondingResponses) != 0 { - value := protoreflect.ValueOfList(&_QueryValidatorUnbondingDelegationsResponse_1_list{list: &x.UnbondingResponses}) - if !f(fd_QueryValidatorUnbondingDelegationsResponse_unbonding_responses, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryValidatorUnbondingDelegationsResponse_pagination, 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_QueryValidatorUnbondingDelegationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses": - return len(x.UnbondingResponses) != 0 - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse 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_QueryValidatorUnbondingDelegationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses": - x.UnbondingResponses = nil - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse 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_QueryValidatorUnbondingDelegationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses": - if len(x.UnbondingResponses) == 0 { - return protoreflect.ValueOfList(&_QueryValidatorUnbondingDelegationsResponse_1_list{}) - } - listValue := &_QueryValidatorUnbondingDelegationsResponse_1_list{list: &x.UnbondingResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse 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_QueryValidatorUnbondingDelegationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses": - lv := value.List() - clv := lv.(*_QueryValidatorUnbondingDelegationsResponse_1_list) - x.UnbondingResponses = *clv.list - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse 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_QueryValidatorUnbondingDelegationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses": - if x.UnbondingResponses == nil { - x.UnbondingResponses = []*UnbondingDelegation{} - } - value := &_QueryValidatorUnbondingDelegationsResponse_1_list{list: &x.UnbondingResponses} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse 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_QueryValidatorUnbondingDelegationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses": - list := []*UnbondingDelegation{} - return protoreflect.ValueOfList(&_QueryValidatorUnbondingDelegationsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse 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_QueryValidatorUnbondingDelegationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", 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_QueryValidatorUnbondingDelegationsResponse) 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_QueryValidatorUnbondingDelegationsResponse) 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_QueryValidatorUnbondingDelegationsResponse) 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_QueryValidatorUnbondingDelegationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryValidatorUnbondingDelegationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.UnbondingResponses) > 0 { - for _, e := range x.UnbondingResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryValidatorUnbondingDelegationsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.UnbondingResponses) > 0 { - for iNdEx := len(x.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UnbondingResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryValidatorUnbondingDelegationsResponse) - 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: QueryValidatorUnbondingDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorUnbondingDelegationsResponse: 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 UnbondingResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UnbondingResponses = append(x.UnbondingResponses, &UnbondingDelegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingResponses[len(x.UnbondingResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryDelegationRequest protoreflect.MessageDescriptor - fd_QueryDelegationRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryDelegationRequest_validator_addr protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegationRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegationRequest") - fd_QueryDelegationRequest_delegator_addr = md_QueryDelegationRequest.Fields().ByName("delegator_addr") - fd_QueryDelegationRequest_validator_addr = md_QueryDelegationRequest.Fields().ByName("validator_addr") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegationRequest)(nil) - -type fastReflection_QueryDelegationRequest QueryDelegationRequest - -func (x *QueryDelegationRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegationRequest)(x) -} - -func (x *QueryDelegationRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegationRequest_messageType fastReflection_QueryDelegationRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegationRequest_messageType{} - -type fastReflection_QueryDelegationRequest_messageType struct{} - -func (x fastReflection_QueryDelegationRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegationRequest)(nil) -} -func (x fastReflection_QueryDelegationRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegationRequest) -} -func (x fastReflection_QueryDelegationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegationRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationRequest -} - -// 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_QueryDelegationRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegationRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegationRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegationRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegationRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegationRequest)(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_QueryDelegationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryDelegationRequest_delegator_addr, value) { - return - } - } - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_QueryDelegationRequest_validator_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegationRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryDelegationRequest.validator_addr": - return x.ValidatorAddr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationRequest 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_QueryDelegationRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryDelegationRequest.validator_addr": - x.ValidatorAddr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationRequest 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_QueryDelegationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryDelegationRequest.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationRequest 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_QueryDelegationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryDelegationRequest.validator_addr": - x.ValidatorAddr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationRequest 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_QueryDelegationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryDelegationRequest is not mutable")) - case "cosmos.staking.v1beta1.QueryDelegationRequest.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.staking.v1beta1.QueryDelegationRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationRequest 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_QueryDelegationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryDelegationRequest.validator_addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationRequest 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_QueryDelegationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegationRequest", 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_QueryDelegationRequest) 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_QueryDelegationRequest) 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_QueryDelegationRequest) 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_QueryDelegationRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegationRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegationRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryDelegationRequest) - 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: QueryDelegationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDelegationResponse protoreflect.MessageDescriptor - fd_QueryDelegationResponse_delegation_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegationResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegationResponse") - fd_QueryDelegationResponse_delegation_response = md_QueryDelegationResponse.Fields().ByName("delegation_response") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegationResponse)(nil) - -type fastReflection_QueryDelegationResponse QueryDelegationResponse - -func (x *QueryDelegationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegationResponse)(x) -} - -func (x *QueryDelegationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegationResponse_messageType fastReflection_QueryDelegationResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegationResponse_messageType{} - -type fastReflection_QueryDelegationResponse_messageType struct{} - -func (x fastReflection_QueryDelegationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegationResponse)(nil) -} -func (x fastReflection_QueryDelegationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegationResponse) -} -func (x fastReflection_QueryDelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegationResponse -} - -// 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_QueryDelegationResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegationResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegationResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegationResponse)(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_QueryDelegationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegationResponse != nil { - value := protoreflect.ValueOfMessage(x.DelegationResponse.ProtoReflect()) - if !f(fd_QueryDelegationResponse_delegation_response, 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_QueryDelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response": - return x.DelegationResponse != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationResponse 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_QueryDelegationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response": - x.DelegationResponse = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationResponse 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_QueryDelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response": - value := x.DelegationResponse - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationResponse 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_QueryDelegationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response": - x.DelegationResponse = value.Message().Interface().(*DelegationResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationResponse 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_QueryDelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response": - if x.DelegationResponse == nil { - x.DelegationResponse = new(DelegationResponse) - } - return protoreflect.ValueOfMessage(x.DelegationResponse.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationResponse 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_QueryDelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response": - m := new(DelegationResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegationResponse 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_QueryDelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegationResponse", 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_QueryDelegationResponse) 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_QueryDelegationResponse) 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_QueryDelegationResponse) 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_QueryDelegationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegationResponse) - 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.DelegationResponse != nil { - l = options.Size(x.DelegationResponse) - 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().(*QueryDelegationResponse) - 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.DelegationResponse != nil { - encoded, err := options.Marshal(x.DelegationResponse) - 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().(*QueryDelegationResponse) - 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: QueryDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationResponse: 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 DelegationResponse", 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.DelegationResponse == nil { - x.DelegationResponse = &DelegationResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegationResponse); 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_QueryUnbondingDelegationRequest protoreflect.MessageDescriptor - fd_QueryUnbondingDelegationRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryUnbondingDelegationRequest_validator_addr protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryUnbondingDelegationRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryUnbondingDelegationRequest") - fd_QueryUnbondingDelegationRequest_delegator_addr = md_QueryUnbondingDelegationRequest.Fields().ByName("delegator_addr") - fd_QueryUnbondingDelegationRequest_validator_addr = md_QueryUnbondingDelegationRequest.Fields().ByName("validator_addr") -} - -var _ protoreflect.Message = (*fastReflection_QueryUnbondingDelegationRequest)(nil) - -type fastReflection_QueryUnbondingDelegationRequest QueryUnbondingDelegationRequest - -func (x *QueryUnbondingDelegationRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryUnbondingDelegationRequest)(x) -} - -func (x *QueryUnbondingDelegationRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryUnbondingDelegationRequest_messageType fastReflection_QueryUnbondingDelegationRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryUnbondingDelegationRequest_messageType{} - -type fastReflection_QueryUnbondingDelegationRequest_messageType struct{} - -func (x fastReflection_QueryUnbondingDelegationRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryUnbondingDelegationRequest)(nil) -} -func (x fastReflection_QueryUnbondingDelegationRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryUnbondingDelegationRequest) -} -func (x fastReflection_QueryUnbondingDelegationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUnbondingDelegationRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryUnbondingDelegationRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUnbondingDelegationRequest -} - -// 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_QueryUnbondingDelegationRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryUnbondingDelegationRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryUnbondingDelegationRequest) New() protoreflect.Message { - return new(fastReflection_QueryUnbondingDelegationRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryUnbondingDelegationRequest) Interface() protoreflect.ProtoMessage { - return (*QueryUnbondingDelegationRequest)(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_QueryUnbondingDelegationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryUnbondingDelegationRequest_delegator_addr, value) { - return - } - } - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_QueryUnbondingDelegationRequest_validator_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryUnbondingDelegationRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.validator_addr": - return x.ValidatorAddr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest 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_QueryUnbondingDelegationRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.validator_addr": - x.ValidatorAddr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest 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_QueryUnbondingDelegationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest 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_QueryUnbondingDelegationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.validator_addr": - x.ValidatorAddr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest 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_QueryUnbondingDelegationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest is not mutable")) - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest 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_QueryUnbondingDelegationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.validator_addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationRequest 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_QueryUnbondingDelegationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", 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_QueryUnbondingDelegationRequest) 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_QueryUnbondingDelegationRequest) 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_QueryUnbondingDelegationRequest) 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_QueryUnbondingDelegationRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryUnbondingDelegationRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryUnbondingDelegationRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryUnbondingDelegationRequest) - 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: QueryUnbondingDelegationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnbondingDelegationRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryUnbondingDelegationResponse protoreflect.MessageDescriptor - fd_QueryUnbondingDelegationResponse_unbond protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryUnbondingDelegationResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryUnbondingDelegationResponse") - fd_QueryUnbondingDelegationResponse_unbond = md_QueryUnbondingDelegationResponse.Fields().ByName("unbond") -} - -var _ protoreflect.Message = (*fastReflection_QueryUnbondingDelegationResponse)(nil) - -type fastReflection_QueryUnbondingDelegationResponse QueryUnbondingDelegationResponse - -func (x *QueryUnbondingDelegationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryUnbondingDelegationResponse)(x) -} - -func (x *QueryUnbondingDelegationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryUnbondingDelegationResponse_messageType fastReflection_QueryUnbondingDelegationResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryUnbondingDelegationResponse_messageType{} - -type fastReflection_QueryUnbondingDelegationResponse_messageType struct{} - -func (x fastReflection_QueryUnbondingDelegationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryUnbondingDelegationResponse)(nil) -} -func (x fastReflection_QueryUnbondingDelegationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryUnbondingDelegationResponse) -} -func (x fastReflection_QueryUnbondingDelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUnbondingDelegationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryUnbondingDelegationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUnbondingDelegationResponse -} - -// 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_QueryUnbondingDelegationResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryUnbondingDelegationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryUnbondingDelegationResponse) New() protoreflect.Message { - return new(fastReflection_QueryUnbondingDelegationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryUnbondingDelegationResponse) Interface() protoreflect.ProtoMessage { - return (*QueryUnbondingDelegationResponse)(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_QueryUnbondingDelegationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Unbond != nil { - value := protoreflect.ValueOfMessage(x.Unbond.ProtoReflect()) - if !f(fd_QueryUnbondingDelegationResponse_unbond, 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_QueryUnbondingDelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond": - return x.Unbond != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationResponse 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_QueryUnbondingDelegationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond": - x.Unbond = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationResponse 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_QueryUnbondingDelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond": - value := x.Unbond - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationResponse 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_QueryUnbondingDelegationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond": - x.Unbond = value.Message().Interface().(*UnbondingDelegation) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationResponse 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_QueryUnbondingDelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond": - if x.Unbond == nil { - x.Unbond = new(UnbondingDelegation) - } - return protoreflect.ValueOfMessage(x.Unbond.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationResponse 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_QueryUnbondingDelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond": - m := new(UnbondingDelegation) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryUnbondingDelegationResponse 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_QueryUnbondingDelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", 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_QueryUnbondingDelegationResponse) 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_QueryUnbondingDelegationResponse) 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_QueryUnbondingDelegationResponse) 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_QueryUnbondingDelegationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryUnbondingDelegationResponse) - 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.Unbond != nil { - l = options.Size(x.Unbond) - 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().(*QueryUnbondingDelegationResponse) - 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.Unbond != nil { - encoded, err := options.Marshal(x.Unbond) - 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().(*QueryUnbondingDelegationResponse) - 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: QueryUnbondingDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnbondingDelegationResponse: 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 Unbond", 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.Unbond == nil { - x.Unbond = &UnbondingDelegation{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Unbond); 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_QueryDelegatorDelegationsRequest protoreflect.MessageDescriptor - fd_QueryDelegatorDelegationsRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryDelegatorDelegationsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorDelegationsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorDelegationsRequest") - fd_QueryDelegatorDelegationsRequest_delegator_addr = md_QueryDelegatorDelegationsRequest.Fields().ByName("delegator_addr") - fd_QueryDelegatorDelegationsRequest_pagination = md_QueryDelegatorDelegationsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorDelegationsRequest)(nil) - -type fastReflection_QueryDelegatorDelegationsRequest QueryDelegatorDelegationsRequest - -func (x *QueryDelegatorDelegationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorDelegationsRequest)(x) -} - -func (x *QueryDelegatorDelegationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorDelegationsRequest_messageType fastReflection_QueryDelegatorDelegationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorDelegationsRequest_messageType{} - -type fastReflection_QueryDelegatorDelegationsRequest_messageType struct{} - -func (x fastReflection_QueryDelegatorDelegationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorDelegationsRequest)(nil) -} -func (x fastReflection_QueryDelegatorDelegationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorDelegationsRequest) -} -func (x fastReflection_QueryDelegatorDelegationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorDelegationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorDelegationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorDelegationsRequest -} - -// 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_QueryDelegatorDelegationsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorDelegationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorDelegationsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorDelegationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorDelegationsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorDelegationsRequest)(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_QueryDelegatorDelegationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryDelegatorDelegationsRequest_delegator_addr, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDelegatorDelegationsRequest_pagination, 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_QueryDelegatorDelegationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest 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_QueryDelegatorDelegationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest 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_QueryDelegatorDelegationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest 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_QueryDelegatorDelegationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest 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_QueryDelegatorDelegationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest 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_QueryDelegatorDelegationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest 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_QueryDelegatorDelegationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", 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_QueryDelegatorDelegationsRequest) 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_QueryDelegatorDelegationsRequest) 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_QueryDelegatorDelegationsRequest) 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_QueryDelegatorDelegationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorDelegationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDelegatorDelegationsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryDelegatorDelegationsRequest) - 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: QueryDelegatorDelegationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorDelegationsRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDelegatorDelegationsResponse_1_list)(nil) - -type _QueryDelegatorDelegationsResponse_1_list struct { - list *[]*DelegationResponse -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegationResponse) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegationResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DelegationResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) NewElement() protoreflect.Value { - v := new(DelegationResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegatorDelegationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDelegatorDelegationsResponse protoreflect.MessageDescriptor - fd_QueryDelegatorDelegationsResponse_delegation_responses protoreflect.FieldDescriptor - fd_QueryDelegatorDelegationsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorDelegationsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorDelegationsResponse") - fd_QueryDelegatorDelegationsResponse_delegation_responses = md_QueryDelegatorDelegationsResponse.Fields().ByName("delegation_responses") - fd_QueryDelegatorDelegationsResponse_pagination = md_QueryDelegatorDelegationsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorDelegationsResponse)(nil) - -type fastReflection_QueryDelegatorDelegationsResponse QueryDelegatorDelegationsResponse - -func (x *QueryDelegatorDelegationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorDelegationsResponse)(x) -} - -func (x *QueryDelegatorDelegationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorDelegationsResponse_messageType fastReflection_QueryDelegatorDelegationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorDelegationsResponse_messageType{} - -type fastReflection_QueryDelegatorDelegationsResponse_messageType struct{} - -func (x fastReflection_QueryDelegatorDelegationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorDelegationsResponse)(nil) -} -func (x fastReflection_QueryDelegatorDelegationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorDelegationsResponse) -} -func (x fastReflection_QueryDelegatorDelegationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorDelegationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorDelegationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorDelegationsResponse -} - -// 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_QueryDelegatorDelegationsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorDelegationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorDelegationsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorDelegationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorDelegationsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorDelegationsResponse)(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_QueryDelegatorDelegationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.DelegationResponses) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegatorDelegationsResponse_1_list{list: &x.DelegationResponses}) - if !f(fd_QueryDelegatorDelegationsResponse_delegation_responses, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDelegatorDelegationsResponse_pagination, 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_QueryDelegatorDelegationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses": - return len(x.DelegationResponses) != 0 - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse 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_QueryDelegatorDelegationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses": - x.DelegationResponses = nil - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse 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_QueryDelegatorDelegationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses": - if len(x.DelegationResponses) == 0 { - return protoreflect.ValueOfList(&_QueryDelegatorDelegationsResponse_1_list{}) - } - listValue := &_QueryDelegatorDelegationsResponse_1_list{list: &x.DelegationResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse 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_QueryDelegatorDelegationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses": - lv := value.List() - clv := lv.(*_QueryDelegatorDelegationsResponse_1_list) - x.DelegationResponses = *clv.list - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse 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_QueryDelegatorDelegationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses": - if x.DelegationResponses == nil { - x.DelegationResponses = []*DelegationResponse{} - } - value := &_QueryDelegatorDelegationsResponse_1_list{list: &x.DelegationResponses} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse 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_QueryDelegatorDelegationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses": - list := []*DelegationResponse{} - return protoreflect.ValueOfList(&_QueryDelegatorDelegationsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse 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_QueryDelegatorDelegationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", 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_QueryDelegatorDelegationsResponse) 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_QueryDelegatorDelegationsResponse) 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_QueryDelegatorDelegationsResponse) 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_QueryDelegatorDelegationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorDelegationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.DelegationResponses) > 0 { - for _, e := range x.DelegationResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDelegatorDelegationsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegationResponses) > 0 { - for iNdEx := len(x.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegationResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorDelegationsResponse) - 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: QueryDelegatorDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorDelegationsResponse: 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 DelegationResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegationResponses = append(x.DelegationResponses, &DelegationResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegationResponses[len(x.DelegationResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryDelegatorUnbondingDelegationsRequest protoreflect.MessageDescriptor - fd_QueryDelegatorUnbondingDelegationsRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryDelegatorUnbondingDelegationsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorUnbondingDelegationsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorUnbondingDelegationsRequest") - fd_QueryDelegatorUnbondingDelegationsRequest_delegator_addr = md_QueryDelegatorUnbondingDelegationsRequest.Fields().ByName("delegator_addr") - fd_QueryDelegatorUnbondingDelegationsRequest_pagination = md_QueryDelegatorUnbondingDelegationsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorUnbondingDelegationsRequest)(nil) - -type fastReflection_QueryDelegatorUnbondingDelegationsRequest QueryDelegatorUnbondingDelegationsRequest - -func (x *QueryDelegatorUnbondingDelegationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorUnbondingDelegationsRequest)(x) -} - -func (x *QueryDelegatorUnbondingDelegationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType{} - -type fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType struct{} - -func (x fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorUnbondingDelegationsRequest)(nil) -} -func (x fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorUnbondingDelegationsRequest) -} -func (x fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorUnbondingDelegationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorUnbondingDelegationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorUnbondingDelegationsRequest -} - -// 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_QueryDelegatorUnbondingDelegationsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorUnbondingDelegationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorUnbondingDelegationsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorUnbondingDelegationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorUnbondingDelegationsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorUnbondingDelegationsRequest)(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_QueryDelegatorUnbondingDelegationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryDelegatorUnbondingDelegationsRequest_delegator_addr, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDelegatorUnbondingDelegationsRequest_pagination, 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_QueryDelegatorUnbondingDelegationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest 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_QueryDelegatorUnbondingDelegationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest 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_QueryDelegatorUnbondingDelegationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest 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_QueryDelegatorUnbondingDelegationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest 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_QueryDelegatorUnbondingDelegationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest 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_QueryDelegatorUnbondingDelegationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest 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_QueryDelegatorUnbondingDelegationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", 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_QueryDelegatorUnbondingDelegationsRequest) 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_QueryDelegatorUnbondingDelegationsRequest) 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_QueryDelegatorUnbondingDelegationsRequest) 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_QueryDelegatorUnbondingDelegationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorUnbondingDelegationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDelegatorUnbondingDelegationsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryDelegatorUnbondingDelegationsRequest) - 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: QueryDelegatorUnbondingDelegationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDelegatorUnbondingDelegationsResponse_1_list)(nil) - -type _QueryDelegatorUnbondingDelegationsResponse_1_list struct { - list *[]*UnbondingDelegation -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegation) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(UnbondingDelegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) NewElement() protoreflect.Value { - v := new(UnbondingDelegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegatorUnbondingDelegationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDelegatorUnbondingDelegationsResponse protoreflect.MessageDescriptor - fd_QueryDelegatorUnbondingDelegationsResponse_unbonding_responses protoreflect.FieldDescriptor - fd_QueryDelegatorUnbondingDelegationsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorUnbondingDelegationsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorUnbondingDelegationsResponse") - fd_QueryDelegatorUnbondingDelegationsResponse_unbonding_responses = md_QueryDelegatorUnbondingDelegationsResponse.Fields().ByName("unbonding_responses") - fd_QueryDelegatorUnbondingDelegationsResponse_pagination = md_QueryDelegatorUnbondingDelegationsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorUnbondingDelegationsResponse)(nil) - -type fastReflection_QueryDelegatorUnbondingDelegationsResponse QueryDelegatorUnbondingDelegationsResponse - -func (x *QueryDelegatorUnbondingDelegationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorUnbondingDelegationsResponse)(x) -} - -func (x *QueryDelegatorUnbondingDelegationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType{} - -type fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType struct{} - -func (x fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorUnbondingDelegationsResponse)(nil) -} -func (x fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorUnbondingDelegationsResponse) -} -func (x fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorUnbondingDelegationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorUnbondingDelegationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorUnbondingDelegationsResponse -} - -// 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_QueryDelegatorUnbondingDelegationsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorUnbondingDelegationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorUnbondingDelegationsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorUnbondingDelegationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorUnbondingDelegationsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorUnbondingDelegationsResponse)(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_QueryDelegatorUnbondingDelegationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.UnbondingResponses) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegatorUnbondingDelegationsResponse_1_list{list: &x.UnbondingResponses}) - if !f(fd_QueryDelegatorUnbondingDelegationsResponse_unbonding_responses, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDelegatorUnbondingDelegationsResponse_pagination, 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_QueryDelegatorUnbondingDelegationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses": - return len(x.UnbondingResponses) != 0 - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse 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_QueryDelegatorUnbondingDelegationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses": - x.UnbondingResponses = nil - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse 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_QueryDelegatorUnbondingDelegationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses": - if len(x.UnbondingResponses) == 0 { - return protoreflect.ValueOfList(&_QueryDelegatorUnbondingDelegationsResponse_1_list{}) - } - listValue := &_QueryDelegatorUnbondingDelegationsResponse_1_list{list: &x.UnbondingResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse 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_QueryDelegatorUnbondingDelegationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses": - lv := value.List() - clv := lv.(*_QueryDelegatorUnbondingDelegationsResponse_1_list) - x.UnbondingResponses = *clv.list - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse 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_QueryDelegatorUnbondingDelegationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses": - if x.UnbondingResponses == nil { - x.UnbondingResponses = []*UnbondingDelegation{} - } - value := &_QueryDelegatorUnbondingDelegationsResponse_1_list{list: &x.UnbondingResponses} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse 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_QueryDelegatorUnbondingDelegationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses": - list := []*UnbondingDelegation{} - return protoreflect.ValueOfList(&_QueryDelegatorUnbondingDelegationsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse 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_QueryDelegatorUnbondingDelegationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", 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_QueryDelegatorUnbondingDelegationsResponse) 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_QueryDelegatorUnbondingDelegationsResponse) 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_QueryDelegatorUnbondingDelegationsResponse) 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_QueryDelegatorUnbondingDelegationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorUnbondingDelegationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.UnbondingResponses) > 0 { - for _, e := range x.UnbondingResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDelegatorUnbondingDelegationsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.UnbondingResponses) > 0 { - for iNdEx := len(x.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UnbondingResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorUnbondingDelegationsResponse) - 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: QueryDelegatorUnbondingDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: 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 UnbondingResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UnbondingResponses = append(x.UnbondingResponses, &UnbondingDelegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingResponses[len(x.UnbondingResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryRedelegationsRequest protoreflect.MessageDescriptor - fd_QueryRedelegationsRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryRedelegationsRequest_src_validator_addr protoreflect.FieldDescriptor - fd_QueryRedelegationsRequest_dst_validator_addr protoreflect.FieldDescriptor - fd_QueryRedelegationsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryRedelegationsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryRedelegationsRequest") - fd_QueryRedelegationsRequest_delegator_addr = md_QueryRedelegationsRequest.Fields().ByName("delegator_addr") - fd_QueryRedelegationsRequest_src_validator_addr = md_QueryRedelegationsRequest.Fields().ByName("src_validator_addr") - fd_QueryRedelegationsRequest_dst_validator_addr = md_QueryRedelegationsRequest.Fields().ByName("dst_validator_addr") - fd_QueryRedelegationsRequest_pagination = md_QueryRedelegationsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryRedelegationsRequest)(nil) - -type fastReflection_QueryRedelegationsRequest QueryRedelegationsRequest - -func (x *QueryRedelegationsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRedelegationsRequest)(x) -} - -func (x *QueryRedelegationsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryRedelegationsRequest_messageType fastReflection_QueryRedelegationsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryRedelegationsRequest_messageType{} - -type fastReflection_QueryRedelegationsRequest_messageType struct{} - -func (x fastReflection_QueryRedelegationsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRedelegationsRequest)(nil) -} -func (x fastReflection_QueryRedelegationsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRedelegationsRequest) -} -func (x fastReflection_QueryRedelegationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRedelegationsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRedelegationsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRedelegationsRequest -} - -// 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_QueryRedelegationsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryRedelegationsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRedelegationsRequest) New() protoreflect.Message { - return new(fastReflection_QueryRedelegationsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRedelegationsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryRedelegationsRequest)(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_QueryRedelegationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryRedelegationsRequest_delegator_addr, value) { - return - } - } - if x.SrcValidatorAddr != "" { - value := protoreflect.ValueOfString(x.SrcValidatorAddr) - if !f(fd_QueryRedelegationsRequest_src_validator_addr, value) { - return - } - } - if x.DstValidatorAddr != "" { - value := protoreflect.ValueOfString(x.DstValidatorAddr) - if !f(fd_QueryRedelegationsRequest_dst_validator_addr, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryRedelegationsRequest_pagination, 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_QueryRedelegationsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.src_validator_addr": - return x.SrcValidatorAddr != "" - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.dst_validator_addr": - return x.DstValidatorAddr != "" - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsRequest 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_QueryRedelegationsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.src_validator_addr": - x.SrcValidatorAddr = "" - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.dst_validator_addr": - x.DstValidatorAddr = "" - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsRequest 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_QueryRedelegationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.src_validator_addr": - value := x.SrcValidatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.dst_validator_addr": - value := x.DstValidatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsRequest 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_QueryRedelegationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.src_validator_addr": - x.SrcValidatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.dst_validator_addr": - x.DstValidatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsRequest 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_QueryRedelegationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryRedelegationsRequest is not mutable")) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.src_validator_addr": - panic(fmt.Errorf("field src_validator_addr of message cosmos.staking.v1beta1.QueryRedelegationsRequest is not mutable")) - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.dst_validator_addr": - panic(fmt.Errorf("field dst_validator_addr of message cosmos.staking.v1beta1.QueryRedelegationsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsRequest 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_QueryRedelegationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.src_validator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.dst_validator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsRequest 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_QueryRedelegationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryRedelegationsRequest", 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_QueryRedelegationsRequest) 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_QueryRedelegationsRequest) 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_QueryRedelegationsRequest) 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_QueryRedelegationsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRedelegationsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SrcValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DstValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryRedelegationsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.DstValidatorAddr) > 0 { - i -= len(x.DstValidatorAddr) - copy(dAtA[i:], x.DstValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DstValidatorAddr))) - i-- - dAtA[i] = 0x1a - } - if len(x.SrcValidatorAddr) > 0 { - i -= len(x.SrcValidatorAddr) - copy(dAtA[i:], x.SrcValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SrcValidatorAddr))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryRedelegationsRequest) - 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: QueryRedelegationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRedelegationsRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SrcValidatorAddr", 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.SrcValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DstValidatorAddr", 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.DstValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryRedelegationsResponse_1_list)(nil) - -type _QueryRedelegationsResponse_1_list struct { - list *[]*RedelegationResponse -} - -func (x *_QueryRedelegationsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryRedelegationsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryRedelegationsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*RedelegationResponse) - (*x.list)[i] = concreteValue -} - -func (x *_QueryRedelegationsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*RedelegationResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryRedelegationsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(RedelegationResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryRedelegationsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryRedelegationsResponse_1_list) NewElement() protoreflect.Value { - v := new(RedelegationResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryRedelegationsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryRedelegationsResponse protoreflect.MessageDescriptor - fd_QueryRedelegationsResponse_redelegation_responses protoreflect.FieldDescriptor - fd_QueryRedelegationsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryRedelegationsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryRedelegationsResponse") - fd_QueryRedelegationsResponse_redelegation_responses = md_QueryRedelegationsResponse.Fields().ByName("redelegation_responses") - fd_QueryRedelegationsResponse_pagination = md_QueryRedelegationsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryRedelegationsResponse)(nil) - -type fastReflection_QueryRedelegationsResponse QueryRedelegationsResponse - -func (x *QueryRedelegationsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRedelegationsResponse)(x) -} - -func (x *QueryRedelegationsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryRedelegationsResponse_messageType fastReflection_QueryRedelegationsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryRedelegationsResponse_messageType{} - -type fastReflection_QueryRedelegationsResponse_messageType struct{} - -func (x fastReflection_QueryRedelegationsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRedelegationsResponse)(nil) -} -func (x fastReflection_QueryRedelegationsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRedelegationsResponse) -} -func (x fastReflection_QueryRedelegationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRedelegationsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRedelegationsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRedelegationsResponse -} - -// 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_QueryRedelegationsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryRedelegationsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRedelegationsResponse) New() protoreflect.Message { - return new(fastReflection_QueryRedelegationsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRedelegationsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryRedelegationsResponse)(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_QueryRedelegationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.RedelegationResponses) != 0 { - value := protoreflect.ValueOfList(&_QueryRedelegationsResponse_1_list{list: &x.RedelegationResponses}) - if !f(fd_QueryRedelegationsResponse_redelegation_responses, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryRedelegationsResponse_pagination, 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_QueryRedelegationsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses": - return len(x.RedelegationResponses) != 0 - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsResponse 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_QueryRedelegationsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses": - x.RedelegationResponses = nil - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsResponse 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_QueryRedelegationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses": - if len(x.RedelegationResponses) == 0 { - return protoreflect.ValueOfList(&_QueryRedelegationsResponse_1_list{}) - } - listValue := &_QueryRedelegationsResponse_1_list{list: &x.RedelegationResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsResponse 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_QueryRedelegationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses": - lv := value.List() - clv := lv.(*_QueryRedelegationsResponse_1_list) - x.RedelegationResponses = *clv.list - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsResponse 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_QueryRedelegationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses": - if x.RedelegationResponses == nil { - x.RedelegationResponses = []*RedelegationResponse{} - } - value := &_QueryRedelegationsResponse_1_list{list: &x.RedelegationResponses} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsResponse 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_QueryRedelegationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses": - list := []*RedelegationResponse{} - return protoreflect.ValueOfList(&_QueryRedelegationsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryRedelegationsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryRedelegationsResponse 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_QueryRedelegationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryRedelegationsResponse", 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_QueryRedelegationsResponse) 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_QueryRedelegationsResponse) 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_QueryRedelegationsResponse) 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_QueryRedelegationsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRedelegationsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.RedelegationResponses) > 0 { - for _, e := range x.RedelegationResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryRedelegationsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.RedelegationResponses) > 0 { - for iNdEx := len(x.RedelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.RedelegationResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryRedelegationsResponse) - 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: QueryRedelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRedelegationsResponse: 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 RedelegationResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RedelegationResponses = append(x.RedelegationResponses, &RedelegationResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RedelegationResponses[len(x.RedelegationResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryDelegatorValidatorsRequest protoreflect.MessageDescriptor - fd_QueryDelegatorValidatorsRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryDelegatorValidatorsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorValidatorsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorsRequest") - fd_QueryDelegatorValidatorsRequest_delegator_addr = md_QueryDelegatorValidatorsRequest.Fields().ByName("delegator_addr") - fd_QueryDelegatorValidatorsRequest_pagination = md_QueryDelegatorValidatorsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorsRequest)(nil) - -type fastReflection_QueryDelegatorValidatorsRequest QueryDelegatorValidatorsRequest - -func (x *QueryDelegatorValidatorsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsRequest)(x) -} - -func (x *QueryDelegatorValidatorsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorValidatorsRequest_messageType fastReflection_QueryDelegatorValidatorsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorsRequest_messageType{} - -type fastReflection_QueryDelegatorValidatorsRequest_messageType struct{} - -func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsRequest)(nil) -} -func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsRequest) -} -func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsRequest -} - -// 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_QueryDelegatorValidatorsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorValidatorsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorValidatorsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorValidatorsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorValidatorsRequest)(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_QueryDelegatorValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryDelegatorValidatorsRequest_delegator_addr, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDelegatorValidatorsRequest_pagination, 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_QueryDelegatorValidatorsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest 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_QueryDelegatorValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", 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_QueryDelegatorValidatorsRequest) 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_QueryDelegatorValidatorsRequest) 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_QueryDelegatorValidatorsRequest) 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_QueryDelegatorValidatorsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorValidatorsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDelegatorValidatorsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryDelegatorValidatorsRequest) - 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: QueryDelegatorValidatorsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDelegatorValidatorsResponse_1_list)(nil) - -type _QueryDelegatorValidatorsResponse_1_list struct { - list *[]*Validator -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDelegatorValidatorsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDelegatorValidatorsResponse protoreflect.MessageDescriptor - fd_QueryDelegatorValidatorsResponse_validators protoreflect.FieldDescriptor - fd_QueryDelegatorValidatorsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorValidatorsResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorsResponse") - fd_QueryDelegatorValidatorsResponse_validators = md_QueryDelegatorValidatorsResponse.Fields().ByName("validators") - fd_QueryDelegatorValidatorsResponse_pagination = md_QueryDelegatorValidatorsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorsResponse)(nil) - -type fastReflection_QueryDelegatorValidatorsResponse QueryDelegatorValidatorsResponse - -func (x *QueryDelegatorValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsResponse)(x) -} - -func (x *QueryDelegatorValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorValidatorsResponse_messageType fastReflection_QueryDelegatorValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorsResponse_messageType{} - -type fastReflection_QueryDelegatorValidatorsResponse_messageType struct{} - -func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorsResponse)(nil) -} -func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsResponse) -} -func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorsResponse -} - -// 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_QueryDelegatorValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorValidatorsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorValidatorsResponse)(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_QueryDelegatorValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators}) - if !f(fd_QueryDelegatorValidatorsResponse_validators, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDelegatorValidatorsResponse_pagination, 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_QueryDelegatorValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators": - return len(x.Validators) != 0 - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators": - x.Validators = nil - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{}) - } - listValue := &_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators": - lv := value.List() - clv := lv.(*_QueryDelegatorValidatorsResponse_1_list) - x.Validators = *clv.list - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{list: &list}) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse 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_QueryDelegatorValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", 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_QueryDelegatorValidatorsResponse) 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_QueryDelegatorValidatorsResponse) 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_QueryDelegatorValidatorsResponse) 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_QueryDelegatorValidatorsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryDelegatorValidatorsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) - 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: QueryDelegatorValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryDelegatorValidatorRequest protoreflect.MessageDescriptor - fd_QueryDelegatorValidatorRequest_delegator_addr protoreflect.FieldDescriptor - fd_QueryDelegatorValidatorRequest_validator_addr protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorValidatorRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorRequest") - fd_QueryDelegatorValidatorRequest_delegator_addr = md_QueryDelegatorValidatorRequest.Fields().ByName("delegator_addr") - fd_QueryDelegatorValidatorRequest_validator_addr = md_QueryDelegatorValidatorRequest.Fields().ByName("validator_addr") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorRequest)(nil) - -type fastReflection_QueryDelegatorValidatorRequest QueryDelegatorValidatorRequest - -func (x *QueryDelegatorValidatorRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorRequest)(x) -} - -func (x *QueryDelegatorValidatorRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorValidatorRequest_messageType fastReflection_QueryDelegatorValidatorRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorRequest_messageType{} - -type fastReflection_QueryDelegatorValidatorRequest_messageType struct{} - -func (x fastReflection_QueryDelegatorValidatorRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorRequest)(nil) -} -func (x fastReflection_QueryDelegatorValidatorRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorRequest) -} -func (x fastReflection_QueryDelegatorValidatorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorValidatorRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorRequest -} - -// 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_QueryDelegatorValidatorRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorValidatorRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorValidatorRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorValidatorRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorValidatorRequest)(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_QueryDelegatorValidatorRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddr != "" { - value := protoreflect.ValueOfString(x.DelegatorAddr) - if !f(fd_QueryDelegatorValidatorRequest_delegator_addr, value) { - return - } - } - if x.ValidatorAddr != "" { - value := protoreflect.ValueOfString(x.ValidatorAddr) - if !f(fd_QueryDelegatorValidatorRequest_validator_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegatorValidatorRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.delegator_addr": - return x.DelegatorAddr != "" - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.validator_addr": - return x.ValidatorAddr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest 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_QueryDelegatorValidatorRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.delegator_addr": - x.DelegatorAddr = "" - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.validator_addr": - x.ValidatorAddr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest 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_QueryDelegatorValidatorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.delegator_addr": - value := x.DelegatorAddr - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.validator_addr": - value := x.ValidatorAddr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest 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_QueryDelegatorValidatorRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.delegator_addr": - x.DelegatorAddr = value.Interface().(string) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.validator_addr": - x.ValidatorAddr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest 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_QueryDelegatorValidatorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.delegator_addr": - panic(fmt.Errorf("field delegator_addr of message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest is not mutable")) - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.validator_addr": - panic(fmt.Errorf("field validator_addr of message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest 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_QueryDelegatorValidatorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.delegator_addr": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.validator_addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorRequest 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_QueryDelegatorValidatorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", 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_QueryDelegatorValidatorRequest) 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_QueryDelegatorValidatorRequest) 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_QueryDelegatorValidatorRequest) 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_QueryDelegatorValidatorRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorValidatorRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorValidatorRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddr) > 0 { - i -= len(x.ValidatorAddr) - copy(dAtA[i:], x.ValidatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddr) > 0 { - i -= len(x.DelegatorAddr) - copy(dAtA[i:], x.DelegatorAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddr))) - 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().(*QueryDelegatorValidatorRequest) - 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: QueryDelegatorValidatorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorRequest: 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 DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDelegatorValidatorResponse protoreflect.MessageDescriptor - fd_QueryDelegatorValidatorResponse_validator protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryDelegatorValidatorResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorResponse") - fd_QueryDelegatorValidatorResponse_validator = md_QueryDelegatorValidatorResponse.Fields().ByName("validator") -} - -var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorResponse)(nil) - -type fastReflection_QueryDelegatorValidatorResponse QueryDelegatorValidatorResponse - -func (x *QueryDelegatorValidatorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorResponse)(x) -} - -func (x *QueryDelegatorValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDelegatorValidatorResponse_messageType fastReflection_QueryDelegatorValidatorResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorResponse_messageType{} - -type fastReflection_QueryDelegatorValidatorResponse_messageType struct{} - -func (x fastReflection_QueryDelegatorValidatorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorValidatorResponse)(nil) -} -func (x fastReflection_QueryDelegatorValidatorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorResponse) -} -func (x fastReflection_QueryDelegatorValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDelegatorValidatorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorValidatorResponse -} - -// 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_QueryDelegatorValidatorResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorValidatorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorValidatorResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorValidatorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorValidatorResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorValidatorResponse)(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_QueryDelegatorValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_QueryDelegatorValidatorResponse_validator, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDelegatorValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator": - return x.Validator != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorResponse 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_QueryDelegatorValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator": - x.Validator = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorResponse 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_QueryDelegatorValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorResponse 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_QueryDelegatorValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator": - x.Validator = value.Message().Interface().(*Validator) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorResponse 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_QueryDelegatorValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator": - if x.Validator == nil { - x.Validator = new(Validator) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorResponse 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_QueryDelegatorValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator": - m := new(Validator) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryDelegatorValidatorResponse 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_QueryDelegatorValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", 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_QueryDelegatorValidatorResponse) 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_QueryDelegatorValidatorResponse) 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_QueryDelegatorValidatorResponse) 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_QueryDelegatorValidatorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorValidatorResponse) - 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.Validator != nil { - l = options.Size(x.Validator) - 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().(*QueryDelegatorValidatorResponse) - 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.Validator != nil { - encoded, err := options.Marshal(x.Validator) - 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().(*QueryDelegatorValidatorResponse) - 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: QueryDelegatorValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorResponse: 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 Validator", 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.Validator == nil { - x.Validator = &Validator{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); 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_QueryHistoricalInfoRequest protoreflect.MessageDescriptor - fd_QueryHistoricalInfoRequest_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryHistoricalInfoRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryHistoricalInfoRequest") - fd_QueryHistoricalInfoRequest_height = md_QueryHistoricalInfoRequest.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_QueryHistoricalInfoRequest)(nil) - -type fastReflection_QueryHistoricalInfoRequest QueryHistoricalInfoRequest - -func (x *QueryHistoricalInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryHistoricalInfoRequest)(x) -} - -func (x *QueryHistoricalInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryHistoricalInfoRequest_messageType fastReflection_QueryHistoricalInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryHistoricalInfoRequest_messageType{} - -type fastReflection_QueryHistoricalInfoRequest_messageType struct{} - -func (x fastReflection_QueryHistoricalInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryHistoricalInfoRequest)(nil) -} -func (x fastReflection_QueryHistoricalInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryHistoricalInfoRequest) -} -func (x fastReflection_QueryHistoricalInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryHistoricalInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryHistoricalInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryHistoricalInfoRequest -} - -// 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_QueryHistoricalInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryHistoricalInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryHistoricalInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryHistoricalInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryHistoricalInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryHistoricalInfoRequest)(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_QueryHistoricalInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_QueryHistoricalInfoRequest_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryHistoricalInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoRequest.height": - return x.Height != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoRequest 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_QueryHistoricalInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoRequest.height": - x.Height = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoRequest 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_QueryHistoricalInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoRequest 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_QueryHistoricalInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoRequest.height": - x.Height = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoRequest 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_QueryHistoricalInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoRequest.height": - panic(fmt.Errorf("field height of message cosmos.staking.v1beta1.QueryHistoricalInfoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoRequest 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_QueryHistoricalInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoRequest 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_QueryHistoricalInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryHistoricalInfoRequest", 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_QueryHistoricalInfoRequest) 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_QueryHistoricalInfoRequest) 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_QueryHistoricalInfoRequest) 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_QueryHistoricalInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryHistoricalInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if 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().(*QueryHistoricalInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryHistoricalInfoRequest) - 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: QueryHistoricalInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryHistoricalInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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_QueryHistoricalInfoResponse protoreflect.MessageDescriptor - fd_QueryHistoricalInfoResponse_hist protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryHistoricalInfoResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryHistoricalInfoResponse") - fd_QueryHistoricalInfoResponse_hist = md_QueryHistoricalInfoResponse.Fields().ByName("hist") -} - -var _ protoreflect.Message = (*fastReflection_QueryHistoricalInfoResponse)(nil) - -type fastReflection_QueryHistoricalInfoResponse QueryHistoricalInfoResponse - -func (x *QueryHistoricalInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryHistoricalInfoResponse)(x) -} - -func (x *QueryHistoricalInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryHistoricalInfoResponse_messageType fastReflection_QueryHistoricalInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryHistoricalInfoResponse_messageType{} - -type fastReflection_QueryHistoricalInfoResponse_messageType struct{} - -func (x fastReflection_QueryHistoricalInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryHistoricalInfoResponse)(nil) -} -func (x fastReflection_QueryHistoricalInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryHistoricalInfoResponse) -} -func (x fastReflection_QueryHistoricalInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryHistoricalInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryHistoricalInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryHistoricalInfoResponse -} - -// 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_QueryHistoricalInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryHistoricalInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryHistoricalInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryHistoricalInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryHistoricalInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryHistoricalInfoResponse)(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_QueryHistoricalInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Hist != nil { - value := protoreflect.ValueOfMessage(x.Hist.ProtoReflect()) - if !f(fd_QueryHistoricalInfoResponse_hist, 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_QueryHistoricalInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist": - return x.Hist != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoResponse 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_QueryHistoricalInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist": - x.Hist = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoResponse 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_QueryHistoricalInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist": - value := x.Hist - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoResponse 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_QueryHistoricalInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist": - x.Hist = value.Message().Interface().(*HistoricalInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoResponse 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_QueryHistoricalInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist": - if x.Hist == nil { - x.Hist = new(HistoricalInfo) - } - return protoreflect.ValueOfMessage(x.Hist.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoResponse 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_QueryHistoricalInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist": - m := new(HistoricalInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryHistoricalInfoResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryHistoricalInfoResponse 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_QueryHistoricalInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryHistoricalInfoResponse", 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_QueryHistoricalInfoResponse) 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_QueryHistoricalInfoResponse) 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_QueryHistoricalInfoResponse) 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_QueryHistoricalInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryHistoricalInfoResponse) - 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.Hist != nil { - l = options.Size(x.Hist) - 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().(*QueryHistoricalInfoResponse) - 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.Hist != nil { - encoded, err := options.Marshal(x.Hist) - 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().(*QueryHistoricalInfoResponse) - 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: QueryHistoricalInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryHistoricalInfoResponse: 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 Hist", 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.Hist == nil { - x.Hist = &HistoricalInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Hist); 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_QueryPoolRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryPoolRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryPoolRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryPoolRequest)(nil) - -type fastReflection_QueryPoolRequest QueryPoolRequest - -func (x *QueryPoolRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPoolRequest)(x) -} - -func (x *QueryPoolRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryPoolRequest_messageType fastReflection_QueryPoolRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryPoolRequest_messageType{} - -type fastReflection_QueryPoolRequest_messageType struct{} - -func (x fastReflection_QueryPoolRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPoolRequest)(nil) -} -func (x fastReflection_QueryPoolRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPoolRequest) -} -func (x fastReflection_QueryPoolRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPoolRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryPoolRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPoolRequest -} - -// 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_QueryPoolRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryPoolRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPoolRequest) New() protoreflect.Message { - return new(fastReflection_QueryPoolRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPoolRequest) Interface() protoreflect.ProtoMessage { - return (*QueryPoolRequest)(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_QueryPoolRequest) 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_QueryPoolRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolRequest 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_QueryPoolRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolRequest 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_QueryPoolRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolRequest 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_QueryPoolRequest) 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.staking.v1beta1.QueryPoolRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolRequest 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_QueryPoolRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolRequest 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_QueryPoolRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolRequest")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolRequest 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_QueryPoolRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryPoolRequest", 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_QueryPoolRequest) 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_QueryPoolRequest) 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_QueryPoolRequest) 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_QueryPoolRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPoolRequest) - 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().(*QueryPoolRequest) - 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().(*QueryPoolRequest) - 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: QueryPoolRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPoolRequest: 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_QueryPoolResponse protoreflect.MessageDescriptor - fd_QueryPoolResponse_pool protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryPoolResponse = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryPoolResponse") - fd_QueryPoolResponse_pool = md_QueryPoolResponse.Fields().ByName("pool") -} - -var _ protoreflect.Message = (*fastReflection_QueryPoolResponse)(nil) - -type fastReflection_QueryPoolResponse QueryPoolResponse - -func (x *QueryPoolResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPoolResponse)(x) -} - -func (x *QueryPoolResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryPoolResponse_messageType fastReflection_QueryPoolResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryPoolResponse_messageType{} - -type fastReflection_QueryPoolResponse_messageType struct{} - -func (x fastReflection_QueryPoolResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPoolResponse)(nil) -} -func (x fastReflection_QueryPoolResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPoolResponse) -} -func (x fastReflection_QueryPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPoolResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryPoolResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPoolResponse -} - -// 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_QueryPoolResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryPoolResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPoolResponse) New() protoreflect.Message { - return new(fastReflection_QueryPoolResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPoolResponse) Interface() protoreflect.ProtoMessage { - return (*QueryPoolResponse)(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_QueryPoolResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pool != nil { - value := protoreflect.ValueOfMessage(x.Pool.ProtoReflect()) - if !f(fd_QueryPoolResponse_pool, 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_QueryPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryPoolResponse.pool": - return x.Pool != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolResponse 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_QueryPoolResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryPoolResponse.pool": - x.Pool = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolResponse 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_QueryPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.QueryPoolResponse.pool": - value := x.Pool - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolResponse 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_QueryPoolResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryPoolResponse.pool": - x.Pool = value.Message().Interface().(*Pool) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolResponse 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_QueryPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryPoolResponse.pool": - if x.Pool == nil { - x.Pool = new(Pool) - } - return protoreflect.ValueOfMessage(x.Pool.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolResponse 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_QueryPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.QueryPoolResponse.pool": - m := new(Pool) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryPoolResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.QueryPoolResponse 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_QueryPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.QueryPoolResponse", 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_QueryPoolResponse) 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_QueryPoolResponse) 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_QueryPoolResponse) 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_QueryPoolResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPoolResponse) - 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.Pool != nil { - l = options.Size(x.Pool) - 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().(*QueryPoolResponse) - 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.Pool != nil { - encoded, err := options.Marshal(x.Pool) - 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().(*QueryPoolResponse) - 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: QueryPoolResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPoolResponse: 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 Pool", 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.Pool == nil { - x.Pool = &Pool{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pool); 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_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_staking_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -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_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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -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_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.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_staking_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_staking_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_staking_v1beta1_query_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_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.staking.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.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.staking.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.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.staking.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.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.staking.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.staking.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.staking.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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/staking/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryValidatorsRequest is request type for Query/Validators RPC method. -type QueryValidatorsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // status enables to query for validators matching a given status. - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorsRequest) Reset() { - *x = QueryValidatorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorsRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorsRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryValidatorsRequest) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *QueryValidatorsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -type QueryValidatorsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validators contains all the queried validators. - Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorsResponse) Reset() { - *x = QueryValidatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorsResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorsResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryValidatorsResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *QueryValidatorsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryValidatorRequest is response type for the Query/Validator RPC method -type QueryValidatorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_addr defines the validator address to query for. - ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` -} - -func (x *QueryValidatorRequest) Reset() { - *x = QueryValidatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryValidatorRequest) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -type QueryValidatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator defines the the validator info. - Validator *Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (x *QueryValidatorResponse) Reset() { - *x = QueryValidatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryValidatorResponse) GetValidator() *Validator { - if x != nil { - return x.Validator - } - return nil -} - -// QueryValidatorDelegationsRequest is request type for the -// Query/ValidatorDelegations RPC method -type QueryValidatorDelegationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_addr defines the validator address to query for. - ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorDelegationsRequest) Reset() { - *x = QueryValidatorDelegationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorDelegationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorDelegationsRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorDelegationsRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorDelegationsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryValidatorDelegationsRequest) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -func (x *QueryValidatorDelegationsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -type QueryValidatorDelegationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegationResponses []*DelegationResponse `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3" json:"delegation_responses,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorDelegationsResponse) Reset() { - *x = QueryValidatorDelegationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorDelegationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorDelegationsResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorDelegationsResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorDelegationsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryValidatorDelegationsResponse) GetDelegationResponses() []*DelegationResponse { - if x != nil { - return x.DelegationResponses - } - return nil -} - -func (x *QueryValidatorDelegationsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryValidatorUnbondingDelegationsRequest is required type for the -// Query/ValidatorUnbondingDelegations RPC method -type QueryValidatorUnbondingDelegationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_addr defines the validator address to query for. - ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorUnbondingDelegationsRequest) Reset() { - *x = QueryValidatorUnbondingDelegationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorUnbondingDelegationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorUnbondingDelegationsRequest) ProtoMessage() {} - -// Deprecated: Use QueryValidatorUnbondingDelegationsRequest.ProtoReflect.Descriptor instead. -func (*QueryValidatorUnbondingDelegationsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryValidatorUnbondingDelegationsRequest) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -func (x *QueryValidatorUnbondingDelegationsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -type QueryValidatorUnbondingDelegationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UnbondingResponses []*UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryValidatorUnbondingDelegationsResponse) Reset() { - *x = QueryValidatorUnbondingDelegationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryValidatorUnbondingDelegationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryValidatorUnbondingDelegationsResponse) ProtoMessage() {} - -// Deprecated: Use QueryValidatorUnbondingDelegationsResponse.ProtoReflect.Descriptor instead. -func (*QueryValidatorUnbondingDelegationsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryValidatorUnbondingDelegationsResponse) GetUnbondingResponses() []*UnbondingDelegation { - if x != nil { - return x.UnbondingResponses - } - return nil -} - -func (x *QueryValidatorUnbondingDelegationsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegationRequest is request type for the Query/Delegation RPC method. -type QueryDelegationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // validator_addr defines the validator address to query for. - ValidatorAddr string `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` -} - -func (x *QueryDelegationRequest) Reset() { - *x = QueryDelegationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegationRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegationRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegationRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryDelegationRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryDelegationRequest) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -type QueryDelegationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegation_responses defines the delegation info of a delegation. - DelegationResponse *DelegationResponse `protobuf:"bytes,1,opt,name=delegation_response,json=delegationResponse,proto3" json:"delegation_response,omitempty"` -} - -func (x *QueryDelegationResponse) Reset() { - *x = QueryDelegationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegationResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegationResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryDelegationResponse) GetDelegationResponse() *DelegationResponse { - if x != nil { - return x.DelegationResponse - } - return nil -} - -// QueryUnbondingDelegationRequest is request type for the -// Query/UnbondingDelegation RPC method. -type QueryUnbondingDelegationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // validator_addr defines the validator address to query for. - ValidatorAddr string `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` -} - -func (x *QueryUnbondingDelegationRequest) Reset() { - *x = QueryUnbondingDelegationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryUnbondingDelegationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryUnbondingDelegationRequest) ProtoMessage() {} - -// Deprecated: Use QueryUnbondingDelegationRequest.ProtoReflect.Descriptor instead. -func (*QueryUnbondingDelegationRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryUnbondingDelegationRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryUnbondingDelegationRequest) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -type QueryUnbondingDelegationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // unbond defines the unbonding information of a delegation. - Unbond *UnbondingDelegation `protobuf:"bytes,1,opt,name=unbond,proto3" json:"unbond,omitempty"` -} - -func (x *QueryUnbondingDelegationResponse) Reset() { - *x = QueryUnbondingDelegationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryUnbondingDelegationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryUnbondingDelegationResponse) ProtoMessage() {} - -// Deprecated: Use QueryUnbondingDelegationResponse.ProtoReflect.Descriptor instead. -func (*QueryUnbondingDelegationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryUnbondingDelegationResponse) GetUnbond() *UnbondingDelegation { - if x != nil { - return x.Unbond - } - return nil -} - -// QueryDelegatorDelegationsRequest is request type for the -// Query/DelegatorDelegations RPC method. -type QueryDelegatorDelegationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDelegatorDelegationsRequest) Reset() { - *x = QueryDelegatorDelegationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorDelegationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorDelegationsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorDelegationsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorDelegationsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryDelegatorDelegationsRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryDelegatorDelegationsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -type QueryDelegatorDelegationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegation_responses defines all the delegations' info of a delegator. - DelegationResponses []*DelegationResponse `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3" json:"delegation_responses,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDelegatorDelegationsResponse) Reset() { - *x = QueryDelegatorDelegationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorDelegationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorDelegationsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorDelegationsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorDelegationsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryDelegatorDelegationsResponse) GetDelegationResponses() []*DelegationResponse { - if x != nil { - return x.DelegationResponses - } - return nil -} - -func (x *QueryDelegatorDelegationsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegatorUnbondingDelegationsRequest is request type for the -// Query/DelegatorUnbondingDelegations RPC method. -type QueryDelegatorUnbondingDelegationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDelegatorUnbondingDelegationsRequest) Reset() { - *x = QueryDelegatorUnbondingDelegationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorUnbondingDelegationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorUnbondingDelegationsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorUnbondingDelegationsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorUnbondingDelegationsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryDelegatorUnbondingDelegationsRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryDelegatorUnbondingDelegationsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -type QueryDelegatorUnbondingDelegationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UnbondingResponses []*UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDelegatorUnbondingDelegationsResponse) Reset() { - *x = QueryDelegatorUnbondingDelegationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorUnbondingDelegationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorUnbondingDelegationsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorUnbondingDelegationsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorUnbondingDelegationsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryDelegatorUnbondingDelegationsResponse) GetUnbondingResponses() []*UnbondingDelegation { - if x != nil { - return x.UnbondingResponses - } - return nil -} - -func (x *QueryDelegatorUnbondingDelegationsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -// method. -type QueryRedelegationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // src_validator_addr defines the validator address to redelegate from. - SrcValidatorAddr string `protobuf:"bytes,2,opt,name=src_validator_addr,json=srcValidatorAddr,proto3" json:"src_validator_addr,omitempty"` - // dst_validator_addr defines the validator address to redelegate to. - DstValidatorAddr string `protobuf:"bytes,3,opt,name=dst_validator_addr,json=dstValidatorAddr,proto3" json:"dst_validator_addr,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryRedelegationsRequest) Reset() { - *x = QueryRedelegationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRedelegationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRedelegationsRequest) ProtoMessage() {} - -// Deprecated: Use QueryRedelegationsRequest.ProtoReflect.Descriptor instead. -func (*QueryRedelegationsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryRedelegationsRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryRedelegationsRequest) GetSrcValidatorAddr() string { - if x != nil { - return x.SrcValidatorAddr - } - return "" -} - -func (x *QueryRedelegationsRequest) GetDstValidatorAddr() string { - if x != nil { - return x.DstValidatorAddr - } - return "" -} - -func (x *QueryRedelegationsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -type QueryRedelegationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RedelegationResponses []*RedelegationResponse `protobuf:"bytes,1,rep,name=redelegation_responses,json=redelegationResponses,proto3" json:"redelegation_responses,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryRedelegationsResponse) Reset() { - *x = QueryRedelegationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRedelegationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRedelegationsResponse) ProtoMessage() {} - -// Deprecated: Use QueryRedelegationsResponse.ProtoReflect.Descriptor instead. -func (*QueryRedelegationsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryRedelegationsResponse) GetRedelegationResponses() []*RedelegationResponse { - if x != nil { - return x.RedelegationResponses - } - return nil -} - -func (x *QueryRedelegationsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegatorValidatorsRequest is request type for the -// Query/DelegatorValidators RPC method. -type QueryDelegatorValidatorsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDelegatorValidatorsRequest) Reset() { - *x = QueryDelegatorValidatorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorValidatorsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorValidatorsRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorValidatorsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorValidatorsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryDelegatorValidatorsRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryDelegatorValidatorsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -type QueryDelegatorValidatorsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validators defines the the validators' info of a delegator. - Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryDelegatorValidatorsResponse) Reset() { - *x = QueryDelegatorValidatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorValidatorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorValidatorsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryDelegatorValidatorsResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *QueryDelegatorValidatorsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryDelegatorValidatorRequest is request type for the -// Query/DelegatorValidator RPC method. -type QueryDelegatorValidatorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_addr defines the delegator address to query for. - DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` - // validator_addr defines the validator address to query for. - ValidatorAddr string `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` -} - -func (x *QueryDelegatorValidatorRequest) Reset() { - *x = QueryDelegatorValidatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorValidatorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorValidatorRequest) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorValidatorRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorValidatorRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{20} -} - -func (x *QueryDelegatorValidatorRequest) GetDelegatorAddr() string { - if x != nil { - return x.DelegatorAddr - } - return "" -} - -func (x *QueryDelegatorValidatorRequest) GetValidatorAddr() string { - if x != nil { - return x.ValidatorAddr - } - return "" -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -type QueryDelegatorValidatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator defines the the validator info. - Validator *Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (x *QueryDelegatorValidatorResponse) Reset() { - *x = QueryDelegatorValidatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDelegatorValidatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDelegatorValidatorResponse) ProtoMessage() {} - -// Deprecated: Use QueryDelegatorValidatorResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorValidatorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{21} -} - -func (x *QueryDelegatorValidatorResponse) GetValidator() *Validator { - if x != nil { - return x.Validator - } - return nil -} - -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -// method. -type QueryHistoricalInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // height defines at which height to query the historical info. - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *QueryHistoricalInfoRequest) Reset() { - *x = QueryHistoricalInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryHistoricalInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryHistoricalInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryHistoricalInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryHistoricalInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{22} -} - -func (x *QueryHistoricalInfoRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -type QueryHistoricalInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // hist defines the historical info at the given height. - Hist *HistoricalInfo `protobuf:"bytes,1,opt,name=hist,proto3" json:"hist,omitempty"` -} - -func (x *QueryHistoricalInfoResponse) Reset() { - *x = QueryHistoricalInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryHistoricalInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryHistoricalInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryHistoricalInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryHistoricalInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{23} -} - -func (x *QueryHistoricalInfoResponse) GetHist() *HistoricalInfo { - if x != nil { - return x.Hist - } - return nil -} - -// QueryPoolRequest is request type for the Query/Pool RPC method. -type QueryPoolRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryPoolRequest) Reset() { - *x = QueryPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryPoolRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryPoolRequest) ProtoMessage() {} - -// Deprecated: Use QueryPoolRequest.ProtoReflect.Descriptor instead. -func (*QueryPoolRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{24} -} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -type QueryPoolResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pool defines the pool info. - Pool *Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"` -} - -func (x *QueryPoolResponse) Reset() { - *x = QueryPoolResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryPoolResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryPoolResponse) ProtoMessage() {} - -// Deprecated: Use QueryPoolResponse.ProtoReflect.Descriptor instead. -func (*QueryPoolResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{25} -} - -func (x *QueryPoolResponse) GetPool() *Pool { - if x != nil { - return x.Pool - } - return nil -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{26} -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params holds all the parameters of this module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_query_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_query_proto_rawDescGZIP(), []int{27} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -var File_cosmos_staking_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_staking_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, - 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, - 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, - 0x5f, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0xab, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe8, - 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1b, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x52, 0x13, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb4, 0x01, 0x0a, 0x29, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xd9, 0x01, 0x0a, 0x2a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x62, 0x0a, 0x13, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x12, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa4, 0x01, 0x0a, - 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x22, 0x76, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, - 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x1f, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x6d, 0x0a, 0x20, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x49, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x20, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x00, 0x22, 0xd1, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd9, 0x01, 0x0a, 0x2a, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x13, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x12, 0x46, 0x0a, 0x12, 0x73, 0x72, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x73, 0x72, 0x63, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x12, 0x64, 0x73, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x10, 0x64, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd0, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x16, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x47, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb4, 0x01, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb4, - 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xac, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x68, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x34, - 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x22, 0x59, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x68, 0x69, 0x73, 0x74, 0x22, - 0x12, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, - 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 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, 0x32, 0xea, 0x15, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x99, 0x01, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0xa7, 0x01, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xd4, 0x01, 0x0a, 0x14, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x41, 0x12, 0x3f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0xf9, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xc7, - 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x12, 0x50, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xf7, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x67, 0x12, 0x65, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, - 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, - 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0xc9, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0xf9, - 0x01, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x41, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, - 0x49, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xc1, 0x01, 0x0a, 0x0d, 0x52, - 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x12, 0x41, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, - 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, - 0x2f, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xd0, - 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x40, 0x12, 0x3e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0xde, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x51, 0x12, 0x4f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x7d, 0x12, 0xb3, 0x01, 0x0a, 0x0e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, - 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x6f, - 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x89, 0x01, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 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, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 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, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xea, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_staking_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_staking_v1beta1_query_proto_rawDescData = file_cosmos_staking_v1beta1_query_proto_rawDesc -) - -func file_cosmos_staking_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_staking_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_staking_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_staking_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_staking_v1beta1_query_proto_rawDescData -} - -var file_cosmos_staking_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_cosmos_staking_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryValidatorsRequest)(nil), // 0: cosmos.staking.v1beta1.QueryValidatorsRequest - (*QueryValidatorsResponse)(nil), // 1: cosmos.staking.v1beta1.QueryValidatorsResponse - (*QueryValidatorRequest)(nil), // 2: cosmos.staking.v1beta1.QueryValidatorRequest - (*QueryValidatorResponse)(nil), // 3: cosmos.staking.v1beta1.QueryValidatorResponse - (*QueryValidatorDelegationsRequest)(nil), // 4: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest - (*QueryValidatorDelegationsResponse)(nil), // 5: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse - (*QueryValidatorUnbondingDelegationsRequest)(nil), // 6: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest - (*QueryValidatorUnbondingDelegationsResponse)(nil), // 7: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse - (*QueryDelegationRequest)(nil), // 8: cosmos.staking.v1beta1.QueryDelegationRequest - (*QueryDelegationResponse)(nil), // 9: cosmos.staking.v1beta1.QueryDelegationResponse - (*QueryUnbondingDelegationRequest)(nil), // 10: cosmos.staking.v1beta1.QueryUnbondingDelegationRequest - (*QueryUnbondingDelegationResponse)(nil), // 11: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse - (*QueryDelegatorDelegationsRequest)(nil), // 12: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest - (*QueryDelegatorDelegationsResponse)(nil), // 13: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse - (*QueryDelegatorUnbondingDelegationsRequest)(nil), // 14: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest - (*QueryDelegatorUnbondingDelegationsResponse)(nil), // 15: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse - (*QueryRedelegationsRequest)(nil), // 16: cosmos.staking.v1beta1.QueryRedelegationsRequest - (*QueryRedelegationsResponse)(nil), // 17: cosmos.staking.v1beta1.QueryRedelegationsResponse - (*QueryDelegatorValidatorsRequest)(nil), // 18: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest - (*QueryDelegatorValidatorsResponse)(nil), // 19: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse - (*QueryDelegatorValidatorRequest)(nil), // 20: cosmos.staking.v1beta1.QueryDelegatorValidatorRequest - (*QueryDelegatorValidatorResponse)(nil), // 21: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse - (*QueryHistoricalInfoRequest)(nil), // 22: cosmos.staking.v1beta1.QueryHistoricalInfoRequest - (*QueryHistoricalInfoResponse)(nil), // 23: cosmos.staking.v1beta1.QueryHistoricalInfoResponse - (*QueryPoolRequest)(nil), // 24: cosmos.staking.v1beta1.QueryPoolRequest - (*QueryPoolResponse)(nil), // 25: cosmos.staking.v1beta1.QueryPoolResponse - (*QueryParamsRequest)(nil), // 26: cosmos.staking.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 27: cosmos.staking.v1beta1.QueryParamsResponse - (*v1beta1.PageRequest)(nil), // 28: cosmos.base.query.v1beta1.PageRequest - (*Validator)(nil), // 29: cosmos.staking.v1beta1.Validator - (*v1beta1.PageResponse)(nil), // 30: cosmos.base.query.v1beta1.PageResponse - (*DelegationResponse)(nil), // 31: cosmos.staking.v1beta1.DelegationResponse - (*UnbondingDelegation)(nil), // 32: cosmos.staking.v1beta1.UnbondingDelegation - (*RedelegationResponse)(nil), // 33: cosmos.staking.v1beta1.RedelegationResponse - (*HistoricalInfo)(nil), // 34: cosmos.staking.v1beta1.HistoricalInfo - (*Pool)(nil), // 35: cosmos.staking.v1beta1.Pool - (*Params)(nil), // 36: cosmos.staking.v1beta1.Params -} -var file_cosmos_staking_v1beta1_query_proto_depIdxs = []int32{ - 28, // 0: cosmos.staking.v1beta1.QueryValidatorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 29, // 1: cosmos.staking.v1beta1.QueryValidatorsResponse.validators:type_name -> cosmos.staking.v1beta1.Validator - 30, // 2: cosmos.staking.v1beta1.QueryValidatorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 29, // 3: cosmos.staking.v1beta1.QueryValidatorResponse.validator:type_name -> cosmos.staking.v1beta1.Validator - 28, // 4: cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 31, // 5: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegation_responses:type_name -> cosmos.staking.v1beta1.DelegationResponse - 30, // 6: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 7: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 32, // 8: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbonding_responses:type_name -> cosmos.staking.v1beta1.UnbondingDelegation - 30, // 9: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 31, // 10: cosmos.staking.v1beta1.QueryDelegationResponse.delegation_response:type_name -> cosmos.staking.v1beta1.DelegationResponse - 32, // 11: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond:type_name -> cosmos.staking.v1beta1.UnbondingDelegation - 28, // 12: cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 31, // 13: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegation_responses:type_name -> cosmos.staking.v1beta1.DelegationResponse - 30, // 14: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 15: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 32, // 16: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbonding_responses:type_name -> cosmos.staking.v1beta1.UnbondingDelegation - 30, // 17: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 18: cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 33, // 19: cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegation_responses:type_name -> cosmos.staking.v1beta1.RedelegationResponse - 30, // 20: cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 21: cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 29, // 22: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators:type_name -> cosmos.staking.v1beta1.Validator - 30, // 23: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 29, // 24: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator:type_name -> cosmos.staking.v1beta1.Validator - 34, // 25: cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist:type_name -> cosmos.staking.v1beta1.HistoricalInfo - 35, // 26: cosmos.staking.v1beta1.QueryPoolResponse.pool:type_name -> cosmos.staking.v1beta1.Pool - 36, // 27: cosmos.staking.v1beta1.QueryParamsResponse.params:type_name -> cosmos.staking.v1beta1.Params - 0, // 28: cosmos.staking.v1beta1.Query.Validators:input_type -> cosmos.staking.v1beta1.QueryValidatorsRequest - 2, // 29: cosmos.staking.v1beta1.Query.Validator:input_type -> cosmos.staking.v1beta1.QueryValidatorRequest - 4, // 30: cosmos.staking.v1beta1.Query.ValidatorDelegations:input_type -> cosmos.staking.v1beta1.QueryValidatorDelegationsRequest - 6, // 31: cosmos.staking.v1beta1.Query.ValidatorUnbondingDelegations:input_type -> cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest - 8, // 32: cosmos.staking.v1beta1.Query.Delegation:input_type -> cosmos.staking.v1beta1.QueryDelegationRequest - 10, // 33: cosmos.staking.v1beta1.Query.UnbondingDelegation:input_type -> cosmos.staking.v1beta1.QueryUnbondingDelegationRequest - 12, // 34: cosmos.staking.v1beta1.Query.DelegatorDelegations:input_type -> cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest - 14, // 35: cosmos.staking.v1beta1.Query.DelegatorUnbondingDelegations:input_type -> cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest - 16, // 36: cosmos.staking.v1beta1.Query.Redelegations:input_type -> cosmos.staking.v1beta1.QueryRedelegationsRequest - 18, // 37: cosmos.staking.v1beta1.Query.DelegatorValidators:input_type -> cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest - 20, // 38: cosmos.staking.v1beta1.Query.DelegatorValidator:input_type -> cosmos.staking.v1beta1.QueryDelegatorValidatorRequest - 22, // 39: cosmos.staking.v1beta1.Query.HistoricalInfo:input_type -> cosmos.staking.v1beta1.QueryHistoricalInfoRequest - 24, // 40: cosmos.staking.v1beta1.Query.Pool:input_type -> cosmos.staking.v1beta1.QueryPoolRequest - 26, // 41: cosmos.staking.v1beta1.Query.Params:input_type -> cosmos.staking.v1beta1.QueryParamsRequest - 1, // 42: cosmos.staking.v1beta1.Query.Validators:output_type -> cosmos.staking.v1beta1.QueryValidatorsResponse - 3, // 43: cosmos.staking.v1beta1.Query.Validator:output_type -> cosmos.staking.v1beta1.QueryValidatorResponse - 5, // 44: cosmos.staking.v1beta1.Query.ValidatorDelegations:output_type -> cosmos.staking.v1beta1.QueryValidatorDelegationsResponse - 7, // 45: cosmos.staking.v1beta1.Query.ValidatorUnbondingDelegations:output_type -> cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse - 9, // 46: cosmos.staking.v1beta1.Query.Delegation:output_type -> cosmos.staking.v1beta1.QueryDelegationResponse - 11, // 47: cosmos.staking.v1beta1.Query.UnbondingDelegation:output_type -> cosmos.staking.v1beta1.QueryUnbondingDelegationResponse - 13, // 48: cosmos.staking.v1beta1.Query.DelegatorDelegations:output_type -> cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse - 15, // 49: cosmos.staking.v1beta1.Query.DelegatorUnbondingDelegations:output_type -> cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse - 17, // 50: cosmos.staking.v1beta1.Query.Redelegations:output_type -> cosmos.staking.v1beta1.QueryRedelegationsResponse - 19, // 51: cosmos.staking.v1beta1.Query.DelegatorValidators:output_type -> cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse - 21, // 52: cosmos.staking.v1beta1.Query.DelegatorValidator:output_type -> cosmos.staking.v1beta1.QueryDelegatorValidatorResponse - 23, // 53: cosmos.staking.v1beta1.Query.HistoricalInfo:output_type -> cosmos.staking.v1beta1.QueryHistoricalInfoResponse - 25, // 54: cosmos.staking.v1beta1.Query.Pool:output_type -> cosmos.staking.v1beta1.QueryPoolResponse - 27, // 55: cosmos.staking.v1beta1.Query.Params:output_type -> cosmos.staking.v1beta1.QueryParamsResponse - 42, // [42:56] is the sub-list for method output_type - 28, // [28:42] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name -} - -func init() { file_cosmos_staking_v1beta1_query_proto_init() } -func file_cosmos_staking_v1beta1_query_proto_init() { - if File_cosmos_staking_v1beta1_query_proto != nil { - return - } - file_cosmos_staking_v1beta1_staking_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_staking_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorDelegationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorDelegationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorUnbondingDelegationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryValidatorUnbondingDelegationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUnbondingDelegationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUnbondingDelegationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorDelegationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorDelegationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorUnbondingDelegationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorUnbondingDelegationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRedelegationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRedelegationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorValidatorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorValidatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorValidatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorValidatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryHistoricalInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryHistoricalInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPoolResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_query_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_staking_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 28, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_staking_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_staking_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_staking_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_staking_v1beta1_query_proto = out.File - file_cosmos_staking_v1beta1_query_proto_rawDesc = nil - file_cosmos_staking_v1beta1_query_proto_goTypes = nil - file_cosmos_staking_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/staking/v1beta1/query_grpc.pb.go b/api/cosmos/staking/v1beta1/query_grpc.pb.go deleted file mode 100644 index 8e5534545a50..000000000000 --- a/api/cosmos/staking/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,609 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/staking/v1beta1/query.proto - -package stakingv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Validators queries all validators that match the given status. - Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) - // Validator queries validator info for given validator address. - Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) - // ValidatorDelegations queries delegate info for given validator. - ValidatorDelegations(ctx context.Context, in *QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorDelegationsResponse, error) - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) - // Delegation queries delegate info for given validator delegator pair. - Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) - // DelegatorDelegations queries all delegations of a given delegator address. - DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) - // Redelegations queries redelegations of given address. - Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) - // DelegatorValidators queries all validators info for given delegator - // address. - DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) - // DelegatorValidator queries validator info for given delegator validator - // pair. - DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) - // HistoricalInfo queries the historical info for given height. - HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) - // Pool queries the pool info. - Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) - // Parameters queries the staking parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) { - out := new(QueryValidatorsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Validators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) { - out := new(QueryValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Validator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ValidatorDelegations(ctx context.Context, in *QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorDelegationsResponse, error) { - out := new(QueryValidatorDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/ValidatorDelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) { - out := new(QueryValidatorUnbondingDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) { - out := new(QueryDelegationResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Delegation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) { - out := new(QueryUnbondingDelegationResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/UnbondingDelegation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) { - out := new(QueryDelegatorDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorDelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) { - out := new(QueryDelegatorUnbondingDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) { - out := new(QueryRedelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Redelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { - out := new(QueryDelegatorValidatorsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) { - out := new(QueryDelegatorValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) { - out := new(QueryHistoricalInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/HistoricalInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { - out := new(QueryPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Pool", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Validators queries all validators that match the given status. - Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) - // Validator queries validator info for given validator address. - Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) - // ValidatorDelegations queries delegate info for given validator. - ValidatorDelegations(context.Context, *QueryValidatorDelegationsRequest) (*QueryValidatorDelegationsResponse, error) - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - ValidatorUnbondingDelegations(context.Context, *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) - // Delegation queries delegate info for given validator delegator pair. - Delegation(context.Context, *QueryDelegationRequest) (*QueryDelegationResponse, error) - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - UnbondingDelegation(context.Context, *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) - // DelegatorDelegations queries all delegations of a given delegator address. - DelegatorDelegations(context.Context, *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - DelegatorUnbondingDelegations(context.Context, *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) - // Redelegations queries redelegations of given address. - Redelegations(context.Context, *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) - // DelegatorValidators queries all validators info for given delegator - // address. - DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) - // DelegatorValidator queries validator info for given delegator validator - // pair. - DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) - // HistoricalInfo queries the historical info for given height. - HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) - // Pool queries the pool info. - Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) - // Parameters queries the staking parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validators not implemented") -} -func (UnimplementedQueryServer) Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validator not implemented") -} -func (UnimplementedQueryServer) ValidatorDelegations(context.Context, *QueryValidatorDelegationsRequest) (*QueryValidatorDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorDelegations not implemented") -} -func (UnimplementedQueryServer) ValidatorUnbondingDelegations(context.Context, *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorUnbondingDelegations not implemented") -} -func (UnimplementedQueryServer) Delegation(context.Context, *QueryDelegationRequest) (*QueryDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delegation not implemented") -} -func (UnimplementedQueryServer) UnbondingDelegation(context.Context, *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnbondingDelegation not implemented") -} -func (UnimplementedQueryServer) DelegatorDelegations(context.Context, *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorDelegations not implemented") -} -func (UnimplementedQueryServer) DelegatorUnbondingDelegations(context.Context, *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorUnbondingDelegations not implemented") -} -func (UnimplementedQueryServer) Redelegations(context.Context, *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Redelegations not implemented") -} -func (UnimplementedQueryServer) DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidators not implemented") -} -func (UnimplementedQueryServer) DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidator not implemented") -} -func (UnimplementedQueryServer) HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HistoricalInfo not implemented") -} -func (UnimplementedQueryServer) Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") -} -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Validators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Validators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Validators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Validators(ctx, req.(*QueryValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Validator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Validator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Validator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Validator(ctx, req.(*QueryValidatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ValidatorDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/ValidatorDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorDelegations(ctx, req.(*QueryValidatorDelegationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ValidatorUnbondingDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorUnbondingDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorUnbondingDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorUnbondingDelegations(ctx, req.(*QueryValidatorUnbondingDelegationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Delegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Delegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Delegation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Delegation(ctx, req.(*QueryDelegationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UnbondingDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUnbondingDelegationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnbondingDelegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/UnbondingDelegation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnbondingDelegation(ctx, req.(*QueryUnbondingDelegationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegatorDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorDelegations(ctx, req.(*QueryDelegatorDelegationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegatorUnbondingDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorUnbondingDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorUnbondingDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorUnbondingDelegations(ctx, req.(*QueryDelegatorUnbondingDelegationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Redelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRedelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Redelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Redelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Redelegations(ctx, req.(*QueryRedelegationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegatorValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorValidators(ctx, req.(*QueryDelegatorValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegatorValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorValidator(ctx, req.(*QueryDelegatorValidatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_HistoricalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryHistoricalInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HistoricalInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/HistoricalInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HistoricalInfo(ctx, req.(*QueryHistoricalInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPoolRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Pool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Pool", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.staking.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Validators", - Handler: _Query_Validators_Handler, - }, - { - MethodName: "Validator", - Handler: _Query_Validator_Handler, - }, - { - MethodName: "ValidatorDelegations", - Handler: _Query_ValidatorDelegations_Handler, - }, - { - MethodName: "ValidatorUnbondingDelegations", - Handler: _Query_ValidatorUnbondingDelegations_Handler, - }, - { - MethodName: "Delegation", - Handler: _Query_Delegation_Handler, - }, - { - MethodName: "UnbondingDelegation", - Handler: _Query_UnbondingDelegation_Handler, - }, - { - MethodName: "DelegatorDelegations", - Handler: _Query_DelegatorDelegations_Handler, - }, - { - MethodName: "DelegatorUnbondingDelegations", - Handler: _Query_DelegatorUnbondingDelegations_Handler, - }, - { - MethodName: "Redelegations", - Handler: _Query_Redelegations_Handler, - }, - { - MethodName: "DelegatorValidators", - Handler: _Query_DelegatorValidators_Handler, - }, - { - MethodName: "DelegatorValidator", - Handler: _Query_DelegatorValidator_Handler, - }, - { - MethodName: "HistoricalInfo", - Handler: _Query_HistoricalInfo_Handler, - }, - { - MethodName: "Pool", - Handler: _Query_Pool_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/staking/v1beta1/query.proto", -} diff --git a/api/cosmos/staking/v1beta1/staking.pulsar.go b/api/cosmos/staking/v1beta1/staking.pulsar.go deleted file mode 100644 index 2749d9b921c8..000000000000 --- a/api/cosmos/staking/v1beta1/staking.pulsar.go +++ /dev/null @@ -1,13674 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - types "github.com/cosmos/cosmos-sdk/api/tendermint/types" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_HistoricalInfo_2_list)(nil) - -type _HistoricalInfo_2_list struct { - list *[]*Validator -} - -func (x *_HistoricalInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_HistoricalInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_HistoricalInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_HistoricalInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_HistoricalInfo_2_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_HistoricalInfo_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_HistoricalInfo_2_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_HistoricalInfo_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_HistoricalInfo protoreflect.MessageDescriptor - fd_HistoricalInfo_header protoreflect.FieldDescriptor - fd_HistoricalInfo_valset protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_HistoricalInfo = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("HistoricalInfo") - fd_HistoricalInfo_header = md_HistoricalInfo.Fields().ByName("header") - fd_HistoricalInfo_valset = md_HistoricalInfo.Fields().ByName("valset") -} - -var _ protoreflect.Message = (*fastReflection_HistoricalInfo)(nil) - -type fastReflection_HistoricalInfo HistoricalInfo - -func (x *HistoricalInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_HistoricalInfo)(x) -} - -func (x *HistoricalInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_HistoricalInfo_messageType fastReflection_HistoricalInfo_messageType -var _ protoreflect.MessageType = fastReflection_HistoricalInfo_messageType{} - -type fastReflection_HistoricalInfo_messageType struct{} - -func (x fastReflection_HistoricalInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_HistoricalInfo)(nil) -} -func (x fastReflection_HistoricalInfo_messageType) New() protoreflect.Message { - return new(fastReflection_HistoricalInfo) -} -func (x fastReflection_HistoricalInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HistoricalInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HistoricalInfo) Descriptor() protoreflect.MessageDescriptor { - return md_HistoricalInfo -} - -// 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_HistoricalInfo) Type() protoreflect.MessageType { - return _fastReflection_HistoricalInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HistoricalInfo) New() protoreflect.Message { - return new(fastReflection_HistoricalInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HistoricalInfo) Interface() protoreflect.ProtoMessage { - return (*HistoricalInfo)(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_HistoricalInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Header != nil { - value := protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - if !f(fd_HistoricalInfo_header, value) { - return - } - } - if len(x.Valset) != 0 { - value := protoreflect.ValueOfList(&_HistoricalInfo_2_list{list: &x.Valset}) - if !f(fd_HistoricalInfo_valset, 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_HistoricalInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.HistoricalInfo.header": - return x.Header != nil - case "cosmos.staking.v1beta1.HistoricalInfo.valset": - return len(x.Valset) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.HistoricalInfo")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.HistoricalInfo 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_HistoricalInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.HistoricalInfo.header": - x.Header = nil - case "cosmos.staking.v1beta1.HistoricalInfo.valset": - x.Valset = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.HistoricalInfo")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.HistoricalInfo 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_HistoricalInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.HistoricalInfo.header": - value := x.Header - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.HistoricalInfo.valset": - if len(x.Valset) == 0 { - return protoreflect.ValueOfList(&_HistoricalInfo_2_list{}) - } - listValue := &_HistoricalInfo_2_list{list: &x.Valset} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.HistoricalInfo")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.HistoricalInfo 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_HistoricalInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.HistoricalInfo.header": - x.Header = value.Message().Interface().(*types.Header) - case "cosmos.staking.v1beta1.HistoricalInfo.valset": - lv := value.List() - clv := lv.(*_HistoricalInfo_2_list) - x.Valset = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.HistoricalInfo")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.HistoricalInfo 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_HistoricalInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.HistoricalInfo.header": - if x.Header == nil { - x.Header = new(types.Header) - } - return protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - case "cosmos.staking.v1beta1.HistoricalInfo.valset": - if x.Valset == nil { - x.Valset = []*Validator{} - } - value := &_HistoricalInfo_2_list{list: &x.Valset} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.HistoricalInfo")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.HistoricalInfo 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_HistoricalInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.HistoricalInfo.header": - m := new(types.Header) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.HistoricalInfo.valset": - list := []*Validator{} - return protoreflect.ValueOfList(&_HistoricalInfo_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.HistoricalInfo")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.HistoricalInfo 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_HistoricalInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.HistoricalInfo", 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_HistoricalInfo) 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_HistoricalInfo) 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_HistoricalInfo) 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_HistoricalInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HistoricalInfo) - 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.Header != nil { - l = options.Size(x.Header) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Valset) > 0 { - for _, e := range x.Valset { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*HistoricalInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Valset) > 0 { - for iNdEx := len(x.Valset) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Valset[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Header != nil { - encoded, err := options.Marshal(x.Header) - 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().(*HistoricalInfo) - 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: HistoricalInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HistoricalInfo: 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 Header", 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.Header == nil { - x.Header = &types.Header{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Header); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Valset = append(x.Valset, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Valset[len(x.Valset)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_CommissionRates protoreflect.MessageDescriptor - fd_CommissionRates_rate protoreflect.FieldDescriptor - fd_CommissionRates_max_rate protoreflect.FieldDescriptor - fd_CommissionRates_max_change_rate protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_CommissionRates = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("CommissionRates") - fd_CommissionRates_rate = md_CommissionRates.Fields().ByName("rate") - fd_CommissionRates_max_rate = md_CommissionRates.Fields().ByName("max_rate") - fd_CommissionRates_max_change_rate = md_CommissionRates.Fields().ByName("max_change_rate") -} - -var _ protoreflect.Message = (*fastReflection_CommissionRates)(nil) - -type fastReflection_CommissionRates CommissionRates - -func (x *CommissionRates) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommissionRates)(x) -} - -func (x *CommissionRates) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommissionRates_messageType fastReflection_CommissionRates_messageType -var _ protoreflect.MessageType = fastReflection_CommissionRates_messageType{} - -type fastReflection_CommissionRates_messageType struct{} - -func (x fastReflection_CommissionRates_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommissionRates)(nil) -} -func (x fastReflection_CommissionRates_messageType) New() protoreflect.Message { - return new(fastReflection_CommissionRates) -} -func (x fastReflection_CommissionRates_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommissionRates -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommissionRates) Descriptor() protoreflect.MessageDescriptor { - return md_CommissionRates -} - -// 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_CommissionRates) Type() protoreflect.MessageType { - return _fastReflection_CommissionRates_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommissionRates) New() protoreflect.Message { - return new(fastReflection_CommissionRates) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommissionRates) Interface() protoreflect.ProtoMessage { - return (*CommissionRates)(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_CommissionRates) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Rate != "" { - value := protoreflect.ValueOfString(x.Rate) - if !f(fd_CommissionRates_rate, value) { - return - } - } - if x.MaxRate != "" { - value := protoreflect.ValueOfString(x.MaxRate) - if !f(fd_CommissionRates_max_rate, value) { - return - } - } - if x.MaxChangeRate != "" { - value := protoreflect.ValueOfString(x.MaxChangeRate) - if !f(fd_CommissionRates_max_change_rate, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_CommissionRates) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.CommissionRates.rate": - return x.Rate != "" - case "cosmos.staking.v1beta1.CommissionRates.max_rate": - return x.MaxRate != "" - case "cosmos.staking.v1beta1.CommissionRates.max_change_rate": - return x.MaxChangeRate != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.CommissionRates")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.CommissionRates 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_CommissionRates) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.CommissionRates.rate": - x.Rate = "" - case "cosmos.staking.v1beta1.CommissionRates.max_rate": - x.MaxRate = "" - case "cosmos.staking.v1beta1.CommissionRates.max_change_rate": - x.MaxChangeRate = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.CommissionRates")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.CommissionRates 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_CommissionRates) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.CommissionRates.rate": - value := x.Rate - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.CommissionRates.max_rate": - value := x.MaxRate - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.CommissionRates.max_change_rate": - value := x.MaxChangeRate - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.CommissionRates")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.CommissionRates 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_CommissionRates) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.CommissionRates.rate": - x.Rate = value.Interface().(string) - case "cosmos.staking.v1beta1.CommissionRates.max_rate": - x.MaxRate = value.Interface().(string) - case "cosmos.staking.v1beta1.CommissionRates.max_change_rate": - x.MaxChangeRate = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.CommissionRates")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.CommissionRates 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_CommissionRates) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.CommissionRates.rate": - panic(fmt.Errorf("field rate of message cosmos.staking.v1beta1.CommissionRates is not mutable")) - case "cosmos.staking.v1beta1.CommissionRates.max_rate": - panic(fmt.Errorf("field max_rate of message cosmos.staking.v1beta1.CommissionRates is not mutable")) - case "cosmos.staking.v1beta1.CommissionRates.max_change_rate": - panic(fmt.Errorf("field max_change_rate of message cosmos.staking.v1beta1.CommissionRates is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.CommissionRates")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.CommissionRates 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_CommissionRates) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.CommissionRates.rate": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.CommissionRates.max_rate": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.CommissionRates.max_change_rate": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.CommissionRates")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.CommissionRates 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_CommissionRates) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.CommissionRates", 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_CommissionRates) 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_CommissionRates) 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_CommissionRates) 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_CommissionRates) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommissionRates) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Rate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxChangeRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommissionRates) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MaxChangeRate) > 0 { - i -= len(x.MaxChangeRate) - copy(dAtA[i:], x.MaxChangeRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxChangeRate))) - i-- - dAtA[i] = 0x1a - } - if len(x.MaxRate) > 0 { - i -= len(x.MaxRate) - copy(dAtA[i:], x.MaxRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxRate))) - i-- - dAtA[i] = 0x12 - } - if len(x.Rate) > 0 { - i -= len(x.Rate) - copy(dAtA[i:], x.Rate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rate))) - i-- - dAtA[i] = 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().(*CommissionRates) - 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: CommissionRates: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommissionRates: 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 Rate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Rate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxRate", 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.MaxRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", 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.MaxChangeRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Commission protoreflect.MessageDescriptor - fd_Commission_commission_rates protoreflect.FieldDescriptor - fd_Commission_update_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Commission = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Commission") - fd_Commission_commission_rates = md_Commission.Fields().ByName("commission_rates") - fd_Commission_update_time = md_Commission.Fields().ByName("update_time") -} - -var _ protoreflect.Message = (*fastReflection_Commission)(nil) - -type fastReflection_Commission Commission - -func (x *Commission) ProtoReflect() protoreflect.Message { - return (*fastReflection_Commission)(x) -} - -func (x *Commission) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Commission_messageType fastReflection_Commission_messageType -var _ protoreflect.MessageType = fastReflection_Commission_messageType{} - -type fastReflection_Commission_messageType struct{} - -func (x fastReflection_Commission_messageType) Zero() protoreflect.Message { - return (*fastReflection_Commission)(nil) -} -func (x fastReflection_Commission_messageType) New() protoreflect.Message { - return new(fastReflection_Commission) -} -func (x fastReflection_Commission_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Commission -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Commission) Descriptor() protoreflect.MessageDescriptor { - return md_Commission -} - -// 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_Commission) Type() protoreflect.MessageType { - return _fastReflection_Commission_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Commission) New() protoreflect.Message { - return new(fastReflection_Commission) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Commission) Interface() protoreflect.ProtoMessage { - return (*Commission)(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_Commission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CommissionRates != nil { - value := protoreflect.ValueOfMessage(x.CommissionRates.ProtoReflect()) - if !f(fd_Commission_commission_rates, value) { - return - } - } - if x.UpdateTime != nil { - value := protoreflect.ValueOfMessage(x.UpdateTime.ProtoReflect()) - if !f(fd_Commission_update_time, 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_Commission) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Commission.commission_rates": - return x.CommissionRates != nil - case "cosmos.staking.v1beta1.Commission.update_time": - return x.UpdateTime != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Commission")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Commission 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_Commission) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Commission.commission_rates": - x.CommissionRates = nil - case "cosmos.staking.v1beta1.Commission.update_time": - x.UpdateTime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Commission")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Commission 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_Commission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Commission.commission_rates": - value := x.CommissionRates - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.Commission.update_time": - value := x.UpdateTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Commission")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Commission 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_Commission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Commission.commission_rates": - x.CommissionRates = value.Message().Interface().(*CommissionRates) - case "cosmos.staking.v1beta1.Commission.update_time": - x.UpdateTime = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Commission")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Commission 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_Commission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Commission.commission_rates": - if x.CommissionRates == nil { - x.CommissionRates = new(CommissionRates) - } - return protoreflect.ValueOfMessage(x.CommissionRates.ProtoReflect()) - case "cosmos.staking.v1beta1.Commission.update_time": - if x.UpdateTime == nil { - x.UpdateTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.UpdateTime.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Commission")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Commission 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_Commission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Commission.commission_rates": - m := new(CommissionRates) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.Commission.update_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Commission")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Commission 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_Commission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Commission", 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_Commission) 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_Commission) 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_Commission) 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_Commission) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Commission) - 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.CommissionRates != nil { - l = options.Size(x.CommissionRates) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UpdateTime != nil { - l = options.Size(x.UpdateTime) - 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().(*Commission) - 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.UpdateTime != nil { - encoded, err := options.Marshal(x.UpdateTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.CommissionRates != nil { - encoded, err := options.Marshal(x.CommissionRates) - 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().(*Commission) - 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: Commission: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Commission: 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 CommissionRates", 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.CommissionRates == nil { - x.CommissionRates = &CommissionRates{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CommissionRates); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", 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.UpdateTime == nil { - x.UpdateTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UpdateTime); 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_Description protoreflect.MessageDescriptor - fd_Description_moniker protoreflect.FieldDescriptor - fd_Description_identity protoreflect.FieldDescriptor - fd_Description_website protoreflect.FieldDescriptor - fd_Description_security_contact protoreflect.FieldDescriptor - fd_Description_details protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Description = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Description") - fd_Description_moniker = md_Description.Fields().ByName("moniker") - fd_Description_identity = md_Description.Fields().ByName("identity") - fd_Description_website = md_Description.Fields().ByName("website") - fd_Description_security_contact = md_Description.Fields().ByName("security_contact") - fd_Description_details = md_Description.Fields().ByName("details") -} - -var _ protoreflect.Message = (*fastReflection_Description)(nil) - -type fastReflection_Description Description - -func (x *Description) ProtoReflect() protoreflect.Message { - return (*fastReflection_Description)(x) -} - -func (x *Description) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Description_messageType fastReflection_Description_messageType -var _ protoreflect.MessageType = fastReflection_Description_messageType{} - -type fastReflection_Description_messageType struct{} - -func (x fastReflection_Description_messageType) Zero() protoreflect.Message { - return (*fastReflection_Description)(nil) -} -func (x fastReflection_Description_messageType) New() protoreflect.Message { - return new(fastReflection_Description) -} -func (x fastReflection_Description_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Description -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Description) Descriptor() protoreflect.MessageDescriptor { - return md_Description -} - -// 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_Description) Type() protoreflect.MessageType { - return _fastReflection_Description_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Description) New() protoreflect.Message { - return new(fastReflection_Description) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Description) Interface() protoreflect.ProtoMessage { - return (*Description)(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_Description) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Moniker != "" { - value := protoreflect.ValueOfString(x.Moniker) - if !f(fd_Description_moniker, value) { - return - } - } - if x.Identity != "" { - value := protoreflect.ValueOfString(x.Identity) - if !f(fd_Description_identity, value) { - return - } - } - if x.Website != "" { - value := protoreflect.ValueOfString(x.Website) - if !f(fd_Description_website, value) { - return - } - } - if x.SecurityContact != "" { - value := protoreflect.ValueOfString(x.SecurityContact) - if !f(fd_Description_security_contact, value) { - return - } - } - if x.Details != "" { - value := protoreflect.ValueOfString(x.Details) - if !f(fd_Description_details, 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_Description) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Description.moniker": - return x.Moniker != "" - case "cosmos.staking.v1beta1.Description.identity": - return x.Identity != "" - case "cosmos.staking.v1beta1.Description.website": - return x.Website != "" - case "cosmos.staking.v1beta1.Description.security_contact": - return x.SecurityContact != "" - case "cosmos.staking.v1beta1.Description.details": - return x.Details != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Description")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Description 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_Description) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Description.moniker": - x.Moniker = "" - case "cosmos.staking.v1beta1.Description.identity": - x.Identity = "" - case "cosmos.staking.v1beta1.Description.website": - x.Website = "" - case "cosmos.staking.v1beta1.Description.security_contact": - x.SecurityContact = "" - case "cosmos.staking.v1beta1.Description.details": - x.Details = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Description")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Description 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_Description) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Description.moniker": - value := x.Moniker - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Description.identity": - value := x.Identity - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Description.website": - value := x.Website - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Description.security_contact": - value := x.SecurityContact - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Description.details": - value := x.Details - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Description")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Description 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_Description) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Description.moniker": - x.Moniker = value.Interface().(string) - case "cosmos.staking.v1beta1.Description.identity": - x.Identity = value.Interface().(string) - case "cosmos.staking.v1beta1.Description.website": - x.Website = value.Interface().(string) - case "cosmos.staking.v1beta1.Description.security_contact": - x.SecurityContact = value.Interface().(string) - case "cosmos.staking.v1beta1.Description.details": - x.Details = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Description")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Description 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_Description) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Description.moniker": - panic(fmt.Errorf("field moniker of message cosmos.staking.v1beta1.Description is not mutable")) - case "cosmos.staking.v1beta1.Description.identity": - panic(fmt.Errorf("field identity of message cosmos.staking.v1beta1.Description is not mutable")) - case "cosmos.staking.v1beta1.Description.website": - panic(fmt.Errorf("field website of message cosmos.staking.v1beta1.Description is not mutable")) - case "cosmos.staking.v1beta1.Description.security_contact": - panic(fmt.Errorf("field security_contact of message cosmos.staking.v1beta1.Description is not mutable")) - case "cosmos.staking.v1beta1.Description.details": - panic(fmt.Errorf("field details of message cosmos.staking.v1beta1.Description is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Description")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Description 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_Description) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Description.moniker": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Description.identity": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Description.website": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Description.security_contact": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Description.details": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Description")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Description 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_Description) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Description", 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_Description) 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_Description) 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_Description) 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_Description) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Description) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Moniker) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Identity) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Website) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SecurityContact) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Details) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Description) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Details) > 0 { - i -= len(x.Details) - copy(dAtA[i:], x.Details) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Details))) - i-- - dAtA[i] = 0x2a - } - if len(x.SecurityContact) > 0 { - i -= len(x.SecurityContact) - copy(dAtA[i:], x.SecurityContact) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SecurityContact))) - i-- - dAtA[i] = 0x22 - } - if len(x.Website) > 0 { - i -= len(x.Website) - copy(dAtA[i:], x.Website) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Website))) - i-- - dAtA[i] = 0x1a - } - if len(x.Identity) > 0 { - i -= len(x.Identity) - copy(dAtA[i:], x.Identity) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identity))) - i-- - dAtA[i] = 0x12 - } - if len(x.Moniker) > 0 { - i -= len(x.Moniker) - copy(dAtA[i:], x.Moniker) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Moniker))) - 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().(*Description) - 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: Description: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Description: 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 Moniker", 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.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identity", 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.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Website", 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.Website = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", 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.SecurityContact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Details", 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.Details = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Validator protoreflect.MessageDescriptor - fd_Validator_operator_address protoreflect.FieldDescriptor - fd_Validator_consensus_pubkey protoreflect.FieldDescriptor - fd_Validator_jailed protoreflect.FieldDescriptor - fd_Validator_status protoreflect.FieldDescriptor - fd_Validator_tokens protoreflect.FieldDescriptor - fd_Validator_delegator_shares protoreflect.FieldDescriptor - fd_Validator_description protoreflect.FieldDescriptor - fd_Validator_unbonding_height protoreflect.FieldDescriptor - fd_Validator_unbonding_time protoreflect.FieldDescriptor - fd_Validator_commission protoreflect.FieldDescriptor - fd_Validator_min_self_delegation protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Validator = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Validator") - fd_Validator_operator_address = md_Validator.Fields().ByName("operator_address") - fd_Validator_consensus_pubkey = md_Validator.Fields().ByName("consensus_pubkey") - fd_Validator_jailed = md_Validator.Fields().ByName("jailed") - fd_Validator_status = md_Validator.Fields().ByName("status") - fd_Validator_tokens = md_Validator.Fields().ByName("tokens") - fd_Validator_delegator_shares = md_Validator.Fields().ByName("delegator_shares") - fd_Validator_description = md_Validator.Fields().ByName("description") - fd_Validator_unbonding_height = md_Validator.Fields().ByName("unbonding_height") - fd_Validator_unbonding_time = md_Validator.Fields().ByName("unbonding_time") - fd_Validator_commission = md_Validator.Fields().ByName("commission") - fd_Validator_min_self_delegation = md_Validator.Fields().ByName("min_self_delegation") -} - -var _ protoreflect.Message = (*fastReflection_Validator)(nil) - -type fastReflection_Validator Validator - -func (x *Validator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Validator)(x) -} - -func (x *Validator) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Validator_messageType fastReflection_Validator_messageType -var _ protoreflect.MessageType = fastReflection_Validator_messageType{} - -type fastReflection_Validator_messageType struct{} - -func (x fastReflection_Validator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Validator)(nil) -} -func (x fastReflection_Validator_messageType) New() protoreflect.Message { - return new(fastReflection_Validator) -} -func (x fastReflection_Validator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Validator) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// 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_Validator) Type() protoreflect.MessageType { - return _fastReflection_Validator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Validator) New() protoreflect.Message { - return new(fastReflection_Validator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Validator) Interface() protoreflect.ProtoMessage { - return (*Validator)(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_Validator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.OperatorAddress != "" { - value := protoreflect.ValueOfString(x.OperatorAddress) - if !f(fd_Validator_operator_address, value) { - return - } - } - if x.ConsensusPubkey != nil { - value := protoreflect.ValueOfMessage(x.ConsensusPubkey.ProtoReflect()) - if !f(fd_Validator_consensus_pubkey, value) { - return - } - } - if x.Jailed != false { - value := protoreflect.ValueOfBool(x.Jailed) - if !f(fd_Validator_jailed, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_Validator_status, value) { - return - } - } - if x.Tokens != "" { - value := protoreflect.ValueOfString(x.Tokens) - if !f(fd_Validator_tokens, value) { - return - } - } - if x.DelegatorShares != "" { - value := protoreflect.ValueOfString(x.DelegatorShares) - if !f(fd_Validator_delegator_shares, value) { - return - } - } - if x.Description != nil { - value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) - if !f(fd_Validator_description, value) { - return - } - } - if x.UnbondingHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.UnbondingHeight) - if !f(fd_Validator_unbonding_height, value) { - return - } - } - if x.UnbondingTime != nil { - value := protoreflect.ValueOfMessage(x.UnbondingTime.ProtoReflect()) - if !f(fd_Validator_unbonding_time, value) { - return - } - } - if x.Commission != nil { - value := protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) - if !f(fd_Validator_commission, value) { - return - } - } - if x.MinSelfDelegation != "" { - value := protoreflect.ValueOfString(x.MinSelfDelegation) - if !f(fd_Validator_min_self_delegation, 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_Validator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Validator.operator_address": - return x.OperatorAddress != "" - case "cosmos.staking.v1beta1.Validator.consensus_pubkey": - return x.ConsensusPubkey != nil - case "cosmos.staking.v1beta1.Validator.jailed": - return x.Jailed != false - case "cosmos.staking.v1beta1.Validator.status": - return x.Status != 0 - case "cosmos.staking.v1beta1.Validator.tokens": - return x.Tokens != "" - case "cosmos.staking.v1beta1.Validator.delegator_shares": - return x.DelegatorShares != "" - case "cosmos.staking.v1beta1.Validator.description": - return x.Description != nil - case "cosmos.staking.v1beta1.Validator.unbonding_height": - return x.UnbondingHeight != int64(0) - case "cosmos.staking.v1beta1.Validator.unbonding_time": - return x.UnbondingTime != nil - case "cosmos.staking.v1beta1.Validator.commission": - return x.Commission != nil - case "cosmos.staking.v1beta1.Validator.min_self_delegation": - return x.MinSelfDelegation != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Validator 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_Validator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Validator.operator_address": - x.OperatorAddress = "" - case "cosmos.staking.v1beta1.Validator.consensus_pubkey": - x.ConsensusPubkey = nil - case "cosmos.staking.v1beta1.Validator.jailed": - x.Jailed = false - case "cosmos.staking.v1beta1.Validator.status": - x.Status = 0 - case "cosmos.staking.v1beta1.Validator.tokens": - x.Tokens = "" - case "cosmos.staking.v1beta1.Validator.delegator_shares": - x.DelegatorShares = "" - case "cosmos.staking.v1beta1.Validator.description": - x.Description = nil - case "cosmos.staking.v1beta1.Validator.unbonding_height": - x.UnbondingHeight = int64(0) - case "cosmos.staking.v1beta1.Validator.unbonding_time": - x.UnbondingTime = nil - case "cosmos.staking.v1beta1.Validator.commission": - x.Commission = nil - case "cosmos.staking.v1beta1.Validator.min_self_delegation": - x.MinSelfDelegation = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Validator 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_Validator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Validator.operator_address": - value := x.OperatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Validator.consensus_pubkey": - value := x.ConsensusPubkey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.jailed": - value := x.Jailed - return protoreflect.ValueOfBool(value) - case "cosmos.staking.v1beta1.Validator.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.staking.v1beta1.Validator.tokens": - value := x.Tokens - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Validator.delegator_shares": - value := x.DelegatorShares - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Validator.description": - value := x.Description - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.unbonding_height": - value := x.UnbondingHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.staking.v1beta1.Validator.unbonding_time": - value := x.UnbondingTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.commission": - value := x.Commission - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.min_self_delegation": - value := x.MinSelfDelegation - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Validator 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_Validator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Validator.operator_address": - x.OperatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.Validator.consensus_pubkey": - x.ConsensusPubkey = value.Message().Interface().(*anypb.Any) - case "cosmos.staking.v1beta1.Validator.jailed": - x.Jailed = value.Bool() - case "cosmos.staking.v1beta1.Validator.status": - x.Status = (BondStatus)(value.Enum()) - case "cosmos.staking.v1beta1.Validator.tokens": - x.Tokens = value.Interface().(string) - case "cosmos.staking.v1beta1.Validator.delegator_shares": - x.DelegatorShares = value.Interface().(string) - case "cosmos.staking.v1beta1.Validator.description": - x.Description = value.Message().Interface().(*Description) - case "cosmos.staking.v1beta1.Validator.unbonding_height": - x.UnbondingHeight = value.Int() - case "cosmos.staking.v1beta1.Validator.unbonding_time": - x.UnbondingTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.staking.v1beta1.Validator.commission": - x.Commission = value.Message().Interface().(*Commission) - case "cosmos.staking.v1beta1.Validator.min_self_delegation": - x.MinSelfDelegation = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Validator 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_Validator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Validator.consensus_pubkey": - if x.ConsensusPubkey == nil { - x.ConsensusPubkey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.ConsensusPubkey.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.description": - if x.Description == nil { - x.Description = new(Description) - } - return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.unbonding_time": - if x.UnbondingTime == nil { - x.UnbondingTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.UnbondingTime.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.commission": - if x.Commission == nil { - x.Commission = new(Commission) - } - return protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.operator_address": - panic(fmt.Errorf("field operator_address of message cosmos.staking.v1beta1.Validator is not mutable")) - case "cosmos.staking.v1beta1.Validator.jailed": - panic(fmt.Errorf("field jailed of message cosmos.staking.v1beta1.Validator is not mutable")) - case "cosmos.staking.v1beta1.Validator.status": - panic(fmt.Errorf("field status of message cosmos.staking.v1beta1.Validator is not mutable")) - case "cosmos.staking.v1beta1.Validator.tokens": - panic(fmt.Errorf("field tokens of message cosmos.staking.v1beta1.Validator is not mutable")) - case "cosmos.staking.v1beta1.Validator.delegator_shares": - panic(fmt.Errorf("field delegator_shares of message cosmos.staking.v1beta1.Validator is not mutable")) - case "cosmos.staking.v1beta1.Validator.unbonding_height": - panic(fmt.Errorf("field unbonding_height of message cosmos.staking.v1beta1.Validator is not mutable")) - case "cosmos.staking.v1beta1.Validator.min_self_delegation": - panic(fmt.Errorf("field min_self_delegation of message cosmos.staking.v1beta1.Validator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Validator 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_Validator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Validator.operator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Validator.consensus_pubkey": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.jailed": - return protoreflect.ValueOfBool(false) - case "cosmos.staking.v1beta1.Validator.status": - return protoreflect.ValueOfEnum(0) - case "cosmos.staking.v1beta1.Validator.tokens": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Validator.delegator_shares": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Validator.description": - m := new(Description) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.unbonding_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.staking.v1beta1.Validator.unbonding_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.commission": - m := new(Commission) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.Validator.min_self_delegation": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Validator 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_Validator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Validator", 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_Validator) 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_Validator) 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_Validator) 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_Validator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.OperatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ConsensusPubkey != nil { - l = options.Size(x.ConsensusPubkey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Jailed { - n += 2 - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - l = len(x.Tokens) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DelegatorShares) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Description != nil { - l = options.Size(x.Description) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UnbondingHeight != 0 { - n += 1 + runtime.Sov(uint64(x.UnbondingHeight)) - } - if x.UnbondingTime != nil { - l = options.Size(x.UnbondingTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Commission != nil { - l = options.Size(x.Commission) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinSelfDelegation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MinSelfDelegation) > 0 { - i -= len(x.MinSelfDelegation) - copy(dAtA[i:], x.MinSelfDelegation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSelfDelegation))) - i-- - dAtA[i] = 0x5a - } - if x.Commission != nil { - encoded, err := options.Marshal(x.Commission) - 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] = 0x52 - } - if x.UnbondingTime != nil { - encoded, err := options.Marshal(x.UnbondingTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if x.UnbondingHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UnbondingHeight)) - i-- - dAtA[i] = 0x40 - } - if x.Description != nil { - encoded, err := options.Marshal(x.Description) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.DelegatorShares) > 0 { - i -= len(x.DelegatorShares) - copy(dAtA[i:], x.DelegatorShares) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorShares))) - i-- - dAtA[i] = 0x32 - } - if len(x.Tokens) > 0 { - i -= len(x.Tokens) - copy(dAtA[i:], x.Tokens) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tokens))) - i-- - dAtA[i] = 0x2a - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x20 - } - if x.Jailed { - i-- - if x.Jailed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if x.ConsensusPubkey != nil { - encoded, err := options.Marshal(x.ConsensusPubkey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.OperatorAddress) > 0 { - i -= len(x.OperatorAddress) - copy(dAtA[i:], x.OperatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OperatorAddress))) - 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().(*Validator) - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: 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 OperatorAddress", 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.OperatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusPubkey", 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.ConsensusPubkey == nil { - x.ConsensusPubkey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusPubkey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Jailed = bool(v != 0) - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= BondStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tokens", 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.Tokens = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", 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.DelegatorShares = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description == nil { - x.Description = &Description{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) - } - x.UnbondingHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UnbondingHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", 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.UnbondingTime == nil { - x.UnbondingTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commission", 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.Commission == nil { - x.Commission = &Commission{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", 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.MinSelfDelegation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValAddresses_1_list)(nil) - -type _ValAddresses_1_list struct { - list *[]string -} - -func (x *_ValAddresses_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValAddresses_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ValAddresses_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ValAddresses_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValAddresses_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ValAddresses at list field Addresses as it is not of Message kind")) -} - -func (x *_ValAddresses_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ValAddresses_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ValAddresses_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValAddresses protoreflect.MessageDescriptor - fd_ValAddresses_addresses protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_ValAddresses = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("ValAddresses") - fd_ValAddresses_addresses = md_ValAddresses.Fields().ByName("addresses") -} - -var _ protoreflect.Message = (*fastReflection_ValAddresses)(nil) - -type fastReflection_ValAddresses ValAddresses - -func (x *ValAddresses) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValAddresses)(x) -} - -func (x *ValAddresses) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_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_ValAddresses_messageType fastReflection_ValAddresses_messageType -var _ protoreflect.MessageType = fastReflection_ValAddresses_messageType{} - -type fastReflection_ValAddresses_messageType struct{} - -func (x fastReflection_ValAddresses_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValAddresses)(nil) -} -func (x fastReflection_ValAddresses_messageType) New() protoreflect.Message { - return new(fastReflection_ValAddresses) -} -func (x fastReflection_ValAddresses_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValAddresses -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValAddresses) Descriptor() protoreflect.MessageDescriptor { - return md_ValAddresses -} - -// 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_ValAddresses) Type() protoreflect.MessageType { - return _fastReflection_ValAddresses_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValAddresses) New() protoreflect.Message { - return new(fastReflection_ValAddresses) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValAddresses) Interface() protoreflect.ProtoMessage { - return (*ValAddresses)(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_ValAddresses) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Addresses) != 0 { - value := protoreflect.ValueOfList(&_ValAddresses_1_list{list: &x.Addresses}) - if !f(fd_ValAddresses_addresses, 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_ValAddresses) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.ValAddresses.addresses": - return len(x.Addresses) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.ValAddresses")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.ValAddresses 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_ValAddresses) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.ValAddresses.addresses": - x.Addresses = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.ValAddresses")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.ValAddresses 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_ValAddresses) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.ValAddresses.addresses": - if len(x.Addresses) == 0 { - return protoreflect.ValueOfList(&_ValAddresses_1_list{}) - } - listValue := &_ValAddresses_1_list{list: &x.Addresses} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.ValAddresses")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.ValAddresses 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_ValAddresses) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.ValAddresses.addresses": - lv := value.List() - clv := lv.(*_ValAddresses_1_list) - x.Addresses = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.ValAddresses")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.ValAddresses 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_ValAddresses) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.ValAddresses.addresses": - if x.Addresses == nil { - x.Addresses = []string{} - } - value := &_ValAddresses_1_list{list: &x.Addresses} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.ValAddresses")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.ValAddresses 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_ValAddresses) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.ValAddresses.addresses": - list := []string{} - return protoreflect.ValueOfList(&_ValAddresses_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.ValAddresses")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.ValAddresses 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_ValAddresses) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.ValAddresses", 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_ValAddresses) 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_ValAddresses) 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_ValAddresses) 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_ValAddresses) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValAddresses) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Addresses) > 0 { - for _, s := range x.Addresses { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValAddresses) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Addresses) > 0 { - for iNdEx := len(x.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Addresses[iNdEx]) - copy(dAtA[i:], x.Addresses[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Addresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValAddresses) - 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: ValAddresses: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValAddresses: 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 Addresses", 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.Addresses = append(x.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DVPair protoreflect.MessageDescriptor - fd_DVPair_delegator_address protoreflect.FieldDescriptor - fd_DVPair_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_DVPair = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("DVPair") - fd_DVPair_delegator_address = md_DVPair.Fields().ByName("delegator_address") - fd_DVPair_validator_address = md_DVPair.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_DVPair)(nil) - -type fastReflection_DVPair DVPair - -func (x *DVPair) ProtoReflect() protoreflect.Message { - return (*fastReflection_DVPair)(x) -} - -func (x *DVPair) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_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_DVPair_messageType fastReflection_DVPair_messageType -var _ protoreflect.MessageType = fastReflection_DVPair_messageType{} - -type fastReflection_DVPair_messageType struct{} - -func (x fastReflection_DVPair_messageType) Zero() protoreflect.Message { - return (*fastReflection_DVPair)(nil) -} -func (x fastReflection_DVPair_messageType) New() protoreflect.Message { - return new(fastReflection_DVPair) -} -func (x fastReflection_DVPair_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DVPair -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DVPair) Descriptor() protoreflect.MessageDescriptor { - return md_DVPair -} - -// 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_DVPair) Type() protoreflect.MessageType { - return _fastReflection_DVPair_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DVPair) New() protoreflect.Message { - return new(fastReflection_DVPair) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DVPair) Interface() protoreflect.ProtoMessage { - return (*DVPair)(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_DVPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_DVPair_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_DVPair_validator_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DVPair) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPair.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.DVPair.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPair")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPair 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_DVPair) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPair.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.DVPair.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPair")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPair 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_DVPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.DVPair.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.DVPair.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPair")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPair 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_DVPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPair.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.DVPair.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPair")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPair 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_DVPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPair.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.DVPair is not mutable")) - case "cosmos.staking.v1beta1.DVPair.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.DVPair is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPair")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPair 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_DVPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPair.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.DVPair.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPair")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPair 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_DVPair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.DVPair", 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_DVPair) 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_DVPair) 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_DVPair) 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_DVPair) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DVPair) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DVPair) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*DVPair) - 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: DVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DVPair: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DVPairs_1_list)(nil) - -type _DVPairs_1_list struct { - list *[]*DVPair -} - -func (x *_DVPairs_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DVPairs_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_DVPairs_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DVPair) - (*x.list)[i] = concreteValue -} - -func (x *_DVPairs_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DVPair) - *x.list = append(*x.list, concreteValue) -} - -func (x *_DVPairs_1_list) AppendMutable() protoreflect.Value { - v := new(DVPair) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DVPairs_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_DVPairs_1_list) NewElement() protoreflect.Value { - v := new(DVPair) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DVPairs_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DVPairs protoreflect.MessageDescriptor - fd_DVPairs_pairs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_DVPairs = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("DVPairs") - fd_DVPairs_pairs = md_DVPairs.Fields().ByName("pairs") -} - -var _ protoreflect.Message = (*fastReflection_DVPairs)(nil) - -type fastReflection_DVPairs DVPairs - -func (x *DVPairs) ProtoReflect() protoreflect.Message { - return (*fastReflection_DVPairs)(x) -} - -func (x *DVPairs) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DVPairs_messageType fastReflection_DVPairs_messageType -var _ protoreflect.MessageType = fastReflection_DVPairs_messageType{} - -type fastReflection_DVPairs_messageType struct{} - -func (x fastReflection_DVPairs_messageType) Zero() protoreflect.Message { - return (*fastReflection_DVPairs)(nil) -} -func (x fastReflection_DVPairs_messageType) New() protoreflect.Message { - return new(fastReflection_DVPairs) -} -func (x fastReflection_DVPairs_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DVPairs -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DVPairs) Descriptor() protoreflect.MessageDescriptor { - return md_DVPairs -} - -// 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_DVPairs) Type() protoreflect.MessageType { - return _fastReflection_DVPairs_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DVPairs) New() protoreflect.Message { - return new(fastReflection_DVPairs) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DVPairs) Interface() protoreflect.ProtoMessage { - return (*DVPairs)(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_DVPairs) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Pairs) != 0 { - value := protoreflect.ValueOfList(&_DVPairs_1_list{list: &x.Pairs}) - if !f(fd_DVPairs_pairs, 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_DVPairs) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPairs.pairs": - return len(x.Pairs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPairs")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPairs 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_DVPairs) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPairs.pairs": - x.Pairs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPairs")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPairs 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_DVPairs) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.DVPairs.pairs": - if len(x.Pairs) == 0 { - return protoreflect.ValueOfList(&_DVPairs_1_list{}) - } - listValue := &_DVPairs_1_list{list: &x.Pairs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPairs")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPairs 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_DVPairs) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPairs.pairs": - lv := value.List() - clv := lv.(*_DVPairs_1_list) - x.Pairs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPairs")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPairs 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_DVPairs) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPairs.pairs": - if x.Pairs == nil { - x.Pairs = []*DVPair{} - } - value := &_DVPairs_1_list{list: &x.Pairs} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPairs")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPairs 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_DVPairs) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVPairs.pairs": - list := []*DVPair{} - return protoreflect.ValueOfList(&_DVPairs_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVPairs")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVPairs 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_DVPairs) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.DVPairs", 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_DVPairs) 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_DVPairs) 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_DVPairs) 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_DVPairs) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DVPairs) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Pairs) > 0 { - for _, e := range x.Pairs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DVPairs) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Pairs) > 0 { - for iNdEx := len(x.Pairs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Pairs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DVPairs) - 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: DVPairs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DVPairs: 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 Pairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Pairs = append(x.Pairs, &DVPair{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pairs[len(x.Pairs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DVVTriplet protoreflect.MessageDescriptor - fd_DVVTriplet_delegator_address protoreflect.FieldDescriptor - fd_DVVTriplet_validator_src_address protoreflect.FieldDescriptor - fd_DVVTriplet_validator_dst_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_DVVTriplet = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("DVVTriplet") - fd_DVVTriplet_delegator_address = md_DVVTriplet.Fields().ByName("delegator_address") - fd_DVVTriplet_validator_src_address = md_DVVTriplet.Fields().ByName("validator_src_address") - fd_DVVTriplet_validator_dst_address = md_DVVTriplet.Fields().ByName("validator_dst_address") -} - -var _ protoreflect.Message = (*fastReflection_DVVTriplet)(nil) - -type fastReflection_DVVTriplet DVVTriplet - -func (x *DVVTriplet) ProtoReflect() protoreflect.Message { - return (*fastReflection_DVVTriplet)(x) -} - -func (x *DVVTriplet) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DVVTriplet_messageType fastReflection_DVVTriplet_messageType -var _ protoreflect.MessageType = fastReflection_DVVTriplet_messageType{} - -type fastReflection_DVVTriplet_messageType struct{} - -func (x fastReflection_DVVTriplet_messageType) Zero() protoreflect.Message { - return (*fastReflection_DVVTriplet)(nil) -} -func (x fastReflection_DVVTriplet_messageType) New() protoreflect.Message { - return new(fastReflection_DVVTriplet) -} -func (x fastReflection_DVVTriplet_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DVVTriplet -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DVVTriplet) Descriptor() protoreflect.MessageDescriptor { - return md_DVVTriplet -} - -// 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_DVVTriplet) Type() protoreflect.MessageType { - return _fastReflection_DVVTriplet_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DVVTriplet) New() protoreflect.Message { - return new(fastReflection_DVVTriplet) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DVVTriplet) Interface() protoreflect.ProtoMessage { - return (*DVVTriplet)(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_DVVTriplet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_DVVTriplet_delegator_address, value) { - return - } - } - if x.ValidatorSrcAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorSrcAddress) - if !f(fd_DVVTriplet_validator_src_address, value) { - return - } - } - if x.ValidatorDstAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorDstAddress) - if !f(fd_DVVTriplet_validator_dst_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DVVTriplet) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplet.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.DVVTriplet.validator_src_address": - return x.ValidatorSrcAddress != "" - case "cosmos.staking.v1beta1.DVVTriplet.validator_dst_address": - return x.ValidatorDstAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplet")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplet 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_DVVTriplet) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplet.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.DVVTriplet.validator_src_address": - x.ValidatorSrcAddress = "" - case "cosmos.staking.v1beta1.DVVTriplet.validator_dst_address": - x.ValidatorDstAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplet")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplet 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_DVVTriplet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.DVVTriplet.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.DVVTriplet.validator_src_address": - value := x.ValidatorSrcAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.DVVTriplet.validator_dst_address": - value := x.ValidatorDstAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplet")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplet 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_DVVTriplet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplet.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.DVVTriplet.validator_src_address": - x.ValidatorSrcAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.DVVTriplet.validator_dst_address": - x.ValidatorDstAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplet")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplet 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_DVVTriplet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplet.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.DVVTriplet is not mutable")) - case "cosmos.staking.v1beta1.DVVTriplet.validator_src_address": - panic(fmt.Errorf("field validator_src_address of message cosmos.staking.v1beta1.DVVTriplet is not mutable")) - case "cosmos.staking.v1beta1.DVVTriplet.validator_dst_address": - panic(fmt.Errorf("field validator_dst_address of message cosmos.staking.v1beta1.DVVTriplet is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplet")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplet 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_DVVTriplet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplet.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.DVVTriplet.validator_src_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.DVVTriplet.validator_dst_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplet")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplet 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_DVVTriplet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.DVVTriplet", 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_DVVTriplet) 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_DVVTriplet) 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_DVVTriplet) 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_DVVTriplet) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DVVTriplet) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorDstAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DVVTriplet) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorDstAddress) > 0 { - i -= len(x.ValidatorDstAddress) - copy(dAtA[i:], x.ValidatorDstAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorSrcAddress) > 0 { - i -= len(x.ValidatorSrcAddress) - copy(dAtA[i:], x.ValidatorSrcAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorSrcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*DVVTriplet) - 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: DVVTriplet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DVVTriplet: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", 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.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", 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.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DVVTriplets_1_list)(nil) - -type _DVVTriplets_1_list struct { - list *[]*DVVTriplet -} - -func (x *_DVVTriplets_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DVVTriplets_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_DVVTriplets_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DVVTriplet) - (*x.list)[i] = concreteValue -} - -func (x *_DVVTriplets_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DVVTriplet) - *x.list = append(*x.list, concreteValue) -} - -func (x *_DVVTriplets_1_list) AppendMutable() protoreflect.Value { - v := new(DVVTriplet) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DVVTriplets_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_DVVTriplets_1_list) NewElement() protoreflect.Value { - v := new(DVVTriplet) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DVVTriplets_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DVVTriplets protoreflect.MessageDescriptor - fd_DVVTriplets_triplets protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_DVVTriplets = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("DVVTriplets") - fd_DVVTriplets_triplets = md_DVVTriplets.Fields().ByName("triplets") -} - -var _ protoreflect.Message = (*fastReflection_DVVTriplets)(nil) - -type fastReflection_DVVTriplets DVVTriplets - -func (x *DVVTriplets) ProtoReflect() protoreflect.Message { - return (*fastReflection_DVVTriplets)(x) -} - -func (x *DVVTriplets) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DVVTriplets_messageType fastReflection_DVVTriplets_messageType -var _ protoreflect.MessageType = fastReflection_DVVTriplets_messageType{} - -type fastReflection_DVVTriplets_messageType struct{} - -func (x fastReflection_DVVTriplets_messageType) Zero() protoreflect.Message { - return (*fastReflection_DVVTriplets)(nil) -} -func (x fastReflection_DVVTriplets_messageType) New() protoreflect.Message { - return new(fastReflection_DVVTriplets) -} -func (x fastReflection_DVVTriplets_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DVVTriplets -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DVVTriplets) Descriptor() protoreflect.MessageDescriptor { - return md_DVVTriplets -} - -// 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_DVVTriplets) Type() protoreflect.MessageType { - return _fastReflection_DVVTriplets_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DVVTriplets) New() protoreflect.Message { - return new(fastReflection_DVVTriplets) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DVVTriplets) Interface() protoreflect.ProtoMessage { - return (*DVVTriplets)(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_DVVTriplets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Triplets) != 0 { - value := protoreflect.ValueOfList(&_DVVTriplets_1_list{list: &x.Triplets}) - if !f(fd_DVVTriplets_triplets, 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_DVVTriplets) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplets.triplets": - return len(x.Triplets) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplets")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplets 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_DVVTriplets) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplets.triplets": - x.Triplets = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplets")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplets 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_DVVTriplets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.DVVTriplets.triplets": - if len(x.Triplets) == 0 { - return protoreflect.ValueOfList(&_DVVTriplets_1_list{}) - } - listValue := &_DVVTriplets_1_list{list: &x.Triplets} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplets")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplets 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_DVVTriplets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplets.triplets": - lv := value.List() - clv := lv.(*_DVVTriplets_1_list) - x.Triplets = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplets")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplets 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_DVVTriplets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplets.triplets": - if x.Triplets == nil { - x.Triplets = []*DVVTriplet{} - } - value := &_DVVTriplets_1_list{list: &x.Triplets} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplets")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplets 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_DVVTriplets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DVVTriplets.triplets": - list := []*DVVTriplet{} - return protoreflect.ValueOfList(&_DVVTriplets_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DVVTriplets")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DVVTriplets 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_DVVTriplets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.DVVTriplets", 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_DVVTriplets) 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_DVVTriplets) 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_DVVTriplets) 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_DVVTriplets) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DVVTriplets) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Triplets) > 0 { - for _, e := range x.Triplets { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DVVTriplets) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Triplets) > 0 { - for iNdEx := len(x.Triplets) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Triplets[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DVVTriplets) - 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: DVVTriplets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DVVTriplets: 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 Triplets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Triplets = append(x.Triplets, &DVVTriplet{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Triplets[len(x.Triplets)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Delegation protoreflect.MessageDescriptor - fd_Delegation_delegator_address protoreflect.FieldDescriptor - fd_Delegation_validator_address protoreflect.FieldDescriptor - fd_Delegation_shares protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Delegation = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Delegation") - fd_Delegation_delegator_address = md_Delegation.Fields().ByName("delegator_address") - fd_Delegation_validator_address = md_Delegation.Fields().ByName("validator_address") - fd_Delegation_shares = md_Delegation.Fields().ByName("shares") -} - -var _ protoreflect.Message = (*fastReflection_Delegation)(nil) - -type fastReflection_Delegation Delegation - -func (x *Delegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_Delegation)(x) -} - -func (x *Delegation) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Delegation_messageType fastReflection_Delegation_messageType -var _ protoreflect.MessageType = fastReflection_Delegation_messageType{} - -type fastReflection_Delegation_messageType struct{} - -func (x fastReflection_Delegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_Delegation)(nil) -} -func (x fastReflection_Delegation_messageType) New() protoreflect.Message { - return new(fastReflection_Delegation) -} -func (x fastReflection_Delegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Delegation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Delegation) Descriptor() protoreflect.MessageDescriptor { - return md_Delegation -} - -// 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_Delegation) Type() protoreflect.MessageType { - return _fastReflection_Delegation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Delegation) New() protoreflect.Message { - return new(fastReflection_Delegation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Delegation) Interface() protoreflect.ProtoMessage { - return (*Delegation)(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_Delegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_Delegation_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_Delegation_validator_address, value) { - return - } - } - if x.Shares != "" { - value := protoreflect.ValueOfString(x.Shares) - if !f(fd_Delegation_shares, 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_Delegation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Delegation.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.Delegation.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.Delegation.shares": - return x.Shares != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Delegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Delegation 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_Delegation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Delegation.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.Delegation.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.Delegation.shares": - x.Shares = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Delegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Delegation 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_Delegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Delegation.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Delegation.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Delegation.shares": - value := x.Shares - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Delegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Delegation 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_Delegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Delegation.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.Delegation.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.Delegation.shares": - x.Shares = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Delegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Delegation 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_Delegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Delegation.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.Delegation is not mutable")) - case "cosmos.staking.v1beta1.Delegation.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.Delegation is not mutable")) - case "cosmos.staking.v1beta1.Delegation.shares": - panic(fmt.Errorf("field shares of message cosmos.staking.v1beta1.Delegation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Delegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Delegation 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_Delegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Delegation.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Delegation.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Delegation.shares": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Delegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Delegation 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_Delegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Delegation", 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_Delegation) 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_Delegation) 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_Delegation) 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_Delegation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Delegation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Shares) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Delegation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Shares) > 0 { - i -= len(x.Shares) - copy(dAtA[i:], x.Shares) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Shares))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*Delegation) - 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: Delegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Delegation: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Shares", 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.Shares = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_UnbondingDelegation_3_list)(nil) - -type _UnbondingDelegation_3_list struct { - list *[]*UnbondingDelegationEntry -} - -func (x *_UnbondingDelegation_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UnbondingDelegation_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_UnbondingDelegation_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegationEntry) - (*x.list)[i] = concreteValue -} - -func (x *_UnbondingDelegation_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UnbondingDelegationEntry) - *x.list = append(*x.list, concreteValue) -} - -func (x *_UnbondingDelegation_3_list) AppendMutable() protoreflect.Value { - v := new(UnbondingDelegationEntry) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UnbondingDelegation_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_UnbondingDelegation_3_list) NewElement() protoreflect.Value { - v := new(UnbondingDelegationEntry) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UnbondingDelegation_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_UnbondingDelegation protoreflect.MessageDescriptor - fd_UnbondingDelegation_delegator_address protoreflect.FieldDescriptor - fd_UnbondingDelegation_validator_address protoreflect.FieldDescriptor - fd_UnbondingDelegation_entries protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_UnbondingDelegation = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("UnbondingDelegation") - fd_UnbondingDelegation_delegator_address = md_UnbondingDelegation.Fields().ByName("delegator_address") - fd_UnbondingDelegation_validator_address = md_UnbondingDelegation.Fields().ByName("validator_address") - fd_UnbondingDelegation_entries = md_UnbondingDelegation.Fields().ByName("entries") -} - -var _ protoreflect.Message = (*fastReflection_UnbondingDelegation)(nil) - -type fastReflection_UnbondingDelegation UnbondingDelegation - -func (x *UnbondingDelegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_UnbondingDelegation)(x) -} - -func (x *UnbondingDelegation) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_UnbondingDelegation_messageType fastReflection_UnbondingDelegation_messageType -var _ protoreflect.MessageType = fastReflection_UnbondingDelegation_messageType{} - -type fastReflection_UnbondingDelegation_messageType struct{} - -func (x fastReflection_UnbondingDelegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_UnbondingDelegation)(nil) -} -func (x fastReflection_UnbondingDelegation_messageType) New() protoreflect.Message { - return new(fastReflection_UnbondingDelegation) -} -func (x fastReflection_UnbondingDelegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UnbondingDelegation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_UnbondingDelegation) Descriptor() protoreflect.MessageDescriptor { - return md_UnbondingDelegation -} - -// 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_UnbondingDelegation) Type() protoreflect.MessageType { - return _fastReflection_UnbondingDelegation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_UnbondingDelegation) New() protoreflect.Message { - return new(fastReflection_UnbondingDelegation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_UnbondingDelegation) Interface() protoreflect.ProtoMessage { - return (*UnbondingDelegation)(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_UnbondingDelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_UnbondingDelegation_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_UnbondingDelegation_validator_address, value) { - return - } - } - if len(x.Entries) != 0 { - value := protoreflect.ValueOfList(&_UnbondingDelegation_3_list{list: &x.Entries}) - if !f(fd_UnbondingDelegation_entries, 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_UnbondingDelegation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegation.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.UnbondingDelegation.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.UnbondingDelegation.entries": - return len(x.Entries) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegation 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_UnbondingDelegation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegation.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.UnbondingDelegation.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.UnbondingDelegation.entries": - x.Entries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegation 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_UnbondingDelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegation.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.UnbondingDelegation.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.UnbondingDelegation.entries": - if len(x.Entries) == 0 { - return protoreflect.ValueOfList(&_UnbondingDelegation_3_list{}) - } - listValue := &_UnbondingDelegation_3_list{list: &x.Entries} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegation 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_UnbondingDelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegation.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.UnbondingDelegation.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.UnbondingDelegation.entries": - lv := value.List() - clv := lv.(*_UnbondingDelegation_3_list) - x.Entries = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegation 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_UnbondingDelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegation.entries": - if x.Entries == nil { - x.Entries = []*UnbondingDelegationEntry{} - } - value := &_UnbondingDelegation_3_list{list: &x.Entries} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.UnbondingDelegation.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.UnbondingDelegation is not mutable")) - case "cosmos.staking.v1beta1.UnbondingDelegation.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.UnbondingDelegation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegation 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_UnbondingDelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegation.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.UnbondingDelegation.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.UnbondingDelegation.entries": - list := []*UnbondingDelegationEntry{} - return protoreflect.ValueOfList(&_UnbondingDelegation_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegation 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_UnbondingDelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.UnbondingDelegation", 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_UnbondingDelegation) 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_UnbondingDelegation) 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_UnbondingDelegation) 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_UnbondingDelegation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UnbondingDelegation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Entries) > 0 { - for _, e := range x.Entries { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*UnbondingDelegation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Entries) > 0 { - for iNdEx := len(x.Entries) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Entries[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*UnbondingDelegation) - 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: UnbondingDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnbondingDelegation: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Entries = append(x.Entries, &UnbondingDelegationEntry{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Entries[len(x.Entries)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_UnbondingDelegationEntry protoreflect.MessageDescriptor - fd_UnbondingDelegationEntry_creation_height protoreflect.FieldDescriptor - fd_UnbondingDelegationEntry_completion_time protoreflect.FieldDescriptor - fd_UnbondingDelegationEntry_initial_balance protoreflect.FieldDescriptor - fd_UnbondingDelegationEntry_balance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_UnbondingDelegationEntry = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("UnbondingDelegationEntry") - fd_UnbondingDelegationEntry_creation_height = md_UnbondingDelegationEntry.Fields().ByName("creation_height") - fd_UnbondingDelegationEntry_completion_time = md_UnbondingDelegationEntry.Fields().ByName("completion_time") - fd_UnbondingDelegationEntry_initial_balance = md_UnbondingDelegationEntry.Fields().ByName("initial_balance") - fd_UnbondingDelegationEntry_balance = md_UnbondingDelegationEntry.Fields().ByName("balance") -} - -var _ protoreflect.Message = (*fastReflection_UnbondingDelegationEntry)(nil) - -type fastReflection_UnbondingDelegationEntry UnbondingDelegationEntry - -func (x *UnbondingDelegationEntry) ProtoReflect() protoreflect.Message { - return (*fastReflection_UnbondingDelegationEntry)(x) -} - -func (x *UnbondingDelegationEntry) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_UnbondingDelegationEntry_messageType fastReflection_UnbondingDelegationEntry_messageType -var _ protoreflect.MessageType = fastReflection_UnbondingDelegationEntry_messageType{} - -type fastReflection_UnbondingDelegationEntry_messageType struct{} - -func (x fastReflection_UnbondingDelegationEntry_messageType) Zero() protoreflect.Message { - return (*fastReflection_UnbondingDelegationEntry)(nil) -} -func (x fastReflection_UnbondingDelegationEntry_messageType) New() protoreflect.Message { - return new(fastReflection_UnbondingDelegationEntry) -} -func (x fastReflection_UnbondingDelegationEntry_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UnbondingDelegationEntry -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_UnbondingDelegationEntry) Descriptor() protoreflect.MessageDescriptor { - return md_UnbondingDelegationEntry -} - -// 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_UnbondingDelegationEntry) Type() protoreflect.MessageType { - return _fastReflection_UnbondingDelegationEntry_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_UnbondingDelegationEntry) New() protoreflect.Message { - return new(fastReflection_UnbondingDelegationEntry) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_UnbondingDelegationEntry) Interface() protoreflect.ProtoMessage { - return (*UnbondingDelegationEntry)(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_UnbondingDelegationEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CreationHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.CreationHeight) - if !f(fd_UnbondingDelegationEntry_creation_height, value) { - return - } - } - if x.CompletionTime != nil { - value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - if !f(fd_UnbondingDelegationEntry_completion_time, value) { - return - } - } - if x.InitialBalance != "" { - value := protoreflect.ValueOfString(x.InitialBalance) - if !f(fd_UnbondingDelegationEntry_initial_balance, value) { - return - } - } - if x.Balance != "" { - value := protoreflect.ValueOfString(x.Balance) - if !f(fd_UnbondingDelegationEntry_balance, 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_UnbondingDelegationEntry) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.creation_height": - return x.CreationHeight != int64(0) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time": - return x.CompletionTime != nil - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.initial_balance": - return x.InitialBalance != "" - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.balance": - return x.Balance != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegationEntry 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_UnbondingDelegationEntry) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.creation_height": - x.CreationHeight = int64(0) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time": - x.CompletionTime = nil - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.initial_balance": - x.InitialBalance = "" - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.balance": - x.Balance = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegationEntry 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_UnbondingDelegationEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.creation_height": - value := x.CreationHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time": - value := x.CompletionTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.initial_balance": - value := x.InitialBalance - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.balance": - value := x.Balance - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegationEntry 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_UnbondingDelegationEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.creation_height": - x.CreationHeight = value.Int() - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time": - x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.initial_balance": - x.InitialBalance = value.Interface().(string) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.balance": - x.Balance = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegationEntry 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_UnbondingDelegationEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time": - if x.CompletionTime == nil { - x.CompletionTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.creation_height": - panic(fmt.Errorf("field creation_height of message cosmos.staking.v1beta1.UnbondingDelegationEntry is not mutable")) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.initial_balance": - panic(fmt.Errorf("field initial_balance of message cosmos.staking.v1beta1.UnbondingDelegationEntry is not mutable")) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.balance": - panic(fmt.Errorf("field balance of message cosmos.staking.v1beta1.UnbondingDelegationEntry is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegationEntry 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_UnbondingDelegationEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.creation_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.initial_balance": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.UnbondingDelegationEntry.balance": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.UnbondingDelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.UnbondingDelegationEntry 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_UnbondingDelegationEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.UnbondingDelegationEntry", 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_UnbondingDelegationEntry) 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_UnbondingDelegationEntry) 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_UnbondingDelegationEntry) 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_UnbondingDelegationEntry) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UnbondingDelegationEntry) - 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.CreationHeight != 0 { - n += 1 + runtime.Sov(uint64(x.CreationHeight)) - } - if x.CompletionTime != nil { - l = options.Size(x.CompletionTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InitialBalance) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Balance) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*UnbondingDelegationEntry) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Balance) > 0 { - i -= len(x.Balance) - copy(dAtA[i:], x.Balance) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Balance))) - i-- - dAtA[i] = 0x22 - } - if len(x.InitialBalance) > 0 { - i -= len(x.InitialBalance) - copy(dAtA[i:], x.InitialBalance) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InitialBalance))) - i-- - dAtA[i] = 0x1a - } - if x.CompletionTime != nil { - encoded, err := options.Marshal(x.CompletionTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.CreationHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*UnbondingDelegationEntry) - 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: UnbondingDelegationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnbondingDelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - x.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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.CompletionTime == nil { - x.CompletionTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", 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.InitialBalance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RedelegationEntry protoreflect.MessageDescriptor - fd_RedelegationEntry_creation_height protoreflect.FieldDescriptor - fd_RedelegationEntry_completion_time protoreflect.FieldDescriptor - fd_RedelegationEntry_initial_balance protoreflect.FieldDescriptor - fd_RedelegationEntry_shares_dst protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_RedelegationEntry = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("RedelegationEntry") - fd_RedelegationEntry_creation_height = md_RedelegationEntry.Fields().ByName("creation_height") - fd_RedelegationEntry_completion_time = md_RedelegationEntry.Fields().ByName("completion_time") - fd_RedelegationEntry_initial_balance = md_RedelegationEntry.Fields().ByName("initial_balance") - fd_RedelegationEntry_shares_dst = md_RedelegationEntry.Fields().ByName("shares_dst") -} - -var _ protoreflect.Message = (*fastReflection_RedelegationEntry)(nil) - -type fastReflection_RedelegationEntry RedelegationEntry - -func (x *RedelegationEntry) ProtoReflect() protoreflect.Message { - return (*fastReflection_RedelegationEntry)(x) -} - -func (x *RedelegationEntry) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RedelegationEntry_messageType fastReflection_RedelegationEntry_messageType -var _ protoreflect.MessageType = fastReflection_RedelegationEntry_messageType{} - -type fastReflection_RedelegationEntry_messageType struct{} - -func (x fastReflection_RedelegationEntry_messageType) Zero() protoreflect.Message { - return (*fastReflection_RedelegationEntry)(nil) -} -func (x fastReflection_RedelegationEntry_messageType) New() protoreflect.Message { - return new(fastReflection_RedelegationEntry) -} -func (x fastReflection_RedelegationEntry_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RedelegationEntry -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RedelegationEntry) Descriptor() protoreflect.MessageDescriptor { - return md_RedelegationEntry -} - -// 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_RedelegationEntry) Type() protoreflect.MessageType { - return _fastReflection_RedelegationEntry_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RedelegationEntry) New() protoreflect.Message { - return new(fastReflection_RedelegationEntry) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RedelegationEntry) Interface() protoreflect.ProtoMessage { - return (*RedelegationEntry)(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_RedelegationEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CreationHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.CreationHeight) - if !f(fd_RedelegationEntry_creation_height, value) { - return - } - } - if x.CompletionTime != nil { - value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - if !f(fd_RedelegationEntry_completion_time, value) { - return - } - } - if x.InitialBalance != "" { - value := protoreflect.ValueOfString(x.InitialBalance) - if !f(fd_RedelegationEntry_initial_balance, value) { - return - } - } - if x.SharesDst != "" { - value := protoreflect.ValueOfString(x.SharesDst) - if !f(fd_RedelegationEntry_shares_dst, 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_RedelegationEntry) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntry.creation_height": - return x.CreationHeight != int64(0) - case "cosmos.staking.v1beta1.RedelegationEntry.completion_time": - return x.CompletionTime != nil - case "cosmos.staking.v1beta1.RedelegationEntry.initial_balance": - return x.InitialBalance != "" - case "cosmos.staking.v1beta1.RedelegationEntry.shares_dst": - return x.SharesDst != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntry 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_RedelegationEntry) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntry.creation_height": - x.CreationHeight = int64(0) - case "cosmos.staking.v1beta1.RedelegationEntry.completion_time": - x.CompletionTime = nil - case "cosmos.staking.v1beta1.RedelegationEntry.initial_balance": - x.InitialBalance = "" - case "cosmos.staking.v1beta1.RedelegationEntry.shares_dst": - x.SharesDst = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntry 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_RedelegationEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntry.creation_height": - value := x.CreationHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.staking.v1beta1.RedelegationEntry.completion_time": - value := x.CompletionTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationEntry.initial_balance": - value := x.InitialBalance - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.RedelegationEntry.shares_dst": - value := x.SharesDst - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntry 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_RedelegationEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntry.creation_height": - x.CreationHeight = value.Int() - case "cosmos.staking.v1beta1.RedelegationEntry.completion_time": - x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.staking.v1beta1.RedelegationEntry.initial_balance": - x.InitialBalance = value.Interface().(string) - case "cosmos.staking.v1beta1.RedelegationEntry.shares_dst": - x.SharesDst = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntry 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_RedelegationEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntry.completion_time": - if x.CompletionTime == nil { - x.CompletionTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationEntry.creation_height": - panic(fmt.Errorf("field creation_height of message cosmos.staking.v1beta1.RedelegationEntry is not mutable")) - case "cosmos.staking.v1beta1.RedelegationEntry.initial_balance": - panic(fmt.Errorf("field initial_balance of message cosmos.staking.v1beta1.RedelegationEntry is not mutable")) - case "cosmos.staking.v1beta1.RedelegationEntry.shares_dst": - panic(fmt.Errorf("field shares_dst of message cosmos.staking.v1beta1.RedelegationEntry is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntry 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_RedelegationEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntry.creation_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.staking.v1beta1.RedelegationEntry.completion_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationEntry.initial_balance": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.RedelegationEntry.shares_dst": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntry")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntry 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_RedelegationEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.RedelegationEntry", 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_RedelegationEntry) 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_RedelegationEntry) 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_RedelegationEntry) 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_RedelegationEntry) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RedelegationEntry) - 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.CreationHeight != 0 { - n += 1 + runtime.Sov(uint64(x.CreationHeight)) - } - if x.CompletionTime != nil { - l = options.Size(x.CompletionTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.InitialBalance) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SharesDst) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RedelegationEntry) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.SharesDst) > 0 { - i -= len(x.SharesDst) - copy(dAtA[i:], x.SharesDst) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SharesDst))) - i-- - dAtA[i] = 0x22 - } - if len(x.InitialBalance) > 0 { - i -= len(x.InitialBalance) - copy(dAtA[i:], x.InitialBalance) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InitialBalance))) - i-- - dAtA[i] = 0x1a - } - if x.CompletionTime != nil { - encoded, err := options.Marshal(x.CompletionTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.CreationHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RedelegationEntry) - 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: RedelegationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RedelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - x.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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.CompletionTime == nil { - x.CompletionTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", 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.InitialBalance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SharesDst", 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.SharesDst = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Redelegation_4_list)(nil) - -type _Redelegation_4_list struct { - list *[]*RedelegationEntry -} - -func (x *_Redelegation_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Redelegation_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Redelegation_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*RedelegationEntry) - (*x.list)[i] = concreteValue -} - -func (x *_Redelegation_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*RedelegationEntry) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Redelegation_4_list) AppendMutable() protoreflect.Value { - v := new(RedelegationEntry) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Redelegation_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Redelegation_4_list) NewElement() protoreflect.Value { - v := new(RedelegationEntry) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Redelegation_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Redelegation protoreflect.MessageDescriptor - fd_Redelegation_delegator_address protoreflect.FieldDescriptor - fd_Redelegation_validator_src_address protoreflect.FieldDescriptor - fd_Redelegation_validator_dst_address protoreflect.FieldDescriptor - fd_Redelegation_entries protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Redelegation = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Redelegation") - fd_Redelegation_delegator_address = md_Redelegation.Fields().ByName("delegator_address") - fd_Redelegation_validator_src_address = md_Redelegation.Fields().ByName("validator_src_address") - fd_Redelegation_validator_dst_address = md_Redelegation.Fields().ByName("validator_dst_address") - fd_Redelegation_entries = md_Redelegation.Fields().ByName("entries") -} - -var _ protoreflect.Message = (*fastReflection_Redelegation)(nil) - -type fastReflection_Redelegation Redelegation - -func (x *Redelegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_Redelegation)(x) -} - -func (x *Redelegation) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Redelegation_messageType fastReflection_Redelegation_messageType -var _ protoreflect.MessageType = fastReflection_Redelegation_messageType{} - -type fastReflection_Redelegation_messageType struct{} - -func (x fastReflection_Redelegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_Redelegation)(nil) -} -func (x fastReflection_Redelegation_messageType) New() protoreflect.Message { - return new(fastReflection_Redelegation) -} -func (x fastReflection_Redelegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Redelegation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Redelegation) Descriptor() protoreflect.MessageDescriptor { - return md_Redelegation -} - -// 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_Redelegation) Type() protoreflect.MessageType { - return _fastReflection_Redelegation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Redelegation) New() protoreflect.Message { - return new(fastReflection_Redelegation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Redelegation) Interface() protoreflect.ProtoMessage { - return (*Redelegation)(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_Redelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_Redelegation_delegator_address, value) { - return - } - } - if x.ValidatorSrcAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorSrcAddress) - if !f(fd_Redelegation_validator_src_address, value) { - return - } - } - if x.ValidatorDstAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorDstAddress) - if !f(fd_Redelegation_validator_dst_address, value) { - return - } - } - if len(x.Entries) != 0 { - value := protoreflect.ValueOfList(&_Redelegation_4_list{list: &x.Entries}) - if !f(fd_Redelegation_entries, 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_Redelegation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Redelegation.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.Redelegation.validator_src_address": - return x.ValidatorSrcAddress != "" - case "cosmos.staking.v1beta1.Redelegation.validator_dst_address": - return x.ValidatorDstAddress != "" - case "cosmos.staking.v1beta1.Redelegation.entries": - return len(x.Entries) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Redelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Redelegation 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_Redelegation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Redelegation.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.Redelegation.validator_src_address": - x.ValidatorSrcAddress = "" - case "cosmos.staking.v1beta1.Redelegation.validator_dst_address": - x.ValidatorDstAddress = "" - case "cosmos.staking.v1beta1.Redelegation.entries": - x.Entries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Redelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Redelegation 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_Redelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Redelegation.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Redelegation.validator_src_address": - value := x.ValidatorSrcAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Redelegation.validator_dst_address": - value := x.ValidatorDstAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Redelegation.entries": - if len(x.Entries) == 0 { - return protoreflect.ValueOfList(&_Redelegation_4_list{}) - } - listValue := &_Redelegation_4_list{list: &x.Entries} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Redelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Redelegation 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_Redelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Redelegation.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.Redelegation.validator_src_address": - x.ValidatorSrcAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.Redelegation.validator_dst_address": - x.ValidatorDstAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.Redelegation.entries": - lv := value.List() - clv := lv.(*_Redelegation_4_list) - x.Entries = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Redelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Redelegation 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_Redelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Redelegation.entries": - if x.Entries == nil { - x.Entries = []*RedelegationEntry{} - } - value := &_Redelegation_4_list{list: &x.Entries} - return protoreflect.ValueOfList(value) - case "cosmos.staking.v1beta1.Redelegation.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.Redelegation is not mutable")) - case "cosmos.staking.v1beta1.Redelegation.validator_src_address": - panic(fmt.Errorf("field validator_src_address of message cosmos.staking.v1beta1.Redelegation is not mutable")) - case "cosmos.staking.v1beta1.Redelegation.validator_dst_address": - panic(fmt.Errorf("field validator_dst_address of message cosmos.staking.v1beta1.Redelegation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Redelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Redelegation 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_Redelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Redelegation.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Redelegation.validator_src_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Redelegation.validator_dst_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Redelegation.entries": - list := []*RedelegationEntry{} - return protoreflect.ValueOfList(&_Redelegation_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Redelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Redelegation 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_Redelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Redelegation", 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_Redelegation) 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_Redelegation) 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_Redelegation) 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_Redelegation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Redelegation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorDstAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Entries) > 0 { - for _, e := range x.Entries { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Redelegation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Entries) > 0 { - for iNdEx := len(x.Entries) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Entries[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.ValidatorDstAddress) > 0 { - i -= len(x.ValidatorDstAddress) - copy(dAtA[i:], x.ValidatorDstAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorSrcAddress) > 0 { - i -= len(x.ValidatorSrcAddress) - copy(dAtA[i:], x.ValidatorSrcAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorSrcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*Redelegation) - 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: Redelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Redelegation: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", 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.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", 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.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Entries = append(x.Entries, &RedelegationEntry{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Entries[len(x.Entries)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_unbonding_time protoreflect.FieldDescriptor - fd_Params_max_validators protoreflect.FieldDescriptor - fd_Params_max_entries protoreflect.FieldDescriptor - fd_Params_historical_entries protoreflect.FieldDescriptor - fd_Params_bond_denom protoreflect.FieldDescriptor - fd_Params_min_commission_rate protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Params = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Params") - fd_Params_unbonding_time = md_Params.Fields().ByName("unbonding_time") - fd_Params_max_validators = md_Params.Fields().ByName("max_validators") - fd_Params_max_entries = md_Params.Fields().ByName("max_entries") - fd_Params_historical_entries = md_Params.Fields().ByName("historical_entries") - fd_Params_bond_denom = md_Params.Fields().ByName("bond_denom") - fd_Params_min_commission_rate = md_Params.Fields().ByName("min_commission_rate") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.UnbondingTime != nil { - value := protoreflect.ValueOfMessage(x.UnbondingTime.ProtoReflect()) - if !f(fd_Params_unbonding_time, value) { - return - } - } - if x.MaxValidators != uint32(0) { - value := protoreflect.ValueOfUint32(x.MaxValidators) - if !f(fd_Params_max_validators, value) { - return - } - } - if x.MaxEntries != uint32(0) { - value := protoreflect.ValueOfUint32(x.MaxEntries) - if !f(fd_Params_max_entries, value) { - return - } - } - if x.HistoricalEntries != uint32(0) { - value := protoreflect.ValueOfUint32(x.HistoricalEntries) - if !f(fd_Params_historical_entries, value) { - return - } - } - if x.BondDenom != "" { - value := protoreflect.ValueOfString(x.BondDenom) - if !f(fd_Params_bond_denom, value) { - return - } - } - if x.MinCommissionRate != "" { - value := protoreflect.ValueOfString(x.MinCommissionRate) - if !f(fd_Params_min_commission_rate, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Params.unbonding_time": - return x.UnbondingTime != nil - case "cosmos.staking.v1beta1.Params.max_validators": - return x.MaxValidators != uint32(0) - case "cosmos.staking.v1beta1.Params.max_entries": - return x.MaxEntries != uint32(0) - case "cosmos.staking.v1beta1.Params.historical_entries": - return x.HistoricalEntries != uint32(0) - case "cosmos.staking.v1beta1.Params.bond_denom": - return x.BondDenom != "" - case "cosmos.staking.v1beta1.Params.min_commission_rate": - return x.MinCommissionRate != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Params.unbonding_time": - x.UnbondingTime = nil - case "cosmos.staking.v1beta1.Params.max_validators": - x.MaxValidators = uint32(0) - case "cosmos.staking.v1beta1.Params.max_entries": - x.MaxEntries = uint32(0) - case "cosmos.staking.v1beta1.Params.historical_entries": - x.HistoricalEntries = uint32(0) - case "cosmos.staking.v1beta1.Params.bond_denom": - x.BondDenom = "" - case "cosmos.staking.v1beta1.Params.min_commission_rate": - x.MinCommissionRate = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Params.unbonding_time": - value := x.UnbondingTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.Params.max_validators": - value := x.MaxValidators - return protoreflect.ValueOfUint32(value) - case "cosmos.staking.v1beta1.Params.max_entries": - value := x.MaxEntries - return protoreflect.ValueOfUint32(value) - case "cosmos.staking.v1beta1.Params.historical_entries": - value := x.HistoricalEntries - return protoreflect.ValueOfUint32(value) - case "cosmos.staking.v1beta1.Params.bond_denom": - value := x.BondDenom - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Params.min_commission_rate": - value := x.MinCommissionRate - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Params.unbonding_time": - x.UnbondingTime = value.Message().Interface().(*durationpb.Duration) - case "cosmos.staking.v1beta1.Params.max_validators": - x.MaxValidators = uint32(value.Uint()) - case "cosmos.staking.v1beta1.Params.max_entries": - x.MaxEntries = uint32(value.Uint()) - case "cosmos.staking.v1beta1.Params.historical_entries": - x.HistoricalEntries = uint32(value.Uint()) - case "cosmos.staking.v1beta1.Params.bond_denom": - x.BondDenom = value.Interface().(string) - case "cosmos.staking.v1beta1.Params.min_commission_rate": - x.MinCommissionRate = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Params.unbonding_time": - if x.UnbondingTime == nil { - x.UnbondingTime = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.UnbondingTime.ProtoReflect()) - case "cosmos.staking.v1beta1.Params.max_validators": - panic(fmt.Errorf("field max_validators of message cosmos.staking.v1beta1.Params is not mutable")) - case "cosmos.staking.v1beta1.Params.max_entries": - panic(fmt.Errorf("field max_entries of message cosmos.staking.v1beta1.Params is not mutable")) - case "cosmos.staking.v1beta1.Params.historical_entries": - panic(fmt.Errorf("field historical_entries of message cosmos.staking.v1beta1.Params is not mutable")) - case "cosmos.staking.v1beta1.Params.bond_denom": - panic(fmt.Errorf("field bond_denom of message cosmos.staking.v1beta1.Params is not mutable")) - case "cosmos.staking.v1beta1.Params.min_commission_rate": - panic(fmt.Errorf("field min_commission_rate of message cosmos.staking.v1beta1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Params.unbonding_time": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.Params.max_validators": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.staking.v1beta1.Params.max_entries": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.staking.v1beta1.Params.historical_entries": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.staking.v1beta1.Params.bond_denom": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Params.min_commission_rate": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Params")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.UnbondingTime != nil { - l = options.Size(x.UnbondingTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxValidators != 0 { - n += 1 + runtime.Sov(uint64(x.MaxValidators)) - } - if x.MaxEntries != 0 { - n += 1 + runtime.Sov(uint64(x.MaxEntries)) - } - if x.HistoricalEntries != 0 { - n += 1 + runtime.Sov(uint64(x.HistoricalEntries)) - } - l = len(x.BondDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinCommissionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MinCommissionRate) > 0 { - i -= len(x.MinCommissionRate) - copy(dAtA[i:], x.MinCommissionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinCommissionRate))) - i-- - dAtA[i] = 0x32 - } - if len(x.BondDenom) > 0 { - i -= len(x.BondDenom) - copy(dAtA[i:], x.BondDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BondDenom))) - i-- - dAtA[i] = 0x2a - } - if x.HistoricalEntries != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.HistoricalEntries)) - i-- - dAtA[i] = 0x20 - } - if x.MaxEntries != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxEntries)) - i-- - dAtA[i] = 0x18 - } - if x.MaxValidators != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxValidators)) - i-- - dAtA[i] = 0x10 - } - if x.UnbondingTime != nil { - encoded, err := options.Marshal(x.UnbondingTime) - 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().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", 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.UnbondingTime == nil { - x.UnbondingTime = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) - } - x.MaxValidators = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxValidators |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) - } - x.MaxEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) - } - x.HistoricalEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.HistoricalEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BondDenom", 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.BondDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinCommissionRate", 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.MinCommissionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DelegationResponse protoreflect.MessageDescriptor - fd_DelegationResponse_delegation protoreflect.FieldDescriptor - fd_DelegationResponse_balance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_DelegationResponse = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("DelegationResponse") - fd_DelegationResponse_delegation = md_DelegationResponse.Fields().ByName("delegation") - fd_DelegationResponse_balance = md_DelegationResponse.Fields().ByName("balance") -} - -var _ protoreflect.Message = (*fastReflection_DelegationResponse)(nil) - -type fastReflection_DelegationResponse DelegationResponse - -func (x *DelegationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegationResponse)(x) -} - -func (x *DelegationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelegationResponse_messageType fastReflection_DelegationResponse_messageType -var _ protoreflect.MessageType = fastReflection_DelegationResponse_messageType{} - -type fastReflection_DelegationResponse_messageType struct{} - -func (x fastReflection_DelegationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegationResponse)(nil) -} -func (x fastReflection_DelegationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_DelegationResponse) -} -func (x fastReflection_DelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_DelegationResponse -} - -// 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_DelegationResponse) Type() protoreflect.MessageType { - return _fastReflection_DelegationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegationResponse) New() protoreflect.Message { - return new(fastReflection_DelegationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegationResponse) Interface() protoreflect.ProtoMessage { - return (*DelegationResponse)(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_DelegationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Delegation != nil { - value := protoreflect.ValueOfMessage(x.Delegation.ProtoReflect()) - if !f(fd_DelegationResponse_delegation, value) { - return - } - } - if x.Balance != nil { - value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - if !f(fd_DelegationResponse_balance, 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_DelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DelegationResponse.delegation": - return x.Delegation != nil - case "cosmos.staking.v1beta1.DelegationResponse.balance": - return x.Balance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DelegationResponse 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_DelegationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DelegationResponse.delegation": - x.Delegation = nil - case "cosmos.staking.v1beta1.DelegationResponse.balance": - x.Balance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DelegationResponse 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_DelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.DelegationResponse.delegation": - value := x.Delegation - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.DelegationResponse.balance": - value := x.Balance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DelegationResponse 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_DelegationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DelegationResponse.delegation": - x.Delegation = value.Message().Interface().(*Delegation) - case "cosmos.staking.v1beta1.DelegationResponse.balance": - x.Balance = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DelegationResponse 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_DelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DelegationResponse.delegation": - if x.Delegation == nil { - x.Delegation = new(Delegation) - } - return protoreflect.ValueOfMessage(x.Delegation.ProtoReflect()) - case "cosmos.staking.v1beta1.DelegationResponse.balance": - if x.Balance == nil { - x.Balance = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DelegationResponse 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_DelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.DelegationResponse.delegation": - m := new(Delegation) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.DelegationResponse.balance": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.DelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.DelegationResponse 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_DelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.DelegationResponse", 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_DelegationResponse) 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_DelegationResponse) 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_DelegationResponse) 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_DelegationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegationResponse) - 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.Delegation != nil { - l = options.Size(x.Delegation) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Balance != nil { - l = options.Size(x.Balance) - 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().(*DelegationResponse) - 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.Balance != nil { - encoded, err := options.Marshal(x.Balance) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Delegation != nil { - encoded, err := options.Marshal(x.Delegation) - 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().(*DelegationResponse) - 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: DelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegationResponse: 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 Delegation", 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.Delegation == nil { - x.Delegation = &Delegation{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Delegation); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance == nil { - x.Balance = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); 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_RedelegationEntryResponse protoreflect.MessageDescriptor - fd_RedelegationEntryResponse_redelegation_entry protoreflect.FieldDescriptor - fd_RedelegationEntryResponse_balance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_RedelegationEntryResponse = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("RedelegationEntryResponse") - fd_RedelegationEntryResponse_redelegation_entry = md_RedelegationEntryResponse.Fields().ByName("redelegation_entry") - fd_RedelegationEntryResponse_balance = md_RedelegationEntryResponse.Fields().ByName("balance") -} - -var _ protoreflect.Message = (*fastReflection_RedelegationEntryResponse)(nil) - -type fastReflection_RedelegationEntryResponse RedelegationEntryResponse - -func (x *RedelegationEntryResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_RedelegationEntryResponse)(x) -} - -func (x *RedelegationEntryResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RedelegationEntryResponse_messageType fastReflection_RedelegationEntryResponse_messageType -var _ protoreflect.MessageType = fastReflection_RedelegationEntryResponse_messageType{} - -type fastReflection_RedelegationEntryResponse_messageType struct{} - -func (x fastReflection_RedelegationEntryResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_RedelegationEntryResponse)(nil) -} -func (x fastReflection_RedelegationEntryResponse_messageType) New() protoreflect.Message { - return new(fastReflection_RedelegationEntryResponse) -} -func (x fastReflection_RedelegationEntryResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RedelegationEntryResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RedelegationEntryResponse) Descriptor() protoreflect.MessageDescriptor { - return md_RedelegationEntryResponse -} - -// 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_RedelegationEntryResponse) Type() protoreflect.MessageType { - return _fastReflection_RedelegationEntryResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RedelegationEntryResponse) New() protoreflect.Message { - return new(fastReflection_RedelegationEntryResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RedelegationEntryResponse) Interface() protoreflect.ProtoMessage { - return (*RedelegationEntryResponse)(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_RedelegationEntryResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RedelegationEntry != nil { - value := protoreflect.ValueOfMessage(x.RedelegationEntry.ProtoReflect()) - if !f(fd_RedelegationEntryResponse_redelegation_entry, value) { - return - } - } - if x.Balance != "" { - value := protoreflect.ValueOfString(x.Balance) - if !f(fd_RedelegationEntryResponse_balance, 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_RedelegationEntryResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry": - return x.RedelegationEntry != nil - case "cosmos.staking.v1beta1.RedelegationEntryResponse.balance": - return x.Balance != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntryResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntryResponse 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_RedelegationEntryResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry": - x.RedelegationEntry = nil - case "cosmos.staking.v1beta1.RedelegationEntryResponse.balance": - x.Balance = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntryResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntryResponse 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_RedelegationEntryResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry": - value := x.RedelegationEntry - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationEntryResponse.balance": - value := x.Balance - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntryResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntryResponse 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_RedelegationEntryResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry": - x.RedelegationEntry = value.Message().Interface().(*RedelegationEntry) - case "cosmos.staking.v1beta1.RedelegationEntryResponse.balance": - x.Balance = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntryResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntryResponse 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_RedelegationEntryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry": - if x.RedelegationEntry == nil { - x.RedelegationEntry = new(RedelegationEntry) - } - return protoreflect.ValueOfMessage(x.RedelegationEntry.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationEntryResponse.balance": - panic(fmt.Errorf("field balance of message cosmos.staking.v1beta1.RedelegationEntryResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntryResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntryResponse 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_RedelegationEntryResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry": - m := new(RedelegationEntry) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationEntryResponse.balance": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationEntryResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationEntryResponse 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_RedelegationEntryResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.RedelegationEntryResponse", 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_RedelegationEntryResponse) 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_RedelegationEntryResponse) 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_RedelegationEntryResponse) 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_RedelegationEntryResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RedelegationEntryResponse) - 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.RedelegationEntry != nil { - l = options.Size(x.RedelegationEntry) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Balance) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RedelegationEntryResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Balance) > 0 { - i -= len(x.Balance) - copy(dAtA[i:], x.Balance) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Balance))) - i-- - dAtA[i] = 0x22 - } - if x.RedelegationEntry != nil { - encoded, err := options.Marshal(x.RedelegationEntry) - 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().(*RedelegationEntryResponse) - 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: RedelegationEntryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RedelegationEntryResponse: 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 RedelegationEntry", 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.RedelegationEntry == nil { - x.RedelegationEntry = &RedelegationEntry{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RedelegationEntry); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_RedelegationResponse_2_list)(nil) - -type _RedelegationResponse_2_list struct { - list *[]*RedelegationEntryResponse -} - -func (x *_RedelegationResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_RedelegationResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_RedelegationResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*RedelegationEntryResponse) - (*x.list)[i] = concreteValue -} - -func (x *_RedelegationResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*RedelegationEntryResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_RedelegationResponse_2_list) AppendMutable() protoreflect.Value { - v := new(RedelegationEntryResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RedelegationResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_RedelegationResponse_2_list) NewElement() protoreflect.Value { - v := new(RedelegationEntryResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RedelegationResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_RedelegationResponse protoreflect.MessageDescriptor - fd_RedelegationResponse_redelegation protoreflect.FieldDescriptor - fd_RedelegationResponse_entries protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_RedelegationResponse = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("RedelegationResponse") - fd_RedelegationResponse_redelegation = md_RedelegationResponse.Fields().ByName("redelegation") - fd_RedelegationResponse_entries = md_RedelegationResponse.Fields().ByName("entries") -} - -var _ protoreflect.Message = (*fastReflection_RedelegationResponse)(nil) - -type fastReflection_RedelegationResponse RedelegationResponse - -func (x *RedelegationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_RedelegationResponse)(x) -} - -func (x *RedelegationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RedelegationResponse_messageType fastReflection_RedelegationResponse_messageType -var _ protoreflect.MessageType = fastReflection_RedelegationResponse_messageType{} - -type fastReflection_RedelegationResponse_messageType struct{} - -func (x fastReflection_RedelegationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_RedelegationResponse)(nil) -} -func (x fastReflection_RedelegationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_RedelegationResponse) -} -func (x fastReflection_RedelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RedelegationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RedelegationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_RedelegationResponse -} - -// 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_RedelegationResponse) Type() protoreflect.MessageType { - return _fastReflection_RedelegationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RedelegationResponse) New() protoreflect.Message { - return new(fastReflection_RedelegationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RedelegationResponse) Interface() protoreflect.ProtoMessage { - return (*RedelegationResponse)(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_RedelegationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Redelegation != nil { - value := protoreflect.ValueOfMessage(x.Redelegation.ProtoReflect()) - if !f(fd_RedelegationResponse_redelegation, value) { - return - } - } - if len(x.Entries) != 0 { - value := protoreflect.ValueOfList(&_RedelegationResponse_2_list{list: &x.Entries}) - if !f(fd_RedelegationResponse_entries, 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_RedelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationResponse.redelegation": - return x.Redelegation != nil - case "cosmos.staking.v1beta1.RedelegationResponse.entries": - return len(x.Entries) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationResponse 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_RedelegationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationResponse.redelegation": - x.Redelegation = nil - case "cosmos.staking.v1beta1.RedelegationResponse.entries": - x.Entries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationResponse 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_RedelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.RedelegationResponse.redelegation": - value := x.Redelegation - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationResponse.entries": - if len(x.Entries) == 0 { - return protoreflect.ValueOfList(&_RedelegationResponse_2_list{}) - } - listValue := &_RedelegationResponse_2_list{list: &x.Entries} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationResponse 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_RedelegationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationResponse.redelegation": - x.Redelegation = value.Message().Interface().(*Redelegation) - case "cosmos.staking.v1beta1.RedelegationResponse.entries": - lv := value.List() - clv := lv.(*_RedelegationResponse_2_list) - x.Entries = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationResponse 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_RedelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationResponse.redelegation": - if x.Redelegation == nil { - x.Redelegation = new(Redelegation) - } - return protoreflect.ValueOfMessage(x.Redelegation.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationResponse.entries": - if x.Entries == nil { - x.Entries = []*RedelegationEntryResponse{} - } - value := &_RedelegationResponse_2_list{list: &x.Entries} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationResponse 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_RedelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.RedelegationResponse.redelegation": - m := new(Redelegation) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.RedelegationResponse.entries": - list := []*RedelegationEntryResponse{} - return protoreflect.ValueOfList(&_RedelegationResponse_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.RedelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.RedelegationResponse 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_RedelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.RedelegationResponse", 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_RedelegationResponse) 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_RedelegationResponse) 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_RedelegationResponse) 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_RedelegationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RedelegationResponse) - 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.Redelegation != nil { - l = options.Size(x.Redelegation) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Entries) > 0 { - for _, e := range x.Entries { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RedelegationResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Entries) > 0 { - for iNdEx := len(x.Entries) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Entries[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Redelegation != nil { - encoded, err := options.Marshal(x.Redelegation) - 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().(*RedelegationResponse) - 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: RedelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RedelegationResponse: 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 Redelegation", 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.Redelegation == nil { - x.Redelegation = &Redelegation{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Redelegation); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Entries = append(x.Entries, &RedelegationEntryResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Entries[len(x.Entries)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Pool protoreflect.MessageDescriptor - fd_Pool_not_bonded_tokens protoreflect.FieldDescriptor - fd_Pool_bonded_tokens protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_staking_proto_init() - md_Pool = File_cosmos_staking_v1beta1_staking_proto.Messages().ByName("Pool") - fd_Pool_not_bonded_tokens = md_Pool.Fields().ByName("not_bonded_tokens") - fd_Pool_bonded_tokens = md_Pool.Fields().ByName("bonded_tokens") -} - -var _ protoreflect.Message = (*fastReflection_Pool)(nil) - -type fastReflection_Pool Pool - -func (x *Pool) ProtoReflect() protoreflect.Message { - return (*fastReflection_Pool)(x) -} - -func (x *Pool) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Pool_messageType fastReflection_Pool_messageType -var _ protoreflect.MessageType = fastReflection_Pool_messageType{} - -type fastReflection_Pool_messageType struct{} - -func (x fastReflection_Pool_messageType) Zero() protoreflect.Message { - return (*fastReflection_Pool)(nil) -} -func (x fastReflection_Pool_messageType) New() protoreflect.Message { - return new(fastReflection_Pool) -} -func (x fastReflection_Pool_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Pool -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Pool) Descriptor() protoreflect.MessageDescriptor { - return md_Pool -} - -// 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_Pool) Type() protoreflect.MessageType { - return _fastReflection_Pool_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Pool) New() protoreflect.Message { - return new(fastReflection_Pool) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Pool) Interface() protoreflect.ProtoMessage { - return (*Pool)(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_Pool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.NotBondedTokens != "" { - value := protoreflect.ValueOfString(x.NotBondedTokens) - if !f(fd_Pool_not_bonded_tokens, value) { - return - } - } - if x.BondedTokens != "" { - value := protoreflect.ValueOfString(x.BondedTokens) - if !f(fd_Pool_bonded_tokens, 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_Pool) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Pool.not_bonded_tokens": - return x.NotBondedTokens != "" - case "cosmos.staking.v1beta1.Pool.bonded_tokens": - return x.BondedTokens != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Pool")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Pool 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_Pool) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Pool.not_bonded_tokens": - x.NotBondedTokens = "" - case "cosmos.staking.v1beta1.Pool.bonded_tokens": - x.BondedTokens = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Pool")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Pool 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_Pool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.Pool.not_bonded_tokens": - value := x.NotBondedTokens - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.Pool.bonded_tokens": - value := x.BondedTokens - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Pool")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Pool 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_Pool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Pool.not_bonded_tokens": - x.NotBondedTokens = value.Interface().(string) - case "cosmos.staking.v1beta1.Pool.bonded_tokens": - x.BondedTokens = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Pool")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Pool 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_Pool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Pool.not_bonded_tokens": - panic(fmt.Errorf("field not_bonded_tokens of message cosmos.staking.v1beta1.Pool is not mutable")) - case "cosmos.staking.v1beta1.Pool.bonded_tokens": - panic(fmt.Errorf("field bonded_tokens of message cosmos.staking.v1beta1.Pool is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Pool")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Pool 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_Pool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.Pool.not_bonded_tokens": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.Pool.bonded_tokens": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.Pool")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.Pool 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_Pool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.Pool", 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_Pool) 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_Pool) 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_Pool) 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_Pool) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Pool) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.NotBondedTokens) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BondedTokens) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Pool) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.BondedTokens) > 0 { - i -= len(x.BondedTokens) - copy(dAtA[i:], x.BondedTokens) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BondedTokens))) - i-- - dAtA[i] = 0x12 - } - if len(x.NotBondedTokens) > 0 { - i -= len(x.NotBondedTokens) - copy(dAtA[i:], x.NotBondedTokens) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NotBondedTokens))) - 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().(*Pool) - 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: Pool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Pool: 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 NotBondedTokens", 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.NotBondedTokens = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BondedTokens", 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.BondedTokens = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/staking/v1beta1/staking.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BondStatus is the status of a validator. -type BondStatus int32 - -const ( - // UNSPECIFIED defines an invalid validator status. - BondStatus_BOND_STATUS_UNSPECIFIED BondStatus = 0 - // UNBONDED defines a validator that is not bonded. - BondStatus_BOND_STATUS_UNBONDED BondStatus = 1 - // UNBONDING defines a validator that is unbonding. - BondStatus_BOND_STATUS_UNBONDING BondStatus = 2 - // BONDED defines a validator that is bonded. - BondStatus_BOND_STATUS_BONDED BondStatus = 3 -) - -// Enum value maps for BondStatus. -var ( - BondStatus_name = map[int32]string{ - 0: "BOND_STATUS_UNSPECIFIED", - 1: "BOND_STATUS_UNBONDED", - 2: "BOND_STATUS_UNBONDING", - 3: "BOND_STATUS_BONDED", - } - BondStatus_value = map[string]int32{ - "BOND_STATUS_UNSPECIFIED": 0, - "BOND_STATUS_UNBONDED": 1, - "BOND_STATUS_UNBONDING": 2, - "BOND_STATUS_BONDED": 3, - } -) - -func (x BondStatus) Enum() *BondStatus { - p := new(BondStatus) - *p = x - return p -} - -func (x BondStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BondStatus) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_staking_v1beta1_staking_proto_enumTypes[0].Descriptor() -} - -func (BondStatus) Type() protoreflect.EnumType { - return &file_cosmos_staking_v1beta1_staking_proto_enumTypes[0] -} - -func (x BondStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BondStatus.Descriptor instead. -func (BondStatus) EnumDescriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{0} -} - -// HistoricalInfo contains header and validator information for a given block. -// It is stored as part of staking module's state, which persists the `n` most -// recent HistoricalInfo -// (`n` is set by the staking module's `historical_entries` parameter). -type HistoricalInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *types.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Valset []*Validator `protobuf:"bytes,2,rep,name=valset,proto3" json:"valset,omitempty"` -} - -func (x *HistoricalInfo) Reset() { - *x = HistoricalInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HistoricalInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HistoricalInfo) ProtoMessage() {} - -// Deprecated: Use HistoricalInfo.ProtoReflect.Descriptor instead. -func (*HistoricalInfo) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{0} -} - -func (x *HistoricalInfo) GetHeader() *types.Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *HistoricalInfo) GetValset() []*Validator { - if x != nil { - return x.Valset - } - return nil -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -type CommissionRates struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rate is the commission rate charged to delegators, as a fraction. - Rate string `protobuf:"bytes,1,opt,name=rate,proto3" json:"rate,omitempty"` - // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - MaxRate string `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3" json:"max_rate,omitempty"` - // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - MaxChangeRate string `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3" json:"max_change_rate,omitempty"` -} - -func (x *CommissionRates) Reset() { - *x = CommissionRates{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommissionRates) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommissionRates) ProtoMessage() {} - -// Deprecated: Use CommissionRates.ProtoReflect.Descriptor instead. -func (*CommissionRates) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{1} -} - -func (x *CommissionRates) GetRate() string { - if x != nil { - return x.Rate - } - return "" -} - -func (x *CommissionRates) GetMaxRate() string { - if x != nil { - return x.MaxRate - } - return "" -} - -func (x *CommissionRates) GetMaxChangeRate() string { - if x != nil { - return x.MaxChangeRate - } - return "" -} - -// Commission defines commission parameters for a given validator. -type Commission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // commission_rates defines the initial commission rates to be used for creating a validator. - CommissionRates *CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3" json:"commission_rates,omitempty"` - // update_time is the last time the commission rate was changed. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` -} - -func (x *Commission) Reset() { - *x = Commission{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Commission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Commission) ProtoMessage() {} - -// Deprecated: Use Commission.ProtoReflect.Descriptor instead. -func (*Commission) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{2} -} - -func (x *Commission) GetCommissionRates() *CommissionRates { - if x != nil { - return x.CommissionRates - } - return nil -} - -func (x *Commission) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -// Description defines a validator description. -type Description struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // moniker defines a human-readable name for the validator. - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - // identity defines an optional identity signature (ex. UPort or Keybase). - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` - // website defines an optional website link. - Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` - // security_contact defines an optional email for security contact. - SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty"` - // details define other optional details. - Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` -} - -func (x *Description) Reset() { - *x = Description{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Description) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Description) ProtoMessage() {} - -// Deprecated: Use Description.ProtoReflect.Descriptor instead. -func (*Description) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{3} -} - -func (x *Description) GetMoniker() string { - if x != nil { - return x.Moniker - } - return "" -} - -func (x *Description) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *Description) GetWebsite() string { - if x != nil { - return x.Website - } - return "" -} - -func (x *Description) GetSecurityContact() string { - if x != nil { - return x.SecurityContact - } - return "" -} - -func (x *Description) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -type Validator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // operator_address defines the address of the validator's operator; bech encoded in JSON. - OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` - // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - ConsensusPubkey *anypb.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty"` - // jailed defined whether the validator has been jailed from bonded status or not. - Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` - // status is the validator status (bonded/unbonding/unbonded). - Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` - // tokens define the delegated tokens (incl. self-delegation). - Tokens string `protobuf:"bytes,5,opt,name=tokens,proto3" json:"tokens,omitempty"` - // delegator_shares defines total shares issued to a validator's delegators. - DelegatorShares string `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3" json:"delegator_shares,omitempty"` - // description defines the description terms for the validator. - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` - // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty"` - // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - UnbondingTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` - // commission defines the commission parameters. - Commission *Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission,omitempty"` - // min_self_delegation is the validator's self declared minimum self delegation. - MinSelfDelegation string `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3" json:"min_self_delegation,omitempty"` -} - -func (x *Validator) Reset() { - *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Validator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Validator) ProtoMessage() {} - -// Deprecated: Use Validator.ProtoReflect.Descriptor instead. -func (*Validator) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{4} -} - -func (x *Validator) GetOperatorAddress() string { - if x != nil { - return x.OperatorAddress - } - return "" -} - -func (x *Validator) GetConsensusPubkey() *anypb.Any { - if x != nil { - return x.ConsensusPubkey - } - return nil -} - -func (x *Validator) GetJailed() bool { - if x != nil { - return x.Jailed - } - return false -} - -func (x *Validator) GetStatus() BondStatus { - if x != nil { - return x.Status - } - return BondStatus_BOND_STATUS_UNSPECIFIED -} - -func (x *Validator) GetTokens() string { - if x != nil { - return x.Tokens - } - return "" -} - -func (x *Validator) GetDelegatorShares() string { - if x != nil { - return x.DelegatorShares - } - return "" -} - -func (x *Validator) GetDescription() *Description { - if x != nil { - return x.Description - } - return nil -} - -func (x *Validator) GetUnbondingHeight() int64 { - if x != nil { - return x.UnbondingHeight - } - return 0 -} - -func (x *Validator) GetUnbondingTime() *timestamppb.Timestamp { - if x != nil { - return x.UnbondingTime - } - return nil -} - -func (x *Validator) GetCommission() *Commission { - if x != nil { - return x.Commission - } - return nil -} - -func (x *Validator) GetMinSelfDelegation() string { - if x != nil { - return x.MinSelfDelegation - } - return "" -} - -// ValAddresses defines a repeated set of validator addresses. -type ValAddresses struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` -} - -func (x *ValAddresses) Reset() { - *x = ValAddresses{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValAddresses) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValAddresses) ProtoMessage() {} - -// Deprecated: Use ValAddresses.ProtoReflect.Descriptor instead. -func (*ValAddresses) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{5} -} - -func (x *ValAddresses) GetAddresses() []string { - if x != nil { - return x.Addresses - } - return nil -} - -// DVPair is struct that just has a delegator-validator pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a DVPair can -// be used to construct the key to getting an UnbondingDelegation from state. -type DVPair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *DVPair) Reset() { - *x = DVPair{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DVPair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DVPair) ProtoMessage() {} - -// Deprecated: Use DVPair.ProtoReflect.Descriptor instead. -func (*DVPair) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{6} -} - -func (x *DVPair) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *DVPair) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// DVPairs defines an array of DVPair objects. -type DVPairs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pairs []*DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"` -} - -func (x *DVPairs) Reset() { - *x = DVPairs{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DVPairs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DVPairs) ProtoMessage() {} - -// Deprecated: Use DVPairs.ProtoReflect.Descriptor instead. -func (*DVPairs) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{7} -} - -func (x *DVPairs) GetPairs() []*DVPair { - if x != nil { - return x.Pairs - } - return nil -} - -// DVVTriplet is struct that just has a delegator-validator-validator triplet -// with no other data. It is intended to be used as a marshalable pointer. For -// example, a DVVTriplet can be used to construct the key to getting a -// Redelegation from state. -type DVVTriplet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty"` - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty"` -} - -func (x *DVVTriplet) Reset() { - *x = DVVTriplet{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DVVTriplet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DVVTriplet) ProtoMessage() {} - -// Deprecated: Use DVVTriplet.ProtoReflect.Descriptor instead. -func (*DVVTriplet) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{8} -} - -func (x *DVVTriplet) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *DVVTriplet) GetValidatorSrcAddress() string { - if x != nil { - return x.ValidatorSrcAddress - } - return "" -} - -func (x *DVVTriplet) GetValidatorDstAddress() string { - if x != nil { - return x.ValidatorDstAddress - } - return "" -} - -// DVVTriplets defines an array of DVVTriplet objects. -type DVVTriplets struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Triplets []*DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets,omitempty"` -} - -func (x *DVVTriplets) Reset() { - *x = DVVTriplets{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DVVTriplets) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DVVTriplets) ProtoMessage() {} - -// Deprecated: Use DVVTriplets.ProtoReflect.Descriptor instead. -func (*DVVTriplets) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{9} -} - -func (x *DVVTriplets) GetTriplets() []*DVVTriplet { - if x != nil { - return x.Triplets - } - return nil -} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -type Delegation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address is the bech32-encoded address of the delegator. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the bech32-encoded address of the validator. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // shares define the delegation shares received. - Shares string `protobuf:"bytes,3,opt,name=shares,proto3" json:"shares,omitempty"` -} - -func (x *Delegation) Reset() { - *x = Delegation{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Delegation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Delegation) ProtoMessage() {} - -// Deprecated: Use Delegation.ProtoReflect.Descriptor instead. -func (*Delegation) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{10} -} - -func (x *Delegation) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *Delegation) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *Delegation) GetShares() string { - if x != nil { - return x.Shares - } - return "" -} - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -type UnbondingDelegation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address is the bech32-encoded address of the delegator. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_address is the bech32-encoded address of the validator. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // entries are the unbonding delegation entries. - Entries []*UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries,omitempty"` // unbonding delegation entries -} - -func (x *UnbondingDelegation) Reset() { - *x = UnbondingDelegation{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnbondingDelegation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnbondingDelegation) ProtoMessage() {} - -// Deprecated: Use UnbondingDelegation.ProtoReflect.Descriptor instead. -func (*UnbondingDelegation) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{11} -} - -func (x *UnbondingDelegation) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *UnbondingDelegation) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *UnbondingDelegation) GetEntries() []*UnbondingDelegationEntry { - if x != nil { - return x.Entries - } - return nil -} - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -type UnbondingDelegationEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // creation_height is the height which the unbonding took place. - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` - // completion_time is the unix time for unbonding completion. - CompletionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` - // initial_balance defines the tokens initially scheduled to receive at completion. - InitialBalance string `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3" json:"initial_balance,omitempty"` - // balance defines the tokens to receive at completion. - Balance string `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (x *UnbondingDelegationEntry) Reset() { - *x = UnbondingDelegationEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnbondingDelegationEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnbondingDelegationEntry) ProtoMessage() {} - -// Deprecated: Use UnbondingDelegationEntry.ProtoReflect.Descriptor instead. -func (*UnbondingDelegationEntry) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{12} -} - -func (x *UnbondingDelegationEntry) GetCreationHeight() int64 { - if x != nil { - return x.CreationHeight - } - return 0 -} - -func (x *UnbondingDelegationEntry) GetCompletionTime() *timestamppb.Timestamp { - if x != nil { - return x.CompletionTime - } - return nil -} - -func (x *UnbondingDelegationEntry) GetInitialBalance() string { - if x != nil { - return x.InitialBalance - } - return "" -} - -func (x *UnbondingDelegationEntry) GetBalance() string { - if x != nil { - return x.Balance - } - return "" -} - -// RedelegationEntry defines a redelegation object with relevant metadata. -type RedelegationEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // creation_height defines the height which the redelegation took place. - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` - // completion_time defines the unix time for redelegation completion. - CompletionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` - // initial_balance defines the initial balance when redelegation started. - InitialBalance string `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3" json:"initial_balance,omitempty"` - // shares_dst is the amount of destination-validator shares created by redelegation. - SharesDst string `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3" json:"shares_dst,omitempty"` -} - -func (x *RedelegationEntry) Reset() { - *x = RedelegationEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedelegationEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedelegationEntry) ProtoMessage() {} - -// Deprecated: Use RedelegationEntry.ProtoReflect.Descriptor instead. -func (*RedelegationEntry) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{13} -} - -func (x *RedelegationEntry) GetCreationHeight() int64 { - if x != nil { - return x.CreationHeight - } - return 0 -} - -func (x *RedelegationEntry) GetCompletionTime() *timestamppb.Timestamp { - if x != nil { - return x.CompletionTime - } - return nil -} - -func (x *RedelegationEntry) GetInitialBalance() string { - if x != nil { - return x.InitialBalance - } - return "" -} - -func (x *RedelegationEntry) GetSharesDst() string { - if x != nil { - return x.SharesDst - } - return "" -} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -type Redelegation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // delegator_address is the bech32-encoded address of the delegator. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // validator_src_address is the validator redelegation source operator address. - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty"` - // validator_dst_address is the validator redelegation destination operator address. - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty"` - // entries are the redelegation entries. - Entries []*RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries,omitempty"` // redelegation entries -} - -func (x *Redelegation) Reset() { - *x = Redelegation{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Redelegation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Redelegation) ProtoMessage() {} - -// Deprecated: Use Redelegation.ProtoReflect.Descriptor instead. -func (*Redelegation) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{14} -} - -func (x *Redelegation) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *Redelegation) GetValidatorSrcAddress() string { - if x != nil { - return x.ValidatorSrcAddress - } - return "" -} - -func (x *Redelegation) GetValidatorDstAddress() string { - if x != nil { - return x.ValidatorDstAddress - } - return "" -} - -func (x *Redelegation) GetEntries() []*RedelegationEntry { - if x != nil { - return x.Entries - } - return nil -} - -// Params defines the parameters for the staking module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // unbonding_time is the time duration of unbonding. - UnbondingTime *durationpb.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` - // max_validators is the maximum number of validators. - MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty"` - // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` - // historical_entries is the number of historical entries to persist. - HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty"` - // bond_denom defines the bondable coin denomination. - BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty"` - // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - MinCommissionRate string `protobuf:"bytes,6,opt,name=min_commission_rate,json=minCommissionRate,proto3" json:"min_commission_rate,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{15} -} - -func (x *Params) GetUnbondingTime() *durationpb.Duration { - if x != nil { - return x.UnbondingTime - } - return nil -} - -func (x *Params) GetMaxValidators() uint32 { - if x != nil { - return x.MaxValidators - } - return 0 -} - -func (x *Params) GetMaxEntries() uint32 { - if x != nil { - return x.MaxEntries - } - return 0 -} - -func (x *Params) GetHistoricalEntries() uint32 { - if x != nil { - return x.HistoricalEntries - } - return 0 -} - -func (x *Params) GetBondDenom() string { - if x != nil { - return x.BondDenom - } - return "" -} - -func (x *Params) GetMinCommissionRate() string { - if x != nil { - return x.MinCommissionRate - } - return "" -} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -type DelegationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Delegation *Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation,omitempty"` - Balance *v1beta1.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (x *DelegationResponse) Reset() { - *x = DelegationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegationResponse) ProtoMessage() {} - -// Deprecated: Use DelegationResponse.ProtoReflect.Descriptor instead. -func (*DelegationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{16} -} - -func (x *DelegationResponse) GetDelegation() *Delegation { - if x != nil { - return x.Delegation - } - return nil -} - -func (x *DelegationResponse) GetBalance() *v1beta1.Coin { - if x != nil { - return x.Balance - } - return nil -} - -// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -// contains a balance in addition to shares which is more suitable for client -// responses. -type RedelegationEntryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RedelegationEntry *RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry,omitempty"` - Balance string `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (x *RedelegationEntryResponse) Reset() { - *x = RedelegationEntryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedelegationEntryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedelegationEntryResponse) ProtoMessage() {} - -// Deprecated: Use RedelegationEntryResponse.ProtoReflect.Descriptor instead. -func (*RedelegationEntryResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{17} -} - -func (x *RedelegationEntryResponse) GetRedelegationEntry() *RedelegationEntry { - if x != nil { - return x.RedelegationEntry - } - return nil -} - -func (x *RedelegationEntryResponse) GetBalance() string { - if x != nil { - return x.Balance - } - return "" -} - -// RedelegationResponse is equivalent to a Redelegation except that its entries -// contain a balance in addition to shares which is more suitable for client -// responses. -type RedelegationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Redelegation *Redelegation `protobuf:"bytes,1,opt,name=redelegation,proto3" json:"redelegation,omitempty"` - Entries []*RedelegationEntryResponse `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *RedelegationResponse) Reset() { - *x = RedelegationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedelegationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedelegationResponse) ProtoMessage() {} - -// Deprecated: Use RedelegationResponse.ProtoReflect.Descriptor instead. -func (*RedelegationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{18} -} - -func (x *RedelegationResponse) GetRedelegation() *Redelegation { - if x != nil { - return x.Redelegation - } - return nil -} - -func (x *RedelegationResponse) GetEntries() []*RedelegationEntryResponse { - if x != nil { - return x.Entries - } - return nil -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -type Pool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NotBondedTokens string `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3" json:"not_bonded_tokens,omitempty"` - BondedTokens string `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3" json:"bonded_tokens,omitempty"` -} - -func (x *Pool) Reset() { - *x = Pool{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_staking_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pool) ProtoMessage() {} - -// Deprecated: Use Pool.ProtoReflect.Descriptor instead. -func (*Pool) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP(), []int{19} -} - -func (x *Pool) GetNotBondedTokens() string { - if x != nil { - return x.NotBondedTokens - } - return "" -} - -func (x *Pool) GetBondedTokens() string { - if x != nil { - return x.BondedTokens - } - return "" -} - -var File_cosmos_staking_v1beta1_staking_proto protoreflect.FileDescriptor - -var file_cosmos_staking_v1beta1_staking_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x06, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x73, 0x65, 0x74, 0x22, 0xac, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x04, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x6d, - 0x61, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x07, 0x6d, 0x61, 0x78, - 0x52, 0x61, 0x74, 0x65, 0x12, 0x64, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x6d, 0x61, 0x78, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, - 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x01, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, - 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, - 0x74, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x01, 0x22, 0xc9, 0x06, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x43, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 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, 0x18, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x54, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x10, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, - 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4b, 0x0a, 0x0e, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x6c, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, - 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x50, 0x0a, - 0x0c, 0x56, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0x80, 0xdc, 0x20, 0x01, 0x22, - 0xa4, 0x01, 0x0a, 0x06, 0x44, 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, - 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x45, 0x0a, 0x07, 0x44, 0x56, 0x50, 0x61, 0x69, 0x72, - 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x56, 0x50, 0x61, 0x69, 0x72, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x70, 0x61, 0x69, 0x72, 0x73, 0x22, 0xfd, 0x01, - 0x0a, 0x0a, 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x11, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, - 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x53, 0x0a, - 0x0b, 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x08, - 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x56, 0x56, 0x54, 0x72, 0x69, 0x70, 0x6c, - 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, - 0x74, 0x73, 0x22, 0xfe, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 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, 0x10, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x54, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x73, - 0x68, 0x61, 0x72, 0x65, 0x73, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x22, 0x83, 0x02, 0x0a, 0x13, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x07, 0x65, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, - 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xdb, 0x02, 0x0a, 0x18, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x4d, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x65, - 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x08, 0x98, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xd9, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, - 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4d, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, - 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0a, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x44, 0x73, 0x74, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x73, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, - 0x22, 0xf2, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x75, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0d, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, - 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x68, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x7c, 0x0a, - 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4c, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x1a, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xa3, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0a, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xd9, 0x01, 0x0a, 0x19, - 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x72, 0x65, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x07, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4e, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x51, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x83, 0x02, 0x0a, 0x04, 0x50, 0x6f, - 0x6f, 0x6c, 0x12, 0x7d, 0x0a, 0x11, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xea, 0xde, 0x1f, - 0x11, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, - 0x52, 0x0f, 0x6e, 0x6f, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x12, 0x72, 0x0a, 0x0d, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xea, 0xde, 0x1f, 0x0d, 0x62, 0x6f, 0x6e, 0x64, - 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x3a, 0x08, 0xe8, 0xa0, 0x1f, 0x01, 0xf0, 0xa0, 0x1f, 0x01, 0x2a, - 0xb6, 0x01, 0x0a, 0x0a, 0x42, 0x6f, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, - 0x0a, 0x17, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, - 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x14, - 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x42, 0x4f, - 0x4e, 0x44, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x15, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x1a, - 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x22, - 0x0a, 0x12, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x42, 0x4f, - 0x4e, 0x44, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x0a, 0x8a, 0x9d, 0x20, 0x06, 0x42, 0x6f, 0x6e, 0x64, - 0x65, 0x64, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xec, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_staking_v1beta1_staking_proto_rawDescOnce sync.Once - file_cosmos_staking_v1beta1_staking_proto_rawDescData = file_cosmos_staking_v1beta1_staking_proto_rawDesc -) - -func file_cosmos_staking_v1beta1_staking_proto_rawDescGZIP() []byte { - file_cosmos_staking_v1beta1_staking_proto_rawDescOnce.Do(func() { - file_cosmos_staking_v1beta1_staking_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_staking_v1beta1_staking_proto_rawDescData) - }) - return file_cosmos_staking_v1beta1_staking_proto_rawDescData -} - -var file_cosmos_staking_v1beta1_staking_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_staking_v1beta1_staking_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_cosmos_staking_v1beta1_staking_proto_goTypes = []interface{}{ - (BondStatus)(0), // 0: cosmos.staking.v1beta1.BondStatus - (*HistoricalInfo)(nil), // 1: cosmos.staking.v1beta1.HistoricalInfo - (*CommissionRates)(nil), // 2: cosmos.staking.v1beta1.CommissionRates - (*Commission)(nil), // 3: cosmos.staking.v1beta1.Commission - (*Description)(nil), // 4: cosmos.staking.v1beta1.Description - (*Validator)(nil), // 5: cosmos.staking.v1beta1.Validator - (*ValAddresses)(nil), // 6: cosmos.staking.v1beta1.ValAddresses - (*DVPair)(nil), // 7: cosmos.staking.v1beta1.DVPair - (*DVPairs)(nil), // 8: cosmos.staking.v1beta1.DVPairs - (*DVVTriplet)(nil), // 9: cosmos.staking.v1beta1.DVVTriplet - (*DVVTriplets)(nil), // 10: cosmos.staking.v1beta1.DVVTriplets - (*Delegation)(nil), // 11: cosmos.staking.v1beta1.Delegation - (*UnbondingDelegation)(nil), // 12: cosmos.staking.v1beta1.UnbondingDelegation - (*UnbondingDelegationEntry)(nil), // 13: cosmos.staking.v1beta1.UnbondingDelegationEntry - (*RedelegationEntry)(nil), // 14: cosmos.staking.v1beta1.RedelegationEntry - (*Redelegation)(nil), // 15: cosmos.staking.v1beta1.Redelegation - (*Params)(nil), // 16: cosmos.staking.v1beta1.Params - (*DelegationResponse)(nil), // 17: cosmos.staking.v1beta1.DelegationResponse - (*RedelegationEntryResponse)(nil), // 18: cosmos.staking.v1beta1.RedelegationEntryResponse - (*RedelegationResponse)(nil), // 19: cosmos.staking.v1beta1.RedelegationResponse - (*Pool)(nil), // 20: cosmos.staking.v1beta1.Pool - (*types.Header)(nil), // 21: tendermint.types.Header - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (*anypb.Any)(nil), // 23: google.protobuf.Any - (*durationpb.Duration)(nil), // 24: google.protobuf.Duration - (*v1beta1.Coin)(nil), // 25: cosmos.base.v1beta1.Coin -} -var file_cosmos_staking_v1beta1_staking_proto_depIdxs = []int32{ - 21, // 0: cosmos.staking.v1beta1.HistoricalInfo.header:type_name -> tendermint.types.Header - 5, // 1: cosmos.staking.v1beta1.HistoricalInfo.valset:type_name -> cosmos.staking.v1beta1.Validator - 2, // 2: cosmos.staking.v1beta1.Commission.commission_rates:type_name -> cosmos.staking.v1beta1.CommissionRates - 22, // 3: cosmos.staking.v1beta1.Commission.update_time:type_name -> google.protobuf.Timestamp - 23, // 4: cosmos.staking.v1beta1.Validator.consensus_pubkey:type_name -> google.protobuf.Any - 0, // 5: cosmos.staking.v1beta1.Validator.status:type_name -> cosmos.staking.v1beta1.BondStatus - 4, // 6: cosmos.staking.v1beta1.Validator.description:type_name -> cosmos.staking.v1beta1.Description - 22, // 7: cosmos.staking.v1beta1.Validator.unbonding_time:type_name -> google.protobuf.Timestamp - 3, // 8: cosmos.staking.v1beta1.Validator.commission:type_name -> cosmos.staking.v1beta1.Commission - 7, // 9: cosmos.staking.v1beta1.DVPairs.pairs:type_name -> cosmos.staking.v1beta1.DVPair - 9, // 10: cosmos.staking.v1beta1.DVVTriplets.triplets:type_name -> cosmos.staking.v1beta1.DVVTriplet - 13, // 11: cosmos.staking.v1beta1.UnbondingDelegation.entries:type_name -> cosmos.staking.v1beta1.UnbondingDelegationEntry - 22, // 12: cosmos.staking.v1beta1.UnbondingDelegationEntry.completion_time:type_name -> google.protobuf.Timestamp - 22, // 13: cosmos.staking.v1beta1.RedelegationEntry.completion_time:type_name -> google.protobuf.Timestamp - 14, // 14: cosmos.staking.v1beta1.Redelegation.entries:type_name -> cosmos.staking.v1beta1.RedelegationEntry - 24, // 15: cosmos.staking.v1beta1.Params.unbonding_time:type_name -> google.protobuf.Duration - 11, // 16: cosmos.staking.v1beta1.DelegationResponse.delegation:type_name -> cosmos.staking.v1beta1.Delegation - 25, // 17: cosmos.staking.v1beta1.DelegationResponse.balance:type_name -> cosmos.base.v1beta1.Coin - 14, // 18: cosmos.staking.v1beta1.RedelegationEntryResponse.redelegation_entry:type_name -> cosmos.staking.v1beta1.RedelegationEntry - 15, // 19: cosmos.staking.v1beta1.RedelegationResponse.redelegation:type_name -> cosmos.staking.v1beta1.Redelegation - 18, // 20: cosmos.staking.v1beta1.RedelegationResponse.entries:type_name -> cosmos.staking.v1beta1.RedelegationEntryResponse - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_cosmos_staking_v1beta1_staking_proto_init() } -func file_cosmos_staking_v1beta1_staking_proto_init() { - if File_cosmos_staking_v1beta1_staking_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_staking_v1beta1_staking_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistoricalInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommissionRates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Commission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Description); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValAddresses); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DVPair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DVPairs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DVVTriplet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DVVTriplets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Delegation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnbondingDelegation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnbondingDelegationEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedelegationEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Redelegation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedelegationEntryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedelegationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_staking_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_staking_v1beta1_staking_proto_rawDesc, - NumEnums: 1, - NumMessages: 20, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_staking_v1beta1_staking_proto_goTypes, - DependencyIndexes: file_cosmos_staking_v1beta1_staking_proto_depIdxs, - EnumInfos: file_cosmos_staking_v1beta1_staking_proto_enumTypes, - MessageInfos: file_cosmos_staking_v1beta1_staking_proto_msgTypes, - }.Build() - File_cosmos_staking_v1beta1_staking_proto = out.File - file_cosmos_staking_v1beta1_staking_proto_rawDesc = nil - file_cosmos_staking_v1beta1_staking_proto_goTypes = nil - file_cosmos_staking_v1beta1_staking_proto_depIdxs = nil -} diff --git a/api/cosmos/staking/v1beta1/tx.pulsar.go b/api/cosmos/staking/v1beta1/tx.pulsar.go deleted file mode 100644 index 61067f5c7468..000000000000 --- a/api/cosmos/staking/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,7209 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgCreateValidator protoreflect.MessageDescriptor - fd_MsgCreateValidator_description protoreflect.FieldDescriptor - fd_MsgCreateValidator_commission protoreflect.FieldDescriptor - fd_MsgCreateValidator_min_self_delegation protoreflect.FieldDescriptor - fd_MsgCreateValidator_delegator_address protoreflect.FieldDescriptor - fd_MsgCreateValidator_validator_address protoreflect.FieldDescriptor - fd_MsgCreateValidator_pubkey protoreflect.FieldDescriptor - fd_MsgCreateValidator_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgCreateValidator = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgCreateValidator") - fd_MsgCreateValidator_description = md_MsgCreateValidator.Fields().ByName("description") - fd_MsgCreateValidator_commission = md_MsgCreateValidator.Fields().ByName("commission") - fd_MsgCreateValidator_min_self_delegation = md_MsgCreateValidator.Fields().ByName("min_self_delegation") - fd_MsgCreateValidator_delegator_address = md_MsgCreateValidator.Fields().ByName("delegator_address") - fd_MsgCreateValidator_validator_address = md_MsgCreateValidator.Fields().ByName("validator_address") - fd_MsgCreateValidator_pubkey = md_MsgCreateValidator.Fields().ByName("pubkey") - fd_MsgCreateValidator_value = md_MsgCreateValidator.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateValidator)(nil) - -type fastReflection_MsgCreateValidator MsgCreateValidator - -func (x *MsgCreateValidator) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateValidator)(x) -} - -func (x *MsgCreateValidator) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateValidator_messageType fastReflection_MsgCreateValidator_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateValidator_messageType{} - -type fastReflection_MsgCreateValidator_messageType struct{} - -func (x fastReflection_MsgCreateValidator_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateValidator)(nil) -} -func (x fastReflection_MsgCreateValidator_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateValidator) -} -func (x fastReflection_MsgCreateValidator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateValidator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateValidator) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateValidator -} - -// 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_MsgCreateValidator) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateValidator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateValidator) New() protoreflect.Message { - return new(fastReflection_MsgCreateValidator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateValidator) Interface() protoreflect.ProtoMessage { - return (*MsgCreateValidator)(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_MsgCreateValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Description != nil { - value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) - if !f(fd_MsgCreateValidator_description, value) { - return - } - } - if x.Commission != nil { - value := protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) - if !f(fd_MsgCreateValidator_commission, value) { - return - } - } - if x.MinSelfDelegation != "" { - value := protoreflect.ValueOfString(x.MinSelfDelegation) - if !f(fd_MsgCreateValidator_min_self_delegation, value) { - return - } - } - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgCreateValidator_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgCreateValidator_validator_address, value) { - return - } - } - if x.Pubkey != nil { - value := protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) - if !f(fd_MsgCreateValidator_pubkey, value) { - return - } - } - if x.Value != nil { - value := protoreflect.ValueOfMessage(x.Value.ProtoReflect()) - if !f(fd_MsgCreateValidator_value, 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_MsgCreateValidator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCreateValidator.description": - return x.Description != nil - case "cosmos.staking.v1beta1.MsgCreateValidator.commission": - return x.Commission != nil - case "cosmos.staking.v1beta1.MsgCreateValidator.min_self_delegation": - return x.MinSelfDelegation != "" - case "cosmos.staking.v1beta1.MsgCreateValidator.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.MsgCreateValidator.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.MsgCreateValidator.pubkey": - return x.Pubkey != nil - case "cosmos.staking.v1beta1.MsgCreateValidator.value": - return x.Value != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidator 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_MsgCreateValidator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCreateValidator.description": - x.Description = nil - case "cosmos.staking.v1beta1.MsgCreateValidator.commission": - x.Commission = nil - case "cosmos.staking.v1beta1.MsgCreateValidator.min_self_delegation": - x.MinSelfDelegation = "" - case "cosmos.staking.v1beta1.MsgCreateValidator.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.MsgCreateValidator.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.MsgCreateValidator.pubkey": - x.Pubkey = nil - case "cosmos.staking.v1beta1.MsgCreateValidator.value": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidator 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_MsgCreateValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgCreateValidator.description": - value := x.Description - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.commission": - value := x.Commission - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.min_self_delegation": - value := x.MinSelfDelegation - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgCreateValidator.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgCreateValidator.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgCreateValidator.pubkey": - value := x.Pubkey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.value": - value := x.Value - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidator 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_MsgCreateValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCreateValidator.description": - x.Description = value.Message().Interface().(*Description) - case "cosmos.staking.v1beta1.MsgCreateValidator.commission": - x.Commission = value.Message().Interface().(*CommissionRates) - case "cosmos.staking.v1beta1.MsgCreateValidator.min_self_delegation": - x.MinSelfDelegation = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgCreateValidator.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgCreateValidator.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgCreateValidator.pubkey": - x.Pubkey = value.Message().Interface().(*anypb.Any) - case "cosmos.staking.v1beta1.MsgCreateValidator.value": - x.Value = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidator 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_MsgCreateValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCreateValidator.description": - if x.Description == nil { - x.Description = new(Description) - } - return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.commission": - if x.Commission == nil { - x.Commission = new(CommissionRates) - } - return protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.pubkey": - if x.Pubkey == nil { - x.Pubkey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.value": - if x.Value == nil { - x.Value = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Value.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.min_self_delegation": - panic(fmt.Errorf("field min_self_delegation of message cosmos.staking.v1beta1.MsgCreateValidator is not mutable")) - case "cosmos.staking.v1beta1.MsgCreateValidator.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.MsgCreateValidator is not mutable")) - case "cosmos.staking.v1beta1.MsgCreateValidator.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.MsgCreateValidator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidator 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_MsgCreateValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCreateValidator.description": - m := new(Description) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.commission": - m := new(CommissionRates) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.min_self_delegation": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgCreateValidator.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgCreateValidator.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgCreateValidator.pubkey": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCreateValidator.value": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidator 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_MsgCreateValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgCreateValidator", 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_MsgCreateValidator) 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_MsgCreateValidator) 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_MsgCreateValidator) 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_MsgCreateValidator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateValidator) - 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.Description != nil { - l = options.Size(x.Description) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Commission != nil { - l = options.Size(x.Commission) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinSelfDelegation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pubkey != nil { - l = options.Size(x.Pubkey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Value != nil { - l = options.Size(x.Value) - 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().(*MsgCreateValidator) - 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.Value != nil { - encoded, err := options.Marshal(x.Value) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.Pubkey != nil { - encoded, err := options.Marshal(x.Pubkey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x2a - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - i-- - dAtA[i] = 0x22 - } - if len(x.MinSelfDelegation) > 0 { - i -= len(x.MinSelfDelegation) - copy(dAtA[i:], x.MinSelfDelegation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSelfDelegation))) - i-- - dAtA[i] = 0x1a - } - if x.Commission != nil { - encoded, err := options.Marshal(x.Commission) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Description != nil { - encoded, err := options.Marshal(x.Description) - 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().(*MsgCreateValidator) - 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: MsgCreateValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateValidator: 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 Description", 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.Description == nil { - x.Description = &Description{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commission", 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.Commission == nil { - x.Commission = &CommissionRates{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", 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.MinSelfDelegation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey == nil { - x.Pubkey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pubkey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value == nil { - x.Value = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Value); 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_MsgCreateValidatorResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgCreateValidatorResponse = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgCreateValidatorResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateValidatorResponse)(nil) - -type fastReflection_MsgCreateValidatorResponse MsgCreateValidatorResponse - -func (x *MsgCreateValidatorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateValidatorResponse)(x) -} - -func (x *MsgCreateValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateValidatorResponse_messageType fastReflection_MsgCreateValidatorResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateValidatorResponse_messageType{} - -type fastReflection_MsgCreateValidatorResponse_messageType struct{} - -func (x fastReflection_MsgCreateValidatorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateValidatorResponse)(nil) -} -func (x fastReflection_MsgCreateValidatorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateValidatorResponse) -} -func (x fastReflection_MsgCreateValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateValidatorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateValidatorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateValidatorResponse -} - -// 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_MsgCreateValidatorResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateValidatorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateValidatorResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateValidatorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateValidatorResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateValidatorResponse)(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_MsgCreateValidatorResponse) 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_MsgCreateValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidatorResponse 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_MsgCreateValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidatorResponse 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_MsgCreateValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidatorResponse 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_MsgCreateValidatorResponse) 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.staking.v1beta1.MsgCreateValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidatorResponse 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_MsgCreateValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidatorResponse 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_MsgCreateValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCreateValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCreateValidatorResponse 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_MsgCreateValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgCreateValidatorResponse", 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_MsgCreateValidatorResponse) 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_MsgCreateValidatorResponse) 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_MsgCreateValidatorResponse) 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_MsgCreateValidatorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateValidatorResponse) - 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().(*MsgCreateValidatorResponse) - 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().(*MsgCreateValidatorResponse) - 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: MsgCreateValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateValidatorResponse: 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_MsgEditValidator protoreflect.MessageDescriptor - fd_MsgEditValidator_description protoreflect.FieldDescriptor - fd_MsgEditValidator_validator_address protoreflect.FieldDescriptor - fd_MsgEditValidator_commission_rate protoreflect.FieldDescriptor - fd_MsgEditValidator_min_self_delegation protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgEditValidator = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgEditValidator") - fd_MsgEditValidator_description = md_MsgEditValidator.Fields().ByName("description") - fd_MsgEditValidator_validator_address = md_MsgEditValidator.Fields().ByName("validator_address") - fd_MsgEditValidator_commission_rate = md_MsgEditValidator.Fields().ByName("commission_rate") - fd_MsgEditValidator_min_self_delegation = md_MsgEditValidator.Fields().ByName("min_self_delegation") -} - -var _ protoreflect.Message = (*fastReflection_MsgEditValidator)(nil) - -type fastReflection_MsgEditValidator MsgEditValidator - -func (x *MsgEditValidator) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgEditValidator)(x) -} - -func (x *MsgEditValidator) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgEditValidator_messageType fastReflection_MsgEditValidator_messageType -var _ protoreflect.MessageType = fastReflection_MsgEditValidator_messageType{} - -type fastReflection_MsgEditValidator_messageType struct{} - -func (x fastReflection_MsgEditValidator_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgEditValidator)(nil) -} -func (x fastReflection_MsgEditValidator_messageType) New() protoreflect.Message { - return new(fastReflection_MsgEditValidator) -} -func (x fastReflection_MsgEditValidator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditValidator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgEditValidator) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditValidator -} - -// 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_MsgEditValidator) Type() protoreflect.MessageType { - return _fastReflection_MsgEditValidator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgEditValidator) New() protoreflect.Message { - return new(fastReflection_MsgEditValidator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgEditValidator) Interface() protoreflect.ProtoMessage { - return (*MsgEditValidator)(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_MsgEditValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Description != nil { - value := protoreflect.ValueOfMessage(x.Description.ProtoReflect()) - if !f(fd_MsgEditValidator_description, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgEditValidator_validator_address, value) { - return - } - } - if x.CommissionRate != "" { - value := protoreflect.ValueOfString(x.CommissionRate) - if !f(fd_MsgEditValidator_commission_rate, value) { - return - } - } - if x.MinSelfDelegation != "" { - value := protoreflect.ValueOfString(x.MinSelfDelegation) - if !f(fd_MsgEditValidator_min_self_delegation, 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_MsgEditValidator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgEditValidator.description": - return x.Description != nil - case "cosmos.staking.v1beta1.MsgEditValidator.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.MsgEditValidator.commission_rate": - return x.CommissionRate != "" - case "cosmos.staking.v1beta1.MsgEditValidator.min_self_delegation": - return x.MinSelfDelegation != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidator 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_MsgEditValidator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgEditValidator.description": - x.Description = nil - case "cosmos.staking.v1beta1.MsgEditValidator.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.MsgEditValidator.commission_rate": - x.CommissionRate = "" - case "cosmos.staking.v1beta1.MsgEditValidator.min_self_delegation": - x.MinSelfDelegation = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidator 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_MsgEditValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgEditValidator.description": - value := x.Description - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgEditValidator.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgEditValidator.commission_rate": - value := x.CommissionRate - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgEditValidator.min_self_delegation": - value := x.MinSelfDelegation - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidator 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_MsgEditValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgEditValidator.description": - x.Description = value.Message().Interface().(*Description) - case "cosmos.staking.v1beta1.MsgEditValidator.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgEditValidator.commission_rate": - x.CommissionRate = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgEditValidator.min_self_delegation": - x.MinSelfDelegation = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidator 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_MsgEditValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgEditValidator.description": - if x.Description == nil { - x.Description = new(Description) - } - return protoreflect.ValueOfMessage(x.Description.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgEditValidator.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.MsgEditValidator is not mutable")) - case "cosmos.staking.v1beta1.MsgEditValidator.commission_rate": - panic(fmt.Errorf("field commission_rate of message cosmos.staking.v1beta1.MsgEditValidator is not mutable")) - case "cosmos.staking.v1beta1.MsgEditValidator.min_self_delegation": - panic(fmt.Errorf("field min_self_delegation of message cosmos.staking.v1beta1.MsgEditValidator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidator 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_MsgEditValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgEditValidator.description": - m := new(Description) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgEditValidator.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgEditValidator.commission_rate": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgEditValidator.min_self_delegation": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidator")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidator 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_MsgEditValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgEditValidator", 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_MsgEditValidator) 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_MsgEditValidator) 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_MsgEditValidator) 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_MsgEditValidator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgEditValidator) - 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.Description != nil { - l = options.Size(x.Description) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CommissionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinSelfDelegation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgEditValidator) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MinSelfDelegation) > 0 { - i -= len(x.MinSelfDelegation) - copy(dAtA[i:], x.MinSelfDelegation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSelfDelegation))) - i-- - dAtA[i] = 0x22 - } - if len(x.CommissionRate) > 0 { - i -= len(x.CommissionRate) - copy(dAtA[i:], x.CommissionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommissionRate))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if x.Description != nil { - encoded, err := options.Marshal(x.Description) - 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().(*MsgEditValidator) - 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: MsgEditValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditValidator: 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 Description", 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.Description == nil { - x.Description = &Description{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Description); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommissionRate", 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.CommissionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", 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.MinSelfDelegation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgEditValidatorResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgEditValidatorResponse = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgEditValidatorResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgEditValidatorResponse)(nil) - -type fastReflection_MsgEditValidatorResponse MsgEditValidatorResponse - -func (x *MsgEditValidatorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgEditValidatorResponse)(x) -} - -func (x *MsgEditValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgEditValidatorResponse_messageType fastReflection_MsgEditValidatorResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgEditValidatorResponse_messageType{} - -type fastReflection_MsgEditValidatorResponse_messageType struct{} - -func (x fastReflection_MsgEditValidatorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgEditValidatorResponse)(nil) -} -func (x fastReflection_MsgEditValidatorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgEditValidatorResponse) -} -func (x fastReflection_MsgEditValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditValidatorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgEditValidatorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditValidatorResponse -} - -// 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_MsgEditValidatorResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgEditValidatorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgEditValidatorResponse) New() protoreflect.Message { - return new(fastReflection_MsgEditValidatorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgEditValidatorResponse) Interface() protoreflect.ProtoMessage { - return (*MsgEditValidatorResponse)(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_MsgEditValidatorResponse) 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_MsgEditValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidatorResponse 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_MsgEditValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidatorResponse 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_MsgEditValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidatorResponse 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_MsgEditValidatorResponse) 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.staking.v1beta1.MsgEditValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidatorResponse 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_MsgEditValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidatorResponse 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_MsgEditValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgEditValidatorResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgEditValidatorResponse 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_MsgEditValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgEditValidatorResponse", 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_MsgEditValidatorResponse) 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_MsgEditValidatorResponse) 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_MsgEditValidatorResponse) 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_MsgEditValidatorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgEditValidatorResponse) - 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().(*MsgEditValidatorResponse) - 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().(*MsgEditValidatorResponse) - 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: MsgEditValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditValidatorResponse: 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_MsgDelegate protoreflect.MessageDescriptor - fd_MsgDelegate_delegator_address protoreflect.FieldDescriptor - fd_MsgDelegate_validator_address protoreflect.FieldDescriptor - fd_MsgDelegate_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgDelegate = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgDelegate") - fd_MsgDelegate_delegator_address = md_MsgDelegate.Fields().ByName("delegator_address") - fd_MsgDelegate_validator_address = md_MsgDelegate.Fields().ByName("validator_address") - fd_MsgDelegate_amount = md_MsgDelegate.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgDelegate)(nil) - -type fastReflection_MsgDelegate MsgDelegate - -func (x *MsgDelegate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDelegate)(x) -} - -func (x *MsgDelegate) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDelegate_messageType fastReflection_MsgDelegate_messageType -var _ protoreflect.MessageType = fastReflection_MsgDelegate_messageType{} - -type fastReflection_MsgDelegate_messageType struct{} - -func (x fastReflection_MsgDelegate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDelegate)(nil) -} -func (x fastReflection_MsgDelegate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDelegate) -} -func (x fastReflection_MsgDelegate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDelegate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDelegate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDelegate -} - -// 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_MsgDelegate) Type() protoreflect.MessageType { - return _fastReflection_MsgDelegate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDelegate) New() protoreflect.Message { - return new(fastReflection_MsgDelegate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDelegate) Interface() protoreflect.ProtoMessage { - return (*MsgDelegate)(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_MsgDelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgDelegate_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgDelegate_validator_address, value) { - return - } - } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgDelegate_amount, 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_MsgDelegate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgDelegate.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.MsgDelegate.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.MsgDelegate.amount": - return x.Amount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegate 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_MsgDelegate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgDelegate.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.MsgDelegate.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.MsgDelegate.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegate 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_MsgDelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgDelegate.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgDelegate.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgDelegate.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegate 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_MsgDelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgDelegate.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgDelegate.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgDelegate.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegate 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_MsgDelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgDelegate.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgDelegate.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.MsgDelegate is not mutable")) - case "cosmos.staking.v1beta1.MsgDelegate.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.MsgDelegate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegate 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_MsgDelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgDelegate.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgDelegate.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgDelegate.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegate 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_MsgDelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgDelegate", 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_MsgDelegate) 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_MsgDelegate) 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_MsgDelegate) 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_MsgDelegate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDelegate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Amount != nil { - l = options.Size(x.Amount) - 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().(*MsgDelegate) - 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.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*MsgDelegate) - 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: MsgDelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); 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_MsgDelegateResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgDelegateResponse = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgDelegateResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgDelegateResponse)(nil) - -type fastReflection_MsgDelegateResponse MsgDelegateResponse - -func (x *MsgDelegateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDelegateResponse)(x) -} - -func (x *MsgDelegateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDelegateResponse_messageType fastReflection_MsgDelegateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDelegateResponse_messageType{} - -type fastReflection_MsgDelegateResponse_messageType struct{} - -func (x fastReflection_MsgDelegateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDelegateResponse)(nil) -} -func (x fastReflection_MsgDelegateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDelegateResponse) -} -func (x fastReflection_MsgDelegateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDelegateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDelegateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDelegateResponse -} - -// 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_MsgDelegateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDelegateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDelegateResponse) New() protoreflect.Message { - return new(fastReflection_MsgDelegateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDelegateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDelegateResponse)(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_MsgDelegateResponse) 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_MsgDelegateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegateResponse 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_MsgDelegateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegateResponse 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_MsgDelegateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegateResponse 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_MsgDelegateResponse) 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.staking.v1beta1.MsgDelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegateResponse 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_MsgDelegateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegateResponse 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_MsgDelegateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgDelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgDelegateResponse 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_MsgDelegateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgDelegateResponse", 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_MsgDelegateResponse) 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_MsgDelegateResponse) 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_MsgDelegateResponse) 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_MsgDelegateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDelegateResponse) - 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().(*MsgDelegateResponse) - 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().(*MsgDelegateResponse) - 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: MsgDelegateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegateResponse: 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_MsgBeginRedelegate protoreflect.MessageDescriptor - fd_MsgBeginRedelegate_delegator_address protoreflect.FieldDescriptor - fd_MsgBeginRedelegate_validator_src_address protoreflect.FieldDescriptor - fd_MsgBeginRedelegate_validator_dst_address protoreflect.FieldDescriptor - fd_MsgBeginRedelegate_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgBeginRedelegate = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgBeginRedelegate") - fd_MsgBeginRedelegate_delegator_address = md_MsgBeginRedelegate.Fields().ByName("delegator_address") - fd_MsgBeginRedelegate_validator_src_address = md_MsgBeginRedelegate.Fields().ByName("validator_src_address") - fd_MsgBeginRedelegate_validator_dst_address = md_MsgBeginRedelegate.Fields().ByName("validator_dst_address") - fd_MsgBeginRedelegate_amount = md_MsgBeginRedelegate.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgBeginRedelegate)(nil) - -type fastReflection_MsgBeginRedelegate MsgBeginRedelegate - -func (x *MsgBeginRedelegate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBeginRedelegate)(x) -} - -func (x *MsgBeginRedelegate) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgBeginRedelegate_messageType fastReflection_MsgBeginRedelegate_messageType -var _ protoreflect.MessageType = fastReflection_MsgBeginRedelegate_messageType{} - -type fastReflection_MsgBeginRedelegate_messageType struct{} - -func (x fastReflection_MsgBeginRedelegate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBeginRedelegate)(nil) -} -func (x fastReflection_MsgBeginRedelegate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBeginRedelegate) -} -func (x fastReflection_MsgBeginRedelegate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBeginRedelegate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgBeginRedelegate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBeginRedelegate -} - -// 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_MsgBeginRedelegate) Type() protoreflect.MessageType { - return _fastReflection_MsgBeginRedelegate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBeginRedelegate) New() protoreflect.Message { - return new(fastReflection_MsgBeginRedelegate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBeginRedelegate) Interface() protoreflect.ProtoMessage { - return (*MsgBeginRedelegate)(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_MsgBeginRedelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgBeginRedelegate_delegator_address, value) { - return - } - } - if x.ValidatorSrcAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorSrcAddress) - if !f(fd_MsgBeginRedelegate_validator_src_address, value) { - return - } - } - if x.ValidatorDstAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorDstAddress) - if !f(fd_MsgBeginRedelegate_validator_dst_address, value) { - return - } - } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgBeginRedelegate_amount, 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_MsgBeginRedelegate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegate.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_src_address": - return x.ValidatorSrcAddress != "" - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_dst_address": - return x.ValidatorDstAddress != "" - case "cosmos.staking.v1beta1.MsgBeginRedelegate.amount": - return x.Amount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegate 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_MsgBeginRedelegate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegate.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_src_address": - x.ValidatorSrcAddress = "" - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_dst_address": - x.ValidatorDstAddress = "" - case "cosmos.staking.v1beta1.MsgBeginRedelegate.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegate 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_MsgBeginRedelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegate.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_src_address": - value := x.ValidatorSrcAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_dst_address": - value := x.ValidatorDstAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegate 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_MsgBeginRedelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegate.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_src_address": - x.ValidatorSrcAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_dst_address": - x.ValidatorDstAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegate 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_MsgBeginRedelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegate.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.MsgBeginRedelegate is not mutable")) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_src_address": - panic(fmt.Errorf("field validator_src_address of message cosmos.staking.v1beta1.MsgBeginRedelegate is not mutable")) - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_dst_address": - panic(fmt.Errorf("field validator_dst_address of message cosmos.staking.v1beta1.MsgBeginRedelegate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegate 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_MsgBeginRedelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegate.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_src_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgBeginRedelegate.validator_dst_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgBeginRedelegate.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegate 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_MsgBeginRedelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgBeginRedelegate", 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_MsgBeginRedelegate) 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_MsgBeginRedelegate) 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_MsgBeginRedelegate) 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_MsgBeginRedelegate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBeginRedelegate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorDstAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Amount != nil { - l = options.Size(x.Amount) - 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().(*MsgBeginRedelegate) - 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.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.ValidatorDstAddress) > 0 { - i -= len(x.ValidatorDstAddress) - copy(dAtA[i:], x.ValidatorDstAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorSrcAddress) > 0 { - i -= len(x.ValidatorSrcAddress) - copy(dAtA[i:], x.ValidatorSrcAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorSrcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*MsgBeginRedelegate) - 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: MsgBeginRedelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBeginRedelegate: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", 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.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", 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.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); 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_MsgBeginRedelegateResponse protoreflect.MessageDescriptor - fd_MsgBeginRedelegateResponse_completion_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgBeginRedelegateResponse = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgBeginRedelegateResponse") - fd_MsgBeginRedelegateResponse_completion_time = md_MsgBeginRedelegateResponse.Fields().ByName("completion_time") -} - -var _ protoreflect.Message = (*fastReflection_MsgBeginRedelegateResponse)(nil) - -type fastReflection_MsgBeginRedelegateResponse MsgBeginRedelegateResponse - -func (x *MsgBeginRedelegateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgBeginRedelegateResponse)(x) -} - -func (x *MsgBeginRedelegateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgBeginRedelegateResponse_messageType fastReflection_MsgBeginRedelegateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgBeginRedelegateResponse_messageType{} - -type fastReflection_MsgBeginRedelegateResponse_messageType struct{} - -func (x fastReflection_MsgBeginRedelegateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgBeginRedelegateResponse)(nil) -} -func (x fastReflection_MsgBeginRedelegateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgBeginRedelegateResponse) -} -func (x fastReflection_MsgBeginRedelegateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBeginRedelegateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgBeginRedelegateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgBeginRedelegateResponse -} - -// 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_MsgBeginRedelegateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgBeginRedelegateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgBeginRedelegateResponse) New() protoreflect.Message { - return new(fastReflection_MsgBeginRedelegateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgBeginRedelegateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgBeginRedelegateResponse)(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_MsgBeginRedelegateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CompletionTime != nil { - value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - if !f(fd_MsgBeginRedelegateResponse_completion_time, 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_MsgBeginRedelegateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time": - return x.CompletionTime != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegateResponse 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_MsgBeginRedelegateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time": - x.CompletionTime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegateResponse 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_MsgBeginRedelegateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time": - value := x.CompletionTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegateResponse 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_MsgBeginRedelegateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time": - x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegateResponse 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_MsgBeginRedelegateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time": - if x.CompletionTime == nil { - x.CompletionTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegateResponse 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_MsgBeginRedelegateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgBeginRedelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgBeginRedelegateResponse 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_MsgBeginRedelegateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgBeginRedelegateResponse", 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_MsgBeginRedelegateResponse) 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_MsgBeginRedelegateResponse) 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_MsgBeginRedelegateResponse) 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_MsgBeginRedelegateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgBeginRedelegateResponse) - 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.CompletionTime != nil { - l = options.Size(x.CompletionTime) - 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().(*MsgBeginRedelegateResponse) - 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.CompletionTime != nil { - encoded, err := options.Marshal(x.CompletionTime) - 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().(*MsgBeginRedelegateResponse) - 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: MsgBeginRedelegateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBeginRedelegateResponse: 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 CompletionTime", 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.CompletionTime == nil { - x.CompletionTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); 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_MsgUndelegate protoreflect.MessageDescriptor - fd_MsgUndelegate_delegator_address protoreflect.FieldDescriptor - fd_MsgUndelegate_validator_address protoreflect.FieldDescriptor - fd_MsgUndelegate_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgUndelegate = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgUndelegate") - fd_MsgUndelegate_delegator_address = md_MsgUndelegate.Fields().ByName("delegator_address") - fd_MsgUndelegate_validator_address = md_MsgUndelegate.Fields().ByName("validator_address") - fd_MsgUndelegate_amount = md_MsgUndelegate.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgUndelegate)(nil) - -type fastReflection_MsgUndelegate MsgUndelegate - -func (x *MsgUndelegate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUndelegate)(x) -} - -func (x *MsgUndelegate) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUndelegate_messageType fastReflection_MsgUndelegate_messageType -var _ protoreflect.MessageType = fastReflection_MsgUndelegate_messageType{} - -type fastReflection_MsgUndelegate_messageType struct{} - -func (x fastReflection_MsgUndelegate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUndelegate)(nil) -} -func (x fastReflection_MsgUndelegate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUndelegate) -} -func (x fastReflection_MsgUndelegate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUndelegate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUndelegate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUndelegate -} - -// 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_MsgUndelegate) Type() protoreflect.MessageType { - return _fastReflection_MsgUndelegate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUndelegate) New() protoreflect.Message { - return new(fastReflection_MsgUndelegate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUndelegate) Interface() protoreflect.ProtoMessage { - return (*MsgUndelegate)(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_MsgUndelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgUndelegate_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgUndelegate_validator_address, value) { - return - } - } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgUndelegate_amount, 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_MsgUndelegate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegate.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.MsgUndelegate.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.MsgUndelegate.amount": - return x.Amount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegate 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_MsgUndelegate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegate.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.MsgUndelegate.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.MsgUndelegate.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegate 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_MsgUndelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegate.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgUndelegate.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgUndelegate.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegate 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_MsgUndelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegate.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgUndelegate.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgUndelegate.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegate 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_MsgUndelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegate.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgUndelegate.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.MsgUndelegate is not mutable")) - case "cosmos.staking.v1beta1.MsgUndelegate.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.MsgUndelegate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegate 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_MsgUndelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegate.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgUndelegate.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgUndelegate.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegate 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_MsgUndelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgUndelegate", 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_MsgUndelegate) 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_MsgUndelegate) 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_MsgUndelegate) 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_MsgUndelegate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUndelegate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Amount != nil { - l = options.Size(x.Amount) - 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().(*MsgUndelegate) - 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.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*MsgUndelegate) - 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: MsgUndelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); 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_MsgUndelegateResponse protoreflect.MessageDescriptor - fd_MsgUndelegateResponse_completion_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgUndelegateResponse = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgUndelegateResponse") - fd_MsgUndelegateResponse_completion_time = md_MsgUndelegateResponse.Fields().ByName("completion_time") -} - -var _ protoreflect.Message = (*fastReflection_MsgUndelegateResponse)(nil) - -type fastReflection_MsgUndelegateResponse MsgUndelegateResponse - -func (x *MsgUndelegateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUndelegateResponse)(x) -} - -func (x *MsgUndelegateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUndelegateResponse_messageType fastReflection_MsgUndelegateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUndelegateResponse_messageType{} - -type fastReflection_MsgUndelegateResponse_messageType struct{} - -func (x fastReflection_MsgUndelegateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUndelegateResponse)(nil) -} -func (x fastReflection_MsgUndelegateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUndelegateResponse) -} -func (x fastReflection_MsgUndelegateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUndelegateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUndelegateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUndelegateResponse -} - -// 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_MsgUndelegateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUndelegateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUndelegateResponse) New() protoreflect.Message { - return new(fastReflection_MsgUndelegateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUndelegateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUndelegateResponse)(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_MsgUndelegateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CompletionTime != nil { - value := protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - if !f(fd_MsgUndelegateResponse_completion_time, 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_MsgUndelegateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time": - return x.CompletionTime != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegateResponse 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_MsgUndelegateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time": - x.CompletionTime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegateResponse 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_MsgUndelegateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time": - value := x.CompletionTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegateResponse 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_MsgUndelegateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time": - x.CompletionTime = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegateResponse 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_MsgUndelegateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time": - if x.CompletionTime == nil { - x.CompletionTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CompletionTime.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegateResponse 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_MsgUndelegateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgUndelegateResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgUndelegateResponse 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_MsgUndelegateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgUndelegateResponse", 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_MsgUndelegateResponse) 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_MsgUndelegateResponse) 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_MsgUndelegateResponse) 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_MsgUndelegateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUndelegateResponse) - 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.CompletionTime != nil { - l = options.Size(x.CompletionTime) - 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().(*MsgUndelegateResponse) - 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.CompletionTime != nil { - encoded, err := options.Marshal(x.CompletionTime) - 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().(*MsgUndelegateResponse) - 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: MsgUndelegateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegateResponse: 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 CompletionTime", 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.CompletionTime == nil { - x.CompletionTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CompletionTime); 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_MsgCancelUnbondingDelegation protoreflect.MessageDescriptor - fd_MsgCancelUnbondingDelegation_delegator_address protoreflect.FieldDescriptor - fd_MsgCancelUnbondingDelegation_validator_address protoreflect.FieldDescriptor - fd_MsgCancelUnbondingDelegation_amount protoreflect.FieldDescriptor - fd_MsgCancelUnbondingDelegation_creation_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgCancelUnbondingDelegation = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgCancelUnbondingDelegation") - fd_MsgCancelUnbondingDelegation_delegator_address = md_MsgCancelUnbondingDelegation.Fields().ByName("delegator_address") - fd_MsgCancelUnbondingDelegation_validator_address = md_MsgCancelUnbondingDelegation.Fields().ByName("validator_address") - fd_MsgCancelUnbondingDelegation_amount = md_MsgCancelUnbondingDelegation.Fields().ByName("amount") - fd_MsgCancelUnbondingDelegation_creation_height = md_MsgCancelUnbondingDelegation.Fields().ByName("creation_height") -} - -var _ protoreflect.Message = (*fastReflection_MsgCancelUnbondingDelegation)(nil) - -type fastReflection_MsgCancelUnbondingDelegation MsgCancelUnbondingDelegation - -func (x *MsgCancelUnbondingDelegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCancelUnbondingDelegation)(x) -} - -func (x *MsgCancelUnbondingDelegation) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCancelUnbondingDelegation_messageType fastReflection_MsgCancelUnbondingDelegation_messageType -var _ protoreflect.MessageType = fastReflection_MsgCancelUnbondingDelegation_messageType{} - -type fastReflection_MsgCancelUnbondingDelegation_messageType struct{} - -func (x fastReflection_MsgCancelUnbondingDelegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCancelUnbondingDelegation)(nil) -} -func (x fastReflection_MsgCancelUnbondingDelegation_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCancelUnbondingDelegation) -} -func (x fastReflection_MsgCancelUnbondingDelegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUnbondingDelegation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCancelUnbondingDelegation) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUnbondingDelegation -} - -// 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_MsgCancelUnbondingDelegation) Type() protoreflect.MessageType { - return _fastReflection_MsgCancelUnbondingDelegation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCancelUnbondingDelegation) New() protoreflect.Message { - return new(fastReflection_MsgCancelUnbondingDelegation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCancelUnbondingDelegation) Interface() protoreflect.ProtoMessage { - return (*MsgCancelUnbondingDelegation)(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_MsgCancelUnbondingDelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_MsgCancelUnbondingDelegation_delegator_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgCancelUnbondingDelegation_validator_address, value) { - return - } - } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgCancelUnbondingDelegation_amount, value) { - return - } - } - if x.CreationHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.CreationHeight) - if !f(fd_MsgCancelUnbondingDelegation_creation_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCancelUnbondingDelegation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.delegator_address": - return x.DelegatorAddress != "" - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.validator_address": - return x.ValidatorAddress != "" - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount": - return x.Amount != nil - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.creation_height": - return x.CreationHeight != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation 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_MsgCancelUnbondingDelegation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.delegator_address": - x.DelegatorAddress = "" - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.validator_address": - x.ValidatorAddress = "" - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount": - x.Amount = nil - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.creation_height": - x.CreationHeight = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation 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_MsgCancelUnbondingDelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.delegator_address": - value := x.DelegatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.creation_height": - value := x.CreationHeight - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation 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_MsgCancelUnbondingDelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.delegator_address": - x.DelegatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.creation_height": - x.CreationHeight = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation 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_MsgCancelUnbondingDelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.delegator_address": - panic(fmt.Errorf("field delegator_address of message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation is not mutable")) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation is not mutable")) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.creation_height": - panic(fmt.Errorf("field creation_height of message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation 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_MsgCancelUnbondingDelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.delegator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.creation_height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegation 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_MsgCancelUnbondingDelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", 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_MsgCancelUnbondingDelegation) 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_MsgCancelUnbondingDelegation) 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_MsgCancelUnbondingDelegation) 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_MsgCancelUnbondingDelegation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCancelUnbondingDelegation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DelegatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Amount != nil { - l = options.Size(x.Amount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CreationHeight != 0 { - n += 1 + runtime.Sov(uint64(x.CreationHeight)) - } - 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().(*MsgCancelUnbondingDelegation) - 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.CreationHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) - i-- - dAtA[i] = 0x20 - } - if x.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) - 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().(*MsgCancelUnbondingDelegation) - 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: MsgCancelUnbondingDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUnbondingDelegation: 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 DelegatorAddress", 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.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - x.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCancelUnbondingDelegationResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_staking_v1beta1_tx_proto_init() - md_MsgCancelUnbondingDelegationResponse = File_cosmos_staking_v1beta1_tx_proto.Messages().ByName("MsgCancelUnbondingDelegationResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCancelUnbondingDelegationResponse)(nil) - -type fastReflection_MsgCancelUnbondingDelegationResponse MsgCancelUnbondingDelegationResponse - -func (x *MsgCancelUnbondingDelegationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCancelUnbondingDelegationResponse)(x) -} - -func (x *MsgCancelUnbondingDelegationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCancelUnbondingDelegationResponse_messageType fastReflection_MsgCancelUnbondingDelegationResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCancelUnbondingDelegationResponse_messageType{} - -type fastReflection_MsgCancelUnbondingDelegationResponse_messageType struct{} - -func (x fastReflection_MsgCancelUnbondingDelegationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCancelUnbondingDelegationResponse)(nil) -} -func (x fastReflection_MsgCancelUnbondingDelegationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCancelUnbondingDelegationResponse) -} -func (x fastReflection_MsgCancelUnbondingDelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUnbondingDelegationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCancelUnbondingDelegationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUnbondingDelegationResponse -} - -// 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_MsgCancelUnbondingDelegationResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCancelUnbondingDelegationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCancelUnbondingDelegationResponse) New() protoreflect.Message { - return new(fastReflection_MsgCancelUnbondingDelegationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCancelUnbondingDelegationResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCancelUnbondingDelegationResponse)(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_MsgCancelUnbondingDelegationResponse) 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_MsgCancelUnbondingDelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse 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_MsgCancelUnbondingDelegationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse 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_MsgCancelUnbondingDelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse 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_MsgCancelUnbondingDelegationResponse) 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.staking.v1beta1.MsgCancelUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse 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_MsgCancelUnbondingDelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse 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_MsgCancelUnbondingDelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")) - } - panic(fmt.Errorf("message cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse 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_MsgCancelUnbondingDelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", 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_MsgCancelUnbondingDelegationResponse) 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_MsgCancelUnbondingDelegationResponse) 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_MsgCancelUnbondingDelegationResponse) 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_MsgCancelUnbondingDelegationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCancelUnbondingDelegationResponse) - 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().(*MsgCancelUnbondingDelegationResponse) - 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().(*MsgCancelUnbondingDelegationResponse) - 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: MsgCancelUnbondingDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUnbondingDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/staking/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgCreateValidator defines a SDK message for creating a new validator. -type MsgCreateValidator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Description *Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - Commission *CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission,omitempty"` - MinSelfDelegation string `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3" json:"min_self_delegation,omitempty"` - DelegatorAddress string `protobuf:"bytes,4,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,5,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Pubkey *anypb.Any `protobuf:"bytes,6,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - Value *v1beta1.Coin `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *MsgCreateValidator) Reset() { - *x = MsgCreateValidator{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateValidator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateValidator) ProtoMessage() {} - -// Deprecated: Use MsgCreateValidator.ProtoReflect.Descriptor instead. -func (*MsgCreateValidator) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgCreateValidator) GetDescription() *Description { - if x != nil { - return x.Description - } - return nil -} - -func (x *MsgCreateValidator) GetCommission() *CommissionRates { - if x != nil { - return x.Commission - } - return nil -} - -func (x *MsgCreateValidator) GetMinSelfDelegation() string { - if x != nil { - return x.MinSelfDelegation - } - return "" -} - -func (x *MsgCreateValidator) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgCreateValidator) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgCreateValidator) GetPubkey() *anypb.Any { - if x != nil { - return x.Pubkey - } - return nil -} - -func (x *MsgCreateValidator) GetValue() *v1beta1.Coin { - if x != nil { - return x.Value - } - return nil -} - -// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -type MsgCreateValidatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCreateValidatorResponse) Reset() { - *x = MsgCreateValidatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateValidatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateValidatorResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateValidatorResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateValidatorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgEditValidator defines a SDK message for editing an existing validator. -type MsgEditValidator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Description *Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // We pass a reference to the new commission rate and min self delegation as - // it's not mandatory to update. If not updated, the deserialized rate will be - // zero with no way to distinguish if an update was intended. - // REF: #2373 - CommissionRate string `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3" json:"commission_rate,omitempty"` - MinSelfDelegation string `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3" json:"min_self_delegation,omitempty"` -} - -func (x *MsgEditValidator) Reset() { - *x = MsgEditValidator{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgEditValidator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgEditValidator) ProtoMessage() {} - -// Deprecated: Use MsgEditValidator.ProtoReflect.Descriptor instead. -func (*MsgEditValidator) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgEditValidator) GetDescription() *Description { - if x != nil { - return x.Description - } - return nil -} - -func (x *MsgEditValidator) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgEditValidator) GetCommissionRate() string { - if x != nil { - return x.CommissionRate - } - return "" -} - -func (x *MsgEditValidator) GetMinSelfDelegation() string { - if x != nil { - return x.MinSelfDelegation - } - return "" -} - -// MsgEditValidatorResponse defines the Msg/EditValidator response type. -type MsgEditValidatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgEditValidatorResponse) Reset() { - *x = MsgEditValidatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgEditValidatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgEditValidatorResponse) ProtoMessage() {} - -// Deprecated: Use MsgEditValidatorResponse.ProtoReflect.Descriptor instead. -func (*MsgEditValidatorResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgDelegate defines a SDK message for performing a delegation of coins -// from a delegator to a validator. -type MsgDelegate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgDelegate) Reset() { - *x = MsgDelegate{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDelegate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDelegate) ProtoMessage() {} - -// Deprecated: Use MsgDelegate.ProtoReflect.Descriptor instead. -func (*MsgDelegate) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgDelegate) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgDelegate) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgDelegate) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgDelegateResponse defines the Msg/Delegate response type. -type MsgDelegateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgDelegateResponse) Reset() { - *x = MsgDelegateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDelegateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDelegateResponse) ProtoMessage() {} - -// Deprecated: Use MsgDelegateResponse.ProtoReflect.Descriptor instead. -func (*MsgDelegateResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - -// MsgBeginRedelegate defines a SDK message for performing a redelegation -// of coins from a delegator and source validator to a destination validator. -type MsgBeginRedelegate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty"` - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty"` - Amount *v1beta1.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgBeginRedelegate) Reset() { - *x = MsgBeginRedelegate{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgBeginRedelegate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgBeginRedelegate) ProtoMessage() {} - -// Deprecated: Use MsgBeginRedelegate.ProtoReflect.Descriptor instead. -func (*MsgBeginRedelegate) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgBeginRedelegate) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgBeginRedelegate) GetValidatorSrcAddress() string { - if x != nil { - return x.ValidatorSrcAddress - } - return "" -} - -func (x *MsgBeginRedelegate) GetValidatorDstAddress() string { - if x != nil { - return x.ValidatorDstAddress - } - return "" -} - -func (x *MsgBeginRedelegate) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -type MsgBeginRedelegateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CompletionTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` -} - -func (x *MsgBeginRedelegateResponse) Reset() { - *x = MsgBeginRedelegateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgBeginRedelegateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgBeginRedelegateResponse) ProtoMessage() {} - -// Deprecated: Use MsgBeginRedelegateResponse.ProtoReflect.Descriptor instead. -func (*MsgBeginRedelegateResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{7} -} - -func (x *MsgBeginRedelegateResponse) GetCompletionTime() *timestamppb.Timestamp { - if x != nil { - return x.CompletionTime - } - return nil -} - -// MsgUndelegate defines a SDK message for performing an undelegation from a -// delegate and a validator. -type MsgUndelegate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgUndelegate) Reset() { - *x = MsgUndelegate{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUndelegate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUndelegate) ProtoMessage() {} - -// Deprecated: Use MsgUndelegate.ProtoReflect.Descriptor instead. -func (*MsgUndelegate) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgUndelegate) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgUndelegate) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgUndelegate) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgUndelegateResponse defines the Msg/Undelegate response type. -type MsgUndelegateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CompletionTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"` -} - -func (x *MsgUndelegateResponse) Reset() { - *x = MsgUndelegateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUndelegateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUndelegateResponse) ProtoMessage() {} - -// Deprecated: Use MsgUndelegateResponse.ProtoReflect.Descriptor instead. -func (*MsgUndelegateResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{9} -} - -func (x *MsgUndelegateResponse) GetCompletionTime() *timestamppb.Timestamp { - if x != nil { - return x.CompletionTime - } - return nil -} - -// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -type MsgCancelUnbondingDelegation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // amount is always less than or equal to unbonding delegation entry balance - Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - // creation_height is the height which the unbonding took place. - CreationHeight int64 `protobuf:"varint,4,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` -} - -func (x *MsgCancelUnbondingDelegation) Reset() { - *x = MsgCancelUnbondingDelegation{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCancelUnbondingDelegation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCancelUnbondingDelegation) ProtoMessage() {} - -// Deprecated: Use MsgCancelUnbondingDelegation.ProtoReflect.Descriptor instead. -func (*MsgCancelUnbondingDelegation) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgCancelUnbondingDelegation) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *MsgCancelUnbondingDelegation) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgCancelUnbondingDelegation) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -func (x *MsgCancelUnbondingDelegation) GetCreationHeight() int64 { - if x != nil { - return x.CreationHeight - } - return 0 -} - -// MsgCancelUnbondingDelegationResponse -type MsgCancelUnbondingDelegationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCancelUnbondingDelegationResponse) Reset() { - *x = MsgCancelUnbondingDelegationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_staking_v1beta1_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCancelUnbondingDelegationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCancelUnbondingDelegationResponse) ProtoMessage() {} - -// Deprecated: Use MsgCancelUnbondingDelegationResponse.ProtoReflect.Descriptor instead. -func (*MsgCancelUnbondingDelegationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP(), []int{11} -} - -var File_cosmos_staking_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_staking_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x04, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4b, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x6c, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, - 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 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, 0x10, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x05, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, - 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, 0x18, 0xca, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, - 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x34, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, - 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x93, 0x03, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, - 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4b, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 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, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x61, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0xda, 0xde, 0x1f, 0x26, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x61, 0x74, 0x65, 0x12, 0x68, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x38, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, - 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1e, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1a, 0x0a, - 0x18, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x0b, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd0, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x42, - 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, - 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x6b, 0x0a, 0x1a, 0x4d, 0x73, - 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, - 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x55, - 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x66, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xae, 0x02, 0x0a, 0x1c, 0x4d, 0x73, 0x67, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 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, 0x10, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x1e, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xac, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, 0x0a, 0x0f, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0d, - 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x28, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x42, 0x65, 0x67, 0x69, 0x6e, - 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x55, 0x6e, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x1a, - 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8f, - 0x01, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xe7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cosmos_staking_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_staking_v1beta1_tx_proto_rawDescData = file_cosmos_staking_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_staking_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_staking_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_staking_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_staking_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_staking_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_staking_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_cosmos_staking_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgCreateValidator)(nil), // 0: cosmos.staking.v1beta1.MsgCreateValidator - (*MsgCreateValidatorResponse)(nil), // 1: cosmos.staking.v1beta1.MsgCreateValidatorResponse - (*MsgEditValidator)(nil), // 2: cosmos.staking.v1beta1.MsgEditValidator - (*MsgEditValidatorResponse)(nil), // 3: cosmos.staking.v1beta1.MsgEditValidatorResponse - (*MsgDelegate)(nil), // 4: cosmos.staking.v1beta1.MsgDelegate - (*MsgDelegateResponse)(nil), // 5: cosmos.staking.v1beta1.MsgDelegateResponse - (*MsgBeginRedelegate)(nil), // 6: cosmos.staking.v1beta1.MsgBeginRedelegate - (*MsgBeginRedelegateResponse)(nil), // 7: cosmos.staking.v1beta1.MsgBeginRedelegateResponse - (*MsgUndelegate)(nil), // 8: cosmos.staking.v1beta1.MsgUndelegate - (*MsgUndelegateResponse)(nil), // 9: cosmos.staking.v1beta1.MsgUndelegateResponse - (*MsgCancelUnbondingDelegation)(nil), // 10: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation - (*MsgCancelUnbondingDelegationResponse)(nil), // 11: cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse - (*Description)(nil), // 12: cosmos.staking.v1beta1.Description - (*CommissionRates)(nil), // 13: cosmos.staking.v1beta1.CommissionRates - (*anypb.Any)(nil), // 14: google.protobuf.Any - (*v1beta1.Coin)(nil), // 15: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp -} -var file_cosmos_staking_v1beta1_tx_proto_depIdxs = []int32{ - 12, // 0: cosmos.staking.v1beta1.MsgCreateValidator.description:type_name -> cosmos.staking.v1beta1.Description - 13, // 1: cosmos.staking.v1beta1.MsgCreateValidator.commission:type_name -> cosmos.staking.v1beta1.CommissionRates - 14, // 2: cosmos.staking.v1beta1.MsgCreateValidator.pubkey:type_name -> google.protobuf.Any - 15, // 3: cosmos.staking.v1beta1.MsgCreateValidator.value:type_name -> cosmos.base.v1beta1.Coin - 12, // 4: cosmos.staking.v1beta1.MsgEditValidator.description:type_name -> cosmos.staking.v1beta1.Description - 15, // 5: cosmos.staking.v1beta1.MsgDelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 15, // 6: cosmos.staking.v1beta1.MsgBeginRedelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 16, // 7: cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completion_time:type_name -> google.protobuf.Timestamp - 15, // 8: cosmos.staking.v1beta1.MsgUndelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 16, // 9: cosmos.staking.v1beta1.MsgUndelegateResponse.completion_time:type_name -> google.protobuf.Timestamp - 15, // 10: cosmos.staking.v1beta1.MsgCancelUnbondingDelegation.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 11: cosmos.staking.v1beta1.Msg.CreateValidator:input_type -> cosmos.staking.v1beta1.MsgCreateValidator - 2, // 12: cosmos.staking.v1beta1.Msg.EditValidator:input_type -> cosmos.staking.v1beta1.MsgEditValidator - 4, // 13: cosmos.staking.v1beta1.Msg.Delegate:input_type -> cosmos.staking.v1beta1.MsgDelegate - 6, // 14: cosmos.staking.v1beta1.Msg.BeginRedelegate:input_type -> cosmos.staking.v1beta1.MsgBeginRedelegate - 8, // 15: cosmos.staking.v1beta1.Msg.Undelegate:input_type -> cosmos.staking.v1beta1.MsgUndelegate - 10, // 16: cosmos.staking.v1beta1.Msg.CancelUnbondingDelegation:input_type -> cosmos.staking.v1beta1.MsgCancelUnbondingDelegation - 1, // 17: cosmos.staking.v1beta1.Msg.CreateValidator:output_type -> cosmos.staking.v1beta1.MsgCreateValidatorResponse - 3, // 18: cosmos.staking.v1beta1.Msg.EditValidator:output_type -> cosmos.staking.v1beta1.MsgEditValidatorResponse - 5, // 19: cosmos.staking.v1beta1.Msg.Delegate:output_type -> cosmos.staking.v1beta1.MsgDelegateResponse - 7, // 20: cosmos.staking.v1beta1.Msg.BeginRedelegate:output_type -> cosmos.staking.v1beta1.MsgBeginRedelegateResponse - 9, // 21: cosmos.staking.v1beta1.Msg.Undelegate:output_type -> cosmos.staking.v1beta1.MsgUndelegateResponse - 11, // 22: cosmos.staking.v1beta1.Msg.CancelUnbondingDelegation:output_type -> cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse - 17, // [17:23] is the sub-list for method output_type - 11, // [11:17] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_cosmos_staking_v1beta1_tx_proto_init() } -func file_cosmos_staking_v1beta1_tx_proto_init() { - if File_cosmos_staking_v1beta1_tx_proto != nil { - return - } - file_cosmos_staking_v1beta1_staking_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_staking_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateValidator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateValidatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgEditValidator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgEditValidatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDelegate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDelegateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBeginRedelegate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgBeginRedelegateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUndelegate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUndelegateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCancelUnbondingDelegation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_staking_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCancelUnbondingDelegationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_staking_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 12, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_staking_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_staking_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_staking_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_staking_v1beta1_tx_proto = out.File - file_cosmos_staking_v1beta1_tx_proto_rawDesc = nil - file_cosmos_staking_v1beta1_tx_proto_goTypes = nil - file_cosmos_staking_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/staking/v1beta1/tx_grpc.pb.go b/api/cosmos/staking/v1beta1/tx_grpc.pb.go deleted file mode 100644 index e230b495d7c9..000000000000 --- a/api/cosmos/staking/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,305 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/staking/v1beta1/tx.proto - -package stakingv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // CreateValidator defines a method for creating a new validator. - CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) - // EditValidator defines a method for editing an existing validator. - EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error) - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error) - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error) - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) - // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - // and delegate back to previous validator. - CancelUnbondingDelegation(ctx context.Context, in *MsgCancelUnbondingDelegation, opts ...grpc.CallOption) (*MsgCancelUnbondingDelegationResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) { - out := new(MsgCreateValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/CreateValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error) { - out := new(MsgEditValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/EditValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error) { - out := new(MsgDelegateResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/Delegate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error) { - out := new(MsgBeginRedelegateResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/BeginRedelegate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) { - out := new(MsgUndelegateResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/Undelegate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CancelUnbondingDelegation(ctx context.Context, in *MsgCancelUnbondingDelegation, opts ...grpc.CallOption) (*MsgCancelUnbondingDelegationResponse, error) { - out := new(MsgCancelUnbondingDelegationResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // CreateValidator defines a method for creating a new validator. - CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) - // EditValidator defines a method for editing an existing validator. - EditValidator(context.Context, *MsgEditValidator) (*MsgEditValidatorResponse, error) - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - Delegate(context.Context, *MsgDelegate) (*MsgDelegateResponse, error) - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - BeginRedelegate(context.Context, *MsgBeginRedelegate) (*MsgBeginRedelegateResponse, error) - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - Undelegate(context.Context, *MsgUndelegate) (*MsgUndelegateResponse, error) - // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - // and delegate back to previous validator. - CancelUnbondingDelegation(context.Context, *MsgCancelUnbondingDelegation) (*MsgCancelUnbondingDelegationResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateValidator not implemented") -} -func (UnimplementedMsgServer) EditValidator(context.Context, *MsgEditValidator) (*MsgEditValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EditValidator not implemented") -} -func (UnimplementedMsgServer) Delegate(context.Context, *MsgDelegate) (*MsgDelegateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delegate not implemented") -} -func (UnimplementedMsgServer) BeginRedelegate(context.Context, *MsgBeginRedelegate) (*MsgBeginRedelegateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BeginRedelegate not implemented") -} -func (UnimplementedMsgServer) Undelegate(context.Context, *MsgUndelegate) (*MsgUndelegateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Undelegate not implemented") -} -func (UnimplementedMsgServer) CancelUnbondingDelegation(context.Context, *MsgCancelUnbondingDelegation) (*MsgCancelUnbondingDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelUnbondingDelegation not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_CreateValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/CreateValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateValidator(ctx, req.(*MsgCreateValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_EditValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEditValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).EditValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/EditValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EditValidator(ctx, req.(*MsgEditValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Delegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDelegate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Delegate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/Delegate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Delegate(ctx, req.(*MsgDelegate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_BeginRedelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBeginRedelegate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).BeginRedelegate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/BeginRedelegate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).BeginRedelegate(ctx, req.(*MsgBeginRedelegate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Undelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUndelegate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Undelegate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/Undelegate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Undelegate(ctx, req.(*MsgUndelegate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CancelUnbondingDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCancelUnbondingDelegation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CancelUnbondingDelegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CancelUnbondingDelegation(ctx, req.(*MsgCancelUnbondingDelegation)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.staking.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateValidator", - Handler: _Msg_CreateValidator_Handler, - }, - { - MethodName: "EditValidator", - Handler: _Msg_EditValidator_Handler, - }, - { - MethodName: "Delegate", - Handler: _Msg_Delegate_Handler, - }, - { - MethodName: "BeginRedelegate", - Handler: _Msg_BeginRedelegate_Handler, - }, - { - MethodName: "Undelegate", - Handler: _Msg_Undelegate_Handler, - }, - { - MethodName: "CancelUnbondingDelegation", - Handler: _Msg_CancelUnbondingDelegation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/staking/v1beta1/tx.proto", -} diff --git a/api/cosmos/tx/signing/v1beta1/signing.pulsar.go b/api/cosmos/tx/signing/v1beta1/signing.pulsar.go deleted file mode 100644 index 2f4ee5d2153f..000000000000 --- a/api/cosmos/tx/signing/v1beta1/signing.pulsar.go +++ /dev/null @@ -1,3270 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package signingv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/crypto/multisig/v1beta1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_SignatureDescriptors_1_list)(nil) - -type _SignatureDescriptors_1_list struct { - list *[]*SignatureDescriptor -} - -func (x *_SignatureDescriptors_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_SignatureDescriptors_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_SignatureDescriptors_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignatureDescriptor) - (*x.list)[i] = concreteValue -} - -func (x *_SignatureDescriptors_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignatureDescriptor) - *x.list = append(*x.list, concreteValue) -} - -func (x *_SignatureDescriptors_1_list) AppendMutable() protoreflect.Value { - v := new(SignatureDescriptor) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SignatureDescriptors_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_SignatureDescriptors_1_list) NewElement() protoreflect.Value { - v := new(SignatureDescriptor) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SignatureDescriptors_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_SignatureDescriptors protoreflect.MessageDescriptor - fd_SignatureDescriptors_signatures protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_signing_v1beta1_signing_proto_init() - md_SignatureDescriptors = File_cosmos_tx_signing_v1beta1_signing_proto.Messages().ByName("SignatureDescriptors") - fd_SignatureDescriptors_signatures = md_SignatureDescriptors.Fields().ByName("signatures") -} - -var _ protoreflect.Message = (*fastReflection_SignatureDescriptors)(nil) - -type fastReflection_SignatureDescriptors SignatureDescriptors - -func (x *SignatureDescriptors) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignatureDescriptors)(x) -} - -func (x *SignatureDescriptors) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignatureDescriptors_messageType fastReflection_SignatureDescriptors_messageType -var _ protoreflect.MessageType = fastReflection_SignatureDescriptors_messageType{} - -type fastReflection_SignatureDescriptors_messageType struct{} - -func (x fastReflection_SignatureDescriptors_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignatureDescriptors)(nil) -} -func (x fastReflection_SignatureDescriptors_messageType) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptors) -} -func (x fastReflection_SignatureDescriptors_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptors -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignatureDescriptors) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptors -} - -// 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_SignatureDescriptors) Type() protoreflect.MessageType { - return _fastReflection_SignatureDescriptors_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignatureDescriptors) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptors) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignatureDescriptors) Interface() protoreflect.ProtoMessage { - return (*SignatureDescriptors)(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_SignatureDescriptors) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_SignatureDescriptors_1_list{list: &x.Signatures}) - if !f(fd_SignatureDescriptors_signatures, 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_SignatureDescriptors) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures": - return len(x.Signatures) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptors")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptors 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_SignatureDescriptors) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures": - x.Signatures = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptors")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptors 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_SignatureDescriptors) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_SignatureDescriptors_1_list{}) - } - listValue := &_SignatureDescriptors_1_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptors")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptors 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_SignatureDescriptors) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures": - lv := value.List() - clv := lv.(*_SignatureDescriptors_1_list) - x.Signatures = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptors")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptors 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_SignatureDescriptors) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures": - if x.Signatures == nil { - x.Signatures = []*SignatureDescriptor{} - } - value := &_SignatureDescriptors_1_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptors")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptors 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_SignatureDescriptors) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures": - list := []*SignatureDescriptor{} - return protoreflect.ValueOfList(&_SignatureDescriptors_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptors")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptors 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_SignatureDescriptors) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.signing.v1beta1.SignatureDescriptors", 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_SignatureDescriptors) 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_SignatureDescriptors) 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_SignatureDescriptors) 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_SignatureDescriptors) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignatureDescriptors) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Signatures) > 0 { - for _, e := range x.Signatures { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SignatureDescriptors) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Signatures[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SignatureDescriptors) - 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: SignatureDescriptors: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignatureDescriptors: 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 Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, &SignatureDescriptor{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Signatures[len(x.Signatures)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SignatureDescriptor protoreflect.MessageDescriptor - fd_SignatureDescriptor_public_key protoreflect.FieldDescriptor - fd_SignatureDescriptor_data protoreflect.FieldDescriptor - fd_SignatureDescriptor_sequence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_signing_v1beta1_signing_proto_init() - md_SignatureDescriptor = File_cosmos_tx_signing_v1beta1_signing_proto.Messages().ByName("SignatureDescriptor") - fd_SignatureDescriptor_public_key = md_SignatureDescriptor.Fields().ByName("public_key") - fd_SignatureDescriptor_data = md_SignatureDescriptor.Fields().ByName("data") - fd_SignatureDescriptor_sequence = md_SignatureDescriptor.Fields().ByName("sequence") -} - -var _ protoreflect.Message = (*fastReflection_SignatureDescriptor)(nil) - -type fastReflection_SignatureDescriptor SignatureDescriptor - -func (x *SignatureDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignatureDescriptor)(x) -} - -func (x *SignatureDescriptor) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignatureDescriptor_messageType fastReflection_SignatureDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_SignatureDescriptor_messageType{} - -type fastReflection_SignatureDescriptor_messageType struct{} - -func (x fastReflection_SignatureDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignatureDescriptor)(nil) -} -func (x fastReflection_SignatureDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor) -} -func (x fastReflection_SignatureDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignatureDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor -} - -// 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_SignatureDescriptor) Type() protoreflect.MessageType { - return _fastReflection_SignatureDescriptor_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignatureDescriptor) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignatureDescriptor) Interface() protoreflect.ProtoMessage { - return (*SignatureDescriptor)(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_SignatureDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_SignatureDescriptor_public_key, value) { - return - } - } - if x.Data != nil { - value := protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - if !f(fd_SignatureDescriptor_data, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_SignatureDescriptor_sequence, 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_SignatureDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key": - return x.PublicKey != nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.data": - return x.Data != nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.sequence": - return x.Sequence != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor 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_SignatureDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key": - x.PublicKey = nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.data": - x.Data = nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.sequence": - x.Sequence = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor 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_SignatureDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.data": - value := x.Data - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor 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_SignatureDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key": - x.PublicKey = value.Message().Interface().(*anypb.Any) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.data": - x.Data = value.Message().Interface().(*SignatureDescriptor_Data) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.sequence": - x.Sequence = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor 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_SignatureDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key": - if x.PublicKey == nil { - x.PublicKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.data": - if x.Data == nil { - x.Data = new(SignatureDescriptor_Data) - } - return protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.sequence": - panic(fmt.Errorf("field sequence of message cosmos.tx.signing.v1beta1.SignatureDescriptor is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor 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_SignatureDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.data": - m := new(SignatureDescriptor_Data) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor 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_SignatureDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.signing.v1beta1.SignatureDescriptor", 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_SignatureDescriptor) 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_SignatureDescriptor) 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_SignatureDescriptor) 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_SignatureDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignatureDescriptor) - 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.PublicKey != nil { - l = options.Size(x.PublicKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Data != nil { - l = options.Size(x.Data) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - 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().(*SignatureDescriptor) - 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.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x18 - } - if x.Data != nil { - encoded, err := options.Marshal(x.Data) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - 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().(*SignatureDescriptor) - 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: SignatureDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignatureDescriptor: 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 PublicKey", 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.PublicKey == nil { - x.PublicKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data == nil { - x.Data = &SignatureDescriptor_Data{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Data); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SignatureDescriptor_Data protoreflect.MessageDescriptor - fd_SignatureDescriptor_Data_single protoreflect.FieldDescriptor - fd_SignatureDescriptor_Data_multi protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_signing_v1beta1_signing_proto_init() - md_SignatureDescriptor_Data = File_cosmos_tx_signing_v1beta1_signing_proto.Messages().ByName("SignatureDescriptor").Messages().ByName("Data") - fd_SignatureDescriptor_Data_single = md_SignatureDescriptor_Data.Fields().ByName("single") - fd_SignatureDescriptor_Data_multi = md_SignatureDescriptor_Data.Fields().ByName("multi") -} - -var _ protoreflect.Message = (*fastReflection_SignatureDescriptor_Data)(nil) - -type fastReflection_SignatureDescriptor_Data SignatureDescriptor_Data - -func (x *SignatureDescriptor_Data) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignatureDescriptor_Data)(x) -} - -func (x *SignatureDescriptor_Data) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignatureDescriptor_Data_messageType fastReflection_SignatureDescriptor_Data_messageType -var _ protoreflect.MessageType = fastReflection_SignatureDescriptor_Data_messageType{} - -type fastReflection_SignatureDescriptor_Data_messageType struct{} - -func (x fastReflection_SignatureDescriptor_Data_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignatureDescriptor_Data)(nil) -} -func (x fastReflection_SignatureDescriptor_Data_messageType) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor_Data) -} -func (x fastReflection_SignatureDescriptor_Data_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor_Data -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignatureDescriptor_Data) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor_Data -} - -// 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_SignatureDescriptor_Data) Type() protoreflect.MessageType { - return _fastReflection_SignatureDescriptor_Data_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignatureDescriptor_Data) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor_Data) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignatureDescriptor_Data) Interface() protoreflect.ProtoMessage { - return (*SignatureDescriptor_Data)(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_SignatureDescriptor_Data) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sum != nil { - switch o := x.Sum.(type) { - case *SignatureDescriptor_Data_Single_: - v := o.Single - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SignatureDescriptor_Data_single, value) { - return - } - case *SignatureDescriptor_Data_Multi_: - v := o.Multi - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_SignatureDescriptor_Data_multi, 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_SignatureDescriptor_Data) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*SignatureDescriptor_Data_Single_); ok { - return true - } else { - return false - } - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*SignatureDescriptor_Data_Multi_); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data 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_SignatureDescriptor_Data) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single": - x.Sum = nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi": - x.Sum = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data 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_SignatureDescriptor_Data) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*SignatureDescriptor_Data_Single)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*SignatureDescriptor_Data_Single_); ok { - return protoreflect.ValueOfMessage(v.Single.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SignatureDescriptor_Data_Single)(nil).ProtoReflect()) - } - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*SignatureDescriptor_Data_Multi)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*SignatureDescriptor_Data_Multi_); ok { - return protoreflect.ValueOfMessage(v.Multi.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*SignatureDescriptor_Data_Multi)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data 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_SignatureDescriptor_Data) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single": - cv := value.Message().Interface().(*SignatureDescriptor_Data_Single) - x.Sum = &SignatureDescriptor_Data_Single_{Single: cv} - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi": - cv := value.Message().Interface().(*SignatureDescriptor_Data_Multi) - x.Sum = &SignatureDescriptor_Data_Multi_{Multi: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data 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_SignatureDescriptor_Data) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single": - if x.Sum == nil { - value := &SignatureDescriptor_Data_Single{} - oneofValue := &SignatureDescriptor_Data_Single_{Single: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *SignatureDescriptor_Data_Single_: - return protoreflect.ValueOfMessage(m.Single.ProtoReflect()) - default: - value := &SignatureDescriptor_Data_Single{} - oneofValue := &SignatureDescriptor_Data_Single_{Single: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi": - if x.Sum == nil { - value := &SignatureDescriptor_Data_Multi{} - oneofValue := &SignatureDescriptor_Data_Multi_{Multi: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *SignatureDescriptor_Data_Multi_: - return protoreflect.ValueOfMessage(m.Multi.ProtoReflect()) - default: - value := &SignatureDescriptor_Data_Multi{} - oneofValue := &SignatureDescriptor_Data_Multi_{Multi: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data 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_SignatureDescriptor_Data) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single": - value := &SignatureDescriptor_Data_Single{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi": - value := &SignatureDescriptor_Data_Multi{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data 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_SignatureDescriptor_Data) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *SignatureDescriptor_Data_Single_: - return x.Descriptor().Fields().ByName("single") - case *SignatureDescriptor_Data_Multi_: - return x.Descriptor().Fields().ByName("multi") - } - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.signing.v1beta1.SignatureDescriptor.Data", 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_SignatureDescriptor_Data) 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_SignatureDescriptor_Data) 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_SignatureDescriptor_Data) 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_SignatureDescriptor_Data) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignatureDescriptor_Data) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Sum.(type) { - case *SignatureDescriptor_Data_Single_: - if x == nil { - break - } - l = options.Size(x.Single) - n += 1 + l + runtime.Sov(uint64(l)) - case *SignatureDescriptor_Data_Multi_: - if x == nil { - break - } - l = options.Size(x.Multi) - 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().(*SignatureDescriptor_Data) - 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) - } - switch x := x.Sum.(type) { - case *SignatureDescriptor_Data_Single_: - encoded, err := options.Marshal(x.Single) - 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 - case *SignatureDescriptor_Data_Multi_: - encoded, err := options.Marshal(x.Multi) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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().(*SignatureDescriptor_Data) - 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: SignatureDescriptor_Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignatureDescriptor_Data: 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 Single", 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 - } - v := &SignatureDescriptor_Data_Single{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &SignatureDescriptor_Data_Single_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Multi", 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 - } - v := &SignatureDescriptor_Data_Multi{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &SignatureDescriptor_Data_Multi_{v} - 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_SignatureDescriptor_Data_Single protoreflect.MessageDescriptor - fd_SignatureDescriptor_Data_Single_mode protoreflect.FieldDescriptor - fd_SignatureDescriptor_Data_Single_signature protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_signing_v1beta1_signing_proto_init() - md_SignatureDescriptor_Data_Single = File_cosmos_tx_signing_v1beta1_signing_proto.Messages().ByName("SignatureDescriptor").Messages().ByName("Data").Messages().ByName("Single") - fd_SignatureDescriptor_Data_Single_mode = md_SignatureDescriptor_Data_Single.Fields().ByName("mode") - fd_SignatureDescriptor_Data_Single_signature = md_SignatureDescriptor_Data_Single.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_SignatureDescriptor_Data_Single)(nil) - -type fastReflection_SignatureDescriptor_Data_Single SignatureDescriptor_Data_Single - -func (x *SignatureDescriptor_Data_Single) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignatureDescriptor_Data_Single)(x) -} - -func (x *SignatureDescriptor_Data_Single) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignatureDescriptor_Data_Single_messageType fastReflection_SignatureDescriptor_Data_Single_messageType -var _ protoreflect.MessageType = fastReflection_SignatureDescriptor_Data_Single_messageType{} - -type fastReflection_SignatureDescriptor_Data_Single_messageType struct{} - -func (x fastReflection_SignatureDescriptor_Data_Single_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignatureDescriptor_Data_Single)(nil) -} -func (x fastReflection_SignatureDescriptor_Data_Single_messageType) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor_Data_Single) -} -func (x fastReflection_SignatureDescriptor_Data_Single_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor_Data_Single -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignatureDescriptor_Data_Single) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor_Data_Single -} - -// 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_SignatureDescriptor_Data_Single) Type() protoreflect.MessageType { - return _fastReflection_SignatureDescriptor_Data_Single_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignatureDescriptor_Data_Single) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor_Data_Single) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignatureDescriptor_Data_Single) Interface() protoreflect.ProtoMessage { - return (*SignatureDescriptor_Data_Single)(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_SignatureDescriptor_Data_Single) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Mode != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Mode)) - if !f(fd_SignatureDescriptor_Data_Single_mode, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_SignatureDescriptor_Data_Single_signature, 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_SignatureDescriptor_Data_Single) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode": - return x.Mode != 0 - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.signature": - return len(x.Signature) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single 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_SignatureDescriptor_Data_Single) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode": - x.Mode = 0 - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.signature": - x.Signature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single 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_SignatureDescriptor_Data_Single) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode": - value := x.Mode - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single 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_SignatureDescriptor_Data_Single) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode": - x.Mode = (SignMode)(value.Enum()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.signature": - x.Signature = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single 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_SignatureDescriptor_Data_Single) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode": - panic(fmt.Errorf("field mode of message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single is not mutable")) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.signature": - panic(fmt.Errorf("field signature of message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single 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_SignatureDescriptor_Data_Single) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode": - return protoreflect.ValueOfEnum(0) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.signature": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single 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_SignatureDescriptor_Data_Single) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single", 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_SignatureDescriptor_Data_Single) 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_SignatureDescriptor_Data_Single) 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_SignatureDescriptor_Data_Single) 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_SignatureDescriptor_Data_Single) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignatureDescriptor_Data_Single) - 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.Mode != 0 { - n += 1 + runtime.Sov(uint64(x.Mode)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SignatureDescriptor_Data_Single) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x12 - } - if x.Mode != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Mode)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SignatureDescriptor_Data_Single) - 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: SignatureDescriptor_Data_Single: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignatureDescriptor_Data_Single: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - x.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Mode |= SignMode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_SignatureDescriptor_Data_Multi_2_list)(nil) - -type _SignatureDescriptor_Data_Multi_2_list struct { - list *[]*SignatureDescriptor_Data -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignatureDescriptor_Data) - (*x.list)[i] = concreteValue -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignatureDescriptor_Data) - *x.list = append(*x.list, concreteValue) -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) AppendMutable() protoreflect.Value { - v := new(SignatureDescriptor_Data) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) NewElement() protoreflect.Value { - v := new(SignatureDescriptor_Data) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SignatureDescriptor_Data_Multi_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_SignatureDescriptor_Data_Multi protoreflect.MessageDescriptor - fd_SignatureDescriptor_Data_Multi_bitarray protoreflect.FieldDescriptor - fd_SignatureDescriptor_Data_Multi_signatures protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_signing_v1beta1_signing_proto_init() - md_SignatureDescriptor_Data_Multi = File_cosmos_tx_signing_v1beta1_signing_proto.Messages().ByName("SignatureDescriptor").Messages().ByName("Data").Messages().ByName("Multi") - fd_SignatureDescriptor_Data_Multi_bitarray = md_SignatureDescriptor_Data_Multi.Fields().ByName("bitarray") - fd_SignatureDescriptor_Data_Multi_signatures = md_SignatureDescriptor_Data_Multi.Fields().ByName("signatures") -} - -var _ protoreflect.Message = (*fastReflection_SignatureDescriptor_Data_Multi)(nil) - -type fastReflection_SignatureDescriptor_Data_Multi SignatureDescriptor_Data_Multi - -func (x *SignatureDescriptor_Data_Multi) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignatureDescriptor_Data_Multi)(x) -} - -func (x *SignatureDescriptor_Data_Multi) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignatureDescriptor_Data_Multi_messageType fastReflection_SignatureDescriptor_Data_Multi_messageType -var _ protoreflect.MessageType = fastReflection_SignatureDescriptor_Data_Multi_messageType{} - -type fastReflection_SignatureDescriptor_Data_Multi_messageType struct{} - -func (x fastReflection_SignatureDescriptor_Data_Multi_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignatureDescriptor_Data_Multi)(nil) -} -func (x fastReflection_SignatureDescriptor_Data_Multi_messageType) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor_Data_Multi) -} -func (x fastReflection_SignatureDescriptor_Data_Multi_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor_Data_Multi -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignatureDescriptor_Data_Multi) Descriptor() protoreflect.MessageDescriptor { - return md_SignatureDescriptor_Data_Multi -} - -// 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_SignatureDescriptor_Data_Multi) Type() protoreflect.MessageType { - return _fastReflection_SignatureDescriptor_Data_Multi_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignatureDescriptor_Data_Multi) New() protoreflect.Message { - return new(fastReflection_SignatureDescriptor_Data_Multi) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignatureDescriptor_Data_Multi) Interface() protoreflect.ProtoMessage { - return (*SignatureDescriptor_Data_Multi)(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_SignatureDescriptor_Data_Multi) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bitarray != nil { - value := protoreflect.ValueOfMessage(x.Bitarray.ProtoReflect()) - if !f(fd_SignatureDescriptor_Data_Multi_bitarray, value) { - return - } - } - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_SignatureDescriptor_Data_Multi_2_list{list: &x.Signatures}) - if !f(fd_SignatureDescriptor_Data_Multi_signatures, 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_SignatureDescriptor_Data_Multi) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray": - return x.Bitarray != nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures": - return len(x.Signatures) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi 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_SignatureDescriptor_Data_Multi) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray": - x.Bitarray = nil - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures": - x.Signatures = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi 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_SignatureDescriptor_Data_Multi) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray": - value := x.Bitarray - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_SignatureDescriptor_Data_Multi_2_list{}) - } - listValue := &_SignatureDescriptor_Data_Multi_2_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi 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_SignatureDescriptor_Data_Multi) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray": - x.Bitarray = value.Message().Interface().(*v1beta1.CompactBitArray) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures": - lv := value.List() - clv := lv.(*_SignatureDescriptor_Data_Multi_2_list) - x.Signatures = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi 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_SignatureDescriptor_Data_Multi) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray": - if x.Bitarray == nil { - x.Bitarray = new(v1beta1.CompactBitArray) - } - return protoreflect.ValueOfMessage(x.Bitarray.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures": - if x.Signatures == nil { - x.Signatures = []*SignatureDescriptor_Data{} - } - value := &_SignatureDescriptor_Data_Multi_2_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi 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_SignatureDescriptor_Data_Multi) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray": - m := new(v1beta1.CompactBitArray) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures": - list := []*SignatureDescriptor_Data{} - return protoreflect.ValueOfList(&_SignatureDescriptor_Data_Multi_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi 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_SignatureDescriptor_Data_Multi) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi", 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_SignatureDescriptor_Data_Multi) 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_SignatureDescriptor_Data_Multi) 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_SignatureDescriptor_Data_Multi) 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_SignatureDescriptor_Data_Multi) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignatureDescriptor_Data_Multi) - 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.Bitarray != nil { - l = options.Size(x.Bitarray) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Signatures) > 0 { - for _, e := range x.Signatures { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SignatureDescriptor_Data_Multi) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Signatures[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Bitarray != nil { - encoded, err := options.Marshal(x.Bitarray) - 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().(*SignatureDescriptor_Data_Multi) - 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: SignatureDescriptor_Data_Multi: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignatureDescriptor_Data_Multi: 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 Bitarray", 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.Bitarray == nil { - x.Bitarray = &v1beta1.CompactBitArray{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Bitarray); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, &SignatureDescriptor_Data{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Signatures[len(x.Signatures)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/tx/signing/v1beta1/signing.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SignMode represents a signing mode with its own security guarantees. -// -// This enum should be considered a registry of all known sign modes -// in the Cosmos ecosystem. Apps are not expected to support all known -// sign modes. Apps that would like to support custom sign modes are -// encouraged to open a small PR against this file to add a new case -// to this SignMode enum describing their sign mode so that different -// apps have a consistent version of this enum. -type SignMode int32 - -const ( - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - // rejected. - SignMode_SIGN_MODE_UNSPECIFIED SignMode = 0 - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - // verified with raw bytes from Tx. - SignMode_SIGN_MODE_DIRECT SignMode = 1 - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some - // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT. It is currently not supported. - SignMode_SIGN_MODE_TEXTUAL SignMode = 2 - // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses - // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. - // - // Since: cosmos-sdk 0.46 - SignMode_SIGN_MODE_DIRECT_AUX SignMode = 3 - // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future. - SignMode_SIGN_MODE_LEGACY_AMINO_JSON SignMode = 127 - // SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - // SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - // - // Since: cosmos-sdk 0.45 - SignMode_SIGN_MODE_EIP_191 SignMode = 191 -) - -// Enum value maps for SignMode. -var ( - SignMode_name = map[int32]string{ - 0: "SIGN_MODE_UNSPECIFIED", - 1: "SIGN_MODE_DIRECT", - 2: "SIGN_MODE_TEXTUAL", - 3: "SIGN_MODE_DIRECT_AUX", - 127: "SIGN_MODE_LEGACY_AMINO_JSON", - 191: "SIGN_MODE_EIP_191", - } - SignMode_value = map[string]int32{ - "SIGN_MODE_UNSPECIFIED": 0, - "SIGN_MODE_DIRECT": 1, - "SIGN_MODE_TEXTUAL": 2, - "SIGN_MODE_DIRECT_AUX": 3, - "SIGN_MODE_LEGACY_AMINO_JSON": 127, - "SIGN_MODE_EIP_191": 191, - } -) - -func (x SignMode) Enum() *SignMode { - p := new(SignMode) - *p = x - return p -} - -func (x SignMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SignMode) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_tx_signing_v1beta1_signing_proto_enumTypes[0].Descriptor() -} - -func (SignMode) Type() protoreflect.EnumType { - return &file_cosmos_tx_signing_v1beta1_signing_proto_enumTypes[0] -} - -func (x SignMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SignMode.Descriptor instead. -func (SignMode) EnumDescriptor() ([]byte, []int) { - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP(), []int{0} -} - -// SignatureDescriptors wraps multiple SignatureDescriptor's. -type SignatureDescriptors struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signatures are the signature descriptors - Signatures []*SignatureDescriptor `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (x *SignatureDescriptors) Reset() { - *x = SignatureDescriptors{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignatureDescriptors) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignatureDescriptors) ProtoMessage() {} - -// Deprecated: Use SignatureDescriptors.ProtoReflect.Descriptor instead. -func (*SignatureDescriptors) Descriptor() ([]byte, []int) { - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP(), []int{0} -} - -func (x *SignatureDescriptors) GetSignatures() []*SignatureDescriptor { - if x != nil { - return x.Signatures - } - return nil -} - -// SignatureDescriptor is a convenience type which represents the full data for -// a signature including the public key of the signer, signing modes and the -// signature itself. It is primarily used for coordinating signatures between -// clients. -type SignatureDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // public_key is the public key of the signer - PublicKey *anypb.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - Data *SignatureDescriptor_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (x *SignatureDescriptor) Reset() { - *x = SignatureDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignatureDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignatureDescriptor) ProtoMessage() {} - -// Deprecated: Use SignatureDescriptor.ProtoReflect.Descriptor instead. -func (*SignatureDescriptor) Descriptor() ([]byte, []int) { - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP(), []int{1} -} - -func (x *SignatureDescriptor) GetPublicKey() *anypb.Any { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *SignatureDescriptor) GetData() *SignatureDescriptor_Data { - if x != nil { - return x.Data - } - return nil -} - -func (x *SignatureDescriptor) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -// Data represents signature data -type SignatureDescriptor_Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sum is the oneof that specifies whether this represents single or multi-signature data - // - // Types that are assignable to Sum: - // *SignatureDescriptor_Data_Single_ - // *SignatureDescriptor_Data_Multi_ - Sum isSignatureDescriptor_Data_Sum `protobuf_oneof:"sum"` -} - -func (x *SignatureDescriptor_Data) Reset() { - *x = SignatureDescriptor_Data{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignatureDescriptor_Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignatureDescriptor_Data) ProtoMessage() {} - -// Deprecated: Use SignatureDescriptor_Data.ProtoReflect.Descriptor instead. -func (*SignatureDescriptor_Data) Descriptor() ([]byte, []int) { - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *SignatureDescriptor_Data) GetSum() isSignatureDescriptor_Data_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *SignatureDescriptor_Data) GetSingle() *SignatureDescriptor_Data_Single { - if x, ok := x.GetSum().(*SignatureDescriptor_Data_Single_); ok { - return x.Single - } - return nil -} - -func (x *SignatureDescriptor_Data) GetMulti() *SignatureDescriptor_Data_Multi { - if x, ok := x.GetSum().(*SignatureDescriptor_Data_Multi_); ok { - return x.Multi - } - return nil -} - -type isSignatureDescriptor_Data_Sum interface { - isSignatureDescriptor_Data_Sum() -} - -type SignatureDescriptor_Data_Single_ struct { - // single represents a single signer - Single *SignatureDescriptor_Data_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof"` -} - -type SignatureDescriptor_Data_Multi_ struct { - // multi represents a multisig signer - Multi *SignatureDescriptor_Data_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof"` -} - -func (*SignatureDescriptor_Data_Single_) isSignatureDescriptor_Data_Sum() {} - -func (*SignatureDescriptor_Data_Multi_) isSignatureDescriptor_Data_Sum() {} - -// Single is the signature data for a single signer -type SignatureDescriptor_Data_Single struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // mode is the signing mode of the single signer - Mode SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` - // signature is the raw signature bytes - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SignatureDescriptor_Data_Single) Reset() { - *x = SignatureDescriptor_Data_Single{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignatureDescriptor_Data_Single) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignatureDescriptor_Data_Single) ProtoMessage() {} - -// Deprecated: Use SignatureDescriptor_Data_Single.ProtoReflect.Descriptor instead. -func (*SignatureDescriptor_Data_Single) Descriptor() ([]byte, []int) { - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP(), []int{1, 0, 0} -} - -func (x *SignatureDescriptor_Data_Single) GetMode() SignMode { - if x != nil { - return x.Mode - } - return SignMode_SIGN_MODE_UNSPECIFIED -} - -func (x *SignatureDescriptor_Data_Single) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -// Multi is the signature data for a multisig public key -type SignatureDescriptor_Data_Multi struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bitarray specifies which keys within the multisig are signing - Bitarray *v1beta1.CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"` - // signatures is the signatures of the multi-signature - Signatures []*SignatureDescriptor_Data `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (x *SignatureDescriptor_Data_Multi) Reset() { - *x = SignatureDescriptor_Data_Multi{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignatureDescriptor_Data_Multi) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignatureDescriptor_Data_Multi) ProtoMessage() {} - -// Deprecated: Use SignatureDescriptor_Data_Multi.ProtoReflect.Descriptor instead. -func (*SignatureDescriptor_Data_Multi) Descriptor() ([]byte, []int) { - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP(), []int{1, 0, 1} -} - -func (x *SignatureDescriptor_Data_Multi) GetBitarray() *v1beta1.CompactBitArray { - if x != nil { - return x.Bitarray - } - return nil -} - -func (x *SignatureDescriptor_Data_Multi) GetSignatures() []*SignatureDescriptor_Data { - if x != nil { - return x.Signatures - } - return nil -} - -var File_cosmos_tx_signing_v1beta1_signing_proto protoreflect.FileDescriptor - -var file_cosmos_tx_signing_v1beta1_signing_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x66, - 0x0a, 0x14, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xf5, 0x04, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x33, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 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, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x1a, 0xc3, 0x03, 0x0a, 0x04, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x48, 0x00, 0x52, - 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x48, 0x00, 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x1a, 0x5f, 0x0a, 0x06, 0x53, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xa9, 0x01, 0x0a, 0x05, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x12, 0x4b, 0x0a, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, - 0x42, 0x69, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, - 0x61, 0x79, 0x12, 0x53, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x2a, 0xa5, - 0x01, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x53, - 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x4d, - 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, - 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x55, 0x41, - 0x4c, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, - 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x55, 0x58, 0x10, 0x03, 0x12, 0x1f, 0x0a, - 0x1b, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4c, 0x45, 0x47, 0x41, 0x43, - 0x59, 0x5f, 0x41, 0x4d, 0x49, 0x4e, 0x4f, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x7f, 0x12, 0x16, - 0x0a, 0x11, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x49, 0x50, 0x5f, - 0x31, 0x39, 0x31, 0x10, 0xbf, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x53, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, - 0x78, 0x5c, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_tx_signing_v1beta1_signing_proto_rawDescOnce sync.Once - file_cosmos_tx_signing_v1beta1_signing_proto_rawDescData = file_cosmos_tx_signing_v1beta1_signing_proto_rawDesc -) - -func file_cosmos_tx_signing_v1beta1_signing_proto_rawDescGZIP() []byte { - file_cosmos_tx_signing_v1beta1_signing_proto_rawDescOnce.Do(func() { - file_cosmos_tx_signing_v1beta1_signing_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_tx_signing_v1beta1_signing_proto_rawDescData) - }) - return file_cosmos_tx_signing_v1beta1_signing_proto_rawDescData -} - -var file_cosmos_tx_signing_v1beta1_signing_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cosmos_tx_signing_v1beta1_signing_proto_goTypes = []interface{}{ - (SignMode)(0), // 0: cosmos.tx.signing.v1beta1.SignMode - (*SignatureDescriptors)(nil), // 1: cosmos.tx.signing.v1beta1.SignatureDescriptors - (*SignatureDescriptor)(nil), // 2: cosmos.tx.signing.v1beta1.SignatureDescriptor - (*SignatureDescriptor_Data)(nil), // 3: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data - (*SignatureDescriptor_Data_Single)(nil), // 4: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single - (*SignatureDescriptor_Data_Multi)(nil), // 5: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi - (*anypb.Any)(nil), // 6: google.protobuf.Any - (*v1beta1.CompactBitArray)(nil), // 7: cosmos.crypto.multisig.v1beta1.CompactBitArray -} -var file_cosmos_tx_signing_v1beta1_signing_proto_depIdxs = []int32{ - 2, // 0: cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures:type_name -> cosmos.tx.signing.v1beta1.SignatureDescriptor - 6, // 1: cosmos.tx.signing.v1beta1.SignatureDescriptor.public_key:type_name -> google.protobuf.Any - 3, // 2: cosmos.tx.signing.v1beta1.SignatureDescriptor.data:type_name -> cosmos.tx.signing.v1beta1.SignatureDescriptor.Data - 4, // 3: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single:type_name -> cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single - 5, // 4: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi:type_name -> cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi - 0, // 5: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.mode:type_name -> cosmos.tx.signing.v1beta1.SignMode - 7, // 6: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray:type_name -> cosmos.crypto.multisig.v1beta1.CompactBitArray - 3, // 7: cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures:type_name -> cosmos.tx.signing.v1beta1.SignatureDescriptor.Data - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] 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_tx_signing_v1beta1_signing_proto_init() } -func file_cosmos_tx_signing_v1beta1_signing_proto_init() { - if File_cosmos_tx_signing_v1beta1_signing_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignatureDescriptors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignatureDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignatureDescriptor_Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignatureDescriptor_Data_Single); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignatureDescriptor_Data_Multi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*SignatureDescriptor_Data_Single_)(nil), - (*SignatureDescriptor_Data_Multi_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_tx_signing_v1beta1_signing_proto_rawDesc, - NumEnums: 1, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_tx_signing_v1beta1_signing_proto_goTypes, - DependencyIndexes: file_cosmos_tx_signing_v1beta1_signing_proto_depIdxs, - EnumInfos: file_cosmos_tx_signing_v1beta1_signing_proto_enumTypes, - MessageInfos: file_cosmos_tx_signing_v1beta1_signing_proto_msgTypes, - }.Build() - File_cosmos_tx_signing_v1beta1_signing_proto = out.File - file_cosmos_tx_signing_v1beta1_signing_proto_rawDesc = nil - file_cosmos_tx_signing_v1beta1_signing_proto_goTypes = nil - file_cosmos_tx_signing_v1beta1_signing_proto_depIdxs = nil -} diff --git a/api/cosmos/tx/v1beta1/service.pulsar.go b/api/cosmos/tx/v1beta1/service.pulsar.go deleted file mode 100644 index ec4afdbe92bd..000000000000 --- a/api/cosmos/tx/v1beta1/service.pulsar.go +++ /dev/null @@ -1,6413 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package txv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta11 "github.com/cosmos/cosmos-sdk/api/cosmos/base/abci/v1beta1" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - types "github.com/cosmos/cosmos-sdk/api/tendermint/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GetTxsEventRequest_1_list)(nil) - -type _GetTxsEventRequest_1_list struct { - list *[]string -} - -func (x *_GetTxsEventRequest_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetTxsEventRequest_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_GetTxsEventRequest_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_GetTxsEventRequest_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetTxsEventRequest_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message GetTxsEventRequest at list field Events as it is not of Message kind")) -} - -func (x *_GetTxsEventRequest_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_GetTxsEventRequest_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_GetTxsEventRequest_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetTxsEventRequest protoreflect.MessageDescriptor - fd_GetTxsEventRequest_events protoreflect.FieldDescriptor - fd_GetTxsEventRequest_pagination protoreflect.FieldDescriptor - fd_GetTxsEventRequest_order_by protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_GetTxsEventRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("GetTxsEventRequest") - fd_GetTxsEventRequest_events = md_GetTxsEventRequest.Fields().ByName("events") - fd_GetTxsEventRequest_pagination = md_GetTxsEventRequest.Fields().ByName("pagination") - fd_GetTxsEventRequest_order_by = md_GetTxsEventRequest.Fields().ByName("order_by") -} - -var _ protoreflect.Message = (*fastReflection_GetTxsEventRequest)(nil) - -type fastReflection_GetTxsEventRequest GetTxsEventRequest - -func (x *GetTxsEventRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetTxsEventRequest)(x) -} - -func (x *GetTxsEventRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetTxsEventRequest_messageType fastReflection_GetTxsEventRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetTxsEventRequest_messageType{} - -type fastReflection_GetTxsEventRequest_messageType struct{} - -func (x fastReflection_GetTxsEventRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetTxsEventRequest)(nil) -} -func (x fastReflection_GetTxsEventRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetTxsEventRequest) -} -func (x fastReflection_GetTxsEventRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxsEventRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetTxsEventRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxsEventRequest -} - -// 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_GetTxsEventRequest) Type() protoreflect.MessageType { - return _fastReflection_GetTxsEventRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetTxsEventRequest) New() protoreflect.Message { - return new(fastReflection_GetTxsEventRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetTxsEventRequest) Interface() protoreflect.ProtoMessage { - return (*GetTxsEventRequest)(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_GetTxsEventRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_GetTxsEventRequest_1_list{list: &x.Events}) - if !f(fd_GetTxsEventRequest_events, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetTxsEventRequest_pagination, value) { - return - } - } - if x.OrderBy != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.OrderBy)) - if !f(fd_GetTxsEventRequest_order_by, 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_GetTxsEventRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventRequest.events": - return len(x.Events) != 0 - case "cosmos.tx.v1beta1.GetTxsEventRequest.pagination": - return x.Pagination != nil - case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": - return x.OrderBy != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventRequest 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_GetTxsEventRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventRequest.events": - x.Events = nil - case "cosmos.tx.v1beta1.GetTxsEventRequest.pagination": - x.Pagination = nil - case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": - x.OrderBy = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventRequest 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_GetTxsEventRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventRequest.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_GetTxsEventRequest_1_list{}) - } - listValue := &_GetTxsEventRequest_1_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.GetTxsEventRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": - value := x.OrderBy - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventRequest 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_GetTxsEventRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventRequest.events": - lv := value.List() - clv := lv.(*_GetTxsEventRequest_1_list) - x.Events = *clv.list - case "cosmos.tx.v1beta1.GetTxsEventRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": - x.OrderBy = (OrderBy)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventRequest 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_GetTxsEventRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventRequest.events": - if x.Events == nil { - x.Events = []string{} - } - value := &_GetTxsEventRequest_1_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.GetTxsEventRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": - panic(fmt.Errorf("field order_by of message cosmos.tx.v1beta1.GetTxsEventRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventRequest 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_GetTxsEventRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventRequest.events": - list := []string{} - return protoreflect.ValueOfList(&_GetTxsEventRequest_1_list{list: &list}) - case "cosmos.tx.v1beta1.GetTxsEventRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventRequest 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_GetTxsEventRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.GetTxsEventRequest", 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_GetTxsEventRequest) 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_GetTxsEventRequest) 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_GetTxsEventRequest) 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_GetTxsEventRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetTxsEventRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Events) > 0 { - for _, s := range x.Events { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.OrderBy != 0 { - n += 1 + runtime.Sov(uint64(x.OrderBy)) - } - 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().(*GetTxsEventRequest) - 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.OrderBy != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.OrderBy)) - i-- - dAtA[i] = 0x18 - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Events[iNdEx]) - copy(dAtA[i:], x.Events[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Events[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetTxsEventRequest) - 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: GetTxsEventRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetTxsEventRequest: 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 Events", 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.Events = append(x.Events, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OrderBy", wireType) - } - x.OrderBy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.OrderBy |= OrderBy(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GetTxsEventResponse_1_list)(nil) - -type _GetTxsEventResponse_1_list struct { - list *[]*Tx -} - -func (x *_GetTxsEventResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetTxsEventResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetTxsEventResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Tx) - (*x.list)[i] = concreteValue -} - -func (x *_GetTxsEventResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Tx) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetTxsEventResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Tx) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetTxsEventResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetTxsEventResponse_1_list) NewElement() protoreflect.Value { - v := new(Tx) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetTxsEventResponse_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GetTxsEventResponse_2_list)(nil) - -type _GetTxsEventResponse_2_list struct { - list *[]*v1beta11.TxResponse -} - -func (x *_GetTxsEventResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetTxsEventResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetTxsEventResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.TxResponse) - (*x.list)[i] = concreteValue -} - -func (x *_GetTxsEventResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.TxResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetTxsEventResponse_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta11.TxResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetTxsEventResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetTxsEventResponse_2_list) NewElement() protoreflect.Value { - v := new(v1beta11.TxResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetTxsEventResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetTxsEventResponse protoreflect.MessageDescriptor - fd_GetTxsEventResponse_txs protoreflect.FieldDescriptor - fd_GetTxsEventResponse_tx_responses protoreflect.FieldDescriptor - fd_GetTxsEventResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_GetTxsEventResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("GetTxsEventResponse") - fd_GetTxsEventResponse_txs = md_GetTxsEventResponse.Fields().ByName("txs") - fd_GetTxsEventResponse_tx_responses = md_GetTxsEventResponse.Fields().ByName("tx_responses") - fd_GetTxsEventResponse_pagination = md_GetTxsEventResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetTxsEventResponse)(nil) - -type fastReflection_GetTxsEventResponse GetTxsEventResponse - -func (x *GetTxsEventResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetTxsEventResponse)(x) -} - -func (x *GetTxsEventResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetTxsEventResponse_messageType fastReflection_GetTxsEventResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetTxsEventResponse_messageType{} - -type fastReflection_GetTxsEventResponse_messageType struct{} - -func (x fastReflection_GetTxsEventResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetTxsEventResponse)(nil) -} -func (x fastReflection_GetTxsEventResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetTxsEventResponse) -} -func (x fastReflection_GetTxsEventResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxsEventResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetTxsEventResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxsEventResponse -} - -// 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_GetTxsEventResponse) Type() protoreflect.MessageType { - return _fastReflection_GetTxsEventResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetTxsEventResponse) New() protoreflect.Message { - return new(fastReflection_GetTxsEventResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetTxsEventResponse) Interface() protoreflect.ProtoMessage { - return (*GetTxsEventResponse)(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_GetTxsEventResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Txs) != 0 { - value := protoreflect.ValueOfList(&_GetTxsEventResponse_1_list{list: &x.Txs}) - if !f(fd_GetTxsEventResponse_txs, value) { - return - } - } - if len(x.TxResponses) != 0 { - value := protoreflect.ValueOfList(&_GetTxsEventResponse_2_list{list: &x.TxResponses}) - if !f(fd_GetTxsEventResponse_tx_responses, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetTxsEventResponse_pagination, 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_GetTxsEventResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventResponse.txs": - return len(x.Txs) != 0 - case "cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses": - return len(x.TxResponses) != 0 - case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventResponse 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_GetTxsEventResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventResponse.txs": - x.Txs = nil - case "cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses": - x.TxResponses = nil - case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventResponse 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_GetTxsEventResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventResponse.txs": - if len(x.Txs) == 0 { - return protoreflect.ValueOfList(&_GetTxsEventResponse_1_list{}) - } - listValue := &_GetTxsEventResponse_1_list{list: &x.Txs} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses": - if len(x.TxResponses) == 0 { - return protoreflect.ValueOfList(&_GetTxsEventResponse_2_list{}) - } - listValue := &_GetTxsEventResponse_2_list{list: &x.TxResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventResponse 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_GetTxsEventResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventResponse.txs": - lv := value.List() - clv := lv.(*_GetTxsEventResponse_1_list) - x.Txs = *clv.list - case "cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses": - lv := value.List() - clv := lv.(*_GetTxsEventResponse_2_list) - x.TxResponses = *clv.list - case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventResponse 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_GetTxsEventResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventResponse.txs": - if x.Txs == nil { - x.Txs = []*Tx{} - } - value := &_GetTxsEventResponse_1_list{list: &x.Txs} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses": - if x.TxResponses == nil { - x.TxResponses = []*v1beta11.TxResponse{} - } - value := &_GetTxsEventResponse_2_list{list: &x.TxResponses} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventResponse 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_GetTxsEventResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxsEventResponse.txs": - list := []*Tx{} - return protoreflect.ValueOfList(&_GetTxsEventResponse_1_list{list: &list}) - case "cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses": - list := []*v1beta11.TxResponse{} - return protoreflect.ValueOfList(&_GetTxsEventResponse_2_list{list: &list}) - case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxsEventResponse 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_GetTxsEventResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.GetTxsEventResponse", 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_GetTxsEventResponse) 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_GetTxsEventResponse) 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_GetTxsEventResponse) 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_GetTxsEventResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetTxsEventResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Txs) > 0 { - for _, e := range x.Txs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.TxResponses) > 0 { - for _, e := range x.TxResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetTxsEventResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.TxResponses) > 0 { - for iNdEx := len(x.TxResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TxResponses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Txs) > 0 { - for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Txs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetTxsEventResponse) - 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: GetTxsEventResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetTxsEventResponse: 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 Txs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Txs = append(x.Txs, &Tx{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Txs[len(x.Txs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TxResponses = append(x.TxResponses, &v1beta11.TxResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxResponses[len(x.TxResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_BroadcastTxRequest protoreflect.MessageDescriptor - fd_BroadcastTxRequest_tx_bytes protoreflect.FieldDescriptor - fd_BroadcastTxRequest_mode protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_BroadcastTxRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("BroadcastTxRequest") - fd_BroadcastTxRequest_tx_bytes = md_BroadcastTxRequest.Fields().ByName("tx_bytes") - fd_BroadcastTxRequest_mode = md_BroadcastTxRequest.Fields().ByName("mode") -} - -var _ protoreflect.Message = (*fastReflection_BroadcastTxRequest)(nil) - -type fastReflection_BroadcastTxRequest BroadcastTxRequest - -func (x *BroadcastTxRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_BroadcastTxRequest)(x) -} - -func (x *BroadcastTxRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BroadcastTxRequest_messageType fastReflection_BroadcastTxRequest_messageType -var _ protoreflect.MessageType = fastReflection_BroadcastTxRequest_messageType{} - -type fastReflection_BroadcastTxRequest_messageType struct{} - -func (x fastReflection_BroadcastTxRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_BroadcastTxRequest)(nil) -} -func (x fastReflection_BroadcastTxRequest_messageType) New() protoreflect.Message { - return new(fastReflection_BroadcastTxRequest) -} -func (x fastReflection_BroadcastTxRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BroadcastTxRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BroadcastTxRequest) Descriptor() protoreflect.MessageDescriptor { - return md_BroadcastTxRequest -} - -// 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_BroadcastTxRequest) Type() protoreflect.MessageType { - return _fastReflection_BroadcastTxRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BroadcastTxRequest) New() protoreflect.Message { - return new(fastReflection_BroadcastTxRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BroadcastTxRequest) Interface() protoreflect.ProtoMessage { - return (*BroadcastTxRequest)(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_BroadcastTxRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.TxBytes) != 0 { - value := protoreflect.ValueOfBytes(x.TxBytes) - if !f(fd_BroadcastTxRequest_tx_bytes, value) { - return - } - } - if x.Mode != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Mode)) - if !f(fd_BroadcastTxRequest_mode, 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_BroadcastTxRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxRequest.tx_bytes": - return len(x.TxBytes) != 0 - case "cosmos.tx.v1beta1.BroadcastTxRequest.mode": - return x.Mode != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxRequest 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_BroadcastTxRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxRequest.tx_bytes": - x.TxBytes = nil - case "cosmos.tx.v1beta1.BroadcastTxRequest.mode": - x.Mode = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxRequest 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_BroadcastTxRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxRequest.tx_bytes": - value := x.TxBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.tx.v1beta1.BroadcastTxRequest.mode": - value := x.Mode - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxRequest 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_BroadcastTxRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxRequest.tx_bytes": - x.TxBytes = value.Bytes() - case "cosmos.tx.v1beta1.BroadcastTxRequest.mode": - x.Mode = (BroadcastMode)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxRequest 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_BroadcastTxRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxRequest.tx_bytes": - panic(fmt.Errorf("field tx_bytes of message cosmos.tx.v1beta1.BroadcastTxRequest is not mutable")) - case "cosmos.tx.v1beta1.BroadcastTxRequest.mode": - panic(fmt.Errorf("field mode of message cosmos.tx.v1beta1.BroadcastTxRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxRequest 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_BroadcastTxRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxRequest.tx_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.tx.v1beta1.BroadcastTxRequest.mode": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxRequest 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_BroadcastTxRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.BroadcastTxRequest", 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_BroadcastTxRequest) 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_BroadcastTxRequest) 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_BroadcastTxRequest) 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_BroadcastTxRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BroadcastTxRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.TxBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Mode != 0 { - n += 1 + runtime.Sov(uint64(x.Mode)) - } - 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().(*BroadcastTxRequest) - 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.Mode != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Mode)) - i-- - dAtA[i] = 0x10 - } - if len(x.TxBytes) > 0 { - i -= len(x.TxBytes) - copy(dAtA[i:], x.TxBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxBytes))) - 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().(*BroadcastTxRequest) - 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: BroadcastTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BroadcastTxRequest: 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 TxBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TxBytes = append(x.TxBytes[:0], dAtA[iNdEx:postIndex]...) - if x.TxBytes == nil { - x.TxBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - x.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Mode |= BroadcastMode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_BroadcastTxResponse protoreflect.MessageDescriptor - fd_BroadcastTxResponse_tx_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_BroadcastTxResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("BroadcastTxResponse") - fd_BroadcastTxResponse_tx_response = md_BroadcastTxResponse.Fields().ByName("tx_response") -} - -var _ protoreflect.Message = (*fastReflection_BroadcastTxResponse)(nil) - -type fastReflection_BroadcastTxResponse BroadcastTxResponse - -func (x *BroadcastTxResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_BroadcastTxResponse)(x) -} - -func (x *BroadcastTxResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BroadcastTxResponse_messageType fastReflection_BroadcastTxResponse_messageType -var _ protoreflect.MessageType = fastReflection_BroadcastTxResponse_messageType{} - -type fastReflection_BroadcastTxResponse_messageType struct{} - -func (x fastReflection_BroadcastTxResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_BroadcastTxResponse)(nil) -} -func (x fastReflection_BroadcastTxResponse_messageType) New() protoreflect.Message { - return new(fastReflection_BroadcastTxResponse) -} -func (x fastReflection_BroadcastTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BroadcastTxResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BroadcastTxResponse) Descriptor() protoreflect.MessageDescriptor { - return md_BroadcastTxResponse -} - -// 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_BroadcastTxResponse) Type() protoreflect.MessageType { - return _fastReflection_BroadcastTxResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BroadcastTxResponse) New() protoreflect.Message { - return new(fastReflection_BroadcastTxResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BroadcastTxResponse) Interface() protoreflect.ProtoMessage { - return (*BroadcastTxResponse)(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_BroadcastTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.TxResponse != nil { - value := protoreflect.ValueOfMessage(x.TxResponse.ProtoReflect()) - if !f(fd_BroadcastTxResponse_tx_response, 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_BroadcastTxResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxResponse.tx_response": - return x.TxResponse != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxResponse 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_BroadcastTxResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxResponse.tx_response": - x.TxResponse = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxResponse 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_BroadcastTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxResponse.tx_response": - value := x.TxResponse - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxResponse 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_BroadcastTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxResponse.tx_response": - x.TxResponse = value.Message().Interface().(*v1beta11.TxResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxResponse 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_BroadcastTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxResponse.tx_response": - if x.TxResponse == nil { - x.TxResponse = new(v1beta11.TxResponse) - } - return protoreflect.ValueOfMessage(x.TxResponse.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxResponse 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_BroadcastTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.BroadcastTxResponse.tx_response": - m := new(v1beta11.TxResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.BroadcastTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.BroadcastTxResponse 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_BroadcastTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.BroadcastTxResponse", 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_BroadcastTxResponse) 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_BroadcastTxResponse) 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_BroadcastTxResponse) 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_BroadcastTxResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BroadcastTxResponse) - 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.TxResponse != nil { - l = options.Size(x.TxResponse) - 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().(*BroadcastTxResponse) - 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.TxResponse != nil { - encoded, err := options.Marshal(x.TxResponse) - 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().(*BroadcastTxResponse) - 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: BroadcastTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BroadcastTxResponse: 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 TxResponse", 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.TxResponse == nil { - x.TxResponse = &v1beta11.TxResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxResponse); 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_SimulateRequest protoreflect.MessageDescriptor - fd_SimulateRequest_tx protoreflect.FieldDescriptor - fd_SimulateRequest_tx_bytes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_SimulateRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("SimulateRequest") - fd_SimulateRequest_tx = md_SimulateRequest.Fields().ByName("tx") - fd_SimulateRequest_tx_bytes = md_SimulateRequest.Fields().ByName("tx_bytes") -} - -var _ protoreflect.Message = (*fastReflection_SimulateRequest)(nil) - -type fastReflection_SimulateRequest SimulateRequest - -func (x *SimulateRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SimulateRequest)(x) -} - -func (x *SimulateRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SimulateRequest_messageType fastReflection_SimulateRequest_messageType -var _ protoreflect.MessageType = fastReflection_SimulateRequest_messageType{} - -type fastReflection_SimulateRequest_messageType struct{} - -func (x fastReflection_SimulateRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SimulateRequest)(nil) -} -func (x fastReflection_SimulateRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SimulateRequest) -} -func (x fastReflection_SimulateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SimulateRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateRequest -} - -// 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_SimulateRequest) Type() protoreflect.MessageType { - return _fastReflection_SimulateRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SimulateRequest) New() protoreflect.Message { - return new(fastReflection_SimulateRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SimulateRequest) Interface() protoreflect.ProtoMessage { - return (*SimulateRequest)(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_SimulateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Tx != nil { - value := protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - if !f(fd_SimulateRequest_tx, value) { - return - } - } - if len(x.TxBytes) != 0 { - value := protoreflect.ValueOfBytes(x.TxBytes) - if !f(fd_SimulateRequest_tx_bytes, 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_SimulateRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateRequest.tx": - return x.Tx != nil - case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": - return len(x.TxBytes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateRequest 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_SimulateRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateRequest.tx": - x.Tx = nil - case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": - x.TxBytes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateRequest 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_SimulateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.SimulateRequest.tx": - value := x.Tx - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": - value := x.TxBytes - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateRequest 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_SimulateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateRequest.tx": - x.Tx = value.Message().Interface().(*Tx) - case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": - x.TxBytes = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateRequest 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_SimulateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateRequest.tx": - if x.Tx == nil { - x.Tx = new(Tx) - } - return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": - panic(fmt.Errorf("field tx_bytes of message cosmos.tx.v1beta1.SimulateRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateRequest 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_SimulateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateRequest.tx": - m := new(Tx) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateRequest 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_SimulateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.SimulateRequest", 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_SimulateRequest) 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_SimulateRequest) 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_SimulateRequest) 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_SimulateRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SimulateRequest) - 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.Tx != nil { - l = options.Size(x.Tx) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TxBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SimulateRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.TxBytes) > 0 { - i -= len(x.TxBytes) - copy(dAtA[i:], x.TxBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxBytes))) - i-- - dAtA[i] = 0x12 - } - if x.Tx != nil { - encoded, err := options.Marshal(x.Tx) - 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().(*SimulateRequest) - 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: SimulateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulateRequest: 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 Tx", 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.Tx == nil { - x.Tx = &Tx{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tx); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TxBytes = append(x.TxBytes[:0], dAtA[iNdEx:postIndex]...) - if x.TxBytes == nil { - x.TxBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SimulateResponse protoreflect.MessageDescriptor - fd_SimulateResponse_gas_info protoreflect.FieldDescriptor - fd_SimulateResponse_result protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_SimulateResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("SimulateResponse") - fd_SimulateResponse_gas_info = md_SimulateResponse.Fields().ByName("gas_info") - fd_SimulateResponse_result = md_SimulateResponse.Fields().ByName("result") -} - -var _ protoreflect.Message = (*fastReflection_SimulateResponse)(nil) - -type fastReflection_SimulateResponse SimulateResponse - -func (x *SimulateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SimulateResponse)(x) -} - -func (x *SimulateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_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_SimulateResponse_messageType fastReflection_SimulateResponse_messageType -var _ protoreflect.MessageType = fastReflection_SimulateResponse_messageType{} - -type fastReflection_SimulateResponse_messageType struct{} - -func (x fastReflection_SimulateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SimulateResponse)(nil) -} -func (x fastReflection_SimulateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SimulateResponse) -} -func (x fastReflection_SimulateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SimulateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateResponse -} - -// 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_SimulateResponse) Type() protoreflect.MessageType { - return _fastReflection_SimulateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SimulateResponse) New() protoreflect.Message { - return new(fastReflection_SimulateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SimulateResponse) Interface() protoreflect.ProtoMessage { - return (*SimulateResponse)(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_SimulateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GasInfo != nil { - value := protoreflect.ValueOfMessage(x.GasInfo.ProtoReflect()) - if !f(fd_SimulateResponse_gas_info, value) { - return - } - } - if x.Result != nil { - value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) - if !f(fd_SimulateResponse_result, 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_SimulateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateResponse.gas_info": - return x.GasInfo != nil - case "cosmos.tx.v1beta1.SimulateResponse.result": - return x.Result != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateResponse 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_SimulateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateResponse.gas_info": - x.GasInfo = nil - case "cosmos.tx.v1beta1.SimulateResponse.result": - x.Result = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateResponse 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_SimulateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.SimulateResponse.gas_info": - value := x.GasInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.SimulateResponse.result": - value := x.Result - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateResponse 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_SimulateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateResponse.gas_info": - x.GasInfo = value.Message().Interface().(*v1beta11.GasInfo) - case "cosmos.tx.v1beta1.SimulateResponse.result": - x.Result = value.Message().Interface().(*v1beta11.Result) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateResponse 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_SimulateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateResponse.gas_info": - if x.GasInfo == nil { - x.GasInfo = new(v1beta11.GasInfo) - } - return protoreflect.ValueOfMessage(x.GasInfo.ProtoReflect()) - case "cosmos.tx.v1beta1.SimulateResponse.result": - if x.Result == nil { - x.Result = new(v1beta11.Result) - } - return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateResponse 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_SimulateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SimulateResponse.gas_info": - m := new(v1beta11.GasInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.SimulateResponse.result": - m := new(v1beta11.Result) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SimulateResponse 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_SimulateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.SimulateResponse", 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_SimulateResponse) 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_SimulateResponse) 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_SimulateResponse) 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_SimulateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SimulateResponse) - 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.GasInfo != nil { - l = options.Size(x.GasInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Result != nil { - l = options.Size(x.Result) - 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().(*SimulateResponse) - 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.Result != nil { - encoded, err := options.Marshal(x.Result) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.GasInfo != nil { - encoded, err := options.Marshal(x.GasInfo) - 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().(*SimulateResponse) - 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: SimulateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulateResponse: 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 GasInfo", 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.GasInfo == nil { - x.GasInfo = &v1beta11.GasInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GasInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { - x.Result = &v1beta11.Result{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); 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_GetTxRequest protoreflect.MessageDescriptor - fd_GetTxRequest_hash protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_GetTxRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("GetTxRequest") - fd_GetTxRequest_hash = md_GetTxRequest.Fields().ByName("hash") -} - -var _ protoreflect.Message = (*fastReflection_GetTxRequest)(nil) - -type fastReflection_GetTxRequest GetTxRequest - -func (x *GetTxRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetTxRequest)(x) -} - -func (x *GetTxRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_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_GetTxRequest_messageType fastReflection_GetTxRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetTxRequest_messageType{} - -type fastReflection_GetTxRequest_messageType struct{} - -func (x fastReflection_GetTxRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetTxRequest)(nil) -} -func (x fastReflection_GetTxRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetTxRequest) -} -func (x fastReflection_GetTxRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetTxRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxRequest -} - -// 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_GetTxRequest) Type() protoreflect.MessageType { - return _fastReflection_GetTxRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetTxRequest) New() protoreflect.Message { - return new(fastReflection_GetTxRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetTxRequest) Interface() protoreflect.ProtoMessage { - return (*GetTxRequest)(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_GetTxRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Hash != "" { - value := protoreflect.ValueOfString(x.Hash) - if !f(fd_GetTxRequest_hash, 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_GetTxRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxRequest.hash": - return x.Hash != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxRequest 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_GetTxRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxRequest.hash": - x.Hash = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxRequest 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_GetTxRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.GetTxRequest.hash": - value := x.Hash - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxRequest 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_GetTxRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxRequest.hash": - x.Hash = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxRequest 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_GetTxRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxRequest.hash": - panic(fmt.Errorf("field hash of message cosmos.tx.v1beta1.GetTxRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxRequest 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_GetTxRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxRequest.hash": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxRequest 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_GetTxRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.GetTxRequest", 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_GetTxRequest) 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_GetTxRequest) 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_GetTxRequest) 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_GetTxRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetTxRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*GetTxRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetTxRequest) - 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: GetTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_GetTxResponse protoreflect.MessageDescriptor - fd_GetTxResponse_tx protoreflect.FieldDescriptor - fd_GetTxResponse_tx_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_GetTxResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("GetTxResponse") - fd_GetTxResponse_tx = md_GetTxResponse.Fields().ByName("tx") - fd_GetTxResponse_tx_response = md_GetTxResponse.Fields().ByName("tx_response") -} - -var _ protoreflect.Message = (*fastReflection_GetTxResponse)(nil) - -type fastReflection_GetTxResponse GetTxResponse - -func (x *GetTxResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetTxResponse)(x) -} - -func (x *GetTxResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetTxResponse_messageType fastReflection_GetTxResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetTxResponse_messageType{} - -type fastReflection_GetTxResponse_messageType struct{} - -func (x fastReflection_GetTxResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetTxResponse)(nil) -} -func (x fastReflection_GetTxResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetTxResponse) -} -func (x fastReflection_GetTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetTxResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetTxResponse -} - -// 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_GetTxResponse) Type() protoreflect.MessageType { - return _fastReflection_GetTxResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetTxResponse) New() protoreflect.Message { - return new(fastReflection_GetTxResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetTxResponse) Interface() protoreflect.ProtoMessage { - return (*GetTxResponse)(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_GetTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Tx != nil { - value := protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - if !f(fd_GetTxResponse_tx, value) { - return - } - } - if x.TxResponse != nil { - value := protoreflect.ValueOfMessage(x.TxResponse.ProtoReflect()) - if !f(fd_GetTxResponse_tx_response, 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_GetTxResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxResponse.tx": - return x.Tx != nil - case "cosmos.tx.v1beta1.GetTxResponse.tx_response": - return x.TxResponse != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxResponse 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_GetTxResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxResponse.tx": - x.Tx = nil - case "cosmos.tx.v1beta1.GetTxResponse.tx_response": - x.TxResponse = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxResponse 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_GetTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.GetTxResponse.tx": - value := x.Tx - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.GetTxResponse.tx_response": - value := x.TxResponse - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxResponse 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_GetTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxResponse.tx": - x.Tx = value.Message().Interface().(*Tx) - case "cosmos.tx.v1beta1.GetTxResponse.tx_response": - x.TxResponse = value.Message().Interface().(*v1beta11.TxResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxResponse 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_GetTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxResponse.tx": - if x.Tx == nil { - x.Tx = new(Tx) - } - return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) - case "cosmos.tx.v1beta1.GetTxResponse.tx_response": - if x.TxResponse == nil { - x.TxResponse = new(v1beta11.TxResponse) - } - return protoreflect.ValueOfMessage(x.TxResponse.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxResponse 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_GetTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetTxResponse.tx": - m := new(Tx) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.GetTxResponse.tx_response": - m := new(v1beta11.TxResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetTxResponse 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_GetTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.GetTxResponse", 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_GetTxResponse) 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_GetTxResponse) 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_GetTxResponse) 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_GetTxResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetTxResponse) - 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.Tx != nil { - l = options.Size(x.Tx) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TxResponse != nil { - l = options.Size(x.TxResponse) - 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().(*GetTxResponse) - 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.TxResponse != nil { - encoded, err := options.Marshal(x.TxResponse) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Tx != nil { - encoded, err := options.Marshal(x.Tx) - 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().(*GetTxResponse) - 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: GetTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetTxResponse: 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 Tx", 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.Tx == nil { - x.Tx = &Tx{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tx); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxResponse", 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.TxResponse == nil { - x.TxResponse = &v1beta11.TxResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxResponse); 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_GetBlockWithTxsRequest protoreflect.MessageDescriptor - fd_GetBlockWithTxsRequest_height protoreflect.FieldDescriptor - fd_GetBlockWithTxsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_GetBlockWithTxsRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("GetBlockWithTxsRequest") - fd_GetBlockWithTxsRequest_height = md_GetBlockWithTxsRequest.Fields().ByName("height") - fd_GetBlockWithTxsRequest_pagination = md_GetBlockWithTxsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetBlockWithTxsRequest)(nil) - -type fastReflection_GetBlockWithTxsRequest GetBlockWithTxsRequest - -func (x *GetBlockWithTxsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetBlockWithTxsRequest)(x) -} - -func (x *GetBlockWithTxsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetBlockWithTxsRequest_messageType fastReflection_GetBlockWithTxsRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetBlockWithTxsRequest_messageType{} - -type fastReflection_GetBlockWithTxsRequest_messageType struct{} - -func (x fastReflection_GetBlockWithTxsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetBlockWithTxsRequest)(nil) -} -func (x fastReflection_GetBlockWithTxsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetBlockWithTxsRequest) -} -func (x fastReflection_GetBlockWithTxsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockWithTxsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetBlockWithTxsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockWithTxsRequest -} - -// 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_GetBlockWithTxsRequest) Type() protoreflect.MessageType { - return _fastReflection_GetBlockWithTxsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetBlockWithTxsRequest) New() protoreflect.Message { - return new(fastReflection_GetBlockWithTxsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetBlockWithTxsRequest) Interface() protoreflect.ProtoMessage { - return (*GetBlockWithTxsRequest)(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_GetBlockWithTxsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_GetBlockWithTxsRequest_height, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetBlockWithTxsRequest_pagination, 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_GetBlockWithTxsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.height": - return x.Height != int64(0) - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsRequest 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_GetBlockWithTxsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.height": - x.Height = int64(0) - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsRequest 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_GetBlockWithTxsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsRequest 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_GetBlockWithTxsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.height": - x.Height = value.Int() - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsRequest 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_GetBlockWithTxsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.height": - panic(fmt.Errorf("field height of message cosmos.tx.v1beta1.GetBlockWithTxsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsRequest 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_GetBlockWithTxsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsRequest")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsRequest 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_GetBlockWithTxsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.GetBlockWithTxsRequest", 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_GetBlockWithTxsRequest) 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_GetBlockWithTxsRequest) 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_GetBlockWithTxsRequest) 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_GetBlockWithTxsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetBlockWithTxsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetBlockWithTxsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetBlockWithTxsRequest) - 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: GetBlockWithTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockWithTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GetBlockWithTxsResponse_1_list)(nil) - -type _GetBlockWithTxsResponse_1_list struct { - list *[]*Tx -} - -func (x *_GetBlockWithTxsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetBlockWithTxsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetBlockWithTxsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Tx) - (*x.list)[i] = concreteValue -} - -func (x *_GetBlockWithTxsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Tx) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetBlockWithTxsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Tx) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetBlockWithTxsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetBlockWithTxsResponse_1_list) NewElement() protoreflect.Value { - v := new(Tx) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetBlockWithTxsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetBlockWithTxsResponse protoreflect.MessageDescriptor - fd_GetBlockWithTxsResponse_txs protoreflect.FieldDescriptor - fd_GetBlockWithTxsResponse_block_id protoreflect.FieldDescriptor - fd_GetBlockWithTxsResponse_block protoreflect.FieldDescriptor - fd_GetBlockWithTxsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_service_proto_init() - md_GetBlockWithTxsResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("GetBlockWithTxsResponse") - fd_GetBlockWithTxsResponse_txs = md_GetBlockWithTxsResponse.Fields().ByName("txs") - fd_GetBlockWithTxsResponse_block_id = md_GetBlockWithTxsResponse.Fields().ByName("block_id") - fd_GetBlockWithTxsResponse_block = md_GetBlockWithTxsResponse.Fields().ByName("block") - fd_GetBlockWithTxsResponse_pagination = md_GetBlockWithTxsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetBlockWithTxsResponse)(nil) - -type fastReflection_GetBlockWithTxsResponse GetBlockWithTxsResponse - -func (x *GetBlockWithTxsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetBlockWithTxsResponse)(x) -} - -func (x *GetBlockWithTxsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetBlockWithTxsResponse_messageType fastReflection_GetBlockWithTxsResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetBlockWithTxsResponse_messageType{} - -type fastReflection_GetBlockWithTxsResponse_messageType struct{} - -func (x fastReflection_GetBlockWithTxsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetBlockWithTxsResponse)(nil) -} -func (x fastReflection_GetBlockWithTxsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetBlockWithTxsResponse) -} -func (x fastReflection_GetBlockWithTxsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockWithTxsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetBlockWithTxsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockWithTxsResponse -} - -// 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_GetBlockWithTxsResponse) Type() protoreflect.MessageType { - return _fastReflection_GetBlockWithTxsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetBlockWithTxsResponse) New() protoreflect.Message { - return new(fastReflection_GetBlockWithTxsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetBlockWithTxsResponse) Interface() protoreflect.ProtoMessage { - return (*GetBlockWithTxsResponse)(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_GetBlockWithTxsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Txs) != 0 { - value := protoreflect.ValueOfList(&_GetBlockWithTxsResponse_1_list{list: &x.Txs}) - if !f(fd_GetBlockWithTxsResponse_txs, value) { - return - } - } - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_GetBlockWithTxsResponse_block_id, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_GetBlockWithTxsResponse_block, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetBlockWithTxsResponse_pagination, 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_GetBlockWithTxsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs": - return len(x.Txs) != 0 - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id": - return x.BlockId != nil - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block": - return x.Block != nil - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsResponse 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_GetBlockWithTxsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs": - x.Txs = nil - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id": - x.BlockId = nil - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block": - x.Block = nil - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsResponse 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_GetBlockWithTxsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs": - if len(x.Txs) == 0 { - return protoreflect.ValueOfList(&_GetBlockWithTxsResponse_1_list{}) - } - listValue := &_GetBlockWithTxsResponse_1_list{list: &x.Txs} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsResponse 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_GetBlockWithTxsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs": - lv := value.List() - clv := lv.(*_GetBlockWithTxsResponse_1_list) - x.Txs = *clv.list - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id": - x.BlockId = value.Message().Interface().(*types.BlockID) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block": - x.Block = value.Message().Interface().(*types.Block) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsResponse 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_GetBlockWithTxsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs": - if x.Txs == nil { - x.Txs = []*Tx{} - } - value := &_GetBlockWithTxsResponse_1_list{list: &x.Txs} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id": - if x.BlockId == nil { - x.BlockId = new(types.BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block": - if x.Block == nil { - x.Block = new(types.Block) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsResponse 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_GetBlockWithTxsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs": - list := []*Tx{} - return protoreflect.ValueOfList(&_GetBlockWithTxsResponse_1_list{list: &list}) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id": - m := new(types.BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.block": - m := new(types.Block) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetBlockWithTxsResponse")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.GetBlockWithTxsResponse 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_GetBlockWithTxsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.GetBlockWithTxsResponse", 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_GetBlockWithTxsResponse) 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_GetBlockWithTxsResponse) 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_GetBlockWithTxsResponse) 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_GetBlockWithTxsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetBlockWithTxsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Txs) > 0 { - for _, e := range x.Txs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*GetBlockWithTxsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Txs) > 0 { - for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Txs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetBlockWithTxsResponse) - 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: GetBlockWithTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockWithTxsResponse: 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 Txs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Txs = append(x.Txs, &Tx{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Txs[len(x.Txs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockId", 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.BlockId == nil { - x.BlockId = &types.BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", 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.Block == nil { - x.Block = &types.Block{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/tx/v1beta1/service.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// OrderBy defines the sorting order -type OrderBy int32 - -const ( - // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - OrderBy_ORDER_BY_UNSPECIFIED OrderBy = 0 - // ORDER_BY_ASC defines ascending order - OrderBy_ORDER_BY_ASC OrderBy = 1 - // ORDER_BY_DESC defines descending order - OrderBy_ORDER_BY_DESC OrderBy = 2 -) - -// Enum value maps for OrderBy. -var ( - OrderBy_name = map[int32]string{ - 0: "ORDER_BY_UNSPECIFIED", - 1: "ORDER_BY_ASC", - 2: "ORDER_BY_DESC", - } - OrderBy_value = map[string]int32{ - "ORDER_BY_UNSPECIFIED": 0, - "ORDER_BY_ASC": 1, - "ORDER_BY_DESC": 2, - } -) - -func (x OrderBy) Enum() *OrderBy { - p := new(OrderBy) - *p = x - return p -} - -func (x OrderBy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OrderBy) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_tx_v1beta1_service_proto_enumTypes[0].Descriptor() -} - -func (OrderBy) Type() protoreflect.EnumType { - return &file_cosmos_tx_v1beta1_service_proto_enumTypes[0] -} - -func (x OrderBy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OrderBy.Descriptor instead. -func (OrderBy) EnumDescriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{0} -} - -// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. -type BroadcastMode int32 - -const ( - // zero-value for mode ordering - BroadcastMode_BROADCAST_MODE_UNSPECIFIED BroadcastMode = 0 - // BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - // the tx to be committed in a block. - BroadcastMode_BROADCAST_MODE_BLOCK BroadcastMode = 1 - // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - // a CheckTx execution response only. - BroadcastMode_BROADCAST_MODE_SYNC BroadcastMode = 2 - // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - // immediately. - BroadcastMode_BROADCAST_MODE_ASYNC BroadcastMode = 3 -) - -// Enum value maps for BroadcastMode. -var ( - BroadcastMode_name = map[int32]string{ - 0: "BROADCAST_MODE_UNSPECIFIED", - 1: "BROADCAST_MODE_BLOCK", - 2: "BROADCAST_MODE_SYNC", - 3: "BROADCAST_MODE_ASYNC", - } - BroadcastMode_value = map[string]int32{ - "BROADCAST_MODE_UNSPECIFIED": 0, - "BROADCAST_MODE_BLOCK": 1, - "BROADCAST_MODE_SYNC": 2, - "BROADCAST_MODE_ASYNC": 3, - } -) - -func (x BroadcastMode) Enum() *BroadcastMode { - p := new(BroadcastMode) - *p = x - return p -} - -func (x BroadcastMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BroadcastMode) Descriptor() protoreflect.EnumDescriptor { - return file_cosmos_tx_v1beta1_service_proto_enumTypes[1].Descriptor() -} - -func (BroadcastMode) Type() protoreflect.EnumType { - return &file_cosmos_tx_v1beta1_service_proto_enumTypes[1] -} - -func (x BroadcastMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BroadcastMode.Descriptor instead. -func (BroadcastMode) EnumDescriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{1} -} - -// GetTxsEventRequest is the request type for the Service.TxsByEvents -// RPC method. -type GetTxsEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // events is the list of transaction event type. - Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` - // pagination defines a pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` - OrderBy OrderBy `protobuf:"varint,3,opt,name=order_by,json=orderBy,proto3,enum=cosmos.tx.v1beta1.OrderBy" json:"order_by,omitempty"` -} - -func (x *GetTxsEventRequest) Reset() { - *x = GetTxsEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxsEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxsEventRequest) ProtoMessage() {} - -// Deprecated: Use GetTxsEventRequest.ProtoReflect.Descriptor instead. -func (*GetTxsEventRequest) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{0} -} - -func (x *GetTxsEventRequest) GetEvents() []string { - if x != nil { - return x.Events - } - return nil -} - -func (x *GetTxsEventRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetTxsEventRequest) GetOrderBy() OrderBy { - if x != nil { - return x.OrderBy - } - return OrderBy_ORDER_BY_UNSPECIFIED -} - -// GetTxsEventResponse is the response type for the Service.TxsByEvents -// RPC method. -type GetTxsEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // txs is the list of queried transactions. - Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` - // tx_responses is the list of queried TxResponses. - TxResponses []*v1beta11.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"` - // pagination defines a pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetTxsEventResponse) Reset() { - *x = GetTxsEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxsEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxsEventResponse) ProtoMessage() {} - -// Deprecated: Use GetTxsEventResponse.ProtoReflect.Descriptor instead. -func (*GetTxsEventResponse) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{1} -} - -func (x *GetTxsEventResponse) GetTxs() []*Tx { - if x != nil { - return x.Txs - } - return nil -} - -func (x *GetTxsEventResponse) GetTxResponses() []*v1beta11.TxResponse { - if x != nil { - return x.TxResponses - } - return nil -} - -func (x *GetTxsEventResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -// RPC method. -type BroadcastTxRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tx_bytes is the raw transaction. - TxBytes []byte `protobuf:"bytes,1,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` - Mode BroadcastMode `protobuf:"varint,2,opt,name=mode,proto3,enum=cosmos.tx.v1beta1.BroadcastMode" json:"mode,omitempty"` -} - -func (x *BroadcastTxRequest) Reset() { - *x = BroadcastTxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastTxRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastTxRequest) ProtoMessage() {} - -// Deprecated: Use BroadcastTxRequest.ProtoReflect.Descriptor instead. -func (*BroadcastTxRequest) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{2} -} - -func (x *BroadcastTxRequest) GetTxBytes() []byte { - if x != nil { - return x.TxBytes - } - return nil -} - -func (x *BroadcastTxRequest) GetMode() BroadcastMode { - if x != nil { - return x.Mode - } - return BroadcastMode_BROADCAST_MODE_UNSPECIFIED -} - -// BroadcastTxResponse is the response type for the -// Service.BroadcastTx method. -type BroadcastTxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tx_response is the queried TxResponses. - TxResponse *v1beta11.TxResponse `protobuf:"bytes,1,opt,name=tx_response,json=txResponse,proto3" json:"tx_response,omitempty"` -} - -func (x *BroadcastTxResponse) Reset() { - *x = BroadcastTxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastTxResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastTxResponse) ProtoMessage() {} - -// Deprecated: Use BroadcastTxResponse.ProtoReflect.Descriptor instead. -func (*BroadcastTxResponse) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{3} -} - -func (x *BroadcastTxResponse) GetTxResponse() *v1beta11.TxResponse { - if x != nil { - return x.TxResponse - } - return nil -} - -// SimulateRequest is the request type for the Service.Simulate -// RPC method. -type SimulateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tx is the transaction to simulate. - // Deprecated. Send raw tx bytes instead. - // - // Deprecated: Do not use. - Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - // tx_bytes is the raw transaction. - // - // Since: cosmos-sdk 0.43 - TxBytes []byte `protobuf:"bytes,2,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` -} - -func (x *SimulateRequest) Reset() { - *x = SimulateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimulateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimulateRequest) ProtoMessage() {} - -// Deprecated: Use SimulateRequest.ProtoReflect.Descriptor instead. -func (*SimulateRequest) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{4} -} - -// Deprecated: Do not use. -func (x *SimulateRequest) GetTx() *Tx { - if x != nil { - return x.Tx - } - return nil -} - -func (x *SimulateRequest) GetTxBytes() []byte { - if x != nil { - return x.TxBytes - } - return nil -} - -// SimulateResponse is the response type for the -// Service.SimulateRPC method. -type SimulateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // gas_info is the information about gas used in the simulation. - GasInfo *v1beta11.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` - // result is the result of the simulation. - Result *v1beta11.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *SimulateResponse) Reset() { - *x = SimulateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimulateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimulateResponse) ProtoMessage() {} - -// Deprecated: Use SimulateResponse.ProtoReflect.Descriptor instead. -func (*SimulateResponse) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{5} -} - -func (x *SimulateResponse) GetGasInfo() *v1beta11.GasInfo { - if x != nil { - return x.GasInfo - } - return nil -} - -func (x *SimulateResponse) GetResult() *v1beta11.Result { - if x != nil { - return x.Result - } - return nil -} - -// GetTxRequest is the request type for the Service.GetTx -// RPC method. -type GetTxRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // hash is the tx hash to query, encoded as a hex string. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (x *GetTxRequest) Reset() { - *x = GetTxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxRequest) ProtoMessage() {} - -// Deprecated: Use GetTxRequest.ProtoReflect.Descriptor instead. -func (*GetTxRequest) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{6} -} - -func (x *GetTxRequest) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -// GetTxResponse is the response type for the Service.GetTx method. -type GetTxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tx is the queried transaction. - Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - // tx_response is the queried TxResponses. - TxResponse *v1beta11.TxResponse `protobuf:"bytes,2,opt,name=tx_response,json=txResponse,proto3" json:"tx_response,omitempty"` -} - -func (x *GetTxResponse) Reset() { - *x = GetTxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxResponse) ProtoMessage() {} - -// Deprecated: Use GetTxResponse.ProtoReflect.Descriptor instead. -func (*GetTxResponse) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{7} -} - -func (x *GetTxResponse) GetTx() *Tx { - if x != nil { - return x.Tx - } - return nil -} - -func (x *GetTxResponse) GetTxResponse() *v1beta11.TxResponse { - if x != nil { - return x.TxResponse - } - return nil -} - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: cosmos-sdk 0.45.2 -type GetBlockWithTxsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // height is the height of the block to query. - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // pagination defines a pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetBlockWithTxsRequest) Reset() { - *x = GetBlockWithTxsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockWithTxsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockWithTxsRequest) ProtoMessage() {} - -// Deprecated: Use GetBlockWithTxsRequest.ProtoReflect.Descriptor instead. -func (*GetBlockWithTxsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{8} -} - -func (x *GetBlockWithTxsRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *GetBlockWithTxsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -// -// Since: cosmos-sdk 0.45.2 -type GetBlockWithTxsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // txs are the transactions in the block. - Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` - BlockId *types.BlockID `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types.Block `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"` - // pagination defines a pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetBlockWithTxsResponse) Reset() { - *x = GetBlockWithTxsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockWithTxsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockWithTxsResponse) ProtoMessage() {} - -// Deprecated: Use GetBlockWithTxsResponse.ProtoReflect.Descriptor instead. -func (*GetBlockWithTxsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{9} -} - -func (x *GetBlockWithTxsResponse) GetTxs() []*Tx { - if x != nil { - return x.Txs - } - return nil -} - -func (x *GetBlockWithTxsResponse) GetBlockId() *types.BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *GetBlockWithTxsResponse) GetBlock() *types.Block { - if x != nil { - return x.Block - } - return nil -} - -func (x *GetBlockWithTxsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_cosmos_tx_v1beta1_service_proto protoreflect.FileDescriptor - -var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, - 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0xd0, 0x01, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x74, 0x78, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0b, 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x12, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, - 0x6f, 0x64, 0x65, 0x22, 0x5c, 0x0a, 0x13, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, - 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x74, 0x78, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x57, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x42, 0x02, 0x18, 0x01, 0x52, 0x02, 0x74, 0x78, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x10, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3c, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x61, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x67, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x22, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x02, - 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, - 0x02, 0x74, 0x78, 0x12, 0x45, 0x0a, 0x0b, 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf0, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x27, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x54, 0x78, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, - 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x47, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x48, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x42, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x11, - 0x0a, 0x0d, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, - 0x02, 0x2a, 0x7c, 0x0a, 0x0d, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, - 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, - 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, - 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x32, - 0x92, 0x05, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x08, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, - 0x78, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x7b, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x7f, 0x0a, 0x0b, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, - 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1b, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7c, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x18, 0x12, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x12, 0x29, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, - 0x78, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x7d, 0x42, 0xc9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_tx_v1beta1_service_proto_rawDescOnce sync.Once - file_cosmos_tx_v1beta1_service_proto_rawDescData = file_cosmos_tx_v1beta1_service_proto_rawDesc -) - -func file_cosmos_tx_v1beta1_service_proto_rawDescGZIP() []byte { - file_cosmos_tx_v1beta1_service_proto_rawDescOnce.Do(func() { - file_cosmos_tx_v1beta1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_tx_v1beta1_service_proto_rawDescData) - }) - return file_cosmos_tx_v1beta1_service_proto_rawDescData -} - -var file_cosmos_tx_v1beta1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cosmos_tx_v1beta1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_cosmos_tx_v1beta1_service_proto_goTypes = []interface{}{ - (OrderBy)(0), // 0: cosmos.tx.v1beta1.OrderBy - (BroadcastMode)(0), // 1: cosmos.tx.v1beta1.BroadcastMode - (*GetTxsEventRequest)(nil), // 2: cosmos.tx.v1beta1.GetTxsEventRequest - (*GetTxsEventResponse)(nil), // 3: cosmos.tx.v1beta1.GetTxsEventResponse - (*BroadcastTxRequest)(nil), // 4: cosmos.tx.v1beta1.BroadcastTxRequest - (*BroadcastTxResponse)(nil), // 5: cosmos.tx.v1beta1.BroadcastTxResponse - (*SimulateRequest)(nil), // 6: cosmos.tx.v1beta1.SimulateRequest - (*SimulateResponse)(nil), // 7: cosmos.tx.v1beta1.SimulateResponse - (*GetTxRequest)(nil), // 8: cosmos.tx.v1beta1.GetTxRequest - (*GetTxResponse)(nil), // 9: cosmos.tx.v1beta1.GetTxResponse - (*GetBlockWithTxsRequest)(nil), // 10: cosmos.tx.v1beta1.GetBlockWithTxsRequest - (*GetBlockWithTxsResponse)(nil), // 11: cosmos.tx.v1beta1.GetBlockWithTxsResponse - (*v1beta1.PageRequest)(nil), // 12: cosmos.base.query.v1beta1.PageRequest - (*Tx)(nil), // 13: cosmos.tx.v1beta1.Tx - (*v1beta11.TxResponse)(nil), // 14: cosmos.base.abci.v1beta1.TxResponse - (*v1beta1.PageResponse)(nil), // 15: cosmos.base.query.v1beta1.PageResponse - (*v1beta11.GasInfo)(nil), // 16: cosmos.base.abci.v1beta1.GasInfo - (*v1beta11.Result)(nil), // 17: cosmos.base.abci.v1beta1.Result - (*types.BlockID)(nil), // 18: tendermint.types.BlockID - (*types.Block)(nil), // 19: tendermint.types.Block -} -var file_cosmos_tx_v1beta1_service_proto_depIdxs = []int32{ - 12, // 0: cosmos.tx.v1beta1.GetTxsEventRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 0, // 1: cosmos.tx.v1beta1.GetTxsEventRequest.order_by:type_name -> cosmos.tx.v1beta1.OrderBy - 13, // 2: cosmos.tx.v1beta1.GetTxsEventResponse.txs:type_name -> cosmos.tx.v1beta1.Tx - 14, // 3: cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses:type_name -> cosmos.base.abci.v1beta1.TxResponse - 15, // 4: cosmos.tx.v1beta1.GetTxsEventResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 1, // 5: cosmos.tx.v1beta1.BroadcastTxRequest.mode:type_name -> cosmos.tx.v1beta1.BroadcastMode - 14, // 6: cosmos.tx.v1beta1.BroadcastTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse - 13, // 7: cosmos.tx.v1beta1.SimulateRequest.tx:type_name -> cosmos.tx.v1beta1.Tx - 16, // 8: cosmos.tx.v1beta1.SimulateResponse.gas_info:type_name -> cosmos.base.abci.v1beta1.GasInfo - 17, // 9: cosmos.tx.v1beta1.SimulateResponse.result:type_name -> cosmos.base.abci.v1beta1.Result - 13, // 10: cosmos.tx.v1beta1.GetTxResponse.tx:type_name -> cosmos.tx.v1beta1.Tx - 14, // 11: cosmos.tx.v1beta1.GetTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse - 12, // 12: cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 13, // 13: cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs:type_name -> cosmos.tx.v1beta1.Tx - 18, // 14: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id:type_name -> tendermint.types.BlockID - 19, // 15: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block:type_name -> tendermint.types.Block - 15, // 16: cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 6, // 17: cosmos.tx.v1beta1.Service.Simulate:input_type -> cosmos.tx.v1beta1.SimulateRequest - 8, // 18: cosmos.tx.v1beta1.Service.GetTx:input_type -> cosmos.tx.v1beta1.GetTxRequest - 4, // 19: cosmos.tx.v1beta1.Service.BroadcastTx:input_type -> cosmos.tx.v1beta1.BroadcastTxRequest - 2, // 20: cosmos.tx.v1beta1.Service.GetTxsEvent:input_type -> cosmos.tx.v1beta1.GetTxsEventRequest - 10, // 21: cosmos.tx.v1beta1.Service.GetBlockWithTxs:input_type -> cosmos.tx.v1beta1.GetBlockWithTxsRequest - 7, // 22: cosmos.tx.v1beta1.Service.Simulate:output_type -> cosmos.tx.v1beta1.SimulateResponse - 9, // 23: cosmos.tx.v1beta1.Service.GetTx:output_type -> cosmos.tx.v1beta1.GetTxResponse - 5, // 24: cosmos.tx.v1beta1.Service.BroadcastTx:output_type -> cosmos.tx.v1beta1.BroadcastTxResponse - 3, // 25: cosmos.tx.v1beta1.Service.GetTxsEvent:output_type -> cosmos.tx.v1beta1.GetTxsEventResponse - 11, // 26: cosmos.tx.v1beta1.Service.GetBlockWithTxs:output_type -> cosmos.tx.v1beta1.GetBlockWithTxsResponse - 22, // [22:27] is the sub-list for method output_type - 17, // [17:22] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_cosmos_tx_v1beta1_service_proto_init() } -func file_cosmos_tx_v1beta1_service_proto_init() { - if File_cosmos_tx_v1beta1_service_proto != nil { - return - } - file_cosmos_tx_v1beta1_tx_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_tx_v1beta1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTxsEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTxsEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastTxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastTxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockWithTxsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockWithTxsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_tx_v1beta1_service_proto_rawDesc, - NumEnums: 2, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_tx_v1beta1_service_proto_goTypes, - DependencyIndexes: file_cosmos_tx_v1beta1_service_proto_depIdxs, - EnumInfos: file_cosmos_tx_v1beta1_service_proto_enumTypes, - MessageInfos: file_cosmos_tx_v1beta1_service_proto_msgTypes, - }.Build() - File_cosmos_tx_v1beta1_service_proto = out.File - file_cosmos_tx_v1beta1_service_proto_rawDesc = nil - file_cosmos_tx_v1beta1_service_proto_goTypes = nil - file_cosmos_tx_v1beta1_service_proto_depIdxs = nil -} diff --git a/api/cosmos/tx/v1beta1/service_grpc.pb.go b/api/cosmos/tx/v1beta1/service_grpc.pb.go deleted file mode 100644 index 2acab93a3c5b..000000000000 --- a/api/cosmos/tx/v1beta1/service_grpc.pb.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/tx/v1beta1/service.proto - -package txv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceClient interface { - // Simulate simulates executing a transaction for estimating gas usage. - Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) - // GetTx fetches a tx by hash. - GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) - // BroadcastTx broadcast transaction. - BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error) - // GetTxsEvent fetches txs by event. - GetTxsEvent(ctx context.Context, in *GetTxsEventRequest, opts ...grpc.CallOption) (*GetTxsEventResponse, error) - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: cosmos-sdk 0.45.2 - GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) -} - -type serviceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) { - out := new(SimulateResponse) - err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/Simulate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) { - out := new(GetTxResponse) - err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error) { - out := new(BroadcastTxResponse) - err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/BroadcastTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetTxsEvent(ctx context.Context, in *GetTxsEventRequest, opts ...grpc.CallOption) (*GetTxsEventResponse, error) { - out := new(GetTxsEventResponse) - err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetTxsEvent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) { - out := new(GetBlockWithTxsResponse) - err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetBlockWithTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceServer is the server API for Service service. -// All implementations must embed UnimplementedServiceServer -// for forward compatibility -type ServiceServer interface { - // Simulate simulates executing a transaction for estimating gas usage. - Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error) - // GetTx fetches a tx by hash. - GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) - // BroadcastTx broadcast transaction. - BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error) - // GetTxsEvent fetches txs by event. - GetTxsEvent(context.Context, *GetTxsEventRequest) (*GetTxsEventResponse, error) - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: cosmos-sdk 0.45.2 - GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) - mustEmbedUnimplementedServiceServer() -} - -// UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (UnimplementedServiceServer) Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Simulate not implemented") -} -func (UnimplementedServiceServer) GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTx not implemented") -} -func (UnimplementedServiceServer) BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") -} -func (UnimplementedServiceServer) GetTxsEvent(context.Context, *GetTxsEventRequest) (*GetTxsEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTxsEvent not implemented") -} -func (UnimplementedServiceServer) GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockWithTxs not implemented") -} -func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} - -// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceServer will -// result in compilation errors. -type UnsafeServiceServer interface { - mustEmbedUnimplementedServiceServer() -} - -func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&Service_ServiceDesc, srv) -} - -func _Service_Simulate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimulateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).Simulate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.tx.v1beta1.Service/Simulate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).Simulate(ctx, req.(*SimulateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.tx.v1beta1.Service/GetTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetTx(ctx, req.(*GetTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).BroadcastTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.tx.v1beta1.Service/BroadcastTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).BroadcastTx(ctx, req.(*BroadcastTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetTxsEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTxsEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetTxsEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.tx.v1beta1.Service/GetTxsEvent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetTxsEvent(ctx, req.(*GetTxsEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetBlockWithTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockWithTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockWithTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.tx.v1beta1.Service/GetBlockWithTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockWithTxs(ctx, req.(*GetBlockWithTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Service_ServiceDesc is the grpc.ServiceDesc for Service service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.tx.v1beta1.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Simulate", - Handler: _Service_Simulate_Handler, - }, - { - MethodName: "GetTx", - Handler: _Service_GetTx_Handler, - }, - { - MethodName: "BroadcastTx", - Handler: _Service_BroadcastTx_Handler, - }, - { - MethodName: "GetTxsEvent", - Handler: _Service_GetTxsEvent_Handler, - }, - { - MethodName: "GetBlockWithTxs", - Handler: _Service_GetBlockWithTxs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/tx/v1beta1/service.proto", -} diff --git a/api/cosmos/tx/v1beta1/tx.pulsar.go b/api/cosmos/tx/v1beta1/tx.pulsar.go deleted file mode 100644 index d39c5e6efe46..000000000000 --- a/api/cosmos/tx/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,9378 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package txv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta12 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - v1beta11 "github.com/cosmos/cosmos-sdk/api/cosmos/crypto/multisig/v1beta1" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/tx/signing/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 _ protoreflect.List = (*_Tx_3_list)(nil) - -type _Tx_3_list struct { - list *[][]byte -} - -func (x *_Tx_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Tx_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_Tx_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Tx_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Tx_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Tx at list field Signatures as it is not of Message kind")) -} - -func (x *_Tx_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Tx_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_Tx_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Tx protoreflect.MessageDescriptor - fd_Tx_body protoreflect.FieldDescriptor - fd_Tx_auth_info protoreflect.FieldDescriptor - fd_Tx_signatures protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_Tx = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("Tx") - fd_Tx_body = md_Tx.Fields().ByName("body") - fd_Tx_auth_info = md_Tx.Fields().ByName("auth_info") - fd_Tx_signatures = md_Tx.Fields().ByName("signatures") -} - -var _ protoreflect.Message = (*fastReflection_Tx)(nil) - -type fastReflection_Tx Tx - -func (x *Tx) ProtoReflect() protoreflect.Message { - return (*fastReflection_Tx)(x) -} - -func (x *Tx) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Tx_messageType fastReflection_Tx_messageType -var _ protoreflect.MessageType = fastReflection_Tx_messageType{} - -type fastReflection_Tx_messageType struct{} - -func (x fastReflection_Tx_messageType) Zero() protoreflect.Message { - return (*fastReflection_Tx)(nil) -} -func (x fastReflection_Tx_messageType) New() protoreflect.Message { - return new(fastReflection_Tx) -} -func (x fastReflection_Tx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Tx -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Tx) Descriptor() protoreflect.MessageDescriptor { - return md_Tx -} - -// 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_Tx) Type() protoreflect.MessageType { - return _fastReflection_Tx_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Tx) New() protoreflect.Message { - return new(fastReflection_Tx) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Tx) Interface() protoreflect.ProtoMessage { - return (*Tx)(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_Tx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Body != nil { - value := protoreflect.ValueOfMessage(x.Body.ProtoReflect()) - if !f(fd_Tx_body, value) { - return - } - } - if x.AuthInfo != nil { - value := protoreflect.ValueOfMessage(x.AuthInfo.ProtoReflect()) - if !f(fd_Tx_auth_info, value) { - return - } - } - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_Tx_3_list{list: &x.Signatures}) - if !f(fd_Tx_signatures, 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_Tx) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tx.body": - return x.Body != nil - case "cosmos.tx.v1beta1.Tx.auth_info": - return x.AuthInfo != nil - case "cosmos.tx.v1beta1.Tx.signatures": - return len(x.Signatures) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tx")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tx 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_Tx) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tx.body": - x.Body = nil - case "cosmos.tx.v1beta1.Tx.auth_info": - x.AuthInfo = nil - case "cosmos.tx.v1beta1.Tx.signatures": - x.Signatures = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tx")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tx 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_Tx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.Tx.body": - value := x.Body - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.Tx.auth_info": - value := x.AuthInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.Tx.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_Tx_3_list{}) - } - listValue := &_Tx_3_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tx")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tx 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_Tx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tx.body": - x.Body = value.Message().Interface().(*TxBody) - case "cosmos.tx.v1beta1.Tx.auth_info": - x.AuthInfo = value.Message().Interface().(*AuthInfo) - case "cosmos.tx.v1beta1.Tx.signatures": - lv := value.List() - clv := lv.(*_Tx_3_list) - x.Signatures = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tx")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tx 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_Tx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tx.body": - if x.Body == nil { - x.Body = new(TxBody) - } - return protoreflect.ValueOfMessage(x.Body.ProtoReflect()) - case "cosmos.tx.v1beta1.Tx.auth_info": - if x.AuthInfo == nil { - x.AuthInfo = new(AuthInfo) - } - return protoreflect.ValueOfMessage(x.AuthInfo.ProtoReflect()) - case "cosmos.tx.v1beta1.Tx.signatures": - if x.Signatures == nil { - x.Signatures = [][]byte{} - } - value := &_Tx_3_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tx")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tx 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_Tx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tx.body": - m := new(TxBody) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.Tx.auth_info": - m := new(AuthInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.Tx.signatures": - list := [][]byte{} - return protoreflect.ValueOfList(&_Tx_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tx")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tx 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_Tx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.Tx", 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_Tx) 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_Tx) 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_Tx) 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_Tx) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Tx) - 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.Body != nil { - l = options.Size(x.Body) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AuthInfo != nil { - l = options.Size(x.AuthInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Signatures) > 0 { - for _, b := range x.Signatures { - l = len(b) - 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().(*Tx) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Signatures[iNdEx]) - copy(dAtA[i:], x.Signatures[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signatures[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if x.AuthInfo != nil { - encoded, err := options.Marshal(x.AuthInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Body != nil { - encoded, err := options.Marshal(x.Body) - 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().(*Tx) - 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: Tx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tx: 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 Body", 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.Body == nil { - x.Body = &TxBody{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Body); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", 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.AuthInfo == nil { - x.AuthInfo = &AuthInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AuthInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, make([]byte, postIndex-iNdEx)) - copy(x.Signatures[len(x.Signatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TxRaw_3_list)(nil) - -type _TxRaw_3_list struct { - list *[][]byte -} - -func (x *_TxRaw_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxRaw_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_TxRaw_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_TxRaw_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxRaw_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message TxRaw at list field Signatures as it is not of Message kind")) -} - -func (x *_TxRaw_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_TxRaw_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_TxRaw_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TxRaw protoreflect.MessageDescriptor - fd_TxRaw_body_bytes protoreflect.FieldDescriptor - fd_TxRaw_auth_info_bytes protoreflect.FieldDescriptor - fd_TxRaw_signatures protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_TxRaw = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("TxRaw") - fd_TxRaw_body_bytes = md_TxRaw.Fields().ByName("body_bytes") - fd_TxRaw_auth_info_bytes = md_TxRaw.Fields().ByName("auth_info_bytes") - fd_TxRaw_signatures = md_TxRaw.Fields().ByName("signatures") -} - -var _ protoreflect.Message = (*fastReflection_TxRaw)(nil) - -type fastReflection_TxRaw TxRaw - -func (x *TxRaw) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxRaw)(x) -} - -func (x *TxRaw) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TxRaw_messageType fastReflection_TxRaw_messageType -var _ protoreflect.MessageType = fastReflection_TxRaw_messageType{} - -type fastReflection_TxRaw_messageType struct{} - -func (x fastReflection_TxRaw_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxRaw)(nil) -} -func (x fastReflection_TxRaw_messageType) New() protoreflect.Message { - return new(fastReflection_TxRaw) -} -func (x fastReflection_TxRaw_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxRaw -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxRaw) Descriptor() protoreflect.MessageDescriptor { - return md_TxRaw -} - -// 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_TxRaw) Type() protoreflect.MessageType { - return _fastReflection_TxRaw_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxRaw) New() protoreflect.Message { - return new(fastReflection_TxRaw) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxRaw) Interface() protoreflect.ProtoMessage { - return (*TxRaw)(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_TxRaw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BodyBytes) != 0 { - value := protoreflect.ValueOfBytes(x.BodyBytes) - if !f(fd_TxRaw_body_bytes, value) { - return - } - } - if len(x.AuthInfoBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AuthInfoBytes) - if !f(fd_TxRaw_auth_info_bytes, value) { - return - } - } - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_TxRaw_3_list{list: &x.Signatures}) - if !f(fd_TxRaw_signatures, 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_TxRaw) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxRaw.body_bytes": - return len(x.BodyBytes) != 0 - case "cosmos.tx.v1beta1.TxRaw.auth_info_bytes": - return len(x.AuthInfoBytes) != 0 - case "cosmos.tx.v1beta1.TxRaw.signatures": - return len(x.Signatures) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxRaw")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxRaw 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_TxRaw) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxRaw.body_bytes": - x.BodyBytes = nil - case "cosmos.tx.v1beta1.TxRaw.auth_info_bytes": - x.AuthInfoBytes = nil - case "cosmos.tx.v1beta1.TxRaw.signatures": - x.Signatures = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxRaw")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxRaw 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_TxRaw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.TxRaw.body_bytes": - value := x.BodyBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.tx.v1beta1.TxRaw.auth_info_bytes": - value := x.AuthInfoBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.tx.v1beta1.TxRaw.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_TxRaw_3_list{}) - } - listValue := &_TxRaw_3_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxRaw")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxRaw 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_TxRaw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxRaw.body_bytes": - x.BodyBytes = value.Bytes() - case "cosmos.tx.v1beta1.TxRaw.auth_info_bytes": - x.AuthInfoBytes = value.Bytes() - case "cosmos.tx.v1beta1.TxRaw.signatures": - lv := value.List() - clv := lv.(*_TxRaw_3_list) - x.Signatures = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxRaw")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxRaw 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_TxRaw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxRaw.signatures": - if x.Signatures == nil { - x.Signatures = [][]byte{} - } - value := &_TxRaw_3_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.TxRaw.body_bytes": - panic(fmt.Errorf("field body_bytes of message cosmos.tx.v1beta1.TxRaw is not mutable")) - case "cosmos.tx.v1beta1.TxRaw.auth_info_bytes": - panic(fmt.Errorf("field auth_info_bytes of message cosmos.tx.v1beta1.TxRaw is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxRaw")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxRaw 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_TxRaw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxRaw.body_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.tx.v1beta1.TxRaw.auth_info_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.tx.v1beta1.TxRaw.signatures": - list := [][]byte{} - return protoreflect.ValueOfList(&_TxRaw_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxRaw")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxRaw 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_TxRaw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.TxRaw", 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_TxRaw) 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_TxRaw) 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_TxRaw) 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_TxRaw) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxRaw) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.BodyBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AuthInfoBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Signatures) > 0 { - for _, b := range x.Signatures { - l = len(b) - 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().(*TxRaw) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Signatures[iNdEx]) - copy(dAtA[i:], x.Signatures[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signatures[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.AuthInfoBytes) > 0 { - i -= len(x.AuthInfoBytes) - copy(dAtA[i:], x.AuthInfoBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthInfoBytes))) - i-- - dAtA[i] = 0x12 - } - if len(x.BodyBytes) > 0 { - i -= len(x.BodyBytes) - copy(dAtA[i:], x.BodyBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BodyBytes))) - 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().(*TxRaw) - 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: TxRaw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxRaw: 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 BodyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BodyBytes = append(x.BodyBytes[:0], dAtA[iNdEx:postIndex]...) - if x.BodyBytes == nil { - x.BodyBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthInfoBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AuthInfoBytes = append(x.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AuthInfoBytes == nil { - x.AuthInfoBytes = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, make([]byte, postIndex-iNdEx)) - copy(x.Signatures[len(x.Signatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SignDoc protoreflect.MessageDescriptor - fd_SignDoc_body_bytes protoreflect.FieldDescriptor - fd_SignDoc_auth_info_bytes protoreflect.FieldDescriptor - fd_SignDoc_chain_id protoreflect.FieldDescriptor - fd_SignDoc_account_number protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_SignDoc = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("SignDoc") - fd_SignDoc_body_bytes = md_SignDoc.Fields().ByName("body_bytes") - fd_SignDoc_auth_info_bytes = md_SignDoc.Fields().ByName("auth_info_bytes") - fd_SignDoc_chain_id = md_SignDoc.Fields().ByName("chain_id") - fd_SignDoc_account_number = md_SignDoc.Fields().ByName("account_number") -} - -var _ protoreflect.Message = (*fastReflection_SignDoc)(nil) - -type fastReflection_SignDoc SignDoc - -func (x *SignDoc) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignDoc)(x) -} - -func (x *SignDoc) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignDoc_messageType fastReflection_SignDoc_messageType -var _ protoreflect.MessageType = fastReflection_SignDoc_messageType{} - -type fastReflection_SignDoc_messageType struct{} - -func (x fastReflection_SignDoc_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignDoc)(nil) -} -func (x fastReflection_SignDoc_messageType) New() protoreflect.Message { - return new(fastReflection_SignDoc) -} -func (x fastReflection_SignDoc_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignDoc -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignDoc) Descriptor() protoreflect.MessageDescriptor { - return md_SignDoc -} - -// 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_SignDoc) Type() protoreflect.MessageType { - return _fastReflection_SignDoc_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignDoc) New() protoreflect.Message { - return new(fastReflection_SignDoc) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignDoc) Interface() protoreflect.ProtoMessage { - return (*SignDoc)(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_SignDoc) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BodyBytes) != 0 { - value := protoreflect.ValueOfBytes(x.BodyBytes) - if !f(fd_SignDoc_body_bytes, value) { - return - } - } - if len(x.AuthInfoBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AuthInfoBytes) - if !f(fd_SignDoc_auth_info_bytes, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_SignDoc_chain_id, value) { - return - } - } - if x.AccountNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.AccountNumber) - if !f(fd_SignDoc_account_number, 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_SignDoc) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDoc.body_bytes": - return len(x.BodyBytes) != 0 - case "cosmos.tx.v1beta1.SignDoc.auth_info_bytes": - return len(x.AuthInfoBytes) != 0 - case "cosmos.tx.v1beta1.SignDoc.chain_id": - return x.ChainId != "" - case "cosmos.tx.v1beta1.SignDoc.account_number": - return x.AccountNumber != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDoc")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDoc 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_SignDoc) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDoc.body_bytes": - x.BodyBytes = nil - case "cosmos.tx.v1beta1.SignDoc.auth_info_bytes": - x.AuthInfoBytes = nil - case "cosmos.tx.v1beta1.SignDoc.chain_id": - x.ChainId = "" - case "cosmos.tx.v1beta1.SignDoc.account_number": - x.AccountNumber = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDoc")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDoc 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_SignDoc) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.SignDoc.body_bytes": - value := x.BodyBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.tx.v1beta1.SignDoc.auth_info_bytes": - value := x.AuthInfoBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.tx.v1beta1.SignDoc.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "cosmos.tx.v1beta1.SignDoc.account_number": - value := x.AccountNumber - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDoc")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDoc 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_SignDoc) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDoc.body_bytes": - x.BodyBytes = value.Bytes() - case "cosmos.tx.v1beta1.SignDoc.auth_info_bytes": - x.AuthInfoBytes = value.Bytes() - case "cosmos.tx.v1beta1.SignDoc.chain_id": - x.ChainId = value.Interface().(string) - case "cosmos.tx.v1beta1.SignDoc.account_number": - x.AccountNumber = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDoc")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDoc 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_SignDoc) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDoc.body_bytes": - panic(fmt.Errorf("field body_bytes of message cosmos.tx.v1beta1.SignDoc is not mutable")) - case "cosmos.tx.v1beta1.SignDoc.auth_info_bytes": - panic(fmt.Errorf("field auth_info_bytes of message cosmos.tx.v1beta1.SignDoc is not mutable")) - case "cosmos.tx.v1beta1.SignDoc.chain_id": - panic(fmt.Errorf("field chain_id of message cosmos.tx.v1beta1.SignDoc is not mutable")) - case "cosmos.tx.v1beta1.SignDoc.account_number": - panic(fmt.Errorf("field account_number of message cosmos.tx.v1beta1.SignDoc is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDoc")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDoc 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_SignDoc) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDoc.body_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.tx.v1beta1.SignDoc.auth_info_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.tx.v1beta1.SignDoc.chain_id": - return protoreflect.ValueOfString("") - case "cosmos.tx.v1beta1.SignDoc.account_number": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDoc")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDoc 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_SignDoc) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.SignDoc", 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_SignDoc) 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_SignDoc) 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_SignDoc) 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_SignDoc) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignDoc) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.BodyBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AuthInfoBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AccountNumber != 0 { - n += 1 + runtime.Sov(uint64(x.AccountNumber)) - } - 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().(*SignDoc) - 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.AccountNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) - i-- - dAtA[i] = 0x20 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x1a - } - if len(x.AuthInfoBytes) > 0 { - i -= len(x.AuthInfoBytes) - copy(dAtA[i:], x.AuthInfoBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthInfoBytes))) - i-- - dAtA[i] = 0x12 - } - if len(x.BodyBytes) > 0 { - i -= len(x.BodyBytes) - copy(dAtA[i:], x.BodyBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BodyBytes))) - 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().(*SignDoc) - 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: SignDoc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignDoc: 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 BodyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BodyBytes = append(x.BodyBytes[:0], dAtA[iNdEx:postIndex]...) - if x.BodyBytes == nil { - x.BodyBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthInfoBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AuthInfoBytes = append(x.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AuthInfoBytes == nil { - x.AuthInfoBytes = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - x.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SignDocDirectAux protoreflect.MessageDescriptor - fd_SignDocDirectAux_body_bytes protoreflect.FieldDescriptor - fd_SignDocDirectAux_public_key protoreflect.FieldDescriptor - fd_SignDocDirectAux_chain_id protoreflect.FieldDescriptor - fd_SignDocDirectAux_account_number protoreflect.FieldDescriptor - fd_SignDocDirectAux_sequence protoreflect.FieldDescriptor - fd_SignDocDirectAux_tip protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_SignDocDirectAux = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("SignDocDirectAux") - fd_SignDocDirectAux_body_bytes = md_SignDocDirectAux.Fields().ByName("body_bytes") - fd_SignDocDirectAux_public_key = md_SignDocDirectAux.Fields().ByName("public_key") - fd_SignDocDirectAux_chain_id = md_SignDocDirectAux.Fields().ByName("chain_id") - fd_SignDocDirectAux_account_number = md_SignDocDirectAux.Fields().ByName("account_number") - fd_SignDocDirectAux_sequence = md_SignDocDirectAux.Fields().ByName("sequence") - fd_SignDocDirectAux_tip = md_SignDocDirectAux.Fields().ByName("tip") -} - -var _ protoreflect.Message = (*fastReflection_SignDocDirectAux)(nil) - -type fastReflection_SignDocDirectAux SignDocDirectAux - -func (x *SignDocDirectAux) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignDocDirectAux)(x) -} - -func (x *SignDocDirectAux) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignDocDirectAux_messageType fastReflection_SignDocDirectAux_messageType -var _ protoreflect.MessageType = fastReflection_SignDocDirectAux_messageType{} - -type fastReflection_SignDocDirectAux_messageType struct{} - -func (x fastReflection_SignDocDirectAux_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignDocDirectAux)(nil) -} -func (x fastReflection_SignDocDirectAux_messageType) New() protoreflect.Message { - return new(fastReflection_SignDocDirectAux) -} -func (x fastReflection_SignDocDirectAux_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignDocDirectAux -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignDocDirectAux) Descriptor() protoreflect.MessageDescriptor { - return md_SignDocDirectAux -} - -// 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_SignDocDirectAux) Type() protoreflect.MessageType { - return _fastReflection_SignDocDirectAux_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignDocDirectAux) New() protoreflect.Message { - return new(fastReflection_SignDocDirectAux) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignDocDirectAux) Interface() protoreflect.ProtoMessage { - return (*SignDocDirectAux)(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_SignDocDirectAux) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BodyBytes) != 0 { - value := protoreflect.ValueOfBytes(x.BodyBytes) - if !f(fd_SignDocDirectAux_body_bytes, value) { - return - } - } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_SignDocDirectAux_public_key, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_SignDocDirectAux_chain_id, value) { - return - } - } - if x.AccountNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.AccountNumber) - if !f(fd_SignDocDirectAux_account_number, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_SignDocDirectAux_sequence, value) { - return - } - } - if x.Tip != nil { - value := protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) - if !f(fd_SignDocDirectAux_tip, 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_SignDocDirectAux) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDocDirectAux.body_bytes": - return len(x.BodyBytes) != 0 - case "cosmos.tx.v1beta1.SignDocDirectAux.public_key": - return x.PublicKey != nil - case "cosmos.tx.v1beta1.SignDocDirectAux.chain_id": - return x.ChainId != "" - case "cosmos.tx.v1beta1.SignDocDirectAux.account_number": - return x.AccountNumber != uint64(0) - case "cosmos.tx.v1beta1.SignDocDirectAux.sequence": - return x.Sequence != uint64(0) - case "cosmos.tx.v1beta1.SignDocDirectAux.tip": - return x.Tip != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDocDirectAux")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDocDirectAux 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_SignDocDirectAux) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDocDirectAux.body_bytes": - x.BodyBytes = nil - case "cosmos.tx.v1beta1.SignDocDirectAux.public_key": - x.PublicKey = nil - case "cosmos.tx.v1beta1.SignDocDirectAux.chain_id": - x.ChainId = "" - case "cosmos.tx.v1beta1.SignDocDirectAux.account_number": - x.AccountNumber = uint64(0) - case "cosmos.tx.v1beta1.SignDocDirectAux.sequence": - x.Sequence = uint64(0) - case "cosmos.tx.v1beta1.SignDocDirectAux.tip": - x.Tip = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDocDirectAux")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDocDirectAux 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_SignDocDirectAux) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.SignDocDirectAux.body_bytes": - value := x.BodyBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.tx.v1beta1.SignDocDirectAux.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.SignDocDirectAux.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "cosmos.tx.v1beta1.SignDocDirectAux.account_number": - value := x.AccountNumber - return protoreflect.ValueOfUint64(value) - case "cosmos.tx.v1beta1.SignDocDirectAux.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - case "cosmos.tx.v1beta1.SignDocDirectAux.tip": - value := x.Tip - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDocDirectAux")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDocDirectAux 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_SignDocDirectAux) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDocDirectAux.body_bytes": - x.BodyBytes = value.Bytes() - case "cosmos.tx.v1beta1.SignDocDirectAux.public_key": - x.PublicKey = value.Message().Interface().(*anypb.Any) - case "cosmos.tx.v1beta1.SignDocDirectAux.chain_id": - x.ChainId = value.Interface().(string) - case "cosmos.tx.v1beta1.SignDocDirectAux.account_number": - x.AccountNumber = value.Uint() - case "cosmos.tx.v1beta1.SignDocDirectAux.sequence": - x.Sequence = value.Uint() - case "cosmos.tx.v1beta1.SignDocDirectAux.tip": - x.Tip = value.Message().Interface().(*Tip) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDocDirectAux")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDocDirectAux 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_SignDocDirectAux) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDocDirectAux.public_key": - if x.PublicKey == nil { - x.PublicKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "cosmos.tx.v1beta1.SignDocDirectAux.tip": - if x.Tip == nil { - x.Tip = new(Tip) - } - return protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) - case "cosmos.tx.v1beta1.SignDocDirectAux.body_bytes": - panic(fmt.Errorf("field body_bytes of message cosmos.tx.v1beta1.SignDocDirectAux is not mutable")) - case "cosmos.tx.v1beta1.SignDocDirectAux.chain_id": - panic(fmt.Errorf("field chain_id of message cosmos.tx.v1beta1.SignDocDirectAux is not mutable")) - case "cosmos.tx.v1beta1.SignDocDirectAux.account_number": - panic(fmt.Errorf("field account_number of message cosmos.tx.v1beta1.SignDocDirectAux is not mutable")) - case "cosmos.tx.v1beta1.SignDocDirectAux.sequence": - panic(fmt.Errorf("field sequence of message cosmos.tx.v1beta1.SignDocDirectAux is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDocDirectAux")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDocDirectAux 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_SignDocDirectAux) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignDocDirectAux.body_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.tx.v1beta1.SignDocDirectAux.public_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.SignDocDirectAux.chain_id": - return protoreflect.ValueOfString("") - case "cosmos.tx.v1beta1.SignDocDirectAux.account_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.tx.v1beta1.SignDocDirectAux.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.tx.v1beta1.SignDocDirectAux.tip": - m := new(Tip) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignDocDirectAux")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignDocDirectAux 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_SignDocDirectAux) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.SignDocDirectAux", 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_SignDocDirectAux) 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_SignDocDirectAux) 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_SignDocDirectAux) 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_SignDocDirectAux) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignDocDirectAux) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.BodyBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AccountNumber != 0 { - n += 1 + runtime.Sov(uint64(x.AccountNumber)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - if x.Tip != nil { - l = options.Size(x.Tip) - 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().(*SignDocDirectAux) - 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.Tip != nil { - encoded, err := options.Marshal(x.Tip) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x28 - } - if x.AccountNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) - i-- - dAtA[i] = 0x20 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x1a - } - if x.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.BodyBytes) > 0 { - i -= len(x.BodyBytes) - copy(dAtA[i:], x.BodyBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BodyBytes))) - 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().(*SignDocDirectAux) - 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: SignDocDirectAux: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignDocDirectAux: 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 BodyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BodyBytes = append(x.BodyBytes[:0], dAtA[iNdEx:postIndex]...) - if x.BodyBytes == nil { - x.BodyBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { - x.PublicKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - x.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tip", 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.Tip == nil { - x.Tip = &Tip{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tip); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TxBody_1_list)(nil) - -type _TxBody_1_list struct { - list *[]*anypb.Any -} - -func (x *_TxBody_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxBody_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxBody_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TxBody_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxBody_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxBody_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxBody_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxBody_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TxBody_1023_list)(nil) - -type _TxBody_1023_list struct { - list *[]*anypb.Any -} - -func (x *_TxBody_1023_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxBody_1023_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxBody_1023_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TxBody_1023_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxBody_1023_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxBody_1023_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxBody_1023_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxBody_1023_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TxBody_2047_list)(nil) - -type _TxBody_2047_list struct { - list *[]*anypb.Any -} - -func (x *_TxBody_2047_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TxBody_2047_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TxBody_2047_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TxBody_2047_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TxBody_2047_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxBody_2047_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TxBody_2047_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TxBody_2047_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TxBody protoreflect.MessageDescriptor - fd_TxBody_messages protoreflect.FieldDescriptor - fd_TxBody_memo protoreflect.FieldDescriptor - fd_TxBody_timeout_height protoreflect.FieldDescriptor - fd_TxBody_extension_options protoreflect.FieldDescriptor - fd_TxBody_non_critical_extension_options protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_TxBody = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("TxBody") - fd_TxBody_messages = md_TxBody.Fields().ByName("messages") - fd_TxBody_memo = md_TxBody.Fields().ByName("memo") - fd_TxBody_timeout_height = md_TxBody.Fields().ByName("timeout_height") - fd_TxBody_extension_options = md_TxBody.Fields().ByName("extension_options") - fd_TxBody_non_critical_extension_options = md_TxBody.Fields().ByName("non_critical_extension_options") -} - -var _ protoreflect.Message = (*fastReflection_TxBody)(nil) - -type fastReflection_TxBody TxBody - -func (x *TxBody) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxBody)(x) -} - -func (x *TxBody) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TxBody_messageType fastReflection_TxBody_messageType -var _ protoreflect.MessageType = fastReflection_TxBody_messageType{} - -type fastReflection_TxBody_messageType struct{} - -func (x fastReflection_TxBody_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxBody)(nil) -} -func (x fastReflection_TxBody_messageType) New() protoreflect.Message { - return new(fastReflection_TxBody) -} -func (x fastReflection_TxBody_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxBody -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxBody) Descriptor() protoreflect.MessageDescriptor { - return md_TxBody -} - -// 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_TxBody) Type() protoreflect.MessageType { - return _fastReflection_TxBody_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxBody) New() protoreflect.Message { - return new(fastReflection_TxBody) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxBody) Interface() protoreflect.ProtoMessage { - return (*TxBody)(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_TxBody) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Messages) != 0 { - value := protoreflect.ValueOfList(&_TxBody_1_list{list: &x.Messages}) - if !f(fd_TxBody_messages, value) { - return - } - } - if x.Memo != "" { - value := protoreflect.ValueOfString(x.Memo) - if !f(fd_TxBody_memo, value) { - return - } - } - if x.TimeoutHeight != uint64(0) { - value := protoreflect.ValueOfUint64(x.TimeoutHeight) - if !f(fd_TxBody_timeout_height, value) { - return - } - } - if len(x.ExtensionOptions) != 0 { - value := protoreflect.ValueOfList(&_TxBody_1023_list{list: &x.ExtensionOptions}) - if !f(fd_TxBody_extension_options, value) { - return - } - } - if len(x.NonCriticalExtensionOptions) != 0 { - value := protoreflect.ValueOfList(&_TxBody_2047_list{list: &x.NonCriticalExtensionOptions}) - if !f(fd_TxBody_non_critical_extension_options, 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_TxBody) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxBody.messages": - return len(x.Messages) != 0 - case "cosmos.tx.v1beta1.TxBody.memo": - return x.Memo != "" - case "cosmos.tx.v1beta1.TxBody.timeout_height": - return x.TimeoutHeight != uint64(0) - case "cosmos.tx.v1beta1.TxBody.extension_options": - return len(x.ExtensionOptions) != 0 - case "cosmos.tx.v1beta1.TxBody.non_critical_extension_options": - return len(x.NonCriticalExtensionOptions) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxBody")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxBody 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_TxBody) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxBody.messages": - x.Messages = nil - case "cosmos.tx.v1beta1.TxBody.memo": - x.Memo = "" - case "cosmos.tx.v1beta1.TxBody.timeout_height": - x.TimeoutHeight = uint64(0) - case "cosmos.tx.v1beta1.TxBody.extension_options": - x.ExtensionOptions = nil - case "cosmos.tx.v1beta1.TxBody.non_critical_extension_options": - x.NonCriticalExtensionOptions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxBody")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxBody 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_TxBody) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.TxBody.messages": - if len(x.Messages) == 0 { - return protoreflect.ValueOfList(&_TxBody_1_list{}) - } - listValue := &_TxBody_1_list{list: &x.Messages} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.TxBody.memo": - value := x.Memo - return protoreflect.ValueOfString(value) - case "cosmos.tx.v1beta1.TxBody.timeout_height": - value := x.TimeoutHeight - return protoreflect.ValueOfUint64(value) - case "cosmos.tx.v1beta1.TxBody.extension_options": - if len(x.ExtensionOptions) == 0 { - return protoreflect.ValueOfList(&_TxBody_1023_list{}) - } - listValue := &_TxBody_1023_list{list: &x.ExtensionOptions} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.TxBody.non_critical_extension_options": - if len(x.NonCriticalExtensionOptions) == 0 { - return protoreflect.ValueOfList(&_TxBody_2047_list{}) - } - listValue := &_TxBody_2047_list{list: &x.NonCriticalExtensionOptions} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxBody")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxBody 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_TxBody) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxBody.messages": - lv := value.List() - clv := lv.(*_TxBody_1_list) - x.Messages = *clv.list - case "cosmos.tx.v1beta1.TxBody.memo": - x.Memo = value.Interface().(string) - case "cosmos.tx.v1beta1.TxBody.timeout_height": - x.TimeoutHeight = value.Uint() - case "cosmos.tx.v1beta1.TxBody.extension_options": - lv := value.List() - clv := lv.(*_TxBody_1023_list) - x.ExtensionOptions = *clv.list - case "cosmos.tx.v1beta1.TxBody.non_critical_extension_options": - lv := value.List() - clv := lv.(*_TxBody_2047_list) - x.NonCriticalExtensionOptions = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxBody")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxBody 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_TxBody) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxBody.messages": - if x.Messages == nil { - x.Messages = []*anypb.Any{} - } - value := &_TxBody_1_list{list: &x.Messages} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.TxBody.extension_options": - if x.ExtensionOptions == nil { - x.ExtensionOptions = []*anypb.Any{} - } - value := &_TxBody_1023_list{list: &x.ExtensionOptions} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.TxBody.non_critical_extension_options": - if x.NonCriticalExtensionOptions == nil { - x.NonCriticalExtensionOptions = []*anypb.Any{} - } - value := &_TxBody_2047_list{list: &x.NonCriticalExtensionOptions} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.TxBody.memo": - panic(fmt.Errorf("field memo of message cosmos.tx.v1beta1.TxBody is not mutable")) - case "cosmos.tx.v1beta1.TxBody.timeout_height": - panic(fmt.Errorf("field timeout_height of message cosmos.tx.v1beta1.TxBody is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxBody")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxBody 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_TxBody) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.TxBody.messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TxBody_1_list{list: &list}) - case "cosmos.tx.v1beta1.TxBody.memo": - return protoreflect.ValueOfString("") - case "cosmos.tx.v1beta1.TxBody.timeout_height": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.tx.v1beta1.TxBody.extension_options": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TxBody_1023_list{list: &list}) - case "cosmos.tx.v1beta1.TxBody.non_critical_extension_options": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TxBody_2047_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxBody")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.TxBody 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_TxBody) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.TxBody", 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_TxBody) 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_TxBody) 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_TxBody) 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_TxBody) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxBody) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Messages) > 0 { - for _, e := range x.Messages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Memo) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TimeoutHeight != 0 { - n += 1 + runtime.Sov(uint64(x.TimeoutHeight)) - } - if len(x.ExtensionOptions) > 0 { - for _, e := range x.ExtensionOptions { - l = options.Size(e) - n += 2 + l + runtime.Sov(uint64(l)) - } - } - if len(x.NonCriticalExtensionOptions) > 0 { - for _, e := range x.NonCriticalExtensionOptions { - l = options.Size(e) - n += 2 + 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().(*TxBody) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NonCriticalExtensionOptions) > 0 { - for iNdEx := len(x.NonCriticalExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.NonCriticalExtensionOptions[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] = 0x7f - i-- - dAtA[i] = 0xfa - } - } - if len(x.ExtensionOptions) > 0 { - for iNdEx := len(x.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExtensionOptions[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] = 0x3f - i-- - dAtA[i] = 0xfa - } - } - if x.TimeoutHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TimeoutHeight)) - i-- - dAtA[i] = 0x18 - } - if len(x.Memo) > 0 { - i -= len(x.Memo) - copy(dAtA[i:], x.Memo) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Memo))) - i-- - dAtA[i] = 0x12 - } - if len(x.Messages) > 0 { - for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Messages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TxBody) - 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: TxBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxBody: 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 Messages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Messages = append(x.Messages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Memo", 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.Memo = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) - } - x.TimeoutHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TimeoutHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 1023: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExtensionOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ExtensionOptions = append(x.ExtensionOptions, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExtensionOptions[len(x.ExtensionOptions)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2047: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonCriticalExtensionOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NonCriticalExtensionOptions = append(x.NonCriticalExtensionOptions, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NonCriticalExtensionOptions[len(x.NonCriticalExtensionOptions)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_AuthInfo_1_list)(nil) - -type _AuthInfo_1_list struct { - list *[]*SignerInfo -} - -func (x *_AuthInfo_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_AuthInfo_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_AuthInfo_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignerInfo) - (*x.list)[i] = concreteValue -} - -func (x *_AuthInfo_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignerInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_AuthInfo_1_list) AppendMutable() protoreflect.Value { - v := new(SignerInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_AuthInfo_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_AuthInfo_1_list) NewElement() protoreflect.Value { - v := new(SignerInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_AuthInfo_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_AuthInfo protoreflect.MessageDescriptor - fd_AuthInfo_signer_infos protoreflect.FieldDescriptor - fd_AuthInfo_fee protoreflect.FieldDescriptor - fd_AuthInfo_tip protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_AuthInfo = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("AuthInfo") - fd_AuthInfo_signer_infos = md_AuthInfo.Fields().ByName("signer_infos") - fd_AuthInfo_fee = md_AuthInfo.Fields().ByName("fee") - fd_AuthInfo_tip = md_AuthInfo.Fields().ByName("tip") -} - -var _ protoreflect.Message = (*fastReflection_AuthInfo)(nil) - -type fastReflection_AuthInfo AuthInfo - -func (x *AuthInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_AuthInfo)(x) -} - -func (x *AuthInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AuthInfo_messageType fastReflection_AuthInfo_messageType -var _ protoreflect.MessageType = fastReflection_AuthInfo_messageType{} - -type fastReflection_AuthInfo_messageType struct{} - -func (x fastReflection_AuthInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_AuthInfo)(nil) -} -func (x fastReflection_AuthInfo_messageType) New() protoreflect.Message { - return new(fastReflection_AuthInfo) -} -func (x fastReflection_AuthInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AuthInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AuthInfo) Descriptor() protoreflect.MessageDescriptor { - return md_AuthInfo -} - -// 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_AuthInfo) Type() protoreflect.MessageType { - return _fastReflection_AuthInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AuthInfo) New() protoreflect.Message { - return new(fastReflection_AuthInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AuthInfo) Interface() protoreflect.ProtoMessage { - return (*AuthInfo)(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_AuthInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SignerInfos) != 0 { - value := protoreflect.ValueOfList(&_AuthInfo_1_list{list: &x.SignerInfos}) - if !f(fd_AuthInfo_signer_infos, value) { - return - } - } - if x.Fee != nil { - value := protoreflect.ValueOfMessage(x.Fee.ProtoReflect()) - if !f(fd_AuthInfo_fee, value) { - return - } - } - if x.Tip != nil { - value := protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) - if !f(fd_AuthInfo_tip, 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_AuthInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuthInfo.signer_infos": - return len(x.SignerInfos) != 0 - case "cosmos.tx.v1beta1.AuthInfo.fee": - return x.Fee != nil - case "cosmos.tx.v1beta1.AuthInfo.tip": - return x.Tip != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuthInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuthInfo 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_AuthInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuthInfo.signer_infos": - x.SignerInfos = nil - case "cosmos.tx.v1beta1.AuthInfo.fee": - x.Fee = nil - case "cosmos.tx.v1beta1.AuthInfo.tip": - x.Tip = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuthInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuthInfo 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_AuthInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.AuthInfo.signer_infos": - if len(x.SignerInfos) == 0 { - return protoreflect.ValueOfList(&_AuthInfo_1_list{}) - } - listValue := &_AuthInfo_1_list{list: &x.SignerInfos} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.AuthInfo.fee": - value := x.Fee - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.AuthInfo.tip": - value := x.Tip - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuthInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuthInfo 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_AuthInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuthInfo.signer_infos": - lv := value.List() - clv := lv.(*_AuthInfo_1_list) - x.SignerInfos = *clv.list - case "cosmos.tx.v1beta1.AuthInfo.fee": - x.Fee = value.Message().Interface().(*Fee) - case "cosmos.tx.v1beta1.AuthInfo.tip": - x.Tip = value.Message().Interface().(*Tip) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuthInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuthInfo 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_AuthInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuthInfo.signer_infos": - if x.SignerInfos == nil { - x.SignerInfos = []*SignerInfo{} - } - value := &_AuthInfo_1_list{list: &x.SignerInfos} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.AuthInfo.fee": - if x.Fee == nil { - x.Fee = new(Fee) - } - return protoreflect.ValueOfMessage(x.Fee.ProtoReflect()) - case "cosmos.tx.v1beta1.AuthInfo.tip": - if x.Tip == nil { - x.Tip = new(Tip) - } - return protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuthInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuthInfo 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_AuthInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuthInfo.signer_infos": - list := []*SignerInfo{} - return protoreflect.ValueOfList(&_AuthInfo_1_list{list: &list}) - case "cosmos.tx.v1beta1.AuthInfo.fee": - m := new(Fee) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.AuthInfo.tip": - m := new(Tip) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuthInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuthInfo 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_AuthInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.AuthInfo", 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_AuthInfo) 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_AuthInfo) 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_AuthInfo) 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_AuthInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AuthInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SignerInfos) > 0 { - for _, e := range x.SignerInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Fee != nil { - l = options.Size(x.Fee) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Tip != nil { - l = options.Size(x.Tip) - 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().(*AuthInfo) - 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.Tip != nil { - encoded, err := options.Marshal(x.Tip) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Fee != nil { - encoded, err := options.Marshal(x.Fee) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.SignerInfos) > 0 { - for iNdEx := len(x.SignerInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SignerInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AuthInfo) - 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: AuthInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AuthInfo: 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 SignerInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SignerInfos = append(x.SignerInfos, &SignerInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignerInfos[len(x.SignerInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fee", 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.Fee == nil { - x.Fee = &Fee{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Fee); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tip", 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.Tip == nil { - x.Tip = &Tip{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tip); 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_SignerInfo protoreflect.MessageDescriptor - fd_SignerInfo_public_key protoreflect.FieldDescriptor - fd_SignerInfo_mode_info protoreflect.FieldDescriptor - fd_SignerInfo_sequence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_SignerInfo = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("SignerInfo") - fd_SignerInfo_public_key = md_SignerInfo.Fields().ByName("public_key") - fd_SignerInfo_mode_info = md_SignerInfo.Fields().ByName("mode_info") - fd_SignerInfo_sequence = md_SignerInfo.Fields().ByName("sequence") -} - -var _ protoreflect.Message = (*fastReflection_SignerInfo)(nil) - -type fastReflection_SignerInfo SignerInfo - -func (x *SignerInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignerInfo)(x) -} - -func (x *SignerInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignerInfo_messageType fastReflection_SignerInfo_messageType -var _ protoreflect.MessageType = fastReflection_SignerInfo_messageType{} - -type fastReflection_SignerInfo_messageType struct{} - -func (x fastReflection_SignerInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignerInfo)(nil) -} -func (x fastReflection_SignerInfo_messageType) New() protoreflect.Message { - return new(fastReflection_SignerInfo) -} -func (x fastReflection_SignerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignerInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignerInfo) Descriptor() protoreflect.MessageDescriptor { - return md_SignerInfo -} - -// 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_SignerInfo) Type() protoreflect.MessageType { - return _fastReflection_SignerInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignerInfo) New() protoreflect.Message { - return new(fastReflection_SignerInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignerInfo) Interface() protoreflect.ProtoMessage { - return (*SignerInfo)(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_SignerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_SignerInfo_public_key, value) { - return - } - } - if x.ModeInfo != nil { - value := protoreflect.ValueOfMessage(x.ModeInfo.ProtoReflect()) - if !f(fd_SignerInfo_mode_info, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_SignerInfo_sequence, 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_SignerInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignerInfo.public_key": - return x.PublicKey != nil - case "cosmos.tx.v1beta1.SignerInfo.mode_info": - return x.ModeInfo != nil - case "cosmos.tx.v1beta1.SignerInfo.sequence": - return x.Sequence != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignerInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignerInfo 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_SignerInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignerInfo.public_key": - x.PublicKey = nil - case "cosmos.tx.v1beta1.SignerInfo.mode_info": - x.ModeInfo = nil - case "cosmos.tx.v1beta1.SignerInfo.sequence": - x.Sequence = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignerInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignerInfo 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_SignerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.SignerInfo.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.SignerInfo.mode_info": - value := x.ModeInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.SignerInfo.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignerInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignerInfo 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_SignerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignerInfo.public_key": - x.PublicKey = value.Message().Interface().(*anypb.Any) - case "cosmos.tx.v1beta1.SignerInfo.mode_info": - x.ModeInfo = value.Message().Interface().(*ModeInfo) - case "cosmos.tx.v1beta1.SignerInfo.sequence": - x.Sequence = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignerInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignerInfo 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_SignerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignerInfo.public_key": - if x.PublicKey == nil { - x.PublicKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "cosmos.tx.v1beta1.SignerInfo.mode_info": - if x.ModeInfo == nil { - x.ModeInfo = new(ModeInfo) - } - return protoreflect.ValueOfMessage(x.ModeInfo.ProtoReflect()) - case "cosmos.tx.v1beta1.SignerInfo.sequence": - panic(fmt.Errorf("field sequence of message cosmos.tx.v1beta1.SignerInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignerInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignerInfo 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_SignerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.SignerInfo.public_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.SignerInfo.mode_info": - m := new(ModeInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.SignerInfo.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SignerInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.SignerInfo 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_SignerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.SignerInfo", 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_SignerInfo) 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_SignerInfo) 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_SignerInfo) 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_SignerInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignerInfo) - 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.PublicKey != nil { - l = options.Size(x.PublicKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ModeInfo != nil { - l = options.Size(x.ModeInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - 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().(*SignerInfo) - 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.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x18 - } - if x.ModeInfo != nil { - encoded, err := options.Marshal(x.ModeInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - 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().(*SignerInfo) - 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: SignerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignerInfo: 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 PublicKey", 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.PublicKey == nil { - x.PublicKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ModeInfo", 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.ModeInfo == nil { - x.ModeInfo = &ModeInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ModeInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ModeInfo protoreflect.MessageDescriptor - fd_ModeInfo_single protoreflect.FieldDescriptor - fd_ModeInfo_multi protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_ModeInfo = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("ModeInfo") - fd_ModeInfo_single = md_ModeInfo.Fields().ByName("single") - fd_ModeInfo_multi = md_ModeInfo.Fields().ByName("multi") -} - -var _ protoreflect.Message = (*fastReflection_ModeInfo)(nil) - -type fastReflection_ModeInfo ModeInfo - -func (x *ModeInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModeInfo)(x) -} - -func (x *ModeInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModeInfo_messageType fastReflection_ModeInfo_messageType -var _ protoreflect.MessageType = fastReflection_ModeInfo_messageType{} - -type fastReflection_ModeInfo_messageType struct{} - -func (x fastReflection_ModeInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModeInfo)(nil) -} -func (x fastReflection_ModeInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ModeInfo) -} -func (x fastReflection_ModeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModeInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModeInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ModeInfo -} - -// 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_ModeInfo) Type() protoreflect.MessageType { - return _fastReflection_ModeInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModeInfo) New() protoreflect.Message { - return new(fastReflection_ModeInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModeInfo) Interface() protoreflect.ProtoMessage { - return (*ModeInfo)(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_ModeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sum != nil { - switch o := x.Sum.(type) { - case *ModeInfo_Single_: - v := o.Single - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_ModeInfo_single, value) { - return - } - case *ModeInfo_Multi_: - v := o.Multi - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_ModeInfo_multi, 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_ModeInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.single": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*ModeInfo_Single_); ok { - return true - } else { - return false - } - case "cosmos.tx.v1beta1.ModeInfo.multi": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*ModeInfo_Multi_); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo 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_ModeInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.single": - x.Sum = nil - case "cosmos.tx.v1beta1.ModeInfo.multi": - x.Sum = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo 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_ModeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.single": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*ModeInfo_Single)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*ModeInfo_Single_); ok { - return protoreflect.ValueOfMessage(v.Single.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ModeInfo_Single)(nil).ProtoReflect()) - } - case "cosmos.tx.v1beta1.ModeInfo.multi": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*ModeInfo_Multi)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*ModeInfo_Multi_); ok { - return protoreflect.ValueOfMessage(v.Multi.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ModeInfo_Multi)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo 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_ModeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.single": - cv := value.Message().Interface().(*ModeInfo_Single) - x.Sum = &ModeInfo_Single_{Single: cv} - case "cosmos.tx.v1beta1.ModeInfo.multi": - cv := value.Message().Interface().(*ModeInfo_Multi) - x.Sum = &ModeInfo_Multi_{Multi: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo 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_ModeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.single": - if x.Sum == nil { - value := &ModeInfo_Single{} - oneofValue := &ModeInfo_Single_{Single: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *ModeInfo_Single_: - return protoreflect.ValueOfMessage(m.Single.ProtoReflect()) - default: - value := &ModeInfo_Single{} - oneofValue := &ModeInfo_Single_{Single: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "cosmos.tx.v1beta1.ModeInfo.multi": - if x.Sum == nil { - value := &ModeInfo_Multi{} - oneofValue := &ModeInfo_Multi_{Multi: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *ModeInfo_Multi_: - return protoreflect.ValueOfMessage(m.Multi.ProtoReflect()) - default: - value := &ModeInfo_Multi{} - oneofValue := &ModeInfo_Multi_{Multi: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo 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_ModeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.single": - value := &ModeInfo_Single{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.ModeInfo.multi": - value := &ModeInfo_Multi{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo 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_ModeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *ModeInfo_Single_: - return x.Descriptor().Fields().ByName("single") - case *ModeInfo_Multi_: - return x.Descriptor().Fields().ByName("multi") - } - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.ModeInfo", 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_ModeInfo) 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_ModeInfo) 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_ModeInfo) 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_ModeInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModeInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Sum.(type) { - case *ModeInfo_Single_: - if x == nil { - break - } - l = options.Size(x.Single) - n += 1 + l + runtime.Sov(uint64(l)) - case *ModeInfo_Multi_: - if x == nil { - break - } - l = options.Size(x.Multi) - 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().(*ModeInfo) - 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) - } - switch x := x.Sum.(type) { - case *ModeInfo_Single_: - encoded, err := options.Marshal(x.Single) - 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 - case *ModeInfo_Multi_: - encoded, err := options.Marshal(x.Multi) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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().(*ModeInfo) - 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: ModeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModeInfo: 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 Single", 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 - } - v := &ModeInfo_Single{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &ModeInfo_Single_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Multi", 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 - } - v := &ModeInfo_Multi{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &ModeInfo_Multi_{v} - 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_ModeInfo_Single protoreflect.MessageDescriptor - fd_ModeInfo_Single_mode protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_ModeInfo_Single = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("ModeInfo").Messages().ByName("Single") - fd_ModeInfo_Single_mode = md_ModeInfo_Single.Fields().ByName("mode") -} - -var _ protoreflect.Message = (*fastReflection_ModeInfo_Single)(nil) - -type fastReflection_ModeInfo_Single ModeInfo_Single - -func (x *ModeInfo_Single) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModeInfo_Single)(x) -} - -func (x *ModeInfo_Single) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModeInfo_Single_messageType fastReflection_ModeInfo_Single_messageType -var _ protoreflect.MessageType = fastReflection_ModeInfo_Single_messageType{} - -type fastReflection_ModeInfo_Single_messageType struct{} - -func (x fastReflection_ModeInfo_Single_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModeInfo_Single)(nil) -} -func (x fastReflection_ModeInfo_Single_messageType) New() protoreflect.Message { - return new(fastReflection_ModeInfo_Single) -} -func (x fastReflection_ModeInfo_Single_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModeInfo_Single -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModeInfo_Single) Descriptor() protoreflect.MessageDescriptor { - return md_ModeInfo_Single -} - -// 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_ModeInfo_Single) Type() protoreflect.MessageType { - return _fastReflection_ModeInfo_Single_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModeInfo_Single) New() protoreflect.Message { - return new(fastReflection_ModeInfo_Single) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModeInfo_Single) Interface() protoreflect.ProtoMessage { - return (*ModeInfo_Single)(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_ModeInfo_Single) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Mode != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Mode)) - if !f(fd_ModeInfo_Single_mode, 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_ModeInfo_Single) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Single.mode": - return x.Mode != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Single")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Single 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_ModeInfo_Single) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Single.mode": - x.Mode = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Single")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Single 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_ModeInfo_Single) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Single.mode": - value := x.Mode - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Single")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Single 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_ModeInfo_Single) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Single.mode": - x.Mode = (v1beta1.SignMode)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Single")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Single 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_ModeInfo_Single) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Single.mode": - panic(fmt.Errorf("field mode of message cosmos.tx.v1beta1.ModeInfo.Single is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Single")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Single 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_ModeInfo_Single) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Single.mode": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Single")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Single 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_ModeInfo_Single) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.ModeInfo.Single", 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_ModeInfo_Single) 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_ModeInfo_Single) 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_ModeInfo_Single) 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_ModeInfo_Single) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModeInfo_Single) - 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.Mode != 0 { - n += 1 + runtime.Sov(uint64(x.Mode)) - } - 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().(*ModeInfo_Single) - 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.Mode != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Mode)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ModeInfo_Single) - 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: ModeInfo_Single: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModeInfo_Single: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - x.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Mode |= v1beta1.SignMode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ModeInfo_Multi_2_list)(nil) - -type _ModeInfo_Multi_2_list struct { - list *[]*ModeInfo -} - -func (x *_ModeInfo_Multi_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ModeInfo_Multi_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ModeInfo_Multi_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModeInfo) - (*x.list)[i] = concreteValue -} - -func (x *_ModeInfo_Multi_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModeInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ModeInfo_Multi_2_list) AppendMutable() protoreflect.Value { - v := new(ModeInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModeInfo_Multi_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ModeInfo_Multi_2_list) NewElement() protoreflect.Value { - v := new(ModeInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ModeInfo_Multi_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ModeInfo_Multi protoreflect.MessageDescriptor - fd_ModeInfo_Multi_bitarray protoreflect.FieldDescriptor - fd_ModeInfo_Multi_mode_infos protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_ModeInfo_Multi = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("ModeInfo").Messages().ByName("Multi") - fd_ModeInfo_Multi_bitarray = md_ModeInfo_Multi.Fields().ByName("bitarray") - fd_ModeInfo_Multi_mode_infos = md_ModeInfo_Multi.Fields().ByName("mode_infos") -} - -var _ protoreflect.Message = (*fastReflection_ModeInfo_Multi)(nil) - -type fastReflection_ModeInfo_Multi ModeInfo_Multi - -func (x *ModeInfo_Multi) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModeInfo_Multi)(x) -} - -func (x *ModeInfo_Multi) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModeInfo_Multi_messageType fastReflection_ModeInfo_Multi_messageType -var _ protoreflect.MessageType = fastReflection_ModeInfo_Multi_messageType{} - -type fastReflection_ModeInfo_Multi_messageType struct{} - -func (x fastReflection_ModeInfo_Multi_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModeInfo_Multi)(nil) -} -func (x fastReflection_ModeInfo_Multi_messageType) New() protoreflect.Message { - return new(fastReflection_ModeInfo_Multi) -} -func (x fastReflection_ModeInfo_Multi_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModeInfo_Multi -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModeInfo_Multi) Descriptor() protoreflect.MessageDescriptor { - return md_ModeInfo_Multi -} - -// 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_ModeInfo_Multi) Type() protoreflect.MessageType { - return _fastReflection_ModeInfo_Multi_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModeInfo_Multi) New() protoreflect.Message { - return new(fastReflection_ModeInfo_Multi) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModeInfo_Multi) Interface() protoreflect.ProtoMessage { - return (*ModeInfo_Multi)(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_ModeInfo_Multi) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bitarray != nil { - value := protoreflect.ValueOfMessage(x.Bitarray.ProtoReflect()) - if !f(fd_ModeInfo_Multi_bitarray, value) { - return - } - } - if len(x.ModeInfos) != 0 { - value := protoreflect.ValueOfList(&_ModeInfo_Multi_2_list{list: &x.ModeInfos}) - if !f(fd_ModeInfo_Multi_mode_infos, 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_ModeInfo_Multi) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Multi.bitarray": - return x.Bitarray != nil - case "cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos": - return len(x.ModeInfos) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Multi 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_ModeInfo_Multi) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Multi.bitarray": - x.Bitarray = nil - case "cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos": - x.ModeInfos = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Multi 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_ModeInfo_Multi) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Multi.bitarray": - value := x.Bitarray - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos": - if len(x.ModeInfos) == 0 { - return protoreflect.ValueOfList(&_ModeInfo_Multi_2_list{}) - } - listValue := &_ModeInfo_Multi_2_list{list: &x.ModeInfos} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Multi 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_ModeInfo_Multi) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Multi.bitarray": - x.Bitarray = value.Message().Interface().(*v1beta11.CompactBitArray) - case "cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos": - lv := value.List() - clv := lv.(*_ModeInfo_Multi_2_list) - x.ModeInfos = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Multi 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_ModeInfo_Multi) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Multi.bitarray": - if x.Bitarray == nil { - x.Bitarray = new(v1beta11.CompactBitArray) - } - return protoreflect.ValueOfMessage(x.Bitarray.ProtoReflect()) - case "cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos": - if x.ModeInfos == nil { - x.ModeInfos = []*ModeInfo{} - } - value := &_ModeInfo_Multi_2_list{list: &x.ModeInfos} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Multi 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_ModeInfo_Multi) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.ModeInfo.Multi.bitarray": - m := new(v1beta11.CompactBitArray) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos": - list := []*ModeInfo{} - return protoreflect.ValueOfList(&_ModeInfo_Multi_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.ModeInfo.Multi")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.ModeInfo.Multi 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_ModeInfo_Multi) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.ModeInfo.Multi", 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_ModeInfo_Multi) 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_ModeInfo_Multi) 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_ModeInfo_Multi) 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_ModeInfo_Multi) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModeInfo_Multi) - 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.Bitarray != nil { - l = options.Size(x.Bitarray) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ModeInfos) > 0 { - for _, e := range x.ModeInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ModeInfo_Multi) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ModeInfos) > 0 { - for iNdEx := len(x.ModeInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ModeInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Bitarray != nil { - encoded, err := options.Marshal(x.Bitarray) - 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().(*ModeInfo_Multi) - 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: ModeInfo_Multi: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModeInfo_Multi: 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 Bitarray", 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.Bitarray == nil { - x.Bitarray = &v1beta11.CompactBitArray{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Bitarray); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ModeInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ModeInfos = append(x.ModeInfos, &ModeInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ModeInfos[len(x.ModeInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Fee_1_list)(nil) - -type _Fee_1_list struct { - list *[]*v1beta12.Coin -} - -func (x *_Fee_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Fee_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Fee_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta12.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Fee_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta12.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Fee_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta12.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Fee_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Fee_1_list) NewElement() protoreflect.Value { - v := new(v1beta12.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Fee_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Fee protoreflect.MessageDescriptor - fd_Fee_amount protoreflect.FieldDescriptor - fd_Fee_gas_limit protoreflect.FieldDescriptor - fd_Fee_payer protoreflect.FieldDescriptor - fd_Fee_granter protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_Fee = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("Fee") - fd_Fee_amount = md_Fee.Fields().ByName("amount") - fd_Fee_gas_limit = md_Fee.Fields().ByName("gas_limit") - fd_Fee_payer = md_Fee.Fields().ByName("payer") - fd_Fee_granter = md_Fee.Fields().ByName("granter") -} - -var _ protoreflect.Message = (*fastReflection_Fee)(nil) - -type fastReflection_Fee Fee - -func (x *Fee) ProtoReflect() protoreflect.Message { - return (*fastReflection_Fee)(x) -} - -func (x *Fee) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Fee_messageType fastReflection_Fee_messageType -var _ protoreflect.MessageType = fastReflection_Fee_messageType{} - -type fastReflection_Fee_messageType struct{} - -func (x fastReflection_Fee_messageType) Zero() protoreflect.Message { - return (*fastReflection_Fee)(nil) -} -func (x fastReflection_Fee_messageType) New() protoreflect.Message { - return new(fastReflection_Fee) -} -func (x fastReflection_Fee_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Fee -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Fee) Descriptor() protoreflect.MessageDescriptor { - return md_Fee -} - -// 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_Fee) Type() protoreflect.MessageType { - return _fastReflection_Fee_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Fee) New() protoreflect.Message { - return new(fastReflection_Fee) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Fee) Interface() protoreflect.ProtoMessage { - return (*Fee)(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_Fee) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Fee_1_list{list: &x.Amount}) - if !f(fd_Fee_amount, value) { - return - } - } - if x.GasLimit != uint64(0) { - value := protoreflect.ValueOfUint64(x.GasLimit) - if !f(fd_Fee_gas_limit, value) { - return - } - } - if x.Payer != "" { - value := protoreflect.ValueOfString(x.Payer) - if !f(fd_Fee_payer, value) { - return - } - } - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_Fee_granter, 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_Fee) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Fee.amount": - return len(x.Amount) != 0 - case "cosmos.tx.v1beta1.Fee.gas_limit": - return x.GasLimit != uint64(0) - case "cosmos.tx.v1beta1.Fee.payer": - return x.Payer != "" - case "cosmos.tx.v1beta1.Fee.granter": - return x.Granter != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Fee")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Fee 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_Fee) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Fee.amount": - x.Amount = nil - case "cosmos.tx.v1beta1.Fee.gas_limit": - x.GasLimit = uint64(0) - case "cosmos.tx.v1beta1.Fee.payer": - x.Payer = "" - case "cosmos.tx.v1beta1.Fee.granter": - x.Granter = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Fee")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Fee 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_Fee) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.Fee.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Fee_1_list{}) - } - listValue := &_Fee_1_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.Fee.gas_limit": - value := x.GasLimit - return protoreflect.ValueOfUint64(value) - case "cosmos.tx.v1beta1.Fee.payer": - value := x.Payer - return protoreflect.ValueOfString(value) - case "cosmos.tx.v1beta1.Fee.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Fee")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Fee 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_Fee) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Fee.amount": - lv := value.List() - clv := lv.(*_Fee_1_list) - x.Amount = *clv.list - case "cosmos.tx.v1beta1.Fee.gas_limit": - x.GasLimit = value.Uint() - case "cosmos.tx.v1beta1.Fee.payer": - x.Payer = value.Interface().(string) - case "cosmos.tx.v1beta1.Fee.granter": - x.Granter = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Fee")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Fee 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_Fee) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Fee.amount": - if x.Amount == nil { - x.Amount = []*v1beta12.Coin{} - } - value := &_Fee_1_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.Fee.gas_limit": - panic(fmt.Errorf("field gas_limit of message cosmos.tx.v1beta1.Fee is not mutable")) - case "cosmos.tx.v1beta1.Fee.payer": - panic(fmt.Errorf("field payer of message cosmos.tx.v1beta1.Fee is not mutable")) - case "cosmos.tx.v1beta1.Fee.granter": - panic(fmt.Errorf("field granter of message cosmos.tx.v1beta1.Fee is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Fee")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Fee 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_Fee) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Fee.amount": - list := []*v1beta12.Coin{} - return protoreflect.ValueOfList(&_Fee_1_list{list: &list}) - case "cosmos.tx.v1beta1.Fee.gas_limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.tx.v1beta1.Fee.payer": - return protoreflect.ValueOfString("") - case "cosmos.tx.v1beta1.Fee.granter": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Fee")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Fee 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_Fee) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.Fee", 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_Fee) 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_Fee) 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_Fee) 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_Fee) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Fee) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.GasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.GasLimit)) - } - l = len(x.Payer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Fee) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - i-- - dAtA[i] = 0x22 - } - if len(x.Payer) > 0 { - i -= len(x.Payer) - copy(dAtA[i:], x.Payer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payer))) - i-- - dAtA[i] = 0x1a - } - if x.GasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasLimit)) - i-- - dAtA[i] = 0x10 - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Fee) - 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: Fee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Fee: 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 Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta12.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) - } - x.GasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payer", 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.Payer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Granter", 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.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Tip_1_list)(nil) - -type _Tip_1_list struct { - list *[]*v1beta12.Coin -} - -func (x *_Tip_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Tip_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Tip_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta12.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Tip_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta12.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Tip_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta12.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Tip_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Tip_1_list) NewElement() protoreflect.Value { - v := new(v1beta12.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Tip_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Tip protoreflect.MessageDescriptor - fd_Tip_amount protoreflect.FieldDescriptor - fd_Tip_tipper protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_Tip = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("Tip") - fd_Tip_amount = md_Tip.Fields().ByName("amount") - fd_Tip_tipper = md_Tip.Fields().ByName("tipper") -} - -var _ protoreflect.Message = (*fastReflection_Tip)(nil) - -type fastReflection_Tip Tip - -func (x *Tip) ProtoReflect() protoreflect.Message { - return (*fastReflection_Tip)(x) -} - -func (x *Tip) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Tip_messageType fastReflection_Tip_messageType -var _ protoreflect.MessageType = fastReflection_Tip_messageType{} - -type fastReflection_Tip_messageType struct{} - -func (x fastReflection_Tip_messageType) Zero() protoreflect.Message { - return (*fastReflection_Tip)(nil) -} -func (x fastReflection_Tip_messageType) New() protoreflect.Message { - return new(fastReflection_Tip) -} -func (x fastReflection_Tip_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Tip -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Tip) Descriptor() protoreflect.MessageDescriptor { - return md_Tip -} - -// 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_Tip) Type() protoreflect.MessageType { - return _fastReflection_Tip_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Tip) New() protoreflect.Message { - return new(fastReflection_Tip) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Tip) Interface() protoreflect.ProtoMessage { - return (*Tip)(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_Tip) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Tip_1_list{list: &x.Amount}) - if !f(fd_Tip_amount, value) { - return - } - } - if x.Tipper != "" { - value := protoreflect.ValueOfString(x.Tipper) - if !f(fd_Tip_tipper, 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_Tip) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tip.amount": - return len(x.Amount) != 0 - case "cosmos.tx.v1beta1.Tip.tipper": - return x.Tipper != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tip")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tip 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_Tip) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tip.amount": - x.Amount = nil - case "cosmos.tx.v1beta1.Tip.tipper": - x.Tipper = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tip")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tip 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_Tip) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.Tip.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Tip_1_list{}) - } - listValue := &_Tip_1_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - case "cosmos.tx.v1beta1.Tip.tipper": - value := x.Tipper - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tip")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tip 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_Tip) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tip.amount": - lv := value.List() - clv := lv.(*_Tip_1_list) - x.Amount = *clv.list - case "cosmos.tx.v1beta1.Tip.tipper": - x.Tipper = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tip")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tip 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_Tip) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tip.amount": - if x.Amount == nil { - x.Amount = []*v1beta12.Coin{} - } - value := &_Tip_1_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.tx.v1beta1.Tip.tipper": - panic(fmt.Errorf("field tipper of message cosmos.tx.v1beta1.Tip is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tip")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tip 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_Tip) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.Tip.amount": - list := []*v1beta12.Coin{} - return protoreflect.ValueOfList(&_Tip_1_list{list: &list}) - case "cosmos.tx.v1beta1.Tip.tipper": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.Tip")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.Tip 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_Tip) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.Tip", 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_Tip) 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_Tip) 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_Tip) 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_Tip) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Tip) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Tipper) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Tip) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Tipper) > 0 { - i -= len(x.Tipper) - copy(dAtA[i:], x.Tipper) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tipper))) - i-- - dAtA[i] = 0x12 - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Tip) - 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: Tip: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tip: 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 Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta12.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tipper", 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.Tipper = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AuxSignerData protoreflect.MessageDescriptor - fd_AuxSignerData_address protoreflect.FieldDescriptor - fd_AuxSignerData_sign_doc protoreflect.FieldDescriptor - fd_AuxSignerData_mode protoreflect.FieldDescriptor - fd_AuxSignerData_sig protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_tx_v1beta1_tx_proto_init() - md_AuxSignerData = File_cosmos_tx_v1beta1_tx_proto.Messages().ByName("AuxSignerData") - fd_AuxSignerData_address = md_AuxSignerData.Fields().ByName("address") - fd_AuxSignerData_sign_doc = md_AuxSignerData.Fields().ByName("sign_doc") - fd_AuxSignerData_mode = md_AuxSignerData.Fields().ByName("mode") - fd_AuxSignerData_sig = md_AuxSignerData.Fields().ByName("sig") -} - -var _ protoreflect.Message = (*fastReflection_AuxSignerData)(nil) - -type fastReflection_AuxSignerData AuxSignerData - -func (x *AuxSignerData) ProtoReflect() protoreflect.Message { - return (*fastReflection_AuxSignerData)(x) -} - -func (x *AuxSignerData) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AuxSignerData_messageType fastReflection_AuxSignerData_messageType -var _ protoreflect.MessageType = fastReflection_AuxSignerData_messageType{} - -type fastReflection_AuxSignerData_messageType struct{} - -func (x fastReflection_AuxSignerData_messageType) Zero() protoreflect.Message { - return (*fastReflection_AuxSignerData)(nil) -} -func (x fastReflection_AuxSignerData_messageType) New() protoreflect.Message { - return new(fastReflection_AuxSignerData) -} -func (x fastReflection_AuxSignerData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AuxSignerData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AuxSignerData) Descriptor() protoreflect.MessageDescriptor { - return md_AuxSignerData -} - -// 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_AuxSignerData) Type() protoreflect.MessageType { - return _fastReflection_AuxSignerData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AuxSignerData) New() protoreflect.Message { - return new(fastReflection_AuxSignerData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AuxSignerData) Interface() protoreflect.ProtoMessage { - return (*AuxSignerData)(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_AuxSignerData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_AuxSignerData_address, value) { - return - } - } - if x.SignDoc != nil { - value := protoreflect.ValueOfMessage(x.SignDoc.ProtoReflect()) - if !f(fd_AuxSignerData_sign_doc, value) { - return - } - } - if x.Mode != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Mode)) - if !f(fd_AuxSignerData_mode, value) { - return - } - } - if len(x.Sig) != 0 { - value := protoreflect.ValueOfBytes(x.Sig) - if !f(fd_AuxSignerData_sig, 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_AuxSignerData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuxSignerData.address": - return x.Address != "" - case "cosmos.tx.v1beta1.AuxSignerData.sign_doc": - return x.SignDoc != nil - case "cosmos.tx.v1beta1.AuxSignerData.mode": - return x.Mode != 0 - case "cosmos.tx.v1beta1.AuxSignerData.sig": - return len(x.Sig) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuxSignerData")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuxSignerData 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_AuxSignerData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuxSignerData.address": - x.Address = "" - case "cosmos.tx.v1beta1.AuxSignerData.sign_doc": - x.SignDoc = nil - case "cosmos.tx.v1beta1.AuxSignerData.mode": - x.Mode = 0 - case "cosmos.tx.v1beta1.AuxSignerData.sig": - x.Sig = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuxSignerData")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuxSignerData 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_AuxSignerData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.tx.v1beta1.AuxSignerData.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.tx.v1beta1.AuxSignerData.sign_doc": - value := x.SignDoc - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.tx.v1beta1.AuxSignerData.mode": - value := x.Mode - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "cosmos.tx.v1beta1.AuxSignerData.sig": - value := x.Sig - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuxSignerData")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuxSignerData 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_AuxSignerData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuxSignerData.address": - x.Address = value.Interface().(string) - case "cosmos.tx.v1beta1.AuxSignerData.sign_doc": - x.SignDoc = value.Message().Interface().(*SignDocDirectAux) - case "cosmos.tx.v1beta1.AuxSignerData.mode": - x.Mode = (v1beta1.SignMode)(value.Enum()) - case "cosmos.tx.v1beta1.AuxSignerData.sig": - x.Sig = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuxSignerData")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuxSignerData 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_AuxSignerData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuxSignerData.sign_doc": - if x.SignDoc == nil { - x.SignDoc = new(SignDocDirectAux) - } - return protoreflect.ValueOfMessage(x.SignDoc.ProtoReflect()) - case "cosmos.tx.v1beta1.AuxSignerData.address": - panic(fmt.Errorf("field address of message cosmos.tx.v1beta1.AuxSignerData is not mutable")) - case "cosmos.tx.v1beta1.AuxSignerData.mode": - panic(fmt.Errorf("field mode of message cosmos.tx.v1beta1.AuxSignerData is not mutable")) - case "cosmos.tx.v1beta1.AuxSignerData.sig": - panic(fmt.Errorf("field sig of message cosmos.tx.v1beta1.AuxSignerData is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuxSignerData")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuxSignerData 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_AuxSignerData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.tx.v1beta1.AuxSignerData.address": - return protoreflect.ValueOfString("") - case "cosmos.tx.v1beta1.AuxSignerData.sign_doc": - m := new(SignDocDirectAux) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.tx.v1beta1.AuxSignerData.mode": - return protoreflect.ValueOfEnum(0) - case "cosmos.tx.v1beta1.AuxSignerData.sig": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.AuxSignerData")) - } - panic(fmt.Errorf("message cosmos.tx.v1beta1.AuxSignerData 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_AuxSignerData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.AuxSignerData", 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_AuxSignerData) 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_AuxSignerData) 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_AuxSignerData) 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_AuxSignerData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AuxSignerData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SignDoc != nil { - l = options.Size(x.SignDoc) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Mode != 0 { - n += 1 + runtime.Sov(uint64(x.Mode)) - } - l = len(x.Sig) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AuxSignerData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Sig) > 0 { - i -= len(x.Sig) - copy(dAtA[i:], x.Sig) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sig))) - i-- - dAtA[i] = 0x22 - } - if x.Mode != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Mode)) - i-- - dAtA[i] = 0x18 - } - if x.SignDoc != nil { - encoded, err := options.Marshal(x.SignDoc) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AuxSignerData) - 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: AuxSignerData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AuxSignerData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignDoc", 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.SignDoc == nil { - x.SignDoc = &SignDocDirectAux{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignDoc); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - x.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Mode |= v1beta1.SignMode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sig = append(x.Sig[:0], dAtA[iNdEx:postIndex]...) - if x.Sig == nil { - x.Sig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/tx/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Tx is the standard type used for broadcasting transactions. -type Tx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // body is the processable content of the transaction - Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // auth_info is the authorization related content of the transaction, - // specifically signers, signer modes and fee - AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (x *Tx) Reset() { - *x = Tx{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tx) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tx) ProtoMessage() {} - -// Deprecated: Use Tx.ProtoReflect.Descriptor instead. -func (*Tx) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *Tx) GetBody() *TxBody { - if x != nil { - return x.Body - } - return nil -} - -func (x *Tx) GetAuthInfo() *AuthInfo { - if x != nil { - return x.AuthInfo - } - return nil -} - -func (x *Tx) GetSignatures() [][]byte { - if x != nil { - return x.Signatures - } - return nil -} - -// TxRaw is a variant of Tx that pins the signer's exact binary representation -// of body and auth_info. This is used for signing, broadcasting and -// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and -// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used -// as the transaction ID. -type TxRaw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // body_bytes is a protobuf serialization of a TxBody that matches the - // representation in SignDoc. - BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in SignDoc. - AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (x *TxRaw) Reset() { - *x = TxRaw{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxRaw) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxRaw) ProtoMessage() {} - -// Deprecated: Use TxRaw.ProtoReflect.Descriptor instead. -func (*TxRaw) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *TxRaw) GetBodyBytes() []byte { - if x != nil { - return x.BodyBytes - } - return nil -} - -func (x *TxRaw) GetAuthInfoBytes() []byte { - if x != nil { - return x.AuthInfoBytes - } - return nil -} - -func (x *TxRaw) GetSignatures() [][]byte { - if x != nil { - return x.Signatures - } - return nil -} - -// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -type SignDoc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in TxRaw. - AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - // chain_id is the unique identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker - ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // account_number is the account number of the account in state - AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` -} - -func (x *SignDoc) Reset() { - *x = SignDoc{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignDoc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignDoc) ProtoMessage() {} - -// Deprecated: Use SignDoc.ProtoReflect.Descriptor instead. -func (*SignDoc) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *SignDoc) GetBodyBytes() []byte { - if x != nil { - return x.BodyBytes - } - return nil -} - -func (x *SignDoc) GetAuthInfoBytes() []byte { - if x != nil { - return x.AuthInfoBytes - } - return nil -} - -func (x *SignDoc) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *SignDoc) GetAccountNumber() uint64 { - if x != nil { - return x.AccountNumber - } - return 0 -} - -// SignDocDirectAux is the type used for generating sign bytes for -// SIGN_MODE_DIRECT_AUX. -// -// Since: cosmos-sdk 0.46 -type SignDocDirectAux struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - // public_key is the public key of the signing account. - PublicKey *anypb.Any `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // chain_id is the identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker. - ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // account_number is the account number of the account in state. - AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - // sequence is the sequence number of the signing account. - Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Tip is the optional tip used for meta-transactions. It should be left - // empty if the signer is not the tipper for this transaction. - Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` -} - -func (x *SignDocDirectAux) Reset() { - *x = SignDocDirectAux{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignDocDirectAux) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignDocDirectAux) ProtoMessage() {} - -// Deprecated: Use SignDocDirectAux.ProtoReflect.Descriptor instead. -func (*SignDocDirectAux) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *SignDocDirectAux) GetBodyBytes() []byte { - if x != nil { - return x.BodyBytes - } - return nil -} - -func (x *SignDocDirectAux) GetPublicKey() *anypb.Any { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *SignDocDirectAux) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *SignDocDirectAux) GetAccountNumber() uint64 { - if x != nil { - return x.AccountNumber - } - return 0 -} - -func (x *SignDocDirectAux) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -func (x *SignDocDirectAux) GetTip() *Tip { - if x != nil { - return x.Tip - } - return nil -} - -// TxBody is the body of a transaction that all signers sign over. -type TxBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // messages is a list of messages to be executed. The required signers of - // those messages define the number and order of elements in AuthInfo's - // signer_infos and Tx's signatures. Each required signer address is added to - // the list only the first time it occurs. - // By convention, the first required signer (usually from the first message) - // is referred to as the primary signer and pays the fee for the whole - // transaction. - Messages []*anypb.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - // memo is any arbitrary note/comment to be added to the transaction. - // WARNING: in clients, any publicly exposed text should not be called memo, - // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` - // timeout is the block height after which this transaction will not - // be processed by the chain - TimeoutHeight uint64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, the transaction will be rejected - ExtensionOptions []*anypb.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, they will be ignored - NonCriticalExtensionOptions []*anypb.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"` -} - -func (x *TxBody) Reset() { - *x = TxBody{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxBody) ProtoMessage() {} - -// Deprecated: Use TxBody.ProtoReflect.Descriptor instead. -func (*TxBody) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *TxBody) GetMessages() []*anypb.Any { - if x != nil { - return x.Messages - } - return nil -} - -func (x *TxBody) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -func (x *TxBody) GetTimeoutHeight() uint64 { - if x != nil { - return x.TimeoutHeight - } - return 0 -} - -func (x *TxBody) GetExtensionOptions() []*anypb.Any { - if x != nil { - return x.ExtensionOptions - } - return nil -} - -func (x *TxBody) GetNonCriticalExtensionOptions() []*anypb.Any { - if x != nil { - return x.NonCriticalExtensionOptions - } - return nil -} - -// AuthInfo describes the fee and signer modes that are used to sign a -// transaction. -type AuthInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's - // messages. The first element is the primary signer and the one which pays - // the fee. - SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` - // Fee is the fee and gas limit for the transaction. The first signer is the - // primary signer and the one which pays the fee. The fee can be calculated - // based on the cost of evaluating the body and doing signature verification - // of the signers. This can be estimated via simulation. - Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` - // Tip is the optional tip used for meta-transactions. - // - // Since: cosmos-sdk 0.46 - Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` -} - -func (x *AuthInfo) Reset() { - *x = AuthInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthInfo) ProtoMessage() {} - -// Deprecated: Use AuthInfo.ProtoReflect.Descriptor instead. -func (*AuthInfo) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *AuthInfo) GetSignerInfos() []*SignerInfo { - if x != nil { - return x.SignerInfos - } - return nil -} - -func (x *AuthInfo) GetFee() *Fee { - if x != nil { - return x.Fee - } - return nil -} - -func (x *AuthInfo) GetTip() *Tip { - if x != nil { - return x.Tip - } - return nil -} - -// SignerInfo describes the public key and signing mode of a single top-level -// signer. -type SignerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // public_key is the public key of the signer. It is optional for accounts - // that already exist in state. If unset, the verifier can use the required \ - // signer address for this position and lookup the public key. - PublicKey *anypb.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // mode_info describes the signing mode of the signer and is a nested - // structure to support nested multisig pubkey's - ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"` - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to - // prevent replay attacks. - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (x *SignerInfo) Reset() { - *x = SignerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignerInfo) ProtoMessage() {} - -// Deprecated: Use SignerInfo.ProtoReflect.Descriptor instead. -func (*SignerInfo) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *SignerInfo) GetPublicKey() *anypb.Any { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *SignerInfo) GetModeInfo() *ModeInfo { - if x != nil { - return x.ModeInfo - } - return nil -} - -func (x *SignerInfo) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -// ModeInfo describes the signing mode of a single or nested multisig signer. -type ModeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sum is the oneof that specifies whether this represents a single or nested - // multisig signer - // - // Types that are assignable to Sum: - // *ModeInfo_Single_ - // *ModeInfo_Multi_ - Sum isModeInfo_Sum `protobuf_oneof:"sum"` -} - -func (x *ModeInfo) Reset() { - *x = ModeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModeInfo) ProtoMessage() {} - -// Deprecated: Use ModeInfo.ProtoReflect.Descriptor instead. -func (*ModeInfo) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{7} -} - -func (x *ModeInfo) GetSum() isModeInfo_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *ModeInfo) GetSingle() *ModeInfo_Single { - if x, ok := x.GetSum().(*ModeInfo_Single_); ok { - return x.Single - } - return nil -} - -func (x *ModeInfo) GetMulti() *ModeInfo_Multi { - if x, ok := x.GetSum().(*ModeInfo_Multi_); ok { - return x.Multi - } - return nil -} - -type isModeInfo_Sum interface { - isModeInfo_Sum() -} - -type ModeInfo_Single_ struct { - // single represents a single signer - Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof"` -} - -type ModeInfo_Multi_ struct { - // multi represents a nested multisig signer - Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof"` -} - -func (*ModeInfo_Single_) isModeInfo_Sum() {} - -func (*ModeInfo_Multi_) isModeInfo_Sum() {} - -// Fee includes the amount of coins paid in fees and the maximum -// gas to be used by the transaction. The ratio yields an effective "gasprice", -// which must be above some miminum to be accepted into the mempool. -type Fee struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // amount is the amount of coins to be paid as a fee - Amount []*v1beta12.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` - // gas_limit is the maximum gas that can be used in transaction processing - // before an out of gas error occurs - GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - // the payer must be a tx signer (and thus have signed this field in AuthInfo). - // setting this field does *not* change the ordering of required signers for the transaction. - Payer string `protobuf:"bytes,3,opt,name=payer,proto3" json:"payer,omitempty"` - // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - // not support fee grants, this will fail - Granter string `protobuf:"bytes,4,opt,name=granter,proto3" json:"granter,omitempty"` -} - -func (x *Fee) Reset() { - *x = Fee{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Fee) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fee) ProtoMessage() {} - -// Deprecated: Use Fee.ProtoReflect.Descriptor instead. -func (*Fee) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *Fee) GetAmount() []*v1beta12.Coin { - if x != nil { - return x.Amount - } - return nil -} - -func (x *Fee) GetGasLimit() uint64 { - if x != nil { - return x.GasLimit - } - return 0 -} - -func (x *Fee) GetPayer() string { - if x != nil { - return x.Payer - } - return "" -} - -func (x *Fee) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -// Tip is the tip used for meta-transactions. -// -// Since: cosmos-sdk 0.46 -type Tip struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // amount is the amount of the tip - Amount []*v1beta12.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` - // tipper is the address of the account paying for the tip - Tipper string `protobuf:"bytes,2,opt,name=tipper,proto3" json:"tipper,omitempty"` -} - -func (x *Tip) Reset() { - *x = Tip{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tip) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tip) ProtoMessage() {} - -// Deprecated: Use Tip.ProtoReflect.Descriptor instead. -func (*Tip) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{9} -} - -func (x *Tip) GetAmount() []*v1beta12.Coin { - if x != nil { - return x.Amount - } - return nil -} - -func (x *Tip) GetTipper() string { - if x != nil { - return x.Tipper - } - return "" -} - -// AuxSignerData is the intermediary format that an auxiliary signer (e.g. a -// tipper) builds and sends to the fee payer (who will build and broadcast the -// actual tx). AuxSignerData is not a valid tx in itself, and will be rejected -// by the node if sent directly as-is. -// -// Since: cosmos-sdk 0.46 -type AuxSignerData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the bech32-encoded address of the auxiliary signer. If using - // AuxSignerData across different chains, the bech32 prefix of the target - // chain (where the final transaction is broadcasted) should be used. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // sign_doc is the SIGN_MOD_DIRECT_AUX sign doc that the auxiliary signer - // signs. Note: we use the same sign doc even if we're signing with - // LEGACY_AMINO_JSON. - SignDoc *SignDocDirectAux `protobuf:"bytes,2,opt,name=sign_doc,json=signDoc,proto3" json:"sign_doc,omitempty"` - // mode is the signing mode of the single signer - Mode v1beta1.SignMode `protobuf:"varint,3,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` - // sig is the signature of the sign doc. - Sig []byte `protobuf:"bytes,4,opt,name=sig,proto3" json:"sig,omitempty"` -} - -func (x *AuxSignerData) Reset() { - *x = AuxSignerData{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuxSignerData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuxSignerData) ProtoMessage() {} - -// Deprecated: Use AuxSignerData.ProtoReflect.Descriptor instead. -func (*AuxSignerData) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *AuxSignerData) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *AuxSignerData) GetSignDoc() *SignDocDirectAux { - if x != nil { - return x.SignDoc - } - return nil -} - -func (x *AuxSignerData) GetMode() v1beta1.SignMode { - if x != nil { - return x.Mode - } - return v1beta1.SignMode(0) -} - -func (x *AuxSignerData) GetSig() []byte { - if x != nil { - return x.Sig - } - return nil -} - -// Single is the mode info for a single signer. It is structured as a message -// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the -// future -type ModeInfo_Single struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // mode is the signing mode of the single signer - Mode v1beta1.SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` -} - -func (x *ModeInfo_Single) Reset() { - *x = ModeInfo_Single{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModeInfo_Single) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModeInfo_Single) ProtoMessage() {} - -// Deprecated: Use ModeInfo_Single.ProtoReflect.Descriptor instead. -func (*ModeInfo_Single) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *ModeInfo_Single) GetMode() v1beta1.SignMode { - if x != nil { - return x.Mode - } - return v1beta1.SignMode(0) -} - -// Multi is the mode info for a multisig public key -type ModeInfo_Multi struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bitarray specifies which keys within the multisig are signing - Bitarray *v1beta11.CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"` - // mode_infos is the corresponding modes of the signers of the multisig - // which could include nested multisig public keys - ModeInfos []*ModeInfo `protobuf:"bytes,2,rep,name=mode_infos,json=modeInfos,proto3" json:"mode_infos,omitempty"` -} - -func (x *ModeInfo_Multi) Reset() { - *x = ModeInfo_Multi{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_tx_v1beta1_tx_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModeInfo_Multi) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModeInfo_Multi) ProtoMessage() {} - -// Deprecated: Use ModeInfo_Multi.ProtoReflect.Descriptor instead. -func (*ModeInfo_Multi) Descriptor() ([]byte, []int) { - return file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *ModeInfo_Multi) GetBitarray() *v1beta11.CompactBitArray { - if x != nil { - return x.Bitarray - } - return nil -} - -func (x *ModeInfo_Multi) GetModeInfos() []*ModeInfo { - if x != nil { - return x.ModeInfos - } - return nil -} - -var File_cosmos_tx_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_tx_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, - 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, - 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x02, 0x54, 0x78, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x22, 0x6e, 0x0a, 0x05, 0x54, 0x78, 0x52, 0x61, 0x77, 0x12, 0x1d, 0x0a, 0x0a, - 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, - 0x75, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x26, - 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x67, - 0x6e, 0x44, 0x6f, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x12, 0x1d, 0x0a, - 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0a, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 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, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x28, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x54, 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, 0x95, 0x02, 0x0a, 0x06, 0x54, 0x78, - 0x42, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x52, 0x08, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x07, 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, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x1e, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, - 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x0f, 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, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, - 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x40, - 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x12, 0x28, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x28, 0x0a, 0x03, 0x74, 0x69, - 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x52, - 0x03, 0x74, 0x69, 0x70, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 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, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xe0, - 0x02, 0x0a, 0x08, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3c, 0x0a, 0x06, 0x73, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x48, - 0x00, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x48, 0x00, 0x52, 0x05, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x1a, 0x41, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x37, - 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, - 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0x90, 0x01, 0x0a, 0x05, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x12, 0x4b, 0x0a, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x42, 0x69, 0x74, 0x41, - 0x72, 0x72, 0x61, 0x79, 0x52, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x3a, - 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, - 0x6d, 0x22, 0xeb, 0x01, 0x0a, 0x03, 0x46, 0x65, 0x65, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x70, - 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 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, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, - 0x9c, 0x01, 0x0a, 0x03, 0x54, 0x69, 0x70, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, - 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x22, 0xce, - 0x01, 0x0a, 0x0d, 0x41, 0x75, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, - 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, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x64, 0x6f, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x44, - 0x6f, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x52, 0x07, 0x73, 0x69, 0x67, - 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x73, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x42, - 0xc4, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, - 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_tx_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_tx_v1beta1_tx_proto_rawDescData = file_cosmos_tx_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_tx_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_tx_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_tx_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_tx_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_tx_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_tx_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_cosmos_tx_v1beta1_tx_proto_goTypes = []interface{}{ - (*Tx)(nil), // 0: cosmos.tx.v1beta1.Tx - (*TxRaw)(nil), // 1: cosmos.tx.v1beta1.TxRaw - (*SignDoc)(nil), // 2: cosmos.tx.v1beta1.SignDoc - (*SignDocDirectAux)(nil), // 3: cosmos.tx.v1beta1.SignDocDirectAux - (*TxBody)(nil), // 4: cosmos.tx.v1beta1.TxBody - (*AuthInfo)(nil), // 5: cosmos.tx.v1beta1.AuthInfo - (*SignerInfo)(nil), // 6: cosmos.tx.v1beta1.SignerInfo - (*ModeInfo)(nil), // 7: cosmos.tx.v1beta1.ModeInfo - (*Fee)(nil), // 8: cosmos.tx.v1beta1.Fee - (*Tip)(nil), // 9: cosmos.tx.v1beta1.Tip - (*AuxSignerData)(nil), // 10: cosmos.tx.v1beta1.AuxSignerData - (*ModeInfo_Single)(nil), // 11: cosmos.tx.v1beta1.ModeInfo.Single - (*ModeInfo_Multi)(nil), // 12: cosmos.tx.v1beta1.ModeInfo.Multi - (*anypb.Any)(nil), // 13: google.protobuf.Any - (*v1beta12.Coin)(nil), // 14: cosmos.base.v1beta1.Coin - (v1beta1.SignMode)(0), // 15: cosmos.tx.signing.v1beta1.SignMode - (*v1beta11.CompactBitArray)(nil), // 16: cosmos.crypto.multisig.v1beta1.CompactBitArray -} -var file_cosmos_tx_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.tx.v1beta1.Tx.body:type_name -> cosmos.tx.v1beta1.TxBody - 5, // 1: cosmos.tx.v1beta1.Tx.auth_info:type_name -> cosmos.tx.v1beta1.AuthInfo - 13, // 2: cosmos.tx.v1beta1.SignDocDirectAux.public_key:type_name -> google.protobuf.Any - 9, // 3: cosmos.tx.v1beta1.SignDocDirectAux.tip:type_name -> cosmos.tx.v1beta1.Tip - 13, // 4: cosmos.tx.v1beta1.TxBody.messages:type_name -> google.protobuf.Any - 13, // 5: cosmos.tx.v1beta1.TxBody.extension_options:type_name -> google.protobuf.Any - 13, // 6: cosmos.tx.v1beta1.TxBody.non_critical_extension_options:type_name -> google.protobuf.Any - 6, // 7: cosmos.tx.v1beta1.AuthInfo.signer_infos:type_name -> cosmos.tx.v1beta1.SignerInfo - 8, // 8: cosmos.tx.v1beta1.AuthInfo.fee:type_name -> cosmos.tx.v1beta1.Fee - 9, // 9: cosmos.tx.v1beta1.AuthInfo.tip:type_name -> cosmos.tx.v1beta1.Tip - 13, // 10: cosmos.tx.v1beta1.SignerInfo.public_key:type_name -> google.protobuf.Any - 7, // 11: cosmos.tx.v1beta1.SignerInfo.mode_info:type_name -> cosmos.tx.v1beta1.ModeInfo - 11, // 12: cosmos.tx.v1beta1.ModeInfo.single:type_name -> cosmos.tx.v1beta1.ModeInfo.Single - 12, // 13: cosmos.tx.v1beta1.ModeInfo.multi:type_name -> cosmos.tx.v1beta1.ModeInfo.Multi - 14, // 14: cosmos.tx.v1beta1.Fee.amount:type_name -> cosmos.base.v1beta1.Coin - 14, // 15: cosmos.tx.v1beta1.Tip.amount:type_name -> cosmos.base.v1beta1.Coin - 3, // 16: cosmos.tx.v1beta1.AuxSignerData.sign_doc:type_name -> cosmos.tx.v1beta1.SignDocDirectAux - 15, // 17: cosmos.tx.v1beta1.AuxSignerData.mode:type_name -> cosmos.tx.signing.v1beta1.SignMode - 15, // 18: cosmos.tx.v1beta1.ModeInfo.Single.mode:type_name -> cosmos.tx.signing.v1beta1.SignMode - 16, // 19: cosmos.tx.v1beta1.ModeInfo.Multi.bitarray:type_name -> cosmos.crypto.multisig.v1beta1.CompactBitArray - 7, // 20: cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos:type_name -> cosmos.tx.v1beta1.ModeInfo - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_cosmos_tx_v1beta1_tx_proto_init() } -func file_cosmos_tx_v1beta1_tx_proto_init() { - if File_cosmos_tx_v1beta1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_tx_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxRaw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignDoc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignDocDirectAux); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fee); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tip); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuxSignerData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModeInfo_Single); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModeInfo_Multi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cosmos_tx_v1beta1_tx_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*ModeInfo_Single_)(nil), - (*ModeInfo_Multi_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_tx_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_tx_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_tx_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_tx_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_tx_v1beta1_tx_proto = out.File - file_cosmos_tx_v1beta1_tx_proto_rawDesc = nil - file_cosmos_tx_v1beta1_tx_proto_goTypes = nil - file_cosmos_tx_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/upgrade/v1beta1/query.pulsar.go b/api/cosmos/upgrade/v1beta1/query.pulsar.go deleted file mode 100644 index 742960c8a6e0..000000000000 --- a/api/cosmos/upgrade/v1beta1/query.pulsar.go +++ /dev/null @@ -1,4849 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package upgradev1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryCurrentPlanRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryCurrentPlanRequest = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryCurrentPlanRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryCurrentPlanRequest)(nil) - -type fastReflection_QueryCurrentPlanRequest QueryCurrentPlanRequest - -func (x *QueryCurrentPlanRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCurrentPlanRequest)(x) -} - -func (x *QueryCurrentPlanRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCurrentPlanRequest_messageType fastReflection_QueryCurrentPlanRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryCurrentPlanRequest_messageType{} - -type fastReflection_QueryCurrentPlanRequest_messageType struct{} - -func (x fastReflection_QueryCurrentPlanRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCurrentPlanRequest)(nil) -} -func (x fastReflection_QueryCurrentPlanRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCurrentPlanRequest) -} -func (x fastReflection_QueryCurrentPlanRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentPlanRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCurrentPlanRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentPlanRequest -} - -// 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_QueryCurrentPlanRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryCurrentPlanRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCurrentPlanRequest) New() protoreflect.Message { - return new(fastReflection_QueryCurrentPlanRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCurrentPlanRequest) Interface() protoreflect.ProtoMessage { - return (*QueryCurrentPlanRequest)(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_QueryCurrentPlanRequest) 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_QueryCurrentPlanRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanRequest 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_QueryCurrentPlanRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanRequest 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_QueryCurrentPlanRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanRequest 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_QueryCurrentPlanRequest) 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.upgrade.v1beta1.QueryCurrentPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanRequest 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_QueryCurrentPlanRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanRequest 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_QueryCurrentPlanRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanRequest 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_QueryCurrentPlanRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", 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_QueryCurrentPlanRequest) 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_QueryCurrentPlanRequest) 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_QueryCurrentPlanRequest) 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_QueryCurrentPlanRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCurrentPlanRequest) - 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().(*QueryCurrentPlanRequest) - 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().(*QueryCurrentPlanRequest) - 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: QueryCurrentPlanRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentPlanRequest: 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_QueryCurrentPlanResponse protoreflect.MessageDescriptor - fd_QueryCurrentPlanResponse_plan protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryCurrentPlanResponse = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryCurrentPlanResponse") - fd_QueryCurrentPlanResponse_plan = md_QueryCurrentPlanResponse.Fields().ByName("plan") -} - -var _ protoreflect.Message = (*fastReflection_QueryCurrentPlanResponse)(nil) - -type fastReflection_QueryCurrentPlanResponse QueryCurrentPlanResponse - -func (x *QueryCurrentPlanResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCurrentPlanResponse)(x) -} - -func (x *QueryCurrentPlanResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCurrentPlanResponse_messageType fastReflection_QueryCurrentPlanResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryCurrentPlanResponse_messageType{} - -type fastReflection_QueryCurrentPlanResponse_messageType struct{} - -func (x fastReflection_QueryCurrentPlanResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCurrentPlanResponse)(nil) -} -func (x fastReflection_QueryCurrentPlanResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCurrentPlanResponse) -} -func (x fastReflection_QueryCurrentPlanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentPlanResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCurrentPlanResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentPlanResponse -} - -// 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_QueryCurrentPlanResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryCurrentPlanResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCurrentPlanResponse) New() protoreflect.Message { - return new(fastReflection_QueryCurrentPlanResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCurrentPlanResponse) Interface() protoreflect.ProtoMessage { - return (*QueryCurrentPlanResponse)(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_QueryCurrentPlanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Plan != nil { - value := protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) - if !f(fd_QueryCurrentPlanResponse_plan, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryCurrentPlanResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan": - return x.Plan != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanResponse 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_QueryCurrentPlanResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan": - x.Plan = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanResponse 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_QueryCurrentPlanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan": - value := x.Plan - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanResponse 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_QueryCurrentPlanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan": - x.Plan = value.Message().Interface().(*Plan) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanResponse 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_QueryCurrentPlanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan": - if x.Plan == nil { - x.Plan = new(Plan) - } - return protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanResponse 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_QueryCurrentPlanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan": - m := new(Plan) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryCurrentPlanResponse 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_QueryCurrentPlanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", 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_QueryCurrentPlanResponse) 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_QueryCurrentPlanResponse) 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_QueryCurrentPlanResponse) 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_QueryCurrentPlanResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCurrentPlanResponse) - 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.Plan != nil { - l = options.Size(x.Plan) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCurrentPlanResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Plan != nil { - encoded, err := options.Marshal(x.Plan) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 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().(*QueryCurrentPlanResponse) - 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: QueryCurrentPlanResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentPlanResponse: 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 Plan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Plan == nil { - x.Plan = &Plan{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Plan); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAppliedPlanRequest protoreflect.MessageDescriptor - fd_QueryAppliedPlanRequest_name protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryAppliedPlanRequest = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryAppliedPlanRequest") - fd_QueryAppliedPlanRequest_name = md_QueryAppliedPlanRequest.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_QueryAppliedPlanRequest)(nil) - -type fastReflection_QueryAppliedPlanRequest QueryAppliedPlanRequest - -func (x *QueryAppliedPlanRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAppliedPlanRequest)(x) -} - -func (x *QueryAppliedPlanRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAppliedPlanRequest_messageType fastReflection_QueryAppliedPlanRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAppliedPlanRequest_messageType{} - -type fastReflection_QueryAppliedPlanRequest_messageType struct{} - -func (x fastReflection_QueryAppliedPlanRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAppliedPlanRequest)(nil) -} -func (x fastReflection_QueryAppliedPlanRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAppliedPlanRequest) -} -func (x fastReflection_QueryAppliedPlanRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAppliedPlanRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAppliedPlanRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAppliedPlanRequest -} - -// 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_QueryAppliedPlanRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAppliedPlanRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAppliedPlanRequest) New() protoreflect.Message { - return new(fastReflection_QueryAppliedPlanRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAppliedPlanRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAppliedPlanRequest)(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_QueryAppliedPlanRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_QueryAppliedPlanRequest_name, 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_QueryAppliedPlanRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest 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_QueryAppliedPlanRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest 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_QueryAppliedPlanRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest 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_QueryAppliedPlanRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest 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_QueryAppliedPlanRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.name": - panic(fmt.Errorf("field name of message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest 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_QueryAppliedPlanRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanRequest 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_QueryAppliedPlanRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", 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_QueryAppliedPlanRequest) 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_QueryAppliedPlanRequest) 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_QueryAppliedPlanRequest) 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_QueryAppliedPlanRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAppliedPlanRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAppliedPlanRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.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 { - 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().(*QueryAppliedPlanRequest) - 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: QueryAppliedPlanRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAppliedPlanRequest: 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:]) - 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_QueryAppliedPlanResponse protoreflect.MessageDescriptor - fd_QueryAppliedPlanResponse_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryAppliedPlanResponse = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryAppliedPlanResponse") - fd_QueryAppliedPlanResponse_height = md_QueryAppliedPlanResponse.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_QueryAppliedPlanResponse)(nil) - -type fastReflection_QueryAppliedPlanResponse QueryAppliedPlanResponse - -func (x *QueryAppliedPlanResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAppliedPlanResponse)(x) -} - -func (x *QueryAppliedPlanResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAppliedPlanResponse_messageType fastReflection_QueryAppliedPlanResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAppliedPlanResponse_messageType{} - -type fastReflection_QueryAppliedPlanResponse_messageType struct{} - -func (x fastReflection_QueryAppliedPlanResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAppliedPlanResponse)(nil) -} -func (x fastReflection_QueryAppliedPlanResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAppliedPlanResponse) -} -func (x fastReflection_QueryAppliedPlanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAppliedPlanResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAppliedPlanResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAppliedPlanResponse -} - -// 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_QueryAppliedPlanResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAppliedPlanResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAppliedPlanResponse) New() protoreflect.Message { - return new(fastReflection_QueryAppliedPlanResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAppliedPlanResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAppliedPlanResponse)(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_QueryAppliedPlanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_QueryAppliedPlanResponse_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAppliedPlanResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.height": - return x.Height != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse 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_QueryAppliedPlanResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.height": - x.Height = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse 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_QueryAppliedPlanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse 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_QueryAppliedPlanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.height": - x.Height = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse 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_QueryAppliedPlanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.height": - panic(fmt.Errorf("field height of message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse 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_QueryAppliedPlanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAppliedPlanResponse 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_QueryAppliedPlanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", 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_QueryAppliedPlanResponse) 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_QueryAppliedPlanResponse) 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_QueryAppliedPlanResponse) 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_QueryAppliedPlanResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAppliedPlanResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if 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().(*QueryAppliedPlanResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAppliedPlanResponse) - 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: QueryAppliedPlanResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAppliedPlanResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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_QueryUpgradedConsensusStateRequest protoreflect.MessageDescriptor - fd_QueryUpgradedConsensusStateRequest_last_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryUpgradedConsensusStateRequest = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryUpgradedConsensusStateRequest") - fd_QueryUpgradedConsensusStateRequest_last_height = md_QueryUpgradedConsensusStateRequest.Fields().ByName("last_height") -} - -var _ protoreflect.Message = (*fastReflection_QueryUpgradedConsensusStateRequest)(nil) - -type fastReflection_QueryUpgradedConsensusStateRequest QueryUpgradedConsensusStateRequest - -func (x *QueryUpgradedConsensusStateRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryUpgradedConsensusStateRequest)(x) -} - -func (x *QueryUpgradedConsensusStateRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryUpgradedConsensusStateRequest_messageType fastReflection_QueryUpgradedConsensusStateRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryUpgradedConsensusStateRequest_messageType{} - -type fastReflection_QueryUpgradedConsensusStateRequest_messageType struct{} - -func (x fastReflection_QueryUpgradedConsensusStateRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryUpgradedConsensusStateRequest)(nil) -} -func (x fastReflection_QueryUpgradedConsensusStateRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryUpgradedConsensusStateRequest) -} -func (x fastReflection_QueryUpgradedConsensusStateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUpgradedConsensusStateRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryUpgradedConsensusStateRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUpgradedConsensusStateRequest -} - -// 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_QueryUpgradedConsensusStateRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryUpgradedConsensusStateRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryUpgradedConsensusStateRequest) New() protoreflect.Message { - return new(fastReflection_QueryUpgradedConsensusStateRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryUpgradedConsensusStateRequest) Interface() protoreflect.ProtoMessage { - return (*QueryUpgradedConsensusStateRequest)(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_QueryUpgradedConsensusStateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.LastHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.LastHeight) - if !f(fd_QueryUpgradedConsensusStateRequest_last_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryUpgradedConsensusStateRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.last_height": - return x.LastHeight != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest 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_QueryUpgradedConsensusStateRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.last_height": - x.LastHeight = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest 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_QueryUpgradedConsensusStateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.last_height": - value := x.LastHeight - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest 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_QueryUpgradedConsensusStateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.last_height": - x.LastHeight = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest 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_QueryUpgradedConsensusStateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.last_height": - panic(fmt.Errorf("field last_height of message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest 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_QueryUpgradedConsensusStateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.last_height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest 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_QueryUpgradedConsensusStateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", 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_QueryUpgradedConsensusStateRequest) 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_QueryUpgradedConsensusStateRequest) 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_QueryUpgradedConsensusStateRequest) 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_QueryUpgradedConsensusStateRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryUpgradedConsensusStateRequest) - 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.LastHeight != 0 { - n += 1 + runtime.Sov(uint64(x.LastHeight)) - } - 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().(*QueryUpgradedConsensusStateRequest) - 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.LastHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.LastHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryUpgradedConsensusStateRequest) - 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: QueryUpgradedConsensusStateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUpgradedConsensusStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastHeight", wireType) - } - x.LastHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.LastHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryUpgradedConsensusStateResponse protoreflect.MessageDescriptor - fd_QueryUpgradedConsensusStateResponse_upgraded_consensus_state protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryUpgradedConsensusStateResponse = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryUpgradedConsensusStateResponse") - fd_QueryUpgradedConsensusStateResponse_upgraded_consensus_state = md_QueryUpgradedConsensusStateResponse.Fields().ByName("upgraded_consensus_state") -} - -var _ protoreflect.Message = (*fastReflection_QueryUpgradedConsensusStateResponse)(nil) - -type fastReflection_QueryUpgradedConsensusStateResponse QueryUpgradedConsensusStateResponse - -func (x *QueryUpgradedConsensusStateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryUpgradedConsensusStateResponse)(x) -} - -func (x *QueryUpgradedConsensusStateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_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_QueryUpgradedConsensusStateResponse_messageType fastReflection_QueryUpgradedConsensusStateResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryUpgradedConsensusStateResponse_messageType{} - -type fastReflection_QueryUpgradedConsensusStateResponse_messageType struct{} - -func (x fastReflection_QueryUpgradedConsensusStateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryUpgradedConsensusStateResponse)(nil) -} -func (x fastReflection_QueryUpgradedConsensusStateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryUpgradedConsensusStateResponse) -} -func (x fastReflection_QueryUpgradedConsensusStateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUpgradedConsensusStateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryUpgradedConsensusStateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryUpgradedConsensusStateResponse -} - -// 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_QueryUpgradedConsensusStateResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryUpgradedConsensusStateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryUpgradedConsensusStateResponse) New() protoreflect.Message { - return new(fastReflection_QueryUpgradedConsensusStateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryUpgradedConsensusStateResponse) Interface() protoreflect.ProtoMessage { - return (*QueryUpgradedConsensusStateResponse)(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_QueryUpgradedConsensusStateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.UpgradedConsensusState) != 0 { - value := protoreflect.ValueOfBytes(x.UpgradedConsensusState) - if !f(fd_QueryUpgradedConsensusStateResponse_upgraded_consensus_state, 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_QueryUpgradedConsensusStateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state": - return len(x.UpgradedConsensusState) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse 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_QueryUpgradedConsensusStateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state": - x.UpgradedConsensusState = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse 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_QueryUpgradedConsensusStateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state": - value := x.UpgradedConsensusState - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse 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_QueryUpgradedConsensusStateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state": - x.UpgradedConsensusState = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse 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_QueryUpgradedConsensusStateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state": - panic(fmt.Errorf("field upgraded_consensus_state of message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse 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_QueryUpgradedConsensusStateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse 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_QueryUpgradedConsensusStateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", 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_QueryUpgradedConsensusStateResponse) 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_QueryUpgradedConsensusStateResponse) 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_QueryUpgradedConsensusStateResponse) 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_QueryUpgradedConsensusStateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryUpgradedConsensusStateResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.UpgradedConsensusState) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryUpgradedConsensusStateResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.UpgradedConsensusState) > 0 { - i -= len(x.UpgradedConsensusState) - copy(dAtA[i:], x.UpgradedConsensusState) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UpgradedConsensusState))) - i-- - dAtA[i] = 0x12 - } - 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().(*QueryUpgradedConsensusStateResponse) - 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: QueryUpgradedConsensusStateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUpgradedConsensusStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpgradedConsensusState", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UpgradedConsensusState = append(x.UpgradedConsensusState[:0], dAtA[iNdEx:postIndex]...) - if x.UpgradedConsensusState == nil { - x.UpgradedConsensusState = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryModuleVersionsRequest protoreflect.MessageDescriptor - fd_QueryModuleVersionsRequest_module_name protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryModuleVersionsRequest = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryModuleVersionsRequest") - fd_QueryModuleVersionsRequest_module_name = md_QueryModuleVersionsRequest.Fields().ByName("module_name") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleVersionsRequest)(nil) - -type fastReflection_QueryModuleVersionsRequest QueryModuleVersionsRequest - -func (x *QueryModuleVersionsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleVersionsRequest)(x) -} - -func (x *QueryModuleVersionsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_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_QueryModuleVersionsRequest_messageType fastReflection_QueryModuleVersionsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleVersionsRequest_messageType{} - -type fastReflection_QueryModuleVersionsRequest_messageType struct{} - -func (x fastReflection_QueryModuleVersionsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleVersionsRequest)(nil) -} -func (x fastReflection_QueryModuleVersionsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleVersionsRequest) -} -func (x fastReflection_QueryModuleVersionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleVersionsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleVersionsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleVersionsRequest -} - -// 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_QueryModuleVersionsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleVersionsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleVersionsRequest) New() protoreflect.Message { - return new(fastReflection_QueryModuleVersionsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleVersionsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryModuleVersionsRequest)(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_QueryModuleVersionsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ModuleName != "" { - value := protoreflect.ValueOfString(x.ModuleName) - if !f(fd_QueryModuleVersionsRequest_module_name, 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_QueryModuleVersionsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.module_name": - return x.ModuleName != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest 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_QueryModuleVersionsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.module_name": - x.ModuleName = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest 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_QueryModuleVersionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.module_name": - value := x.ModuleName - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest 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_QueryModuleVersionsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.module_name": - x.ModuleName = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest 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_QueryModuleVersionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.module_name": - panic(fmt.Errorf("field module_name of message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest 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_QueryModuleVersionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest.module_name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsRequest 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_QueryModuleVersionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", 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_QueryModuleVersionsRequest) 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_QueryModuleVersionsRequest) 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_QueryModuleVersionsRequest) 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_QueryModuleVersionsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleVersionsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ModuleName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleVersionsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ModuleName) > 0 { - i -= len(x.ModuleName) - copy(dAtA[i:], x.ModuleName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ModuleName))) - 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().(*QueryModuleVersionsRequest) - 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: QueryModuleVersionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleVersionsRequest: 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 ModuleName", 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.ModuleName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryModuleVersionsResponse_1_list)(nil) - -type _QueryModuleVersionsResponse_1_list struct { - list *[]*ModuleVersion -} - -func (x *_QueryModuleVersionsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryModuleVersionsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryModuleVersionsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModuleVersion) - (*x.list)[i] = concreteValue -} - -func (x *_QueryModuleVersionsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ModuleVersion) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryModuleVersionsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(ModuleVersion) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleVersionsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryModuleVersionsResponse_1_list) NewElement() protoreflect.Value { - v := new(ModuleVersion) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleVersionsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryModuleVersionsResponse protoreflect.MessageDescriptor - fd_QueryModuleVersionsResponse_module_versions protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryModuleVersionsResponse = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryModuleVersionsResponse") - fd_QueryModuleVersionsResponse_module_versions = md_QueryModuleVersionsResponse.Fields().ByName("module_versions") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleVersionsResponse)(nil) - -type fastReflection_QueryModuleVersionsResponse QueryModuleVersionsResponse - -func (x *QueryModuleVersionsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleVersionsResponse)(x) -} - -func (x *QueryModuleVersionsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryModuleVersionsResponse_messageType fastReflection_QueryModuleVersionsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleVersionsResponse_messageType{} - -type fastReflection_QueryModuleVersionsResponse_messageType struct{} - -func (x fastReflection_QueryModuleVersionsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleVersionsResponse)(nil) -} -func (x fastReflection_QueryModuleVersionsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleVersionsResponse) -} -func (x fastReflection_QueryModuleVersionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleVersionsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleVersionsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleVersionsResponse -} - -// 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_QueryModuleVersionsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleVersionsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleVersionsResponse) New() protoreflect.Message { - return new(fastReflection_QueryModuleVersionsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleVersionsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleVersionsResponse)(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_QueryModuleVersionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ModuleVersions) != 0 { - value := protoreflect.ValueOfList(&_QueryModuleVersionsResponse_1_list{list: &x.ModuleVersions}) - if !f(fd_QueryModuleVersionsResponse_module_versions, 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_QueryModuleVersionsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions": - return len(x.ModuleVersions) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsResponse 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_QueryModuleVersionsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions": - x.ModuleVersions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsResponse 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_QueryModuleVersionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions": - if len(x.ModuleVersions) == 0 { - return protoreflect.ValueOfList(&_QueryModuleVersionsResponse_1_list{}) - } - listValue := &_QueryModuleVersionsResponse_1_list{list: &x.ModuleVersions} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsResponse 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_QueryModuleVersionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions": - lv := value.List() - clv := lv.(*_QueryModuleVersionsResponse_1_list) - x.ModuleVersions = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsResponse 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_QueryModuleVersionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions": - if x.ModuleVersions == nil { - x.ModuleVersions = []*ModuleVersion{} - } - value := &_QueryModuleVersionsResponse_1_list{list: &x.ModuleVersions} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsResponse 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_QueryModuleVersionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions": - list := []*ModuleVersion{} - return protoreflect.ValueOfList(&_QueryModuleVersionsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryModuleVersionsResponse 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_QueryModuleVersionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", 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_QueryModuleVersionsResponse) 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_QueryModuleVersionsResponse) 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_QueryModuleVersionsResponse) 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_QueryModuleVersionsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleVersionsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.ModuleVersions) > 0 { - for _, e := range x.ModuleVersions { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleVersionsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ModuleVersions) > 0 { - for iNdEx := len(x.ModuleVersions) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ModuleVersions[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleVersionsResponse) - 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: QueryModuleVersionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleVersionsResponse: 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 ModuleVersions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ModuleVersions = append(x.ModuleVersions, &ModuleVersion{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ModuleVersions[len(x.ModuleVersions)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAuthorityRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryAuthorityRequest = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryAuthorityRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryAuthorityRequest)(nil) - -type fastReflection_QueryAuthorityRequest QueryAuthorityRequest - -func (x *QueryAuthorityRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAuthorityRequest)(x) -} - -func (x *QueryAuthorityRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAuthorityRequest_messageType fastReflection_QueryAuthorityRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAuthorityRequest_messageType{} - -type fastReflection_QueryAuthorityRequest_messageType struct{} - -func (x fastReflection_QueryAuthorityRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAuthorityRequest)(nil) -} -func (x fastReflection_QueryAuthorityRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAuthorityRequest) -} -func (x fastReflection_QueryAuthorityRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAuthorityRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAuthorityRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAuthorityRequest -} - -// 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_QueryAuthorityRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAuthorityRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAuthorityRequest) New() protoreflect.Message { - return new(fastReflection_QueryAuthorityRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAuthorityRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAuthorityRequest)(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_QueryAuthorityRequest) 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_QueryAuthorityRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) 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.upgrade.v1beta1.QueryAuthorityRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryAuthorityRequest", 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_QueryAuthorityRequest) 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_QueryAuthorityRequest) 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_QueryAuthorityRequest) 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_QueryAuthorityRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAuthorityRequest) - 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().(*QueryAuthorityRequest) - 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().(*QueryAuthorityRequest) - 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: QueryAuthorityRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAuthorityRequest: 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_QueryAuthorityResponse protoreflect.MessageDescriptor - fd_QueryAuthorityResponse_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_query_proto_init() - md_QueryAuthorityResponse = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryAuthorityResponse") - fd_QueryAuthorityResponse_address = md_QueryAuthorityResponse.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_QueryAuthorityResponse)(nil) - -type fastReflection_QueryAuthorityResponse QueryAuthorityResponse - -func (x *QueryAuthorityResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAuthorityResponse)(x) -} - -func (x *QueryAuthorityResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAuthorityResponse_messageType fastReflection_QueryAuthorityResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAuthorityResponse_messageType{} - -type fastReflection_QueryAuthorityResponse_messageType struct{} - -func (x fastReflection_QueryAuthorityResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAuthorityResponse)(nil) -} -func (x fastReflection_QueryAuthorityResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAuthorityResponse) -} -func (x fastReflection_QueryAuthorityResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAuthorityResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAuthorityResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAuthorityResponse -} - -// 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_QueryAuthorityResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAuthorityResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAuthorityResponse) New() protoreflect.Message { - return new(fastReflection_QueryAuthorityResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAuthorityResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAuthorityResponse)(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_QueryAuthorityResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAuthorityResponse_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAuthorityResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": - panic(fmt.Errorf("field address of message cosmos.upgrade.v1beta1.QueryAuthorityResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryAuthorityResponse", 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_QueryAuthorityResponse) 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_QueryAuthorityResponse) 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_QueryAuthorityResponse) 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_QueryAuthorityResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAuthorityResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*QueryAuthorityResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAuthorityResponse) - 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: QueryAuthorityResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAuthorityResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/upgrade/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -// method. -type QueryCurrentPlanRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryCurrentPlanRequest) Reset() { - *x = QueryCurrentPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCurrentPlanRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCurrentPlanRequest) ProtoMessage() {} - -// Deprecated: Use QueryCurrentPlanRequest.ProtoReflect.Descriptor instead. -func (*QueryCurrentPlanRequest) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -// method. -type QueryCurrentPlanResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // plan is the current upgrade plan. - Plan *Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` -} - -func (x *QueryCurrentPlanResponse) Reset() { - *x = QueryCurrentPlanResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCurrentPlanResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCurrentPlanResponse) ProtoMessage() {} - -// Deprecated: Use QueryCurrentPlanResponse.ProtoReflect.Descriptor instead. -func (*QueryCurrentPlanResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryCurrentPlanResponse) GetPlan() *Plan { - if x != nil { - return x.Plan - } - return nil -} - -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -// method. -type QueryAppliedPlanRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is the name of the applied plan to query for. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *QueryAppliedPlanRequest) Reset() { - *x = QueryAppliedPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAppliedPlanRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAppliedPlanRequest) ProtoMessage() {} - -// Deprecated: Use QueryAppliedPlanRequest.ProtoReflect.Descriptor instead. -func (*QueryAppliedPlanRequest) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAppliedPlanRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -// method. -type QueryAppliedPlanResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // height is the block height at which the plan was applied. - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *QueryAppliedPlanResponse) Reset() { - *x = QueryAppliedPlanResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAppliedPlanResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAppliedPlanResponse) ProtoMessage() {} - -// Deprecated: Use QueryAppliedPlanResponse.ProtoReflect.Descriptor instead. -func (*QueryAppliedPlanResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryAppliedPlanResponse) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -// RPC method. -// -// Deprecated: Do not use. -type QueryUpgradedConsensusStateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // last height of the current chain must be sent in request - // as this is the height under which next consensus state is stored - LastHeight int64 `protobuf:"varint,1,opt,name=last_height,json=lastHeight,proto3" json:"last_height,omitempty"` -} - -func (x *QueryUpgradedConsensusStateRequest) Reset() { - *x = QueryUpgradedConsensusStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryUpgradedConsensusStateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryUpgradedConsensusStateRequest) ProtoMessage() {} - -// Deprecated: Use QueryUpgradedConsensusStateRequest.ProtoReflect.Descriptor instead. -func (*QueryUpgradedConsensusStateRequest) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 { - if x != nil { - return x.LastHeight - } - return 0 -} - -// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -// RPC method. -// -// Deprecated: Do not use. -type QueryUpgradedConsensusStateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Since: cosmos-sdk 0.43 - UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` -} - -func (x *QueryUpgradedConsensusStateResponse) Reset() { - *x = QueryUpgradedConsensusStateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryUpgradedConsensusStateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryUpgradedConsensusStateResponse) ProtoMessage() {} - -// Deprecated: Use QueryUpgradedConsensusStateResponse.ProtoReflect.Descriptor instead. -func (*QueryUpgradedConsensusStateResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() []byte { - if x != nil { - return x.UpgradedConsensusState - } - return nil -} - -// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryModuleVersionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module_name is a field to query a specific module - // consensus version from state. Leaving this empty will - // fetch the full list of module versions from state - ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` -} - -func (x *QueryModuleVersionsRequest) Reset() { - *x = QueryModuleVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleVersionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleVersionsRequest) ProtoMessage() {} - -// Deprecated: Use QueryModuleVersionsRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleVersionsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryModuleVersionsRequest) GetModuleName() string { - if x != nil { - return x.ModuleName - } - return "" -} - -// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryModuleVersionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module_versions is a list of module names with their consensus versions. - ModuleVersions []*ModuleVersion `protobuf:"bytes,1,rep,name=module_versions,json=moduleVersions,proto3" json:"module_versions,omitempty"` -} - -func (x *QueryModuleVersionsResponse) Reset() { - *x = QueryModuleVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleVersionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleVersionsResponse) ProtoMessage() {} - -// Deprecated: Use QueryModuleVersionsResponse.ProtoReflect.Descriptor instead. -func (*QueryModuleVersionsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryModuleVersionsResponse) GetModuleVersions() []*ModuleVersion { - if x != nil { - return x.ModuleVersions - } - return nil -} - -// QueryAuthorityRequest is the request type for Query/Authority -// -// Since: cosmos-sdk 0.46 -type QueryAuthorityRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryAuthorityRequest) Reset() { - *x = QueryAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAuthorityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAuthorityRequest) ProtoMessage() {} - -// Deprecated: Use QueryAuthorityRequest.ProtoReflect.Descriptor instead. -func (*QueryAuthorityRequest) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -// QueryAuthorityResponse is the response type for Query/Authority -// -// Since: cosmos-sdk 0.46 -type QueryAuthorityResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAuthorityResponse) Reset() { - *x = QueryAuthorityResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAuthorityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAuthorityResponse) ProtoMessage() {} - -// Deprecated: Use QueryAuthorityResponse.ProtoReflect.Descriptor instead. -func (*QueryAuthorityResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryAuthorityResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -var File_cosmos_upgrade_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_upgrade_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x19, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x18, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x2d, 0x0a, 0x17, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 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, 0x32, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x49, 0x0a, 0x22, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x69, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, - 0x0a, 0x18, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x16, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x4a, 0x04, 0x08, 0x01, - 0x10, 0x02, 0x22, 0x3d, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x6d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4e, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x0e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x32, 0x0a, 0x16, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xf4, 0x06, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6c, - 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0xa5, 0x01, 0x0a, 0x0b, 0x41, 0x70, 0x70, - 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, - 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, - 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x12, 0xdc, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x88, 0x02, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, - 0x3e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2f, 0x7b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, - 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, - 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x23, 0x12, 0x21, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x42, 0xea, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, 0xaa, - 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_upgrade_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_upgrade_v1beta1_query_proto_rawDescData = file_cosmos_upgrade_v1beta1_query_proto_rawDesc -) - -func file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_upgrade_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_upgrade_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_upgrade_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_upgrade_v1beta1_query_proto_rawDescData -} - -var file_cosmos_upgrade_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_cosmos_upgrade_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryCurrentPlanRequest)(nil), // 0: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest - (*QueryCurrentPlanResponse)(nil), // 1: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse - (*QueryAppliedPlanRequest)(nil), // 2: cosmos.upgrade.v1beta1.QueryAppliedPlanRequest - (*QueryAppliedPlanResponse)(nil), // 3: cosmos.upgrade.v1beta1.QueryAppliedPlanResponse - (*QueryUpgradedConsensusStateRequest)(nil), // 4: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest - (*QueryUpgradedConsensusStateResponse)(nil), // 5: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse - (*QueryModuleVersionsRequest)(nil), // 6: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest - (*QueryModuleVersionsResponse)(nil), // 7: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse - (*QueryAuthorityRequest)(nil), // 8: cosmos.upgrade.v1beta1.QueryAuthorityRequest - (*QueryAuthorityResponse)(nil), // 9: cosmos.upgrade.v1beta1.QueryAuthorityResponse - (*Plan)(nil), // 10: cosmos.upgrade.v1beta1.Plan - (*ModuleVersion)(nil), // 11: cosmos.upgrade.v1beta1.ModuleVersion -} -var file_cosmos_upgrade_v1beta1_query_proto_depIdxs = []int32{ - 10, // 0: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan:type_name -> cosmos.upgrade.v1beta1.Plan - 11, // 1: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions:type_name -> cosmos.upgrade.v1beta1.ModuleVersion - 0, // 2: cosmos.upgrade.v1beta1.Query.CurrentPlan:input_type -> cosmos.upgrade.v1beta1.QueryCurrentPlanRequest - 2, // 3: cosmos.upgrade.v1beta1.Query.AppliedPlan:input_type -> cosmos.upgrade.v1beta1.QueryAppliedPlanRequest - 4, // 4: cosmos.upgrade.v1beta1.Query.UpgradedConsensusState:input_type -> cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest - 6, // 5: cosmos.upgrade.v1beta1.Query.ModuleVersions:input_type -> cosmos.upgrade.v1beta1.QueryModuleVersionsRequest - 8, // 6: cosmos.upgrade.v1beta1.Query.Authority:input_type -> cosmos.upgrade.v1beta1.QueryAuthorityRequest - 1, // 7: cosmos.upgrade.v1beta1.Query.CurrentPlan:output_type -> cosmos.upgrade.v1beta1.QueryCurrentPlanResponse - 3, // 8: cosmos.upgrade.v1beta1.Query.AppliedPlan:output_type -> cosmos.upgrade.v1beta1.QueryAppliedPlanResponse - 5, // 9: cosmos.upgrade.v1beta1.Query.UpgradedConsensusState:output_type -> cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse - 7, // 10: cosmos.upgrade.v1beta1.Query.ModuleVersions:output_type -> cosmos.upgrade.v1beta1.QueryModuleVersionsResponse - 9, // 11: cosmos.upgrade.v1beta1.Query.Authority:output_type -> cosmos.upgrade.v1beta1.QueryAuthorityResponse - 7, // [7:12] is the sub-list for method output_type - 2, // [2:7] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_upgrade_v1beta1_query_proto_init() } -func file_cosmos_upgrade_v1beta1_query_proto_init() { - if File_cosmos_upgrade_v1beta1_query_proto != nil { - return - } - file_cosmos_upgrade_v1beta1_upgrade_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCurrentPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCurrentPlanResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAppliedPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAppliedPlanResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUpgradedConsensusStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUpgradedConsensusStateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAuthorityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_upgrade_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_upgrade_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_upgrade_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_upgrade_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_upgrade_v1beta1_query_proto = out.File - file_cosmos_upgrade_v1beta1_query_proto_rawDesc = nil - file_cosmos_upgrade_v1beta1_query_proto_goTypes = nil - file_cosmos_upgrade_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/upgrade/v1beta1/query_grpc.pb.go b/api/cosmos/upgrade/v1beta1/query_grpc.pb.go deleted file mode 100644 index 69626cd2fbdb..000000000000 --- a/api/cosmos/upgrade/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/upgrade/v1beta1/query.proto - -package upgradev1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // CurrentPlan queries the current upgrade plan. - CurrentPlan(ctx context.Context, in *QueryCurrentPlanRequest, opts ...grpc.CallOption) (*QueryCurrentPlanResponse, error) - // AppliedPlan queries a previously applied upgrade plan by its name. - AppliedPlan(ctx context.Context, in *QueryAppliedPlanRequest, opts ...grpc.CallOption) (*QueryAppliedPlanResponse, error) - // Deprecated: Do not use. - // UpgradedConsensusState queries the consensus state that will serve - // as a trusted kernel for the next version of this chain. It will only be - // stored at the last height of this chain. - // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement - // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error) - // ModuleVersions queries the list of module versions from state. - // - // Since: cosmos-sdk 0.43 - ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error) - // Returns the account with authority to conduct upgrades - Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) CurrentPlan(ctx context.Context, in *QueryCurrentPlanRequest, opts ...grpc.CallOption) (*QueryCurrentPlanResponse, error) { - out := new(QueryCurrentPlanResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/CurrentPlan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AppliedPlan(ctx context.Context, in *QueryAppliedPlanRequest, opts ...grpc.CallOption) (*QueryAppliedPlanResponse, error) { - out := new(QueryAppliedPlanResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/AppliedPlan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Deprecated: Do not use. -func (c *queryClient) UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error) { - out := new(QueryUpgradedConsensusStateResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error) { - out := new(QueryModuleVersionsResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/ModuleVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) { - out := new(QueryAuthorityResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/Authority", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // CurrentPlan queries the current upgrade plan. - CurrentPlan(context.Context, *QueryCurrentPlanRequest) (*QueryCurrentPlanResponse, error) - // AppliedPlan queries a previously applied upgrade plan by its name. - AppliedPlan(context.Context, *QueryAppliedPlanRequest) (*QueryAppliedPlanResponse, error) - // Deprecated: Do not use. - // UpgradedConsensusState queries the consensus state that will serve - // as a trusted kernel for the next version of this chain. It will only be - // stored at the last height of this chain. - // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement - // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - UpgradedConsensusState(context.Context, *QueryUpgradedConsensusStateRequest) (*QueryUpgradedConsensusStateResponse, error) - // ModuleVersions queries the list of module versions from state. - // - // Since: cosmos-sdk 0.43 - ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) - // Returns the account with authority to conduct upgrades - Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) CurrentPlan(context.Context, *QueryCurrentPlanRequest) (*QueryCurrentPlanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentPlan not implemented") -} -func (UnimplementedQueryServer) AppliedPlan(context.Context, *QueryAppliedPlanRequest) (*QueryAppliedPlanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppliedPlan not implemented") -} -func (UnimplementedQueryServer) UpgradedConsensusState(context.Context, *QueryUpgradedConsensusStateRequest) (*QueryUpgradedConsensusStateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpgradedConsensusState not implemented") -} -func (UnimplementedQueryServer) ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleVersions not implemented") -} -func (UnimplementedQueryServer) Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authority not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_CurrentPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCurrentPlanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CurrentPlan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Query/CurrentPlan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CurrentPlan(ctx, req.(*QueryCurrentPlanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AppliedPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAppliedPlanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AppliedPlan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Query/AppliedPlan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AppliedPlan(ctx, req.(*QueryAppliedPlanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UpgradedConsensusState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUpgradedConsensusStateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UpgradedConsensusState(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UpgradedConsensusState(ctx, req.(*QueryUpgradedConsensusStateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Query/ModuleVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleVersions(ctx, req.(*QueryModuleVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Authority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAuthorityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Authority(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Query/Authority", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Authority(ctx, req.(*QueryAuthorityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.upgrade.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CurrentPlan", - Handler: _Query_CurrentPlan_Handler, - }, - { - MethodName: "AppliedPlan", - Handler: _Query_AppliedPlan_Handler, - }, - { - MethodName: "UpgradedConsensusState", - Handler: _Query_UpgradedConsensusState_Handler, - }, - { - MethodName: "ModuleVersions", - Handler: _Query_ModuleVersions_Handler, - }, - { - MethodName: "Authority", - Handler: _Query_Authority_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/upgrade/v1beta1/query.proto", -} diff --git a/api/cosmos/upgrade/v1beta1/tx.pulsar.go b/api/cosmos/upgrade/v1beta1/tx.pulsar.go deleted file mode 100644 index a042d5c25772..000000000000 --- a/api/cosmos/upgrade/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,1978 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package upgradev1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgSoftwareUpgrade protoreflect.MessageDescriptor - fd_MsgSoftwareUpgrade_authority protoreflect.FieldDescriptor - fd_MsgSoftwareUpgrade_plan protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_tx_proto_init() - md_MsgSoftwareUpgrade = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgSoftwareUpgrade") - fd_MsgSoftwareUpgrade_authority = md_MsgSoftwareUpgrade.Fields().ByName("authority") - fd_MsgSoftwareUpgrade_plan = md_MsgSoftwareUpgrade.Fields().ByName("plan") -} - -var _ protoreflect.Message = (*fastReflection_MsgSoftwareUpgrade)(nil) - -type fastReflection_MsgSoftwareUpgrade MsgSoftwareUpgrade - -func (x *MsgSoftwareUpgrade) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSoftwareUpgrade)(x) -} - -func (x *MsgSoftwareUpgrade) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSoftwareUpgrade_messageType fastReflection_MsgSoftwareUpgrade_messageType -var _ protoreflect.MessageType = fastReflection_MsgSoftwareUpgrade_messageType{} - -type fastReflection_MsgSoftwareUpgrade_messageType struct{} - -func (x fastReflection_MsgSoftwareUpgrade_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSoftwareUpgrade)(nil) -} -func (x fastReflection_MsgSoftwareUpgrade_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSoftwareUpgrade) -} -func (x fastReflection_MsgSoftwareUpgrade_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSoftwareUpgrade -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSoftwareUpgrade) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSoftwareUpgrade -} - -// 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_MsgSoftwareUpgrade) Type() protoreflect.MessageType { - return _fastReflection_MsgSoftwareUpgrade_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSoftwareUpgrade) New() protoreflect.Message { - return new(fastReflection_MsgSoftwareUpgrade) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSoftwareUpgrade) Interface() protoreflect.ProtoMessage { - return (*MsgSoftwareUpgrade)(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_MsgSoftwareUpgrade) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgSoftwareUpgrade_authority, value) { - return - } - } - if x.Plan != nil { - value := protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) - if !f(fd_MsgSoftwareUpgrade_plan, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSoftwareUpgrade) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": - return x.Authority != "" - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": - return x.Plan != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": - x.Authority = "" - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": - x.Plan = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": - value := x.Plan - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": - x.Authority = value.Interface().(string) - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": - x.Plan = value.Message().Interface().(*Plan) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": - if x.Plan == nil { - x.Plan = new(Plan) - } - return protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": - panic(fmt.Errorf("field authority of message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": - m := new(Plan) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", 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_MsgSoftwareUpgrade) 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_MsgSoftwareUpgrade) 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_MsgSoftwareUpgrade) 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_MsgSoftwareUpgrade) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSoftwareUpgrade) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Plan != nil { - l = options.Size(x.Plan) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSoftwareUpgrade) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Plan != nil { - encoded, err := options.Marshal(x.Plan) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSoftwareUpgrade) - 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: MsgSoftwareUpgrade: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSoftwareUpgrade: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Plan == nil { - x.Plan = &Plan{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Plan); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSoftwareUpgradeResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_tx_proto_init() - md_MsgSoftwareUpgradeResponse = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgSoftwareUpgradeResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSoftwareUpgradeResponse)(nil) - -type fastReflection_MsgSoftwareUpgradeResponse MsgSoftwareUpgradeResponse - -func (x *MsgSoftwareUpgradeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSoftwareUpgradeResponse)(x) -} - -func (x *MsgSoftwareUpgradeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSoftwareUpgradeResponse_messageType fastReflection_MsgSoftwareUpgradeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSoftwareUpgradeResponse_messageType{} - -type fastReflection_MsgSoftwareUpgradeResponse_messageType struct{} - -func (x fastReflection_MsgSoftwareUpgradeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSoftwareUpgradeResponse)(nil) -} -func (x fastReflection_MsgSoftwareUpgradeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSoftwareUpgradeResponse) -} -func (x fastReflection_MsgSoftwareUpgradeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSoftwareUpgradeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSoftwareUpgradeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSoftwareUpgradeResponse -} - -// 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_MsgSoftwareUpgradeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSoftwareUpgradeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSoftwareUpgradeResponse) New() protoreflect.Message { - return new(fastReflection_MsgSoftwareUpgradeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSoftwareUpgradeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSoftwareUpgradeResponse)(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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) 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.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", 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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSoftwareUpgradeResponse) - 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().(*MsgSoftwareUpgradeResponse) - 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().(*MsgSoftwareUpgradeResponse) - 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: MsgSoftwareUpgradeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSoftwareUpgradeResponse: 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_MsgCancelUpgrade protoreflect.MessageDescriptor - fd_MsgCancelUpgrade_authority protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_tx_proto_init() - md_MsgCancelUpgrade = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgCancelUpgrade") - fd_MsgCancelUpgrade_authority = md_MsgCancelUpgrade.Fields().ByName("authority") -} - -var _ protoreflect.Message = (*fastReflection_MsgCancelUpgrade)(nil) - -type fastReflection_MsgCancelUpgrade MsgCancelUpgrade - -func (x *MsgCancelUpgrade) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCancelUpgrade)(x) -} - -func (x *MsgCancelUpgrade) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCancelUpgrade_messageType fastReflection_MsgCancelUpgrade_messageType -var _ protoreflect.MessageType = fastReflection_MsgCancelUpgrade_messageType{} - -type fastReflection_MsgCancelUpgrade_messageType struct{} - -func (x fastReflection_MsgCancelUpgrade_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCancelUpgrade)(nil) -} -func (x fastReflection_MsgCancelUpgrade_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCancelUpgrade) -} -func (x fastReflection_MsgCancelUpgrade_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUpgrade -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCancelUpgrade) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUpgrade -} - -// 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_MsgCancelUpgrade) Type() protoreflect.MessageType { - return _fastReflection_MsgCancelUpgrade_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCancelUpgrade) New() protoreflect.Message { - return new(fastReflection_MsgCancelUpgrade) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCancelUpgrade) Interface() protoreflect.ProtoMessage { - return (*MsgCancelUpgrade)(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_MsgCancelUpgrade) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgCancelUpgrade_authority, 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_MsgCancelUpgrade) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": - return x.Authority != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": - x.Authority = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": - x.Authority = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": - panic(fmt.Errorf("field authority of message cosmos.upgrade.v1beta1.MsgCancelUpgrade is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgCancelUpgrade", 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_MsgCancelUpgrade) 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_MsgCancelUpgrade) 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_MsgCancelUpgrade) 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_MsgCancelUpgrade) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCancelUpgrade) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*MsgCancelUpgrade) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCancelUpgrade) - 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: MsgCancelUpgrade: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUpgrade: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_MsgCancelUpgradeResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_tx_proto_init() - md_MsgCancelUpgradeResponse = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgCancelUpgradeResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCancelUpgradeResponse)(nil) - -type fastReflection_MsgCancelUpgradeResponse MsgCancelUpgradeResponse - -func (x *MsgCancelUpgradeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCancelUpgradeResponse)(x) -} - -func (x *MsgCancelUpgradeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCancelUpgradeResponse_messageType fastReflection_MsgCancelUpgradeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCancelUpgradeResponse_messageType{} - -type fastReflection_MsgCancelUpgradeResponse_messageType struct{} - -func (x fastReflection_MsgCancelUpgradeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCancelUpgradeResponse)(nil) -} -func (x fastReflection_MsgCancelUpgradeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCancelUpgradeResponse) -} -func (x fastReflection_MsgCancelUpgradeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUpgradeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCancelUpgradeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCancelUpgradeResponse -} - -// 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_MsgCancelUpgradeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCancelUpgradeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCancelUpgradeResponse) New() protoreflect.Message { - return new(fastReflection_MsgCancelUpgradeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCancelUpgradeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCancelUpgradeResponse)(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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) 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.upgrade.v1beta1.MsgCancelUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", 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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCancelUpgradeResponse) - 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().(*MsgCancelUpgradeResponse) - 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().(*MsgCancelUpgradeResponse) - 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: MsgCancelUpgradeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUpgradeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/upgrade/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -// -// Since: cosmos-sdk 0.46 -type MsgSoftwareUpgrade struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // plan is the upgrade plan. - Plan *Plan `protobuf:"bytes,2,opt,name=plan,proto3" json:"plan,omitempty"` -} - -func (x *MsgSoftwareUpgrade) Reset() { - *x = MsgSoftwareUpgrade{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSoftwareUpgrade) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSoftwareUpgrade) ProtoMessage() {} - -// Deprecated: Use MsgSoftwareUpgrade.ProtoReflect.Descriptor instead. -func (*MsgSoftwareUpgrade) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSoftwareUpgrade) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgSoftwareUpgrade) GetPlan() *Plan { - if x != nil { - return x.Plan - } - return nil -} - -// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -// -// Since: cosmos-sdk 0.46 -type MsgSoftwareUpgradeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSoftwareUpgradeResponse) Reset() { - *x = MsgSoftwareUpgradeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSoftwareUpgradeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSoftwareUpgradeResponse) ProtoMessage() {} - -// Deprecated: Use MsgSoftwareUpgradeResponse.ProtoReflect.Descriptor instead. -func (*MsgSoftwareUpgradeResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -// -// Since: cosmos-sdk 0.46 -type MsgCancelUpgrade struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` -} - -func (x *MsgCancelUpgrade) Reset() { - *x = MsgCancelUpgrade{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCancelUpgrade) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCancelUpgrade) ProtoMessage() {} - -// Deprecated: Use MsgCancelUpgrade.ProtoReflect.Descriptor instead. -func (*MsgCancelUpgrade) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgCancelUpgrade) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -// -// Since: cosmos-sdk 0.46 -type MsgCancelUpgradeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCancelUpgradeResponse) Reset() { - *x = MsgCancelUpgradeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCancelUpgradeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCancelUpgradeResponse) ProtoMessage() {} - -// Deprecated: Use MsgCancelUpgradeResponse.ProtoReflect.Descriptor instead. -func (*MsgCancelUpgradeResponse) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -var File_cosmos_upgrade_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_upgrade_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x4d, 0x73, - 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x6c, 0x61, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, - 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, - 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, - 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe5, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, - 0x0a, 0x0f, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x6f, - 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x1a, 0x32, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6b, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x1a, 0x30, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xe7, - 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_upgrade_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_upgrade_v1beta1_tx_proto_rawDescData = file_cosmos_upgrade_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_upgrade_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_upgrade_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_upgrade_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_upgrade_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_upgrade_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_upgrade_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSoftwareUpgrade)(nil), // 0: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade - (*MsgSoftwareUpgradeResponse)(nil), // 1: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse - (*MsgCancelUpgrade)(nil), // 2: cosmos.upgrade.v1beta1.MsgCancelUpgrade - (*MsgCancelUpgradeResponse)(nil), // 3: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse - (*Plan)(nil), // 4: cosmos.upgrade.v1beta1.Plan -} -var file_cosmos_upgrade_v1beta1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan:type_name -> cosmos.upgrade.v1beta1.Plan - 0, // 1: cosmos.upgrade.v1beta1.Msg.SoftwareUpgrade:input_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgrade - 2, // 2: cosmos.upgrade.v1beta1.Msg.CancelUpgrade:input_type -> cosmos.upgrade.v1beta1.MsgCancelUpgrade - 1, // 3: cosmos.upgrade.v1beta1.Msg.SoftwareUpgrade:output_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse - 3, // 4: cosmos.upgrade.v1beta1.Msg.CancelUpgrade:output_type -> cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cosmos_upgrade_v1beta1_tx_proto_init() } -func file_cosmos_upgrade_v1beta1_tx_proto_init() { - if File_cosmos_upgrade_v1beta1_tx_proto != nil { - return - } - file_cosmos_upgrade_v1beta1_upgrade_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSoftwareUpgrade); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSoftwareUpgradeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCancelUpgrade); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCancelUpgradeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_upgrade_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_upgrade_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_upgrade_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_upgrade_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_upgrade_v1beta1_tx_proto = out.File - file_cosmos_upgrade_v1beta1_tx_proto_rawDesc = nil - file_cosmos_upgrade_v1beta1_tx_proto_goTypes = nil - file_cosmos_upgrade_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/upgrade/v1beta1/tx_grpc.pb.go b/api/cosmos/upgrade/v1beta1/tx_grpc.pb.go deleted file mode 100644 index 4fb877813eb7..000000000000 --- a/api/cosmos/upgrade/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/upgrade/v1beta1/tx.proto - -package upgradev1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // SoftwareUpgrade is a governance operation for initiating a software upgrade. - // - // Since: cosmos-sdk 0.46 - SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) - // CancelUpgrade is a governance operation for cancelling a previously - // approvid software upgrade. - // - // Since: cosmos-sdk 0.46 - CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) { - out := new(MsgSoftwareUpgradeResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) { - out := new(MsgCancelUpgradeResponse) - err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // SoftwareUpgrade is a governance operation for initiating a software upgrade. - // - // Since: cosmos-sdk 0.46 - SoftwareUpgrade(context.Context, *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) - // CancelUpgrade is a governance operation for cancelling a previously - // approvid software upgrade. - // - // Since: cosmos-sdk 0.46 - CancelUpgrade(context.Context, *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) SoftwareUpgrade(context.Context, *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") -} -func (UnimplementedMsgServer) CancelUpgrade(context.Context, *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelUpgrade not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSoftwareUpgrade) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SoftwareUpgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*MsgSoftwareUpgrade)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CancelUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCancelUpgrade) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CancelUpgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CancelUpgrade(ctx, req.(*MsgCancelUpgrade)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.upgrade.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SoftwareUpgrade", - Handler: _Msg_SoftwareUpgrade_Handler, - }, - { - MethodName: "CancelUpgrade", - Handler: _Msg_CancelUpgrade_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/upgrade/v1beta1/tx.proto", -} diff --git a/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go b/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go deleted file mode 100644 index 16d231f8347b..000000000000 --- a/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go +++ /dev/null @@ -1,2650 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package upgradev1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Plan protoreflect.MessageDescriptor - fd_Plan_name protoreflect.FieldDescriptor - fd_Plan_time protoreflect.FieldDescriptor - fd_Plan_height protoreflect.FieldDescriptor - fd_Plan_info protoreflect.FieldDescriptor - fd_Plan_upgraded_client_state protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_upgrade_proto_init() - md_Plan = File_cosmos_upgrade_v1beta1_upgrade_proto.Messages().ByName("Plan") - fd_Plan_name = md_Plan.Fields().ByName("name") - fd_Plan_time = md_Plan.Fields().ByName("time") - fd_Plan_height = md_Plan.Fields().ByName("height") - fd_Plan_info = md_Plan.Fields().ByName("info") - fd_Plan_upgraded_client_state = md_Plan.Fields().ByName("upgraded_client_state") -} - -var _ protoreflect.Message = (*fastReflection_Plan)(nil) - -type fastReflection_Plan Plan - -func (x *Plan) ProtoReflect() protoreflect.Message { - return (*fastReflection_Plan)(x) -} - -func (x *Plan) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Plan_messageType fastReflection_Plan_messageType -var _ protoreflect.MessageType = fastReflection_Plan_messageType{} - -type fastReflection_Plan_messageType struct{} - -func (x fastReflection_Plan_messageType) Zero() protoreflect.Message { - return (*fastReflection_Plan)(nil) -} -func (x fastReflection_Plan_messageType) New() protoreflect.Message { - return new(fastReflection_Plan) -} -func (x fastReflection_Plan_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Plan -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Plan) Descriptor() protoreflect.MessageDescriptor { - return md_Plan -} - -// 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_Plan) Type() protoreflect.MessageType { - return _fastReflection_Plan_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Plan) New() protoreflect.Message { - return new(fastReflection_Plan) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Plan) Interface() protoreflect.ProtoMessage { - return (*Plan)(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_Plan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Plan_name, value) { - return - } - } - if x.Time != nil { - value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - if !f(fd_Plan_time, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Plan_height, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_Plan_info, value) { - return - } - } - if x.UpgradedClientState != nil { - value := protoreflect.ValueOfMessage(x.UpgradedClientState.ProtoReflect()) - if !f(fd_Plan_upgraded_client_state, 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_Plan) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.Plan.name": - return x.Name != "" - case "cosmos.upgrade.v1beta1.Plan.time": - return x.Time != nil - case "cosmos.upgrade.v1beta1.Plan.height": - return x.Height != int64(0) - case "cosmos.upgrade.v1beta1.Plan.info": - return x.Info != "" - case "cosmos.upgrade.v1beta1.Plan.upgraded_client_state": - return x.UpgradedClientState != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.Plan")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.Plan 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_Plan) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.Plan.name": - x.Name = "" - case "cosmos.upgrade.v1beta1.Plan.time": - x.Time = nil - case "cosmos.upgrade.v1beta1.Plan.height": - x.Height = int64(0) - case "cosmos.upgrade.v1beta1.Plan.info": - x.Info = "" - case "cosmos.upgrade.v1beta1.Plan.upgraded_client_state": - x.UpgradedClientState = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.Plan")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.Plan 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_Plan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.Plan.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.Plan.time": - value := x.Time - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.upgrade.v1beta1.Plan.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.upgrade.v1beta1.Plan.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.Plan.upgraded_client_state": - value := x.UpgradedClientState - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.Plan")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.Plan 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_Plan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.Plan.name": - x.Name = value.Interface().(string) - case "cosmos.upgrade.v1beta1.Plan.time": - x.Time = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.upgrade.v1beta1.Plan.height": - x.Height = value.Int() - case "cosmos.upgrade.v1beta1.Plan.info": - x.Info = value.Interface().(string) - case "cosmos.upgrade.v1beta1.Plan.upgraded_client_state": - x.UpgradedClientState = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.Plan")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.Plan 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_Plan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.Plan.time": - if x.Time == nil { - x.Time = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - case "cosmos.upgrade.v1beta1.Plan.upgraded_client_state": - if x.UpgradedClientState == nil { - x.UpgradedClientState = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.UpgradedClientState.ProtoReflect()) - case "cosmos.upgrade.v1beta1.Plan.name": - panic(fmt.Errorf("field name of message cosmos.upgrade.v1beta1.Plan is not mutable")) - case "cosmos.upgrade.v1beta1.Plan.height": - panic(fmt.Errorf("field height of message cosmos.upgrade.v1beta1.Plan is not mutable")) - case "cosmos.upgrade.v1beta1.Plan.info": - panic(fmt.Errorf("field info of message cosmos.upgrade.v1beta1.Plan is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.Plan")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.Plan 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_Plan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.Plan.name": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.Plan.time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.upgrade.v1beta1.Plan.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.upgrade.v1beta1.Plan.info": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.Plan.upgraded_client_state": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.Plan")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.Plan 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_Plan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.Plan", 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_Plan) 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_Plan) 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_Plan) 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_Plan) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Plan) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Time != nil { - l = options.Size(x.Time) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UpgradedClientState != nil { - l = options.Size(x.UpgradedClientState) - 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().(*Plan) - 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.UpgradedClientState != nil { - encoded, err := options.Marshal(x.UpgradedClientState) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if x.Time != nil { - encoded, err := options.Marshal(x.Time) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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 { - 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().(*Plan) - 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: Plan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Plan: 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 - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Time", 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.Time == nil { - x.Time = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpgradedClientState", 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.UpgradedClientState == nil { - x.UpgradedClientState = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UpgradedClientState); 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_SoftwareUpgradeProposal protoreflect.MessageDescriptor - fd_SoftwareUpgradeProposal_title protoreflect.FieldDescriptor - fd_SoftwareUpgradeProposal_description protoreflect.FieldDescriptor - fd_SoftwareUpgradeProposal_plan protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_upgrade_proto_init() - md_SoftwareUpgradeProposal = File_cosmos_upgrade_v1beta1_upgrade_proto.Messages().ByName("SoftwareUpgradeProposal") - fd_SoftwareUpgradeProposal_title = md_SoftwareUpgradeProposal.Fields().ByName("title") - fd_SoftwareUpgradeProposal_description = md_SoftwareUpgradeProposal.Fields().ByName("description") - fd_SoftwareUpgradeProposal_plan = md_SoftwareUpgradeProposal.Fields().ByName("plan") -} - -var _ protoreflect.Message = (*fastReflection_SoftwareUpgradeProposal)(nil) - -type fastReflection_SoftwareUpgradeProposal SoftwareUpgradeProposal - -func (x *SoftwareUpgradeProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_SoftwareUpgradeProposal)(x) -} - -func (x *SoftwareUpgradeProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SoftwareUpgradeProposal_messageType fastReflection_SoftwareUpgradeProposal_messageType -var _ protoreflect.MessageType = fastReflection_SoftwareUpgradeProposal_messageType{} - -type fastReflection_SoftwareUpgradeProposal_messageType struct{} - -func (x fastReflection_SoftwareUpgradeProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_SoftwareUpgradeProposal)(nil) -} -func (x fastReflection_SoftwareUpgradeProposal_messageType) New() protoreflect.Message { - return new(fastReflection_SoftwareUpgradeProposal) -} -func (x fastReflection_SoftwareUpgradeProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SoftwareUpgradeProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SoftwareUpgradeProposal) Descriptor() protoreflect.MessageDescriptor { - return md_SoftwareUpgradeProposal -} - -// 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_SoftwareUpgradeProposal) Type() protoreflect.MessageType { - return _fastReflection_SoftwareUpgradeProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SoftwareUpgradeProposal) New() protoreflect.Message { - return new(fastReflection_SoftwareUpgradeProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SoftwareUpgradeProposal) Interface() protoreflect.ProtoMessage { - return (*SoftwareUpgradeProposal)(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_SoftwareUpgradeProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Title != "" { - value := protoreflect.ValueOfString(x.Title) - if !f(fd_SoftwareUpgradeProposal_title, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_SoftwareUpgradeProposal_description, value) { - return - } - } - if x.Plan != nil { - value := protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) - if !f(fd_SoftwareUpgradeProposal_plan, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SoftwareUpgradeProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.title": - return x.Title != "" - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.description": - return x.Description != "" - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan": - return x.Plan != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal 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_SoftwareUpgradeProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.title": - x.Title = "" - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.description": - x.Description = "" - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan": - x.Plan = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal 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_SoftwareUpgradeProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.title": - value := x.Title - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan": - value := x.Plan - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal 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_SoftwareUpgradeProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.title": - x.Title = value.Interface().(string) - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.description": - x.Description = value.Interface().(string) - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan": - x.Plan = value.Message().Interface().(*Plan) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal 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_SoftwareUpgradeProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan": - if x.Plan == nil { - x.Plan = new(Plan) - } - return protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.title": - panic(fmt.Errorf("field title of message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal is not mutable")) - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.description": - panic(fmt.Errorf("field description of message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal 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_SoftwareUpgradeProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.title": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.description": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan": - m := new(Plan) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal 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_SoftwareUpgradeProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", 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_SoftwareUpgradeProposal) 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_SoftwareUpgradeProposal) 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_SoftwareUpgradeProposal) 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_SoftwareUpgradeProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SoftwareUpgradeProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Title) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Plan != nil { - l = options.Size(x.Plan) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SoftwareUpgradeProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Plan != nil { - encoded, err := options.Marshal(x.Plan) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x12 - } - if len(x.Title) > 0 { - i -= len(x.Title) - copy(dAtA[i:], x.Title) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) - i-- - dAtA[i] = 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().(*SoftwareUpgradeProposal) - 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: SoftwareUpgradeProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SoftwareUpgradeProposal: 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 Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Plan == nil { - x.Plan = &Plan{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Plan); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_CancelSoftwareUpgradeProposal protoreflect.MessageDescriptor - fd_CancelSoftwareUpgradeProposal_title protoreflect.FieldDescriptor - fd_CancelSoftwareUpgradeProposal_description protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_upgrade_proto_init() - md_CancelSoftwareUpgradeProposal = File_cosmos_upgrade_v1beta1_upgrade_proto.Messages().ByName("CancelSoftwareUpgradeProposal") - fd_CancelSoftwareUpgradeProposal_title = md_CancelSoftwareUpgradeProposal.Fields().ByName("title") - fd_CancelSoftwareUpgradeProposal_description = md_CancelSoftwareUpgradeProposal.Fields().ByName("description") -} - -var _ protoreflect.Message = (*fastReflection_CancelSoftwareUpgradeProposal)(nil) - -type fastReflection_CancelSoftwareUpgradeProposal CancelSoftwareUpgradeProposal - -func (x *CancelSoftwareUpgradeProposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_CancelSoftwareUpgradeProposal)(x) -} - -func (x *CancelSoftwareUpgradeProposal) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CancelSoftwareUpgradeProposal_messageType fastReflection_CancelSoftwareUpgradeProposal_messageType -var _ protoreflect.MessageType = fastReflection_CancelSoftwareUpgradeProposal_messageType{} - -type fastReflection_CancelSoftwareUpgradeProposal_messageType struct{} - -func (x fastReflection_CancelSoftwareUpgradeProposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_CancelSoftwareUpgradeProposal)(nil) -} -func (x fastReflection_CancelSoftwareUpgradeProposal_messageType) New() protoreflect.Message { - return new(fastReflection_CancelSoftwareUpgradeProposal) -} -func (x fastReflection_CancelSoftwareUpgradeProposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CancelSoftwareUpgradeProposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CancelSoftwareUpgradeProposal) Descriptor() protoreflect.MessageDescriptor { - return md_CancelSoftwareUpgradeProposal -} - -// 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_CancelSoftwareUpgradeProposal) Type() protoreflect.MessageType { - return _fastReflection_CancelSoftwareUpgradeProposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CancelSoftwareUpgradeProposal) New() protoreflect.Message { - return new(fastReflection_CancelSoftwareUpgradeProposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CancelSoftwareUpgradeProposal) Interface() protoreflect.ProtoMessage { - return (*CancelSoftwareUpgradeProposal)(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_CancelSoftwareUpgradeProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Title != "" { - value := protoreflect.ValueOfString(x.Title) - if !f(fd_CancelSoftwareUpgradeProposal_title, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_CancelSoftwareUpgradeProposal_description, 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_CancelSoftwareUpgradeProposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.title": - return x.Title != "" - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.description": - return x.Description != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal 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_CancelSoftwareUpgradeProposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.title": - x.Title = "" - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.description": - x.Description = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal 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_CancelSoftwareUpgradeProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.title": - value := x.Title - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.description": - value := x.Description - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal 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_CancelSoftwareUpgradeProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.title": - x.Title = value.Interface().(string) - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.description": - x.Description = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal 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_CancelSoftwareUpgradeProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.title": - panic(fmt.Errorf("field title of message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal is not mutable")) - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.description": - panic(fmt.Errorf("field description of message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal 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_CancelSoftwareUpgradeProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.title": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.description": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal 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_CancelSoftwareUpgradeProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", 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_CancelSoftwareUpgradeProposal) 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_CancelSoftwareUpgradeProposal) 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_CancelSoftwareUpgradeProposal) 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_CancelSoftwareUpgradeProposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CancelSoftwareUpgradeProposal) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Title) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.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().(*CancelSoftwareUpgradeProposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x12 - } - if len(x.Title) > 0 { - i -= len(x.Title) - copy(dAtA[i:], x.Title) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) - i-- - dAtA[i] = 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().(*CancelSoftwareUpgradeProposal) - 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: CancelSoftwareUpgradeProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CancelSoftwareUpgradeProposal: 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 Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_ModuleVersion protoreflect.MessageDescriptor - fd_ModuleVersion_name protoreflect.FieldDescriptor - fd_ModuleVersion_version protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_upgrade_v1beta1_upgrade_proto_init() - md_ModuleVersion = File_cosmos_upgrade_v1beta1_upgrade_proto.Messages().ByName("ModuleVersion") - fd_ModuleVersion_name = md_ModuleVersion.Fields().ByName("name") - fd_ModuleVersion_version = md_ModuleVersion.Fields().ByName("version") -} - -var _ protoreflect.Message = (*fastReflection_ModuleVersion)(nil) - -type fastReflection_ModuleVersion ModuleVersion - -func (x *ModuleVersion) ProtoReflect() protoreflect.Message { - return (*fastReflection_ModuleVersion)(x) -} - -func (x *ModuleVersion) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ModuleVersion_messageType fastReflection_ModuleVersion_messageType -var _ protoreflect.MessageType = fastReflection_ModuleVersion_messageType{} - -type fastReflection_ModuleVersion_messageType struct{} - -func (x fastReflection_ModuleVersion_messageType) Zero() protoreflect.Message { - return (*fastReflection_ModuleVersion)(nil) -} -func (x fastReflection_ModuleVersion_messageType) New() protoreflect.Message { - return new(fastReflection_ModuleVersion) -} -func (x fastReflection_ModuleVersion_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleVersion -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ModuleVersion) Descriptor() protoreflect.MessageDescriptor { - return md_ModuleVersion -} - -// 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_ModuleVersion) Type() protoreflect.MessageType { - return _fastReflection_ModuleVersion_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ModuleVersion) New() protoreflect.Message { - return new(fastReflection_ModuleVersion) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ModuleVersion) Interface() protoreflect.ProtoMessage { - return (*ModuleVersion)(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_ModuleVersion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ModuleVersion_name, value) { - return - } - } - if x.Version != uint64(0) { - value := protoreflect.ValueOfUint64(x.Version) - if !f(fd_ModuleVersion_version, 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_ModuleVersion) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.ModuleVersion.name": - return x.Name != "" - case "cosmos.upgrade.v1beta1.ModuleVersion.version": - return x.Version != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.ModuleVersion")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.ModuleVersion 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_ModuleVersion) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.ModuleVersion.name": - x.Name = "" - case "cosmos.upgrade.v1beta1.ModuleVersion.version": - x.Version = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.ModuleVersion")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.ModuleVersion 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_ModuleVersion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.upgrade.v1beta1.ModuleVersion.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.upgrade.v1beta1.ModuleVersion.version": - value := x.Version - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.ModuleVersion")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.ModuleVersion 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_ModuleVersion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.ModuleVersion.name": - x.Name = value.Interface().(string) - case "cosmos.upgrade.v1beta1.ModuleVersion.version": - x.Version = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.ModuleVersion")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.ModuleVersion 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_ModuleVersion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.ModuleVersion.name": - panic(fmt.Errorf("field name of message cosmos.upgrade.v1beta1.ModuleVersion is not mutable")) - case "cosmos.upgrade.v1beta1.ModuleVersion.version": - panic(fmt.Errorf("field version of message cosmos.upgrade.v1beta1.ModuleVersion is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.ModuleVersion")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.ModuleVersion 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_ModuleVersion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.upgrade.v1beta1.ModuleVersion.name": - return protoreflect.ValueOfString("") - case "cosmos.upgrade.v1beta1.ModuleVersion.version": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.ModuleVersion")) - } - panic(fmt.Errorf("message cosmos.upgrade.v1beta1.ModuleVersion 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_ModuleVersion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.ModuleVersion", 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_ModuleVersion) 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_ModuleVersion) 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_ModuleVersion) 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_ModuleVersion) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ModuleVersion) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - 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().(*ModuleVersion) - 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.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x10 - } - 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 { - 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().(*ModuleVersion) - 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: ModuleVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleVersion: 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 - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/upgrade/v1beta1/upgrade.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Plan specifies information about a planned upgrade and when it should occur. -type Plan struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Sets the name for the upgrade. This name will be used by the upgraded - // version of the software to apply any special "on-upgrade" commands during - // the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no - // upgrade handler with this name has been set in the software, it will be - // assumed that the software is out-of-date when the upgrade Time or Height is - // reached and the software will exit. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - // has been removed from the SDK. - // If this field is not empty, an error will be thrown. - // - // Deprecated: Do not use. - Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` - // The height at which the upgrade must be performed. - // Only used if Time is not set. - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - // Any application specific upgrade info to be included on-chain - // such as a git commit that validators could automatically upgrade to - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - // moved to the IBC module in the sub module 02-client. - // If this field is not empty, an error will be thrown. - // - // Deprecated: Do not use. - UpgradedClientState *anypb.Any `protobuf:"bytes,5,opt,name=upgraded_client_state,json=upgradedClientState,proto3" json:"upgraded_client_state,omitempty"` -} - -func (x *Plan) Reset() { - *x = Plan{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Plan) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Plan) ProtoMessage() {} - -// Deprecated: Use Plan.ProtoReflect.Descriptor instead. -func (*Plan) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescGZIP(), []int{0} -} - -func (x *Plan) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Deprecated: Do not use. -func (x *Plan) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *Plan) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Plan) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -// Deprecated: Do not use. -func (x *Plan) GetUpgradedClientState() *anypb.Any { - if x != nil { - return x.UpgradedClientState - } - return nil -} - -// SoftwareUpgradeProposal is a gov Content type for initiating a software -// upgrade. -// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -// proposals, see MsgSoftwareUpgrade. -// -// Deprecated: Do not use. -type SoftwareUpgradeProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Plan *Plan `protobuf:"bytes,3,opt,name=plan,proto3" json:"plan,omitempty"` -} - -func (x *SoftwareUpgradeProposal) Reset() { - *x = SoftwareUpgradeProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SoftwareUpgradeProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SoftwareUpgradeProposal) ProtoMessage() {} - -// Deprecated: Use SoftwareUpgradeProposal.ProtoReflect.Descriptor instead. -func (*SoftwareUpgradeProposal) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescGZIP(), []int{1} -} - -func (x *SoftwareUpgradeProposal) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *SoftwareUpgradeProposal) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SoftwareUpgradeProposal) GetPlan() *Plan { - if x != nil { - return x.Plan - } - return nil -} - -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -// upgrade. -// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -// proposals, see MsgCancelUpgrade. -// -// Deprecated: Do not use. -type CancelSoftwareUpgradeProposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *CancelSoftwareUpgradeProposal) Reset() { - *x = CancelSoftwareUpgradeProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelSoftwareUpgradeProposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelSoftwareUpgradeProposal) ProtoMessage() {} - -// Deprecated: Use CancelSoftwareUpgradeProposal.ProtoReflect.Descriptor instead. -func (*CancelSoftwareUpgradeProposal) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescGZIP(), []int{2} -} - -func (x *CancelSoftwareUpgradeProposal) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *CancelSoftwareUpgradeProposal) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// ModuleVersion specifies a module and its consensus version. -// -// Since: cosmos-sdk 0.43 -type ModuleVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name of the app module - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // consensus version of the app module - Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *ModuleVersion) Reset() { - *x = ModuleVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModuleVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModuleVersion) ProtoMessage() {} - -// Deprecated: Use ModuleVersion.ProtoReflect.Descriptor instead. -func (*ModuleVersion) Descriptor() ([]byte, []int) { - return file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescGZIP(), []int{3} -} - -func (x *ModuleVersion) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ModuleVersion) GetVersion() uint64 { - if x != nil { - return x.Version - } - return 0 -} - -var File_cosmos_upgrade_v1beta1_upgrade_proto protoreflect.FileDescriptor - -var file_cosmos_upgrade_v1beta1_upgrade_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xda, 0x01, 0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, - 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0a, 0x18, 0x01, 0xc8, 0xde, 0x1f, 0x00, 0x90, - 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4c, 0x0a, 0x15, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x95, 0x01, - 0x0a, 0x17, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x3a, 0x0a, 0x18, 0x01, 0x98, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x63, 0x0a, 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, - 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, - 0x18, 0x01, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x47, 0x0a, 0x0d, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x01, 0xe8, - 0xa0, 0x1f, 0x01, 0x42, 0xf0, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x42, 0x0c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, - 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescOnce sync.Once - file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescData = file_cosmos_upgrade_v1beta1_upgrade_proto_rawDesc -) - -func file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescGZIP() []byte { - file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescOnce.Do(func() { - file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescData) - }) - return file_cosmos_upgrade_v1beta1_upgrade_proto_rawDescData -} - -var file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_upgrade_v1beta1_upgrade_proto_goTypes = []interface{}{ - (*Plan)(nil), // 0: cosmos.upgrade.v1beta1.Plan - (*SoftwareUpgradeProposal)(nil), // 1: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - (*CancelSoftwareUpgradeProposal)(nil), // 2: cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - (*ModuleVersion)(nil), // 3: cosmos.upgrade.v1beta1.ModuleVersion - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*anypb.Any)(nil), // 5: google.protobuf.Any -} -var file_cosmos_upgrade_v1beta1_upgrade_proto_depIdxs = []int32{ - 4, // 0: cosmos.upgrade.v1beta1.Plan.time:type_name -> google.protobuf.Timestamp - 5, // 1: cosmos.upgrade.v1beta1.Plan.upgraded_client_state:type_name -> google.protobuf.Any - 0, // 2: cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan:type_name -> cosmos.upgrade.v1beta1.Plan - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_cosmos_upgrade_v1beta1_upgrade_proto_init() } -func file_cosmos_upgrade_v1beta1_upgrade_proto_init() { - if File_cosmos_upgrade_v1beta1_upgrade_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Plan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SoftwareUpgradeProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelSoftwareUpgradeProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModuleVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_upgrade_v1beta1_upgrade_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_upgrade_v1beta1_upgrade_proto_goTypes, - DependencyIndexes: file_cosmos_upgrade_v1beta1_upgrade_proto_depIdxs, - MessageInfos: file_cosmos_upgrade_v1beta1_upgrade_proto_msgTypes, - }.Build() - File_cosmos_upgrade_v1beta1_upgrade_proto = out.File - file_cosmos_upgrade_v1beta1_upgrade_proto_rawDesc = nil - file_cosmos_upgrade_v1beta1_upgrade_proto_goTypes = nil - file_cosmos_upgrade_v1beta1_upgrade_proto_depIdxs = nil -} diff --git a/api/cosmos/vesting/v1beta1/tx.pulsar.go b/api/cosmos/vesting/v1beta1/tx.pulsar.go deleted file mode 100644 index 32f2db2779f9..000000000000 --- a/api/cosmos/vesting/v1beta1/tx.pulsar.go +++ /dev/null @@ -1,3639 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package vestingv1beta1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_MsgCreateVestingAccount_3_list)(nil) - -type _MsgCreateVestingAccount_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgCreateVestingAccount_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgCreateVestingAccount_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgCreateVestingAccount_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgCreateVestingAccount_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgCreateVestingAccount_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreateVestingAccount_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgCreateVestingAccount_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreateVestingAccount_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgCreateVestingAccount protoreflect.MessageDescriptor - fd_MsgCreateVestingAccount_from_address protoreflect.FieldDescriptor - fd_MsgCreateVestingAccount_to_address protoreflect.FieldDescriptor - fd_MsgCreateVestingAccount_amount protoreflect.FieldDescriptor - fd_MsgCreateVestingAccount_end_time protoreflect.FieldDescriptor - fd_MsgCreateVestingAccount_delayed protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_tx_proto_init() - md_MsgCreateVestingAccount = File_cosmos_vesting_v1beta1_tx_proto.Messages().ByName("MsgCreateVestingAccount") - fd_MsgCreateVestingAccount_from_address = md_MsgCreateVestingAccount.Fields().ByName("from_address") - fd_MsgCreateVestingAccount_to_address = md_MsgCreateVestingAccount.Fields().ByName("to_address") - fd_MsgCreateVestingAccount_amount = md_MsgCreateVestingAccount.Fields().ByName("amount") - fd_MsgCreateVestingAccount_end_time = md_MsgCreateVestingAccount.Fields().ByName("end_time") - fd_MsgCreateVestingAccount_delayed = md_MsgCreateVestingAccount.Fields().ByName("delayed") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateVestingAccount)(nil) - -type fastReflection_MsgCreateVestingAccount MsgCreateVestingAccount - -func (x *MsgCreateVestingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateVestingAccount)(x) -} - -func (x *MsgCreateVestingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateVestingAccount_messageType fastReflection_MsgCreateVestingAccount_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateVestingAccount_messageType{} - -type fastReflection_MsgCreateVestingAccount_messageType struct{} - -func (x fastReflection_MsgCreateVestingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateVestingAccount)(nil) -} -func (x fastReflection_MsgCreateVestingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateVestingAccount) -} -func (x fastReflection_MsgCreateVestingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateVestingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateVestingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateVestingAccount -} - -// 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_MsgCreateVestingAccount) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateVestingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateVestingAccount) New() protoreflect.Message { - return new(fastReflection_MsgCreateVestingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateVestingAccount) Interface() protoreflect.ProtoMessage { - return (*MsgCreateVestingAccount)(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_MsgCreateVestingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.FromAddress != "" { - value := protoreflect.ValueOfString(x.FromAddress) - if !f(fd_MsgCreateVestingAccount_from_address, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgCreateVestingAccount_to_address, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgCreateVestingAccount_3_list{list: &x.Amount}) - if !f(fd_MsgCreateVestingAccount_amount, value) { - return - } - } - if x.EndTime != int64(0) { - value := protoreflect.ValueOfInt64(x.EndTime) - if !f(fd_MsgCreateVestingAccount_end_time, value) { - return - } - } - if x.Delayed != false { - value := protoreflect.ValueOfBool(x.Delayed) - if !f(fd_MsgCreateVestingAccount_delayed, 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_MsgCreateVestingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.from_address": - return x.FromAddress != "" - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.to_address": - return x.ToAddress != "" - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount": - return len(x.Amount) != 0 - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.end_time": - return x.EndTime != int64(0) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.delayed": - return x.Delayed != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccount 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_MsgCreateVestingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.from_address": - x.FromAddress = "" - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.to_address": - x.ToAddress = "" - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount": - x.Amount = nil - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.end_time": - x.EndTime = int64(0) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.delayed": - x.Delayed = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccount 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_MsgCreateVestingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.from_address": - value := x.FromAddress - return protoreflect.ValueOfString(value) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgCreateVestingAccount_3_list{}) - } - listValue := &_MsgCreateVestingAccount_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.end_time": - value := x.EndTime - return protoreflect.ValueOfInt64(value) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.delayed": - value := x.Delayed - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccount 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_MsgCreateVestingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.from_address": - x.FromAddress = value.Interface().(string) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount": - lv := value.List() - clv := lv.(*_MsgCreateVestingAccount_3_list) - x.Amount = *clv.list - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.end_time": - x.EndTime = value.Int() - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.delayed": - x.Delayed = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccount 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_MsgCreateVestingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgCreateVestingAccount_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.from_address": - panic(fmt.Errorf("field from_address of message cosmos.vesting.v1beta1.MsgCreateVestingAccount is not mutable")) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.to_address": - panic(fmt.Errorf("field to_address of message cosmos.vesting.v1beta1.MsgCreateVestingAccount is not mutable")) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.end_time": - panic(fmt.Errorf("field end_time of message cosmos.vesting.v1beta1.MsgCreateVestingAccount is not mutable")) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.delayed": - panic(fmt.Errorf("field delayed of message cosmos.vesting.v1beta1.MsgCreateVestingAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccount 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_MsgCreateVestingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.from_address": - return protoreflect.ValueOfString("") - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.to_address": - return protoreflect.ValueOfString("") - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgCreateVestingAccount_3_list{list: &list}) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.end_time": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.vesting.v1beta1.MsgCreateVestingAccount.delayed": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccount 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_MsgCreateVestingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.MsgCreateVestingAccount", 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_MsgCreateVestingAccount) 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_MsgCreateVestingAccount) 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_MsgCreateVestingAccount) 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_MsgCreateVestingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateVestingAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.FromAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.EndTime != 0 { - n += 1 + runtime.Sov(uint64(x.EndTime)) - } - if x.Delayed { - n += 2 - } - 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().(*MsgCreateVestingAccount) - 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.Delayed { - i-- - if x.Delayed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if x.EndTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EndTime)) - i-- - dAtA[i] = 0x20 - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.FromAddress) > 0 { - i -= len(x.FromAddress) - copy(dAtA[i:], x.FromAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FromAddress))) - 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().(*MsgCreateVestingAccount) - 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: MsgCreateVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateVestingAccount: 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 FromAddress", 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.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", 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.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) - } - x.EndTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EndTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delayed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Delayed = bool(v != 0) - 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_MsgCreateVestingAccountResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_tx_proto_init() - md_MsgCreateVestingAccountResponse = File_cosmos_vesting_v1beta1_tx_proto.Messages().ByName("MsgCreateVestingAccountResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateVestingAccountResponse)(nil) - -type fastReflection_MsgCreateVestingAccountResponse MsgCreateVestingAccountResponse - -func (x *MsgCreateVestingAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateVestingAccountResponse)(x) -} - -func (x *MsgCreateVestingAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateVestingAccountResponse_messageType fastReflection_MsgCreateVestingAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateVestingAccountResponse_messageType{} - -type fastReflection_MsgCreateVestingAccountResponse_messageType struct{} - -func (x fastReflection_MsgCreateVestingAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateVestingAccountResponse)(nil) -} -func (x fastReflection_MsgCreateVestingAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateVestingAccountResponse) -} -func (x fastReflection_MsgCreateVestingAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateVestingAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateVestingAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateVestingAccountResponse -} - -// 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_MsgCreateVestingAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateVestingAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateVestingAccountResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateVestingAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateVestingAccountResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateVestingAccountResponse)(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_MsgCreateVestingAccountResponse) 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_MsgCreateVestingAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse 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_MsgCreateVestingAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse 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_MsgCreateVestingAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse 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_MsgCreateVestingAccountResponse) 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.vesting.v1beta1.MsgCreateVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse 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_MsgCreateVestingAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse 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_MsgCreateVestingAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse 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_MsgCreateVestingAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", 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_MsgCreateVestingAccountResponse) 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_MsgCreateVestingAccountResponse) 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_MsgCreateVestingAccountResponse) 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_MsgCreateVestingAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateVestingAccountResponse) - 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().(*MsgCreateVestingAccountResponse) - 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().(*MsgCreateVestingAccountResponse) - 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: MsgCreateVestingAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateVestingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgCreatePermanentLockedAccount_3_list)(nil) - -type _MsgCreatePermanentLockedAccount_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreatePermanentLockedAccount_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgCreatePermanentLockedAccount protoreflect.MessageDescriptor - fd_MsgCreatePermanentLockedAccount_from_address protoreflect.FieldDescriptor - fd_MsgCreatePermanentLockedAccount_to_address protoreflect.FieldDescriptor - fd_MsgCreatePermanentLockedAccount_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_tx_proto_init() - md_MsgCreatePermanentLockedAccount = File_cosmos_vesting_v1beta1_tx_proto.Messages().ByName("MsgCreatePermanentLockedAccount") - fd_MsgCreatePermanentLockedAccount_from_address = md_MsgCreatePermanentLockedAccount.Fields().ByName("from_address") - fd_MsgCreatePermanentLockedAccount_to_address = md_MsgCreatePermanentLockedAccount.Fields().ByName("to_address") - fd_MsgCreatePermanentLockedAccount_amount = md_MsgCreatePermanentLockedAccount.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreatePermanentLockedAccount)(nil) - -type fastReflection_MsgCreatePermanentLockedAccount MsgCreatePermanentLockedAccount - -func (x *MsgCreatePermanentLockedAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreatePermanentLockedAccount)(x) -} - -func (x *MsgCreatePermanentLockedAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreatePermanentLockedAccount_messageType fastReflection_MsgCreatePermanentLockedAccount_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreatePermanentLockedAccount_messageType{} - -type fastReflection_MsgCreatePermanentLockedAccount_messageType struct{} - -func (x fastReflection_MsgCreatePermanentLockedAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreatePermanentLockedAccount)(nil) -} -func (x fastReflection_MsgCreatePermanentLockedAccount_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreatePermanentLockedAccount) -} -func (x fastReflection_MsgCreatePermanentLockedAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePermanentLockedAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreatePermanentLockedAccount) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePermanentLockedAccount -} - -// 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_MsgCreatePermanentLockedAccount) Type() protoreflect.MessageType { - return _fastReflection_MsgCreatePermanentLockedAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreatePermanentLockedAccount) New() protoreflect.Message { - return new(fastReflection_MsgCreatePermanentLockedAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreatePermanentLockedAccount) Interface() protoreflect.ProtoMessage { - return (*MsgCreatePermanentLockedAccount)(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_MsgCreatePermanentLockedAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.FromAddress != "" { - value := protoreflect.ValueOfString(x.FromAddress) - if !f(fd_MsgCreatePermanentLockedAccount_from_address, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgCreatePermanentLockedAccount_to_address, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgCreatePermanentLockedAccount_3_list{list: &x.Amount}) - if !f(fd_MsgCreatePermanentLockedAccount_amount, 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_MsgCreatePermanentLockedAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.from_address": - return x.FromAddress != "" - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.to_address": - return x.ToAddress != "" - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount 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_MsgCreatePermanentLockedAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.from_address": - x.FromAddress = "" - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.to_address": - x.ToAddress = "" - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount 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_MsgCreatePermanentLockedAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.from_address": - value := x.FromAddress - return protoreflect.ValueOfString(value) - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgCreatePermanentLockedAccount_3_list{}) - } - listValue := &_MsgCreatePermanentLockedAccount_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount 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_MsgCreatePermanentLockedAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.from_address": - x.FromAddress = value.Interface().(string) - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount": - lv := value.List() - clv := lv.(*_MsgCreatePermanentLockedAccount_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount 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_MsgCreatePermanentLockedAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgCreatePermanentLockedAccount_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.from_address": - panic(fmt.Errorf("field from_address of message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount is not mutable")) - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.to_address": - panic(fmt.Errorf("field to_address of message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount 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_MsgCreatePermanentLockedAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.from_address": - return protoreflect.ValueOfString("") - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.to_address": - return protoreflect.ValueOfString("") - case "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgCreatePermanentLockedAccount_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount 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_MsgCreatePermanentLockedAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", 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_MsgCreatePermanentLockedAccount) 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_MsgCreatePermanentLockedAccount) 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_MsgCreatePermanentLockedAccount) 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_MsgCreatePermanentLockedAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreatePermanentLockedAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.FromAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreatePermanentLockedAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.FromAddress) > 0 { - i -= len(x.FromAddress) - copy(dAtA[i:], x.FromAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FromAddress))) - 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().(*MsgCreatePermanentLockedAccount) - 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: MsgCreatePermanentLockedAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePermanentLockedAccount: 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 FromAddress", 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.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", 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.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCreatePermanentLockedAccountResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_tx_proto_init() - md_MsgCreatePermanentLockedAccountResponse = File_cosmos_vesting_v1beta1_tx_proto.Messages().ByName("MsgCreatePermanentLockedAccountResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreatePermanentLockedAccountResponse)(nil) - -type fastReflection_MsgCreatePermanentLockedAccountResponse MsgCreatePermanentLockedAccountResponse - -func (x *MsgCreatePermanentLockedAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreatePermanentLockedAccountResponse)(x) -} - -func (x *MsgCreatePermanentLockedAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreatePermanentLockedAccountResponse_messageType fastReflection_MsgCreatePermanentLockedAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreatePermanentLockedAccountResponse_messageType{} - -type fastReflection_MsgCreatePermanentLockedAccountResponse_messageType struct{} - -func (x fastReflection_MsgCreatePermanentLockedAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreatePermanentLockedAccountResponse)(nil) -} -func (x fastReflection_MsgCreatePermanentLockedAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreatePermanentLockedAccountResponse) -} -func (x fastReflection_MsgCreatePermanentLockedAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePermanentLockedAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreatePermanentLockedAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePermanentLockedAccountResponse -} - -// 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_MsgCreatePermanentLockedAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreatePermanentLockedAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreatePermanentLockedAccountResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreatePermanentLockedAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreatePermanentLockedAccountResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreatePermanentLockedAccountResponse)(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_MsgCreatePermanentLockedAccountResponse) 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_MsgCreatePermanentLockedAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse 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_MsgCreatePermanentLockedAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse 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_MsgCreatePermanentLockedAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse 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_MsgCreatePermanentLockedAccountResponse) 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.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse 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_MsgCreatePermanentLockedAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse 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_MsgCreatePermanentLockedAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse 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_MsgCreatePermanentLockedAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", 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_MsgCreatePermanentLockedAccountResponse) 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_MsgCreatePermanentLockedAccountResponse) 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_MsgCreatePermanentLockedAccountResponse) 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_MsgCreatePermanentLockedAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreatePermanentLockedAccountResponse) - 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().(*MsgCreatePermanentLockedAccountResponse) - 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().(*MsgCreatePermanentLockedAccountResponse) - 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: MsgCreatePermanentLockedAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePermanentLockedAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgCreatePeriodicVestingAccount_4_list)(nil) - -type _MsgCreatePeriodicVestingAccount_4_list struct { - list *[]*Period -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - (*x.list)[i] = concreteValue -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) AppendMutable() protoreflect.Value { - v := new(Period) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) NewElement() protoreflect.Value { - v := new(Period) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgCreatePeriodicVestingAccount_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgCreatePeriodicVestingAccount protoreflect.MessageDescriptor - fd_MsgCreatePeriodicVestingAccount_from_address protoreflect.FieldDescriptor - fd_MsgCreatePeriodicVestingAccount_to_address protoreflect.FieldDescriptor - fd_MsgCreatePeriodicVestingAccount_start_time protoreflect.FieldDescriptor - fd_MsgCreatePeriodicVestingAccount_vesting_periods protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_tx_proto_init() - md_MsgCreatePeriodicVestingAccount = File_cosmos_vesting_v1beta1_tx_proto.Messages().ByName("MsgCreatePeriodicVestingAccount") - fd_MsgCreatePeriodicVestingAccount_from_address = md_MsgCreatePeriodicVestingAccount.Fields().ByName("from_address") - fd_MsgCreatePeriodicVestingAccount_to_address = md_MsgCreatePeriodicVestingAccount.Fields().ByName("to_address") - fd_MsgCreatePeriodicVestingAccount_start_time = md_MsgCreatePeriodicVestingAccount.Fields().ByName("start_time") - fd_MsgCreatePeriodicVestingAccount_vesting_periods = md_MsgCreatePeriodicVestingAccount.Fields().ByName("vesting_periods") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreatePeriodicVestingAccount)(nil) - -type fastReflection_MsgCreatePeriodicVestingAccount MsgCreatePeriodicVestingAccount - -func (x *MsgCreatePeriodicVestingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreatePeriodicVestingAccount)(x) -} - -func (x *MsgCreatePeriodicVestingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreatePeriodicVestingAccount_messageType fastReflection_MsgCreatePeriodicVestingAccount_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreatePeriodicVestingAccount_messageType{} - -type fastReflection_MsgCreatePeriodicVestingAccount_messageType struct{} - -func (x fastReflection_MsgCreatePeriodicVestingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreatePeriodicVestingAccount)(nil) -} -func (x fastReflection_MsgCreatePeriodicVestingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreatePeriodicVestingAccount) -} -func (x fastReflection_MsgCreatePeriodicVestingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePeriodicVestingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreatePeriodicVestingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePeriodicVestingAccount -} - -// 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_MsgCreatePeriodicVestingAccount) Type() protoreflect.MessageType { - return _fastReflection_MsgCreatePeriodicVestingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreatePeriodicVestingAccount) New() protoreflect.Message { - return new(fastReflection_MsgCreatePeriodicVestingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreatePeriodicVestingAccount) Interface() protoreflect.ProtoMessage { - return (*MsgCreatePeriodicVestingAccount)(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_MsgCreatePeriodicVestingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.FromAddress != "" { - value := protoreflect.ValueOfString(x.FromAddress) - if !f(fd_MsgCreatePeriodicVestingAccount_from_address, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgCreatePeriodicVestingAccount_to_address, value) { - return - } - } - if x.StartTime != int64(0) { - value := protoreflect.ValueOfInt64(x.StartTime) - if !f(fd_MsgCreatePeriodicVestingAccount_start_time, value) { - return - } - } - if len(x.VestingPeriods) != 0 { - value := protoreflect.ValueOfList(&_MsgCreatePeriodicVestingAccount_4_list{list: &x.VestingPeriods}) - if !f(fd_MsgCreatePeriodicVestingAccount_vesting_periods, 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_MsgCreatePeriodicVestingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.from_address": - return x.FromAddress != "" - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.to_address": - return x.ToAddress != "" - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.start_time": - return x.StartTime != int64(0) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods": - return len(x.VestingPeriods) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount 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_MsgCreatePeriodicVestingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.from_address": - x.FromAddress = "" - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.to_address": - x.ToAddress = "" - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.start_time": - x.StartTime = int64(0) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods": - x.VestingPeriods = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount 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_MsgCreatePeriodicVestingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.from_address": - value := x.FromAddress - return protoreflect.ValueOfString(value) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.start_time": - value := x.StartTime - return protoreflect.ValueOfInt64(value) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods": - if len(x.VestingPeriods) == 0 { - return protoreflect.ValueOfList(&_MsgCreatePeriodicVestingAccount_4_list{}) - } - listValue := &_MsgCreatePeriodicVestingAccount_4_list{list: &x.VestingPeriods} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount 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_MsgCreatePeriodicVestingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.from_address": - x.FromAddress = value.Interface().(string) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.start_time": - x.StartTime = value.Int() - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods": - lv := value.List() - clv := lv.(*_MsgCreatePeriodicVestingAccount_4_list) - x.VestingPeriods = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount 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_MsgCreatePeriodicVestingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods": - if x.VestingPeriods == nil { - x.VestingPeriods = []*Period{} - } - value := &_MsgCreatePeriodicVestingAccount_4_list{list: &x.VestingPeriods} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.from_address": - panic(fmt.Errorf("field from_address of message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount is not mutable")) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.to_address": - panic(fmt.Errorf("field to_address of message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount is not mutable")) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.start_time": - panic(fmt.Errorf("field start_time of message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount 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_MsgCreatePeriodicVestingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.from_address": - return protoreflect.ValueOfString("") - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.to_address": - return protoreflect.ValueOfString("") - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.start_time": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods": - list := []*Period{} - return protoreflect.ValueOfList(&_MsgCreatePeriodicVestingAccount_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount 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_MsgCreatePeriodicVestingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", 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_MsgCreatePeriodicVestingAccount) 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_MsgCreatePeriodicVestingAccount) 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_MsgCreatePeriodicVestingAccount) 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_MsgCreatePeriodicVestingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreatePeriodicVestingAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.FromAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != 0 { - n += 1 + runtime.Sov(uint64(x.StartTime)) - } - if len(x.VestingPeriods) > 0 { - for _, e := range x.VestingPeriods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreatePeriodicVestingAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.VestingPeriods) > 0 { - for iNdEx := len(x.VestingPeriods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VestingPeriods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.StartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) - i-- - dAtA[i] = 0x18 - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.FromAddress) > 0 { - i -= len(x.FromAddress) - copy(dAtA[i:], x.FromAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FromAddress))) - 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().(*MsgCreatePeriodicVestingAccount) - 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: MsgCreatePeriodicVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePeriodicVestingAccount: 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 FromAddress", 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.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", 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.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - x.StartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VestingPeriods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.VestingPeriods = append(x.VestingPeriods, &Period{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VestingPeriods[len(x.VestingPeriods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCreatePeriodicVestingAccountResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_tx_proto_init() - md_MsgCreatePeriodicVestingAccountResponse = File_cosmos_vesting_v1beta1_tx_proto.Messages().ByName("MsgCreatePeriodicVestingAccountResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreatePeriodicVestingAccountResponse)(nil) - -type fastReflection_MsgCreatePeriodicVestingAccountResponse MsgCreatePeriodicVestingAccountResponse - -func (x *MsgCreatePeriodicVestingAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreatePeriodicVestingAccountResponse)(x) -} - -func (x *MsgCreatePeriodicVestingAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType{} - -type fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType struct{} - -func (x fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreatePeriodicVestingAccountResponse)(nil) -} -func (x fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreatePeriodicVestingAccountResponse) -} -func (x fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePeriodicVestingAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreatePeriodicVestingAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreatePeriodicVestingAccountResponse -} - -// 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_MsgCreatePeriodicVestingAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreatePeriodicVestingAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreatePeriodicVestingAccountResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreatePeriodicVestingAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreatePeriodicVestingAccountResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreatePeriodicVestingAccountResponse)(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_MsgCreatePeriodicVestingAccountResponse) 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_MsgCreatePeriodicVestingAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse 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_MsgCreatePeriodicVestingAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse 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_MsgCreatePeriodicVestingAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse 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_MsgCreatePeriodicVestingAccountResponse) 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.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse 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_MsgCreatePeriodicVestingAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse 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_MsgCreatePeriodicVestingAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse 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_MsgCreatePeriodicVestingAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", 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_MsgCreatePeriodicVestingAccountResponse) 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_MsgCreatePeriodicVestingAccountResponse) 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_MsgCreatePeriodicVestingAccountResponse) 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_MsgCreatePeriodicVestingAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreatePeriodicVestingAccountResponse) - 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().(*MsgCreatePeriodicVestingAccountResponse) - 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().(*MsgCreatePeriodicVestingAccountResponse) - 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: MsgCreatePeriodicVestingAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreatePeriodicVestingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/vesting/v1beta1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -type MsgCreateVestingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` - EndTime int64 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` - Delayed bool `protobuf:"varint,5,opt,name=delayed,proto3" json:"delayed,omitempty"` -} - -func (x *MsgCreateVestingAccount) Reset() { - *x = MsgCreateVestingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateVestingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateVestingAccount) ProtoMessage() {} - -// Deprecated: Use MsgCreateVestingAccount.ProtoReflect.Descriptor instead. -func (*MsgCreateVestingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgCreateVestingAccount) GetFromAddress() string { - if x != nil { - return x.FromAddress - } - return "" -} - -func (x *MsgCreateVestingAccount) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgCreateVestingAccount) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -func (x *MsgCreateVestingAccount) GetEndTime() int64 { - if x != nil { - return x.EndTime - } - return 0 -} - -func (x *MsgCreateVestingAccount) GetDelayed() bool { - if x != nil { - return x.Delayed - } - return false -} - -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -type MsgCreateVestingAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCreateVestingAccountResponse) Reset() { - *x = MsgCreateVestingAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateVestingAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateVestingAccountResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateVestingAccountResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateVestingAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent -// locked account. -type MsgCreatePermanentLockedAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgCreatePermanentLockedAccount) Reset() { - *x = MsgCreatePermanentLockedAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePermanentLockedAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreatePermanentLockedAccount) ProtoMessage() {} - -// Deprecated: Use MsgCreatePermanentLockedAccount.ProtoReflect.Descriptor instead. -func (*MsgCreatePermanentLockedAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgCreatePermanentLockedAccount) GetFromAddress() string { - if x != nil { - return x.FromAddress - } - return "" -} - -func (x *MsgCreatePermanentLockedAccount) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgCreatePermanentLockedAccount) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. -type MsgCreatePermanentLockedAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCreatePermanentLockedAccountResponse) Reset() { - *x = MsgCreatePermanentLockedAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePermanentLockedAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreatePermanentLockedAccountResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreatePermanentLockedAccountResponse.ProtoReflect.Descriptor instead. -func (*MsgCreatePermanentLockedAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -type MsgCreatePeriodicVestingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - VestingPeriods []*Period `protobuf:"bytes,4,rep,name=vesting_periods,json=vestingPeriods,proto3" json:"vesting_periods,omitempty"` -} - -func (x *MsgCreatePeriodicVestingAccount) Reset() { - *x = MsgCreatePeriodicVestingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePeriodicVestingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreatePeriodicVestingAccount) ProtoMessage() {} - -// Deprecated: Use MsgCreatePeriodicVestingAccount.ProtoReflect.Descriptor instead. -func (*MsgCreatePeriodicVestingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgCreatePeriodicVestingAccount) GetFromAddress() string { - if x != nil { - return x.FromAddress - } - return "" -} - -func (x *MsgCreatePeriodicVestingAccount) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgCreatePeriodicVestingAccount) GetStartTime() int64 { - if x != nil { - return x.StartTime - } - return 0 -} - -func (x *MsgCreatePeriodicVestingAccount) GetVestingPeriods() []*Period { - if x != nil { - return x.VestingPeriods - } - return nil -} - -// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount -// response type. -type MsgCreatePeriodicVestingAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCreatePeriodicVestingAccountResponse) Reset() { - *x = MsgCreatePeriodicVestingAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePeriodicVestingAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreatePeriodicVestingAccountResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreatePeriodicVestingAccountResponse.ProtoReflect.Descriptor instead. -func (*MsgCreatePeriodicVestingAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - -var File_cosmos_vesting_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_vesting_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x02, 0x0a, 0x17, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 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, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x63, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, - 0x6c, 0x61, 0x79, 0x65, 0x64, 0x3a, 0x15, 0xe8, 0xa0, 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x0c, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x21, 0x0a, 0x1f, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xfe, 0x01, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, - 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x34, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x74, - 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, - 0x22, 0x29, 0x0a, 0x27, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, - 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x1f, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, - 0x63, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x4d, 0x0a, 0x0f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x0e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x3a, - 0x15, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x29, 0x0a, 0x27, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x56, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xbe, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x98, 0x01, 0x0a, - 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, - 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x37, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, - 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x69, 0x63, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x56, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xe7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x56, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x56, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x56, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_vesting_v1beta1_tx_proto_rawDescOnce sync.Once - file_cosmos_vesting_v1beta1_tx_proto_rawDescData = file_cosmos_vesting_v1beta1_tx_proto_rawDesc -) - -func file_cosmos_vesting_v1beta1_tx_proto_rawDescGZIP() []byte { - file_cosmos_vesting_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_vesting_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_vesting_v1beta1_tx_proto_rawDescData) - }) - return file_cosmos_vesting_v1beta1_tx_proto_rawDescData -} - -var file_cosmos_vesting_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_vesting_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgCreateVestingAccount)(nil), // 0: cosmos.vesting.v1beta1.MsgCreateVestingAccount - (*MsgCreateVestingAccountResponse)(nil), // 1: cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse - (*MsgCreatePermanentLockedAccount)(nil), // 2: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount - (*MsgCreatePermanentLockedAccountResponse)(nil), // 3: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse - (*MsgCreatePeriodicVestingAccount)(nil), // 4: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount - (*MsgCreatePeriodicVestingAccountResponse)(nil), // 5: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse - (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin - (*Period)(nil), // 7: cosmos.vesting.v1beta1.Period -} -var file_cosmos_vesting_v1beta1_tx_proto_depIdxs = []int32{ - 6, // 0: cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount:type_name -> cosmos.base.v1beta1.Coin - 6, // 1: cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount.amount:type_name -> cosmos.base.v1beta1.Coin - 7, // 2: cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount.vesting_periods:type_name -> cosmos.vesting.v1beta1.Period - 0, // 3: cosmos.vesting.v1beta1.Msg.CreateVestingAccount:input_type -> cosmos.vesting.v1beta1.MsgCreateVestingAccount - 2, // 4: cosmos.vesting.v1beta1.Msg.CreatePermanentLockedAccount:input_type -> cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount - 4, // 5: cosmos.vesting.v1beta1.Msg.CreatePeriodicVestingAccount:input_type -> cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount - 1, // 6: cosmos.vesting.v1beta1.Msg.CreateVestingAccount:output_type -> cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse - 3, // 7: cosmos.vesting.v1beta1.Msg.CreatePermanentLockedAccount:output_type -> cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse - 5, // 8: cosmos.vesting.v1beta1.Msg.CreatePeriodicVestingAccount:output_type -> cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_cosmos_vesting_v1beta1_tx_proto_init() } -func file_cosmos_vesting_v1beta1_tx_proto_init() { - if File_cosmos_vesting_v1beta1_tx_proto != nil { - return - } - file_cosmos_vesting_v1beta1_vesting_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_vesting_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateVestingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateVestingAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreatePermanentLockedAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreatePermanentLockedAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreatePeriodicVestingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreatePeriodicVestingAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_vesting_v1beta1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_vesting_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_vesting_v1beta1_tx_proto_depIdxs, - MessageInfos: file_cosmos_vesting_v1beta1_tx_proto_msgTypes, - }.Build() - File_cosmos_vesting_v1beta1_tx_proto = out.File - file_cosmos_vesting_v1beta1_tx_proto_rawDesc = nil - file_cosmos_vesting_v1beta1_tx_proto_goTypes = nil - file_cosmos_vesting_v1beta1_tx_proto_depIdxs = nil -} diff --git a/api/cosmos/vesting/v1beta1/tx_grpc.pb.go b/api/cosmos/vesting/v1beta1/tx_grpc.pb.go deleted file mode 100644 index 0bf68137e9c8..000000000000 --- a/api/cosmos/vesting/v1beta1/tx_grpc.pb.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/vesting/v1beta1/tx.proto - -package vestingv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - // CreateVestingAccount defines a method that enables creating a vesting - // account. - CreateVestingAccount(ctx context.Context, in *MsgCreateVestingAccount, opts ...grpc.CallOption) (*MsgCreateVestingAccountResponse, error) - // CreatePermanentLockedAccount defines a method that enables creating a permanent - // locked account. - CreatePermanentLockedAccount(ctx context.Context, in *MsgCreatePermanentLockedAccount, opts ...grpc.CallOption) (*MsgCreatePermanentLockedAccountResponse, error) - // CreatePeriodicVestingAccount defines a method that enables creating a - // periodic vesting account. - CreatePeriodicVestingAccount(ctx context.Context, in *MsgCreatePeriodicVestingAccount, opts ...grpc.CallOption) (*MsgCreatePeriodicVestingAccountResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateVestingAccount(ctx context.Context, in *MsgCreateVestingAccount, opts ...grpc.CallOption) (*MsgCreateVestingAccountResponse, error) { - out := new(MsgCreateVestingAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.vesting.v1beta1.Msg/CreateVestingAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreatePermanentLockedAccount(ctx context.Context, in *MsgCreatePermanentLockedAccount, opts ...grpc.CallOption) (*MsgCreatePermanentLockedAccountResponse, error) { - out := new(MsgCreatePermanentLockedAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreatePeriodicVestingAccount(ctx context.Context, in *MsgCreatePeriodicVestingAccount, opts ...grpc.CallOption) (*MsgCreatePeriodicVestingAccountResponse, error) { - out := new(MsgCreatePeriodicVestingAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - // CreateVestingAccount defines a method that enables creating a vesting - // account. - CreateVestingAccount(context.Context, *MsgCreateVestingAccount) (*MsgCreateVestingAccountResponse, error) - // CreatePermanentLockedAccount defines a method that enables creating a permanent - // locked account. - CreatePermanentLockedAccount(context.Context, *MsgCreatePermanentLockedAccount) (*MsgCreatePermanentLockedAccountResponse, error) - // CreatePeriodicVestingAccount defines a method that enables creating a - // periodic vesting account. - CreatePeriodicVestingAccount(context.Context, *MsgCreatePeriodicVestingAccount) (*MsgCreatePeriodicVestingAccountResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) CreateVestingAccount(context.Context, *MsgCreateVestingAccount) (*MsgCreateVestingAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateVestingAccount not implemented") -} -func (UnimplementedMsgServer) CreatePermanentLockedAccount(context.Context, *MsgCreatePermanentLockedAccount) (*MsgCreatePermanentLockedAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePermanentLockedAccount not implemented") -} -func (UnimplementedMsgServer) CreatePeriodicVestingAccount(context.Context, *MsgCreatePeriodicVestingAccount) (*MsgCreatePeriodicVestingAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePeriodicVestingAccount not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_CreateVestingAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateVestingAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateVestingAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.vesting.v1beta1.Msg/CreateVestingAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateVestingAccount(ctx, req.(*MsgCreateVestingAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreatePermanentLockedAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreatePermanentLockedAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreatePermanentLockedAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreatePermanentLockedAccount(ctx, req.(*MsgCreatePermanentLockedAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreatePeriodicVestingAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreatePeriodicVestingAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreatePeriodicVestingAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreatePeriodicVestingAccount(ctx, req.(*MsgCreatePeriodicVestingAccount)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.vesting.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateVestingAccount", - Handler: _Msg_CreateVestingAccount_Handler, - }, - { - MethodName: "CreatePermanentLockedAccount", - Handler: _Msg_CreatePermanentLockedAccount_Handler, - }, - { - MethodName: "CreatePeriodicVestingAccount", - Handler: _Msg_CreatePeriodicVestingAccount_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/vesting/v1beta1/tx.proto", -} diff --git a/api/cosmos/vesting/v1beta1/vesting.pulsar.go b/api/cosmos/vesting/v1beta1/vesting.pulsar.go deleted file mode 100644 index 56fa413d811b..000000000000 --- a/api/cosmos/vesting/v1beta1/vesting.pulsar.go +++ /dev/null @@ -1,3984 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package vestingv1beta1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta11 "github.com/cosmos/cosmos-sdk/api/cosmos/auth/v1beta1" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_BaseVestingAccount_2_list)(nil) - -type _BaseVestingAccount_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_BaseVestingAccount_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseVestingAccount_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BaseVestingAccount_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_BaseVestingAccount_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseVestingAccount_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseVestingAccount_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BaseVestingAccount_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseVestingAccount_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BaseVestingAccount_3_list)(nil) - -type _BaseVestingAccount_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_BaseVestingAccount_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseVestingAccount_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BaseVestingAccount_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_BaseVestingAccount_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseVestingAccount_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseVestingAccount_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BaseVestingAccount_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseVestingAccount_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BaseVestingAccount_4_list)(nil) - -type _BaseVestingAccount_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_BaseVestingAccount_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseVestingAccount_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BaseVestingAccount_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_BaseVestingAccount_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseVestingAccount_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseVestingAccount_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BaseVestingAccount_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseVestingAccount_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_BaseVestingAccount protoreflect.MessageDescriptor - fd_BaseVestingAccount_base_account protoreflect.FieldDescriptor - fd_BaseVestingAccount_original_vesting protoreflect.FieldDescriptor - fd_BaseVestingAccount_delegated_free protoreflect.FieldDescriptor - fd_BaseVestingAccount_delegated_vesting protoreflect.FieldDescriptor - fd_BaseVestingAccount_end_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_vesting_proto_init() - md_BaseVestingAccount = File_cosmos_vesting_v1beta1_vesting_proto.Messages().ByName("BaseVestingAccount") - fd_BaseVestingAccount_base_account = md_BaseVestingAccount.Fields().ByName("base_account") - fd_BaseVestingAccount_original_vesting = md_BaseVestingAccount.Fields().ByName("original_vesting") - fd_BaseVestingAccount_delegated_free = md_BaseVestingAccount.Fields().ByName("delegated_free") - fd_BaseVestingAccount_delegated_vesting = md_BaseVestingAccount.Fields().ByName("delegated_vesting") - fd_BaseVestingAccount_end_time = md_BaseVestingAccount.Fields().ByName("end_time") -} - -var _ protoreflect.Message = (*fastReflection_BaseVestingAccount)(nil) - -type fastReflection_BaseVestingAccount BaseVestingAccount - -func (x *BaseVestingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_BaseVestingAccount)(x) -} - -func (x *BaseVestingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BaseVestingAccount_messageType fastReflection_BaseVestingAccount_messageType -var _ protoreflect.MessageType = fastReflection_BaseVestingAccount_messageType{} - -type fastReflection_BaseVestingAccount_messageType struct{} - -func (x fastReflection_BaseVestingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_BaseVestingAccount)(nil) -} -func (x fastReflection_BaseVestingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_BaseVestingAccount) -} -func (x fastReflection_BaseVestingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BaseVestingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BaseVestingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_BaseVestingAccount -} - -// 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_BaseVestingAccount) Type() protoreflect.MessageType { - return _fastReflection_BaseVestingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BaseVestingAccount) New() protoreflect.Message { - return new(fastReflection_BaseVestingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BaseVestingAccount) Interface() protoreflect.ProtoMessage { - return (*BaseVestingAccount)(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_BaseVestingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) - if !f(fd_BaseVestingAccount_base_account, value) { - return - } - } - if len(x.OriginalVesting) != 0 { - value := protoreflect.ValueOfList(&_BaseVestingAccount_2_list{list: &x.OriginalVesting}) - if !f(fd_BaseVestingAccount_original_vesting, value) { - return - } - } - if len(x.DelegatedFree) != 0 { - value := protoreflect.ValueOfList(&_BaseVestingAccount_3_list{list: &x.DelegatedFree}) - if !f(fd_BaseVestingAccount_delegated_free, value) { - return - } - } - if len(x.DelegatedVesting) != 0 { - value := protoreflect.ValueOfList(&_BaseVestingAccount_4_list{list: &x.DelegatedVesting}) - if !f(fd_BaseVestingAccount_delegated_vesting, value) { - return - } - } - if x.EndTime != int64(0) { - value := protoreflect.ValueOfInt64(x.EndTime) - if !f(fd_BaseVestingAccount_end_time, 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_BaseVestingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.BaseVestingAccount.base_account": - return x.BaseAccount != nil - case "cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting": - return len(x.OriginalVesting) != 0 - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free": - return len(x.DelegatedFree) != 0 - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting": - return len(x.DelegatedVesting) != 0 - case "cosmos.vesting.v1beta1.BaseVestingAccount.end_time": - return x.EndTime != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.BaseVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.BaseVestingAccount 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_BaseVestingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.BaseVestingAccount.base_account": - x.BaseAccount = nil - case "cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting": - x.OriginalVesting = nil - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free": - x.DelegatedFree = nil - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting": - x.DelegatedVesting = nil - case "cosmos.vesting.v1beta1.BaseVestingAccount.end_time": - x.EndTime = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.BaseVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.BaseVestingAccount 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_BaseVestingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.BaseVestingAccount.base_account": - value := x.BaseAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting": - if len(x.OriginalVesting) == 0 { - return protoreflect.ValueOfList(&_BaseVestingAccount_2_list{}) - } - listValue := &_BaseVestingAccount_2_list{list: &x.OriginalVesting} - return protoreflect.ValueOfList(listValue) - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free": - if len(x.DelegatedFree) == 0 { - return protoreflect.ValueOfList(&_BaseVestingAccount_3_list{}) - } - listValue := &_BaseVestingAccount_3_list{list: &x.DelegatedFree} - return protoreflect.ValueOfList(listValue) - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting": - if len(x.DelegatedVesting) == 0 { - return protoreflect.ValueOfList(&_BaseVestingAccount_4_list{}) - } - listValue := &_BaseVestingAccount_4_list{list: &x.DelegatedVesting} - return protoreflect.ValueOfList(listValue) - case "cosmos.vesting.v1beta1.BaseVestingAccount.end_time": - value := x.EndTime - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.BaseVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.BaseVestingAccount 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_BaseVestingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.BaseVestingAccount.base_account": - x.BaseAccount = value.Message().Interface().(*v1beta11.BaseAccount) - case "cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting": - lv := value.List() - clv := lv.(*_BaseVestingAccount_2_list) - x.OriginalVesting = *clv.list - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free": - lv := value.List() - clv := lv.(*_BaseVestingAccount_3_list) - x.DelegatedFree = *clv.list - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting": - lv := value.List() - clv := lv.(*_BaseVestingAccount_4_list) - x.DelegatedVesting = *clv.list - case "cosmos.vesting.v1beta1.BaseVestingAccount.end_time": - x.EndTime = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.BaseVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.BaseVestingAccount 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_BaseVestingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.BaseVestingAccount.base_account": - if x.BaseAccount == nil { - x.BaseAccount = new(v1beta11.BaseAccount) - } - return protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) - case "cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting": - if x.OriginalVesting == nil { - x.OriginalVesting = []*v1beta1.Coin{} - } - value := &_BaseVestingAccount_2_list{list: &x.OriginalVesting} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free": - if x.DelegatedFree == nil { - x.DelegatedFree = []*v1beta1.Coin{} - } - value := &_BaseVestingAccount_3_list{list: &x.DelegatedFree} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting": - if x.DelegatedVesting == nil { - x.DelegatedVesting = []*v1beta1.Coin{} - } - value := &_BaseVestingAccount_4_list{list: &x.DelegatedVesting} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.BaseVestingAccount.end_time": - panic(fmt.Errorf("field end_time of message cosmos.vesting.v1beta1.BaseVestingAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.BaseVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.BaseVestingAccount 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_BaseVestingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.BaseVestingAccount.base_account": - m := new(v1beta11.BaseAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_BaseVestingAccount_2_list{list: &list}) - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_BaseVestingAccount_3_list{list: &list}) - case "cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_BaseVestingAccount_4_list{list: &list}) - case "cosmos.vesting.v1beta1.BaseVestingAccount.end_time": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.BaseVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.BaseVestingAccount 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_BaseVestingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.BaseVestingAccount", 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_BaseVestingAccount) 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_BaseVestingAccount) 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_BaseVestingAccount) 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_BaseVestingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BaseVestingAccount) - 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.BaseAccount != nil { - l = options.Size(x.BaseAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.OriginalVesting) > 0 { - for _, e := range x.OriginalVesting { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DelegatedFree) > 0 { - for _, e := range x.DelegatedFree { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DelegatedVesting) > 0 { - for _, e := range x.DelegatedVesting { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.EndTime != 0 { - n += 1 + runtime.Sov(uint64(x.EndTime)) - } - 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().(*BaseVestingAccount) - 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.EndTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EndTime)) - i-- - dAtA[i] = 0x28 - } - if len(x.DelegatedVesting) > 0 { - for iNdEx := len(x.DelegatedVesting) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatedVesting[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.DelegatedFree) > 0 { - for iNdEx := len(x.DelegatedFree) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatedFree[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.OriginalVesting) > 0 { - for iNdEx := len(x.OriginalVesting) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.OriginalVesting[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.BaseAccount != nil { - encoded, err := options.Marshal(x.BaseAccount) - 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().(*BaseVestingAccount) - 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: BaseVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BaseVestingAccount: 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 BaseAccount", 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.BaseAccount == nil { - x.BaseAccount = &v1beta11.BaseAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginalVesting", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginalVesting = append(x.OriginalVesting, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OriginalVesting[len(x.OriginalVesting)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedFree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegatedFree = append(x.DelegatedFree, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedFree[len(x.DelegatedFree)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedVesting", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegatedVesting = append(x.DelegatedVesting, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedVesting[len(x.DelegatedVesting)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) - } - x.EndTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EndTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ContinuousVestingAccount protoreflect.MessageDescriptor - fd_ContinuousVestingAccount_base_vesting_account protoreflect.FieldDescriptor - fd_ContinuousVestingAccount_start_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_vesting_proto_init() - md_ContinuousVestingAccount = File_cosmos_vesting_v1beta1_vesting_proto.Messages().ByName("ContinuousVestingAccount") - fd_ContinuousVestingAccount_base_vesting_account = md_ContinuousVestingAccount.Fields().ByName("base_vesting_account") - fd_ContinuousVestingAccount_start_time = md_ContinuousVestingAccount.Fields().ByName("start_time") -} - -var _ protoreflect.Message = (*fastReflection_ContinuousVestingAccount)(nil) - -type fastReflection_ContinuousVestingAccount ContinuousVestingAccount - -func (x *ContinuousVestingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_ContinuousVestingAccount)(x) -} - -func (x *ContinuousVestingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ContinuousVestingAccount_messageType fastReflection_ContinuousVestingAccount_messageType -var _ protoreflect.MessageType = fastReflection_ContinuousVestingAccount_messageType{} - -type fastReflection_ContinuousVestingAccount_messageType struct{} - -func (x fastReflection_ContinuousVestingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_ContinuousVestingAccount)(nil) -} -func (x fastReflection_ContinuousVestingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_ContinuousVestingAccount) -} -func (x fastReflection_ContinuousVestingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ContinuousVestingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ContinuousVestingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_ContinuousVestingAccount -} - -// 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_ContinuousVestingAccount) Type() protoreflect.MessageType { - return _fastReflection_ContinuousVestingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ContinuousVestingAccount) New() protoreflect.Message { - return new(fastReflection_ContinuousVestingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ContinuousVestingAccount) Interface() protoreflect.ProtoMessage { - return (*ContinuousVestingAccount)(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_ContinuousVestingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseVestingAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - if !f(fd_ContinuousVestingAccount_base_vesting_account, value) { - return - } - } - if x.StartTime != int64(0) { - value := protoreflect.ValueOfInt64(x.StartTime) - if !f(fd_ContinuousVestingAccount_start_time, 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_ContinuousVestingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account": - return x.BaseVestingAccount != nil - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.start_time": - return x.StartTime != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.ContinuousVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.ContinuousVestingAccount 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_ContinuousVestingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account": - x.BaseVestingAccount = nil - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.start_time": - x.StartTime = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.ContinuousVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.ContinuousVestingAccount 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_ContinuousVestingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account": - value := x.BaseVestingAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.start_time": - value := x.StartTime - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.ContinuousVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.ContinuousVestingAccount 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_ContinuousVestingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account": - x.BaseVestingAccount = value.Message().Interface().(*BaseVestingAccount) - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.start_time": - x.StartTime = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.ContinuousVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.ContinuousVestingAccount 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_ContinuousVestingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account": - if x.BaseVestingAccount == nil { - x.BaseVestingAccount = new(BaseVestingAccount) - } - return protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.start_time": - panic(fmt.Errorf("field start_time of message cosmos.vesting.v1beta1.ContinuousVestingAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.ContinuousVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.ContinuousVestingAccount 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_ContinuousVestingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account": - m := new(BaseVestingAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.vesting.v1beta1.ContinuousVestingAccount.start_time": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.ContinuousVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.ContinuousVestingAccount 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_ContinuousVestingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.ContinuousVestingAccount", 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_ContinuousVestingAccount) 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_ContinuousVestingAccount) 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_ContinuousVestingAccount) 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_ContinuousVestingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ContinuousVestingAccount) - 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.BaseVestingAccount != nil { - l = options.Size(x.BaseVestingAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != 0 { - n += 1 + runtime.Sov(uint64(x.StartTime)) - } - 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().(*ContinuousVestingAccount) - 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.StartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) - i-- - dAtA[i] = 0x10 - } - if x.BaseVestingAccount != nil { - encoded, err := options.Marshal(x.BaseVestingAccount) - 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().(*ContinuousVestingAccount) - 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: ContinuousVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContinuousVestingAccount: 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 BaseVestingAccount", 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.BaseVestingAccount == nil { - x.BaseVestingAccount = &BaseVestingAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseVestingAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - x.StartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DelayedVestingAccount protoreflect.MessageDescriptor - fd_DelayedVestingAccount_base_vesting_account protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_vesting_proto_init() - md_DelayedVestingAccount = File_cosmos_vesting_v1beta1_vesting_proto.Messages().ByName("DelayedVestingAccount") - fd_DelayedVestingAccount_base_vesting_account = md_DelayedVestingAccount.Fields().ByName("base_vesting_account") -} - -var _ protoreflect.Message = (*fastReflection_DelayedVestingAccount)(nil) - -type fastReflection_DelayedVestingAccount DelayedVestingAccount - -func (x *DelayedVestingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelayedVestingAccount)(x) -} - -func (x *DelayedVestingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelayedVestingAccount_messageType fastReflection_DelayedVestingAccount_messageType -var _ protoreflect.MessageType = fastReflection_DelayedVestingAccount_messageType{} - -type fastReflection_DelayedVestingAccount_messageType struct{} - -func (x fastReflection_DelayedVestingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelayedVestingAccount)(nil) -} -func (x fastReflection_DelayedVestingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_DelayedVestingAccount) -} -func (x fastReflection_DelayedVestingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelayedVestingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelayedVestingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_DelayedVestingAccount -} - -// 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_DelayedVestingAccount) Type() protoreflect.MessageType { - return _fastReflection_DelayedVestingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelayedVestingAccount) New() protoreflect.Message { - return new(fastReflection_DelayedVestingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelayedVestingAccount) Interface() protoreflect.ProtoMessage { - return (*DelayedVestingAccount)(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_DelayedVestingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseVestingAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - if !f(fd_DelayedVestingAccount_base_vesting_account, 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_DelayedVestingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account": - return x.BaseVestingAccount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.DelayedVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.DelayedVestingAccount 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_DelayedVestingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account": - x.BaseVestingAccount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.DelayedVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.DelayedVestingAccount 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_DelayedVestingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account": - value := x.BaseVestingAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.DelayedVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.DelayedVestingAccount 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_DelayedVestingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account": - x.BaseVestingAccount = value.Message().Interface().(*BaseVestingAccount) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.DelayedVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.DelayedVestingAccount 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_DelayedVestingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account": - if x.BaseVestingAccount == nil { - x.BaseVestingAccount = new(BaseVestingAccount) - } - return protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.DelayedVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.DelayedVestingAccount 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_DelayedVestingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account": - m := new(BaseVestingAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.DelayedVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.DelayedVestingAccount 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_DelayedVestingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.DelayedVestingAccount", 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_DelayedVestingAccount) 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_DelayedVestingAccount) 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_DelayedVestingAccount) 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_DelayedVestingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelayedVestingAccount) - 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.BaseVestingAccount != nil { - l = options.Size(x.BaseVestingAccount) - 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().(*DelayedVestingAccount) - 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.BaseVestingAccount != nil { - encoded, err := options.Marshal(x.BaseVestingAccount) - 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().(*DelayedVestingAccount) - 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: DelayedVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelayedVestingAccount: 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 BaseVestingAccount", 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.BaseVestingAccount == nil { - x.BaseVestingAccount = &BaseVestingAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseVestingAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Period_2_list)(nil) - -type _Period_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Period_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Period_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Period_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Period_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Period_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Period_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Period_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Period_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Period protoreflect.MessageDescriptor - fd_Period_length protoreflect.FieldDescriptor - fd_Period_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_vesting_proto_init() - md_Period = File_cosmos_vesting_v1beta1_vesting_proto.Messages().ByName("Period") - fd_Period_length = md_Period.Fields().ByName("length") - fd_Period_amount = md_Period.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_Period)(nil) - -type fastReflection_Period Period - -func (x *Period) ProtoReflect() protoreflect.Message { - return (*fastReflection_Period)(x) -} - -func (x *Period) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Period_messageType fastReflection_Period_messageType -var _ protoreflect.MessageType = fastReflection_Period_messageType{} - -type fastReflection_Period_messageType struct{} - -func (x fastReflection_Period_messageType) Zero() protoreflect.Message { - return (*fastReflection_Period)(nil) -} -func (x fastReflection_Period_messageType) New() protoreflect.Message { - return new(fastReflection_Period) -} -func (x fastReflection_Period_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Period -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Period) Descriptor() protoreflect.MessageDescriptor { - return md_Period -} - -// 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_Period) Type() protoreflect.MessageType { - return _fastReflection_Period_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Period) New() protoreflect.Message { - return new(fastReflection_Period) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Period) Interface() protoreflect.ProtoMessage { - return (*Period)(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_Period) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Length != int64(0) { - value := protoreflect.ValueOfInt64(x.Length) - if !f(fd_Period_length, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Period_2_list{list: &x.Amount}) - if !f(fd_Period_amount, 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_Period) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.Period.length": - return x.Length != int64(0) - case "cosmos.vesting.v1beta1.Period.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.Period")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.Period 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_Period) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.Period.length": - x.Length = int64(0) - case "cosmos.vesting.v1beta1.Period.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.Period")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.Period 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_Period) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.Period.length": - value := x.Length - return protoreflect.ValueOfInt64(value) - case "cosmos.vesting.v1beta1.Period.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Period_2_list{}) - } - listValue := &_Period_2_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.Period")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.Period 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_Period) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.Period.length": - x.Length = value.Int() - case "cosmos.vesting.v1beta1.Period.amount": - lv := value.List() - clv := lv.(*_Period_2_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.Period")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.Period 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_Period) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.Period.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_Period_2_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.Period.length": - panic(fmt.Errorf("field length of message cosmos.vesting.v1beta1.Period is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.Period")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.Period 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_Period) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.Period.length": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.vesting.v1beta1.Period.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Period_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.Period")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.Period 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_Period) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.Period", 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_Period) 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_Period) 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_Period) 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_Period) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Period) - 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.Length != 0 { - n += 1 + runtime.Sov(uint64(x.Length)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Period) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Length != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Length)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Period) - 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: Period: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) - } - x.Length = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Length |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_PeriodicVestingAccount_3_list)(nil) - -type _PeriodicVestingAccount_3_list struct { - list *[]*Period -} - -func (x *_PeriodicVestingAccount_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_PeriodicVestingAccount_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_PeriodicVestingAccount_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - (*x.list)[i] = concreteValue -} - -func (x *_PeriodicVestingAccount_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - *x.list = append(*x.list, concreteValue) -} - -func (x *_PeriodicVestingAccount_3_list) AppendMutable() protoreflect.Value { - v := new(Period) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicVestingAccount_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_PeriodicVestingAccount_3_list) NewElement() protoreflect.Value { - v := new(Period) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicVestingAccount_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_PeriodicVestingAccount protoreflect.MessageDescriptor - fd_PeriodicVestingAccount_base_vesting_account protoreflect.FieldDescriptor - fd_PeriodicVestingAccount_start_time protoreflect.FieldDescriptor - fd_PeriodicVestingAccount_vesting_periods protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_vesting_proto_init() - md_PeriodicVestingAccount = File_cosmos_vesting_v1beta1_vesting_proto.Messages().ByName("PeriodicVestingAccount") - fd_PeriodicVestingAccount_base_vesting_account = md_PeriodicVestingAccount.Fields().ByName("base_vesting_account") - fd_PeriodicVestingAccount_start_time = md_PeriodicVestingAccount.Fields().ByName("start_time") - fd_PeriodicVestingAccount_vesting_periods = md_PeriodicVestingAccount.Fields().ByName("vesting_periods") -} - -var _ protoreflect.Message = (*fastReflection_PeriodicVestingAccount)(nil) - -type fastReflection_PeriodicVestingAccount PeriodicVestingAccount - -func (x *PeriodicVestingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_PeriodicVestingAccount)(x) -} - -func (x *PeriodicVestingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PeriodicVestingAccount_messageType fastReflection_PeriodicVestingAccount_messageType -var _ protoreflect.MessageType = fastReflection_PeriodicVestingAccount_messageType{} - -type fastReflection_PeriodicVestingAccount_messageType struct{} - -func (x fastReflection_PeriodicVestingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_PeriodicVestingAccount)(nil) -} -func (x fastReflection_PeriodicVestingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_PeriodicVestingAccount) -} -func (x fastReflection_PeriodicVestingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PeriodicVestingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PeriodicVestingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_PeriodicVestingAccount -} - -// 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_PeriodicVestingAccount) Type() protoreflect.MessageType { - return _fastReflection_PeriodicVestingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PeriodicVestingAccount) New() protoreflect.Message { - return new(fastReflection_PeriodicVestingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PeriodicVestingAccount) Interface() protoreflect.ProtoMessage { - return (*PeriodicVestingAccount)(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_PeriodicVestingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseVestingAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - if !f(fd_PeriodicVestingAccount_base_vesting_account, value) { - return - } - } - if x.StartTime != int64(0) { - value := protoreflect.ValueOfInt64(x.StartTime) - if !f(fd_PeriodicVestingAccount_start_time, value) { - return - } - } - if len(x.VestingPeriods) != 0 { - value := protoreflect.ValueOfList(&_PeriodicVestingAccount_3_list{list: &x.VestingPeriods}) - if !f(fd_PeriodicVestingAccount_vesting_periods, 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_PeriodicVestingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account": - return x.BaseVestingAccount != nil - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.start_time": - return x.StartTime != int64(0) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods": - return len(x.VestingPeriods) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PeriodicVestingAccount 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_PeriodicVestingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account": - x.BaseVestingAccount = nil - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.start_time": - x.StartTime = int64(0) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods": - x.VestingPeriods = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PeriodicVestingAccount 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_PeriodicVestingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account": - value := x.BaseVestingAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.start_time": - value := x.StartTime - return protoreflect.ValueOfInt64(value) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods": - if len(x.VestingPeriods) == 0 { - return protoreflect.ValueOfList(&_PeriodicVestingAccount_3_list{}) - } - listValue := &_PeriodicVestingAccount_3_list{list: &x.VestingPeriods} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PeriodicVestingAccount 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_PeriodicVestingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account": - x.BaseVestingAccount = value.Message().Interface().(*BaseVestingAccount) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.start_time": - x.StartTime = value.Int() - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods": - lv := value.List() - clv := lv.(*_PeriodicVestingAccount_3_list) - x.VestingPeriods = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PeriodicVestingAccount 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_PeriodicVestingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account": - if x.BaseVestingAccount == nil { - x.BaseVestingAccount = new(BaseVestingAccount) - } - return protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods": - if x.VestingPeriods == nil { - x.VestingPeriods = []*Period{} - } - value := &_PeriodicVestingAccount_3_list{list: &x.VestingPeriods} - return protoreflect.ValueOfList(value) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.start_time": - panic(fmt.Errorf("field start_time of message cosmos.vesting.v1beta1.PeriodicVestingAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PeriodicVestingAccount 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_PeriodicVestingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account": - m := new(BaseVestingAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.start_time": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods": - list := []*Period{} - return protoreflect.ValueOfList(&_PeriodicVestingAccount_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PeriodicVestingAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PeriodicVestingAccount 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_PeriodicVestingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.PeriodicVestingAccount", 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_PeriodicVestingAccount) 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_PeriodicVestingAccount) 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_PeriodicVestingAccount) 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_PeriodicVestingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PeriodicVestingAccount) - 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.BaseVestingAccount != nil { - l = options.Size(x.BaseVestingAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != 0 { - n += 1 + runtime.Sov(uint64(x.StartTime)) - } - if len(x.VestingPeriods) > 0 { - for _, e := range x.VestingPeriods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PeriodicVestingAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.VestingPeriods) > 0 { - for iNdEx := len(x.VestingPeriods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VestingPeriods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.StartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartTime)) - i-- - dAtA[i] = 0x10 - } - if x.BaseVestingAccount != nil { - encoded, err := options.Marshal(x.BaseVestingAccount) - 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().(*PeriodicVestingAccount) - 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: PeriodicVestingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeriodicVestingAccount: 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 BaseVestingAccount", 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.BaseVestingAccount == nil { - x.BaseVestingAccount = &BaseVestingAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseVestingAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - x.StartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VestingPeriods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.VestingPeriods = append(x.VestingPeriods, &Period{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VestingPeriods[len(x.VestingPeriods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PermanentLockedAccount protoreflect.MessageDescriptor - fd_PermanentLockedAccount_base_vesting_account protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_vesting_v1beta1_vesting_proto_init() - md_PermanentLockedAccount = File_cosmos_vesting_v1beta1_vesting_proto.Messages().ByName("PermanentLockedAccount") - fd_PermanentLockedAccount_base_vesting_account = md_PermanentLockedAccount.Fields().ByName("base_vesting_account") -} - -var _ protoreflect.Message = (*fastReflection_PermanentLockedAccount)(nil) - -type fastReflection_PermanentLockedAccount PermanentLockedAccount - -func (x *PermanentLockedAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_PermanentLockedAccount)(x) -} - -func (x *PermanentLockedAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_vesting_v1beta1_vesting_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_PermanentLockedAccount_messageType fastReflection_PermanentLockedAccount_messageType -var _ protoreflect.MessageType = fastReflection_PermanentLockedAccount_messageType{} - -type fastReflection_PermanentLockedAccount_messageType struct{} - -func (x fastReflection_PermanentLockedAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_PermanentLockedAccount)(nil) -} -func (x fastReflection_PermanentLockedAccount_messageType) New() protoreflect.Message { - return new(fastReflection_PermanentLockedAccount) -} -func (x fastReflection_PermanentLockedAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PermanentLockedAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PermanentLockedAccount) Descriptor() protoreflect.MessageDescriptor { - return md_PermanentLockedAccount -} - -// 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_PermanentLockedAccount) Type() protoreflect.MessageType { - return _fastReflection_PermanentLockedAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PermanentLockedAccount) New() protoreflect.Message { - return new(fastReflection_PermanentLockedAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PermanentLockedAccount) Interface() protoreflect.ProtoMessage { - return (*PermanentLockedAccount)(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_PermanentLockedAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseVestingAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - if !f(fd_PermanentLockedAccount_base_vesting_account, 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_PermanentLockedAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account": - return x.BaseVestingAccount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PermanentLockedAccount 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_PermanentLockedAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account": - x.BaseVestingAccount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PermanentLockedAccount 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_PermanentLockedAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account": - value := x.BaseVestingAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PermanentLockedAccount 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_PermanentLockedAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account": - x.BaseVestingAccount = value.Message().Interface().(*BaseVestingAccount) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PermanentLockedAccount 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_PermanentLockedAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account": - if x.BaseVestingAccount == nil { - x.BaseVestingAccount = new(BaseVestingAccount) - } - return protoreflect.ValueOfMessage(x.BaseVestingAccount.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PermanentLockedAccount 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_PermanentLockedAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account": - m := new(BaseVestingAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.vesting.v1beta1.PermanentLockedAccount")) - } - panic(fmt.Errorf("message cosmos.vesting.v1beta1.PermanentLockedAccount 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_PermanentLockedAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.vesting.v1beta1.PermanentLockedAccount", 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_PermanentLockedAccount) 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_PermanentLockedAccount) 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_PermanentLockedAccount) 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_PermanentLockedAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PermanentLockedAccount) - 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.BaseVestingAccount != nil { - l = options.Size(x.BaseVestingAccount) - 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().(*PermanentLockedAccount) - 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.BaseVestingAccount != nil { - encoded, err := options.Marshal(x.BaseVestingAccount) - 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().(*PermanentLockedAccount) - 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: PermanentLockedAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PermanentLockedAccount: 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 BaseVestingAccount", 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.BaseVestingAccount == nil { - x.BaseVestingAccount = &BaseVestingAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseVestingAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/vesting/v1beta1/vesting.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BaseVestingAccount implements the VestingAccount interface. It contains all -// the necessary fields needed for any vesting account implementation. -type BaseVestingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseAccount *v1beta11.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3" json:"base_account,omitempty"` - OriginalVesting []*v1beta1.Coin `protobuf:"bytes,2,rep,name=original_vesting,json=originalVesting,proto3" json:"original_vesting,omitempty"` - DelegatedFree []*v1beta1.Coin `protobuf:"bytes,3,rep,name=delegated_free,json=delegatedFree,proto3" json:"delegated_free,omitempty"` - DelegatedVesting []*v1beta1.Coin `protobuf:"bytes,4,rep,name=delegated_vesting,json=delegatedVesting,proto3" json:"delegated_vesting,omitempty"` - EndTime int64 `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` -} - -func (x *BaseVestingAccount) Reset() { - *x = BaseVestingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BaseVestingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BaseVestingAccount) ProtoMessage() {} - -// Deprecated: Use BaseVestingAccount.ProtoReflect.Descriptor instead. -func (*BaseVestingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP(), []int{0} -} - -func (x *BaseVestingAccount) GetBaseAccount() *v1beta11.BaseAccount { - if x != nil { - return x.BaseAccount - } - return nil -} - -func (x *BaseVestingAccount) GetOriginalVesting() []*v1beta1.Coin { - if x != nil { - return x.OriginalVesting - } - return nil -} - -func (x *BaseVestingAccount) GetDelegatedFree() []*v1beta1.Coin { - if x != nil { - return x.DelegatedFree - } - return nil -} - -func (x *BaseVestingAccount) GetDelegatedVesting() []*v1beta1.Coin { - if x != nil { - return x.DelegatedVesting - } - return nil -} - -func (x *BaseVestingAccount) GetEndTime() int64 { - if x != nil { - return x.EndTime - } - return 0 -} - -// ContinuousVestingAccount implements the VestingAccount interface. It -// continuously vests by unlocking coins linearly with respect to time. -type ContinuousVestingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseVestingAccount *BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3" json:"base_vesting_account,omitempty"` - StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` -} - -func (x *ContinuousVestingAccount) Reset() { - *x = ContinuousVestingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContinuousVestingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContinuousVestingAccount) ProtoMessage() {} - -// Deprecated: Use ContinuousVestingAccount.ProtoReflect.Descriptor instead. -func (*ContinuousVestingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP(), []int{1} -} - -func (x *ContinuousVestingAccount) GetBaseVestingAccount() *BaseVestingAccount { - if x != nil { - return x.BaseVestingAccount - } - return nil -} - -func (x *ContinuousVestingAccount) GetStartTime() int64 { - if x != nil { - return x.StartTime - } - return 0 -} - -// DelayedVestingAccount implements the VestingAccount interface. It vests all -// coins after a specific time, but non prior. In other words, it keeps them -// locked until a specified time. -type DelayedVestingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseVestingAccount *BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3" json:"base_vesting_account,omitempty"` -} - -func (x *DelayedVestingAccount) Reset() { - *x = DelayedVestingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelayedVestingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelayedVestingAccount) ProtoMessage() {} - -// Deprecated: Use DelayedVestingAccount.ProtoReflect.Descriptor instead. -func (*DelayedVestingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP(), []int{2} -} - -func (x *DelayedVestingAccount) GetBaseVestingAccount() *BaseVestingAccount { - if x != nil { - return x.BaseVestingAccount - } - return nil -} - -// Period defines a length of time and amount of coins that will vest. -type Period struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Length int64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Period) Reset() { - *x = Period{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Period) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Period) ProtoMessage() {} - -// Deprecated: Use Period.ProtoReflect.Descriptor instead. -func (*Period) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP(), []int{3} -} - -func (x *Period) GetLength() int64 { - if x != nil { - return x.Length - } - return 0 -} - -func (x *Period) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// PeriodicVestingAccount implements the VestingAccount interface. It -// periodically vests by unlocking coins during each specified period. -type PeriodicVestingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseVestingAccount *BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3" json:"base_vesting_account,omitempty"` - StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - VestingPeriods []*Period `protobuf:"bytes,3,rep,name=vesting_periods,json=vestingPeriods,proto3" json:"vesting_periods,omitempty"` -} - -func (x *PeriodicVestingAccount) Reset() { - *x = PeriodicVestingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeriodicVestingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeriodicVestingAccount) ProtoMessage() {} - -// Deprecated: Use PeriodicVestingAccount.ProtoReflect.Descriptor instead. -func (*PeriodicVestingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP(), []int{4} -} - -func (x *PeriodicVestingAccount) GetBaseVestingAccount() *BaseVestingAccount { - if x != nil { - return x.BaseVestingAccount - } - return nil -} - -func (x *PeriodicVestingAccount) GetStartTime() int64 { - if x != nil { - return x.StartTime - } - return 0 -} - -func (x *PeriodicVestingAccount) GetVestingPeriods() []*Period { - if x != nil { - return x.VestingPeriods - } - return nil -} - -// PermanentLockedAccount implements the VestingAccount interface. It does -// not ever release coins, locking them indefinitely. Coins in this account can -// still be used for delegating and for governance votes even while locked. -// -// Since: cosmos-sdk 0.43 -type PermanentLockedAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseVestingAccount *BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3" json:"base_vesting_account,omitempty"` -} - -func (x *PermanentLockedAccount) Reset() { - *x = PermanentLockedAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PermanentLockedAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PermanentLockedAccount) ProtoMessage() {} - -// Deprecated: Use PermanentLockedAccount.ProtoReflect.Descriptor instead. -func (*PermanentLockedAccount) Descriptor() ([]byte, []int) { - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP(), []int{5} -} - -func (x *PermanentLockedAccount) GetBaseVestingAccount() *BaseVestingAccount { - if x != nil { - return x.BaseVestingAccount - } - return nil -} - -var File_cosmos_vesting_v1beta1_vesting_proto protoreflect.FileDescriptor - -var file_cosmos_vesting_v1beta1_vesting_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x03, 0x0a, 0x12, 0x42, 0x61, 0x73, 0x65, 0x56, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x62, - 0x61, 0x73, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x76, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0f, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x72, - 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x65, 0x65, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, - 0x65, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, - 0x00, 0x22, 0xa7, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, - 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x62, - 0x0a, 0x14, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x12, - 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x85, 0x01, 0x0a, 0x15, - 0x44, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x14, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, - 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x12, 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, - 0xa0, 0x1f, 0x00, 0x22, 0x8b, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0x98, 0xa0, 0x1f, - 0x00, 0x22, 0xf4, 0x01, 0x0a, 0x16, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x56, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x14, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x12, 0x62, 0x61, - 0x73, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x4d, 0x0a, 0x0f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, - 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x3a, 0x08, - 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0x22, 0x86, 0x01, 0x0a, 0x16, 0x50, 0x65, 0x72, - 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x14, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x56, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xd0, - 0xde, 0x1f, 0x01, 0x52, 0x12, 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, - 0x00, 0x42, 0xec, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0c, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x56, 0x58, 0xaa, 0x02, - 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_vesting_v1beta1_vesting_proto_rawDescOnce sync.Once - file_cosmos_vesting_v1beta1_vesting_proto_rawDescData = file_cosmos_vesting_v1beta1_vesting_proto_rawDesc -) - -func file_cosmos_vesting_v1beta1_vesting_proto_rawDescGZIP() []byte { - file_cosmos_vesting_v1beta1_vesting_proto_rawDescOnce.Do(func() { - file_cosmos_vesting_v1beta1_vesting_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_vesting_v1beta1_vesting_proto_rawDescData) - }) - return file_cosmos_vesting_v1beta1_vesting_proto_rawDescData -} - -var file_cosmos_vesting_v1beta1_vesting_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cosmos_vesting_v1beta1_vesting_proto_goTypes = []interface{}{ - (*BaseVestingAccount)(nil), // 0: cosmos.vesting.v1beta1.BaseVestingAccount - (*ContinuousVestingAccount)(nil), // 1: cosmos.vesting.v1beta1.ContinuousVestingAccount - (*DelayedVestingAccount)(nil), // 2: cosmos.vesting.v1beta1.DelayedVestingAccount - (*Period)(nil), // 3: cosmos.vesting.v1beta1.Period - (*PeriodicVestingAccount)(nil), // 4: cosmos.vesting.v1beta1.PeriodicVestingAccount - (*PermanentLockedAccount)(nil), // 5: cosmos.vesting.v1beta1.PermanentLockedAccount - (*v1beta11.BaseAccount)(nil), // 6: cosmos.auth.v1beta1.BaseAccount - (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin -} -var file_cosmos_vesting_v1beta1_vesting_proto_depIdxs = []int32{ - 6, // 0: cosmos.vesting.v1beta1.BaseVestingAccount.base_account:type_name -> cosmos.auth.v1beta1.BaseAccount - 7, // 1: cosmos.vesting.v1beta1.BaseVestingAccount.original_vesting:type_name -> cosmos.base.v1beta1.Coin - 7, // 2: cosmos.vesting.v1beta1.BaseVestingAccount.delegated_free:type_name -> cosmos.base.v1beta1.Coin - 7, // 3: cosmos.vesting.v1beta1.BaseVestingAccount.delegated_vesting:type_name -> cosmos.base.v1beta1.Coin - 0, // 4: cosmos.vesting.v1beta1.ContinuousVestingAccount.base_vesting_account:type_name -> cosmos.vesting.v1beta1.BaseVestingAccount - 0, // 5: cosmos.vesting.v1beta1.DelayedVestingAccount.base_vesting_account:type_name -> cosmos.vesting.v1beta1.BaseVestingAccount - 7, // 6: cosmos.vesting.v1beta1.Period.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 7: cosmos.vesting.v1beta1.PeriodicVestingAccount.base_vesting_account:type_name -> cosmos.vesting.v1beta1.BaseVestingAccount - 3, // 8: cosmos.vesting.v1beta1.PeriodicVestingAccount.vesting_periods:type_name -> cosmos.vesting.v1beta1.Period - 0, // 9: cosmos.vesting.v1beta1.PermanentLockedAccount.base_vesting_account:type_name -> cosmos.vesting.v1beta1.BaseVestingAccount - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_cosmos_vesting_v1beta1_vesting_proto_init() } -func file_cosmos_vesting_v1beta1_vesting_proto_init() { - if File_cosmos_vesting_v1beta1_vesting_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseVestingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContinuousVestingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelayedVestingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Period); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeriodicVestingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_vesting_v1beta1_vesting_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PermanentLockedAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_vesting_v1beta1_vesting_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_vesting_v1beta1_vesting_proto_goTypes, - DependencyIndexes: file_cosmos_vesting_v1beta1_vesting_proto_depIdxs, - MessageInfos: file_cosmos_vesting_v1beta1_vesting_proto_msgTypes, - }.Build() - File_cosmos_vesting_v1beta1_vesting_proto = out.File - file_cosmos_vesting_v1beta1_vesting_proto_rawDesc = nil - file_cosmos_vesting_v1beta1_vesting_proto_goTypes = nil - file_cosmos_vesting_v1beta1_vesting_proto_depIdxs = nil -} diff --git a/api/go.mod b/api/go.mod deleted file mode 100644 index 88704c18b38e..000000000000 --- a/api/go.mod +++ /dev/null @@ -1,18 +0,0 @@ -module github.com/cosmos/cosmos-sdk/api - -go 1.17 - -require ( - github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/gogo/protobuf v1.3.2 - google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb - google.golang.org/grpc v1.45.0 - google.golang.org/protobuf v1.28.0 -) - -require ( - github.com/golang/protobuf v1.5.2 // indirect - golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect - golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect - golang.org/x/text v0.3.5 // indirect -) diff --git a/api/tendermint/abci/types.pulsar.go b/api/tendermint/abci/types.pulsar.go deleted file mode 100644 index da32b60a7402..000000000000 --- a/api/tendermint/abci/types.pulsar.go +++ /dev/null @@ -1,31111 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package abci - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - crypto "github.com/cosmos/cosmos-sdk/api/tendermint/crypto" - types "github.com/cosmos/cosmos-sdk/api/tendermint/types" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Request protoreflect.MessageDescriptor - fd_Request_echo protoreflect.FieldDescriptor - fd_Request_flush protoreflect.FieldDescriptor - fd_Request_info protoreflect.FieldDescriptor - fd_Request_set_option protoreflect.FieldDescriptor - fd_Request_init_chain protoreflect.FieldDescriptor - fd_Request_query protoreflect.FieldDescriptor - fd_Request_begin_block protoreflect.FieldDescriptor - fd_Request_check_tx protoreflect.FieldDescriptor - fd_Request_deliver_tx protoreflect.FieldDescriptor - fd_Request_end_block protoreflect.FieldDescriptor - fd_Request_commit protoreflect.FieldDescriptor - fd_Request_list_snapshots protoreflect.FieldDescriptor - fd_Request_offer_snapshot protoreflect.FieldDescriptor - fd_Request_load_snapshot_chunk protoreflect.FieldDescriptor - fd_Request_apply_snapshot_chunk protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_Request = File_tendermint_abci_types_proto.Messages().ByName("Request") - fd_Request_echo = md_Request.Fields().ByName("echo") - fd_Request_flush = md_Request.Fields().ByName("flush") - fd_Request_info = md_Request.Fields().ByName("info") - fd_Request_set_option = md_Request.Fields().ByName("set_option") - fd_Request_init_chain = md_Request.Fields().ByName("init_chain") - fd_Request_query = md_Request.Fields().ByName("query") - fd_Request_begin_block = md_Request.Fields().ByName("begin_block") - fd_Request_check_tx = md_Request.Fields().ByName("check_tx") - fd_Request_deliver_tx = md_Request.Fields().ByName("deliver_tx") - fd_Request_end_block = md_Request.Fields().ByName("end_block") - fd_Request_commit = md_Request.Fields().ByName("commit") - fd_Request_list_snapshots = md_Request.Fields().ByName("list_snapshots") - fd_Request_offer_snapshot = md_Request.Fields().ByName("offer_snapshot") - fd_Request_load_snapshot_chunk = md_Request.Fields().ByName("load_snapshot_chunk") - fd_Request_apply_snapshot_chunk = md_Request.Fields().ByName("apply_snapshot_chunk") -} - -var _ protoreflect.Message = (*fastReflection_Request)(nil) - -type fastReflection_Request Request - -func (x *Request) ProtoReflect() protoreflect.Message { - return (*fastReflection_Request)(x) -} - -func (x *Request) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Request_messageType fastReflection_Request_messageType -var _ protoreflect.MessageType = fastReflection_Request_messageType{} - -type fastReflection_Request_messageType struct{} - -func (x fastReflection_Request_messageType) Zero() protoreflect.Message { - return (*fastReflection_Request)(nil) -} -func (x fastReflection_Request_messageType) New() protoreflect.Message { - return new(fastReflection_Request) -} -func (x fastReflection_Request_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Request -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Request) Descriptor() protoreflect.MessageDescriptor { - return md_Request -} - -// 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_Request) Type() protoreflect.MessageType { - return _fastReflection_Request_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Request) New() protoreflect.Message { - return new(fastReflection_Request) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Request) Interface() protoreflect.ProtoMessage { - return (*Request)(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_Request) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Value != nil { - switch o := x.Value.(type) { - case *Request_Echo: - v := o.Echo - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_echo, value) { - return - } - case *Request_Flush: - v := o.Flush - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_flush, value) { - return - } - case *Request_Info: - v := o.Info - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_info, value) { - return - } - case *Request_SetOption: - v := o.SetOption - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_set_option, value) { - return - } - case *Request_InitChain: - v := o.InitChain - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_init_chain, value) { - return - } - case *Request_Query: - v := o.Query - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_query, value) { - return - } - case *Request_BeginBlock: - v := o.BeginBlock - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_begin_block, value) { - return - } - case *Request_CheckTx: - v := o.CheckTx - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_check_tx, value) { - return - } - case *Request_DeliverTx: - v := o.DeliverTx - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_deliver_tx, value) { - return - } - case *Request_EndBlock: - v := o.EndBlock - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_end_block, value) { - return - } - case *Request_Commit: - v := o.Commit - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_commit, value) { - return - } - case *Request_ListSnapshots: - v := o.ListSnapshots - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_list_snapshots, value) { - return - } - case *Request_OfferSnapshot: - v := o.OfferSnapshot - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_offer_snapshot, value) { - return - } - case *Request_LoadSnapshotChunk: - v := o.LoadSnapshotChunk - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_load_snapshot_chunk, value) { - return - } - case *Request_ApplySnapshotChunk: - v := o.ApplySnapshotChunk - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Request_apply_snapshot_chunk, 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_Request) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.Request.echo": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_Echo); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.flush": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_Flush); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.info": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_Info); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.set_option": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_SetOption); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.init_chain": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_InitChain); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.query": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_Query); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.begin_block": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_BeginBlock); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.check_tx": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_CheckTx); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.deliver_tx": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_DeliverTx); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.end_block": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_EndBlock); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.commit": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_Commit); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.list_snapshots": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_ListSnapshots); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.offer_snapshot": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_OfferSnapshot); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.load_snapshot_chunk": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_LoadSnapshotChunk); ok { - return true - } else { - return false - } - case "tendermint.abci.Request.apply_snapshot_chunk": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Request_ApplySnapshotChunk); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Request")) - } - panic(fmt.Errorf("message tendermint.abci.Request 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_Request) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.Request.echo": - x.Value = nil - case "tendermint.abci.Request.flush": - x.Value = nil - case "tendermint.abci.Request.info": - x.Value = nil - case "tendermint.abci.Request.set_option": - x.Value = nil - case "tendermint.abci.Request.init_chain": - x.Value = nil - case "tendermint.abci.Request.query": - x.Value = nil - case "tendermint.abci.Request.begin_block": - x.Value = nil - case "tendermint.abci.Request.check_tx": - x.Value = nil - case "tendermint.abci.Request.deliver_tx": - x.Value = nil - case "tendermint.abci.Request.end_block": - x.Value = nil - case "tendermint.abci.Request.commit": - x.Value = nil - case "tendermint.abci.Request.list_snapshots": - x.Value = nil - case "tendermint.abci.Request.offer_snapshot": - x.Value = nil - case "tendermint.abci.Request.load_snapshot_chunk": - x.Value = nil - case "tendermint.abci.Request.apply_snapshot_chunk": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Request")) - } - panic(fmt.Errorf("message tendermint.abci.Request 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_Request) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.Request.echo": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestEcho)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_Echo); ok { - return protoreflect.ValueOfMessage(v.Echo.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestEcho)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.flush": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestFlush)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_Flush); ok { - return protoreflect.ValueOfMessage(v.Flush.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestFlush)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.info": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestInfo)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_Info); ok { - return protoreflect.ValueOfMessage(v.Info.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestInfo)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.set_option": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestSetOption)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_SetOption); ok { - return protoreflect.ValueOfMessage(v.SetOption.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestSetOption)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.init_chain": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestInitChain)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_InitChain); ok { - return protoreflect.ValueOfMessage(v.InitChain.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestInitChain)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.query": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestQuery)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_Query); ok { - return protoreflect.ValueOfMessage(v.Query.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestQuery)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.begin_block": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestBeginBlock)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_BeginBlock); ok { - return protoreflect.ValueOfMessage(v.BeginBlock.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestBeginBlock)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.check_tx": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestCheckTx)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_CheckTx); ok { - return protoreflect.ValueOfMessage(v.CheckTx.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestCheckTx)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.deliver_tx": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestDeliverTx)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_DeliverTx); ok { - return protoreflect.ValueOfMessage(v.DeliverTx.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestDeliverTx)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.end_block": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestEndBlock)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_EndBlock); ok { - return protoreflect.ValueOfMessage(v.EndBlock.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestEndBlock)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.commit": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestCommit)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_Commit); ok { - return protoreflect.ValueOfMessage(v.Commit.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestCommit)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.list_snapshots": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestListSnapshots)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_ListSnapshots); ok { - return protoreflect.ValueOfMessage(v.ListSnapshots.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestListSnapshots)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.offer_snapshot": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestOfferSnapshot)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_OfferSnapshot); ok { - return protoreflect.ValueOfMessage(v.OfferSnapshot.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestOfferSnapshot)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.load_snapshot_chunk": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestLoadSnapshotChunk)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_LoadSnapshotChunk); ok { - return protoreflect.ValueOfMessage(v.LoadSnapshotChunk.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestLoadSnapshotChunk)(nil).ProtoReflect()) - } - case "tendermint.abci.Request.apply_snapshot_chunk": - if x.Value == nil { - return protoreflect.ValueOfMessage((*RequestApplySnapshotChunk)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Request_ApplySnapshotChunk); ok { - return protoreflect.ValueOfMessage(v.ApplySnapshotChunk.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*RequestApplySnapshotChunk)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Request")) - } - panic(fmt.Errorf("message tendermint.abci.Request 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_Request) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.Request.echo": - cv := value.Message().Interface().(*RequestEcho) - x.Value = &Request_Echo{Echo: cv} - case "tendermint.abci.Request.flush": - cv := value.Message().Interface().(*RequestFlush) - x.Value = &Request_Flush{Flush: cv} - case "tendermint.abci.Request.info": - cv := value.Message().Interface().(*RequestInfo) - x.Value = &Request_Info{Info: cv} - case "tendermint.abci.Request.set_option": - cv := value.Message().Interface().(*RequestSetOption) - x.Value = &Request_SetOption{SetOption: cv} - case "tendermint.abci.Request.init_chain": - cv := value.Message().Interface().(*RequestInitChain) - x.Value = &Request_InitChain{InitChain: cv} - case "tendermint.abci.Request.query": - cv := value.Message().Interface().(*RequestQuery) - x.Value = &Request_Query{Query: cv} - case "tendermint.abci.Request.begin_block": - cv := value.Message().Interface().(*RequestBeginBlock) - x.Value = &Request_BeginBlock{BeginBlock: cv} - case "tendermint.abci.Request.check_tx": - cv := value.Message().Interface().(*RequestCheckTx) - x.Value = &Request_CheckTx{CheckTx: cv} - case "tendermint.abci.Request.deliver_tx": - cv := value.Message().Interface().(*RequestDeliverTx) - x.Value = &Request_DeliverTx{DeliverTx: cv} - case "tendermint.abci.Request.end_block": - cv := value.Message().Interface().(*RequestEndBlock) - x.Value = &Request_EndBlock{EndBlock: cv} - case "tendermint.abci.Request.commit": - cv := value.Message().Interface().(*RequestCommit) - x.Value = &Request_Commit{Commit: cv} - case "tendermint.abci.Request.list_snapshots": - cv := value.Message().Interface().(*RequestListSnapshots) - x.Value = &Request_ListSnapshots{ListSnapshots: cv} - case "tendermint.abci.Request.offer_snapshot": - cv := value.Message().Interface().(*RequestOfferSnapshot) - x.Value = &Request_OfferSnapshot{OfferSnapshot: cv} - case "tendermint.abci.Request.load_snapshot_chunk": - cv := value.Message().Interface().(*RequestLoadSnapshotChunk) - x.Value = &Request_LoadSnapshotChunk{LoadSnapshotChunk: cv} - case "tendermint.abci.Request.apply_snapshot_chunk": - cv := value.Message().Interface().(*RequestApplySnapshotChunk) - x.Value = &Request_ApplySnapshotChunk{ApplySnapshotChunk: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Request")) - } - panic(fmt.Errorf("message tendermint.abci.Request 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_Request) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Request.echo": - if x.Value == nil { - value := &RequestEcho{} - oneofValue := &Request_Echo{Echo: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_Echo: - return protoreflect.ValueOfMessage(m.Echo.ProtoReflect()) - default: - value := &RequestEcho{} - oneofValue := &Request_Echo{Echo: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.flush": - if x.Value == nil { - value := &RequestFlush{} - oneofValue := &Request_Flush{Flush: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_Flush: - return protoreflect.ValueOfMessage(m.Flush.ProtoReflect()) - default: - value := &RequestFlush{} - oneofValue := &Request_Flush{Flush: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.info": - if x.Value == nil { - value := &RequestInfo{} - oneofValue := &Request_Info{Info: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_Info: - return protoreflect.ValueOfMessage(m.Info.ProtoReflect()) - default: - value := &RequestInfo{} - oneofValue := &Request_Info{Info: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.set_option": - if x.Value == nil { - value := &RequestSetOption{} - oneofValue := &Request_SetOption{SetOption: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_SetOption: - return protoreflect.ValueOfMessage(m.SetOption.ProtoReflect()) - default: - value := &RequestSetOption{} - oneofValue := &Request_SetOption{SetOption: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.init_chain": - if x.Value == nil { - value := &RequestInitChain{} - oneofValue := &Request_InitChain{InitChain: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_InitChain: - return protoreflect.ValueOfMessage(m.InitChain.ProtoReflect()) - default: - value := &RequestInitChain{} - oneofValue := &Request_InitChain{InitChain: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.query": - if x.Value == nil { - value := &RequestQuery{} - oneofValue := &Request_Query{Query: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_Query: - return protoreflect.ValueOfMessage(m.Query.ProtoReflect()) - default: - value := &RequestQuery{} - oneofValue := &Request_Query{Query: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.begin_block": - if x.Value == nil { - value := &RequestBeginBlock{} - oneofValue := &Request_BeginBlock{BeginBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_BeginBlock: - return protoreflect.ValueOfMessage(m.BeginBlock.ProtoReflect()) - default: - value := &RequestBeginBlock{} - oneofValue := &Request_BeginBlock{BeginBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.check_tx": - if x.Value == nil { - value := &RequestCheckTx{} - oneofValue := &Request_CheckTx{CheckTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_CheckTx: - return protoreflect.ValueOfMessage(m.CheckTx.ProtoReflect()) - default: - value := &RequestCheckTx{} - oneofValue := &Request_CheckTx{CheckTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.deliver_tx": - if x.Value == nil { - value := &RequestDeliverTx{} - oneofValue := &Request_DeliverTx{DeliverTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_DeliverTx: - return protoreflect.ValueOfMessage(m.DeliverTx.ProtoReflect()) - default: - value := &RequestDeliverTx{} - oneofValue := &Request_DeliverTx{DeliverTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.end_block": - if x.Value == nil { - value := &RequestEndBlock{} - oneofValue := &Request_EndBlock{EndBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_EndBlock: - return protoreflect.ValueOfMessage(m.EndBlock.ProtoReflect()) - default: - value := &RequestEndBlock{} - oneofValue := &Request_EndBlock{EndBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.commit": - if x.Value == nil { - value := &RequestCommit{} - oneofValue := &Request_Commit{Commit: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_Commit: - return protoreflect.ValueOfMessage(m.Commit.ProtoReflect()) - default: - value := &RequestCommit{} - oneofValue := &Request_Commit{Commit: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.list_snapshots": - if x.Value == nil { - value := &RequestListSnapshots{} - oneofValue := &Request_ListSnapshots{ListSnapshots: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_ListSnapshots: - return protoreflect.ValueOfMessage(m.ListSnapshots.ProtoReflect()) - default: - value := &RequestListSnapshots{} - oneofValue := &Request_ListSnapshots{ListSnapshots: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.offer_snapshot": - if x.Value == nil { - value := &RequestOfferSnapshot{} - oneofValue := &Request_OfferSnapshot{OfferSnapshot: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_OfferSnapshot: - return protoreflect.ValueOfMessage(m.OfferSnapshot.ProtoReflect()) - default: - value := &RequestOfferSnapshot{} - oneofValue := &Request_OfferSnapshot{OfferSnapshot: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.load_snapshot_chunk": - if x.Value == nil { - value := &RequestLoadSnapshotChunk{} - oneofValue := &Request_LoadSnapshotChunk{LoadSnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_LoadSnapshotChunk: - return protoreflect.ValueOfMessage(m.LoadSnapshotChunk.ProtoReflect()) - default: - value := &RequestLoadSnapshotChunk{} - oneofValue := &Request_LoadSnapshotChunk{LoadSnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Request.apply_snapshot_chunk": - if x.Value == nil { - value := &RequestApplySnapshotChunk{} - oneofValue := &Request_ApplySnapshotChunk{ApplySnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Request_ApplySnapshotChunk: - return protoreflect.ValueOfMessage(m.ApplySnapshotChunk.ProtoReflect()) - default: - value := &RequestApplySnapshotChunk{} - oneofValue := &Request_ApplySnapshotChunk{ApplySnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Request")) - } - panic(fmt.Errorf("message tendermint.abci.Request 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_Request) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Request.echo": - value := &RequestEcho{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.flush": - value := &RequestFlush{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.info": - value := &RequestInfo{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.set_option": - value := &RequestSetOption{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.init_chain": - value := &RequestInitChain{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.query": - value := &RequestQuery{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.begin_block": - value := &RequestBeginBlock{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.check_tx": - value := &RequestCheckTx{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.deliver_tx": - value := &RequestDeliverTx{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.end_block": - value := &RequestEndBlock{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.commit": - value := &RequestCommit{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.list_snapshots": - value := &RequestListSnapshots{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.offer_snapshot": - value := &RequestOfferSnapshot{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.load_snapshot_chunk": - value := &RequestLoadSnapshotChunk{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Request.apply_snapshot_chunk": - value := &RequestApplySnapshotChunk{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Request")) - } - panic(fmt.Errorf("message tendermint.abci.Request 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_Request) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "tendermint.abci.Request.value": - if x.Value == nil { - return nil - } - switch x.Value.(type) { - case *Request_Echo: - return x.Descriptor().Fields().ByName("echo") - case *Request_Flush: - return x.Descriptor().Fields().ByName("flush") - case *Request_Info: - return x.Descriptor().Fields().ByName("info") - case *Request_SetOption: - return x.Descriptor().Fields().ByName("set_option") - case *Request_InitChain: - return x.Descriptor().Fields().ByName("init_chain") - case *Request_Query: - return x.Descriptor().Fields().ByName("query") - case *Request_BeginBlock: - return x.Descriptor().Fields().ByName("begin_block") - case *Request_CheckTx: - return x.Descriptor().Fields().ByName("check_tx") - case *Request_DeliverTx: - return x.Descriptor().Fields().ByName("deliver_tx") - case *Request_EndBlock: - return x.Descriptor().Fields().ByName("end_block") - case *Request_Commit: - return x.Descriptor().Fields().ByName("commit") - case *Request_ListSnapshots: - return x.Descriptor().Fields().ByName("list_snapshots") - case *Request_OfferSnapshot: - return x.Descriptor().Fields().ByName("offer_snapshot") - case *Request_LoadSnapshotChunk: - return x.Descriptor().Fields().ByName("load_snapshot_chunk") - case *Request_ApplySnapshotChunk: - return x.Descriptor().Fields().ByName("apply_snapshot_chunk") - } - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.Request", 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_Request) 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_Request) 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_Request) 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_Request) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Request) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Value.(type) { - case *Request_Echo: - if x == nil { - break - } - l = options.Size(x.Echo) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_Flush: - if x == nil { - break - } - l = options.Size(x.Flush) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_Info: - if x == nil { - break - } - l = options.Size(x.Info) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_SetOption: - if x == nil { - break - } - l = options.Size(x.SetOption) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_InitChain: - if x == nil { - break - } - l = options.Size(x.InitChain) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_Query: - if x == nil { - break - } - l = options.Size(x.Query) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_BeginBlock: - if x == nil { - break - } - l = options.Size(x.BeginBlock) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_CheckTx: - if x == nil { - break - } - l = options.Size(x.CheckTx) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_DeliverTx: - if x == nil { - break - } - l = options.Size(x.DeliverTx) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_EndBlock: - if x == nil { - break - } - l = options.Size(x.EndBlock) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_Commit: - if x == nil { - break - } - l = options.Size(x.Commit) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_ListSnapshots: - if x == nil { - break - } - l = options.Size(x.ListSnapshots) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_OfferSnapshot: - if x == nil { - break - } - l = options.Size(x.OfferSnapshot) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_LoadSnapshotChunk: - if x == nil { - break - } - l = options.Size(x.LoadSnapshotChunk) - n += 1 + l + runtime.Sov(uint64(l)) - case *Request_ApplySnapshotChunk: - if x == nil { - break - } - l = options.Size(x.ApplySnapshotChunk) - 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().(*Request) - 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) - } - switch x := x.Value.(type) { - case *Request_Echo: - encoded, err := options.Marshal(x.Echo) - 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 - case *Request_Flush: - encoded, err := options.Marshal(x.Flush) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - case *Request_Info: - encoded, err := options.Marshal(x.Info) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - case *Request_SetOption: - encoded, err := options.Marshal(x.SetOption) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - case *Request_InitChain: - encoded, err := options.Marshal(x.InitChain) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - case *Request_Query: - encoded, err := options.Marshal(x.Query) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - case *Request_BeginBlock: - encoded, err := options.Marshal(x.BeginBlock) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - case *Request_CheckTx: - encoded, err := options.Marshal(x.CheckTx) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - case *Request_DeliverTx: - encoded, err := options.Marshal(x.DeliverTx) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - case *Request_EndBlock: - encoded, err := options.Marshal(x.EndBlock) - 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] = 0x52 - case *Request_Commit: - encoded, err := options.Marshal(x.Commit) - 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] = 0x5a - case *Request_ListSnapshots: - encoded, err := options.Marshal(x.ListSnapshots) - 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] = 0x62 - case *Request_OfferSnapshot: - encoded, err := options.Marshal(x.OfferSnapshot) - 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] = 0x6a - case *Request_LoadSnapshotChunk: - encoded, err := options.Marshal(x.LoadSnapshotChunk) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x72 - case *Request_ApplySnapshotChunk: - encoded, err := options.Marshal(x.ApplySnapshotChunk) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x7a - } - if 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().(*Request) - 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: Request: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Request: 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 Echo", 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 - } - v := &RequestEcho{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_Echo{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Flush", 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 - } - v := &RequestFlush{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_Flush{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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 - } - v := &RequestInfo{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_Info{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SetOption", 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 - } - v := &RequestSetOption{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_SetOption{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitChain", 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 - } - v := &RequestInitChain{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_InitChain{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Query", 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 - } - v := &RequestQuery{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_Query{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", 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 - } - v := &RequestBeginBlock{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_BeginBlock{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CheckTx", 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 - } - v := &RequestCheckTx{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_CheckTx{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", 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 - } - v := &RequestDeliverTx{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_DeliverTx{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndBlock", 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 - } - v := &RequestEndBlock{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_EndBlock{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commit", 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 - } - v := &RequestCommit{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_Commit{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", 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 - } - v := &RequestListSnapshots{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_ListSnapshots{v} - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", 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 - } - v := &RequestOfferSnapshot{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_OfferSnapshot{v} - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", 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 - } - v := &RequestLoadSnapshotChunk{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_LoadSnapshotChunk{v} - iNdEx = postIndex - case 15: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", 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 - } - v := &RequestApplySnapshotChunk{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Request_ApplySnapshotChunk{v} - 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_RequestEcho protoreflect.MessageDescriptor - fd_RequestEcho_message protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestEcho = File_tendermint_abci_types_proto.Messages().ByName("RequestEcho") - fd_RequestEcho_message = md_RequestEcho.Fields().ByName("message") -} - -var _ protoreflect.Message = (*fastReflection_RequestEcho)(nil) - -type fastReflection_RequestEcho RequestEcho - -func (x *RequestEcho) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestEcho)(x) -} - -func (x *RequestEcho) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestEcho_messageType fastReflection_RequestEcho_messageType -var _ protoreflect.MessageType = fastReflection_RequestEcho_messageType{} - -type fastReflection_RequestEcho_messageType struct{} - -func (x fastReflection_RequestEcho_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestEcho)(nil) -} -func (x fastReflection_RequestEcho_messageType) New() protoreflect.Message { - return new(fastReflection_RequestEcho) -} -func (x fastReflection_RequestEcho_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestEcho -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestEcho) Descriptor() protoreflect.MessageDescriptor { - return md_RequestEcho -} - -// 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_RequestEcho) Type() protoreflect.MessageType { - return _fastReflection_RequestEcho_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestEcho) New() protoreflect.Message { - return new(fastReflection_RequestEcho) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestEcho) Interface() protoreflect.ProtoMessage { - return (*RequestEcho)(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_RequestEcho) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Message != "" { - value := protoreflect.ValueOfString(x.Message) - if !f(fd_RequestEcho_message, 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_RequestEcho) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestEcho.message": - return x.Message != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEcho")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEcho 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_RequestEcho) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestEcho.message": - x.Message = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEcho")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEcho 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_RequestEcho) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestEcho.message": - value := x.Message - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEcho")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEcho 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_RequestEcho) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestEcho.message": - x.Message = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEcho")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEcho 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_RequestEcho) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestEcho.message": - panic(fmt.Errorf("field message of message tendermint.abci.RequestEcho is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEcho")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEcho 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_RequestEcho) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestEcho.message": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEcho")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEcho 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_RequestEcho) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestEcho", 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_RequestEcho) 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_RequestEcho) 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_RequestEcho) 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_RequestEcho) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestEcho) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Message) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RequestEcho) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Message) > 0 { - i -= len(x.Message) - copy(dAtA[i:], x.Message) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) - 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().(*RequestEcho) - 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: RequestEcho: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestEcho: 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 Message", 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.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestFlush protoreflect.MessageDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestFlush = File_tendermint_abci_types_proto.Messages().ByName("RequestFlush") -} - -var _ protoreflect.Message = (*fastReflection_RequestFlush)(nil) - -type fastReflection_RequestFlush RequestFlush - -func (x *RequestFlush) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestFlush)(x) -} - -func (x *RequestFlush) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestFlush_messageType fastReflection_RequestFlush_messageType -var _ protoreflect.MessageType = fastReflection_RequestFlush_messageType{} - -type fastReflection_RequestFlush_messageType struct{} - -func (x fastReflection_RequestFlush_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestFlush)(nil) -} -func (x fastReflection_RequestFlush_messageType) New() protoreflect.Message { - return new(fastReflection_RequestFlush) -} -func (x fastReflection_RequestFlush_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestFlush -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestFlush) Descriptor() protoreflect.MessageDescriptor { - return md_RequestFlush -} - -// 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_RequestFlush) Type() protoreflect.MessageType { - return _fastReflection_RequestFlush_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestFlush) New() protoreflect.Message { - return new(fastReflection_RequestFlush) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestFlush) Interface() protoreflect.ProtoMessage { - return (*RequestFlush)(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_RequestFlush) 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_RequestFlush) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestFlush")) - } - panic(fmt.Errorf("message tendermint.abci.RequestFlush 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_RequestFlush) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestFlush")) - } - panic(fmt.Errorf("message tendermint.abci.RequestFlush 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_RequestFlush) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestFlush")) - } - panic(fmt.Errorf("message tendermint.abci.RequestFlush 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_RequestFlush) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestFlush")) - } - panic(fmt.Errorf("message tendermint.abci.RequestFlush 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_RequestFlush) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestFlush")) - } - panic(fmt.Errorf("message tendermint.abci.RequestFlush 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_RequestFlush) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestFlush")) - } - panic(fmt.Errorf("message tendermint.abci.RequestFlush 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_RequestFlush) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestFlush", 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_RequestFlush) 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_RequestFlush) 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_RequestFlush) 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_RequestFlush) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestFlush) - 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().(*RequestFlush) - 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().(*RequestFlush) - 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: RequestFlush: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestFlush: 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_RequestInfo protoreflect.MessageDescriptor - fd_RequestInfo_version protoreflect.FieldDescriptor - fd_RequestInfo_block_version protoreflect.FieldDescriptor - fd_RequestInfo_p2p_version protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestInfo = File_tendermint_abci_types_proto.Messages().ByName("RequestInfo") - fd_RequestInfo_version = md_RequestInfo.Fields().ByName("version") - fd_RequestInfo_block_version = md_RequestInfo.Fields().ByName("block_version") - fd_RequestInfo_p2p_version = md_RequestInfo.Fields().ByName("p2p_version") -} - -var _ protoreflect.Message = (*fastReflection_RequestInfo)(nil) - -type fastReflection_RequestInfo RequestInfo - -func (x *RequestInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestInfo)(x) -} - -func (x *RequestInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestInfo_messageType fastReflection_RequestInfo_messageType -var _ protoreflect.MessageType = fastReflection_RequestInfo_messageType{} - -type fastReflection_RequestInfo_messageType struct{} - -func (x fastReflection_RequestInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestInfo)(nil) -} -func (x fastReflection_RequestInfo_messageType) New() protoreflect.Message { - return new(fastReflection_RequestInfo) -} -func (x fastReflection_RequestInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestInfo) Descriptor() protoreflect.MessageDescriptor { - return md_RequestInfo -} - -// 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_RequestInfo) Type() protoreflect.MessageType { - return _fastReflection_RequestInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestInfo) New() protoreflect.Message { - return new(fastReflection_RequestInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestInfo) Interface() protoreflect.ProtoMessage { - return (*RequestInfo)(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_RequestInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_RequestInfo_version, value) { - return - } - } - if x.BlockVersion != uint64(0) { - value := protoreflect.ValueOfUint64(x.BlockVersion) - if !f(fd_RequestInfo_block_version, value) { - return - } - } - if x.P2PVersion != uint64(0) { - value := protoreflect.ValueOfUint64(x.P2PVersion) - if !f(fd_RequestInfo_p2p_version, 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_RequestInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestInfo.version": - return x.Version != "" - case "tendermint.abci.RequestInfo.block_version": - return x.BlockVersion != uint64(0) - case "tendermint.abci.RequestInfo.p2p_version": - return x.P2PVersion != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInfo")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInfo 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_RequestInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestInfo.version": - x.Version = "" - case "tendermint.abci.RequestInfo.block_version": - x.BlockVersion = uint64(0) - case "tendermint.abci.RequestInfo.p2p_version": - x.P2PVersion = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInfo")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInfo 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_RequestInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestInfo.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "tendermint.abci.RequestInfo.block_version": - value := x.BlockVersion - return protoreflect.ValueOfUint64(value) - case "tendermint.abci.RequestInfo.p2p_version": - value := x.P2PVersion - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInfo")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInfo 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_RequestInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestInfo.version": - x.Version = value.Interface().(string) - case "tendermint.abci.RequestInfo.block_version": - x.BlockVersion = value.Uint() - case "tendermint.abci.RequestInfo.p2p_version": - x.P2PVersion = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInfo")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInfo 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_RequestInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestInfo.version": - panic(fmt.Errorf("field version of message tendermint.abci.RequestInfo is not mutable")) - case "tendermint.abci.RequestInfo.block_version": - panic(fmt.Errorf("field block_version of message tendermint.abci.RequestInfo is not mutable")) - case "tendermint.abci.RequestInfo.p2p_version": - panic(fmt.Errorf("field p2p_version of message tendermint.abci.RequestInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInfo")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInfo 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_RequestInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestInfo.version": - return protoreflect.ValueOfString("") - case "tendermint.abci.RequestInfo.block_version": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.abci.RequestInfo.p2p_version": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInfo")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInfo 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_RequestInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestInfo", 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_RequestInfo) 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_RequestInfo) 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_RequestInfo) 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_RequestInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BlockVersion != 0 { - n += 1 + runtime.Sov(uint64(x.BlockVersion)) - } - if x.P2PVersion != 0 { - n += 1 + runtime.Sov(uint64(x.P2PVersion)) - } - 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().(*RequestInfo) - 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.P2PVersion != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.P2PVersion)) - i-- - dAtA[i] = 0x18 - } - if x.BlockVersion != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockVersion)) - i-- - dAtA[i] = 0x10 - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - 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().(*RequestInfo) - 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: RequestInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestInfo: 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 Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType) - } - x.BlockVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType) - } - x.P2PVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.P2PVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestSetOption protoreflect.MessageDescriptor - fd_RequestSetOption_key protoreflect.FieldDescriptor - fd_RequestSetOption_value protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestSetOption = File_tendermint_abci_types_proto.Messages().ByName("RequestSetOption") - fd_RequestSetOption_key = md_RequestSetOption.Fields().ByName("key") - fd_RequestSetOption_value = md_RequestSetOption.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_RequestSetOption)(nil) - -type fastReflection_RequestSetOption RequestSetOption - -func (x *RequestSetOption) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestSetOption)(x) -} - -func (x *RequestSetOption) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestSetOption_messageType fastReflection_RequestSetOption_messageType -var _ protoreflect.MessageType = fastReflection_RequestSetOption_messageType{} - -type fastReflection_RequestSetOption_messageType struct{} - -func (x fastReflection_RequestSetOption_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestSetOption)(nil) -} -func (x fastReflection_RequestSetOption_messageType) New() protoreflect.Message { - return new(fastReflection_RequestSetOption) -} -func (x fastReflection_RequestSetOption_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestSetOption -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestSetOption) Descriptor() protoreflect.MessageDescriptor { - return md_RequestSetOption -} - -// 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_RequestSetOption) Type() protoreflect.MessageType { - return _fastReflection_RequestSetOption_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestSetOption) New() protoreflect.Message { - return new(fastReflection_RequestSetOption) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestSetOption) Interface() protoreflect.ProtoMessage { - return (*RequestSetOption)(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_RequestSetOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Key != "" { - value := protoreflect.ValueOfString(x.Key) - if !f(fd_RequestSetOption_key, value) { - return - } - } - if x.Value != "" { - value := protoreflect.ValueOfString(x.Value) - if !f(fd_RequestSetOption_value, 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_RequestSetOption) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestSetOption.key": - return x.Key != "" - case "tendermint.abci.RequestSetOption.value": - return x.Value != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.RequestSetOption 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_RequestSetOption) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestSetOption.key": - x.Key = "" - case "tendermint.abci.RequestSetOption.value": - x.Value = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.RequestSetOption 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_RequestSetOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestSetOption.key": - value := x.Key - return protoreflect.ValueOfString(value) - case "tendermint.abci.RequestSetOption.value": - value := x.Value - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.RequestSetOption 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_RequestSetOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestSetOption.key": - x.Key = value.Interface().(string) - case "tendermint.abci.RequestSetOption.value": - x.Value = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.RequestSetOption 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_RequestSetOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestSetOption.key": - panic(fmt.Errorf("field key of message tendermint.abci.RequestSetOption is not mutable")) - case "tendermint.abci.RequestSetOption.value": - panic(fmt.Errorf("field value of message tendermint.abci.RequestSetOption is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.RequestSetOption 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_RequestSetOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestSetOption.key": - return protoreflect.ValueOfString("") - case "tendermint.abci.RequestSetOption.value": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.RequestSetOption 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_RequestSetOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestSetOption", 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_RequestSetOption) 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_RequestSetOption) 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_RequestSetOption) 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_RequestSetOption) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestSetOption) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RequestSetOption) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*RequestSetOption) - 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: RequestSetOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestSetOption: 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 Key", 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.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_RequestInitChain_4_list)(nil) - -type _RequestInitChain_4_list struct { - list *[]*ValidatorUpdate -} - -func (x *_RequestInitChain_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_RequestInitChain_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_RequestInitChain_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorUpdate) - (*x.list)[i] = concreteValue -} - -func (x *_RequestInitChain_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorUpdate) - *x.list = append(*x.list, concreteValue) -} - -func (x *_RequestInitChain_4_list) AppendMutable() protoreflect.Value { - v := new(ValidatorUpdate) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RequestInitChain_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_RequestInitChain_4_list) NewElement() protoreflect.Value { - v := new(ValidatorUpdate) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RequestInitChain_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_RequestInitChain protoreflect.MessageDescriptor - fd_RequestInitChain_time protoreflect.FieldDescriptor - fd_RequestInitChain_chain_id protoreflect.FieldDescriptor - fd_RequestInitChain_consensus_params protoreflect.FieldDescriptor - fd_RequestInitChain_validators protoreflect.FieldDescriptor - fd_RequestInitChain_app_state_bytes protoreflect.FieldDescriptor - fd_RequestInitChain_initial_height protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestInitChain = File_tendermint_abci_types_proto.Messages().ByName("RequestInitChain") - fd_RequestInitChain_time = md_RequestInitChain.Fields().ByName("time") - fd_RequestInitChain_chain_id = md_RequestInitChain.Fields().ByName("chain_id") - fd_RequestInitChain_consensus_params = md_RequestInitChain.Fields().ByName("consensus_params") - fd_RequestInitChain_validators = md_RequestInitChain.Fields().ByName("validators") - fd_RequestInitChain_app_state_bytes = md_RequestInitChain.Fields().ByName("app_state_bytes") - fd_RequestInitChain_initial_height = md_RequestInitChain.Fields().ByName("initial_height") -} - -var _ protoreflect.Message = (*fastReflection_RequestInitChain)(nil) - -type fastReflection_RequestInitChain RequestInitChain - -func (x *RequestInitChain) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestInitChain)(x) -} - -func (x *RequestInitChain) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_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_RequestInitChain_messageType fastReflection_RequestInitChain_messageType -var _ protoreflect.MessageType = fastReflection_RequestInitChain_messageType{} - -type fastReflection_RequestInitChain_messageType struct{} - -func (x fastReflection_RequestInitChain_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestInitChain)(nil) -} -func (x fastReflection_RequestInitChain_messageType) New() protoreflect.Message { - return new(fastReflection_RequestInitChain) -} -func (x fastReflection_RequestInitChain_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestInitChain -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestInitChain) Descriptor() protoreflect.MessageDescriptor { - return md_RequestInitChain -} - -// 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_RequestInitChain) Type() protoreflect.MessageType { - return _fastReflection_RequestInitChain_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestInitChain) New() protoreflect.Message { - return new(fastReflection_RequestInitChain) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestInitChain) Interface() protoreflect.ProtoMessage { - return (*RequestInitChain)(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_RequestInitChain) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Time != nil { - value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - if !f(fd_RequestInitChain_time, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_RequestInitChain_chain_id, value) { - return - } - } - if x.ConsensusParams != nil { - value := protoreflect.ValueOfMessage(x.ConsensusParams.ProtoReflect()) - if !f(fd_RequestInitChain_consensus_params, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_RequestInitChain_4_list{list: &x.Validators}) - if !f(fd_RequestInitChain_validators, value) { - return - } - } - if len(x.AppStateBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AppStateBytes) - if !f(fd_RequestInitChain_app_state_bytes, value) { - return - } - } - if x.InitialHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.InitialHeight) - if !f(fd_RequestInitChain_initial_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_RequestInitChain) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestInitChain.time": - return x.Time != nil - case "tendermint.abci.RequestInitChain.chain_id": - return x.ChainId != "" - case "tendermint.abci.RequestInitChain.consensus_params": - return x.ConsensusParams != nil - case "tendermint.abci.RequestInitChain.validators": - return len(x.Validators) != 0 - case "tendermint.abci.RequestInitChain.app_state_bytes": - return len(x.AppStateBytes) != 0 - case "tendermint.abci.RequestInitChain.initial_height": - return x.InitialHeight != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInitChain 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_RequestInitChain) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestInitChain.time": - x.Time = nil - case "tendermint.abci.RequestInitChain.chain_id": - x.ChainId = "" - case "tendermint.abci.RequestInitChain.consensus_params": - x.ConsensusParams = nil - case "tendermint.abci.RequestInitChain.validators": - x.Validators = nil - case "tendermint.abci.RequestInitChain.app_state_bytes": - x.AppStateBytes = nil - case "tendermint.abci.RequestInitChain.initial_height": - x.InitialHeight = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInitChain 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_RequestInitChain) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestInitChain.time": - value := x.Time - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.RequestInitChain.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "tendermint.abci.RequestInitChain.consensus_params": - value := x.ConsensusParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.RequestInitChain.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_RequestInitChain_4_list{}) - } - listValue := &_RequestInitChain_4_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "tendermint.abci.RequestInitChain.app_state_bytes": - value := x.AppStateBytes - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.RequestInitChain.initial_height": - value := x.InitialHeight - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInitChain 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_RequestInitChain) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestInitChain.time": - x.Time = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.abci.RequestInitChain.chain_id": - x.ChainId = value.Interface().(string) - case "tendermint.abci.RequestInitChain.consensus_params": - x.ConsensusParams = value.Message().Interface().(*ConsensusParams) - case "tendermint.abci.RequestInitChain.validators": - lv := value.List() - clv := lv.(*_RequestInitChain_4_list) - x.Validators = *clv.list - case "tendermint.abci.RequestInitChain.app_state_bytes": - x.AppStateBytes = value.Bytes() - case "tendermint.abci.RequestInitChain.initial_height": - x.InitialHeight = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInitChain 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_RequestInitChain) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestInitChain.time": - if x.Time == nil { - x.Time = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - case "tendermint.abci.RequestInitChain.consensus_params": - if x.ConsensusParams == nil { - x.ConsensusParams = new(ConsensusParams) - } - return protoreflect.ValueOfMessage(x.ConsensusParams.ProtoReflect()) - case "tendermint.abci.RequestInitChain.validators": - if x.Validators == nil { - x.Validators = []*ValidatorUpdate{} - } - value := &_RequestInitChain_4_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "tendermint.abci.RequestInitChain.chain_id": - panic(fmt.Errorf("field chain_id of message tendermint.abci.RequestInitChain is not mutable")) - case "tendermint.abci.RequestInitChain.app_state_bytes": - panic(fmt.Errorf("field app_state_bytes of message tendermint.abci.RequestInitChain is not mutable")) - case "tendermint.abci.RequestInitChain.initial_height": - panic(fmt.Errorf("field initial_height of message tendermint.abci.RequestInitChain is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInitChain 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_RequestInitChain) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestInitChain.time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.RequestInitChain.chain_id": - return protoreflect.ValueOfString("") - case "tendermint.abci.RequestInitChain.consensus_params": - m := new(ConsensusParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.RequestInitChain.validators": - list := []*ValidatorUpdate{} - return protoreflect.ValueOfList(&_RequestInitChain_4_list{list: &list}) - case "tendermint.abci.RequestInitChain.app_state_bytes": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.RequestInitChain.initial_height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.RequestInitChain 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_RequestInitChain) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestInitChain", 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_RequestInitChain) 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_RequestInitChain) 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_RequestInitChain) 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_RequestInitChain) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestInitChain) - 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.Time != nil { - l = options.Size(x.Time) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ConsensusParams != nil { - l = options.Size(x.ConsensusParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.AppStateBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.InitialHeight != 0 { - n += 1 + runtime.Sov(uint64(x.InitialHeight)) - } - 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().(*RequestInitChain) - 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.InitialHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.InitialHeight)) - i-- - dAtA[i] = 0x30 - } - if len(x.AppStateBytes) > 0 { - i -= len(x.AppStateBytes) - copy(dAtA[i:], x.AppStateBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppStateBytes))) - i-- - dAtA[i] = 0x2a - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.ConsensusParams != nil { - encoded, err := options.Marshal(x.ConsensusParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if x.Time != nil { - encoded, err := options.Marshal(x.Time) - 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().(*RequestInitChain) - 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: RequestInitChain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestInitChain: 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 Time", 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.Time == nil { - x.Time = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", 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.ConsensusParams == nil { - x.ConsensusParams = &ConsensusParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &ValidatorUpdate{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AppStateBytes = append(x.AppStateBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AppStateBytes == nil { - x.AppStateBytes = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType) - } - x.InitialHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.InitialHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestQuery protoreflect.MessageDescriptor - fd_RequestQuery_data protoreflect.FieldDescriptor - fd_RequestQuery_path protoreflect.FieldDescriptor - fd_RequestQuery_height protoreflect.FieldDescriptor - fd_RequestQuery_prove protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestQuery = File_tendermint_abci_types_proto.Messages().ByName("RequestQuery") - fd_RequestQuery_data = md_RequestQuery.Fields().ByName("data") - fd_RequestQuery_path = md_RequestQuery.Fields().ByName("path") - fd_RequestQuery_height = md_RequestQuery.Fields().ByName("height") - fd_RequestQuery_prove = md_RequestQuery.Fields().ByName("prove") -} - -var _ protoreflect.Message = (*fastReflection_RequestQuery)(nil) - -type fastReflection_RequestQuery RequestQuery - -func (x *RequestQuery) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestQuery)(x) -} - -func (x *RequestQuery) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_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_RequestQuery_messageType fastReflection_RequestQuery_messageType -var _ protoreflect.MessageType = fastReflection_RequestQuery_messageType{} - -type fastReflection_RequestQuery_messageType struct{} - -func (x fastReflection_RequestQuery_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestQuery)(nil) -} -func (x fastReflection_RequestQuery_messageType) New() protoreflect.Message { - return new(fastReflection_RequestQuery) -} -func (x fastReflection_RequestQuery_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestQuery -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestQuery) Descriptor() protoreflect.MessageDescriptor { - return md_RequestQuery -} - -// 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_RequestQuery) Type() protoreflect.MessageType { - return _fastReflection_RequestQuery_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestQuery) New() protoreflect.Message { - return new(fastReflection_RequestQuery) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestQuery) Interface() protoreflect.ProtoMessage { - return (*RequestQuery)(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_RequestQuery) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_RequestQuery_data, value) { - return - } - } - if x.Path != "" { - value := protoreflect.ValueOfString(x.Path) - if !f(fd_RequestQuery_path, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_RequestQuery_height, value) { - return - } - } - if x.Prove != false { - value := protoreflect.ValueOfBool(x.Prove) - if !f(fd_RequestQuery_prove, 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_RequestQuery) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestQuery.data": - return len(x.Data) != 0 - case "tendermint.abci.RequestQuery.path": - return x.Path != "" - case "tendermint.abci.RequestQuery.height": - return x.Height != int64(0) - case "tendermint.abci.RequestQuery.prove": - return x.Prove != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestQuery")) - } - panic(fmt.Errorf("message tendermint.abci.RequestQuery 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_RequestQuery) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestQuery.data": - x.Data = nil - case "tendermint.abci.RequestQuery.path": - x.Path = "" - case "tendermint.abci.RequestQuery.height": - x.Height = int64(0) - case "tendermint.abci.RequestQuery.prove": - x.Prove = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestQuery")) - } - panic(fmt.Errorf("message tendermint.abci.RequestQuery 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_RequestQuery) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestQuery.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.RequestQuery.path": - value := x.Path - return protoreflect.ValueOfString(value) - case "tendermint.abci.RequestQuery.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.RequestQuery.prove": - value := x.Prove - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestQuery")) - } - panic(fmt.Errorf("message tendermint.abci.RequestQuery 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_RequestQuery) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestQuery.data": - x.Data = value.Bytes() - case "tendermint.abci.RequestQuery.path": - x.Path = value.Interface().(string) - case "tendermint.abci.RequestQuery.height": - x.Height = value.Int() - case "tendermint.abci.RequestQuery.prove": - x.Prove = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestQuery")) - } - panic(fmt.Errorf("message tendermint.abci.RequestQuery 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_RequestQuery) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestQuery.data": - panic(fmt.Errorf("field data of message tendermint.abci.RequestQuery is not mutable")) - case "tendermint.abci.RequestQuery.path": - panic(fmt.Errorf("field path of message tendermint.abci.RequestQuery is not mutable")) - case "tendermint.abci.RequestQuery.height": - panic(fmt.Errorf("field height of message tendermint.abci.RequestQuery is not mutable")) - case "tendermint.abci.RequestQuery.prove": - panic(fmt.Errorf("field prove of message tendermint.abci.RequestQuery is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestQuery")) - } - panic(fmt.Errorf("message tendermint.abci.RequestQuery 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_RequestQuery) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestQuery.data": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.RequestQuery.path": - return protoreflect.ValueOfString("") - case "tendermint.abci.RequestQuery.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.RequestQuery.prove": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestQuery")) - } - panic(fmt.Errorf("message tendermint.abci.RequestQuery 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_RequestQuery) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestQuery", 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_RequestQuery) 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_RequestQuery) 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_RequestQuery) 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_RequestQuery) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestQuery) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Path) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Prove { - n += 2 - } - 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().(*RequestQuery) - 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.Prove { - i-- - if x.Prove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if len(x.Path) > 0 { - i -= len(x.Path) - copy(dAtA[i:], x.Path) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) - i-- - dAtA[i] = 0x12 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - 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().(*RequestQuery) - 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: RequestQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestQuery: 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 Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", 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.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Prove = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_RequestBeginBlock_4_list)(nil) - -type _RequestBeginBlock_4_list struct { - list *[]*Evidence -} - -func (x *_RequestBeginBlock_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_RequestBeginBlock_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_RequestBeginBlock_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Evidence) - (*x.list)[i] = concreteValue -} - -func (x *_RequestBeginBlock_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Evidence) - *x.list = append(*x.list, concreteValue) -} - -func (x *_RequestBeginBlock_4_list) AppendMutable() protoreflect.Value { - v := new(Evidence) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RequestBeginBlock_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_RequestBeginBlock_4_list) NewElement() protoreflect.Value { - v := new(Evidence) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RequestBeginBlock_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_RequestBeginBlock protoreflect.MessageDescriptor - fd_RequestBeginBlock_hash protoreflect.FieldDescriptor - fd_RequestBeginBlock_header protoreflect.FieldDescriptor - fd_RequestBeginBlock_last_commit_info protoreflect.FieldDescriptor - fd_RequestBeginBlock_byzantine_validators protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestBeginBlock = File_tendermint_abci_types_proto.Messages().ByName("RequestBeginBlock") - fd_RequestBeginBlock_hash = md_RequestBeginBlock.Fields().ByName("hash") - fd_RequestBeginBlock_header = md_RequestBeginBlock.Fields().ByName("header") - fd_RequestBeginBlock_last_commit_info = md_RequestBeginBlock.Fields().ByName("last_commit_info") - fd_RequestBeginBlock_byzantine_validators = md_RequestBeginBlock.Fields().ByName("byzantine_validators") -} - -var _ protoreflect.Message = (*fastReflection_RequestBeginBlock)(nil) - -type fastReflection_RequestBeginBlock RequestBeginBlock - -func (x *RequestBeginBlock) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestBeginBlock)(x) -} - -func (x *RequestBeginBlock) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestBeginBlock_messageType fastReflection_RequestBeginBlock_messageType -var _ protoreflect.MessageType = fastReflection_RequestBeginBlock_messageType{} - -type fastReflection_RequestBeginBlock_messageType struct{} - -func (x fastReflection_RequestBeginBlock_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestBeginBlock)(nil) -} -func (x fastReflection_RequestBeginBlock_messageType) New() protoreflect.Message { - return new(fastReflection_RequestBeginBlock) -} -func (x fastReflection_RequestBeginBlock_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestBeginBlock -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestBeginBlock) Descriptor() protoreflect.MessageDescriptor { - return md_RequestBeginBlock -} - -// 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_RequestBeginBlock) Type() protoreflect.MessageType { - return _fastReflection_RequestBeginBlock_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestBeginBlock) New() protoreflect.Message { - return new(fastReflection_RequestBeginBlock) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestBeginBlock) Interface() protoreflect.ProtoMessage { - return (*RequestBeginBlock)(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_RequestBeginBlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_RequestBeginBlock_hash, value) { - return - } - } - if x.Header != nil { - value := protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - if !f(fd_RequestBeginBlock_header, value) { - return - } - } - if x.LastCommitInfo != nil { - value := protoreflect.ValueOfMessage(x.LastCommitInfo.ProtoReflect()) - if !f(fd_RequestBeginBlock_last_commit_info, value) { - return - } - } - if len(x.ByzantineValidators) != 0 { - value := protoreflect.ValueOfList(&_RequestBeginBlock_4_list{list: &x.ByzantineValidators}) - if !f(fd_RequestBeginBlock_byzantine_validators, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_RequestBeginBlock) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestBeginBlock.hash": - return len(x.Hash) != 0 - case "tendermint.abci.RequestBeginBlock.header": - return x.Header != nil - case "tendermint.abci.RequestBeginBlock.last_commit_info": - return x.LastCommitInfo != nil - case "tendermint.abci.RequestBeginBlock.byzantine_validators": - return len(x.ByzantineValidators) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestBeginBlock 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_RequestBeginBlock) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestBeginBlock.hash": - x.Hash = nil - case "tendermint.abci.RequestBeginBlock.header": - x.Header = nil - case "tendermint.abci.RequestBeginBlock.last_commit_info": - x.LastCommitInfo = nil - case "tendermint.abci.RequestBeginBlock.byzantine_validators": - x.ByzantineValidators = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestBeginBlock 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_RequestBeginBlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestBeginBlock.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.RequestBeginBlock.header": - value := x.Header - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.RequestBeginBlock.last_commit_info": - value := x.LastCommitInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.RequestBeginBlock.byzantine_validators": - if len(x.ByzantineValidators) == 0 { - return protoreflect.ValueOfList(&_RequestBeginBlock_4_list{}) - } - listValue := &_RequestBeginBlock_4_list{list: &x.ByzantineValidators} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestBeginBlock 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_RequestBeginBlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestBeginBlock.hash": - x.Hash = value.Bytes() - case "tendermint.abci.RequestBeginBlock.header": - x.Header = value.Message().Interface().(*types.Header) - case "tendermint.abci.RequestBeginBlock.last_commit_info": - x.LastCommitInfo = value.Message().Interface().(*LastCommitInfo) - case "tendermint.abci.RequestBeginBlock.byzantine_validators": - lv := value.List() - clv := lv.(*_RequestBeginBlock_4_list) - x.ByzantineValidators = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestBeginBlock 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_RequestBeginBlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestBeginBlock.header": - if x.Header == nil { - x.Header = new(types.Header) - } - return protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - case "tendermint.abci.RequestBeginBlock.last_commit_info": - if x.LastCommitInfo == nil { - x.LastCommitInfo = new(LastCommitInfo) - } - return protoreflect.ValueOfMessage(x.LastCommitInfo.ProtoReflect()) - case "tendermint.abci.RequestBeginBlock.byzantine_validators": - if x.ByzantineValidators == nil { - x.ByzantineValidators = []*Evidence{} - } - value := &_RequestBeginBlock_4_list{list: &x.ByzantineValidators} - return protoreflect.ValueOfList(value) - case "tendermint.abci.RequestBeginBlock.hash": - panic(fmt.Errorf("field hash of message tendermint.abci.RequestBeginBlock is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestBeginBlock 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_RequestBeginBlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestBeginBlock.hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.RequestBeginBlock.header": - m := new(types.Header) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.RequestBeginBlock.last_commit_info": - m := new(LastCommitInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.RequestBeginBlock.byzantine_validators": - list := []*Evidence{} - return protoreflect.ValueOfList(&_RequestBeginBlock_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestBeginBlock 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_RequestBeginBlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestBeginBlock", 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_RequestBeginBlock) 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_RequestBeginBlock) 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_RequestBeginBlock) 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_RequestBeginBlock) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestBeginBlock) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Header != nil { - l = options.Size(x.Header) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LastCommitInfo != nil { - l = options.Size(x.LastCommitInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ByzantineValidators) > 0 { - for _, e := range x.ByzantineValidators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RequestBeginBlock) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ByzantineValidators) > 0 { - for iNdEx := len(x.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ByzantineValidators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.LastCommitInfo != nil { - encoded, err := options.Marshal(x.LastCommitInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Header != nil { - encoded, err := options.Marshal(x.Header) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RequestBeginBlock) - 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: RequestBeginBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Header", 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.Header == nil { - x.Header = &types.Header{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Header); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", 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.LastCommitInfo == nil { - x.LastCommitInfo = &LastCommitInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastCommitInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ByzantineValidators = append(x.ByzantineValidators, &Evidence{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ByzantineValidators[len(x.ByzantineValidators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestCheckTx protoreflect.MessageDescriptor - fd_RequestCheckTx_tx protoreflect.FieldDescriptor - fd_RequestCheckTx_type protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestCheckTx = File_tendermint_abci_types_proto.Messages().ByName("RequestCheckTx") - fd_RequestCheckTx_tx = md_RequestCheckTx.Fields().ByName("tx") - fd_RequestCheckTx_type = md_RequestCheckTx.Fields().ByName("type") -} - -var _ protoreflect.Message = (*fastReflection_RequestCheckTx)(nil) - -type fastReflection_RequestCheckTx RequestCheckTx - -func (x *RequestCheckTx) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestCheckTx)(x) -} - -func (x *RequestCheckTx) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestCheckTx_messageType fastReflection_RequestCheckTx_messageType -var _ protoreflect.MessageType = fastReflection_RequestCheckTx_messageType{} - -type fastReflection_RequestCheckTx_messageType struct{} - -func (x fastReflection_RequestCheckTx_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestCheckTx)(nil) -} -func (x fastReflection_RequestCheckTx_messageType) New() protoreflect.Message { - return new(fastReflection_RequestCheckTx) -} -func (x fastReflection_RequestCheckTx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestCheckTx -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestCheckTx) Descriptor() protoreflect.MessageDescriptor { - return md_RequestCheckTx -} - -// 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_RequestCheckTx) Type() protoreflect.MessageType { - return _fastReflection_RequestCheckTx_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestCheckTx) New() protoreflect.Message { - return new(fastReflection_RequestCheckTx) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestCheckTx) Interface() protoreflect.ProtoMessage { - return (*RequestCheckTx)(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_RequestCheckTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Tx) != 0 { - value := protoreflect.ValueOfBytes(x.Tx) - if !f(fd_RequestCheckTx_tx, value) { - return - } - } - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) - if !f(fd_RequestCheckTx_type, 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_RequestCheckTx) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestCheckTx.tx": - return len(x.Tx) != 0 - case "tendermint.abci.RequestCheckTx.type": - return x.Type_ != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCheckTx 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_RequestCheckTx) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestCheckTx.tx": - x.Tx = nil - case "tendermint.abci.RequestCheckTx.type": - x.Type_ = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCheckTx 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_RequestCheckTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestCheckTx.tx": - value := x.Tx - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.RequestCheckTx.type": - value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCheckTx 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_RequestCheckTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestCheckTx.tx": - x.Tx = value.Bytes() - case "tendermint.abci.RequestCheckTx.type": - x.Type_ = (CheckTxType)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCheckTx 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_RequestCheckTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestCheckTx.tx": - panic(fmt.Errorf("field tx of message tendermint.abci.RequestCheckTx is not mutable")) - case "tendermint.abci.RequestCheckTx.type": - panic(fmt.Errorf("field type of message tendermint.abci.RequestCheckTx is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCheckTx 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_RequestCheckTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestCheckTx.tx": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.RequestCheckTx.type": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCheckTx 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_RequestCheckTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestCheckTx", 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_RequestCheckTx) 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_RequestCheckTx) 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_RequestCheckTx) 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_RequestCheckTx) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestCheckTx) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Tx) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) - } - 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().(*RequestCheckTx) - 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.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) - i-- - dAtA[i] = 0x10 - } - if len(x.Tx) > 0 { - i -= len(x.Tx) - copy(dAtA[i:], x.Tx) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tx))) - 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().(*RequestCheckTx) - 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: RequestCheckTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestCheckTx: 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 Tx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Tx = append(x.Tx[:0], dAtA[iNdEx:postIndex]...) - if x.Tx == nil { - x.Tx = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - x.Type_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Type_ |= CheckTxType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestDeliverTx protoreflect.MessageDescriptor - fd_RequestDeliverTx_tx protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestDeliverTx = File_tendermint_abci_types_proto.Messages().ByName("RequestDeliverTx") - fd_RequestDeliverTx_tx = md_RequestDeliverTx.Fields().ByName("tx") -} - -var _ protoreflect.Message = (*fastReflection_RequestDeliverTx)(nil) - -type fastReflection_RequestDeliverTx RequestDeliverTx - -func (x *RequestDeliverTx) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestDeliverTx)(x) -} - -func (x *RequestDeliverTx) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestDeliverTx_messageType fastReflection_RequestDeliverTx_messageType -var _ protoreflect.MessageType = fastReflection_RequestDeliverTx_messageType{} - -type fastReflection_RequestDeliverTx_messageType struct{} - -func (x fastReflection_RequestDeliverTx_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestDeliverTx)(nil) -} -func (x fastReflection_RequestDeliverTx_messageType) New() protoreflect.Message { - return new(fastReflection_RequestDeliverTx) -} -func (x fastReflection_RequestDeliverTx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestDeliverTx -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestDeliverTx) Descriptor() protoreflect.MessageDescriptor { - return md_RequestDeliverTx -} - -// 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_RequestDeliverTx) Type() protoreflect.MessageType { - return _fastReflection_RequestDeliverTx_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestDeliverTx) New() protoreflect.Message { - return new(fastReflection_RequestDeliverTx) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestDeliverTx) Interface() protoreflect.ProtoMessage { - return (*RequestDeliverTx)(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_RequestDeliverTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Tx) != 0 { - value := protoreflect.ValueOfBytes(x.Tx) - if !f(fd_RequestDeliverTx_tx, 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_RequestDeliverTx) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestDeliverTx.tx": - return len(x.Tx) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestDeliverTx 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_RequestDeliverTx) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestDeliverTx.tx": - x.Tx = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestDeliverTx 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_RequestDeliverTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestDeliverTx.tx": - value := x.Tx - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestDeliverTx 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_RequestDeliverTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestDeliverTx.tx": - x.Tx = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestDeliverTx 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_RequestDeliverTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestDeliverTx.tx": - panic(fmt.Errorf("field tx of message tendermint.abci.RequestDeliverTx is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestDeliverTx 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_RequestDeliverTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestDeliverTx.tx": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.RequestDeliverTx 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_RequestDeliverTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestDeliverTx", 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_RequestDeliverTx) 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_RequestDeliverTx) 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_RequestDeliverTx) 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_RequestDeliverTx) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestDeliverTx) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Tx) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RequestDeliverTx) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Tx) > 0 { - i -= len(x.Tx) - copy(dAtA[i:], x.Tx) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tx))) - 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().(*RequestDeliverTx) - 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: RequestDeliverTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestDeliverTx: 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 Tx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Tx = append(x.Tx[:0], dAtA[iNdEx:postIndex]...) - if x.Tx == nil { - x.Tx = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestEndBlock protoreflect.MessageDescriptor - fd_RequestEndBlock_height protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestEndBlock = File_tendermint_abci_types_proto.Messages().ByName("RequestEndBlock") - fd_RequestEndBlock_height = md_RequestEndBlock.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_RequestEndBlock)(nil) - -type fastReflection_RequestEndBlock RequestEndBlock - -func (x *RequestEndBlock) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestEndBlock)(x) -} - -func (x *RequestEndBlock) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestEndBlock_messageType fastReflection_RequestEndBlock_messageType -var _ protoreflect.MessageType = fastReflection_RequestEndBlock_messageType{} - -type fastReflection_RequestEndBlock_messageType struct{} - -func (x fastReflection_RequestEndBlock_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestEndBlock)(nil) -} -func (x fastReflection_RequestEndBlock_messageType) New() protoreflect.Message { - return new(fastReflection_RequestEndBlock) -} -func (x fastReflection_RequestEndBlock_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestEndBlock -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestEndBlock) Descriptor() protoreflect.MessageDescriptor { - return md_RequestEndBlock -} - -// 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_RequestEndBlock) Type() protoreflect.MessageType { - return _fastReflection_RequestEndBlock_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestEndBlock) New() protoreflect.Message { - return new(fastReflection_RequestEndBlock) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestEndBlock) Interface() protoreflect.ProtoMessage { - return (*RequestEndBlock)(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_RequestEndBlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_RequestEndBlock_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_RequestEndBlock) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestEndBlock.height": - return x.Height != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEndBlock 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_RequestEndBlock) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestEndBlock.height": - x.Height = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEndBlock 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_RequestEndBlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestEndBlock.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEndBlock 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_RequestEndBlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestEndBlock.height": - x.Height = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEndBlock 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_RequestEndBlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestEndBlock.height": - panic(fmt.Errorf("field height of message tendermint.abci.RequestEndBlock is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEndBlock 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_RequestEndBlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestEndBlock.height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.RequestEndBlock 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_RequestEndBlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestEndBlock", 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_RequestEndBlock) 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_RequestEndBlock) 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_RequestEndBlock) 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_RequestEndBlock) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestEndBlock) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if 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().(*RequestEndBlock) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RequestEndBlock) - 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: RequestEndBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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_RequestCommit protoreflect.MessageDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestCommit = File_tendermint_abci_types_proto.Messages().ByName("RequestCommit") -} - -var _ protoreflect.Message = (*fastReflection_RequestCommit)(nil) - -type fastReflection_RequestCommit RequestCommit - -func (x *RequestCommit) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestCommit)(x) -} - -func (x *RequestCommit) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestCommit_messageType fastReflection_RequestCommit_messageType -var _ protoreflect.MessageType = fastReflection_RequestCommit_messageType{} - -type fastReflection_RequestCommit_messageType struct{} - -func (x fastReflection_RequestCommit_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestCommit)(nil) -} -func (x fastReflection_RequestCommit_messageType) New() protoreflect.Message { - return new(fastReflection_RequestCommit) -} -func (x fastReflection_RequestCommit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestCommit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestCommit) Descriptor() protoreflect.MessageDescriptor { - return md_RequestCommit -} - -// 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_RequestCommit) Type() protoreflect.MessageType { - return _fastReflection_RequestCommit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestCommit) New() protoreflect.Message { - return new(fastReflection_RequestCommit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestCommit) Interface() protoreflect.ProtoMessage { - return (*RequestCommit)(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_RequestCommit) 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_RequestCommit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCommit")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCommit 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_RequestCommit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCommit")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCommit 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_RequestCommit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCommit")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCommit 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_RequestCommit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCommit")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCommit 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_RequestCommit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCommit")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCommit 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_RequestCommit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestCommit")) - } - panic(fmt.Errorf("message tendermint.abci.RequestCommit 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_RequestCommit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestCommit", 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_RequestCommit) 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_RequestCommit) 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_RequestCommit) 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_RequestCommit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestCommit) - 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().(*RequestCommit) - 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().(*RequestCommit) - 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: RequestCommit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestCommit: 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_RequestListSnapshots protoreflect.MessageDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestListSnapshots = File_tendermint_abci_types_proto.Messages().ByName("RequestListSnapshots") -} - -var _ protoreflect.Message = (*fastReflection_RequestListSnapshots)(nil) - -type fastReflection_RequestListSnapshots RequestListSnapshots - -func (x *RequestListSnapshots) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestListSnapshots)(x) -} - -func (x *RequestListSnapshots) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestListSnapshots_messageType fastReflection_RequestListSnapshots_messageType -var _ protoreflect.MessageType = fastReflection_RequestListSnapshots_messageType{} - -type fastReflection_RequestListSnapshots_messageType struct{} - -func (x fastReflection_RequestListSnapshots_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestListSnapshots)(nil) -} -func (x fastReflection_RequestListSnapshots_messageType) New() protoreflect.Message { - return new(fastReflection_RequestListSnapshots) -} -func (x fastReflection_RequestListSnapshots_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestListSnapshots -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestListSnapshots) Descriptor() protoreflect.MessageDescriptor { - return md_RequestListSnapshots -} - -// 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_RequestListSnapshots) Type() protoreflect.MessageType { - return _fastReflection_RequestListSnapshots_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestListSnapshots) New() protoreflect.Message { - return new(fastReflection_RequestListSnapshots) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestListSnapshots) Interface() protoreflect.ProtoMessage { - return (*RequestListSnapshots)(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_RequestListSnapshots) 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_RequestListSnapshots) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.RequestListSnapshots 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_RequestListSnapshots) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.RequestListSnapshots 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_RequestListSnapshots) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.RequestListSnapshots 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_RequestListSnapshots) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.RequestListSnapshots 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_RequestListSnapshots) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.RequestListSnapshots 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_RequestListSnapshots) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.RequestListSnapshots 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_RequestListSnapshots) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestListSnapshots", 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_RequestListSnapshots) 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_RequestListSnapshots) 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_RequestListSnapshots) 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_RequestListSnapshots) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestListSnapshots) - 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().(*RequestListSnapshots) - 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().(*RequestListSnapshots) - 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: RequestListSnapshots: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestListSnapshots: 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_RequestOfferSnapshot protoreflect.MessageDescriptor - fd_RequestOfferSnapshot_snapshot protoreflect.FieldDescriptor - fd_RequestOfferSnapshot_app_hash protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestOfferSnapshot = File_tendermint_abci_types_proto.Messages().ByName("RequestOfferSnapshot") - fd_RequestOfferSnapshot_snapshot = md_RequestOfferSnapshot.Fields().ByName("snapshot") - fd_RequestOfferSnapshot_app_hash = md_RequestOfferSnapshot.Fields().ByName("app_hash") -} - -var _ protoreflect.Message = (*fastReflection_RequestOfferSnapshot)(nil) - -type fastReflection_RequestOfferSnapshot RequestOfferSnapshot - -func (x *RequestOfferSnapshot) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestOfferSnapshot)(x) -} - -func (x *RequestOfferSnapshot) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestOfferSnapshot_messageType fastReflection_RequestOfferSnapshot_messageType -var _ protoreflect.MessageType = fastReflection_RequestOfferSnapshot_messageType{} - -type fastReflection_RequestOfferSnapshot_messageType struct{} - -func (x fastReflection_RequestOfferSnapshot_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestOfferSnapshot)(nil) -} -func (x fastReflection_RequestOfferSnapshot_messageType) New() protoreflect.Message { - return new(fastReflection_RequestOfferSnapshot) -} -func (x fastReflection_RequestOfferSnapshot_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestOfferSnapshot -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestOfferSnapshot) Descriptor() protoreflect.MessageDescriptor { - return md_RequestOfferSnapshot -} - -// 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_RequestOfferSnapshot) Type() protoreflect.MessageType { - return _fastReflection_RequestOfferSnapshot_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestOfferSnapshot) New() protoreflect.Message { - return new(fastReflection_RequestOfferSnapshot) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestOfferSnapshot) Interface() protoreflect.ProtoMessage { - return (*RequestOfferSnapshot)(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_RequestOfferSnapshot) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Snapshot != nil { - value := protoreflect.ValueOfMessage(x.Snapshot.ProtoReflect()) - if !f(fd_RequestOfferSnapshot_snapshot, value) { - return - } - } - if len(x.AppHash) != 0 { - value := protoreflect.ValueOfBytes(x.AppHash) - if !f(fd_RequestOfferSnapshot_app_hash, 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_RequestOfferSnapshot) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestOfferSnapshot.snapshot": - return x.Snapshot != nil - case "tendermint.abci.RequestOfferSnapshot.app_hash": - return len(x.AppHash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.RequestOfferSnapshot 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_RequestOfferSnapshot) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestOfferSnapshot.snapshot": - x.Snapshot = nil - case "tendermint.abci.RequestOfferSnapshot.app_hash": - x.AppHash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.RequestOfferSnapshot 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_RequestOfferSnapshot) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestOfferSnapshot.snapshot": - value := x.Snapshot - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.RequestOfferSnapshot.app_hash": - value := x.AppHash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.RequestOfferSnapshot 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_RequestOfferSnapshot) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestOfferSnapshot.snapshot": - x.Snapshot = value.Message().Interface().(*Snapshot) - case "tendermint.abci.RequestOfferSnapshot.app_hash": - x.AppHash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.RequestOfferSnapshot 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_RequestOfferSnapshot) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestOfferSnapshot.snapshot": - if x.Snapshot == nil { - x.Snapshot = new(Snapshot) - } - return protoreflect.ValueOfMessage(x.Snapshot.ProtoReflect()) - case "tendermint.abci.RequestOfferSnapshot.app_hash": - panic(fmt.Errorf("field app_hash of message tendermint.abci.RequestOfferSnapshot is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.RequestOfferSnapshot 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_RequestOfferSnapshot) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestOfferSnapshot.snapshot": - m := new(Snapshot) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.RequestOfferSnapshot.app_hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.RequestOfferSnapshot 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_RequestOfferSnapshot) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestOfferSnapshot", 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_RequestOfferSnapshot) 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_RequestOfferSnapshot) 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_RequestOfferSnapshot) 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_RequestOfferSnapshot) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestOfferSnapshot) - 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.Snapshot != nil { - l = options.Size(x.Snapshot) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AppHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RequestOfferSnapshot) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AppHash) > 0 { - i -= len(x.AppHash) - copy(dAtA[i:], x.AppHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppHash))) - i-- - dAtA[i] = 0x12 - } - if x.Snapshot != nil { - encoded, err := options.Marshal(x.Snapshot) - 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().(*RequestOfferSnapshot) - 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: RequestOfferSnapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestOfferSnapshot: 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 Snapshot", 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.Snapshot == nil { - x.Snapshot = &Snapshot{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Snapshot); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AppHash = append(x.AppHash[:0], dAtA[iNdEx:postIndex]...) - if x.AppHash == nil { - x.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestLoadSnapshotChunk protoreflect.MessageDescriptor - fd_RequestLoadSnapshotChunk_height protoreflect.FieldDescriptor - fd_RequestLoadSnapshotChunk_format protoreflect.FieldDescriptor - fd_RequestLoadSnapshotChunk_chunk protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestLoadSnapshotChunk = File_tendermint_abci_types_proto.Messages().ByName("RequestLoadSnapshotChunk") - fd_RequestLoadSnapshotChunk_height = md_RequestLoadSnapshotChunk.Fields().ByName("height") - fd_RequestLoadSnapshotChunk_format = md_RequestLoadSnapshotChunk.Fields().ByName("format") - fd_RequestLoadSnapshotChunk_chunk = md_RequestLoadSnapshotChunk.Fields().ByName("chunk") -} - -var _ protoreflect.Message = (*fastReflection_RequestLoadSnapshotChunk)(nil) - -type fastReflection_RequestLoadSnapshotChunk RequestLoadSnapshotChunk - -func (x *RequestLoadSnapshotChunk) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestLoadSnapshotChunk)(x) -} - -func (x *RequestLoadSnapshotChunk) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestLoadSnapshotChunk_messageType fastReflection_RequestLoadSnapshotChunk_messageType -var _ protoreflect.MessageType = fastReflection_RequestLoadSnapshotChunk_messageType{} - -type fastReflection_RequestLoadSnapshotChunk_messageType struct{} - -func (x fastReflection_RequestLoadSnapshotChunk_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestLoadSnapshotChunk)(nil) -} -func (x fastReflection_RequestLoadSnapshotChunk_messageType) New() protoreflect.Message { - return new(fastReflection_RequestLoadSnapshotChunk) -} -func (x fastReflection_RequestLoadSnapshotChunk_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestLoadSnapshotChunk -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestLoadSnapshotChunk) Descriptor() protoreflect.MessageDescriptor { - return md_RequestLoadSnapshotChunk -} - -// 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_RequestLoadSnapshotChunk) Type() protoreflect.MessageType { - return _fastReflection_RequestLoadSnapshotChunk_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestLoadSnapshotChunk) New() protoreflect.Message { - return new(fastReflection_RequestLoadSnapshotChunk) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestLoadSnapshotChunk) Interface() protoreflect.ProtoMessage { - return (*RequestLoadSnapshotChunk)(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_RequestLoadSnapshotChunk) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != uint64(0) { - value := protoreflect.ValueOfUint64(x.Height) - if !f(fd_RequestLoadSnapshotChunk_height, value) { - return - } - } - if x.Format != uint32(0) { - value := protoreflect.ValueOfUint32(x.Format) - if !f(fd_RequestLoadSnapshotChunk_format, value) { - return - } - } - if x.Chunk != uint32(0) { - value := protoreflect.ValueOfUint32(x.Chunk) - if !f(fd_RequestLoadSnapshotChunk_chunk, 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_RequestLoadSnapshotChunk) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestLoadSnapshotChunk.height": - return x.Height != uint64(0) - case "tendermint.abci.RequestLoadSnapshotChunk.format": - return x.Format != uint32(0) - case "tendermint.abci.RequestLoadSnapshotChunk.chunk": - return x.Chunk != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestLoadSnapshotChunk 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_RequestLoadSnapshotChunk) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestLoadSnapshotChunk.height": - x.Height = uint64(0) - case "tendermint.abci.RequestLoadSnapshotChunk.format": - x.Format = uint32(0) - case "tendermint.abci.RequestLoadSnapshotChunk.chunk": - x.Chunk = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestLoadSnapshotChunk 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_RequestLoadSnapshotChunk) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestLoadSnapshotChunk.height": - value := x.Height - return protoreflect.ValueOfUint64(value) - case "tendermint.abci.RequestLoadSnapshotChunk.format": - value := x.Format - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.RequestLoadSnapshotChunk.chunk": - value := x.Chunk - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestLoadSnapshotChunk 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_RequestLoadSnapshotChunk) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestLoadSnapshotChunk.height": - x.Height = value.Uint() - case "tendermint.abci.RequestLoadSnapshotChunk.format": - x.Format = uint32(value.Uint()) - case "tendermint.abci.RequestLoadSnapshotChunk.chunk": - x.Chunk = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestLoadSnapshotChunk 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_RequestLoadSnapshotChunk) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestLoadSnapshotChunk.height": - panic(fmt.Errorf("field height of message tendermint.abci.RequestLoadSnapshotChunk is not mutable")) - case "tendermint.abci.RequestLoadSnapshotChunk.format": - panic(fmt.Errorf("field format of message tendermint.abci.RequestLoadSnapshotChunk is not mutable")) - case "tendermint.abci.RequestLoadSnapshotChunk.chunk": - panic(fmt.Errorf("field chunk of message tendermint.abci.RequestLoadSnapshotChunk is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestLoadSnapshotChunk 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_RequestLoadSnapshotChunk) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestLoadSnapshotChunk.height": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.abci.RequestLoadSnapshotChunk.format": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.RequestLoadSnapshotChunk.chunk": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestLoadSnapshotChunk 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_RequestLoadSnapshotChunk) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestLoadSnapshotChunk", 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_RequestLoadSnapshotChunk) 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_RequestLoadSnapshotChunk) 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_RequestLoadSnapshotChunk) 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_RequestLoadSnapshotChunk) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestLoadSnapshotChunk) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Format != 0 { - n += 1 + runtime.Sov(uint64(x.Format)) - } - if x.Chunk != 0 { - n += 1 + runtime.Sov(uint64(x.Chunk)) - } - 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().(*RequestLoadSnapshotChunk) - 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.Chunk != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Chunk)) - i-- - dAtA[i] = 0x18 - } - if x.Format != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Format)) - i-- - dAtA[i] = 0x10 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RequestLoadSnapshotChunk) - 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: RequestLoadSnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - x.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) - } - x.Chunk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Chunk |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_RequestApplySnapshotChunk protoreflect.MessageDescriptor - fd_RequestApplySnapshotChunk_index protoreflect.FieldDescriptor - fd_RequestApplySnapshotChunk_chunk protoreflect.FieldDescriptor - fd_RequestApplySnapshotChunk_sender protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_RequestApplySnapshotChunk = File_tendermint_abci_types_proto.Messages().ByName("RequestApplySnapshotChunk") - fd_RequestApplySnapshotChunk_index = md_RequestApplySnapshotChunk.Fields().ByName("index") - fd_RequestApplySnapshotChunk_chunk = md_RequestApplySnapshotChunk.Fields().ByName("chunk") - fd_RequestApplySnapshotChunk_sender = md_RequestApplySnapshotChunk.Fields().ByName("sender") -} - -var _ protoreflect.Message = (*fastReflection_RequestApplySnapshotChunk)(nil) - -type fastReflection_RequestApplySnapshotChunk RequestApplySnapshotChunk - -func (x *RequestApplySnapshotChunk) ProtoReflect() protoreflect.Message { - return (*fastReflection_RequestApplySnapshotChunk)(x) -} - -func (x *RequestApplySnapshotChunk) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RequestApplySnapshotChunk_messageType fastReflection_RequestApplySnapshotChunk_messageType -var _ protoreflect.MessageType = fastReflection_RequestApplySnapshotChunk_messageType{} - -type fastReflection_RequestApplySnapshotChunk_messageType struct{} - -func (x fastReflection_RequestApplySnapshotChunk_messageType) Zero() protoreflect.Message { - return (*fastReflection_RequestApplySnapshotChunk)(nil) -} -func (x fastReflection_RequestApplySnapshotChunk_messageType) New() protoreflect.Message { - return new(fastReflection_RequestApplySnapshotChunk) -} -func (x fastReflection_RequestApplySnapshotChunk_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RequestApplySnapshotChunk -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RequestApplySnapshotChunk) Descriptor() protoreflect.MessageDescriptor { - return md_RequestApplySnapshotChunk -} - -// 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_RequestApplySnapshotChunk) Type() protoreflect.MessageType { - return _fastReflection_RequestApplySnapshotChunk_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RequestApplySnapshotChunk) New() protoreflect.Message { - return new(fastReflection_RequestApplySnapshotChunk) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RequestApplySnapshotChunk) Interface() protoreflect.ProtoMessage { - return (*RequestApplySnapshotChunk)(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_RequestApplySnapshotChunk) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Index != uint32(0) { - value := protoreflect.ValueOfUint32(x.Index) - if !f(fd_RequestApplySnapshotChunk_index, value) { - return - } - } - if len(x.Chunk) != 0 { - value := protoreflect.ValueOfBytes(x.Chunk) - if !f(fd_RequestApplySnapshotChunk_chunk, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_RequestApplySnapshotChunk_sender, 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_RequestApplySnapshotChunk) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.RequestApplySnapshotChunk.index": - return x.Index != uint32(0) - case "tendermint.abci.RequestApplySnapshotChunk.chunk": - return len(x.Chunk) != 0 - case "tendermint.abci.RequestApplySnapshotChunk.sender": - return x.Sender != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestApplySnapshotChunk 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_RequestApplySnapshotChunk) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.RequestApplySnapshotChunk.index": - x.Index = uint32(0) - case "tendermint.abci.RequestApplySnapshotChunk.chunk": - x.Chunk = nil - case "tendermint.abci.RequestApplySnapshotChunk.sender": - x.Sender = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestApplySnapshotChunk 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_RequestApplySnapshotChunk) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.RequestApplySnapshotChunk.index": - value := x.Index - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.RequestApplySnapshotChunk.chunk": - value := x.Chunk - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.RequestApplySnapshotChunk.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestApplySnapshotChunk 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_RequestApplySnapshotChunk) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.RequestApplySnapshotChunk.index": - x.Index = uint32(value.Uint()) - case "tendermint.abci.RequestApplySnapshotChunk.chunk": - x.Chunk = value.Bytes() - case "tendermint.abci.RequestApplySnapshotChunk.sender": - x.Sender = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestApplySnapshotChunk 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_RequestApplySnapshotChunk) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestApplySnapshotChunk.index": - panic(fmt.Errorf("field index of message tendermint.abci.RequestApplySnapshotChunk is not mutable")) - case "tendermint.abci.RequestApplySnapshotChunk.chunk": - panic(fmt.Errorf("field chunk of message tendermint.abci.RequestApplySnapshotChunk is not mutable")) - case "tendermint.abci.RequestApplySnapshotChunk.sender": - panic(fmt.Errorf("field sender of message tendermint.abci.RequestApplySnapshotChunk is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestApplySnapshotChunk 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_RequestApplySnapshotChunk) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.RequestApplySnapshotChunk.index": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.RequestApplySnapshotChunk.chunk": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.RequestApplySnapshotChunk.sender": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.RequestApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.RequestApplySnapshotChunk 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_RequestApplySnapshotChunk) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.RequestApplySnapshotChunk", 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_RequestApplySnapshotChunk) 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_RequestApplySnapshotChunk) 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_RequestApplySnapshotChunk) 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_RequestApplySnapshotChunk) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RequestApplySnapshotChunk) - 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.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.Chunk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RequestApplySnapshotChunk) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(x.Chunk) > 0 { - i -= len(x.Chunk) - copy(dAtA[i:], x.Chunk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chunk))) - i-- - dAtA[i] = 0x12 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RequestApplySnapshotChunk) - 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: RequestApplySnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Chunk = append(x.Chunk[:0], dAtA[iNdEx:postIndex]...) - if x.Chunk == nil { - x.Chunk = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Response protoreflect.MessageDescriptor - fd_Response_exception protoreflect.FieldDescriptor - fd_Response_echo protoreflect.FieldDescriptor - fd_Response_flush protoreflect.FieldDescriptor - fd_Response_info protoreflect.FieldDescriptor - fd_Response_set_option protoreflect.FieldDescriptor - fd_Response_init_chain protoreflect.FieldDescriptor - fd_Response_query protoreflect.FieldDescriptor - fd_Response_begin_block protoreflect.FieldDescriptor - fd_Response_check_tx protoreflect.FieldDescriptor - fd_Response_deliver_tx protoreflect.FieldDescriptor - fd_Response_end_block protoreflect.FieldDescriptor - fd_Response_commit protoreflect.FieldDescriptor - fd_Response_list_snapshots protoreflect.FieldDescriptor - fd_Response_offer_snapshot protoreflect.FieldDescriptor - fd_Response_load_snapshot_chunk protoreflect.FieldDescriptor - fd_Response_apply_snapshot_chunk protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_Response = File_tendermint_abci_types_proto.Messages().ByName("Response") - fd_Response_exception = md_Response.Fields().ByName("exception") - fd_Response_echo = md_Response.Fields().ByName("echo") - fd_Response_flush = md_Response.Fields().ByName("flush") - fd_Response_info = md_Response.Fields().ByName("info") - fd_Response_set_option = md_Response.Fields().ByName("set_option") - fd_Response_init_chain = md_Response.Fields().ByName("init_chain") - fd_Response_query = md_Response.Fields().ByName("query") - fd_Response_begin_block = md_Response.Fields().ByName("begin_block") - fd_Response_check_tx = md_Response.Fields().ByName("check_tx") - fd_Response_deliver_tx = md_Response.Fields().ByName("deliver_tx") - fd_Response_end_block = md_Response.Fields().ByName("end_block") - fd_Response_commit = md_Response.Fields().ByName("commit") - fd_Response_list_snapshots = md_Response.Fields().ByName("list_snapshots") - fd_Response_offer_snapshot = md_Response.Fields().ByName("offer_snapshot") - fd_Response_load_snapshot_chunk = md_Response.Fields().ByName("load_snapshot_chunk") - fd_Response_apply_snapshot_chunk = md_Response.Fields().ByName("apply_snapshot_chunk") -} - -var _ protoreflect.Message = (*fastReflection_Response)(nil) - -type fastReflection_Response Response - -func (x *Response) ProtoReflect() protoreflect.Message { - return (*fastReflection_Response)(x) -} - -func (x *Response) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Response_messageType fastReflection_Response_messageType -var _ protoreflect.MessageType = fastReflection_Response_messageType{} - -type fastReflection_Response_messageType struct{} - -func (x fastReflection_Response_messageType) Zero() protoreflect.Message { - return (*fastReflection_Response)(nil) -} -func (x fastReflection_Response_messageType) New() protoreflect.Message { - return new(fastReflection_Response) -} -func (x fastReflection_Response_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Response -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Response) Descriptor() protoreflect.MessageDescriptor { - return md_Response -} - -// 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_Response) Type() protoreflect.MessageType { - return _fastReflection_Response_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Response) New() protoreflect.Message { - return new(fastReflection_Response) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Response) Interface() protoreflect.ProtoMessage { - return (*Response)(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_Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Value != nil { - switch o := x.Value.(type) { - case *Response_Exception: - v := o.Exception - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_exception, value) { - return - } - case *Response_Echo: - v := o.Echo - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_echo, value) { - return - } - case *Response_Flush: - v := o.Flush - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_flush, value) { - return - } - case *Response_Info: - v := o.Info - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_info, value) { - return - } - case *Response_SetOption: - v := o.SetOption - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_set_option, value) { - return - } - case *Response_InitChain: - v := o.InitChain - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_init_chain, value) { - return - } - case *Response_Query: - v := o.Query - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_query, value) { - return - } - case *Response_BeginBlock: - v := o.BeginBlock - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_begin_block, value) { - return - } - case *Response_CheckTx: - v := o.CheckTx - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_check_tx, value) { - return - } - case *Response_DeliverTx: - v := o.DeliverTx - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_deliver_tx, value) { - return - } - case *Response_EndBlock: - v := o.EndBlock - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_end_block, value) { - return - } - case *Response_Commit: - v := o.Commit - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_commit, value) { - return - } - case *Response_ListSnapshots: - v := o.ListSnapshots - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_list_snapshots, value) { - return - } - case *Response_OfferSnapshot: - v := o.OfferSnapshot - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_offer_snapshot, value) { - return - } - case *Response_LoadSnapshotChunk: - v := o.LoadSnapshotChunk - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_load_snapshot_chunk, value) { - return - } - case *Response_ApplySnapshotChunk: - v := o.ApplySnapshotChunk - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Response_apply_snapshot_chunk, 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_Response) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.Response.exception": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_Exception); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.echo": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_Echo); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.flush": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_Flush); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.info": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_Info); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.set_option": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_SetOption); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.init_chain": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_InitChain); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.query": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_Query); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.begin_block": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_BeginBlock); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.check_tx": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_CheckTx); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.deliver_tx": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_DeliverTx); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.end_block": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_EndBlock); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.commit": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_Commit); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.list_snapshots": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_ListSnapshots); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.offer_snapshot": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_OfferSnapshot); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.load_snapshot_chunk": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_LoadSnapshotChunk); ok { - return true - } else { - return false - } - case "tendermint.abci.Response.apply_snapshot_chunk": - if x.Value == nil { - return false - } else if _, ok := x.Value.(*Response_ApplySnapshotChunk); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Response")) - } - panic(fmt.Errorf("message tendermint.abci.Response 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_Response) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.Response.exception": - x.Value = nil - case "tendermint.abci.Response.echo": - x.Value = nil - case "tendermint.abci.Response.flush": - x.Value = nil - case "tendermint.abci.Response.info": - x.Value = nil - case "tendermint.abci.Response.set_option": - x.Value = nil - case "tendermint.abci.Response.init_chain": - x.Value = nil - case "tendermint.abci.Response.query": - x.Value = nil - case "tendermint.abci.Response.begin_block": - x.Value = nil - case "tendermint.abci.Response.check_tx": - x.Value = nil - case "tendermint.abci.Response.deliver_tx": - x.Value = nil - case "tendermint.abci.Response.end_block": - x.Value = nil - case "tendermint.abci.Response.commit": - x.Value = nil - case "tendermint.abci.Response.list_snapshots": - x.Value = nil - case "tendermint.abci.Response.offer_snapshot": - x.Value = nil - case "tendermint.abci.Response.load_snapshot_chunk": - x.Value = nil - case "tendermint.abci.Response.apply_snapshot_chunk": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Response")) - } - panic(fmt.Errorf("message tendermint.abci.Response 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_Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.Response.exception": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseException)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_Exception); ok { - return protoreflect.ValueOfMessage(v.Exception.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseException)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.echo": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseEcho)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_Echo); ok { - return protoreflect.ValueOfMessage(v.Echo.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseEcho)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.flush": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseFlush)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_Flush); ok { - return protoreflect.ValueOfMessage(v.Flush.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseFlush)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.info": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseInfo)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_Info); ok { - return protoreflect.ValueOfMessage(v.Info.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseInfo)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.set_option": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseSetOption)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_SetOption); ok { - return protoreflect.ValueOfMessage(v.SetOption.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseSetOption)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.init_chain": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseInitChain)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_InitChain); ok { - return protoreflect.ValueOfMessage(v.InitChain.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseInitChain)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.query": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseQuery)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_Query); ok { - return protoreflect.ValueOfMessage(v.Query.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseQuery)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.begin_block": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseBeginBlock)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_BeginBlock); ok { - return protoreflect.ValueOfMessage(v.BeginBlock.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseBeginBlock)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.check_tx": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseCheckTx)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_CheckTx); ok { - return protoreflect.ValueOfMessage(v.CheckTx.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseCheckTx)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.deliver_tx": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseDeliverTx)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_DeliverTx); ok { - return protoreflect.ValueOfMessage(v.DeliverTx.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseDeliverTx)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.end_block": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseEndBlock)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_EndBlock); ok { - return protoreflect.ValueOfMessage(v.EndBlock.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseEndBlock)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.commit": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseCommit)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_Commit); ok { - return protoreflect.ValueOfMessage(v.Commit.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseCommit)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.list_snapshots": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseListSnapshots)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_ListSnapshots); ok { - return protoreflect.ValueOfMessage(v.ListSnapshots.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseListSnapshots)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.offer_snapshot": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseOfferSnapshot)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_OfferSnapshot); ok { - return protoreflect.ValueOfMessage(v.OfferSnapshot.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseOfferSnapshot)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.load_snapshot_chunk": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseLoadSnapshotChunk)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_LoadSnapshotChunk); ok { - return protoreflect.ValueOfMessage(v.LoadSnapshotChunk.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseLoadSnapshotChunk)(nil).ProtoReflect()) - } - case "tendermint.abci.Response.apply_snapshot_chunk": - if x.Value == nil { - return protoreflect.ValueOfMessage((*ResponseApplySnapshotChunk)(nil).ProtoReflect()) - } else if v, ok := x.Value.(*Response_ApplySnapshotChunk); ok { - return protoreflect.ValueOfMessage(v.ApplySnapshotChunk.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*ResponseApplySnapshotChunk)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Response")) - } - panic(fmt.Errorf("message tendermint.abci.Response 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_Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.Response.exception": - cv := value.Message().Interface().(*ResponseException) - x.Value = &Response_Exception{Exception: cv} - case "tendermint.abci.Response.echo": - cv := value.Message().Interface().(*ResponseEcho) - x.Value = &Response_Echo{Echo: cv} - case "tendermint.abci.Response.flush": - cv := value.Message().Interface().(*ResponseFlush) - x.Value = &Response_Flush{Flush: cv} - case "tendermint.abci.Response.info": - cv := value.Message().Interface().(*ResponseInfo) - x.Value = &Response_Info{Info: cv} - case "tendermint.abci.Response.set_option": - cv := value.Message().Interface().(*ResponseSetOption) - x.Value = &Response_SetOption{SetOption: cv} - case "tendermint.abci.Response.init_chain": - cv := value.Message().Interface().(*ResponseInitChain) - x.Value = &Response_InitChain{InitChain: cv} - case "tendermint.abci.Response.query": - cv := value.Message().Interface().(*ResponseQuery) - x.Value = &Response_Query{Query: cv} - case "tendermint.abci.Response.begin_block": - cv := value.Message().Interface().(*ResponseBeginBlock) - x.Value = &Response_BeginBlock{BeginBlock: cv} - case "tendermint.abci.Response.check_tx": - cv := value.Message().Interface().(*ResponseCheckTx) - x.Value = &Response_CheckTx{CheckTx: cv} - case "tendermint.abci.Response.deliver_tx": - cv := value.Message().Interface().(*ResponseDeliverTx) - x.Value = &Response_DeliverTx{DeliverTx: cv} - case "tendermint.abci.Response.end_block": - cv := value.Message().Interface().(*ResponseEndBlock) - x.Value = &Response_EndBlock{EndBlock: cv} - case "tendermint.abci.Response.commit": - cv := value.Message().Interface().(*ResponseCommit) - x.Value = &Response_Commit{Commit: cv} - case "tendermint.abci.Response.list_snapshots": - cv := value.Message().Interface().(*ResponseListSnapshots) - x.Value = &Response_ListSnapshots{ListSnapshots: cv} - case "tendermint.abci.Response.offer_snapshot": - cv := value.Message().Interface().(*ResponseOfferSnapshot) - x.Value = &Response_OfferSnapshot{OfferSnapshot: cv} - case "tendermint.abci.Response.load_snapshot_chunk": - cv := value.Message().Interface().(*ResponseLoadSnapshotChunk) - x.Value = &Response_LoadSnapshotChunk{LoadSnapshotChunk: cv} - case "tendermint.abci.Response.apply_snapshot_chunk": - cv := value.Message().Interface().(*ResponseApplySnapshotChunk) - x.Value = &Response_ApplySnapshotChunk{ApplySnapshotChunk: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Response")) - } - panic(fmt.Errorf("message tendermint.abci.Response 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_Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Response.exception": - if x.Value == nil { - value := &ResponseException{} - oneofValue := &Response_Exception{Exception: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_Exception: - return protoreflect.ValueOfMessage(m.Exception.ProtoReflect()) - default: - value := &ResponseException{} - oneofValue := &Response_Exception{Exception: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.echo": - if x.Value == nil { - value := &ResponseEcho{} - oneofValue := &Response_Echo{Echo: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_Echo: - return protoreflect.ValueOfMessage(m.Echo.ProtoReflect()) - default: - value := &ResponseEcho{} - oneofValue := &Response_Echo{Echo: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.flush": - if x.Value == nil { - value := &ResponseFlush{} - oneofValue := &Response_Flush{Flush: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_Flush: - return protoreflect.ValueOfMessage(m.Flush.ProtoReflect()) - default: - value := &ResponseFlush{} - oneofValue := &Response_Flush{Flush: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.info": - if x.Value == nil { - value := &ResponseInfo{} - oneofValue := &Response_Info{Info: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_Info: - return protoreflect.ValueOfMessage(m.Info.ProtoReflect()) - default: - value := &ResponseInfo{} - oneofValue := &Response_Info{Info: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.set_option": - if x.Value == nil { - value := &ResponseSetOption{} - oneofValue := &Response_SetOption{SetOption: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_SetOption: - return protoreflect.ValueOfMessage(m.SetOption.ProtoReflect()) - default: - value := &ResponseSetOption{} - oneofValue := &Response_SetOption{SetOption: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.init_chain": - if x.Value == nil { - value := &ResponseInitChain{} - oneofValue := &Response_InitChain{InitChain: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_InitChain: - return protoreflect.ValueOfMessage(m.InitChain.ProtoReflect()) - default: - value := &ResponseInitChain{} - oneofValue := &Response_InitChain{InitChain: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.query": - if x.Value == nil { - value := &ResponseQuery{} - oneofValue := &Response_Query{Query: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_Query: - return protoreflect.ValueOfMessage(m.Query.ProtoReflect()) - default: - value := &ResponseQuery{} - oneofValue := &Response_Query{Query: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.begin_block": - if x.Value == nil { - value := &ResponseBeginBlock{} - oneofValue := &Response_BeginBlock{BeginBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_BeginBlock: - return protoreflect.ValueOfMessage(m.BeginBlock.ProtoReflect()) - default: - value := &ResponseBeginBlock{} - oneofValue := &Response_BeginBlock{BeginBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.check_tx": - if x.Value == nil { - value := &ResponseCheckTx{} - oneofValue := &Response_CheckTx{CheckTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_CheckTx: - return protoreflect.ValueOfMessage(m.CheckTx.ProtoReflect()) - default: - value := &ResponseCheckTx{} - oneofValue := &Response_CheckTx{CheckTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.deliver_tx": - if x.Value == nil { - value := &ResponseDeliverTx{} - oneofValue := &Response_DeliverTx{DeliverTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_DeliverTx: - return protoreflect.ValueOfMessage(m.DeliverTx.ProtoReflect()) - default: - value := &ResponseDeliverTx{} - oneofValue := &Response_DeliverTx{DeliverTx: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.end_block": - if x.Value == nil { - value := &ResponseEndBlock{} - oneofValue := &Response_EndBlock{EndBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_EndBlock: - return protoreflect.ValueOfMessage(m.EndBlock.ProtoReflect()) - default: - value := &ResponseEndBlock{} - oneofValue := &Response_EndBlock{EndBlock: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.commit": - if x.Value == nil { - value := &ResponseCommit{} - oneofValue := &Response_Commit{Commit: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_Commit: - return protoreflect.ValueOfMessage(m.Commit.ProtoReflect()) - default: - value := &ResponseCommit{} - oneofValue := &Response_Commit{Commit: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.list_snapshots": - if x.Value == nil { - value := &ResponseListSnapshots{} - oneofValue := &Response_ListSnapshots{ListSnapshots: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_ListSnapshots: - return protoreflect.ValueOfMessage(m.ListSnapshots.ProtoReflect()) - default: - value := &ResponseListSnapshots{} - oneofValue := &Response_ListSnapshots{ListSnapshots: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.offer_snapshot": - if x.Value == nil { - value := &ResponseOfferSnapshot{} - oneofValue := &Response_OfferSnapshot{OfferSnapshot: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_OfferSnapshot: - return protoreflect.ValueOfMessage(m.OfferSnapshot.ProtoReflect()) - default: - value := &ResponseOfferSnapshot{} - oneofValue := &Response_OfferSnapshot{OfferSnapshot: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.load_snapshot_chunk": - if x.Value == nil { - value := &ResponseLoadSnapshotChunk{} - oneofValue := &Response_LoadSnapshotChunk{LoadSnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_LoadSnapshotChunk: - return protoreflect.ValueOfMessage(m.LoadSnapshotChunk.ProtoReflect()) - default: - value := &ResponseLoadSnapshotChunk{} - oneofValue := &Response_LoadSnapshotChunk{LoadSnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.abci.Response.apply_snapshot_chunk": - if x.Value == nil { - value := &ResponseApplySnapshotChunk{} - oneofValue := &Response_ApplySnapshotChunk{ApplySnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Value.(type) { - case *Response_ApplySnapshotChunk: - return protoreflect.ValueOfMessage(m.ApplySnapshotChunk.ProtoReflect()) - default: - value := &ResponseApplySnapshotChunk{} - oneofValue := &Response_ApplySnapshotChunk{ApplySnapshotChunk: value} - x.Value = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Response")) - } - panic(fmt.Errorf("message tendermint.abci.Response 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_Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Response.exception": - value := &ResponseException{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.echo": - value := &ResponseEcho{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.flush": - value := &ResponseFlush{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.info": - value := &ResponseInfo{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.set_option": - value := &ResponseSetOption{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.init_chain": - value := &ResponseInitChain{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.query": - value := &ResponseQuery{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.begin_block": - value := &ResponseBeginBlock{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.check_tx": - value := &ResponseCheckTx{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.deliver_tx": - value := &ResponseDeliverTx{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.end_block": - value := &ResponseEndBlock{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.commit": - value := &ResponseCommit{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.list_snapshots": - value := &ResponseListSnapshots{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.offer_snapshot": - value := &ResponseOfferSnapshot{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.load_snapshot_chunk": - value := &ResponseLoadSnapshotChunk{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Response.apply_snapshot_chunk": - value := &ResponseApplySnapshotChunk{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Response")) - } - panic(fmt.Errorf("message tendermint.abci.Response 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_Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "tendermint.abci.Response.value": - if x.Value == nil { - return nil - } - switch x.Value.(type) { - case *Response_Exception: - return x.Descriptor().Fields().ByName("exception") - case *Response_Echo: - return x.Descriptor().Fields().ByName("echo") - case *Response_Flush: - return x.Descriptor().Fields().ByName("flush") - case *Response_Info: - return x.Descriptor().Fields().ByName("info") - case *Response_SetOption: - return x.Descriptor().Fields().ByName("set_option") - case *Response_InitChain: - return x.Descriptor().Fields().ByName("init_chain") - case *Response_Query: - return x.Descriptor().Fields().ByName("query") - case *Response_BeginBlock: - return x.Descriptor().Fields().ByName("begin_block") - case *Response_CheckTx: - return x.Descriptor().Fields().ByName("check_tx") - case *Response_DeliverTx: - return x.Descriptor().Fields().ByName("deliver_tx") - case *Response_EndBlock: - return x.Descriptor().Fields().ByName("end_block") - case *Response_Commit: - return x.Descriptor().Fields().ByName("commit") - case *Response_ListSnapshots: - return x.Descriptor().Fields().ByName("list_snapshots") - case *Response_OfferSnapshot: - return x.Descriptor().Fields().ByName("offer_snapshot") - case *Response_LoadSnapshotChunk: - return x.Descriptor().Fields().ByName("load_snapshot_chunk") - case *Response_ApplySnapshotChunk: - return x.Descriptor().Fields().ByName("apply_snapshot_chunk") - } - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.Response", 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_Response) 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_Response) 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_Response) 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_Response) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Response) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Value.(type) { - case *Response_Exception: - if x == nil { - break - } - l = options.Size(x.Exception) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_Echo: - if x == nil { - break - } - l = options.Size(x.Echo) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_Flush: - if x == nil { - break - } - l = options.Size(x.Flush) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_Info: - if x == nil { - break - } - l = options.Size(x.Info) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_SetOption: - if x == nil { - break - } - l = options.Size(x.SetOption) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_InitChain: - if x == nil { - break - } - l = options.Size(x.InitChain) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_Query: - if x == nil { - break - } - l = options.Size(x.Query) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_BeginBlock: - if x == nil { - break - } - l = options.Size(x.BeginBlock) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_CheckTx: - if x == nil { - break - } - l = options.Size(x.CheckTx) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_DeliverTx: - if x == nil { - break - } - l = options.Size(x.DeliverTx) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_EndBlock: - if x == nil { - break - } - l = options.Size(x.EndBlock) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_Commit: - if x == nil { - break - } - l = options.Size(x.Commit) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_ListSnapshots: - if x == nil { - break - } - l = options.Size(x.ListSnapshots) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_OfferSnapshot: - if x == nil { - break - } - l = options.Size(x.OfferSnapshot) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_LoadSnapshotChunk: - if x == nil { - break - } - l = options.Size(x.LoadSnapshotChunk) - n += 1 + l + runtime.Sov(uint64(l)) - case *Response_ApplySnapshotChunk: - if x == nil { - break - } - l = options.Size(x.ApplySnapshotChunk) - n += 2 + 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().(*Response) - 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) - } - switch x := x.Value.(type) { - case *Response_Exception: - encoded, err := options.Marshal(x.Exception) - 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 - case *Response_Echo: - encoded, err := options.Marshal(x.Echo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - case *Response_Flush: - encoded, err := options.Marshal(x.Flush) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - case *Response_Info: - encoded, err := options.Marshal(x.Info) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - case *Response_SetOption: - encoded, err := options.Marshal(x.SetOption) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - case *Response_InitChain: - encoded, err := options.Marshal(x.InitChain) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - case *Response_Query: - encoded, err := options.Marshal(x.Query) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - case *Response_BeginBlock: - encoded, err := options.Marshal(x.BeginBlock) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - case *Response_CheckTx: - encoded, err := options.Marshal(x.CheckTx) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - case *Response_DeliverTx: - encoded, err := options.Marshal(x.DeliverTx) - 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] = 0x52 - case *Response_EndBlock: - encoded, err := options.Marshal(x.EndBlock) - 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] = 0x5a - case *Response_Commit: - encoded, err := options.Marshal(x.Commit) - 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] = 0x62 - case *Response_ListSnapshots: - encoded, err := options.Marshal(x.ListSnapshots) - 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] = 0x6a - case *Response_OfferSnapshot: - encoded, err := options.Marshal(x.OfferSnapshot) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x72 - case *Response_LoadSnapshotChunk: - encoded, err := options.Marshal(x.LoadSnapshotChunk) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x7a - case *Response_ApplySnapshotChunk: - encoded, err := options.Marshal(x.ApplySnapshotChunk) - 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] = 0x1 - i-- - dAtA[i] = 0x82 - } - 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().(*Response) - 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: Response: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Response: 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 Exception", 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 - } - v := &ResponseException{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_Exception{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Echo", 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 - } - v := &ResponseEcho{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_Echo{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Flush", 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 - } - v := &ResponseFlush{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_Flush{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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 - } - v := &ResponseInfo{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_Info{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SetOption", 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 - } - v := &ResponseSetOption{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_SetOption{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitChain", 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 - } - v := &ResponseInitChain{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_InitChain{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Query", 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 - } - v := &ResponseQuery{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_Query{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", 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 - } - v := &ResponseBeginBlock{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_BeginBlock{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CheckTx", 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 - } - v := &ResponseCheckTx{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_CheckTx{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", 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 - } - v := &ResponseDeliverTx{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_DeliverTx{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndBlock", 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 - } - v := &ResponseEndBlock{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_EndBlock{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commit", 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 - } - v := &ResponseCommit{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_Commit{v} - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", 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 - } - v := &ResponseListSnapshots{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_ListSnapshots{v} - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", 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 - } - v := &ResponseOfferSnapshot{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_OfferSnapshot{v} - iNdEx = postIndex - case 15: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", 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 - } - v := &ResponseLoadSnapshotChunk{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_LoadSnapshotChunk{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", 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 - } - v := &ResponseApplySnapshotChunk{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Value = &Response_ApplySnapshotChunk{v} - 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_ResponseException protoreflect.MessageDescriptor - fd_ResponseException_error protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseException = File_tendermint_abci_types_proto.Messages().ByName("ResponseException") - fd_ResponseException_error = md_ResponseException.Fields().ByName("error") -} - -var _ protoreflect.Message = (*fastReflection_ResponseException)(nil) - -type fastReflection_ResponseException ResponseException - -func (x *ResponseException) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseException)(x) -} - -func (x *ResponseException) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseException_messageType fastReflection_ResponseException_messageType -var _ protoreflect.MessageType = fastReflection_ResponseException_messageType{} - -type fastReflection_ResponseException_messageType struct{} - -func (x fastReflection_ResponseException_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseException)(nil) -} -func (x fastReflection_ResponseException_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseException) -} -func (x fastReflection_ResponseException_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseException -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseException) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseException -} - -// 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_ResponseException) Type() protoreflect.MessageType { - return _fastReflection_ResponseException_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseException) New() protoreflect.Message { - return new(fastReflection_ResponseException) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseException) Interface() protoreflect.ProtoMessage { - return (*ResponseException)(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_ResponseException) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Error != "" { - value := protoreflect.ValueOfString(x.Error) - if !f(fd_ResponseException_error, 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_ResponseException) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseException.error": - return x.Error != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseException")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseException 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_ResponseException) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseException.error": - x.Error = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseException")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseException 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_ResponseException) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseException.error": - value := x.Error - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseException")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseException 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_ResponseException) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseException.error": - x.Error = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseException")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseException 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_ResponseException) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseException.error": - panic(fmt.Errorf("field error of message tendermint.abci.ResponseException is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseException")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseException 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_ResponseException) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseException.error": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseException")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseException 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_ResponseException) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseException", 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_ResponseException) 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_ResponseException) 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_ResponseException) 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_ResponseException) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseException) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Error) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseException) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Error) > 0 { - i -= len(x.Error) - copy(dAtA[i:], x.Error) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) - 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().(*ResponseException) - 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: ResponseException: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseException: 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 Error", 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.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseEcho protoreflect.MessageDescriptor - fd_ResponseEcho_message protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseEcho = File_tendermint_abci_types_proto.Messages().ByName("ResponseEcho") - fd_ResponseEcho_message = md_ResponseEcho.Fields().ByName("message") -} - -var _ protoreflect.Message = (*fastReflection_ResponseEcho)(nil) - -type fastReflection_ResponseEcho ResponseEcho - -func (x *ResponseEcho) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseEcho)(x) -} - -func (x *ResponseEcho) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseEcho_messageType fastReflection_ResponseEcho_messageType -var _ protoreflect.MessageType = fastReflection_ResponseEcho_messageType{} - -type fastReflection_ResponseEcho_messageType struct{} - -func (x fastReflection_ResponseEcho_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseEcho)(nil) -} -func (x fastReflection_ResponseEcho_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseEcho) -} -func (x fastReflection_ResponseEcho_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseEcho -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseEcho) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseEcho -} - -// 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_ResponseEcho) Type() protoreflect.MessageType { - return _fastReflection_ResponseEcho_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseEcho) New() protoreflect.Message { - return new(fastReflection_ResponseEcho) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseEcho) Interface() protoreflect.ProtoMessage { - return (*ResponseEcho)(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_ResponseEcho) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Message != "" { - value := protoreflect.ValueOfString(x.Message) - if !f(fd_ResponseEcho_message, 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_ResponseEcho) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseEcho.message": - return x.Message != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEcho")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEcho 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_ResponseEcho) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseEcho.message": - x.Message = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEcho")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEcho 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_ResponseEcho) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseEcho.message": - value := x.Message - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEcho")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEcho 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_ResponseEcho) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseEcho.message": - x.Message = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEcho")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEcho 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_ResponseEcho) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseEcho.message": - panic(fmt.Errorf("field message of message tendermint.abci.ResponseEcho is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEcho")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEcho 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_ResponseEcho) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseEcho.message": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEcho")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEcho 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_ResponseEcho) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseEcho", 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_ResponseEcho) 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_ResponseEcho) 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_ResponseEcho) 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_ResponseEcho) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseEcho) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Message) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseEcho) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Message) > 0 { - i -= len(x.Message) - copy(dAtA[i:], x.Message) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) - 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().(*ResponseEcho) - 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: ResponseEcho: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseEcho: 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 Message", 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.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseFlush protoreflect.MessageDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseFlush = File_tendermint_abci_types_proto.Messages().ByName("ResponseFlush") -} - -var _ protoreflect.Message = (*fastReflection_ResponseFlush)(nil) - -type fastReflection_ResponseFlush ResponseFlush - -func (x *ResponseFlush) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseFlush)(x) -} - -func (x *ResponseFlush) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseFlush_messageType fastReflection_ResponseFlush_messageType -var _ protoreflect.MessageType = fastReflection_ResponseFlush_messageType{} - -type fastReflection_ResponseFlush_messageType struct{} - -func (x fastReflection_ResponseFlush_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseFlush)(nil) -} -func (x fastReflection_ResponseFlush_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseFlush) -} -func (x fastReflection_ResponseFlush_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseFlush -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseFlush) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseFlush -} - -// 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_ResponseFlush) Type() protoreflect.MessageType { - return _fastReflection_ResponseFlush_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseFlush) New() protoreflect.Message { - return new(fastReflection_ResponseFlush) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseFlush) Interface() protoreflect.ProtoMessage { - return (*ResponseFlush)(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_ResponseFlush) 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_ResponseFlush) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseFlush")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseFlush 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_ResponseFlush) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseFlush")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseFlush 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_ResponseFlush) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseFlush")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseFlush 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_ResponseFlush) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseFlush")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseFlush 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_ResponseFlush) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseFlush")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseFlush 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_ResponseFlush) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseFlush")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseFlush 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_ResponseFlush) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseFlush", 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_ResponseFlush) 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_ResponseFlush) 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_ResponseFlush) 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_ResponseFlush) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseFlush) - 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().(*ResponseFlush) - 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().(*ResponseFlush) - 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: ResponseFlush: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseFlush: 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_ResponseInfo protoreflect.MessageDescriptor - fd_ResponseInfo_data protoreflect.FieldDescriptor - fd_ResponseInfo_version protoreflect.FieldDescriptor - fd_ResponseInfo_app_version protoreflect.FieldDescriptor - fd_ResponseInfo_last_block_height protoreflect.FieldDescriptor - fd_ResponseInfo_last_block_app_hash protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseInfo = File_tendermint_abci_types_proto.Messages().ByName("ResponseInfo") - fd_ResponseInfo_data = md_ResponseInfo.Fields().ByName("data") - fd_ResponseInfo_version = md_ResponseInfo.Fields().ByName("version") - fd_ResponseInfo_app_version = md_ResponseInfo.Fields().ByName("app_version") - fd_ResponseInfo_last_block_height = md_ResponseInfo.Fields().ByName("last_block_height") - fd_ResponseInfo_last_block_app_hash = md_ResponseInfo.Fields().ByName("last_block_app_hash") -} - -var _ protoreflect.Message = (*fastReflection_ResponseInfo)(nil) - -type fastReflection_ResponseInfo ResponseInfo - -func (x *ResponseInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseInfo)(x) -} - -func (x *ResponseInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseInfo_messageType fastReflection_ResponseInfo_messageType -var _ protoreflect.MessageType = fastReflection_ResponseInfo_messageType{} - -type fastReflection_ResponseInfo_messageType struct{} - -func (x fastReflection_ResponseInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseInfo)(nil) -} -func (x fastReflection_ResponseInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseInfo) -} -func (x fastReflection_ResponseInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseInfo -} - -// 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_ResponseInfo) Type() protoreflect.MessageType { - return _fastReflection_ResponseInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseInfo) New() protoreflect.Message { - return new(fastReflection_ResponseInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseInfo) Interface() protoreflect.ProtoMessage { - return (*ResponseInfo)(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_ResponseInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Data != "" { - value := protoreflect.ValueOfString(x.Data) - if !f(fd_ResponseInfo_data, value) { - return - } - } - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_ResponseInfo_version, value) { - return - } - } - if x.AppVersion != uint64(0) { - value := protoreflect.ValueOfUint64(x.AppVersion) - if !f(fd_ResponseInfo_app_version, value) { - return - } - } - if x.LastBlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.LastBlockHeight) - if !f(fd_ResponseInfo_last_block_height, value) { - return - } - } - if len(x.LastBlockAppHash) != 0 { - value := protoreflect.ValueOfBytes(x.LastBlockAppHash) - if !f(fd_ResponseInfo_last_block_app_hash, 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_ResponseInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseInfo.data": - return x.Data != "" - case "tendermint.abci.ResponseInfo.version": - return x.Version != "" - case "tendermint.abci.ResponseInfo.app_version": - return x.AppVersion != uint64(0) - case "tendermint.abci.ResponseInfo.last_block_height": - return x.LastBlockHeight != int64(0) - case "tendermint.abci.ResponseInfo.last_block_app_hash": - return len(x.LastBlockAppHash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInfo")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInfo 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_ResponseInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseInfo.data": - x.Data = "" - case "tendermint.abci.ResponseInfo.version": - x.Version = "" - case "tendermint.abci.ResponseInfo.app_version": - x.AppVersion = uint64(0) - case "tendermint.abci.ResponseInfo.last_block_height": - x.LastBlockHeight = int64(0) - case "tendermint.abci.ResponseInfo.last_block_app_hash": - x.LastBlockAppHash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInfo")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInfo 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_ResponseInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseInfo.data": - value := x.Data - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseInfo.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseInfo.app_version": - value := x.AppVersion - return protoreflect.ValueOfUint64(value) - case "tendermint.abci.ResponseInfo.last_block_height": - value := x.LastBlockHeight - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseInfo.last_block_app_hash": - value := x.LastBlockAppHash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInfo")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInfo 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_ResponseInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseInfo.data": - x.Data = value.Interface().(string) - case "tendermint.abci.ResponseInfo.version": - x.Version = value.Interface().(string) - case "tendermint.abci.ResponseInfo.app_version": - x.AppVersion = value.Uint() - case "tendermint.abci.ResponseInfo.last_block_height": - x.LastBlockHeight = value.Int() - case "tendermint.abci.ResponseInfo.last_block_app_hash": - x.LastBlockAppHash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInfo")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInfo 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_ResponseInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseInfo.data": - panic(fmt.Errorf("field data of message tendermint.abci.ResponseInfo is not mutable")) - case "tendermint.abci.ResponseInfo.version": - panic(fmt.Errorf("field version of message tendermint.abci.ResponseInfo is not mutable")) - case "tendermint.abci.ResponseInfo.app_version": - panic(fmt.Errorf("field app_version of message tendermint.abci.ResponseInfo is not mutable")) - case "tendermint.abci.ResponseInfo.last_block_height": - panic(fmt.Errorf("field last_block_height of message tendermint.abci.ResponseInfo is not mutable")) - case "tendermint.abci.ResponseInfo.last_block_app_hash": - panic(fmt.Errorf("field last_block_app_hash of message tendermint.abci.ResponseInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInfo")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInfo 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_ResponseInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseInfo.data": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseInfo.version": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseInfo.app_version": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.abci.ResponseInfo.last_block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseInfo.last_block_app_hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInfo")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInfo 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_ResponseInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseInfo", 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_ResponseInfo) 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_ResponseInfo) 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_ResponseInfo) 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_ResponseInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AppVersion != 0 { - n += 1 + runtime.Sov(uint64(x.AppVersion)) - } - if x.LastBlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.LastBlockHeight)) - } - l = len(x.LastBlockAppHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LastBlockAppHash) > 0 { - i -= len(x.LastBlockAppHash) - copy(dAtA[i:], x.LastBlockAppHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LastBlockAppHash))) - i-- - dAtA[i] = 0x2a - } - if x.LastBlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.LastBlockHeight)) - i-- - dAtA[i] = 0x20 - } - if x.AppVersion != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AppVersion)) - i-- - dAtA[i] = 0x18 - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - i-- - dAtA[i] = 0x12 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - 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().(*ResponseInfo) - 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: ResponseInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseInfo: 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 Data", 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.Data = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - x.AppVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AppVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType) - } - x.LastBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.LastBlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LastBlockAppHash = append(x.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...) - if x.LastBlockAppHash == nil { - x.LastBlockAppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseSetOption protoreflect.MessageDescriptor - fd_ResponseSetOption_code protoreflect.FieldDescriptor - fd_ResponseSetOption_log protoreflect.FieldDescriptor - fd_ResponseSetOption_info protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseSetOption = File_tendermint_abci_types_proto.Messages().ByName("ResponseSetOption") - fd_ResponseSetOption_code = md_ResponseSetOption.Fields().ByName("code") - fd_ResponseSetOption_log = md_ResponseSetOption.Fields().ByName("log") - fd_ResponseSetOption_info = md_ResponseSetOption.Fields().ByName("info") -} - -var _ protoreflect.Message = (*fastReflection_ResponseSetOption)(nil) - -type fastReflection_ResponseSetOption ResponseSetOption - -func (x *ResponseSetOption) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseSetOption)(x) -} - -func (x *ResponseSetOption) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseSetOption_messageType fastReflection_ResponseSetOption_messageType -var _ protoreflect.MessageType = fastReflection_ResponseSetOption_messageType{} - -type fastReflection_ResponseSetOption_messageType struct{} - -func (x fastReflection_ResponseSetOption_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseSetOption)(nil) -} -func (x fastReflection_ResponseSetOption_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseSetOption) -} -func (x fastReflection_ResponseSetOption_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseSetOption -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseSetOption) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseSetOption -} - -// 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_ResponseSetOption) Type() protoreflect.MessageType { - return _fastReflection_ResponseSetOption_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseSetOption) New() protoreflect.Message { - return new(fastReflection_ResponseSetOption) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseSetOption) Interface() protoreflect.ProtoMessage { - return (*ResponseSetOption)(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_ResponseSetOption) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ResponseSetOption_code, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ResponseSetOption_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ResponseSetOption_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ResponseSetOption) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseSetOption.code": - return x.Code != uint32(0) - case "tendermint.abci.ResponseSetOption.log": - return x.Log != "" - case "tendermint.abci.ResponseSetOption.info": - return x.Info != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseSetOption 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_ResponseSetOption) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseSetOption.code": - x.Code = uint32(0) - case "tendermint.abci.ResponseSetOption.log": - x.Log = "" - case "tendermint.abci.ResponseSetOption.info": - x.Info = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseSetOption 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_ResponseSetOption) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseSetOption.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.ResponseSetOption.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseSetOption.info": - value := x.Info - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseSetOption 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_ResponseSetOption) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseSetOption.code": - x.Code = uint32(value.Uint()) - case "tendermint.abci.ResponseSetOption.log": - x.Log = value.Interface().(string) - case "tendermint.abci.ResponseSetOption.info": - x.Info = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseSetOption 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_ResponseSetOption) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseSetOption.code": - panic(fmt.Errorf("field code of message tendermint.abci.ResponseSetOption is not mutable")) - case "tendermint.abci.ResponseSetOption.log": - panic(fmt.Errorf("field log of message tendermint.abci.ResponseSetOption is not mutable")) - case "tendermint.abci.ResponseSetOption.info": - panic(fmt.Errorf("field info of message tendermint.abci.ResponseSetOption is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseSetOption 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_ResponseSetOption) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseSetOption.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.ResponseSetOption.log": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseSetOption.info": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseSetOption")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseSetOption 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_ResponseSetOption) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseSetOption", 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_ResponseSetOption) 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_ResponseSetOption) 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_ResponseSetOption) 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_ResponseSetOption) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseSetOption) - 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.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseSetOption) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseSetOption) - 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: ResponseSetOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseSetOption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseInitChain_2_list)(nil) - -type _ResponseInitChain_2_list struct { - list *[]*ValidatorUpdate -} - -func (x *_ResponseInitChain_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseInitChain_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseInitChain_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorUpdate) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseInitChain_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorUpdate) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseInitChain_2_list) AppendMutable() protoreflect.Value { - v := new(ValidatorUpdate) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseInitChain_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseInitChain_2_list) NewElement() protoreflect.Value { - v := new(ValidatorUpdate) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseInitChain_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseInitChain protoreflect.MessageDescriptor - fd_ResponseInitChain_consensus_params protoreflect.FieldDescriptor - fd_ResponseInitChain_validators protoreflect.FieldDescriptor - fd_ResponseInitChain_app_hash protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseInitChain = File_tendermint_abci_types_proto.Messages().ByName("ResponseInitChain") - fd_ResponseInitChain_consensus_params = md_ResponseInitChain.Fields().ByName("consensus_params") - fd_ResponseInitChain_validators = md_ResponseInitChain.Fields().ByName("validators") - fd_ResponseInitChain_app_hash = md_ResponseInitChain.Fields().ByName("app_hash") -} - -var _ protoreflect.Message = (*fastReflection_ResponseInitChain)(nil) - -type fastReflection_ResponseInitChain ResponseInitChain - -func (x *ResponseInitChain) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseInitChain)(x) -} - -func (x *ResponseInitChain) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseInitChain_messageType fastReflection_ResponseInitChain_messageType -var _ protoreflect.MessageType = fastReflection_ResponseInitChain_messageType{} - -type fastReflection_ResponseInitChain_messageType struct{} - -func (x fastReflection_ResponseInitChain_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseInitChain)(nil) -} -func (x fastReflection_ResponseInitChain_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseInitChain) -} -func (x fastReflection_ResponseInitChain_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseInitChain -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseInitChain) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseInitChain -} - -// 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_ResponseInitChain) Type() protoreflect.MessageType { - return _fastReflection_ResponseInitChain_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseInitChain) New() protoreflect.Message { - return new(fastReflection_ResponseInitChain) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseInitChain) Interface() protoreflect.ProtoMessage { - return (*ResponseInitChain)(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_ResponseInitChain) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConsensusParams != nil { - value := protoreflect.ValueOfMessage(x.ConsensusParams.ProtoReflect()) - if !f(fd_ResponseInitChain_consensus_params, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_ResponseInitChain_2_list{list: &x.Validators}) - if !f(fd_ResponseInitChain_validators, value) { - return - } - } - if len(x.AppHash) != 0 { - value := protoreflect.ValueOfBytes(x.AppHash) - if !f(fd_ResponseInitChain_app_hash, 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_ResponseInitChain) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseInitChain.consensus_params": - return x.ConsensusParams != nil - case "tendermint.abci.ResponseInitChain.validators": - return len(x.Validators) != 0 - case "tendermint.abci.ResponseInitChain.app_hash": - return len(x.AppHash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInitChain 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_ResponseInitChain) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseInitChain.consensus_params": - x.ConsensusParams = nil - case "tendermint.abci.ResponseInitChain.validators": - x.Validators = nil - case "tendermint.abci.ResponseInitChain.app_hash": - x.AppHash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInitChain 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_ResponseInitChain) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseInitChain.consensus_params": - value := x.ConsensusParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ResponseInitChain.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_ResponseInitChain_2_list{}) - } - listValue := &_ResponseInitChain_2_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "tendermint.abci.ResponseInitChain.app_hash": - value := x.AppHash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInitChain 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_ResponseInitChain) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseInitChain.consensus_params": - x.ConsensusParams = value.Message().Interface().(*ConsensusParams) - case "tendermint.abci.ResponseInitChain.validators": - lv := value.List() - clv := lv.(*_ResponseInitChain_2_list) - x.Validators = *clv.list - case "tendermint.abci.ResponseInitChain.app_hash": - x.AppHash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInitChain 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_ResponseInitChain) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseInitChain.consensus_params": - if x.ConsensusParams == nil { - x.ConsensusParams = new(ConsensusParams) - } - return protoreflect.ValueOfMessage(x.ConsensusParams.ProtoReflect()) - case "tendermint.abci.ResponseInitChain.validators": - if x.Validators == nil { - x.Validators = []*ValidatorUpdate{} - } - value := &_ResponseInitChain_2_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "tendermint.abci.ResponseInitChain.app_hash": - panic(fmt.Errorf("field app_hash of message tendermint.abci.ResponseInitChain is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInitChain 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_ResponseInitChain) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseInitChain.consensus_params": - m := new(ConsensusParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ResponseInitChain.validators": - list := []*ValidatorUpdate{} - return protoreflect.ValueOfList(&_ResponseInitChain_2_list{list: &list}) - case "tendermint.abci.ResponseInitChain.app_hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseInitChain")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseInitChain 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_ResponseInitChain) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseInitChain", 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_ResponseInitChain) 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_ResponseInitChain) 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_ResponseInitChain) 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_ResponseInitChain) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseInitChain) - 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.ConsensusParams != nil { - l = options.Size(x.ConsensusParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.AppHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseInitChain) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AppHash) > 0 { - i -= len(x.AppHash) - copy(dAtA[i:], x.AppHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.ConsensusParams != nil { - encoded, err := options.Marshal(x.ConsensusParams) - 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().(*ResponseInitChain) - 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: ResponseInitChain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseInitChain: 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 ConsensusParams", 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.ConsensusParams == nil { - x.ConsensusParams = &ConsensusParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &ValidatorUpdate{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AppHash = append(x.AppHash[:0], dAtA[iNdEx:postIndex]...) - if x.AppHash == nil { - x.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseQuery protoreflect.MessageDescriptor - fd_ResponseQuery_code protoreflect.FieldDescriptor - fd_ResponseQuery_log protoreflect.FieldDescriptor - fd_ResponseQuery_info protoreflect.FieldDescriptor - fd_ResponseQuery_index protoreflect.FieldDescriptor - fd_ResponseQuery_key protoreflect.FieldDescriptor - fd_ResponseQuery_value protoreflect.FieldDescriptor - fd_ResponseQuery_proof_ops protoreflect.FieldDescriptor - fd_ResponseQuery_height protoreflect.FieldDescriptor - fd_ResponseQuery_codespace protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseQuery = File_tendermint_abci_types_proto.Messages().ByName("ResponseQuery") - fd_ResponseQuery_code = md_ResponseQuery.Fields().ByName("code") - fd_ResponseQuery_log = md_ResponseQuery.Fields().ByName("log") - fd_ResponseQuery_info = md_ResponseQuery.Fields().ByName("info") - fd_ResponseQuery_index = md_ResponseQuery.Fields().ByName("index") - fd_ResponseQuery_key = md_ResponseQuery.Fields().ByName("key") - fd_ResponseQuery_value = md_ResponseQuery.Fields().ByName("value") - fd_ResponseQuery_proof_ops = md_ResponseQuery.Fields().ByName("proof_ops") - fd_ResponseQuery_height = md_ResponseQuery.Fields().ByName("height") - fd_ResponseQuery_codespace = md_ResponseQuery.Fields().ByName("codespace") -} - -var _ protoreflect.Message = (*fastReflection_ResponseQuery)(nil) - -type fastReflection_ResponseQuery ResponseQuery - -func (x *ResponseQuery) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseQuery)(x) -} - -func (x *ResponseQuery) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseQuery_messageType fastReflection_ResponseQuery_messageType -var _ protoreflect.MessageType = fastReflection_ResponseQuery_messageType{} - -type fastReflection_ResponseQuery_messageType struct{} - -func (x fastReflection_ResponseQuery_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseQuery)(nil) -} -func (x fastReflection_ResponseQuery_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseQuery) -} -func (x fastReflection_ResponseQuery_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseQuery -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseQuery) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseQuery -} - -// 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_ResponseQuery) Type() protoreflect.MessageType { - return _fastReflection_ResponseQuery_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseQuery) New() protoreflect.Message { - return new(fastReflection_ResponseQuery) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseQuery) Interface() protoreflect.ProtoMessage { - return (*ResponseQuery)(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_ResponseQuery) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ResponseQuery_code, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ResponseQuery_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ResponseQuery_info, value) { - return - } - } - if x.Index != int64(0) { - value := protoreflect.ValueOfInt64(x.Index) - if !f(fd_ResponseQuery_index, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ResponseQuery_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_ResponseQuery_value, value) { - return - } - } - if x.ProofOps != nil { - value := protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - if !f(fd_ResponseQuery_proof_ops, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_ResponseQuery_height, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_ResponseQuery_codespace, 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_ResponseQuery) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseQuery.code": - return x.Code != uint32(0) - case "tendermint.abci.ResponseQuery.log": - return x.Log != "" - case "tendermint.abci.ResponseQuery.info": - return x.Info != "" - case "tendermint.abci.ResponseQuery.index": - return x.Index != int64(0) - case "tendermint.abci.ResponseQuery.key": - return len(x.Key) != 0 - case "tendermint.abci.ResponseQuery.value": - return len(x.Value) != 0 - case "tendermint.abci.ResponseQuery.proof_ops": - return x.ProofOps != nil - case "tendermint.abci.ResponseQuery.height": - return x.Height != int64(0) - case "tendermint.abci.ResponseQuery.codespace": - return x.Codespace != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseQuery")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseQuery 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_ResponseQuery) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseQuery.code": - x.Code = uint32(0) - case "tendermint.abci.ResponseQuery.log": - x.Log = "" - case "tendermint.abci.ResponseQuery.info": - x.Info = "" - case "tendermint.abci.ResponseQuery.index": - x.Index = int64(0) - case "tendermint.abci.ResponseQuery.key": - x.Key = nil - case "tendermint.abci.ResponseQuery.value": - x.Value = nil - case "tendermint.abci.ResponseQuery.proof_ops": - x.ProofOps = nil - case "tendermint.abci.ResponseQuery.height": - x.Height = int64(0) - case "tendermint.abci.ResponseQuery.codespace": - x.Codespace = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseQuery")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseQuery 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_ResponseQuery) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseQuery.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.ResponseQuery.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseQuery.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseQuery.index": - value := x.Index - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseQuery.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.ResponseQuery.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.ResponseQuery.proof_ops": - value := x.ProofOps - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ResponseQuery.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseQuery.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseQuery")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseQuery 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_ResponseQuery) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseQuery.code": - x.Code = uint32(value.Uint()) - case "tendermint.abci.ResponseQuery.log": - x.Log = value.Interface().(string) - case "tendermint.abci.ResponseQuery.info": - x.Info = value.Interface().(string) - case "tendermint.abci.ResponseQuery.index": - x.Index = value.Int() - case "tendermint.abci.ResponseQuery.key": - x.Key = value.Bytes() - case "tendermint.abci.ResponseQuery.value": - x.Value = value.Bytes() - case "tendermint.abci.ResponseQuery.proof_ops": - x.ProofOps = value.Message().Interface().(*crypto.ProofOps) - case "tendermint.abci.ResponseQuery.height": - x.Height = value.Int() - case "tendermint.abci.ResponseQuery.codespace": - x.Codespace = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseQuery")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseQuery 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_ResponseQuery) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseQuery.proof_ops": - if x.ProofOps == nil { - x.ProofOps = new(crypto.ProofOps) - } - return protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - case "tendermint.abci.ResponseQuery.code": - panic(fmt.Errorf("field code of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.log": - panic(fmt.Errorf("field log of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.info": - panic(fmt.Errorf("field info of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.index": - panic(fmt.Errorf("field index of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.key": - panic(fmt.Errorf("field key of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.value": - panic(fmt.Errorf("field value of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.height": - panic(fmt.Errorf("field height of message tendermint.abci.ResponseQuery is not mutable")) - case "tendermint.abci.ResponseQuery.codespace": - panic(fmt.Errorf("field codespace of message tendermint.abci.ResponseQuery is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseQuery")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseQuery 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_ResponseQuery) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseQuery.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.ResponseQuery.log": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseQuery.info": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseQuery.index": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseQuery.key": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.ResponseQuery.value": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.ResponseQuery.proof_ops": - m := new(crypto.ProofOps) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ResponseQuery.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseQuery.codespace": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseQuery")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseQuery 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_ResponseQuery) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseQuery", 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_ResponseQuery) 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_ResponseQuery) 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_ResponseQuery) 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_ResponseQuery) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseQuery) - 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.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ProofOps != nil { - l = options.Size(x.ProofOps) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseQuery) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x52 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x48 - } - if x.ProofOps != nil { - encoded, err := options.Marshal(x.ProofOps) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x3a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x32 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x28 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseQuery) - 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: ResponseQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofOps", 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.ProofOps == nil { - x.ProofOps = &crypto.ProofOps{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofOps); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", 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.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseBeginBlock_1_list)(nil) - -type _ResponseBeginBlock_1_list struct { - list *[]*Event -} - -func (x *_ResponseBeginBlock_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseBeginBlock_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseBeginBlock_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseBeginBlock_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseBeginBlock_1_list) AppendMutable() protoreflect.Value { - v := new(Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseBeginBlock_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseBeginBlock_1_list) NewElement() protoreflect.Value { - v := new(Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseBeginBlock_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseBeginBlock protoreflect.MessageDescriptor - fd_ResponseBeginBlock_events protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseBeginBlock = File_tendermint_abci_types_proto.Messages().ByName("ResponseBeginBlock") - fd_ResponseBeginBlock_events = md_ResponseBeginBlock.Fields().ByName("events") -} - -var _ protoreflect.Message = (*fastReflection_ResponseBeginBlock)(nil) - -type fastReflection_ResponseBeginBlock ResponseBeginBlock - -func (x *ResponseBeginBlock) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseBeginBlock)(x) -} - -func (x *ResponseBeginBlock) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseBeginBlock_messageType fastReflection_ResponseBeginBlock_messageType -var _ protoreflect.MessageType = fastReflection_ResponseBeginBlock_messageType{} - -type fastReflection_ResponseBeginBlock_messageType struct{} - -func (x fastReflection_ResponseBeginBlock_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseBeginBlock)(nil) -} -func (x fastReflection_ResponseBeginBlock_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseBeginBlock) -} -func (x fastReflection_ResponseBeginBlock_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseBeginBlock -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseBeginBlock) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseBeginBlock -} - -// 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_ResponseBeginBlock) Type() protoreflect.MessageType { - return _fastReflection_ResponseBeginBlock_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseBeginBlock) New() protoreflect.Message { - return new(fastReflection_ResponseBeginBlock) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseBeginBlock) Interface() protoreflect.ProtoMessage { - return (*ResponseBeginBlock)(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_ResponseBeginBlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ResponseBeginBlock_1_list{list: &x.Events}) - if !f(fd_ResponseBeginBlock_events, 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_ResponseBeginBlock) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseBeginBlock.events": - return len(x.Events) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseBeginBlock 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_ResponseBeginBlock) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseBeginBlock.events": - x.Events = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseBeginBlock 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_ResponseBeginBlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseBeginBlock.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ResponseBeginBlock_1_list{}) - } - listValue := &_ResponseBeginBlock_1_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseBeginBlock 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_ResponseBeginBlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseBeginBlock.events": - lv := value.List() - clv := lv.(*_ResponseBeginBlock_1_list) - x.Events = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseBeginBlock 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_ResponseBeginBlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseBeginBlock.events": - if x.Events == nil { - x.Events = []*Event{} - } - value := &_ResponseBeginBlock_1_list{list: &x.Events} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseBeginBlock 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_ResponseBeginBlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseBeginBlock.events": - list := []*Event{} - return protoreflect.ValueOfList(&_ResponseBeginBlock_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseBeginBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseBeginBlock 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_ResponseBeginBlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseBeginBlock", 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_ResponseBeginBlock) 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_ResponseBeginBlock) 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_ResponseBeginBlock) 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_ResponseBeginBlock) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseBeginBlock) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseBeginBlock) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseBeginBlock) - 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: ResponseBeginBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseBeginBlock: 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 Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseCheckTx_7_list)(nil) - -type _ResponseCheckTx_7_list struct { - list *[]*Event -} - -func (x *_ResponseCheckTx_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseCheckTx_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseCheckTx_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseCheckTx_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseCheckTx_7_list) AppendMutable() protoreflect.Value { - v := new(Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseCheckTx_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseCheckTx_7_list) NewElement() protoreflect.Value { - v := new(Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseCheckTx_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseCheckTx protoreflect.MessageDescriptor - fd_ResponseCheckTx_code protoreflect.FieldDescriptor - fd_ResponseCheckTx_data protoreflect.FieldDescriptor - fd_ResponseCheckTx_log protoreflect.FieldDescriptor - fd_ResponseCheckTx_info protoreflect.FieldDescriptor - fd_ResponseCheckTx_gas_wanted protoreflect.FieldDescriptor - fd_ResponseCheckTx_gas_used protoreflect.FieldDescriptor - fd_ResponseCheckTx_events protoreflect.FieldDescriptor - fd_ResponseCheckTx_codespace protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseCheckTx = File_tendermint_abci_types_proto.Messages().ByName("ResponseCheckTx") - fd_ResponseCheckTx_code = md_ResponseCheckTx.Fields().ByName("code") - fd_ResponseCheckTx_data = md_ResponseCheckTx.Fields().ByName("data") - fd_ResponseCheckTx_log = md_ResponseCheckTx.Fields().ByName("log") - fd_ResponseCheckTx_info = md_ResponseCheckTx.Fields().ByName("info") - fd_ResponseCheckTx_gas_wanted = md_ResponseCheckTx.Fields().ByName("gas_wanted") - fd_ResponseCheckTx_gas_used = md_ResponseCheckTx.Fields().ByName("gas_used") - fd_ResponseCheckTx_events = md_ResponseCheckTx.Fields().ByName("events") - fd_ResponseCheckTx_codespace = md_ResponseCheckTx.Fields().ByName("codespace") -} - -var _ protoreflect.Message = (*fastReflection_ResponseCheckTx)(nil) - -type fastReflection_ResponseCheckTx ResponseCheckTx - -func (x *ResponseCheckTx) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseCheckTx)(x) -} - -func (x *ResponseCheckTx) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseCheckTx_messageType fastReflection_ResponseCheckTx_messageType -var _ protoreflect.MessageType = fastReflection_ResponseCheckTx_messageType{} - -type fastReflection_ResponseCheckTx_messageType struct{} - -func (x fastReflection_ResponseCheckTx_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseCheckTx)(nil) -} -func (x fastReflection_ResponseCheckTx_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseCheckTx) -} -func (x fastReflection_ResponseCheckTx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseCheckTx -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseCheckTx) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseCheckTx -} - -// 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_ResponseCheckTx) Type() protoreflect.MessageType { - return _fastReflection_ResponseCheckTx_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseCheckTx) New() protoreflect.Message { - return new(fastReflection_ResponseCheckTx) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseCheckTx) Interface() protoreflect.ProtoMessage { - return (*ResponseCheckTx)(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_ResponseCheckTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ResponseCheckTx_code, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ResponseCheckTx_data, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ResponseCheckTx_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ResponseCheckTx_info, value) { - return - } - } - if x.GasWanted != int64(0) { - value := protoreflect.ValueOfInt64(x.GasWanted) - if !f(fd_ResponseCheckTx_gas_wanted, value) { - return - } - } - if x.GasUsed != int64(0) { - value := protoreflect.ValueOfInt64(x.GasUsed) - if !f(fd_ResponseCheckTx_gas_used, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ResponseCheckTx_7_list{list: &x.Events}) - if !f(fd_ResponseCheckTx_events, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_ResponseCheckTx_codespace, 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_ResponseCheckTx) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseCheckTx.code": - return x.Code != uint32(0) - case "tendermint.abci.ResponseCheckTx.data": - return len(x.Data) != 0 - case "tendermint.abci.ResponseCheckTx.log": - return x.Log != "" - case "tendermint.abci.ResponseCheckTx.info": - return x.Info != "" - case "tendermint.abci.ResponseCheckTx.gas_wanted": - return x.GasWanted != int64(0) - case "tendermint.abci.ResponseCheckTx.gas_used": - return x.GasUsed != int64(0) - case "tendermint.abci.ResponseCheckTx.events": - return len(x.Events) != 0 - case "tendermint.abci.ResponseCheckTx.codespace": - return x.Codespace != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCheckTx 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_ResponseCheckTx) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseCheckTx.code": - x.Code = uint32(0) - case "tendermint.abci.ResponseCheckTx.data": - x.Data = nil - case "tendermint.abci.ResponseCheckTx.log": - x.Log = "" - case "tendermint.abci.ResponseCheckTx.info": - x.Info = "" - case "tendermint.abci.ResponseCheckTx.gas_wanted": - x.GasWanted = int64(0) - case "tendermint.abci.ResponseCheckTx.gas_used": - x.GasUsed = int64(0) - case "tendermint.abci.ResponseCheckTx.events": - x.Events = nil - case "tendermint.abci.ResponseCheckTx.codespace": - x.Codespace = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCheckTx 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_ResponseCheckTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseCheckTx.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.ResponseCheckTx.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.ResponseCheckTx.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseCheckTx.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseCheckTx.gas_wanted": - value := x.GasWanted - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseCheckTx.gas_used": - value := x.GasUsed - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseCheckTx.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ResponseCheckTx_7_list{}) - } - listValue := &_ResponseCheckTx_7_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - case "tendermint.abci.ResponseCheckTx.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCheckTx 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_ResponseCheckTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseCheckTx.code": - x.Code = uint32(value.Uint()) - case "tendermint.abci.ResponseCheckTx.data": - x.Data = value.Bytes() - case "tendermint.abci.ResponseCheckTx.log": - x.Log = value.Interface().(string) - case "tendermint.abci.ResponseCheckTx.info": - x.Info = value.Interface().(string) - case "tendermint.abci.ResponseCheckTx.gas_wanted": - x.GasWanted = value.Int() - case "tendermint.abci.ResponseCheckTx.gas_used": - x.GasUsed = value.Int() - case "tendermint.abci.ResponseCheckTx.events": - lv := value.List() - clv := lv.(*_ResponseCheckTx_7_list) - x.Events = *clv.list - case "tendermint.abci.ResponseCheckTx.codespace": - x.Codespace = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCheckTx 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_ResponseCheckTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseCheckTx.events": - if x.Events == nil { - x.Events = []*Event{} - } - value := &_ResponseCheckTx_7_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "tendermint.abci.ResponseCheckTx.code": - panic(fmt.Errorf("field code of message tendermint.abci.ResponseCheckTx is not mutable")) - case "tendermint.abci.ResponseCheckTx.data": - panic(fmt.Errorf("field data of message tendermint.abci.ResponseCheckTx is not mutable")) - case "tendermint.abci.ResponseCheckTx.log": - panic(fmt.Errorf("field log of message tendermint.abci.ResponseCheckTx is not mutable")) - case "tendermint.abci.ResponseCheckTx.info": - panic(fmt.Errorf("field info of message tendermint.abci.ResponseCheckTx is not mutable")) - case "tendermint.abci.ResponseCheckTx.gas_wanted": - panic(fmt.Errorf("field gas_wanted of message tendermint.abci.ResponseCheckTx is not mutable")) - case "tendermint.abci.ResponseCheckTx.gas_used": - panic(fmt.Errorf("field gas_used of message tendermint.abci.ResponseCheckTx is not mutable")) - case "tendermint.abci.ResponseCheckTx.codespace": - panic(fmt.Errorf("field codespace of message tendermint.abci.ResponseCheckTx is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCheckTx 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_ResponseCheckTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseCheckTx.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.ResponseCheckTx.data": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.ResponseCheckTx.log": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseCheckTx.info": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseCheckTx.gas_wanted": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseCheckTx.gas_used": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseCheckTx.events": - list := []*Event{} - return protoreflect.ValueOfList(&_ResponseCheckTx_7_list{list: &list}) - case "tendermint.abci.ResponseCheckTx.codespace": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCheckTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCheckTx 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_ResponseCheckTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseCheckTx", 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_ResponseCheckTx) 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_ResponseCheckTx) 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_ResponseCheckTx) 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_ResponseCheckTx) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseCheckTx) - 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.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GasWanted != 0 { - n += 1 + runtime.Sov(uint64(x.GasWanted)) - } - if x.GasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.GasUsed)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseCheckTx) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.GasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if x.GasWanted != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x12 - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseCheckTx) - 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: ResponseCheckTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - x.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - x.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", 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.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseDeliverTx_7_list)(nil) - -type _ResponseDeliverTx_7_list struct { - list *[]*Event -} - -func (x *_ResponseDeliverTx_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseDeliverTx_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseDeliverTx_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseDeliverTx_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseDeliverTx_7_list) AppendMutable() protoreflect.Value { - v := new(Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseDeliverTx_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseDeliverTx_7_list) NewElement() protoreflect.Value { - v := new(Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseDeliverTx_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseDeliverTx protoreflect.MessageDescriptor - fd_ResponseDeliverTx_code protoreflect.FieldDescriptor - fd_ResponseDeliverTx_data protoreflect.FieldDescriptor - fd_ResponseDeliverTx_log protoreflect.FieldDescriptor - fd_ResponseDeliverTx_info protoreflect.FieldDescriptor - fd_ResponseDeliverTx_gas_wanted protoreflect.FieldDescriptor - fd_ResponseDeliverTx_gas_used protoreflect.FieldDescriptor - fd_ResponseDeliverTx_events protoreflect.FieldDescriptor - fd_ResponseDeliverTx_codespace protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseDeliverTx = File_tendermint_abci_types_proto.Messages().ByName("ResponseDeliverTx") - fd_ResponseDeliverTx_code = md_ResponseDeliverTx.Fields().ByName("code") - fd_ResponseDeliverTx_data = md_ResponseDeliverTx.Fields().ByName("data") - fd_ResponseDeliverTx_log = md_ResponseDeliverTx.Fields().ByName("log") - fd_ResponseDeliverTx_info = md_ResponseDeliverTx.Fields().ByName("info") - fd_ResponseDeliverTx_gas_wanted = md_ResponseDeliverTx.Fields().ByName("gas_wanted") - fd_ResponseDeliverTx_gas_used = md_ResponseDeliverTx.Fields().ByName("gas_used") - fd_ResponseDeliverTx_events = md_ResponseDeliverTx.Fields().ByName("events") - fd_ResponseDeliverTx_codespace = md_ResponseDeliverTx.Fields().ByName("codespace") -} - -var _ protoreflect.Message = (*fastReflection_ResponseDeliverTx)(nil) - -type fastReflection_ResponseDeliverTx ResponseDeliverTx - -func (x *ResponseDeliverTx) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseDeliverTx)(x) -} - -func (x *ResponseDeliverTx) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseDeliverTx_messageType fastReflection_ResponseDeliverTx_messageType -var _ protoreflect.MessageType = fastReflection_ResponseDeliverTx_messageType{} - -type fastReflection_ResponseDeliverTx_messageType struct{} - -func (x fastReflection_ResponseDeliverTx_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseDeliverTx)(nil) -} -func (x fastReflection_ResponseDeliverTx_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseDeliverTx) -} -func (x fastReflection_ResponseDeliverTx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseDeliverTx -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseDeliverTx) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseDeliverTx -} - -// 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_ResponseDeliverTx) Type() protoreflect.MessageType { - return _fastReflection_ResponseDeliverTx_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseDeliverTx) New() protoreflect.Message { - return new(fastReflection_ResponseDeliverTx) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseDeliverTx) Interface() protoreflect.ProtoMessage { - return (*ResponseDeliverTx)(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_ResponseDeliverTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ResponseDeliverTx_code, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ResponseDeliverTx_data, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ResponseDeliverTx_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ResponseDeliverTx_info, value) { - return - } - } - if x.GasWanted != int64(0) { - value := protoreflect.ValueOfInt64(x.GasWanted) - if !f(fd_ResponseDeliverTx_gas_wanted, value) { - return - } - } - if x.GasUsed != int64(0) { - value := protoreflect.ValueOfInt64(x.GasUsed) - if !f(fd_ResponseDeliverTx_gas_used, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ResponseDeliverTx_7_list{list: &x.Events}) - if !f(fd_ResponseDeliverTx_events, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_ResponseDeliverTx_codespace, 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_ResponseDeliverTx) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseDeliverTx.code": - return x.Code != uint32(0) - case "tendermint.abci.ResponseDeliverTx.data": - return len(x.Data) != 0 - case "tendermint.abci.ResponseDeliverTx.log": - return x.Log != "" - case "tendermint.abci.ResponseDeliverTx.info": - return x.Info != "" - case "tendermint.abci.ResponseDeliverTx.gas_wanted": - return x.GasWanted != int64(0) - case "tendermint.abci.ResponseDeliverTx.gas_used": - return x.GasUsed != int64(0) - case "tendermint.abci.ResponseDeliverTx.events": - return len(x.Events) != 0 - case "tendermint.abci.ResponseDeliverTx.codespace": - return x.Codespace != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseDeliverTx 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_ResponseDeliverTx) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseDeliverTx.code": - x.Code = uint32(0) - case "tendermint.abci.ResponseDeliverTx.data": - x.Data = nil - case "tendermint.abci.ResponseDeliverTx.log": - x.Log = "" - case "tendermint.abci.ResponseDeliverTx.info": - x.Info = "" - case "tendermint.abci.ResponseDeliverTx.gas_wanted": - x.GasWanted = int64(0) - case "tendermint.abci.ResponseDeliverTx.gas_used": - x.GasUsed = int64(0) - case "tendermint.abci.ResponseDeliverTx.events": - x.Events = nil - case "tendermint.abci.ResponseDeliverTx.codespace": - x.Codespace = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseDeliverTx 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_ResponseDeliverTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseDeliverTx.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.ResponseDeliverTx.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.ResponseDeliverTx.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseDeliverTx.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "tendermint.abci.ResponseDeliverTx.gas_wanted": - value := x.GasWanted - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseDeliverTx.gas_used": - value := x.GasUsed - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.ResponseDeliverTx.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ResponseDeliverTx_7_list{}) - } - listValue := &_ResponseDeliverTx_7_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - case "tendermint.abci.ResponseDeliverTx.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseDeliverTx 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_ResponseDeliverTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseDeliverTx.code": - x.Code = uint32(value.Uint()) - case "tendermint.abci.ResponseDeliverTx.data": - x.Data = value.Bytes() - case "tendermint.abci.ResponseDeliverTx.log": - x.Log = value.Interface().(string) - case "tendermint.abci.ResponseDeliverTx.info": - x.Info = value.Interface().(string) - case "tendermint.abci.ResponseDeliverTx.gas_wanted": - x.GasWanted = value.Int() - case "tendermint.abci.ResponseDeliverTx.gas_used": - x.GasUsed = value.Int() - case "tendermint.abci.ResponseDeliverTx.events": - lv := value.List() - clv := lv.(*_ResponseDeliverTx_7_list) - x.Events = *clv.list - case "tendermint.abci.ResponseDeliverTx.codespace": - x.Codespace = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseDeliverTx 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_ResponseDeliverTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseDeliverTx.events": - if x.Events == nil { - x.Events = []*Event{} - } - value := &_ResponseDeliverTx_7_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "tendermint.abci.ResponseDeliverTx.code": - panic(fmt.Errorf("field code of message tendermint.abci.ResponseDeliverTx is not mutable")) - case "tendermint.abci.ResponseDeliverTx.data": - panic(fmt.Errorf("field data of message tendermint.abci.ResponseDeliverTx is not mutable")) - case "tendermint.abci.ResponseDeliverTx.log": - panic(fmt.Errorf("field log of message tendermint.abci.ResponseDeliverTx is not mutable")) - case "tendermint.abci.ResponseDeliverTx.info": - panic(fmt.Errorf("field info of message tendermint.abci.ResponseDeliverTx is not mutable")) - case "tendermint.abci.ResponseDeliverTx.gas_wanted": - panic(fmt.Errorf("field gas_wanted of message tendermint.abci.ResponseDeliverTx is not mutable")) - case "tendermint.abci.ResponseDeliverTx.gas_used": - panic(fmt.Errorf("field gas_used of message tendermint.abci.ResponseDeliverTx is not mutable")) - case "tendermint.abci.ResponseDeliverTx.codespace": - panic(fmt.Errorf("field codespace of message tendermint.abci.ResponseDeliverTx is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseDeliverTx 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_ResponseDeliverTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseDeliverTx.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.ResponseDeliverTx.data": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.ResponseDeliverTx.log": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseDeliverTx.info": - return protoreflect.ValueOfString("") - case "tendermint.abci.ResponseDeliverTx.gas_wanted": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseDeliverTx.gas_used": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.ResponseDeliverTx.events": - list := []*Event{} - return protoreflect.ValueOfList(&_ResponseDeliverTx_7_list{list: &list}) - case "tendermint.abci.ResponseDeliverTx.codespace": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseDeliverTx")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseDeliverTx 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_ResponseDeliverTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseDeliverTx", 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_ResponseDeliverTx) 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_ResponseDeliverTx) 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_ResponseDeliverTx) 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_ResponseDeliverTx) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseDeliverTx) - 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.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GasWanted != 0 { - n += 1 + runtime.Sov(uint64(x.GasWanted)) - } - if x.GasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.GasUsed)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseDeliverTx) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.GasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if x.GasWanted != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x12 - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseDeliverTx) - 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: ResponseDeliverTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - x.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - x.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", 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.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseEndBlock_1_list)(nil) - -type _ResponseEndBlock_1_list struct { - list *[]*ValidatorUpdate -} - -func (x *_ResponseEndBlock_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseEndBlock_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseEndBlock_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorUpdate) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseEndBlock_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorUpdate) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseEndBlock_1_list) AppendMutable() protoreflect.Value { - v := new(ValidatorUpdate) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseEndBlock_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseEndBlock_1_list) NewElement() protoreflect.Value { - v := new(ValidatorUpdate) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseEndBlock_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ResponseEndBlock_3_list)(nil) - -type _ResponseEndBlock_3_list struct { - list *[]*Event -} - -func (x *_ResponseEndBlock_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseEndBlock_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseEndBlock_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseEndBlock_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseEndBlock_3_list) AppendMutable() protoreflect.Value { - v := new(Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseEndBlock_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseEndBlock_3_list) NewElement() protoreflect.Value { - v := new(Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseEndBlock_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseEndBlock protoreflect.MessageDescriptor - fd_ResponseEndBlock_validator_updates protoreflect.FieldDescriptor - fd_ResponseEndBlock_consensus_param_updates protoreflect.FieldDescriptor - fd_ResponseEndBlock_events protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseEndBlock = File_tendermint_abci_types_proto.Messages().ByName("ResponseEndBlock") - fd_ResponseEndBlock_validator_updates = md_ResponseEndBlock.Fields().ByName("validator_updates") - fd_ResponseEndBlock_consensus_param_updates = md_ResponseEndBlock.Fields().ByName("consensus_param_updates") - fd_ResponseEndBlock_events = md_ResponseEndBlock.Fields().ByName("events") -} - -var _ protoreflect.Message = (*fastReflection_ResponseEndBlock)(nil) - -type fastReflection_ResponseEndBlock ResponseEndBlock - -func (x *ResponseEndBlock) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseEndBlock)(x) -} - -func (x *ResponseEndBlock) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseEndBlock_messageType fastReflection_ResponseEndBlock_messageType -var _ protoreflect.MessageType = fastReflection_ResponseEndBlock_messageType{} - -type fastReflection_ResponseEndBlock_messageType struct{} - -func (x fastReflection_ResponseEndBlock_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseEndBlock)(nil) -} -func (x fastReflection_ResponseEndBlock_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseEndBlock) -} -func (x fastReflection_ResponseEndBlock_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseEndBlock -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseEndBlock) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseEndBlock -} - -// 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_ResponseEndBlock) Type() protoreflect.MessageType { - return _fastReflection_ResponseEndBlock_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseEndBlock) New() protoreflect.Message { - return new(fastReflection_ResponseEndBlock) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseEndBlock) Interface() protoreflect.ProtoMessage { - return (*ResponseEndBlock)(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_ResponseEndBlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ValidatorUpdates) != 0 { - value := protoreflect.ValueOfList(&_ResponseEndBlock_1_list{list: &x.ValidatorUpdates}) - if !f(fd_ResponseEndBlock_validator_updates, value) { - return - } - } - if x.ConsensusParamUpdates != nil { - value := protoreflect.ValueOfMessage(x.ConsensusParamUpdates.ProtoReflect()) - if !f(fd_ResponseEndBlock_consensus_param_updates, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ResponseEndBlock_3_list{list: &x.Events}) - if !f(fd_ResponseEndBlock_events, 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_ResponseEndBlock) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseEndBlock.validator_updates": - return len(x.ValidatorUpdates) != 0 - case "tendermint.abci.ResponseEndBlock.consensus_param_updates": - return x.ConsensusParamUpdates != nil - case "tendermint.abci.ResponseEndBlock.events": - return len(x.Events) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEndBlock 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_ResponseEndBlock) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseEndBlock.validator_updates": - x.ValidatorUpdates = nil - case "tendermint.abci.ResponseEndBlock.consensus_param_updates": - x.ConsensusParamUpdates = nil - case "tendermint.abci.ResponseEndBlock.events": - x.Events = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEndBlock 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_ResponseEndBlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseEndBlock.validator_updates": - if len(x.ValidatorUpdates) == 0 { - return protoreflect.ValueOfList(&_ResponseEndBlock_1_list{}) - } - listValue := &_ResponseEndBlock_1_list{list: &x.ValidatorUpdates} - return protoreflect.ValueOfList(listValue) - case "tendermint.abci.ResponseEndBlock.consensus_param_updates": - value := x.ConsensusParamUpdates - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ResponseEndBlock.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ResponseEndBlock_3_list{}) - } - listValue := &_ResponseEndBlock_3_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEndBlock 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_ResponseEndBlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseEndBlock.validator_updates": - lv := value.List() - clv := lv.(*_ResponseEndBlock_1_list) - x.ValidatorUpdates = *clv.list - case "tendermint.abci.ResponseEndBlock.consensus_param_updates": - x.ConsensusParamUpdates = value.Message().Interface().(*ConsensusParams) - case "tendermint.abci.ResponseEndBlock.events": - lv := value.List() - clv := lv.(*_ResponseEndBlock_3_list) - x.Events = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEndBlock 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_ResponseEndBlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseEndBlock.validator_updates": - if x.ValidatorUpdates == nil { - x.ValidatorUpdates = []*ValidatorUpdate{} - } - value := &_ResponseEndBlock_1_list{list: &x.ValidatorUpdates} - return protoreflect.ValueOfList(value) - case "tendermint.abci.ResponseEndBlock.consensus_param_updates": - if x.ConsensusParamUpdates == nil { - x.ConsensusParamUpdates = new(ConsensusParams) - } - return protoreflect.ValueOfMessage(x.ConsensusParamUpdates.ProtoReflect()) - case "tendermint.abci.ResponseEndBlock.events": - if x.Events == nil { - x.Events = []*Event{} - } - value := &_ResponseEndBlock_3_list{list: &x.Events} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEndBlock 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_ResponseEndBlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseEndBlock.validator_updates": - list := []*ValidatorUpdate{} - return protoreflect.ValueOfList(&_ResponseEndBlock_1_list{list: &list}) - case "tendermint.abci.ResponseEndBlock.consensus_param_updates": - m := new(ConsensusParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ResponseEndBlock.events": - list := []*Event{} - return protoreflect.ValueOfList(&_ResponseEndBlock_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseEndBlock")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseEndBlock 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_ResponseEndBlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseEndBlock", 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_ResponseEndBlock) 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_ResponseEndBlock) 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_ResponseEndBlock) 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_ResponseEndBlock) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseEndBlock) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.ValidatorUpdates) > 0 { - for _, e := range x.ValidatorUpdates { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ConsensusParamUpdates != nil { - l = options.Size(x.ConsensusParamUpdates) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseEndBlock) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.ConsensusParamUpdates != nil { - encoded, err := options.Marshal(x.ConsensusParamUpdates) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.ValidatorUpdates) > 0 { - for iNdEx := len(x.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorUpdates[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseEndBlock) - 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: ResponseEndBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseEndBlock: 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 ValidatorUpdates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorUpdates = append(x.ValidatorUpdates, &ValidatorUpdate{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorUpdates[len(x.ValidatorUpdates)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", 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.ConsensusParamUpdates == nil { - x.ConsensusParamUpdates = &ConsensusParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusParamUpdates); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseCommit protoreflect.MessageDescriptor - fd_ResponseCommit_data protoreflect.FieldDescriptor - fd_ResponseCommit_retain_height protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseCommit = File_tendermint_abci_types_proto.Messages().ByName("ResponseCommit") - fd_ResponseCommit_data = md_ResponseCommit.Fields().ByName("data") - fd_ResponseCommit_retain_height = md_ResponseCommit.Fields().ByName("retain_height") -} - -var _ protoreflect.Message = (*fastReflection_ResponseCommit)(nil) - -type fastReflection_ResponseCommit ResponseCommit - -func (x *ResponseCommit) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseCommit)(x) -} - -func (x *ResponseCommit) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseCommit_messageType fastReflection_ResponseCommit_messageType -var _ protoreflect.MessageType = fastReflection_ResponseCommit_messageType{} - -type fastReflection_ResponseCommit_messageType struct{} - -func (x fastReflection_ResponseCommit_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseCommit)(nil) -} -func (x fastReflection_ResponseCommit_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseCommit) -} -func (x fastReflection_ResponseCommit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseCommit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseCommit) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseCommit -} - -// 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_ResponseCommit) Type() protoreflect.MessageType { - return _fastReflection_ResponseCommit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseCommit) New() protoreflect.Message { - return new(fastReflection_ResponseCommit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseCommit) Interface() protoreflect.ProtoMessage { - return (*ResponseCommit)(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_ResponseCommit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ResponseCommit_data, value) { - return - } - } - if x.RetainHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.RetainHeight) - if !f(fd_ResponseCommit_retain_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ResponseCommit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseCommit.data": - return len(x.Data) != 0 - case "tendermint.abci.ResponseCommit.retain_height": - return x.RetainHeight != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCommit")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCommit 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_ResponseCommit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseCommit.data": - x.Data = nil - case "tendermint.abci.ResponseCommit.retain_height": - x.RetainHeight = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCommit")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCommit 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_ResponseCommit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseCommit.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.ResponseCommit.retain_height": - value := x.RetainHeight - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCommit")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCommit 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_ResponseCommit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseCommit.data": - x.Data = value.Bytes() - case "tendermint.abci.ResponseCommit.retain_height": - x.RetainHeight = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCommit")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCommit 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_ResponseCommit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseCommit.data": - panic(fmt.Errorf("field data of message tendermint.abci.ResponseCommit is not mutable")) - case "tendermint.abci.ResponseCommit.retain_height": - panic(fmt.Errorf("field retain_height of message tendermint.abci.ResponseCommit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCommit")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCommit 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_ResponseCommit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseCommit.data": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.ResponseCommit.retain_height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseCommit")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseCommit 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_ResponseCommit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseCommit", 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_ResponseCommit) 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_ResponseCommit) 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_ResponseCommit) 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_ResponseCommit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseCommit) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.RetainHeight != 0 { - n += 1 + runtime.Sov(uint64(x.RetainHeight)) - } - 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().(*ResponseCommit) - 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.RetainHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RetainHeight)) - i-- - dAtA[i] = 0x18 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x12 - } - 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().(*ResponseCommit) - 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: ResponseCommit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType) - } - x.RetainHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RetainHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseListSnapshots_1_list)(nil) - -type _ResponseListSnapshots_1_list struct { - list *[]*Snapshot -} - -func (x *_ResponseListSnapshots_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseListSnapshots_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ResponseListSnapshots_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Snapshot) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseListSnapshots_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Snapshot) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseListSnapshots_1_list) AppendMutable() protoreflect.Value { - v := new(Snapshot) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseListSnapshots_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ResponseListSnapshots_1_list) NewElement() protoreflect.Value { - v := new(Snapshot) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ResponseListSnapshots_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseListSnapshots protoreflect.MessageDescriptor - fd_ResponseListSnapshots_snapshots protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseListSnapshots = File_tendermint_abci_types_proto.Messages().ByName("ResponseListSnapshots") - fd_ResponseListSnapshots_snapshots = md_ResponseListSnapshots.Fields().ByName("snapshots") -} - -var _ protoreflect.Message = (*fastReflection_ResponseListSnapshots)(nil) - -type fastReflection_ResponseListSnapshots ResponseListSnapshots - -func (x *ResponseListSnapshots) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseListSnapshots)(x) -} - -func (x *ResponseListSnapshots) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseListSnapshots_messageType fastReflection_ResponseListSnapshots_messageType -var _ protoreflect.MessageType = fastReflection_ResponseListSnapshots_messageType{} - -type fastReflection_ResponseListSnapshots_messageType struct{} - -func (x fastReflection_ResponseListSnapshots_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseListSnapshots)(nil) -} -func (x fastReflection_ResponseListSnapshots_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseListSnapshots) -} -func (x fastReflection_ResponseListSnapshots_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseListSnapshots -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseListSnapshots) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseListSnapshots -} - -// 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_ResponseListSnapshots) Type() protoreflect.MessageType { - return _fastReflection_ResponseListSnapshots_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseListSnapshots) New() protoreflect.Message { - return new(fastReflection_ResponseListSnapshots) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseListSnapshots) Interface() protoreflect.ProtoMessage { - return (*ResponseListSnapshots)(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_ResponseListSnapshots) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Snapshots) != 0 { - value := protoreflect.ValueOfList(&_ResponseListSnapshots_1_list{list: &x.Snapshots}) - if !f(fd_ResponseListSnapshots_snapshots, 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_ResponseListSnapshots) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseListSnapshots.snapshots": - return len(x.Snapshots) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseListSnapshots 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_ResponseListSnapshots) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseListSnapshots.snapshots": - x.Snapshots = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseListSnapshots 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_ResponseListSnapshots) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseListSnapshots.snapshots": - if len(x.Snapshots) == 0 { - return protoreflect.ValueOfList(&_ResponseListSnapshots_1_list{}) - } - listValue := &_ResponseListSnapshots_1_list{list: &x.Snapshots} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseListSnapshots 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_ResponseListSnapshots) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseListSnapshots.snapshots": - lv := value.List() - clv := lv.(*_ResponseListSnapshots_1_list) - x.Snapshots = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseListSnapshots 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_ResponseListSnapshots) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseListSnapshots.snapshots": - if x.Snapshots == nil { - x.Snapshots = []*Snapshot{} - } - value := &_ResponseListSnapshots_1_list{list: &x.Snapshots} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseListSnapshots 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_ResponseListSnapshots) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseListSnapshots.snapshots": - list := []*Snapshot{} - return protoreflect.ValueOfList(&_ResponseListSnapshots_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseListSnapshots")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseListSnapshots 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_ResponseListSnapshots) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseListSnapshots", 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_ResponseListSnapshots) 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_ResponseListSnapshots) 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_ResponseListSnapshots) 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_ResponseListSnapshots) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseListSnapshots) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Snapshots) > 0 { - for _, e := range x.Snapshots { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseListSnapshots) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Snapshots) > 0 { - for iNdEx := len(x.Snapshots) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Snapshots[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseListSnapshots) - 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: ResponseListSnapshots: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseListSnapshots: 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 Snapshots", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Snapshots = append(x.Snapshots, &Snapshot{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Snapshots[len(x.Snapshots)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseOfferSnapshot protoreflect.MessageDescriptor - fd_ResponseOfferSnapshot_result protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseOfferSnapshot = File_tendermint_abci_types_proto.Messages().ByName("ResponseOfferSnapshot") - fd_ResponseOfferSnapshot_result = md_ResponseOfferSnapshot.Fields().ByName("result") -} - -var _ protoreflect.Message = (*fastReflection_ResponseOfferSnapshot)(nil) - -type fastReflection_ResponseOfferSnapshot ResponseOfferSnapshot - -func (x *ResponseOfferSnapshot) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseOfferSnapshot)(x) -} - -func (x *ResponseOfferSnapshot) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseOfferSnapshot_messageType fastReflection_ResponseOfferSnapshot_messageType -var _ protoreflect.MessageType = fastReflection_ResponseOfferSnapshot_messageType{} - -type fastReflection_ResponseOfferSnapshot_messageType struct{} - -func (x fastReflection_ResponseOfferSnapshot_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseOfferSnapshot)(nil) -} -func (x fastReflection_ResponseOfferSnapshot_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseOfferSnapshot) -} -func (x fastReflection_ResponseOfferSnapshot_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseOfferSnapshot -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseOfferSnapshot) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseOfferSnapshot -} - -// 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_ResponseOfferSnapshot) Type() protoreflect.MessageType { - return _fastReflection_ResponseOfferSnapshot_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseOfferSnapshot) New() protoreflect.Message { - return new(fastReflection_ResponseOfferSnapshot) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseOfferSnapshot) Interface() protoreflect.ProtoMessage { - return (*ResponseOfferSnapshot)(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_ResponseOfferSnapshot) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Result != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Result)) - if !f(fd_ResponseOfferSnapshot_result, 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_ResponseOfferSnapshot) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseOfferSnapshot.result": - return x.Result != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseOfferSnapshot 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_ResponseOfferSnapshot) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseOfferSnapshot.result": - x.Result = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseOfferSnapshot 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_ResponseOfferSnapshot) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseOfferSnapshot.result": - value := x.Result - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseOfferSnapshot 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_ResponseOfferSnapshot) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseOfferSnapshot.result": - x.Result = (ResponseOfferSnapshot_Result)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseOfferSnapshot 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_ResponseOfferSnapshot) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseOfferSnapshot.result": - panic(fmt.Errorf("field result of message tendermint.abci.ResponseOfferSnapshot is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseOfferSnapshot 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_ResponseOfferSnapshot) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseOfferSnapshot.result": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseOfferSnapshot")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseOfferSnapshot 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_ResponseOfferSnapshot) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseOfferSnapshot", 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_ResponseOfferSnapshot) 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_ResponseOfferSnapshot) 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_ResponseOfferSnapshot) 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_ResponseOfferSnapshot) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseOfferSnapshot) - 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.Result != 0 { - n += 1 + runtime.Sov(uint64(x.Result)) - } - 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().(*ResponseOfferSnapshot) - 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.Result != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseOfferSnapshot) - 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: ResponseOfferSnapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - x.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ResponseLoadSnapshotChunk protoreflect.MessageDescriptor - fd_ResponseLoadSnapshotChunk_chunk protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseLoadSnapshotChunk = File_tendermint_abci_types_proto.Messages().ByName("ResponseLoadSnapshotChunk") - fd_ResponseLoadSnapshotChunk_chunk = md_ResponseLoadSnapshotChunk.Fields().ByName("chunk") -} - -var _ protoreflect.Message = (*fastReflection_ResponseLoadSnapshotChunk)(nil) - -type fastReflection_ResponseLoadSnapshotChunk ResponseLoadSnapshotChunk - -func (x *ResponseLoadSnapshotChunk) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseLoadSnapshotChunk)(x) -} - -func (x *ResponseLoadSnapshotChunk) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ResponseLoadSnapshotChunk_messageType fastReflection_ResponseLoadSnapshotChunk_messageType -var _ protoreflect.MessageType = fastReflection_ResponseLoadSnapshotChunk_messageType{} - -type fastReflection_ResponseLoadSnapshotChunk_messageType struct{} - -func (x fastReflection_ResponseLoadSnapshotChunk_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseLoadSnapshotChunk)(nil) -} -func (x fastReflection_ResponseLoadSnapshotChunk_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseLoadSnapshotChunk) -} -func (x fastReflection_ResponseLoadSnapshotChunk_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseLoadSnapshotChunk -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseLoadSnapshotChunk) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseLoadSnapshotChunk -} - -// 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_ResponseLoadSnapshotChunk) Type() protoreflect.MessageType { - return _fastReflection_ResponseLoadSnapshotChunk_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseLoadSnapshotChunk) New() protoreflect.Message { - return new(fastReflection_ResponseLoadSnapshotChunk) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseLoadSnapshotChunk) Interface() protoreflect.ProtoMessage { - return (*ResponseLoadSnapshotChunk)(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_ResponseLoadSnapshotChunk) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Chunk) != 0 { - value := protoreflect.ValueOfBytes(x.Chunk) - if !f(fd_ResponseLoadSnapshotChunk_chunk, 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_ResponseLoadSnapshotChunk) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseLoadSnapshotChunk.chunk": - return len(x.Chunk) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseLoadSnapshotChunk 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_ResponseLoadSnapshotChunk) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseLoadSnapshotChunk.chunk": - x.Chunk = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseLoadSnapshotChunk 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_ResponseLoadSnapshotChunk) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseLoadSnapshotChunk.chunk": - value := x.Chunk - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseLoadSnapshotChunk 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_ResponseLoadSnapshotChunk) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseLoadSnapshotChunk.chunk": - x.Chunk = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseLoadSnapshotChunk 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_ResponseLoadSnapshotChunk) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseLoadSnapshotChunk.chunk": - panic(fmt.Errorf("field chunk of message tendermint.abci.ResponseLoadSnapshotChunk is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseLoadSnapshotChunk 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_ResponseLoadSnapshotChunk) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseLoadSnapshotChunk.chunk": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseLoadSnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseLoadSnapshotChunk 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_ResponseLoadSnapshotChunk) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseLoadSnapshotChunk", 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_ResponseLoadSnapshotChunk) 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_ResponseLoadSnapshotChunk) 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_ResponseLoadSnapshotChunk) 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_ResponseLoadSnapshotChunk) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseLoadSnapshotChunk) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Chunk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseLoadSnapshotChunk) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Chunk) > 0 { - i -= len(x.Chunk) - copy(dAtA[i:], x.Chunk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chunk))) - 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().(*ResponseLoadSnapshotChunk) - 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: ResponseLoadSnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseLoadSnapshotChunk: 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 Chunk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Chunk = append(x.Chunk[:0], dAtA[iNdEx:postIndex]...) - if x.Chunk == nil { - x.Chunk = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ResponseApplySnapshotChunk_2_list)(nil) - -type _ResponseApplySnapshotChunk_2_list struct { - list *[]uint32 -} - -func (x *_ResponseApplySnapshotChunk_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseApplySnapshotChunk_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) -} - -func (x *_ResponseApplySnapshotChunk_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_ResponseApplySnapshotChunk_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseApplySnapshotChunk_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ResponseApplySnapshotChunk at list field RefetchChunks as it is not of Message kind")) -} - -func (x *_ResponseApplySnapshotChunk_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ResponseApplySnapshotChunk_2_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) -} - -func (x *_ResponseApplySnapshotChunk_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ResponseApplySnapshotChunk_3_list)(nil) - -type _ResponseApplySnapshotChunk_3_list struct { - list *[]string -} - -func (x *_ResponseApplySnapshotChunk_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ResponseApplySnapshotChunk_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ResponseApplySnapshotChunk_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ResponseApplySnapshotChunk_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ResponseApplySnapshotChunk_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ResponseApplySnapshotChunk at list field RejectSenders as it is not of Message kind")) -} - -func (x *_ResponseApplySnapshotChunk_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ResponseApplySnapshotChunk_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ResponseApplySnapshotChunk_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ResponseApplySnapshotChunk protoreflect.MessageDescriptor - fd_ResponseApplySnapshotChunk_result protoreflect.FieldDescriptor - fd_ResponseApplySnapshotChunk_refetch_chunks protoreflect.FieldDescriptor - fd_ResponseApplySnapshotChunk_reject_senders protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ResponseApplySnapshotChunk = File_tendermint_abci_types_proto.Messages().ByName("ResponseApplySnapshotChunk") - fd_ResponseApplySnapshotChunk_result = md_ResponseApplySnapshotChunk.Fields().ByName("result") - fd_ResponseApplySnapshotChunk_refetch_chunks = md_ResponseApplySnapshotChunk.Fields().ByName("refetch_chunks") - fd_ResponseApplySnapshotChunk_reject_senders = md_ResponseApplySnapshotChunk.Fields().ByName("reject_senders") -} - -var _ protoreflect.Message = (*fastReflection_ResponseApplySnapshotChunk)(nil) - -type fastReflection_ResponseApplySnapshotChunk ResponseApplySnapshotChunk - -func (x *ResponseApplySnapshotChunk) ProtoReflect() protoreflect.Message { - return (*fastReflection_ResponseApplySnapshotChunk)(x) -} - -func (x *ResponseApplySnapshotChunk) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[32] - 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_ResponseApplySnapshotChunk_messageType fastReflection_ResponseApplySnapshotChunk_messageType -var _ protoreflect.MessageType = fastReflection_ResponseApplySnapshotChunk_messageType{} - -type fastReflection_ResponseApplySnapshotChunk_messageType struct{} - -func (x fastReflection_ResponseApplySnapshotChunk_messageType) Zero() protoreflect.Message { - return (*fastReflection_ResponseApplySnapshotChunk)(nil) -} -func (x fastReflection_ResponseApplySnapshotChunk_messageType) New() protoreflect.Message { - return new(fastReflection_ResponseApplySnapshotChunk) -} -func (x fastReflection_ResponseApplySnapshotChunk_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseApplySnapshotChunk -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ResponseApplySnapshotChunk) Descriptor() protoreflect.MessageDescriptor { - return md_ResponseApplySnapshotChunk -} - -// 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_ResponseApplySnapshotChunk) Type() protoreflect.MessageType { - return _fastReflection_ResponseApplySnapshotChunk_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ResponseApplySnapshotChunk) New() protoreflect.Message { - return new(fastReflection_ResponseApplySnapshotChunk) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ResponseApplySnapshotChunk) Interface() protoreflect.ProtoMessage { - return (*ResponseApplySnapshotChunk)(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_ResponseApplySnapshotChunk) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Result != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Result)) - if !f(fd_ResponseApplySnapshotChunk_result, value) { - return - } - } - if len(x.RefetchChunks) != 0 { - value := protoreflect.ValueOfList(&_ResponseApplySnapshotChunk_2_list{list: &x.RefetchChunks}) - if !f(fd_ResponseApplySnapshotChunk_refetch_chunks, value) { - return - } - } - if len(x.RejectSenders) != 0 { - value := protoreflect.ValueOfList(&_ResponseApplySnapshotChunk_3_list{list: &x.RejectSenders}) - if !f(fd_ResponseApplySnapshotChunk_reject_senders, 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_ResponseApplySnapshotChunk) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ResponseApplySnapshotChunk.result": - return x.Result != 0 - case "tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks": - return len(x.RefetchChunks) != 0 - case "tendermint.abci.ResponseApplySnapshotChunk.reject_senders": - return len(x.RejectSenders) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseApplySnapshotChunk 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_ResponseApplySnapshotChunk) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ResponseApplySnapshotChunk.result": - x.Result = 0 - case "tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks": - x.RefetchChunks = nil - case "tendermint.abci.ResponseApplySnapshotChunk.reject_senders": - x.RejectSenders = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseApplySnapshotChunk 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_ResponseApplySnapshotChunk) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ResponseApplySnapshotChunk.result": - value := x.Result - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks": - if len(x.RefetchChunks) == 0 { - return protoreflect.ValueOfList(&_ResponseApplySnapshotChunk_2_list{}) - } - listValue := &_ResponseApplySnapshotChunk_2_list{list: &x.RefetchChunks} - return protoreflect.ValueOfList(listValue) - case "tendermint.abci.ResponseApplySnapshotChunk.reject_senders": - if len(x.RejectSenders) == 0 { - return protoreflect.ValueOfList(&_ResponseApplySnapshotChunk_3_list{}) - } - listValue := &_ResponseApplySnapshotChunk_3_list{list: &x.RejectSenders} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseApplySnapshotChunk 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_ResponseApplySnapshotChunk) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ResponseApplySnapshotChunk.result": - x.Result = (ResponseApplySnapshotChunk_Result)(value.Enum()) - case "tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks": - lv := value.List() - clv := lv.(*_ResponseApplySnapshotChunk_2_list) - x.RefetchChunks = *clv.list - case "tendermint.abci.ResponseApplySnapshotChunk.reject_senders": - lv := value.List() - clv := lv.(*_ResponseApplySnapshotChunk_3_list) - x.RejectSenders = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseApplySnapshotChunk 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_ResponseApplySnapshotChunk) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks": - if x.RefetchChunks == nil { - x.RefetchChunks = []uint32{} - } - value := &_ResponseApplySnapshotChunk_2_list{list: &x.RefetchChunks} - return protoreflect.ValueOfList(value) - case "tendermint.abci.ResponseApplySnapshotChunk.reject_senders": - if x.RejectSenders == nil { - x.RejectSenders = []string{} - } - value := &_ResponseApplySnapshotChunk_3_list{list: &x.RejectSenders} - return protoreflect.ValueOfList(value) - case "tendermint.abci.ResponseApplySnapshotChunk.result": - panic(fmt.Errorf("field result of message tendermint.abci.ResponseApplySnapshotChunk is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseApplySnapshotChunk 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_ResponseApplySnapshotChunk) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ResponseApplySnapshotChunk.result": - return protoreflect.ValueOfEnum(0) - case "tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks": - list := []uint32{} - return protoreflect.ValueOfList(&_ResponseApplySnapshotChunk_2_list{list: &list}) - case "tendermint.abci.ResponseApplySnapshotChunk.reject_senders": - list := []string{} - return protoreflect.ValueOfList(&_ResponseApplySnapshotChunk_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ResponseApplySnapshotChunk")) - } - panic(fmt.Errorf("message tendermint.abci.ResponseApplySnapshotChunk 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_ResponseApplySnapshotChunk) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ResponseApplySnapshotChunk", 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_ResponseApplySnapshotChunk) 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_ResponseApplySnapshotChunk) 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_ResponseApplySnapshotChunk) 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_ResponseApplySnapshotChunk) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ResponseApplySnapshotChunk) - 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.Result != 0 { - n += 1 + runtime.Sov(uint64(x.Result)) - } - if len(x.RefetchChunks) > 0 { - l = 0 - for _, e := range x.RefetchChunks { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if len(x.RejectSenders) > 0 { - for _, s := range x.RejectSenders { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ResponseApplySnapshotChunk) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.RejectSenders) > 0 { - for iNdEx := len(x.RejectSenders) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.RejectSenders[iNdEx]) - copy(dAtA[i:], x.RejectSenders[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RejectSenders[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.RefetchChunks) > 0 { - var pksize2 int - for _, num := range x.RefetchChunks { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.RefetchChunks { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x12 - } - if x.Result != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ResponseApplySnapshotChunk) - 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: ResponseApplySnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - x.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.RefetchChunks = append(x.RefetchChunks, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.RefetchChunks) == 0 { - x.RefetchChunks = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.RefetchChunks = append(x.RefetchChunks, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType) - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", 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.RejectSenders = append(x.RejectSenders, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ConsensusParams protoreflect.MessageDescriptor - fd_ConsensusParams_block protoreflect.FieldDescriptor - fd_ConsensusParams_evidence protoreflect.FieldDescriptor - fd_ConsensusParams_validator protoreflect.FieldDescriptor - fd_ConsensusParams_version protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ConsensusParams = File_tendermint_abci_types_proto.Messages().ByName("ConsensusParams") - fd_ConsensusParams_block = md_ConsensusParams.Fields().ByName("block") - fd_ConsensusParams_evidence = md_ConsensusParams.Fields().ByName("evidence") - fd_ConsensusParams_validator = md_ConsensusParams.Fields().ByName("validator") - fd_ConsensusParams_version = md_ConsensusParams.Fields().ByName("version") -} - -var _ protoreflect.Message = (*fastReflection_ConsensusParams)(nil) - -type fastReflection_ConsensusParams ConsensusParams - -func (x *ConsensusParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusParams)(x) -} - -func (x *ConsensusParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[33] - 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_ConsensusParams_messageType fastReflection_ConsensusParams_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusParams_messageType{} - -type fastReflection_ConsensusParams_messageType struct{} - -func (x fastReflection_ConsensusParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusParams)(nil) -} -func (x fastReflection_ConsensusParams_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusParams) -} -func (x fastReflection_ConsensusParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConsensusParams) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusParams -} - -// 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_ConsensusParams) Type() protoreflect.MessageType { - return _fastReflection_ConsensusParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusParams) New() protoreflect.Message { - return new(fastReflection_ConsensusParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusParams) Interface() protoreflect.ProtoMessage { - return (*ConsensusParams)(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_ConsensusParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_ConsensusParams_block, value) { - return - } - } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_ConsensusParams_evidence, value) { - return - } - } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_ConsensusParams_validator, value) { - return - } - } - if x.Version != nil { - value := protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - if !f(fd_ConsensusParams_version, 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_ConsensusParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ConsensusParams.block": - return x.Block != nil - case "tendermint.abci.ConsensusParams.evidence": - return x.Evidence != nil - case "tendermint.abci.ConsensusParams.validator": - return x.Validator != nil - case "tendermint.abci.ConsensusParams.version": - return x.Version != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.abci.ConsensusParams 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_ConsensusParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ConsensusParams.block": - x.Block = nil - case "tendermint.abci.ConsensusParams.evidence": - x.Evidence = nil - case "tendermint.abci.ConsensusParams.validator": - x.Validator = nil - case "tendermint.abci.ConsensusParams.version": - x.Version = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.abci.ConsensusParams 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_ConsensusParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ConsensusParams.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ConsensusParams.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ConsensusParams.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ConsensusParams.version": - value := x.Version - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.abci.ConsensusParams 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_ConsensusParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ConsensusParams.block": - x.Block = value.Message().Interface().(*BlockParams) - case "tendermint.abci.ConsensusParams.evidence": - x.Evidence = value.Message().Interface().(*types.EvidenceParams) - case "tendermint.abci.ConsensusParams.validator": - x.Validator = value.Message().Interface().(*types.ValidatorParams) - case "tendermint.abci.ConsensusParams.version": - x.Version = value.Message().Interface().(*types.VersionParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.abci.ConsensusParams 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_ConsensusParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ConsensusParams.block": - if x.Block == nil { - x.Block = new(BlockParams) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - case "tendermint.abci.ConsensusParams.evidence": - if x.Evidence == nil { - x.Evidence = new(types.EvidenceParams) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "tendermint.abci.ConsensusParams.validator": - if x.Validator == nil { - x.Validator = new(types.ValidatorParams) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "tendermint.abci.ConsensusParams.version": - if x.Version == nil { - x.Version = new(types.VersionParams) - } - return protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.abci.ConsensusParams 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_ConsensusParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ConsensusParams.block": - m := new(BlockParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ConsensusParams.evidence": - m := new(types.EvidenceParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ConsensusParams.validator": - m := new(types.ValidatorParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ConsensusParams.version": - m := new(types.VersionParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.abci.ConsensusParams 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_ConsensusParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ConsensusParams", 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_ConsensusParams) 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_ConsensusParams) 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_ConsensusParams) 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_ConsensusParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusParams) - 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.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != nil { - l = options.Size(x.Version) - 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().(*ConsensusParams) - 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.Version != nil { - encoded, err := options.Marshal(x.Version) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - 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().(*ConsensusParams) - 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: ConsensusParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusParams: 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 Block", 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.Block == nil { - x.Block = &BlockParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", 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.Evidence == nil { - x.Evidence = &types.EvidenceParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator == nil { - x.Validator = &types.ValidatorParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version == nil { - x.Version = &types.VersionParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Version); 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_BlockParams protoreflect.MessageDescriptor - fd_BlockParams_max_bytes protoreflect.FieldDescriptor - fd_BlockParams_max_gas protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_BlockParams = File_tendermint_abci_types_proto.Messages().ByName("BlockParams") - fd_BlockParams_max_bytes = md_BlockParams.Fields().ByName("max_bytes") - fd_BlockParams_max_gas = md_BlockParams.Fields().ByName("max_gas") -} - -var _ protoreflect.Message = (*fastReflection_BlockParams)(nil) - -type fastReflection_BlockParams BlockParams - -func (x *BlockParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_BlockParams)(x) -} - -func (x *BlockParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[34] - 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_BlockParams_messageType fastReflection_BlockParams_messageType -var _ protoreflect.MessageType = fastReflection_BlockParams_messageType{} - -type fastReflection_BlockParams_messageType struct{} - -func (x fastReflection_BlockParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_BlockParams)(nil) -} -func (x fastReflection_BlockParams_messageType) New() protoreflect.Message { - return new(fastReflection_BlockParams) -} -func (x fastReflection_BlockParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BlockParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BlockParams) Descriptor() protoreflect.MessageDescriptor { - return md_BlockParams -} - -// 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_BlockParams) Type() protoreflect.MessageType { - return _fastReflection_BlockParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BlockParams) New() protoreflect.Message { - return new(fastReflection_BlockParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BlockParams) Interface() protoreflect.ProtoMessage { - return (*BlockParams)(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_BlockParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MaxBytes != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxBytes) - if !f(fd_BlockParams_max_bytes, value) { - return - } - } - if x.MaxGas != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxGas) - if !f(fd_BlockParams_max_gas, 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_BlockParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.BlockParams.max_bytes": - return x.MaxBytes != int64(0) - case "tendermint.abci.BlockParams.max_gas": - return x.MaxGas != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.BlockParams")) - } - panic(fmt.Errorf("message tendermint.abci.BlockParams 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_BlockParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.BlockParams.max_bytes": - x.MaxBytes = int64(0) - case "tendermint.abci.BlockParams.max_gas": - x.MaxGas = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.BlockParams")) - } - panic(fmt.Errorf("message tendermint.abci.BlockParams 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_BlockParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.BlockParams.max_bytes": - value := x.MaxBytes - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.BlockParams.max_gas": - value := x.MaxGas - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.BlockParams")) - } - panic(fmt.Errorf("message tendermint.abci.BlockParams 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_BlockParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.BlockParams.max_bytes": - x.MaxBytes = value.Int() - case "tendermint.abci.BlockParams.max_gas": - x.MaxGas = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.BlockParams")) - } - panic(fmt.Errorf("message tendermint.abci.BlockParams 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_BlockParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.BlockParams.max_bytes": - panic(fmt.Errorf("field max_bytes of message tendermint.abci.BlockParams is not mutable")) - case "tendermint.abci.BlockParams.max_gas": - panic(fmt.Errorf("field max_gas of message tendermint.abci.BlockParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.BlockParams")) - } - panic(fmt.Errorf("message tendermint.abci.BlockParams 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_BlockParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.BlockParams.max_bytes": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.BlockParams.max_gas": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.BlockParams")) - } - panic(fmt.Errorf("message tendermint.abci.BlockParams 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_BlockParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.BlockParams", 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_BlockParams) 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_BlockParams) 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_BlockParams) 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_BlockParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BlockParams) - 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.MaxBytes != 0 { - n += 1 + runtime.Sov(uint64(x.MaxBytes)) - } - if x.MaxGas != 0 { - n += 1 + runtime.Sov(uint64(x.MaxGas)) - } - 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().(*BlockParams) - 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.MaxGas != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxGas)) - i-- - dAtA[i] = 0x10 - } - if x.MaxBytes != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxBytes)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BlockParams) - 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: BlockParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - x.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - x.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_LastCommitInfo_2_list)(nil) - -type _LastCommitInfo_2_list struct { - list *[]*VoteInfo -} - -func (x *_LastCommitInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LastCommitInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_LastCommitInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VoteInfo) - (*x.list)[i] = concreteValue -} - -func (x *_LastCommitInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VoteInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_LastCommitInfo_2_list) AppendMutable() protoreflect.Value { - v := new(VoteInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_LastCommitInfo_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_LastCommitInfo_2_list) NewElement() protoreflect.Value { - v := new(VoteInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_LastCommitInfo_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LastCommitInfo protoreflect.MessageDescriptor - fd_LastCommitInfo_round protoreflect.FieldDescriptor - fd_LastCommitInfo_votes protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_LastCommitInfo = File_tendermint_abci_types_proto.Messages().ByName("LastCommitInfo") - fd_LastCommitInfo_round = md_LastCommitInfo.Fields().ByName("round") - fd_LastCommitInfo_votes = md_LastCommitInfo.Fields().ByName("votes") -} - -var _ protoreflect.Message = (*fastReflection_LastCommitInfo)(nil) - -type fastReflection_LastCommitInfo LastCommitInfo - -func (x *LastCommitInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_LastCommitInfo)(x) -} - -func (x *LastCommitInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[35] - 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_LastCommitInfo_messageType fastReflection_LastCommitInfo_messageType -var _ protoreflect.MessageType = fastReflection_LastCommitInfo_messageType{} - -type fastReflection_LastCommitInfo_messageType struct{} - -func (x fastReflection_LastCommitInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_LastCommitInfo)(nil) -} -func (x fastReflection_LastCommitInfo_messageType) New() protoreflect.Message { - return new(fastReflection_LastCommitInfo) -} -func (x fastReflection_LastCommitInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LastCommitInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LastCommitInfo) Descriptor() protoreflect.MessageDescriptor { - return md_LastCommitInfo -} - -// 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_LastCommitInfo) Type() protoreflect.MessageType { - return _fastReflection_LastCommitInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LastCommitInfo) New() protoreflect.Message { - return new(fastReflection_LastCommitInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LastCommitInfo) Interface() protoreflect.ProtoMessage { - return (*LastCommitInfo)(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_LastCommitInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Round != int32(0) { - value := protoreflect.ValueOfInt32(x.Round) - if !f(fd_LastCommitInfo_round, value) { - return - } - } - if len(x.Votes) != 0 { - value := protoreflect.ValueOfList(&_LastCommitInfo_2_list{list: &x.Votes}) - if !f(fd_LastCommitInfo_votes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_LastCommitInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.LastCommitInfo.round": - return x.Round != int32(0) - case "tendermint.abci.LastCommitInfo.votes": - return len(x.Votes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.LastCommitInfo")) - } - panic(fmt.Errorf("message tendermint.abci.LastCommitInfo 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_LastCommitInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.LastCommitInfo.round": - x.Round = int32(0) - case "tendermint.abci.LastCommitInfo.votes": - x.Votes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.LastCommitInfo")) - } - panic(fmt.Errorf("message tendermint.abci.LastCommitInfo 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_LastCommitInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.LastCommitInfo.round": - value := x.Round - return protoreflect.ValueOfInt32(value) - case "tendermint.abci.LastCommitInfo.votes": - if len(x.Votes) == 0 { - return protoreflect.ValueOfList(&_LastCommitInfo_2_list{}) - } - listValue := &_LastCommitInfo_2_list{list: &x.Votes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.LastCommitInfo")) - } - panic(fmt.Errorf("message tendermint.abci.LastCommitInfo 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_LastCommitInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.LastCommitInfo.round": - x.Round = int32(value.Int()) - case "tendermint.abci.LastCommitInfo.votes": - lv := value.List() - clv := lv.(*_LastCommitInfo_2_list) - x.Votes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.LastCommitInfo")) - } - panic(fmt.Errorf("message tendermint.abci.LastCommitInfo 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_LastCommitInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.LastCommitInfo.votes": - if x.Votes == nil { - x.Votes = []*VoteInfo{} - } - value := &_LastCommitInfo_2_list{list: &x.Votes} - return protoreflect.ValueOfList(value) - case "tendermint.abci.LastCommitInfo.round": - panic(fmt.Errorf("field round of message tendermint.abci.LastCommitInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.LastCommitInfo")) - } - panic(fmt.Errorf("message tendermint.abci.LastCommitInfo 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_LastCommitInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.LastCommitInfo.round": - return protoreflect.ValueOfInt32(int32(0)) - case "tendermint.abci.LastCommitInfo.votes": - list := []*VoteInfo{} - return protoreflect.ValueOfList(&_LastCommitInfo_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.LastCommitInfo")) - } - panic(fmt.Errorf("message tendermint.abci.LastCommitInfo 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_LastCommitInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.LastCommitInfo", 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_LastCommitInfo) 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_LastCommitInfo) 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_LastCommitInfo) 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_LastCommitInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LastCommitInfo) - 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.Round != 0 { - n += 1 + runtime.Sov(uint64(x.Round)) - } - if len(x.Votes) > 0 { - for _, e := range x.Votes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*LastCommitInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Votes) > 0 { - for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Votes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Round != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Round)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LastCommitInfo) - 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: LastCommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - x.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Votes = append(x.Votes, &VoteInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Event_2_list)(nil) - -type _Event_2_list struct { - list *[]*EventAttribute -} - -func (x *_Event_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Event_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Event_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EventAttribute) - (*x.list)[i] = concreteValue -} - -func (x *_Event_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EventAttribute) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Event_2_list) AppendMutable() protoreflect.Value { - v := new(EventAttribute) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Event_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Event_2_list) NewElement() protoreflect.Value { - v := new(EventAttribute) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Event_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Event protoreflect.MessageDescriptor - fd_Event_type protoreflect.FieldDescriptor - fd_Event_attributes protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_Event = File_tendermint_abci_types_proto.Messages().ByName("Event") - fd_Event_type = md_Event.Fields().ByName("type") - fd_Event_attributes = md_Event.Fields().ByName("attributes") -} - -var _ protoreflect.Message = (*fastReflection_Event)(nil) - -type fastReflection_Event Event - -func (x *Event) ProtoReflect() protoreflect.Message { - return (*fastReflection_Event)(x) -} - -func (x *Event) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[36] - 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_Event_messageType fastReflection_Event_messageType -var _ protoreflect.MessageType = fastReflection_Event_messageType{} - -type fastReflection_Event_messageType struct{} - -func (x fastReflection_Event_messageType) Zero() protoreflect.Message { - return (*fastReflection_Event)(nil) -} -func (x fastReflection_Event_messageType) New() protoreflect.Message { - return new(fastReflection_Event) -} -func (x fastReflection_Event_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Event -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Event) Descriptor() protoreflect.MessageDescriptor { - return md_Event -} - -// 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_Event) Type() protoreflect.MessageType { - return _fastReflection_Event_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Event) New() protoreflect.Message { - return new(fastReflection_Event) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Event) Interface() protoreflect.ProtoMessage { - return (*Event)(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_Event) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != "" { - value := protoreflect.ValueOfString(x.Type_) - if !f(fd_Event_type, value) { - return - } - } - if len(x.Attributes) != 0 { - value := protoreflect.ValueOfList(&_Event_2_list{list: &x.Attributes}) - if !f(fd_Event_attributes, 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_Event) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.Event.type": - return x.Type_ != "" - case "tendermint.abci.Event.attributes": - return len(x.Attributes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Event")) - } - panic(fmt.Errorf("message tendermint.abci.Event 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_Event) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.Event.type": - x.Type_ = "" - case "tendermint.abci.Event.attributes": - x.Attributes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Event")) - } - panic(fmt.Errorf("message tendermint.abci.Event 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_Event) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.Event.type": - value := x.Type_ - return protoreflect.ValueOfString(value) - case "tendermint.abci.Event.attributes": - if len(x.Attributes) == 0 { - return protoreflect.ValueOfList(&_Event_2_list{}) - } - listValue := &_Event_2_list{list: &x.Attributes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Event")) - } - panic(fmt.Errorf("message tendermint.abci.Event 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_Event) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.Event.type": - x.Type_ = value.Interface().(string) - case "tendermint.abci.Event.attributes": - lv := value.List() - clv := lv.(*_Event_2_list) - x.Attributes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Event")) - } - panic(fmt.Errorf("message tendermint.abci.Event 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_Event) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Event.attributes": - if x.Attributes == nil { - x.Attributes = []*EventAttribute{} - } - value := &_Event_2_list{list: &x.Attributes} - return protoreflect.ValueOfList(value) - case "tendermint.abci.Event.type": - panic(fmt.Errorf("field type of message tendermint.abci.Event is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Event")) - } - panic(fmt.Errorf("message tendermint.abci.Event 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_Event) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Event.type": - return protoreflect.ValueOfString("") - case "tendermint.abci.Event.attributes": - list := []*EventAttribute{} - return protoreflect.ValueOfList(&_Event_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Event")) - } - panic(fmt.Errorf("message tendermint.abci.Event 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_Event) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.Event", 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_Event) 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_Event) 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_Event) 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_Event) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Event) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Type_) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Attributes) > 0 { - for _, e := range x.Attributes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Event) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Attributes) > 0 { - for iNdEx := len(x.Attributes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Attributes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Type_) > 0 { - i -= len(x.Type_) - copy(dAtA[i:], x.Type_) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) - 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().(*Event) - 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: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Event: 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 Type_", 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.Type_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Attributes = append(x.Attributes, &EventAttribute{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attributes[len(x.Attributes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventAttribute protoreflect.MessageDescriptor - fd_EventAttribute_key protoreflect.FieldDescriptor - fd_EventAttribute_value protoreflect.FieldDescriptor - fd_EventAttribute_index protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_EventAttribute = File_tendermint_abci_types_proto.Messages().ByName("EventAttribute") - fd_EventAttribute_key = md_EventAttribute.Fields().ByName("key") - fd_EventAttribute_value = md_EventAttribute.Fields().ByName("value") - fd_EventAttribute_index = md_EventAttribute.Fields().ByName("index") -} - -var _ protoreflect.Message = (*fastReflection_EventAttribute)(nil) - -type fastReflection_EventAttribute EventAttribute - -func (x *EventAttribute) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventAttribute)(x) -} - -func (x *EventAttribute) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[37] - 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_EventAttribute_messageType fastReflection_EventAttribute_messageType -var _ protoreflect.MessageType = fastReflection_EventAttribute_messageType{} - -type fastReflection_EventAttribute_messageType struct{} - -func (x fastReflection_EventAttribute_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventAttribute)(nil) -} -func (x fastReflection_EventAttribute_messageType) New() protoreflect.Message { - return new(fastReflection_EventAttribute) -} -func (x fastReflection_EventAttribute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventAttribute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventAttribute) Descriptor() protoreflect.MessageDescriptor { - return md_EventAttribute -} - -// 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_EventAttribute) Type() protoreflect.MessageType { - return _fastReflection_EventAttribute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventAttribute) New() protoreflect.Message { - return new(fastReflection_EventAttribute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventAttribute) Interface() protoreflect.ProtoMessage { - return (*EventAttribute)(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_EventAttribute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_EventAttribute_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_EventAttribute_value, value) { - return - } - } - if x.Index != false { - value := protoreflect.ValueOfBool(x.Index) - if !f(fd_EventAttribute_index, 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_EventAttribute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.EventAttribute.key": - return len(x.Key) != 0 - case "tendermint.abci.EventAttribute.value": - return len(x.Value) != 0 - case "tendermint.abci.EventAttribute.index": - return x.Index != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.EventAttribute")) - } - panic(fmt.Errorf("message tendermint.abci.EventAttribute 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_EventAttribute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.EventAttribute.key": - x.Key = nil - case "tendermint.abci.EventAttribute.value": - x.Value = nil - case "tendermint.abci.EventAttribute.index": - x.Index = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.EventAttribute")) - } - panic(fmt.Errorf("message tendermint.abci.EventAttribute 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_EventAttribute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.EventAttribute.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.EventAttribute.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.EventAttribute.index": - value := x.Index - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.EventAttribute")) - } - panic(fmt.Errorf("message tendermint.abci.EventAttribute 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_EventAttribute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.EventAttribute.key": - x.Key = value.Bytes() - case "tendermint.abci.EventAttribute.value": - x.Value = value.Bytes() - case "tendermint.abci.EventAttribute.index": - x.Index = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.EventAttribute")) - } - panic(fmt.Errorf("message tendermint.abci.EventAttribute 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_EventAttribute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.EventAttribute.key": - panic(fmt.Errorf("field key of message tendermint.abci.EventAttribute is not mutable")) - case "tendermint.abci.EventAttribute.value": - panic(fmt.Errorf("field value of message tendermint.abci.EventAttribute is not mutable")) - case "tendermint.abci.EventAttribute.index": - panic(fmt.Errorf("field index of message tendermint.abci.EventAttribute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.EventAttribute")) - } - panic(fmt.Errorf("message tendermint.abci.EventAttribute 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_EventAttribute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.EventAttribute.key": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.EventAttribute.value": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.EventAttribute.index": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.EventAttribute")) - } - panic(fmt.Errorf("message tendermint.abci.EventAttribute 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_EventAttribute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.EventAttribute", 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_EventAttribute) 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_EventAttribute) 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_EventAttribute) 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_EventAttribute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventAttribute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Index { - n += 2 - } - 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().(*EventAttribute) - 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.Index { - i-- - if x.Index { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*EventAttribute) - 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: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttribute: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Index = bool(v != 0) - 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_TxResult protoreflect.MessageDescriptor - fd_TxResult_height protoreflect.FieldDescriptor - fd_TxResult_index protoreflect.FieldDescriptor - fd_TxResult_tx protoreflect.FieldDescriptor - fd_TxResult_result protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_TxResult = File_tendermint_abci_types_proto.Messages().ByName("TxResult") - fd_TxResult_height = md_TxResult.Fields().ByName("height") - fd_TxResult_index = md_TxResult.Fields().ByName("index") - fd_TxResult_tx = md_TxResult.Fields().ByName("tx") - fd_TxResult_result = md_TxResult.Fields().ByName("result") -} - -var _ protoreflect.Message = (*fastReflection_TxResult)(nil) - -type fastReflection_TxResult TxResult - -func (x *TxResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxResult)(x) -} - -func (x *TxResult) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[38] - 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_TxResult_messageType fastReflection_TxResult_messageType -var _ protoreflect.MessageType = fastReflection_TxResult_messageType{} - -type fastReflection_TxResult_messageType struct{} - -func (x fastReflection_TxResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxResult)(nil) -} -func (x fastReflection_TxResult_messageType) New() protoreflect.Message { - return new(fastReflection_TxResult) -} -func (x fastReflection_TxResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxResult -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxResult) Descriptor() protoreflect.MessageDescriptor { - return md_TxResult -} - -// 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_TxResult) Type() protoreflect.MessageType { - return _fastReflection_TxResult_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxResult) New() protoreflect.Message { - return new(fastReflection_TxResult) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxResult) Interface() protoreflect.ProtoMessage { - return (*TxResult)(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_TxResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_TxResult_height, value) { - return - } - } - if x.Index != uint32(0) { - value := protoreflect.ValueOfUint32(x.Index) - if !f(fd_TxResult_index, value) { - return - } - } - if len(x.Tx) != 0 { - value := protoreflect.ValueOfBytes(x.Tx) - if !f(fd_TxResult_tx, value) { - return - } - } - if x.Result != nil { - value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) - if !f(fd_TxResult_result, 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_TxResult) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.TxResult.height": - return x.Height != int64(0) - case "tendermint.abci.TxResult.index": - return x.Index != uint32(0) - case "tendermint.abci.TxResult.tx": - return len(x.Tx) != 0 - case "tendermint.abci.TxResult.result": - return x.Result != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.TxResult")) - } - panic(fmt.Errorf("message tendermint.abci.TxResult 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_TxResult) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.TxResult.height": - x.Height = int64(0) - case "tendermint.abci.TxResult.index": - x.Index = uint32(0) - case "tendermint.abci.TxResult.tx": - x.Tx = nil - case "tendermint.abci.TxResult.result": - x.Result = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.TxResult")) - } - panic(fmt.Errorf("message tendermint.abci.TxResult 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_TxResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.TxResult.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.TxResult.index": - value := x.Index - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.TxResult.tx": - value := x.Tx - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.TxResult.result": - value := x.Result - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.TxResult")) - } - panic(fmt.Errorf("message tendermint.abci.TxResult 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_TxResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.TxResult.height": - x.Height = value.Int() - case "tendermint.abci.TxResult.index": - x.Index = uint32(value.Uint()) - case "tendermint.abci.TxResult.tx": - x.Tx = value.Bytes() - case "tendermint.abci.TxResult.result": - x.Result = value.Message().Interface().(*ResponseDeliverTx) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.TxResult")) - } - panic(fmt.Errorf("message tendermint.abci.TxResult 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_TxResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.TxResult.result": - if x.Result == nil { - x.Result = new(ResponseDeliverTx) - } - return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) - case "tendermint.abci.TxResult.height": - panic(fmt.Errorf("field height of message tendermint.abci.TxResult is not mutable")) - case "tendermint.abci.TxResult.index": - panic(fmt.Errorf("field index of message tendermint.abci.TxResult is not mutable")) - case "tendermint.abci.TxResult.tx": - panic(fmt.Errorf("field tx of message tendermint.abci.TxResult is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.TxResult")) - } - panic(fmt.Errorf("message tendermint.abci.TxResult 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_TxResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.TxResult.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.TxResult.index": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.TxResult.tx": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.TxResult.result": - m := new(ResponseDeliverTx) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.TxResult")) - } - panic(fmt.Errorf("message tendermint.abci.TxResult 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_TxResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.TxResult", 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_TxResult) 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_TxResult) 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_TxResult) 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_TxResult) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxResult) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.Tx) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Result != nil { - l = options.Size(x.Result) - 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().(*TxResult) - 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.Result != nil { - encoded, err := options.Marshal(x.Result) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Tx) > 0 { - i -= len(x.Tx) - copy(dAtA[i:], x.Tx) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tx))) - i-- - dAtA[i] = 0x1a - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x10 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TxResult) - 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: TxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Tx = append(x.Tx[:0], dAtA[iNdEx:postIndex]...) - if x.Tx == nil { - x.Tx = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", 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.Result == nil { - x.Result = &ResponseDeliverTx{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); 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_Validator protoreflect.MessageDescriptor - fd_Validator_address protoreflect.FieldDescriptor - fd_Validator_power protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_Validator = File_tendermint_abci_types_proto.Messages().ByName("Validator") - fd_Validator_address = md_Validator.Fields().ByName("address") - fd_Validator_power = md_Validator.Fields().ByName("power") -} - -var _ protoreflect.Message = (*fastReflection_Validator)(nil) - -type fastReflection_Validator Validator - -func (x *Validator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Validator)(x) -} - -func (x *Validator) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[39] - 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_Validator_messageType fastReflection_Validator_messageType -var _ protoreflect.MessageType = fastReflection_Validator_messageType{} - -type fastReflection_Validator_messageType struct{} - -func (x fastReflection_Validator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Validator)(nil) -} -func (x fastReflection_Validator_messageType) New() protoreflect.Message { - return new(fastReflection_Validator) -} -func (x fastReflection_Validator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Validator) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// 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_Validator) Type() protoreflect.MessageType { - return _fastReflection_Validator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Validator) New() protoreflect.Message { - return new(fastReflection_Validator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Validator) Interface() protoreflect.ProtoMessage { - return (*Validator)(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_Validator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Address) != 0 { - value := protoreflect.ValueOfBytes(x.Address) - if !f(fd_Validator_address, value) { - return - } - } - if x.Power != int64(0) { - value := protoreflect.ValueOfInt64(x.Power) - if !f(fd_Validator_power, 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_Validator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.Validator.address": - return len(x.Address) != 0 - case "tendermint.abci.Validator.power": - return x.Power != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Validator")) - } - panic(fmt.Errorf("message tendermint.abci.Validator 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_Validator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.Validator.address": - x.Address = nil - case "tendermint.abci.Validator.power": - x.Power = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Validator")) - } - panic(fmt.Errorf("message tendermint.abci.Validator 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_Validator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.Validator.address": - value := x.Address - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.Validator.power": - value := x.Power - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Validator")) - } - panic(fmt.Errorf("message tendermint.abci.Validator 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_Validator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.Validator.address": - x.Address = value.Bytes() - case "tendermint.abci.Validator.power": - x.Power = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Validator")) - } - panic(fmt.Errorf("message tendermint.abci.Validator 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_Validator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Validator.address": - panic(fmt.Errorf("field address of message tendermint.abci.Validator is not mutable")) - case "tendermint.abci.Validator.power": - panic(fmt.Errorf("field power of message tendermint.abci.Validator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Validator")) - } - panic(fmt.Errorf("message tendermint.abci.Validator 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_Validator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Validator.address": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.Validator.power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Validator")) - } - panic(fmt.Errorf("message tendermint.abci.Validator 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_Validator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.Validator", 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_Validator) 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_Validator) 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_Validator) 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_Validator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Power != 0 { - n += 1 + runtime.Sov(uint64(x.Power)) - } - 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().(*Validator) - 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.Power != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Power)) - i-- - dAtA[i] = 0x18 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Validator) - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) - if x.Address == nil { - x.Address = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - x.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ValidatorUpdate protoreflect.MessageDescriptor - fd_ValidatorUpdate_pub_key protoreflect.FieldDescriptor - fd_ValidatorUpdate_power protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_ValidatorUpdate = File_tendermint_abci_types_proto.Messages().ByName("ValidatorUpdate") - fd_ValidatorUpdate_pub_key = md_ValidatorUpdate.Fields().ByName("pub_key") - fd_ValidatorUpdate_power = md_ValidatorUpdate.Fields().ByName("power") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorUpdate)(nil) - -type fastReflection_ValidatorUpdate ValidatorUpdate - -func (x *ValidatorUpdate) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorUpdate)(x) -} - -func (x *ValidatorUpdate) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[40] - 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_ValidatorUpdate_messageType fastReflection_ValidatorUpdate_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorUpdate_messageType{} - -type fastReflection_ValidatorUpdate_messageType struct{} - -func (x fastReflection_ValidatorUpdate_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorUpdate)(nil) -} -func (x fastReflection_ValidatorUpdate_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorUpdate) -} -func (x fastReflection_ValidatorUpdate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorUpdate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorUpdate) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorUpdate -} - -// 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_ValidatorUpdate) Type() protoreflect.MessageType { - return _fastReflection_ValidatorUpdate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorUpdate) New() protoreflect.Message { - return new(fastReflection_ValidatorUpdate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorUpdate) Interface() protoreflect.ProtoMessage { - return (*ValidatorUpdate)(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_ValidatorUpdate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_ValidatorUpdate_pub_key, value) { - return - } - } - if x.Power != int64(0) { - value := protoreflect.ValueOfInt64(x.Power) - if !f(fd_ValidatorUpdate_power, 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_ValidatorUpdate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.ValidatorUpdate.pub_key": - return x.PubKey != nil - case "tendermint.abci.ValidatorUpdate.power": - return x.Power != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ValidatorUpdate")) - } - panic(fmt.Errorf("message tendermint.abci.ValidatorUpdate 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_ValidatorUpdate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.ValidatorUpdate.pub_key": - x.PubKey = nil - case "tendermint.abci.ValidatorUpdate.power": - x.Power = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ValidatorUpdate")) - } - panic(fmt.Errorf("message tendermint.abci.ValidatorUpdate 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_ValidatorUpdate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.ValidatorUpdate.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.ValidatorUpdate.power": - value := x.Power - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ValidatorUpdate")) - } - panic(fmt.Errorf("message tendermint.abci.ValidatorUpdate 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_ValidatorUpdate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.ValidatorUpdate.pub_key": - x.PubKey = value.Message().Interface().(*crypto.PublicKey) - case "tendermint.abci.ValidatorUpdate.power": - x.Power = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ValidatorUpdate")) - } - panic(fmt.Errorf("message tendermint.abci.ValidatorUpdate 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_ValidatorUpdate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ValidatorUpdate.pub_key": - if x.PubKey == nil { - x.PubKey = new(crypto.PublicKey) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "tendermint.abci.ValidatorUpdate.power": - panic(fmt.Errorf("field power of message tendermint.abci.ValidatorUpdate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ValidatorUpdate")) - } - panic(fmt.Errorf("message tendermint.abci.ValidatorUpdate 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_ValidatorUpdate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.ValidatorUpdate.pub_key": - m := new(crypto.PublicKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.ValidatorUpdate.power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.ValidatorUpdate")) - } - panic(fmt.Errorf("message tendermint.abci.ValidatorUpdate 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_ValidatorUpdate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.ValidatorUpdate", 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_ValidatorUpdate) 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_ValidatorUpdate) 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_ValidatorUpdate) 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_ValidatorUpdate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorUpdate) - 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.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Power != 0 { - n += 1 + runtime.Sov(uint64(x.Power)) - } - 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().(*ValidatorUpdate) - 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.Power != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Power)) - i-- - dAtA[i] = 0x10 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - 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().(*ValidatorUpdate) - 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: ValidatorUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorUpdate: 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 PubKey", 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.PubKey == nil { - x.PubKey = &crypto.PublicKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - x.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_VoteInfo protoreflect.MessageDescriptor - fd_VoteInfo_validator protoreflect.FieldDescriptor - fd_VoteInfo_signed_last_block protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_VoteInfo = File_tendermint_abci_types_proto.Messages().ByName("VoteInfo") - fd_VoteInfo_validator = md_VoteInfo.Fields().ByName("validator") - fd_VoteInfo_signed_last_block = md_VoteInfo.Fields().ByName("signed_last_block") -} - -var _ protoreflect.Message = (*fastReflection_VoteInfo)(nil) - -type fastReflection_VoteInfo VoteInfo - -func (x *VoteInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_VoteInfo)(x) -} - -func (x *VoteInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[41] - 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_VoteInfo_messageType fastReflection_VoteInfo_messageType -var _ protoreflect.MessageType = fastReflection_VoteInfo_messageType{} - -type fastReflection_VoteInfo_messageType struct{} - -func (x fastReflection_VoteInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_VoteInfo)(nil) -} -func (x fastReflection_VoteInfo_messageType) New() protoreflect.Message { - return new(fastReflection_VoteInfo) -} -func (x fastReflection_VoteInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VoteInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VoteInfo) Descriptor() protoreflect.MessageDescriptor { - return md_VoteInfo -} - -// 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_VoteInfo) Type() protoreflect.MessageType { - return _fastReflection_VoteInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VoteInfo) New() protoreflect.Message { - return new(fastReflection_VoteInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VoteInfo) Interface() protoreflect.ProtoMessage { - return (*VoteInfo)(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_VoteInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_VoteInfo_validator, value) { - return - } - } - if x.SignedLastBlock != false { - value := protoreflect.ValueOfBool(x.SignedLastBlock) - if !f(fd_VoteInfo_signed_last_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_VoteInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.VoteInfo.validator": - return x.Validator != nil - case "tendermint.abci.VoteInfo.signed_last_block": - return x.SignedLastBlock != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.VoteInfo")) - } - panic(fmt.Errorf("message tendermint.abci.VoteInfo 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_VoteInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.VoteInfo.validator": - x.Validator = nil - case "tendermint.abci.VoteInfo.signed_last_block": - x.SignedLastBlock = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.VoteInfo")) - } - panic(fmt.Errorf("message tendermint.abci.VoteInfo 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_VoteInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.VoteInfo.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.VoteInfo.signed_last_block": - value := x.SignedLastBlock - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.VoteInfo")) - } - panic(fmt.Errorf("message tendermint.abci.VoteInfo 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_VoteInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.VoteInfo.validator": - x.Validator = value.Message().Interface().(*Validator) - case "tendermint.abci.VoteInfo.signed_last_block": - x.SignedLastBlock = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.VoteInfo")) - } - panic(fmt.Errorf("message tendermint.abci.VoteInfo 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_VoteInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.VoteInfo.validator": - if x.Validator == nil { - x.Validator = new(Validator) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "tendermint.abci.VoteInfo.signed_last_block": - panic(fmt.Errorf("field signed_last_block of message tendermint.abci.VoteInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.VoteInfo")) - } - panic(fmt.Errorf("message tendermint.abci.VoteInfo 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_VoteInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.VoteInfo.validator": - m := new(Validator) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.VoteInfo.signed_last_block": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.VoteInfo")) - } - panic(fmt.Errorf("message tendermint.abci.VoteInfo 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_VoteInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.VoteInfo", 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_VoteInfo) 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_VoteInfo) 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_VoteInfo) 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_VoteInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VoteInfo) - 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.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SignedLastBlock { - n += 2 - } - 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().(*VoteInfo) - 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.SignedLastBlock { - i-- - if x.SignedLastBlock { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - 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().(*VoteInfo) - 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: VoteInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VoteInfo: 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 Validator", 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.Validator == nil { - x.Validator = &Validator{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.SignedLastBlock = bool(v != 0) - 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_Evidence protoreflect.MessageDescriptor - fd_Evidence_type protoreflect.FieldDescriptor - fd_Evidence_validator protoreflect.FieldDescriptor - fd_Evidence_height protoreflect.FieldDescriptor - fd_Evidence_time protoreflect.FieldDescriptor - fd_Evidence_total_voting_power protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_Evidence = File_tendermint_abci_types_proto.Messages().ByName("Evidence") - fd_Evidence_type = md_Evidence.Fields().ByName("type") - fd_Evidence_validator = md_Evidence.Fields().ByName("validator") - fd_Evidence_height = md_Evidence.Fields().ByName("height") - fd_Evidence_time = md_Evidence.Fields().ByName("time") - fd_Evidence_total_voting_power = md_Evidence.Fields().ByName("total_voting_power") -} - -var _ protoreflect.Message = (*fastReflection_Evidence)(nil) - -type fastReflection_Evidence Evidence - -func (x *Evidence) ProtoReflect() protoreflect.Message { - return (*fastReflection_Evidence)(x) -} - -func (x *Evidence) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[42] - 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_Evidence_messageType fastReflection_Evidence_messageType -var _ protoreflect.MessageType = fastReflection_Evidence_messageType{} - -type fastReflection_Evidence_messageType struct{} - -func (x fastReflection_Evidence_messageType) Zero() protoreflect.Message { - return (*fastReflection_Evidence)(nil) -} -func (x fastReflection_Evidence_messageType) New() protoreflect.Message { - return new(fastReflection_Evidence) -} -func (x fastReflection_Evidence_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Evidence -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Evidence) Descriptor() protoreflect.MessageDescriptor { - return md_Evidence -} - -// 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_Evidence) Type() protoreflect.MessageType { - return _fastReflection_Evidence_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Evidence) New() protoreflect.Message { - return new(fastReflection_Evidence) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Evidence) Interface() protoreflect.ProtoMessage { - return (*Evidence)(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_Evidence) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) - if !f(fd_Evidence_type, value) { - return - } - } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_Evidence_validator, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Evidence_height, value) { - return - } - } - if x.Time != nil { - value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - if !f(fd_Evidence_time, value) { - return - } - } - if x.TotalVotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.TotalVotingPower) - if !f(fd_Evidence_total_voting_power, 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_Evidence) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.Evidence.type": - return x.Type_ != 0 - case "tendermint.abci.Evidence.validator": - return x.Validator != nil - case "tendermint.abci.Evidence.height": - return x.Height != int64(0) - case "tendermint.abci.Evidence.time": - return x.Time != nil - case "tendermint.abci.Evidence.total_voting_power": - return x.TotalVotingPower != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Evidence")) - } - panic(fmt.Errorf("message tendermint.abci.Evidence 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_Evidence) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.Evidence.type": - x.Type_ = 0 - case "tendermint.abci.Evidence.validator": - x.Validator = nil - case "tendermint.abci.Evidence.height": - x.Height = int64(0) - case "tendermint.abci.Evidence.time": - x.Time = nil - case "tendermint.abci.Evidence.total_voting_power": - x.TotalVotingPower = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Evidence")) - } - panic(fmt.Errorf("message tendermint.abci.Evidence 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_Evidence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.Evidence.type": - value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tendermint.abci.Evidence.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Evidence.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.abci.Evidence.time": - value := x.Time - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.abci.Evidence.total_voting_power": - value := x.TotalVotingPower - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Evidence")) - } - panic(fmt.Errorf("message tendermint.abci.Evidence 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_Evidence) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.Evidence.type": - x.Type_ = (EvidenceType)(value.Enum()) - case "tendermint.abci.Evidence.validator": - x.Validator = value.Message().Interface().(*Validator) - case "tendermint.abci.Evidence.height": - x.Height = value.Int() - case "tendermint.abci.Evidence.time": - x.Time = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.abci.Evidence.total_voting_power": - x.TotalVotingPower = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Evidence")) - } - panic(fmt.Errorf("message tendermint.abci.Evidence 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_Evidence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Evidence.validator": - if x.Validator == nil { - x.Validator = new(Validator) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "tendermint.abci.Evidence.time": - if x.Time == nil { - x.Time = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - case "tendermint.abci.Evidence.type": - panic(fmt.Errorf("field type of message tendermint.abci.Evidence is not mutable")) - case "tendermint.abci.Evidence.height": - panic(fmt.Errorf("field height of message tendermint.abci.Evidence is not mutable")) - case "tendermint.abci.Evidence.total_voting_power": - panic(fmt.Errorf("field total_voting_power of message tendermint.abci.Evidence is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Evidence")) - } - panic(fmt.Errorf("message tendermint.abci.Evidence 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_Evidence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Evidence.type": - return protoreflect.ValueOfEnum(0) - case "tendermint.abci.Evidence.validator": - m := new(Validator) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.Evidence.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.abci.Evidence.time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.abci.Evidence.total_voting_power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Evidence")) - } - panic(fmt.Errorf("message tendermint.abci.Evidence 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_Evidence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.Evidence", 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_Evidence) 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_Evidence) 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_Evidence) 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_Evidence) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Evidence) - 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.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Time != nil { - l = options.Size(x.Time) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TotalVotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.TotalVotingPower)) - } - 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().(*Evidence) - 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.TotalVotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalVotingPower)) - i-- - dAtA[i] = 0x28 - } - if x.Time != nil { - encoded, err := options.Marshal(x.Time) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Evidence) - 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: Evidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - x.Type_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Type_ |= EvidenceType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator == nil { - x.Validator = &Validator{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Time", 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.Time == nil { - x.Time = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) - } - x.TotalVotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TotalVotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Snapshot protoreflect.MessageDescriptor - fd_Snapshot_height protoreflect.FieldDescriptor - fd_Snapshot_format protoreflect.FieldDescriptor - fd_Snapshot_chunks protoreflect.FieldDescriptor - fd_Snapshot_hash protoreflect.FieldDescriptor - fd_Snapshot_metadata protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_abci_types_proto_init() - md_Snapshot = File_tendermint_abci_types_proto.Messages().ByName("Snapshot") - fd_Snapshot_height = md_Snapshot.Fields().ByName("height") - fd_Snapshot_format = md_Snapshot.Fields().ByName("format") - fd_Snapshot_chunks = md_Snapshot.Fields().ByName("chunks") - fd_Snapshot_hash = md_Snapshot.Fields().ByName("hash") - fd_Snapshot_metadata = md_Snapshot.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_Snapshot)(nil) - -type fastReflection_Snapshot Snapshot - -func (x *Snapshot) ProtoReflect() protoreflect.Message { - return (*fastReflection_Snapshot)(x) -} - -func (x *Snapshot) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_abci_types_proto_msgTypes[43] - 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_Snapshot_messageType fastReflection_Snapshot_messageType -var _ protoreflect.MessageType = fastReflection_Snapshot_messageType{} - -type fastReflection_Snapshot_messageType struct{} - -func (x fastReflection_Snapshot_messageType) Zero() protoreflect.Message { - return (*fastReflection_Snapshot)(nil) -} -func (x fastReflection_Snapshot_messageType) New() protoreflect.Message { - return new(fastReflection_Snapshot) -} -func (x fastReflection_Snapshot_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Snapshot -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Snapshot) Descriptor() protoreflect.MessageDescriptor { - return md_Snapshot -} - -// 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_Snapshot) Type() protoreflect.MessageType { - return _fastReflection_Snapshot_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Snapshot) New() protoreflect.Message { - return new(fastReflection_Snapshot) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Snapshot) Interface() protoreflect.ProtoMessage { - return (*Snapshot)(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_Snapshot) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != uint64(0) { - value := protoreflect.ValueOfUint64(x.Height) - if !f(fd_Snapshot_height, value) { - return - } - } - if x.Format != uint32(0) { - value := protoreflect.ValueOfUint32(x.Format) - if !f(fd_Snapshot_format, value) { - return - } - } - if x.Chunks != uint32(0) { - value := protoreflect.ValueOfUint32(x.Chunks) - if !f(fd_Snapshot_chunks, value) { - return - } - } - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_Snapshot_hash, value) { - return - } - } - if len(x.Metadata) != 0 { - value := protoreflect.ValueOfBytes(x.Metadata) - if !f(fd_Snapshot_metadata, 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_Snapshot) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.abci.Snapshot.height": - return x.Height != uint64(0) - case "tendermint.abci.Snapshot.format": - return x.Format != uint32(0) - case "tendermint.abci.Snapshot.chunks": - return x.Chunks != uint32(0) - case "tendermint.abci.Snapshot.hash": - return len(x.Hash) != 0 - case "tendermint.abci.Snapshot.metadata": - return len(x.Metadata) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Snapshot")) - } - panic(fmt.Errorf("message tendermint.abci.Snapshot 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_Snapshot) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.abci.Snapshot.height": - x.Height = uint64(0) - case "tendermint.abci.Snapshot.format": - x.Format = uint32(0) - case "tendermint.abci.Snapshot.chunks": - x.Chunks = uint32(0) - case "tendermint.abci.Snapshot.hash": - x.Hash = nil - case "tendermint.abci.Snapshot.metadata": - x.Metadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Snapshot")) - } - panic(fmt.Errorf("message tendermint.abci.Snapshot 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_Snapshot) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.abci.Snapshot.height": - value := x.Height - return protoreflect.ValueOfUint64(value) - case "tendermint.abci.Snapshot.format": - value := x.Format - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.Snapshot.chunks": - value := x.Chunks - return protoreflect.ValueOfUint32(value) - case "tendermint.abci.Snapshot.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - case "tendermint.abci.Snapshot.metadata": - value := x.Metadata - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Snapshot")) - } - panic(fmt.Errorf("message tendermint.abci.Snapshot 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_Snapshot) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.abci.Snapshot.height": - x.Height = value.Uint() - case "tendermint.abci.Snapshot.format": - x.Format = uint32(value.Uint()) - case "tendermint.abci.Snapshot.chunks": - x.Chunks = uint32(value.Uint()) - case "tendermint.abci.Snapshot.hash": - x.Hash = value.Bytes() - case "tendermint.abci.Snapshot.metadata": - x.Metadata = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Snapshot")) - } - panic(fmt.Errorf("message tendermint.abci.Snapshot 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_Snapshot) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Snapshot.height": - panic(fmt.Errorf("field height of message tendermint.abci.Snapshot is not mutable")) - case "tendermint.abci.Snapshot.format": - panic(fmt.Errorf("field format of message tendermint.abci.Snapshot is not mutable")) - case "tendermint.abci.Snapshot.chunks": - panic(fmt.Errorf("field chunks of message tendermint.abci.Snapshot is not mutable")) - case "tendermint.abci.Snapshot.hash": - panic(fmt.Errorf("field hash of message tendermint.abci.Snapshot is not mutable")) - case "tendermint.abci.Snapshot.metadata": - panic(fmt.Errorf("field metadata of message tendermint.abci.Snapshot is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Snapshot")) - } - panic(fmt.Errorf("message tendermint.abci.Snapshot 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_Snapshot) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.abci.Snapshot.height": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.abci.Snapshot.format": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.Snapshot.chunks": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.abci.Snapshot.hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.abci.Snapshot.metadata": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.abci.Snapshot")) - } - panic(fmt.Errorf("message tendermint.abci.Snapshot 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_Snapshot) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.abci.Snapshot", 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_Snapshot) 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_Snapshot) 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_Snapshot) 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_Snapshot) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Snapshot) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Format != 0 { - n += 1 + runtime.Sov(uint64(x.Format)) - } - if x.Chunks != 0 { - n += 1 + runtime.Sov(uint64(x.Chunks)) - } - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Snapshot) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x2a - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0x22 - } - if x.Chunks != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Chunks)) - i-- - dAtA[i] = 0x18 - } - if x.Format != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Format)) - i-- - dAtA[i] = 0x10 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Snapshot) - 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: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - x.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - x.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Metadata = append(x.Metadata[:0], dAtA[iNdEx:postIndex]...) - if x.Metadata == nil { - x.Metadata = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/abci/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CheckTxType int32 - -const ( - CheckTxType_NEW CheckTxType = 0 - CheckTxType_RECHECK CheckTxType = 1 -) - -// Enum value maps for CheckTxType. -var ( - CheckTxType_name = map[int32]string{ - 0: "NEW", - 1: "RECHECK", - } - CheckTxType_value = map[string]int32{ - "NEW": 0, - "RECHECK": 1, - } -) - -func (x CheckTxType) Enum() *CheckTxType { - p := new(CheckTxType) - *p = x - return p -} - -func (x CheckTxType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CheckTxType) Descriptor() protoreflect.EnumDescriptor { - return file_tendermint_abci_types_proto_enumTypes[0].Descriptor() -} - -func (CheckTxType) Type() protoreflect.EnumType { - return &file_tendermint_abci_types_proto_enumTypes[0] -} - -func (x CheckTxType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CheckTxType.Descriptor instead. -func (CheckTxType) EnumDescriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{0} -} - -type EvidenceType int32 - -const ( - EvidenceType_UNKNOWN EvidenceType = 0 - EvidenceType_DUPLICATE_VOTE EvidenceType = 1 - EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2 -) - -// Enum value maps for EvidenceType. -var ( - EvidenceType_name = map[int32]string{ - 0: "UNKNOWN", - 1: "DUPLICATE_VOTE", - 2: "LIGHT_CLIENT_ATTACK", - } - EvidenceType_value = map[string]int32{ - "UNKNOWN": 0, - "DUPLICATE_VOTE": 1, - "LIGHT_CLIENT_ATTACK": 2, - } -) - -func (x EvidenceType) Enum() *EvidenceType { - p := new(EvidenceType) - *p = x - return p -} - -func (x EvidenceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EvidenceType) Descriptor() protoreflect.EnumDescriptor { - return file_tendermint_abci_types_proto_enumTypes[1].Descriptor() -} - -func (EvidenceType) Type() protoreflect.EnumType { - return &file_tendermint_abci_types_proto_enumTypes[1] -} - -func (x EvidenceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use EvidenceType.Descriptor instead. -func (EvidenceType) EnumDescriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{1} -} - -type ResponseOfferSnapshot_Result int32 - -const ( - ResponseOfferSnapshot_UNKNOWN ResponseOfferSnapshot_Result = 0 // Unknown result, abort all snapshot restoration - ResponseOfferSnapshot_ACCEPT ResponseOfferSnapshot_Result = 1 // Snapshot accepted, apply chunks - ResponseOfferSnapshot_ABORT ResponseOfferSnapshot_Result = 2 // Abort all snapshot restoration - ResponseOfferSnapshot_REJECT ResponseOfferSnapshot_Result = 3 // Reject this specific snapshot, try others - ResponseOfferSnapshot_REJECT_FORMAT ResponseOfferSnapshot_Result = 4 // Reject all snapshots of this format, try others - ResponseOfferSnapshot_REJECT_SENDER ResponseOfferSnapshot_Result = 5 // Reject all snapshots from the sender(s), try others -) - -// Enum value maps for ResponseOfferSnapshot_Result. -var ( - ResponseOfferSnapshot_Result_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ACCEPT", - 2: "ABORT", - 3: "REJECT", - 4: "REJECT_FORMAT", - 5: "REJECT_SENDER", - } - ResponseOfferSnapshot_Result_value = map[string]int32{ - "UNKNOWN": 0, - "ACCEPT": 1, - "ABORT": 2, - "REJECT": 3, - "REJECT_FORMAT": 4, - "REJECT_SENDER": 5, - } -) - -func (x ResponseOfferSnapshot_Result) Enum() *ResponseOfferSnapshot_Result { - p := new(ResponseOfferSnapshot_Result) - *p = x - return p -} - -func (x ResponseOfferSnapshot_Result) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ResponseOfferSnapshot_Result) Descriptor() protoreflect.EnumDescriptor { - return file_tendermint_abci_types_proto_enumTypes[2].Descriptor() -} - -func (ResponseOfferSnapshot_Result) Type() protoreflect.EnumType { - return &file_tendermint_abci_types_proto_enumTypes[2] -} - -func (x ResponseOfferSnapshot_Result) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ResponseOfferSnapshot_Result.Descriptor instead. -func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{30, 0} -} - -type ResponseApplySnapshotChunk_Result int32 - -const ( - ResponseApplySnapshotChunk_UNKNOWN ResponseApplySnapshotChunk_Result = 0 // Unknown result, abort all snapshot restoration - ResponseApplySnapshotChunk_ACCEPT ResponseApplySnapshotChunk_Result = 1 // Chunk successfully accepted - ResponseApplySnapshotChunk_ABORT ResponseApplySnapshotChunk_Result = 2 // Abort all snapshot restoration - ResponseApplySnapshotChunk_RETRY ResponseApplySnapshotChunk_Result = 3 // Retry chunk (combine with refetch and reject) - ResponseApplySnapshotChunk_RETRY_SNAPSHOT ResponseApplySnapshotChunk_Result = 4 // Retry snapshot (combine with refetch and reject) - ResponseApplySnapshotChunk_REJECT_SNAPSHOT ResponseApplySnapshotChunk_Result = 5 // Reject this snapshot, try others -) - -// Enum value maps for ResponseApplySnapshotChunk_Result. -var ( - ResponseApplySnapshotChunk_Result_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ACCEPT", - 2: "ABORT", - 3: "RETRY", - 4: "RETRY_SNAPSHOT", - 5: "REJECT_SNAPSHOT", - } - ResponseApplySnapshotChunk_Result_value = map[string]int32{ - "UNKNOWN": 0, - "ACCEPT": 1, - "ABORT": 2, - "RETRY": 3, - "RETRY_SNAPSHOT": 4, - "REJECT_SNAPSHOT": 5, - } -) - -func (x ResponseApplySnapshotChunk_Result) Enum() *ResponseApplySnapshotChunk_Result { - p := new(ResponseApplySnapshotChunk_Result) - *p = x - return p -} - -func (x ResponseApplySnapshotChunk_Result) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ResponseApplySnapshotChunk_Result) Descriptor() protoreflect.EnumDescriptor { - return file_tendermint_abci_types_proto_enumTypes[3].Descriptor() -} - -func (ResponseApplySnapshotChunk_Result) Type() protoreflect.EnumType { - return &file_tendermint_abci_types_proto_enumTypes[3] -} - -func (x ResponseApplySnapshotChunk_Result) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ResponseApplySnapshotChunk_Result.Descriptor instead. -func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{32, 0} -} - -type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Value: - // *Request_Echo - // *Request_Flush - // *Request_Info - // *Request_SetOption - // *Request_InitChain - // *Request_Query - // *Request_BeginBlock - // *Request_CheckTx - // *Request_DeliverTx - // *Request_EndBlock - // *Request_Commit - // *Request_ListSnapshots - // *Request_OfferSnapshot - // *Request_LoadSnapshotChunk - // *Request_ApplySnapshotChunk - Value isRequest_Value `protobuf_oneof:"value"` -} - -func (x *Request) Reset() { - *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request) ProtoMessage() {} - -// Deprecated: Use Request.ProtoReflect.Descriptor instead. -func (*Request) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{0} -} - -func (x *Request) GetValue() isRequest_Value { - if x != nil { - return x.Value - } - return nil -} - -func (x *Request) GetEcho() *RequestEcho { - if x, ok := x.GetValue().(*Request_Echo); ok { - return x.Echo - } - return nil -} - -func (x *Request) GetFlush() *RequestFlush { - if x, ok := x.GetValue().(*Request_Flush); ok { - return x.Flush - } - return nil -} - -func (x *Request) GetInfo() *RequestInfo { - if x, ok := x.GetValue().(*Request_Info); ok { - return x.Info - } - return nil -} - -func (x *Request) GetSetOption() *RequestSetOption { - if x, ok := x.GetValue().(*Request_SetOption); ok { - return x.SetOption - } - return nil -} - -func (x *Request) GetInitChain() *RequestInitChain { - if x, ok := x.GetValue().(*Request_InitChain); ok { - return x.InitChain - } - return nil -} - -func (x *Request) GetQuery() *RequestQuery { - if x, ok := x.GetValue().(*Request_Query); ok { - return x.Query - } - return nil -} - -func (x *Request) GetBeginBlock() *RequestBeginBlock { - if x, ok := x.GetValue().(*Request_BeginBlock); ok { - return x.BeginBlock - } - return nil -} - -func (x *Request) GetCheckTx() *RequestCheckTx { - if x, ok := x.GetValue().(*Request_CheckTx); ok { - return x.CheckTx - } - return nil -} - -func (x *Request) GetDeliverTx() *RequestDeliverTx { - if x, ok := x.GetValue().(*Request_DeliverTx); ok { - return x.DeliverTx - } - return nil -} - -func (x *Request) GetEndBlock() *RequestEndBlock { - if x, ok := x.GetValue().(*Request_EndBlock); ok { - return x.EndBlock - } - return nil -} - -func (x *Request) GetCommit() *RequestCommit { - if x, ok := x.GetValue().(*Request_Commit); ok { - return x.Commit - } - return nil -} - -func (x *Request) GetListSnapshots() *RequestListSnapshots { - if x, ok := x.GetValue().(*Request_ListSnapshots); ok { - return x.ListSnapshots - } - return nil -} - -func (x *Request) GetOfferSnapshot() *RequestOfferSnapshot { - if x, ok := x.GetValue().(*Request_OfferSnapshot); ok { - return x.OfferSnapshot - } - return nil -} - -func (x *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk { - if x, ok := x.GetValue().(*Request_LoadSnapshotChunk); ok { - return x.LoadSnapshotChunk - } - return nil -} - -func (x *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk { - if x, ok := x.GetValue().(*Request_ApplySnapshotChunk); ok { - return x.ApplySnapshotChunk - } - return nil -} - -type isRequest_Value interface { - isRequest_Value() -} - -type Request_Echo struct { - Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof"` -} - -type Request_Flush struct { - Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof"` -} - -type Request_Info struct { - Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof"` -} - -type Request_SetOption struct { - SetOption *RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,proto3,oneof"` -} - -type Request_InitChain struct { - InitChain *RequestInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof"` -} - -type Request_Query struct { - Query *RequestQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof"` -} - -type Request_BeginBlock struct { - BeginBlock *RequestBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof"` -} - -type Request_CheckTx struct { - CheckTx *RequestCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof"` -} - -type Request_DeliverTx struct { - DeliverTx *RequestDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof"` -} - -type Request_EndBlock struct { - EndBlock *RequestEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof"` -} - -type Request_Commit struct { - Commit *RequestCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof"` -} - -type Request_ListSnapshots struct { - ListSnapshots *RequestListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof"` -} - -type Request_OfferSnapshot struct { - OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof"` -} - -type Request_LoadSnapshotChunk struct { - LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof"` -} - -type Request_ApplySnapshotChunk struct { - ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof"` -} - -func (*Request_Echo) isRequest_Value() {} - -func (*Request_Flush) isRequest_Value() {} - -func (*Request_Info) isRequest_Value() {} - -func (*Request_SetOption) isRequest_Value() {} - -func (*Request_InitChain) isRequest_Value() {} - -func (*Request_Query) isRequest_Value() {} - -func (*Request_BeginBlock) isRequest_Value() {} - -func (*Request_CheckTx) isRequest_Value() {} - -func (*Request_DeliverTx) isRequest_Value() {} - -func (*Request_EndBlock) isRequest_Value() {} - -func (*Request_Commit) isRequest_Value() {} - -func (*Request_ListSnapshots) isRequest_Value() {} - -func (*Request_OfferSnapshot) isRequest_Value() {} - -func (*Request_LoadSnapshotChunk) isRequest_Value() {} - -func (*Request_ApplySnapshotChunk) isRequest_Value() {} - -type RequestEcho struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *RequestEcho) Reset() { - *x = RequestEcho{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestEcho) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestEcho) ProtoMessage() {} - -// Deprecated: Use RequestEcho.ProtoReflect.Descriptor instead. -func (*RequestEcho) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{1} -} - -func (x *RequestEcho) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type RequestFlush struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RequestFlush) Reset() { - *x = RequestFlush{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestFlush) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestFlush) ProtoMessage() {} - -// Deprecated: Use RequestFlush.ProtoReflect.Descriptor instead. -func (*RequestFlush) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{2} -} - -type RequestInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"` - P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"` -} - -func (x *RequestInfo) Reset() { - *x = RequestInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestInfo) ProtoMessage() {} - -// Deprecated: Use RequestInfo.ProtoReflect.Descriptor instead. -func (*RequestInfo) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{3} -} - -func (x *RequestInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *RequestInfo) GetBlockVersion() uint64 { - if x != nil { - return x.BlockVersion - } - return 0 -} - -func (x *RequestInfo) GetP2PVersion() uint64 { - if x != nil { - return x.P2PVersion - } - return 0 -} - -// nondeterministic -type RequestSetOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *RequestSetOption) Reset() { - *x = RequestSetOption{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestSetOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestSetOption) ProtoMessage() {} - -// Deprecated: Use RequestSetOption.ProtoReflect.Descriptor instead. -func (*RequestSetOption) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{4} -} - -func (x *RequestSetOption) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *RequestSetOption) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type RequestInitChain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"` - Validators []*ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators,omitempty"` - AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"` - InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` -} - -func (x *RequestInitChain) Reset() { - *x = RequestInitChain{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestInitChain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestInitChain) ProtoMessage() {} - -// Deprecated: Use RequestInitChain.ProtoReflect.Descriptor instead. -func (*RequestInitChain) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{5} -} - -func (x *RequestInitChain) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *RequestInitChain) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *RequestInitChain) GetConsensusParams() *ConsensusParams { - if x != nil { - return x.ConsensusParams - } - return nil -} - -func (x *RequestInitChain) GetValidators() []*ValidatorUpdate { - if x != nil { - return x.Validators - } - return nil -} - -func (x *RequestInitChain) GetAppStateBytes() []byte { - if x != nil { - return x.AppStateBytes - } - return nil -} - -func (x *RequestInitChain) GetInitialHeight() int64 { - if x != nil { - return x.InitialHeight - } - return 0 -} - -type RequestQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` -} - -func (x *RequestQuery) Reset() { - *x = RequestQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestQuery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestQuery) ProtoMessage() {} - -// Deprecated: Use RequestQuery.ProtoReflect.Descriptor instead. -func (*RequestQuery) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{6} -} - -func (x *RequestQuery) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *RequestQuery) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *RequestQuery) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *RequestQuery) GetProve() bool { - if x != nil { - return x.Prove - } - return false -} - -type RequestBeginBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header *types.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` - LastCommitInfo *LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info,omitempty"` - ByzantineValidators []*Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators,omitempty"` -} - -func (x *RequestBeginBlock) Reset() { - *x = RequestBeginBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestBeginBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestBeginBlock) ProtoMessage() {} - -// Deprecated: Use RequestBeginBlock.ProtoReflect.Descriptor instead. -func (*RequestBeginBlock) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{7} -} - -func (x *RequestBeginBlock) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *RequestBeginBlock) GetHeader() *types.Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *RequestBeginBlock) GetLastCommitInfo() *LastCommitInfo { - if x != nil { - return x.LastCommitInfo - } - return nil -} - -func (x *RequestBeginBlock) GetByzantineValidators() []*Evidence { - if x != nil { - return x.ByzantineValidators - } - return nil -} - -type RequestCheckTx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - Type_ CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"` -} - -func (x *RequestCheckTx) Reset() { - *x = RequestCheckTx{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestCheckTx) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestCheckTx) ProtoMessage() {} - -// Deprecated: Use RequestCheckTx.ProtoReflect.Descriptor instead. -func (*RequestCheckTx) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{8} -} - -func (x *RequestCheckTx) GetTx() []byte { - if x != nil { - return x.Tx - } - return nil -} - -func (x *RequestCheckTx) GetType_() CheckTxType { - if x != nil { - return x.Type_ - } - return CheckTxType_NEW -} - -type RequestDeliverTx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (x *RequestDeliverTx) Reset() { - *x = RequestDeliverTx{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestDeliverTx) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestDeliverTx) ProtoMessage() {} - -// Deprecated: Use RequestDeliverTx.ProtoReflect.Descriptor instead. -func (*RequestDeliverTx) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{9} -} - -func (x *RequestDeliverTx) GetTx() []byte { - if x != nil { - return x.Tx - } - return nil -} - -type RequestEndBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *RequestEndBlock) Reset() { - *x = RequestEndBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestEndBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestEndBlock) ProtoMessage() {} - -// Deprecated: Use RequestEndBlock.ProtoReflect.Descriptor instead. -func (*RequestEndBlock) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{10} -} - -func (x *RequestEndBlock) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -type RequestCommit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RequestCommit) Reset() { - *x = RequestCommit{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestCommit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestCommit) ProtoMessage() {} - -// Deprecated: Use RequestCommit.ProtoReflect.Descriptor instead. -func (*RequestCommit) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{11} -} - -// lists available snapshots -type RequestListSnapshots struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RequestListSnapshots) Reset() { - *x = RequestListSnapshots{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestListSnapshots) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestListSnapshots) ProtoMessage() {} - -// Deprecated: Use RequestListSnapshots.ProtoReflect.Descriptor instead. -func (*RequestListSnapshots) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{12} -} - -// offers a snapshot to the application -type RequestOfferSnapshot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` // snapshot offered by peers - AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` // light client-verified app hash for snapshot height -} - -func (x *RequestOfferSnapshot) Reset() { - *x = RequestOfferSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestOfferSnapshot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestOfferSnapshot) ProtoMessage() {} - -// Deprecated: Use RequestOfferSnapshot.ProtoReflect.Descriptor instead. -func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{13} -} - -func (x *RequestOfferSnapshot) GetSnapshot() *Snapshot { - if x != nil { - return x.Snapshot - } - return nil -} - -func (x *RequestOfferSnapshot) GetAppHash() []byte { - if x != nil { - return x.AppHash - } - return nil -} - -// loads a snapshot chunk -type RequestLoadSnapshotChunk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"` -} - -func (x *RequestLoadSnapshotChunk) Reset() { - *x = RequestLoadSnapshotChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestLoadSnapshotChunk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestLoadSnapshotChunk) ProtoMessage() {} - -// Deprecated: Use RequestLoadSnapshotChunk.ProtoReflect.Descriptor instead. -func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{14} -} - -func (x *RequestLoadSnapshotChunk) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *RequestLoadSnapshotChunk) GetFormat() uint32 { - if x != nil { - return x.Format - } - return 0 -} - -func (x *RequestLoadSnapshotChunk) GetChunk() uint32 { - if x != nil { - return x.Chunk - } - return 0 -} - -// Applies a snapshot chunk -type RequestApplySnapshotChunk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` -} - -func (x *RequestApplySnapshotChunk) Reset() { - *x = RequestApplySnapshotChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestApplySnapshotChunk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestApplySnapshotChunk) ProtoMessage() {} - -// Deprecated: Use RequestApplySnapshotChunk.ProtoReflect.Descriptor instead. -func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{15} -} - -func (x *RequestApplySnapshotChunk) GetIndex() uint32 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *RequestApplySnapshotChunk) GetChunk() []byte { - if x != nil { - return x.Chunk - } - return nil -} - -func (x *RequestApplySnapshotChunk) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Value: - // *Response_Exception - // *Response_Echo - // *Response_Flush - // *Response_Info - // *Response_SetOption - // *Response_InitChain - // *Response_Query - // *Response_BeginBlock - // *Response_CheckTx - // *Response_DeliverTx - // *Response_EndBlock - // *Response_Commit - // *Response_ListSnapshots - // *Response_OfferSnapshot - // *Response_LoadSnapshotChunk - // *Response_ApplySnapshotChunk - Value isResponse_Value `protobuf_oneof:"value"` -} - -func (x *Response) Reset() { - *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{16} -} - -func (x *Response) GetValue() isResponse_Value { - if x != nil { - return x.Value - } - return nil -} - -func (x *Response) GetException() *ResponseException { - if x, ok := x.GetValue().(*Response_Exception); ok { - return x.Exception - } - return nil -} - -func (x *Response) GetEcho() *ResponseEcho { - if x, ok := x.GetValue().(*Response_Echo); ok { - return x.Echo - } - return nil -} - -func (x *Response) GetFlush() *ResponseFlush { - if x, ok := x.GetValue().(*Response_Flush); ok { - return x.Flush - } - return nil -} - -func (x *Response) GetInfo() *ResponseInfo { - if x, ok := x.GetValue().(*Response_Info); ok { - return x.Info - } - return nil -} - -func (x *Response) GetSetOption() *ResponseSetOption { - if x, ok := x.GetValue().(*Response_SetOption); ok { - return x.SetOption - } - return nil -} - -func (x *Response) GetInitChain() *ResponseInitChain { - if x, ok := x.GetValue().(*Response_InitChain); ok { - return x.InitChain - } - return nil -} - -func (x *Response) GetQuery() *ResponseQuery { - if x, ok := x.GetValue().(*Response_Query); ok { - return x.Query - } - return nil -} - -func (x *Response) GetBeginBlock() *ResponseBeginBlock { - if x, ok := x.GetValue().(*Response_BeginBlock); ok { - return x.BeginBlock - } - return nil -} - -func (x *Response) GetCheckTx() *ResponseCheckTx { - if x, ok := x.GetValue().(*Response_CheckTx); ok { - return x.CheckTx - } - return nil -} - -func (x *Response) GetDeliverTx() *ResponseDeliverTx { - if x, ok := x.GetValue().(*Response_DeliverTx); ok { - return x.DeliverTx - } - return nil -} - -func (x *Response) GetEndBlock() *ResponseEndBlock { - if x, ok := x.GetValue().(*Response_EndBlock); ok { - return x.EndBlock - } - return nil -} - -func (x *Response) GetCommit() *ResponseCommit { - if x, ok := x.GetValue().(*Response_Commit); ok { - return x.Commit - } - return nil -} - -func (x *Response) GetListSnapshots() *ResponseListSnapshots { - if x, ok := x.GetValue().(*Response_ListSnapshots); ok { - return x.ListSnapshots - } - return nil -} - -func (x *Response) GetOfferSnapshot() *ResponseOfferSnapshot { - if x, ok := x.GetValue().(*Response_OfferSnapshot); ok { - return x.OfferSnapshot - } - return nil -} - -func (x *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk { - if x, ok := x.GetValue().(*Response_LoadSnapshotChunk); ok { - return x.LoadSnapshotChunk - } - return nil -} - -func (x *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk { - if x, ok := x.GetValue().(*Response_ApplySnapshotChunk); ok { - return x.ApplySnapshotChunk - } - return nil -} - -type isResponse_Value interface { - isResponse_Value() -} - -type Response_Exception struct { - Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof"` -} - -type Response_Echo struct { - Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof"` -} - -type Response_Flush struct { - Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof"` -} - -type Response_Info struct { - Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof"` -} - -type Response_SetOption struct { - SetOption *ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,proto3,oneof"` -} - -type Response_InitChain struct { - InitChain *ResponseInitChain `protobuf:"bytes,6,opt,name=init_chain,json=initChain,proto3,oneof"` -} - -type Response_Query struct { - Query *ResponseQuery `protobuf:"bytes,7,opt,name=query,proto3,oneof"` -} - -type Response_BeginBlock struct { - BeginBlock *ResponseBeginBlock `protobuf:"bytes,8,opt,name=begin_block,json=beginBlock,proto3,oneof"` -} - -type Response_CheckTx struct { - CheckTx *ResponseCheckTx `protobuf:"bytes,9,opt,name=check_tx,json=checkTx,proto3,oneof"` -} - -type Response_DeliverTx struct { - DeliverTx *ResponseDeliverTx `protobuf:"bytes,10,opt,name=deliver_tx,json=deliverTx,proto3,oneof"` -} - -type Response_EndBlock struct { - EndBlock *ResponseEndBlock `protobuf:"bytes,11,opt,name=end_block,json=endBlock,proto3,oneof"` -} - -type Response_Commit struct { - Commit *ResponseCommit `protobuf:"bytes,12,opt,name=commit,proto3,oneof"` -} - -type Response_ListSnapshots struct { - ListSnapshots *ResponseListSnapshots `protobuf:"bytes,13,opt,name=list_snapshots,json=listSnapshots,proto3,oneof"` -} - -type Response_OfferSnapshot struct { - OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,14,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof"` -} - -type Response_LoadSnapshotChunk struct { - LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,15,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof"` -} - -type Response_ApplySnapshotChunk struct { - ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,16,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof"` -} - -func (*Response_Exception) isResponse_Value() {} - -func (*Response_Echo) isResponse_Value() {} - -func (*Response_Flush) isResponse_Value() {} - -func (*Response_Info) isResponse_Value() {} - -func (*Response_SetOption) isResponse_Value() {} - -func (*Response_InitChain) isResponse_Value() {} - -func (*Response_Query) isResponse_Value() {} - -func (*Response_BeginBlock) isResponse_Value() {} - -func (*Response_CheckTx) isResponse_Value() {} - -func (*Response_DeliverTx) isResponse_Value() {} - -func (*Response_EndBlock) isResponse_Value() {} - -func (*Response_Commit) isResponse_Value() {} - -func (*Response_ListSnapshots) isResponse_Value() {} - -func (*Response_OfferSnapshot) isResponse_Value() {} - -func (*Response_LoadSnapshotChunk) isResponse_Value() {} - -func (*Response_ApplySnapshotChunk) isResponse_Value() {} - -// nondeterministic -type ResponseException struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ResponseException) Reset() { - *x = ResponseException{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseException) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseException) ProtoMessage() {} - -// Deprecated: Use ResponseException.ProtoReflect.Descriptor instead. -func (*ResponseException) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{17} -} - -func (x *ResponseException) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type ResponseEcho struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *ResponseEcho) Reset() { - *x = ResponseEcho{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseEcho) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseEcho) ProtoMessage() {} - -// Deprecated: Use ResponseEcho.ProtoReflect.Descriptor instead. -func (*ResponseEcho) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{18} -} - -func (x *ResponseEcho) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type ResponseFlush struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ResponseFlush) Reset() { - *x = ResponseFlush{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseFlush) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseFlush) ProtoMessage() {} - -// Deprecated: Use ResponseFlush.ProtoReflect.Descriptor instead. -func (*ResponseFlush) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{19} -} - -type ResponseInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` - LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` - LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"` -} - -func (x *ResponseInfo) Reset() { - *x = ResponseInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseInfo) ProtoMessage() {} - -// Deprecated: Use ResponseInfo.ProtoReflect.Descriptor instead. -func (*ResponseInfo) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{20} -} - -func (x *ResponseInfo) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *ResponseInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *ResponseInfo) GetAppVersion() uint64 { - if x != nil { - return x.AppVersion - } - return 0 -} - -func (x *ResponseInfo) GetLastBlockHeight() int64 { - if x != nil { - return x.LastBlockHeight - } - return 0 -} - -func (x *ResponseInfo) GetLastBlockAppHash() []byte { - if x != nil { - return x.LastBlockAppHash - } - return nil -} - -// nondeterministic -type ResponseSetOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // bytes data = 2; - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` -} - -func (x *ResponseSetOption) Reset() { - *x = ResponseSetOption{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseSetOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseSetOption) ProtoMessage() {} - -// Deprecated: Use ResponseSetOption.ProtoReflect.Descriptor instead. -func (*ResponseSetOption) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{21} -} - -func (x *ResponseSetOption) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ResponseSetOption) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ResponseSetOption) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -type ResponseInitChain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"` - Validators []*ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -func (x *ResponseInitChain) Reset() { - *x = ResponseInitChain{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseInitChain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseInitChain) ProtoMessage() {} - -// Deprecated: Use ResponseInitChain.ProtoReflect.Descriptor instead. -func (*ResponseInitChain) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{22} -} - -func (x *ResponseInitChain) GetConsensusParams() *ConsensusParams { - if x != nil { - return x.ConsensusParams - } - return nil -} - -func (x *ResponseInitChain) GetValidators() []*ValidatorUpdate { - if x != nil { - return x.Validators - } - return nil -} - -func (x *ResponseInitChain) GetAppHash() []byte { - if x != nil { - return x.AppHash - } - return nil -} - -type ResponseQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // bytes data = 2; // use "value" instead. - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic - Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` - Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (x *ResponseQuery) Reset() { - *x = ResponseQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseQuery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseQuery) ProtoMessage() {} - -// Deprecated: Use ResponseQuery.ProtoReflect.Descriptor instead. -func (*ResponseQuery) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{23} -} - -func (x *ResponseQuery) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ResponseQuery) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ResponseQuery) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *ResponseQuery) GetIndex() int64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *ResponseQuery) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ResponseQuery) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *ResponseQuery) GetProofOps() *crypto.ProofOps { - if x != nil { - return x.ProofOps - } - return nil -} - -func (x *ResponseQuery) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ResponseQuery) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -type ResponseBeginBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *ResponseBeginBlock) Reset() { - *x = ResponseBeginBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseBeginBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseBeginBlock) ProtoMessage() {} - -// Deprecated: Use ResponseBeginBlock.ProtoReflect.Descriptor instead. -func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{24} -} - -func (x *ResponseBeginBlock) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -type ResponseCheckTx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (x *ResponseCheckTx) Reset() { - *x = ResponseCheckTx{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseCheckTx) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseCheckTx) ProtoMessage() {} - -// Deprecated: Use ResponseCheckTx.ProtoReflect.Descriptor instead. -func (*ResponseCheckTx) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{25} -} - -func (x *ResponseCheckTx) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ResponseCheckTx) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ResponseCheckTx) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ResponseCheckTx) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *ResponseCheckTx) GetGasWanted() int64 { - if x != nil { - return x.GasWanted - } - return 0 -} - -func (x *ResponseCheckTx) GetGasUsed() int64 { - if x != nil { - return x.GasUsed - } - return 0 -} - -func (x *ResponseCheckTx) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -func (x *ResponseCheckTx) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -type ResponseDeliverTx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (x *ResponseDeliverTx) Reset() { - *x = ResponseDeliverTx{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseDeliverTx) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseDeliverTx) ProtoMessage() {} - -// Deprecated: Use ResponseDeliverTx.ProtoReflect.Descriptor instead. -func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{26} -} - -func (x *ResponseDeliverTx) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ResponseDeliverTx) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ResponseDeliverTx) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ResponseDeliverTx) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *ResponseDeliverTx) GetGasWanted() int64 { - if x != nil { - return x.GasWanted - } - return 0 -} - -func (x *ResponseDeliverTx) GetGasUsed() int64 { - if x != nil { - return x.GasUsed - } - return 0 -} - -func (x *ResponseDeliverTx) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -func (x *ResponseDeliverTx) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -type ResponseEndBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` - ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` - Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *ResponseEndBlock) Reset() { - *x = ResponseEndBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseEndBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseEndBlock) ProtoMessage() {} - -// Deprecated: Use ResponseEndBlock.ProtoReflect.Descriptor instead. -func (*ResponseEndBlock) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{27} -} - -func (x *ResponseEndBlock) GetValidatorUpdates() []*ValidatorUpdate { - if x != nil { - return x.ValidatorUpdates - } - return nil -} - -func (x *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams { - if x != nil { - return x.ConsensusParamUpdates - } - return nil -} - -func (x *ResponseEndBlock) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -type ResponseCommit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // reserve 1 - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"` -} - -func (x *ResponseCommit) Reset() { - *x = ResponseCommit{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseCommit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseCommit) ProtoMessage() {} - -// Deprecated: Use ResponseCommit.ProtoReflect.Descriptor instead. -func (*ResponseCommit) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{28} -} - -func (x *ResponseCommit) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ResponseCommit) GetRetainHeight() int64 { - if x != nil { - return x.RetainHeight - } - return 0 -} - -type ResponseListSnapshots struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` -} - -func (x *ResponseListSnapshots) Reset() { - *x = ResponseListSnapshots{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseListSnapshots) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseListSnapshots) ProtoMessage() {} - -// Deprecated: Use ResponseListSnapshots.ProtoReflect.Descriptor instead. -func (*ResponseListSnapshots) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{29} -} - -func (x *ResponseListSnapshots) GetSnapshots() []*Snapshot { - if x != nil { - return x.Snapshots - } - return nil -} - -type ResponseOfferSnapshot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"` -} - -func (x *ResponseOfferSnapshot) Reset() { - *x = ResponseOfferSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseOfferSnapshot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseOfferSnapshot) ProtoMessage() {} - -// Deprecated: Use ResponseOfferSnapshot.ProtoReflect.Descriptor instead. -func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{30} -} - -func (x *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result { - if x != nil { - return x.Result - } - return ResponseOfferSnapshot_UNKNOWN -} - -type ResponseLoadSnapshotChunk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` -} - -func (x *ResponseLoadSnapshotChunk) Reset() { - *x = ResponseLoadSnapshotChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseLoadSnapshotChunk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseLoadSnapshotChunk) ProtoMessage() {} - -// Deprecated: Use ResponseLoadSnapshotChunk.ProtoReflect.Descriptor instead. -func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{31} -} - -func (x *ResponseLoadSnapshotChunk) GetChunk() []byte { - if x != nil { - return x.Chunk - } - return nil -} - -type ResponseApplySnapshotChunk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"` - RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"` // Chunks to refetch and reapply - RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"` // Chunk senders to reject and ban -} - -func (x *ResponseApplySnapshotChunk) Reset() { - *x = ResponseApplySnapshotChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseApplySnapshotChunk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseApplySnapshotChunk) ProtoMessage() {} - -// Deprecated: Use ResponseApplySnapshotChunk.ProtoReflect.Descriptor instead. -func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{32} -} - -func (x *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result { - if x != nil { - return x.Result - } - return ResponseApplySnapshotChunk_UNKNOWN -} - -func (x *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 { - if x != nil { - return x.RefetchChunks - } - return nil -} - -func (x *ResponseApplySnapshotChunk) GetRejectSenders() []string { - if x != nil { - return x.RejectSenders - } - return nil -} - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -type ConsensusParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - Evidence *types.EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *types.ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` - Version *types.VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *ConsensusParams) Reset() { - *x = ConsensusParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusParams) ProtoMessage() {} - -// Deprecated: Use ConsensusParams.ProtoReflect.Descriptor instead. -func (*ConsensusParams) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{33} -} - -func (x *ConsensusParams) GetBlock() *BlockParams { - if x != nil { - return x.Block - } - return nil -} - -func (x *ConsensusParams) GetEvidence() *types.EvidenceParams { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *ConsensusParams) GetValidator() *types.ValidatorParams { - if x != nil { - return x.Validator - } - return nil -} - -func (x *ConsensusParams) GetVersion() *types.VersionParams { - if x != nil { - return x.Version - } - return nil -} - -// BlockParams contains limits on the block size. -type BlockParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Note: must be greater than 0 - MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - // Note: must be greater or equal to -1 - MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` -} - -func (x *BlockParams) Reset() { - *x = BlockParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockParams) ProtoMessage() {} - -// Deprecated: Use BlockParams.ProtoReflect.Descriptor instead. -func (*BlockParams) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{34} -} - -func (x *BlockParams) GetMaxBytes() int64 { - if x != nil { - return x.MaxBytes - } - return 0 -} - -func (x *BlockParams) GetMaxGas() int64 { - if x != nil { - return x.MaxGas - } - return 0 -} - -type LastCommitInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` - Votes []*VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` -} - -func (x *LastCommitInfo) Reset() { - *x = LastCommitInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LastCommitInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LastCommitInfo) ProtoMessage() {} - -// Deprecated: Use LastCommitInfo.ProtoReflect.Descriptor instead. -func (*LastCommitInfo) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{35} -} - -func (x *LastCommitInfo) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *LastCommitInfo) GetVotes() []*VoteInfo { - if x != nil { - return x.Votes - } - return nil -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{36} -} - -func (x *Event) GetType_() string { - if x != nil { - return x.Type_ - } - return "" -} - -func (x *Event) GetAttributes() []*EventAttribute { - if x != nil { - return x.Attributes - } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` // nondeterministic -} - -func (x *EventAttribute) Reset() { - *x = EventAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventAttribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventAttribute) ProtoMessage() {} - -// Deprecated: Use EventAttribute.ProtoReflect.Descriptor instead. -func (*EventAttribute) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{37} -} - -func (x *EventAttribute) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *EventAttribute) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *EventAttribute) GetIndex() bool { - if x != nil { - return x.Index - } - return false -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -type TxResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` - Result *ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *TxResult) Reset() { - *x = TxResult{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxResult) ProtoMessage() {} - -// Deprecated: Use TxResult.ProtoReflect.Descriptor instead. -func (*TxResult) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{38} -} - -func (x *TxResult) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *TxResult) GetIndex() uint32 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *TxResult) GetTx() []byte { - if x != nil { - return x.Tx - } - return nil -} - -func (x *TxResult) GetResult() *ResponseDeliverTx { - if x != nil { - return x.Result - } - return nil -} - -// Validator -type Validator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` // The voting power -} - -func (x *Validator) Reset() { - *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Validator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Validator) ProtoMessage() {} - -// Deprecated: Use Validator.ProtoReflect.Descriptor instead. -func (*Validator) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{39} -} - -func (x *Validator) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - -func (x *Validator) GetPower() int64 { - if x != nil { - return x.Power - } - return 0 -} - -// ValidatorUpdate -type ValidatorUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PubKey *crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` -} - -func (x *ValidatorUpdate) Reset() { - *x = ValidatorUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorUpdate) ProtoMessage() {} - -// Deprecated: Use ValidatorUpdate.ProtoReflect.Descriptor instead. -func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{40} -} - -func (x *ValidatorUpdate) GetPubKey() *crypto.PublicKey { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *ValidatorUpdate) GetPower() int64 { - if x != nil { - return x.Power - } - return 0 -} - -// VoteInfo -type VoteInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Validator *Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` - SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"` -} - -func (x *VoteInfo) Reset() { - *x = VoteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VoteInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VoteInfo) ProtoMessage() {} - -// Deprecated: Use VoteInfo.ProtoReflect.Descriptor instead. -func (*VoteInfo) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{41} -} - -func (x *VoteInfo) GetValidator() *Validator { - if x != nil { - return x.Validator - } - return nil -} - -func (x *VoteInfo) GetSignedLastBlock() bool { - if x != nil { - return x.SignedLastBlock - } - return false -} - -type Evidence struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"` - // The offending validator - Validator *Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"` - // The height when the offense occurred - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - // The corresponding time where the offense occurred - Time *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"` - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` -} - -func (x *Evidence) Reset() { - *x = Evidence{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Evidence) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Evidence) ProtoMessage() {} - -// Deprecated: Use Evidence.ProtoReflect.Descriptor instead. -func (*Evidence) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{42} -} - -func (x *Evidence) GetType_() EvidenceType { - if x != nil { - return x.Type_ - } - return EvidenceType_UNKNOWN -} - -func (x *Evidence) GetValidator() *Validator { - if x != nil { - return x.Validator - } - return nil -} - -func (x *Evidence) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Evidence) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *Evidence) GetTotalVotingPower() int64 { - if x != nil { - return x.TotalVotingPower - } - return 0 -} - -type Snapshot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // The height at which the snapshot was taken - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` // The application-specific snapshot format - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` // Number of chunks in the snapshot - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` // Arbitrary snapshot hash, equal only if identical - Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` // Arbitrary application metadata -} - -func (x *Snapshot) Reset() { - *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_abci_types_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Snapshot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Snapshot) ProtoMessage() {} - -// Deprecated: Use Snapshot.ProtoReflect.Descriptor instead. -func (*Snapshot) Descriptor() ([]byte, []int) { - return file_tendermint_abci_types_proto_rawDescGZIP(), []int{43} -} - -func (x *Snapshot) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Snapshot) GetFormat() uint32 { - if x != nil { - return x.Format - } - return 0 -} - -func (x *Snapshot) GetChunks() uint32 { - if x != nil { - return x.Chunks - } - return 0 -} - -func (x *Snapshot) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *Snapshot) GetMetadata() []byte { - if x != nil { - return x.Metadata - } - return nil -} - -var File_tendermint_abci_types_proto protoreflect.FileDescriptor - -var file_tendermint_abci_types_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63, - 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x1a, 0x1d, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x6b, - 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x91, 0x08, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x04, 0x65, - 0x63, 0x68, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x45, 0x63, 0x68, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x12, - 0x35, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x48, 0x00, 0x52, - 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x42, 0x0a, 0x0a, 0x73, 0x65, - 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, - 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x69, 0x74, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x62, 0x65, 0x67, - 0x69, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x3c, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x54, 0x78, 0x48, 0x00, 0x52, 0x07, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x42, - 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x69, - 0x76, 0x65, 0x72, 0x54, 0x78, 0x48, 0x00, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x54, 0x78, 0x12, 0x3f, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, - 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4e, 0x0a, - 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0d, - 0x6c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x4e, 0x0a, - 0x0e, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, - 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x0d, - 0x6f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x5b, 0x0a, - 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, - 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x5e, 0x0a, 0x14, 0x61, 0x70, - 0x70, 0x6c, 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x27, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x63, - 0x68, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0e, 0x0a, 0x0c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x22, 0x6d, 0x0a, 0x0b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x32, - 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x70, 0x32, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x10, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcb, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x04, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, - 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x4b, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0f, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, - 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0d, 0x61, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x64, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x22, 0x84, 0x02, 0x0a, 0x11, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4f, 0x0a, - 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, - 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x52, - 0x0a, 0x14, 0x62, 0x79, 0x7a, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, 0x62, - 0x79, 0x7a, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x22, 0x52, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x02, 0x74, 0x78, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x22, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x78, 0x22, 0x29, 0x0a, 0x0f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0x68, - 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0x60, 0x0a, 0x18, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x5f, 0x0a, 0x19, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, - 0x75, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0xe5, 0x08, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x65, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x04, - 0x65, 0x63, 0x68, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x65, 0x63, 0x68, - 0x6f, 0x12, 0x36, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, - 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x43, - 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x65, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x69, - 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x46, 0x0a, 0x0b, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x65, - 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x48, 0x00, 0x52, 0x07, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x43, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, - 0x65, 0x72, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x48, - 0x00, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x12, 0x40, 0x0a, 0x09, - 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x39, - 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4f, 0x0a, 0x0e, 0x6c, 0x69, 0x73, - 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x69, 0x73, - 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x6f, 0x66, - 0x66, 0x65, 0x72, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, - 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x66, - 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x5c, 0x0a, 0x13, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x5f, 0x0a, 0x14, 0x61, 0x70, 0x70, - 0x6c, 0x79, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x68, 0x75, 0x6e, - 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, - 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x28, - 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x22, 0xb8, 0x01, 0x0a, 0x0c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x61, - 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x70, 0x70, - 0x48, 0x61, 0x73, 0x68, 0x22, 0x4d, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x53, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0xc3, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x4b, 0x0a, 0x10, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0xf7, 0x01, 0x0a, 0x0d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, - 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x6f, 0x70, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x4f, 0x70, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, - 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, - 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, - 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, - 0x64, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, - 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, - 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x85, 0x02, 0x0a, 0x11, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, - 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x8b, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x6e, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x15, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x18, 0xc8, - 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, - 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, - 0x49, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, - 0x74, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x15, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0xbe, 0x01, 0x0a, - 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x5e, 0x0a, - 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, - 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, - 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x10, 0x05, 0x22, 0x31, 0x0a, - 0x19, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, - 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x22, 0x98, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, - 0x4a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x32, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x2e, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, - 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x60, 0x0a, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x54, 0x52, 0x59, - 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x54, 0x52, 0x59, 0x5f, 0x53, 0x4e, 0x41, 0x50, - 0x53, 0x48, 0x4f, 0x54, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x05, 0x22, 0xff, 0x01, 0x0a, 0x0f, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x32, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x39, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, - 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x47, - 0x61, 0x73, 0x22, 0x5d, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x6f, - 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x73, 0x22, 0x7a, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x5d, - 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x42, 0x1c, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x4e, 0x0a, - 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x8a, 0x01, - 0x0a, 0x08, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x78, 0x12, 0x40, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3b, 0x0a, 0x09, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x64, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x70, 0x75, - 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x76, 0x0a, - 0x08, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4c, 0x61, 0x73, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xfd, 0x01, 0x0a, 0x08, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, - 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, - 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x82, 0x01, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x39, 0x0a, 0x0b, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x45, 0x57, - 0x10, 0x00, 0x1a, 0x07, 0x8a, 0x9d, 0x20, 0x03, 0x4e, 0x65, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x52, - 0x45, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x01, 0x1a, 0x0b, 0x8a, 0x9d, 0x20, 0x07, 0x52, 0x65, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2a, 0x48, 0x0a, 0x0c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, - 0x56, 0x4f, 0x54, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, - 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x32, - 0x83, 0x0a, 0x0a, 0x0f, 0x41, 0x42, 0x43, 0x49, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x1c, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, 0x63, 0x68, 0x6f, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x46, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, - 0x68, 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x75, 0x73, 0x68, - 0x1a, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, - 0x12, 0x43, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x52, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x65, 0x74, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x53, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x09, 0x44, 0x65, 0x6c, - 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x12, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x1a, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x78, 0x12, 0x4c, 0x0a, - 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x1a, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x12, 0x46, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x1a, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x1a, 0x1f, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x52, - 0x0a, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x1a, 0x22, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x12, 0x55, 0x0a, 0x0a, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x22, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x23, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x4f, 0x0a, 0x08, 0x45, 0x6e, 0x64, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x45, - 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x21, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x5e, 0x0a, 0x0d, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x73, 0x1a, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x5e, 0x0a, 0x0d, 0x4f, 0x66, - 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x25, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x1a, 0x26, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x66, 0x66, - 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x6a, 0x0a, 0x11, 0x4c, 0x6f, - 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, - 0x29, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x2a, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x6d, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x2a, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0xb0, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x42, 0x0a, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0xa2, 0x02, 0x03, - 0x54, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x41, 0x62, 0x63, 0x69, 0xca, 0x02, 0x0f, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x5c, 0x41, 0x62, 0x63, 0x69, 0xe2, 0x02, 0x1b, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x41, 0x62, 0x63, 0x69, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x3a, 0x3a, 0x41, 0x62, 0x63, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_abci_types_proto_rawDescOnce sync.Once - file_tendermint_abci_types_proto_rawDescData = file_tendermint_abci_types_proto_rawDesc -) - -func file_tendermint_abci_types_proto_rawDescGZIP() []byte { - file_tendermint_abci_types_proto_rawDescOnce.Do(func() { - file_tendermint_abci_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_abci_types_proto_rawDescData) - }) - return file_tendermint_abci_types_proto_rawDescData -} - -var file_tendermint_abci_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_tendermint_abci_types_proto_msgTypes = make([]protoimpl.MessageInfo, 44) -var file_tendermint_abci_types_proto_goTypes = []interface{}{ - (CheckTxType)(0), // 0: tendermint.abci.CheckTxType - (EvidenceType)(0), // 1: tendermint.abci.EvidenceType - (ResponseOfferSnapshot_Result)(0), // 2: tendermint.abci.ResponseOfferSnapshot.Result - (ResponseApplySnapshotChunk_Result)(0), // 3: tendermint.abci.ResponseApplySnapshotChunk.Result - (*Request)(nil), // 4: tendermint.abci.Request - (*RequestEcho)(nil), // 5: tendermint.abci.RequestEcho - (*RequestFlush)(nil), // 6: tendermint.abci.RequestFlush - (*RequestInfo)(nil), // 7: tendermint.abci.RequestInfo - (*RequestSetOption)(nil), // 8: tendermint.abci.RequestSetOption - (*RequestInitChain)(nil), // 9: tendermint.abci.RequestInitChain - (*RequestQuery)(nil), // 10: tendermint.abci.RequestQuery - (*RequestBeginBlock)(nil), // 11: tendermint.abci.RequestBeginBlock - (*RequestCheckTx)(nil), // 12: tendermint.abci.RequestCheckTx - (*RequestDeliverTx)(nil), // 13: tendermint.abci.RequestDeliverTx - (*RequestEndBlock)(nil), // 14: tendermint.abci.RequestEndBlock - (*RequestCommit)(nil), // 15: tendermint.abci.RequestCommit - (*RequestListSnapshots)(nil), // 16: tendermint.abci.RequestListSnapshots - (*RequestOfferSnapshot)(nil), // 17: tendermint.abci.RequestOfferSnapshot - (*RequestLoadSnapshotChunk)(nil), // 18: tendermint.abci.RequestLoadSnapshotChunk - (*RequestApplySnapshotChunk)(nil), // 19: tendermint.abci.RequestApplySnapshotChunk - (*Response)(nil), // 20: tendermint.abci.Response - (*ResponseException)(nil), // 21: tendermint.abci.ResponseException - (*ResponseEcho)(nil), // 22: tendermint.abci.ResponseEcho - (*ResponseFlush)(nil), // 23: tendermint.abci.ResponseFlush - (*ResponseInfo)(nil), // 24: tendermint.abci.ResponseInfo - (*ResponseSetOption)(nil), // 25: tendermint.abci.ResponseSetOption - (*ResponseInitChain)(nil), // 26: tendermint.abci.ResponseInitChain - (*ResponseQuery)(nil), // 27: tendermint.abci.ResponseQuery - (*ResponseBeginBlock)(nil), // 28: tendermint.abci.ResponseBeginBlock - (*ResponseCheckTx)(nil), // 29: tendermint.abci.ResponseCheckTx - (*ResponseDeliverTx)(nil), // 30: tendermint.abci.ResponseDeliverTx - (*ResponseEndBlock)(nil), // 31: tendermint.abci.ResponseEndBlock - (*ResponseCommit)(nil), // 32: tendermint.abci.ResponseCommit - (*ResponseListSnapshots)(nil), // 33: tendermint.abci.ResponseListSnapshots - (*ResponseOfferSnapshot)(nil), // 34: tendermint.abci.ResponseOfferSnapshot - (*ResponseLoadSnapshotChunk)(nil), // 35: tendermint.abci.ResponseLoadSnapshotChunk - (*ResponseApplySnapshotChunk)(nil), // 36: tendermint.abci.ResponseApplySnapshotChunk - (*ConsensusParams)(nil), // 37: tendermint.abci.ConsensusParams - (*BlockParams)(nil), // 38: tendermint.abci.BlockParams - (*LastCommitInfo)(nil), // 39: tendermint.abci.LastCommitInfo - (*Event)(nil), // 40: tendermint.abci.Event - (*EventAttribute)(nil), // 41: tendermint.abci.EventAttribute - (*TxResult)(nil), // 42: tendermint.abci.TxResult - (*Validator)(nil), // 43: tendermint.abci.Validator - (*ValidatorUpdate)(nil), // 44: tendermint.abci.ValidatorUpdate - (*VoteInfo)(nil), // 45: tendermint.abci.VoteInfo - (*Evidence)(nil), // 46: tendermint.abci.Evidence - (*Snapshot)(nil), // 47: tendermint.abci.Snapshot - (*timestamppb.Timestamp)(nil), // 48: google.protobuf.Timestamp - (*types.Header)(nil), // 49: tendermint.types.Header - (*crypto.ProofOps)(nil), // 50: tendermint.crypto.ProofOps - (*types.EvidenceParams)(nil), // 51: tendermint.types.EvidenceParams - (*types.ValidatorParams)(nil), // 52: tendermint.types.ValidatorParams - (*types.VersionParams)(nil), // 53: tendermint.types.VersionParams - (*crypto.PublicKey)(nil), // 54: tendermint.crypto.PublicKey -} -var file_tendermint_abci_types_proto_depIdxs = []int32{ - 5, // 0: tendermint.abci.Request.echo:type_name -> tendermint.abci.RequestEcho - 6, // 1: tendermint.abci.Request.flush:type_name -> tendermint.abci.RequestFlush - 7, // 2: tendermint.abci.Request.info:type_name -> tendermint.abci.RequestInfo - 8, // 3: tendermint.abci.Request.set_option:type_name -> tendermint.abci.RequestSetOption - 9, // 4: tendermint.abci.Request.init_chain:type_name -> tendermint.abci.RequestInitChain - 10, // 5: tendermint.abci.Request.query:type_name -> tendermint.abci.RequestQuery - 11, // 6: tendermint.abci.Request.begin_block:type_name -> tendermint.abci.RequestBeginBlock - 12, // 7: tendermint.abci.Request.check_tx:type_name -> tendermint.abci.RequestCheckTx - 13, // 8: tendermint.abci.Request.deliver_tx:type_name -> tendermint.abci.RequestDeliverTx - 14, // 9: tendermint.abci.Request.end_block:type_name -> tendermint.abci.RequestEndBlock - 15, // 10: tendermint.abci.Request.commit:type_name -> tendermint.abci.RequestCommit - 16, // 11: tendermint.abci.Request.list_snapshots:type_name -> tendermint.abci.RequestListSnapshots - 17, // 12: tendermint.abci.Request.offer_snapshot:type_name -> tendermint.abci.RequestOfferSnapshot - 18, // 13: tendermint.abci.Request.load_snapshot_chunk:type_name -> tendermint.abci.RequestLoadSnapshotChunk - 19, // 14: tendermint.abci.Request.apply_snapshot_chunk:type_name -> tendermint.abci.RequestApplySnapshotChunk - 48, // 15: tendermint.abci.RequestInitChain.time:type_name -> google.protobuf.Timestamp - 37, // 16: tendermint.abci.RequestInitChain.consensus_params:type_name -> tendermint.abci.ConsensusParams - 44, // 17: tendermint.abci.RequestInitChain.validators:type_name -> tendermint.abci.ValidatorUpdate - 49, // 18: tendermint.abci.RequestBeginBlock.header:type_name -> tendermint.types.Header - 39, // 19: tendermint.abci.RequestBeginBlock.last_commit_info:type_name -> tendermint.abci.LastCommitInfo - 46, // 20: tendermint.abci.RequestBeginBlock.byzantine_validators:type_name -> tendermint.abci.Evidence - 0, // 21: tendermint.abci.RequestCheckTx.type:type_name -> tendermint.abci.CheckTxType - 47, // 22: tendermint.abci.RequestOfferSnapshot.snapshot:type_name -> tendermint.abci.Snapshot - 21, // 23: tendermint.abci.Response.exception:type_name -> tendermint.abci.ResponseException - 22, // 24: tendermint.abci.Response.echo:type_name -> tendermint.abci.ResponseEcho - 23, // 25: tendermint.abci.Response.flush:type_name -> tendermint.abci.ResponseFlush - 24, // 26: tendermint.abci.Response.info:type_name -> tendermint.abci.ResponseInfo - 25, // 27: tendermint.abci.Response.set_option:type_name -> tendermint.abci.ResponseSetOption - 26, // 28: tendermint.abci.Response.init_chain:type_name -> tendermint.abci.ResponseInitChain - 27, // 29: tendermint.abci.Response.query:type_name -> tendermint.abci.ResponseQuery - 28, // 30: tendermint.abci.Response.begin_block:type_name -> tendermint.abci.ResponseBeginBlock - 29, // 31: tendermint.abci.Response.check_tx:type_name -> tendermint.abci.ResponseCheckTx - 30, // 32: tendermint.abci.Response.deliver_tx:type_name -> tendermint.abci.ResponseDeliverTx - 31, // 33: tendermint.abci.Response.end_block:type_name -> tendermint.abci.ResponseEndBlock - 32, // 34: tendermint.abci.Response.commit:type_name -> tendermint.abci.ResponseCommit - 33, // 35: tendermint.abci.Response.list_snapshots:type_name -> tendermint.abci.ResponseListSnapshots - 34, // 36: tendermint.abci.Response.offer_snapshot:type_name -> tendermint.abci.ResponseOfferSnapshot - 35, // 37: tendermint.abci.Response.load_snapshot_chunk:type_name -> tendermint.abci.ResponseLoadSnapshotChunk - 36, // 38: tendermint.abci.Response.apply_snapshot_chunk:type_name -> tendermint.abci.ResponseApplySnapshotChunk - 37, // 39: tendermint.abci.ResponseInitChain.consensus_params:type_name -> tendermint.abci.ConsensusParams - 44, // 40: tendermint.abci.ResponseInitChain.validators:type_name -> tendermint.abci.ValidatorUpdate - 50, // 41: tendermint.abci.ResponseQuery.proof_ops:type_name -> tendermint.crypto.ProofOps - 40, // 42: tendermint.abci.ResponseBeginBlock.events:type_name -> tendermint.abci.Event - 40, // 43: tendermint.abci.ResponseCheckTx.events:type_name -> tendermint.abci.Event - 40, // 44: tendermint.abci.ResponseDeliverTx.events:type_name -> tendermint.abci.Event - 44, // 45: tendermint.abci.ResponseEndBlock.validator_updates:type_name -> tendermint.abci.ValidatorUpdate - 37, // 46: tendermint.abci.ResponseEndBlock.consensus_param_updates:type_name -> tendermint.abci.ConsensusParams - 40, // 47: tendermint.abci.ResponseEndBlock.events:type_name -> tendermint.abci.Event - 47, // 48: tendermint.abci.ResponseListSnapshots.snapshots:type_name -> tendermint.abci.Snapshot - 2, // 49: tendermint.abci.ResponseOfferSnapshot.result:type_name -> tendermint.abci.ResponseOfferSnapshot.Result - 3, // 50: tendermint.abci.ResponseApplySnapshotChunk.result:type_name -> tendermint.abci.ResponseApplySnapshotChunk.Result - 38, // 51: tendermint.abci.ConsensusParams.block:type_name -> tendermint.abci.BlockParams - 51, // 52: tendermint.abci.ConsensusParams.evidence:type_name -> tendermint.types.EvidenceParams - 52, // 53: tendermint.abci.ConsensusParams.validator:type_name -> tendermint.types.ValidatorParams - 53, // 54: tendermint.abci.ConsensusParams.version:type_name -> tendermint.types.VersionParams - 45, // 55: tendermint.abci.LastCommitInfo.votes:type_name -> tendermint.abci.VoteInfo - 41, // 56: tendermint.abci.Event.attributes:type_name -> tendermint.abci.EventAttribute - 30, // 57: tendermint.abci.TxResult.result:type_name -> tendermint.abci.ResponseDeliverTx - 54, // 58: tendermint.abci.ValidatorUpdate.pub_key:type_name -> tendermint.crypto.PublicKey - 43, // 59: tendermint.abci.VoteInfo.validator:type_name -> tendermint.abci.Validator - 1, // 60: tendermint.abci.Evidence.type:type_name -> tendermint.abci.EvidenceType - 43, // 61: tendermint.abci.Evidence.validator:type_name -> tendermint.abci.Validator - 48, // 62: tendermint.abci.Evidence.time:type_name -> google.protobuf.Timestamp - 5, // 63: tendermint.abci.ABCIApplication.Echo:input_type -> tendermint.abci.RequestEcho - 6, // 64: tendermint.abci.ABCIApplication.Flush:input_type -> tendermint.abci.RequestFlush - 7, // 65: tendermint.abci.ABCIApplication.Info:input_type -> tendermint.abci.RequestInfo - 8, // 66: tendermint.abci.ABCIApplication.SetOption:input_type -> tendermint.abci.RequestSetOption - 13, // 67: tendermint.abci.ABCIApplication.DeliverTx:input_type -> tendermint.abci.RequestDeliverTx - 12, // 68: tendermint.abci.ABCIApplication.CheckTx:input_type -> tendermint.abci.RequestCheckTx - 10, // 69: tendermint.abci.ABCIApplication.Query:input_type -> tendermint.abci.RequestQuery - 15, // 70: tendermint.abci.ABCIApplication.Commit:input_type -> tendermint.abci.RequestCommit - 9, // 71: tendermint.abci.ABCIApplication.InitChain:input_type -> tendermint.abci.RequestInitChain - 11, // 72: tendermint.abci.ABCIApplication.BeginBlock:input_type -> tendermint.abci.RequestBeginBlock - 14, // 73: tendermint.abci.ABCIApplication.EndBlock:input_type -> tendermint.abci.RequestEndBlock - 16, // 74: tendermint.abci.ABCIApplication.ListSnapshots:input_type -> tendermint.abci.RequestListSnapshots - 17, // 75: tendermint.abci.ABCIApplication.OfferSnapshot:input_type -> tendermint.abci.RequestOfferSnapshot - 18, // 76: tendermint.abci.ABCIApplication.LoadSnapshotChunk:input_type -> tendermint.abci.RequestLoadSnapshotChunk - 19, // 77: tendermint.abci.ABCIApplication.ApplySnapshotChunk:input_type -> tendermint.abci.RequestApplySnapshotChunk - 22, // 78: tendermint.abci.ABCIApplication.Echo:output_type -> tendermint.abci.ResponseEcho - 23, // 79: tendermint.abci.ABCIApplication.Flush:output_type -> tendermint.abci.ResponseFlush - 24, // 80: tendermint.abci.ABCIApplication.Info:output_type -> tendermint.abci.ResponseInfo - 25, // 81: tendermint.abci.ABCIApplication.SetOption:output_type -> tendermint.abci.ResponseSetOption - 30, // 82: tendermint.abci.ABCIApplication.DeliverTx:output_type -> tendermint.abci.ResponseDeliverTx - 29, // 83: tendermint.abci.ABCIApplication.CheckTx:output_type -> tendermint.abci.ResponseCheckTx - 27, // 84: tendermint.abci.ABCIApplication.Query:output_type -> tendermint.abci.ResponseQuery - 32, // 85: tendermint.abci.ABCIApplication.Commit:output_type -> tendermint.abci.ResponseCommit - 26, // 86: tendermint.abci.ABCIApplication.InitChain:output_type -> tendermint.abci.ResponseInitChain - 28, // 87: tendermint.abci.ABCIApplication.BeginBlock:output_type -> tendermint.abci.ResponseBeginBlock - 31, // 88: tendermint.abci.ABCIApplication.EndBlock:output_type -> tendermint.abci.ResponseEndBlock - 33, // 89: tendermint.abci.ABCIApplication.ListSnapshots:output_type -> tendermint.abci.ResponseListSnapshots - 34, // 90: tendermint.abci.ABCIApplication.OfferSnapshot:output_type -> tendermint.abci.ResponseOfferSnapshot - 35, // 91: tendermint.abci.ABCIApplication.LoadSnapshotChunk:output_type -> tendermint.abci.ResponseLoadSnapshotChunk - 36, // 92: tendermint.abci.ABCIApplication.ApplySnapshotChunk:output_type -> tendermint.abci.ResponseApplySnapshotChunk - 78, // [78:93] is the sub-list for method output_type - 63, // [63:78] is the sub-list for method input_type - 63, // [63:63] is the sub-list for extension type_name - 63, // [63:63] is the sub-list for extension extendee - 0, // [0:63] is the sub-list for field type_name -} - -func init() { file_tendermint_abci_types_proto_init() } -func file_tendermint_abci_types_proto_init() { - if File_tendermint_abci_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_abci_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestEcho); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestFlush); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestSetOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestInitChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestBeginBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestCheckTx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestDeliverTx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestEndBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestCommit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestListSnapshots); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestOfferSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestLoadSnapshotChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestApplySnapshotChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseException); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseEcho); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseFlush); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseSetOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseInitChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseBeginBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseCheckTx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseDeliverTx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseEndBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseCommit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseListSnapshots); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseOfferSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseLoadSnapshotChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseApplySnapshotChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LastCommitInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VoteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Evidence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_abci_types_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_tendermint_abci_types_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Request_Echo)(nil), - (*Request_Flush)(nil), - (*Request_Info)(nil), - (*Request_SetOption)(nil), - (*Request_InitChain)(nil), - (*Request_Query)(nil), - (*Request_BeginBlock)(nil), - (*Request_CheckTx)(nil), - (*Request_DeliverTx)(nil), - (*Request_EndBlock)(nil), - (*Request_Commit)(nil), - (*Request_ListSnapshots)(nil), - (*Request_OfferSnapshot)(nil), - (*Request_LoadSnapshotChunk)(nil), - (*Request_ApplySnapshotChunk)(nil), - } - file_tendermint_abci_types_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*Response_Exception)(nil), - (*Response_Echo)(nil), - (*Response_Flush)(nil), - (*Response_Info)(nil), - (*Response_SetOption)(nil), - (*Response_InitChain)(nil), - (*Response_Query)(nil), - (*Response_BeginBlock)(nil), - (*Response_CheckTx)(nil), - (*Response_DeliverTx)(nil), - (*Response_EndBlock)(nil), - (*Response_Commit)(nil), - (*Response_ListSnapshots)(nil), - (*Response_OfferSnapshot)(nil), - (*Response_LoadSnapshotChunk)(nil), - (*Response_ApplySnapshotChunk)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_abci_types_proto_rawDesc, - NumEnums: 4, - NumMessages: 44, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_tendermint_abci_types_proto_goTypes, - DependencyIndexes: file_tendermint_abci_types_proto_depIdxs, - EnumInfos: file_tendermint_abci_types_proto_enumTypes, - MessageInfos: file_tendermint_abci_types_proto_msgTypes, - }.Build() - File_tendermint_abci_types_proto = out.File - file_tendermint_abci_types_proto_rawDesc = nil - file_tendermint_abci_types_proto_goTypes = nil - file_tendermint_abci_types_proto_depIdxs = nil -} diff --git a/api/tendermint/abci/types_grpc.pb.go b/api/tendermint/abci/types_grpc.pb.go deleted file mode 100644 index 78769626cb10..000000000000 --- a/api/tendermint/abci/types_grpc.pb.go +++ /dev/null @@ -1,609 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: tendermint/abci/types.proto - -package abci - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ABCIApplicationClient is the client API for ABCIApplication service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ABCIApplicationClient interface { - Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) - Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) - Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) - SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error) - DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) - CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) - Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) - Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) - InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) - BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) - EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) - ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) - OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) - LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) - ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) -} - -type aBCIApplicationClient struct { - cc grpc.ClientConnInterface -} - -func NewABCIApplicationClient(cc grpc.ClientConnInterface) ABCIApplicationClient { - return &aBCIApplicationClient{cc} -} - -func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) { - out := new(ResponseEcho) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) { - out := new(ResponseFlush) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) { - out := new(ResponseInfo) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error) { - out := new(ResponseSetOption) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/SetOption", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) { - out := new(ResponseDeliverTx) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) { - out := new(ResponseCheckTx) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) { - out := new(ResponseQuery) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) { - out := new(ResponseCommit) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) { - out := new(ResponseInitChain) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) { - out := new(ResponseBeginBlock) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) { - out := new(ResponseEndBlock) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) { - out := new(ResponseListSnapshots) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) { - out := new(ResponseOfferSnapshot) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) { - out := new(ResponseLoadSnapshotChunk) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) { - out := new(ResponseApplySnapshotChunk) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ABCIApplicationServer is the server API for ABCIApplication service. -// All implementations must embed UnimplementedABCIApplicationServer -// for forward compatibility -type ABCIApplicationServer interface { - Echo(context.Context, *RequestEcho) (*ResponseEcho, error) - Flush(context.Context, *RequestFlush) (*ResponseFlush, error) - Info(context.Context, *RequestInfo) (*ResponseInfo, error) - SetOption(context.Context, *RequestSetOption) (*ResponseSetOption, error) - DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error) - CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) - Query(context.Context, *RequestQuery) (*ResponseQuery, error) - Commit(context.Context, *RequestCommit) (*ResponseCommit, error) - InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error) - BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error) - EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error) - ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error) - OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) - LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) - ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) - mustEmbedUnimplementedABCIApplicationServer() -} - -// UnimplementedABCIApplicationServer must be embedded to have forward compatible implementations. -type UnimplementedABCIApplicationServer struct { -} - -func (UnimplementedABCIApplicationServer) Echo(context.Context, *RequestEcho) (*ResponseEcho, error) { - return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") -} -func (UnimplementedABCIApplicationServer) Flush(context.Context, *RequestFlush) (*ResponseFlush, error) { - return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented") -} -func (UnimplementedABCIApplicationServer) Info(context.Context, *RequestInfo) (*ResponseInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") -} -func (UnimplementedABCIApplicationServer) SetOption(context.Context, *RequestSetOption) (*ResponseSetOption, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetOption not implemented") -} -func (UnimplementedABCIApplicationServer) DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented") -} -func (UnimplementedABCIApplicationServer) CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented") -} -func (UnimplementedABCIApplicationServer) Query(context.Context, *RequestQuery) (*ResponseQuery, error) { - return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") -} -func (UnimplementedABCIApplicationServer) Commit(context.Context, *RequestCommit) (*ResponseCommit, error) { - return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented") -} -func (UnimplementedABCIApplicationServer) InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error) { - return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented") -} -func (UnimplementedABCIApplicationServer) BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error) { - return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented") -} -func (UnimplementedABCIApplicationServer) EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error) { - return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented") -} -func (UnimplementedABCIApplicationServer) ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented") -} -func (UnimplementedABCIApplicationServer) OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) { - return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented") -} -func (UnimplementedABCIApplicationServer) LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented") -} -func (UnimplementedABCIApplicationServer) ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented") -} -func (UnimplementedABCIApplicationServer) mustEmbedUnimplementedABCIApplicationServer() {} - -// UnsafeABCIApplicationServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ABCIApplicationServer will -// result in compilation errors. -type UnsafeABCIApplicationServer interface { - mustEmbedUnimplementedABCIApplicationServer() -} - -func RegisterABCIApplicationServer(s grpc.ServiceRegistrar, srv ABCIApplicationServer) { - s.RegisterService(&ABCIApplication_ServiceDesc, srv) -} - -func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestEcho) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Echo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/Echo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestFlush) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Flush(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/Flush", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestInfo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Info(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/Info", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_SetOption_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestSetOption) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).SetOption(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/SetOption", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).SetOption(ctx, req.(*RequestSetOption)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestDeliverTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).DeliverTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestCheckTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).CheckTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/CheckTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestQuery) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Query(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/Query", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestCommit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Commit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/Commit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestInitChain) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).InitChain(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/InitChain", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestBeginBlock) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).BeginBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestEndBlock) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).EndBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/EndBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestListSnapshots) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).ListSnapshots(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestOfferSnapshot) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestLoadSnapshotChunk) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestApplySnapshotChunk) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk)) - } - return interceptor(ctx, in, info, handler) -} - -// ABCIApplication_ServiceDesc is the grpc.ServiceDesc for ABCIApplication service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ABCIApplication_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "tendermint.abci.ABCIApplication", - HandlerType: (*ABCIApplicationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Echo", - Handler: _ABCIApplication_Echo_Handler, - }, - { - MethodName: "Flush", - Handler: _ABCIApplication_Flush_Handler, - }, - { - MethodName: "Info", - Handler: _ABCIApplication_Info_Handler, - }, - { - MethodName: "SetOption", - Handler: _ABCIApplication_SetOption_Handler, - }, - { - MethodName: "DeliverTx", - Handler: _ABCIApplication_DeliverTx_Handler, - }, - { - MethodName: "CheckTx", - Handler: _ABCIApplication_CheckTx_Handler, - }, - { - MethodName: "Query", - Handler: _ABCIApplication_Query_Handler, - }, - { - MethodName: "Commit", - Handler: _ABCIApplication_Commit_Handler, - }, - { - MethodName: "InitChain", - Handler: _ABCIApplication_InitChain_Handler, - }, - { - MethodName: "BeginBlock", - Handler: _ABCIApplication_BeginBlock_Handler, - }, - { - MethodName: "EndBlock", - Handler: _ABCIApplication_EndBlock_Handler, - }, - { - MethodName: "ListSnapshots", - Handler: _ABCIApplication_ListSnapshots_Handler, - }, - { - MethodName: "OfferSnapshot", - Handler: _ABCIApplication_OfferSnapshot_Handler, - }, - { - MethodName: "LoadSnapshotChunk", - Handler: _ABCIApplication_LoadSnapshotChunk_Handler, - }, - { - MethodName: "ApplySnapshotChunk", - Handler: _ABCIApplication_ApplySnapshotChunk_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "tendermint/abci/types.proto", -} diff --git a/api/tendermint/crypto/keys.pulsar.go b/api/tendermint/crypto/keys.pulsar.go deleted file mode 100644 index 956c671974a9..000000000000 --- a/api/tendermint/crypto/keys.pulsar.go +++ /dev/null @@ -1,721 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package crypto - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_PublicKey protoreflect.MessageDescriptor - fd_PublicKey_ed25519 protoreflect.FieldDescriptor - fd_PublicKey_secp256k1 protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_crypto_keys_proto_init() - md_PublicKey = File_tendermint_crypto_keys_proto.Messages().ByName("PublicKey") - fd_PublicKey_ed25519 = md_PublicKey.Fields().ByName("ed25519") - fd_PublicKey_secp256k1 = md_PublicKey.Fields().ByName("secp256k1") -} - -var _ protoreflect.Message = (*fastReflection_PublicKey)(nil) - -type fastReflection_PublicKey PublicKey - -func (x *PublicKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PublicKey)(x) -} - -func (x *PublicKey) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_crypto_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PublicKey_messageType fastReflection_PublicKey_messageType -var _ protoreflect.MessageType = fastReflection_PublicKey_messageType{} - -type fastReflection_PublicKey_messageType struct{} - -func (x fastReflection_PublicKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PublicKey)(nil) -} -func (x fastReflection_PublicKey_messageType) New() protoreflect.Message { - return new(fastReflection_PublicKey) -} -func (x fastReflection_PublicKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PublicKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PublicKey) Descriptor() protoreflect.MessageDescriptor { - return md_PublicKey -} - -// 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_PublicKey) Type() protoreflect.MessageType { - return _fastReflection_PublicKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PublicKey) New() protoreflect.Message { - return new(fastReflection_PublicKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PublicKey) Interface() protoreflect.ProtoMessage { - return (*PublicKey)(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_PublicKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sum != nil { - switch o := x.Sum.(type) { - case *PublicKey_Ed25519: - v := o.Ed25519 - value := protoreflect.ValueOfBytes(v) - if !f(fd_PublicKey_ed25519, value) { - return - } - case *PublicKey_Secp256K1: - v := o.Secp256K1 - value := protoreflect.ValueOfBytes(v) - if !f(fd_PublicKey_secp256k1, 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_PublicKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.crypto.PublicKey.ed25519": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*PublicKey_Ed25519); ok { - return true - } else { - return false - } - case "tendermint.crypto.PublicKey.secp256k1": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*PublicKey_Secp256K1); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.PublicKey")) - } - panic(fmt.Errorf("message tendermint.crypto.PublicKey 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_PublicKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.crypto.PublicKey.ed25519": - x.Sum = nil - case "tendermint.crypto.PublicKey.secp256k1": - x.Sum = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.PublicKey")) - } - panic(fmt.Errorf("message tendermint.crypto.PublicKey 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_PublicKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.crypto.PublicKey.ed25519": - if x.Sum == nil { - return protoreflect.ValueOfBytes(nil) - } else if v, ok := x.Sum.(*PublicKey_Ed25519); ok { - return protoreflect.ValueOfBytes(v.Ed25519) - } else { - return protoreflect.ValueOfBytes(nil) - } - case "tendermint.crypto.PublicKey.secp256k1": - if x.Sum == nil { - return protoreflect.ValueOfBytes(nil) - } else if v, ok := x.Sum.(*PublicKey_Secp256K1); ok { - return protoreflect.ValueOfBytes(v.Secp256K1) - } else { - return protoreflect.ValueOfBytes(nil) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.PublicKey")) - } - panic(fmt.Errorf("message tendermint.crypto.PublicKey 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_PublicKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.crypto.PublicKey.ed25519": - cv := value.Bytes() - x.Sum = &PublicKey_Ed25519{Ed25519: cv} - case "tendermint.crypto.PublicKey.secp256k1": - cv := value.Bytes() - x.Sum = &PublicKey_Secp256K1{Secp256K1: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.PublicKey")) - } - panic(fmt.Errorf("message tendermint.crypto.PublicKey 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_PublicKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.PublicKey.ed25519": - panic(fmt.Errorf("field ed25519 of message tendermint.crypto.PublicKey is not mutable")) - case "tendermint.crypto.PublicKey.secp256k1": - panic(fmt.Errorf("field secp256k1 of message tendermint.crypto.PublicKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.PublicKey")) - } - panic(fmt.Errorf("message tendermint.crypto.PublicKey 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_PublicKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.PublicKey.ed25519": - return protoreflect.ValueOfBytes(nil) - case "tendermint.crypto.PublicKey.secp256k1": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.PublicKey")) - } - panic(fmt.Errorf("message tendermint.crypto.PublicKey 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_PublicKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "tendermint.crypto.PublicKey.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *PublicKey_Ed25519: - return x.Descriptor().Fields().ByName("ed25519") - case *PublicKey_Secp256K1: - return x.Descriptor().Fields().ByName("secp256k1") - } - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.crypto.PublicKey", 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_PublicKey) 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_PublicKey) 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_PublicKey) 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_PublicKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PublicKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Sum.(type) { - case *PublicKey_Ed25519: - if x == nil { - break - } - l = len(x.Ed25519) - n += 1 + l + runtime.Sov(uint64(l)) - case *PublicKey_Secp256K1: - if x == nil { - break - } - l = len(x.Secp256K1) - 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().(*PublicKey) - 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) - } - switch x := x.Sum.(type) { - case *PublicKey_Ed25519: - i -= len(x.Ed25519) - copy(dAtA[i:], x.Ed25519) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ed25519))) - i-- - dAtA[i] = 0xa - case *PublicKey_Secp256K1: - i -= len(x.Secp256K1) - copy(dAtA[i:], x.Secp256K1) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Secp256K1))) - i-- - dAtA[i] = 0x12 - } - 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().(*PublicKey) - 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: PublicKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PublicKey: 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 Ed25519", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - x.Sum = &PublicKey_Ed25519{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Secp256K1", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - x.Sum = &PublicKey_Secp256K1{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/crypto/keys.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PublicKey defines the keys available for use with Tendermint Validators -type PublicKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Sum: - // *PublicKey_Ed25519 - // *PublicKey_Secp256K1 - Sum isPublicKey_Sum `protobuf_oneof:"sum"` -} - -func (x *PublicKey) Reset() { - *x = PublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_crypto_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PublicKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PublicKey) ProtoMessage() {} - -// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. -func (*PublicKey) Descriptor() ([]byte, []int) { - return file_tendermint_crypto_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *PublicKey) GetSum() isPublicKey_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *PublicKey) GetEd25519() []byte { - if x, ok := x.GetSum().(*PublicKey_Ed25519); ok { - return x.Ed25519 - } - return nil -} - -func (x *PublicKey) GetSecp256K1() []byte { - if x, ok := x.GetSum().(*PublicKey_Secp256K1); ok { - return x.Secp256K1 - } - return nil -} - -type isPublicKey_Sum interface { - isPublicKey_Sum() -} - -type PublicKey_Ed25519 struct { - Ed25519 []byte `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof"` -} - -type PublicKey_Secp256K1 struct { - Secp256K1 []byte `protobuf:"bytes,2,opt,name=secp256k1,proto3,oneof"` -} - -func (*PublicKey_Ed25519) isPublicKey_Sum() {} - -func (*PublicKey_Secp256K1) isPublicKey_Sum() {} - -var File_tendermint_crypto_keys_proto protoreflect.FileDescriptor - -var file_tendermint_crypto_keys_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x07, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, - 0x12, 0x1e, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, - 0x3a, 0x08, 0xe8, 0xa0, 0x1f, 0x01, 0xe8, 0xa1, 0x1f, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, - 0x6d, 0x42, 0xbb, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x42, 0x09, 0x4b, 0x65, 0x79, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0xa2, 0x02, 0x03, 0x54, - 0x43, 0x58, 0xaa, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0xca, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0xe2, 0x02, 0x1d, 0x54, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x54, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_crypto_keys_proto_rawDescOnce sync.Once - file_tendermint_crypto_keys_proto_rawDescData = file_tendermint_crypto_keys_proto_rawDesc -) - -func file_tendermint_crypto_keys_proto_rawDescGZIP() []byte { - file_tendermint_crypto_keys_proto_rawDescOnce.Do(func() { - file_tendermint_crypto_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_crypto_keys_proto_rawDescData) - }) - return file_tendermint_crypto_keys_proto_rawDescData -} - -var file_tendermint_crypto_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_tendermint_crypto_keys_proto_goTypes = []interface{}{ - (*PublicKey)(nil), // 0: tendermint.crypto.PublicKey -} -var file_tendermint_crypto_keys_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_tendermint_crypto_keys_proto_init() } -func file_tendermint_crypto_keys_proto_init() { - if File_tendermint_crypto_keys_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_crypto_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_tendermint_crypto_keys_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*PublicKey_Ed25519)(nil), - (*PublicKey_Secp256K1)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_crypto_keys_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_crypto_keys_proto_goTypes, - DependencyIndexes: file_tendermint_crypto_keys_proto_depIdxs, - MessageInfos: file_tendermint_crypto_keys_proto_msgTypes, - }.Build() - File_tendermint_crypto_keys_proto = out.File - file_tendermint_crypto_keys_proto_rawDesc = nil - file_tendermint_crypto_keys_proto_goTypes = nil - file_tendermint_crypto_keys_proto_depIdxs = nil -} diff --git a/api/tendermint/crypto/proof.pulsar.go b/api/tendermint/crypto/proof.pulsar.go deleted file mode 100644 index 6171f92e59a4..000000000000 --- a/api/tendermint/crypto/proof.pulsar.go +++ /dev/null @@ -1,3173 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package crypto - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Proof_4_list)(nil) - -type _Proof_4_list struct { - list *[][]byte -} - -func (x *_Proof_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Proof_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_Proof_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Proof_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Proof_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Proof at list field Aunts as it is not of Message kind")) -} - -func (x *_Proof_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Proof_4_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_Proof_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Proof protoreflect.MessageDescriptor - fd_Proof_total protoreflect.FieldDescriptor - fd_Proof_index protoreflect.FieldDescriptor - fd_Proof_leaf_hash protoreflect.FieldDescriptor - fd_Proof_aunts protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_crypto_proof_proto_init() - md_Proof = File_tendermint_crypto_proof_proto.Messages().ByName("Proof") - fd_Proof_total = md_Proof.Fields().ByName("total") - fd_Proof_index = md_Proof.Fields().ByName("index") - fd_Proof_leaf_hash = md_Proof.Fields().ByName("leaf_hash") - fd_Proof_aunts = md_Proof.Fields().ByName("aunts") -} - -var _ protoreflect.Message = (*fastReflection_Proof)(nil) - -type fastReflection_Proof Proof - -func (x *Proof) ProtoReflect() protoreflect.Message { - return (*fastReflection_Proof)(x) -} - -func (x *Proof) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_crypto_proof_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Proof_messageType fastReflection_Proof_messageType -var _ protoreflect.MessageType = fastReflection_Proof_messageType{} - -type fastReflection_Proof_messageType struct{} - -func (x fastReflection_Proof_messageType) Zero() protoreflect.Message { - return (*fastReflection_Proof)(nil) -} -func (x fastReflection_Proof_messageType) New() protoreflect.Message { - return new(fastReflection_Proof) -} -func (x fastReflection_Proof_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Proof -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Proof) Descriptor() protoreflect.MessageDescriptor { - return md_Proof -} - -// 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_Proof) Type() protoreflect.MessageType { - return _fastReflection_Proof_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Proof) New() protoreflect.Message { - return new(fastReflection_Proof) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Proof) Interface() protoreflect.ProtoMessage { - return (*Proof)(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_Proof) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Total != int64(0) { - value := protoreflect.ValueOfInt64(x.Total) - if !f(fd_Proof_total, value) { - return - } - } - if x.Index != int64(0) { - value := protoreflect.ValueOfInt64(x.Index) - if !f(fd_Proof_index, value) { - return - } - } - if len(x.LeafHash) != 0 { - value := protoreflect.ValueOfBytes(x.LeafHash) - if !f(fd_Proof_leaf_hash, value) { - return - } - } - if len(x.Aunts) != 0 { - value := protoreflect.ValueOfList(&_Proof_4_list{list: &x.Aunts}) - if !f(fd_Proof_aunts, 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_Proof) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.crypto.Proof.total": - return x.Total != int64(0) - case "tendermint.crypto.Proof.index": - return x.Index != int64(0) - case "tendermint.crypto.Proof.leaf_hash": - return len(x.LeafHash) != 0 - case "tendermint.crypto.Proof.aunts": - return len(x.Aunts) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.Proof")) - } - panic(fmt.Errorf("message tendermint.crypto.Proof 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_Proof) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.crypto.Proof.total": - x.Total = int64(0) - case "tendermint.crypto.Proof.index": - x.Index = int64(0) - case "tendermint.crypto.Proof.leaf_hash": - x.LeafHash = nil - case "tendermint.crypto.Proof.aunts": - x.Aunts = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.Proof")) - } - panic(fmt.Errorf("message tendermint.crypto.Proof 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_Proof) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.crypto.Proof.total": - value := x.Total - return protoreflect.ValueOfInt64(value) - case "tendermint.crypto.Proof.index": - value := x.Index - return protoreflect.ValueOfInt64(value) - case "tendermint.crypto.Proof.leaf_hash": - value := x.LeafHash - return protoreflect.ValueOfBytes(value) - case "tendermint.crypto.Proof.aunts": - if len(x.Aunts) == 0 { - return protoreflect.ValueOfList(&_Proof_4_list{}) - } - listValue := &_Proof_4_list{list: &x.Aunts} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.Proof")) - } - panic(fmt.Errorf("message tendermint.crypto.Proof 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_Proof) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.crypto.Proof.total": - x.Total = value.Int() - case "tendermint.crypto.Proof.index": - x.Index = value.Int() - case "tendermint.crypto.Proof.leaf_hash": - x.LeafHash = value.Bytes() - case "tendermint.crypto.Proof.aunts": - lv := value.List() - clv := lv.(*_Proof_4_list) - x.Aunts = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.Proof")) - } - panic(fmt.Errorf("message tendermint.crypto.Proof 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_Proof) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.Proof.aunts": - if x.Aunts == nil { - x.Aunts = [][]byte{} - } - value := &_Proof_4_list{list: &x.Aunts} - return protoreflect.ValueOfList(value) - case "tendermint.crypto.Proof.total": - panic(fmt.Errorf("field total of message tendermint.crypto.Proof is not mutable")) - case "tendermint.crypto.Proof.index": - panic(fmt.Errorf("field index of message tendermint.crypto.Proof is not mutable")) - case "tendermint.crypto.Proof.leaf_hash": - panic(fmt.Errorf("field leaf_hash of message tendermint.crypto.Proof is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.Proof")) - } - panic(fmt.Errorf("message tendermint.crypto.Proof 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_Proof) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.Proof.total": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.crypto.Proof.index": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.crypto.Proof.leaf_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.crypto.Proof.aunts": - list := [][]byte{} - return protoreflect.ValueOfList(&_Proof_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.Proof")) - } - panic(fmt.Errorf("message tendermint.crypto.Proof 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_Proof) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.crypto.Proof", 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_Proof) 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_Proof) 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_Proof) 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_Proof) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Proof) - 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.Total != 0 { - n += 1 + runtime.Sov(uint64(x.Total)) - } - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.LeafHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Aunts) > 0 { - for _, b := range x.Aunts { - l = len(b) - 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().(*Proof) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Aunts) > 0 { - for iNdEx := len(x.Aunts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Aunts[iNdEx]) - copy(dAtA[i:], x.Aunts[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aunts[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.LeafHash) > 0 { - i -= len(x.LeafHash) - copy(dAtA[i:], x.LeafHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LeafHash))) - i-- - dAtA[i] = 0x1a - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x10 - } - if x.Total != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Total)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Proof) - 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: Proof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - x.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LeafHash = append(x.LeafHash[:0], dAtA[iNdEx:postIndex]...) - if x.LeafHash == nil { - x.LeafHash = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Aunts", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Aunts = append(x.Aunts, make([]byte, postIndex-iNdEx)) - copy(x.Aunts[len(x.Aunts)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ValueOp protoreflect.MessageDescriptor - fd_ValueOp_key protoreflect.FieldDescriptor - fd_ValueOp_proof protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_crypto_proof_proto_init() - md_ValueOp = File_tendermint_crypto_proof_proto.Messages().ByName("ValueOp") - fd_ValueOp_key = md_ValueOp.Fields().ByName("key") - fd_ValueOp_proof = md_ValueOp.Fields().ByName("proof") -} - -var _ protoreflect.Message = (*fastReflection_ValueOp)(nil) - -type fastReflection_ValueOp ValueOp - -func (x *ValueOp) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValueOp)(x) -} - -func (x *ValueOp) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_crypto_proof_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValueOp_messageType fastReflection_ValueOp_messageType -var _ protoreflect.MessageType = fastReflection_ValueOp_messageType{} - -type fastReflection_ValueOp_messageType struct{} - -func (x fastReflection_ValueOp_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValueOp)(nil) -} -func (x fastReflection_ValueOp_messageType) New() protoreflect.Message { - return new(fastReflection_ValueOp) -} -func (x fastReflection_ValueOp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValueOp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValueOp) Descriptor() protoreflect.MessageDescriptor { - return md_ValueOp -} - -// 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_ValueOp) Type() protoreflect.MessageType { - return _fastReflection_ValueOp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValueOp) New() protoreflect.Message { - return new(fastReflection_ValueOp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValueOp) Interface() protoreflect.ProtoMessage { - return (*ValueOp)(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_ValueOp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ValueOp_key, value) { - return - } - } - if x.Proof != nil { - value := protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) - if !f(fd_ValueOp_proof, 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_ValueOp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.crypto.ValueOp.key": - return len(x.Key) != 0 - case "tendermint.crypto.ValueOp.proof": - return x.Proof != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ValueOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ValueOp 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_ValueOp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.crypto.ValueOp.key": - x.Key = nil - case "tendermint.crypto.ValueOp.proof": - x.Proof = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ValueOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ValueOp 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_ValueOp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.crypto.ValueOp.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "tendermint.crypto.ValueOp.proof": - value := x.Proof - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ValueOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ValueOp 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_ValueOp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.crypto.ValueOp.key": - x.Key = value.Bytes() - case "tendermint.crypto.ValueOp.proof": - x.Proof = value.Message().Interface().(*Proof) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ValueOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ValueOp 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_ValueOp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.ValueOp.proof": - if x.Proof == nil { - x.Proof = new(Proof) - } - return protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) - case "tendermint.crypto.ValueOp.key": - panic(fmt.Errorf("field key of message tendermint.crypto.ValueOp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ValueOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ValueOp 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_ValueOp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.ValueOp.key": - return protoreflect.ValueOfBytes(nil) - case "tendermint.crypto.ValueOp.proof": - m := new(Proof) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ValueOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ValueOp 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_ValueOp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.crypto.ValueOp", 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_ValueOp) 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_ValueOp) 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_ValueOp) 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_ValueOp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValueOp) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Proof != nil { - l = options.Size(x.Proof) - 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().(*ValueOp) - 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.Proof != nil { - encoded, err := options.Marshal(x.Proof) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*ValueOp) - 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: ValueOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValueOp: 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof == nil { - x.Proof = &Proof{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proof); 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_DominoOp protoreflect.MessageDescriptor - fd_DominoOp_key protoreflect.FieldDescriptor - fd_DominoOp_input protoreflect.FieldDescriptor - fd_DominoOp_output protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_crypto_proof_proto_init() - md_DominoOp = File_tendermint_crypto_proof_proto.Messages().ByName("DominoOp") - fd_DominoOp_key = md_DominoOp.Fields().ByName("key") - fd_DominoOp_input = md_DominoOp.Fields().ByName("input") - fd_DominoOp_output = md_DominoOp.Fields().ByName("output") -} - -var _ protoreflect.Message = (*fastReflection_DominoOp)(nil) - -type fastReflection_DominoOp DominoOp - -func (x *DominoOp) ProtoReflect() protoreflect.Message { - return (*fastReflection_DominoOp)(x) -} - -func (x *DominoOp) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_crypto_proof_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DominoOp_messageType fastReflection_DominoOp_messageType -var _ protoreflect.MessageType = fastReflection_DominoOp_messageType{} - -type fastReflection_DominoOp_messageType struct{} - -func (x fastReflection_DominoOp_messageType) Zero() protoreflect.Message { - return (*fastReflection_DominoOp)(nil) -} -func (x fastReflection_DominoOp_messageType) New() protoreflect.Message { - return new(fastReflection_DominoOp) -} -func (x fastReflection_DominoOp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DominoOp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DominoOp) Descriptor() protoreflect.MessageDescriptor { - return md_DominoOp -} - -// 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_DominoOp) Type() protoreflect.MessageType { - return _fastReflection_DominoOp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DominoOp) New() protoreflect.Message { - return new(fastReflection_DominoOp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DominoOp) Interface() protoreflect.ProtoMessage { - return (*DominoOp)(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_DominoOp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Key != "" { - value := protoreflect.ValueOfString(x.Key) - if !f(fd_DominoOp_key, value) { - return - } - } - if x.Input != "" { - value := protoreflect.ValueOfString(x.Input) - if !f(fd_DominoOp_input, value) { - return - } - } - if x.Output != "" { - value := protoreflect.ValueOfString(x.Output) - if !f(fd_DominoOp_output, 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_DominoOp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.crypto.DominoOp.key": - return x.Key != "" - case "tendermint.crypto.DominoOp.input": - return x.Input != "" - case "tendermint.crypto.DominoOp.output": - return x.Output != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.DominoOp")) - } - panic(fmt.Errorf("message tendermint.crypto.DominoOp 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_DominoOp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.crypto.DominoOp.key": - x.Key = "" - case "tendermint.crypto.DominoOp.input": - x.Input = "" - case "tendermint.crypto.DominoOp.output": - x.Output = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.DominoOp")) - } - panic(fmt.Errorf("message tendermint.crypto.DominoOp 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_DominoOp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.crypto.DominoOp.key": - value := x.Key - return protoreflect.ValueOfString(value) - case "tendermint.crypto.DominoOp.input": - value := x.Input - return protoreflect.ValueOfString(value) - case "tendermint.crypto.DominoOp.output": - value := x.Output - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.DominoOp")) - } - panic(fmt.Errorf("message tendermint.crypto.DominoOp 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_DominoOp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.crypto.DominoOp.key": - x.Key = value.Interface().(string) - case "tendermint.crypto.DominoOp.input": - x.Input = value.Interface().(string) - case "tendermint.crypto.DominoOp.output": - x.Output = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.DominoOp")) - } - panic(fmt.Errorf("message tendermint.crypto.DominoOp 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_DominoOp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.DominoOp.key": - panic(fmt.Errorf("field key of message tendermint.crypto.DominoOp is not mutable")) - case "tendermint.crypto.DominoOp.input": - panic(fmt.Errorf("field input of message tendermint.crypto.DominoOp is not mutable")) - case "tendermint.crypto.DominoOp.output": - panic(fmt.Errorf("field output of message tendermint.crypto.DominoOp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.DominoOp")) - } - panic(fmt.Errorf("message tendermint.crypto.DominoOp 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_DominoOp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.DominoOp.key": - return protoreflect.ValueOfString("") - case "tendermint.crypto.DominoOp.input": - return protoreflect.ValueOfString("") - case "tendermint.crypto.DominoOp.output": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.DominoOp")) - } - panic(fmt.Errorf("message tendermint.crypto.DominoOp 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_DominoOp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.crypto.DominoOp", 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_DominoOp) 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_DominoOp) 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_DominoOp) 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_DominoOp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DominoOp) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Input) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Output) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DominoOp) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Output) > 0 { - i -= len(x.Output) - copy(dAtA[i:], x.Output) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Output))) - i-- - dAtA[i] = 0x1a - } - if len(x.Input) > 0 { - i -= len(x.Input) - copy(dAtA[i:], x.Input) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Input))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - 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().(*DominoOp) - 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: DominoOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DominoOp: 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 Key", 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.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Input", 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.Input = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Output", 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.Output = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ProofOp protoreflect.MessageDescriptor - fd_ProofOp_type protoreflect.FieldDescriptor - fd_ProofOp_key protoreflect.FieldDescriptor - fd_ProofOp_data protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_crypto_proof_proto_init() - md_ProofOp = File_tendermint_crypto_proof_proto.Messages().ByName("ProofOp") - fd_ProofOp_type = md_ProofOp.Fields().ByName("type") - fd_ProofOp_key = md_ProofOp.Fields().ByName("key") - fd_ProofOp_data = md_ProofOp.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_ProofOp)(nil) - -type fastReflection_ProofOp ProofOp - -func (x *ProofOp) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProofOp)(x) -} - -func (x *ProofOp) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_crypto_proof_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProofOp_messageType fastReflection_ProofOp_messageType -var _ protoreflect.MessageType = fastReflection_ProofOp_messageType{} - -type fastReflection_ProofOp_messageType struct{} - -func (x fastReflection_ProofOp_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProofOp)(nil) -} -func (x fastReflection_ProofOp_messageType) New() protoreflect.Message { - return new(fastReflection_ProofOp) -} -func (x fastReflection_ProofOp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProofOp) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOp -} - -// 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_ProofOp) Type() protoreflect.MessageType { - return _fastReflection_ProofOp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProofOp) New() protoreflect.Message { - return new(fastReflection_ProofOp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProofOp) Interface() protoreflect.ProtoMessage { - return (*ProofOp)(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_ProofOp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != "" { - value := protoreflect.ValueOfString(x.Type_) - if !f(fd_ProofOp_type, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ProofOp_key, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ProofOp_data, 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_ProofOp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.crypto.ProofOp.type": - return x.Type_ != "" - case "tendermint.crypto.ProofOp.key": - return len(x.Key) != 0 - case "tendermint.crypto.ProofOp.data": - return len(x.Data) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOp 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_ProofOp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.crypto.ProofOp.type": - x.Type_ = "" - case "tendermint.crypto.ProofOp.key": - x.Key = nil - case "tendermint.crypto.ProofOp.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOp 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_ProofOp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.crypto.ProofOp.type": - value := x.Type_ - return protoreflect.ValueOfString(value) - case "tendermint.crypto.ProofOp.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "tendermint.crypto.ProofOp.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOp 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_ProofOp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.crypto.ProofOp.type": - x.Type_ = value.Interface().(string) - case "tendermint.crypto.ProofOp.key": - x.Key = value.Bytes() - case "tendermint.crypto.ProofOp.data": - x.Data = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOp 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_ProofOp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.ProofOp.type": - panic(fmt.Errorf("field type of message tendermint.crypto.ProofOp is not mutable")) - case "tendermint.crypto.ProofOp.key": - panic(fmt.Errorf("field key of message tendermint.crypto.ProofOp is not mutable")) - case "tendermint.crypto.ProofOp.data": - panic(fmt.Errorf("field data of message tendermint.crypto.ProofOp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOp 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_ProofOp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.ProofOp.type": - return protoreflect.ValueOfString("") - case "tendermint.crypto.ProofOp.key": - return protoreflect.ValueOfBytes(nil) - case "tendermint.crypto.ProofOp.data": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOp")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOp 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_ProofOp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.crypto.ProofOp", 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_ProofOp) 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_ProofOp) 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_ProofOp) 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_ProofOp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Type_) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x1a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Type_) > 0 { - i -= len(x.Type_) - copy(dAtA[i:], x.Type_) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) - 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().(*ProofOp) - 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: ProofOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOp: 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 Type_", 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.Type_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ProofOps_1_list)(nil) - -type _ProofOps_1_list struct { - list *[]*ProofOp -} - -func (x *_ProofOps_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ProofOps_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ProofOps_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ProofOp) - (*x.list)[i] = concreteValue -} - -func (x *_ProofOps_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ProofOp) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ProofOps_1_list) AppendMutable() protoreflect.Value { - v := new(ProofOp) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ProofOps_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ProofOps_1_list) NewElement() protoreflect.Value { - v := new(ProofOp) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ProofOps_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ProofOps protoreflect.MessageDescriptor - fd_ProofOps_ops protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_crypto_proof_proto_init() - md_ProofOps = File_tendermint_crypto_proof_proto.Messages().ByName("ProofOps") - fd_ProofOps_ops = md_ProofOps.Fields().ByName("ops") -} - -var _ protoreflect.Message = (*fastReflection_ProofOps)(nil) - -type fastReflection_ProofOps ProofOps - -func (x *ProofOps) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProofOps)(x) -} - -func (x *ProofOps) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_crypto_proof_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProofOps_messageType fastReflection_ProofOps_messageType -var _ protoreflect.MessageType = fastReflection_ProofOps_messageType{} - -type fastReflection_ProofOps_messageType struct{} - -func (x fastReflection_ProofOps_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProofOps)(nil) -} -func (x fastReflection_ProofOps_messageType) New() protoreflect.Message { - return new(fastReflection_ProofOps) -} -func (x fastReflection_ProofOps_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOps -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProofOps) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOps -} - -// 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_ProofOps) Type() protoreflect.MessageType { - return _fastReflection_ProofOps_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProofOps) New() protoreflect.Message { - return new(fastReflection_ProofOps) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProofOps) Interface() protoreflect.ProtoMessage { - return (*ProofOps)(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_ProofOps) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Ops) != 0 { - value := protoreflect.ValueOfList(&_ProofOps_1_list{list: &x.Ops}) - if !f(fd_ProofOps_ops, 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_ProofOps) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.crypto.ProofOps.ops": - return len(x.Ops) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOps")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOps 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_ProofOps) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.crypto.ProofOps.ops": - x.Ops = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOps")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOps 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_ProofOps) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.crypto.ProofOps.ops": - if len(x.Ops) == 0 { - return protoreflect.ValueOfList(&_ProofOps_1_list{}) - } - listValue := &_ProofOps_1_list{list: &x.Ops} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOps")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOps 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_ProofOps) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.crypto.ProofOps.ops": - lv := value.List() - clv := lv.(*_ProofOps_1_list) - x.Ops = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOps")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOps 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_ProofOps) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.ProofOps.ops": - if x.Ops == nil { - x.Ops = []*ProofOp{} - } - value := &_ProofOps_1_list{list: &x.Ops} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOps")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOps 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_ProofOps) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.crypto.ProofOps.ops": - list := []*ProofOp{} - return protoreflect.ValueOfList(&_ProofOps_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.crypto.ProofOps")) - } - panic(fmt.Errorf("message tendermint.crypto.ProofOps 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_ProofOps) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.crypto.ProofOps", 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_ProofOps) 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_ProofOps) 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_ProofOps) 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_ProofOps) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Ops) > 0 { - for _, e := range x.Ops { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Ops) > 0 { - for iNdEx := len(x.Ops) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Ops[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ProofOps) - 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: ProofOps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOps: 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 Ops", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Ops = append(x.Ops, &ProofOp{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Ops[len(x.Ops)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/crypto/proof.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Proof struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - LeafHash []byte `protobuf:"bytes,3,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"` - Aunts [][]byte `protobuf:"bytes,4,rep,name=aunts,proto3" json:"aunts,omitempty"` -} - -func (x *Proof) Reset() { - *x = Proof{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_crypto_proof_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proof) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proof) ProtoMessage() {} - -// Deprecated: Use Proof.ProtoReflect.Descriptor instead. -func (*Proof) Descriptor() ([]byte, []int) { - return file_tendermint_crypto_proof_proto_rawDescGZIP(), []int{0} -} - -func (x *Proof) GetTotal() int64 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *Proof) GetIndex() int64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *Proof) GetLeafHash() []byte { - if x != nil { - return x.LeafHash - } - return nil -} - -func (x *Proof) GetAunts() [][]byte { - if x != nil { - return x.Aunts - } - return nil -} - -type ValueOp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Encoded in ProofOp.Key. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // To encode in ProofOp.Data - Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *ValueOp) Reset() { - *x = ValueOp{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_crypto_proof_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValueOp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueOp) ProtoMessage() {} - -// Deprecated: Use ValueOp.ProtoReflect.Descriptor instead. -func (*ValueOp) Descriptor() ([]byte, []int) { - return file_tendermint_crypto_proof_proto_rawDescGZIP(), []int{1} -} - -func (x *ValueOp) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ValueOp) GetProof() *Proof { - if x != nil { - return x.Proof - } - return nil -} - -type DominoOp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` - Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` -} - -func (x *DominoOp) Reset() { - *x = DominoOp{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_crypto_proof_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DominoOp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DominoOp) ProtoMessage() {} - -// Deprecated: Use DominoOp.ProtoReflect.Descriptor instead. -func (*DominoOp) Descriptor() ([]byte, []int) { - return file_tendermint_crypto_proof_proto_rawDescGZIP(), []int{2} -} - -func (x *DominoOp) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *DominoOp) GetInput() string { - if x != nil { - return x.Input - } - return "" -} - -func (x *DominoOp) GetOutput() string { - if x != nil { - return x.Output - } - return "" -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -type ProofOp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *ProofOp) Reset() { - *x = ProofOp{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_crypto_proof_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProofOp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProofOp) ProtoMessage() {} - -// Deprecated: Use ProofOp.ProtoReflect.Descriptor instead. -func (*ProofOp) Descriptor() ([]byte, []int) { - return file_tendermint_crypto_proof_proto_rawDescGZIP(), []int{3} -} - -func (x *ProofOp) GetType_() string { - if x != nil { - return x.Type_ - } - return "" -} - -func (x *ProofOp) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ProofOp) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -// ProofOps is Merkle proof defined by the list of ProofOps -type ProofOps struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ops []*ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops,omitempty"` -} - -func (x *ProofOps) Reset() { - *x = ProofOps{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_crypto_proof_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProofOps) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProofOps) ProtoMessage() {} - -// Deprecated: Use ProofOps.ProtoReflect.Descriptor instead. -func (*ProofOps) Descriptor() ([]byte, []int) { - return file_tendermint_crypto_proof_proto_rawDescGZIP(), []int{4} -} - -func (x *ProofOps) GetOps() []*ProofOp { - if x != nil { - return x.Ops - } - return nil -} - -var File_tendermint_crypto_proof_proto protoreflect.FileDescriptor - -var file_tendermint_crypto_proof_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x11, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, - 0x09, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x75, - 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x75, 0x6e, 0x74, 0x73, - 0x22, 0x4b, 0x0a, 0x07, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x4a, 0x0a, - 0x08, 0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x6f, 0x4f, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x43, 0x0a, 0x07, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x4f, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x03, 0x6f, 0x70, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x4f, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x03, 0x6f, 0x70, 0x73, 0x42, 0xbc, - 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x42, 0x0a, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x58, - 0xaa, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0xca, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0xe2, 0x02, 0x1d, 0x54, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x54, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_crypto_proof_proto_rawDescOnce sync.Once - file_tendermint_crypto_proof_proto_rawDescData = file_tendermint_crypto_proof_proto_rawDesc -) - -func file_tendermint_crypto_proof_proto_rawDescGZIP() []byte { - file_tendermint_crypto_proof_proto_rawDescOnce.Do(func() { - file_tendermint_crypto_proof_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_crypto_proof_proto_rawDescData) - }) - return file_tendermint_crypto_proof_proto_rawDescData -} - -var file_tendermint_crypto_proof_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_tendermint_crypto_proof_proto_goTypes = []interface{}{ - (*Proof)(nil), // 0: tendermint.crypto.Proof - (*ValueOp)(nil), // 1: tendermint.crypto.ValueOp - (*DominoOp)(nil), // 2: tendermint.crypto.DominoOp - (*ProofOp)(nil), // 3: tendermint.crypto.ProofOp - (*ProofOps)(nil), // 4: tendermint.crypto.ProofOps -} -var file_tendermint_crypto_proof_proto_depIdxs = []int32{ - 0, // 0: tendermint.crypto.ValueOp.proof:type_name -> tendermint.crypto.Proof - 3, // 1: tendermint.crypto.ProofOps.ops:type_name -> tendermint.crypto.ProofOp - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_tendermint_crypto_proof_proto_init() } -func file_tendermint_crypto_proof_proto_init() { - if File_tendermint_crypto_proof_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_crypto_proof_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_crypto_proof_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueOp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_crypto_proof_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DominoOp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_crypto_proof_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofOp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_crypto_proof_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofOps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_crypto_proof_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_crypto_proof_proto_goTypes, - DependencyIndexes: file_tendermint_crypto_proof_proto_depIdxs, - MessageInfos: file_tendermint_crypto_proof_proto_msgTypes, - }.Build() - File_tendermint_crypto_proof_proto = out.File - file_tendermint_crypto_proof_proto_rawDesc = nil - file_tendermint_crypto_proof_proto_goTypes = nil - file_tendermint_crypto_proof_proto_depIdxs = nil -} diff --git a/api/tendermint/libs/bits/types.pulsar.go b/api/tendermint/libs/bits/types.pulsar.go deleted file mode 100644 index df60fe39b4c3..000000000000 --- a/api/tendermint/libs/bits/types.pulsar.go +++ /dev/null @@ -1,742 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package bits - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_BitArray_2_list)(nil) - -type _BitArray_2_list struct { - list *[]uint64 -} - -func (x *_BitArray_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BitArray_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_BitArray_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_BitArray_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_BitArray_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message BitArray at list field Elems as it is not of Message kind")) -} - -func (x *_BitArray_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_BitArray_2_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_BitArray_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_BitArray protoreflect.MessageDescriptor - fd_BitArray_bits protoreflect.FieldDescriptor - fd_BitArray_elems protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_libs_bits_types_proto_init() - md_BitArray = File_tendermint_libs_bits_types_proto.Messages().ByName("BitArray") - fd_BitArray_bits = md_BitArray.Fields().ByName("bits") - fd_BitArray_elems = md_BitArray.Fields().ByName("elems") -} - -var _ protoreflect.Message = (*fastReflection_BitArray)(nil) - -type fastReflection_BitArray BitArray - -func (x *BitArray) ProtoReflect() protoreflect.Message { - return (*fastReflection_BitArray)(x) -} - -func (x *BitArray) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_libs_bits_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BitArray_messageType fastReflection_BitArray_messageType -var _ protoreflect.MessageType = fastReflection_BitArray_messageType{} - -type fastReflection_BitArray_messageType struct{} - -func (x fastReflection_BitArray_messageType) Zero() protoreflect.Message { - return (*fastReflection_BitArray)(nil) -} -func (x fastReflection_BitArray_messageType) New() protoreflect.Message { - return new(fastReflection_BitArray) -} -func (x fastReflection_BitArray_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BitArray -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BitArray) Descriptor() protoreflect.MessageDescriptor { - return md_BitArray -} - -// 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_BitArray) Type() protoreflect.MessageType { - return _fastReflection_BitArray_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BitArray) New() protoreflect.Message { - return new(fastReflection_BitArray) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BitArray) Interface() protoreflect.ProtoMessage { - return (*BitArray)(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_BitArray) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bits != int64(0) { - value := protoreflect.ValueOfInt64(x.Bits) - if !f(fd_BitArray_bits, value) { - return - } - } - if len(x.Elems) != 0 { - value := protoreflect.ValueOfList(&_BitArray_2_list{list: &x.Elems}) - if !f(fd_BitArray_elems, 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_BitArray) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.libs.bits.BitArray.bits": - return x.Bits != int64(0) - case "tendermint.libs.bits.BitArray.elems": - return len(x.Elems) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.libs.bits.BitArray")) - } - panic(fmt.Errorf("message tendermint.libs.bits.BitArray 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_BitArray) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.libs.bits.BitArray.bits": - x.Bits = int64(0) - case "tendermint.libs.bits.BitArray.elems": - x.Elems = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.libs.bits.BitArray")) - } - panic(fmt.Errorf("message tendermint.libs.bits.BitArray 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_BitArray) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.libs.bits.BitArray.bits": - value := x.Bits - return protoreflect.ValueOfInt64(value) - case "tendermint.libs.bits.BitArray.elems": - if len(x.Elems) == 0 { - return protoreflect.ValueOfList(&_BitArray_2_list{}) - } - listValue := &_BitArray_2_list{list: &x.Elems} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.libs.bits.BitArray")) - } - panic(fmt.Errorf("message tendermint.libs.bits.BitArray 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_BitArray) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.libs.bits.BitArray.bits": - x.Bits = value.Int() - case "tendermint.libs.bits.BitArray.elems": - lv := value.List() - clv := lv.(*_BitArray_2_list) - x.Elems = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.libs.bits.BitArray")) - } - panic(fmt.Errorf("message tendermint.libs.bits.BitArray 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_BitArray) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.libs.bits.BitArray.elems": - if x.Elems == nil { - x.Elems = []uint64{} - } - value := &_BitArray_2_list{list: &x.Elems} - return protoreflect.ValueOfList(value) - case "tendermint.libs.bits.BitArray.bits": - panic(fmt.Errorf("field bits of message tendermint.libs.bits.BitArray is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.libs.bits.BitArray")) - } - panic(fmt.Errorf("message tendermint.libs.bits.BitArray 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_BitArray) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.libs.bits.BitArray.bits": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.libs.bits.BitArray.elems": - list := []uint64{} - return protoreflect.ValueOfList(&_BitArray_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.libs.bits.BitArray")) - } - panic(fmt.Errorf("message tendermint.libs.bits.BitArray 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_BitArray) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.libs.bits.BitArray", 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_BitArray) 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_BitArray) 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_BitArray) 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_BitArray) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BitArray) - 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.Bits != 0 { - n += 1 + runtime.Sov(uint64(x.Bits)) - } - if len(x.Elems) > 0 { - l = 0 - for _, e := range x.Elems { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BitArray) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Elems) > 0 { - var pksize2 int - for _, num := range x.Elems { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.Elems { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x12 - } - if x.Bits != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Bits)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BitArray) - 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: BitArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BitArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) - } - x.Bits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Bits |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Elems = append(x.Elems, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.Elems) == 0 { - x.Elems = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Elems = append(x.Elems, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType) - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/libs/bits/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type BitArray struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bits int64 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"` - Elems []uint64 `protobuf:"varint,2,rep,packed,name=elems,proto3" json:"elems,omitempty"` -} - -func (x *BitArray) Reset() { - *x = BitArray{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_libs_bits_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BitArray) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BitArray) ProtoMessage() {} - -// Deprecated: Use BitArray.ProtoReflect.Descriptor instead. -func (*BitArray) Descriptor() ([]byte, []int) { - return file_tendermint_libs_bits_types_proto_rawDescGZIP(), []int{0} -} - -func (x *BitArray) GetBits() int64 { - if x != nil { - return x.Bits - } - return 0 -} - -func (x *BitArray) GetElems() []uint64 { - if x != nil { - return x.Elems - } - return nil -} - -var File_tendermint_libs_bits_types_proto protoreflect.FileDescriptor - -var file_tendermint_libs_bits_types_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x6c, 0x69, 0x62, - 0x73, 0x2f, 0x62, 0x69, 0x74, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x14, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x6c, - 0x69, 0x62, 0x73, 0x2e, 0x62, 0x69, 0x74, 0x73, 0x22, 0x34, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x41, - 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x04, 0x62, 0x69, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6c, 0x65, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x65, 0x6c, 0x65, 0x6d, 0x73, 0x42, 0xcf, - 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x73, 0x2e, 0x62, 0x69, 0x74, 0x73, 0x42, 0x0a, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x6c, 0x69, 0x62, 0x73, 0x2f, 0x62, 0x69, 0x74, 0x73, - 0xa2, 0x02, 0x03, 0x54, 0x4c, 0x42, 0xaa, 0x02, 0x14, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x62, 0x73, 0x2e, 0x42, 0x69, 0x74, 0x73, 0xca, 0x02, 0x14, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x4c, 0x69, 0x62, 0x73, 0x5c, - 0x42, 0x69, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x5c, 0x4c, 0x69, 0x62, 0x73, 0x5c, 0x42, 0x69, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x4c, 0x69, 0x62, 0x73, 0x3a, 0x3a, 0x42, 0x69, 0x74, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_libs_bits_types_proto_rawDescOnce sync.Once - file_tendermint_libs_bits_types_proto_rawDescData = file_tendermint_libs_bits_types_proto_rawDesc -) - -func file_tendermint_libs_bits_types_proto_rawDescGZIP() []byte { - file_tendermint_libs_bits_types_proto_rawDescOnce.Do(func() { - file_tendermint_libs_bits_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_libs_bits_types_proto_rawDescData) - }) - return file_tendermint_libs_bits_types_proto_rawDescData -} - -var file_tendermint_libs_bits_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_tendermint_libs_bits_types_proto_goTypes = []interface{}{ - (*BitArray)(nil), // 0: tendermint.libs.bits.BitArray -} -var file_tendermint_libs_bits_types_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_tendermint_libs_bits_types_proto_init() } -func file_tendermint_libs_bits_types_proto_init() { - if File_tendermint_libs_bits_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_libs_bits_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BitArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_libs_bits_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_libs_bits_types_proto_goTypes, - DependencyIndexes: file_tendermint_libs_bits_types_proto_depIdxs, - MessageInfos: file_tendermint_libs_bits_types_proto_msgTypes, - }.Build() - File_tendermint_libs_bits_types_proto = out.File - file_tendermint_libs_bits_types_proto_rawDesc = nil - file_tendermint_libs_bits_types_proto_goTypes = nil - file_tendermint_libs_bits_types_proto_depIdxs = nil -} diff --git a/api/tendermint/p2p/types.pulsar.go b/api/tendermint/p2p/types.pulsar.go deleted file mode 100644 index 8176cb8a9acd..000000000000 --- a/api/tendermint/p2p/types.pulsar.go +++ /dev/null @@ -1,3673 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package p2p - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_ProtocolVersion protoreflect.MessageDescriptor - fd_ProtocolVersion_p2p protoreflect.FieldDescriptor - fd_ProtocolVersion_block protoreflect.FieldDescriptor - fd_ProtocolVersion_app protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_p2p_types_proto_init() - md_ProtocolVersion = File_tendermint_p2p_types_proto.Messages().ByName("ProtocolVersion") - fd_ProtocolVersion_p2p = md_ProtocolVersion.Fields().ByName("p2p") - fd_ProtocolVersion_block = md_ProtocolVersion.Fields().ByName("block") - fd_ProtocolVersion_app = md_ProtocolVersion.Fields().ByName("app") -} - -var _ protoreflect.Message = (*fastReflection_ProtocolVersion)(nil) - -type fastReflection_ProtocolVersion ProtocolVersion - -func (x *ProtocolVersion) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProtocolVersion)(x) -} - -func (x *ProtocolVersion) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_p2p_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProtocolVersion_messageType fastReflection_ProtocolVersion_messageType -var _ protoreflect.MessageType = fastReflection_ProtocolVersion_messageType{} - -type fastReflection_ProtocolVersion_messageType struct{} - -func (x fastReflection_ProtocolVersion_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProtocolVersion)(nil) -} -func (x fastReflection_ProtocolVersion_messageType) New() protoreflect.Message { - return new(fastReflection_ProtocolVersion) -} -func (x fastReflection_ProtocolVersion_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProtocolVersion -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProtocolVersion) Descriptor() protoreflect.MessageDescriptor { - return md_ProtocolVersion -} - -// 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_ProtocolVersion) Type() protoreflect.MessageType { - return _fastReflection_ProtocolVersion_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProtocolVersion) New() protoreflect.Message { - return new(fastReflection_ProtocolVersion) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProtocolVersion) Interface() protoreflect.ProtoMessage { - return (*ProtocolVersion)(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_ProtocolVersion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.P2P != uint64(0) { - value := protoreflect.ValueOfUint64(x.P2P) - if !f(fd_ProtocolVersion_p2p, value) { - return - } - } - if x.Block != uint64(0) { - value := protoreflect.ValueOfUint64(x.Block) - if !f(fd_ProtocolVersion_block, value) { - return - } - } - if x.App != uint64(0) { - value := protoreflect.ValueOfUint64(x.App) - if !f(fd_ProtocolVersion_app, 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_ProtocolVersion) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.p2p.ProtocolVersion.p2p": - return x.P2P != uint64(0) - case "tendermint.p2p.ProtocolVersion.block": - return x.Block != uint64(0) - case "tendermint.p2p.ProtocolVersion.app": - return x.App != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.ProtocolVersion")) - } - panic(fmt.Errorf("message tendermint.p2p.ProtocolVersion 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_ProtocolVersion) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.p2p.ProtocolVersion.p2p": - x.P2P = uint64(0) - case "tendermint.p2p.ProtocolVersion.block": - x.Block = uint64(0) - case "tendermint.p2p.ProtocolVersion.app": - x.App = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.ProtocolVersion")) - } - panic(fmt.Errorf("message tendermint.p2p.ProtocolVersion 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_ProtocolVersion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.p2p.ProtocolVersion.p2p": - value := x.P2P - return protoreflect.ValueOfUint64(value) - case "tendermint.p2p.ProtocolVersion.block": - value := x.Block - return protoreflect.ValueOfUint64(value) - case "tendermint.p2p.ProtocolVersion.app": - value := x.App - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.ProtocolVersion")) - } - panic(fmt.Errorf("message tendermint.p2p.ProtocolVersion 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_ProtocolVersion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.p2p.ProtocolVersion.p2p": - x.P2P = value.Uint() - case "tendermint.p2p.ProtocolVersion.block": - x.Block = value.Uint() - case "tendermint.p2p.ProtocolVersion.app": - x.App = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.ProtocolVersion")) - } - panic(fmt.Errorf("message tendermint.p2p.ProtocolVersion 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_ProtocolVersion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.ProtocolVersion.p2p": - panic(fmt.Errorf("field p2p of message tendermint.p2p.ProtocolVersion is not mutable")) - case "tendermint.p2p.ProtocolVersion.block": - panic(fmt.Errorf("field block of message tendermint.p2p.ProtocolVersion is not mutable")) - case "tendermint.p2p.ProtocolVersion.app": - panic(fmt.Errorf("field app of message tendermint.p2p.ProtocolVersion is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.ProtocolVersion")) - } - panic(fmt.Errorf("message tendermint.p2p.ProtocolVersion 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_ProtocolVersion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.ProtocolVersion.p2p": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.p2p.ProtocolVersion.block": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.p2p.ProtocolVersion.app": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.ProtocolVersion")) - } - panic(fmt.Errorf("message tendermint.p2p.ProtocolVersion 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_ProtocolVersion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.p2p.ProtocolVersion", 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_ProtocolVersion) 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_ProtocolVersion) 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_ProtocolVersion) 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_ProtocolVersion) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProtocolVersion) - 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.P2P != 0 { - n += 1 + runtime.Sov(uint64(x.P2P)) - } - if x.Block != 0 { - n += 1 + runtime.Sov(uint64(x.Block)) - } - if x.App != 0 { - n += 1 + runtime.Sov(uint64(x.App)) - } - 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().(*ProtocolVersion) - 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.App != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.App)) - i-- - dAtA[i] = 0x18 - } - if x.Block != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Block)) - i-- - dAtA[i] = 0x10 - } - if x.P2P != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.P2P)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ProtocolVersion) - 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: ProtocolVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProtocolVersion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field P2P", wireType) - } - x.P2P = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.P2P |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - x.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Block |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field App", wireType) - } - x.App = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.App |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_NodeInfo protoreflect.MessageDescriptor - fd_NodeInfo_protocol_version protoreflect.FieldDescriptor - fd_NodeInfo_node_id protoreflect.FieldDescriptor - fd_NodeInfo_listen_addr protoreflect.FieldDescriptor - fd_NodeInfo_network protoreflect.FieldDescriptor - fd_NodeInfo_version protoreflect.FieldDescriptor - fd_NodeInfo_channels protoreflect.FieldDescriptor - fd_NodeInfo_moniker protoreflect.FieldDescriptor - fd_NodeInfo_other protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_p2p_types_proto_init() - md_NodeInfo = File_tendermint_p2p_types_proto.Messages().ByName("NodeInfo") - fd_NodeInfo_protocol_version = md_NodeInfo.Fields().ByName("protocol_version") - fd_NodeInfo_node_id = md_NodeInfo.Fields().ByName("node_id") - fd_NodeInfo_listen_addr = md_NodeInfo.Fields().ByName("listen_addr") - fd_NodeInfo_network = md_NodeInfo.Fields().ByName("network") - fd_NodeInfo_version = md_NodeInfo.Fields().ByName("version") - fd_NodeInfo_channels = md_NodeInfo.Fields().ByName("channels") - fd_NodeInfo_moniker = md_NodeInfo.Fields().ByName("moniker") - fd_NodeInfo_other = md_NodeInfo.Fields().ByName("other") -} - -var _ protoreflect.Message = (*fastReflection_NodeInfo)(nil) - -type fastReflection_NodeInfo NodeInfo - -func (x *NodeInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_NodeInfo)(x) -} - -func (x *NodeInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_p2p_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_NodeInfo_messageType fastReflection_NodeInfo_messageType -var _ protoreflect.MessageType = fastReflection_NodeInfo_messageType{} - -type fastReflection_NodeInfo_messageType struct{} - -func (x fastReflection_NodeInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_NodeInfo)(nil) -} -func (x fastReflection_NodeInfo_messageType) New() protoreflect.Message { - return new(fastReflection_NodeInfo) -} -func (x fastReflection_NodeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NodeInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_NodeInfo) Descriptor() protoreflect.MessageDescriptor { - return md_NodeInfo -} - -// 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_NodeInfo) Type() protoreflect.MessageType { - return _fastReflection_NodeInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_NodeInfo) New() protoreflect.Message { - return new(fastReflection_NodeInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_NodeInfo) Interface() protoreflect.ProtoMessage { - return (*NodeInfo)(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_NodeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ProtocolVersion != nil { - value := protoreflect.ValueOfMessage(x.ProtocolVersion.ProtoReflect()) - if !f(fd_NodeInfo_protocol_version, value) { - return - } - } - if x.NodeId != "" { - value := protoreflect.ValueOfString(x.NodeId) - if !f(fd_NodeInfo_node_id, value) { - return - } - } - if x.ListenAddr != "" { - value := protoreflect.ValueOfString(x.ListenAddr) - if !f(fd_NodeInfo_listen_addr, value) { - return - } - } - if x.Network != "" { - value := protoreflect.ValueOfString(x.Network) - if !f(fd_NodeInfo_network, value) { - return - } - } - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_NodeInfo_version, value) { - return - } - } - if len(x.Channels) != 0 { - value := protoreflect.ValueOfBytes(x.Channels) - if !f(fd_NodeInfo_channels, value) { - return - } - } - if x.Moniker != "" { - value := protoreflect.ValueOfString(x.Moniker) - if !f(fd_NodeInfo_moniker, value) { - return - } - } - if x.Other != nil { - value := protoreflect.ValueOfMessage(x.Other.ProtoReflect()) - if !f(fd_NodeInfo_other, 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_NodeInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.p2p.NodeInfo.protocol_version": - return x.ProtocolVersion != nil - case "tendermint.p2p.NodeInfo.node_id": - return x.NodeId != "" - case "tendermint.p2p.NodeInfo.listen_addr": - return x.ListenAddr != "" - case "tendermint.p2p.NodeInfo.network": - return x.Network != "" - case "tendermint.p2p.NodeInfo.version": - return x.Version != "" - case "tendermint.p2p.NodeInfo.channels": - return len(x.Channels) != 0 - case "tendermint.p2p.NodeInfo.moniker": - return x.Moniker != "" - case "tendermint.p2p.NodeInfo.other": - return x.Other != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfo 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_NodeInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.p2p.NodeInfo.protocol_version": - x.ProtocolVersion = nil - case "tendermint.p2p.NodeInfo.node_id": - x.NodeId = "" - case "tendermint.p2p.NodeInfo.listen_addr": - x.ListenAddr = "" - case "tendermint.p2p.NodeInfo.network": - x.Network = "" - case "tendermint.p2p.NodeInfo.version": - x.Version = "" - case "tendermint.p2p.NodeInfo.channels": - x.Channels = nil - case "tendermint.p2p.NodeInfo.moniker": - x.Moniker = "" - case "tendermint.p2p.NodeInfo.other": - x.Other = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfo 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_NodeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.p2p.NodeInfo.protocol_version": - value := x.ProtocolVersion - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.p2p.NodeInfo.node_id": - value := x.NodeId - return protoreflect.ValueOfString(value) - case "tendermint.p2p.NodeInfo.listen_addr": - value := x.ListenAddr - return protoreflect.ValueOfString(value) - case "tendermint.p2p.NodeInfo.network": - value := x.Network - return protoreflect.ValueOfString(value) - case "tendermint.p2p.NodeInfo.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "tendermint.p2p.NodeInfo.channels": - value := x.Channels - return protoreflect.ValueOfBytes(value) - case "tendermint.p2p.NodeInfo.moniker": - value := x.Moniker - return protoreflect.ValueOfString(value) - case "tendermint.p2p.NodeInfo.other": - value := x.Other - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfo 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_NodeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.p2p.NodeInfo.protocol_version": - x.ProtocolVersion = value.Message().Interface().(*ProtocolVersion) - case "tendermint.p2p.NodeInfo.node_id": - x.NodeId = value.Interface().(string) - case "tendermint.p2p.NodeInfo.listen_addr": - x.ListenAddr = value.Interface().(string) - case "tendermint.p2p.NodeInfo.network": - x.Network = value.Interface().(string) - case "tendermint.p2p.NodeInfo.version": - x.Version = value.Interface().(string) - case "tendermint.p2p.NodeInfo.channels": - x.Channels = value.Bytes() - case "tendermint.p2p.NodeInfo.moniker": - x.Moniker = value.Interface().(string) - case "tendermint.p2p.NodeInfo.other": - x.Other = value.Message().Interface().(*NodeInfoOther) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfo 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_NodeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.NodeInfo.protocol_version": - if x.ProtocolVersion == nil { - x.ProtocolVersion = new(ProtocolVersion) - } - return protoreflect.ValueOfMessage(x.ProtocolVersion.ProtoReflect()) - case "tendermint.p2p.NodeInfo.other": - if x.Other == nil { - x.Other = new(NodeInfoOther) - } - return protoreflect.ValueOfMessage(x.Other.ProtoReflect()) - case "tendermint.p2p.NodeInfo.node_id": - panic(fmt.Errorf("field node_id of message tendermint.p2p.NodeInfo is not mutable")) - case "tendermint.p2p.NodeInfo.listen_addr": - panic(fmt.Errorf("field listen_addr of message tendermint.p2p.NodeInfo is not mutable")) - case "tendermint.p2p.NodeInfo.network": - panic(fmt.Errorf("field network of message tendermint.p2p.NodeInfo is not mutable")) - case "tendermint.p2p.NodeInfo.version": - panic(fmt.Errorf("field version of message tendermint.p2p.NodeInfo is not mutable")) - case "tendermint.p2p.NodeInfo.channels": - panic(fmt.Errorf("field channels of message tendermint.p2p.NodeInfo is not mutable")) - case "tendermint.p2p.NodeInfo.moniker": - panic(fmt.Errorf("field moniker of message tendermint.p2p.NodeInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfo 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_NodeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.NodeInfo.protocol_version": - m := new(ProtocolVersion) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.p2p.NodeInfo.node_id": - return protoreflect.ValueOfString("") - case "tendermint.p2p.NodeInfo.listen_addr": - return protoreflect.ValueOfString("") - case "tendermint.p2p.NodeInfo.network": - return protoreflect.ValueOfString("") - case "tendermint.p2p.NodeInfo.version": - return protoreflect.ValueOfString("") - case "tendermint.p2p.NodeInfo.channels": - return protoreflect.ValueOfBytes(nil) - case "tendermint.p2p.NodeInfo.moniker": - return protoreflect.ValueOfString("") - case "tendermint.p2p.NodeInfo.other": - m := new(NodeInfoOther) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfo 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_NodeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.p2p.NodeInfo", 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_NodeInfo) 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_NodeInfo) 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_NodeInfo) 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_NodeInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NodeInfo) - 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.ProtocolVersion != nil { - l = options.Size(x.ProtocolVersion) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NodeId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ListenAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Network) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Channels) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Moniker) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Other != nil { - l = options.Size(x.Other) - 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().(*NodeInfo) - 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.Other != nil { - encoded, err := options.Marshal(x.Other) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.Moniker) > 0 { - i -= len(x.Moniker) - copy(dAtA[i:], x.Moniker) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Moniker))) - i-- - dAtA[i] = 0x3a - } - if len(x.Channels) > 0 { - i -= len(x.Channels) - copy(dAtA[i:], x.Channels) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Channels))) - i-- - dAtA[i] = 0x32 - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - i-- - dAtA[i] = 0x2a - } - if len(x.Network) > 0 { - i -= len(x.Network) - copy(dAtA[i:], x.Network) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Network))) - i-- - dAtA[i] = 0x22 - } - if len(x.ListenAddr) > 0 { - i -= len(x.ListenAddr) - copy(dAtA[i:], x.ListenAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ListenAddr))) - i-- - dAtA[i] = 0x1a - } - if len(x.NodeId) > 0 { - i -= len(x.NodeId) - copy(dAtA[i:], x.NodeId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NodeId))) - i-- - dAtA[i] = 0x12 - } - if x.ProtocolVersion != nil { - encoded, err := options.Marshal(x.ProtocolVersion) - 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().(*NodeInfo) - 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: NodeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NodeInfo: 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 ProtocolVersion", 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.ProtocolVersion == nil { - x.ProtocolVersion = &ProtocolVersion{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProtocolVersion); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NodeId", 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.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ListenAddr", 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.ListenAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", 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.Network = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Channels", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Channels = append(x.Channels[:0], dAtA[iNdEx:postIndex]...) - if x.Channels == nil { - x.Channels = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Moniker", 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.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Other", 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.Other == nil { - x.Other = &NodeInfoOther{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Other); 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_NodeInfoOther protoreflect.MessageDescriptor - fd_NodeInfoOther_tx_index protoreflect.FieldDescriptor - fd_NodeInfoOther_rpc_address protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_p2p_types_proto_init() - md_NodeInfoOther = File_tendermint_p2p_types_proto.Messages().ByName("NodeInfoOther") - fd_NodeInfoOther_tx_index = md_NodeInfoOther.Fields().ByName("tx_index") - fd_NodeInfoOther_rpc_address = md_NodeInfoOther.Fields().ByName("rpc_address") -} - -var _ protoreflect.Message = (*fastReflection_NodeInfoOther)(nil) - -type fastReflection_NodeInfoOther NodeInfoOther - -func (x *NodeInfoOther) ProtoReflect() protoreflect.Message { - return (*fastReflection_NodeInfoOther)(x) -} - -func (x *NodeInfoOther) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_p2p_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_NodeInfoOther_messageType fastReflection_NodeInfoOther_messageType -var _ protoreflect.MessageType = fastReflection_NodeInfoOther_messageType{} - -type fastReflection_NodeInfoOther_messageType struct{} - -func (x fastReflection_NodeInfoOther_messageType) Zero() protoreflect.Message { - return (*fastReflection_NodeInfoOther)(nil) -} -func (x fastReflection_NodeInfoOther_messageType) New() protoreflect.Message { - return new(fastReflection_NodeInfoOther) -} -func (x fastReflection_NodeInfoOther_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NodeInfoOther -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_NodeInfoOther) Descriptor() protoreflect.MessageDescriptor { - return md_NodeInfoOther -} - -// 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_NodeInfoOther) Type() protoreflect.MessageType { - return _fastReflection_NodeInfoOther_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_NodeInfoOther) New() protoreflect.Message { - return new(fastReflection_NodeInfoOther) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_NodeInfoOther) Interface() protoreflect.ProtoMessage { - return (*NodeInfoOther)(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_NodeInfoOther) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.TxIndex != "" { - value := protoreflect.ValueOfString(x.TxIndex) - if !f(fd_NodeInfoOther_tx_index, value) { - return - } - } - if x.RpcAddress != "" { - value := protoreflect.ValueOfString(x.RpcAddress) - if !f(fd_NodeInfoOther_rpc_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_NodeInfoOther) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.p2p.NodeInfoOther.tx_index": - return x.TxIndex != "" - case "tendermint.p2p.NodeInfoOther.rpc_address": - return x.RpcAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfoOther")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfoOther 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_NodeInfoOther) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.p2p.NodeInfoOther.tx_index": - x.TxIndex = "" - case "tendermint.p2p.NodeInfoOther.rpc_address": - x.RpcAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfoOther")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfoOther 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_NodeInfoOther) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.p2p.NodeInfoOther.tx_index": - value := x.TxIndex - return protoreflect.ValueOfString(value) - case "tendermint.p2p.NodeInfoOther.rpc_address": - value := x.RpcAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfoOther")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfoOther 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_NodeInfoOther) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.p2p.NodeInfoOther.tx_index": - x.TxIndex = value.Interface().(string) - case "tendermint.p2p.NodeInfoOther.rpc_address": - x.RpcAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfoOther")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfoOther 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_NodeInfoOther) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.NodeInfoOther.tx_index": - panic(fmt.Errorf("field tx_index of message tendermint.p2p.NodeInfoOther is not mutable")) - case "tendermint.p2p.NodeInfoOther.rpc_address": - panic(fmt.Errorf("field rpc_address of message tendermint.p2p.NodeInfoOther is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfoOther")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfoOther 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_NodeInfoOther) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.NodeInfoOther.tx_index": - return protoreflect.ValueOfString("") - case "tendermint.p2p.NodeInfoOther.rpc_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.NodeInfoOther")) - } - panic(fmt.Errorf("message tendermint.p2p.NodeInfoOther 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_NodeInfoOther) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.p2p.NodeInfoOther", 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_NodeInfoOther) 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_NodeInfoOther) 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_NodeInfoOther) 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_NodeInfoOther) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NodeInfoOther) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.TxIndex) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RpcAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*NodeInfoOther) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.RpcAddress) > 0 { - i -= len(x.RpcAddress) - copy(dAtA[i:], x.RpcAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RpcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.TxIndex) > 0 { - i -= len(x.TxIndex) - copy(dAtA[i:], x.TxIndex) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxIndex))) - 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().(*NodeInfoOther) - 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: NodeInfoOther: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NodeInfoOther: 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 TxIndex", 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.TxIndex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RpcAddress", 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.RpcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_PeerInfo_2_list)(nil) - -type _PeerInfo_2_list struct { - list *[]*PeerAddressInfo -} - -func (x *_PeerInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_PeerInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_PeerInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*PeerAddressInfo) - (*x.list)[i] = concreteValue -} - -func (x *_PeerInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*PeerAddressInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_PeerInfo_2_list) AppendMutable() protoreflect.Value { - v := new(PeerAddressInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeerInfo_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_PeerInfo_2_list) NewElement() protoreflect.Value { - v := new(PeerAddressInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeerInfo_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_PeerInfo protoreflect.MessageDescriptor - fd_PeerInfo_id protoreflect.FieldDescriptor - fd_PeerInfo_address_info protoreflect.FieldDescriptor - fd_PeerInfo_last_connected protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_p2p_types_proto_init() - md_PeerInfo = File_tendermint_p2p_types_proto.Messages().ByName("PeerInfo") - fd_PeerInfo_id = md_PeerInfo.Fields().ByName("id") - fd_PeerInfo_address_info = md_PeerInfo.Fields().ByName("address_info") - fd_PeerInfo_last_connected = md_PeerInfo.Fields().ByName("last_connected") -} - -var _ protoreflect.Message = (*fastReflection_PeerInfo)(nil) - -type fastReflection_PeerInfo PeerInfo - -func (x *PeerInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_PeerInfo)(x) -} - -func (x *PeerInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_p2p_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PeerInfo_messageType fastReflection_PeerInfo_messageType -var _ protoreflect.MessageType = fastReflection_PeerInfo_messageType{} - -type fastReflection_PeerInfo_messageType struct{} - -func (x fastReflection_PeerInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_PeerInfo)(nil) -} -func (x fastReflection_PeerInfo_messageType) New() protoreflect.Message { - return new(fastReflection_PeerInfo) -} -func (x fastReflection_PeerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PeerInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PeerInfo) Descriptor() protoreflect.MessageDescriptor { - return md_PeerInfo -} - -// 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_PeerInfo) Type() protoreflect.MessageType { - return _fastReflection_PeerInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PeerInfo) New() protoreflect.Message { - return new(fastReflection_PeerInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PeerInfo) Interface() protoreflect.ProtoMessage { - return (*PeerInfo)(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_PeerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_PeerInfo_id, value) { - return - } - } - if len(x.AddressInfo) != 0 { - value := protoreflect.ValueOfList(&_PeerInfo_2_list{list: &x.AddressInfo}) - if !f(fd_PeerInfo_address_info, value) { - return - } - } - if x.LastConnected != nil { - value := protoreflect.ValueOfMessage(x.LastConnected.ProtoReflect()) - if !f(fd_PeerInfo_last_connected, 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_PeerInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.p2p.PeerInfo.id": - return x.Id != "" - case "tendermint.p2p.PeerInfo.address_info": - return len(x.AddressInfo) != 0 - case "tendermint.p2p.PeerInfo.last_connected": - return x.LastConnected != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerInfo 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_PeerInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.p2p.PeerInfo.id": - x.Id = "" - case "tendermint.p2p.PeerInfo.address_info": - x.AddressInfo = nil - case "tendermint.p2p.PeerInfo.last_connected": - x.LastConnected = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerInfo 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_PeerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.p2p.PeerInfo.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "tendermint.p2p.PeerInfo.address_info": - if len(x.AddressInfo) == 0 { - return protoreflect.ValueOfList(&_PeerInfo_2_list{}) - } - listValue := &_PeerInfo_2_list{list: &x.AddressInfo} - return protoreflect.ValueOfList(listValue) - case "tendermint.p2p.PeerInfo.last_connected": - value := x.LastConnected - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerInfo 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_PeerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.p2p.PeerInfo.id": - x.Id = value.Interface().(string) - case "tendermint.p2p.PeerInfo.address_info": - lv := value.List() - clv := lv.(*_PeerInfo_2_list) - x.AddressInfo = *clv.list - case "tendermint.p2p.PeerInfo.last_connected": - x.LastConnected = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerInfo 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_PeerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.PeerInfo.address_info": - if x.AddressInfo == nil { - x.AddressInfo = []*PeerAddressInfo{} - } - value := &_PeerInfo_2_list{list: &x.AddressInfo} - return protoreflect.ValueOfList(value) - case "tendermint.p2p.PeerInfo.last_connected": - if x.LastConnected == nil { - x.LastConnected = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.LastConnected.ProtoReflect()) - case "tendermint.p2p.PeerInfo.id": - panic(fmt.Errorf("field id of message tendermint.p2p.PeerInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerInfo 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_PeerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.PeerInfo.id": - return protoreflect.ValueOfString("") - case "tendermint.p2p.PeerInfo.address_info": - list := []*PeerAddressInfo{} - return protoreflect.ValueOfList(&_PeerInfo_2_list{list: &list}) - case "tendermint.p2p.PeerInfo.last_connected": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerInfo 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_PeerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.p2p.PeerInfo", 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_PeerInfo) 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_PeerInfo) 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_PeerInfo) 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_PeerInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PeerInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AddressInfo) > 0 { - for _, e := range x.AddressInfo { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.LastConnected != nil { - l = options.Size(x.LastConnected) - 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().(*PeerInfo) - 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.LastConnected != nil { - encoded, err := options.Marshal(x.LastConnected) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.AddressInfo) > 0 { - for iNdEx := len(x.AddressInfo) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.AddressInfo[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*PeerInfo) - 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: PeerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeerInfo: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddressInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AddressInfo = append(x.AddressInfo, &PeerAddressInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AddressInfo[len(x.AddressInfo)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastConnected", 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.LastConnected == nil { - x.LastConnected = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastConnected); 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_PeerAddressInfo protoreflect.MessageDescriptor - fd_PeerAddressInfo_address protoreflect.FieldDescriptor - fd_PeerAddressInfo_last_dial_success protoreflect.FieldDescriptor - fd_PeerAddressInfo_last_dial_failure protoreflect.FieldDescriptor - fd_PeerAddressInfo_dial_failures protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_p2p_types_proto_init() - md_PeerAddressInfo = File_tendermint_p2p_types_proto.Messages().ByName("PeerAddressInfo") - fd_PeerAddressInfo_address = md_PeerAddressInfo.Fields().ByName("address") - fd_PeerAddressInfo_last_dial_success = md_PeerAddressInfo.Fields().ByName("last_dial_success") - fd_PeerAddressInfo_last_dial_failure = md_PeerAddressInfo.Fields().ByName("last_dial_failure") - fd_PeerAddressInfo_dial_failures = md_PeerAddressInfo.Fields().ByName("dial_failures") -} - -var _ protoreflect.Message = (*fastReflection_PeerAddressInfo)(nil) - -type fastReflection_PeerAddressInfo PeerAddressInfo - -func (x *PeerAddressInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_PeerAddressInfo)(x) -} - -func (x *PeerAddressInfo) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_p2p_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PeerAddressInfo_messageType fastReflection_PeerAddressInfo_messageType -var _ protoreflect.MessageType = fastReflection_PeerAddressInfo_messageType{} - -type fastReflection_PeerAddressInfo_messageType struct{} - -func (x fastReflection_PeerAddressInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_PeerAddressInfo)(nil) -} -func (x fastReflection_PeerAddressInfo_messageType) New() protoreflect.Message { - return new(fastReflection_PeerAddressInfo) -} -func (x fastReflection_PeerAddressInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PeerAddressInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PeerAddressInfo) Descriptor() protoreflect.MessageDescriptor { - return md_PeerAddressInfo -} - -// 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_PeerAddressInfo) Type() protoreflect.MessageType { - return _fastReflection_PeerAddressInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PeerAddressInfo) New() protoreflect.Message { - return new(fastReflection_PeerAddressInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PeerAddressInfo) Interface() protoreflect.ProtoMessage { - return (*PeerAddressInfo)(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_PeerAddressInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_PeerAddressInfo_address, value) { - return - } - } - if x.LastDialSuccess != nil { - value := protoreflect.ValueOfMessage(x.LastDialSuccess.ProtoReflect()) - if !f(fd_PeerAddressInfo_last_dial_success, value) { - return - } - } - if x.LastDialFailure != nil { - value := protoreflect.ValueOfMessage(x.LastDialFailure.ProtoReflect()) - if !f(fd_PeerAddressInfo_last_dial_failure, value) { - return - } - } - if x.DialFailures != uint32(0) { - value := protoreflect.ValueOfUint32(x.DialFailures) - if !f(fd_PeerAddressInfo_dial_failures, 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_PeerAddressInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.p2p.PeerAddressInfo.address": - return x.Address != "" - case "tendermint.p2p.PeerAddressInfo.last_dial_success": - return x.LastDialSuccess != nil - case "tendermint.p2p.PeerAddressInfo.last_dial_failure": - return x.LastDialFailure != nil - case "tendermint.p2p.PeerAddressInfo.dial_failures": - return x.DialFailures != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerAddressInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerAddressInfo 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_PeerAddressInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.p2p.PeerAddressInfo.address": - x.Address = "" - case "tendermint.p2p.PeerAddressInfo.last_dial_success": - x.LastDialSuccess = nil - case "tendermint.p2p.PeerAddressInfo.last_dial_failure": - x.LastDialFailure = nil - case "tendermint.p2p.PeerAddressInfo.dial_failures": - x.DialFailures = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerAddressInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerAddressInfo 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_PeerAddressInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.p2p.PeerAddressInfo.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "tendermint.p2p.PeerAddressInfo.last_dial_success": - value := x.LastDialSuccess - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.p2p.PeerAddressInfo.last_dial_failure": - value := x.LastDialFailure - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.p2p.PeerAddressInfo.dial_failures": - value := x.DialFailures - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerAddressInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerAddressInfo 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_PeerAddressInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.p2p.PeerAddressInfo.address": - x.Address = value.Interface().(string) - case "tendermint.p2p.PeerAddressInfo.last_dial_success": - x.LastDialSuccess = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.p2p.PeerAddressInfo.last_dial_failure": - x.LastDialFailure = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.p2p.PeerAddressInfo.dial_failures": - x.DialFailures = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerAddressInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerAddressInfo 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_PeerAddressInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.PeerAddressInfo.last_dial_success": - if x.LastDialSuccess == nil { - x.LastDialSuccess = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.LastDialSuccess.ProtoReflect()) - case "tendermint.p2p.PeerAddressInfo.last_dial_failure": - if x.LastDialFailure == nil { - x.LastDialFailure = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.LastDialFailure.ProtoReflect()) - case "tendermint.p2p.PeerAddressInfo.address": - panic(fmt.Errorf("field address of message tendermint.p2p.PeerAddressInfo is not mutable")) - case "tendermint.p2p.PeerAddressInfo.dial_failures": - panic(fmt.Errorf("field dial_failures of message tendermint.p2p.PeerAddressInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerAddressInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerAddressInfo 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_PeerAddressInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.p2p.PeerAddressInfo.address": - return protoreflect.ValueOfString("") - case "tendermint.p2p.PeerAddressInfo.last_dial_success": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.p2p.PeerAddressInfo.last_dial_failure": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.p2p.PeerAddressInfo.dial_failures": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.p2p.PeerAddressInfo")) - } - panic(fmt.Errorf("message tendermint.p2p.PeerAddressInfo 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_PeerAddressInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.p2p.PeerAddressInfo", 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_PeerAddressInfo) 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_PeerAddressInfo) 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_PeerAddressInfo) 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_PeerAddressInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PeerAddressInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LastDialSuccess != nil { - l = options.Size(x.LastDialSuccess) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LastDialFailure != nil { - l = options.Size(x.LastDialFailure) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DialFailures != 0 { - n += 1 + runtime.Sov(uint64(x.DialFailures)) - } - 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().(*PeerAddressInfo) - 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.DialFailures != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DialFailures)) - i-- - dAtA[i] = 0x20 - } - if x.LastDialFailure != nil { - encoded, err := options.Marshal(x.LastDialFailure) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.LastDialSuccess != nil { - encoded, err := options.Marshal(x.LastDialSuccess) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*PeerAddressInfo) - 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: PeerAddressInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeerAddressInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastDialSuccess", 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.LastDialSuccess == nil { - x.LastDialSuccess = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastDialSuccess); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastDialFailure", 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.LastDialFailure == nil { - x.LastDialFailure = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastDialFailure); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DialFailures", wireType) - } - x.DialFailures = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DialFailures |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/p2p/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ProtocolVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - P2P uint64 `protobuf:"varint,1,opt,name=p2p,proto3" json:"p2p,omitempty"` - Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"` - App uint64 `protobuf:"varint,3,opt,name=app,proto3" json:"app,omitempty"` -} - -func (x *ProtocolVersion) Reset() { - *x = ProtocolVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_p2p_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtocolVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtocolVersion) ProtoMessage() {} - -// Deprecated: Use ProtocolVersion.ProtoReflect.Descriptor instead. -func (*ProtocolVersion) Descriptor() ([]byte, []int) { - return file_tendermint_p2p_types_proto_rawDescGZIP(), []int{0} -} - -func (x *ProtocolVersion) GetP2P() uint64 { - if x != nil { - return x.P2P - } - return 0 -} - -func (x *ProtocolVersion) GetBlock() uint64 { - if x != nil { - return x.Block - } - return 0 -} - -func (x *ProtocolVersion) GetApp() uint64 { - if x != nil { - return x.App - } - return 0 -} - -type NodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProtocolVersion *ProtocolVersion `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - ListenAddr string `protobuf:"bytes,3,opt,name=listen_addr,json=listenAddr,proto3" json:"listen_addr,omitempty"` - Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - Channels []byte `protobuf:"bytes,6,opt,name=channels,proto3" json:"channels,omitempty"` - Moniker string `protobuf:"bytes,7,opt,name=moniker,proto3" json:"moniker,omitempty"` - Other *NodeInfoOther `protobuf:"bytes,8,opt,name=other,proto3" json:"other,omitempty"` -} - -func (x *NodeInfo) Reset() { - *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_p2p_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfo) ProtoMessage() {} - -// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead. -func (*NodeInfo) Descriptor() ([]byte, []int) { - return file_tendermint_p2p_types_proto_rawDescGZIP(), []int{1} -} - -func (x *NodeInfo) GetProtocolVersion() *ProtocolVersion { - if x != nil { - return x.ProtocolVersion - } - return nil -} - -func (x *NodeInfo) GetNodeId() string { - if x != nil { - return x.NodeId - } - return "" -} - -func (x *NodeInfo) GetListenAddr() string { - if x != nil { - return x.ListenAddr - } - return "" -} - -func (x *NodeInfo) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *NodeInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *NodeInfo) GetChannels() []byte { - if x != nil { - return x.Channels - } - return nil -} - -func (x *NodeInfo) GetMoniker() string { - if x != nil { - return x.Moniker - } - return "" -} - -func (x *NodeInfo) GetOther() *NodeInfoOther { - if x != nil { - return x.Other - } - return nil -} - -type NodeInfoOther struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxIndex string `protobuf:"bytes,1,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` - RpcAddress string `protobuf:"bytes,2,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"` -} - -func (x *NodeInfoOther) Reset() { - *x = NodeInfoOther{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_p2p_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeInfoOther) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfoOther) ProtoMessage() {} - -// Deprecated: Use NodeInfoOther.ProtoReflect.Descriptor instead. -func (*NodeInfoOther) Descriptor() ([]byte, []int) { - return file_tendermint_p2p_types_proto_rawDescGZIP(), []int{2} -} - -func (x *NodeInfoOther) GetTxIndex() string { - if x != nil { - return x.TxIndex - } - return "" -} - -func (x *NodeInfoOther) GetRpcAddress() string { - if x != nil { - return x.RpcAddress - } - return "" -} - -type PeerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AddressInfo []*PeerAddressInfo `protobuf:"bytes,2,rep,name=address_info,json=addressInfo,proto3" json:"address_info,omitempty"` - LastConnected *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_connected,json=lastConnected,proto3" json:"last_connected,omitempty"` -} - -func (x *PeerInfo) Reset() { - *x = PeerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_p2p_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeerInfo) ProtoMessage() {} - -// Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. -func (*PeerInfo) Descriptor() ([]byte, []int) { - return file_tendermint_p2p_types_proto_rawDescGZIP(), []int{3} -} - -func (x *PeerInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PeerInfo) GetAddressInfo() []*PeerAddressInfo { - if x != nil { - return x.AddressInfo - } - return nil -} - -func (x *PeerInfo) GetLastConnected() *timestamppb.Timestamp { - if x != nil { - return x.LastConnected - } - return nil -} - -type PeerAddressInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - LastDialSuccess *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_dial_success,json=lastDialSuccess,proto3" json:"last_dial_success,omitempty"` - LastDialFailure *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_dial_failure,json=lastDialFailure,proto3" json:"last_dial_failure,omitempty"` - DialFailures uint32 `protobuf:"varint,4,opt,name=dial_failures,json=dialFailures,proto3" json:"dial_failures,omitempty"` -} - -func (x *PeerAddressInfo) Reset() { - *x = PeerAddressInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_p2p_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeerAddressInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeerAddressInfo) ProtoMessage() {} - -// Deprecated: Use PeerAddressInfo.ProtoReflect.Descriptor instead. -func (*PeerAddressInfo) Descriptor() ([]byte, []int) { - return file_tendermint_p2p_types_proto_rawDescGZIP(), []int{4} -} - -func (x *PeerAddressInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *PeerAddressInfo) GetLastDialSuccess() *timestamppb.Timestamp { - if x != nil { - return x.LastDialSuccess - } - return nil -} - -func (x *PeerAddressInfo) GetLastDialFailure() *timestamppb.Timestamp { - if x != nil { - return x.LastDialFailure - } - return nil -} - -func (x *PeerAddressInfo) GetDialFailures() uint32 { - if x != nil { - return x.DialFailures - } - return 0 -} - -var File_tendermint_p2p_types_proto protoreflect.FileDescriptor - -var file_tendermint_p2p_types_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x70, 0x32, 0x70, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, 0x70, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x03, 0x70, 0x32, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x07, 0xe2, 0xde, 0x1f, 0x03, 0x50, 0x32, 0x50, 0x52, 0x03, 0x70, 0x32, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x61, 0x70, 0x70, 0x22, 0xc7, 0x02, 0x0a, 0x08, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x50, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, - 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xe2, 0xde, 0x1f, 0x06, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x05, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, 0x70, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x6f, 0x74, - 0x68, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x4f, - 0x74, 0x68, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x2f, 0x0a, 0x0b, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xe2, 0xde, 0x1f, 0x0a, 0x52, 0x50, 0x43, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x0a, 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0xaf, 0x01, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xde, 0x1f, 0x02, 0x49, - 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, 0x70, 0x2e, 0x50, 0x65, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x0e, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, - 0xdf, 0x1f, 0x01, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x22, 0xec, 0x01, 0x0a, 0x0f, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x4c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x6c, - 0x61, 0x73, 0x74, 0x44, 0x69, 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4c, - 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x6c, 0x61, 0x73, - 0x74, 0x44, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x73, 0x42, 0xaa, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, 0x70, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x70, 0x32, 0x70, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x58, 0xaa, 0x02, 0x0e, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x50, 0x32, 0x70, 0xca, 0x02, - 0x0e, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x50, 0x32, 0x70, 0xe2, - 0x02, 0x1a, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x50, 0x32, 0x70, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x50, 0x32, 0x70, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_p2p_types_proto_rawDescOnce sync.Once - file_tendermint_p2p_types_proto_rawDescData = file_tendermint_p2p_types_proto_rawDesc -) - -func file_tendermint_p2p_types_proto_rawDescGZIP() []byte { - file_tendermint_p2p_types_proto_rawDescOnce.Do(func() { - file_tendermint_p2p_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_p2p_types_proto_rawDescData) - }) - return file_tendermint_p2p_types_proto_rawDescData -} - -var file_tendermint_p2p_types_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_tendermint_p2p_types_proto_goTypes = []interface{}{ - (*ProtocolVersion)(nil), // 0: tendermint.p2p.ProtocolVersion - (*NodeInfo)(nil), // 1: tendermint.p2p.NodeInfo - (*NodeInfoOther)(nil), // 2: tendermint.p2p.NodeInfoOther - (*PeerInfo)(nil), // 3: tendermint.p2p.PeerInfo - (*PeerAddressInfo)(nil), // 4: tendermint.p2p.PeerAddressInfo - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp -} -var file_tendermint_p2p_types_proto_depIdxs = []int32{ - 0, // 0: tendermint.p2p.NodeInfo.protocol_version:type_name -> tendermint.p2p.ProtocolVersion - 2, // 1: tendermint.p2p.NodeInfo.other:type_name -> tendermint.p2p.NodeInfoOther - 4, // 2: tendermint.p2p.PeerInfo.address_info:type_name -> tendermint.p2p.PeerAddressInfo - 5, // 3: tendermint.p2p.PeerInfo.last_connected:type_name -> google.protobuf.Timestamp - 5, // 4: tendermint.p2p.PeerAddressInfo.last_dial_success:type_name -> google.protobuf.Timestamp - 5, // 5: tendermint.p2p.PeerAddressInfo.last_dial_failure:type_name -> google.protobuf.Timestamp - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_tendermint_p2p_types_proto_init() } -func file_tendermint_p2p_types_proto_init() { - if File_tendermint_p2p_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_p2p_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_p2p_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_p2p_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeInfoOther); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_p2p_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_p2p_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerAddressInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_p2p_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_p2p_types_proto_goTypes, - DependencyIndexes: file_tendermint_p2p_types_proto_depIdxs, - MessageInfos: file_tendermint_p2p_types_proto_msgTypes, - }.Build() - File_tendermint_p2p_types_proto = out.File - file_tendermint_p2p_types_proto_rawDesc = nil - file_tendermint_p2p_types_proto_goTypes = nil - file_tendermint_p2p_types_proto_depIdxs = nil -} diff --git a/api/tendermint/types/block.pulsar.go b/api/tendermint/types/block.pulsar.go deleted file mode 100644 index 9639ebe621cb..000000000000 --- a/api/tendermint/types/block.pulsar.go +++ /dev/null @@ -1,872 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package types - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Block protoreflect.MessageDescriptor - fd_Block_header protoreflect.FieldDescriptor - fd_Block_data protoreflect.FieldDescriptor - fd_Block_evidence protoreflect.FieldDescriptor - fd_Block_last_commit protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_block_proto_init() - md_Block = File_tendermint_types_block_proto.Messages().ByName("Block") - fd_Block_header = md_Block.Fields().ByName("header") - fd_Block_data = md_Block.Fields().ByName("data") - fd_Block_evidence = md_Block.Fields().ByName("evidence") - fd_Block_last_commit = md_Block.Fields().ByName("last_commit") -} - -var _ protoreflect.Message = (*fastReflection_Block)(nil) - -type fastReflection_Block Block - -func (x *Block) ProtoReflect() protoreflect.Message { - return (*fastReflection_Block)(x) -} - -func (x *Block) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_block_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Block_messageType fastReflection_Block_messageType -var _ protoreflect.MessageType = fastReflection_Block_messageType{} - -type fastReflection_Block_messageType struct{} - -func (x fastReflection_Block_messageType) Zero() protoreflect.Message { - return (*fastReflection_Block)(nil) -} -func (x fastReflection_Block_messageType) New() protoreflect.Message { - return new(fastReflection_Block) -} -func (x fastReflection_Block_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Block -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Block) Descriptor() protoreflect.MessageDescriptor { - return md_Block -} - -// 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_Block) Type() protoreflect.MessageType { - return _fastReflection_Block_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Block) New() protoreflect.Message { - return new(fastReflection_Block) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Block) Interface() protoreflect.ProtoMessage { - return (*Block)(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_Block) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Header != nil { - value := protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - if !f(fd_Block_header, value) { - return - } - } - if x.Data != nil { - value := protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - if !f(fd_Block_data, value) { - return - } - } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_Block_evidence, value) { - return - } - } - if x.LastCommit != nil { - value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) - if !f(fd_Block_last_commit, 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_Block) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Block.header": - return x.Header != nil - case "tendermint.types.Block.data": - return x.Data != nil - case "tendermint.types.Block.evidence": - return x.Evidence != nil - case "tendermint.types.Block.last_commit": - return x.LastCommit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Block")) - } - panic(fmt.Errorf("message tendermint.types.Block 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_Block) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Block.header": - x.Header = nil - case "tendermint.types.Block.data": - x.Data = nil - case "tendermint.types.Block.evidence": - x.Evidence = nil - case "tendermint.types.Block.last_commit": - x.LastCommit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Block")) - } - panic(fmt.Errorf("message tendermint.types.Block 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_Block) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Block.header": - value := x.Header - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Block.data": - value := x.Data - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Block.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Block.last_commit": - value := x.LastCommit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Block")) - } - panic(fmt.Errorf("message tendermint.types.Block 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_Block) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Block.header": - x.Header = value.Message().Interface().(*Header) - case "tendermint.types.Block.data": - x.Data = value.Message().Interface().(*Data) - case "tendermint.types.Block.evidence": - x.Evidence = value.Message().Interface().(*EvidenceList) - case "tendermint.types.Block.last_commit": - x.LastCommit = value.Message().Interface().(*Commit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Block")) - } - panic(fmt.Errorf("message tendermint.types.Block 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_Block) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Block.header": - if x.Header == nil { - x.Header = new(Header) - } - return protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - case "tendermint.types.Block.data": - if x.Data == nil { - x.Data = new(Data) - } - return protoreflect.ValueOfMessage(x.Data.ProtoReflect()) - case "tendermint.types.Block.evidence": - if x.Evidence == nil { - x.Evidence = new(EvidenceList) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "tendermint.types.Block.last_commit": - if x.LastCommit == nil { - x.LastCommit = new(Commit) - } - return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Block")) - } - panic(fmt.Errorf("message tendermint.types.Block 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_Block) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Block.header": - m := new(Header) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Block.data": - m := new(Data) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Block.evidence": - m := new(EvidenceList) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Block.last_commit": - m := new(Commit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Block")) - } - panic(fmt.Errorf("message tendermint.types.Block 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_Block) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Block", 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_Block) 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_Block) 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_Block) 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_Block) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Block) - 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.Header != nil { - l = options.Size(x.Header) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Data != nil { - l = options.Size(x.Data) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LastCommit != nil { - l = options.Size(x.LastCommit) - 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().(*Block) - 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.LastCommit != nil { - encoded, err := options.Marshal(x.LastCommit) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Data != nil { - encoded, err := options.Marshal(x.Data) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Header != nil { - encoded, err := options.Marshal(x.Header) - 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().(*Block) - 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: Block: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Block: 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 Header", 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.Header == nil { - x.Header = &Header{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Header); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data == nil { - x.Data = &Data{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Data); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", 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.Evidence == nil { - x.Evidence = &EvidenceList{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastCommit", 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.LastCommit == nil { - x.LastCommit = &Commit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastCommit); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/types/block.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Block struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Evidence *EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - LastCommit *Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` -} - -func (x *Block) Reset() { - *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_block_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Block) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Block) ProtoMessage() {} - -// Deprecated: Use Block.ProtoReflect.Descriptor instead. -func (*Block) Descriptor() ([]byte, []int) { - return file_tendermint_types_block_proto_rawDescGZIP(), []int{0} -} - -func (x *Block) GetHeader() *Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *Block) GetData() *Data { - if x != nil { - return x.Data - } - return nil -} - -func (x *Block) GetEvidence() *EvidenceList { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *Block) GetLastCommit() *Commit { - if x != nil { - return x.LastCommit - } - return nil -} - -var File_tendermint_types_block_proto protoreflect.FileDescriptor - -var file_tendermint_types_block_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x01, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x36, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x08, 0x65, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0xb6, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, - 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0xa2, 0x02, 0x03, 0x54, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0xca, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0xe2, 0x02, 0x1c, 0x54, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x54, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_types_block_proto_rawDescOnce sync.Once - file_tendermint_types_block_proto_rawDescData = file_tendermint_types_block_proto_rawDesc -) - -func file_tendermint_types_block_proto_rawDescGZIP() []byte { - file_tendermint_types_block_proto_rawDescOnce.Do(func() { - file_tendermint_types_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_types_block_proto_rawDescData) - }) - return file_tendermint_types_block_proto_rawDescData -} - -var file_tendermint_types_block_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_tendermint_types_block_proto_goTypes = []interface{}{ - (*Block)(nil), // 0: tendermint.types.Block - (*Header)(nil), // 1: tendermint.types.Header - (*Data)(nil), // 2: tendermint.types.Data - (*EvidenceList)(nil), // 3: tendermint.types.EvidenceList - (*Commit)(nil), // 4: tendermint.types.Commit -} -var file_tendermint_types_block_proto_depIdxs = []int32{ - 1, // 0: tendermint.types.Block.header:type_name -> tendermint.types.Header - 2, // 1: tendermint.types.Block.data:type_name -> tendermint.types.Data - 3, // 2: tendermint.types.Block.evidence:type_name -> tendermint.types.EvidenceList - 4, // 3: tendermint.types.Block.last_commit:type_name -> tendermint.types.Commit - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_tendermint_types_block_proto_init() } -func file_tendermint_types_block_proto_init() { - if File_tendermint_types_block_proto != nil { - return - } - file_tendermint_types_types_proto_init() - file_tendermint_types_evidence_proto_init() - if !protoimpl.UnsafeEnabled { - file_tendermint_types_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_types_block_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_types_block_proto_goTypes, - DependencyIndexes: file_tendermint_types_block_proto_depIdxs, - MessageInfos: file_tendermint_types_block_proto_msgTypes, - }.Build() - File_tendermint_types_block_proto = out.File - file_tendermint_types_block_proto_rawDesc = nil - file_tendermint_types_block_proto_goTypes = nil - file_tendermint_types_block_proto_depIdxs = nil -} diff --git a/api/tendermint/types/evidence.pulsar.go b/api/tendermint/types/evidence.pulsar.go deleted file mode 100644 index 8e27a6b0fe89..000000000000 --- a/api/tendermint/types/evidence.pulsar.go +++ /dev/null @@ -1,2983 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package types - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Evidence protoreflect.MessageDescriptor - fd_Evidence_duplicate_vote_evidence protoreflect.FieldDescriptor - fd_Evidence_light_client_attack_evidence protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_evidence_proto_init() - md_Evidence = File_tendermint_types_evidence_proto.Messages().ByName("Evidence") - fd_Evidence_duplicate_vote_evidence = md_Evidence.Fields().ByName("duplicate_vote_evidence") - fd_Evidence_light_client_attack_evidence = md_Evidence.Fields().ByName("light_client_attack_evidence") -} - -var _ protoreflect.Message = (*fastReflection_Evidence)(nil) - -type fastReflection_Evidence Evidence - -func (x *Evidence) ProtoReflect() protoreflect.Message { - return (*fastReflection_Evidence)(x) -} - -func (x *Evidence) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_evidence_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Evidence_messageType fastReflection_Evidence_messageType -var _ protoreflect.MessageType = fastReflection_Evidence_messageType{} - -type fastReflection_Evidence_messageType struct{} - -func (x fastReflection_Evidence_messageType) Zero() protoreflect.Message { - return (*fastReflection_Evidence)(nil) -} -func (x fastReflection_Evidence_messageType) New() protoreflect.Message { - return new(fastReflection_Evidence) -} -func (x fastReflection_Evidence_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Evidence -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Evidence) Descriptor() protoreflect.MessageDescriptor { - return md_Evidence -} - -// 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_Evidence) Type() protoreflect.MessageType { - return _fastReflection_Evidence_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Evidence) New() protoreflect.Message { - return new(fastReflection_Evidence) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Evidence) Interface() protoreflect.ProtoMessage { - return (*Evidence)(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_Evidence) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sum != nil { - switch o := x.Sum.(type) { - case *Evidence_DuplicateVoteEvidence: - v := o.DuplicateVoteEvidence - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Evidence_duplicate_vote_evidence, value) { - return - } - case *Evidence_LightClientAttackEvidence: - v := o.LightClientAttackEvidence - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_Evidence_light_client_attack_evidence, 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_Evidence) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Evidence.duplicate_vote_evidence": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*Evidence_DuplicateVoteEvidence); ok { - return true - } else { - return false - } - case "tendermint.types.Evidence.light_client_attack_evidence": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*Evidence_LightClientAttackEvidence); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Evidence")) - } - panic(fmt.Errorf("message tendermint.types.Evidence 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_Evidence) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Evidence.duplicate_vote_evidence": - x.Sum = nil - case "tendermint.types.Evidence.light_client_attack_evidence": - x.Sum = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Evidence")) - } - panic(fmt.Errorf("message tendermint.types.Evidence 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_Evidence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Evidence.duplicate_vote_evidence": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*DuplicateVoteEvidence)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*Evidence_DuplicateVoteEvidence); ok { - return protoreflect.ValueOfMessage(v.DuplicateVoteEvidence.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*DuplicateVoteEvidence)(nil).ProtoReflect()) - } - case "tendermint.types.Evidence.light_client_attack_evidence": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*LightClientAttackEvidence)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*Evidence_LightClientAttackEvidence); ok { - return protoreflect.ValueOfMessage(v.LightClientAttackEvidence.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*LightClientAttackEvidence)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Evidence")) - } - panic(fmt.Errorf("message tendermint.types.Evidence 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_Evidence) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Evidence.duplicate_vote_evidence": - cv := value.Message().Interface().(*DuplicateVoteEvidence) - x.Sum = &Evidence_DuplicateVoteEvidence{DuplicateVoteEvidence: cv} - case "tendermint.types.Evidence.light_client_attack_evidence": - cv := value.Message().Interface().(*LightClientAttackEvidence) - x.Sum = &Evidence_LightClientAttackEvidence{LightClientAttackEvidence: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Evidence")) - } - panic(fmt.Errorf("message tendermint.types.Evidence 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_Evidence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Evidence.duplicate_vote_evidence": - if x.Sum == nil { - value := &DuplicateVoteEvidence{} - oneofValue := &Evidence_DuplicateVoteEvidence{DuplicateVoteEvidence: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *Evidence_DuplicateVoteEvidence: - return protoreflect.ValueOfMessage(m.DuplicateVoteEvidence.ProtoReflect()) - default: - value := &DuplicateVoteEvidence{} - oneofValue := &Evidence_DuplicateVoteEvidence{DuplicateVoteEvidence: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "tendermint.types.Evidence.light_client_attack_evidence": - if x.Sum == nil { - value := &LightClientAttackEvidence{} - oneofValue := &Evidence_LightClientAttackEvidence{LightClientAttackEvidence: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *Evidence_LightClientAttackEvidence: - return protoreflect.ValueOfMessage(m.LightClientAttackEvidence.ProtoReflect()) - default: - value := &LightClientAttackEvidence{} - oneofValue := &Evidence_LightClientAttackEvidence{LightClientAttackEvidence: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Evidence")) - } - panic(fmt.Errorf("message tendermint.types.Evidence 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_Evidence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Evidence.duplicate_vote_evidence": - value := &DuplicateVoteEvidence{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Evidence.light_client_attack_evidence": - value := &LightClientAttackEvidence{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Evidence")) - } - panic(fmt.Errorf("message tendermint.types.Evidence 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_Evidence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "tendermint.types.Evidence.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *Evidence_DuplicateVoteEvidence: - return x.Descriptor().Fields().ByName("duplicate_vote_evidence") - case *Evidence_LightClientAttackEvidence: - return x.Descriptor().Fields().ByName("light_client_attack_evidence") - } - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Evidence", 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_Evidence) 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_Evidence) 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_Evidence) 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_Evidence) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Evidence) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Sum.(type) { - case *Evidence_DuplicateVoteEvidence: - if x == nil { - break - } - l = options.Size(x.DuplicateVoteEvidence) - n += 1 + l + runtime.Sov(uint64(l)) - case *Evidence_LightClientAttackEvidence: - if x == nil { - break - } - l = options.Size(x.LightClientAttackEvidence) - 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().(*Evidence) - 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) - } - switch x := x.Sum.(type) { - case *Evidence_DuplicateVoteEvidence: - encoded, err := options.Marshal(x.DuplicateVoteEvidence) - 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 - case *Evidence_LightClientAttackEvidence: - encoded, err := options.Marshal(x.LightClientAttackEvidence) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if 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().(*Evidence) - 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: Evidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Evidence: 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 DuplicateVoteEvidence", 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 - } - v := &DuplicateVoteEvidence{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &Evidence_DuplicateVoteEvidence{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LightClientAttackEvidence", 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 - } - v := &LightClientAttackEvidence{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &Evidence_LightClientAttackEvidence{v} - 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_DuplicateVoteEvidence protoreflect.MessageDescriptor - fd_DuplicateVoteEvidence_vote_a protoreflect.FieldDescriptor - fd_DuplicateVoteEvidence_vote_b protoreflect.FieldDescriptor - fd_DuplicateVoteEvidence_total_voting_power protoreflect.FieldDescriptor - fd_DuplicateVoteEvidence_validator_power protoreflect.FieldDescriptor - fd_DuplicateVoteEvidence_timestamp protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_evidence_proto_init() - md_DuplicateVoteEvidence = File_tendermint_types_evidence_proto.Messages().ByName("DuplicateVoteEvidence") - fd_DuplicateVoteEvidence_vote_a = md_DuplicateVoteEvidence.Fields().ByName("vote_a") - fd_DuplicateVoteEvidence_vote_b = md_DuplicateVoteEvidence.Fields().ByName("vote_b") - fd_DuplicateVoteEvidence_total_voting_power = md_DuplicateVoteEvidence.Fields().ByName("total_voting_power") - fd_DuplicateVoteEvidence_validator_power = md_DuplicateVoteEvidence.Fields().ByName("validator_power") - fd_DuplicateVoteEvidence_timestamp = md_DuplicateVoteEvidence.Fields().ByName("timestamp") -} - -var _ protoreflect.Message = (*fastReflection_DuplicateVoteEvidence)(nil) - -type fastReflection_DuplicateVoteEvidence DuplicateVoteEvidence - -func (x *DuplicateVoteEvidence) ProtoReflect() protoreflect.Message { - return (*fastReflection_DuplicateVoteEvidence)(x) -} - -func (x *DuplicateVoteEvidence) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_evidence_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DuplicateVoteEvidence_messageType fastReflection_DuplicateVoteEvidence_messageType -var _ protoreflect.MessageType = fastReflection_DuplicateVoteEvidence_messageType{} - -type fastReflection_DuplicateVoteEvidence_messageType struct{} - -func (x fastReflection_DuplicateVoteEvidence_messageType) Zero() protoreflect.Message { - return (*fastReflection_DuplicateVoteEvidence)(nil) -} -func (x fastReflection_DuplicateVoteEvidence_messageType) New() protoreflect.Message { - return new(fastReflection_DuplicateVoteEvidence) -} -func (x fastReflection_DuplicateVoteEvidence_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DuplicateVoteEvidence -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DuplicateVoteEvidence) Descriptor() protoreflect.MessageDescriptor { - return md_DuplicateVoteEvidence -} - -// 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_DuplicateVoteEvidence) Type() protoreflect.MessageType { - return _fastReflection_DuplicateVoteEvidence_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DuplicateVoteEvidence) New() protoreflect.Message { - return new(fastReflection_DuplicateVoteEvidence) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DuplicateVoteEvidence) Interface() protoreflect.ProtoMessage { - return (*DuplicateVoteEvidence)(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_DuplicateVoteEvidence) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.VoteA != nil { - value := protoreflect.ValueOfMessage(x.VoteA.ProtoReflect()) - if !f(fd_DuplicateVoteEvidence_vote_a, value) { - return - } - } - if x.VoteB != nil { - value := protoreflect.ValueOfMessage(x.VoteB.ProtoReflect()) - if !f(fd_DuplicateVoteEvidence_vote_b, value) { - return - } - } - if x.TotalVotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.TotalVotingPower) - if !f(fd_DuplicateVoteEvidence_total_voting_power, value) { - return - } - } - if x.ValidatorPower != int64(0) { - value := protoreflect.ValueOfInt64(x.ValidatorPower) - if !f(fd_DuplicateVoteEvidence_validator_power, value) { - return - } - } - if x.Timestamp != nil { - value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - if !f(fd_DuplicateVoteEvidence_timestamp, 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_DuplicateVoteEvidence) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.DuplicateVoteEvidence.vote_a": - return x.VoteA != nil - case "tendermint.types.DuplicateVoteEvidence.vote_b": - return x.VoteB != nil - case "tendermint.types.DuplicateVoteEvidence.total_voting_power": - return x.TotalVotingPower != int64(0) - case "tendermint.types.DuplicateVoteEvidence.validator_power": - return x.ValidatorPower != int64(0) - case "tendermint.types.DuplicateVoteEvidence.timestamp": - return x.Timestamp != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.DuplicateVoteEvidence")) - } - panic(fmt.Errorf("message tendermint.types.DuplicateVoteEvidence 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_DuplicateVoteEvidence) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.DuplicateVoteEvidence.vote_a": - x.VoteA = nil - case "tendermint.types.DuplicateVoteEvidence.vote_b": - x.VoteB = nil - case "tendermint.types.DuplicateVoteEvidence.total_voting_power": - x.TotalVotingPower = int64(0) - case "tendermint.types.DuplicateVoteEvidence.validator_power": - x.ValidatorPower = int64(0) - case "tendermint.types.DuplicateVoteEvidence.timestamp": - x.Timestamp = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.DuplicateVoteEvidence")) - } - panic(fmt.Errorf("message tendermint.types.DuplicateVoteEvidence 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_DuplicateVoteEvidence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.DuplicateVoteEvidence.vote_a": - value := x.VoteA - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.vote_b": - value := x.VoteB - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.total_voting_power": - value := x.TotalVotingPower - return protoreflect.ValueOfInt64(value) - case "tendermint.types.DuplicateVoteEvidence.validator_power": - value := x.ValidatorPower - return protoreflect.ValueOfInt64(value) - case "tendermint.types.DuplicateVoteEvidence.timestamp": - value := x.Timestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.DuplicateVoteEvidence")) - } - panic(fmt.Errorf("message tendermint.types.DuplicateVoteEvidence 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_DuplicateVoteEvidence) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.DuplicateVoteEvidence.vote_a": - x.VoteA = value.Message().Interface().(*Vote) - case "tendermint.types.DuplicateVoteEvidence.vote_b": - x.VoteB = value.Message().Interface().(*Vote) - case "tendermint.types.DuplicateVoteEvidence.total_voting_power": - x.TotalVotingPower = value.Int() - case "tendermint.types.DuplicateVoteEvidence.validator_power": - x.ValidatorPower = value.Int() - case "tendermint.types.DuplicateVoteEvidence.timestamp": - x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.DuplicateVoteEvidence")) - } - panic(fmt.Errorf("message tendermint.types.DuplicateVoteEvidence 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_DuplicateVoteEvidence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.DuplicateVoteEvidence.vote_a": - if x.VoteA == nil { - x.VoteA = new(Vote) - } - return protoreflect.ValueOfMessage(x.VoteA.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.vote_b": - if x.VoteB == nil { - x.VoteB = new(Vote) - } - return protoreflect.ValueOfMessage(x.VoteB.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.timestamp": - if x.Timestamp == nil { - x.Timestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.total_voting_power": - panic(fmt.Errorf("field total_voting_power of message tendermint.types.DuplicateVoteEvidence is not mutable")) - case "tendermint.types.DuplicateVoteEvidence.validator_power": - panic(fmt.Errorf("field validator_power of message tendermint.types.DuplicateVoteEvidence is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.DuplicateVoteEvidence")) - } - panic(fmt.Errorf("message tendermint.types.DuplicateVoteEvidence 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_DuplicateVoteEvidence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.DuplicateVoteEvidence.vote_a": - m := new(Vote) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.vote_b": - m := new(Vote) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.DuplicateVoteEvidence.total_voting_power": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.DuplicateVoteEvidence.validator_power": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.DuplicateVoteEvidence.timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.DuplicateVoteEvidence")) - } - panic(fmt.Errorf("message tendermint.types.DuplicateVoteEvidence 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_DuplicateVoteEvidence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.DuplicateVoteEvidence", 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_DuplicateVoteEvidence) 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_DuplicateVoteEvidence) 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_DuplicateVoteEvidence) 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_DuplicateVoteEvidence) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DuplicateVoteEvidence) - 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.VoteA != nil { - l = options.Size(x.VoteA) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VoteB != nil { - l = options.Size(x.VoteB) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TotalVotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.TotalVotingPower)) - } - if x.ValidatorPower != 0 { - n += 1 + runtime.Sov(uint64(x.ValidatorPower)) - } - if x.Timestamp != nil { - l = options.Size(x.Timestamp) - 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().(*DuplicateVoteEvidence) - 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.Timestamp != nil { - encoded, err := options.Marshal(x.Timestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.ValidatorPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorPower)) - i-- - dAtA[i] = 0x20 - } - if x.TotalVotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalVotingPower)) - i-- - dAtA[i] = 0x18 - } - if x.VoteB != nil { - encoded, err := options.Marshal(x.VoteB) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.VoteA != nil { - encoded, err := options.Marshal(x.VoteA) - 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().(*DuplicateVoteEvidence) - 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: DuplicateVoteEvidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DuplicateVoteEvidence: 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 VoteA", 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.VoteA == nil { - x.VoteA = &Vote{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VoteA); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VoteB", 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.VoteB == nil { - x.VoteB = &Vote{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VoteB); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) - } - x.TotalVotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TotalVotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorPower", wireType) - } - x.ValidatorPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ValidatorPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { - x.Timestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_LightClientAttackEvidence_3_list)(nil) - -type _LightClientAttackEvidence_3_list struct { - list *[]*Validator -} - -func (x *_LightClientAttackEvidence_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LightClientAttackEvidence_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_LightClientAttackEvidence_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_LightClientAttackEvidence_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_LightClientAttackEvidence_3_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_LightClientAttackEvidence_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_LightClientAttackEvidence_3_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_LightClientAttackEvidence_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LightClientAttackEvidence protoreflect.MessageDescriptor - fd_LightClientAttackEvidence_conflicting_block protoreflect.FieldDescriptor - fd_LightClientAttackEvidence_common_height protoreflect.FieldDescriptor - fd_LightClientAttackEvidence_byzantine_validators protoreflect.FieldDescriptor - fd_LightClientAttackEvidence_total_voting_power protoreflect.FieldDescriptor - fd_LightClientAttackEvidence_timestamp protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_evidence_proto_init() - md_LightClientAttackEvidence = File_tendermint_types_evidence_proto.Messages().ByName("LightClientAttackEvidence") - fd_LightClientAttackEvidence_conflicting_block = md_LightClientAttackEvidence.Fields().ByName("conflicting_block") - fd_LightClientAttackEvidence_common_height = md_LightClientAttackEvidence.Fields().ByName("common_height") - fd_LightClientAttackEvidence_byzantine_validators = md_LightClientAttackEvidence.Fields().ByName("byzantine_validators") - fd_LightClientAttackEvidence_total_voting_power = md_LightClientAttackEvidence.Fields().ByName("total_voting_power") - fd_LightClientAttackEvidence_timestamp = md_LightClientAttackEvidence.Fields().ByName("timestamp") -} - -var _ protoreflect.Message = (*fastReflection_LightClientAttackEvidence)(nil) - -type fastReflection_LightClientAttackEvidence LightClientAttackEvidence - -func (x *LightClientAttackEvidence) ProtoReflect() protoreflect.Message { - return (*fastReflection_LightClientAttackEvidence)(x) -} - -func (x *LightClientAttackEvidence) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_evidence_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_LightClientAttackEvidence_messageType fastReflection_LightClientAttackEvidence_messageType -var _ protoreflect.MessageType = fastReflection_LightClientAttackEvidence_messageType{} - -type fastReflection_LightClientAttackEvidence_messageType struct{} - -func (x fastReflection_LightClientAttackEvidence_messageType) Zero() protoreflect.Message { - return (*fastReflection_LightClientAttackEvidence)(nil) -} -func (x fastReflection_LightClientAttackEvidence_messageType) New() protoreflect.Message { - return new(fastReflection_LightClientAttackEvidence) -} -func (x fastReflection_LightClientAttackEvidence_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LightClientAttackEvidence -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LightClientAttackEvidence) Descriptor() protoreflect.MessageDescriptor { - return md_LightClientAttackEvidence -} - -// 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_LightClientAttackEvidence) Type() protoreflect.MessageType { - return _fastReflection_LightClientAttackEvidence_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LightClientAttackEvidence) New() protoreflect.Message { - return new(fastReflection_LightClientAttackEvidence) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LightClientAttackEvidence) Interface() protoreflect.ProtoMessage { - return (*LightClientAttackEvidence)(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_LightClientAttackEvidence) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConflictingBlock != nil { - value := protoreflect.ValueOfMessage(x.ConflictingBlock.ProtoReflect()) - if !f(fd_LightClientAttackEvidence_conflicting_block, value) { - return - } - } - if x.CommonHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.CommonHeight) - if !f(fd_LightClientAttackEvidence_common_height, value) { - return - } - } - if len(x.ByzantineValidators) != 0 { - value := protoreflect.ValueOfList(&_LightClientAttackEvidence_3_list{list: &x.ByzantineValidators}) - if !f(fd_LightClientAttackEvidence_byzantine_validators, value) { - return - } - } - if x.TotalVotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.TotalVotingPower) - if !f(fd_LightClientAttackEvidence_total_voting_power, value) { - return - } - } - if x.Timestamp != nil { - value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - if !f(fd_LightClientAttackEvidence_timestamp, 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_LightClientAttackEvidence) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.LightClientAttackEvidence.conflicting_block": - return x.ConflictingBlock != nil - case "tendermint.types.LightClientAttackEvidence.common_height": - return x.CommonHeight != int64(0) - case "tendermint.types.LightClientAttackEvidence.byzantine_validators": - return len(x.ByzantineValidators) != 0 - case "tendermint.types.LightClientAttackEvidence.total_voting_power": - return x.TotalVotingPower != int64(0) - case "tendermint.types.LightClientAttackEvidence.timestamp": - return x.Timestamp != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightClientAttackEvidence")) - } - panic(fmt.Errorf("message tendermint.types.LightClientAttackEvidence 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_LightClientAttackEvidence) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.LightClientAttackEvidence.conflicting_block": - x.ConflictingBlock = nil - case "tendermint.types.LightClientAttackEvidence.common_height": - x.CommonHeight = int64(0) - case "tendermint.types.LightClientAttackEvidence.byzantine_validators": - x.ByzantineValidators = nil - case "tendermint.types.LightClientAttackEvidence.total_voting_power": - x.TotalVotingPower = int64(0) - case "tendermint.types.LightClientAttackEvidence.timestamp": - x.Timestamp = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightClientAttackEvidence")) - } - panic(fmt.Errorf("message tendermint.types.LightClientAttackEvidence 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_LightClientAttackEvidence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.LightClientAttackEvidence.conflicting_block": - value := x.ConflictingBlock - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.LightClientAttackEvidence.common_height": - value := x.CommonHeight - return protoreflect.ValueOfInt64(value) - case "tendermint.types.LightClientAttackEvidence.byzantine_validators": - if len(x.ByzantineValidators) == 0 { - return protoreflect.ValueOfList(&_LightClientAttackEvidence_3_list{}) - } - listValue := &_LightClientAttackEvidence_3_list{list: &x.ByzantineValidators} - return protoreflect.ValueOfList(listValue) - case "tendermint.types.LightClientAttackEvidence.total_voting_power": - value := x.TotalVotingPower - return protoreflect.ValueOfInt64(value) - case "tendermint.types.LightClientAttackEvidence.timestamp": - value := x.Timestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightClientAttackEvidence")) - } - panic(fmt.Errorf("message tendermint.types.LightClientAttackEvidence 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_LightClientAttackEvidence) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.LightClientAttackEvidence.conflicting_block": - x.ConflictingBlock = value.Message().Interface().(*LightBlock) - case "tendermint.types.LightClientAttackEvidence.common_height": - x.CommonHeight = value.Int() - case "tendermint.types.LightClientAttackEvidence.byzantine_validators": - lv := value.List() - clv := lv.(*_LightClientAttackEvidence_3_list) - x.ByzantineValidators = *clv.list - case "tendermint.types.LightClientAttackEvidence.total_voting_power": - x.TotalVotingPower = value.Int() - case "tendermint.types.LightClientAttackEvidence.timestamp": - x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightClientAttackEvidence")) - } - panic(fmt.Errorf("message tendermint.types.LightClientAttackEvidence 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_LightClientAttackEvidence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.LightClientAttackEvidence.conflicting_block": - if x.ConflictingBlock == nil { - x.ConflictingBlock = new(LightBlock) - } - return protoreflect.ValueOfMessage(x.ConflictingBlock.ProtoReflect()) - case "tendermint.types.LightClientAttackEvidence.byzantine_validators": - if x.ByzantineValidators == nil { - x.ByzantineValidators = []*Validator{} - } - value := &_LightClientAttackEvidence_3_list{list: &x.ByzantineValidators} - return protoreflect.ValueOfList(value) - case "tendermint.types.LightClientAttackEvidence.timestamp": - if x.Timestamp == nil { - x.Timestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - case "tendermint.types.LightClientAttackEvidence.common_height": - panic(fmt.Errorf("field common_height of message tendermint.types.LightClientAttackEvidence is not mutable")) - case "tendermint.types.LightClientAttackEvidence.total_voting_power": - panic(fmt.Errorf("field total_voting_power of message tendermint.types.LightClientAttackEvidence is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightClientAttackEvidence")) - } - panic(fmt.Errorf("message tendermint.types.LightClientAttackEvidence 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_LightClientAttackEvidence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.LightClientAttackEvidence.conflicting_block": - m := new(LightBlock) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.LightClientAttackEvidence.common_height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.LightClientAttackEvidence.byzantine_validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_LightClientAttackEvidence_3_list{list: &list}) - case "tendermint.types.LightClientAttackEvidence.total_voting_power": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.LightClientAttackEvidence.timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightClientAttackEvidence")) - } - panic(fmt.Errorf("message tendermint.types.LightClientAttackEvidence 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_LightClientAttackEvidence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.LightClientAttackEvidence", 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_LightClientAttackEvidence) 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_LightClientAttackEvidence) 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_LightClientAttackEvidence) 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_LightClientAttackEvidence) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LightClientAttackEvidence) - 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.ConflictingBlock != nil { - l = options.Size(x.ConflictingBlock) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CommonHeight != 0 { - n += 1 + runtime.Sov(uint64(x.CommonHeight)) - } - if len(x.ByzantineValidators) > 0 { - for _, e := range x.ByzantineValidators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.TotalVotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.TotalVotingPower)) - } - if x.Timestamp != nil { - l = options.Size(x.Timestamp) - 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().(*LightClientAttackEvidence) - 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.Timestamp != nil { - encoded, err := options.Marshal(x.Timestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.TotalVotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalVotingPower)) - i-- - dAtA[i] = 0x20 - } - if len(x.ByzantineValidators) > 0 { - for iNdEx := len(x.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ByzantineValidators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.CommonHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CommonHeight)) - i-- - dAtA[i] = 0x10 - } - if x.ConflictingBlock != nil { - encoded, err := options.Marshal(x.ConflictingBlock) - 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().(*LightClientAttackEvidence) - 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: LightClientAttackEvidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LightClientAttackEvidence: 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 ConflictingBlock", 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.ConflictingBlock == nil { - x.ConflictingBlock = &LightBlock{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConflictingBlock); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommonHeight", wireType) - } - x.CommonHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CommonHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ByzantineValidators = append(x.ByzantineValidators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ByzantineValidators[len(x.ByzantineValidators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) - } - x.TotalVotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TotalVotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { - x.Timestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_EvidenceList_1_list)(nil) - -type _EvidenceList_1_list struct { - list *[]*Evidence -} - -func (x *_EvidenceList_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EvidenceList_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_EvidenceList_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Evidence) - (*x.list)[i] = concreteValue -} - -func (x *_EvidenceList_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Evidence) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EvidenceList_1_list) AppendMutable() protoreflect.Value { - v := new(Evidence) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EvidenceList_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_EvidenceList_1_list) NewElement() protoreflect.Value { - v := new(Evidence) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EvidenceList_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_EvidenceList protoreflect.MessageDescriptor - fd_EvidenceList_evidence protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_evidence_proto_init() - md_EvidenceList = File_tendermint_types_evidence_proto.Messages().ByName("EvidenceList") - fd_EvidenceList_evidence = md_EvidenceList.Fields().ByName("evidence") -} - -var _ protoreflect.Message = (*fastReflection_EvidenceList)(nil) - -type fastReflection_EvidenceList EvidenceList - -func (x *EvidenceList) ProtoReflect() protoreflect.Message { - return (*fastReflection_EvidenceList)(x) -} - -func (x *EvidenceList) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_evidence_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EvidenceList_messageType fastReflection_EvidenceList_messageType -var _ protoreflect.MessageType = fastReflection_EvidenceList_messageType{} - -type fastReflection_EvidenceList_messageType struct{} - -func (x fastReflection_EvidenceList_messageType) Zero() protoreflect.Message { - return (*fastReflection_EvidenceList)(nil) -} -func (x fastReflection_EvidenceList_messageType) New() protoreflect.Message { - return new(fastReflection_EvidenceList) -} -func (x fastReflection_EvidenceList_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EvidenceList -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EvidenceList) Descriptor() protoreflect.MessageDescriptor { - return md_EvidenceList -} - -// 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_EvidenceList) Type() protoreflect.MessageType { - return _fastReflection_EvidenceList_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EvidenceList) New() protoreflect.Message { - return new(fastReflection_EvidenceList) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EvidenceList) Interface() protoreflect.ProtoMessage { - return (*EvidenceList)(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_EvidenceList) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Evidence) != 0 { - value := protoreflect.ValueOfList(&_EvidenceList_1_list{list: &x.Evidence}) - if !f(fd_EvidenceList_evidence, 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_EvidenceList) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.EvidenceList.evidence": - return len(x.Evidence) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceList")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceList 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_EvidenceList) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.EvidenceList.evidence": - x.Evidence = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceList")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceList 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_EvidenceList) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.EvidenceList.evidence": - if len(x.Evidence) == 0 { - return protoreflect.ValueOfList(&_EvidenceList_1_list{}) - } - listValue := &_EvidenceList_1_list{list: &x.Evidence} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceList")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceList 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_EvidenceList) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.EvidenceList.evidence": - lv := value.List() - clv := lv.(*_EvidenceList_1_list) - x.Evidence = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceList")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceList 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_EvidenceList) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.EvidenceList.evidence": - if x.Evidence == nil { - x.Evidence = []*Evidence{} - } - value := &_EvidenceList_1_list{list: &x.Evidence} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceList")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceList 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_EvidenceList) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.EvidenceList.evidence": - list := []*Evidence{} - return protoreflect.ValueOfList(&_EvidenceList_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceList")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceList 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_EvidenceList) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.EvidenceList", 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_EvidenceList) 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_EvidenceList) 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_EvidenceList) 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_EvidenceList) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EvidenceList) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Evidence) > 0 { - for _, e := range x.Evidence { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EvidenceList) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Evidence) > 0 { - for iNdEx := len(x.Evidence) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Evidence[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EvidenceList) - 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: EvidenceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EvidenceList: 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 Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Evidence = append(x.Evidence, &Evidence{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence[len(x.Evidence)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/types/evidence.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Evidence struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Sum: - // *Evidence_DuplicateVoteEvidence - // *Evidence_LightClientAttackEvidence - Sum isEvidence_Sum `protobuf_oneof:"sum"` -} - -func (x *Evidence) Reset() { - *x = Evidence{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_evidence_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Evidence) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Evidence) ProtoMessage() {} - -// Deprecated: Use Evidence.ProtoReflect.Descriptor instead. -func (*Evidence) Descriptor() ([]byte, []int) { - return file_tendermint_types_evidence_proto_rawDescGZIP(), []int{0} -} - -func (x *Evidence) GetSum() isEvidence_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *Evidence) GetDuplicateVoteEvidence() *DuplicateVoteEvidence { - if x, ok := x.GetSum().(*Evidence_DuplicateVoteEvidence); ok { - return x.DuplicateVoteEvidence - } - return nil -} - -func (x *Evidence) GetLightClientAttackEvidence() *LightClientAttackEvidence { - if x, ok := x.GetSum().(*Evidence_LightClientAttackEvidence); ok { - return x.LightClientAttackEvidence - } - return nil -} - -type isEvidence_Sum interface { - isEvidence_Sum() -} - -type Evidence_DuplicateVoteEvidence struct { - DuplicateVoteEvidence *DuplicateVoteEvidence `protobuf:"bytes,1,opt,name=duplicate_vote_evidence,json=duplicateVoteEvidence,proto3,oneof"` -} - -type Evidence_LightClientAttackEvidence struct { - LightClientAttackEvidence *LightClientAttackEvidence `protobuf:"bytes,2,opt,name=light_client_attack_evidence,json=lightClientAttackEvidence,proto3,oneof"` -} - -func (*Evidence_DuplicateVoteEvidence) isEvidence_Sum() {} - -func (*Evidence_LightClientAttackEvidence) isEvidence_Sum() {} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -type DuplicateVoteEvidence struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` - VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` - TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` - ValidatorPower int64 `protobuf:"varint,4,opt,name=validator_power,json=validatorPower,proto3" json:"validator_power,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *DuplicateVoteEvidence) Reset() { - *x = DuplicateVoteEvidence{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_evidence_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DuplicateVoteEvidence) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DuplicateVoteEvidence) ProtoMessage() {} - -// Deprecated: Use DuplicateVoteEvidence.ProtoReflect.Descriptor instead. -func (*DuplicateVoteEvidence) Descriptor() ([]byte, []int) { - return file_tendermint_types_evidence_proto_rawDescGZIP(), []int{1} -} - -func (x *DuplicateVoteEvidence) GetVoteA() *Vote { - if x != nil { - return x.VoteA - } - return nil -} - -func (x *DuplicateVoteEvidence) GetVoteB() *Vote { - if x != nil { - return x.VoteB - } - return nil -} - -func (x *DuplicateVoteEvidence) GetTotalVotingPower() int64 { - if x != nil { - return x.TotalVotingPower - } - return 0 -} - -func (x *DuplicateVoteEvidence) GetValidatorPower() int64 { - if x != nil { - return x.ValidatorPower - } - return 0 -} - -func (x *DuplicateVoteEvidence) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -type LightClientAttackEvidence struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConflictingBlock *LightBlock `protobuf:"bytes,1,opt,name=conflicting_block,json=conflictingBlock,proto3" json:"conflicting_block,omitempty"` - CommonHeight int64 `protobuf:"varint,2,opt,name=common_height,json=commonHeight,proto3" json:"common_height,omitempty"` - ByzantineValidators []*Validator `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators,omitempty"` - TotalVotingPower int64 `protobuf:"varint,4,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *LightClientAttackEvidence) Reset() { - *x = LightClientAttackEvidence{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_evidence_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LightClientAttackEvidence) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LightClientAttackEvidence) ProtoMessage() {} - -// Deprecated: Use LightClientAttackEvidence.ProtoReflect.Descriptor instead. -func (*LightClientAttackEvidence) Descriptor() ([]byte, []int) { - return file_tendermint_types_evidence_proto_rawDescGZIP(), []int{2} -} - -func (x *LightClientAttackEvidence) GetConflictingBlock() *LightBlock { - if x != nil { - return x.ConflictingBlock - } - return nil -} - -func (x *LightClientAttackEvidence) GetCommonHeight() int64 { - if x != nil { - return x.CommonHeight - } - return 0 -} - -func (x *LightClientAttackEvidence) GetByzantineValidators() []*Validator { - if x != nil { - return x.ByzantineValidators - } - return nil -} - -func (x *LightClientAttackEvidence) GetTotalVotingPower() int64 { - if x != nil { - return x.TotalVotingPower - } - return 0 -} - -func (x *LightClientAttackEvidence) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -type EvidenceList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Evidence []*Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` -} - -func (x *EvidenceList) Reset() { - *x = EvidenceList{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_evidence_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvidenceList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvidenceList) ProtoMessage() {} - -// Deprecated: Use EvidenceList.ProtoReflect.Descriptor instead. -func (*EvidenceList) Descriptor() ([]byte, []int) { - return file_tendermint_types_evidence_proto_rawDescGZIP(), []int{3} -} - -func (x *EvidenceList) GetEvidence() []*Evidence { - if x != nil { - return x.Evidence - } - return nil -} - -var File_tendermint_types_evidence_proto protoreflect.FileDescriptor - -var file_tendermint_types_evidence_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x10, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x01, 0x0a, 0x08, 0x45, - 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x17, 0x64, 0x75, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x75, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x48, 0x00, 0x52, 0x15, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x6f, - 0x74, 0x65, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x1c, 0x6c, 0x69, - 0x67, 0x68, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, - 0x6b, 0x5f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, - 0x74, 0x74, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, - 0x19, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, - 0x63, 0x6b, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, - 0x6d, 0x22, 0x90, 0x02, 0x0a, 0x15, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, - 0x6f, 0x74, 0x65, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x76, - 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, - 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x41, 0x12, 0x2d, 0x0a, 0x06, 0x76, 0x6f, - 0x74, 0x65, 0x5f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x6f, - 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x42, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x69, - 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, - 0x12, 0x42, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0xcd, 0x02, 0x0a, 0x19, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x49, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x10, 0x63, 0x6f, 0x6e, - 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, - 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x4e, 0x0a, 0x14, 0x62, 0x79, 0x7a, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x13, 0x62, - 0x79, 0x7a, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, - 0x12, 0x42, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4c, 0x0a, 0x0c, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x42, 0xb9, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0d, 0x45, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0xa2, - 0x02, 0x03, 0x54, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0xca, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0xe2, 0x02, 0x1c, 0x54, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x54, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_types_evidence_proto_rawDescOnce sync.Once - file_tendermint_types_evidence_proto_rawDescData = file_tendermint_types_evidence_proto_rawDesc -) - -func file_tendermint_types_evidence_proto_rawDescGZIP() []byte { - file_tendermint_types_evidence_proto_rawDescOnce.Do(func() { - file_tendermint_types_evidence_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_types_evidence_proto_rawDescData) - }) - return file_tendermint_types_evidence_proto_rawDescData -} - -var file_tendermint_types_evidence_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_tendermint_types_evidence_proto_goTypes = []interface{}{ - (*Evidence)(nil), // 0: tendermint.types.Evidence - (*DuplicateVoteEvidence)(nil), // 1: tendermint.types.DuplicateVoteEvidence - (*LightClientAttackEvidence)(nil), // 2: tendermint.types.LightClientAttackEvidence - (*EvidenceList)(nil), // 3: tendermint.types.EvidenceList - (*Vote)(nil), // 4: tendermint.types.Vote - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*LightBlock)(nil), // 6: tendermint.types.LightBlock - (*Validator)(nil), // 7: tendermint.types.Validator -} -var file_tendermint_types_evidence_proto_depIdxs = []int32{ - 1, // 0: tendermint.types.Evidence.duplicate_vote_evidence:type_name -> tendermint.types.DuplicateVoteEvidence - 2, // 1: tendermint.types.Evidence.light_client_attack_evidence:type_name -> tendermint.types.LightClientAttackEvidence - 4, // 2: tendermint.types.DuplicateVoteEvidence.vote_a:type_name -> tendermint.types.Vote - 4, // 3: tendermint.types.DuplicateVoteEvidence.vote_b:type_name -> tendermint.types.Vote - 5, // 4: tendermint.types.DuplicateVoteEvidence.timestamp:type_name -> google.protobuf.Timestamp - 6, // 5: tendermint.types.LightClientAttackEvidence.conflicting_block:type_name -> tendermint.types.LightBlock - 7, // 6: tendermint.types.LightClientAttackEvidence.byzantine_validators:type_name -> tendermint.types.Validator - 5, // 7: tendermint.types.LightClientAttackEvidence.timestamp:type_name -> google.protobuf.Timestamp - 0, // 8: tendermint.types.EvidenceList.evidence:type_name -> tendermint.types.Evidence - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_tendermint_types_evidence_proto_init() } -func file_tendermint_types_evidence_proto_init() { - if File_tendermint_types_evidence_proto != nil { - return - } - file_tendermint_types_types_proto_init() - file_tendermint_types_validator_proto_init() - if !protoimpl.UnsafeEnabled { - file_tendermint_types_evidence_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Evidence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_evidence_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DuplicateVoteEvidence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_evidence_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LightClientAttackEvidence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_evidence_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvidenceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_tendermint_types_evidence_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Evidence_DuplicateVoteEvidence)(nil), - (*Evidence_LightClientAttackEvidence)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_types_evidence_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_types_evidence_proto_goTypes, - DependencyIndexes: file_tendermint_types_evidence_proto_depIdxs, - MessageInfos: file_tendermint_types_evidence_proto_msgTypes, - }.Build() - File_tendermint_types_evidence_proto = out.File - file_tendermint_types_evidence_proto_rawDesc = nil - file_tendermint_types_evidence_proto_goTypes = nil - file_tendermint_types_evidence_proto_depIdxs = nil -} diff --git a/api/tendermint/types/params.pulsar.go b/api/tendermint/types/params.pulsar.go deleted file mode 100644 index 050500b6fcc2..000000000000 --- a/api/tendermint/types/params.pulsar.go +++ /dev/null @@ -1,3578 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package types - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_ConsensusParams protoreflect.MessageDescriptor - fd_ConsensusParams_block protoreflect.FieldDescriptor - fd_ConsensusParams_evidence protoreflect.FieldDescriptor - fd_ConsensusParams_validator protoreflect.FieldDescriptor - fd_ConsensusParams_version protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_params_proto_init() - md_ConsensusParams = File_tendermint_types_params_proto.Messages().ByName("ConsensusParams") - fd_ConsensusParams_block = md_ConsensusParams.Fields().ByName("block") - fd_ConsensusParams_evidence = md_ConsensusParams.Fields().ByName("evidence") - fd_ConsensusParams_validator = md_ConsensusParams.Fields().ByName("validator") - fd_ConsensusParams_version = md_ConsensusParams.Fields().ByName("version") -} - -var _ protoreflect.Message = (*fastReflection_ConsensusParams)(nil) - -type fastReflection_ConsensusParams ConsensusParams - -func (x *ConsensusParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusParams)(x) -} - -func (x *ConsensusParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ConsensusParams_messageType fastReflection_ConsensusParams_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusParams_messageType{} - -type fastReflection_ConsensusParams_messageType struct{} - -func (x fastReflection_ConsensusParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusParams)(nil) -} -func (x fastReflection_ConsensusParams_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusParams) -} -func (x fastReflection_ConsensusParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConsensusParams) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusParams -} - -// 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_ConsensusParams) Type() protoreflect.MessageType { - return _fastReflection_ConsensusParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusParams) New() protoreflect.Message { - return new(fastReflection_ConsensusParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusParams) Interface() protoreflect.ProtoMessage { - return (*ConsensusParams)(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_ConsensusParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_ConsensusParams_block, value) { - return - } - } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_ConsensusParams_evidence, value) { - return - } - } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_ConsensusParams_validator, value) { - return - } - } - if x.Version != nil { - value := protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - if !f(fd_ConsensusParams_version, 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_ConsensusParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.ConsensusParams.block": - return x.Block != nil - case "tendermint.types.ConsensusParams.evidence": - return x.Evidence != nil - case "tendermint.types.ConsensusParams.validator": - return x.Validator != nil - case "tendermint.types.ConsensusParams.version": - return x.Version != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.types.ConsensusParams 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_ConsensusParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.ConsensusParams.block": - x.Block = nil - case "tendermint.types.ConsensusParams.evidence": - x.Evidence = nil - case "tendermint.types.ConsensusParams.validator": - x.Validator = nil - case "tendermint.types.ConsensusParams.version": - x.Version = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.types.ConsensusParams 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_ConsensusParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.ConsensusParams.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.ConsensusParams.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.ConsensusParams.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.ConsensusParams.version": - value := x.Version - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.types.ConsensusParams 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_ConsensusParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.ConsensusParams.block": - x.Block = value.Message().Interface().(*BlockParams) - case "tendermint.types.ConsensusParams.evidence": - x.Evidence = value.Message().Interface().(*EvidenceParams) - case "tendermint.types.ConsensusParams.validator": - x.Validator = value.Message().Interface().(*ValidatorParams) - case "tendermint.types.ConsensusParams.version": - x.Version = value.Message().Interface().(*VersionParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.types.ConsensusParams 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_ConsensusParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.ConsensusParams.block": - if x.Block == nil { - x.Block = new(BlockParams) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - case "tendermint.types.ConsensusParams.evidence": - if x.Evidence == nil { - x.Evidence = new(EvidenceParams) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "tendermint.types.ConsensusParams.validator": - if x.Validator == nil { - x.Validator = new(ValidatorParams) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "tendermint.types.ConsensusParams.version": - if x.Version == nil { - x.Version = new(VersionParams) - } - return protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.types.ConsensusParams 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_ConsensusParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.ConsensusParams.block": - m := new(BlockParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.ConsensusParams.evidence": - m := new(EvidenceParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.ConsensusParams.validator": - m := new(ValidatorParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.ConsensusParams.version": - m := new(VersionParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ConsensusParams")) - } - panic(fmt.Errorf("message tendermint.types.ConsensusParams 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_ConsensusParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.ConsensusParams", 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_ConsensusParams) 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_ConsensusParams) 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_ConsensusParams) 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_ConsensusParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusParams) - 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.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != nil { - l = options.Size(x.Version) - 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().(*ConsensusParams) - 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.Version != nil { - encoded, err := options.Marshal(x.Version) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - 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().(*ConsensusParams) - 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: ConsensusParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusParams: 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 Block", 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.Block == nil { - x.Block = &BlockParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", 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.Evidence == nil { - x.Evidence = &EvidenceParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator == nil { - x.Validator = &ValidatorParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version == nil { - x.Version = &VersionParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Version); 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_BlockParams protoreflect.MessageDescriptor - fd_BlockParams_max_bytes protoreflect.FieldDescriptor - fd_BlockParams_max_gas protoreflect.FieldDescriptor - fd_BlockParams_time_iota_ms protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_params_proto_init() - md_BlockParams = File_tendermint_types_params_proto.Messages().ByName("BlockParams") - fd_BlockParams_max_bytes = md_BlockParams.Fields().ByName("max_bytes") - fd_BlockParams_max_gas = md_BlockParams.Fields().ByName("max_gas") - fd_BlockParams_time_iota_ms = md_BlockParams.Fields().ByName("time_iota_ms") -} - -var _ protoreflect.Message = (*fastReflection_BlockParams)(nil) - -type fastReflection_BlockParams BlockParams - -func (x *BlockParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_BlockParams)(x) -} - -func (x *BlockParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_params_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BlockParams_messageType fastReflection_BlockParams_messageType -var _ protoreflect.MessageType = fastReflection_BlockParams_messageType{} - -type fastReflection_BlockParams_messageType struct{} - -func (x fastReflection_BlockParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_BlockParams)(nil) -} -func (x fastReflection_BlockParams_messageType) New() protoreflect.Message { - return new(fastReflection_BlockParams) -} -func (x fastReflection_BlockParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BlockParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BlockParams) Descriptor() protoreflect.MessageDescriptor { - return md_BlockParams -} - -// 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_BlockParams) Type() protoreflect.MessageType { - return _fastReflection_BlockParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BlockParams) New() protoreflect.Message { - return new(fastReflection_BlockParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BlockParams) Interface() protoreflect.ProtoMessage { - return (*BlockParams)(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_BlockParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MaxBytes != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxBytes) - if !f(fd_BlockParams_max_bytes, value) { - return - } - } - if x.MaxGas != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxGas) - if !f(fd_BlockParams_max_gas, value) { - return - } - } - if x.TimeIotaMs != int64(0) { - value := protoreflect.ValueOfInt64(x.TimeIotaMs) - if !f(fd_BlockParams_time_iota_ms, 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_BlockParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.BlockParams.max_bytes": - return x.MaxBytes != int64(0) - case "tendermint.types.BlockParams.max_gas": - return x.MaxGas != int64(0) - case "tendermint.types.BlockParams.time_iota_ms": - return x.TimeIotaMs != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockParams")) - } - panic(fmt.Errorf("message tendermint.types.BlockParams 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_BlockParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.BlockParams.max_bytes": - x.MaxBytes = int64(0) - case "tendermint.types.BlockParams.max_gas": - x.MaxGas = int64(0) - case "tendermint.types.BlockParams.time_iota_ms": - x.TimeIotaMs = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockParams")) - } - panic(fmt.Errorf("message tendermint.types.BlockParams 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_BlockParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.BlockParams.max_bytes": - value := x.MaxBytes - return protoreflect.ValueOfInt64(value) - case "tendermint.types.BlockParams.max_gas": - value := x.MaxGas - return protoreflect.ValueOfInt64(value) - case "tendermint.types.BlockParams.time_iota_ms": - value := x.TimeIotaMs - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockParams")) - } - panic(fmt.Errorf("message tendermint.types.BlockParams 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_BlockParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.BlockParams.max_bytes": - x.MaxBytes = value.Int() - case "tendermint.types.BlockParams.max_gas": - x.MaxGas = value.Int() - case "tendermint.types.BlockParams.time_iota_ms": - x.TimeIotaMs = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockParams")) - } - panic(fmt.Errorf("message tendermint.types.BlockParams 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_BlockParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.BlockParams.max_bytes": - panic(fmt.Errorf("field max_bytes of message tendermint.types.BlockParams is not mutable")) - case "tendermint.types.BlockParams.max_gas": - panic(fmt.Errorf("field max_gas of message tendermint.types.BlockParams is not mutable")) - case "tendermint.types.BlockParams.time_iota_ms": - panic(fmt.Errorf("field time_iota_ms of message tendermint.types.BlockParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockParams")) - } - panic(fmt.Errorf("message tendermint.types.BlockParams 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_BlockParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.BlockParams.max_bytes": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.BlockParams.max_gas": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.BlockParams.time_iota_ms": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockParams")) - } - panic(fmt.Errorf("message tendermint.types.BlockParams 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_BlockParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.BlockParams", 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_BlockParams) 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_BlockParams) 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_BlockParams) 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_BlockParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BlockParams) - 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.MaxBytes != 0 { - n += 1 + runtime.Sov(uint64(x.MaxBytes)) - } - if x.MaxGas != 0 { - n += 1 + runtime.Sov(uint64(x.MaxGas)) - } - if x.TimeIotaMs != 0 { - n += 1 + runtime.Sov(uint64(x.TimeIotaMs)) - } - 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().(*BlockParams) - 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.TimeIotaMs != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TimeIotaMs)) - i-- - dAtA[i] = 0x18 - } - if x.MaxGas != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxGas)) - i-- - dAtA[i] = 0x10 - } - if x.MaxBytes != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxBytes)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BlockParams) - 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: BlockParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - x.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - x.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeIotaMs", wireType) - } - x.TimeIotaMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TimeIotaMs |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EvidenceParams protoreflect.MessageDescriptor - fd_EvidenceParams_max_age_num_blocks protoreflect.FieldDescriptor - fd_EvidenceParams_max_age_duration protoreflect.FieldDescriptor - fd_EvidenceParams_max_bytes protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_params_proto_init() - md_EvidenceParams = File_tendermint_types_params_proto.Messages().ByName("EvidenceParams") - fd_EvidenceParams_max_age_num_blocks = md_EvidenceParams.Fields().ByName("max_age_num_blocks") - fd_EvidenceParams_max_age_duration = md_EvidenceParams.Fields().ByName("max_age_duration") - fd_EvidenceParams_max_bytes = md_EvidenceParams.Fields().ByName("max_bytes") -} - -var _ protoreflect.Message = (*fastReflection_EvidenceParams)(nil) - -type fastReflection_EvidenceParams EvidenceParams - -func (x *EvidenceParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_EvidenceParams)(x) -} - -func (x *EvidenceParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_params_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EvidenceParams_messageType fastReflection_EvidenceParams_messageType -var _ protoreflect.MessageType = fastReflection_EvidenceParams_messageType{} - -type fastReflection_EvidenceParams_messageType struct{} - -func (x fastReflection_EvidenceParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_EvidenceParams)(nil) -} -func (x fastReflection_EvidenceParams_messageType) New() protoreflect.Message { - return new(fastReflection_EvidenceParams) -} -func (x fastReflection_EvidenceParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EvidenceParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EvidenceParams) Descriptor() protoreflect.MessageDescriptor { - return md_EvidenceParams -} - -// 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_EvidenceParams) Type() protoreflect.MessageType { - return _fastReflection_EvidenceParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EvidenceParams) New() protoreflect.Message { - return new(fastReflection_EvidenceParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EvidenceParams) Interface() protoreflect.ProtoMessage { - return (*EvidenceParams)(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_EvidenceParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MaxAgeNumBlocks != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxAgeNumBlocks) - if !f(fd_EvidenceParams_max_age_num_blocks, value) { - return - } - } - if x.MaxAgeDuration != nil { - value := protoreflect.ValueOfMessage(x.MaxAgeDuration.ProtoReflect()) - if !f(fd_EvidenceParams_max_age_duration, value) { - return - } - } - if x.MaxBytes != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxBytes) - if !f(fd_EvidenceParams_max_bytes, 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_EvidenceParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.EvidenceParams.max_age_num_blocks": - return x.MaxAgeNumBlocks != int64(0) - case "tendermint.types.EvidenceParams.max_age_duration": - return x.MaxAgeDuration != nil - case "tendermint.types.EvidenceParams.max_bytes": - return x.MaxBytes != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceParams")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceParams 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_EvidenceParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.EvidenceParams.max_age_num_blocks": - x.MaxAgeNumBlocks = int64(0) - case "tendermint.types.EvidenceParams.max_age_duration": - x.MaxAgeDuration = nil - case "tendermint.types.EvidenceParams.max_bytes": - x.MaxBytes = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceParams")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceParams 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_EvidenceParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.EvidenceParams.max_age_num_blocks": - value := x.MaxAgeNumBlocks - return protoreflect.ValueOfInt64(value) - case "tendermint.types.EvidenceParams.max_age_duration": - value := x.MaxAgeDuration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.EvidenceParams.max_bytes": - value := x.MaxBytes - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceParams")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceParams 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_EvidenceParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.EvidenceParams.max_age_num_blocks": - x.MaxAgeNumBlocks = value.Int() - case "tendermint.types.EvidenceParams.max_age_duration": - x.MaxAgeDuration = value.Message().Interface().(*durationpb.Duration) - case "tendermint.types.EvidenceParams.max_bytes": - x.MaxBytes = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceParams")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceParams 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_EvidenceParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.EvidenceParams.max_age_duration": - if x.MaxAgeDuration == nil { - x.MaxAgeDuration = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.MaxAgeDuration.ProtoReflect()) - case "tendermint.types.EvidenceParams.max_age_num_blocks": - panic(fmt.Errorf("field max_age_num_blocks of message tendermint.types.EvidenceParams is not mutable")) - case "tendermint.types.EvidenceParams.max_bytes": - panic(fmt.Errorf("field max_bytes of message tendermint.types.EvidenceParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceParams")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceParams 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_EvidenceParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.EvidenceParams.max_age_num_blocks": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.EvidenceParams.max_age_duration": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.EvidenceParams.max_bytes": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.EvidenceParams")) - } - panic(fmt.Errorf("message tendermint.types.EvidenceParams 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_EvidenceParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.EvidenceParams", 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_EvidenceParams) 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_EvidenceParams) 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_EvidenceParams) 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_EvidenceParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EvidenceParams) - 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.MaxAgeNumBlocks != 0 { - n += 1 + runtime.Sov(uint64(x.MaxAgeNumBlocks)) - } - if x.MaxAgeDuration != nil { - l = options.Size(x.MaxAgeDuration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxBytes != 0 { - n += 1 + runtime.Sov(uint64(x.MaxBytes)) - } - 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().(*EvidenceParams) - 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.MaxBytes != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxBytes)) - i-- - dAtA[i] = 0x18 - } - if x.MaxAgeDuration != nil { - encoded, err := options.Marshal(x.MaxAgeDuration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.MaxAgeNumBlocks != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxAgeNumBlocks)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EvidenceParams) - 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: EvidenceParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxAgeNumBlocks", wireType) - } - x.MaxAgeNumBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxAgeNumBlocks |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxAgeDuration", 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.MaxAgeDuration == nil { - x.MaxAgeDuration = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxAgeDuration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - x.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ValidatorParams_1_list)(nil) - -type _ValidatorParams_1_list struct { - list *[]string -} - -func (x *_ValidatorParams_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorParams_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ValidatorParams_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorParams_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorParams_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ValidatorParams at list field PubKeyTypes as it is not of Message kind")) -} - -func (x *_ValidatorParams_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorParams_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ValidatorParams_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorParams protoreflect.MessageDescriptor - fd_ValidatorParams_pub_key_types protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_params_proto_init() - md_ValidatorParams = File_tendermint_types_params_proto.Messages().ByName("ValidatorParams") - fd_ValidatorParams_pub_key_types = md_ValidatorParams.Fields().ByName("pub_key_types") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorParams)(nil) - -type fastReflection_ValidatorParams ValidatorParams - -func (x *ValidatorParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorParams)(x) -} - -func (x *ValidatorParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_params_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorParams_messageType fastReflection_ValidatorParams_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorParams_messageType{} - -type fastReflection_ValidatorParams_messageType struct{} - -func (x fastReflection_ValidatorParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorParams)(nil) -} -func (x fastReflection_ValidatorParams_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorParams) -} -func (x fastReflection_ValidatorParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorParams) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorParams -} - -// 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_ValidatorParams) Type() protoreflect.MessageType { - return _fastReflection_ValidatorParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorParams) New() protoreflect.Message { - return new(fastReflection_ValidatorParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorParams) Interface() protoreflect.ProtoMessage { - return (*ValidatorParams)(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_ValidatorParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.PubKeyTypes) != 0 { - value := protoreflect.ValueOfList(&_ValidatorParams_1_list{list: &x.PubKeyTypes}) - if !f(fd_ValidatorParams_pub_key_types, 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_ValidatorParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.ValidatorParams.pub_key_types": - return len(x.PubKeyTypes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorParams")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorParams 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_ValidatorParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.ValidatorParams.pub_key_types": - x.PubKeyTypes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorParams")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorParams 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_ValidatorParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.ValidatorParams.pub_key_types": - if len(x.PubKeyTypes) == 0 { - return protoreflect.ValueOfList(&_ValidatorParams_1_list{}) - } - listValue := &_ValidatorParams_1_list{list: &x.PubKeyTypes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorParams")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorParams 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_ValidatorParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.ValidatorParams.pub_key_types": - lv := value.List() - clv := lv.(*_ValidatorParams_1_list) - x.PubKeyTypes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorParams")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorParams 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_ValidatorParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.ValidatorParams.pub_key_types": - if x.PubKeyTypes == nil { - x.PubKeyTypes = []string{} - } - value := &_ValidatorParams_1_list{list: &x.PubKeyTypes} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorParams")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorParams 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_ValidatorParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.ValidatorParams.pub_key_types": - list := []string{} - return protoreflect.ValueOfList(&_ValidatorParams_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorParams")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorParams 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_ValidatorParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.ValidatorParams", 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_ValidatorParams) 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_ValidatorParams) 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_ValidatorParams) 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_ValidatorParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.PubKeyTypes) > 0 { - for _, s := range x.PubKeyTypes { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.PubKeyTypes) > 0 { - for iNdEx := len(x.PubKeyTypes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.PubKeyTypes[iNdEx]) - copy(dAtA[i:], x.PubKeyTypes[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PubKeyTypes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorParams) - 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: ValidatorParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorParams: 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 PubKeyTypes", 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.PubKeyTypes = append(x.PubKeyTypes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_VersionParams protoreflect.MessageDescriptor - fd_VersionParams_app_version protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_params_proto_init() - md_VersionParams = File_tendermint_types_params_proto.Messages().ByName("VersionParams") - fd_VersionParams_app_version = md_VersionParams.Fields().ByName("app_version") -} - -var _ protoreflect.Message = (*fastReflection_VersionParams)(nil) - -type fastReflection_VersionParams VersionParams - -func (x *VersionParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_VersionParams)(x) -} - -func (x *VersionParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_params_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_VersionParams_messageType fastReflection_VersionParams_messageType -var _ protoreflect.MessageType = fastReflection_VersionParams_messageType{} - -type fastReflection_VersionParams_messageType struct{} - -func (x fastReflection_VersionParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_VersionParams)(nil) -} -func (x fastReflection_VersionParams_messageType) New() protoreflect.Message { - return new(fastReflection_VersionParams) -} -func (x fastReflection_VersionParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VersionParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VersionParams) Descriptor() protoreflect.MessageDescriptor { - return md_VersionParams -} - -// 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_VersionParams) Type() protoreflect.MessageType { - return _fastReflection_VersionParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VersionParams) New() protoreflect.Message { - return new(fastReflection_VersionParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VersionParams) Interface() protoreflect.ProtoMessage { - return (*VersionParams)(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_VersionParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AppVersion != uint64(0) { - value := protoreflect.ValueOfUint64(x.AppVersion) - if !f(fd_VersionParams_app_version, 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_VersionParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.VersionParams.app_version": - return x.AppVersion != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.VersionParams")) - } - panic(fmt.Errorf("message tendermint.types.VersionParams 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_VersionParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.VersionParams.app_version": - x.AppVersion = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.VersionParams")) - } - panic(fmt.Errorf("message tendermint.types.VersionParams 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_VersionParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.VersionParams.app_version": - value := x.AppVersion - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.VersionParams")) - } - panic(fmt.Errorf("message tendermint.types.VersionParams 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_VersionParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.VersionParams.app_version": - x.AppVersion = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.VersionParams")) - } - panic(fmt.Errorf("message tendermint.types.VersionParams 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_VersionParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.VersionParams.app_version": - panic(fmt.Errorf("field app_version of message tendermint.types.VersionParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.VersionParams")) - } - panic(fmt.Errorf("message tendermint.types.VersionParams 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_VersionParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.VersionParams.app_version": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.VersionParams")) - } - panic(fmt.Errorf("message tendermint.types.VersionParams 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_VersionParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.VersionParams", 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_VersionParams) 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_VersionParams) 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_VersionParams) 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_VersionParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VersionParams) - 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.AppVersion != 0 { - n += 1 + runtime.Sov(uint64(x.AppVersion)) - } - 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().(*VersionParams) - 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.AppVersion != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AppVersion)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*VersionParams) - 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: VersionParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VersionParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - x.AppVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AppVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_HashedParams protoreflect.MessageDescriptor - fd_HashedParams_block_max_bytes protoreflect.FieldDescriptor - fd_HashedParams_block_max_gas protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_params_proto_init() - md_HashedParams = File_tendermint_types_params_proto.Messages().ByName("HashedParams") - fd_HashedParams_block_max_bytes = md_HashedParams.Fields().ByName("block_max_bytes") - fd_HashedParams_block_max_gas = md_HashedParams.Fields().ByName("block_max_gas") -} - -var _ protoreflect.Message = (*fastReflection_HashedParams)(nil) - -type fastReflection_HashedParams HashedParams - -func (x *HashedParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_HashedParams)(x) -} - -func (x *HashedParams) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_params_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_HashedParams_messageType fastReflection_HashedParams_messageType -var _ protoreflect.MessageType = fastReflection_HashedParams_messageType{} - -type fastReflection_HashedParams_messageType struct{} - -func (x fastReflection_HashedParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_HashedParams)(nil) -} -func (x fastReflection_HashedParams_messageType) New() protoreflect.Message { - return new(fastReflection_HashedParams) -} -func (x fastReflection_HashedParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HashedParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HashedParams) Descriptor() protoreflect.MessageDescriptor { - return md_HashedParams -} - -// 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_HashedParams) Type() protoreflect.MessageType { - return _fastReflection_HashedParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HashedParams) New() protoreflect.Message { - return new(fastReflection_HashedParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HashedParams) Interface() protoreflect.ProtoMessage { - return (*HashedParams)(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_HashedParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockMaxBytes != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockMaxBytes) - if !f(fd_HashedParams_block_max_bytes, value) { - return - } - } - if x.BlockMaxGas != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockMaxGas) - if !f(fd_HashedParams_block_max_gas, 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_HashedParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.HashedParams.block_max_bytes": - return x.BlockMaxBytes != int64(0) - case "tendermint.types.HashedParams.block_max_gas": - return x.BlockMaxGas != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.HashedParams")) - } - panic(fmt.Errorf("message tendermint.types.HashedParams 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_HashedParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.HashedParams.block_max_bytes": - x.BlockMaxBytes = int64(0) - case "tendermint.types.HashedParams.block_max_gas": - x.BlockMaxGas = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.HashedParams")) - } - panic(fmt.Errorf("message tendermint.types.HashedParams 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_HashedParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.HashedParams.block_max_bytes": - value := x.BlockMaxBytes - return protoreflect.ValueOfInt64(value) - case "tendermint.types.HashedParams.block_max_gas": - value := x.BlockMaxGas - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.HashedParams")) - } - panic(fmt.Errorf("message tendermint.types.HashedParams 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_HashedParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.HashedParams.block_max_bytes": - x.BlockMaxBytes = value.Int() - case "tendermint.types.HashedParams.block_max_gas": - x.BlockMaxGas = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.HashedParams")) - } - panic(fmt.Errorf("message tendermint.types.HashedParams 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_HashedParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.HashedParams.block_max_bytes": - panic(fmt.Errorf("field block_max_bytes of message tendermint.types.HashedParams is not mutable")) - case "tendermint.types.HashedParams.block_max_gas": - panic(fmt.Errorf("field block_max_gas of message tendermint.types.HashedParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.HashedParams")) - } - panic(fmt.Errorf("message tendermint.types.HashedParams 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_HashedParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.HashedParams.block_max_bytes": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.HashedParams.block_max_gas": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.HashedParams")) - } - panic(fmt.Errorf("message tendermint.types.HashedParams 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_HashedParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.HashedParams", 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_HashedParams) 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_HashedParams) 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_HashedParams) 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_HashedParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HashedParams) - 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.BlockMaxBytes != 0 { - n += 1 + runtime.Sov(uint64(x.BlockMaxBytes)) - } - if x.BlockMaxGas != 0 { - n += 1 + runtime.Sov(uint64(x.BlockMaxGas)) - } - 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().(*HashedParams) - 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.BlockMaxGas != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockMaxGas)) - i-- - dAtA[i] = 0x10 - } - if x.BlockMaxBytes != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockMaxBytes)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*HashedParams) - 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: HashedParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HashedParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockMaxBytes", wireType) - } - x.BlockMaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockMaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) - } - x.BlockMaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockMaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/types/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -type ConsensusParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - Evidence *EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` - Version *VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *ConsensusParams) Reset() { - *x = ConsensusParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusParams) ProtoMessage() {} - -// Deprecated: Use ConsensusParams.ProtoReflect.Descriptor instead. -func (*ConsensusParams) Descriptor() ([]byte, []int) { - return file_tendermint_types_params_proto_rawDescGZIP(), []int{0} -} - -func (x *ConsensusParams) GetBlock() *BlockParams { - if x != nil { - return x.Block - } - return nil -} - -func (x *ConsensusParams) GetEvidence() *EvidenceParams { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *ConsensusParams) GetValidator() *ValidatorParams { - if x != nil { - return x.Validator - } - return nil -} - -func (x *ConsensusParams) GetVersion() *VersionParams { - if x != nil { - return x.Version - } - return nil -} - -// BlockParams contains limits on the block size. -type BlockParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Max block size, in bytes. - // Note: must be greater than 0 - MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - // Max gas per block. - // Note: must be greater or equal to -1 - MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"` -} - -func (x *BlockParams) Reset() { - *x = BlockParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_params_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockParams) ProtoMessage() {} - -// Deprecated: Use BlockParams.ProtoReflect.Descriptor instead. -func (*BlockParams) Descriptor() ([]byte, []int) { - return file_tendermint_types_params_proto_rawDescGZIP(), []int{1} -} - -func (x *BlockParams) GetMaxBytes() int64 { - if x != nil { - return x.MaxBytes - } - return 0 -} - -func (x *BlockParams) GetMaxGas() int64 { - if x != nil { - return x.MaxGas - } - return 0 -} - -func (x *BlockParams) GetTimeIotaMs() int64 { - if x != nil { - return x.TimeIotaMs - } - return 0 -} - -// EvidenceParams determine how we handle evidence of malfeasance. -type EvidenceParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"` - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - MaxAgeDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3" json:"max_age_duration,omitempty"` - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - MaxBytes int64 `protobuf:"varint,3,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` -} - -func (x *EvidenceParams) Reset() { - *x = EvidenceParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_params_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvidenceParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvidenceParams) ProtoMessage() {} - -// Deprecated: Use EvidenceParams.ProtoReflect.Descriptor instead. -func (*EvidenceParams) Descriptor() ([]byte, []int) { - return file_tendermint_types_params_proto_rawDescGZIP(), []int{2} -} - -func (x *EvidenceParams) GetMaxAgeNumBlocks() int64 { - if x != nil { - return x.MaxAgeNumBlocks - } - return 0 -} - -func (x *EvidenceParams) GetMaxAgeDuration() *durationpb.Duration { - if x != nil { - return x.MaxAgeDuration - } - return nil -} - -func (x *EvidenceParams) GetMaxBytes() int64 { - if x != nil { - return x.MaxBytes - } - return 0 -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -type ValidatorParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"` -} - -func (x *ValidatorParams) Reset() { - *x = ValidatorParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_params_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorParams) ProtoMessage() {} - -// Deprecated: Use ValidatorParams.ProtoReflect.Descriptor instead. -func (*ValidatorParams) Descriptor() ([]byte, []int) { - return file_tendermint_types_params_proto_rawDescGZIP(), []int{3} -} - -func (x *ValidatorParams) GetPubKeyTypes() []string { - if x != nil { - return x.PubKeyTypes - } - return nil -} - -// VersionParams contains the ABCI application version. -type VersionParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AppVersion uint64 `protobuf:"varint,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` -} - -func (x *VersionParams) Reset() { - *x = VersionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_params_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VersionParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionParams) ProtoMessage() {} - -// Deprecated: Use VersionParams.ProtoReflect.Descriptor instead. -func (*VersionParams) Descriptor() ([]byte, []int) { - return file_tendermint_types_params_proto_rawDescGZIP(), []int{4} -} - -func (x *VersionParams) GetAppVersion() uint64 { - if x != nil { - return x.AppVersion - } - return 0 -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -type HashedParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"` - BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` -} - -func (x *HashedParams) Reset() { - *x = HashedParams{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_params_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HashedParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HashedParams) ProtoMessage() {} - -// Deprecated: Use HashedParams.ProtoReflect.Descriptor instead. -func (*HashedParams) Descriptor() ([]byte, []int) { - return file_tendermint_types_params_proto_rawDescGZIP(), []int{5} -} - -func (x *HashedParams) GetBlockMaxBytes() int64 { - if x != nil { - return x.BlockMaxBytes - } - return 0 -} - -func (x *HashedParams) GetBlockMaxGas() int64 { - if x != nil { - return x.BlockMaxGas - } - return 0 -} - -var File_tendermint_types_params_proto protoreflect.FileDescriptor - -var file_tendermint_types_params_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x10, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x42, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x3f, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, - 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x6d, 0x61, 0x78, 0x47, 0x61, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x69, 0x6f, 0x74, 0x61, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, - 0x69, 0x6d, 0x65, 0x49, 0x6f, 0x74, 0x61, 0x4d, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x0e, 0x45, 0x76, - 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x12, - 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, - 0x4e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x6d, 0x61, 0x78, - 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x08, 0xb8, 0xa0, - 0x1f, 0x01, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x3a, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x61, 0x70, - 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0xb8, 0xa0, 0x1f, 0x01, 0xe8, 0xa0, - 0x1f, 0x01, 0x22, 0x5a, 0x0a, 0x0c, 0x48, 0x61, 0x73, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x78, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x47, 0x61, 0x73, 0x42, 0xbb, - 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0xa2, 0x02, 0x03, 0x54, 0x54, 0x58, 0xaa, - 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x73, 0xca, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, - 0x54, 0x79, 0x70, 0x65, 0x73, 0xe2, 0x02, 0x1c, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_types_params_proto_rawDescOnce sync.Once - file_tendermint_types_params_proto_rawDescData = file_tendermint_types_params_proto_rawDesc -) - -func file_tendermint_types_params_proto_rawDescGZIP() []byte { - file_tendermint_types_params_proto_rawDescOnce.Do(func() { - file_tendermint_types_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_types_params_proto_rawDescData) - }) - return file_tendermint_types_params_proto_rawDescData -} - -var file_tendermint_types_params_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_tendermint_types_params_proto_goTypes = []interface{}{ - (*ConsensusParams)(nil), // 0: tendermint.types.ConsensusParams - (*BlockParams)(nil), // 1: tendermint.types.BlockParams - (*EvidenceParams)(nil), // 2: tendermint.types.EvidenceParams - (*ValidatorParams)(nil), // 3: tendermint.types.ValidatorParams - (*VersionParams)(nil), // 4: tendermint.types.VersionParams - (*HashedParams)(nil), // 5: tendermint.types.HashedParams - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration -} -var file_tendermint_types_params_proto_depIdxs = []int32{ - 1, // 0: tendermint.types.ConsensusParams.block:type_name -> tendermint.types.BlockParams - 2, // 1: tendermint.types.ConsensusParams.evidence:type_name -> tendermint.types.EvidenceParams - 3, // 2: tendermint.types.ConsensusParams.validator:type_name -> tendermint.types.ValidatorParams - 4, // 3: tendermint.types.ConsensusParams.version:type_name -> tendermint.types.VersionParams - 6, // 4: tendermint.types.EvidenceParams.max_age_duration:type_name -> google.protobuf.Duration - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_tendermint_types_params_proto_init() } -func file_tendermint_types_params_proto_init() { - if File_tendermint_types_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_types_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_params_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvidenceParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_params_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_params_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_params_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HashedParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_types_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_types_params_proto_goTypes, - DependencyIndexes: file_tendermint_types_params_proto_depIdxs, - MessageInfos: file_tendermint_types_params_proto_msgTypes, - }.Build() - File_tendermint_types_params_proto = out.File - file_tendermint_types_params_proto_rawDesc = nil - file_tendermint_types_params_proto_goTypes = nil - file_tendermint_types_params_proto_depIdxs = nil -} diff --git a/api/tendermint/types/types.pulsar.go b/api/tendermint/types/types.pulsar.go deleted file mode 100644 index ad92c06a38e3..000000000000 --- a/api/tendermint/types/types.pulsar.go +++ /dev/null @@ -1,9821 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package types - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - crypto "github.com/cosmos/cosmos-sdk/api/tendermint/crypto" - version "github.com/cosmos/cosmos-sdk/api/tendermint/version" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_PartSetHeader protoreflect.MessageDescriptor - fd_PartSetHeader_total protoreflect.FieldDescriptor - fd_PartSetHeader_hash protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_PartSetHeader = File_tendermint_types_types_proto.Messages().ByName("PartSetHeader") - fd_PartSetHeader_total = md_PartSetHeader.Fields().ByName("total") - fd_PartSetHeader_hash = md_PartSetHeader.Fields().ByName("hash") -} - -var _ protoreflect.Message = (*fastReflection_PartSetHeader)(nil) - -type fastReflection_PartSetHeader PartSetHeader - -func (x *PartSetHeader) ProtoReflect() protoreflect.Message { - return (*fastReflection_PartSetHeader)(x) -} - -func (x *PartSetHeader) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PartSetHeader_messageType fastReflection_PartSetHeader_messageType -var _ protoreflect.MessageType = fastReflection_PartSetHeader_messageType{} - -type fastReflection_PartSetHeader_messageType struct{} - -func (x fastReflection_PartSetHeader_messageType) Zero() protoreflect.Message { - return (*fastReflection_PartSetHeader)(nil) -} -func (x fastReflection_PartSetHeader_messageType) New() protoreflect.Message { - return new(fastReflection_PartSetHeader) -} -func (x fastReflection_PartSetHeader_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PartSetHeader -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PartSetHeader) Descriptor() protoreflect.MessageDescriptor { - return md_PartSetHeader -} - -// 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_PartSetHeader) Type() protoreflect.MessageType { - return _fastReflection_PartSetHeader_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PartSetHeader) New() protoreflect.Message { - return new(fastReflection_PartSetHeader) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PartSetHeader) Interface() protoreflect.ProtoMessage { - return (*PartSetHeader)(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_PartSetHeader) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Total != uint32(0) { - value := protoreflect.ValueOfUint32(x.Total) - if !f(fd_PartSetHeader_total, value) { - return - } - } - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_PartSetHeader_hash, 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_PartSetHeader) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.PartSetHeader.total": - return x.Total != uint32(0) - case "tendermint.types.PartSetHeader.hash": - return len(x.Hash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.PartSetHeader")) - } - panic(fmt.Errorf("message tendermint.types.PartSetHeader 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_PartSetHeader) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.PartSetHeader.total": - x.Total = uint32(0) - case "tendermint.types.PartSetHeader.hash": - x.Hash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.PartSetHeader")) - } - panic(fmt.Errorf("message tendermint.types.PartSetHeader 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_PartSetHeader) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.PartSetHeader.total": - value := x.Total - return protoreflect.ValueOfUint32(value) - case "tendermint.types.PartSetHeader.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.PartSetHeader")) - } - panic(fmt.Errorf("message tendermint.types.PartSetHeader 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_PartSetHeader) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.PartSetHeader.total": - x.Total = uint32(value.Uint()) - case "tendermint.types.PartSetHeader.hash": - x.Hash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.PartSetHeader")) - } - panic(fmt.Errorf("message tendermint.types.PartSetHeader 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_PartSetHeader) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.PartSetHeader.total": - panic(fmt.Errorf("field total of message tendermint.types.PartSetHeader is not mutable")) - case "tendermint.types.PartSetHeader.hash": - panic(fmt.Errorf("field hash of message tendermint.types.PartSetHeader is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.PartSetHeader")) - } - panic(fmt.Errorf("message tendermint.types.PartSetHeader 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_PartSetHeader) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.PartSetHeader.total": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.types.PartSetHeader.hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.PartSetHeader")) - } - panic(fmt.Errorf("message tendermint.types.PartSetHeader 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_PartSetHeader) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.PartSetHeader", 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_PartSetHeader) 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_PartSetHeader) 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_PartSetHeader) 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_PartSetHeader) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PartSetHeader) - 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.Total != 0 { - n += 1 + runtime.Sov(uint64(x.Total)) - } - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PartSetHeader) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0x12 - } - if x.Total != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Total)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*PartSetHeader) - 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: PartSetHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - x.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Total |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Part protoreflect.MessageDescriptor - fd_Part_index protoreflect.FieldDescriptor - fd_Part_bytes protoreflect.FieldDescriptor - fd_Part_proof protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_Part = File_tendermint_types_types_proto.Messages().ByName("Part") - fd_Part_index = md_Part.Fields().ByName("index") - fd_Part_bytes = md_Part.Fields().ByName("bytes") - fd_Part_proof = md_Part.Fields().ByName("proof") -} - -var _ protoreflect.Message = (*fastReflection_Part)(nil) - -type fastReflection_Part Part - -func (x *Part) ProtoReflect() protoreflect.Message { - return (*fastReflection_Part)(x) -} - -func (x *Part) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Part_messageType fastReflection_Part_messageType -var _ protoreflect.MessageType = fastReflection_Part_messageType{} - -type fastReflection_Part_messageType struct{} - -func (x fastReflection_Part_messageType) Zero() protoreflect.Message { - return (*fastReflection_Part)(nil) -} -func (x fastReflection_Part_messageType) New() protoreflect.Message { - return new(fastReflection_Part) -} -func (x fastReflection_Part_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Part -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Part) Descriptor() protoreflect.MessageDescriptor { - return md_Part -} - -// 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_Part) Type() protoreflect.MessageType { - return _fastReflection_Part_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Part) New() protoreflect.Message { - return new(fastReflection_Part) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Part) Interface() protoreflect.ProtoMessage { - return (*Part)(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_Part) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Index != uint32(0) { - value := protoreflect.ValueOfUint32(x.Index) - if !f(fd_Part_index, value) { - return - } - } - if len(x.Bytes) != 0 { - value := protoreflect.ValueOfBytes(x.Bytes) - if !f(fd_Part_bytes, value) { - return - } - } - if x.Proof != nil { - value := protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) - if !f(fd_Part_proof, 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_Part) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Part.index": - return x.Index != uint32(0) - case "tendermint.types.Part.bytes": - return len(x.Bytes) != 0 - case "tendermint.types.Part.proof": - return x.Proof != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Part")) - } - panic(fmt.Errorf("message tendermint.types.Part 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_Part) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Part.index": - x.Index = uint32(0) - case "tendermint.types.Part.bytes": - x.Bytes = nil - case "tendermint.types.Part.proof": - x.Proof = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Part")) - } - panic(fmt.Errorf("message tendermint.types.Part 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_Part) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Part.index": - value := x.Index - return protoreflect.ValueOfUint32(value) - case "tendermint.types.Part.bytes": - value := x.Bytes - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Part.proof": - value := x.Proof - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Part")) - } - panic(fmt.Errorf("message tendermint.types.Part 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_Part) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Part.index": - x.Index = uint32(value.Uint()) - case "tendermint.types.Part.bytes": - x.Bytes = value.Bytes() - case "tendermint.types.Part.proof": - x.Proof = value.Message().Interface().(*crypto.Proof) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Part")) - } - panic(fmt.Errorf("message tendermint.types.Part 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_Part) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Part.proof": - if x.Proof == nil { - x.Proof = new(crypto.Proof) - } - return protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) - case "tendermint.types.Part.index": - panic(fmt.Errorf("field index of message tendermint.types.Part is not mutable")) - case "tendermint.types.Part.bytes": - panic(fmt.Errorf("field bytes of message tendermint.types.Part is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Part")) - } - panic(fmt.Errorf("message tendermint.types.Part 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_Part) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Part.index": - return protoreflect.ValueOfUint32(uint32(0)) - case "tendermint.types.Part.bytes": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Part.proof": - m := new(crypto.Proof) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Part")) - } - panic(fmt.Errorf("message tendermint.types.Part 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_Part) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Part", 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_Part) 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_Part) 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_Part) 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_Part) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Part) - 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.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.Bytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Proof != nil { - l = options.Size(x.Proof) - 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().(*Part) - 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.Proof != nil { - encoded, err := options.Marshal(x.Proof) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Bytes) > 0 { - i -= len(x.Bytes) - copy(dAtA[i:], x.Bytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bytes))) - i-- - dAtA[i] = 0x12 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Part) - 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: Part: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bytes = append(x.Bytes[:0], dAtA[iNdEx:postIndex]...) - if x.Bytes == nil { - x.Bytes = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof == nil { - x.Proof = &crypto.Proof{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proof); 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_BlockID protoreflect.MessageDescriptor - fd_BlockID_hash protoreflect.FieldDescriptor - fd_BlockID_part_set_header protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_BlockID = File_tendermint_types_types_proto.Messages().ByName("BlockID") - fd_BlockID_hash = md_BlockID.Fields().ByName("hash") - fd_BlockID_part_set_header = md_BlockID.Fields().ByName("part_set_header") -} - -var _ protoreflect.Message = (*fastReflection_BlockID)(nil) - -type fastReflection_BlockID BlockID - -func (x *BlockID) ProtoReflect() protoreflect.Message { - return (*fastReflection_BlockID)(x) -} - -func (x *BlockID) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BlockID_messageType fastReflection_BlockID_messageType -var _ protoreflect.MessageType = fastReflection_BlockID_messageType{} - -type fastReflection_BlockID_messageType struct{} - -func (x fastReflection_BlockID_messageType) Zero() protoreflect.Message { - return (*fastReflection_BlockID)(nil) -} -func (x fastReflection_BlockID_messageType) New() protoreflect.Message { - return new(fastReflection_BlockID) -} -func (x fastReflection_BlockID_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BlockID -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BlockID) Descriptor() protoreflect.MessageDescriptor { - return md_BlockID -} - -// 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_BlockID) Type() protoreflect.MessageType { - return _fastReflection_BlockID_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BlockID) New() protoreflect.Message { - return new(fastReflection_BlockID) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BlockID) Interface() protoreflect.ProtoMessage { - return (*BlockID)(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_BlockID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_BlockID_hash, value) { - return - } - } - if x.PartSetHeader != nil { - value := protoreflect.ValueOfMessage(x.PartSetHeader.ProtoReflect()) - if !f(fd_BlockID_part_set_header, 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_BlockID) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.BlockID.hash": - return len(x.Hash) != 0 - case "tendermint.types.BlockID.part_set_header": - return x.PartSetHeader != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockID")) - } - panic(fmt.Errorf("message tendermint.types.BlockID 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_BlockID) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.BlockID.hash": - x.Hash = nil - case "tendermint.types.BlockID.part_set_header": - x.PartSetHeader = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockID")) - } - panic(fmt.Errorf("message tendermint.types.BlockID 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_BlockID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.BlockID.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.BlockID.part_set_header": - value := x.PartSetHeader - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockID")) - } - panic(fmt.Errorf("message tendermint.types.BlockID 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_BlockID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.BlockID.hash": - x.Hash = value.Bytes() - case "tendermint.types.BlockID.part_set_header": - x.PartSetHeader = value.Message().Interface().(*PartSetHeader) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockID")) - } - panic(fmt.Errorf("message tendermint.types.BlockID 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_BlockID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.BlockID.part_set_header": - if x.PartSetHeader == nil { - x.PartSetHeader = new(PartSetHeader) - } - return protoreflect.ValueOfMessage(x.PartSetHeader.ProtoReflect()) - case "tendermint.types.BlockID.hash": - panic(fmt.Errorf("field hash of message tendermint.types.BlockID is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockID")) - } - panic(fmt.Errorf("message tendermint.types.BlockID 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_BlockID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.BlockID.hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.BlockID.part_set_header": - m := new(PartSetHeader) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockID")) - } - panic(fmt.Errorf("message tendermint.types.BlockID 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_BlockID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.BlockID", 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_BlockID) 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_BlockID) 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_BlockID) 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_BlockID) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BlockID) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PartSetHeader != nil { - l = options.Size(x.PartSetHeader) - 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().(*BlockID) - 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.PartSetHeader != nil { - encoded, err := options.Marshal(x.PartSetHeader) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BlockID) - 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: BlockID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", 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.PartSetHeader == nil { - x.PartSetHeader = &PartSetHeader{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PartSetHeader); 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_Header protoreflect.MessageDescriptor - fd_Header_version protoreflect.FieldDescriptor - fd_Header_chain_id protoreflect.FieldDescriptor - fd_Header_height protoreflect.FieldDescriptor - fd_Header_time protoreflect.FieldDescriptor - fd_Header_last_block_id protoreflect.FieldDescriptor - fd_Header_last_commit_hash protoreflect.FieldDescriptor - fd_Header_data_hash protoreflect.FieldDescriptor - fd_Header_validators_hash protoreflect.FieldDescriptor - fd_Header_next_validators_hash protoreflect.FieldDescriptor - fd_Header_consensus_hash protoreflect.FieldDescriptor - fd_Header_app_hash protoreflect.FieldDescriptor - fd_Header_last_results_hash protoreflect.FieldDescriptor - fd_Header_evidence_hash protoreflect.FieldDescriptor - fd_Header_proposer_address protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_Header = File_tendermint_types_types_proto.Messages().ByName("Header") - fd_Header_version = md_Header.Fields().ByName("version") - fd_Header_chain_id = md_Header.Fields().ByName("chain_id") - fd_Header_height = md_Header.Fields().ByName("height") - fd_Header_time = md_Header.Fields().ByName("time") - fd_Header_last_block_id = md_Header.Fields().ByName("last_block_id") - fd_Header_last_commit_hash = md_Header.Fields().ByName("last_commit_hash") - fd_Header_data_hash = md_Header.Fields().ByName("data_hash") - fd_Header_validators_hash = md_Header.Fields().ByName("validators_hash") - fd_Header_next_validators_hash = md_Header.Fields().ByName("next_validators_hash") - fd_Header_consensus_hash = md_Header.Fields().ByName("consensus_hash") - fd_Header_app_hash = md_Header.Fields().ByName("app_hash") - fd_Header_last_results_hash = md_Header.Fields().ByName("last_results_hash") - fd_Header_evidence_hash = md_Header.Fields().ByName("evidence_hash") - fd_Header_proposer_address = md_Header.Fields().ByName("proposer_address") -} - -var _ protoreflect.Message = (*fastReflection_Header)(nil) - -type fastReflection_Header Header - -func (x *Header) ProtoReflect() protoreflect.Message { - return (*fastReflection_Header)(x) -} - -func (x *Header) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Header_messageType fastReflection_Header_messageType -var _ protoreflect.MessageType = fastReflection_Header_messageType{} - -type fastReflection_Header_messageType struct{} - -func (x fastReflection_Header_messageType) Zero() protoreflect.Message { - return (*fastReflection_Header)(nil) -} -func (x fastReflection_Header_messageType) New() protoreflect.Message { - return new(fastReflection_Header) -} -func (x fastReflection_Header_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Header -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Header) Descriptor() protoreflect.MessageDescriptor { - return md_Header -} - -// 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_Header) Type() protoreflect.MessageType { - return _fastReflection_Header_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Header) New() protoreflect.Message { - return new(fastReflection_Header) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Header) Interface() protoreflect.ProtoMessage { - return (*Header)(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_Header) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != nil { - value := protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - if !f(fd_Header_version, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_Header_chain_id, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Header_height, value) { - return - } - } - if x.Time != nil { - value := protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - if !f(fd_Header_time, value) { - return - } - } - if x.LastBlockId != nil { - value := protoreflect.ValueOfMessage(x.LastBlockId.ProtoReflect()) - if !f(fd_Header_last_block_id, value) { - return - } - } - if len(x.LastCommitHash) != 0 { - value := protoreflect.ValueOfBytes(x.LastCommitHash) - if !f(fd_Header_last_commit_hash, value) { - return - } - } - if len(x.DataHash) != 0 { - value := protoreflect.ValueOfBytes(x.DataHash) - if !f(fd_Header_data_hash, value) { - return - } - } - if len(x.ValidatorsHash) != 0 { - value := protoreflect.ValueOfBytes(x.ValidatorsHash) - if !f(fd_Header_validators_hash, value) { - return - } - } - if len(x.NextValidatorsHash) != 0 { - value := protoreflect.ValueOfBytes(x.NextValidatorsHash) - if !f(fd_Header_next_validators_hash, value) { - return - } - } - if len(x.ConsensusHash) != 0 { - value := protoreflect.ValueOfBytes(x.ConsensusHash) - if !f(fd_Header_consensus_hash, value) { - return - } - } - if len(x.AppHash) != 0 { - value := protoreflect.ValueOfBytes(x.AppHash) - if !f(fd_Header_app_hash, value) { - return - } - } - if len(x.LastResultsHash) != 0 { - value := protoreflect.ValueOfBytes(x.LastResultsHash) - if !f(fd_Header_last_results_hash, value) { - return - } - } - if len(x.EvidenceHash) != 0 { - value := protoreflect.ValueOfBytes(x.EvidenceHash) - if !f(fd_Header_evidence_hash, value) { - return - } - } - if len(x.ProposerAddress) != 0 { - value := protoreflect.ValueOfBytes(x.ProposerAddress) - if !f(fd_Header_proposer_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Header) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Header.version": - return x.Version != nil - case "tendermint.types.Header.chain_id": - return x.ChainId != "" - case "tendermint.types.Header.height": - return x.Height != int64(0) - case "tendermint.types.Header.time": - return x.Time != nil - case "tendermint.types.Header.last_block_id": - return x.LastBlockId != nil - case "tendermint.types.Header.last_commit_hash": - return len(x.LastCommitHash) != 0 - case "tendermint.types.Header.data_hash": - return len(x.DataHash) != 0 - case "tendermint.types.Header.validators_hash": - return len(x.ValidatorsHash) != 0 - case "tendermint.types.Header.next_validators_hash": - return len(x.NextValidatorsHash) != 0 - case "tendermint.types.Header.consensus_hash": - return len(x.ConsensusHash) != 0 - case "tendermint.types.Header.app_hash": - return len(x.AppHash) != 0 - case "tendermint.types.Header.last_results_hash": - return len(x.LastResultsHash) != 0 - case "tendermint.types.Header.evidence_hash": - return len(x.EvidenceHash) != 0 - case "tendermint.types.Header.proposer_address": - return len(x.ProposerAddress) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Header")) - } - panic(fmt.Errorf("message tendermint.types.Header 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_Header) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Header.version": - x.Version = nil - case "tendermint.types.Header.chain_id": - x.ChainId = "" - case "tendermint.types.Header.height": - x.Height = int64(0) - case "tendermint.types.Header.time": - x.Time = nil - case "tendermint.types.Header.last_block_id": - x.LastBlockId = nil - case "tendermint.types.Header.last_commit_hash": - x.LastCommitHash = nil - case "tendermint.types.Header.data_hash": - x.DataHash = nil - case "tendermint.types.Header.validators_hash": - x.ValidatorsHash = nil - case "tendermint.types.Header.next_validators_hash": - x.NextValidatorsHash = nil - case "tendermint.types.Header.consensus_hash": - x.ConsensusHash = nil - case "tendermint.types.Header.app_hash": - x.AppHash = nil - case "tendermint.types.Header.last_results_hash": - x.LastResultsHash = nil - case "tendermint.types.Header.evidence_hash": - x.EvidenceHash = nil - case "tendermint.types.Header.proposer_address": - x.ProposerAddress = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Header")) - } - panic(fmt.Errorf("message tendermint.types.Header 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_Header) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Header.version": - value := x.Version - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Header.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "tendermint.types.Header.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.types.Header.time": - value := x.Time - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Header.last_block_id": - value := x.LastBlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Header.last_commit_hash": - value := x.LastCommitHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.data_hash": - value := x.DataHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.validators_hash": - value := x.ValidatorsHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.next_validators_hash": - value := x.NextValidatorsHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.consensus_hash": - value := x.ConsensusHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.app_hash": - value := x.AppHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.last_results_hash": - value := x.LastResultsHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.evidence_hash": - value := x.EvidenceHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Header.proposer_address": - value := x.ProposerAddress - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Header")) - } - panic(fmt.Errorf("message tendermint.types.Header 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_Header) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Header.version": - x.Version = value.Message().Interface().(*version.Consensus) - case "tendermint.types.Header.chain_id": - x.ChainId = value.Interface().(string) - case "tendermint.types.Header.height": - x.Height = value.Int() - case "tendermint.types.Header.time": - x.Time = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.types.Header.last_block_id": - x.LastBlockId = value.Message().Interface().(*BlockID) - case "tendermint.types.Header.last_commit_hash": - x.LastCommitHash = value.Bytes() - case "tendermint.types.Header.data_hash": - x.DataHash = value.Bytes() - case "tendermint.types.Header.validators_hash": - x.ValidatorsHash = value.Bytes() - case "tendermint.types.Header.next_validators_hash": - x.NextValidatorsHash = value.Bytes() - case "tendermint.types.Header.consensus_hash": - x.ConsensusHash = value.Bytes() - case "tendermint.types.Header.app_hash": - x.AppHash = value.Bytes() - case "tendermint.types.Header.last_results_hash": - x.LastResultsHash = value.Bytes() - case "tendermint.types.Header.evidence_hash": - x.EvidenceHash = value.Bytes() - case "tendermint.types.Header.proposer_address": - x.ProposerAddress = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Header")) - } - panic(fmt.Errorf("message tendermint.types.Header 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_Header) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Header.version": - if x.Version == nil { - x.Version = new(version.Consensus) - } - return protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - case "tendermint.types.Header.time": - if x.Time == nil { - x.Time = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Time.ProtoReflect()) - case "tendermint.types.Header.last_block_id": - if x.LastBlockId == nil { - x.LastBlockId = new(BlockID) - } - return protoreflect.ValueOfMessage(x.LastBlockId.ProtoReflect()) - case "tendermint.types.Header.chain_id": - panic(fmt.Errorf("field chain_id of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.height": - panic(fmt.Errorf("field height of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.last_commit_hash": - panic(fmt.Errorf("field last_commit_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.data_hash": - panic(fmt.Errorf("field data_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.validators_hash": - panic(fmt.Errorf("field validators_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.next_validators_hash": - panic(fmt.Errorf("field next_validators_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.consensus_hash": - panic(fmt.Errorf("field consensus_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.app_hash": - panic(fmt.Errorf("field app_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.last_results_hash": - panic(fmt.Errorf("field last_results_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.evidence_hash": - panic(fmt.Errorf("field evidence_hash of message tendermint.types.Header is not mutable")) - case "tendermint.types.Header.proposer_address": - panic(fmt.Errorf("field proposer_address of message tendermint.types.Header is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Header")) - } - panic(fmt.Errorf("message tendermint.types.Header 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_Header) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Header.version": - m := new(version.Consensus) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Header.chain_id": - return protoreflect.ValueOfString("") - case "tendermint.types.Header.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.Header.time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Header.last_block_id": - m := new(BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Header.last_commit_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.data_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.validators_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.next_validators_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.consensus_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.app_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.last_results_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.evidence_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Header.proposer_address": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Header")) - } - panic(fmt.Errorf("message tendermint.types.Header 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_Header) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Header", 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_Header) 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_Header) 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_Header) 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_Header) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Header) - 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.Version != nil { - l = options.Size(x.Version) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Time != nil { - l = options.Size(x.Time) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LastBlockId != nil { - l = options.Size(x.LastBlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LastCommitHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DataHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorsHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NextValidatorsHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ConsensusHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AppHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LastResultsHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.EvidenceHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ProposerAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Header) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ProposerAddress) > 0 { - i -= len(x.ProposerAddress) - copy(dAtA[i:], x.ProposerAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProposerAddress))) - i-- - dAtA[i] = 0x72 - } - if len(x.EvidenceHash) > 0 { - i -= len(x.EvidenceHash) - copy(dAtA[i:], x.EvidenceHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EvidenceHash))) - i-- - dAtA[i] = 0x6a - } - if len(x.LastResultsHash) > 0 { - i -= len(x.LastResultsHash) - copy(dAtA[i:], x.LastResultsHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LastResultsHash))) - i-- - dAtA[i] = 0x62 - } - if len(x.AppHash) > 0 { - i -= len(x.AppHash) - copy(dAtA[i:], x.AppHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppHash))) - i-- - dAtA[i] = 0x5a - } - if len(x.ConsensusHash) > 0 { - i -= len(x.ConsensusHash) - copy(dAtA[i:], x.ConsensusHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConsensusHash))) - i-- - dAtA[i] = 0x52 - } - if len(x.NextValidatorsHash) > 0 { - i -= len(x.NextValidatorsHash) - copy(dAtA[i:], x.NextValidatorsHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextValidatorsHash))) - i-- - dAtA[i] = 0x4a - } - if len(x.ValidatorsHash) > 0 { - i -= len(x.ValidatorsHash) - copy(dAtA[i:], x.ValidatorsHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorsHash))) - i-- - dAtA[i] = 0x42 - } - if len(x.DataHash) > 0 { - i -= len(x.DataHash) - copy(dAtA[i:], x.DataHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DataHash))) - i-- - dAtA[i] = 0x3a - } - if len(x.LastCommitHash) > 0 { - i -= len(x.LastCommitHash) - copy(dAtA[i:], x.LastCommitHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LastCommitHash))) - i-- - dAtA[i] = 0x32 - } - if x.LastBlockId != nil { - encoded, err := options.Marshal(x.LastBlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.Time != nil { - encoded, err := options.Marshal(x.Time) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if x.Version != nil { - encoded, err := options.Marshal(x.Version) - 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().(*Header) - 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: Header: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Header: 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 Version", 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.Version == nil { - x.Version = &version.Consensus{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Version); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Time", 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.Time == nil { - x.Time = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Time); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", 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.LastBlockId == nil { - x.LastBlockId = &BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastBlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LastCommitHash = append(x.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) - if x.LastCommitHash == nil { - x.LastCommitHash = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DataHash = append(x.DataHash[:0], dAtA[iNdEx:postIndex]...) - if x.DataHash == nil { - x.DataHash = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorsHash = append(x.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if x.ValidatorsHash == nil { - x.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NextValidatorsHash = append(x.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if x.NextValidatorsHash == nil { - x.NextValidatorsHash = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConsensusHash = append(x.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) - if x.ConsensusHash == nil { - x.ConsensusHash = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AppHash = append(x.AppHash[:0], dAtA[iNdEx:postIndex]...) - if x.AppHash == nil { - x.AppHash = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LastResultsHash = append(x.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) - if x.LastResultsHash == nil { - x.LastResultsHash = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EvidenceHash = append(x.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) - if x.EvidenceHash == nil { - x.EvidenceHash = []byte{} - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ProposerAddress = append(x.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if x.ProposerAddress == nil { - x.ProposerAddress = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Data_1_list)(nil) - -type _Data_1_list struct { - list *[][]byte -} - -func (x *_Data_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Data_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_Data_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Data_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Data_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Data at list field Txs as it is not of Message kind")) -} - -func (x *_Data_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Data_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_Data_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Data protoreflect.MessageDescriptor - fd_Data_txs protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_Data = File_tendermint_types_types_proto.Messages().ByName("Data") - fd_Data_txs = md_Data.Fields().ByName("txs") -} - -var _ protoreflect.Message = (*fastReflection_Data)(nil) - -type fastReflection_Data Data - -func (x *Data) ProtoReflect() protoreflect.Message { - return (*fastReflection_Data)(x) -} - -func (x *Data) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Data_messageType fastReflection_Data_messageType -var _ protoreflect.MessageType = fastReflection_Data_messageType{} - -type fastReflection_Data_messageType struct{} - -func (x fastReflection_Data_messageType) Zero() protoreflect.Message { - return (*fastReflection_Data)(nil) -} -func (x fastReflection_Data_messageType) New() protoreflect.Message { - return new(fastReflection_Data) -} -func (x fastReflection_Data_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Data -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Data) Descriptor() protoreflect.MessageDescriptor { - return md_Data -} - -// 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_Data) Type() protoreflect.MessageType { - return _fastReflection_Data_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Data) New() protoreflect.Message { - return new(fastReflection_Data) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Data) Interface() protoreflect.ProtoMessage { - return (*Data)(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_Data) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Txs) != 0 { - value := protoreflect.ValueOfList(&_Data_1_list{list: &x.Txs}) - if !f(fd_Data_txs, 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_Data) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Data.txs": - return len(x.Txs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Data")) - } - panic(fmt.Errorf("message tendermint.types.Data 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_Data) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Data.txs": - x.Txs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Data")) - } - panic(fmt.Errorf("message tendermint.types.Data 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_Data) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Data.txs": - if len(x.Txs) == 0 { - return protoreflect.ValueOfList(&_Data_1_list{}) - } - listValue := &_Data_1_list{list: &x.Txs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Data")) - } - panic(fmt.Errorf("message tendermint.types.Data 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_Data) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Data.txs": - lv := value.List() - clv := lv.(*_Data_1_list) - x.Txs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Data")) - } - panic(fmt.Errorf("message tendermint.types.Data 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_Data) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Data.txs": - if x.Txs == nil { - x.Txs = [][]byte{} - } - value := &_Data_1_list{list: &x.Txs} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Data")) - } - panic(fmt.Errorf("message tendermint.types.Data 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_Data) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Data.txs": - list := [][]byte{} - return protoreflect.ValueOfList(&_Data_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Data")) - } - panic(fmt.Errorf("message tendermint.types.Data 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_Data) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Data", 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_Data) 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_Data) 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_Data) 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_Data) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Data) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Txs) > 0 { - for _, b := range x.Txs { - l = len(b) - 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().(*Data) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Txs) > 0 { - for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Txs[iNdEx]) - copy(dAtA[i:], x.Txs[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Data) - 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: Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Data: 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 Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) - copy(x.Txs[len(x.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Vote protoreflect.MessageDescriptor - fd_Vote_type protoreflect.FieldDescriptor - fd_Vote_height protoreflect.FieldDescriptor - fd_Vote_round protoreflect.FieldDescriptor - fd_Vote_block_id protoreflect.FieldDescriptor - fd_Vote_timestamp protoreflect.FieldDescriptor - fd_Vote_validator_address protoreflect.FieldDescriptor - fd_Vote_validator_index protoreflect.FieldDescriptor - fd_Vote_signature protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_Vote = File_tendermint_types_types_proto.Messages().ByName("Vote") - fd_Vote_type = md_Vote.Fields().ByName("type") - fd_Vote_height = md_Vote.Fields().ByName("height") - fd_Vote_round = md_Vote.Fields().ByName("round") - fd_Vote_block_id = md_Vote.Fields().ByName("block_id") - fd_Vote_timestamp = md_Vote.Fields().ByName("timestamp") - fd_Vote_validator_address = md_Vote.Fields().ByName("validator_address") - fd_Vote_validator_index = md_Vote.Fields().ByName("validator_index") - fd_Vote_signature = md_Vote.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_Vote)(nil) - -type fastReflection_Vote Vote - -func (x *Vote) ProtoReflect() protoreflect.Message { - return (*fastReflection_Vote)(x) -} - -func (x *Vote) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_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_Vote_messageType fastReflection_Vote_messageType -var _ protoreflect.MessageType = fastReflection_Vote_messageType{} - -type fastReflection_Vote_messageType struct{} - -func (x fastReflection_Vote_messageType) Zero() protoreflect.Message { - return (*fastReflection_Vote)(nil) -} -func (x fastReflection_Vote_messageType) New() protoreflect.Message { - return new(fastReflection_Vote) -} -func (x fastReflection_Vote_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Vote) Descriptor() protoreflect.MessageDescriptor { - return md_Vote -} - -// 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_Vote) Type() protoreflect.MessageType { - return _fastReflection_Vote_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Vote) New() protoreflect.Message { - return new(fastReflection_Vote) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Vote) Interface() protoreflect.ProtoMessage { - return (*Vote)(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_Vote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) - if !f(fd_Vote_type, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Vote_height, value) { - return - } - } - if x.Round != int32(0) { - value := protoreflect.ValueOfInt32(x.Round) - if !f(fd_Vote_round, value) { - return - } - } - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_Vote_block_id, value) { - return - } - } - if x.Timestamp != nil { - value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - if !f(fd_Vote_timestamp, value) { - return - } - } - if len(x.ValidatorAddress) != 0 { - value := protoreflect.ValueOfBytes(x.ValidatorAddress) - if !f(fd_Vote_validator_address, value) { - return - } - } - if x.ValidatorIndex != int32(0) { - value := protoreflect.ValueOfInt32(x.ValidatorIndex) - if !f(fd_Vote_validator_index, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_Vote_signature, 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_Vote) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Vote.type": - return x.Type_ != 0 - case "tendermint.types.Vote.height": - return x.Height != int64(0) - case "tendermint.types.Vote.round": - return x.Round != int32(0) - case "tendermint.types.Vote.block_id": - return x.BlockId != nil - case "tendermint.types.Vote.timestamp": - return x.Timestamp != nil - case "tendermint.types.Vote.validator_address": - return len(x.ValidatorAddress) != 0 - case "tendermint.types.Vote.validator_index": - return x.ValidatorIndex != int32(0) - case "tendermint.types.Vote.signature": - return len(x.Signature) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Vote")) - } - panic(fmt.Errorf("message tendermint.types.Vote 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_Vote) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Vote.type": - x.Type_ = 0 - case "tendermint.types.Vote.height": - x.Height = int64(0) - case "tendermint.types.Vote.round": - x.Round = int32(0) - case "tendermint.types.Vote.block_id": - x.BlockId = nil - case "tendermint.types.Vote.timestamp": - x.Timestamp = nil - case "tendermint.types.Vote.validator_address": - x.ValidatorAddress = nil - case "tendermint.types.Vote.validator_index": - x.ValidatorIndex = int32(0) - case "tendermint.types.Vote.signature": - x.Signature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Vote")) - } - panic(fmt.Errorf("message tendermint.types.Vote 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_Vote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Vote.type": - value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tendermint.types.Vote.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.types.Vote.round": - value := x.Round - return protoreflect.ValueOfInt32(value) - case "tendermint.types.Vote.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Vote.timestamp": - value := x.Timestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Vote.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Vote.validator_index": - value := x.ValidatorIndex - return protoreflect.ValueOfInt32(value) - case "tendermint.types.Vote.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Vote")) - } - panic(fmt.Errorf("message tendermint.types.Vote 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_Vote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Vote.type": - x.Type_ = (SignedMsgType)(value.Enum()) - case "tendermint.types.Vote.height": - x.Height = value.Int() - case "tendermint.types.Vote.round": - x.Round = int32(value.Int()) - case "tendermint.types.Vote.block_id": - x.BlockId = value.Message().Interface().(*BlockID) - case "tendermint.types.Vote.timestamp": - x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.types.Vote.validator_address": - x.ValidatorAddress = value.Bytes() - case "tendermint.types.Vote.validator_index": - x.ValidatorIndex = int32(value.Int()) - case "tendermint.types.Vote.signature": - x.Signature = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Vote")) - } - panic(fmt.Errorf("message tendermint.types.Vote 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_Vote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Vote.block_id": - if x.BlockId == nil { - x.BlockId = new(BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "tendermint.types.Vote.timestamp": - if x.Timestamp == nil { - x.Timestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - case "tendermint.types.Vote.type": - panic(fmt.Errorf("field type of message tendermint.types.Vote is not mutable")) - case "tendermint.types.Vote.height": - panic(fmt.Errorf("field height of message tendermint.types.Vote is not mutable")) - case "tendermint.types.Vote.round": - panic(fmt.Errorf("field round of message tendermint.types.Vote is not mutable")) - case "tendermint.types.Vote.validator_address": - panic(fmt.Errorf("field validator_address of message tendermint.types.Vote is not mutable")) - case "tendermint.types.Vote.validator_index": - panic(fmt.Errorf("field validator_index of message tendermint.types.Vote is not mutable")) - case "tendermint.types.Vote.signature": - panic(fmt.Errorf("field signature of message tendermint.types.Vote is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Vote")) - } - panic(fmt.Errorf("message tendermint.types.Vote 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_Vote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Vote.type": - return protoreflect.ValueOfEnum(0) - case "tendermint.types.Vote.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.Vote.round": - return protoreflect.ValueOfInt32(int32(0)) - case "tendermint.types.Vote.block_id": - m := new(BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Vote.timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Vote.validator_address": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Vote.validator_index": - return protoreflect.ValueOfInt32(int32(0)) - case "tendermint.types.Vote.signature": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Vote")) - } - panic(fmt.Errorf("message tendermint.types.Vote 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_Vote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Vote", 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_Vote) 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_Vote) 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_Vote) 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_Vote) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Vote) - 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.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Round != 0 { - n += 1 + runtime.Sov(uint64(x.Round)) - } - if x.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != nil { - l = options.Size(x.Timestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ValidatorIndex != 0 { - n += 1 + runtime.Sov(uint64(x.ValidatorIndex)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Vote) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x42 - } - if x.ValidatorIndex != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorIndex)) - i-- - dAtA[i] = 0x38 - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x32 - } - if x.Timestamp != nil { - encoded, err := options.Marshal(x.Timestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Round != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Round)) - i-- - dAtA[i] = 0x18 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x10 - } - if x.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Vote) - 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - x.Type_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Type_ |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - x.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockId", 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.BlockId == nil { - x.BlockId = &BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { - x.Timestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = append(x.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if x.ValidatorAddress == nil { - x.ValidatorAddress = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) - } - x.ValidatorIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ValidatorIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Commit_4_list)(nil) - -type _Commit_4_list struct { - list *[]*CommitSig -} - -func (x *_Commit_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Commit_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Commit_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*CommitSig) - (*x.list)[i] = concreteValue -} - -func (x *_Commit_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*CommitSig) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Commit_4_list) AppendMutable() protoreflect.Value { - v := new(CommitSig) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Commit_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Commit_4_list) NewElement() protoreflect.Value { - v := new(CommitSig) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Commit_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Commit protoreflect.MessageDescriptor - fd_Commit_height protoreflect.FieldDescriptor - fd_Commit_round protoreflect.FieldDescriptor - fd_Commit_block_id protoreflect.FieldDescriptor - fd_Commit_signatures protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_Commit = File_tendermint_types_types_proto.Messages().ByName("Commit") - fd_Commit_height = md_Commit.Fields().ByName("height") - fd_Commit_round = md_Commit.Fields().ByName("round") - fd_Commit_block_id = md_Commit.Fields().ByName("block_id") - fd_Commit_signatures = md_Commit.Fields().ByName("signatures") -} - -var _ protoreflect.Message = (*fastReflection_Commit)(nil) - -type fastReflection_Commit Commit - -func (x *Commit) ProtoReflect() protoreflect.Message { - return (*fastReflection_Commit)(x) -} - -func (x *Commit) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_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_Commit_messageType fastReflection_Commit_messageType -var _ protoreflect.MessageType = fastReflection_Commit_messageType{} - -type fastReflection_Commit_messageType struct{} - -func (x fastReflection_Commit_messageType) Zero() protoreflect.Message { - return (*fastReflection_Commit)(nil) -} -func (x fastReflection_Commit_messageType) New() protoreflect.Message { - return new(fastReflection_Commit) -} -func (x fastReflection_Commit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Commit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Commit) Descriptor() protoreflect.MessageDescriptor { - return md_Commit -} - -// 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_Commit) Type() protoreflect.MessageType { - return _fastReflection_Commit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Commit) New() protoreflect.Message { - return new(fastReflection_Commit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Commit) Interface() protoreflect.ProtoMessage { - return (*Commit)(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_Commit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Commit_height, value) { - return - } - } - if x.Round != int32(0) { - value := protoreflect.ValueOfInt32(x.Round) - if !f(fd_Commit_round, value) { - return - } - } - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_Commit_block_id, value) { - return - } - } - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_Commit_4_list{list: &x.Signatures}) - if !f(fd_Commit_signatures, 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_Commit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Commit.height": - return x.Height != int64(0) - case "tendermint.types.Commit.round": - return x.Round != int32(0) - case "tendermint.types.Commit.block_id": - return x.BlockId != nil - case "tendermint.types.Commit.signatures": - return len(x.Signatures) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Commit")) - } - panic(fmt.Errorf("message tendermint.types.Commit 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_Commit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Commit.height": - x.Height = int64(0) - case "tendermint.types.Commit.round": - x.Round = int32(0) - case "tendermint.types.Commit.block_id": - x.BlockId = nil - case "tendermint.types.Commit.signatures": - x.Signatures = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Commit")) - } - panic(fmt.Errorf("message tendermint.types.Commit 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_Commit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Commit.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.types.Commit.round": - value := x.Round - return protoreflect.ValueOfInt32(value) - case "tendermint.types.Commit.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Commit.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_Commit_4_list{}) - } - listValue := &_Commit_4_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Commit")) - } - panic(fmt.Errorf("message tendermint.types.Commit 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_Commit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Commit.height": - x.Height = value.Int() - case "tendermint.types.Commit.round": - x.Round = int32(value.Int()) - case "tendermint.types.Commit.block_id": - x.BlockId = value.Message().Interface().(*BlockID) - case "tendermint.types.Commit.signatures": - lv := value.List() - clv := lv.(*_Commit_4_list) - x.Signatures = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Commit")) - } - panic(fmt.Errorf("message tendermint.types.Commit 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_Commit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Commit.block_id": - if x.BlockId == nil { - x.BlockId = new(BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "tendermint.types.Commit.signatures": - if x.Signatures == nil { - x.Signatures = []*CommitSig{} - } - value := &_Commit_4_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - case "tendermint.types.Commit.height": - panic(fmt.Errorf("field height of message tendermint.types.Commit is not mutable")) - case "tendermint.types.Commit.round": - panic(fmt.Errorf("field round of message tendermint.types.Commit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Commit")) - } - panic(fmt.Errorf("message tendermint.types.Commit 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_Commit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Commit.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.Commit.round": - return protoreflect.ValueOfInt32(int32(0)) - case "tendermint.types.Commit.block_id": - m := new(BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Commit.signatures": - list := []*CommitSig{} - return protoreflect.ValueOfList(&_Commit_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Commit")) - } - panic(fmt.Errorf("message tendermint.types.Commit 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_Commit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Commit", 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_Commit) 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_Commit) 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_Commit) 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_Commit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Commit) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Round != 0 { - n += 1 + runtime.Sov(uint64(x.Round)) - } - if x.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Signatures) > 0 { - for _, e := range x.Signatures { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Commit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Signatures[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Round != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Round)) - i-- - dAtA[i] = 0x10 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Commit) - 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: Commit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - x.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockId", 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.BlockId == nil { - x.BlockId = &BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, &CommitSig{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Signatures[len(x.Signatures)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_CommitSig protoreflect.MessageDescriptor - fd_CommitSig_block_id_flag protoreflect.FieldDescriptor - fd_CommitSig_validator_address protoreflect.FieldDescriptor - fd_CommitSig_timestamp protoreflect.FieldDescriptor - fd_CommitSig_signature protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_CommitSig = File_tendermint_types_types_proto.Messages().ByName("CommitSig") - fd_CommitSig_block_id_flag = md_CommitSig.Fields().ByName("block_id_flag") - fd_CommitSig_validator_address = md_CommitSig.Fields().ByName("validator_address") - fd_CommitSig_timestamp = md_CommitSig.Fields().ByName("timestamp") - fd_CommitSig_signature = md_CommitSig.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_CommitSig)(nil) - -type fastReflection_CommitSig CommitSig - -func (x *CommitSig) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommitSig)(x) -} - -func (x *CommitSig) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommitSig_messageType fastReflection_CommitSig_messageType -var _ protoreflect.MessageType = fastReflection_CommitSig_messageType{} - -type fastReflection_CommitSig_messageType struct{} - -func (x fastReflection_CommitSig_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommitSig)(nil) -} -func (x fastReflection_CommitSig_messageType) New() protoreflect.Message { - return new(fastReflection_CommitSig) -} -func (x fastReflection_CommitSig_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommitSig -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommitSig) Descriptor() protoreflect.MessageDescriptor { - return md_CommitSig -} - -// 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_CommitSig) Type() protoreflect.MessageType { - return _fastReflection_CommitSig_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommitSig) New() protoreflect.Message { - return new(fastReflection_CommitSig) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommitSig) Interface() protoreflect.ProtoMessage { - return (*CommitSig)(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_CommitSig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockIdFlag != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.BlockIdFlag)) - if !f(fd_CommitSig_block_id_flag, value) { - return - } - } - if len(x.ValidatorAddress) != 0 { - value := protoreflect.ValueOfBytes(x.ValidatorAddress) - if !f(fd_CommitSig_validator_address, value) { - return - } - } - if x.Timestamp != nil { - value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - if !f(fd_CommitSig_timestamp, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_CommitSig_signature, 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_CommitSig) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.CommitSig.block_id_flag": - return x.BlockIdFlag != 0 - case "tendermint.types.CommitSig.validator_address": - return len(x.ValidatorAddress) != 0 - case "tendermint.types.CommitSig.timestamp": - return x.Timestamp != nil - case "tendermint.types.CommitSig.signature": - return len(x.Signature) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.CommitSig")) - } - panic(fmt.Errorf("message tendermint.types.CommitSig 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_CommitSig) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.CommitSig.block_id_flag": - x.BlockIdFlag = 0 - case "tendermint.types.CommitSig.validator_address": - x.ValidatorAddress = nil - case "tendermint.types.CommitSig.timestamp": - x.Timestamp = nil - case "tendermint.types.CommitSig.signature": - x.Signature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.CommitSig")) - } - panic(fmt.Errorf("message tendermint.types.CommitSig 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_CommitSig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.CommitSig.block_id_flag": - value := x.BlockIdFlag - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tendermint.types.CommitSig.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfBytes(value) - case "tendermint.types.CommitSig.timestamp": - value := x.Timestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.CommitSig.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.CommitSig")) - } - panic(fmt.Errorf("message tendermint.types.CommitSig 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_CommitSig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.CommitSig.block_id_flag": - x.BlockIdFlag = (BlockIDFlag)(value.Enum()) - case "tendermint.types.CommitSig.validator_address": - x.ValidatorAddress = value.Bytes() - case "tendermint.types.CommitSig.timestamp": - x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.types.CommitSig.signature": - x.Signature = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.CommitSig")) - } - panic(fmt.Errorf("message tendermint.types.CommitSig 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_CommitSig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.CommitSig.timestamp": - if x.Timestamp == nil { - x.Timestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - case "tendermint.types.CommitSig.block_id_flag": - panic(fmt.Errorf("field block_id_flag of message tendermint.types.CommitSig is not mutable")) - case "tendermint.types.CommitSig.validator_address": - panic(fmt.Errorf("field validator_address of message tendermint.types.CommitSig is not mutable")) - case "tendermint.types.CommitSig.signature": - panic(fmt.Errorf("field signature of message tendermint.types.CommitSig is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.CommitSig")) - } - panic(fmt.Errorf("message tendermint.types.CommitSig 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_CommitSig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.CommitSig.block_id_flag": - return protoreflect.ValueOfEnum(0) - case "tendermint.types.CommitSig.validator_address": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.CommitSig.timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.CommitSig.signature": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.CommitSig")) - } - panic(fmt.Errorf("message tendermint.types.CommitSig 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_CommitSig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.CommitSig", 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_CommitSig) 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_CommitSig) 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_CommitSig) 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_CommitSig) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommitSig) - 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.BlockIdFlag != 0 { - n += 1 + runtime.Sov(uint64(x.BlockIdFlag)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != nil { - l = options.Size(x.Timestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommitSig) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x22 - } - if x.Timestamp != nil { - encoded, err := options.Marshal(x.Timestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if x.BlockIdFlag != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockIdFlag)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CommitSig) - 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: CommitSig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) - } - x.BlockIdFlag = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = append(x.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if x.ValidatorAddress == nil { - x.ValidatorAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { - x.Timestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Proposal protoreflect.MessageDescriptor - fd_Proposal_type protoreflect.FieldDescriptor - fd_Proposal_height protoreflect.FieldDescriptor - fd_Proposal_round protoreflect.FieldDescriptor - fd_Proposal_pol_round protoreflect.FieldDescriptor - fd_Proposal_block_id protoreflect.FieldDescriptor - fd_Proposal_timestamp protoreflect.FieldDescriptor - fd_Proposal_signature protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_Proposal = File_tendermint_types_types_proto.Messages().ByName("Proposal") - fd_Proposal_type = md_Proposal.Fields().ByName("type") - fd_Proposal_height = md_Proposal.Fields().ByName("height") - fd_Proposal_round = md_Proposal.Fields().ByName("round") - fd_Proposal_pol_round = md_Proposal.Fields().ByName("pol_round") - fd_Proposal_block_id = md_Proposal.Fields().ByName("block_id") - fd_Proposal_timestamp = md_Proposal.Fields().ByName("timestamp") - fd_Proposal_signature = md_Proposal.Fields().ByName("signature") -} - -var _ protoreflect.Message = (*fastReflection_Proposal)(nil) - -type fastReflection_Proposal Proposal - -func (x *Proposal) ProtoReflect() protoreflect.Message { - return (*fastReflection_Proposal)(x) -} - -func (x *Proposal) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Proposal_messageType fastReflection_Proposal_messageType -var _ protoreflect.MessageType = fastReflection_Proposal_messageType{} - -type fastReflection_Proposal_messageType struct{} - -func (x fastReflection_Proposal_messageType) Zero() protoreflect.Message { - return (*fastReflection_Proposal)(nil) -} -func (x fastReflection_Proposal_messageType) New() protoreflect.Message { - return new(fastReflection_Proposal) -} -func (x fastReflection_Proposal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Proposal) Descriptor() protoreflect.MessageDescriptor { - return md_Proposal -} - -// 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_Proposal) Type() protoreflect.MessageType { - return _fastReflection_Proposal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Proposal) New() protoreflect.Message { - return new(fastReflection_Proposal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Proposal) Interface() protoreflect.ProtoMessage { - return (*Proposal)(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_Proposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) - if !f(fd_Proposal_type, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_Proposal_height, value) { - return - } - } - if x.Round != int32(0) { - value := protoreflect.ValueOfInt32(x.Round) - if !f(fd_Proposal_round, value) { - return - } - } - if x.PolRound != int32(0) { - value := protoreflect.ValueOfInt32(x.PolRound) - if !f(fd_Proposal_pol_round, value) { - return - } - } - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_Proposal_block_id, value) { - return - } - } - if x.Timestamp != nil { - value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - if !f(fd_Proposal_timestamp, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_Proposal_signature, 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_Proposal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Proposal.type": - return x.Type_ != 0 - case "tendermint.types.Proposal.height": - return x.Height != int64(0) - case "tendermint.types.Proposal.round": - return x.Round != int32(0) - case "tendermint.types.Proposal.pol_round": - return x.PolRound != int32(0) - case "tendermint.types.Proposal.block_id": - return x.BlockId != nil - case "tendermint.types.Proposal.timestamp": - return x.Timestamp != nil - case "tendermint.types.Proposal.signature": - return len(x.Signature) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Proposal")) - } - panic(fmt.Errorf("message tendermint.types.Proposal 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_Proposal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Proposal.type": - x.Type_ = 0 - case "tendermint.types.Proposal.height": - x.Height = int64(0) - case "tendermint.types.Proposal.round": - x.Round = int32(0) - case "tendermint.types.Proposal.pol_round": - x.PolRound = int32(0) - case "tendermint.types.Proposal.block_id": - x.BlockId = nil - case "tendermint.types.Proposal.timestamp": - x.Timestamp = nil - case "tendermint.types.Proposal.signature": - x.Signature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Proposal")) - } - panic(fmt.Errorf("message tendermint.types.Proposal 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_Proposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Proposal.type": - value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tendermint.types.Proposal.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "tendermint.types.Proposal.round": - value := x.Round - return protoreflect.ValueOfInt32(value) - case "tendermint.types.Proposal.pol_round": - value := x.PolRound - return protoreflect.ValueOfInt32(value) - case "tendermint.types.Proposal.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Proposal.timestamp": - value := x.Timestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Proposal.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Proposal")) - } - panic(fmt.Errorf("message tendermint.types.Proposal 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_Proposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Proposal.type": - x.Type_ = (SignedMsgType)(value.Enum()) - case "tendermint.types.Proposal.height": - x.Height = value.Int() - case "tendermint.types.Proposal.round": - x.Round = int32(value.Int()) - case "tendermint.types.Proposal.pol_round": - x.PolRound = int32(value.Int()) - case "tendermint.types.Proposal.block_id": - x.BlockId = value.Message().Interface().(*BlockID) - case "tendermint.types.Proposal.timestamp": - x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "tendermint.types.Proposal.signature": - x.Signature = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Proposal")) - } - panic(fmt.Errorf("message tendermint.types.Proposal 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_Proposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Proposal.block_id": - if x.BlockId == nil { - x.BlockId = new(BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "tendermint.types.Proposal.timestamp": - if x.Timestamp == nil { - x.Timestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - case "tendermint.types.Proposal.type": - panic(fmt.Errorf("field type of message tendermint.types.Proposal is not mutable")) - case "tendermint.types.Proposal.height": - panic(fmt.Errorf("field height of message tendermint.types.Proposal is not mutable")) - case "tendermint.types.Proposal.round": - panic(fmt.Errorf("field round of message tendermint.types.Proposal is not mutable")) - case "tendermint.types.Proposal.pol_round": - panic(fmt.Errorf("field pol_round of message tendermint.types.Proposal is not mutable")) - case "tendermint.types.Proposal.signature": - panic(fmt.Errorf("field signature of message tendermint.types.Proposal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Proposal")) - } - panic(fmt.Errorf("message tendermint.types.Proposal 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_Proposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Proposal.type": - return protoreflect.ValueOfEnum(0) - case "tendermint.types.Proposal.height": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.Proposal.round": - return protoreflect.ValueOfInt32(int32(0)) - case "tendermint.types.Proposal.pol_round": - return protoreflect.ValueOfInt32(int32(0)) - case "tendermint.types.Proposal.block_id": - m := new(BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Proposal.timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Proposal.signature": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Proposal")) - } - panic(fmt.Errorf("message tendermint.types.Proposal 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_Proposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Proposal", 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_Proposal) 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_Proposal) 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_Proposal) 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_Proposal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Proposal) - 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.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Round != 0 { - n += 1 + runtime.Sov(uint64(x.Round)) - } - if x.PolRound != 0 { - n += 1 + runtime.Sov(uint64(x.PolRound)) - } - if x.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != nil { - l = options.Size(x.Timestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x3a - } - if x.Timestamp != nil { - encoded, err := options.Marshal(x.Timestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.PolRound != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PolRound)) - i-- - dAtA[i] = 0x20 - } - if x.Round != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Round)) - i-- - dAtA[i] = 0x18 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x10 - } - if x.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Proposal) - 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - x.Type_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Type_ |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - x.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) - } - x.PolRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PolRound |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockId", 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.BlockId == nil { - x.BlockId = &BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { - x.Timestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SignedHeader protoreflect.MessageDescriptor - fd_SignedHeader_header protoreflect.FieldDescriptor - fd_SignedHeader_commit protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_SignedHeader = File_tendermint_types_types_proto.Messages().ByName("SignedHeader") - fd_SignedHeader_header = md_SignedHeader.Fields().ByName("header") - fd_SignedHeader_commit = md_SignedHeader.Fields().ByName("commit") -} - -var _ protoreflect.Message = (*fastReflection_SignedHeader)(nil) - -type fastReflection_SignedHeader SignedHeader - -func (x *SignedHeader) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignedHeader)(x) -} - -func (x *SignedHeader) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SignedHeader_messageType fastReflection_SignedHeader_messageType -var _ protoreflect.MessageType = fastReflection_SignedHeader_messageType{} - -type fastReflection_SignedHeader_messageType struct{} - -func (x fastReflection_SignedHeader_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignedHeader)(nil) -} -func (x fastReflection_SignedHeader_messageType) New() protoreflect.Message { - return new(fastReflection_SignedHeader) -} -func (x fastReflection_SignedHeader_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignedHeader -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignedHeader) Descriptor() protoreflect.MessageDescriptor { - return md_SignedHeader -} - -// 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_SignedHeader) Type() protoreflect.MessageType { - return _fastReflection_SignedHeader_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignedHeader) New() protoreflect.Message { - return new(fastReflection_SignedHeader) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignedHeader) Interface() protoreflect.ProtoMessage { - return (*SignedHeader)(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_SignedHeader) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Header != nil { - value := protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - if !f(fd_SignedHeader_header, value) { - return - } - } - if x.Commit != nil { - value := protoreflect.ValueOfMessage(x.Commit.ProtoReflect()) - if !f(fd_SignedHeader_commit, 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_SignedHeader) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.SignedHeader.header": - return x.Header != nil - case "tendermint.types.SignedHeader.commit": - return x.Commit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SignedHeader")) - } - panic(fmt.Errorf("message tendermint.types.SignedHeader 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_SignedHeader) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.SignedHeader.header": - x.Header = nil - case "tendermint.types.SignedHeader.commit": - x.Commit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SignedHeader")) - } - panic(fmt.Errorf("message tendermint.types.SignedHeader 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_SignedHeader) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.SignedHeader.header": - value := x.Header - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.SignedHeader.commit": - value := x.Commit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SignedHeader")) - } - panic(fmt.Errorf("message tendermint.types.SignedHeader 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_SignedHeader) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.SignedHeader.header": - x.Header = value.Message().Interface().(*Header) - case "tendermint.types.SignedHeader.commit": - x.Commit = value.Message().Interface().(*Commit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SignedHeader")) - } - panic(fmt.Errorf("message tendermint.types.SignedHeader 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_SignedHeader) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.SignedHeader.header": - if x.Header == nil { - x.Header = new(Header) - } - return protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - case "tendermint.types.SignedHeader.commit": - if x.Commit == nil { - x.Commit = new(Commit) - } - return protoreflect.ValueOfMessage(x.Commit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SignedHeader")) - } - panic(fmt.Errorf("message tendermint.types.SignedHeader 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_SignedHeader) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.SignedHeader.header": - m := new(Header) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.SignedHeader.commit": - m := new(Commit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SignedHeader")) - } - panic(fmt.Errorf("message tendermint.types.SignedHeader 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_SignedHeader) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.SignedHeader", 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_SignedHeader) 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_SignedHeader) 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_SignedHeader) 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_SignedHeader) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignedHeader) - 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.Header != nil { - l = options.Size(x.Header) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Commit != nil { - l = options.Size(x.Commit) - 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().(*SignedHeader) - 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.Commit != nil { - encoded, err := options.Marshal(x.Commit) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Header != nil { - encoded, err := options.Marshal(x.Header) - 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().(*SignedHeader) - 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: SignedHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignedHeader: 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 Header", 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.Header == nil { - x.Header = &Header{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Header); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commit", 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.Commit == nil { - x.Commit = &Commit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commit); 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_LightBlock protoreflect.MessageDescriptor - fd_LightBlock_signed_header protoreflect.FieldDescriptor - fd_LightBlock_validator_set protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_LightBlock = File_tendermint_types_types_proto.Messages().ByName("LightBlock") - fd_LightBlock_signed_header = md_LightBlock.Fields().ByName("signed_header") - fd_LightBlock_validator_set = md_LightBlock.Fields().ByName("validator_set") -} - -var _ protoreflect.Message = (*fastReflection_LightBlock)(nil) - -type fastReflection_LightBlock LightBlock - -func (x *LightBlock) ProtoReflect() protoreflect.Message { - return (*fastReflection_LightBlock)(x) -} - -func (x *LightBlock) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_LightBlock_messageType fastReflection_LightBlock_messageType -var _ protoreflect.MessageType = fastReflection_LightBlock_messageType{} - -type fastReflection_LightBlock_messageType struct{} - -func (x fastReflection_LightBlock_messageType) Zero() protoreflect.Message { - return (*fastReflection_LightBlock)(nil) -} -func (x fastReflection_LightBlock_messageType) New() protoreflect.Message { - return new(fastReflection_LightBlock) -} -func (x fastReflection_LightBlock_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LightBlock -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LightBlock) Descriptor() protoreflect.MessageDescriptor { - return md_LightBlock -} - -// 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_LightBlock) Type() protoreflect.MessageType { - return _fastReflection_LightBlock_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LightBlock) New() protoreflect.Message { - return new(fastReflection_LightBlock) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LightBlock) Interface() protoreflect.ProtoMessage { - return (*LightBlock)(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_LightBlock) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SignedHeader != nil { - value := protoreflect.ValueOfMessage(x.SignedHeader.ProtoReflect()) - if !f(fd_LightBlock_signed_header, value) { - return - } - } - if x.ValidatorSet != nil { - value := protoreflect.ValueOfMessage(x.ValidatorSet.ProtoReflect()) - if !f(fd_LightBlock_validator_set, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_LightBlock) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.LightBlock.signed_header": - return x.SignedHeader != nil - case "tendermint.types.LightBlock.validator_set": - return x.ValidatorSet != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightBlock")) - } - panic(fmt.Errorf("message tendermint.types.LightBlock 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_LightBlock) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.LightBlock.signed_header": - x.SignedHeader = nil - case "tendermint.types.LightBlock.validator_set": - x.ValidatorSet = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightBlock")) - } - panic(fmt.Errorf("message tendermint.types.LightBlock 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_LightBlock) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.LightBlock.signed_header": - value := x.SignedHeader - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.LightBlock.validator_set": - value := x.ValidatorSet - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightBlock")) - } - panic(fmt.Errorf("message tendermint.types.LightBlock 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_LightBlock) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.LightBlock.signed_header": - x.SignedHeader = value.Message().Interface().(*SignedHeader) - case "tendermint.types.LightBlock.validator_set": - x.ValidatorSet = value.Message().Interface().(*ValidatorSet) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightBlock")) - } - panic(fmt.Errorf("message tendermint.types.LightBlock 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_LightBlock) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.LightBlock.signed_header": - if x.SignedHeader == nil { - x.SignedHeader = new(SignedHeader) - } - return protoreflect.ValueOfMessage(x.SignedHeader.ProtoReflect()) - case "tendermint.types.LightBlock.validator_set": - if x.ValidatorSet == nil { - x.ValidatorSet = new(ValidatorSet) - } - return protoreflect.ValueOfMessage(x.ValidatorSet.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightBlock")) - } - panic(fmt.Errorf("message tendermint.types.LightBlock 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_LightBlock) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.LightBlock.signed_header": - m := new(SignedHeader) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.LightBlock.validator_set": - m := new(ValidatorSet) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.LightBlock")) - } - panic(fmt.Errorf("message tendermint.types.LightBlock 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_LightBlock) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.LightBlock", 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_LightBlock) 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_LightBlock) 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_LightBlock) 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_LightBlock) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LightBlock) - 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.SignedHeader != nil { - l = options.Size(x.SignedHeader) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ValidatorSet != nil { - l = options.Size(x.ValidatorSet) - 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().(*LightBlock) - 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.ValidatorSet != nil { - encoded, err := options.Marshal(x.ValidatorSet) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.SignedHeader != nil { - encoded, err := options.Marshal(x.SignedHeader) - 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().(*LightBlock) - 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: LightBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LightBlock: 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 SignedHeader", 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.SignedHeader == nil { - x.SignedHeader = &SignedHeader{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignedHeader); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", 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.ValidatorSet == nil { - x.ValidatorSet = &ValidatorSet{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSet); 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_BlockMeta protoreflect.MessageDescriptor - fd_BlockMeta_block_id protoreflect.FieldDescriptor - fd_BlockMeta_block_size protoreflect.FieldDescriptor - fd_BlockMeta_header protoreflect.FieldDescriptor - fd_BlockMeta_num_txs protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_BlockMeta = File_tendermint_types_types_proto.Messages().ByName("BlockMeta") - fd_BlockMeta_block_id = md_BlockMeta.Fields().ByName("block_id") - fd_BlockMeta_block_size = md_BlockMeta.Fields().ByName("block_size") - fd_BlockMeta_header = md_BlockMeta.Fields().ByName("header") - fd_BlockMeta_num_txs = md_BlockMeta.Fields().ByName("num_txs") -} - -var _ protoreflect.Message = (*fastReflection_BlockMeta)(nil) - -type fastReflection_BlockMeta BlockMeta - -func (x *BlockMeta) ProtoReflect() protoreflect.Message { - return (*fastReflection_BlockMeta)(x) -} - -func (x *BlockMeta) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BlockMeta_messageType fastReflection_BlockMeta_messageType -var _ protoreflect.MessageType = fastReflection_BlockMeta_messageType{} - -type fastReflection_BlockMeta_messageType struct{} - -func (x fastReflection_BlockMeta_messageType) Zero() protoreflect.Message { - return (*fastReflection_BlockMeta)(nil) -} -func (x fastReflection_BlockMeta_messageType) New() protoreflect.Message { - return new(fastReflection_BlockMeta) -} -func (x fastReflection_BlockMeta_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BlockMeta -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BlockMeta) Descriptor() protoreflect.MessageDescriptor { - return md_BlockMeta -} - -// 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_BlockMeta) Type() protoreflect.MessageType { - return _fastReflection_BlockMeta_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BlockMeta) New() protoreflect.Message { - return new(fastReflection_BlockMeta) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BlockMeta) Interface() protoreflect.ProtoMessage { - return (*BlockMeta)(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_BlockMeta) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_BlockMeta_block_id, value) { - return - } - } - if x.BlockSize != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockSize) - if !f(fd_BlockMeta_block_size, value) { - return - } - } - if x.Header != nil { - value := protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - if !f(fd_BlockMeta_header, value) { - return - } - } - if x.NumTxs != int64(0) { - value := protoreflect.ValueOfInt64(x.NumTxs) - if !f(fd_BlockMeta_num_txs, 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_BlockMeta) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.BlockMeta.block_id": - return x.BlockId != nil - case "tendermint.types.BlockMeta.block_size": - return x.BlockSize != int64(0) - case "tendermint.types.BlockMeta.header": - return x.Header != nil - case "tendermint.types.BlockMeta.num_txs": - return x.NumTxs != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockMeta")) - } - panic(fmt.Errorf("message tendermint.types.BlockMeta 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_BlockMeta) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.BlockMeta.block_id": - x.BlockId = nil - case "tendermint.types.BlockMeta.block_size": - x.BlockSize = int64(0) - case "tendermint.types.BlockMeta.header": - x.Header = nil - case "tendermint.types.BlockMeta.num_txs": - x.NumTxs = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockMeta")) - } - panic(fmt.Errorf("message tendermint.types.BlockMeta 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_BlockMeta) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.BlockMeta.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.BlockMeta.block_size": - value := x.BlockSize - return protoreflect.ValueOfInt64(value) - case "tendermint.types.BlockMeta.header": - value := x.Header - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.BlockMeta.num_txs": - value := x.NumTxs - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockMeta")) - } - panic(fmt.Errorf("message tendermint.types.BlockMeta 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_BlockMeta) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.BlockMeta.block_id": - x.BlockId = value.Message().Interface().(*BlockID) - case "tendermint.types.BlockMeta.block_size": - x.BlockSize = value.Int() - case "tendermint.types.BlockMeta.header": - x.Header = value.Message().Interface().(*Header) - case "tendermint.types.BlockMeta.num_txs": - x.NumTxs = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockMeta")) - } - panic(fmt.Errorf("message tendermint.types.BlockMeta 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_BlockMeta) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.BlockMeta.block_id": - if x.BlockId == nil { - x.BlockId = new(BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "tendermint.types.BlockMeta.header": - if x.Header == nil { - x.Header = new(Header) - } - return protoreflect.ValueOfMessage(x.Header.ProtoReflect()) - case "tendermint.types.BlockMeta.block_size": - panic(fmt.Errorf("field block_size of message tendermint.types.BlockMeta is not mutable")) - case "tendermint.types.BlockMeta.num_txs": - panic(fmt.Errorf("field num_txs of message tendermint.types.BlockMeta is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockMeta")) - } - panic(fmt.Errorf("message tendermint.types.BlockMeta 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_BlockMeta) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.BlockMeta.block_id": - m := new(BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.BlockMeta.block_size": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.BlockMeta.header": - m := new(Header) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.BlockMeta.num_txs": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.BlockMeta")) - } - panic(fmt.Errorf("message tendermint.types.BlockMeta 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_BlockMeta) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.BlockMeta", 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_BlockMeta) 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_BlockMeta) 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_BlockMeta) 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_BlockMeta) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BlockMeta) - 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.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BlockSize != 0 { - n += 1 + runtime.Sov(uint64(x.BlockSize)) - } - if x.Header != nil { - l = options.Size(x.Header) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.NumTxs != 0 { - n += 1 + runtime.Sov(uint64(x.NumTxs)) - } - 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().(*BlockMeta) - 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.NumTxs != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NumTxs)) - i-- - dAtA[i] = 0x20 - } - if x.Header != nil { - encoded, err := options.Marshal(x.Header) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.BlockSize != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockSize)) - i-- - dAtA[i] = 0x10 - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - 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().(*BlockMeta) - 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: BlockMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BlockMeta: 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 BlockId", 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.BlockId == nil { - x.BlockId = &BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType) - } - x.BlockSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Header", 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.Header == nil { - x.Header = &Header{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Header); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) - } - x.NumTxs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.NumTxs |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TxProof protoreflect.MessageDescriptor - fd_TxProof_root_hash protoreflect.FieldDescriptor - fd_TxProof_data protoreflect.FieldDescriptor - fd_TxProof_proof protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_types_proto_init() - md_TxProof = File_tendermint_types_types_proto.Messages().ByName("TxProof") - fd_TxProof_root_hash = md_TxProof.Fields().ByName("root_hash") - fd_TxProof_data = md_TxProof.Fields().ByName("data") - fd_TxProof_proof = md_TxProof.Fields().ByName("proof") -} - -var _ protoreflect.Message = (*fastReflection_TxProof)(nil) - -type fastReflection_TxProof TxProof - -func (x *TxProof) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxProof)(x) -} - -func (x *TxProof) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_types_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TxProof_messageType fastReflection_TxProof_messageType -var _ protoreflect.MessageType = fastReflection_TxProof_messageType{} - -type fastReflection_TxProof_messageType struct{} - -func (x fastReflection_TxProof_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxProof)(nil) -} -func (x fastReflection_TxProof_messageType) New() protoreflect.Message { - return new(fastReflection_TxProof) -} -func (x fastReflection_TxProof_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxProof -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxProof) Descriptor() protoreflect.MessageDescriptor { - return md_TxProof -} - -// 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_TxProof) Type() protoreflect.MessageType { - return _fastReflection_TxProof_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxProof) New() protoreflect.Message { - return new(fastReflection_TxProof) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxProof) Interface() protoreflect.ProtoMessage { - return (*TxProof)(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_TxProof) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.RootHash) != 0 { - value := protoreflect.ValueOfBytes(x.RootHash) - if !f(fd_TxProof_root_hash, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_TxProof_data, value) { - return - } - } - if x.Proof != nil { - value := protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) - if !f(fd_TxProof_proof, 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_TxProof) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.TxProof.root_hash": - return len(x.RootHash) != 0 - case "tendermint.types.TxProof.data": - return len(x.Data) != 0 - case "tendermint.types.TxProof.proof": - return x.Proof != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.TxProof")) - } - panic(fmt.Errorf("message tendermint.types.TxProof 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_TxProof) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.TxProof.root_hash": - x.RootHash = nil - case "tendermint.types.TxProof.data": - x.Data = nil - case "tendermint.types.TxProof.proof": - x.Proof = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.TxProof")) - } - panic(fmt.Errorf("message tendermint.types.TxProof 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_TxProof) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.TxProof.root_hash": - value := x.RootHash - return protoreflect.ValueOfBytes(value) - case "tendermint.types.TxProof.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "tendermint.types.TxProof.proof": - value := x.Proof - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.TxProof")) - } - panic(fmt.Errorf("message tendermint.types.TxProof 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_TxProof) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.TxProof.root_hash": - x.RootHash = value.Bytes() - case "tendermint.types.TxProof.data": - x.Data = value.Bytes() - case "tendermint.types.TxProof.proof": - x.Proof = value.Message().Interface().(*crypto.Proof) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.TxProof")) - } - panic(fmt.Errorf("message tendermint.types.TxProof 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_TxProof) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.TxProof.proof": - if x.Proof == nil { - x.Proof = new(crypto.Proof) - } - return protoreflect.ValueOfMessage(x.Proof.ProtoReflect()) - case "tendermint.types.TxProof.root_hash": - panic(fmt.Errorf("field root_hash of message tendermint.types.TxProof is not mutable")) - case "tendermint.types.TxProof.data": - panic(fmt.Errorf("field data of message tendermint.types.TxProof is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.TxProof")) - } - panic(fmt.Errorf("message tendermint.types.TxProof 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_TxProof) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.TxProof.root_hash": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.TxProof.data": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.TxProof.proof": - m := new(crypto.Proof) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.TxProof")) - } - panic(fmt.Errorf("message tendermint.types.TxProof 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_TxProof) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.TxProof", 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_TxProof) 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_TxProof) 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_TxProof) 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_TxProof) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxProof) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.RootHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Proof != nil { - l = options.Size(x.Proof) - 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().(*TxProof) - 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.Proof != nil { - encoded, err := options.Marshal(x.Proof) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x12 - } - if len(x.RootHash) > 0 { - i -= len(x.RootHash) - copy(dAtA[i:], x.RootHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RootHash))) - 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().(*TxProof) - 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: TxProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxProof: 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 RootHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RootHash = append(x.RootHash[:0], dAtA[iNdEx:postIndex]...) - if x.RootHash == nil { - x.RootHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof == nil { - x.Proof = &crypto.Proof{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proof); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/types/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BlockIdFlag indicates which BlcokID the signature is for -type BlockIDFlag int32 - -const ( - BlockIDFlag_BLOCK_ID_FLAG_UNKNOWN BlockIDFlag = 0 - BlockIDFlag_BLOCK_ID_FLAG_ABSENT BlockIDFlag = 1 - BlockIDFlag_BLOCK_ID_FLAG_COMMIT BlockIDFlag = 2 - BlockIDFlag_BLOCK_ID_FLAG_NIL BlockIDFlag = 3 -) - -// Enum value maps for BlockIDFlag. -var ( - BlockIDFlag_name = map[int32]string{ - 0: "BLOCK_ID_FLAG_UNKNOWN", - 1: "BLOCK_ID_FLAG_ABSENT", - 2: "BLOCK_ID_FLAG_COMMIT", - 3: "BLOCK_ID_FLAG_NIL", - } - BlockIDFlag_value = map[string]int32{ - "BLOCK_ID_FLAG_UNKNOWN": 0, - "BLOCK_ID_FLAG_ABSENT": 1, - "BLOCK_ID_FLAG_COMMIT": 2, - "BLOCK_ID_FLAG_NIL": 3, - } -) - -func (x BlockIDFlag) Enum() *BlockIDFlag { - p := new(BlockIDFlag) - *p = x - return p -} - -func (x BlockIDFlag) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BlockIDFlag) Descriptor() protoreflect.EnumDescriptor { - return file_tendermint_types_types_proto_enumTypes[0].Descriptor() -} - -func (BlockIDFlag) Type() protoreflect.EnumType { - return &file_tendermint_types_types_proto_enumTypes[0] -} - -func (x BlockIDFlag) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BlockIDFlag.Descriptor instead. -func (BlockIDFlag) EnumDescriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{0} -} - -// SignedMsgType is a type of signed message in the consensus. -type SignedMsgType int32 - -const ( - SignedMsgType_SIGNED_MSG_TYPE_UNKNOWN SignedMsgType = 0 - // Votes - SignedMsgType_SIGNED_MSG_TYPE_PREVOTE SignedMsgType = 1 - SignedMsgType_SIGNED_MSG_TYPE_PRECOMMIT SignedMsgType = 2 - // Proposals - SignedMsgType_SIGNED_MSG_TYPE_PROPOSAL SignedMsgType = 32 -) - -// Enum value maps for SignedMsgType. -var ( - SignedMsgType_name = map[int32]string{ - 0: "SIGNED_MSG_TYPE_UNKNOWN", - 1: "SIGNED_MSG_TYPE_PREVOTE", - 2: "SIGNED_MSG_TYPE_PRECOMMIT", - 32: "SIGNED_MSG_TYPE_PROPOSAL", - } - SignedMsgType_value = map[string]int32{ - "SIGNED_MSG_TYPE_UNKNOWN": 0, - "SIGNED_MSG_TYPE_PREVOTE": 1, - "SIGNED_MSG_TYPE_PRECOMMIT": 2, - "SIGNED_MSG_TYPE_PROPOSAL": 32, - } -) - -func (x SignedMsgType) Enum() *SignedMsgType { - p := new(SignedMsgType) - *p = x - return p -} - -func (x SignedMsgType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SignedMsgType) Descriptor() protoreflect.EnumDescriptor { - return file_tendermint_types_types_proto_enumTypes[1].Descriptor() -} - -func (SignedMsgType) Type() protoreflect.EnumType { - return &file_tendermint_types_types_proto_enumTypes[1] -} - -func (x SignedMsgType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SignedMsgType.Descriptor instead. -func (SignedMsgType) EnumDescriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{1} -} - -// PartsetHeader -type PartSetHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (x *PartSetHeader) Reset() { - *x = PartSetHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PartSetHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PartSetHeader) ProtoMessage() {} - -// Deprecated: Use PartSetHeader.ProtoReflect.Descriptor instead. -func (*PartSetHeader) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{0} -} - -func (x *PartSetHeader) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *PartSetHeader) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -type Part struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` - Proof *crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *Part) Reset() { - *x = Part{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Part) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Part) ProtoMessage() {} - -// Deprecated: Use Part.ProtoReflect.Descriptor instead. -func (*Part) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{1} -} - -func (x *Part) GetIndex() uint32 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *Part) GetBytes() []byte { - if x != nil { - return x.Bytes - } - return nil -} - -func (x *Part) GetProof() *crypto.Proof { - if x != nil { - return x.Proof - } - return nil -} - -// BlockID -type BlockID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - PartSetHeader *PartSetHeader `protobuf:"bytes,2,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header,omitempty"` -} - -func (x *BlockID) Reset() { - *x = BlockID{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockID) ProtoMessage() {} - -// Deprecated: Use BlockID.ProtoReflect.Descriptor instead. -func (*BlockID) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{2} -} - -func (x *BlockID) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *BlockID) GetPartSetHeader() *PartSetHeader { - if x != nil { - return x.PartSetHeader - } - return nil -} - -// Header defines the structure of a Tendermint block header. -type Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // basic block info - Version *version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"` - // prev block info - LastBlockId *BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id,omitempty"` - // hashes of block data - LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` // commit from validators from the last block - DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` // transactions - // hashes from the app output from the prev block - ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` // validators for the current block - NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` // validators for the next block - ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` // consensus params for current block - AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` // state after txs from the previous block - LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` // root hash of all results from the txs from the previous block - // consensus info - EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` // evidence included in the block - ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` // original proposer of the block -} - -func (x *Header) Reset() { - *x = Header{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Header) ProtoMessage() {} - -// Deprecated: Use Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{3} -} - -func (x *Header) GetVersion() *version.Consensus { - if x != nil { - return x.Version - } - return nil -} - -func (x *Header) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *Header) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Header) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *Header) GetLastBlockId() *BlockID { - if x != nil { - return x.LastBlockId - } - return nil -} - -func (x *Header) GetLastCommitHash() []byte { - if x != nil { - return x.LastCommitHash - } - return nil -} - -func (x *Header) GetDataHash() []byte { - if x != nil { - return x.DataHash - } - return nil -} - -func (x *Header) GetValidatorsHash() []byte { - if x != nil { - return x.ValidatorsHash - } - return nil -} - -func (x *Header) GetNextValidatorsHash() []byte { - if x != nil { - return x.NextValidatorsHash - } - return nil -} - -func (x *Header) GetConsensusHash() []byte { - if x != nil { - return x.ConsensusHash - } - return nil -} - -func (x *Header) GetAppHash() []byte { - if x != nil { - return x.AppHash - } - return nil -} - -func (x *Header) GetLastResultsHash() []byte { - if x != nil { - return x.LastResultsHash - } - return nil -} - -func (x *Header) GetEvidenceHash() []byte { - if x != nil { - return x.EvidenceHash - } - return nil -} - -func (x *Header) GetProposerAddress() []byte { - if x != nil { - return x.ProposerAddress - } - return nil -} - -// Data contains the set of transactions included in the block -type Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` -} - -func (x *Data) Reset() { - *x = Data{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Data) ProtoMessage() {} - -// Deprecated: Use Data.ProtoReflect.Descriptor instead. -func (*Data) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{4} -} - -func (x *Data) GetTxs() [][]byte { - if x != nil { - return x.Txs - } - return nil -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -type Vote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - BlockId *BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // zero if vote is nil. - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - ValidatorIndex int32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` - Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *Vote) Reset() { - *x = Vote{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vote) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vote) ProtoMessage() {} - -// Deprecated: Use Vote.ProtoReflect.Descriptor instead. -func (*Vote) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{5} -} - -func (x *Vote) GetType_() SignedMsgType { - if x != nil { - return x.Type_ - } - return SignedMsgType_SIGNED_MSG_TYPE_UNKNOWN -} - -func (x *Vote) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Vote) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *Vote) GetBlockId() *BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *Vote) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -func (x *Vote) GetValidatorAddress() []byte { - if x != nil { - return x.ValidatorAddress - } - return nil -} - -func (x *Vote) GetValidatorIndex() int32 { - if x != nil { - return x.ValidatorIndex - } - return 0 -} - -func (x *Vote) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -// Commit contains the evidence that a block was committed by a set of validators. -type Commit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - BlockId *BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Signatures []*CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (x *Commit) Reset() { - *x = Commit{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Commit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Commit) ProtoMessage() {} - -// Deprecated: Use Commit.ProtoReflect.Descriptor instead. -func (*Commit) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{6} -} - -func (x *Commit) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Commit) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *Commit) GetBlockId() *BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *Commit) GetSignatures() []*CommitSig { - if x != nil { - return x.Signatures - } - return nil -} - -// CommitSig is a part of the Vote included in a Commit. -type CommitSig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.types.BlockIDFlag" json:"block_id_flag,omitempty"` - ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *CommitSig) Reset() { - *x = CommitSig{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommitSig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommitSig) ProtoMessage() {} - -// Deprecated: Use CommitSig.ProtoReflect.Descriptor instead. -func (*CommitSig) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{7} -} - -func (x *CommitSig) GetBlockIdFlag() BlockIDFlag { - if x != nil { - return x.BlockIdFlag - } - return BlockIDFlag_BLOCK_ID_FLAG_UNKNOWN -} - -func (x *CommitSig) GetValidatorAddress() []byte { - if x != nil { - return x.ValidatorAddress - } - return nil -} - -func (x *CommitSig) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -func (x *CommitSig) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` - BlockId *BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *Proposal) Reset() { - *x = Proposal{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proposal) ProtoMessage() {} - -// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. -func (*Proposal) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{8} -} - -func (x *Proposal) GetType_() SignedMsgType { - if x != nil { - return x.Type_ - } - return SignedMsgType_SIGNED_MSG_TYPE_UNKNOWN -} - -func (x *Proposal) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Proposal) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *Proposal) GetPolRound() int32 { - if x != nil { - return x.PolRound - } - return 0 -} - -func (x *Proposal) GetBlockId() *BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *Proposal) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -func (x *Proposal) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type SignedHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` -} - -func (x *SignedHeader) Reset() { - *x = SignedHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignedHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignedHeader) ProtoMessage() {} - -// Deprecated: Use SignedHeader.ProtoReflect.Descriptor instead. -func (*SignedHeader) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{9} -} - -func (x *SignedHeader) GetHeader() *Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *SignedHeader) GetCommit() *Commit { - if x != nil { - return x.Commit - } - return nil -} - -type LightBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SignedHeader *SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3" json:"signed_header,omitempty"` - ValidatorSet *ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` -} - -func (x *LightBlock) Reset() { - *x = LightBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LightBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LightBlock) ProtoMessage() {} - -// Deprecated: Use LightBlock.ProtoReflect.Descriptor instead. -func (*LightBlock) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{10} -} - -func (x *LightBlock) GetSignedHeader() *SignedHeader { - if x != nil { - return x.SignedHeader - } - return nil -} - -func (x *LightBlock) GetValidatorSet() *ValidatorSet { - if x != nil { - return x.ValidatorSet - } - return nil -} - -type BlockMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockId *BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` - Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` - NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` -} - -func (x *BlockMeta) Reset() { - *x = BlockMeta{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockMeta) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockMeta) ProtoMessage() {} - -// Deprecated: Use BlockMeta.ProtoReflect.Descriptor instead. -func (*BlockMeta) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{11} -} - -func (x *BlockMeta) GetBlockId() *BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *BlockMeta) GetBlockSize() int64 { - if x != nil { - return x.BlockSize - } - return 0 -} - -func (x *BlockMeta) GetHeader() *Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *BlockMeta) GetNumTxs() int64 { - if x != nil { - return x.NumTxs - } - return 0 -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -type TxProof struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RootHash []byte `protobuf:"bytes,1,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Proof *crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *TxProof) Reset() { - *x = TxProof{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_types_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxProof) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxProof) ProtoMessage() {} - -// Deprecated: Use TxProof.ProtoReflect.Descriptor instead. -func (*TxProof) Descriptor() ([]byte, []int) { - return file_tendermint_types_types_proto_rawDescGZIP(), []int{12} -} - -func (x *TxProof) GetRootHash() []byte { - if x != nil { - return x.RootHash - } - return nil -} - -func (x *TxProof) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *TxProof) GetProof() *crypto.Proof { - if x != nil { - return x.Proof - } - return nil -} - -var File_tendermint_types_types_proto protoreflect.FileDescriptor - -var file_tendermint_types_types_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x74, - 0x53, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, - 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x22, 0x68, 0x0a, 0x04, 0x50, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x6c, 0x0a, - 0x07, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x4d, 0x0a, 0x0f, - 0x70, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x53, 0x65, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x70, 0x61, - 0x72, 0x74, 0x53, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xe6, 0x04, 0x0a, 0x06, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe2, 0xde, 0x1f, 0x07, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x44, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, - 0x43, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x44, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, - 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, - 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, - 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x76, 0x69, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x18, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, - 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xe8, - 0x02, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4d, - 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x45, 0x0a, 0x08, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x42, 0x0f, 0xc8, 0xde, 0x1f, 0x00, 0xe2, 0xde, 0x1f, - 0x07, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x64, 0x12, 0x42, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x06, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x12, 0x45, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x42, - 0x0f, 0xc8, 0xde, 0x1f, 0x00, 0xe2, 0xde, 0x1f, 0x07, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, - 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xdd, 0x01, 0x0a, - 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0d, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, - 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb3, 0x02, 0x0a, - 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x70, 0x6f, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x6f, 0x6c, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x45, 0x0a, 0x08, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x42, 0x0f, 0xc8, 0xde, 0x1f, 0x00, 0xe2, 0xde, 0x1f, 0x07, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, - 0x12, 0x42, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0x72, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x67, 0x68, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x43, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0d, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x22, - 0xc2, 0x01, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x45, 0x0a, - 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x42, 0x0f, 0xc8, 0xde, 0x1f, 0x00, - 0xe2, 0xde, 0x1f, 0x07, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x75, - 0x6d, 0x54, 0x78, 0x73, 0x22, 0x6a, 0x0a, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, - 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x2e, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x2a, 0xd7, 0x01, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, - 0x12, 0x31, 0x0a, 0x15, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x49, 0x44, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x1a, 0x16, 0x8a, 0x9d, 0x20, - 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x12, 0x2f, 0x0a, 0x14, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x49, 0x44, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x1a, 0x15, 0x8a, - 0x9d, 0x20, 0x11, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, 0x41, 0x62, - 0x73, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x49, 0x44, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x1a, 0x15, - 0x8a, 0x9d, 0x20, 0x11, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x11, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x49, - 0x44, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4e, 0x49, 0x4c, 0x10, 0x03, 0x1a, 0x12, 0x8a, 0x9d, - 0x20, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x46, 0x6c, 0x61, 0x67, 0x4e, 0x69, 0x6c, - 0x1a, 0x08, 0x88, 0xa3, 0x1e, 0x00, 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0xd7, 0x01, 0x0a, 0x0d, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x17, - 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, 0x0b, 0x55, - 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x17, 0x53, 0x49, - 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, - 0x45, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x01, 0x1a, 0x0f, 0x8a, 0x9d, 0x20, 0x0b, 0x50, 0x72, 0x65, - 0x76, 0x6f, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x19, 0x53, 0x49, 0x47, 0x4e, - 0x45, 0x44, 0x5f, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x43, - 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x1a, 0x11, 0x8a, 0x9d, 0x20, 0x0d, 0x50, 0x72, 0x65, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x18, 0x53, 0x49, - 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x10, 0x20, 0x1a, 0x10, 0x8a, 0x9d, 0x20, 0x0c, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x08, 0x88, 0xa3, 0x1e, 0x00, - 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xb6, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0a, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0xa2, 0x02, - 0x03, 0x54, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0xca, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0xe2, 0x02, 0x1c, 0x54, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_types_types_proto_rawDescOnce sync.Once - file_tendermint_types_types_proto_rawDescData = file_tendermint_types_types_proto_rawDesc -) - -func file_tendermint_types_types_proto_rawDescGZIP() []byte { - file_tendermint_types_types_proto_rawDescOnce.Do(func() { - file_tendermint_types_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_types_types_proto_rawDescData) - }) - return file_tendermint_types_types_proto_rawDescData -} - -var file_tendermint_types_types_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_tendermint_types_types_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_tendermint_types_types_proto_goTypes = []interface{}{ - (BlockIDFlag)(0), // 0: tendermint.types.BlockIDFlag - (SignedMsgType)(0), // 1: tendermint.types.SignedMsgType - (*PartSetHeader)(nil), // 2: tendermint.types.PartSetHeader - (*Part)(nil), // 3: tendermint.types.Part - (*BlockID)(nil), // 4: tendermint.types.BlockID - (*Header)(nil), // 5: tendermint.types.Header - (*Data)(nil), // 6: tendermint.types.Data - (*Vote)(nil), // 7: tendermint.types.Vote - (*Commit)(nil), // 8: tendermint.types.Commit - (*CommitSig)(nil), // 9: tendermint.types.CommitSig - (*Proposal)(nil), // 10: tendermint.types.Proposal - (*SignedHeader)(nil), // 11: tendermint.types.SignedHeader - (*LightBlock)(nil), // 12: tendermint.types.LightBlock - (*BlockMeta)(nil), // 13: tendermint.types.BlockMeta - (*TxProof)(nil), // 14: tendermint.types.TxProof - (*crypto.Proof)(nil), // 15: tendermint.crypto.Proof - (*version.Consensus)(nil), // 16: tendermint.version.Consensus - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp - (*ValidatorSet)(nil), // 18: tendermint.types.ValidatorSet -} -var file_tendermint_types_types_proto_depIdxs = []int32{ - 15, // 0: tendermint.types.Part.proof:type_name -> tendermint.crypto.Proof - 2, // 1: tendermint.types.BlockID.part_set_header:type_name -> tendermint.types.PartSetHeader - 16, // 2: tendermint.types.Header.version:type_name -> tendermint.version.Consensus - 17, // 3: tendermint.types.Header.time:type_name -> google.protobuf.Timestamp - 4, // 4: tendermint.types.Header.last_block_id:type_name -> tendermint.types.BlockID - 1, // 5: tendermint.types.Vote.type:type_name -> tendermint.types.SignedMsgType - 4, // 6: tendermint.types.Vote.block_id:type_name -> tendermint.types.BlockID - 17, // 7: tendermint.types.Vote.timestamp:type_name -> google.protobuf.Timestamp - 4, // 8: tendermint.types.Commit.block_id:type_name -> tendermint.types.BlockID - 9, // 9: tendermint.types.Commit.signatures:type_name -> tendermint.types.CommitSig - 0, // 10: tendermint.types.CommitSig.block_id_flag:type_name -> tendermint.types.BlockIDFlag - 17, // 11: tendermint.types.CommitSig.timestamp:type_name -> google.protobuf.Timestamp - 1, // 12: tendermint.types.Proposal.type:type_name -> tendermint.types.SignedMsgType - 4, // 13: tendermint.types.Proposal.block_id:type_name -> tendermint.types.BlockID - 17, // 14: tendermint.types.Proposal.timestamp:type_name -> google.protobuf.Timestamp - 5, // 15: tendermint.types.SignedHeader.header:type_name -> tendermint.types.Header - 8, // 16: tendermint.types.SignedHeader.commit:type_name -> tendermint.types.Commit - 11, // 17: tendermint.types.LightBlock.signed_header:type_name -> tendermint.types.SignedHeader - 18, // 18: tendermint.types.LightBlock.validator_set:type_name -> tendermint.types.ValidatorSet - 4, // 19: tendermint.types.BlockMeta.block_id:type_name -> tendermint.types.BlockID - 5, // 20: tendermint.types.BlockMeta.header:type_name -> tendermint.types.Header - 15, // 21: tendermint.types.TxProof.proof:type_name -> tendermint.crypto.Proof - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_tendermint_types_types_proto_init() } -func file_tendermint_types_types_proto_init() { - if File_tendermint_types_types_proto != nil { - return - } - file_tendermint_types_validator_proto_init() - if !protoimpl.UnsafeEnabled { - file_tendermint_types_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartSetHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Commit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitSig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignedHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LightBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockMeta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxProof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_types_types_proto_rawDesc, - NumEnums: 2, - NumMessages: 13, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_types_types_proto_goTypes, - DependencyIndexes: file_tendermint_types_types_proto_depIdxs, - EnumInfos: file_tendermint_types_types_proto_enumTypes, - MessageInfos: file_tendermint_types_types_proto_msgTypes, - }.Build() - File_tendermint_types_types_proto = out.File - file_tendermint_types_types_proto_rawDesc = nil - file_tendermint_types_types_proto_goTypes = nil - file_tendermint_types_types_proto_depIdxs = nil -} diff --git a/api/tendermint/types/validator.pulsar.go b/api/tendermint/types/validator.pulsar.go deleted file mode 100644 index c7386b03783f..000000000000 --- a/api/tendermint/types/validator.pulsar.go +++ /dev/null @@ -1,2030 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package types - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - crypto "github.com/cosmos/cosmos-sdk/api/tendermint/crypto" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_ValidatorSet_1_list)(nil) - -type _ValidatorSet_1_list struct { - list *[]*Validator -} - -func (x *_ValidatorSet_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorSet_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ValidatorSet_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorSet_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ValidatorSet_1_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorSet_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorSet_1_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ValidatorSet_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ValidatorSet protoreflect.MessageDescriptor - fd_ValidatorSet_validators protoreflect.FieldDescriptor - fd_ValidatorSet_proposer protoreflect.FieldDescriptor - fd_ValidatorSet_total_voting_power protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_validator_proto_init() - md_ValidatorSet = File_tendermint_types_validator_proto.Messages().ByName("ValidatorSet") - fd_ValidatorSet_validators = md_ValidatorSet.Fields().ByName("validators") - fd_ValidatorSet_proposer = md_ValidatorSet.Fields().ByName("proposer") - fd_ValidatorSet_total_voting_power = md_ValidatorSet.Fields().ByName("total_voting_power") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorSet)(nil) - -type fastReflection_ValidatorSet ValidatorSet - -func (x *ValidatorSet) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSet)(x) -} - -func (x *ValidatorSet) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_validator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorSet_messageType fastReflection_ValidatorSet_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSet_messageType{} - -type fastReflection_ValidatorSet_messageType struct{} - -func (x fastReflection_ValidatorSet_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSet)(nil) -} -func (x fastReflection_ValidatorSet_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSet) -} -func (x fastReflection_ValidatorSet_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSet -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorSet) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSet -} - -// 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_ValidatorSet) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSet_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSet) New() protoreflect.Message { - return new(fastReflection_ValidatorSet) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSet) Interface() protoreflect.ProtoMessage { - return (*ValidatorSet)(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_ValidatorSet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_ValidatorSet_1_list{list: &x.Validators}) - if !f(fd_ValidatorSet_validators, value) { - return - } - } - if x.Proposer != nil { - value := protoreflect.ValueOfMessage(x.Proposer.ProtoReflect()) - if !f(fd_ValidatorSet_proposer, value) { - return - } - } - if x.TotalVotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.TotalVotingPower) - if !f(fd_ValidatorSet_total_voting_power, 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_ValidatorSet) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.ValidatorSet.validators": - return len(x.Validators) != 0 - case "tendermint.types.ValidatorSet.proposer": - return x.Proposer != nil - case "tendermint.types.ValidatorSet.total_voting_power": - return x.TotalVotingPower != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorSet")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorSet 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_ValidatorSet) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.ValidatorSet.validators": - x.Validators = nil - case "tendermint.types.ValidatorSet.proposer": - x.Proposer = nil - case "tendermint.types.ValidatorSet.total_voting_power": - x.TotalVotingPower = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorSet")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorSet 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_ValidatorSet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.ValidatorSet.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_ValidatorSet_1_list{}) - } - listValue := &_ValidatorSet_1_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "tendermint.types.ValidatorSet.proposer": - value := x.Proposer - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.ValidatorSet.total_voting_power": - value := x.TotalVotingPower - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorSet")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorSet 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_ValidatorSet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.ValidatorSet.validators": - lv := value.List() - clv := lv.(*_ValidatorSet_1_list) - x.Validators = *clv.list - case "tendermint.types.ValidatorSet.proposer": - x.Proposer = value.Message().Interface().(*Validator) - case "tendermint.types.ValidatorSet.total_voting_power": - x.TotalVotingPower = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorSet")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorSet 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_ValidatorSet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.ValidatorSet.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_ValidatorSet_1_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "tendermint.types.ValidatorSet.proposer": - if x.Proposer == nil { - x.Proposer = new(Validator) - } - return protoreflect.ValueOfMessage(x.Proposer.ProtoReflect()) - case "tendermint.types.ValidatorSet.total_voting_power": - panic(fmt.Errorf("field total_voting_power of message tendermint.types.ValidatorSet is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorSet")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorSet 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_ValidatorSet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.ValidatorSet.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_ValidatorSet_1_list{list: &list}) - case "tendermint.types.ValidatorSet.proposer": - m := new(Validator) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.ValidatorSet.total_voting_power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.ValidatorSet")) - } - panic(fmt.Errorf("message tendermint.types.ValidatorSet 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_ValidatorSet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.ValidatorSet", 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_ValidatorSet) 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_ValidatorSet) 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_ValidatorSet) 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_ValidatorSet) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorSet) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Proposer != nil { - l = options.Size(x.Proposer) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TotalVotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.TotalVotingPower)) - } - 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().(*ValidatorSet) - 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.TotalVotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalVotingPower)) - i-- - dAtA[i] = 0x18 - } - if x.Proposer != nil { - encoded, err := options.Marshal(x.Proposer) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSet) - 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: ValidatorSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposer", 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.Proposer == nil { - x.Proposer = &Validator{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Proposer); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) - } - x.TotalVotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TotalVotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Validator protoreflect.MessageDescriptor - fd_Validator_address protoreflect.FieldDescriptor - fd_Validator_pub_key protoreflect.FieldDescriptor - fd_Validator_voting_power protoreflect.FieldDescriptor - fd_Validator_proposer_priority protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_validator_proto_init() - md_Validator = File_tendermint_types_validator_proto.Messages().ByName("Validator") - fd_Validator_address = md_Validator.Fields().ByName("address") - fd_Validator_pub_key = md_Validator.Fields().ByName("pub_key") - fd_Validator_voting_power = md_Validator.Fields().ByName("voting_power") - fd_Validator_proposer_priority = md_Validator.Fields().ByName("proposer_priority") -} - -var _ protoreflect.Message = (*fastReflection_Validator)(nil) - -type fastReflection_Validator Validator - -func (x *Validator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Validator)(x) -} - -func (x *Validator) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_validator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Validator_messageType fastReflection_Validator_messageType -var _ protoreflect.MessageType = fastReflection_Validator_messageType{} - -type fastReflection_Validator_messageType struct{} - -func (x fastReflection_Validator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Validator)(nil) -} -func (x fastReflection_Validator_messageType) New() protoreflect.Message { - return new(fastReflection_Validator) -} -func (x fastReflection_Validator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Validator) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// 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_Validator) Type() protoreflect.MessageType { - return _fastReflection_Validator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Validator) New() protoreflect.Message { - return new(fastReflection_Validator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Validator) Interface() protoreflect.ProtoMessage { - return (*Validator)(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_Validator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Address) != 0 { - value := protoreflect.ValueOfBytes(x.Address) - if !f(fd_Validator_address, value) { - return - } - } - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_Validator_pub_key, value) { - return - } - } - if x.VotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.VotingPower) - if !f(fd_Validator_voting_power, value) { - return - } - } - if x.ProposerPriority != int64(0) { - value := protoreflect.ValueOfInt64(x.ProposerPriority) - if !f(fd_Validator_proposer_priority, 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_Validator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.Validator.address": - return len(x.Address) != 0 - case "tendermint.types.Validator.pub_key": - return x.PubKey != nil - case "tendermint.types.Validator.voting_power": - return x.VotingPower != int64(0) - case "tendermint.types.Validator.proposer_priority": - return x.ProposerPriority != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Validator")) - } - panic(fmt.Errorf("message tendermint.types.Validator 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_Validator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.Validator.address": - x.Address = nil - case "tendermint.types.Validator.pub_key": - x.PubKey = nil - case "tendermint.types.Validator.voting_power": - x.VotingPower = int64(0) - case "tendermint.types.Validator.proposer_priority": - x.ProposerPriority = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Validator")) - } - panic(fmt.Errorf("message tendermint.types.Validator 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_Validator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.Validator.address": - value := x.Address - return protoreflect.ValueOfBytes(value) - case "tendermint.types.Validator.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.Validator.voting_power": - value := x.VotingPower - return protoreflect.ValueOfInt64(value) - case "tendermint.types.Validator.proposer_priority": - value := x.ProposerPriority - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Validator")) - } - panic(fmt.Errorf("message tendermint.types.Validator 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_Validator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.Validator.address": - x.Address = value.Bytes() - case "tendermint.types.Validator.pub_key": - x.PubKey = value.Message().Interface().(*crypto.PublicKey) - case "tendermint.types.Validator.voting_power": - x.VotingPower = value.Int() - case "tendermint.types.Validator.proposer_priority": - x.ProposerPriority = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Validator")) - } - panic(fmt.Errorf("message tendermint.types.Validator 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_Validator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Validator.pub_key": - if x.PubKey == nil { - x.PubKey = new(crypto.PublicKey) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "tendermint.types.Validator.address": - panic(fmt.Errorf("field address of message tendermint.types.Validator is not mutable")) - case "tendermint.types.Validator.voting_power": - panic(fmt.Errorf("field voting_power of message tendermint.types.Validator is not mutable")) - case "tendermint.types.Validator.proposer_priority": - panic(fmt.Errorf("field proposer_priority of message tendermint.types.Validator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Validator")) - } - panic(fmt.Errorf("message tendermint.types.Validator 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_Validator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.Validator.address": - return protoreflect.ValueOfBytes(nil) - case "tendermint.types.Validator.pub_key": - m := new(crypto.PublicKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.Validator.voting_power": - return protoreflect.ValueOfInt64(int64(0)) - case "tendermint.types.Validator.proposer_priority": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.Validator")) - } - panic(fmt.Errorf("message tendermint.types.Validator 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_Validator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.Validator", 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_Validator) 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_Validator) 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_Validator) 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_Validator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.VotingPower)) - } - if x.ProposerPriority != 0 { - n += 1 + runtime.Sov(uint64(x.ProposerPriority)) - } - 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().(*Validator) - 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.ProposerPriority != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposerPriority)) - i-- - dAtA[i] = 0x20 - } - if x.VotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.VotingPower)) - i-- - dAtA[i] = 0x18 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Validator) - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) - if x.Address == nil { - x.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PubKey", 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.PubKey == nil { - x.PubKey = &crypto.PublicKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - x.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerPriority", wireType) - } - x.ProposerPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposerPriority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_SimpleValidator protoreflect.MessageDescriptor - fd_SimpleValidator_pub_key protoreflect.FieldDescriptor - fd_SimpleValidator_voting_power protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_types_validator_proto_init() - md_SimpleValidator = File_tendermint_types_validator_proto.Messages().ByName("SimpleValidator") - fd_SimpleValidator_pub_key = md_SimpleValidator.Fields().ByName("pub_key") - fd_SimpleValidator_voting_power = md_SimpleValidator.Fields().ByName("voting_power") -} - -var _ protoreflect.Message = (*fastReflection_SimpleValidator)(nil) - -type fastReflection_SimpleValidator SimpleValidator - -func (x *SimpleValidator) ProtoReflect() protoreflect.Message { - return (*fastReflection_SimpleValidator)(x) -} - -func (x *SimpleValidator) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_types_validator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SimpleValidator_messageType fastReflection_SimpleValidator_messageType -var _ protoreflect.MessageType = fastReflection_SimpleValidator_messageType{} - -type fastReflection_SimpleValidator_messageType struct{} - -func (x fastReflection_SimpleValidator_messageType) Zero() protoreflect.Message { - return (*fastReflection_SimpleValidator)(nil) -} -func (x fastReflection_SimpleValidator_messageType) New() protoreflect.Message { - return new(fastReflection_SimpleValidator) -} -func (x fastReflection_SimpleValidator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SimpleValidator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SimpleValidator) Descriptor() protoreflect.MessageDescriptor { - return md_SimpleValidator -} - -// 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_SimpleValidator) Type() protoreflect.MessageType { - return _fastReflection_SimpleValidator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SimpleValidator) New() protoreflect.Message { - return new(fastReflection_SimpleValidator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SimpleValidator) Interface() protoreflect.ProtoMessage { - return (*SimpleValidator)(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_SimpleValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_SimpleValidator_pub_key, value) { - return - } - } - if x.VotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.VotingPower) - if !f(fd_SimpleValidator_voting_power, 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_SimpleValidator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.types.SimpleValidator.pub_key": - return x.PubKey != nil - case "tendermint.types.SimpleValidator.voting_power": - return x.VotingPower != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SimpleValidator")) - } - panic(fmt.Errorf("message tendermint.types.SimpleValidator 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_SimpleValidator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.types.SimpleValidator.pub_key": - x.PubKey = nil - case "tendermint.types.SimpleValidator.voting_power": - x.VotingPower = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SimpleValidator")) - } - panic(fmt.Errorf("message tendermint.types.SimpleValidator 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_SimpleValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.types.SimpleValidator.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tendermint.types.SimpleValidator.voting_power": - value := x.VotingPower - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SimpleValidator")) - } - panic(fmt.Errorf("message tendermint.types.SimpleValidator 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_SimpleValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.types.SimpleValidator.pub_key": - x.PubKey = value.Message().Interface().(*crypto.PublicKey) - case "tendermint.types.SimpleValidator.voting_power": - x.VotingPower = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SimpleValidator")) - } - panic(fmt.Errorf("message tendermint.types.SimpleValidator 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_SimpleValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.SimpleValidator.pub_key": - if x.PubKey == nil { - x.PubKey = new(crypto.PublicKey) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "tendermint.types.SimpleValidator.voting_power": - panic(fmt.Errorf("field voting_power of message tendermint.types.SimpleValidator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SimpleValidator")) - } - panic(fmt.Errorf("message tendermint.types.SimpleValidator 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_SimpleValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.types.SimpleValidator.pub_key": - m := new(crypto.PublicKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tendermint.types.SimpleValidator.voting_power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.types.SimpleValidator")) - } - panic(fmt.Errorf("message tendermint.types.SimpleValidator 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_SimpleValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.types.SimpleValidator", 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_SimpleValidator) 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_SimpleValidator) 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_SimpleValidator) 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_SimpleValidator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SimpleValidator) - 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.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.VotingPower)) - } - 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().(*SimpleValidator) - 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.VotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.VotingPower)) - i-- - dAtA[i] = 0x10 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - 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().(*SimpleValidator) - 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: SimpleValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimpleValidator: 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 PubKey", 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.PubKey == nil { - x.PubKey = &crypto.PublicKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - x.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/types/validator.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ValidatorSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` - Proposer *Validator `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` - TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` -} - -func (x *ValidatorSet) Reset() { - *x = ValidatorSet{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_validator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorSet) ProtoMessage() {} - -// Deprecated: Use ValidatorSet.ProtoReflect.Descriptor instead. -func (*ValidatorSet) Descriptor() ([]byte, []int) { - return file_tendermint_types_validator_proto_rawDescGZIP(), []int{0} -} - -func (x *ValidatorSet) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *ValidatorSet) GetProposer() *Validator { - if x != nil { - return x.Proposer - } - return nil -} - -func (x *ValidatorSet) GetTotalVotingPower() int64 { - if x != nil { - return x.TotalVotingPower - } - return 0 -} - -type Validator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey *crypto.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` - ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"` -} - -func (x *Validator) Reset() { - *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_validator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Validator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Validator) ProtoMessage() {} - -// Deprecated: Use Validator.ProtoReflect.Descriptor instead. -func (*Validator) Descriptor() ([]byte, []int) { - return file_tendermint_types_validator_proto_rawDescGZIP(), []int{1} -} - -func (x *Validator) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - -func (x *Validator) GetPubKey() *crypto.PublicKey { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *Validator) GetVotingPower() int64 { - if x != nil { - return x.VotingPower - } - return 0 -} - -func (x *Validator) GetProposerPriority() int64 { - if x != nil { - return x.ProposerPriority - } - return 0 -} - -type SimpleValidator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PubKey *crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - VotingPower int64 `protobuf:"varint,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` -} - -func (x *SimpleValidator) Reset() { - *x = SimpleValidator{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_types_validator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimpleValidator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimpleValidator) ProtoMessage() {} - -// Deprecated: Use SimpleValidator.ProtoReflect.Descriptor instead. -func (*SimpleValidator) Descriptor() ([]byte, []int) { - return file_tendermint_types_validator_proto_rawDescGZIP(), []int{2} -} - -func (x *SimpleValidator) GetPubKey() *crypto.PublicKey { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *SimpleValidator) GetVotingPower() int64 { - if x != nil { - return x.VotingPower - } - return 0 -} - -var File_tendermint_types_validator_proto protoreflect.FileDescriptor - -var file_tendermint_types_validator_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x10, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x6b, 0x65, - 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x0c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, - 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0xb2, 0x01, - 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, - 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x22, 0x6b, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, - 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x42, - 0xba, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0xa2, 0x02, 0x03, - 0x54, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0xca, 0x02, 0x10, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0xe2, 0x02, 0x1c, 0x54, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x54, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tendermint_types_validator_proto_rawDescOnce sync.Once - file_tendermint_types_validator_proto_rawDescData = file_tendermint_types_validator_proto_rawDesc -) - -func file_tendermint_types_validator_proto_rawDescGZIP() []byte { - file_tendermint_types_validator_proto_rawDescOnce.Do(func() { - file_tendermint_types_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_types_validator_proto_rawDescData) - }) - return file_tendermint_types_validator_proto_rawDescData -} - -var file_tendermint_types_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_tendermint_types_validator_proto_goTypes = []interface{}{ - (*ValidatorSet)(nil), // 0: tendermint.types.ValidatorSet - (*Validator)(nil), // 1: tendermint.types.Validator - (*SimpleValidator)(nil), // 2: tendermint.types.SimpleValidator - (*crypto.PublicKey)(nil), // 3: tendermint.crypto.PublicKey -} -var file_tendermint_types_validator_proto_depIdxs = []int32{ - 1, // 0: tendermint.types.ValidatorSet.validators:type_name -> tendermint.types.Validator - 1, // 1: tendermint.types.ValidatorSet.proposer:type_name -> tendermint.types.Validator - 3, // 2: tendermint.types.Validator.pub_key:type_name -> tendermint.crypto.PublicKey - 3, // 3: tendermint.types.SimpleValidator.pub_key:type_name -> tendermint.crypto.PublicKey - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_tendermint_types_validator_proto_init() } -func file_tendermint_types_validator_proto_init() { - if File_tendermint_types_validator_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_types_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_types_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimpleValidator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_types_validator_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_types_validator_proto_goTypes, - DependencyIndexes: file_tendermint_types_validator_proto_depIdxs, - MessageInfos: file_tendermint_types_validator_proto_msgTypes, - }.Build() - File_tendermint_types_validator_proto = out.File - file_tendermint_types_validator_proto_rawDesc = nil - file_tendermint_types_validator_proto_goTypes = nil - file_tendermint_types_validator_proto_depIdxs = nil -} diff --git a/api/tendermint/version/types.pulsar.go b/api/tendermint/version/types.pulsar.go deleted file mode 100644 index 3c4236409cd4..000000000000 --- a/api/tendermint/version/types.pulsar.go +++ /dev/null @@ -1,1146 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package version - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_App protoreflect.MessageDescriptor - fd_App_protocol protoreflect.FieldDescriptor - fd_App_software protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_version_types_proto_init() - md_App = File_tendermint_version_types_proto.Messages().ByName("App") - fd_App_protocol = md_App.Fields().ByName("protocol") - fd_App_software = md_App.Fields().ByName("software") -} - -var _ protoreflect.Message = (*fastReflection_App)(nil) - -type fastReflection_App App - -func (x *App) ProtoReflect() protoreflect.Message { - return (*fastReflection_App)(x) -} - -func (x *App) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_version_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_App_messageType fastReflection_App_messageType -var _ protoreflect.MessageType = fastReflection_App_messageType{} - -type fastReflection_App_messageType struct{} - -func (x fastReflection_App_messageType) Zero() protoreflect.Message { - return (*fastReflection_App)(nil) -} -func (x fastReflection_App_messageType) New() protoreflect.Message { - return new(fastReflection_App) -} -func (x fastReflection_App_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_App -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_App) Descriptor() protoreflect.MessageDescriptor { - return md_App -} - -// 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_App) Type() protoreflect.MessageType { - return _fastReflection_App_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_App) New() protoreflect.Message { - return new(fastReflection_App) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_App) Interface() protoreflect.ProtoMessage { - return (*App)(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_App) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Protocol != uint64(0) { - value := protoreflect.ValueOfUint64(x.Protocol) - if !f(fd_App_protocol, value) { - return - } - } - if x.Software != "" { - value := protoreflect.ValueOfString(x.Software) - if !f(fd_App_software, 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_App) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.version.App.protocol": - return x.Protocol != uint64(0) - case "tendermint.version.App.software": - return x.Software != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.App")) - } - panic(fmt.Errorf("message tendermint.version.App 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_App) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.version.App.protocol": - x.Protocol = uint64(0) - case "tendermint.version.App.software": - x.Software = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.App")) - } - panic(fmt.Errorf("message tendermint.version.App 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_App) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.version.App.protocol": - value := x.Protocol - return protoreflect.ValueOfUint64(value) - case "tendermint.version.App.software": - value := x.Software - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.App")) - } - panic(fmt.Errorf("message tendermint.version.App 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_App) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.version.App.protocol": - x.Protocol = value.Uint() - case "tendermint.version.App.software": - x.Software = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.App")) - } - panic(fmt.Errorf("message tendermint.version.App 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_App) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.version.App.protocol": - panic(fmt.Errorf("field protocol of message tendermint.version.App is not mutable")) - case "tendermint.version.App.software": - panic(fmt.Errorf("field software of message tendermint.version.App is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.App")) - } - panic(fmt.Errorf("message tendermint.version.App 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_App) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.version.App.protocol": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.version.App.software": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.App")) - } - panic(fmt.Errorf("message tendermint.version.App 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_App) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.version.App", 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_App) 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_App) 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_App) 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_App) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*App) - 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.Protocol != 0 { - n += 1 + runtime.Sov(uint64(x.Protocol)) - } - l = len(x.Software) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*App) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Software) > 0 { - i -= len(x.Software) - copy(dAtA[i:], x.Software) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Software))) - i-- - dAtA[i] = 0x12 - } - if x.Protocol != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Protocol)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*App) - 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: App: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: App: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - x.Protocol = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Protocol |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Software", 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.Software = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Consensus protoreflect.MessageDescriptor - fd_Consensus_block protoreflect.FieldDescriptor - fd_Consensus_app protoreflect.FieldDescriptor -) - -func init() { - file_tendermint_version_types_proto_init() - md_Consensus = File_tendermint_version_types_proto.Messages().ByName("Consensus") - fd_Consensus_block = md_Consensus.Fields().ByName("block") - fd_Consensus_app = md_Consensus.Fields().ByName("app") -} - -var _ protoreflect.Message = (*fastReflection_Consensus)(nil) - -type fastReflection_Consensus Consensus - -func (x *Consensus) ProtoReflect() protoreflect.Message { - return (*fastReflection_Consensus)(x) -} - -func (x *Consensus) slowProtoReflect() protoreflect.Message { - mi := &file_tendermint_version_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Consensus_messageType fastReflection_Consensus_messageType -var _ protoreflect.MessageType = fastReflection_Consensus_messageType{} - -type fastReflection_Consensus_messageType struct{} - -func (x fastReflection_Consensus_messageType) Zero() protoreflect.Message { - return (*fastReflection_Consensus)(nil) -} -func (x fastReflection_Consensus_messageType) New() protoreflect.Message { - return new(fastReflection_Consensus) -} -func (x fastReflection_Consensus_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Consensus -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Consensus) Descriptor() protoreflect.MessageDescriptor { - return md_Consensus -} - -// 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_Consensus) Type() protoreflect.MessageType { - return _fastReflection_Consensus_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Consensus) New() protoreflect.Message { - return new(fastReflection_Consensus) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Consensus) Interface() protoreflect.ProtoMessage { - return (*Consensus)(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_Consensus) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Block != uint64(0) { - value := protoreflect.ValueOfUint64(x.Block) - if !f(fd_Consensus_block, value) { - return - } - } - if x.App != uint64(0) { - value := protoreflect.ValueOfUint64(x.App) - if !f(fd_Consensus_app, 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_Consensus) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "tendermint.version.Consensus.block": - return x.Block != uint64(0) - case "tendermint.version.Consensus.app": - return x.App != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.Consensus")) - } - panic(fmt.Errorf("message tendermint.version.Consensus 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_Consensus) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "tendermint.version.Consensus.block": - x.Block = uint64(0) - case "tendermint.version.Consensus.app": - x.App = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.Consensus")) - } - panic(fmt.Errorf("message tendermint.version.Consensus 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_Consensus) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "tendermint.version.Consensus.block": - value := x.Block - return protoreflect.ValueOfUint64(value) - case "tendermint.version.Consensus.app": - value := x.App - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.Consensus")) - } - panic(fmt.Errorf("message tendermint.version.Consensus 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_Consensus) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "tendermint.version.Consensus.block": - x.Block = value.Uint() - case "tendermint.version.Consensus.app": - x.App = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.Consensus")) - } - panic(fmt.Errorf("message tendermint.version.Consensus 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_Consensus) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.version.Consensus.block": - panic(fmt.Errorf("field block of message tendermint.version.Consensus is not mutable")) - case "tendermint.version.Consensus.app": - panic(fmt.Errorf("field app of message tendermint.version.Consensus is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.Consensus")) - } - panic(fmt.Errorf("message tendermint.version.Consensus 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_Consensus) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "tendermint.version.Consensus.block": - return protoreflect.ValueOfUint64(uint64(0)) - case "tendermint.version.Consensus.app": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tendermint.version.Consensus")) - } - panic(fmt.Errorf("message tendermint.version.Consensus 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_Consensus) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in tendermint.version.Consensus", 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_Consensus) 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_Consensus) 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_Consensus) 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_Consensus) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Consensus) - 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.Block != 0 { - n += 1 + runtime.Sov(uint64(x.Block)) - } - if x.App != 0 { - n += 1 + runtime.Sov(uint64(x.App)) - } - 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().(*Consensus) - 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.App != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.App)) - i-- - dAtA[i] = 0x10 - } - if x.Block != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Block)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Consensus) - 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: Consensus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - x.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Block |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field App", wireType) - } - x.App = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.App |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tendermint/version/types.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -type App struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Protocol uint64 `protobuf:"varint,1,opt,name=protocol,proto3" json:"protocol,omitempty"` - Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"` -} - -func (x *App) Reset() { - *x = App{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_version_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *App) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*App) ProtoMessage() {} - -// Deprecated: Use App.ProtoReflect.Descriptor instead. -func (*App) Descriptor() ([]byte, []int) { - return file_tendermint_version_types_proto_rawDescGZIP(), []int{0} -} - -func (x *App) GetProtocol() uint64 { - if x != nil { - return x.Protocol - } - return 0 -} - -func (x *App) GetSoftware() string { - if x != nil { - return x.Software - } - return "" -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -type Consensus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"` - App uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"` -} - -func (x *Consensus) Reset() { - *x = Consensus{} - if protoimpl.UnsafeEnabled { - mi := &file_tendermint_version_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Consensus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Consensus) ProtoMessage() {} - -// Deprecated: Use Consensus.ProtoReflect.Descriptor instead. -func (*Consensus) Descriptor() ([]byte, []int) { - return file_tendermint_version_types_proto_rawDescGZIP(), []int{1} -} - -func (x *Consensus) GetBlock() uint64 { - if x != nil { - return x.Block - } - return 0 -} - -func (x *Consensus) GetApp() uint64 { - if x != nil { - return x.App - } - return 0 -} - -var File_tendermint_version_types_proto protoreflect.FileDescriptor - -var file_tendermint_version_types_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x03, 0x41, 0x70, - 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, - 0x08, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x22, 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, - 0x61, 0x70, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x61, 0x70, 0x70, 0x3a, 0x04, - 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x54, 0x56, 0x58, 0xaa, 0x02, 0x12, 0x54, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x12, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0xe2, 0x02, 0x1e, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x3a, 0x3a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_tendermint_version_types_proto_rawDescOnce sync.Once - file_tendermint_version_types_proto_rawDescData = file_tendermint_version_types_proto_rawDesc -) - -func file_tendermint_version_types_proto_rawDescGZIP() []byte { - file_tendermint_version_types_proto_rawDescOnce.Do(func() { - file_tendermint_version_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_tendermint_version_types_proto_rawDescData) - }) - return file_tendermint_version_types_proto_rawDescData -} - -var file_tendermint_version_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_tendermint_version_types_proto_goTypes = []interface{}{ - (*App)(nil), // 0: tendermint.version.App - (*Consensus)(nil), // 1: tendermint.version.Consensus -} -var file_tendermint_version_types_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_tendermint_version_types_proto_init() } -func file_tendermint_version_types_proto_init() { - if File_tendermint_version_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_tendermint_version_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*App); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tendermint_version_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Consensus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tendermint_version_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_tendermint_version_types_proto_goTypes, - DependencyIndexes: file_tendermint_version_types_proto_depIdxs, - MessageInfos: file_tendermint_version_types_proto_msgTypes, - }.Build() - File_tendermint_version_types_proto = out.File - file_tendermint_version_types_proto_rawDesc = nil - file_tendermint_version_types_proto_goTypes = nil - file_tendermint_version_types_proto_depIdxs = nil -} diff --git a/baseapp/abci.go b/baseapp/abci.go index 31d782279591..6982f1aad882 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -8,6 +8,7 @@ import ( "sort" "strings" "syscall" + "time" "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" @@ -17,9 +18,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" ) // Supported ABCI Query prefixes @@ -110,6 +111,12 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC } } +// SetOption implements the ABCI interface. +func (app *BaseApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOption) { + // TODO: Implement! + return +} + // Info implements the ABCI interface. func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo { lastCommitID := app.cms.LastCommitID() @@ -143,7 +150,6 @@ func (app *BaseApp) FilterPeerByID(info string) abci.ResponseQuery { // BeginBlock implements the ABCI application interface. func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock) { - if app.cms.TracingEnabled() { app.cms.SetTracingContext(sdk.TraceContext( map[string]interface{}{"blockHeight": req.Header.Height}, @@ -209,7 +215,6 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg // EndBlock implements the ABCI interface. func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock) { - if app.deliverState.ms.TracingEnabled() { app.deliverState.ms = app.deliverState.ms.SetTracingContext(nil).(sdk.CacheMultiStore) } @@ -240,7 +245,6 @@ func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBloc // will contain releveant error information. Regardless of tx execution outcome, // the ResponseCheckTx will contain relevant gas execution context. func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { - var mode runTxMode switch { @@ -254,18 +258,19 @@ func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { panic(fmt.Sprintf("unknown RequestCheckTx type: %s", req.Type)) } - ctx := app.getContextForTx(mode, req.Tx) - res, checkRes, err := app.txHandler.CheckTx(ctx, tx.Request{TxBytes: req.Tx}, tx.RequestCheckTx{Type: req.Type}) + gInfo, result, anteEvents, priority, err := app.runTx(mode, req.Tx) if err != nil { - return sdkerrors.ResponseCheckTx(err, uint64(res.GasUsed), uint64(res.GasWanted), app.trace) + return sdkerrors.ResponseCheckTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, anteEvents, app.trace) } - abciRes, err := convertTxResponseToCheckTx(res, checkRes) - if err != nil { - return sdkerrors.ResponseCheckTx(err, uint64(res.GasUsed), uint64(res.GasWanted), app.trace) + return abci.ResponseCheckTx{ + GasWanted: int64(gInfo.GasWanted), // TODO: Should type accept unsigned ints? + GasUsed: int64(gInfo.GasUsed), // TODO: Should type accept unsigned ints? + Log: result.Log, + Data: result.Data, + Events: sdk.MarkEventsToIndex(result.Events, app.indexEvents), + Priority: priority, } - - return abciRes } // DeliverTx implements the ABCI interface and executes a tx in DeliverTx mode. @@ -274,30 +279,48 @@ func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { // Regardless of tx execution outcome, the ResponseDeliverTx will contain relevant // gas execution context. func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx { + gInfo := sdk.GasInfo{} + resultStr := "successful" - var abciRes abci.ResponseDeliverTx defer func() { - for _, streamingListener := range app.abciListeners { - if err := streamingListener.ListenDeliverTx(app.deliverState.ctx, req, abciRes); err != nil { - app.logger.Error("DeliverTx listening hook failed", "err", err) - } - } + telemetry.IncrCounter(1, "tx", "count") + telemetry.IncrCounter(1, "tx", resultStr) + telemetry.SetGauge(float32(gInfo.GasUsed), "tx", "gas", "used") + telemetry.SetGauge(float32(gInfo.GasWanted), "tx", "gas", "wanted") }() - ctx := app.getContextForTx(runTxModeDeliver, req.Tx) - res, err := app.txHandler.DeliverTx(ctx, tx.Request{TxBytes: req.Tx}) + gInfo, result, anteEvents, _, err := app.runTx(runTxModeDeliver, req.Tx) if err != nil { - abciRes = sdkerrors.ResponseDeliverTx(err, uint64(res.GasUsed), uint64(res.GasWanted), app.trace) - return abciRes + resultStr = "failed" + return sdkerrors.ResponseDeliverTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, sdk.MarkEventsToIndex(anteEvents, app.indexEvents), app.trace) } - abciRes, err = convertTxResponseToDeliverTx(res) - if err != nil { - return sdkerrors.ResponseDeliverTx(err, uint64(res.GasUsed), uint64(res.GasWanted), app.trace) + return abci.ResponseDeliverTx{ + GasWanted: int64(gInfo.GasWanted), // TODO: Should type accept unsigned ints? + GasUsed: int64(gInfo.GasUsed), // TODO: Should type accept unsigned ints? + Log: result.Log, + Data: result.Data, + Events: sdk.MarkEventsToIndex(result.Events, app.indexEvents), } +} - return abciRes +// PreprocessTxs fullfills the celestia-core version of the ACBI interface. It +// allows for arbitrary processing steps before transaction data is included in +// the block. +func (app *BaseApp) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { + // TODO(evan): fully implement + // pass through txs w/o processing for now + return abci.ResponsePrepareProposal{ + BlockData: req.BlockData, + } +} +// ProcessProposal fulfills the celestia-core version of the ABCI++ interface. +// It allows for arbitrary processing to occur after recieving a proposal block +func (app *BaseApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { + return abci.ResponseProcessProposal{ + Result: abci.ResponseProcessProposal_ACCEPT, + } } // Commit implements the ABCI interface. It will commit all state that exists in @@ -308,7 +331,6 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx // against that height and gracefully halt if it matches the latest committed // height. func (app *BaseApp) Commit() (res abci.ResponseCommit) { - header := app.deliverState.ctx.BlockHeader() retainHeight := app.GetBlockRetentionHeight(header.Height) @@ -346,9 +368,7 @@ func (app *BaseApp) Commit() (res abci.ResponseCommit) { app.halt() } - if app.snapshotInterval > 0 && uint64(header.Height)%app.snapshotInterval == 0 { - go app.snapshot(header.Height) - } + go app.snapshotManager.SnapshotIfApplicable(header.Height) return abci.ResponseCommit{ Data: commitID.Hash, @@ -378,55 +398,6 @@ func (app *BaseApp) halt() { os.Exit(0) } -// snapshot takes a snapshot of the current state and prunes any old snapshottypes. -func (app *BaseApp) snapshot(height int64) { - if app.snapshotManager == nil { - app.logger.Info("snapshot manager not configured") - return - } - - app.logger.Info("creating state snapshot", "height", height) - - snapshot, err := app.snapshotManager.Create(uint64(height)) - if err != nil { - app.logger.Error("failed to create state snapshot", "height", height, "err", err) - return - } - - app.logger.Info("completed state snapshot", "height", height, "format", snapshot.Format) - - if app.snapshotKeepRecent > 0 { - app.logger.Debug("pruning state snapshots") - - pruned, err := app.snapshotManager.Prune(app.snapshotKeepRecent) - if err != nil { - app.logger.Error("Failed to prune state snapshots", "err", err) - return - } - - app.logger.Debug("pruned state snapshots", "pruned", pruned) - } -} - -// PreprocessTxs fullfills the celestia-core version of the ACBI interface. It -// allows for arbitrary processing steps before transaction data is included in -// the block. -func (app *BaseApp) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - // TODO(evan): fully implement - // pass through txs w/o processing for now - return abci.ResponsePrepareProposal{ - BlockData: req.BlockData, - } -} - -// ProcessProposal fulfills the celestia-core version of the ABCI++ interface. -// It allows for arbitrary processing to occur after recieving a proposal block -func (app *BaseApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { - return abci.ResponseProcessProposal{ - Result: abci.ResponseProcessProposal_ACCEPT, - } -} - // Query implements the ABCI interface. It delegates to CommitMultiStore if it // implements Queryable. func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) { @@ -443,6 +414,10 @@ func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) { req.Height = app.LastBlockHeight() } + telemetry.IncrCounter(1, "query", "count") + telemetry.IncrCounter(1, "query", req.Path) + defer telemetry.MeasureSince(time.Now(), req.Path) + // handle gRPC routes first rather than calling splitPath because '/' characters // are used as part of gRPC paths if grpcHandler := app.grpcQueryRouter.Route(req.Path); grpcHandler != nil { @@ -744,9 +719,11 @@ func (app *BaseApp) GetBlockRetentionHeight(commitHeight int64) int64 { retentionHeight = commitHeight - cp.Evidence.MaxAgeNumBlocks } - if app.snapshotInterval > 0 && app.snapshotKeepRecent > 0 { - v := commitHeight - int64((app.snapshotInterval * uint64(app.snapshotKeepRecent))) - retentionHeight = minNonZero(retentionHeight, v) + if app.snapshotManager != nil { + snapshotRetentionHeights := app.snapshotManager.GetSnapshotBlockRetentionHeights() + if snapshotRetentionHeights > 0 { + retentionHeight = minNonZero(retentionHeight, commitHeight-snapshotRetentionHeights) + } } v := commitHeight - int64(app.minRetainBlocks) @@ -908,41 +885,3 @@ func SplitABCIQueryPath(requestPath string) (path []string) { return path } - -// makeABCIData generates the Data field to be sent to ABCI Check/DeliverTx. -func makeABCIData(txRes tx.Response) ([]byte, error) { - return proto.Marshal(&sdk.TxMsgData{MsgResponses: txRes.MsgResponses}) -} - -// convertTxResponseToCheckTx converts a tx.Response into a abci.ResponseCheckTx. -func convertTxResponseToCheckTx(txRes tx.Response, checkRes tx.ResponseCheckTx) (abci.ResponseCheckTx, error) { - data, err := makeABCIData(txRes) - if err != nil { - return abci.ResponseCheckTx{}, nil - } - - return abci.ResponseCheckTx{ - Data: data, - Log: txRes.Log, - Events: txRes.Events, - Priority: checkRes.Priority, - GasUsed: int64(txRes.GasUsed), - GasWanted: int64(txRes.GasWanted), - }, nil -} - -// convertTxResponseToDeliverTx converts a tx.Response into a abci.ResponseDeliverTx. -func convertTxResponseToDeliverTx(txRes tx.Response) (abci.ResponseDeliverTx, error) { - data, err := makeABCIData(txRes) - if err != nil { - return abci.ResponseDeliverTx{}, nil - } - - return abci.ResponseDeliverTx{ - Data: data, - Log: txRes.Log, - Events: txRes.Events, - GasUsed: int64(txRes.GasUsed), - GasWanted: int64(txRes.GasWanted), - }, nil -} diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index eddee8b954b1..8b331ca03811 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -1,4 +1,4 @@ -package baseapp_test +package baseapp import ( "testing" @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/baseapp" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + "github.com/cosmos/cosmos-sdk/testutil" ) func TestGetBlockRentionHeight(t *testing.T) { @@ -17,78 +19,85 @@ func TestGetBlockRentionHeight(t *testing.T) { db := dbm.NewMemDB() name := t.Name() + snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), testutil.GetTempDir(t)) + require.NoError(t, err) + testCases := map[string]struct { - bapp *baseapp.BaseApp + bapp *BaseApp maxAgeBlocks int64 commitHeight int64 expected int64 }{ "defaults": { - bapp: baseapp.NewBaseApp(name, logger, db), + bapp: NewBaseApp(name, logger, db, nil), maxAgeBlocks: 0, commitHeight: 499000, expected: 0, }, "pruning unbonding time only": { - bapp: baseapp.NewBaseApp(name, logger, db, baseapp.SetMinRetainBlocks(1)), + bapp: NewBaseApp(name, logger, db, nil, SetMinRetainBlocks(1)), maxAgeBlocks: 362880, commitHeight: 499000, expected: 136120, }, "pruning iavl snapshot only": { - bapp: baseapp.NewBaseApp( - name, logger, db, - baseapp.SetMinRetainBlocks(1), + bapp: NewBaseApp( + name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)), + SetMinRetainBlocks(1), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(10000, 1)), ), maxAgeBlocks: 0, commitHeight: 499000, - expected: 498999, + expected: 489000, }, "pruning state sync snapshot only": { - bapp: baseapp.NewBaseApp( - name, logger, db, - baseapp.SetSnapshotInterval(50000), - baseapp.SetSnapshotKeepRecent(3), - baseapp.SetMinRetainBlocks(1), + bapp: NewBaseApp( + name, logger, db, nil, + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), + SetMinRetainBlocks(1), ), maxAgeBlocks: 0, commitHeight: 499000, expected: 349000, }, "pruning min retention only": { - bapp: baseapp.NewBaseApp( - name, logger, db, - baseapp.SetMinRetainBlocks(400000), + bapp: NewBaseApp( + name, logger, db, nil, + SetMinRetainBlocks(400000), ), maxAgeBlocks: 0, commitHeight: 499000, expected: 99000, }, "pruning all conditions": { - bapp: baseapp.NewBaseApp( - name, logger, db, - baseapp.SetMinRetainBlocks(400000), - baseapp.SetSnapshotInterval(50000), baseapp.SetSnapshotKeepRecent(3), + bapp: NewBaseApp( + name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), + SetMinRetainBlocks(400000), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), ), maxAgeBlocks: 362880, commitHeight: 499000, expected: 99000, }, "no pruning due to no persisted state": { - bapp: baseapp.NewBaseApp( - name, logger, db, - baseapp.SetMinRetainBlocks(400000), - baseapp.SetSnapshotInterval(50000), baseapp.SetSnapshotKeepRecent(3), + bapp: NewBaseApp( + name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), + SetMinRetainBlocks(400000), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), ), maxAgeBlocks: 362880, commitHeight: 10000, expected: 0, }, "disable pruning": { - bapp: baseapp.NewBaseApp( - name, logger, db, - baseapp.SetMinRetainBlocks(0), - baseapp.SetSnapshotInterval(50000), baseapp.SetSnapshotKeepRecent(3), + bapp: NewBaseApp( + name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), + SetMinRetainBlocks(0), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), ), maxAgeBlocks: 362880, commitHeight: 499000, @@ -101,8 +110,8 @@ func TestGetBlockRentionHeight(t *testing.T) { tc.bapp.SetParamStore(¶mStore{db: dbm.NewMemDB()}) tc.bapp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmprototypes.ConsensusParams{ - Evidence: &tmprototypes.EvidenceParams{ + ConsensusParams: &abci.ConsensusParams{ + Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: tc.maxAgeBlocks, }, }, @@ -124,7 +133,7 @@ func TestBaseAppCreateQueryContext(t *testing.T) { logger := defaultLogger() db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db) + app := NewBaseApp(name, logger, db, nil) app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) app.Commit() @@ -146,7 +155,7 @@ func TestBaseAppCreateQueryContext(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - _, err := app.CreateQueryContext(tc.height, tc.prove) + _, err := app.createQueryContext(tc.height, tc.prove) if tc.expErr { require.Error(t, err) } else { diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 45c65b8030ee..6e95e65ab2ff 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -1,22 +1,25 @@ package baseapp import ( - "context" - "errors" "fmt" + "strings" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/codec/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) const ( @@ -26,9 +29,7 @@ const ( runTxModeDeliver // Deliver a transaction ) -var ( - _ abci.Application = (*BaseApp)(nil) -) +var _ abci.Application = (*BaseApp)(nil) type ( // Enum mode for app.runTx @@ -49,11 +50,15 @@ type BaseApp struct { // nolint: maligned db dbm.DB // common DB backend cms sdk.CommitMultiStore // Main (uncached) state storeLoader StoreLoader // function to handle store loading, may be overridden with SetStoreLoader() + router sdk.Router // handle any kind of legacy message queryRouter sdk.QueryRouter // router for redirecting query calls grpcQueryRouter *GRPCQueryRouter // router for redirecting gRPC query calls + msgServiceRouter *MsgServiceRouter // router for redirecting Msg service messages interfaceRegistry types.InterfaceRegistry + txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx - txHandler tx.Handler // txHandler for {Deliver,Check}Tx and simulations + anteHandler sdk.AnteHandler // ante handler for fee and auth + postHandler sdk.AnteHandler // post handler, optional, e.g. for tips initChainer sdk.InitChainer // initialize state with validators and state blob beginBlocker sdk.BeginBlocker // logic to run before any txs endBlocker sdk.EndBlocker // logic to run after all txs, and to determine valset changes @@ -62,9 +67,7 @@ type BaseApp struct { // nolint: maligned fauxMerkleMode bool // if true, IAVL MountStores uses MountStoresDB for simulation speed. // manages snapshots, i.e. dumps of app state at certain intervals - snapshotManager *snapshots.Manager - snapshotInterval uint64 // block interval between state sync snapshots - snapshotKeepRecent uint32 // recent state sync snapshots to keep + snapshotManager *snapshots.Manager // volatile states: // @@ -118,6 +121,9 @@ type BaseApp struct { // nolint: maligned // if BaseApp is passed to the upgrade keeper's NewKeeper method. appVersion uint64 + // recovery handler for app.runTx method + runTxRecoveryMiddleware recoveryMiddleware + // trace set will return full stack traces for errors in ABCI Log field trace bool @@ -136,17 +142,20 @@ type BaseApp struct { // nolint: maligned // // NOTE: The db is used to store the version number for now. func NewBaseApp( - name string, logger log.Logger, db dbm.DB, options ...func(*BaseApp), + name string, logger log.Logger, db dbm.DB, txDecoder sdk.TxDecoder, options ...func(*BaseApp), ) *BaseApp { app := &BaseApp{ - logger: logger, - name: name, - db: db, - cms: store.NewCommitMultiStore(db), - storeLoader: DefaultStoreLoader, - queryRouter: NewQueryRouter(), - grpcQueryRouter: NewGRPCQueryRouter(), - fauxMerkleMode: false, + logger: logger, + name: name, + db: db, + cms: store.NewCommitMultiStore(db), + storeLoader: DefaultStoreLoader, + router: NewRouter(), + queryRouter: NewQueryRouter(), + grpcQueryRouter: NewGRPCQueryRouter(), + msgServiceRouter: NewMsgServiceRouter(), + txDecoder: txDecoder, + fauxMerkleMode: false, } for _, option := range options { @@ -157,6 +166,8 @@ func NewBaseApp( app.cms.SetInterBlockCache(app.interBlockCache) } + app.runTxRecoveryMiddleware = newDefaultRecoveryMiddleware() + return app } @@ -185,6 +196,9 @@ func (app *BaseApp) Trace() bool { return app.trace } +// MsgServiceRouter returns the MsgServiceRouter of a BaseApp. +func (app *BaseApp) MsgServiceRouter() *MsgServiceRouter { return app.msgServiceRouter } + // MountStores mounts all IAVL or DB stores to the provided keys in the BaseApp // multistore. func (app *BaseApp) MountStores(keys ...storetypes.StoreKey) { @@ -252,7 +266,7 @@ func (app *BaseApp) LoadLatestVersion() error { return fmt.Errorf("failed to load latest version: %w", err) } - return app.init() + return app.Init() } // DefaultStoreLoader will be used by default and loads the latest version @@ -284,7 +298,7 @@ func (app *BaseApp) LoadVersion(version int64) error { return fmt.Errorf("failed to load version %d: %w", version, err) } - return app.init() + return app.Init() } // LastCommitID returns the last CommitID of the multistore. @@ -297,7 +311,11 @@ func (app *BaseApp) LastBlockHeight() int64 { return app.cms.LastCommitID().Version } -func (app *BaseApp) init() error { +// Init initializes the app. It seals the app, preventing any +// further modifications. In addition, it validates the app against +// the earlier provided settings. Returns an error if validation fails. +// nil otherwise. Panics if the app is already sealed. +func (app *BaseApp) Init() error { if app.sealed { panic("cannot call initFromMainStore: baseapp already sealed") } @@ -306,14 +324,11 @@ func (app *BaseApp) init() error { app.setCheckState(tmproto.Header{}) app.Seal() - // make sure the snapshot interval is a multiple of the pruning KeepEvery interval - if app.snapshotManager != nil && app.snapshotInterval > 0 { - if _, ok := app.cms.(*rootmulti.Store); !ok { - return errors.New("state sync snapshots require a rootmulti store") - } + rms, ok := app.cms.(*rootmulti.Store) + if !ok { + return fmt.Errorf("invalid commit multi-store; expected %T, got: %T", &rootmulti.Store{}, app.cms) } - - return nil + return rms.GetPruning().Validate() } func (app *BaseApp) setMinGasPrices(gasPrices sdk.DecCoins) { @@ -348,6 +363,17 @@ func (app *BaseApp) setIndexEvents(ie []string) { } } +// Router returns the legacy router of the BaseApp. +func (app *BaseApp) Router() sdk.Router { + if app.sealed { + // We cannot return a Router when the app is sealed because we can't have + // any routes modified which would cause unexpected routing behavior. + panic("Router() on sealed BaseApp") + } + + return app.router +} + // QueryRouter returns the QueryRouter of a BaseApp. func (app *BaseApp) QueryRouter() sdk.QueryRouter { return app.queryRouter } @@ -383,15 +409,15 @@ func (app *BaseApp) setDeliverState(header tmproto.Header) { // GetConsensusParams returns the current consensus parameters from the BaseApp's // ParamStore. If the BaseApp has no ParamStore defined, nil is returned. -func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams { +func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams { if app.paramStore == nil { return nil } - cp := new(tmproto.ConsensusParams) + cp := new(abci.ConsensusParams) if app.paramStore.Has(ctx, ParamStoreKeyBlockParams) { - var bp tmproto.BlockParams + var bp abci.BlockParams app.paramStore.Get(ctx, ParamStoreKeyBlockParams, &bp) cp.Block = &bp @@ -414,8 +440,15 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams return cp } +// AddRunTxRecoveryHandler adds custom app.runTx method panic handlers. +func (app *BaseApp) AddRunTxRecoveryHandler(handlers ...RecoveryHandler) { + for _, h := range handlers { + app.runTxRecoveryMiddleware = newRecoveryMiddleware(h, app.runTxRecoveryMiddleware) + } +} + // StoreConsensusParams sets the consensus parameters to the baseapp's param store. -func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) { +func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) { if app.paramStore == nil { panic("cannot store consensus params with no params store set") } @@ -481,6 +514,22 @@ func (app *BaseApp) validateHeight(req abci.RequestBeginBlock) error { return nil } +// validateBasicTxMsgs executes basic validator calls for messages. +func validateBasicTxMsgs(msgs []sdk.Msg) error { + if len(msgs) == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "must contain at least one message") + } + + for _, msg := range msgs { + err := msg.ValidateBasic() + if err != nil { + return err + } + } + + return nil +} + // Returns the applications's deliverState if app is in runTxModeDeliver, // otherwise it returns the application's checkstate. func (app *BaseApp) getState(mode runTxMode) *state { @@ -492,7 +541,7 @@ func (app *BaseApp) getState(mode runTxMode) *state { } // retrieve the context for the tx w/ txBytes and other memoized values. -func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) context.Context { +func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) sdk.Context { ctx := app.getState(mode).ctx. WithTxBytes(txBytes). WithVoteInfos(app.voteInfos) @@ -507,5 +556,258 @@ func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) context.Cont ctx, _ = ctx.CacheContext() } - return sdk.WrapSDKContext(ctx) + return ctx +} + +// cacheTxContext returns a new context based off of the provided context with +// a branched multi-store. +func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context, sdk.CacheMultiStore) { + ms := ctx.MultiStore() + // TODO: https://github.com/cosmos/cosmos-sdk/issues/2824 + msCache := ms.CacheMultiStore() + if msCache.TracingEnabled() { + msCache = msCache.SetTracingContext( + sdk.TraceContext( + map[string]interface{}{ + "txHash": fmt.Sprintf("%X", tmhash.Sum(txBytes)), + }, + ), + ).(sdk.CacheMultiStore) + } + + return ctx.WithMultiStore(msCache), msCache +} + +// runTx processes a transaction within a given execution mode, encoded transaction +// bytes, and the decoded transaction itself. All state transitions occur through +// a cached Context depending on the mode provided. State only gets persisted +// if all messages get executed successfully and the execution mode is DeliverTx. +// Note, gas execution info is always returned. A reference to a Result is +// returned if the tx does not run out of gas and if all the messages are valid +// and execute successfully. An error is returned otherwise. +func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, result *sdk.Result, anteEvents []abci.Event, priority int64, err error) { + // NOTE: GasWanted should be returned by the AnteHandler. GasUsed is + // determined by the GasMeter. We need access to the context to get the gas + // meter so we initialize upfront. + var gasWanted uint64 + + ctx := app.getContextForTx(mode, txBytes) + ms := ctx.MultiStore() + + // only run the tx if there is block gas remaining + if mode == runTxModeDeliver && ctx.BlockGasMeter().IsOutOfGas() { + return gInfo, nil, nil, 0, sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "no block gas left to run tx") + } + + defer func() { + if r := recover(); r != nil { + recoveryMW := newOutOfGasRecoveryMiddleware(gasWanted, ctx, app.runTxRecoveryMiddleware) + err, result = processRecovery(r, recoveryMW), nil + } + + gInfo = sdk.GasInfo{GasWanted: gasWanted, GasUsed: ctx.GasMeter().GasConsumed()} + }() + + blockGasConsumed := false + // consumeBlockGas makes sure block gas is consumed at most once. It must happen after + // tx processing, and must be execute even if tx processing fails. Hence we use trick with `defer` + consumeBlockGas := func() { + if !blockGasConsumed { + blockGasConsumed = true + ctx.BlockGasMeter().ConsumeGas( + ctx.GasMeter().GasConsumedToLimit(), "block gas meter", + ) + } + } + + // If BlockGasMeter() panics it will be caught by the above recover and will + // return an error - in any case BlockGasMeter will consume gas past the limit. + // + // NOTE: This must exist in a separate defer function for the above recovery + // to recover from this one. + if mode == runTxModeDeliver { + defer consumeBlockGas() + } + + tx, err := app.txDecoder(txBytes) + if err != nil { + return sdk.GasInfo{}, nil, nil, 0, err + } + + msgs := tx.GetMsgs() + if err := validateBasicTxMsgs(msgs); err != nil { + return sdk.GasInfo{}, nil, nil, 0, err + } + + if app.anteHandler != nil { + var ( + anteCtx sdk.Context + msCache sdk.CacheMultiStore + ) + + // Branch context before AnteHandler call in case it aborts. + // This is required for both CheckTx and DeliverTx. + // Ref: https://github.com/cosmos/cosmos-sdk/issues/2772 + // + // NOTE: Alternatively, we could require that AnteHandler ensures that + // writes do not happen if aborted/failed. This may have some + // performance benefits, but it'll be more difficult to get right. + anteCtx, msCache = app.cacheTxContext(ctx, txBytes) + anteCtx = anteCtx.WithEventManager(sdk.NewEventManager()) + newCtx, err := app.anteHandler(anteCtx, tx, mode == runTxModeSimulate) + + if !newCtx.IsZero() { + // At this point, newCtx.MultiStore() is a store branch, or something else + // replaced by the AnteHandler. We want the original multistore. + // + // Also, in the case of the tx aborting, we need to track gas consumed via + // the instantiated gas meter in the AnteHandler, so we update the context + // prior to returning. + ctx = newCtx.WithMultiStore(ms) + } + + events := ctx.EventManager().Events() + + // GasMeter expected to be set in AnteHandler + gasWanted = ctx.GasMeter().Limit() + + if err != nil { + return gInfo, nil, nil, 0, err + } + + priority = ctx.Priority() + msCache.Write() + anteEvents = events.ToABCIEvents() + } + + // Create a new Context based off of the existing Context with a MultiStore branch + // in case message processing fails. At this point, the MultiStore + // is a branch of a branch. + runMsgCtx, msCache := app.cacheTxContext(ctx, txBytes) + + // Attempt to execute all messages and only update state if all messages pass + // and we're in DeliverTx. Note, runMsgs will never return a reference to a + // Result if any single message fails or does not have a registered Handler. + result, err = app.runMsgs(runMsgCtx, msgs, mode) + if err == nil { + // Run optional postHandlers. + // + // Note: If the postHandler fails, we also revert the runMsgs state. + if app.postHandler != nil { + newCtx, err := app.postHandler(runMsgCtx, tx, mode == runTxModeSimulate) + if err != nil { + return gInfo, nil, nil, priority, err + } + + result.Events = append(result.Events, newCtx.EventManager().ABCIEvents()...) + } + + if mode == runTxModeDeliver { + // When block gas exceeds, it'll panic and won't commit the cached store. + consumeBlockGas() + + msCache.Write() + } + + if len(anteEvents) > 0 && (mode == runTxModeDeliver || mode == runTxModeSimulate) { + // append the events in the order of occurrence + result.Events = append(anteEvents, result.Events...) + } + } + + return gInfo, result, anteEvents, priority, err +} + +// runMsgs iterates through a list of messages and executes them with the provided +// Context and execution mode. Messages will only be executed during simulation +// and DeliverTx. An error is returned if any single message fails or if a +// Handler does not exist for a given message route. Otherwise, a reference to a +// Result is returned. The caller must not commit state if an error is returned. +func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*sdk.Result, error) { + msgLogs := make(sdk.ABCIMessageLogs, 0, len(msgs)) + events := sdk.EmptyEvents() + var msgResponses []*codectypes.Any + + // NOTE: GasWanted is determined by the AnteHandler and GasUsed by the GasMeter. + for i, msg := range msgs { + // skip actual execution for (Re)CheckTx mode + if mode == runTxModeCheck || mode == runTxModeReCheck { + break + } + + var ( + msgResult *sdk.Result + eventMsgName string // name to use as value in event `message.action` + err error + ) + + if handler := app.msgServiceRouter.Handler(msg); handler != nil { + // ADR 031 request type routing + msgResult, err = handler(ctx, msg) + eventMsgName = sdk.MsgTypeURL(msg) + } else if legacyMsg, ok := msg.(legacytx.LegacyMsg); ok { + // legacy sdk.Msg routing + // Assuming that the app developer has migrated all their Msgs to + // proto messages and has registered all `Msg services`, then this + // path should never be called, because all those Msgs should be + // registered within the `msgServiceRouter` already. + msgRoute := legacyMsg.Route() + eventMsgName = legacyMsg.Type() + handler := app.router.Route(ctx, msgRoute) + if handler == nil { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message route: %s; message index: %d", msgRoute, i) + } + + msgResult, err = handler(ctx, msg) + } else { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "can't route message %+v", msg) + } + + if err != nil { + return nil, sdkerrors.Wrapf(err, "failed to execute message; message index: %d", i) + } + + msgEvents := sdk.Events{ + sdk.NewEvent(sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyAction, eventMsgName)), + } + msgEvents = msgEvents.AppendEvents(msgResult.GetEvents()) + + // append message events, data and logs + // + // Note: Each message result's data must be length-prefixed in order to + // separate each result. + events = events.AppendEvents(msgEvents) + + // Each individual sdk.Result that went through the MsgServiceRouter + // (which should represent 99% of the Msgs now, since everyone should + // be using protobuf Msgs) has exactly one Msg response, set inside + // `WrapServiceResult`. We take that Msg response, and aggregate it + // into an array. + if len(msgResult.MsgResponses) > 0 { + msgResponse := msgResult.MsgResponses[0] + if msgResponse == nil { + return nil, sdkerrors.ErrLogic.Wrapf("got nil Msg response at index %d for msg %s", i, sdk.MsgTypeURL(msg)) + } + msgResponses = append(msgResponses, msgResponse) + } + + msgLogs = append(msgLogs, sdk.NewABCIMessageLog(uint32(i), msgResult.Log, msgEvents)) + } + + data, err := makeABCIData(msgResponses) + if err != nil { + return nil, sdkerrors.Wrap(err, "failed to marshal tx data") + } + + return &sdk.Result{ + Data: data, + Log: strings.TrimSpace(msgLogs.String()), + Events: events.ToABCIEvents(), + MsgResponses: msgResponses, + }, nil +} + +// makeABCIData generates the Data field to be sent to ABCI Check/DeliverTx. +func makeABCIData(msgResponses []*codectypes.Any) ([]byte, error) { + return proto.Marshal(&sdk.TxMsgData{MsgResponses: msgResponses}) } diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index e996f1d4a1eb..f6279544a100 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -1,12 +1,10 @@ -package baseapp_test +package baseapp import ( "bytes" - "context" "encoding/binary" "encoding/json" "fmt" - "math" "math/rand" "os" "strings" @@ -14,10 +12,6 @@ import ( "testing" "time" - "google.golang.org/protobuf/proto" - - "github.com/cosmos/cosmos-sdk/testutil/testdata_pulsar" - "github.com/gogo/protobuf/jsonpb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -26,20 +20,17 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/simapp" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) @@ -47,17 +38,23 @@ var ( capKey1 = sdk.NewKVStoreKey("key1") capKey2 = sdk.NewKVStoreKey("key2") - encCfg = simapp.MakeTestEncodingConfig() + // testTxPriority is the CheckTx priority that we set in the test + // antehandler. + testTxPriority = int64(42) ) -func init() { - registerTestCodec(encCfg.Amino) -} - type paramStore struct { db *dbm.MemDB } +type setupConfig struct { + blocks uint64 + blockTxs int + snapshotInterval uint64 + snapshotKeepRecent uint32 + pruningOpts pruningtypes.PruningOptions +} + func (ps *paramStore) Set(_ sdk.Context, key []byte, value interface{}) { bz, err := json.Marshal(value) if err != nil { @@ -92,34 +89,39 @@ func (ps *paramStore) Get(_ sdk.Context, key []byte, ptr interface{}) { } func defaultLogger() log.Logger { - logger, _ := log.NewDefaultLogger("plain", "info", false) - return logger.With("module", "sdk/app") + return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") } -func newBaseApp(name string, options ...func(*baseapp.BaseApp)) *baseapp.BaseApp { +func newBaseApp(name string, options ...func(*BaseApp)) *BaseApp { logger := defaultLogger() db := dbm.NewMemDB() codec := codec.NewLegacyAmino() registerTestCodec(codec) - return baseapp.NewBaseApp(name, logger, db, options...) + return NewBaseApp(name, logger, db, testTxDecoder(codec), options...) } func registerTestCodec(cdc *codec.LegacyAmino) { + // register Tx, Msg + sdk.RegisterLegacyAminoCodec(cdc) + // register test types cdc.RegisterConcrete(&txTest{}, "cosmos-sdk/baseapp/txTest", nil) - legacy.RegisterAminoMsg(cdc, &msgCounter{}, "cosmos-sdk/baseapp/msgCounter") - legacy.RegisterAminoMsg(cdc, &msgCounter2{}, "cosmos-sdk/baseapp/msgCounter2") - legacy.RegisterAminoMsg(cdc, &msgKeyValue{}, "cosmos-sdk/baseapp/msgKeyValue") - legacy.RegisterAminoMsg(cdc, &msgNoRoute{}, "cosmos-sdk/baseapp/msgNoRoute") + cdc.RegisterConcrete(&msgCounter{}, "cosmos-sdk/baseapp/msgCounter", nil) + cdc.RegisterConcrete(&msgCounter2{}, "cosmos-sdk/baseapp/msgCounter2", nil) + cdc.RegisterConcrete(&msgKeyValue{}, "cosmos-sdk/baseapp/msgKeyValue", nil) + cdc.RegisterConcrete(&msgNoRoute{}, "cosmos-sdk/baseapp/msgNoRoute", nil) } // aminoTxEncoder creates a amino TxEncoder for testing purposes. -func aminoTxEncoder(cdc *codec.LegacyAmino) sdk.TxEncoder { +func aminoTxEncoder() sdk.TxEncoder { + cdc := codec.NewLegacyAmino() + registerTestCodec(cdc) + return legacytx.StdTxConfig{Cdc: cdc}.TxEncoder() } // simple one store baseapp -func setupBaseApp(t *testing.T, options ...func(*baseapp.BaseApp)) *baseapp.BaseApp { +func setupBaseApp(t *testing.T, options ...func(*BaseApp)) *BaseApp { app := newBaseApp(t.Name(), options...) require.Equal(t, t.Name(), app.Name()) @@ -132,72 +134,31 @@ func setupBaseApp(t *testing.T, options ...func(*baseapp.BaseApp)) *baseapp.Base return app } -// testTxHandler is a tx.Handler used for the mock app, it does not -// contain any signature verification logic. -func testTxHandler(options middleware.TxHandlerOptions, customTxHandlerMiddleware handlerFun) tx.Handler { - return middleware.ComposeMiddlewares( - middleware.NewRunMsgsTxHandler(options.MsgServiceRouter, options.LegacyRouter), - middleware.NewTxDecoderMiddleware(options.TxDecoder), - middleware.GasTxMiddleware, - middleware.RecoveryTxMiddleware, - middleware.NewIndexEventsTxMiddleware(options.IndexEvents), - middleware.ValidateBasicMiddleware, - middleware.ConsumeBlockGasMiddleware, - CustomTxHandlerMiddleware(customTxHandlerMiddleware), - ) -} - // simple one store baseapp with data and snapshots. Each tx is 1 MB in size (uncompressed). -func setupBaseAppWithSnapshots(t *testing.T, blocks uint, blockTxs int, options ...func(*baseapp.BaseApp)) (*baseapp.BaseApp, func()) { +func setupBaseAppWithSnapshots(t *testing.T, config *setupConfig) (*BaseApp, error) { codec := codec.NewLegacyAmino() registerTestCodec(codec) - routerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() - legacyRouter.AddRoute(sdk.NewRoute(routeMsgKeyValue, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + routerOpt := func(bapp *BaseApp) { + bapp.Router().AddRoute(sdk.NewRoute(routeMsgKeyValue, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { kv := msg.(*msgKeyValue) - bapp.CMS().GetCommitKVStore(capKey2).Set(kv.Key, kv.Value) - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil + bapp.cms.GetCommitKVStore(capKey2).Set(kv.Key, kv.Value) + return &sdk.Result{}, nil })) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { return ctx, nil }, - ) - bapp.SetTxHandler(txHandler) } - snapshotInterval := uint64(2) snapshotTimeout := 1 * time.Minute - snapshotDir, err := os.MkdirTemp("", "baseapp") - require.NoError(t, err) - snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), snapshotDir) + snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), testutil.GetTempDir(t)) require.NoError(t, err) - teardown := func() { - os.RemoveAll(snapshotDir) - } - app := setupBaseApp(t, append(options, - baseapp.SetSnapshotStore(snapshotStore), - baseapp.SetSnapshotInterval(snapshotInterval), - routerOpt)...) + app := setupBaseApp(t, routerOpt, SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(config.snapshotInterval, uint32(config.snapshotKeepRecent))), SetPruning(config.pruningOpts)) app.InitChain(abci.RequestInitChain{}) r := rand.New(rand.NewSource(3920758213583)) keyCounter := 0 - for height := int64(1); height <= int64(blocks); height++ { + for height := int64(1); height <= int64(config.blocks); height++ { app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) - for txNum := 0; txNum < blockTxs; txNum++ { + for txNum := 0; txNum < config.blockTxs; txNum++ { tx := txTest{Msgs: []sdk.Msg{}} for msgNum := 0; msgNum < 100; msgNum++ { key := []byte(fmt.Sprintf("%v", keyCounter)) @@ -207,7 +168,7 @@ func setupBaseAppWithSnapshots(t *testing.T, blocks uint, blockTxs int, options tx.Msgs = append(tx.Msgs, msgKeyValue{Key: key, Value: value}) keyCounter++ } - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := codec.Marshal(tx) require.NoError(t, err) resp := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.True(t, resp.IsOK(), "%v", resp.String()) @@ -216,7 +177,7 @@ func setupBaseAppWithSnapshots(t *testing.T, blocks uint, blockTxs int, options app.Commit() // Wait for snapshot to be taken, since it happens asynchronously. - if uint64(height)%snapshotInterval == 0 { + if config.snapshotInterval > 0 && uint64(height)%config.snapshotInterval == 0 { start := time.Now() for { if time.Since(start) > snapshotTimeout { @@ -232,72 +193,27 @@ func setupBaseAppWithSnapshots(t *testing.T, blocks uint, blockTxs int, options } } - return app, teardown + return app, nil } func TestMountStores(t *testing.T) { app := setupBaseApp(t) // check both stores - store1 := app.CMS().GetCommitKVStore(capKey1) + store1 := app.cms.GetCommitKVStore(capKey1) require.NotNil(t, store1) - store2 := app.CMS().GetCommitKVStore(capKey2) + store2 := app.cms.GetCommitKVStore(capKey2) require.NotNil(t, store2) } -type MockTxHandler struct { - T *testing.T -} - -func (th MockTxHandler) CheckTx(goCtx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - require.NotNil(th.T, ctx.ConsensusParams()) - return tx.Response{}, tx.ResponseCheckTx{}, nil -} - -func (th MockTxHandler) DeliverTx(goCtx context.Context, req tx.Request) (tx.Response, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - require.NotNil(th.T, ctx.ConsensusParams()) - return tx.Response{}, nil -} - -func (th MockTxHandler) SimulateTx(goCtx context.Context, req tx.Request) (tx.Response, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - require.NotNil(th.T, ctx.ConsensusParams()) - return tx.Response{}, nil -} - -func TestConsensusParamsNotNil(t *testing.T) { - app := setupBaseApp(t, func(app *baseapp.BaseApp) { - app.SetBeginBlocker(func(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - require.NotNil(t, ctx.ConsensusParams()) - return abci.ResponseBeginBlock{} - }) - }, func(app *baseapp.BaseApp) { - app.SetEndBlocker(func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - require.NotNil(t, ctx.ConsensusParams()) - return abci.ResponseEndBlock{} - }) - }, func(app *baseapp.BaseApp) { - app.SetTxHandler(MockTxHandler{T: t}) - }) - - header := tmproto.Header{Height: 1} - app.BeginBlock(abci.RequestBeginBlock{Header: header}) - app.EndBlock(abci.RequestEndBlock{Height: header.Height}) - app.CheckTx(abci.RequestCheckTx{}) - app.DeliverTx(abci.RequestDeliverTx{}) - app.Simulate([]byte{}) -} - // Test that we can make commits and then reload old versions. // Test that LoadLatestVersion actually does. func TestLoadVersion(t *testing.T) { logger := defaultLogger() - pruningOpt := baseapp.SetPruning(storetypes.PruneNothing) + pruningOpt := SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) // make a cap key and mount the store err := app.LoadLatestVersion() // needed to make stores non-nil @@ -324,7 +240,7 @@ func TestLoadVersion(t *testing.T) { commitID2 := storetypes.CommitID{Version: 2, Hash: res.Data} // reload with LoadLatestVersion - app = baseapp.NewBaseApp(name, logger, db, pruningOpt) + app = NewBaseApp(name, logger, db, nil, pruningOpt) app.MountStores() err = app.LoadLatestVersion() require.Nil(t, err) @@ -332,7 +248,7 @@ func TestLoadVersion(t *testing.T) { // reload with LoadVersion, see if you can commit the same block and get // the same result - app = baseapp.NewBaseApp(name, logger, db, pruningOpt) + app = NewBaseApp(name, logger, db, nil, pruningOpt) err = app.LoadVersion(1) require.Nil(t, err) testLoadVersionHelper(t, app, int64(1), commitID1) @@ -341,13 +257,13 @@ func TestLoadVersion(t *testing.T) { testLoadVersionHelper(t, app, int64(2), commitID2) } -func useDefaultLoader(app *baseapp.BaseApp) { - app.SetStoreLoader(baseapp.DefaultStoreLoader) +func useDefaultLoader(app *BaseApp) { + app.SetStoreLoader(DefaultStoreLoader) } func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { - rs := rootmulti.NewStore(db) - rs.SetPruning(storetypes.PruneNothing) + rs := rootmulti.NewStore(db, log.NewNopLogger()) + rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) key := sdk.NewKVStoreKey(storeKey) rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) err := rs.LoadLatestVersion() @@ -363,8 +279,8 @@ func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { } func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte) { - rs := rootmulti.NewStore(db) - rs.SetPruning(storetypes.PruneDefault) + rs := rootmulti.NewStore(db, log.NewNopLogger()) + rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) key := sdk.NewKVStoreKey(storeKey) rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) err := rs.LoadLatestVersion() @@ -381,7 +297,7 @@ func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte // Test that LoadLatestVersion actually does. func TestSetLoader(t *testing.T) { cases := map[string]struct { - setLoader func(*baseapp.BaseApp) + setLoader func(*BaseApp) origStoreKey string loadStoreKey string }{ @@ -407,11 +323,11 @@ func TestSetLoader(t *testing.T) { initStore(t, db, tc.origStoreKey, k, v) // load the app with the existing db - opts := []func(*baseapp.BaseApp){baseapp.SetPruning(storetypes.PruneNothing)} + opts := []func(*BaseApp){SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing))} if tc.setLoader != nil { opts = append(opts, tc.setLoader) } - app := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, opts...) + app := NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) app.MountStores(sdk.NewKVStoreKey(tc.loadStoreKey)) err := app.LoadLatestVersion() require.Nil(t, err) @@ -430,10 +346,10 @@ func TestSetLoader(t *testing.T) { func TestVersionSetterGetter(t *testing.T) { logger := defaultLogger() - pruningOpt := baseapp.SetPruning(storetypes.PruneDefault) + pruningOpt := SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) require.Equal(t, "", app.Version()) res := app.Query(abci.RequestQuery{Path: "app/version"}) @@ -450,10 +366,10 @@ func TestVersionSetterGetter(t *testing.T) { func TestLoadVersionInvalid(t *testing.T) { logger := log.NewNopLogger() - pruningOpt := baseapp.SetPruning(storetypes.PruneNothing) + pruningOpt := SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) err := app.LoadLatestVersion() require.Nil(t, err) @@ -468,7 +384,7 @@ func TestLoadVersionInvalid(t *testing.T) { commitID1 := storetypes.CommitID{Version: 1, Hash: res.Data} // create a new app with the stores mounted under the same cap key - app = baseapp.NewBaseApp(name, logger, db, pruningOpt) + app = NewBaseApp(name, logger, db, nil, pruningOpt) // require we can load the latest version err = app.LoadVersion(1) @@ -482,14 +398,11 @@ func TestLoadVersionInvalid(t *testing.T) { func TestLoadVersionPruning(t *testing.T) { logger := log.NewNopLogger() - pruningOptions := storetypes.PruningOptions{ - KeepRecent: 2, - Interval: 1, - } - pruningOpt := baseapp.SetPruning(pruningOptions) + pruningOptions := pruningtypes.NewCustomPruningOptions(10, 15) + pruningOpt := SetPruning(pruningOptions) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) // make a cap key and mount the store capKey := sdk.NewKVStoreKey("key1") @@ -517,17 +430,17 @@ func TestLoadVersionPruning(t *testing.T) { } for _, v := range []int64{1, 2, 4} { - _, err = app.CMS().CacheMultiStoreWithVersion(v) + _, err = app.cms.CacheMultiStoreWithVersion(v) require.NoError(t, err) } for _, v := range []int64{3, 5, 6, 7} { - _, err = app.CMS().CacheMultiStoreWithVersion(v) + _, err = app.cms.CacheMultiStoreWithVersion(v) require.NoError(t, err) } // reload with LoadLatestVersion, check it loads last version - app = baseapp.NewBaseApp(name, logger, db, pruningOpt) + app = NewBaseApp(name, logger, db, nil, pruningOpt) app.MountStores(capKey) err = app.LoadLatestVersion() @@ -535,7 +448,7 @@ func TestLoadVersionPruning(t *testing.T) { testLoadVersionHelper(t, app, int64(7), lastCommitID) } -func testLoadVersionHelper(t *testing.T, app *baseapp.BaseApp, expectedHeight int64, expectedID storetypes.CommitID) { +func testLoadVersionHelper(t *testing.T, app *BaseApp, expectedHeight int64, expectedID storetypes.CommitID) { lastHeight := app.LastBlockHeight() lastID := app.LastCommitID() require.Equal(t, expectedHeight, lastHeight) @@ -545,16 +458,33 @@ func testLoadVersionHelper(t *testing.T, app *baseapp.BaseApp, expectedHeight in func TestOptionFunction(t *testing.T) { logger := defaultLogger() db := dbm.NewMemDB() - bap := baseapp.NewBaseApp("starting name", logger, db, testChangeNameHelper("new name")) - require.Equal(t, bap.GetName(), "new name", "BaseApp should have had name changed via option function") + bap := NewBaseApp("starting name", logger, db, nil, testChangeNameHelper("new name")) + require.Equal(t, bap.name, "new name", "BaseApp should have had name changed via option function") } -func testChangeNameHelper(name string) func(*baseapp.BaseApp) { - return func(bap *baseapp.BaseApp) { - bap.SetName(name) +func testChangeNameHelper(name string) func(*BaseApp) { + return func(bap *BaseApp) { + bap.name = name } } +// Test that txs can be unmarshalled and read and that +// correct error codes are returned when not +func TestTxDecoder(t *testing.T) { + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + + app := newBaseApp(t.Name()) + tx := newTxCounter(1, 0) + txBytes := codec.MustMarshal(tx) + + dTx, err := app.txDecoder(txBytes) + require.NoError(t, err) + + cTx := dTx.(txTest) + require.Equal(t, tx.Counter, cTx.Counter) +} + // Test that Info returns the latest committed state. func TestInfo(t *testing.T) { app := newBaseApp(t.Name()) @@ -598,7 +528,7 @@ func TestBaseAppOptionSeal(t *testing.T) { app.SetEndBlocker(nil) }) require.Panics(t, func() { - app.SetTxHandler(nil) + app.SetAnteHandler(nil) }) require.Panics(t, func() { app.SetAddrPeerFilter(nil) @@ -609,12 +539,15 @@ func TestBaseAppOptionSeal(t *testing.T) { require.Panics(t, func() { app.SetFauxMerkleMode() }) + require.Panics(t, func() { + app.SetRouter(NewRouter()) + }) } func TestSetMinGasPrices(t *testing.T) { minGasPrices := sdk.DecCoins{sdk.NewInt64DecCoin("stake", 5000)} - app := newBaseApp(t.Name(), baseapp.SetMinGasPrices(minGasPrices.String())) - require.Equal(t, minGasPrices, app.MinGasPrices()) + app := newBaseApp(t.Name(), SetMinGasPrices(minGasPrices.String())) + require.Equal(t, minGasPrices, app.minGasPrices) } func TestInitChainer(t *testing.T) { @@ -623,7 +556,7 @@ func TestInitChainer(t *testing.T) { // we can reload the same app later db := dbm.NewMemDB() logger := defaultLogger() - app := baseapp.NewBaseApp(name, logger, db) + app := NewBaseApp(name, logger, db, nil) capKey := sdk.NewKVStoreKey("main") capKey2 := sdk.NewKVStoreKey("key2") app.MountStores(capKey, capKey2) @@ -666,10 +599,10 @@ func TestInitChainer(t *testing.T) { ) // assert that chainID is set correctly in InitChain - chainID := app.DeliverState().Context().ChainID() + chainID := app.deliverState.ctx.ChainID() require.Equal(t, "test-chain-id", chainID, "ChainID in deliverState not set correctly in InitChain") - chainID = app.CheckState().Context().ChainID() + chainID = app.checkState.ctx.ChainID() require.Equal(t, "test-chain-id", chainID, "ChainID in checkState not set correctly in InitChain") app.Commit() @@ -678,7 +611,7 @@ func TestInitChainer(t *testing.T) { require.Equal(t, value, res.Value) // reload app - app = baseapp.NewBaseApp(name, logger, db) + app = NewBaseApp(name, logger, db, nil) app.SetInitChainer(initChainer) app.MountStores(capKey, capKey2) err = app.LoadLatestVersion() // needed to make stores non-nil @@ -702,7 +635,7 @@ func TestInitChain_WithInitialHeight(t *testing.T) { name := t.Name() db := dbm.NewMemDB() logger := defaultLogger() - app := baseapp.NewBaseApp(name, logger, db) + app := NewBaseApp(name, logger, db, nil) app.InitChain( abci.RequestInitChain{ @@ -718,7 +651,7 @@ func TestBeginBlock_WithInitialHeight(t *testing.T) { name := t.Name() db := dbm.NewMemDB() logger := defaultLogger() - app := baseapp.NewBaseApp(name, logger, db) + app := NewBaseApp(name, logger, db, nil) app.InitChain( abci.RequestInitChain{ @@ -749,7 +682,6 @@ type txTest struct { Msgs []sdk.Msg Counter int64 FailOnAnte bool - GasLimit uint64 } func (tx *txTest) setFailOnAnte(fail bool) { @@ -758,7 +690,7 @@ func (tx *txTest) setFailOnAnte(fail bool) { func (tx *txTest) setFailOnHandler(fail bool) { for i, msg := range tx.Msgs { - tx.Msgs[i] = &msgCounter{msg.(*msgCounter).Counter, fail} + tx.Msgs[i] = msgCounter{msg.(msgCounter).Counter, fail} } } @@ -766,12 +698,6 @@ func (tx *txTest) setFailOnHandler(fail bool) { func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs } func (tx txTest) ValidateBasic() error { return nil } -// Implements GasTx -func (tx txTest) GetGas() uint64 { return tx.GasLimit } - -// Implements TxWithTimeoutHeight -func (tx txTest) GetTimeoutHeight() uint64 { return 0 } - const ( routeMsgCounter = "msgCounter" routeMsgCounter2 = "msgCounter2" @@ -786,29 +712,29 @@ type msgCounter struct { } // dummy implementation of proto.Message -func (msg *msgCounter) Reset() {} -func (msg *msgCounter) String() string { return "TODO" } -func (msg *msgCounter) ProtoMessage() {} +func (msg msgCounter) Reset() {} +func (msg msgCounter) String() string { return "TODO" } +func (msg msgCounter) ProtoMessage() {} // Implements Msg -func (msg *msgCounter) Route() string { return routeMsgCounter } -func (msg *msgCounter) Type() string { return "counter1" } -func (msg *msgCounter) GetSignBytes() []byte { return nil } -func (msg *msgCounter) GetSigners() []sdk.AccAddress { return nil } -func (msg *msgCounter) ValidateBasic() error { +func (msg msgCounter) Route() string { return routeMsgCounter } +func (msg msgCounter) Type() string { return "counter1" } +func (msg msgCounter) GetSignBytes() []byte { return nil } +func (msg msgCounter) GetSigners() []sdk.AccAddress { return nil } +func (msg msgCounter) ValidateBasic() error { if msg.Counter >= 0 { return nil } return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "counter should be a non-negative integer") } -func newTxCounter(counter int64, msgCounters ...int64) txTest { +func newTxCounter(counter int64, msgCounters ...int64) *txTest { msgs := make([]sdk.Msg, 0, len(msgCounters)) for _, c := range msgCounters { - msgs = append(msgs, &msgCounter{c, false}) + msgs = append(msgs, msgCounter{c, false}) } - return txTest{msgs, counter, false, math.MaxUint64} + return &txTest{msgs, counter, false} } // a msg we dont know how to route @@ -887,7 +813,7 @@ func testTxDecoder(cdc *codec.LegacyAmino) sdk.TxDecoder { } } -func customHandlerTxTest(t *testing.T, capKey storetypes.StoreKey, storeKey []byte) handlerFun { +func anteHandlerTxTest(t *testing.T, capKey storetypes.StoreKey, storeKey []byte) sdk.AnteHandler { return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { store := ctx.KVStore(capKey) txTest := tx.(txTest) @@ -902,9 +828,11 @@ func customHandlerTxTest(t *testing.T, capKey storetypes.StoreKey, storeKey []by } ctx.EventManager().EmitEvents( - counterEvent("post_handlers", txTest.Counter), + counterEvent("ante_handler", txTest.Counter), ) + ctx = ctx.WithPriority(testTxPriority) + return ctx, nil } } @@ -945,14 +873,6 @@ func handlerMsgCounter(t *testing.T, capKey storetypes.StoreKey, deliverKey []by } res.Events = ctx.EventManager().Events().ToABCIEvents() - - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - res.MsgResponses = []*codectypes.Any{any} - return res, nil } } @@ -984,7 +904,7 @@ func incrementingCounter(t *testing.T, store sdk.KVStore, counterKey []byte, cou return &sdk.Result{}, nil } -// --------------------------------------------------------------------- +//--------------------------------------------------------------------- // Tx processing - CheckTx, DeliverTx, SimulateTx. // These tests use the serialized tx as input, while most others will use the // Check(), Deliver(), Simulate() methods directly. @@ -998,54 +918,50 @@ func TestCheckTx(t *testing.T) { // This ensures changes to the kvstore persist across successive CheckTx. counterKey := []byte("counter-key") - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, counterKey)) } + routerOpt := func(bapp *BaseApp) { // TODO: can remove this once CheckTx doesnt process msgs. - legacyRouter.AddRoute(sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + bapp.Router().AddRoute(sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { return &sdk.Result{}, nil })) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - customHandlerTxTest(t, capKey1, counterKey), - ) - bapp.SetTxHandler(txHandler) } - app := setupBaseApp(t, txHandlerOpt) + app := setupBaseApp(t, anteOpt, routerOpt) nTxs := int64(5) app.InitChain(abci.RequestInitChain{}) + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + for i := int64(0); i < nTxs; i++ { tx := newTxCounter(i, 0) // no messages - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := codec.Marshal(tx) require.NoError(t, err) r := app.CheckTx(abci.RequestCheckTx{Tx: txBytes}) + require.Equal(t, testTxPriority, r.Priority) require.Empty(t, r.GetEvents()) - require.True(t, r.IsOK(), fmt.Sprintf("%+v", r)) + require.True(t, r.IsOK(), fmt.Sprintf("%v", r)) } - checkStateStore := app.CheckState().Context().KVStore(capKey1) + checkStateStore := app.checkState.ctx.KVStore(capKey1) storedCounter := getIntFromStore(checkStateStore, counterKey) - // Ensure storedCounter + // Ensure AnteHandler ran require.Equal(t, nTxs, storedCounter) // If a block is committed, CheckTx state should be reset. header := tmproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header, Hash: []byte("hash")}) - require.NotNil(t, app.CheckState().Context().BlockGasMeter(), "block gas meter should have been set to checkState") - require.NotEmpty(t, app.CheckState().Context().HeaderHash()) + require.NotNil(t, app.checkState.ctx.BlockGasMeter(), "block gas meter should have been set to checkState") + require.NotEmpty(t, app.checkState.ctx.HeaderHash()) app.EndBlock(abci.RequestEndBlock{}) app.Commit() - checkStateStore = app.CheckState().Context().KVStore(capKey1) + checkStateStore = app.checkState.ctx.KVStore(capKey1) storedBytes := checkStateStore.Get(counterKey) require.Nil(t, storedBytes) } @@ -1053,28 +969,24 @@ func TestCheckTx(t *testing.T) { // Test that successive DeliverTx can see each others' effects // on the store, both within and across blocks. func TestDeliverTx(t *testing.T) { - // test increments in the post txHandler + // test increments in the ante anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + // test increments in the handler deliverKey := []byte("deliver-key") - - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - customHandlerTxTest(t, capKey1, anteKey), - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{}) + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + nBlocks := 3 txPerHeight := 5 @@ -1086,14 +998,14 @@ func TestDeliverTx(t *testing.T) { counter := int64(blockN*txPerHeight + i) tx := newTxCounter(counter, counter) - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := codec.Marshal(tx) require.NoError(t, err) res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) events := res.GetEvents() require.Len(t, events, 3, "should contain ante handler, message type and counter events respectively") - require.Equal(t, sdk.MarkEventsToIndex(counterEvent("post_handlers", counter).ToABCIEvents(), map[string]struct{}{})[0], events[0], "ante handler event") + require.Equal(t, sdk.MarkEventsToIndex(counterEvent("ante_handler", counter).ToABCIEvents(), map[string]struct{}{})[0], events[0], "ante handler event") require.Equal(t, sdk.MarkEventsToIndex(counterEvent(sdk.EventTypeMessage, counter).ToABCIEvents(), map[string]struct{}{})[0], events[2], "msg handler update counter event") } @@ -1112,27 +1024,23 @@ func TestMultiMsgCheckTx(t *testing.T) { func TestMultiMsgDeliverTx(t *testing.T) { // increment the tx counter anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + // increment the msg counter deliverKey := []byte("deliver-key") deliverKey2 := []byte("deliver-key2") - - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + routerOpt := func(bapp *BaseApp) { r1 := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) r2 := sdk.NewRoute(routeMsgCounter2, handlerMsgCounter(t, capKey1, deliverKey2)) - legacyRouter.AddRoute(r1) - legacyRouter.AddRoute(r2) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - customHandlerTxTest(t, capKey1, anteKey), - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r1) + bapp.Router().AddRoute(r2) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) + + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) // run a multi-msg tx // with all msgs the same route @@ -1140,12 +1048,12 @@ func TestMultiMsgDeliverTx(t *testing.T) { header := tmproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(0, 0, 1, 2) - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := codec.Marshal(tx) require.NoError(t, err) res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - store := app.DeliverState().Context().KVStore(capKey1) + store := app.deliverState.ctx.KVStore(capKey1) // tx counter only incremented once txCounter := getIntFromStore(store, anteKey) @@ -1160,12 +1068,12 @@ func TestMultiMsgDeliverTx(t *testing.T) { tx = newTxCounter(1, 3) tx.Msgs = append(tx.Msgs, msgCounter2{0}) tx.Msgs = append(tx.Msgs, msgCounter2{1}) - txBytes, err = encCfg.Amino.Marshal(tx) + txBytes, err = codec.Marshal(tx) require.NoError(t, err) res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - store = app.DeliverState().Context().KVStore(capKey1) + store = app.deliverState.ctx.KVStore(capKey1) // tx counter only incremented once txCounter = getIntFromStore(store, anteKey) @@ -1192,35 +1100,29 @@ func TestConcurrentCheckDeliver(t *testing.T) { func TestSimulateTx(t *testing.T) { gasConsumed := uint64(5) - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasConsumed)) + return + }) + } + + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { ctx.GasMeter().ConsumeGas(gasConsumed, "test") - // Return dummy MsgResponse for msgCounter. - any, err := codectypes.NewAnyWithValue(&testdata.Dog{}) - if err != nil { - return nil, err - } - - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil + return &sdk.Result{}, nil }) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { return ctx, nil }, - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{}) + // Create same codec used in txDecoder + cdc := codec.NewLegacyAmino() + registerTestCodec(cdc) + nBlocks := 3 for blockN := 0; blockN < nBlocks; blockN++ { count := int64(blockN + 1) @@ -1228,8 +1130,7 @@ func TestSimulateTx(t *testing.T) { app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(count, count) - tx.GasLimit = gasConsumed - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := cdc.Marshal(tx) require.Nil(t, err) // simulate a message, check gas reported @@ -1266,32 +1167,19 @@ func TestSimulateTx(t *testing.T) { } func TestRunInvalidTransaction(t *testing.T) { - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + return + }) + } + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil + return &sdk.Result{}, nil }) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - return - }, - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) header := tmproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) @@ -1299,7 +1187,8 @@ func TestRunInvalidTransaction(t *testing.T) { // transaction with no messages { emptyTx := &txTest{} - _, result, err := app.SimDeliver(aminoTxEncoder(encCfg.Amino), emptyTx) + _, result, err := app.SimDeliver(aminoTxEncoder(), emptyTx) + require.Error(t, err) require.Nil(t, result) space, code, _ := sdkerrors.ABCIInfo(err, false) @@ -1310,7 +1199,7 @@ func TestRunInvalidTransaction(t *testing.T) { // transaction where ValidateBasic fails { testCases := []struct { - tx txTest + tx *txTest fail bool }{ {newTxCounter(0, 0), false}, @@ -1325,7 +1214,7 @@ func TestRunInvalidTransaction(t *testing.T) { for _, testCase := range testCases { tx := testCase.tx - _, _, err := app.SimDeliver(aminoTxEncoder(encCfg.Amino), tx) + _, result, err := app.SimDeliver(aminoTxEncoder(), tx) if testCase.fail { require.Error(t, err) @@ -1334,15 +1223,15 @@ func TestRunInvalidTransaction(t *testing.T) { require.EqualValues(t, sdkerrors.ErrInvalidSequence.Codespace(), space, err) require.EqualValues(t, sdkerrors.ErrInvalidSequence.ABCICode(), code, err) } else { - require.NoError(t, err) + require.NotNil(t, result) } } } // transaction with no known route { - unknownRouteTx := txTest{[]sdk.Msg{&msgNoRoute{}}, 0, false, math.MaxUint64} - _, result, err := app.SimDeliver(aminoTxEncoder(encCfg.Amino), unknownRouteTx) + unknownRouteTx := txTest{[]sdk.Msg{msgNoRoute{}}, 0, false} + _, result, err := app.SimDeliver(aminoTxEncoder(), unknownRouteTx) require.Error(t, err) require.Nil(t, result) @@ -1350,8 +1239,8 @@ func TestRunInvalidTransaction(t *testing.T) { require.EqualValues(t, sdkerrors.ErrUnknownRequest.Codespace(), space, err) require.EqualValues(t, sdkerrors.ErrUnknownRequest.ABCICode(), code, err) - unknownRouteTx = txTest{[]sdk.Msg{&msgCounter{}, &msgNoRoute{}}, 0, false, math.MaxUint64} - _, result, err = app.SimDeliver(aminoTxEncoder(encCfg.Amino), unknownRouteTx) + unknownRouteTx = txTest{[]sdk.Msg{msgCounter{}, msgNoRoute{}}, 0, false} + _, result, err = app.SimDeliver(aminoTxEncoder(), unknownRouteTx) require.Error(t, err) require.Nil(t, result) @@ -1363,14 +1252,12 @@ func TestRunInvalidTransaction(t *testing.T) { // Transaction with an unregistered message { tx := newTxCounter(0, 0) - tx.Msgs = append(tx.Msgs, &msgNoDecode{}) + tx.Msgs = append(tx.Msgs, msgNoDecode{}) - // new codec so we can encode the tx, but we shouldn't be able to decode, - // because baseapp's codec is not aware of msgNoDecode. + // new codec so we can encode the tx, but we shouldn't be able to decode newCdc := codec.NewLegacyAmino() - sdk.RegisterLegacyAminoCodec(newCdc) // register Tx, Msg registerTestCodec(newCdc) - legacy.RegisterAminoMsg(newCdc, &msgNoDecode{}, "cosmos-sdk/baseapp/msgNoDecode") + newCdc.RegisterConcrete(&msgNoDecode{}, "cosmos-sdk/baseapp/msgNoDecode", nil) txBytes, err := newCdc.Marshal(tx) require.NoError(t, err) @@ -1384,46 +1271,49 @@ func TestRunInvalidTransaction(t *testing.T) { // Test that transactions exceeding gas limits fail func TestTxGasLimits(t *testing.T) { gasGranted := uint64(10) + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) + + // AnteHandlers must have their own defer/recover in order for the BaseApp + // to know how much gas was used! This is because the GasMeter is created in + // the AnteHandler, but if it panics the context won't be set properly in + // runTx's recover call. + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", rType.Descriptor) + default: + panic(r) + } + } + }() + + count := tx.(txTest).Counter + newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") + + return newCtx, nil + }) - ante := func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { - count := tx.(txTest).Counter - ctx.GasMeter().ConsumeGas(uint64(count), "counter-ante") - return ctx, nil } - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { count := msg.(*msgCounter).Counter ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil + return &sdk.Result{}, nil }) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - ante, - ) - - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) header := tmproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) testCases := []struct { - tx txTest + tx *txTest gasUsed uint64 fail bool }{ @@ -1448,8 +1338,7 @@ func TestTxGasLimits(t *testing.T) { for i, tc := range testCases { tx := tc.tx - tx.GasLimit = gasGranted - gInfo, result, err := app.SimDeliver(aminoTxEncoder(encCfg.Amino), tx) + gInfo, result, err := app.SimDeliver(aminoTxEncoder(), tx) // check gas used and wanted require.Equal(t, tc.gasUsed, gInfo.GasUsed, fmt.Sprintf("tc #%d; gas: %v, result: %v, err: %s", i, gInfo, result, err)) @@ -1471,51 +1360,48 @@ func TestTxGasLimits(t *testing.T) { // Test that transactions exceeding gas limits fail func TestMaxBlockGasLimits(t *testing.T) { gasGranted := uint64(10) - ante := func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { - count := tx.(txTest).Counter - ctx.GasMeter().ConsumeGas(uint64(count), "counter-ante") + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) + + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", rType.Descriptor) + default: + panic(r) + } + } + }() - return ctx, nil + count := tx.(txTest).Counter + newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") + + return + }) } - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { count := msg.(*msgCounter).Counter ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") - - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil + return &sdk.Result{}, nil }) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - ante, - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + ConsensusParams: &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxGas: 100, }, }, }) testCases := []struct { - tx txTest + tx *txTest numDelivers int gasUsedPerDeliver uint64 fail bool @@ -1535,7 +1421,6 @@ func TestMaxBlockGasLimits(t *testing.T) { for i, tc := range testCases { tx := tc.tx - tx.GasLimit = gasGranted // reset the block gas header := tmproto.Header{Height: app.LastBlockHeight() + 1} @@ -1543,9 +1428,9 @@ func TestMaxBlockGasLimits(t *testing.T) { // execute the transaction multiple times for j := 0; j < tc.numDelivers; j++ { - _, result, err := app.SimDeliver(aminoTxEncoder(encCfg.Amino), tx) + _, result, err := app.SimDeliver(aminoTxEncoder(), tx) - ctx := app.DeliverState().Context() + ctx := app.getState(runTxModeDeliver).ctx // check for failed transactions if tc.fail && (j+1) > tc.failAfterDeliver { @@ -1572,27 +1457,66 @@ func TestMaxBlockGasLimits(t *testing.T) { } } -func TestBaseAppMiddleware(t *testing.T) { +// Test custom panic handling within app.DeliverTx method +func TestCustomRunTxPanicHandler(t *testing.T) { + const customPanicMsg = "test panic" + anteErr := sdkerrors.Register("fakeModule", 100500, "fakeError") + + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + panic(sdkerrors.Wrap(anteErr, "anteHandler")) + }) + } + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app := setupBaseApp(t, anteOpt, routerOpt) + + header := tmproto.Header{Height: 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + app.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error { + err, ok := recoveryObj.(error) + if !ok { + return nil + } + + if anteErr.Is(err) { + panic(customPanicMsg) + } else { + return nil + } + }) + + // Transaction should panic with custom handler above + { + tx := newTxCounter(0, 0) + + require.PanicsWithValue(t, customPanicMsg, func() { app.SimDeliver(aminoTxEncoder(), tx) }) + } +} + +func TestBaseAppAnteHandler(t *testing.T) { anteKey := []byte("ante-key") - deliverKey := []byte("deliver-key") + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) + } - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + deliverKey := []byte("deliver-key") + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - customHandlerTxTest(t, capKey1, anteKey), - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + cdc := codec.NewLegacyAmino() + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{}) + registerTestCodec(cdc) header := tmproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) @@ -1600,16 +1524,16 @@ func TestBaseAppMiddleware(t *testing.T) { // execute a tx that will fail ante handler execution // // NOTE: State should not be mutated here. This will be implicitly checked by - // the next txs ante handler execution (customHandlerTxTest). + // the next txs ante handler execution (anteHandlerTxTest). tx := newTxCounter(0, 0) tx.setFailOnAnte(true) - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := cdc.Marshal(tx) require.NoError(t, err) res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.Empty(t, res.Events) require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) - ctx := app.DeliverState().Context() + ctx := app.getState(runTxModeDeliver).ctx store := ctx.KVStore(capKey1) require.Equal(t, int64(0), getIntFromStore(store, anteKey)) @@ -1618,14 +1542,15 @@ func TestBaseAppMiddleware(t *testing.T) { tx = newTxCounter(0, 0) tx.setFailOnHandler(true) - txBytes, err = encCfg.Amino.Marshal(tx) + txBytes, err = cdc.Marshal(tx) require.NoError(t, err) res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.Empty(t, res.Events) + // should emit ante event + require.NotEmpty(t, res.Events) require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) - ctx = app.DeliverState().Context() + ctx = app.getState(runTxModeDeliver).ctx store = ctx.KVStore(capKey1) require.Equal(t, int64(1), getIntFromStore(store, anteKey)) require.Equal(t, int64(0), getIntFromStore(store, deliverKey)) @@ -1634,14 +1559,14 @@ func TestBaseAppMiddleware(t *testing.T) { // implicitly checked by previous tx executions tx = newTxCounter(1, 0) - txBytes, err = encCfg.Amino.Marshal(tx) + txBytes, err = cdc.Marshal(tx) require.NoError(t, err) res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.NotEmpty(t, res.Events) require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - ctx = app.DeliverState().Context() + ctx = app.getState(runTxModeDeliver).ctx store = ctx.KVStore(capKey1) require.Equal(t, int64(2), getIntFromStore(store, anteKey)) require.Equal(t, int64(1), getIntFromStore(store, deliverKey)) @@ -1653,39 +1578,48 @@ func TestBaseAppMiddleware(t *testing.T) { func TestGasConsumptionBadTx(t *testing.T) { gasWanted := uint64(5) - ante := func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { - txTest := tx.(txTest) - ctx.GasMeter().ConsumeGas(uint64(txTest.Counter), "counter-ante") - if txTest.FailOnAnte { - return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") - } + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasWanted)) + + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + log := fmt.Sprintf("out of gas in location: %v", rType.Descriptor) + err = sdkerrors.Wrap(sdkerrors.ErrOutOfGas, log) + default: + panic(r) + } + } + }() - return ctx, nil + txTest := tx.(txTest) + newCtx.GasMeter().ConsumeGas(uint64(txTest.Counter), "counter-ante") + if txTest.FailOnAnte { + return newCtx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") + } + + return + }) } - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { count := msg.(*msgCounter).Counter ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") return &sdk.Result{}, nil }) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - ante, - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + cdc := codec.NewLegacyAmino() + registerTestCodec(cdc) + + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + ConsensusParams: &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxGas: 9, }, }, @@ -1697,9 +1631,8 @@ func TestGasConsumptionBadTx(t *testing.T) { app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(5, 0) - tx.GasLimit = gasWanted tx.setFailOnAnte(true) - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := cdc.Marshal(tx) require.NoError(t, err) res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) @@ -1707,7 +1640,7 @@ func TestGasConsumptionBadTx(t *testing.T) { // require next tx to fail due to black gas limit tx = newTxCounter(5, 0) - txBytes, err = encCfg.Amino.Marshal(tx) + txBytes, err = cdc.Marshal(tx) require.NoError(t, err) res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) @@ -1717,37 +1650,24 @@ func TestGasConsumptionBadTx(t *testing.T) { // Test that we can only query from the latest committed state. func TestQuery(t *testing.T) { key, value := []byte("hello"), []byte("goodbye") + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + store := ctx.KVStore(capKey1) + store.Set(key, value) + return + }) + } - txHandlerOpt := func(bapp *baseapp.BaseApp) { - legacyRouter := middleware.NewLegacyRouter() + routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { store := ctx.KVStore(capKey1) store.Set(key, value) - - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil + return &sdk.Result{}, nil }) - legacyRouter.AddRoute(r) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: testTxDecoder(encCfg.Amino), - }, - func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - store := ctx.KVStore(capKey1) - store.Set(key, value) - return - }, - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{}) @@ -1765,7 +1685,7 @@ func TestQuery(t *testing.T) { require.Equal(t, 0, len(res.Value)) // query is still empty after a CheckTx - _, resTx, err := app.SimCheck(aminoTxEncoder(encCfg.Amino), tx) + _, resTx, err := app.SimCheck(aminoTxEncoder(), tx) require.NoError(t, err) require.NotNil(t, resTx) res = app.Query(query) @@ -1775,7 +1695,7 @@ func TestQuery(t *testing.T) { header := tmproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) - _, resTx, err = app.SimDeliver(aminoTxEncoder(encCfg.Amino), tx) + _, resTx, err = app.SimDeliver(aminoTxEncoder(), tx) require.NoError(t, err) require.NotNil(t, resTx) res = app.Query(query) @@ -1788,7 +1708,7 @@ func TestQuery(t *testing.T) { } func TestGRPCQuery(t *testing.T) { - grpcQueryOpt := func(bapp *baseapp.BaseApp) { + grpcQueryOpt := func(bapp *BaseApp) { testdata.RegisterQueryServer( bapp.GRPCQueryRouter(), testdata.QueryImpl{}, @@ -1822,51 +1742,16 @@ func TestGRPCQuery(t *testing.T) { require.Equal(t, "Hello foo!", res.Greeting) } -func TestGRPCQueryPulsar(t *testing.T) { - grpcQueryOpt := func(bapp *baseapp.BaseApp) { - testdata_pulsar.RegisterQueryServer( - bapp.GRPCQueryRouter(), - testdata_pulsar.QueryImpl{}, - ) - } - - app := setupBaseApp(t, grpcQueryOpt) - app.GRPCQueryRouter().SetInterfaceRegistry(codectypes.NewInterfaceRegistry()) - - app.InitChain(abci.RequestInitChain{}) - header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(abci.RequestBeginBlock{Header: header}) - app.Commit() - - req := &testdata_pulsar.SayHelloRequest{Name: "foo"} - reqBz, err := proto.Marshal(req) - require.NoError(t, err) - - reqQuery := abci.RequestQuery{ - Data: reqBz, - Path: "/testdata.Query/SayHello", - } - - resQuery := app.Query(reqQuery) - - require.Equal(t, abci.CodeTypeOK, resQuery.Code, resQuery) - - var res testdata_pulsar.SayHelloResponse - err = proto.Unmarshal(resQuery.Value, &res) - require.NoError(t, err) - require.Equal(t, "Hello foo!", res.Greeting) -} - // Test p2p filter queries func TestP2PQuery(t *testing.T) { - addrPeerFilterOpt := func(bapp *baseapp.BaseApp) { + addrPeerFilterOpt := func(bapp *BaseApp) { bapp.SetAddrPeerFilter(func(addrport string) abci.ResponseQuery { require.Equal(t, "1.1.1.1:8000", addrport) return abci.ResponseQuery{Code: uint32(3)} }) } - idPeerFilterOpt := func(bapp *baseapp.BaseApp) { + idPeerFilterOpt := func(bapp *BaseApp) { bapp.SetIDPeerFilter(func(id string) abci.ResponseQuery { require.Equal(t, "testid", id) return abci.ResponseQuery{Code: uint32(4)} @@ -1893,22 +1778,30 @@ func TestGetMaximumBlockGas(t *testing.T) { app.InitChain(abci.RequestInitChain{}) ctx := app.NewContext(true, tmproto.Header{}) - app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 0}}) - require.Equal(t, uint64(0), app.GetMaximumBlockGas(ctx)) + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 0}}) + require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx)) - app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -1}}) - require.Equal(t, uint64(0), app.GetMaximumBlockGas(ctx)) + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: -1}}) + require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx)) - app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 5000000}}) - require.Equal(t, uint64(5000000), app.GetMaximumBlockGas(ctx)) + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 5000000}}) + require.Equal(t, uint64(5000000), app.getMaximumBlockGas(ctx)) - app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -5000000}}) - require.Panics(t, func() { app.GetMaximumBlockGas(ctx) }) + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: -5000000}}) + require.Panics(t, func() { app.getMaximumBlockGas(ctx) }) } func TestListSnapshots(t *testing.T) { - app, teardown := setupBaseAppWithSnapshots(t, 5, 4) - defer teardown() + setupConfig := &setupConfig{ + blocks: 5, + blockTxs: 4, + snapshotInterval: 2, + snapshotKeepRecent: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + + app, err := setupBaseAppWithSnapshots(t, setupConfig) + require.NoError(t, err) resp := app.ListSnapshots(abci.RequestListSnapshots{}) for _, s := range resp.Snapshots { @@ -1923,9 +1816,148 @@ func TestListSnapshots(t *testing.T) { }}, resp) } +func TestSnapshotWithPruning(t *testing.T) { + testcases := map[string]struct { + config *setupConfig + expectedSnapshots []*abci.Snapshot + expectedErr error + }{ + "prune nothing with snapshot": { + config: &setupConfig{ + blocks: 20, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepRecent: 1, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "prune everything with snapshot": { + config: &setupConfig{ + blocks: 20, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepRecent: 1, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "default pruning with snapshot": { + config: &setupConfig{ + blocks: 20, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepRecent: 1, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "custom": { + config: &setupConfig{ + blocks: 25, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepRecent: 2, + pruningOpts: pruningtypes.NewCustomPruningOptions(12, 12), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 25, Format: 2, Chunks: 6}, + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "no snapshots": { + config: &setupConfig{ + blocks: 10, + blockTxs: 2, + snapshotInterval: 0, // 0 implies disable snapshots + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + }, + expectedSnapshots: []*abci.Snapshot{}, + }, + "keep all snapshots": { + config: &setupConfig{ + blocks: 10, + blockTxs: 2, + snapshotInterval: 3, + snapshotKeepRecent: 0, // 0 implies keep all snapshots + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 9, Format: 2, Chunks: 2}, + {Height: 6, Format: 2, Chunks: 2}, + {Height: 3, Format: 2, Chunks: 1}, + }, + }, + } + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + app, err := setupBaseAppWithSnapshots(t, tc.config) + + if tc.expectedErr != nil { + require.Error(t, err) + require.Equal(t, tc.expectedErr.Error(), err.Error()) + return + } + require.NoError(t, err) + + resp := app.ListSnapshots(abci.RequestListSnapshots{}) + for _, s := range resp.Snapshots { + assert.NotEmpty(t, s.Hash) + assert.NotEmpty(t, s.Metadata) + s.Hash = nil + s.Metadata = nil + } + fmt.Println(resp) + assert.Equal(t, abci.ResponseListSnapshots{Snapshots: tc.expectedSnapshots}, resp) + + // Validate that heights were pruned correctly by querying the state at the last height that should be present relative to latest + // and the first height that should be pruned. + // + // Exceptions: + // * Prune nothing: should be able to query all heights (we only test first and latest) + // * Prune default: should be able to query all heights (we only test first and latest) + // * The reason for default behaving this way is that we only commit 20 heights but default has 100_000 keep-recent + var lastExistingHeight int64 + if tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningNothing || tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningDefault { + lastExistingHeight = 1 + } else { + // Integer division rounds down so by multiplying back we get the last height at which we pruned + lastExistingHeight = int64((tc.config.blocks/tc.config.pruningOpts.Interval)*tc.config.pruningOpts.Interval - tc.config.pruningOpts.KeepRecent) + } + + // Query 1 + res := app.Query(abci.RequestQuery{Path: fmt.Sprintf("/store/%s/key", capKey2.Name()), Data: []byte("0"), Height: lastExistingHeight}) + require.NotNil(t, res, "height: %d", lastExistingHeight) + require.NotNil(t, res.Value, "height: %d", lastExistingHeight) + + // Query 2 + res = app.Query(abci.RequestQuery{Path: fmt.Sprintf("/store/%s/key", capKey2.Name()), Data: []byte("0"), Height: lastExistingHeight - 1}) + require.NotNil(t, res, "height: %d", lastExistingHeight-1) + if tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningNothing || tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningDefault { + // With prune nothing or default, we query height 0 which translates to the latest height. + require.NotNil(t, res.Value, "height: %d", lastExistingHeight-1) + } + }) + } +} + func TestLoadSnapshotChunk(t *testing.T) { - app, teardown := setupBaseAppWithSnapshots(t, 2, 5) - defer teardown() + setupConfig := &setupConfig{ + blocks: 2, + blockTxs: 5, + snapshotInterval: 2, + snapshotKeepRecent: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + app, err := setupBaseAppWithSnapshots(t, setupConfig) + require.NoError(t, err) testcases := map[string]struct { height uint64 @@ -1960,8 +1992,15 @@ func TestLoadSnapshotChunk(t *testing.T) { func TestOfferSnapshot_Errors(t *testing.T) { // Set up app before test cases, since it's fairly expensive. - app, teardown := setupBaseAppWithSnapshots(t, 0, 0) - defer teardown() + setupConfig := &setupConfig{ + blocks: 0, + blockTxs: 0, + snapshotInterval: 2, + snapshotKeepRecent: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + app, err := setupBaseAppWithSnapshots(t, setupConfig) + require.NoError(t, err) m := snapshottypes.Metadata{ChunkHashes: [][]byte{{1}, {2}, {3}}} metadata, err := m.Marshal() @@ -2015,11 +2054,25 @@ func TestOfferSnapshot_Errors(t *testing.T) { } func TestApplySnapshotChunk(t *testing.T) { - source, teardown := setupBaseAppWithSnapshots(t, 4, 10) - defer teardown() + setupConfig1 := &setupConfig{ + blocks: 4, + blockTxs: 10, + snapshotInterval: 2, + snapshotKeepRecent: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + source, err := setupBaseAppWithSnapshots(t, setupConfig1) + require.NoError(t, err) - target, teardown := setupBaseAppWithSnapshots(t, 0, 0) - defer teardown() + setupConfig2 := &setupConfig{ + blocks: 0, + blockTxs: 0, + snapshotInterval: 2, + snapshotKeepRecent: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + target, err := setupBaseAppWithSnapshots(t, setupConfig2) + require.NoError(t, err) // Fetch latest snapshot to restore respList := source.ListSnapshots(abci.RequestListSnapshots{}) @@ -2086,22 +2139,25 @@ func (rtr *testCustomRouter) Route(ctx sdk.Context, path string) sdk.Handler { } func TestWithRouter(t *testing.T) { + // test increments in the ante + anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + // test increments in the handler deliverKey := []byte("deliver-key") - - txHandlerOpt := func(bapp *baseapp.BaseApp) { - customRouter := &testCustomRouter{routes: sync.Map{}} + routerOpt := func(bapp *BaseApp) { + bapp.SetRouter(&testCustomRouter{routes: sync.Map{}}) r := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) - customRouter.AddRoute(r) - txHandler := middleware.ComposeMiddlewares( - middleware.NewRunMsgsTxHandler(middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), customRouter), - middleware.NewTxDecoderMiddleware(testTxDecoder(encCfg.Amino)), - ) - bapp.SetTxHandler(txHandler) + bapp.Router().AddRoute(r) } - app := setupBaseApp(t, txHandlerOpt) + + app := setupBaseApp(t, anteOpt, routerOpt) app.InitChain(abci.RequestInitChain{}) + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + nBlocks := 3 txPerHeight := 5 @@ -2113,7 +2169,7 @@ func TestWithRouter(t *testing.T) { counter := int64(blockN*txPerHeight + i) tx := newTxCounter(counter, counter) - txBytes, err := encCfg.Amino.Marshal(tx) + txBytes, err := codec.Marshal(tx) require.NoError(t, err) res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) @@ -2130,13 +2186,13 @@ func TestBaseApp_EndBlock(t *testing.T) { name := t.Name() logger := defaultLogger() - cp := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + cp := &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxGas: 5000000, }, } - app := baseapp.NewBaseApp(name, logger, db) + app := NewBaseApp(name, logger, db, nil) app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) app.InitChain(abci.RequestInitChain{ ConsensusParams: cp, diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go new file mode 100644 index 000000000000..f671e84336e2 --- /dev/null +++ b/baseapp/block_gas_test.go @@ -0,0 +1,201 @@ +package baseapp_test + +import ( + "fmt" + "math" + "testing" + + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + dbm "github.com/tendermint/tm-db" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/tx" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +) + +var blockMaxGas = uint64(simapp.DefaultConsensusParams.Block.MaxGas) + +func TestBaseApp_BlockGas(t *testing.T) { + testcases := []struct { + name string + gasToConsume uint64 // gas to consume in the msg execution + panicTx bool // panic explicitly in tx execution + expErr bool + }{ + {"less than block gas meter", 10, false, false}, + {"more than block gas meter", blockMaxGas, false, true}, + {"more than block gas meter", uint64(float64(blockMaxGas) * 1.2), false, true}, + {"consume MaxUint64", math.MaxUint64, false, true}, + {"consume MaxGasWanted", txtypes.MaxGasWanted, false, true}, + {"consume block gas when paniced", 10, true, true}, + } + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + var app *simapp.SimApp + routerOpt := func(bapp *baseapp.BaseApp) { + route := (&testdata.TestMsg{}).Route() + bapp.Router().AddRoute(sdk.NewRoute(route, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + _, ok := msg.(*testdata.TestMsg) + if !ok { + return &sdk.Result{}, fmt.Errorf("Wrong Msg type, expected %T, got %T", (*testdata.TestMsg)(nil), msg) + } + ctx.KVStore(app.GetKey(banktypes.ModuleName)).Set([]byte("ok"), []byte("ok")) + ctx.GasMeter().ConsumeGas(tc.gasToConsume, "TestMsg") + if tc.panicTx { + panic("panic in tx execution") + } + return &sdk.Result{}, nil + })) + } + encCfg := simapp.MakeTestEncodingConfig() + encCfg.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) + encCfg.InterfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), + &testdata.TestMsg{}, + ) + app = simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, map[int64]bool{}, "", 0, encCfg, simapp.EmptyAppOptions{}, routerOpt) + genState := simapp.GenesisStateWithSingleValidator(t, app) + stateBytes, err := tmjson.MarshalIndent(genState, "", " ") + require.NoError(t, err) + app.InitChain(abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: simapp.DefaultConsensusParams, + AppStateBytes: stateBytes, + }) + + ctx := app.NewContext(false, tmproto.Header{}) + + // tx fee + feeCoin := sdk.NewCoin("atom", sdk.NewInt(150)) + feeAmount := sdk.NewCoins(feeCoin) + + // test account and fund + priv1, _, addr1 := testdata.KeyTestPubAddr() + err = app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, feeAmount) + require.NoError(t, err) + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr1, feeAmount) + require.NoError(t, err) + require.Equal(t, feeCoin.Amount, app.BankKeeper.GetBalance(ctx, addr1, feeCoin.Denom).Amount) + seq, _ := app.AccountKeeper.GetSequence(ctx, addr1) + require.Equal(t, uint64(0), seq) + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + + txBuilder := encCfg.TxConfig.NewTxBuilder() + require.NoError(t, txBuilder.SetMsgs(msg)) + txBuilder.SetFeeAmount(feeAmount) + txBuilder.SetGasLimit(txtypes.MaxGasWanted) // tx validation checks that gasLimit can't be bigger than this + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{7}, []uint64{0} + _, txBytes, err := createTestTx(encCfg.TxConfig, txBuilder, privs, accNums, accSeqs, ctx.ChainID()) + require.NoError(t, err) + + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + rsp := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + + // check result + ctx = app.GetContextForDeliverTx(txBytes) + okValue := ctx.KVStore(app.GetKey(banktypes.ModuleName)).Get([]byte("ok")) + + if tc.expErr { + if tc.panicTx { + require.Equal(t, sdkerrors.ErrPanic.ABCICode(), rsp.Code) + } else { + require.Equal(t, sdkerrors.ErrOutOfGas.ABCICode(), rsp.Code) + } + require.Empty(t, okValue) + } else { + require.Equal(t, uint32(0), rsp.Code) + require.Equal(t, []byte("ok"), okValue) + } + // check block gas is always consumed + baseGas := uint64(70184) // baseGas is the gas consumed before tx msg + expGasConsumed := addUint64Saturating(tc.gasToConsume, baseGas) + if expGasConsumed > txtypes.MaxGasWanted { + // capped by gasLimit + expGasConsumed = txtypes.MaxGasWanted + } + require.Equal(t, expGasConsumed, ctx.BlockGasMeter().GasConsumed()) + // tx fee is always deducted + require.Equal(t, int64(0), app.BankKeeper.GetBalance(ctx, addr1, feeCoin.Denom).Amount.Int64()) + // sender's sequence is always increased + seq, err = app.AccountKeeper.GetSequence(ctx, addr1) + require.NoError(t, err) + require.Equal(t, uint64(1), seq) + }) + } +} + +func createTestTx(txConfig client.TxConfig, txBuilder client.TxBuilder, privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, []byte, error) { + // First round: we gather all the signer infos. We use the "set empty + // signature" hack to do that. + var sigsV2 []signing.SignatureV2 + for i, priv := range privs { + sigV2 := signing.SignatureV2{ + PubKey: priv.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: txConfig.SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: accSeqs[i], + } + + sigsV2 = append(sigsV2, sigV2) + } + err := txBuilder.SetSignatures(sigsV2...) + if err != nil { + return nil, nil, err + } + + // Second round: all signer infos are set, so each signer can sign. + sigsV2 = []signing.SignatureV2{} + for i, priv := range privs { + signerData := xauthsigning.SignerData{ + Address: sdk.AccAddress(priv.PubKey().Bytes()).String(), + ChainID: chainID, + AccountNumber: accNums[i], + Sequence: accSeqs[i], + } + sigV2, err := tx.SignWithPrivKey( + txConfig.SignModeHandler().DefaultMode(), signerData, + txBuilder, priv, txConfig, accSeqs[i]) + if err != nil { + return nil, nil, err + } + + sigsV2 = append(sigsV2, sigV2) + } + err = txBuilder.SetSignatures(sigsV2...) + if err != nil { + return nil, nil, err + } + + txBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return nil, nil, err + } + + return txBuilder.GetTx(), txBytes, nil +} + +func addUint64Saturating(a, b uint64) uint64 { + if math.MaxUint64-a < b { + return math.MaxUint64 + } + + return a + b +} diff --git a/baseapp/custom_txhandler_test.go b/baseapp/custom_txhandler_test.go deleted file mode 100644 index 27cec992ed10..000000000000 --- a/baseapp/custom_txhandler_test.go +++ /dev/null @@ -1,116 +0,0 @@ -package baseapp_test - -import ( - "context" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/tendermint/tendermint/crypto/tmhash" -) - -type handlerFun func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) - -type customTxHandler struct { - handler handlerFun - next tx.Handler -} - -var _ tx.Handler = customTxHandler{} - -// CustomTxMiddleware is being used in tests for testing -// custom pre-`runMsgs` logic (also called antehandlers before). -func CustomTxHandlerMiddleware(handler handlerFun) tx.Middleware { - return func(txHandler tx.Handler) tx.Handler { - return customTxHandler{ - handler: handler, - next: txHandler, - } - } -} - -// CheckTx implements tx.Handler.CheckTx method. -func (txh customTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - sdkCtx, err := txh.runHandler(ctx, req.Tx, req.TxBytes, false) - if err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return txh.next.CheckTx(sdk.WrapSDKContext(sdkCtx), req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx method. -func (txh customTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - sdkCtx, err := txh.runHandler(ctx, req.Tx, req.TxBytes, false) - if err != nil { - return tx.Response{}, err - } - - return txh.next.DeliverTx(sdk.WrapSDKContext(sdkCtx), req) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh customTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - sdkCtx, err := txh.runHandler(ctx, req.Tx, req.TxBytes, true) - if err != nil { - return tx.Response{}, err - } - - return txh.next.SimulateTx(sdk.WrapSDKContext(sdkCtx), req) -} - -func (txh customTxHandler) runHandler(ctx context.Context, tx sdk.Tx, txBytes []byte, isSimulate bool) (sdk.Context, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - if txh.handler == nil { - return sdkCtx, nil - } - - ms := sdkCtx.MultiStore() - - // Branch context before Handler call in case it aborts. - // This is required for both CheckTx and DeliverTx. - // Ref: https://github.com/cosmos/cosmos-sdk/issues/2772 - // - // NOTE: Alternatively, we could require that Handler ensures that - // writes do not happen if aborted/failed. This may have some - // performance benefits, but it'll be more difficult to get right. - cacheCtx, msCache := cacheTxContext(sdkCtx, txBytes) - cacheCtx = cacheCtx.WithEventManager(sdk.NewEventManager()) - newCtx, err := txh.handler(cacheCtx, tx, isSimulate) - if err != nil { - return sdk.Context{}, err - } - - if !newCtx.IsZero() { - // At this point, newCtx.MultiStore() is a store branch, or something else - // replaced by the Handler. We want the original multistore. - // - // Also, in the case of the tx aborting, we need to track gas consumed via - // the instantiated gas meter in the Handler, so we update the context - // prior to returning. - sdkCtx = newCtx.WithMultiStore(ms) - } - - msCache.Write() - - return sdkCtx, nil -} - -// cacheTxContext returns a new context based off of the provided context with -// a branched multi-store. -func cacheTxContext(sdkCtx sdk.Context, txBytes []byte) (sdk.Context, sdk.CacheMultiStore) { - ms := sdkCtx.MultiStore() - // TODO: https://github.com/cosmos/cosmos-sdk/issues/2824 - msCache := ms.CacheMultiStore() - if msCache.TracingEnabled() { - msCache = msCache.SetTracingContext( - sdk.TraceContext( - map[string]interface{}{ - "txHash": fmt.Sprintf("%X", tmhash.Sum(txBytes)), - }, - ), - ).(sdk.CacheMultiStore) - } - - return sdkCtx.WithMultiStore(msCache), msCache -} diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index 11151f0e7210..232a6a2ad155 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -2,11 +2,10 @@ package baseapp_test import ( "context" + "os" "sync" "testing" - "github.com/cosmos/cosmos-sdk/testutil/testdata_pulsar" - "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" @@ -22,7 +21,7 @@ func TestGRPCQueryRouter(t *testing.T) { qr := baseapp.NewGRPCQueryRouter() interfaceRegistry := testdata.NewTestInterfaceRegistry() qr.SetInterfaceRegistry(interfaceRegistry) - testdata_pulsar.RegisterQueryServer(qr, testdata_pulsar.QueryImpl{}) + testdata.RegisterQueryServer(qr, testdata.QueryImpl{}) helper := &baseapp.QueryServiceTestHelper{ GRPCQueryRouter: qr, Ctx: sdk.Context{}.WithContext(context.Background()), @@ -56,8 +55,7 @@ func TestRegisterQueryServiceTwice(t *testing.T) { // Setup baseapp. db := dbm.NewMemDB() encCfg := simapp.MakeTestEncodingConfig() - logger, _ := log.NewDefaultLogger("plain", "info", false) - app := baseapp.NewBaseApp("test", logger, db) + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterInterfaces(encCfg.InterfaceRegistry) diff --git a/baseapp/grpcserver.go b/baseapp/grpcserver.go index 68cc14e66545..9b4626cd142c 100644 --- a/baseapp/grpcserver.go +++ b/baseapp/grpcserver.go @@ -61,7 +61,9 @@ func (app *BaseApp) RegisterGRPCServer(server gogogrpc.Server) { grpcCtx = context.WithValue(grpcCtx, sdk.SdkContextKey, sdkCtx) md = metadata.Pairs(grpctypes.GRPCBlockHeightHeader, strconv.FormatInt(height, 10)) - grpc.SetHeader(grpcCtx, md) + if err = grpc.SetHeader(grpcCtx, md); err != nil { + app.logger.Error("failed to set gRPC header", "err", err) + } return handler(grpcCtx, req) } diff --git a/x/auth/middleware/msg_service_router.go b/baseapp/msg_service_router.go similarity index 94% rename from x/auth/middleware/msg_service_router.go rename to baseapp/msg_service_router.go index 79aea3350c91..f6c8d4b21ce7 100644 --- a/x/auth/middleware/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -1,4 +1,4 @@ -package middleware +package baseapp import ( "context" @@ -22,10 +22,9 @@ type MsgServiceRouter struct { var _ gogogrpc.Server = &MsgServiceRouter{} // NewMsgServiceRouter creates a new MsgServiceRouter. -func NewMsgServiceRouter(registry codectypes.InterfaceRegistry) *MsgServiceRouter { +func NewMsgServiceRouter() *MsgServiceRouter { return &MsgServiceRouter{ - interfaceRegistry: registry, - routes: map[string]MsgServiceHandler{}, + routes: map[string]MsgServiceHandler{}, } } @@ -130,6 +129,11 @@ func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler inter } } +// SetInterfaceRegistry sets the interface registry for the router. +func (msr *MsgServiceRouter) SetInterfaceRegistry(interfaceRegistry codectypes.InterfaceRegistry) { + msr.interfaceRegistry = interfaceRegistry +} + func noopDecoder(_ interface{}) error { return nil } func noopInterceptor(_ context.Context, _ interface{}, _ *grpc.UnaryServerInfo, _ grpc.UnaryHandler) (interface{}, error) { return nil, nil diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go new file mode 100644 index 000000000000..d599d0cbe47a --- /dev/null +++ b/baseapp/msg_service_router_test.go @@ -0,0 +1,122 @@ +package baseapp_test + +import ( + "os" + "testing" + + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + dbm "github.com/tendermint/tm-db" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +func TestRegisterMsgService(t *testing.T) { + db := dbm.NewMemDB() + + // Create an encoding config that doesn't register testdata Msg services. + encCfg := simapp.MakeTestEncodingConfig() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + require.Panics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) + + // Register testdata Msg services, and rerun `RegisterService`. + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) + require.NotPanics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) +} + +func TestRegisterMsgServiceTwice(t *testing.T) { + // Setup baseapp. + db := dbm.NewMemDB() + encCfg := simapp.MakeTestEncodingConfig() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) + + // First time registering service shouldn't panic. + require.NotPanics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) + + // Second time should panic. + require.Panics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) +} + +func TestMsgService(t *testing.T) { + priv, _, _ := testdata.KeyTestPubAddr() + encCfg := simapp.MakeTestEncodingConfig() + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) + db := dbm.NewMemDB() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + _ = app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + + msg := testdata.MsgCreateDog{Dog: &testdata.Dog{Name: "Spot"}} + txBuilder := encCfg.TxConfig.NewTxBuilder() + txBuilder.SetFeeAmount(testdata.NewTestFeeAmount()) + txBuilder.SetGasLimit(testdata.NewTestGasLimit()) + err := txBuilder.SetMsgs(&msg) + require.NoError(t, err) + + // First round: we gather all the signer infos. We use the "set empty + // signature" hack to do that. + sigV2 := signing.SignatureV2{ + PubKey: priv.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: encCfg.TxConfig.SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: 0, + } + + err = txBuilder.SetSignatures(sigV2) + require.NoError(t, err) + + // Second round: all signer infos are set, so each signer can sign. + signerData := authsigning.SignerData{ + ChainID: "test", + AccountNumber: 0, + Sequence: 0, + } + sigV2, err = tx.SignWithPrivKey( + encCfg.TxConfig.SignModeHandler().DefaultMode(), signerData, + txBuilder, priv, encCfg.TxConfig, 0) + require.NoError(t, err) + err = txBuilder.SetSignatures(sigV2) + require.NoError(t, err) + + // Send the tx to the app + txBytes, err := encCfg.TxConfig.TxEncoder()(txBuilder.GetTx()) + require.NoError(t, err) + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.Equal(t, abci.CodeTypeOK, res.Code, "res=%+v", res) +} diff --git a/baseapp/options.go b/baseapp/options.go index 4b24c108da06..721fb612ffd8 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -7,17 +7,18 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/codec/types" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" ) // File for storing in-package BaseApp optional functions, // for options that need access to non-exported fields of the BaseApp // SetPruning sets a pruning option on the multistore associated with the app -func SetPruning(opts sdk.PruningOptions) func(*BaseApp) { +func SetPruning(opts pruningtypes.PruningOptions) func(*BaseApp) { return func(bapp *BaseApp) { bapp.cms.SetPruning(opts) } } @@ -69,19 +70,9 @@ func SetInterBlockCache(cache sdk.MultiStorePersistentCache) func(*BaseApp) { return func(app *BaseApp) { app.setInterBlockCache(cache) } } -// SetSnapshotInterval sets the snapshot interval. -func SetSnapshotInterval(interval uint64) func(*BaseApp) { - return func(app *BaseApp) { app.SetSnapshotInterval(interval) } -} - -// SetSnapshotKeepRecent sets the recent snapshots to keep. -func SetSnapshotKeepRecent(keepRecent uint32) func(*BaseApp) { - return func(app *BaseApp) { app.SetSnapshotKeepRecent(keepRecent) } -} - -// SetSnapshotStore sets the snapshot store. -func SetSnapshotStore(snapshotStore *snapshots.Store) func(*BaseApp) { - return func(app *BaseApp) { app.SetSnapshotStore(snapshotStore) } +// SetSnapshot sets the snapshot store. +func SetSnapshot(snapshotStore *snapshots.Store, opts snapshottypes.SnapshotOptions) func(*BaseApp) { + return func(app *BaseApp) { app.SetSnapshot(snapshotStore, opts) } } func (app *BaseApp) SetName(name string) { @@ -154,12 +145,20 @@ func (app *BaseApp) SetEndBlocker(endBlocker sdk.EndBlocker) { app.endBlocker = endBlocker } -func (app *BaseApp) SetTxHandler(txHandler tx.Handler) { +func (app *BaseApp) SetAnteHandler(ah sdk.AnteHandler) { + if app.sealed { + panic("SetAnteHandler() on sealed BaseApp") + } + + app.anteHandler = ah +} + +func (app *BaseApp) SetPostHandler(ph sdk.AnteHandler) { if app.sealed { - panic("SetTxHandler() on sealed BaseApp") + panic("SetPostHandler() on sealed BaseApp") } - app.txHandler = txHandler + app.postHandler = ph } func (app *BaseApp) SetAddrPeerFilter(pf sdk.PeerFilter) { @@ -201,38 +200,32 @@ func (app *BaseApp) SetStoreLoader(loader StoreLoader) { app.storeLoader = loader } -// SetSnapshotStore sets the snapshot store. -func (app *BaseApp) SetSnapshotStore(snapshotStore *snapshots.Store) { +// SetRouter allows us to customize the router. +func (app *BaseApp) SetRouter(router sdk.Router) { if app.sealed { - panic("SetSnapshotStore() on sealed BaseApp") + panic("SetRouter() on sealed BaseApp") } - if snapshotStore == nil { - app.snapshotManager = nil - return - } - app.snapshotManager = snapshots.NewManager(snapshotStore, app.cms, nil) + app.router = router } -// SetSnapshotInterval sets the snapshot interval. -func (app *BaseApp) SetSnapshotInterval(snapshotInterval uint64) { +// SetSnapshot sets the snapshot store and options. +func (app *BaseApp) SetSnapshot(snapshotStore *snapshots.Store, opts snapshottypes.SnapshotOptions) { if app.sealed { - panic("SetSnapshotInterval() on sealed BaseApp") + panic("SetSnapshot() on sealed BaseApp") } - app.snapshotInterval = snapshotInterval -} - -// SetSnapshotKeepRecent sets the number of recent snapshots to keep. -func (app *BaseApp) SetSnapshotKeepRecent(snapshotKeepRecent uint32) { - if app.sealed { - panic("SetSnapshotKeepRecent() on sealed BaseApp") + if snapshotStore == nil || opts.Interval == snapshottypes.SnapshotIntervalOff { + app.snapshotManager = nil + return } - app.snapshotKeepRecent = snapshotKeepRecent + app.cms.SetSnapshotInterval(opts.Interval) + app.snapshotManager = snapshots.NewManager(snapshotStore, opts, app.cms, nil, app.logger) } // SetInterfaceRegistry sets the InterfaceRegistry. func (app *BaseApp) SetInterfaceRegistry(registry types.InterfaceRegistry) { app.interfaceRegistry = registry app.grpcQueryRouter.SetInterfaceRegistry(registry) + app.msgServiceRouter.SetInterfaceRegistry(registry) } // SetStreamingService is used to set a streaming service into the BaseApp hooks and load the listeners into the multistore diff --git a/baseapp/params.go b/baseapp/params.go index 5cf31125b027..14701d524798 100644 --- a/baseapp/params.go +++ b/baseapp/params.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,7 +31,7 @@ type ParamStore interface { // ValidateBlockParams defines a stateless validation on BlockParams. This function // is called whenever the parameters are updated or stored. func ValidateBlockParams(i interface{}) error { - v, ok := i.(tmproto.BlockParams) + v, ok := i.(abci.BlockParams) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } diff --git a/baseapp/params_test.go b/baseapp/params_test.go index 3f9d26a56f2f..6507e17a8aea 100644 --- a/baseapp/params_test.go +++ b/baseapp/params_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -15,11 +16,11 @@ func TestValidateBlockParams(t *testing.T) { expectErr bool }{ {nil, true}, - {&tmproto.BlockParams{}, true}, - {tmproto.BlockParams{}, true}, - {tmproto.BlockParams{MaxBytes: -1, MaxGas: -1}, true}, - {tmproto.BlockParams{MaxBytes: 2000000, MaxGas: -5}, true}, - {tmproto.BlockParams{MaxBytes: 2000000, MaxGas: 300000}, false}, + {&abci.BlockParams{}, true}, + {abci.BlockParams{}, true}, + {abci.BlockParams{MaxBytes: -1, MaxGas: -1}, true}, + {abci.BlockParams{MaxBytes: 2000000, MaxGas: -5}, true}, + {abci.BlockParams{MaxBytes: 2000000, MaxGas: 300000}, false}, } for _, tc := range testCases { diff --git a/baseapp/queryrouter_test.go b/baseapp/queryrouter_test.go index 4b38f6458641..c7637f17000e 100644 --- a/baseapp/queryrouter_test.go +++ b/baseapp/queryrouter_test.go @@ -1,4 +1,4 @@ -package baseapp_test +package baseapp import ( "testing" @@ -7,7 +7,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -16,7 +15,7 @@ var testQuerier = func(_ sdk.Context, _ []string, _ abci.RequestQuery) ([]byte, } func TestQueryRouter(t *testing.T) { - qr := baseapp.NewQueryRouter() + qr := NewQueryRouter() // require panic on invalid route require.Panics(t, func() { diff --git a/baseapp/recovery.go b/baseapp/recovery.go new file mode 100644 index 000000000000..7f0687800c65 --- /dev/null +++ b/baseapp/recovery.go @@ -0,0 +1,77 @@ +package baseapp + +import ( + "fmt" + "runtime/debug" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// RecoveryHandler handles recovery() object. +// Return a non-nil error if recoveryObj was processed. +// Return nil if recoveryObj was not processed. +type RecoveryHandler func(recoveryObj interface{}) error + +// recoveryMiddleware is wrapper for RecoveryHandler to create chained recovery handling. +// returns (recoveryMiddleware, nil) if recoveryObj was not processed and should be passed to the next middleware in chain. +// returns (nil, error) if recoveryObj was processed and middleware chain processing should be stopped. +type recoveryMiddleware func(recoveryObj interface{}) (recoveryMiddleware, error) + +// processRecovery processes recoveryMiddleware chain for recovery() object. +// Chain processing stops on non-nil error or when chain is processed. +func processRecovery(recoveryObj interface{}, middleware recoveryMiddleware) error { + if middleware == nil { + return nil + } + + next, err := middleware(recoveryObj) + if err != nil { + return err + } + + return processRecovery(recoveryObj, next) +} + +// newRecoveryMiddleware creates a RecoveryHandler middleware. +func newRecoveryMiddleware(handler RecoveryHandler, next recoveryMiddleware) recoveryMiddleware { + return func(recoveryObj interface{}) (recoveryMiddleware, error) { + if err := handler(recoveryObj); err != nil { + return nil, err + } + + return next, nil + } +} + +// newOutOfGasRecoveryMiddleware creates a standard OutOfGas recovery middleware for app.runTx method. +func newOutOfGasRecoveryMiddleware(gasWanted uint64, ctx sdk.Context, next recoveryMiddleware) recoveryMiddleware { + handler := func(recoveryObj interface{}) error { + err, ok := recoveryObj.(sdk.ErrorOutOfGas) + if !ok { + return nil + } + + return sdkerrors.Wrap( + sdkerrors.ErrOutOfGas, fmt.Sprintf( + "out of gas in location: %v; gasWanted: %d, gasUsed: %d", + err.Descriptor, gasWanted, ctx.GasMeter().GasConsumed(), + ), + ) + } + + return newRecoveryMiddleware(handler, next) +} + +// newDefaultRecoveryMiddleware creates a default (last in chain) recovery middleware for app.runTx method. +func newDefaultRecoveryMiddleware() recoveryMiddleware { + handler := func(recoveryObj interface{}) error { + return sdkerrors.Wrap( + sdkerrors.ErrPanic, fmt.Sprintf( + "recovered: %v\nstack:\n%v", recoveryObj, string(debug.Stack()), + ), + ) + } + + return newRecoveryMiddleware(handler, nil) +} diff --git a/baseapp/recovery_test.go b/baseapp/recovery_test.go new file mode 100644 index 000000000000..b75892c63818 --- /dev/null +++ b/baseapp/recovery_test.go @@ -0,0 +1,64 @@ +package baseapp + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +// Test that recovery chain produces expected error at specific middleware layer +func TestRecoveryChain(t *testing.T) { + createError := func(id int) error { + return fmt.Errorf("error from id: %d", id) + } + + createHandler := func(id int, handle bool) RecoveryHandler { + return func(_ interface{}) error { + if handle { + return createError(id) + } + return nil + } + } + + // check recovery chain [1] -> 2 -> 3 + { + mw := newRecoveryMiddleware(createHandler(3, false), nil) + mw = newRecoveryMiddleware(createHandler(2, false), mw) + mw = newRecoveryMiddleware(createHandler(1, true), mw) + receivedErr := processRecovery(nil, mw) + + require.Equal(t, createError(1), receivedErr) + } + + // check recovery chain 1 -> [2] -> 3 + { + mw := newRecoveryMiddleware(createHandler(3, false), nil) + mw = newRecoveryMiddleware(createHandler(2, true), mw) + mw = newRecoveryMiddleware(createHandler(1, false), mw) + receivedErr := processRecovery(nil, mw) + + require.Equal(t, createError(2), receivedErr) + } + + // check recovery chain 1 -> 2 -> [3] + { + mw := newRecoveryMiddleware(createHandler(3, true), nil) + mw = newRecoveryMiddleware(createHandler(2, false), mw) + mw = newRecoveryMiddleware(createHandler(1, false), mw) + receivedErr := processRecovery(nil, mw) + + require.Equal(t, createError(3), receivedErr) + } + + // check recovery chain 1 -> 2 -> 3 + { + mw := newRecoveryMiddleware(createHandler(3, false), nil) + mw = newRecoveryMiddleware(createHandler(2, false), mw) + mw = newRecoveryMiddleware(createHandler(1, false), mw) + receivedErr := processRecovery(nil, mw) + + require.Nil(t, receivedErr) + } +} diff --git a/x/auth/middleware/legacy_router.go b/baseapp/router.go similarity index 71% rename from x/auth/middleware/legacy_router.go rename to baseapp/router.go index caf4424c9829..7e2e70a0c6f3 100644 --- a/x/auth/middleware/legacy_router.go +++ b/baseapp/router.go @@ -1,4 +1,4 @@ -package middleware +package baseapp import ( "fmt" @@ -6,22 +6,22 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -type LegacyRouter struct { +type Router struct { routes map[string]sdk.Handler } -var _ sdk.Router = NewLegacyRouter() +var _ sdk.Router = NewRouter() // NewRouter returns a reference to a new router. -func NewLegacyRouter() *LegacyRouter { - return &LegacyRouter{ +func NewRouter() *Router { + return &Router{ routes: make(map[string]sdk.Handler), } } // AddRoute adds a route path to the router with a given handler. The route must // be alphanumeric. -func (rtr *LegacyRouter) AddRoute(route sdk.Route) sdk.Router { +func (rtr *Router) AddRoute(route sdk.Route) sdk.Router { if !sdk.IsAlphaNumeric(route.Path()) { panic("route expressions can only contain alphanumeric characters") } @@ -36,6 +36,6 @@ func (rtr *LegacyRouter) AddRoute(route sdk.Route) sdk.Router { // Route returns a handler for a given route path. // // TODO: Handle expressive matches. -func (rtr *LegacyRouter) Route(_ sdk.Context, path string) sdk.Handler { +func (rtr *Router) Route(_ sdk.Context, path string) sdk.Handler { return rtr.routes[path] } diff --git a/x/auth/middleware/legacy_router_test.go b/baseapp/router_test.go similarity index 79% rename from x/auth/middleware/legacy_router_test.go rename to baseapp/router_test.go index 97517dcdf9b5..1e11dc0ca089 100644 --- a/x/auth/middleware/legacy_router_test.go +++ b/baseapp/router_test.go @@ -1,4 +1,4 @@ -package middleware_test +package baseapp import ( "testing" @@ -6,15 +6,14 @@ import ( "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" ) var testHandler = func(_ sdk.Context, _ sdk.Msg) (*sdk.Result, error) { return &sdk.Result{}, nil } -func TestLegacyRouter(t *testing.T) { - rtr := middleware.NewLegacyRouter() +func TestRouter(t *testing.T) { + rtr := NewRouter() // require panic on invalid route require.Panics(t, func() { diff --git a/baseapp/test_helpers.go b/baseapp/test_helpers.go index 6b770499c70b..6489595bc8c1 100644 --- a/baseapp/test_helpers.go +++ b/baseapp/test_helpers.go @@ -1,81 +1,39 @@ package baseapp import ( - abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" ) // SimCheck defines a CheckTx helper function that used in tests and simulations. -func (app *BaseApp) SimCheck(txEncoder sdk.TxEncoder, sdkTx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { - // CheckTx expects tx bytes as argument, so we encode the tx argument into - // bytes. Note that CheckTx will actually decode those bytes again. But since +func (app *BaseApp) SimCheck(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { + // runTx expects tx bytes as argument, so we encode the tx argument into + // bytes. Note that runTx will actually decode those bytes again. But since // this helper is only used in tests/simulation, it's fine. - bz, err := txEncoder(sdkTx) + bz, err := txEncoder(tx) if err != nil { return sdk.GasInfo{}, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) } - - ctx := app.getContextForTx(runTxModeDeliver, bz) - res, _, err := app.txHandler.CheckTx(ctx, tx.Request{Tx: sdkTx, TxBytes: bz}, tx.RequestCheckTx{Type: abci.CheckTxType_New}) - gInfo := sdk.GasInfo{GasWanted: uint64(res.GasWanted), GasUsed: uint64(res.GasUsed)} - if err != nil { - return gInfo, nil, err - } - - data, err := makeABCIData(res) - if err != nil { - return gInfo, nil, err - } - - return gInfo, &sdk.Result{Data: data, Log: res.Log, Events: res.Events, MsgResponses: res.MsgResponses}, nil + gasInfo, result, _, _, err := app.runTx(runTxModeCheck, bz) + return gasInfo, result, err } // Simulate executes a tx in simulate mode to get result and gas info. func (app *BaseApp) Simulate(txBytes []byte) (sdk.GasInfo, *sdk.Result, error) { - ctx := app.getContextForTx(runTxModeSimulate, txBytes) - res, err := app.txHandler.SimulateTx(ctx, tx.Request{TxBytes: txBytes}) - gasInfo := sdk.GasInfo{ - GasWanted: res.GasWanted, - GasUsed: res.GasUsed, - } - if err != nil { - return gasInfo, nil, err - } - - data, err := makeABCIData(res) - if err != nil { - return gasInfo, nil, err - } - - return gasInfo, &sdk.Result{Data: data, Log: res.Log, Events: res.Events, MsgResponses: res.MsgResponses}, nil + gasInfo, result, _, _, err := app.runTx(runTxModeSimulate, txBytes) + return gasInfo, result, err } -// SimDeliver defines a DeliverTx helper function that used in tests and -// simulations. -func (app *BaseApp) SimDeliver(txEncoder sdk.TxEncoder, sdkTx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { +func (app *BaseApp) SimDeliver(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { // See comment for Check(). - bz, err := txEncoder(sdkTx) + bz, err := txEncoder(tx) if err != nil { return sdk.GasInfo{}, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) } - - ctx := app.getContextForTx(runTxModeDeliver, bz) - res, err := app.txHandler.DeliverTx(ctx, tx.Request{Tx: sdkTx, TxBytes: bz}) - gInfo := sdk.GasInfo{GasWanted: uint64(res.GasWanted), GasUsed: uint64(res.GasUsed)} - if err != nil { - return gInfo, nil, err - } - - data, err := makeABCIData(res) - if err != nil { - return gInfo, nil, err - } - - return gInfo, &sdk.Result{Data: data, Log: res.Log, Events: res.Events, MsgResponses: res.MsgResponses}, nil + gasInfo, result, _, _, err := app.runTx(runTxModeDeliver, bz) + return gasInfo, result, err } // Context with current {check, deliver}State of the app used by tests. @@ -91,3 +49,7 @@ func (app *BaseApp) NewContext(isCheckTx bool, header tmproto.Header) sdk.Contex func (app *BaseApp) NewUncachedContext(isCheckTx bool, header tmproto.Header) sdk.Context { return sdk.NewContext(app.cms, header, isCheckTx, app.logger) } + +func (app *BaseApp) GetContextForDeliverTx(txBytes []byte) sdk.Context { + return app.getContextForTx(runTxModeDeliver, txBytes) +} diff --git a/baseapp/util_test.go b/baseapp/util_test.go index 7244aff8307a..3a26e5e5a093 100644 --- a/baseapp/util_test.go +++ b/baseapp/util_test.go @@ -1,8 +1,8 @@ package baseapp import ( + "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/types" - sdk "github.com/cosmos/cosmos-sdk/types" ) // TODO: Can be removed once we move all middleware tests into x/auth/middleware @@ -31,10 +31,18 @@ func (app *BaseApp) CMS() types.CommitMultiStore { return app.cms } +// GetSnapshotManager() is an exported method to be able to access baseapp's snapshot +// manager in tests. +// +// This method is only accessible in baseapp tests. +func (app *BaseApp) GetSnapshotManager() *snapshots.Manager { + return app.snapshotManager +} + // GetMaximumBlockGas return maximum blocks gas. // // This method is only accessible in baseapp tests. -func (app *BaseApp) GetMaximumBlockGas(ctx sdk.Context) uint64 { +func (app *BaseApp) GetMaximumBlockGas(ctx types.Context) uint64 { return app.getMaximumBlockGas(ctx) } @@ -48,13 +56,13 @@ func (app *BaseApp) GetName() string { // CreateQueryContext calls app's createQueryContext. // // This method is only accessible in baseapp tests. -func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, error) { +func (app *BaseApp) CreateQueryContext(height int64, prove bool) (types.Context, error) { return app.createQueryContext(height, prove) } // MinGasPrices returns minGasPrices. // // This method is only accessible in baseapp tests. -func (app *BaseApp) MinGasPrices() sdk.DecCoins { +func (app *BaseApp) MinGasPrices() types.DecCoins { return app.minGasPrices } diff --git a/client/broadcast.go b/client/broadcast.go index 35af14e21aa5..5ecafd1ec0eb 100644 --- a/client/broadcast.go +++ b/client/broadcast.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" + "github.com/tendermint/tendermint/mempool" tmtypes "github.com/tendermint/tendermint/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -54,7 +55,7 @@ func CheckTendermintError(err error, tx tmtypes.Tx) *sdk.TxResponse { txHash := fmt.Sprintf("%X", tx.Hash()) switch { - case strings.Contains(errStr, strings.ToLower(tmtypes.ErrTxInCache.Error())): + case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())): return &sdk.TxResponse{ Code: sdkerrors.ErrTxInMempoolCache.ABCICode(), Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(), diff --git a/client/broadcast_test.go b/client/broadcast_test.go index 424c7d364753..f3ddc572a5e5 100644 --- a/client/broadcast_test.go +++ b/client/broadcast_test.go @@ -7,8 +7,9 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/tmhash" + "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/rpc/client/mock" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/client/flags" @@ -42,9 +43,9 @@ func CreateContextWithErrorAndMode(err error, mode string) Context { // Test the correct code is returned when func TestBroadcastError(t *testing.T) { errors := map[error]uint32{ - tmtypes.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(), - tmtypes.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(), - tmtypes.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(), + mempool.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(), + mempool.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(), + mempool.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(), } modes := []string{ @@ -66,5 +67,4 @@ func TestBroadcastError(t *testing.T) { require.Equal(t, txHash, resp.TxHash) } } - } diff --git a/client/cmd.go b/client/cmd.go index 90d7689d5e2f..ce6faba09e06 100644 --- a/client/cmd.go +++ b/client/cmd.go @@ -248,7 +248,7 @@ func readTxCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Context, err if clientCtx.From == "" || flagSet.Changed(flags.FlagFrom) { from, _ := flagSet.GetString(flags.FlagFrom) - fromAddr, fromName, keyType, err := GetFromFields(clientCtx.Keyring, from, clientCtx.GenerateOnly) + fromAddr, fromName, keyType, err := GetFromFields(clientCtx, clientCtx.Keyring, from) if err != nil { return clientCtx, err } diff --git a/client/cmd_test.go b/client/cmd_test.go index 65161fe4752b..81d5719ccfb6 100644 --- a/client/cmd_test.go +++ b/client/cmd_test.go @@ -70,6 +70,7 @@ func TestSetCmdClientContextHandler(t *testing.T) { } c.Flags().String(flags.FlagChainID, "", "network chain ID") + c.Flags().String(flags.FlagHome, "", "home dir") return c } @@ -91,6 +92,14 @@ func TestSetCmdClientContextHandler(t *testing.T) { fmt.Sprintf("--%s=new-chain-id", flags.FlagChainID), }, }, + { + "flags set with space", + initClientCtx.WithHomeDir("/tmp/dir"), + []string{ + fmt.Sprintf("--%s", flags.FlagHome), + "/tmp/dir", + }, + }, } for _, tc := range testCases { diff --git a/client/config/config.go b/client/config/config.go index 6297cf2c26b1..f9e48c989d88 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -62,6 +62,10 @@ func ReadFromClientConfig(ctx client.Context) (client.Context, error) { return ctx, fmt.Errorf("couldn't make client config: %v", err) } + if ctx.ChainID != "" { + conf.ChainID = ctx.ChainID // chain-id will be written to the client.toml while initiating the chain. + } + if err := writeConfigToFile(configFilePath, conf); err != nil { return ctx, fmt.Errorf("could not write client config to the file: %v", err) } diff --git a/client/config/config_test.go b/client/config/config_test.go index 41817a59d2df..287a976d3970 100644 --- a/client/config/config_test.go +++ b/client/config/config_test.go @@ -3,19 +3,18 @@ package config_test import ( "bytes" "fmt" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "io" "os" "testing" - "github.com/stretchr/testify/require" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/x/staking/client/cli" + "github.com/stretchr/testify/require" ) const ( @@ -27,18 +26,21 @@ const ( // initClientContext initiates client Context for tests func initClientContext(t *testing.T, envVar string) (client.Context, func()) { home := t.TempDir() + chainId := "test-chain" clientCtx := client.Context{}. WithHomeDir(home). WithViper(""). - WithCodec(codec.NewProtoCodec(codectypes.NewInterfaceRegistry())) + WithCodec(codec.NewProtoCodec(codectypes.NewInterfaceRegistry())). + WithChainID(chainId) - clientCtx.Viper.BindEnv(nodeEnv) + require.NoError(t, clientCtx.Viper.BindEnv(nodeEnv)) if envVar != "" { - os.Setenv(nodeEnv, envVar) + require.NoError(t, os.Setenv(nodeEnv, envVar)) } clientCtx, err := config.ReadFromClientConfig(clientCtx) require.NoError(t, err) + require.Equal(t, clientCtx.ChainID, chainId) return clientCtx, func() { _ = os.RemoveAll(home) } } @@ -46,7 +48,7 @@ func initClientContext(t *testing.T, envVar string) (client.Context, func()) { func TestConfigCmd(t *testing.T) { clientCtx, cleanup := initClientContext(t, testNode1) defer func() { - os.Unsetenv(nodeEnv) + _ = os.Unsetenv(nodeEnv) cleanup() }() @@ -60,7 +62,7 @@ func TestConfigCmd(t *testing.T) { b := bytes.NewBufferString("") cmd.SetOut(b) cmd.SetArgs([]string{"node"}) - cmd.Execute() + require.NoError(t, cmd.Execute()) out, err := io.ReadAll(b) require.NoError(t, err) require.Equal(t, string(out), testNode1+"\n") @@ -89,7 +91,7 @@ func TestConfigCmdEnvFlag(t *testing.T) { clientCtx, cleanup := initClientContext(t, tc.envVar) defer func() { if tc.envVar != "" { - os.Unsetenv(nodeEnv) + _ = os.Unsetenv(nodeEnv) } cleanup() }() diff --git a/client/config/toml.go b/client/config/toml.go index a26cf78e6f17..97c8b00b42c5 100644 --- a/client/config/toml.go +++ b/client/config/toml.go @@ -42,7 +42,7 @@ func writeConfigToFile(configFilePath string, config *ClientConfig) error { return err } - return os.WriteFile(configFilePath, buffer.Bytes(), 0600) + return os.WriteFile(configFilePath, buffer.Bytes(), 0o600) } // ensureConfigPath creates a directory configPath if it does not exist diff --git a/client/context.go b/client/context.go index 380b08924ac4..be5c84af6070 100644 --- a/client/context.go +++ b/client/context.go @@ -2,6 +2,8 @@ package client import ( "bufio" + "encoding/json" + "fmt" "io" "os" @@ -52,9 +54,9 @@ type Context struct { FeePayer sdk.AccAddress FeeGranter sdk.AccAddress Viper *viper.Viper - + // IsAux is true when the signer is an auxiliary signer (e.g. the tipper). - IsAux bool + IsAux bool // TODO: Deprecated (remove). LegacyAmino *codec.LegacyAmino @@ -304,6 +306,12 @@ func (ctx Context) PrintObjectLegacy(toPrint interface{}) error { return ctx.printOutput(out) } +// PrintRaw is a variant of PrintProto that doesn't require a proto.Message type +// and uses a raw JSON message. No marshaling is performed. +func (ctx Context) PrintRaw(toPrint json.RawMessage) error { + return ctx.printOutput(toPrint) +} + func (ctx Context) printOutput(out []byte) error { var err error if ctx.OutputFormat == "text" { @@ -334,16 +342,31 @@ func (ctx Context) printOutput(out []byte) error { return nil } -// GetFromFields returns a from account address, account name and keyring type, given either -// an address or key name. If genOnly is true, only a valid Bech32 cosmos -// address is returned. -func GetFromFields(kr keyring.Keyring, from string, genOnly bool) (sdk.AccAddress, string, keyring.KeyType, error) { +// GetFromFields returns a from account address, account name and keyring type, given either an address or key name. +// If clientCtx.Simulate is true the keystore is not accessed and a valid address must be provided +// If clientCtx.GenerateOnly is true the keystore is only accessed if a key name is provided +func GetFromFields(clientCtx Context, kr keyring.Keyring, from string) (sdk.AccAddress, string, keyring.KeyType, error) { if from == "" { return nil, "", 0, nil } + addr, err := sdk.AccAddressFromBech32(from) + switch { + case clientCtx.Simulate: + if err != nil { + return nil, "", 0, fmt.Errorf("a valid bech32 address must be provided in simulation mode: %w", err) + } + + return addr, "", 0, nil + + case clientCtx.GenerateOnly: + if err == nil { + return addr, "", 0, nil + } + } + var k *keyring.Record - if addr, err := sdk.AccAddressFromBech32(from); err == nil { + if err == nil { k, err = kr.KeyByAddress(addr) if err != nil { return nil, "", 0, err @@ -355,7 +378,7 @@ func GetFromFields(kr keyring.Keyring, from string, genOnly bool) (sdk.AccAddres } } - addr, err := k.GetAddress() + addr, err = k.GetAddress() if err != nil { return nil, "", 0, err } @@ -365,7 +388,7 @@ func GetFromFields(kr keyring.Keyring, from string, genOnly bool) (sdk.AccAddres // NewKeyringFromBackend gets a Keyring object from a backend func NewKeyringFromBackend(ctx Context, backend string) (keyring.Keyring, error) { - if ctx.GenerateOnly || ctx.Simulate { + if ctx.Simulate { backend = keyring.BackendMemory } diff --git a/client/context_test.go b/client/context_test.go index d500bc97783b..82feeebe4dfe 100644 --- a/client/context_test.go +++ b/client/context_test.go @@ -3,7 +3,9 @@ package client_test import ( "bytes" "context" + "encoding/json" "os" + "strings" "testing" "github.com/spf13/viper" @@ -13,6 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -23,7 +26,7 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } -func TestContext_PrintObject(t *testing.T) { +func TestContext_PrintProto(t *testing.T) { ctx := client.Context{} animal := &testdata.Dog{ @@ -37,9 +40,7 @@ func TestContext_PrintObject(t *testing.T) { X: 10, } - // // proto - // registry := testdata.NewTestInterfaceRegistry() ctx = ctx.WithCodec(codec.NewProtoCodec(registry)) @@ -66,15 +67,28 @@ func TestContext_PrintObject(t *testing.T) { size: big x: "10" `, buf.String()) +} + +func TestContext_PrintObjectLegacy(t *testing.T) { + ctx := client.Context{} + + animal := &testdata.Dog{ + Size_: "big", + Name: "Spot", + } + any, err := types.NewAnyWithValue(animal) + require.NoError(t, err) + hasAnimal := &testdata.HasAnimal{ + Animal: any, + X: 10, + } - // // amino - // amino := testdata.NewTestAmino() ctx = ctx.WithLegacyAmino(&codec.LegacyAmino{Amino: amino}) // json - buf = &bytes.Buffer{} + buf := &bytes.Buffer{} ctx = ctx.WithOutput(buf) ctx.OutputFormat = "json" err = ctx.PrintObjectLegacy(hasAnimal) @@ -101,6 +115,35 @@ value: `, buf.String()) } +func TestContext_PrintRaw(t *testing.T) { + ctx := client.Context{} + hasAnimal := json.RawMessage(`{"animal":{"@type":"/testdata.Dog","size":"big","name":"Spot"},"x":"10"}`) + + // json + buf := &bytes.Buffer{} + ctx = ctx.WithOutput(buf) + ctx.OutputFormat = "json" + err := ctx.PrintRaw(hasAnimal) + require.NoError(t, err) + require.Equal(t, + `{"animal":{"@type":"/testdata.Dog","size":"big","name":"Spot"},"x":"10"} +`, buf.String()) + + // yaml + buf = &bytes.Buffer{} + ctx = ctx.WithOutput(buf) + ctx.OutputFormat = "text" + err = ctx.PrintRaw(hasAnimal) + require.NoError(t, err) + require.Equal(t, + `animal: + '@type': /testdata.Dog + name: Spot + size: big +x: "10" +`, buf.String()) +} + func TestCLIQueryConn(t *testing.T) { cfg := network.DefaultConfig() cfg.NumValidators = 1 @@ -114,3 +157,107 @@ func TestCLIQueryConn(t *testing.T) { require.NoError(t, err) require.Equal(t, "hello", res.Message) } + +func TestGetFromFields(t *testing.T) { + cfg := network.DefaultConfig() + path := hd.CreateHDPath(118, 0, 0).String() + + testCases := []struct { + clientCtx client.Context + keyring func() keyring.Keyring + from string + expectedErr string + }{ + { + keyring: func() keyring.Keyring { + kb := keyring.NewInMemory(cfg.Codec) + + _, _, err := kb.NewMnemonic("alice", keyring.English, path, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + require.NoError(t, err) + + return kb + }, + from: "alice", + }, + { + keyring: func() keyring.Keyring { + kb, err := keyring.New(t.Name(), keyring.BackendTest, t.TempDir(), nil, cfg.Codec) + require.NoError(t, err) + + _, _, err = kb.NewMnemonic("alice", keyring.English, path, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + require.NoError(t, err) + + return kb + }, + from: "alice", + }, + { + keyring: func() keyring.Keyring { + return keyring.NewInMemory(cfg.Codec) + }, + from: "cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5", + expectedErr: "key with address cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5 not found: key not found", + }, + { + keyring: func() keyring.Keyring { + kb, err := keyring.New(t.Name(), keyring.BackendTest, t.TempDir(), nil, cfg.Codec) + require.NoError(t, err) + return kb + }, + from: "alice", + expectedErr: "alice.info: key not found", + }, + { + keyring: func() keyring.Keyring { + return keyring.NewInMemory(cfg.Codec) + }, + from: "cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5", + clientCtx: client.Context{}.WithSimulation(true), + }, + { + keyring: func() keyring.Keyring { + return keyring.NewInMemory(cfg.Codec) + }, + from: "alice", + clientCtx: client.Context{}.WithSimulation(true), + expectedErr: "a valid bech32 address must be provided in simulation mode", + }, + { + keyring: func() keyring.Keyring { + return keyring.NewInMemory(cfg.Codec) + }, + from: "cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5", + clientCtx: client.Context{}.WithGenerateOnly(true), + }, + { + keyring: func() keyring.Keyring { + return keyring.NewInMemory(cfg.Codec) + }, + from: "alice", + clientCtx: client.Context{}.WithGenerateOnly(true), + expectedErr: "alice.info: key not found", + }, + { + keyring: func() keyring.Keyring { + kb, err := keyring.New(t.Name(), keyring.BackendTest, t.TempDir(), nil, cfg.Codec) + require.NoError(t, err) + + _, _, err = kb.NewMnemonic("alice", keyring.English, path, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + require.NoError(t, err) + + return kb + }, + clientCtx: client.Context{}.WithGenerateOnly(true), + from: "alice", + }, + } + + for _, tc := range testCases { + _, _, _, err := client.GetFromFields(tc.clientCtx, tc.keyring(), tc.from) + if tc.expectedErr == "" { + require.NoError(t, err) + } else { + require.True(t, strings.HasPrefix(err.Error(), tc.expectedErr)) + } + } +} diff --git a/client/debug/main.go b/client/debug/main.go index 05a1b311337c..5eb795ffb9ed 100644 --- a/client/debug/main.go +++ b/client/debug/main.go @@ -20,9 +20,7 @@ import ( legacybech32 "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" ) -var ( - flagPubkeyType = "type" -) +var flagPubkeyType = "type" // Cmd creates a main CLI command func Cmd() *cobra.Command { @@ -178,7 +176,6 @@ $ %s debug pubkey-raw cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg cmd.Println("Bech32 Acc:", accPub) cmd.Println("Bech32 Validator Operator:", valPub) if pubkeyType == "ed25519" { - cmd.Println("Bech32 Validator Consensus:", consensusPub) } @@ -200,7 +197,6 @@ $ %s debug addr cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg `, version.AppName), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - addrString := args[0] var addr []byte @@ -216,7 +212,6 @@ $ %s debug addr cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg if err3 != nil { return fmt.Errorf("expected hex or bech32. Got errors: hex: %v, bech32 acc: %v, bech32 val: %v", err, err2, err3) - } } } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 7f51b93de897..82c326158d01 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -11102,7 +11102,7 @@ paths: bonded shares multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. + description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object @@ -27979,7 +27979,7 @@ definitions: exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. + description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object diff --git a/client/flags/flags.go b/client/flags/flags.go index 669c487e604d..12bd7fd24cf4 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -95,7 +95,9 @@ func AddQueryFlagsToCmd(cmd *cobra.Command) { cmd.Flags().Int64(FlagHeight, 0, "Use a specific height to query state at (this can error if the node is pruning state)") cmd.Flags().StringP(tmcli.OutputFlag, "o", "text", "Output format (text|json)") - cmd.MarkFlagRequired(FlagChainID) + // some base commands does not require chainID e.g `simd testnet` while subcommands do + // hence the flag should not be required for those commands + _ = cmd.MarkFlagRequired(FlagChainID) } // AddTxFlagsToCmd adds common flags to a module tx command. @@ -112,8 +114,8 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().Bool(FlagUseLedger, false, "Use a connected Ledger device") cmd.Flags().Float64(FlagGasAdjustment, DefaultGasAdjustment, "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored ") cmd.Flags().StringP(FlagBroadcastMode, "b", BroadcastSync, "Transaction broadcasting mode (sync|async|block)") - cmd.Flags().Bool(FlagDryRun, false, "ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it") - cmd.Flags().Bool(FlagGenerateOnly, false, "Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase is not accessible)") + cmd.Flags().Bool(FlagDryRun, false, "ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)") + cmd.Flags().Bool(FlagGenerateOnly, false, "Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)") cmd.Flags().Bool(FlagOffline, false, "Offline mode (does not allow any online functionality)") cmd.Flags().BoolP(FlagSkipConfirmation, "y", false, "Skip tx broadcasting prompt confirmation") cmd.Flags().String(FlagKeyringBackend, DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test|memory)") @@ -121,7 +123,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().Uint64(FlagTimeoutHeight, 0, "Set a block timeout height to prevent the tx from being committed past a certain height") cmd.Flags().String(FlagFeePayer, "", "Fee payer pays fees for the transaction instead of deducting from the signer") cmd.Flags().String(FlagFeeGranter, "", "Fee granter grants fees for the transaction") - cmd.Flags().String(FlagTip, "", "Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux") + cmd.Flags().String(FlagTip, "", "Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator") cmd.Flags().Bool(FlagAux, false, "Generate aux signer data instead of sending a tx") // --gas can accept integers and "auto" diff --git a/client/grpc/tmservice/block.go b/client/grpc/tmservice/block.go index 3bed4268f303..31b86a4ed05c 100644 --- a/client/grpc/tmservice/block.go +++ b/client/grpc/tmservice/block.go @@ -2,9 +2,10 @@ package tmservice import ( "context" + "github.com/cosmos/cosmos-sdk/client" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" ) func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*coretypes.ResultBlock, error) { diff --git a/client/grpc/tmservice/query.pb.go b/client/grpc/tmservice/query.pb.go index 2b57ec34431d..6aa415fab1f9 100644 --- a/client/grpc/tmservice/query.pb.go +++ b/client/grpc/tmservice/query.pb.go @@ -34,7 +34,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +// GetValidatorSetByHeightRequest is the request type for the +// Query/GetValidatorSetByHeight RPC method. type GetValidatorSetByHeightRequest struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // pagination defines an pagination for the request. @@ -88,7 +89,8 @@ func (m *GetValidatorSetByHeightRequest) GetPagination() *query.PageRequest { return nil } -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +// GetValidatorSetByHeightResponse is the response type for the +// Query/GetValidatorSetByHeight RPC method. type GetValidatorSetByHeightResponse struct { BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` @@ -150,7 +152,8 @@ func (m *GetValidatorSetByHeightResponse) GetPagination() *query.PageResponse { return nil } -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +// GetLatestValidatorSetRequest is the request type for the +// Query/GetValidatorSetByHeight RPC method. type GetLatestValidatorSetRequest struct { // pagination defines an pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -196,7 +199,8 @@ func (m *GetLatestValidatorSetRequest) GetPagination() *query.PageRequest { return nil } -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +// GetLatestValidatorSetResponse is the response type for the +// Query/GetValidatorSetByHeight RPC method. type GetLatestValidatorSetResponse struct { BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` @@ -327,7 +331,8 @@ func (m *Validator) GetProposerPriority() int64 { return 0 } -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. +// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight +// RPC method. type GetBlockByHeightRequest struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } @@ -372,10 +377,14 @@ func (m *GetBlockByHeightRequest) GetHeight() int64 { return 0 } -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. +// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight +// RPC method. type GetBlockByHeightResponse struct { BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Deprecated: please use `sdk_block` instead + Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Since: cosmos-sdk 0.47 + SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` } func (m *GetBlockByHeightResponse) Reset() { *m = GetBlockByHeightResponse{} } @@ -425,7 +434,15 @@ func (m *GetBlockByHeightResponse) GetBlock() *types1.Block { return nil } -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. +func (m *GetBlockByHeightResponse) GetSdkBlock() *Block { + if m != nil { + return m.SdkBlock + } + return nil +} + +// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC +// method. type GetLatestBlockRequest struct { } @@ -462,10 +479,14 @@ func (m *GetLatestBlockRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetLatestBlockRequest proto.InternalMessageInfo -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. +// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC +// method. type GetLatestBlockResponse struct { BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Deprecated: please use `sdk_block` instead + Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Since: cosmos-sdk 0.47 + SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` } func (m *GetLatestBlockResponse) Reset() { *m = GetLatestBlockResponse{} } @@ -515,6 +536,13 @@ func (m *GetLatestBlockResponse) GetBlock() *types1.Block { return nil } +func (m *GetLatestBlockResponse) GetSdkBlock() *Block { + if m != nil { + return m.SdkBlock + } + return nil +} + // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. type GetSyncingRequest struct { } @@ -634,10 +662,11 @@ func (m *GetNodeInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetNodeInfoRequest proto.InternalMessageInfo -// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. +// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC +// method. type GetNodeInfoResponse struct { - NodeInfo *p2p.NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` - ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"` + DefaultNodeInfo *p2p.DefaultNodeInfo `protobuf:"bytes,1,opt,name=default_node_info,json=defaultNodeInfo,proto3" json:"default_node_info,omitempty"` + ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"` } func (m *GetNodeInfoResponse) Reset() { *m = GetNodeInfoResponse{} } @@ -673,9 +702,9 @@ func (m *GetNodeInfoResponse) XXX_DiscardUnknown() { var xxx_messageInfo_GetNodeInfoResponse proto.InternalMessageInfo -func (m *GetNodeInfoResponse) GetNodeInfo() *p2p.NodeInfo { +func (m *GetNodeInfoResponse) GetDefaultNodeInfo() *p2p.DefaultNodeInfo { if m != nil { - return m.NodeInfo + return m.DefaultNodeInfo } return nil } @@ -922,7 +951,8 @@ func (m *ABCIQueryRequest) GetProve() bool { return false } -// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. +// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC +// query. // // Note: This type is a duplicate of the ResponseQuery proto type defined in // Tendermint. @@ -1038,7 +1068,8 @@ func (m *ABCIQueryResponse) GetCodespace() string { // be arbitrary format, providing nessecary data for example neighbouring node // hash. // -// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. +// Note: This type is a duplicate of the ProofOp proto type defined in +// Tendermint. type ProofOp struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` @@ -1101,7 +1132,8 @@ func (m *ProofOp) GetData() []byte { // ProofOps is Merkle proof defined by the list of ProofOps. // -// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. +// Note: This type is a duplicate of the ProofOps proto type defined in +// Tendermint. type ProofOps struct { Ops []ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"` } @@ -1173,91 +1205,94 @@ func init() { } var fileDescriptor_40c93fb3ef485c5d = []byte{ - // 1343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0xda, 0x21, 0xb6, 0x9f, 0xf9, 0x7e, 0x15, 0x86, 0x14, 0x8c, 0x15, 0x0c, 0xf5, 0x01, - 0xc2, 0x8f, 0xec, 0xd6, 0xe6, 0xe7, 0x81, 0x82, 0x08, 0xd0, 0x90, 0x42, 0x69, 0xba, 0xa9, 0x7a, - 0xa8, 0x2a, 0x59, 0x6b, 0xef, 0x64, 0xb3, 0x8a, 0xbd, 0x33, 0xec, 0x8c, 0xdd, 0x5a, 0x15, 0x6a, - 0xd5, 0x3f, 0xa0, 0xaa, 0xd4, 0x7f, 0x81, 0x43, 0xdb, 0x4b, 0x2f, 0x55, 0x8f, 0x9c, 0x39, 0x22, - 0x2a, 0x55, 0xa8, 0x87, 0xaa, 0x82, 0xfe, 0x21, 0xd5, 0xbc, 0x99, 0x5d, 0xaf, 0x81, 0x60, 0x27, - 0x87, 0x4a, 0x3d, 0x79, 0xf6, 0xfd, 0xfc, 0x7c, 0xde, 0x9b, 0x79, 0x33, 0x86, 0xd3, 0x1d, 0x26, - 0x7a, 0x4c, 0x38, 0x6d, 0x4f, 0x50, 0x47, 0xd2, 0xc8, 0xa7, 0x71, 0x2f, 0x8c, 0xa4, 0x33, 0x68, - 0xb4, 0xa9, 0xf4, 0x1a, 0xce, 0xfd, 0x3e, 0x8d, 0x87, 0x36, 0x8f, 0x99, 0x64, 0xa4, 0xa6, 0x6d, - 0x6d, 0x65, 0x6b, 0x8f, 0x6c, 0x6d, 0x63, 0x5b, 0x5d, 0x08, 0x58, 0xc0, 0xd0, 0xd4, 0x51, 0x2b, - 0xed, 0x55, 0x3d, 0x12, 0x30, 0x16, 0x74, 0xa9, 0x83, 0x5f, 0xed, 0xfe, 0xa6, 0xe3, 0x45, 0x26, - 0x60, 0x75, 0xd1, 0xa8, 0x3c, 0x1e, 0x3a, 0x5e, 0x14, 0x31, 0xe9, 0xc9, 0x90, 0x45, 0xc2, 0x68, - 0xab, 0x19, 0x38, 0xbc, 0xc9, 0x1d, 0x39, 0xe4, 0x34, 0xd1, 0x2d, 0x66, 0x74, 0x28, 0x77, 0xda, - 0x5d, 0xd6, 0xd9, 0xde, 0x51, 0x9b, 0xf5, 0x1d, 0xa3, 0x8c, 0xfc, 0x52, 0xb6, 0xdc, 0x0b, 0xc2, - 0x08, 0x41, 0x24, 0xe0, 0xb5, 0x6d, 0x4b, 0xb3, 0x32, 0xfc, 0xf1, 0xa3, 0xfe, 0xb5, 0x05, 0xb5, - 0x55, 0x2a, 0x3f, 0xf1, 0xba, 0xa1, 0xef, 0x49, 0x16, 0x6f, 0x50, 0xb9, 0x32, 0xbc, 0x4d, 0xc3, - 0x60, 0x4b, 0xba, 0xf4, 0x7e, 0x9f, 0x0a, 0x49, 0x0e, 0xc1, 0xdc, 0x16, 0x0a, 0x2a, 0xd6, 0x71, - 0x6b, 0x29, 0xef, 0x9a, 0x2f, 0xf2, 0x1e, 0xc0, 0x28, 0x53, 0x25, 0x77, 0xdc, 0x5a, 0x2a, 0x37, - 0x4f, 0xd8, 0xd9, 0xea, 0xea, 0xb2, 0x1b, 0x58, 0xf6, 0xba, 0x17, 0x50, 0x13, 0xd3, 0xcd, 0x78, - 0xd6, 0x9f, 0x59, 0x70, 0x6c, 0x47, 0x08, 0x82, 0xb3, 0x48, 0x50, 0xf2, 0x36, 0xec, 0xc7, 0xd2, - 0xb4, 0xc6, 0x90, 0x94, 0x51, 0xa6, 0x4d, 0xc9, 0x1a, 0xc0, 0x20, 0x09, 0x21, 0x2a, 0xb9, 0xe3, - 0xf9, 0xa5, 0x72, 0xf3, 0x94, 0xfd, 0xe6, 0x66, 0xdb, 0x69, 0x52, 0x37, 0xe3, 0x4c, 0x56, 0xc7, - 0x98, 0xe5, 0x91, 0xd9, 0xc9, 0x89, 0xcc, 0x34, 0xd4, 0x31, 0x6a, 0x9b, 0xb0, 0xb8, 0x4a, 0xe5, - 0x5d, 0x4f, 0x52, 0x31, 0xc6, 0x2f, 0x29, 0xed, 0x78, 0x09, 0xad, 0x3d, 0x97, 0xf0, 0x77, 0x0b, - 0x8e, 0xee, 0x90, 0xe8, 0xbf, 0x5d, 0xc0, 0x47, 0x16, 0x94, 0xd2, 0x14, 0xa4, 0x09, 0x05, 0xcf, - 0xf7, 0x63, 0x2a, 0x04, 0xe2, 0x2f, 0xad, 0x54, 0x9e, 0xfe, 0xb2, 0xbc, 0x60, 0xc2, 0x5e, 0xd7, - 0x9a, 0x0d, 0x19, 0x87, 0x51, 0xe0, 0x26, 0x86, 0x64, 0x19, 0x0a, 0xbc, 0xdf, 0x6e, 0x6d, 0xd3, - 0xa1, 0xd9, 0xa2, 0x0b, 0xb6, 0x3e, 0xaf, 0x76, 0x72, 0x94, 0xed, 0xeb, 0xd1, 0xd0, 0x9d, 0xe3, - 0xfd, 0xf6, 0x1d, 0x3a, 0x54, 0x75, 0x1a, 0x30, 0x19, 0x46, 0x41, 0x8b, 0xb3, 0xcf, 0x69, 0x8c, - 0xd8, 0xf3, 0x6e, 0x59, 0xcb, 0xd6, 0x95, 0x88, 0x9c, 0x81, 0x03, 0x3c, 0x66, 0x9c, 0x09, 0x1a, - 0xb7, 0x78, 0x1c, 0xb2, 0x38, 0x94, 0xc3, 0xca, 0x2c, 0xda, 0xcd, 0x27, 0x8a, 0x75, 0x23, 0xaf, - 0x37, 0xe0, 0xf0, 0x2a, 0x95, 0x2b, 0xaa, 0xcc, 0x53, 0x9e, 0xab, 0xfa, 0x57, 0x50, 0x79, 0xd5, - 0xc5, 0xb4, 0xf1, 0x3c, 0x14, 0x75, 0x1b, 0x43, 0xdf, 0x6c, 0x97, 0x23, 0xd9, 0xae, 0xe8, 0x01, - 0x81, 0xae, 0x6b, 0x37, 0xdd, 0x02, 0x9a, 0xae, 0xf9, 0x64, 0x19, 0xf6, 0xe1, 0xd2, 0x54, 0xe0, - 0xf0, 0x0e, 0x2e, 0xae, 0xb6, 0xaa, 0x1f, 0x86, 0xb7, 0xd2, 0xcd, 0xa4, 0x15, 0x1a, 0x71, 0xfd, - 0x01, 0x1c, 0x7a, 0x59, 0xf1, 0x6f, 0xe2, 0x3a, 0x08, 0x07, 0x56, 0xa9, 0xdc, 0x18, 0x46, 0x1d, - 0xd5, 0x61, 0x83, 0xc9, 0x06, 0x92, 0x15, 0x1a, 0x3c, 0x15, 0x28, 0x08, 0x2d, 0x42, 0x38, 0x45, - 0x37, 0xf9, 0xac, 0x2f, 0xa0, 0xfd, 0x3d, 0xe6, 0xd3, 0xb5, 0x68, 0x93, 0x25, 0x51, 0x7e, 0xb2, - 0xe0, 0xe0, 0x98, 0xd8, 0xc4, 0xb9, 0x00, 0xa5, 0x88, 0xf9, 0xb4, 0x15, 0x46, 0x9b, 0xcc, 0x10, - 0xab, 0x64, 0x51, 0xf2, 0x26, 0xb7, 0x53, 0xa7, 0x62, 0x64, 0x56, 0xe4, 0x33, 0x38, 0xe8, 0x71, - 0xde, 0x0d, 0x3b, 0xb8, 0x8b, 0x5b, 0x03, 0x1a, 0x8b, 0xd1, 0x8c, 0x3c, 0x33, 0xf1, 0x4c, 0x69, - 0x73, 0x8c, 0x49, 0x32, 0x71, 0x8c, 0xbc, 0xfe, 0x43, 0x0e, 0xca, 0x19, 0x1b, 0x42, 0x60, 0x36, - 0xf2, 0x7a, 0x54, 0x9f, 0x09, 0x17, 0xd7, 0xe4, 0x08, 0x14, 0x3d, 0xce, 0x5b, 0x28, 0xcf, 0xa1, - 0xbc, 0xe0, 0x71, 0x7e, 0x4f, 0xa9, 0x2a, 0x50, 0x48, 0x00, 0xe5, 0xb5, 0xc6, 0x7c, 0x92, 0xa3, - 0x00, 0x41, 0x28, 0x5b, 0x1d, 0xd6, 0xeb, 0x85, 0x12, 0xb7, 0x74, 0xc9, 0x2d, 0x05, 0xa1, 0xbc, - 0x81, 0x02, 0xa5, 0x6e, 0xf7, 0xc3, 0xae, 0xdf, 0x92, 0x5e, 0x20, 0x2a, 0xfb, 0xb4, 0x1a, 0x25, - 0x1f, 0x7b, 0x81, 0x40, 0x6f, 0x96, 0x72, 0x9d, 0x33, 0xde, 0xcc, 0x20, 0x25, 0xb7, 0x12, 0x6f, - 0x9f, 0x72, 0x51, 0x29, 0xe0, 0x78, 0x39, 0x31, 0xa9, 0x14, 0x1f, 0x30, 0xbf, 0xdf, 0xa5, 0x26, - 0xcb, 0x4d, 0xca, 0x05, 0x39, 0x0b, 0xc4, 0xdc, 0x66, 0xc2, 0xdf, 0x4e, 0xb3, 0x15, 0x31, 0xdb, - 0xbc, 0xd6, 0x6c, 0xf8, 0xdb, 0x49, 0xa9, 0x6e, 0xc3, 0x9c, 0x0e, 0xa1, 0x8a, 0xc4, 0x3d, 0xb9, - 0x95, 0x14, 0x49, 0xad, 0xb3, 0x95, 0xc8, 0x8d, 0x57, 0x62, 0x1e, 0xf2, 0xa2, 0xdf, 0x33, 0xf5, - 0x51, 0xcb, 0xfa, 0x16, 0xcc, 0x5f, 0x5f, 0xb9, 0xb1, 0xf6, 0x91, 0x9a, 0x5b, 0xc9, 0x09, 0x26, - 0x30, 0xeb, 0x7b, 0xd2, 0xc3, 0x98, 0xfb, 0x5d, 0x5c, 0xa7, 0x79, 0x72, 0x99, 0x3c, 0xa3, 0x93, - 0x9e, 0x1f, 0xbb, 0x41, 0x17, 0x60, 0x1f, 0x8f, 0xd9, 0x80, 0x62, 0xa9, 0x8b, 0xae, 0xfe, 0xa8, - 0x7f, 0x9b, 0x83, 0x03, 0x99, 0x54, 0x66, 0x27, 0x12, 0x98, 0xed, 0x30, 0x5f, 0x37, 0xf9, 0x7f, - 0x2e, 0xae, 0x15, 0xca, 0x2e, 0x0b, 0x12, 0x94, 0x5d, 0x16, 0x28, 0x2b, 0xdc, 0xaa, 0xba, 0x77, - 0xb8, 0x56, 0x59, 0xc2, 0xc8, 0xa7, 0x5f, 0x60, 0xc7, 0xf2, 0xae, 0xfe, 0x50, 0xbe, 0x6a, 0x26, - 0xce, 0x21, 0x74, 0xb5, 0x54, 0x76, 0x03, 0xaf, 0xdb, 0xa7, 0x95, 0x02, 0xca, 0xf4, 0x07, 0xb9, - 0x05, 0x25, 0x1e, 0x33, 0xb6, 0xd9, 0x62, 0x5c, 0x60, 0x99, 0xcb, 0xcd, 0xa5, 0x49, 0x5d, 0x5b, - 0x57, 0x0e, 0x1f, 0x72, 0xe1, 0x16, 0xb9, 0x59, 0x65, 0x4a, 0x50, 0x1a, 0x2b, 0xc1, 0x22, 0x94, - 0x14, 0x15, 0xc1, 0xbd, 0x0e, 0xad, 0x80, 0xde, 0x33, 0xa9, 0xe0, 0xfd, 0xd9, 0x62, 0x6e, 0x3e, - 0x5f, 0xbf, 0x01, 0x05, 0x13, 0x51, 0xf1, 0x53, 0x83, 0x21, 0xe9, 0xa2, 0x5a, 0x27, 0x4c, 0x72, - 0x23, 0x26, 0x49, 0x5f, 0xf2, 0xa3, 0xbe, 0xd4, 0xef, 0x40, 0x31, 0x81, 0x45, 0xae, 0x41, 0x5e, - 0xb1, 0xb1, 0x70, 0x0f, 0x9e, 0x9c, 0x92, 0xcd, 0xca, 0xec, 0xe3, 0x3f, 0x8f, 0xcd, 0xb8, 0xca, - 0xb3, 0xf9, 0x33, 0x40, 0x61, 0x83, 0xc6, 0x83, 0xb0, 0x43, 0xc9, 0x8f, 0x16, 0x94, 0x33, 0xa3, - 0x83, 0x34, 0x27, 0xc5, 0x7b, 0x75, 0xfc, 0x54, 0xcf, 0xed, 0xca, 0x47, 0xef, 0x88, 0x7a, 0xe3, - 0x9b, 0xdf, 0xfe, 0xfe, 0x3e, 0x77, 0x86, 0x9c, 0x72, 0x26, 0xbc, 0x7e, 0xd3, 0x09, 0x46, 0x1e, - 0x5a, 0x00, 0xa3, 0x69, 0x49, 0x1a, 0x53, 0xa4, 0x1d, 0x1f, 0xb7, 0xd5, 0xe6, 0x6e, 0x5c, 0x0c, - 0x50, 0x07, 0x81, 0x9e, 0x22, 0x27, 0x27, 0x01, 0x35, 0x33, 0x9a, 0xfc, 0x6a, 0xc1, 0xff, 0xc7, - 0x2f, 0x1a, 0x72, 0x61, 0x8a, 0xbc, 0xaf, 0xde, 0x58, 0xd5, 0x8b, 0xbb, 0x75, 0x33, 0x90, 0x2f, - 0x20, 0x64, 0x87, 0x2c, 0x4f, 0x82, 0x8c, 0x37, 0x93, 0x70, 0xba, 0x18, 0x83, 0x3c, 0xb2, 0x60, - 0xfe, 0xe5, 0xbb, 0x9b, 0x5c, 0x9a, 0x02, 0xc3, 0xeb, 0x1e, 0x08, 0xd5, 0xcb, 0xbb, 0x77, 0x34, - 0xf0, 0x2f, 0x21, 0xfc, 0x06, 0x71, 0xa6, 0x84, 0xff, 0xa5, 0x3e, 0x8d, 0x0f, 0xc8, 0x53, 0x2b, - 0x73, 0xf7, 0x67, 0x1f, 0x92, 0xe4, 0xca, 0xd4, 0x95, 0x7c, 0xcd, 0x43, 0xb7, 0xfa, 0xee, 0x1e, - 0xbd, 0x0d, 0x9f, 0x2b, 0xc8, 0xe7, 0x22, 0x39, 0x3f, 0x89, 0xcf, 0xe8, 0x0d, 0x4a, 0x65, 0xda, - 0x95, 0x3f, 0x2c, 0x7c, 0x84, 0xbd, 0xee, 0x0f, 0x06, 0xb9, 0x3a, 0x05, 0xb0, 0x37, 0xfc, 0x39, - 0xaa, 0x5e, 0xdb, 0xb3, 0xbf, 0xa1, 0x76, 0x15, 0xa9, 0x5d, 0x26, 0x17, 0x77, 0x47, 0x2d, 0xed, - 0xd8, 0x43, 0x0b, 0x4a, 0xe9, 0x6d, 0x41, 0xde, 0x99, 0x04, 0xe7, 0xe5, 0x3b, 0xac, 0xda, 0xd8, - 0x85, 0x87, 0x81, 0xdc, 0x44, 0xc8, 0x67, 0xc9, 0xe9, 0x49, 0x90, 0xbd, 0x76, 0x27, 0x6c, 0xe1, - 0x4b, 0x7f, 0xe5, 0xee, 0xe3, 0xe7, 0x35, 0xeb, 0xc9, 0xf3, 0x9a, 0xf5, 0xd7, 0xf3, 0x9a, 0xf5, - 0xdd, 0x8b, 0xda, 0xcc, 0x93, 0x17, 0xb5, 0x99, 0x67, 0x2f, 0x6a, 0x33, 0x9f, 0x36, 0x83, 0x50, - 0x6e, 0xf5, 0xdb, 0x76, 0x87, 0xf5, 0x92, 0x78, 0xfa, 0x67, 0x59, 0xf8, 0xdb, 0x4e, 0xa7, 0x1b, - 0xd2, 0x48, 0x3a, 0x41, 0xcc, 0x3b, 0x8e, 0xec, 0x09, 0x3d, 0x73, 0xdb, 0x73, 0xf8, 0x76, 0x3f, - 0xf7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0xb1, 0xf9, 0xc8, 0xf8, 0x0f, 0x00, 0x00, + // 1382 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0xda, 0x69, 0x6c, 0x3f, 0xee, 0xff, 0x4f, 0x32, 0x0d, 0xad, 0x63, 0xa5, 0x6e, 0x59, + 0x89, 0x36, 0x7d, 0xc9, 0x2e, 0x76, 0x5f, 0x0f, 0xa5, 0x55, 0xdd, 0x96, 0x34, 0xb4, 0x94, 0xb0, + 0x41, 0x1c, 0x10, 0xd2, 0x6a, 0xed, 0x9d, 0x6c, 0x56, 0xb1, 0x77, 0xa6, 0x3b, 0x63, 0x83, 0x85, + 0x90, 0x10, 0x1f, 0x00, 0x21, 0xf1, 0x15, 0x7a, 0x80, 0x13, 0x17, 0xc4, 0xb1, 0x02, 0x71, 0xe9, + 0xb1, 0x2a, 0x12, 0xaa, 0x38, 0x20, 0xd4, 0xf2, 0x41, 0xd0, 0xbc, 0xac, 0xbd, 0xdb, 0x26, 0xb5, + 0x9d, 0x5b, 0x4f, 0x9e, 0x7d, 0x5e, 0x7f, 0xbf, 0xe7, 0x99, 0x79, 0x66, 0x0c, 0xa7, 0xdb, 0x84, + 0x75, 0x09, 0xb3, 0x5b, 0x1e, 0xc3, 0x36, 0xc7, 0x91, 0x8f, 0xe3, 0x6e, 0x18, 0x71, 0xbb, 0x5f, + 0x6f, 0x61, 0xee, 0xd5, 0xed, 0xfb, 0x3d, 0x1c, 0x0f, 0x2c, 0x1a, 0x13, 0x4e, 0x50, 0x4d, 0xd9, + 0x5a, 0xc2, 0xd6, 0x1a, 0xd9, 0x5a, 0xda, 0xb6, 0xba, 0x18, 0x90, 0x80, 0x48, 0x53, 0x5b, 0xac, + 0x94, 0x57, 0x75, 0x29, 0x20, 0x24, 0xe8, 0x60, 0x5b, 0x7e, 0xb5, 0x7a, 0x5b, 0xb6, 0x17, 0xe9, + 0x80, 0xd5, 0x65, 0xad, 0xf2, 0x68, 0x68, 0x7b, 0x51, 0x44, 0xb8, 0xc7, 0x43, 0x12, 0x31, 0xad, + 0xad, 0xa6, 0xe0, 0xd0, 0x06, 0xb5, 0xf9, 0x80, 0xe2, 0x44, 0xb7, 0x9c, 0xd2, 0x49, 0x79, 0x46, + 0x9b, 0x21, 0x25, 0x19, 0x0c, 0xf9, 0x50, 0x2f, 0x08, 0x23, 0x99, 0x66, 0x37, 0xdb, 0x5d, 0x0a, + 0x90, 0x8e, 0xbb, 0xa4, 0x6c, 0x5d, 0xc5, 0x51, 0x57, 0x63, 0x2f, 0x40, 0xad, 0x0e, 0x69, 0xef, + 0x28, 0xad, 0xf9, 0xb5, 0x01, 0xb5, 0x35, 0xcc, 0x3f, 0xf1, 0x3a, 0xa1, 0xef, 0x71, 0x12, 0x6f, + 0x62, 0xde, 0x1c, 0xdc, 0xc6, 0x61, 0xb0, 0xcd, 0x1d, 0x7c, 0xbf, 0x87, 0x19, 0x47, 0x87, 0x61, + 0x6e, 0x5b, 0x0a, 0x2a, 0xc6, 0x71, 0x63, 0x25, 0xef, 0xe8, 0x2f, 0xf4, 0x1e, 0xc0, 0x08, 0x73, + 0x25, 0x77, 0xdc, 0x58, 0x29, 0x37, 0x4e, 0x58, 0xe9, 0x4e, 0xa8, 0x16, 0x69, 0xbc, 0xd6, 0x86, + 0x17, 0x60, 0x1d, 0xd3, 0x49, 0x79, 0x9a, 0x4f, 0x0d, 0x38, 0xb6, 0x27, 0x04, 0x46, 0x49, 0xc4, + 0x30, 0x7a, 0x0b, 0x0e, 0x4a, 0xd4, 0x6e, 0x06, 0x49, 0x59, 0xca, 0x94, 0x29, 0x5a, 0x07, 0xe8, + 0x27, 0x21, 0x58, 0x25, 0x77, 0x3c, 0xbf, 0x52, 0x6e, 0x9c, 0xb2, 0x5e, 0xbd, 0x31, 0xac, 0x61, + 0x52, 0x27, 0xe5, 0x8c, 0xd6, 0x32, 0xcc, 0xf2, 0x92, 0xd9, 0xc9, 0xb1, 0xcc, 0x14, 0xd4, 0x0c, + 0xb5, 0x2d, 0x58, 0x5e, 0xc3, 0xfc, 0xae, 0xc7, 0x31, 0xcb, 0xf0, 0x4b, 0x4a, 0x9b, 0x2d, 0xa1, + 0xb1, 0xef, 0x12, 0xfe, 0x69, 0xc0, 0xd1, 0x3d, 0x12, 0xbd, 0xde, 0x05, 0x7c, 0x68, 0x40, 0x69, + 0x98, 0x02, 0x35, 0xa0, 0xe0, 0xf9, 0x7e, 0x8c, 0x19, 0x93, 0xf8, 0x4b, 0xcd, 0xca, 0x93, 0x9f, + 0x57, 0x17, 0x75, 0xd8, 0xeb, 0x4a, 0xb3, 0xc9, 0xe3, 0x30, 0x0a, 0x9c, 0xc4, 0x10, 0xad, 0x42, + 0x81, 0xf6, 0x5a, 0xee, 0x0e, 0x1e, 0xe8, 0x2d, 0xba, 0x68, 0xa9, 0xb3, 0x6d, 0x25, 0xc7, 0xde, + 0xba, 0x1e, 0x0d, 0x9c, 0x39, 0xda, 0x6b, 0xdd, 0xc1, 0x03, 0x51, 0xa7, 0x3e, 0xe1, 0x61, 0x14, + 0xb8, 0x94, 0x7c, 0x8e, 0x63, 0x89, 0x3d, 0xef, 0x94, 0x95, 0x6c, 0x43, 0x88, 0xd0, 0x19, 0x58, + 0xa0, 0x31, 0xa1, 0x84, 0xe1, 0xd8, 0xa5, 0x71, 0x48, 0xe2, 0x90, 0x0f, 0x2a, 0xb3, 0xd2, 0x6e, + 0x3e, 0x51, 0x6c, 0x68, 0xb9, 0x59, 0x87, 0x23, 0x6b, 0x98, 0x37, 0x45, 0x99, 0x27, 0x3c, 0x57, + 0xe6, 0xef, 0x06, 0x54, 0x5e, 0xf6, 0xd1, 0x7d, 0x3c, 0x0f, 0x45, 0xd5, 0xc7, 0xd0, 0xd7, 0xfb, + 0x65, 0x29, 0xdd, 0x16, 0x35, 0x13, 0xa4, 0xeb, 0xfa, 0x4d, 0xa7, 0x20, 0x4d, 0xd7, 0x7d, 0xb4, + 0x0a, 0x07, 0xe4, 0x52, 0x97, 0xe0, 0xc8, 0x1e, 0x2e, 0x8e, 0xb2, 0x42, 0x4d, 0x28, 0x31, 0x7f, + 0xc7, 0x55, 0x2e, 0xaa, 0x7b, 0x6f, 0x8f, 0xdb, 0x08, 0x2a, 0x40, 0x91, 0xf9, 0x3b, 0x72, 0x65, + 0x1e, 0x81, 0x37, 0x87, 0x3b, 0x52, 0xe9, 0x14, 0x6d, 0xf3, 0x37, 0x03, 0x0e, 0xbf, 0xa8, 0x79, + 0xdd, 0xc8, 0x1d, 0x82, 0x85, 0x35, 0xcc, 0x37, 0x07, 0x51, 0x5b, 0xec, 0x35, 0x4d, 0xcc, 0x02, + 0x94, 0x16, 0x6a, 0x4e, 0x15, 0x28, 0x30, 0x25, 0x92, 0x94, 0x8a, 0x4e, 0xf2, 0x69, 0x2e, 0x4a, + 0xfb, 0x7b, 0xc4, 0xc7, 0xeb, 0xd1, 0x16, 0x49, 0xa2, 0xfc, 0x6a, 0xc0, 0xa1, 0x8c, 0x58, 0xc7, + 0xb9, 0x03, 0x0b, 0x3e, 0xde, 0xf2, 0x7a, 0x1d, 0xee, 0x46, 0xc4, 0xc7, 0x6e, 0x18, 0x6d, 0x11, + 0x5d, 0xa4, 0x63, 0x69, 0xc8, 0xb4, 0x41, 0xad, 0x9b, 0xca, 0x70, 0x18, 0xe3, 0x0d, 0x3f, 0x2b, + 0x40, 0x9f, 0xc1, 0x21, 0x8f, 0xd2, 0x4e, 0xd8, 0x96, 0xa7, 0xcc, 0xed, 0xe3, 0x98, 0x8d, 0x66, + 0xf8, 0x99, 0xb1, 0x67, 0x5e, 0x99, 0xcb, 0xd0, 0x28, 0x15, 0x47, 0xcb, 0xcd, 0x1f, 0x72, 0x50, + 0x4e, 0xd9, 0x20, 0x04, 0xb3, 0x91, 0xd7, 0xc5, 0xea, 0xcc, 0x3a, 0x72, 0x8d, 0x96, 0xa0, 0xe8, + 0x51, 0xea, 0x4a, 0x79, 0x4e, 0xca, 0x0b, 0x1e, 0xa5, 0xf7, 0x84, 0xaa, 0x02, 0x85, 0x04, 0x50, + 0x5e, 0x69, 0xf4, 0x27, 0x3a, 0x0a, 0x10, 0x84, 0xdc, 0x6d, 0x93, 0x6e, 0x37, 0xe4, 0xf2, 0xc8, + 0x95, 0x9c, 0x52, 0x10, 0xf2, 0x1b, 0x52, 0x20, 0xd4, 0xad, 0x5e, 0xd8, 0xf1, 0x5d, 0xee, 0x05, + 0xac, 0x72, 0x40, 0xa9, 0xa5, 0xe4, 0x63, 0x2f, 0x60, 0xd2, 0x9b, 0x0c, 0xb9, 0xce, 0x69, 0x6f, + 0xa2, 0x91, 0xa2, 0x5b, 0x89, 0xb7, 0x8f, 0x29, 0xab, 0x14, 0xe4, 0xf8, 0x3b, 0x31, 0xae, 0x14, + 0x1f, 0x10, 0xbf, 0xd7, 0xc1, 0x3a, 0xcb, 0x4d, 0x4c, 0x19, 0x3a, 0x0b, 0x48, 0xdf, 0xc5, 0x62, + 0x97, 0x25, 0xd9, 0x8a, 0x32, 0xdb, 0xbc, 0xd2, 0x6c, 0xfa, 0x3b, 0x49, 0xa9, 0x6e, 0xc3, 0x9c, + 0x0a, 0x21, 0x8a, 0x44, 0x3d, 0xbe, 0x9d, 0x14, 0x49, 0xac, 0xd3, 0x95, 0xc8, 0x65, 0x2b, 0x31, + 0x0f, 0x79, 0xd6, 0xeb, 0xea, 0xfa, 0x88, 0xa5, 0xb9, 0x0d, 0xf3, 0xd7, 0x9b, 0x37, 0xd6, 0x3f, + 0x12, 0x73, 0x35, 0x99, 0x30, 0x08, 0x66, 0x7d, 0x8f, 0x7b, 0x32, 0xe6, 0x41, 0x47, 0xae, 0x87, + 0x79, 0x72, 0xa9, 0x3c, 0xa3, 0x49, 0x94, 0xcf, 0xdc, 0xf0, 0x8b, 0x70, 0x80, 0xc6, 0xa4, 0x8f, + 0x65, 0xa9, 0x8b, 0x8e, 0xfa, 0x30, 0xbf, 0xcd, 0xc1, 0x42, 0x2a, 0x95, 0xde, 0x9f, 0x08, 0x66, + 0xdb, 0xc4, 0x57, 0x4d, 0xfe, 0x9f, 0x23, 0xd7, 0x02, 0x65, 0x87, 0x04, 0x09, 0xca, 0x0e, 0x09, + 0x84, 0x95, 0xdc, 0xb8, 0xaa, 0x77, 0x72, 0x2d, 0xb2, 0x84, 0x91, 0x8f, 0xbf, 0x90, 0x1d, 0xcb, + 0x3b, 0xea, 0x43, 0xf8, 0x8a, 0x99, 0x3d, 0x27, 0xa1, 0x8b, 0xa5, 0xb0, 0xeb, 0x7b, 0x9d, 0x1e, + 0xae, 0x14, 0xa4, 0x4c, 0x7d, 0xa0, 0x5b, 0x50, 0xa2, 0x31, 0x21, 0x5b, 0x2e, 0xa1, 0x4c, 0x96, + 0xb9, 0xdc, 0x58, 0x19, 0xd7, 0xb5, 0x0d, 0xe1, 0xf0, 0x21, 0x65, 0x4e, 0x91, 0xea, 0x55, 0xaa, + 0x04, 0xa5, 0x4c, 0x09, 0x96, 0xa1, 0x24, 0xa8, 0x30, 0xea, 0xb5, 0x71, 0x05, 0xd4, 0x9e, 0x19, + 0x0a, 0xde, 0x9f, 0x2d, 0xe6, 0xe6, 0xf3, 0xe6, 0x0d, 0x28, 0xe8, 0x88, 0x82, 0x9f, 0x18, 0x39, + 0x49, 0x17, 0xc5, 0x3a, 0x61, 0x92, 0x1b, 0x31, 0x49, 0xfa, 0x92, 0x1f, 0xf5, 0xc5, 0xbc, 0x03, + 0xc5, 0x04, 0x16, 0xba, 0x06, 0x79, 0xc1, 0xc6, 0x90, 0x7b, 0xf0, 0xe4, 0x84, 0x6c, 0x9a, 0xb3, + 0x8f, 0xfe, 0x3e, 0x36, 0xe3, 0x08, 0xcf, 0xc6, 0x4f, 0x00, 0x85, 0x4d, 0x1c, 0xf7, 0xc3, 0x36, + 0x46, 0x3f, 0x1a, 0x50, 0x4e, 0x0d, 0x14, 0xd4, 0x18, 0x17, 0xef, 0xe5, 0xa1, 0x54, 0x3d, 0x37, + 0x95, 0x8f, 0xda, 0x11, 0x66, 0xfd, 0x9b, 0x3f, 0xfe, 0xfd, 0x3e, 0x77, 0x06, 0x9d, 0xb2, 0xc7, + 0x3c, 0x64, 0x87, 0xf3, 0x0c, 0x3d, 0x30, 0x00, 0x46, 0x33, 0x14, 0xd5, 0x27, 0x48, 0x9b, 0x1d, + 0xc2, 0xd5, 0xc6, 0x34, 0x2e, 0x1a, 0xa8, 0x2d, 0x81, 0x9e, 0x42, 0x27, 0xc7, 0x01, 0xd5, 0x93, + 0x1b, 0xfd, 0x62, 0xc0, 0xff, 0xb3, 0x57, 0x18, 0xba, 0x30, 0x41, 0xde, 0x97, 0x2f, 0xc3, 0xea, + 0xc5, 0x69, 0xdd, 0x34, 0xe4, 0x0b, 0x12, 0xb2, 0x8d, 0x56, 0xc7, 0x41, 0x96, 0xd7, 0x1c, 0xb3, + 0x3b, 0x32, 0x06, 0x7a, 0x68, 0xc0, 0xfc, 0x8b, 0x4f, 0x0b, 0x74, 0x69, 0x02, 0x0c, 0xbb, 0x3d, + 0x60, 0xaa, 0x97, 0xa7, 0x77, 0xd4, 0xf0, 0x2f, 0x49, 0xf8, 0x75, 0x64, 0x4f, 0x08, 0xff, 0x4b, + 0x75, 0x1a, 0xbf, 0x42, 0x4f, 0x8c, 0xd4, 0xb3, 0x22, 0xfd, 0xd0, 0x45, 0x57, 0x26, 0xae, 0xe4, + 0x2e, 0x0f, 0xf1, 0xea, 0xbb, 0xfb, 0xf4, 0xd6, 0x7c, 0xae, 0x48, 0x3e, 0x17, 0xd1, 0xf9, 0x71, + 0x7c, 0x46, 0x6f, 0x64, 0xcc, 0x87, 0x5d, 0xf9, 0xcb, 0x90, 0x8f, 0xc4, 0xdd, 0xfe, 0x00, 0xa1, + 0xab, 0x13, 0x00, 0x7b, 0xc5, 0x9f, 0xb7, 0xea, 0xb5, 0x7d, 0xfb, 0x6b, 0x6a, 0x57, 0x25, 0xb5, + 0xcb, 0xe8, 0xe2, 0x74, 0xd4, 0x86, 0x1d, 0x7b, 0x60, 0x40, 0x69, 0x78, 0x5b, 0xa0, 0x77, 0xc6, + 0xc1, 0x79, 0xf1, 0x0e, 0xab, 0xd6, 0xa7, 0xf0, 0xd0, 0x90, 0x1b, 0x12, 0xf2, 0x59, 0x74, 0x7a, + 0x1c, 0x64, 0xaf, 0xd5, 0x0e, 0x5d, 0xf9, 0x4f, 0xa4, 0x79, 0xf7, 0xd1, 0xb3, 0x9a, 0xf1, 0xf8, + 0x59, 0xcd, 0xf8, 0xe7, 0x59, 0xcd, 0xf8, 0xee, 0x79, 0x6d, 0xe6, 0xf1, 0xf3, 0xda, 0xcc, 0xd3, + 0xe7, 0xb5, 0x99, 0x4f, 0x1b, 0x41, 0xc8, 0xb7, 0x7b, 0x2d, 0xab, 0x4d, 0xba, 0x49, 0x3c, 0xf5, + 0xb3, 0xca, 0xfc, 0x1d, 0xbb, 0xdd, 0x09, 0x71, 0xc4, 0xed, 0x20, 0xa6, 0x6d, 0x9b, 0x77, 0x99, + 0x9a, 0xb9, 0xad, 0x39, 0xf9, 0xdf, 0xe2, 0xdc, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0x18, + 0x32, 0x53, 0xc4, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1284,9 +1319,9 @@ type ServiceClient interface { GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) // GetValidatorSetByHeight queries validator-set at a given height. GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. + // ABCIQuery defines a query handler that supports ABCI queries directly to + // the application, bypassing Tendermint completely. The ABCI query must + // contain a valid and supported path, including app, custom, p2p, and store. // // Since: cosmos-sdk 0.46 ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) @@ -1377,9 +1412,9 @@ type ServiceServer interface { GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) // GetValidatorSetByHeight queries validator-set at a given height. GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. + // ABCIQuery defines a query handler that supports ABCI queries directly to + // the application, bypassing Tendermint completely. The ABCI query must + // contain a valid and supported path, including app, custom, p2p, and store. // // Since: cosmos-sdk 0.46 ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) @@ -1861,6 +1896,18 @@ func (m *GetBlockByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SdkBlock != nil { + { + size, err := m.SdkBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if m.Block != nil { { size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) @@ -1931,6 +1978,18 @@ func (m *GetLatestBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.SdkBlock != nil { + { + size, err := m.SdkBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if m.Block != nil { { size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) @@ -2069,9 +2128,9 @@ func (m *GetNodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.NodeInfo != nil { + if m.DefaultNodeInfo != nil { { - size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DefaultNodeInfo.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2565,6 +2624,10 @@ func (m *GetBlockByHeightResponse) Size() (n int) { l = m.Block.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.SdkBlock != nil { + l = m.SdkBlock.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2591,6 +2654,10 @@ func (m *GetLatestBlockResponse) Size() (n int) { l = m.Block.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.SdkBlock != nil { + l = m.SdkBlock.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2630,8 +2697,8 @@ func (m *GetNodeInfoResponse) Size() (n int) { } var l int _ = l - if m.NodeInfo != nil { - l = m.NodeInfo.Size() + if m.DefaultNodeInfo != nil { + l = m.DefaultNodeInfo.Size() n += 1 + l + sovQuery(uint64(l)) } if m.ApplicationVersion != nil { @@ -3607,6 +3674,42 @@ func (m *GetBlockByHeightResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SdkBlock", 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.SdkBlock == nil { + m.SdkBlock = &Block{} + } + if err := m.SdkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3779,6 +3882,42 @@ func (m *GetLatestBlockResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SdkBlock", 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.SdkBlock == nil { + m.SdkBlock = &Block{} + } + if err := m.SdkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4001,7 +4140,7 @@ func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultNodeInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4028,10 +4167,10 @@ func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.NodeInfo == nil { - m.NodeInfo = &p2p.NodeInfo{} + if m.DefaultNodeInfo == nil { + m.DefaultNodeInfo = &p2p.DefaultNodeInfo{} } - if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DefaultNodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/client/grpc/tmservice/service.go b/client/grpc/tmservice/service.go index 7890dd1b7f1a..9c698c7733bd 100644 --- a/client/grpc/tmservice/service.go +++ b/client/grpc/tmservice/service.go @@ -72,8 +72,9 @@ func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockReques } return &GetLatestBlockResponse{ - BlockId: &protoBlockID, - Block: protoBlock, + BlockId: &protoBlockID, + Block: protoBlock, + SdkBlock: convertBlock(protoBlock), }, nil } @@ -94,8 +95,9 @@ func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeight } return &GetBlockByHeightResponse{ - BlockId: &protoBlockID, - Block: protoBlock, + BlockId: &protoBlockID, + Block: protoBlock, + SdkBlock: convertBlock(protoBlock), }, nil } @@ -201,7 +203,7 @@ func (s queryServer) GetNodeInfo(ctx context.Context, req *GetNodeInfoRequest) ( } resp := GetNodeInfoResponse{ - NodeInfo: protoNodeInfo, + DefaultNodeInfo: protoNodeInfo, ApplicationVersion: &VersionInfo{ AppName: nodeInfo.AppName, Name: nodeInfo.Name, @@ -256,5 +258,5 @@ func RegisterTendermintService( // RegisterGRPCGatewayRoutes mounts the tendermint service's GRPC-gateway routes on the // given Mux. func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux) { - RegisterServiceHandlerClient(context.Background(), mux, NewServiceClient(clientConn)) + _ = RegisterServiceHandlerClient(context.Background(), mux, NewServiceClient(clientConn)) } diff --git a/client/grpc/tmservice/service_test.go b/client/grpc/tmservice/service_test.go index 54607bef29f7..030e62d4f0dd 100644 --- a/client/grpc/tmservice/service_test.go +++ b/client/grpc/tmservice/service_test.go @@ -12,6 +12,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/rest" + "github.com/cosmos/cosmos-sdk/types" qtypes "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" ) @@ -51,7 +52,7 @@ func (s *IntegrationTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s IntegrationTestSuite) TestQueryNodeInfo() { +func (s *IntegrationTestSuite) TestQueryNodeInfo() { val := s.network.Validators[0] res, err := s.queryClient.GetNodeInfo(context.Background(), &tmservice.GetNodeInfoRequest{}) @@ -65,7 +66,7 @@ func (s IntegrationTestSuite) TestQueryNodeInfo() { s.Require().Equal(getInfoRes.ApplicationVersion.AppName, version.NewInfo().AppName) } -func (s IntegrationTestSuite) TestQuerySyncing() { +func (s *IntegrationTestSuite) TestQuerySyncing() { val := s.network.Validators[0] _, err := s.queryClient.GetSyncing(context.Background(), &tmservice.GetSyncingRequest{}) @@ -77,7 +78,7 @@ func (s IntegrationTestSuite) TestQuerySyncing() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &syncingRes)) } -func (s IntegrationTestSuite) TestQueryLatestBlock() { +func (s *IntegrationTestSuite) TestQueryLatestBlock() { val := s.network.Validators[0] _, err := s.queryClient.GetLatestBlock(context.Background(), &tmservice.GetLatestBlockRequest{}) @@ -87,9 +88,11 @@ func (s IntegrationTestSuite) TestQueryLatestBlock() { s.Require().NoError(err) var blockInfoRes tmservice.GetLatestBlockResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) + s.Require().Equal(types.ValAddress(blockInfoRes.Block.Header.ProposerAddress).String(), blockInfoRes.SdkBlock.Header.ProposerAddress) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") } -func (s IntegrationTestSuite) TestQueryBlockByHeight() { +func (s *IntegrationTestSuite) TestQueryBlockByHeight() { val := s.network.Validators[0] _, err := s.queryClient.GetBlockByHeight(context.Background(), &tmservice.GetBlockByHeightRequest{Height: 1}) s.Require().NoError(err) @@ -98,9 +101,10 @@ func (s IntegrationTestSuite) TestQueryBlockByHeight() { s.Require().NoError(err) var blockInfoRes tmservice.GetBlockByHeightResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") } -func (s IntegrationTestSuite) TestQueryLatestValidatorSet() { +func (s *IntegrationTestSuite) TestQueryLatestValidatorSet() { val := s.network.Validators[0] // nil pagination @@ -113,7 +117,7 @@ func (s IntegrationTestSuite) TestQueryLatestValidatorSet() { s.Require().Equal(true, ok) s.Require().Equal(content, val.PubKey) - //with pagination + // with pagination _, err = s.queryClient.GetLatestValidatorSet(context.Background(), &tmservice.GetLatestValidatorSetRequest{Pagination: &qtypes.PageRequest{ Offset: 0, Limit: 10, @@ -135,7 +139,7 @@ func (s IntegrationTestSuite) TestQueryLatestValidatorSet() { s.Require().Equal(validatorSetRes.Validators[0].PubKey, anyPub) } -func (s IntegrationTestSuite) TestLatestValidatorSet_GRPC() { +func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPC() { vals := s.network.Validators testCases := []struct { name string @@ -166,7 +170,7 @@ func (s IntegrationTestSuite) TestLatestValidatorSet_GRPC() { } } -func (s IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { +func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { vals := s.network.Validators testCases := []struct { name string @@ -198,7 +202,7 @@ func (s IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { } } -func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { +func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { vals := s.network.Validators testCases := []struct { name string @@ -207,7 +211,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { expErrMsg string }{ {"nil request", nil, true, "request cannot be nil"}, - {"empty request", &tmservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than zero"}, + {"empty request", &tmservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than 0"}, {"no pagination", &tmservice.GetValidatorSetByHeightRequest{Height: 1}, false, ""}, {"with pagination", &tmservice.GetValidatorSetByHeightRequest{Height: 1, Pagination: &qtypes.PageRequest{Offset: 0, Limit: 1}}, false, ""}, } @@ -227,7 +231,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { } } -func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { +func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { vals := s.network.Validators testCases := []struct { name string @@ -235,7 +239,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { expErr bool expErrMsg string }{ - {"invalid height", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than zero"}, + {"invalid height", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than 0"}, {"no pagination", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, 1), false, ""}, {"pagination invalid fields", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d?pagination.offset=-1&pagination.limit=-2", vals[0].APIAddress, 1), true, "strconv.ParseUint"}, {"with pagination", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d?pagination.offset=0&pagination.limit=2", vals[0].APIAddress, 1), false, ""}, @@ -257,7 +261,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { } } -func (s IntegrationTestSuite) TestABCIQuery() { +func (s *IntegrationTestSuite) TestABCIQuery() { testCases := []struct { name string req *tmservice.ABCIQueryRequest diff --git a/client/grpc/tmservice/status.go b/client/grpc/tmservice/status.go index 0a002a93d092..a6269bcf0007 100644 --- a/client/grpc/tmservice/status.go +++ b/client/grpc/tmservice/status.go @@ -3,7 +3,7 @@ package tmservice import ( "context" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" ) diff --git a/client/grpc/tmservice/types.pb.go b/client/grpc/tmservice/types.pb.go new file mode 100644 index 000000000000..5473ff3db315 --- /dev/null +++ b/client/grpc/tmservice/types.pb.go @@ -0,0 +1,1314 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/base/tendermint/v1beta1/types.proto + +package tmservice + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + types "github.com/tendermint/tendermint/proto/tendermint/types" + version "github.com/tendermint/tendermint/proto/tendermint/version" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Block is tendermint type Block, with the Header proposer address +// field converted to bech32 string. +type Block struct { + Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` + Data types.Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` + LastCommit *types.Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` +} + +func (m *Block) Reset() { *m = Block{} } +func (m *Block) String() string { return proto.CompactTextString(m) } +func (*Block) ProtoMessage() {} +func (*Block) Descriptor() ([]byte, []int) { + return fileDescriptor_bb9931519c08e0d6, []int{0} +} +func (m *Block) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Block.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 *Block) XXX_Merge(src proto.Message) { + xxx_messageInfo_Block.Merge(m, src) +} +func (m *Block) XXX_Size() int { + return m.Size() +} +func (m *Block) XXX_DiscardUnknown() { + xxx_messageInfo_Block.DiscardUnknown(m) +} + +var xxx_messageInfo_Block proto.InternalMessageInfo + +func (m *Block) GetHeader() Header { + if m != nil { + return m.Header + } + return Header{} +} + +func (m *Block) GetData() types.Data { + if m != nil { + return m.Data + } + return types.Data{} +} + +func (m *Block) GetLastCommit() *types.Commit { + if m != nil { + return m.LastCommit + } + return nil +} + +// Header defines the structure of a Tendermint block header. +type Header struct { + // basic block info + Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` + ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` + // prev block info + LastBlockId types.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` + // hashes of block data + LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + // hashes from the app output from the prev block + ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` + AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` + // consensus info + EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` + // proposer_address is the original block proposer address, formatted as a Bech32 string. + // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + // for better UX. + ProposerAddress string `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { + return fileDescriptor_bb9931519c08e0d6, []int{1} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header.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 *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(m, src) +} +func (m *Header) XXX_Size() int { + return m.Size() +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_Header proto.InternalMessageInfo + +func (m *Header) GetVersion() version.Consensus { + if m != nil { + return m.Version + } + return version.Consensus{} +} + +func (m *Header) GetChainID() string { + if m != nil { + return m.ChainID + } + return "" +} + +func (m *Header) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Header) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *Header) GetLastBlockId() types.BlockID { + if m != nil { + return m.LastBlockId + } + return types.BlockID{} +} + +func (m *Header) GetLastCommitHash() []byte { + if m != nil { + return m.LastCommitHash + } + return nil +} + +func (m *Header) GetDataHash() []byte { + if m != nil { + return m.DataHash + } + return nil +} + +func (m *Header) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *Header) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil +} + +func (m *Header) GetConsensusHash() []byte { + if m != nil { + return m.ConsensusHash + } + return nil +} + +func (m *Header) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +func (m *Header) GetLastResultsHash() []byte { + if m != nil { + return m.LastResultsHash + } + return nil +} + +func (m *Header) GetEvidenceHash() []byte { + if m != nil { + return m.EvidenceHash + } + return nil +} + +func (m *Header) GetProposerAddress() string { + if m != nil { + return m.ProposerAddress + } + return "" +} + +func init() { + proto.RegisterType((*Block)(nil), "cosmos.base.tendermint.v1beta1.Block") + proto.RegisterType((*Header)(nil), "cosmos.base.tendermint.v1beta1.Header") +} + +func init() { + proto.RegisterFile("cosmos/base/tendermint/v1beta1/types.proto", fileDescriptor_bb9931519c08e0d6) +} + +var fileDescriptor_bb9931519c08e0d6 = []byte{ + // 598 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xcd, 0x6e, 0xd3, 0x4e, + 0x14, 0xc5, 0xe3, 0x7f, 0xd3, 0x7c, 0x4c, 0xbe, 0xfa, 0x1f, 0x55, 0x95, 0x1b, 0xc0, 0x89, 0x8a, + 0x28, 0xa1, 0x12, 0x76, 0x5b, 0x36, 0xb0, 0x60, 0x41, 0x92, 0x45, 0x23, 0xb1, 0xb2, 0x10, 0x0b, + 0x36, 0xd1, 0xd8, 0x1e, 0xec, 0x51, 0x6d, 0x8f, 0xe5, 0x99, 0x44, 0xf0, 0x16, 0x7d, 0x1e, 0x9e, + 0xa0, 0xcb, 0x2e, 0x59, 0x15, 0x94, 0x48, 0x3c, 0x07, 0x9a, 0x3b, 0x36, 0x49, 0xa8, 0xc4, 0x2a, + 0x33, 0xf7, 0xfe, 0xce, 0x9d, 0x33, 0x67, 0x22, 0xa3, 0x33, 0x9f, 0x8b, 0x84, 0x0b, 0xc7, 0x23, + 0x82, 0x3a, 0x92, 0xa6, 0x01, 0xcd, 0x13, 0x96, 0x4a, 0x67, 0x79, 0xe1, 0x51, 0x49, 0x2e, 0x1c, + 0xf9, 0x35, 0xa3, 0xc2, 0xce, 0x72, 0x2e, 0x39, 0xb6, 0x34, 0x6b, 0x2b, 0xd6, 0xde, 0xb0, 0x76, + 0xc1, 0xf6, 0x0f, 0x43, 0x1e, 0x72, 0x40, 0x1d, 0xb5, 0xd2, 0xaa, 0xfe, 0xe3, 0xad, 0xa9, 0x30, + 0x6d, 0x7b, 0x66, 0xdf, 0xda, 0x3e, 0x93, 0xe6, 0x82, 0xf1, 0x74, 0xa7, 0x3f, 0x08, 0x39, 0x0f, + 0x63, 0xea, 0xc0, 0xce, 0x5b, 0x7c, 0x76, 0x24, 0x4b, 0xa8, 0x90, 0x24, 0xc9, 0x34, 0x70, 0xf2, + 0xcd, 0x40, 0xfb, 0xe3, 0x98, 0xfb, 0xd7, 0x78, 0x8a, 0x6a, 0x11, 0x25, 0x01, 0xcd, 0x4d, 0x63, + 0x68, 0x8c, 0x5a, 0x97, 0xa7, 0xf6, 0xbf, 0xfd, 0xda, 0x57, 0x40, 0x8f, 0xab, 0xb7, 0xf7, 0x83, + 0x8a, 0x5b, 0x68, 0xf1, 0x39, 0xaa, 0x06, 0x44, 0x12, 0xf3, 0x3f, 0x98, 0x71, 0xb4, 0xad, 0xd3, + 0xbe, 0xa6, 0x44, 0x92, 0x42, 0x03, 0x24, 0x7e, 0x83, 0x5a, 0x31, 0x11, 0x72, 0xee, 0xf3, 0x24, + 0x61, 0xd2, 0xac, 0x82, 0xd0, 0x7c, 0x28, 0x9c, 0x40, 0xdf, 0x45, 0x0a, 0xd6, 0xeb, 0x93, 0x5f, + 0x55, 0x54, 0xd3, 0x2e, 0xf0, 0x5b, 0x54, 0x2f, 0xee, 0x5f, 0xd8, 0x7f, 0xb2, 0x63, 0x59, 0xb7, + 0xec, 0x09, 0x4f, 0x05, 0x4d, 0xc5, 0x42, 0x14, 0x0e, 0x4a, 0x0d, 0x3e, 0x45, 0x0d, 0x3f, 0x22, + 0x2c, 0x9d, 0xb3, 0x00, 0xac, 0x37, 0xc7, 0xad, 0xd5, 0xfd, 0xa0, 0x3e, 0x51, 0xb5, 0xd9, 0xd4, + 0xad, 0x43, 0x73, 0x16, 0xe0, 0x23, 0x15, 0x12, 0x0b, 0x23, 0x69, 0xee, 0x0d, 0x8d, 0xd1, 0x9e, + 0x5b, 0xec, 0xf0, 0x6b, 0x54, 0x55, 0xc9, 0x16, 0xee, 0xfb, 0xb6, 0x8e, 0xdd, 0x2e, 0x63, 0xb7, + 0x3f, 0x94, 0xb1, 0x8f, 0x1b, 0xea, 0xe0, 0x9b, 0x1f, 0x03, 0xc3, 0x05, 0x05, 0x9e, 0xa0, 0x0e, + 0x5c, 0xdf, 0x53, 0x8f, 0xa0, 0x8e, 0xdf, 0x87, 0x11, 0xc7, 0x0f, 0x03, 0x80, 0x67, 0x9a, 0x4d, + 0x0b, 0xeb, 0x10, 0x9a, 0x2e, 0x05, 0x78, 0x84, 0x0e, 0xb6, 0x32, 0x9c, 0x47, 0x44, 0x44, 0x66, + 0x6d, 0x68, 0x8c, 0xda, 0x6e, 0x77, 0x13, 0xd7, 0x15, 0x11, 0x11, 0x7e, 0x84, 0x9a, 0x2a, 0x75, + 0x8d, 0xd4, 0x01, 0x69, 0xa8, 0x02, 0x34, 0x9f, 0xa3, 0xde, 0x92, 0xc4, 0x2c, 0x20, 0x92, 0xe7, + 0x42, 0x23, 0x0d, 0x3d, 0x65, 0x53, 0x06, 0xf0, 0x1c, 0x1d, 0xa6, 0xf4, 0x8b, 0x9c, 0xff, 0x4d, + 0x37, 0x81, 0xc6, 0xaa, 0xf7, 0x71, 0x57, 0xf1, 0x0c, 0x75, 0xfd, 0x32, 0x7c, 0xcd, 0x22, 0x60, + 0x3b, 0x7f, 0xaa, 0x80, 0x1d, 0xa3, 0x06, 0xc9, 0x32, 0x0d, 0xb4, 0x00, 0xa8, 0x93, 0x2c, 0x83, + 0xd6, 0x19, 0xfa, 0x1f, 0xee, 0x98, 0x53, 0xb1, 0x88, 0x65, 0x31, 0xa4, 0x0d, 0x4c, 0x4f, 0x35, + 0x5c, 0x5d, 0x07, 0xf6, 0x29, 0xea, 0xd0, 0x25, 0x0b, 0x68, 0xea, 0x53, 0xcd, 0x75, 0x80, 0x6b, + 0x97, 0x45, 0x80, 0x5e, 0xa0, 0x83, 0x2c, 0xe7, 0x19, 0x17, 0x34, 0x9f, 0x93, 0x20, 0xc8, 0xa9, + 0x10, 0x66, 0x57, 0xbd, 0xbd, 0xdb, 0x2b, 0xeb, 0xef, 0x74, 0x79, 0xfc, 0xfe, 0x76, 0x65, 0x19, + 0x77, 0x2b, 0xcb, 0xf8, 0xb9, 0xb2, 0x8c, 0x9b, 0xb5, 0x55, 0xb9, 0x5b, 0x5b, 0x95, 0xef, 0x6b, + 0xab, 0xf2, 0xe9, 0x32, 0x64, 0x32, 0x5a, 0x78, 0xb6, 0xcf, 0x13, 0xa7, 0xf8, 0x16, 0xe8, 0x9f, + 0x97, 0x22, 0xb8, 0x76, 0xfc, 0x98, 0xd1, 0x54, 0x3a, 0x61, 0x9e, 0xf9, 0x8e, 0x4c, 0x04, 0xcd, + 0x97, 0xcc, 0xa7, 0x5e, 0x0d, 0xfe, 0x16, 0xaf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x61, + 0xed, 0x16, 0x3d, 0x04, 0x00, 0x00, +} + +func (m *Block) 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 *Block) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastCommit != nil { + { + size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Header) 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 *Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x72 + } + if len(m.EvidenceHash) > 0 { + i -= len(m.EvidenceHash) + copy(dAtA[i:], m.EvidenceHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) + i-- + dAtA[i] = 0x6a + } + if len(m.LastResultsHash) > 0 { + i -= len(m.LastResultsHash) + copy(dAtA[i:], m.LastResultsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) + i-- + dAtA[i] = 0x62 + } + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x5a + } + if len(m.ConsensusHash) > 0 { + i -= len(m.ConsensusHash) + copy(dAtA[i:], m.ConsensusHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) + i-- + dAtA[i] = 0x52 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x4a + } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) + i-- + dAtA[i] = 0x42 + } + if len(m.DataHash) > 0 { + i -= len(m.DataHash) + copy(dAtA[i:], m.DataHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.LastCommitHash) > 0 { + i -= len(m.LastCommitHash) + copy(dAtA[i:], m.LastCommitHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) + i-- + dAtA[i] = 0x32 + } + { + size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintTypes(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x22 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Block) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Data.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.LastCommit != nil { + l = m.LastCommit.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Version.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.ChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = m.LastBlockId.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.LastCommitHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DataHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ConsensusHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.LastResultsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.EvidenceHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Block) 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 ErrIntOverflowTypes + } + 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: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastCommit == nil { + m.LastCommit = &types.Commit{} + } + if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) 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 ErrIntOverflowTypes + } + 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: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastCommitHash == nil { + m.LastCommitHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) + if m.DataHash == nil { + m.DataHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorsHash == nil { + m.ValidatorsHash = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) + if m.ConsensusHash == nil { + m.ConsensusHash = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastResultsHash == nil { + m.LastResultsHash = []byte{} + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) + if m.EvidenceHash == nil { + m.EvidenceHash = []byte{} + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/client/grpc/tmservice/util.go b/client/grpc/tmservice/util.go new file mode 100644 index 000000000000..5f9779ea3a5a --- /dev/null +++ b/client/grpc/tmservice/util.go @@ -0,0 +1,37 @@ +package tmservice + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" +) + +// convertHeader converts tendermint header to sdk header +func convertHeader(h tmprototypes.Header) Header { + return Header{ + Version: h.Version, + ChainID: h.ChainID, + Height: h.Height, + Time: h.Time, + LastBlockId: h.LastBlockId, + ValidatorsHash: h.ValidatorsHash, + NextValidatorsHash: h.NextValidatorsHash, + ConsensusHash: h.ConsensusHash, + AppHash: h.AppHash, + DataHash: h.DataHash, + EvidenceHash: h.EvidenceHash, + LastResultsHash: h.LastResultsHash, + LastCommitHash: h.LastCommitHash, + ProposerAddress: sdk.ValAddress(h.ProposerAddress).String(), + } +} + +// convertBlock converts tendermint block to sdk block +func convertBlock(tmblock *tmprototypes.Block) *Block { + b := new(Block) + + b.Header = convertHeader(tmblock.Header) + b.LastCommit = tmblock.LastCommit + b.Data = tmblock.Data + + return b +} diff --git a/client/grpc_query.go b/client/grpc_query.go index 15c0725f2e57..dd0f5ab11335 100644 --- a/client/grpc_query.go +++ b/client/grpc_query.go @@ -4,11 +4,12 @@ import ( gocontext "context" "errors" "fmt" + "reflect" + "strconv" + "github.com/cosmos/cosmos-sdk/codec" proto "github.com/gogo/protobuf/proto" "google.golang.org/grpc/encoding" - "reflect" - "strconv" gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index b63937ac2337..faff1ad5dc64 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package client_test diff --git a/client/input/input.go b/client/input/input.go index 5afaabf30fc3..31daa99be32f 100644 --- a/client/input/input.go +++ b/client/input/input.go @@ -42,7 +42,7 @@ func GetPassword(prompt string, buf *bufio.Reader) (pass string, err error) { // If the input is not recognized, it returns false and a nil error. func GetConfirmation(prompt string, r *bufio.Reader, w io.Writer) (bool, error) { if inputIsTty() { - fmt.Fprintf(w, "%s [y/N]: ", prompt) + _, _ = fmt.Fprintf(w, "%s [y/N]: ", prompt) } response, err := readLineFromBuf(r) diff --git a/client/input/input_test.go b/client/input/input_test.go index 9e85eb256a20..3132afcdfaa4 100644 --- a/client/input/input_test.go +++ b/client/input/input_test.go @@ -53,5 +53,4 @@ func TestReadLineFromBuf(t *testing.T) { _, err := readLineFromBuf(buf) require.ErrorIs(t, err, expectedErr) }) - } diff --git a/client/keys/add.go b/client/keys/add.go index 4591062e5182..76d15b8b9a9e 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -292,14 +292,15 @@ func printCreate(cmd *cobra.Command, k *keyring.Record, showMnemonic bool, mnemo switch outputFormat { case OutputFormatText: cmd.PrintErrln() - printKeyringRecord(cmd.OutOrStdout(), k, keyring.MkAccKeyOutput, outputFormat) + if err := printKeyringRecord(cmd.OutOrStdout(), k, keyring.MkAccKeyOutput, outputFormat); err != nil { + return err + } // print mnemonic unless requested not to. if showMnemonic { - fmt.Fprintln(cmd.ErrOrStderr(), "\n**Important** write this mnemonic phrase in a safe place.") - fmt.Fprintln(cmd.ErrOrStderr(), "It is the only way to recover your account if you ever forget your password.") - fmt.Fprintln(cmd.ErrOrStderr(), "") - fmt.Fprintln(cmd.ErrOrStderr(), mnemonic) + if _, err := fmt.Fprintln(cmd.ErrOrStderr(), fmt.Sprintf("\n**Important** write this mnemonic phrase in a safe place.\nIt is the only way to recover your account if you ever forget your password.\n\n%s\n", mnemonic)); err != nil { + return fmt.Errorf("failed to print mnemonic: %v", err) + } } case OutputFormatJSON: out, err := keyring.MkAccKeyOutput(k) diff --git a/client/keys/export.go b/client/keys/export.go index 13491b5e839a..7e2f7250d38f 100644 --- a/client/keys/export.go +++ b/client/keys/export.go @@ -2,6 +2,7 @@ package keys import ( "bufio" + "encoding/hex" "fmt" "github.com/spf13/cobra" @@ -9,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/crypto/types" ) const ( @@ -75,7 +77,7 @@ func exportUnsafeUnarmored(cmd *cobra.Command, uid string, buf *bufio.Reader, kr return nil } - hexPrivKey, err := keyring.NewUnsafe(kr).UnsafeExportPrivKeyHex(uid) + hexPrivKey, err := unsafeExportPrivKeyHex(kr.(unsafeExporter), uid) if err != nil { return err } @@ -84,3 +86,20 @@ func exportUnsafeUnarmored(cmd *cobra.Command, uid string, buf *bufio.Reader, kr return nil } + +// unsafeExporter is implemented by key stores that support unsafe export +// of private keys' material. +type unsafeExporter interface { + // ExportPrivateKeyObject returns a private key in unarmored format. + ExportPrivateKeyObject(uid string) (types.PrivKey, error) +} + +// unsafeExportPrivKeyHex exports private keys in unarmored hexadecimal format. +func unsafeExportPrivKeyHex(ks unsafeExporter, uid string) (privkey string, err error) { + priv, err := ks.ExportPrivateKeyObject(uid) + if err != nil { + return "", err + } + + return hex.EncodeToString(priv.Bytes()), nil +} diff --git a/client/keys/export_test.go b/client/keys/export_test.go index 1bc6d695b6bb..0a8aa2d20ab1 100644 --- a/client/keys/export_test.go +++ b/client/keys/export_test.go @@ -89,9 +89,7 @@ func Test_runExportCmd(t *testing.T) { // create a key kb, err := keyring.New(sdk.KeyringServiceName(), tc.keyringBackend, kbHome, bufio.NewReader(mockInBuf), cdc) require.NoError(t, err) - t.Cleanup(func() { - kb.Delete("keyname1") // nolint:errcheck - }) + t.Cleanup(cleanupKeys(t, kb, "keyname1")) path := sdk.GetConfig().GetFullBIP44Path() _, err = kb.NewAccount("keyname1", testdata.TestMnemonic, "", path, hd.Secp256k1) diff --git a/client/keys/import_test.go b/client/keys/import_test.go index b481285200dc..416992c2c55a 100644 --- a/client/keys/import_test.go +++ b/client/keys/import_test.go @@ -91,13 +91,10 @@ HbP+c6JmeJy9JXe2rbbF1QtCX1gLqGcDQPBXiCtFvP7/8wTZtVOPj8vREzhZ9ElO WithCodec(cdc) ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) - t.Cleanup(func() { - kb.Delete("keyname1") // nolint:errcheck - }) + t.Cleanup(cleanupKeys(t, kb, "keyname1")) keyfile := filepath.Join(kbHome, "key.asc") - - require.NoError(t, os.WriteFile(keyfile, []byte(armoredKey), 0644)) + require.NoError(t, os.WriteFile(keyfile, []byte(armoredKey), 0o644)) defer func() { _ = os.RemoveAll(kbHome) diff --git a/client/keys/list.go b/client/keys/list.go index 9156c0c2ac00..73c2e91c22af 100644 --- a/client/keys/list.go +++ b/client/keys/list.go @@ -34,8 +34,7 @@ func runListCmd(cmd *cobra.Command, _ []string) error { } if ok, _ := cmd.Flags().GetBool(flagListNames); !ok { - printKeyringRecords(cmd.OutOrStdout(), records, clientCtx.OutputFormat) - return nil + return printKeyringRecords(cmd.OutOrStdout(), records, clientCtx.OutputFormat) } for _, k := range records { diff --git a/client/keys/list_test.go b/client/keys/list_test.go index e71a4fbe218c..548413efad06 100644 --- a/client/keys/list_test.go +++ b/client/keys/list_test.go @@ -5,7 +5,6 @@ import ( "fmt" "testing" - "github.com/spf13/cobra" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" @@ -18,6 +17,16 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +func cleanupKeys(t *testing.T, kb keyring.Keyring, keys ...string) func() { + return func() { + for _, k := range keys { + if err := kb.Delete(k); err != nil { + t.Log("can't delete KB key ", k, err) + } + } + } +} + func Test_runListCmd(t *testing.T) { cmd := ListKeysCmd() cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) @@ -33,18 +42,11 @@ func Test_runListCmd(t *testing.T) { clientCtx := client.Context{}.WithKeyring(kb) ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) - path := "" //sdk.GetConfig().GetFullBIP44Path() + path := "" // sdk.GetConfig().GetFullBIP44Path() _, err = kb.NewAccount("something", testdata.TestMnemonic, "", path, hd.Secp256k1) require.NoError(t, err) - t.Cleanup(func() { - kb.Delete("something") // nolint:errcheck - }) - - type args struct { - cmd *cobra.Command - args []string - } + t.Cleanup(cleanupKeys(t, kb, "something")) testData := []struct { name string diff --git a/client/keys/migrate.go b/client/keys/migrate.go index ff6cde2244a3..f76206f6ed9f 100644 --- a/client/keys/migrate.go +++ b/client/keys/migrate.go @@ -34,10 +34,10 @@ func runMigrateCmd(cmd *cobra.Command, _ []string) error { return err } - if _, err = clientCtx.Keyring.MigrateAll(); err != nil { + if err = clientCtx.Keyring.MigrateAll(); err != nil { return err } - cmd.Println("Keys migration has been successfully executed") + cmd.Println("Keys migration has been successfully executed.") return nil } diff --git a/client/keys/migrate_test.go b/client/keys/migrate_test.go index 48eefb168661..b105db7cb747 100644 --- a/client/keys/migrate_test.go +++ b/client/keys/migrate_test.go @@ -43,7 +43,6 @@ func (s *MigrateTestSuite) SetupSuite() { } func (s *MigrateTestSuite) Test_runListAndShowCmd() { - // adding LegacyInfo item into keyring multi := multisig.NewLegacyAminoPubKey( 1, []cryptotypes.PubKey{ @@ -55,12 +54,12 @@ func (s *MigrateTestSuite) Test_runListAndShowCmd() { serializedLegacyMultiInfo := keyring.MarshalInfo(legacyMultiInfo) item := design99keyring.Item{ - Key: s.appName, + Key: s.appName + ".info", Data: serializedLegacyMultiInfo, - Description: "SDK kerying version", + Description: "SDK keyring version", } - //run test simd keys list - to see that the migrated key is there + // run test simd keys list - to see that the migrated key is there cmd := ListKeysCmd() cmd.Flags().AddFlagSet(Commands("home").PersistentFlags()) diff --git a/client/keys/show.go b/client/keys/show.go index d97b4a67d842..28f2abbb9f3c 100644 --- a/client/keys/show.go +++ b/client/keys/show.go @@ -128,9 +128,14 @@ func runShowCmd(cmd *cobra.Command, args []string) (err error) { if isShowPubKey { out = ko.PubKey } - fmt.Fprintln(cmd.OutOrStdout(), out) + + if _, err := fmt.Fprintln(cmd.OutOrStdout(), out); err != nil { + return err + } default: - printKeyringRecord(cmd.OutOrStdout(), k, bechKeyOut, outputFormat) + if err := printKeyringRecord(cmd.OutOrStdout(), k, bechKeyOut, outputFormat); err != nil { + return err + } } if isShowDevice { diff --git a/client/keys/show_test.go b/client/keys/show_test.go index ad86ecac525a..4045b0d3c482 100644 --- a/client/keys/show_test.go +++ b/client/keys/show_test.go @@ -72,8 +72,8 @@ func Test_runShowCmd(t *testing.T) { fakeKeyName2 := "runShowCmd_Key2" t.Cleanup(func() { - kb.Delete("runShowCmd_Key1") - kb.Delete("runShowCmd_Key2") + cleanupKeys(t, kb, "runShowCmd_Key1") + cleanupKeys(t, kb, "runShowCmd_Key2") }) path := hd.NewFundraiserParams(1, sdk.CoinType, 0).String() diff --git a/client/keys/utils.go b/client/keys/utils.go index 8af8221f0295..114e6315c9ae 100644 --- a/client/keys/utils.go +++ b/client/keys/utils.go @@ -17,53 +17,69 @@ const ( type bechKeyOutFn func(k *cryptokeyring.Record) (cryptokeyring.KeyOutput, error) -func printKeyringRecord(w io.Writer, k *cryptokeyring.Record, bechKeyOut bechKeyOutFn, output string) { +func printKeyringRecord(w io.Writer, k *cryptokeyring.Record, bechKeyOut bechKeyOutFn, output string) error { ko, err := bechKeyOut(k) if err != nil { - panic(err) + return err } switch output { case OutputFormatText: - printTextRecords(w, []cryptokeyring.KeyOutput{ko}) + if err := printTextRecords(w, []cryptokeyring.KeyOutput{ko}); err != nil { + return err + } case OutputFormatJSON: out, err := KeysCdc.MarshalJSON(ko) if err != nil { - panic(err) + return err } - fmt.Fprintln(w, string(out)) + if _, err := fmt.Fprintln(w, string(out)); err != nil { + return err + } } + + return nil } -func printKeyringRecords(w io.Writer, records []*cryptokeyring.Record, output string) { +func printKeyringRecords(w io.Writer, records []*cryptokeyring.Record, output string) error { kos, err := cryptokeyring.MkAccKeysOutput(records) if err != nil { - panic(err) + return err } switch output { case OutputFormatText: - printTextRecords(w, kos) + if err := printTextRecords(w, kos); err != nil { + return err + } case OutputFormatJSON: // TODO https://github.com/cosmos/cosmos-sdk/issues/8046 // Replace AminoCdc with Proto JSON out, err := KeysCdc.MarshalJSON(kos) if err != nil { - panic(err) + return err } - fmt.Fprintf(w, "%s", out) + if _, err := fmt.Fprintf(w, "%s", out); err != nil { + return err + } } + + return nil } -func printTextRecords(w io.Writer, kos []cryptokeyring.KeyOutput) { +func printTextRecords(w io.Writer, kos []cryptokeyring.KeyOutput) error { out, err := yaml.Marshal(&kos) if err != nil { - panic(err) + return err + } + + if _, err := fmt.Fprintln(w, string(out)); err != nil { + return err } - fmt.Fprintln(w, string(out)) + return nil } diff --git a/client/query_test.go b/client/query_test.go index 14cc25ba9d97..04532f566ba3 100644 --- a/client/query_test.go +++ b/client/query_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package client_test @@ -11,7 +12,6 @@ import ( ) func (s *IntegrationTestSuite) TestQueryABCIHeight() { - testCases := []struct { name string reqHeight int64 diff --git a/client/rpc/status.go b/client/rpc/status.go index b45fcb0c593f..312989554dca 100644 --- a/client/rpc/status.go +++ b/client/rpc/status.go @@ -6,8 +6,8 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/rpc/coretypes" - tmtypes "github.com/tendermint/tendermint/types" + "github.com/tendermint/tendermint/p2p" + coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -26,7 +26,7 @@ type validatorInfo struct { // ResultStatus is node's info, same as Tendermint, except that we use our own // PubKey. type resultStatus struct { - NodeInfo tmtypes.NodeInfo + NodeInfo p2p.DefaultNodeInfo SyncInfo coretypes.SyncInfo ValidatorInfo validatorInfo } diff --git a/client/tx/aux_builder.go b/client/tx/aux_builder.go index 7b6086f6de0f..da8dd1fb9c08 100644 --- a/client/tx/aux_builder.go +++ b/client/tx/aux_builder.go @@ -121,14 +121,14 @@ func (b *AuxTxBuilder) SetSignMode(mode signing.SignMode) error { return nil } -// SetTip sets an optional tip. +// SetTip sets an optional tip in the AuxSignerData. func (b *AuxTxBuilder) SetTip(tip *tx.Tip) { b.checkEmptyFields() b.auxSignerData.SignDoc.Tip = tip } -// SetSignature sets the aux signer's signature. +// SetSignature sets the aux signer's signature in the AuxSignerData. func (b *AuxTxBuilder) SetSignature(sig []byte) { b.checkEmptyFields() diff --git a/client/tx/aux_builder_test.go b/client/tx/aux_builder_test.go index 385c98f4c456..ae4dd0541093 100644 --- a/client/tx/aux_builder_test.go +++ b/client/tx/aux_builder_test.go @@ -60,7 +60,7 @@ func TestAuxTxBuilder(t *testing.T) { { "GetSignBytes pubkey should not be nil", func() error { - b.SetMsgs(msg1) + require.NoError(t, b.SetMsgs(msg1)) _, err := b.GetSignBytes() return err @@ -70,8 +70,8 @@ func TestAuxTxBuilder(t *testing.T) { { "GetSignBytes invalid sign mode", func() error { - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) _, err := b.GetSignBytes() return err @@ -81,13 +81,12 @@ func TestAuxTxBuilder(t *testing.T) { { "GetSignBytes tipper should not be nil (if tip is set)", func() error { - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(&typestx.Tip{}) - err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) - require.NoError(t, err) + require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) - _, err = b.GetSignBytes() + _, err := b.GetSignBytes() return err }, true, "tipper cannot be empty", @@ -95,13 +94,12 @@ func TestAuxTxBuilder(t *testing.T) { { "GetSignBytes works for DIRECT_AUX", func() error { - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(tip) - err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) - require.NoError(t, err) + require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) - _, err = b.GetSignBytes() + _, err := b.GetSignBytes() return err }, false, "", @@ -109,13 +107,12 @@ func TestAuxTxBuilder(t *testing.T) { { "GetAuxSignerData address should not be empty", func() error { - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(tip) - err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) - require.NoError(t, err) + require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) - _, err = b.GetSignBytes() + _, err := b.GetSignBytes() require.NoError(t, err) _, err = b.GetAuxSignerData() @@ -126,14 +123,13 @@ func TestAuxTxBuilder(t *testing.T) { { "GetAuxSignerData signature should not be empty", func() error { - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(tip) b.SetAddress(addr1.String()) - err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) - require.NoError(t, err) + require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) - _, err = b.GetSignBytes() + _, err := b.GetSignBytes() require.NoError(t, err) _, err = b.GetAuxSignerData() @@ -149,8 +145,8 @@ func TestAuxTxBuilder(t *testing.T) { b.SetTimeoutHeight(timeoutHeight) b.SetMemo(memo) b.SetChainID(chainID) - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) @@ -172,8 +168,8 @@ func TestAuxTxBuilder(t *testing.T) { { "GetSignBytes works for LEGACY_AMINO_JSON", func() error { - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) @@ -192,8 +188,8 @@ func TestAuxTxBuilder(t *testing.T) { b.SetTimeoutHeight(timeoutHeight) b.SetMemo(memo) b.SetChainID(chainID) - b.SetMsgs(msg1) - b.SetPubKey(pub1) + require.NoError(t, b.SetMsgs(msg1)) + require.NoError(t, b.SetPubKey(pub1)) b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) diff --git a/client/tx/factory.go b/client/tx/factory.go index b65264d6671f..47ad7febb08d 100644 --- a/client/tx/factory.go +++ b/client/tx/factory.go @@ -34,6 +34,8 @@ type Factory struct { memo string fees sdk.Coins tip *tx.Tip + feeGranter sdk.AccAddress + feePayer sdk.AccAddress gasPrices sdk.DecCoins signMode signing.SignMode simulateAndExecute bool @@ -79,6 +81,8 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory { gasAdjustment: gasAdj, memo: memo, signMode: signMode, + feeGranter: clientCtx.FeeGranter, + feePayer: clientCtx.FeePayer, } feesStr, _ := flagSet.GetString(flags.FlagFees) @@ -225,6 +229,18 @@ func (f Factory) WithTimeoutHeight(height uint64) Factory { return f } +// WithFeeGranter returns a copy of the Factory with an updated fee granter. +func (f Factory) WithFeeGranter(fg sdk.AccAddress) Factory { + f.feeGranter = fg + return f +} + +// WithFeePayer returns a copy of the Factory with an updated fee granter. +func (f Factory) WithFeePayer(fp sdk.AccAddress) Factory { + f.feePayer = fp + return f +} + // BuildUnsignedTx builds a transaction to be signed given a set of messages. // Once created, the fee, memo, and messages are set. func (f Factory) BuildUnsignedTx(msgs ...sdk.Msg) (client.TxBuilder, error) { @@ -264,6 +280,8 @@ func (f Factory) BuildUnsignedTx(msgs ...sdk.Msg) (client.TxBuilder, error) { tx.SetMemo(f.memo) tx.SetFeeAmount(fees) tx.SetGasLimit(f.gas) + tx.SetFeeGranter(f.feeGranter) + tx.SetFeePayer(f.feePayer) tx.SetTimeoutHeight(f.TimeoutHeight()) return tx, nil @@ -317,15 +335,41 @@ func (f Factory) BuildSimTx(msgs ...sdk.Msg) ([]byte, error) { return nil, err } - // use the first element from the list of keys in order to generate a valid - // pubkey that supports multiple algorithms + pk, err := f.getSimPK() + if err != nil { + return nil, err + } + // Create an empty signature literal as the ante handler will populate with a + // sentinel pubkey. + sig := signing.SignatureV2{ + PubKey: pk, + Data: &signing.SingleSignatureData{ + SignMode: f.signMode, + }, + Sequence: f.Sequence(), + } + if err := txb.SetSignatures(sig); err != nil { + return nil, err + } + + return f.txConfig.TxEncoder()(txb.GetTx()) +} + +// getSimPK gets the public key to use for building a simulation tx. +// Note, we should only check for keys in the keybase if we are in simulate and execute mode, +// e.g. when using --gas=auto. +// When using --dry-run, we are is simulation mode only and should not check the keybase. +// Ref: https://github.com/cosmos/cosmos-sdk/issues/11283 +func (f Factory) getSimPK() (cryptotypes.PubKey, error) { var ( ok bool pk cryptotypes.PubKey = &secp256k1.PubKey{} // use default public key type ) - if f.keybase != nil { + // Use the first element from the list of keys in order to generate a valid + // pubkey that supports multiple algorithms. + if f.simulateAndExecute && f.keybase != nil { records, _ := f.keybase.List() if len(records) == 0 { return nil, errors.New("cannot build signature for simulation, key records slice is empty") @@ -338,20 +382,7 @@ func (f Factory) BuildSimTx(msgs ...sdk.Msg) ([]byte, error) { } } - // Create an empty signature literal as the ante handler will populate with a - // sentinel pubkey. - sig := signing.SignatureV2{ - PubKey: pk, - Data: &signing.SingleSignatureData{ - SignMode: f.signMode, - }, - Sequence: f.Sequence(), - } - if err := txb.SetSignatures(sig); err != nil { - return nil, err - } - - return f.txConfig.TxEncoder()(txb.GetTx()) + return pk, nil } // Prepare ensures the account defined by ctx.GetFromAddress() exists and diff --git a/client/tx/legacy.go b/client/tx/legacy.go index 7a46e194aaa5..c07982a3fe4d 100644 --- a/client/tx/legacy.go +++ b/client/tx/legacy.go @@ -20,7 +20,6 @@ func ConvertTxToStdTx(codec *codec.LegacyAmino, tx signing.Tx) (legacytx.StdTx, err := CopyTx(tx, builder, true) if err != nil { - return legacytx.StdTx{}, err } diff --git a/client/tx/tx.go b/client/tx/tx.go index b90da0b84be0..92eb733ed08e 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -3,6 +3,7 @@ package tx import ( "bufio" "context" + "encoding/json" "errors" "fmt" "os" @@ -87,12 +88,14 @@ func BroadcastTx(clientCtx client.Context, txf Factory, msgs ...sdk.Msg) error { } if !clientCtx.SkipConfirm { - out, err := clientCtx.TxConfig.TxJSONEncoder()(tx.GetTx()) + txBytes, err := clientCtx.TxConfig.TxJSONEncoder()(tx.GetTx()) if err != nil { return err } - _, _ = fmt.Fprintf(os.Stderr, "%s\n\n", out) + if err := clientCtx.PrintRaw(json.RawMessage(txBytes)); err != nil { + _, _ = fmt.Fprintf(os.Stderr, "%s\n", txBytes) + } buf := bufio.NewReader(os.Stdin) ok, err := input.GetConfirmation("confirm transaction before signing and broadcasting", buf, os.Stderr) @@ -103,8 +106,6 @@ func BroadcastTx(clientCtx client.Context, txf Factory, msgs ...sdk.Msg) error { } } - tx.SetFeeGranter(clientCtx.GetFeeGranterAddress()) - tx.SetFeePayer(clientCtx.GetFeePayerAddress()) err = Sign(txf, clientCtx.GetFromName(), tx, true) if err != nil { return err @@ -337,7 +338,7 @@ func (gr GasEstimateResponse) String() string { // makeAuxSignerData generates an AuxSignerData from the client inputs. func makeAuxSignerData(clientCtx client.Context, f Factory, msgs ...sdk.Msg) (tx.AuxSignerData, error) { b := NewAuxTxBuilder() - fromAddress, name, _, err := client.GetFromFields(clientCtx.Keyring, clientCtx.From, false) + fromAddress, name, _, err := client.GetFromFields(clientCtx, clientCtx.Keyring, clientCtx.From) if err != nil { return tx.AuxSignerData{}, err } @@ -361,14 +362,10 @@ func makeAuxSignerData(clientCtx client.Context, f Factory, msgs ...sdk.Msg) (tx } if f.tip != nil { - if f.tip.Tipper == "" { - return tx.AuxSignerData{}, sdkerrors.Wrap(errors.New("tipper flag required"), "tipper") - } else { - if _, err := sdk.AccAddressFromBech32(f.tip.Tipper); err != nil { - return tx.AuxSignerData{}, sdkerrors.ErrInvalidAddress.Wrap("tipper must be a bech32 address") - } - b.SetTip(f.tip) + if _, err := sdk.AccAddressFromBech32(f.tip.Tipper); err != nil { + return tx.AuxSignerData{}, sdkerrors.ErrInvalidAddress.Wrap("tipper must be a bech32 address") } + b.SetTip(f.tip) } err = b.SetSignMode(f.SignMode()) diff --git a/client/utils.go b/client/utils.go index 9b585218e963..2be13e26782e 100644 --- a/client/utils.go +++ b/client/utils.go @@ -74,5 +74,5 @@ func ReadPageRequest(flagSet *pflag.FlagSet) (*query.PageRequest, error) { // NewClientFromNode sets up Client implementation that communicates with a Tendermint node over // JSON RPC and WebSockets func NewClientFromNode(nodeURI string) (*rpchttp.HTTP, error) { - return rpchttp.New(nodeURI) + return rpchttp.New(nodeURI, "/websocket") } diff --git a/client/v2/Makefile b/client/v2/Makefile new file mode 100644 index 000000000000..6868d1941a36 --- /dev/null +++ b/client/v2/Makefile @@ -0,0 +1,2 @@ +codegen: + @(cd internal; buf generate) diff --git a/client/v2/cli/builder.go b/client/v2/cli/builder.go new file mode 100644 index 000000000000..992fc9df4e74 --- /dev/null +++ b/client/v2/cli/builder.go @@ -0,0 +1,19 @@ +package cli + +import ( + "context" + + "google.golang.org/grpc" + + "github.com/cosmos/cosmos-sdk/client/v2/cli/flag" +) + +// Builder manages options for building CLI commands. +type Builder struct { + // flag.Builder embeds the flag builder and its options. + flag.Builder + + // GetClientConn specifies how CLI commands will resolve a grpc.ClientConnInterface + // from a given context. + GetClientConn func(context.Context) grpc.ClientConnInterface +} diff --git a/client/v2/cli/flag/address.go b/client/v2/cli/flag/address.go new file mode 100644 index 000000000000..f2008e4b3251 --- /dev/null +++ b/client/v2/cli/flag/address.go @@ -0,0 +1,40 @@ +package flag + +import ( + "context" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +type addressStringType struct{} + +func (a addressStringType) NewValue(_ context.Context, _ *Builder) pflag.Value { + return &addressValue{} +} + +func (a addressStringType) DefaultValue() string { + return "" +} + +type addressValue struct { + value string +} + +func (a addressValue) Get() protoreflect.Value { + return protoreflect.ValueOfString(a.value) +} + +func (a addressValue) String() string { + return a.value +} + +func (a *addressValue) Set(s string) error { + a.value = s + // TODO handle bech32 validation + return nil +} + +func (a addressValue) Type() string { + return "bech32 account address key name" +} diff --git a/client/v2/cli/flag/builder.go b/client/v2/cli/flag/builder.go new file mode 100644 index 000000000000..2969314e84db --- /dev/null +++ b/client/v2/cli/flag/builder.go @@ -0,0 +1,47 @@ +package flag + +import ( + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +// Builder manages options for building pflag flags for protobuf messages. +type Builder struct { + // TypeResolver specifies how protobuf types will be resolved. If it is + // nil protoregistry.GlobalTypes will be used. + TypeResolver interface { + protoregistry.MessageTypeResolver + protoregistry.ExtensionTypeResolver + } + + // FileResolver specifies how protobuf file descriptors will be resolved. If it is + // nil protoregistry.GlobalFiles will be used. + FileResolver protodesc.Resolver + + messageFlagTypes map[protoreflect.FullName]Type + scalarFlagTypes map[string]Type +} + +func (b *Builder) init() { + if b.messageFlagTypes == nil { + b.messageFlagTypes = map[protoreflect.FullName]Type{} + b.messageFlagTypes["google.protobuf.Timestamp"] = timestampType{} + b.messageFlagTypes["google.protobuf.Duration"] = durationType{} + } + + if b.scalarFlagTypes == nil { + b.scalarFlagTypes = map[string]Type{} + b.scalarFlagTypes["cosmos.AddressString"] = addressStringType{} + } +} + +func (b *Builder) DefineMessageFlagType(messageName protoreflect.FullName, flagType Type) { + b.init() + b.messageFlagTypes[messageName] = flagType +} + +func (b *Builder) DefineScalarFlagType(scalarName string, flagType Type) { + b.init() + b.scalarFlagTypes[scalarName] = flagType +} diff --git a/client/v2/cli/flag/duration.go b/client/v2/cli/flag/duration.go new file mode 100644 index 000000000000..d40f3ad6eab7 --- /dev/null +++ b/client/v2/cli/flag/duration.go @@ -0,0 +1,52 @@ +package flag + +import ( + "context" + "time" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/durationpb" +) + +type durationType struct{} + +func (t durationType) NewValue(context.Context, *Builder) pflag.Value { + return &durationValue{} +} + +func (t durationType) DefaultValue() string { + return "" +} + +type durationValue struct { + value *durationpb.Duration +} + +func (t durationValue) Get() protoreflect.Value { + if t.value == nil { + return protoreflect.Value{} + } + return protoreflect.ValueOfMessage(t.value.ProtoReflect()) +} + +func (v durationValue) String() string { + if v.value == nil { + return "" + } + return v.value.AsDuration().String() +} + +func (v *durationValue) Set(s string) error { + dur, err := time.ParseDuration(s) + if err != nil { + return err + } + + v.value = durationpb.New(dur) + return nil +} + +func (v durationValue) Type() string { + return "duration" +} diff --git a/client/v2/cli/flag/enum.go b/client/v2/cli/flag/enum.go new file mode 100644 index 000000000000..65dd6fb813c6 --- /dev/null +++ b/client/v2/cli/flag/enum.go @@ -0,0 +1,74 @@ +package flag + +import ( + "context" + "fmt" + "strings" + + "github.com/iancoleman/strcase" + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +type enumType struct { + enum protoreflect.EnumDescriptor +} + +func (b enumType) NewValue(context.Context, *Builder) pflag.Value { + val := &enumValue{ + enum: b.enum, + valMap: map[string]protoreflect.EnumValueDescriptor{}, + } + n := b.enum.Values().Len() + for i := 0; i < n; i++ { + valDesc := b.enum.Values().Get(i) + val.valMap[enumValueName(b.enum, valDesc)] = valDesc + } + return val +} + +func (b enumType) DefaultValue() string { + defValue := "" + if def := b.enum.Values().ByNumber(0); def != nil { + defValue = enumValueName(b.enum, def) + } + return defValue +} + +type enumValue struct { + enum protoreflect.EnumDescriptor + value protoreflect.EnumNumber + valMap map[string]protoreflect.EnumValueDescriptor +} + +func (e enumValue) Get() protoreflect.Value { + return protoreflect.ValueOfEnum(e.value) +} + +func enumValueName(enum protoreflect.EnumDescriptor, enumValue protoreflect.EnumValueDescriptor) string { + name := string(enumValue.Name()) + name = strings.TrimPrefix(name, strcase.ToScreamingSnake(string(enum.Name()))+"_") + return strcase.ToKebab(name) +} + +func (e enumValue) String() string { + return enumValueName(e.enum, e.enum.Values().ByNumber(e.value)) +} + +func (e *enumValue) Set(s string) error { + valDesc, ok := e.valMap[s] + if !ok { + return fmt.Errorf("%s is not a valid value for enum %s", s, e.enum.FullName()) + } + e.value = valDesc.Number() + return nil +} + +func (e enumValue) Type() string { + var vals []string + n := e.enum.Values().Len() + for i := 0; i < n; i++ { + vals = append(vals, enumValueName(e.enum, e.enum.Values().Get(i))) + } + return fmt.Sprintf("%s (%s)", e.enum.Name(), strings.Join(vals, " | ")) +} diff --git a/client/v2/cli/flag/field.go b/client/v2/cli/flag/field.go new file mode 100644 index 000000000000..c894e0610e48 --- /dev/null +++ b/client/v2/cli/flag/field.go @@ -0,0 +1,128 @@ +package flag + +import ( + "context" + "fmt" + + cosmos_proto "github.com/cosmos/cosmos-proto" + "github.com/spf13/pflag" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/cosmos/cosmos-sdk/client/v2/internal/util" +) + +// FieldValueBinder wraps a flag value in a way that allows it to be bound +// to a particular field in a protobuf message. +type FieldValueBinder interface { + Bind(message protoreflect.Message, field protoreflect.FieldDescriptor) +} + +// Options specifies options for specific flags. +type Options struct { + // Prefix is a prefix to prepend to all flags. + Prefix string +} + +// AddFieldFlag adds a flag for the provided field to the flag set. +func (b *Builder) AddFieldFlag(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor, options Options) FieldValueBinder { + if field.Kind() == protoreflect.MessageKind && field.Message().FullName() == "cosmos.base.query.v1beta1.PageRequest" { + return b.bindPageRequest(ctx, flagSet, field) + } + + name := options.Prefix + util.DescriptorKebabName(field) + usage := util.DescriptorDocs(field) + shorthand := "" + + if typ := b.resolveFlagType(field); typ != nil { + val := typ.NewValue(ctx, b) + flagSet.AddFlag(&pflag.Flag{ + Name: name, + Shorthand: shorthand, + Usage: usage, + DefValue: typ.DefaultValue(), + Value: val, + }) + switch val := val.(type) { + case SimpleValue: + return simpleValueBinder{val} + case ListValue: + return listValueBinder{val} + default: + panic(fmt.Errorf("%T does not implement SimpleValue or ListValue", val)) + } + } + + if field.IsList() { + if value := bindSimpleListFlag(flagSet, field.Kind(), name, shorthand, usage); value != nil { + return listValueBinder{value} + } + return nil + } + + if value := bindSimpleFlag(flagSet, field.Kind(), name, shorthand, usage); value != nil { + return simpleValueBinder{value} + } + + return nil +} + +func (b *Builder) resolveFlagType(field protoreflect.FieldDescriptor) Type { + typ := b.resolveFlagTypeBasic(field) + if field.IsList() { + if typ != nil { + return compositeListType{simpleType: typ} + } + + return nil + } + + return typ +} + +func (b *Builder) resolveFlagTypeBasic(field protoreflect.FieldDescriptor) Type { + scalar := proto.GetExtension(field.Options(), cosmos_proto.E_Scalar) + if scalar != nil { + b.init() + if typ, ok := b.scalarFlagTypes[scalar.(string)]; ok { + return typ + } + } + + switch field.Kind() { + case protoreflect.EnumKind: + return enumType{enum: field.Enum()} + case protoreflect.MessageKind: + b.init() + if flagType, ok := b.messageFlagTypes[field.Message().FullName()]; ok { + return flagType + } + + return jsonMessageFlagType{ + messageDesc: field.Message(), + } + default: + return nil + } +} + +type simpleValueBinder struct { + SimpleValue +} + +func (s simpleValueBinder) Bind(message protoreflect.Message, field protoreflect.FieldDescriptor) { + val := s.Get() + if val.IsValid() { + message.Set(field, val) + } else { + message.Clear(field) + } +} + +type listValueBinder struct { + ListValue +} + +func (s listValueBinder) Bind(message protoreflect.Message, field protoreflect.FieldDescriptor) { + s.AppendTo(message.NewField(field).List()) +} diff --git a/client/v2/cli/flag/list.go b/client/v2/cli/flag/list.go new file mode 100644 index 000000000000..28f3b8fe7f6f --- /dev/null +++ b/client/v2/cli/flag/list.go @@ -0,0 +1,107 @@ +package flag + +import ( + "context" + "fmt" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func bindSimpleListFlag(flagSet *pflag.FlagSet, kind protoreflect.Kind, name, shorthand, usage string) ListValue { + switch kind { + case protoreflect.StringKind: + val := flagSet.StringSliceP(name, shorthand, nil, usage) + return listValue(func(list protoreflect.List) { + for _, x := range *val { + list.Append(protoreflect.ValueOfString(x)) + } + }) + case protoreflect.BytesKind: + // TODO + return nil + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, + protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + val := flagSet.UintSliceP(name, shorthand, nil, usage) + return listValue(func(list protoreflect.List) { + for _, x := range *val { + list.Append(protoreflect.ValueOfUint64(uint64(x))) + } + }) + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, + protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + val := flagSet.IntSliceP(name, shorthand, nil, usage) + return listValue(func(list protoreflect.List) { + for _, x := range *val { + list.Append(protoreflect.ValueOfInt64(int64(x))) + } + }) + case protoreflect.BoolKind: + val := flagSet.BoolSliceP(name, shorthand, nil, usage) + return listValue(func(list protoreflect.List) { + for _, x := range *val { + list.Append(protoreflect.ValueOfBool(x)) + } + }) + default: + return nil + } +} + +type listValue func(protoreflect.List) + +func (f listValue) AppendTo(list protoreflect.List) { + f(list) +} + +type compositeListType struct { + simpleType Type +} + +func (t compositeListType) NewValue(ctx context.Context, opts *Builder) pflag.Value { + return &compositeListValue{ + simpleType: t.simpleType, + values: nil, + ctx: ctx, + opts: opts, + } +} + +func (t compositeListType) DefaultValue() string { + return "" +} + +type compositeListValue struct { + simpleType Type + values []protoreflect.Value + ctx context.Context + opts *Builder +} + +func (c compositeListValue) AppendTo(list protoreflect.List) { + for _, value := range c.values { + list.Append(value) + } +} + +func (c compositeListValue) String() string { + if len(c.values) == 0 { + return "" + } + + return fmt.Sprintf("%+v", c.values) +} + +func (c *compositeListValue) Set(val string) error { + simpleVal := c.simpleType.NewValue(c.ctx, c.opts) + err := simpleVal.Set(val) + if err != nil { + return err + } + c.values = append(c.values, simpleVal.(SimpleValue).Get()) + return nil +} + +func (c compositeListValue) Type() string { + return fmt.Sprintf("%s (repeated)", c.simpleType.NewValue(c.ctx, c.opts).Type()) +} diff --git a/client/v2/cli/flag/message.go b/client/v2/cli/flag/message.go new file mode 100644 index 000000000000..4883b8933cd7 --- /dev/null +++ b/client/v2/cli/flag/message.go @@ -0,0 +1,64 @@ +package flag + +import ( + "context" + "fmt" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/cosmos/cosmos-sdk/client/v2/internal/util" +) + +type jsonMessageFlagType struct { + messageDesc protoreflect.MessageDescriptor +} + +func (j jsonMessageFlagType) NewValue(_ context.Context, builder *Builder) pflag.Value { + return &jsonMessageFlagValue{ + messageType: util.ResolveMessageType(builder.TypeResolver, j.messageDesc), + jsonMarshalOptions: protojson.MarshalOptions{Resolver: builder.TypeResolver}, + jsonUnmarshalOptions: protojson.UnmarshalOptions{Resolver: builder.TypeResolver}, + } +} + +func (j jsonMessageFlagType) DefaultValue() string { + return "" +} + +type jsonMessageFlagValue struct { + jsonMarshalOptions protojson.MarshalOptions + jsonUnmarshalOptions protojson.UnmarshalOptions + messageType protoreflect.MessageType + message proto.Message +} + +func (j jsonMessageFlagValue) Get() protoreflect.Value { + if j.message == nil { + return protoreflect.Value{} + } + return protoreflect.ValueOfMessage(j.message.ProtoReflect()) +} + +func (j jsonMessageFlagValue) String() string { + if j.message == nil { + return "" + } + + bz, err := j.jsonMarshalOptions.Marshal(j.message) + if err != nil { + return err.Error() + } + return string(bz) +} + +func (j *jsonMessageFlagValue) Set(s string) error { + j.message = j.messageType.New().Interface() + return j.jsonUnmarshalOptions.Unmarshal([]byte(s), j.message) +} + +func (j jsonMessageFlagValue) Type() string { + return fmt.Sprintf("%s (json)", j.messageType.Descriptor().FullName()) +} diff --git a/client/v2/cli/flag/pagination.go b/client/v2/cli/flag/pagination.go new file mode 100644 index 000000000000..b4e77b8941eb --- /dev/null +++ b/client/v2/cli/flag/pagination.go @@ -0,0 +1,20 @@ +package flag + +import ( + "context" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/cosmos/cosmos-sdk/client/v2/internal/util" +) + +func (b *Builder) bindPageRequest(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor) FieldValueBinder { + handler := b.AddMessageFlags( + ctx, + flagSet, + util.ResolveMessageType(b.TypeResolver, field.Message()), + Options{Prefix: "page-"}, + ) + return simpleValueBinder{handler} +} diff --git a/client/v2/cli/flag/register.go b/client/v2/cli/flag/register.go new file mode 100644 index 000000000000..c0d15c17d49a --- /dev/null +++ b/client/v2/cli/flag/register.go @@ -0,0 +1,59 @@ +package flag + +import ( + "context" + "fmt" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +// AddMessageFlags adds flags for each field in the message to the flag set. +func (b *Builder) AddMessageFlags(ctx context.Context, set *pflag.FlagSet, messageType protoreflect.MessageType, options Options) *MessageBinder { + fields := messageType.Descriptor().Fields() + numFields := fields.Len() + handler := &MessageBinder{ + messageType: messageType, + } + for i := 0; i < numFields; i++ { + field := fields.Get(i) + binder := b.AddFieldFlag(ctx, set, field, options) + if binder == nil { + fmt.Printf("unable to bind field %s to a flag, support will be added soon\n", field) + continue + } + handler.flagFieldPairs = append(handler.flagFieldPairs, struct { + binder FieldValueBinder + field protoreflect.FieldDescriptor + }{binder: binder, field: field}) + } + return handler +} + +// MessageBinder binds multiple flags in a flag set to a protobuf message. +type MessageBinder struct { + flagFieldPairs []struct { + binder FieldValueBinder + field protoreflect.FieldDescriptor + } + messageType protoreflect.MessageType +} + +// BuildMessage builds and returns a new message for the bound flags. +func (m MessageBinder) BuildMessage() protoreflect.Message { + msg := m.messageType.New() + m.Bind(msg) + return msg +} + +// Bind binds the flag values to an existing protobuf message. +func (m MessageBinder) Bind(msg protoreflect.Message) { + for _, pair := range m.flagFieldPairs { + pair.binder.Bind(msg, pair.field) + } +} + +// Get calls BuildMessage and wraps the result in a protoreflect.Value. +func (m MessageBinder) Get() protoreflect.Value { + return protoreflect.ValueOfMessage(m.BuildMessage()) +} diff --git a/client/v2/cli/flag/simple.go b/client/v2/cli/flag/simple.go new file mode 100644 index 000000000000..6caf25c6cae0 --- /dev/null +++ b/client/v2/cli/flag/simple.go @@ -0,0 +1,54 @@ +package flag + +import ( + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func bindSimpleFlag(flagSet *pflag.FlagSet, kind protoreflect.Kind, name, shorthand, usage string) SimpleValue { + switch kind { + case protoreflect.BytesKind: + val := flagSet.BytesBase64P(name, shorthand, nil, usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfBytes(*val) + }) + case protoreflect.StringKind: + val := flagSet.StringP(name, shorthand, "", usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfString(*val) + }) + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + val := flagSet.Uint32P(name, shorthand, 0, usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfUint32(*val) + }) + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + val := flagSet.Uint64P(name, shorthand, 0, usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfUint64(*val) + }) + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + val := flagSet.Int32P(name, shorthand, 0, usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfInt32(*val) + }) + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + val := flagSet.Int64P(name, shorthand, 0, usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfInt64(*val) + }) + case protoreflect.BoolKind: + val := flagSet.BoolP(name, shorthand, false, usage) + return simpleValue(func() protoreflect.Value { + return protoreflect.ValueOfBool(*val) + }) + default: + return nil + } +} + +type simpleValue func() protoreflect.Value + +func (f simpleValue) Get() protoreflect.Value { + return f() +} diff --git a/client/v2/cli/flag/timestamp.go b/client/v2/cli/flag/timestamp.go new file mode 100644 index 000000000000..e9386bad3b9c --- /dev/null +++ b/client/v2/cli/flag/timestamp.go @@ -0,0 +1,51 @@ +package flag + +import ( + "context" + "time" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/timestamppb" +) + +type timestampType struct{} + +func (t timestampType) NewValue(context.Context, *Builder) pflag.Value { + return ×tampValue{} +} + +func (t timestampType) DefaultValue() string { + return "" +} + +type timestampValue struct { + value *timestamppb.Timestamp +} + +func (t timestampValue) Get() protoreflect.Value { + if t.value == nil { + return protoreflect.Value{} + } + return protoreflect.ValueOfMessage(t.value.ProtoReflect()) +} + +func (v timestampValue) String() string { + if v.value == nil { + return "" + } + return v.value.AsTime().Format(time.RFC3339) +} + +func (v *timestampValue) Set(s string) error { + t, err := time.Parse(time.RFC3339, s) + if err != nil { + return err + } + v.value = timestamppb.New(t) + return nil +} + +func (v timestampValue) Type() string { + return "timestamp (RFC 3339)" +} diff --git a/client/v2/cli/flag/type.go b/client/v2/cli/flag/type.go new file mode 100644 index 000000000000..62fce2a6bcd2 --- /dev/null +++ b/client/v2/cli/flag/type.go @@ -0,0 +1,17 @@ +package flag + +import ( + "context" + + "github.com/spf13/pflag" +) + +// Type specifies a custom flag type. +type Type interface { + // NewValue returns a new pflag.Value which must also implement either + // SimpleValue or ListValue. + NewValue(context.Context, *Builder) pflag.Value + + // DefaultValue is the default value for this type. + DefaultValue() string +} diff --git a/client/v2/cli/flag/value.go b/client/v2/cli/flag/value.go new file mode 100644 index 000000000000..304139e642a2 --- /dev/null +++ b/client/v2/cli/flag/value.go @@ -0,0 +1,17 @@ +package flag + +import ( + "google.golang.org/protobuf/reflect/protoreflect" +) + +// SimpleValue wraps a simple (non-list and non-map) protobuf value. +type SimpleValue interface { + // Get returns the value. + Get() protoreflect.Value +} + +// ListValue wraps a protobuf list/repeating value. +type ListValue interface { + // AppendTo appends the values to the provided list. + AppendTo(protoreflect.List) +} diff --git a/client/v2/cli/query.go b/client/v2/cli/query.go new file mode 100644 index 000000000000..28c02a4a79b8 --- /dev/null +++ b/client/v2/cli/query.go @@ -0,0 +1,87 @@ +package cli + +import ( + "fmt" + + "github.com/iancoleman/strcase" + "github.com/spf13/cobra" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + + "github.com/cosmos/cosmos-sdk/client/v2/cli/flag" + "github.com/cosmos/cosmos-sdk/client/v2/internal/util" +) + +// AddQueryServiceCommands adds a sub-command to the provided command for each +// method in the specified service and returns the command. +func (b *Builder) AddQueryServiceCommands(command *cobra.Command, serviceName protoreflect.FullName) *cobra.Command { + resolver := b.FileResolver + if resolver == nil { + resolver = protoregistry.GlobalFiles + } + descriptor, err := resolver.FindDescriptorByName(serviceName) + if err != nil { + panic(err) + } + + service := descriptor.(protoreflect.ServiceDescriptor) + methods := service.Methods() + n := methods.Len() + for i := 0; i < n; i++ { + cmd := b.CreateQueryMethodCommand(methods.Get(i)) + command.AddCommand(cmd) + } + return command +} + +// CreateQueryMethodCommand creates a gRPC query command for the given service method. +func (b *Builder) CreateQueryMethodCommand(descriptor protoreflect.MethodDescriptor) *cobra.Command { + serviceDescriptor := descriptor.Parent().(protoreflect.ServiceDescriptor) + docs := util.DescriptorDocs(descriptor) + getClientConn := b.GetClientConn + methodName := fmt.Sprintf("/%s/%s", serviceDescriptor.FullName(), descriptor.Name()) + + inputDesc := descriptor.Input() + inputType := util.ResolveMessageType(b.TypeResolver, inputDesc) + outputType := util.ResolveMessageType(b.TypeResolver, descriptor.Output()) + cmd := &cobra.Command{ + Use: protoNameToCliName(descriptor.Name()), + Long: docs, + } + + binder := b.AddMessageFlags(cmd.Context(), cmd.Flags(), inputType, flag.Options{}) + + jsonMarshalOptions := protojson.MarshalOptions{ + Indent: " ", + UseProtoNames: true, + UseEnumNumbers: false, + EmitUnpopulated: true, + Resolver: b.TypeResolver, + } + + cmd.RunE = func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + clientConn := getClientConn(ctx) + input := binder.BuildMessage() + output := outputType.New() + err := clientConn.Invoke(ctx, methodName, input.Interface(), output.Interface()) + if err != nil { + return err + } + + bz, err := jsonMarshalOptions.Marshal(output.Interface()) + if err != nil { + return err + } + + _, err = fmt.Fprintln(cmd.OutOrStdout(), string(bz)) + return err + } + + return cmd +} + +func protoNameToCliName(name protoreflect.Name) string { + return strcase.ToKebab(string(name)) +} diff --git a/client/v2/cli/query_test.go b/client/v2/cli/query_test.go new file mode 100644 index 000000000000..6d6c96c49f74 --- /dev/null +++ b/client/v2/cli/query_test.go @@ -0,0 +1,117 @@ +package cli + +import ( + "bytes" + "context" + "net" + "testing" + + "github.com/spf13/cobra" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/testing/protocmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/golden" + + "github.com/cosmos/cosmos-sdk/client/v2/internal/testpb" +) + +func testExec(t *testing.T, args ...string) *testClientConn { + server := grpc.NewServer() + testpb.RegisterQueryServer(server, &testEchoServer{}) + listener, err := net.Listen("tcp", "127.0.0.1:0") + assert.NilError(t, err) + go server.Serve(listener) + defer server.GracefulStop() + clientConn, err := grpc.Dial(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) + assert.NilError(t, err) + defer clientConn.Close() + + conn := &testClientConn{ + ClientConn: clientConn, + t: t, + out: &bytes.Buffer{}, + } + b := &Builder{ + GetClientConn: func(ctx context.Context) grpc.ClientConnInterface { + return conn + }, + } + cmd := b.AddQueryServiceCommands(&cobra.Command{Use: "test"}, protoreflect.FullName(testpb.Query_ServiceDesc.ServiceName)) + cmd.SetArgs(args) + cmd.SetOut(conn.out) + assert.NilError(t, cmd.Execute()) + return conn +} + +func TestEcho(t *testing.T) { + conn := testExec(t, + "echo", + "--a-bool", + "--an-enum", "one", + "--a-message", `{"bar":"abc", "baz":-3}`, + "--duration", "4h3s", + "--u-32", "27", + "--u-64", "3267246890", + "--i-32", "-253", + "--i-64", "-234602347", + "--str", "def", + "--timestamp", "2019-01-02T00:01:02Z", + "--a-coin", `{"denom":"foo","amount":"100000"}`, + "--an-address", "cosmossdghdsfoi2134sdgh", + "--bz", "c2RncXdlZndkZ3NkZw==", + "--page-count-total", + "--page-key", "MTIzNTQ4N3NnaGRhcw==", + "--page-limit", "1000", + "--page-offset", "10", + "--page-reverse", + "--bools", "true", + "--bools", "false,false,true", + "--enums", "one", + "--enums", "five", + "--enums", "two", + "--strings", "abc", + "--strings", "xyz", + "--strings", "xyz,qrs", + "--durations", "3s", + "--durations", "5s", + "--durations", "10h", + "--some-messages", "{}", + "--some-messages", `{"bar":"baz"}`, + "--some-messages", `{"baz":-1}`, + "--uints", "1,2,3", + "--uints", "4", + ) + assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) +} + +func TestHelp(t *testing.T) { + conn := testExec(t, "echo", "-h") + golden.Assert(t, conn.out.String(), "help.golden") +} + +type testClientConn struct { + *grpc.ClientConn + t *testing.T + lastRequest interface{} + lastResponse interface{} + out *bytes.Buffer +} + +func (t *testClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error { + err := t.ClientConn.Invoke(ctx, method, args, reply, opts...) + t.lastRequest = args + t.lastResponse = reply + return err +} + +type testEchoServer struct { + testpb.UnimplementedQueryServer +} + +func (t testEchoServer) Echo(_ context.Context, request *testpb.EchoRequest) (*testpb.EchoResponse, error) { + return &testpb.EchoResponse{Request: request}, nil +} + +var _ testpb.QueryServer = testEchoServer{} diff --git a/client/v2/cli/testdata/help.golden b/client/v2/cli/testdata/help.golden new file mode 100644 index 000000000000..bcb9c087fdc9 --- /dev/null +++ b/client/v2/cli/testdata/help.golden @@ -0,0 +1,29 @@ +Usage: + test echo [flags] + +Flags: + --a-bool + --a-coin cosmos.base.v1beta1.Coin (json) + --a-message testpb.AMessage (json) + --an-address bech32 account address key name + --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) + --bools bools (default []) + --bz bytesBase64 + --duration duration + --durations duration (repeated) + --enums Enum (unspecified | one | two | five | neg-three) (repeated) + -h, --help help for echo + --i-32 int32 + --i-64 int + --page-count-total + --page-key bytesBase64 + --page-limit uint + --page-offset uint + --page-reverse + --some-messages testpb.AMessage (json) (repeated) + --str string + --strings strings + --timestamp timestamp (RFC 3339) + --u-32 uint32 + --u-64 uint + --uints uints (default []) diff --git a/client/v2/go.mod b/client/v2/go.mod new file mode 100644 index 000000000000..d83f8b8ab04b --- /dev/null +++ b/client/v2/go.mod @@ -0,0 +1,27 @@ +module github.com/cosmos/cosmos-sdk/client/v2 + +go 1.18 + +require ( + github.com/cosmos/cosmos-proto v1.0.0-alpha7 + github.com/cosmos/cosmos-sdk/api v0.1.0 + github.com/iancoleman/strcase v0.2.0 + github.com/spf13/cobra v1.4.0 + github.com/spf13/pflag v1.0.5 + google.golang.org/grpc v1.45.0 + google.golang.org/protobuf v1.28.0 + gotest.tools/v3 v3.1.0 +) + +require ( + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect + golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect + golang.org/x/text v0.3.5 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect +) diff --git a/api/go.sum b/client/v2/go.sum similarity index 90% rename from api/go.sum rename to client/v2/go.sum index fb206487a5ba..8ff37c70268b 100644 --- a/api/go.sum +++ b/client/v2/go.sum @@ -16,6 +16,9 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= +github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= +github.com/cosmos/cosmos-sdk/api v0.1.0/go.mod h1:CupqQBskAOiTXO1XDZ/wrtWzN/wTxUvbQmOqdUhR8wI= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -53,12 +56,24 @@ github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 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/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/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -100,6 +115,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -116,6 +132,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn 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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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= @@ -155,7 +172,10 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= +gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= diff --git a/client/v2/internal/buf.gen.yaml b/client/v2/internal/buf.gen.yaml new file mode 100644 index 000000000000..488595470999 --- /dev/null +++ b/client/v2/internal/buf.gen.yaml @@ -0,0 +1,16 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/cosmos/cosmos-sdk/client/v2/internal + except: + - buf.build/cosmos/cosmos-proto + override: + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api +plugins: + - name: go-pulsar + out: . + opt: paths=source_relative + - name: go-grpc + out: . + opt: paths=source_relative diff --git a/client/v2/internal/buf.lock b/client/v2/internal/buf.lock new file mode 100644 index 000000000000..3278c9b656d8 --- /dev/null +++ b/client/v2/internal/buf.lock @@ -0,0 +1,23 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + branch: main + commit: 1935555c206d4afb9e94615dfd0fad31 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + branch: main + commit: 86d2a697b026488089f13a71ceb3815c + - remote: buf.build + owner: cosmos + repository: gogo-proto + branch: main + commit: bee5511075b7499da6178d9e4aaa628b + - remote: buf.build + owner: googleapis + repository: googleapis + branch: main + commit: 40f07f5b563941f2b20b991a7aedd53d diff --git a/client/v2/internal/buf.yaml b/client/v2/internal/buf.yaml new file mode 100644 index 000000000000..96af160bf130 --- /dev/null +++ b/client/v2/internal/buf.yaml @@ -0,0 +1,12 @@ +version: v1 +deps: + - buf.build/cosmos/cosmos-sdk + - buf.build/cosmos/cosmos-proto +lint: + use: + - DEFAULT + except: + - PACKAGE_VERSION_SUFFIX +breaking: + ignore: + - testpb diff --git a/client/v2/internal/testpb/query.proto b/client/v2/internal/testpb/query.proto new file mode 100644 index 000000000000..062953a358f3 --- /dev/null +++ b/client/v2/internal/testpb/query.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +package testpb; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +service Query { + // Echo returns the request in the response + rpc Echo(EchoRequest) returns (EchoResponse); +} + +message EchoRequest { + // u32 is an uint32 + uint32 u32 = 1; + uint64 u64 = 2; + string str = 3; + bytes bz = 4; + google.protobuf.Timestamp timestamp = 5; + google.protobuf.Duration duration = 6; + int32 i32 = 7; + int64 i64 = 10; + bool a_bool = 15; + Enum an_enum = 16; + AMessage a_message = 17; + cosmos.base.v1beta1.Coin a_coin = 18; + string an_address = 19 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.query.v1beta1.PageRequest page = 20; + repeated bool bools = 21; + repeated uint32 uints = 22; + repeated string strings = 23; + repeated Enum enums = 24; + repeated google.protobuf.Duration durations = 25; + repeated AMessage some_messages = 26; +} + +enum Enum { + ENUM_UNSPECIFIED = 0; + ENUM_ONE = 1; + ENUM_TWO = 2; + ENUM_FIVE = 5; + ENUM_NEG_THREE = -3; +} + +message AMessage { + string bar = 1; + int32 baz = 2; +} + +message EchoResponse { + EchoRequest request = 1; +} \ No newline at end of file diff --git a/client/v2/internal/testpb/query.pulsar.go b/client/v2/internal/testpb/query.pulsar.go new file mode 100644 index 000000000000..33b424acd2d9 --- /dev/null +++ b/client/v2/internal/testpb/query.pulsar.go @@ -0,0 +1,3631 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package testpb + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + v1beta11 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" + v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_EchoRequest_21_list)(nil) + +type _EchoRequest_21_list struct { + list *[]bool +} + +func (x *_EchoRequest_21_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_21_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBool((*x.list)[i]) +} + +func (x *_EchoRequest_21_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_21_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_21_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Bools as it is not of Message kind")) +} + +func (x *_EchoRequest_21_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_21_list) NewElement() protoreflect.Value { + v := false + return protoreflect.ValueOfBool(v) +} + +func (x *_EchoRequest_21_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_22_list)(nil) + +type _EchoRequest_22_list struct { + list *[]uint32 +} + +func (x *_EchoRequest_22_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_22_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint32((*x.list)[i]) +} + +func (x *_EchoRequest_22_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := (uint32)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_22_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := (uint32)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_22_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Uints as it is not of Message kind")) +} + +func (x *_EchoRequest_22_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_22_list) NewElement() protoreflect.Value { + v := uint32(0) + return protoreflect.ValueOfUint32(v) +} + +func (x *_EchoRequest_22_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_23_list)(nil) + +type _EchoRequest_23_list struct { + list *[]string +} + +func (x *_EchoRequest_23_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_23_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_EchoRequest_23_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_23_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_23_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Strings as it is not of Message kind")) +} + +func (x *_EchoRequest_23_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_23_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_EchoRequest_23_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_24_list)(nil) + +type _EchoRequest_24_list struct { + list *[]Enum +} + +func (x *_EchoRequest_24_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_24_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +} + +func (x *_EchoRequest_24_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (Enum)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_24_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (Enum)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_24_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Enums as it is not of Message kind")) +} + +func (x *_EchoRequest_24_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_24_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +} + +func (x *_EchoRequest_24_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_25_list)(nil) + +type _EchoRequest_25_list struct { + list *[]*durationpb.Duration +} + +func (x *_EchoRequest_25_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_25_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EchoRequest_25_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*durationpb.Duration) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_25_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*durationpb.Duration) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_25_list) AppendMutable() protoreflect.Value { + v := new(durationpb.Duration) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_25_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_25_list) NewElement() protoreflect.Value { + v := new(durationpb.Duration) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_25_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_26_list)(nil) + +type _EchoRequest_26_list struct { + list *[]*AMessage +} + +func (x *_EchoRequest_26_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_26_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EchoRequest_26_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AMessage) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_26_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AMessage) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_26_list) AppendMutable() protoreflect.Value { + v := new(AMessage) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_26_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_26_list) NewElement() protoreflect.Value { + v := new(AMessage) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_26_list) IsValid() bool { + return x.list != nil +} + +var ( + md_EchoRequest protoreflect.MessageDescriptor + fd_EchoRequest_u32 protoreflect.FieldDescriptor + fd_EchoRequest_u64 protoreflect.FieldDescriptor + fd_EchoRequest_str protoreflect.FieldDescriptor + fd_EchoRequest_bz protoreflect.FieldDescriptor + fd_EchoRequest_timestamp protoreflect.FieldDescriptor + fd_EchoRequest_duration protoreflect.FieldDescriptor + fd_EchoRequest_i32 protoreflect.FieldDescriptor + fd_EchoRequest_i64 protoreflect.FieldDescriptor + fd_EchoRequest_a_bool protoreflect.FieldDescriptor + fd_EchoRequest_an_enum protoreflect.FieldDescriptor + fd_EchoRequest_a_message protoreflect.FieldDescriptor + fd_EchoRequest_a_coin protoreflect.FieldDescriptor + fd_EchoRequest_an_address protoreflect.FieldDescriptor + fd_EchoRequest_page protoreflect.FieldDescriptor + fd_EchoRequest_bools protoreflect.FieldDescriptor + fd_EchoRequest_uints protoreflect.FieldDescriptor + fd_EchoRequest_strings protoreflect.FieldDescriptor + fd_EchoRequest_enums protoreflect.FieldDescriptor + fd_EchoRequest_durations protoreflect.FieldDescriptor + fd_EchoRequest_some_messages protoreflect.FieldDescriptor +) + +func init() { + file_testpb_query_proto_init() + md_EchoRequest = File_testpb_query_proto.Messages().ByName("EchoRequest") + fd_EchoRequest_u32 = md_EchoRequest.Fields().ByName("u32") + fd_EchoRequest_u64 = md_EchoRequest.Fields().ByName("u64") + fd_EchoRequest_str = md_EchoRequest.Fields().ByName("str") + fd_EchoRequest_bz = md_EchoRequest.Fields().ByName("bz") + fd_EchoRequest_timestamp = md_EchoRequest.Fields().ByName("timestamp") + fd_EchoRequest_duration = md_EchoRequest.Fields().ByName("duration") + fd_EchoRequest_i32 = md_EchoRequest.Fields().ByName("i32") + fd_EchoRequest_i64 = md_EchoRequest.Fields().ByName("i64") + fd_EchoRequest_a_bool = md_EchoRequest.Fields().ByName("a_bool") + fd_EchoRequest_an_enum = md_EchoRequest.Fields().ByName("an_enum") + fd_EchoRequest_a_message = md_EchoRequest.Fields().ByName("a_message") + fd_EchoRequest_a_coin = md_EchoRequest.Fields().ByName("a_coin") + fd_EchoRequest_an_address = md_EchoRequest.Fields().ByName("an_address") + fd_EchoRequest_page = md_EchoRequest.Fields().ByName("page") + fd_EchoRequest_bools = md_EchoRequest.Fields().ByName("bools") + fd_EchoRequest_uints = md_EchoRequest.Fields().ByName("uints") + fd_EchoRequest_strings = md_EchoRequest.Fields().ByName("strings") + fd_EchoRequest_enums = md_EchoRequest.Fields().ByName("enums") + fd_EchoRequest_durations = md_EchoRequest.Fields().ByName("durations") + fd_EchoRequest_some_messages = md_EchoRequest.Fields().ByName("some_messages") +} + +var _ protoreflect.Message = (*fastReflection_EchoRequest)(nil) + +type fastReflection_EchoRequest EchoRequest + +func (x *EchoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_EchoRequest)(x) +} + +func (x *EchoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EchoRequest_messageType fastReflection_EchoRequest_messageType +var _ protoreflect.MessageType = fastReflection_EchoRequest_messageType{} + +type fastReflection_EchoRequest_messageType struct{} + +func (x fastReflection_EchoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_EchoRequest)(nil) +} +func (x fastReflection_EchoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_EchoRequest) +} +func (x fastReflection_EchoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EchoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EchoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_EchoRequest +} + +// 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_EchoRequest) Type() protoreflect.MessageType { + return _fastReflection_EchoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EchoRequest) New() protoreflect.Message { + return new(fastReflection_EchoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EchoRequest) Interface() protoreflect.ProtoMessage { + return (*EchoRequest)(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_EchoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.U32 != uint32(0) { + value := protoreflect.ValueOfUint32(x.U32) + if !f(fd_EchoRequest_u32, value) { + return + } + } + if x.U64 != uint64(0) { + value := protoreflect.ValueOfUint64(x.U64) + if !f(fd_EchoRequest_u64, value) { + return + } + } + if x.Str != "" { + value := protoreflect.ValueOfString(x.Str) + if !f(fd_EchoRequest_str, value) { + return + } + } + if len(x.Bz) != 0 { + value := protoreflect.ValueOfBytes(x.Bz) + if !f(fd_EchoRequest_bz, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_EchoRequest_timestamp, value) { + return + } + } + if x.Duration != nil { + value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + if !f(fd_EchoRequest_duration, value) { + return + } + } + if x.I32 != int32(0) { + value := protoreflect.ValueOfInt32(x.I32) + if !f(fd_EchoRequest_i32, value) { + return + } + } + if x.I64 != int64(0) { + value := protoreflect.ValueOfInt64(x.I64) + if !f(fd_EchoRequest_i64, value) { + return + } + } + if x.ABool != false { + value := protoreflect.ValueOfBool(x.ABool) + if !f(fd_EchoRequest_a_bool, value) { + return + } + } + if x.AnEnum != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.AnEnum)) + if !f(fd_EchoRequest_an_enum, value) { + return + } + } + if x.AMessage != nil { + value := protoreflect.ValueOfMessage(x.AMessage.ProtoReflect()) + if !f(fd_EchoRequest_a_message, value) { + return + } + } + if x.ACoin != nil { + value := protoreflect.ValueOfMessage(x.ACoin.ProtoReflect()) + if !f(fd_EchoRequest_a_coin, value) { + return + } + } + if x.AnAddress != "" { + value := protoreflect.ValueOfString(x.AnAddress) + if !f(fd_EchoRequest_an_address, value) { + return + } + } + if x.Page != nil { + value := protoreflect.ValueOfMessage(x.Page.ProtoReflect()) + if !f(fd_EchoRequest_page, value) { + return + } + } + if len(x.Bools) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_21_list{list: &x.Bools}) + if !f(fd_EchoRequest_bools, value) { + return + } + } + if len(x.Uints) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_22_list{list: &x.Uints}) + if !f(fd_EchoRequest_uints, value) { + return + } + } + if len(x.Strings) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_23_list{list: &x.Strings}) + if !f(fd_EchoRequest_strings, value) { + return + } + } + if len(x.Enums) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_24_list{list: &x.Enums}) + if !f(fd_EchoRequest_enums, value) { + return + } + } + if len(x.Durations) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_25_list{list: &x.Durations}) + if !f(fd_EchoRequest_durations, value) { + return + } + } + if len(x.SomeMessages) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_26_list{list: &x.SomeMessages}) + if !f(fd_EchoRequest_some_messages, 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_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + return x.U32 != uint32(0) + case "testpb.EchoRequest.u64": + return x.U64 != uint64(0) + case "testpb.EchoRequest.str": + return x.Str != "" + case "testpb.EchoRequest.bz": + return len(x.Bz) != 0 + case "testpb.EchoRequest.timestamp": + return x.Timestamp != nil + case "testpb.EchoRequest.duration": + return x.Duration != nil + case "testpb.EchoRequest.i32": + return x.I32 != int32(0) + case "testpb.EchoRequest.i64": + return x.I64 != int64(0) + case "testpb.EchoRequest.a_bool": + return x.ABool != false + case "testpb.EchoRequest.an_enum": + return x.AnEnum != 0 + case "testpb.EchoRequest.a_message": + return x.AMessage != nil + case "testpb.EchoRequest.a_coin": + return x.ACoin != nil + case "testpb.EchoRequest.an_address": + return x.AnAddress != "" + case "testpb.EchoRequest.page": + return x.Page != nil + case "testpb.EchoRequest.bools": + return len(x.Bools) != 0 + case "testpb.EchoRequest.uints": + return len(x.Uints) != 0 + case "testpb.EchoRequest.strings": + return len(x.Strings) != 0 + case "testpb.EchoRequest.enums": + return len(x.Enums) != 0 + case "testpb.EchoRequest.durations": + return len(x.Durations) != 0 + case "testpb.EchoRequest.some_messages": + return len(x.SomeMessages) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest 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_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + x.U32 = uint32(0) + case "testpb.EchoRequest.u64": + x.U64 = uint64(0) + case "testpb.EchoRequest.str": + x.Str = "" + case "testpb.EchoRequest.bz": + x.Bz = nil + case "testpb.EchoRequest.timestamp": + x.Timestamp = nil + case "testpb.EchoRequest.duration": + x.Duration = nil + case "testpb.EchoRequest.i32": + x.I32 = int32(0) + case "testpb.EchoRequest.i64": + x.I64 = int64(0) + case "testpb.EchoRequest.a_bool": + x.ABool = false + case "testpb.EchoRequest.an_enum": + x.AnEnum = 0 + case "testpb.EchoRequest.a_message": + x.AMessage = nil + case "testpb.EchoRequest.a_coin": + x.ACoin = nil + case "testpb.EchoRequest.an_address": + x.AnAddress = "" + case "testpb.EchoRequest.page": + x.Page = nil + case "testpb.EchoRequest.bools": + x.Bools = nil + case "testpb.EchoRequest.uints": + x.Uints = nil + case "testpb.EchoRequest.strings": + x.Strings = nil + case "testpb.EchoRequest.enums": + x.Enums = nil + case "testpb.EchoRequest.durations": + x.Durations = nil + case "testpb.EchoRequest.some_messages": + x.SomeMessages = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest 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_EchoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.EchoRequest.u32": + value := x.U32 + return protoreflect.ValueOfUint32(value) + case "testpb.EchoRequest.u64": + value := x.U64 + return protoreflect.ValueOfUint64(value) + case "testpb.EchoRequest.str": + value := x.Str + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.bz": + value := x.Bz + return protoreflect.ValueOfBytes(value) + case "testpb.EchoRequest.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.duration": + value := x.Duration + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.i32": + value := x.I32 + return protoreflect.ValueOfInt32(value) + case "testpb.EchoRequest.i64": + value := x.I64 + return protoreflect.ValueOfInt64(value) + case "testpb.EchoRequest.a_bool": + value := x.ABool + return protoreflect.ValueOfBool(value) + case "testpb.EchoRequest.an_enum": + value := x.AnEnum + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "testpb.EchoRequest.a_message": + value := x.AMessage + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.a_coin": + value := x.ACoin + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.an_address": + value := x.AnAddress + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.page": + value := x.Page + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.bools": + if len(x.Bools) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_21_list{}) + } + listValue := &_EchoRequest_21_list{list: &x.Bools} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.uints": + if len(x.Uints) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_22_list{}) + } + listValue := &_EchoRequest_22_list{list: &x.Uints} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.strings": + if len(x.Strings) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_23_list{}) + } + listValue := &_EchoRequest_23_list{list: &x.Strings} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.enums": + if len(x.Enums) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_24_list{}) + } + listValue := &_EchoRequest_24_list{list: &x.Enums} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.durations": + if len(x.Durations) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_25_list{}) + } + listValue := &_EchoRequest_25_list{list: &x.Durations} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.some_messages": + if len(x.SomeMessages) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_26_list{}) + } + listValue := &_EchoRequest_26_list{list: &x.SomeMessages} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest 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_EchoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + x.U32 = uint32(value.Uint()) + case "testpb.EchoRequest.u64": + x.U64 = value.Uint() + case "testpb.EchoRequest.str": + x.Str = value.Interface().(string) + case "testpb.EchoRequest.bz": + x.Bz = value.Bytes() + case "testpb.EchoRequest.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + case "testpb.EchoRequest.duration": + x.Duration = value.Message().Interface().(*durationpb.Duration) + case "testpb.EchoRequest.i32": + x.I32 = int32(value.Int()) + case "testpb.EchoRequest.i64": + x.I64 = value.Int() + case "testpb.EchoRequest.a_bool": + x.ABool = value.Bool() + case "testpb.EchoRequest.an_enum": + x.AnEnum = (Enum)(value.Enum()) + case "testpb.EchoRequest.a_message": + x.AMessage = value.Message().Interface().(*AMessage) + case "testpb.EchoRequest.a_coin": + x.ACoin = value.Message().Interface().(*v1beta1.Coin) + case "testpb.EchoRequest.an_address": + x.AnAddress = value.Interface().(string) + case "testpb.EchoRequest.page": + x.Page = value.Message().Interface().(*v1beta11.PageRequest) + case "testpb.EchoRequest.bools": + lv := value.List() + clv := lv.(*_EchoRequest_21_list) + x.Bools = *clv.list + case "testpb.EchoRequest.uints": + lv := value.List() + clv := lv.(*_EchoRequest_22_list) + x.Uints = *clv.list + case "testpb.EchoRequest.strings": + lv := value.List() + clv := lv.(*_EchoRequest_23_list) + x.Strings = *clv.list + case "testpb.EchoRequest.enums": + lv := value.List() + clv := lv.(*_EchoRequest_24_list) + x.Enums = *clv.list + case "testpb.EchoRequest.durations": + lv := value.List() + clv := lv.(*_EchoRequest_25_list) + x.Durations = *clv.list + case "testpb.EchoRequest.some_messages": + lv := value.List() + clv := lv.(*_EchoRequest_26_list) + x.SomeMessages = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest 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_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoRequest.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "testpb.EchoRequest.duration": + if x.Duration == nil { + x.Duration = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + case "testpb.EchoRequest.a_message": + if x.AMessage == nil { + x.AMessage = new(AMessage) + } + return protoreflect.ValueOfMessage(x.AMessage.ProtoReflect()) + case "testpb.EchoRequest.a_coin": + if x.ACoin == nil { + x.ACoin = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.ACoin.ProtoReflect()) + case "testpb.EchoRequest.page": + if x.Page == nil { + x.Page = new(v1beta11.PageRequest) + } + return protoreflect.ValueOfMessage(x.Page.ProtoReflect()) + case "testpb.EchoRequest.bools": + if x.Bools == nil { + x.Bools = []bool{} + } + value := &_EchoRequest_21_list{list: &x.Bools} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.uints": + if x.Uints == nil { + x.Uints = []uint32{} + } + value := &_EchoRequest_22_list{list: &x.Uints} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.strings": + if x.Strings == nil { + x.Strings = []string{} + } + value := &_EchoRequest_23_list{list: &x.Strings} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.enums": + if x.Enums == nil { + x.Enums = []Enum{} + } + value := &_EchoRequest_24_list{list: &x.Enums} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.durations": + if x.Durations == nil { + x.Durations = []*durationpb.Duration{} + } + value := &_EchoRequest_25_list{list: &x.Durations} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.some_messages": + if x.SomeMessages == nil { + x.SomeMessages = []*AMessage{} + } + value := &_EchoRequest_26_list{list: &x.SomeMessages} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.u32": + panic(fmt.Errorf("field u32 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.u64": + panic(fmt.Errorf("field u64 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.str": + panic(fmt.Errorf("field str of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.bz": + panic(fmt.Errorf("field bz of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.i32": + panic(fmt.Errorf("field i32 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.i64": + panic(fmt.Errorf("field i64 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.a_bool": + panic(fmt.Errorf("field a_bool of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.an_enum": + panic(fmt.Errorf("field an_enum of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.an_address": + panic(fmt.Errorf("field an_address of message testpb.EchoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest 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_EchoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + return protoreflect.ValueOfUint32(uint32(0)) + case "testpb.EchoRequest.u64": + return protoreflect.ValueOfUint64(uint64(0)) + case "testpb.EchoRequest.str": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.bz": + return protoreflect.ValueOfBytes(nil) + case "testpb.EchoRequest.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.duration": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.i32": + return protoreflect.ValueOfInt32(int32(0)) + case "testpb.EchoRequest.i64": + return protoreflect.ValueOfInt64(int64(0)) + case "testpb.EchoRequest.a_bool": + return protoreflect.ValueOfBool(false) + case "testpb.EchoRequest.an_enum": + return protoreflect.ValueOfEnum(0) + case "testpb.EchoRequest.a_message": + m := new(AMessage) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.a_coin": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.an_address": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.page": + m := new(v1beta11.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.bools": + list := []bool{} + return protoreflect.ValueOfList(&_EchoRequest_21_list{list: &list}) + case "testpb.EchoRequest.uints": + list := []uint32{} + return protoreflect.ValueOfList(&_EchoRequest_22_list{list: &list}) + case "testpb.EchoRequest.strings": + list := []string{} + return protoreflect.ValueOfList(&_EchoRequest_23_list{list: &list}) + case "testpb.EchoRequest.enums": + list := []Enum{} + return protoreflect.ValueOfList(&_EchoRequest_24_list{list: &list}) + case "testpb.EchoRequest.durations": + list := []*durationpb.Duration{} + return protoreflect.ValueOfList(&_EchoRequest_25_list{list: &list}) + case "testpb.EchoRequest.some_messages": + list := []*AMessage{} + return protoreflect.ValueOfList(&_EchoRequest_26_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest 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_EchoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.EchoRequest", 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_EchoRequest) 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_EchoRequest) 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_EchoRequest) 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_EchoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EchoRequest) + 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.U32 != 0 { + n += 1 + runtime.Sov(uint64(x.U32)) + } + if x.U64 != 0 { + n += 1 + runtime.Sov(uint64(x.U64)) + } + l = len(x.Str) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Bz) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Duration != nil { + l = options.Size(x.Duration) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.I32 != 0 { + n += 1 + runtime.Sov(uint64(x.I32)) + } + if x.I64 != 0 { + n += 1 + runtime.Sov(uint64(x.I64)) + } + if x.ABool { + n += 2 + } + if x.AnEnum != 0 { + n += 2 + runtime.Sov(uint64(x.AnEnum)) + } + if x.AMessage != nil { + l = options.Size(x.AMessage) + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.ACoin != nil { + l = options.Size(x.ACoin) + n += 2 + l + runtime.Sov(uint64(l)) + } + l = len(x.AnAddress) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.Page != nil { + l = options.Size(x.Page) + n += 2 + l + runtime.Sov(uint64(l)) + } + if len(x.Bools) > 0 { + n += 2 + runtime.Sov(uint64(len(x.Bools))) + len(x.Bools)*1 + } + if len(x.Uints) > 0 { + l = 0 + for _, e := range x.Uints { + l += runtime.Sov(uint64(e)) + } + n += 2 + runtime.Sov(uint64(l)) + l + } + if len(x.Strings) > 0 { + for _, s := range x.Strings { + l = len(s) + n += 2 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Enums) > 0 { + l = 0 + for _, e := range x.Enums { + l += runtime.Sov(uint64(e)) + } + n += 2 + runtime.Sov(uint64(l)) + l + } + if len(x.Durations) > 0 { + for _, e := range x.Durations { + l = options.Size(e) + n += 2 + l + runtime.Sov(uint64(l)) + } + } + if len(x.SomeMessages) > 0 { + for _, e := range x.SomeMessages { + l = options.Size(e) + n += 2 + 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().(*EchoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.SomeMessages) > 0 { + for iNdEx := len(x.SomeMessages) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SomeMessages[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] = 0x1 + i-- + dAtA[i] = 0xd2 + } + } + if len(x.Durations) > 0 { + for iNdEx := len(x.Durations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Durations[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] = 0x1 + i-- + dAtA[i] = 0xca + } + } + if len(x.Enums) > 0 { + var pksize2 int + for _, num := range x.Enums { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Enums { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + if len(x.Strings) > 0 { + for iNdEx := len(x.Strings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Strings[iNdEx]) + copy(dAtA[i:], x.Strings[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Strings[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + } + if len(x.Uints) > 0 { + var pksize4 int + for _, num := range x.Uints { + pksize4 += runtime.Sov(uint64(num)) + } + i -= pksize4 + j3 := i + for _, num := range x.Uints { + for num >= 1<<7 { + dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA[j3] = uint8(num) + j3++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize4)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if len(x.Bools) > 0 { + for iNdEx := len(x.Bools) - 1; iNdEx >= 0; iNdEx-- { + i-- + if x.Bools[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bools))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if x.Page != nil { + encoded, err := options.Marshal(x.Page) + 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] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if len(x.AnAddress) > 0 { + i -= len(x.AnAddress) + copy(dAtA[i:], x.AnAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AnAddress))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if x.ACoin != nil { + encoded, err := options.Marshal(x.ACoin) + 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] = 0x1 + i-- + dAtA[i] = 0x92 + } + if x.AMessage != nil { + encoded, err := options.Marshal(x.AMessage) + 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] = 0x1 + i-- + dAtA[i] = 0x8a + } + if x.AnEnum != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AnEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if x.ABool { + i-- + if x.ABool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x78 + } + if x.I64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.I64)) + i-- + dAtA[i] = 0x50 + } + if x.I32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.I32)) + i-- + dAtA[i] = 0x38 + } + if x.Duration != nil { + encoded, err := options.Marshal(x.Duration) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.Bz) > 0 { + i -= len(x.Bz) + copy(dAtA[i:], x.Bz) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bz))) + i-- + dAtA[i] = 0x22 + } + if len(x.Str) > 0 { + i -= len(x.Str) + copy(dAtA[i:], x.Str) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Str))) + i-- + dAtA[i] = 0x1a + } + if x.U64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.U64)) + i-- + dAtA[i] = 0x10 + } + if x.U32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.U32)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EchoRequest) + 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: EchoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + x.U32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.U32 |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + x.U64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.U64 |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Str", 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.Str = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bz", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Bz = append(x.Bz[:0], dAtA[iNdEx:postIndex]...) + if x.Bz == nil { + x.Bz = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", 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.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", 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.Duration == nil { + x.Duration = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + x.I32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.I32 |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + x.I64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.I64 |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ABool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.ABool = bool(v != 0) + case 16: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnEnum", wireType) + } + x.AnEnum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.AnEnum |= Enum(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 17: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AMessage", 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.AMessage == nil { + x.AMessage = &AMessage{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AMessage); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ACoin", 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.ACoin == nil { + x.ACoin = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ACoin); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnAddress", 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.AnAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 20: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Page", 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.Page == nil { + x.Page = &v1beta11.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Page); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 21: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Bools = append(x.Bools, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(x.Bools) == 0 { + x.Bools = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Bools = append(x.Bools, bool(v != 0)) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bools", wireType) + } + case 22: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Uints = append(x.Uints, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.Uints) == 0 { + x.Uints = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Uints = append(x.Uints, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Uints", wireType) + } + case 23: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Strings", 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.Strings = append(x.Strings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 24: + if wireType == 0 { + var v Enum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Enum(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Enums = append(x.Enums, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(x.Enums) == 0 { + x.Enums = make([]Enum, 0, elementCount) + } + for iNdEx < postIndex { + var v Enum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Enum(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Enums = append(x.Enums, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enums", wireType) + } + case 25: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Durations = append(x.Durations, &durationpb.Duration{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Durations[len(x.Durations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 26: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeMessages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SomeMessages = append(x.SomeMessages, &AMessage{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SomeMessages[len(x.SomeMessages)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AMessage protoreflect.MessageDescriptor + fd_AMessage_bar protoreflect.FieldDescriptor + fd_AMessage_baz protoreflect.FieldDescriptor +) + +func init() { + file_testpb_query_proto_init() + md_AMessage = File_testpb_query_proto.Messages().ByName("AMessage") + fd_AMessage_bar = md_AMessage.Fields().ByName("bar") + fd_AMessage_baz = md_AMessage.Fields().ByName("baz") +} + +var _ protoreflect.Message = (*fastReflection_AMessage)(nil) + +type fastReflection_AMessage AMessage + +func (x *AMessage) ProtoReflect() protoreflect.Message { + return (*fastReflection_AMessage)(x) +} + +func (x *AMessage) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AMessage_messageType fastReflection_AMessage_messageType +var _ protoreflect.MessageType = fastReflection_AMessage_messageType{} + +type fastReflection_AMessage_messageType struct{} + +func (x fastReflection_AMessage_messageType) Zero() protoreflect.Message { + return (*fastReflection_AMessage)(nil) +} +func (x fastReflection_AMessage_messageType) New() protoreflect.Message { + return new(fastReflection_AMessage) +} +func (x fastReflection_AMessage_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AMessage +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AMessage) Descriptor() protoreflect.MessageDescriptor { + return md_AMessage +} + +// 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_AMessage) Type() protoreflect.MessageType { + return _fastReflection_AMessage_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AMessage) New() protoreflect.Message { + return new(fastReflection_AMessage) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AMessage) Interface() protoreflect.ProtoMessage { + return (*AMessage)(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_AMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bar != "" { + value := protoreflect.ValueOfString(x.Bar) + if !f(fd_AMessage_bar, value) { + return + } + } + if x.Baz != int32(0) { + value := protoreflect.ValueOfInt32(x.Baz) + if !f(fd_AMessage_baz, 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_AMessage) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.AMessage.bar": + return x.Bar != "" + case "testpb.AMessage.baz": + return x.Baz != int32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.AMessage.bar": + x.Bar = "" + case "testpb.AMessage.baz": + x.Baz = int32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.AMessage.bar": + value := x.Bar + return protoreflect.ValueOfString(value) + case "testpb.AMessage.baz": + value := x.Baz + return protoreflect.ValueOfInt32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.AMessage.bar": + x.Bar = value.Interface().(string) + case "testpb.AMessage.baz": + x.Baz = int32(value.Int()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage 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_AMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.AMessage.bar": + panic(fmt.Errorf("field bar of message testpb.AMessage is not mutable")) + case "testpb.AMessage.baz": + panic(fmt.Errorf("field baz of message testpb.AMessage is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage 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_AMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.AMessage.bar": + return protoreflect.ValueOfString("") + case "testpb.AMessage.baz": + return protoreflect.ValueOfInt32(int32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage 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_AMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.AMessage", 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_AMessage) 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_AMessage) 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_AMessage) 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_AMessage) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AMessage) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Bar) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Baz != 0 { + n += 1 + runtime.Sov(uint64(x.Baz)) + } + 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().(*AMessage) + 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.Baz != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Baz)) + i-- + dAtA[i] = 0x10 + } + if len(x.Bar) > 0 { + i -= len(x.Bar) + copy(dAtA[i:], x.Bar) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bar))) + 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().(*AMessage) + 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: AMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: 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 Bar", 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.Bar = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Baz", wireType) + } + x.Baz = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Baz |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EchoResponse protoreflect.MessageDescriptor + fd_EchoResponse_request protoreflect.FieldDescriptor +) + +func init() { + file_testpb_query_proto_init() + md_EchoResponse = File_testpb_query_proto.Messages().ByName("EchoResponse") + fd_EchoResponse_request = md_EchoResponse.Fields().ByName("request") +} + +var _ protoreflect.Message = (*fastReflection_EchoResponse)(nil) + +type fastReflection_EchoResponse EchoResponse + +func (x *EchoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_EchoResponse)(x) +} + +func (x *EchoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EchoResponse_messageType fastReflection_EchoResponse_messageType +var _ protoreflect.MessageType = fastReflection_EchoResponse_messageType{} + +type fastReflection_EchoResponse_messageType struct{} + +func (x fastReflection_EchoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_EchoResponse)(nil) +} +func (x fastReflection_EchoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_EchoResponse) +} +func (x fastReflection_EchoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EchoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EchoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_EchoResponse +} + +// 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_EchoResponse) Type() protoreflect.MessageType { + return _fastReflection_EchoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EchoResponse) New() protoreflect.Message { + return new(fastReflection_EchoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EchoResponse) Interface() protoreflect.ProtoMessage { + return (*EchoResponse)(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_EchoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Request != nil { + value := protoreflect.ValueOfMessage(x.Request.ProtoReflect()) + if !f(fd_EchoResponse_request, 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_EchoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.EchoResponse.request": + return x.Request != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse 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_EchoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.EchoResponse.request": + x.Request = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse 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_EchoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.EchoResponse.request": + value := x.Request + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse 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_EchoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.EchoResponse.request": + x.Request = value.Message().Interface().(*EchoRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse 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_EchoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoResponse.request": + if x.Request == nil { + x.Request = new(EchoRequest) + } + return protoreflect.ValueOfMessage(x.Request.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse 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_EchoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoResponse.request": + m := new(EchoRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse 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_EchoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.EchoResponse", 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_EchoResponse) 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_EchoResponse) 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_EchoResponse) 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_EchoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EchoResponse) + 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.Request != nil { + l = options.Size(x.Request) + 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().(*EchoResponse) + 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.Request != nil { + encoded, err := options.Marshal(x.Request) + 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().(*EchoResponse) + 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: EchoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: 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 Request", 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.Request == nil { + x.Request = &EchoRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Request); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: testpb/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Enum int32 + +const ( + Enum_ENUM_UNSPECIFIED Enum = 0 + Enum_ENUM_ONE Enum = 1 + Enum_ENUM_TWO Enum = 2 + Enum_ENUM_FIVE Enum = 5 + Enum_ENUM_NEG_THREE Enum = -3 +) + +// Enum value maps for Enum. +var ( + Enum_name = map[int32]string{ + 0: "ENUM_UNSPECIFIED", + 1: "ENUM_ONE", + 2: "ENUM_TWO", + 5: "ENUM_FIVE", + -3: "ENUM_NEG_THREE", + } + Enum_value = map[string]int32{ + "ENUM_UNSPECIFIED": 0, + "ENUM_ONE": 1, + "ENUM_TWO": 2, + "ENUM_FIVE": 5, + "ENUM_NEG_THREE": -3, + } +) + +func (x Enum) Enum() *Enum { + p := new(Enum) + *p = x + return p +} + +func (x Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Enum) Descriptor() protoreflect.EnumDescriptor { + return file_testpb_query_proto_enumTypes[0].Descriptor() +} + +func (Enum) Type() protoreflect.EnumType { + return &file_testpb_query_proto_enumTypes[0] +} + +func (x Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Enum.Descriptor instead. +func (Enum) EnumDescriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{0} +} + +type EchoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // u32 is an uint32 + U32 uint32 `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"` + U64 uint64 `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"` + Str string `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"` + Bz []byte `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` + I32 int32 `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"` + I64 int64 `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"` + ABool bool `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"` + AnEnum Enum `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"` + AMessage *AMessage `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"` + ACoin *v1beta1.Coin `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"` + AnAddress string `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"` + Page *v1beta11.PageRequest `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"` + Bools []bool `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"` + Uints []uint32 `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"` + Strings []string `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"` + Enums []Enum `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"` + Durations []*durationpb.Duration `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"` + SomeMessages []*AMessage `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"` +} + +func (x *EchoRequest) Reset() { + *x = EchoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoRequest) ProtoMessage() {} + +// Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead. +func (*EchoRequest) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{0} +} + +func (x *EchoRequest) GetU32() uint32 { + if x != nil { + return x.U32 + } + return 0 +} + +func (x *EchoRequest) GetU64() uint64 { + if x != nil { + return x.U64 + } + return 0 +} + +func (x *EchoRequest) GetStr() string { + if x != nil { + return x.Str + } + return "" +} + +func (x *EchoRequest) GetBz() []byte { + if x != nil { + return x.Bz + } + return nil +} + +func (x *EchoRequest) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *EchoRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *EchoRequest) GetI32() int32 { + if x != nil { + return x.I32 + } + return 0 +} + +func (x *EchoRequest) GetI64() int64 { + if x != nil { + return x.I64 + } + return 0 +} + +func (x *EchoRequest) GetABool() bool { + if x != nil { + return x.ABool + } + return false +} + +func (x *EchoRequest) GetAnEnum() Enum { + if x != nil { + return x.AnEnum + } + return Enum_ENUM_UNSPECIFIED +} + +func (x *EchoRequest) GetAMessage() *AMessage { + if x != nil { + return x.AMessage + } + return nil +} + +func (x *EchoRequest) GetACoin() *v1beta1.Coin { + if x != nil { + return x.ACoin + } + return nil +} + +func (x *EchoRequest) GetAnAddress() string { + if x != nil { + return x.AnAddress + } + return "" +} + +func (x *EchoRequest) GetPage() *v1beta11.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *EchoRequest) GetBools() []bool { + if x != nil { + return x.Bools + } + return nil +} + +func (x *EchoRequest) GetUints() []uint32 { + if x != nil { + return x.Uints + } + return nil +} + +func (x *EchoRequest) GetStrings() []string { + if x != nil { + return x.Strings + } + return nil +} + +func (x *EchoRequest) GetEnums() []Enum { + if x != nil { + return x.Enums + } + return nil +} + +func (x *EchoRequest) GetDurations() []*durationpb.Duration { + if x != nil { + return x.Durations + } + return nil +} + +func (x *EchoRequest) GetSomeMessages() []*AMessage { + if x != nil { + return x.SomeMessages + } + return nil +} + +type AMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"` + Baz int32 `protobuf:"varint,2,opt,name=baz,proto3" json:"baz,omitempty"` +} + +func (x *AMessage) Reset() { + *x = AMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AMessage) ProtoMessage() {} + +// Deprecated: Use AMessage.ProtoReflect.Descriptor instead. +func (*AMessage) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{1} +} + +func (x *AMessage) GetBar() string { + if x != nil { + return x.Bar + } + return "" +} + +func (x *AMessage) GetBaz() int32 { + if x != nil { + return x.Baz + } + return 0 +} + +type EchoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *EchoRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *EchoResponse) Reset() { + *x = EchoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoResponse) ProtoMessage() {} + +// Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead. +func (*EchoResponse) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{2} +} + +func (x *EchoResponse) GetRequest() *EchoRequest { + if x != nil { + return x.Request + } + return nil +} + +var File_testpb_query_proto protoreflect.FileDescriptor + +var file_testpb_query_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x05, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x7a, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x62, 0x7a, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x33, 0x32, 0x12, 0x10, 0x0a, + 0x03, 0x69, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, + 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x61, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x07, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x75, + 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x06, 0x61, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, + 0x09, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x06, + 0x61, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x37, + 0x0a, 0x0a, 0x61, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x6e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x03, + 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, + 0x6d, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x37, 0x0a, + 0x09, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x0c, 0x73, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2e, 0x0a, + 0x08, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x62, + 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x22, 0x3d, 0x0a, + 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2a, 0x64, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, + 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, + 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x0e, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x45, + 0x47, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x01, 0x32, 0x3a, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x04, 0x45, + 0x63, 0x68, 0x6f, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x88, + 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, + 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, + 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, + 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_testpb_query_proto_rawDescOnce sync.Once + file_testpb_query_proto_rawDescData = file_testpb_query_proto_rawDesc +) + +func file_testpb_query_proto_rawDescGZIP() []byte { + file_testpb_query_proto_rawDescOnce.Do(func() { + file_testpb_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_testpb_query_proto_rawDescData) + }) + return file_testpb_query_proto_rawDescData +} + +var file_testpb_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_testpb_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_testpb_query_proto_goTypes = []interface{}{ + (Enum)(0), // 0: testpb.Enum + (*EchoRequest)(nil), // 1: testpb.EchoRequest + (*AMessage)(nil), // 2: testpb.AMessage + (*EchoResponse)(nil), // 3: testpb.EchoResponse + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin + (*v1beta11.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest +} +var file_testpb_query_proto_depIdxs = []int32{ + 4, // 0: testpb.EchoRequest.timestamp:type_name -> google.protobuf.Timestamp + 5, // 1: testpb.EchoRequest.duration:type_name -> google.protobuf.Duration + 0, // 2: testpb.EchoRequest.an_enum:type_name -> testpb.Enum + 2, // 3: testpb.EchoRequest.a_message:type_name -> testpb.AMessage + 6, // 4: testpb.EchoRequest.a_coin:type_name -> cosmos.base.v1beta1.Coin + 7, // 5: testpb.EchoRequest.page:type_name -> cosmos.base.query.v1beta1.PageRequest + 0, // 6: testpb.EchoRequest.enums:type_name -> testpb.Enum + 5, // 7: testpb.EchoRequest.durations:type_name -> google.protobuf.Duration + 2, // 8: testpb.EchoRequest.some_messages:type_name -> testpb.AMessage + 1, // 9: testpb.EchoResponse.request:type_name -> testpb.EchoRequest + 1, // 10: testpb.Query.Echo:input_type -> testpb.EchoRequest + 3, // 11: testpb.Query.Echo:output_type -> testpb.EchoResponse + 11, // [11:12] is the sub-list for method output_type + 10, // [10:11] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_testpb_query_proto_init() } +func file_testpb_query_proto_init() { + if File_testpb_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_testpb_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_testpb_query_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_testpb_query_proto_goTypes, + DependencyIndexes: file_testpb_query_proto_depIdxs, + EnumInfos: file_testpb_query_proto_enumTypes, + MessageInfos: file_testpb_query_proto_msgTypes, + }.Build() + File_testpb_query_proto = out.File + file_testpb_query_proto_rawDesc = nil + file_testpb_query_proto_goTypes = nil + file_testpb_query_proto_depIdxs = nil +} diff --git a/api/cosmos/app/v1alpha1/query_grpc.pb.go b/client/v2/internal/testpb/query_grpc.pb.go similarity index 65% rename from api/cosmos/app/v1alpha1/query_grpc.pb.go rename to client/v2/internal/testpb/query_grpc.pb.go index fdc6d3eab20e..56d177ddc86f 100644 --- a/api/cosmos/app/v1alpha1/query_grpc.pb.go +++ b/client/v2/internal/testpb/query_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) -// source: cosmos/app/v1alpha1/query.proto +// source: testpb/query.proto -package appv1alpha1 +package testpb import ( context "context" @@ -22,8 +22,8 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type QueryClient interface { - // Config returns the current app config. - Config(ctx context.Context, in *QueryConfigRequest, opts ...grpc.CallOption) (*QueryConfigResponse, error) + // Echo returns the request in the response + Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) } type queryClient struct { @@ -34,9 +34,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } -func (c *queryClient) Config(ctx context.Context, in *QueryConfigRequest, opts ...grpc.CallOption) (*QueryConfigResponse, error) { - out := new(QueryConfigResponse) - err := c.cc.Invoke(ctx, "/cosmos.app.v1alpha1.Query/Config", in, out, opts...) +func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { + out := new(EchoResponse) + err := c.cc.Invoke(ctx, "/testpb.Query/Echo", in, out, opts...) if err != nil { return nil, err } @@ -47,8 +47,8 @@ func (c *queryClient) Config(ctx context.Context, in *QueryConfigRequest, opts . // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Config returns the current app config. - Config(context.Context, *QueryConfigRequest) (*QueryConfigResponse, error) + // Echo returns the request in the response + Echo(context.Context, *EchoRequest) (*EchoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -56,8 +56,8 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (UnimplementedQueryServer) Config(context.Context, *QueryConfigRequest) (*QueryConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Config not implemented") +func (UnimplementedQueryServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -72,20 +72,20 @@ func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { s.RegisterService(&Query_ServiceDesc, srv) } -func _Query_Config_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryConfigRequest) +func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EchoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Config(ctx, in) + return srv.(QueryServer).Echo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.app.v1alpha1.Query/Config", + FullMethod: "/testpb.Query/Echo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Config(ctx, req.(*QueryConfigRequest)) + return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) } return interceptor(ctx, in, info, handler) } @@ -94,14 +94,14 @@ func _Query_Config_Handler(srv interface{}, ctx context.Context, dec func(interf // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.app.v1alpha1.Query", + ServiceName: "testpb.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Config", - Handler: _Query_Config_Handler, + MethodName: "Echo", + Handler: _Query_Echo_Handler, }, }, Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/app/v1alpha1/query.proto", + Metadata: "testpb/query.proto", } diff --git a/client/v2/internal/util/util.go b/client/v2/internal/util/util.go new file mode 100644 index 000000000000..18b8d53006a4 --- /dev/null +++ b/client/v2/internal/util/util.go @@ -0,0 +1,29 @@ +package util + +import ( + "github.com/iancoleman/strcase" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/types/dynamicpb" +) + +func DescriptorKebabName(descriptor protoreflect.Descriptor) string { + return strcase.ToKebab(string(descriptor.Name())) +} + +func DescriptorDocs(descriptor protoreflect.Descriptor) string { + return descriptor.ParentFile().SourceLocations().ByDescriptor(descriptor).LeadingComments +} + +func ResolveMessageType(resolver protoregistry.MessageTypeResolver, descriptor protoreflect.MessageDescriptor) protoreflect.MessageType { + if resolver == nil { + resolver = protoregistry.GlobalTypes + } + + typ, err := resolver.FindMessageByName(descriptor.FullName()) + if err == nil { + return typ + } + + return dynamicpb.NewMessageType(descriptor) +} diff --git a/codec/amino.go b/codec/amino.go index fe22fd14fbd4..506e598dab3c 100644 --- a/codec/amino.go +++ b/codec/amino.go @@ -47,7 +47,6 @@ func MarshalJSONIndent(cdc *LegacyAmino, obj interface{}) ([]byte, error) { if err = json.Indent(&out, bz, "", " "); err != nil { return nil, err } - return out.Bytes(), nil } diff --git a/codec/amino_codec_test.go b/codec/amino_codec_test.go index c2f09710ae2b..460ef8ca4184 100644 --- a/codec/amino_codec_test.go +++ b/codec/amino_codec_test.go @@ -121,7 +121,7 @@ func TestAminoCodecUnpackAnyFails(t *testing.T) { func TestAminoCodecFullDecodeAndEncode(t *testing.T) { // This tx comes from https://github.com/cosmos/cosmos-sdk/issues/8117. txSigned := `{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"cosmos14pt0q5cwf38zt08uu0n6yrstf3rndzr5057jys","validator_address":"cosmosvaloper14pt0q5cwf38zt08uu0n6yrstf3rndzr52q28gr","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}` - var legacyCdc = simapp.MakeTestEncodingConfig().Amino + legacyCdc := simapp.MakeTestEncodingConfig().Amino var tx legacytx.StdTx err := legacyCdc.UnmarshalJSON([]byte(txSigned), &tx) require.NoError(t, err) diff --git a/codec/any_test.go b/codec/any_test.go index 92bb9d0d5004..8b4b96a7fb5b 100644 --- a/codec/any_test.go +++ b/codec/any_test.go @@ -79,7 +79,7 @@ func TestMarshalProtoPubKey(t *testing.T) { var pkI cryptotypes.PubKey err = ccfg.InterfaceRegistry.UnpackAny(&pkAny2, &pkI) require.NoError(err) - var pk2 = pkAny2.GetCachedValue().(cryptotypes.PubKey) + pk2 := pkAny2.GetCachedValue().(cryptotypes.PubKey) require.True(pk2.Equals(pk)) // **** test binary serialization **** @@ -92,7 +92,7 @@ func TestMarshalProtoPubKey(t *testing.T) { require.NoError(err) err = ccfg.InterfaceRegistry.UnpackAny(&pkAny3, &pkI) require.NoError(err) - var pk3 = pkAny3.GetCachedValue().(cryptotypes.PubKey) + pk3 := pkAny3.GetCachedValue().(cryptotypes.PubKey) require.True(pk3.Equals(pk)) } diff --git a/codec/codec_common_test.go b/codec/codec_common_test.go index 59af923d7920..d9a8c756ec3f 100644 --- a/codec/codec_common_test.go +++ b/codec/codec_common_test.go @@ -28,7 +28,7 @@ func testInterfaceMarshaling(require *require.Assertions, cdc interfaceMarshaler var animal testdata.Animal if isAminoBin { require.PanicsWithValue("Unmarshal expects a pointer", func() { - cdc.unmarshal(bz, animal) + _ = cdc.unmarshal(bz, animal) }) } else { err = cdc.unmarshal(bz, animal) @@ -104,7 +104,8 @@ func testMarshaling(t *testing.T, cdc codec.Codec) { &testdata.Cat{}, false, true, - }} + }, + } if _, ok := cdc.(*codec.AminoCodec); ok { testCases = append(testCases, testCase{ "any marshaling", @@ -123,7 +124,8 @@ func testMarshaling(t *testing.T, cdc codec.Codec) { func(i codec.ProtoMarshaler) ([]byte, error) { return cdc.MarshalJSON(i) }, func(i codec.ProtoMarshaler) []byte { return cdc.MustMarshalJSON(i) }, func(bz []byte, ptr codec.ProtoMarshaler) error { return cdc.UnmarshalJSON(bz, ptr) }, - func(bz []byte, ptr codec.ProtoMarshaler) { cdc.MustUnmarshalJSON(bz, ptr) }} + func(bz []byte, ptr codec.ProtoMarshaler) { cdc.MustUnmarshalJSON(bz, ptr) }, + } t.Run(tc.name+"_BinaryBare", func(t *testing.T) { testMarshalingTestCase(require.New(t), tc, m1) }) diff --git a/codec/proto_codec.go b/codec/proto_codec.go index faccd9528181..05bdf1b05210 100644 --- a/codec/proto_codec.go +++ b/codec/proto_codec.go @@ -29,8 +29,10 @@ type ProtoCodec struct { interfaceRegistry types.InterfaceRegistry } -var _ Codec = &ProtoCodec{} -var _ ProtoCodecMarshaler = &ProtoCodec{} +var ( + _ Codec = &ProtoCodec{} + _ ProtoCodecMarshaler = &ProtoCodec{} +) // NewProtoCodec returns a reference to a new ProtoCodec func NewProtoCodec(interfaceRegistry types.InterfaceRegistry) *ProtoCodec { diff --git a/codec/proto_codec_test.go b/codec/proto_codec_test.go index 40d810deefc1..6e83501cf501 100644 --- a/codec/proto_codec_test.go +++ b/codec/proto_codec_test.go @@ -99,8 +99,8 @@ func mustAny(msg proto.Message) *types.Any { } func BenchmarkProtoCodecMarshalLengthPrefixed(b *testing.B) { - var pCdc = codec.NewProtoCodec(types.NewInterfaceRegistry()) - var msg = &testdata.HasAnimal{ + pCdc := codec.NewProtoCodec(types.NewInterfaceRegistry()) + msg := &testdata.HasAnimal{ X: 1000, Animal: mustAny(&testdata.HasAnimal{ X: 2000, diff --git a/codec/types/any_internal_test.go b/codec/types/any_internal_test.go index b3e847965d59..f03e8247f67a 100644 --- a/codec/types/any_internal_test.go +++ b/codec/types/any_internal_test.go @@ -23,8 +23,10 @@ type Animal interface { Greet() string } -var _ Animal = (*Dog)(nil) -var _ proto.Message = (*Dog)(nil) +var ( + _ Animal = (*Dog)(nil) + _ proto.Message = (*Dog)(nil) +) func TestAnyPackUnpack(t *testing.T) { registry := NewInterfaceRegistry() diff --git a/codec/types/any_test.go b/codec/types/any_test.go index b9ddbe72ec39..59eaef9c160a 100644 --- a/codec/types/any_test.go +++ b/codec/types/any_test.go @@ -28,6 +28,15 @@ var eom = &errOnMarshal{} // Ensure that returning an error doesn't suddenly allocate and waste bytes. // See https://github.com/cosmos/cosmos-sdk/issues/8537 func TestNewAnyWithCustomTypeURLWithErrorNoAllocation(t *testing.T) { + // This tests continues to fail inconsistently. + // + // Example: https://github.com/cosmos/cosmos-sdk/pull/9246/checks?check_run_id=2643313958#step:6:118 + // Ref: https://github.com/cosmos/cosmos-sdk/issues/9010 + t.SkipNow() + + // make sure we're not in the middle of a GC. + runtime.GC() + var ms1, ms2 runtime.MemStats runtime.ReadMemStats(&ms1) any, err := types.NewAnyWithValue(eom) diff --git a/codec/unknownproto/benchmarks_test.go b/codec/unknownproto/benchmarks_test.go index 373dda7acfd5..c38f5c47a2b8 100644 --- a/codec/unknownproto/benchmarks_test.go +++ b/codec/unknownproto/benchmarks_test.go @@ -45,6 +45,7 @@ func init() { func BenchmarkRejectUnknownFields_serial(b *testing.B) { benchmarkRejectUnknownFields(b, false) } + func BenchmarkRejectUnknownFields_parallel(b *testing.B) { benchmarkRejectUnknownFields(b, true) } @@ -82,9 +83,11 @@ func benchmarkRejectUnknownFields(b *testing.B, parallel bool) { func BenchmarkProtoUnmarshal_serial(b *testing.B) { benchmarkProtoUnmarshal(b, false) } + func BenchmarkProtoUnmarshal_parallel(b *testing.B) { benchmarkProtoUnmarshal(b, true) } + func benchmarkProtoUnmarshal(b *testing.B, parallel bool) { b.ReportAllocs() diff --git a/codec/unknownproto/unknown_fields.go b/codec/unknownproto/unknown_fields.go index 36b745e1e04b..3af40ffed15b 100644 --- a/codec/unknownproto/unknown_fields.go +++ b/codec/unknownproto/unknown_fields.go @@ -162,8 +162,10 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals return hasUnknownNonCriticals, nil } -var protoMessageForTypeNameMu sync.RWMutex -var protoMessageForTypeNameCache = make(map[string]proto.Message) +var ( + protoMessageForTypeNameMu sync.RWMutex + protoMessageForTypeNameCache = make(map[string]proto.Message) +) // protoMessageForTypeName takes in a fully qualified name e.g. testdata.TestVersionFD1 // and returns a corresponding empty protobuf message that serves the prototype for typechecking. @@ -382,8 +384,10 @@ type descriptorMatch struct { desc *descriptor.DescriptorProto } -var descprotoCacheMu sync.RWMutex -var descprotoCache = make(map[reflect.Type]*descriptorMatch) +var ( + descprotoCacheMu sync.RWMutex + descprotoCache = make(map[reflect.Type]*descriptorMatch) +) // getDescriptorInfo retrieves the mapping of field numbers to their respective field descriptors. func getDescriptorInfo(desc descriptorIface, msg proto.Message) (map[int32]*descriptor.FieldDescriptorProto, *descriptor.DescriptorProto, error) { diff --git a/container/Makefile b/container/Makefile new file mode 100644 index 000000000000..8ac9e88558aa --- /dev/null +++ b/container/Makefile @@ -0,0 +1,4 @@ +update-testdata-examples: + go test . -test.update-golden + dot -Tsvg testdata/example.dot > testdata/example.svg + dot -Tsvg testdata/example_error.dot > testdata/example_error.svg diff --git a/container/README.md b/container/README.md new file mode 100644 index 000000000000..7534573a655f --- /dev/null +++ b/container/README.md @@ -0,0 +1,34 @@ +# Cosmos SDK Dependency Injection `container` Module + +## Overview + +TODO + +## Usage + +TODO + +## Debugging + +Issues with resolving dependencies in the container can be done with logs +and [Graphviz](https://graphviz.org) renderings of the container tree. By default, whenever there is an error, logs will +be printed to stderr and a rendering of the dependency graph in Graphviz DOT format will be saved to +`debug_container.dot`. + +Here is an example Graphviz rendering of a successful build of a dependency graph: +![Graphviz Example](./testdata/example.svg) + +Rectangles represent functions, ovals represent types, rounded rectangles represent modules and the single hexagon +represents the function which called `Build`. Black-colored shapes mark functions and types that were called/resolved +without an error. Gray-colored nodes mark functions and types that could have been called/resolved in the container but +were left unused. + +Here is an example Graphviz rendering of a dependency graph build which failed: +![Graphviz Error Example](./testdata/example_error.svg) + +Graphviz DOT files can be converted into SVG's for viewing in a web browser using the `dot` command-line tool, ex: +``` +> dot -Tsvg debug_container.dot > debug_container.svg +``` + +Many other tools including some IDEs support working with DOT files. \ No newline at end of file diff --git a/container/build.go b/container/build.go new file mode 100644 index 000000000000..f40864ee211a --- /dev/null +++ b/container/build.go @@ -0,0 +1,83 @@ +package container + +// Build builds the container specified by containerOption and extracts the +// requested outputs from the container or returns an error. It is the single +// entry point for building and running a dependency injection container. +// Each of the values specified as outputs must be pointers to types that +// can be provided by the container. +// +// Ex: +// var x int +// Build(Provide(func() int { return 1 }), &x) +// +// Build uses the debug mode provided by AutoDebug which means there will be +// verbose debugging information if there is an error and nothing upon success. +// Use BuildDebug to configure debug behavior. +func Build(containerOption Option, outputs ...interface{}) error { + loc := LocationFromCaller(1) + return build(loc, AutoDebug(), containerOption, outputs...) +} + +// BuildDebug is a version of Build which takes an optional DebugOption for +// logging and visualization. +func BuildDebug(debugOpt DebugOption, option Option, outputs ...interface{}) error { + loc := LocationFromCaller(1) + return build(loc, debugOpt, option, outputs...) +} + +func build(loc Location, debugOpt DebugOption, option Option, outputs ...interface{}) error { + cfg, err := newDebugConfig() + if err != nil { + return err + } + + // debug cleanup + defer func() { + for _, f := range cfg.cleanup { + f() + } + }() + + err = doBuild(cfg, loc, debugOpt, option, outputs...) + if err != nil { + cfg.logf("Error: %v", err) + if cfg.onError != nil { + err2 := cfg.onError.applyConfig(cfg) + if err2 != nil { + return err2 + } + } + return err + } else { + if cfg.onSuccess != nil { + err2 := cfg.onSuccess.applyConfig(cfg) + if err2 != nil { + return err2 + } + } + return nil + } +} + +func doBuild(cfg *debugConfig, loc Location, debugOpt DebugOption, option Option, outputs ...interface{}) error { + defer cfg.generateGraph() // always generate graph on exit + + if debugOpt != nil { + err := debugOpt.applyConfig(cfg) + if err != nil { + return err + } + } + + cfg.logf("Registering providers") + cfg.indentLogger() + ctr := newContainer(cfg) + err := option.apply(ctr) + if err != nil { + cfg.logf("Failed registering providers because of: %+v", err) + return err + } + cfg.dedentLogger() + + return ctr.build(loc, outputs...) +} diff --git a/container/container.go b/container/container.go index 700b6b88ceb8..484419757f9d 100644 --- a/container/container.go +++ b/container/container.go @@ -5,8 +5,9 @@ import ( "fmt" "reflect" - "github.com/goccy/go-graphviz/cgraph" "github.com/pkg/errors" + + "github.com/cosmos/cosmos-sdk/container/internal/graphviz" ) type container struct { @@ -38,10 +39,8 @@ func newContainer(cfg *debugConfig) *container { func (c *container) call(provider *ProviderDescriptor, moduleKey *moduleKey) ([]reflect.Value, error) { loc := provider.Location - graphNode, err := c.locationGraphNode(loc, moduleKey) - if err != nil { - return nil, err - } + graphNode := c.locationGraphNode(loc, moduleKey) + markGraphNodeAsFailed(graphNode) if c.callerMap[loc] { @@ -83,22 +82,18 @@ func (c *container) getResolver(typ reflect.Type) (resolver, error) { } elemType := typ - if isAutoGroupSliceType(elemType) || isOnePerModuleMapType(elemType) { + if isManyPerContainerSliceType(elemType) || isOnePerModuleMapType(elemType) { elemType = elemType.Elem() } - var typeGraphNode *cgraph.Node - var err error + var typeGraphNode *graphviz.Node - if isAutoGroupType(elemType) { - c.logf("Registering resolver for auto-group type %v", elemType) + if isManyPerContainerType(elemType) { + c.logf("Registering resolver for many-per-container type %v", elemType) sliceType := reflect.SliceOf(elemType) - typeGraphNode, err = c.typeGraphNode(sliceType) - if err != nil { - return nil, err - } - typeGraphNode.SetComment("auto-group") + typeGraphNode = c.typeGraphNode(sliceType) + typeGraphNode.SetComment("many-per-container") r := &groupResolver{ typ: elemType, @@ -112,10 +107,7 @@ func (c *container) getResolver(typ reflect.Type) (resolver, error) { c.logf("Registering resolver for one-per-module type %v", elemType) mapType := reflect.MapOf(stringType, elemType) - typeGraphNode, err = c.typeGraphNode(mapType) - if err != nil { - return nil, err - } + typeGraphNode = c.typeGraphNode(mapType) typeGraphNode.SetComment("one-per-module") r := &onePerModuleResolver{ @@ -133,21 +125,24 @@ func (c *container) getResolver(typ reflect.Type) (resolver, error) { return c.resolvers[typ], nil } -func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (interface{}, error) { - providerGraphNode, err := c.locationGraphNode(provider.Location, key) - if err != nil { - return nil, err - } +var stringType = reflect.TypeOf("") +func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (interface{}, error) { + providerGraphNode := c.locationGraphNode(provider.Location, key) hasModuleKeyParam := false + hasOwnModuleKeyParam := false for _, in := range provider.Inputs { typ := in.Type if typ == moduleKeyType { hasModuleKeyParam = true } - if isAutoGroupType(typ) { - return nil, fmt.Errorf("auto-group type %v can't be used as an input parameter", typ) + if typ == ownModuleKeyType { + hasOwnModuleKeyParam = true + } + + if isManyPerContainerType(typ) { + return nil, fmt.Errorf("many-per-container type %v can't be used as an input parameter", typ) } else if isOnePerModuleType(typ) { return nil, fmt.Errorf("one-per-module type %v can't be used as an input parameter", typ) } @@ -157,11 +152,11 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter return nil, err } - var typeGraphNode *cgraph.Node + var typeGraphNode *graphviz.Node if vr != nil { typeGraphNode = vr.typeGraphNode() } else { - typeGraphNode, err = c.typeGraphNode(typ) + typeGraphNode = c.typeGraphNode(typ) if err != nil { return nil, err } @@ -170,7 +165,7 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter c.addGraphEdge(typeGraphNode, providerGraphNode) } - if key != nil || !hasModuleKeyParam { + if !hasModuleKeyParam { c.logf("Registering %s", provider.Location.String()) c.indentLogger() defer c.dedentLogger() @@ -189,8 +184,8 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter typ, typ.Elem()) } - // auto-group slices of auto-group types - if isAutoGroupSliceType(typ) { + // many-per-container slices of many-per-container types + if isManyPerContainerSliceType(typ) { typ = typ.Elem() } @@ -208,15 +203,12 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter } else { c.logf("Registering resolver for simple type %v", typ) - typeGraphNode, err := c.typeGraphNode(typ) - if err != nil { - return nil, err - } - + typeGraphNode := c.typeGraphNode(typ) vr = &simpleResolver{ - node: sp, - typ: typ, - graphNode: typeGraphNode, + node: sp, + typ: typ, + graphNode: typeGraphNode, + idxInValues: i, } c.resolvers[typ] = vr } @@ -226,6 +218,11 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter return sp, nil } else { + if hasOwnModuleKeyParam { + return nil, errors.Errorf("%T and %T must not be declared as dependencies on the same provided", + ModuleKey{}, OwnModuleKey{}) + } + c.logf("Registering module-scoped provider: %s", provider.Location.String()) c.indentLogger() defer c.dedentLogger() @@ -247,11 +244,7 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter typ, provider.Location, existing.describeLocation()) } - typeGraphNode, err := c.typeGraphNode(typ) - if err != nil { - return reflect.Value{}, err - } - + typeGraphNode := c.typeGraphNode(typ) c.resolvers[typ] = &moduleDepResolver{ typ: typ, idxInValues: i, @@ -269,17 +262,9 @@ func (c *container) addNode(provider *ProviderDescriptor, key *moduleKey) (inter func (c *container) supply(value reflect.Value, location Location) error { typ := value.Type() - locGrapNode, err := c.locationGraphNode(location, nil) - if err != nil { - return err - } + locGrapNode := c.locationGraphNode(location, nil) markGraphNodeAsUsed(locGrapNode) - - typeGraphNode, err := c.typeGraphNode(typ) - if err != nil { - return err - } - + typeGraphNode := c.typeGraphNode(typ) c.addGraphEdge(locGrapNode, typeGraphNode) if existing, ok := c.resolvers[typ]; ok { @@ -299,10 +284,7 @@ func (c *container) supply(value reflect.Value, location Location) error { func (c *container) resolve(in ProviderInput, moduleKey *moduleKey, caller Location) (reflect.Value, error) { c.resolveStack = append(c.resolveStack, resolveFrame{loc: caller, typ: in.Type}) - typeGraphNode, err := c.typeGraphNode(in.Type) - if err != nil { - return reflect.Value{}, err - } + typeGraphNode := c.typeGraphNode(in.Type) if in.Type == moduleKeyType { if moduleKey == nil { @@ -313,6 +295,15 @@ func (c *container) resolve(in ProviderInput, moduleKey *moduleKey, caller Locat return reflect.ValueOf(ModuleKey{moduleKey}), nil } + if in.Type == ownModuleKeyType { + if moduleKey == nil { + return reflect.Value{}, errors.Errorf("trying to resolve %T for %s but not inside of any module's scope", moduleKey, caller) + } + c.logf("Providing OwnModuleKey %s", moduleKey.name) + markGraphNodeAsUsed(typeGraphNode) + return reflect.ValueOf(OwnModuleKey{moduleKey}), nil + } + vr, err := c.getResolver(in.Type) if err != nil { return reflect.Value{}, err @@ -342,20 +333,46 @@ func (c *container) resolve(in ProviderInput, moduleKey *moduleKey, caller Locat return res, nil } -func (c *container) run(invoker interface{}) error { - rctr, err := ExtractProviderDescriptor(invoker) - if err != nil { - return err +func (c *container) build(loc Location, outputs ...interface{}) error { + var providerIn []ProviderInput + for _, output := range outputs { + typ := reflect.TypeOf(output) + if typ.Kind() != reflect.Pointer { + return fmt.Errorf("output type must be a pointer, %s is invalid", typ) + } + + providerIn = append(providerIn, ProviderInput{Type: typ.Elem()}) } - if len(rctr.Outputs) > 0 { - return errors.Errorf("invoker function cannot have return values other than error: %s", rctr.Location) + desc := ProviderDescriptor{ + Inputs: providerIn, + Outputs: nil, + Fn: func(values []reflect.Value) ([]reflect.Value, error) { + if len(values) != len(outputs) { + return nil, fmt.Errorf("internal error, unexpected number of values") + } + + for i, output := range outputs { + val := reflect.ValueOf(output) + val.Elem().Set(values[i]) + } + + return nil, nil + }, + Location: loc, + } + callerGraphNode := c.locationGraphNode(loc, nil) + callerGraphNode.SetShape("hexagon") + + desc, err := expandStructArgsProvider(desc) + if err != nil { + return err } - c.logf("Registering invoker") + c.logf("Registering outputs") c.indentLogger() - node, err := c.addNode(&rctr, nil) + node, err := c.addNode(&desc, nil) if err != nil { return err } @@ -397,10 +414,13 @@ func (c container) formatResolveStack() string { return buf.String() } -func markGraphNodeAsUsed(node *cgraph.Node) { +func markGraphNodeAsUsed(node *graphviz.Node) { node.SetColor("black") + node.SetPenWidth("1.5") + node.SetFontColor("black") } -func markGraphNodeAsFailed(node *cgraph.Node) { +func markGraphNodeAsFailed(node *graphviz.Node) { node.SetColor("red") + node.SetFontColor("red") } diff --git a/container/container_test.go b/container/container_test.go index 15d8d1a3b6d9..8ead6b1caea6 100644 --- a/container/container_test.go +++ b/container/container_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "gotest.tools/v3/golden" "github.com/cosmos/cosmos-sdk/container" ) @@ -15,14 +16,13 @@ type KVStoreKey struct { name string } -type ModuleKey string - type MsgClientA struct { - key ModuleKey + key string } type KeeperA struct { - key KVStoreKey + key KVStoreKey + name string } type KeeperB struct { @@ -40,24 +40,20 @@ type Command struct { Run func() } -func (Command) IsAutoGroupType() {} +func (Command) IsManyPerContainerType() {} func ProvideKVStoreKey(moduleKey container.ModuleKey) KVStoreKey { return KVStoreKey{name: moduleKey.Name()} } -func ProvideModuleKey(moduleKey container.ModuleKey) (ModuleKey, error) { - return ModuleKey(moduleKey.Name()), nil -} - -func ProvideMsgClientA(_ container.ModuleKey, key ModuleKey) MsgClientA { - return MsgClientA{key} +func ProvideMsgClientA(key container.ModuleKey) MsgClientA { + return MsgClientA{key.Name()} } type ModuleA struct{} -func (ModuleA) Provide(key KVStoreKey) (KeeperA, Handler, Command) { - return KeeperA{key}, Handler{}, Command{} +func (ModuleA) Provide(key KVStoreKey, moduleKey container.OwnModuleKey) (KeeperA, Handler, Command) { + return KeeperA{key: key, name: container.ModuleKey(moduleKey).Name()}, Handler{}, Command{} } type ModuleB struct{} @@ -76,7 +72,7 @@ type BProvides struct { Commands []Command } -func (ModuleB) Provide(dependencies BDependencies, _ container.ModuleKey) (BProvides, Handler, error) { +func (ModuleB) Provide(dependencies BDependencies) (BProvides, Handler, error) { return BProvides{ KeeperB: KeeperB{ key: dependencies.Key, @@ -86,32 +82,43 @@ func (ModuleB) Provide(dependencies BDependencies, _ container.ModuleKey) (BProv }, Handler{}, nil } +var scenarioConfig = container.Options( + container.Provide(ProvideMsgClientA), + container.ProvideInModule("runtime", ProvideKVStoreKey), + container.ProvideInModule("a", wrapMethod0(ModuleA{})), + container.ProvideInModule("b", wrapMethod0(ModuleB{})), +) + func TestScenario(t *testing.T) { + var ( + handlers map[string]Handler + commands []Command + a KeeperA + b KeeperB + ) require.NoError(t, - container.Run( - func(handlers map[string]Handler, commands []Command, a KeeperA, b KeeperB) { - require.Len(t, handlers, 2) - require.Equal(t, Handler{}, handlers["a"]) - require.Equal(t, Handler{}, handlers["b"]) - require.Len(t, commands, 3) - require.Equal(t, KeeperA{ - key: KVStoreKey{name: "a"}, - }, a) - require.Equal(t, KeeperB{ - key: KVStoreKey{name: "b"}, - msgClientA: MsgClientA{ - key: "b", - }, - }, b) - }, - container.Provide( - ProvideKVStoreKey, - ProvideModuleKey, - ProvideMsgClientA, - ), - container.ProvideInModule("a", wrapMethod0(ModuleA{})), - container.ProvideInModule("b", wrapMethod0(ModuleB{})), + container.Build( + scenarioConfig, + &handlers, + &commands, + &a, + &b, )) + + require.Len(t, handlers, 2) + require.Equal(t, Handler{}, handlers["a"]) + require.Equal(t, Handler{}, handlers["b"]) + require.Len(t, commands, 3) + require.Equal(t, KeeperA{ + key: KVStoreKey{name: "a"}, + name: "a", + }, a) + require.Equal(t, KeeperB{ + key: KVStoreKey{name: "b"}, + msgClientA: MsgClientA{ + key: "b", + }, + }, b) } func wrapMethod0(module interface{}) interface{} { @@ -130,28 +137,30 @@ func wrapMethod0(module interface{}) interface{} { } func TestResolveError(t *testing.T) { - require.Error(t, container.Run( - func(x string) {}, + var x string + require.Error(t, container.Build( container.Provide( func(x float64) string { return fmt.Sprintf("%f", x) }, func(x int) float64 { return float64(x) }, func(x float32) int { return int(x) }, ), + &x, )) } func TestCyclic(t *testing.T) { - require.Error(t, container.Run( - func(x string) {}, + var x string + require.Error(t, container.Build( container.Provide( func(x int) float64 { return float64(x) }, func(x float64) (int, string) { return int(x), "hi" }, ), + &x, )) } func TestErrorOption(t *testing.T) { - err := container.Run(func() {}, container.Error(fmt.Errorf("an error"))) + err := container.Build(container.Error(fmt.Errorf("an error"))) require.Error(t, err) } @@ -160,11 +169,8 @@ func TestBadCtr(t *testing.T) { require.Error(t, err) } -func TestInvoker(t *testing.T) { - require.NoError(t, container.Run(func() {})) - require.NoError(t, container.Run(func() error { return nil })) - require.Error(t, container.Run(func() error { return fmt.Errorf("error") })) - require.Error(t, container.Run(func() int { return 0 })) +func TestTrivial(t *testing.T) { + require.NoError(t, container.Build(container.Options())) } func TestErrorFunc(t *testing.T) { @@ -178,119 +184,136 @@ func TestErrorFunc(t *testing.T) { ) require.NoError(t, err) + var x int require.Error(t, - container.Run( - func(x int) { - }, + container.Build( container.Provide(func() (int, error) { return 0, fmt.Errorf("the error") }), + &x, )) - - require.Error(t, - container.Run(func() error { - return fmt.Errorf("the error") - }), "the error") } func TestSimple(t *testing.T) { + var x int require.NoError(t, - container.Run( - func(x int) { - require.Equal(t, 1, x) - }, + container.Build( container.Provide( func() int { return 1 }, ), + &x, ), ) require.Error(t, - container.Run(func(int) {}, + container.Build( container.Provide( func() int { return 0 }, func() int { return 1 }, ), + &x, ), ) } func TestModuleScoped(t *testing.T) { + var x int require.Error(t, - container.Run(func(int) {}, + container.Build( container.Provide( func(container.ModuleKey) int { return 0 }, ), + &x, ), ) + var y float64 require.Error(t, - container.Run(func(float64) {}, - container.Provide( - func(container.ModuleKey) int { return 0 }, - func() int { return 1 }, - ), - container.ProvideInModule("a", - func(x int) float64 { return float64(x) }, + container.Build( + container.Options( + container.Provide( + func(container.ModuleKey) int { return 0 }, + func() int { return 1 }, + ), + container.ProvideInModule("a", + func(x int) float64 { return float64(x) }, + ), ), + &y, ), ) require.Error(t, - container.Run(func(float64) {}, - container.Provide( - func() int { return 0 }, - func(container.ModuleKey) int { return 1 }, - ), - container.ProvideInModule("a", - func(x int) float64 { return float64(x) }, + container.Build( + container.Options( + container.Provide( + func() int { return 0 }, + func(container.ModuleKey) int { return 1 }, + ), + container.ProvideInModule("a", + func(x int) float64 { return float64(x) }, + ), ), + &y, ), ) require.Error(t, - container.Run(func(float64) {}, - container.Provide( - func(container.ModuleKey) int { return 0 }, - func(container.ModuleKey) int { return 1 }, - ), - container.ProvideInModule("a", - func(x int) float64 { return float64(x) }, + container.Build( + container.Options( + container.Provide( + func(container.ModuleKey) int { return 0 }, + func(container.ModuleKey) int { return 1 }, + ), + container.ProvideInModule("a", + func(x int) float64 { return float64(x) }, + ), ), + &y, ), ) require.NoError(t, - container.Run(func(float64) {}, - container.Provide( - func(container.ModuleKey) int { return 0 }, - ), - container.ProvideInModule("a", - func(x int) float64 { return float64(x) }, + container.Build( + container.Options( + container.Provide( + func(container.ModuleKey) int { return 0 }, + ), + container.ProvideInModule("a", + func(x int) float64 { return float64(x) }, + ), ), + &y, ), ) require.Error(t, - container.Run(func(float64) {}, - container.Provide( - func(container.ModuleKey) int { return 0 }, - ), - container.ProvideInModule("", - func(x int) float64 { return float64(x) }, + container.Build( + container.Options( + container.Provide( + func(container.ModuleKey) int { return 0 }, + ), + container.ProvideInModule("", + func(x int) float64 { return float64(x) }, + ), ), + &y, ), ) + var z float32 require.NoError(t, - container.Run(func(float64, float32) {}, - container.Provide( - func(container.ModuleKey) int { return 0 }, - ), - container.ProvideInModule("a", - func(x int) float64 { return float64(x) }, - func(x int) float32 { return float32(x) }, + container.Build( + container.Options( + container.Provide( + func(container.ModuleKey) int { return 0 }, + ), + container.ProvideInModule("a", + func(x int) float64 { return float64(x) }, + func(x int) float32 { return float32(x) }, + ), ), + &y, &z, ), "use module dep twice", ) @@ -301,94 +324,96 @@ type OnePerModuleInt int func (OnePerModuleInt) IsOnePerModuleType() {} func TestOnePerModule(t *testing.T) { + var x OnePerModuleInt require.Error(t, - container.Run( - func(OnePerModuleInt) {}, - ), + container.Build(container.Options(), &x), "bad input type", ) + var y map[string]OnePerModuleInt + var z string require.NoError(t, - container.Run( - func(x map[string]OnePerModuleInt, y string) { - require.Equal(t, map[string]OnePerModuleInt{ - "a": 3, - "b": 4, - }, x) - require.Equal(t, "7", y) - }, - container.ProvideInModule("a", - func() OnePerModuleInt { return 3 }, - ), - container.ProvideInModule("b", - func() OnePerModuleInt { return 4 }, + container.Build( + container.Options( + container.ProvideInModule("a", + func() OnePerModuleInt { return 3 }, + ), + container.ProvideInModule("b", + func() OnePerModuleInt { return 4 }, + ), + container.Provide(func(x map[string]OnePerModuleInt) string { + sum := 0 + for _, v := range x { + sum += int(v) + } + return fmt.Sprintf("%d", sum) + }), ), - container.Provide(func(x map[string]OnePerModuleInt) string { - sum := 0 - for _, v := range x { - sum += int(v) - } - return fmt.Sprintf("%d", sum) - }), + &y, + &z, ), ) + require.Equal(t, map[string]OnePerModuleInt{ + "a": 3, + "b": 4, + }, y) + require.Equal(t, "7", z) + + var m map[string]OnePerModuleInt require.Error(t, - container.Run( - func(map[string]OnePerModuleInt) {}, + container.Build( container.ProvideInModule("a", func() OnePerModuleInt { return 0 }, func() OnePerModuleInt { return 0 }, ), + &m, ), "duplicate", ) require.Error(t, - container.Run( - func(map[string]OnePerModuleInt) {}, + container.Build( container.Provide( func() OnePerModuleInt { return 0 }, ), + &m, ), "out of scope", ) require.Error(t, - container.Run( - func(map[string]OnePerModuleInt) {}, + container.Build( container.Provide( func() map[string]OnePerModuleInt { return nil }, ), + &m, ), "bad return type", ) require.NoError(t, - container.Run( - func(map[string]OnePerModuleInt) {}, + container.Build( + container.Options(), + &m, ), "no providers", ) } -type AutoGroupInt int +type ManyPerContainerInt int -func (AutoGroupInt) IsAutoGroupType() {} +func (ManyPerContainerInt) IsManyPerContainerType() {} -func TestAutoGroup(t *testing.T) { +func TestManyPerContainer(t *testing.T) { + var xs []ManyPerContainerInt + var sum string require.NoError(t, - container.Run( - func(xs []AutoGroupInt, sum string) { - require.Len(t, xs, 2) - require.Contains(t, xs, AutoGroupInt(4)) - require.Contains(t, xs, AutoGroupInt(9)) - require.Equal(t, "13", sum) - }, + container.Build( container.Provide( - func() AutoGroupInt { return 4 }, - func() AutoGroupInt { return 9 }, - func(xs []AutoGroupInt) string { + func() ManyPerContainerInt { return 4 }, + func() ManyPerContainerInt { return 9 }, + func(xs []ManyPerContainerInt) string { sum := 0 for _, x := range xs { sum += int(x) @@ -396,55 +421,71 @@ func TestAutoGroup(t *testing.T) { return fmt.Sprintf("%d", sum) }, ), + &xs, + &sum, ), ) + require.Len(t, xs, 2) + require.Contains(t, xs, ManyPerContainerInt(4)) + require.Contains(t, xs, ManyPerContainerInt(9)) + require.Equal(t, "13", sum) + var z ManyPerContainerInt require.Error(t, - container.Run( - func(AutoGroupInt) {}, + container.Build( container.Provide( - func() AutoGroupInt { return 0 }, + func() ManyPerContainerInt { return 0 }, ), + &z, ), "bad input type", ) require.NoError(t, - container.Run( - func([]AutoGroupInt) {}, + container.Build( + container.Options(), + &xs, ), "no providers", ) } func TestSupply(t *testing.T) { + var x int require.NoError(t, - container.Run(func(x int) { - require.Equal(t, 3, x) - }, + container.Build( container.Supply(3), + &x, ), ) + require.Equal(t, 3, x) require.Error(t, - container.Run(func(x int) {}, - container.Supply(3), - container.Provide(func() int { return 4 }), + container.Build( + container.Options( + container.Supply(3), + container.Provide(func() int { return 4 }), + ), + &x, ), "can't supply then provide", ) require.Error(t, - container.Run(func(x int) {}, - container.Supply(3), - container.Provide(func() int { return 4 }), + container.Build( + container.Options( + container.Supply(3), + container.Provide(func() int { return 4 }), + ), + &x, ), "can't provide then supply", ) require.Error(t, - container.Run(func(x int) {}, + container.Build( container.Supply(3, 4), + &x, ), "can't supply twice", ) @@ -461,47 +502,47 @@ type TestOutput struct { container.Out X string + Y int64 } func TestStructArgs(t *testing.T) { - require.Error(t, container.Run( - func(input TestInput) {}, - )) + var input TestInput + require.Error(t, container.Build(container.Options(), &input)) - require.NoError(t, container.Run( - func(input TestInput) { - require.Equal(t, 0, input.X) - require.Equal(t, 1.3, input.Y) - }, + require.NoError(t, container.Build( container.Supply(1.3), + &input, )) + require.Equal(t, 0, input.X) + require.Equal(t, 1.3, input.Y) - require.NoError(t, container.Run( - func(input TestInput) { - require.Equal(t, 1, input.X) - require.Equal(t, 1.3, input.Y) - }, + require.NoError(t, container.Build( container.Supply(1.3, 1), + &input, )) + require.Equal(t, 1, input.X) + require.Equal(t, 1.3, input.Y) - require.NoError(t, container.Run( - func(x string) { - require.Equal(t, "A", x) - }, + var x string + var y int64 + require.NoError(t, container.Build( container.Provide(func() (TestOutput, error) { - return TestOutput{X: "A"}, nil + return TestOutput{X: "A", Y: -10}, nil }), + &x, &y, )) + require.Equal(t, "A", x) + require.Equal(t, int64(-10), y) - require.Error(t, container.Run( - func(x string) {}, + require.Error(t, container.Build( container.Provide(func() (TestOutput, error) { return TestOutput{}, fmt.Errorf("error") }), + &x, )) } -func TestLogging(t *testing.T) { +func TestDebugOptions(t *testing.T) { var logOut string var dotGraph string @@ -516,8 +557,7 @@ func TestLogging(t *testing.T) { require.NoError(t, err) defer os.Remove(graphfile.Name()) - require.NoError(t, container.RunDebug( - func() {}, + require.NoError(t, container.BuildDebug( container.DebugOptions( container.Logger(func(s string) { logOut += s @@ -526,9 +566,10 @@ func TestLogging(t *testing.T) { dotGraph = g }), container.LogVisualizer(), - container.FileVisualizer(graphfile.Name(), "svg"), + container.FileVisualizer(graphfile.Name()), container.StdoutLogger(), ), + container.Options(), )) require.Contains(t, logOut, "digraph") @@ -540,5 +581,56 @@ func TestLogging(t *testing.T) { graphfileContents, err := os.ReadFile(graphfile.Name()) require.NoError(t, err) - require.Contains(t, string(graphfileContents), " %q%s;\n", indent, e.from.name, e.to.name, e.Attributes.String()) + return err +} diff --git a/container/internal/graphviz/graph.go b/container/internal/graphviz/graph.go new file mode 100644 index 000000000000..d2ae90545f48 --- /dev/null +++ b/container/internal/graphviz/graph.go @@ -0,0 +1,156 @@ +// Package graphviz +package graphviz + +import ( + "bytes" + "fmt" + "io" + + "github.com/cosmos/cosmos-sdk/container/internal/util" +) + +// Graph represents a graphviz digraph. +type Graph struct { + *Attributes + + // name is the optional name of this graph + name string + + // parent is non-nil if this is a sub-graph + parent *Graph + + // allNodes includes all nodes in the graph and its sub-graphs. + // It is set to the same map in parent and sub-graphs. + allNodes map[string]*Node + + // myNodes are the nodes in this graph (whether it's a root or sub-graph) + myNodes map[string]*Node + + subgraphs map[string]*Graph + + edges []*Edge +} + +// NewGraph creates a new Graph instance. +func NewGraph() *Graph { + return &Graph{ + Attributes: NewAttributes(), + name: "", + parent: nil, + allNodes: map[string]*Node{}, + myNodes: map[string]*Node{}, + subgraphs: map[string]*Graph{}, + edges: nil, + } +} + +// FindOrCreateNode finds or creates the node with the provided name. +func (g *Graph) FindOrCreateNode(name string) (node *Node, found bool) { + if node, ok := g.allNodes[name]; ok { + return node, true + } + + node = &Node{ + Attributes: NewAttributes(), + name: name, + } + g.allNodes[name] = node + g.myNodes[name] = node + return node, false +} + +// FindOrCreateSubGraph finds or creates the subgraph with the provided name. +func (g *Graph) FindOrCreateSubGraph(name string) (graph *Graph, found bool) { + if sub, ok := g.subgraphs[name]; ok { + return sub, true + } + + n := &Graph{ + Attributes: NewAttributes(), + name: name, + parent: g, + allNodes: g.allNodes, + myNodes: map[string]*Node{}, + subgraphs: map[string]*Graph{}, + edges: nil, + } + g.subgraphs[name] = n + return n, false +} + +// CreateEdge creates a new graphviz edge. +func (g *Graph) CreateEdge(from, to *Node) *Edge { + edge := &Edge{ + Attributes: NewAttributes(), + from: from, + to: to, + } + g.edges = append(g.edges, edge) + return edge +} + +// RenderDOT renders the graph to DOT format. +func (g *Graph) RenderDOT(w io.Writer) error { + return g.render(w, "") +} + +func (g *Graph) render(w io.Writer, indent string) error { + if g.parent == nil { + _, err := fmt.Fprintf(w, "%sdigraph %q {\n", indent, g.name) + if err != nil { + return err + } + } else { + _, err := fmt.Fprintf(w, "%ssubgraph %q {\n", indent, g.name) + if err != nil { + return err + } + } + + { + subIndent := indent + " " + + if attrStr := g.Attributes.String(); attrStr != "" { + _, err := fmt.Fprintf(w, "%sgraph %s;\n", subIndent, attrStr) + if err != nil { + return err + } + } + + // we do map iteration in sorted order so that outputs are stable and + // can be used in tests + err := util.IterateMapOrdered(g.subgraphs, func(_ string, subgraph *Graph) error { + return subgraph.render(w, subIndent+" ") + }) + if err != nil { + return err + } + + err = util.IterateMapOrdered(g.myNodes, func(_ string, node *Node) error { + return node.render(w, subIndent) + }) + if err != nil { + return err + } + + for _, edge := range g.edges { + err := edge.render(w, subIndent) + if err != nil { + return err + } + } + } + + _, err := fmt.Fprintf(w, "%s}\n\n", indent) + return err +} + +// String returns the graph in DOT format. +func (g *Graph) String() string { + buf := &bytes.Buffer{} + err := g.RenderDOT(buf) + if err != nil { + panic(err) + } + return buf.String() +} diff --git a/container/internal/graphviz/node.go b/container/internal/graphviz/node.go new file mode 100644 index 000000000000..d464aad869f8 --- /dev/null +++ b/container/internal/graphviz/node.go @@ -0,0 +1,17 @@ +package graphviz + +import ( + "fmt" + "io" +) + +// Node represents a graphviz node. +type Node struct { + *Attributes + name string +} + +func (n Node) render(w io.Writer, indent string) error { + _, err := fmt.Fprintf(w, "%s%q%s;\n", indent, n.name, n.Attributes.String()) + return err +} diff --git a/container/internal/util/util.go b/container/internal/util/util.go new file mode 100644 index 000000000000..3a9a95120da0 --- /dev/null +++ b/container/internal/util/util.go @@ -0,0 +1,26 @@ +package util + +import ( + "golang.org/x/exp/constraints" + "golang.org/x/exp/maps" + "golang.org/x/exp/slices" +) + +// IterateMapOrdered iterates over the map with keys sorted in ascending order +// calling forEach for each key-value pair as long as forEach does not return an error. +func IterateMapOrdered[K constraints.Ordered, V any](m map[K]V, forEach func(k K, v V) error) error { + keys := OrderedMapKeys(m) + for _, k := range keys { + if err := forEach(k, m[k]); err != nil { + return err + } + } + return nil +} + +// OrderedMapKeys returns the map keys in ascending order. +func OrderedMapKeys[K constraints.Ordered, V any](m map[K]V) []K { + keys := maps.Keys(m) + slices.Sort(keys) + return keys +} diff --git a/container/module_dep.go b/container/module_dep.go index 7aecc9c1d118..261d3afed79d 100644 --- a/container/module_dep.go +++ b/container/module_dep.go @@ -3,7 +3,7 @@ package container import ( "reflect" - "github.com/goccy/go-graphviz/cgraph" + "github.com/cosmos/cosmos-sdk/container/internal/graphviz" ) type moduleDepProvider struct { @@ -17,7 +17,7 @@ type moduleDepResolver struct { idxInValues int node *moduleDepProvider valueMap map[*moduleKey]reflect.Value - graphNode *cgraph.Node + graphNode *graphviz.Node } func (s moduleDepResolver) describeLocation() string { @@ -52,6 +52,6 @@ func (s moduleDepResolver) addNode(p *simpleProvider, _ int) error { return duplicateDefinitionError(s.typ, p.provider.Location, s.node.provider.Location.String()) } -func (s moduleDepResolver) typeGraphNode() *cgraph.Node { +func (s moduleDepResolver) typeGraphNode() *graphviz.Node { return s.graphNode } diff --git a/container/module_key.go b/container/module_key.go index 79777dc09357..1b57983bf7d7 100644 --- a/container/module_key.go +++ b/container/module_key.go @@ -6,14 +6,17 @@ import ( // ModuleKey is a special type used to scope a provider to a "module". // -// Special module-scoped providers can be used with Provide by declaring a -// provider with an input parameter of type ModuleKey. These providers -// may construct a unique value of a dependency for each module and will -// be called at most once per module. +// Special module-scoped providers can be used with Provide and ProvideInModule +// by declaring a provider with an input parameter of type ModuleKey. These +// providers may construct a unique value of a dependency for each module and +// will be called at most once per module. // -// Providers passed to ProvideInModule can also declare an input parameter -// of type ModuleKey to retrieve their module key but these providers will be -// called at most once. +// When being used with ProvideInModule, the provider will not receive its +// own ModuleKey but rather the key of the module requesting the dependency +// so that modules can provide module-scoped dependencies to other modules. +// +// In order for a module to retrieve their own module key they can define +// a provider which requires the OwnModuleKey type and DOES NOT require ModuleKey. type ModuleKey struct { *moduleKey } @@ -28,4 +31,8 @@ func (k ModuleKey) Name() string { var moduleKeyType = reflect.TypeOf(ModuleKey{}) -var stringType = reflect.TypeOf("") +// OwnModuleKey is a type which can be used in a module to retrieve its own +// ModuleKey. It MUST NOT be used together with a ModuleKey dependency. +type OwnModuleKey ModuleKey + +var ownModuleKeyType = reflect.TypeOf((*OwnModuleKey)(nil)).Elem() diff --git a/container/one_per_module.go b/container/one_per_module.go index e5cab4fb63f7..9c525eed6994 100644 --- a/container/one_per_module.go +++ b/container/one_per_module.go @@ -4,9 +4,9 @@ import ( "fmt" "reflect" - "github.com/goccy/go-graphviz/cgraph" - "github.com/pkg/errors" + + "github.com/cosmos/cosmos-sdk/container/internal/graphviz" ) // OnePerModuleType marks a type which @@ -34,7 +34,7 @@ type onePerModuleResolver struct { idxMap map[*moduleKey]int resolved bool values reflect.Value - graphNode *cgraph.Node + graphNode *graphviz.Node } type mapOfOnePerModuleResolver struct { @@ -101,6 +101,6 @@ func (o *mapOfOnePerModuleResolver) addNode(s *simpleProvider, _ int) error { return errors.Errorf("%v is a one-per-module type and thus %v can't be used as an output parameter in %s", o.typ, o.mapType, s.provider.Location) } -func (o onePerModuleResolver) typeGraphNode() *cgraph.Node { +func (o onePerModuleResolver) typeGraphNode() *graphviz.Node { return o.graphNode } diff --git a/container/resolver.go b/container/resolver.go index 7583358e042f..3e573556fab1 100644 --- a/container/resolver.go +++ b/container/resolver.go @@ -3,12 +3,12 @@ package container import ( "reflect" - "github.com/goccy/go-graphviz/cgraph" + "github.com/cosmos/cosmos-sdk/container/internal/graphviz" ) type resolver interface { addNode(*simpleProvider, int) error resolve(*container, *moduleKey, Location) (reflect.Value, error) describeLocation() string - typeGraphNode() *cgraph.Node + typeGraphNode() *graphviz.Node } diff --git a/container/run.go b/container/run.go deleted file mode 100644 index 12d1b9e2f113..000000000000 --- a/container/run.go +++ /dev/null @@ -1,44 +0,0 @@ -package container - -// Run runs the provided invoker function with values provided by the provided -// options. It is the single entry point for building and running a dependency -// injection container. Invoker should be a function taking one or more -// dependencies from the container, optionally returning an error. -// -// Ex: -// Run(func (x int) error { println(x) }, Provide(func() int { return 1 })) -func Run(invoker interface{}, opts ...Option) error { - return RunDebug(invoker, nil, opts...) -} - -// RunDebug is a version of Run which takes an optional DebugOption for -// logging and visualization. -func RunDebug(invoker interface{}, debugOpt DebugOption, opts ...Option) error { - opt := Options(opts...) - - cfg, err := newDebugConfig() - if err != nil { - return err - } - - defer cfg.generateGraph() // always generate graph on exit - - if debugOpt != nil { - err = debugOpt.applyConfig(cfg) - if err != nil { - return err - } - } - - cfg.logf("Registering providers") - cfg.indentLogger() - ctr := newContainer(cfg) - err = opt.apply(ctr) - if err != nil { - cfg.logf("Failed registering providers because of: %+v", err) - return err - } - cfg.dedentLogger() - - return ctr.run(invoker) -} diff --git a/container/simple.go b/container/simple.go index e62744c6084f..da9d35343e1b 100644 --- a/container/simple.go +++ b/container/simple.go @@ -3,7 +3,7 @@ package container import ( "reflect" - "github.com/goccy/go-graphviz/cgraph" + "github.com/cosmos/cosmos-sdk/container/internal/graphviz" ) type simpleProvider struct { @@ -19,7 +19,7 @@ type simpleResolver struct { resolved bool typ reflect.Type value reflect.Value - graphNode *cgraph.Node + graphNode *graphviz.Node } func (s *simpleResolver) describeLocation() string { @@ -62,6 +62,6 @@ func (s simpleResolver) addNode(p *simpleProvider, _ int) error { return duplicateDefinitionError(s.typ, p.provider.Location, s.node.provider.Location.String()) } -func (s simpleResolver) typeGraphNode() *cgraph.Node { +func (s simpleResolver) typeGraphNode() *graphviz.Node { return s.graphNode } diff --git a/container/struct_args.go b/container/struct_args.go index 985d950d4648..e3e52128d12b 100644 --- a/container/struct_args.go +++ b/container/struct_args.go @@ -36,12 +36,11 @@ type isOut interface{ isOut() } var isOutType = reflect.TypeOf((*isOut)(nil)).Elem() func expandStructArgsProvider(provider ProviderDescriptor) (ProviderDescriptor, error) { - var foundStructArgs bool + var structArgsInInput bool var newIn []ProviderInput - for _, in := range provider.Inputs { if in.Type.AssignableTo(isInType) { - foundStructArgs = true + structArgsInInput = true inTypes, err := structArgsInTypes(in.Type) if err != nil { return ProviderDescriptor{}, err @@ -52,17 +51,9 @@ func expandStructArgsProvider(provider ProviderDescriptor) (ProviderDescriptor, } } - var newOut []ProviderOutput - for _, out := range provider.Outputs { - if out.Type.AssignableTo(isOutType) { - foundStructArgs = true - newOut = append(newOut, structArgsOutTypes(out.Type)...) - } else { - newOut = append(newOut, out) - } - } + newOut, structArgsInOutput := expandStructArgsOutTypes(provider.Outputs) - if foundStructArgs { + if structArgsInInput || structArgsInOutput { return ProviderDescriptor{ Inputs: newIn, Outputs: newOut, @@ -137,6 +128,20 @@ func structArgsInTypes(typ reflect.Type) ([]ProviderInput, error) { return res, nil } +func expandStructArgsOutTypes(outputs []ProviderOutput) ([]ProviderOutput, bool) { + foundStructArgs := false + var newOut []ProviderOutput + for _, out := range outputs { + if out.Type.AssignableTo(isOutType) { + foundStructArgs = true + newOut = append(newOut, structArgsOutTypes(out.Type)...) + } else { + newOut = append(newOut, out) + } + } + return newOut, foundStructArgs +} + func structArgsOutTypes(typ reflect.Type) []ProviderOutput { n := typ.NumField() var res []ProviderOutput diff --git a/container/supply.go b/container/supply.go index d75ad5980398..e6a1db0b5026 100644 --- a/container/supply.go +++ b/container/supply.go @@ -3,14 +3,14 @@ package container import ( "reflect" - "github.com/goccy/go-graphviz/cgraph" + "github.com/cosmos/cosmos-sdk/container/internal/graphviz" ) type supplyResolver struct { typ reflect.Type value reflect.Value loc Location - graphNode *cgraph.Node + graphNode *graphviz.Node } func (s supplyResolver) describeLocation() string { @@ -26,6 +26,6 @@ func (s supplyResolver) resolve(c *container, _ *moduleKey, caller Location) (re return s.value, nil } -func (s supplyResolver) typeGraphNode() *cgraph.Node { +func (s supplyResolver) typeGraphNode() *graphviz.Node { return s.graphNode } diff --git a/container/testdata/example.dot b/container/testdata/example.dot new file mode 100644 index 000000000000..a9ba2413ac05 --- /dev/null +++ b/container/testdata/example.dot @@ -0,0 +1,43 @@ +digraph "" { + subgraph "cluster_a" { + graph [fontsize="12.0", label="Module: a", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_b" { + graph [fontsize="12.0", label="Module: b", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_runtime" { + graph [fontsize="12.0", label="Module: runtime", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + "[]github.com/cosmos/cosmos-sdk/container_test.Command"[color="lightgrey", comment="many-per-container", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container.ModuleKey"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/container.OwnModuleKey"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/container_test.KeeperA"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container_test.KeeperB"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/container_test.MsgClientA"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput"[color="black", fontcolor="black", penwidth="1.5", shape="hexagon"]; + "map[string]github.com/cosmos/cosmos-sdk/container_test.Handler"[color="lightgrey", comment="one-per-module", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container.ModuleKey" -> "github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA"; + "github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA" -> "github.com/cosmos/cosmos-sdk/container_test.MsgClientA"; + "github.com/cosmos/cosmos-sdk/container.ModuleKey" -> "github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey"; + "github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey" -> "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey"; + "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide"; + "github.com/cosmos/cosmos-sdk/container.OwnModuleKey" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide" -> "github.com/cosmos/cosmos-sdk/container_test.KeeperA"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide" -> "map[string]github.com/cosmos/cosmos-sdk/container_test.Handler"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide" -> "[]github.com/cosmos/cosmos-sdk/container_test.Command"; + "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide"; + "github.com/cosmos/cosmos-sdk/container_test.MsgClientA" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide" -> "github.com/cosmos/cosmos-sdk/container_test.KeeperB"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide" -> "[]github.com/cosmos/cosmos-sdk/container_test.Command"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide" -> "map[string]github.com/cosmos/cosmos-sdk/container_test.Handler"; + "github.com/cosmos/cosmos-sdk/container_test.KeeperB" -> "github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput"; +} + diff --git a/container/testdata/example.svg b/container/testdata/example.svg new file mode 100644 index 000000000000..a324b637cd01 --- /dev/null +++ b/container/testdata/example.svg @@ -0,0 +1,197 @@ + + + + + + + + +cluster_a + +Module: a + + +cluster_b + +Module: b + + +cluster_runtime + +Module: runtime + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + + + + +[]github.com/cosmos/cosmos-sdk/container_test.Command + +[]github.com/cosmos/cosmos-sdk/container_test.Command + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide->[]github.com/cosmos/cosmos-sdk/container_test.Command + + + + + +github.com/cosmos/cosmos-sdk/container_test.KeeperA + +github.com/cosmos/cosmos-sdk/container_test.KeeperA + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide->github.com/cosmos/cosmos-sdk/container_test.KeeperA + + + + + + +map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + +map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide->map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + + + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide->[]github.com/cosmos/cosmos-sdk/container_test.Command + + + + + +github.com/cosmos/cosmos-sdk/container_test.KeeperB + +github.com/cosmos/cosmos-sdk/container_test.KeeperB + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide->github.com/cosmos/cosmos-sdk/container_test.KeeperB + + + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide->map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + + + + + +github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey + +github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey + + + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey + + + +github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey->github.com/cosmos/cosmos-sdk/container_test.KVStoreKey + + + + + +github.com/cosmos/cosmos-sdk/container.ModuleKey + +github.com/cosmos/cosmos-sdk/container.ModuleKey + + + +github.com/cosmos/cosmos-sdk/container.ModuleKey->github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey + + + + + +github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA + +github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA + + + +github.com/cosmos/cosmos-sdk/container.ModuleKey->github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA + + + + + +github.com/cosmos/cosmos-sdk/container.OwnModuleKey + +github.com/cosmos/cosmos-sdk/container.OwnModuleKey + + + +github.com/cosmos/cosmos-sdk/container.OwnModuleKey->github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey->github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey->github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput + +github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput + + + +github.com/cosmos/cosmos-sdk/container_test.KeeperB->github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput + + + + + +github.com/cosmos/cosmos-sdk/container_test.MsgClientA + +github.com/cosmos/cosmos-sdk/container_test.MsgClientA + + + +github.com/cosmos/cosmos-sdk/container_test.MsgClientA->github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.ProvideMsgClientA->github.com/cosmos/cosmos-sdk/container_test.MsgClientA + + + + + diff --git a/container/testdata/example_error.dot b/container/testdata/example_error.dot new file mode 100644 index 000000000000..089a413d71e2 --- /dev/null +++ b/container/testdata/example_error.dot @@ -0,0 +1,40 @@ +digraph "" { + subgraph "cluster_a" { + graph [fontsize="12.0", label="Module: a", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_b" { + graph [fontsize="12.0", label="Module: b", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide"[color="red", fontcolor="red", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_runtime" { + graph [fontsize="12.0", label="Module: runtime", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + "[]github.com/cosmos/cosmos-sdk/container_test.Command"[color="lightgrey", comment="many-per-container", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container.ModuleKey"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/container.OwnModuleKey"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/container_test.KeeperA"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container_test.KeeperB"[color="red", fontcolor="red", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container_test.MsgClientA"[color="red", fontcolor="red", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput"[color="red", fontcolor="red", penwidth="0.5", shape="hexagon"]; + "map[string]github.com/cosmos/cosmos-sdk/container_test.Handler"[color="lightgrey", comment="one-per-module", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/container.ModuleKey" -> "github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey"; + "github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey" -> "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey"; + "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide"; + "github.com/cosmos/cosmos-sdk/container.OwnModuleKey" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide" -> "github.com/cosmos/cosmos-sdk/container_test.KeeperA"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide" -> "map[string]github.com/cosmos/cosmos-sdk/container_test.Handler"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide" -> "[]github.com/cosmos/cosmos-sdk/container_test.Command"; + "github.com/cosmos/cosmos-sdk/container_test.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide"; + "github.com/cosmos/cosmos-sdk/container_test.MsgClientA" -> "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide" -> "github.com/cosmos/cosmos-sdk/container_test.KeeperB"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide" -> "[]github.com/cosmos/cosmos-sdk/container_test.Command"; + "github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide" -> "map[string]github.com/cosmos/cosmos-sdk/container_test.Handler"; + "github.com/cosmos/cosmos-sdk/container_test.KeeperB" -> "github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput"; +} + diff --git a/container/testdata/example_error.svg b/container/testdata/example_error.svg new file mode 100644 index 000000000000..6897a23dc9da --- /dev/null +++ b/container/testdata/example_error.svg @@ -0,0 +1,179 @@ + + + + + + + + +cluster_a + +Module: a + + +cluster_b + +Module: b + + +cluster_runtime + +Module: runtime + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + + + + +[]github.com/cosmos/cosmos-sdk/container_test.Command + +[]github.com/cosmos/cosmos-sdk/container_test.Command + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide->[]github.com/cosmos/cosmos-sdk/container_test.Command + + + + + +github.com/cosmos/cosmos-sdk/container_test.KeeperA + +github.com/cosmos/cosmos-sdk/container_test.KeeperA + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide->github.com/cosmos/cosmos-sdk/container_test.KeeperA + + + + + + +map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + +map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide->map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + + + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide->[]github.com/cosmos/cosmos-sdk/container_test.Command + + + + + +github.com/cosmos/cosmos-sdk/container_test.KeeperB + +github.com/cosmos/cosmos-sdk/container_test.KeeperB + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide->github.com/cosmos/cosmos-sdk/container_test.KeeperB + + + + + +github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide->map[string]github.com/cosmos/cosmos-sdk/container_test.Handler + + + + + +github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey + +github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey + + + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey + + + +github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey->github.com/cosmos/cosmos-sdk/container_test.KVStoreKey + + + + + +github.com/cosmos/cosmos-sdk/container.ModuleKey + +github.com/cosmos/cosmos-sdk/container.ModuleKey + + + +github.com/cosmos/cosmos-sdk/container.ModuleKey->github.com/cosmos/cosmos-sdk/container_test.ProvideKVStoreKey + + + + + +github.com/cosmos/cosmos-sdk/container.OwnModuleKey + +github.com/cosmos/cosmos-sdk/container.OwnModuleKey + + + +github.com/cosmos/cosmos-sdk/container.OwnModuleKey->github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey->github.com/cosmos/cosmos-sdk/container_test.ModuleA.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.KVStoreKey->github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + + + + + +github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput + +github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput + + + +github.com/cosmos/cosmos-sdk/container_test.KeeperB->github.com/cosmos/cosmos-sdk/container_test.TestGraphAndLogOutput + + + + + +github.com/cosmos/cosmos-sdk/container_test.MsgClientA + +github.com/cosmos/cosmos-sdk/container_test.MsgClientA + + + +github.com/cosmos/cosmos-sdk/container_test.MsgClientA->github.com/cosmos/cosmos-sdk/container_test.ModuleB.Provide + + + + + diff --git a/contrib/devtools/Dockerfile b/contrib/devtools/Dockerfile index c1873ec70f1d..05bed5ac81bf 100644 --- a/contrib/devtools/Dockerfile +++ b/contrib/devtools/Dockerfile @@ -1,10 +1,10 @@ ## To test locally: # docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" -# docker run -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh +# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh FROM bufbuild/buf:1.1.0 as BUILDER -FROM golang:1.17-alpine +FROM golang:1.18-alpine RUN apk add --no-cache \ nodejs \ @@ -17,15 +17,22 @@ ENV GOLANG_PROTOBUF_VERSION=1.28.0 \ GRPC_GATEWAY_VERSION=1.16.0 -RUN GO111MODULE=on go get github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest \ - google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogofast@v${GOGO_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} \ - github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest +RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} +RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} +# install all gogo protobuf binaries +RUN git clone https://github.com/regen-network/protobuf.git; \ + cd protobuf; \ + go mod download; \ + make install + +# we need to use git clone because we use 'replace' directive in go.mod +# protoc-gen-gocosmos was moved to to in cosmos/gogoproto but pending a migration there. +RUN git clone https://github.com/regen-network/cosmos-proto.git; \ + cd cosmos-proto/protoc-gen-gocosmos; \ + go install . RUN npm install -g swagger-combine diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index fa9d88722b58..62765e74768b 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -73,4 +73,4 @@ tools-clean: rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM) rm -f tools-stamp -.PHONY: tools-clean statik runsim +.PHONY: tools-clean statik runsim \ No newline at end of file diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index 89ebcea94a8f..e88fc4da0d9e 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -1,14 +1,19 @@ -FROM golang:1.17-alpine AS build +FROM golang:1.18-alpine AS build + RUN apk add build-base git linux-headers libc-dev RUN go install github.com/go-delve/delve/cmd/dlv@latest + WORKDIR /work COPY go.mod go.sum /work/ COPY db/go.mod db/go.sum /work/db/ +COPY errors/go.mod errors/go.sum /work/errors/ +COPY math/go.mod math/go.sum /work/math/ + RUN go mod download COPY ./ /work RUN LEDGER_ENABLED=false make COSMOS_BUILD_OPTIONS="debug,nostrip" clean build -FROM alpine:3.14 AS run +FROM alpine AS run RUN apk add bash curl jq COPY contrib/images/simd-dlv/wrapper.sh /usr/bin/wrapper.sh @@ -20,4 +25,4 @@ WORKDIR /simd EXPOSE 26656 26657 2345 ENTRYPOINT ["/usr/bin/wrapper.sh"] CMD ["start", "--log_format", "plain"] -STOPSIGNAL SIGTERM \ No newline at end of file +STOPSIGNAL SIGTERM diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index e8bab917afb2..0d3565375837 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -1,15 +1,18 @@ -FROM golang:1.17-alpine AS build +FROM golang:1.18-alpine AS build + RUN apk add build-base git linux-headers + WORKDIR /work COPY go.mod go.sum /work/ COPY db/go.mod db/go.sum /work/db/ COPY errors/go.mod errors/go.sum /work/errors/ +COPY math/go.mod math/go.sum /work/math/ RUN go mod download COPY ./ /work RUN LEDGER_ENABLED=false make clean build -FROM alpine:3.14 AS run +FROM alpine AS run RUN apk add bash curl jq COPY contrib/images/simd-env/wrapper.sh /usr/bin/wrapper.sh diff --git a/contrib/rosetta/configuration/data.sh b/contrib/rosetta/configuration/data.sh index e98ae741237e..4d7d5ff0b056 100644 --- a/contrib/rosetta/configuration/data.sh +++ b/contrib/rosetta/configuration/data.sh @@ -33,7 +33,7 @@ sed -i 's/127.0.0.1/0.0.0.0/g' /root/.simapp/config/config.toml # start simd echo starting simd... -simd start --pruning=nothing --mode validator & +simd start --pruning=nothing & pid=$! echo simd started with PID $pid diff --git a/contrib/rosetta/docker-compose.yaml b/contrib/rosetta/docker-compose.yaml index 022427a5001e..ba593f0f3f7c 100644 --- a/contrib/rosetta/docker-compose.yaml +++ b/contrib/rosetta/docker-compose.yaml @@ -3,7 +3,17 @@ version: "3" services: cosmos: image: rosetta-ci:latest - command: ["simd", "start","--mode","validator", "--pruning", "nothing", "--grpc-web.enable", "true", "--grpc-web.address", "0.0.0.0:9091"] + command: + [ + "simd", + "start", + "--pruning", + "nothing", + "--grpc-web.enable", + "true", + "--grpc-web.address", + "0.0.0.0:9091" + ] ports: - 9090:9090 - 26657:26657 @@ -12,15 +22,21 @@ services: rosetta: image: rosetta-ci:latest - command: [ - "simd", - "rosetta", - "--blockchain", "app", - "--network", "network", - "--tendermint", "cosmos:26657", - "--grpc", "cosmos:9090", - "--addr", ":8080", - ] + command: + [ + "simd", + "rosetta", + "--blockchain", + "app", + "--network", + "network", + "--tendermint", + "cosmos:26657", + "--grpc", + "cosmos:9090", + "--addr", + ":8080" + ] ports: - 8080:8080 diff --git a/contrib/rosetta/rosetta-ci/Dockerfile b/contrib/rosetta/rosetta-ci/Dockerfile index b6a8d9936cc5..d4cfc58528e9 100644 --- a/contrib/rosetta/rosetta-ci/Dockerfile +++ b/contrib/rosetta/rosetta-ci/Dockerfile @@ -1,6 +1,6 @@ -FROM golang:1.17-alpine as build +FROM golang:1.18-alpine as build -RUN apk add --no-cache tar +RUN apk add --no-cache tar git # prepare node data WORKDIR /node @@ -13,7 +13,7 @@ COPY . ./ RUN go build -o simd ./simapp/simd/ FROM alpine -RUN apk add gcc libc-dev python3 --no-cache +RUN apk add gcc git libc-dev python3 --no-cache ENV PATH=$PATH:/bin diff --git a/contrib/rosetta/rosetta-ci/data.tar.gz b/contrib/rosetta/rosetta-ci/data.tar.gz index 27ff94ce479c..7ed311434592 100644 Binary files a/contrib/rosetta/rosetta-ci/data.tar.gz and b/contrib/rosetta/rosetta-ci/data.tar.gz differ diff --git a/contrib/rosetta/rosetta-cli/Dockerfile b/contrib/rosetta/rosetta-cli/Dockerfile index 012be0551c31..da6ef2879239 100644 --- a/contrib/rosetta/rosetta-cli/Dockerfile +++ b/contrib/rosetta/rosetta-cli/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17-alpine as build +FROM golang:1.18-alpine as build RUN apk add git gcc libc-dev --no-cache @@ -15,4 +15,4 @@ RUN apk add gcc libc-dev python3 --no-cache ENV PATH=$PATH:/bin -COPY --from=build /rosetta/rosetta-cli /bin/rosetta-cli \ No newline at end of file +COPY --from=build /rosetta/rosetta-cli /bin/rosetta-cli diff --git a/core/Makefile b/core/Makefile new file mode 100644 index 000000000000..b8205e21f424 --- /dev/null +++ b/core/Makefile @@ -0,0 +1,2 @@ +codegen: + (cd internal; buf generate) \ No newline at end of file diff --git a/core/README.md b/core/README.md new file mode 100644 index 000000000000..647894dce659 --- /dev/null +++ b/core/README.md @@ -0,0 +1,11 @@ +# Cosmos SDK Core + +The [cosmossdk.io/core](https://pkg.go.dev/cosmossdk.io/core) go module defines +"core" functionality for the Cosmos SDK. + +Currently functionality for registering modules using the [appmodule](https://pkg.go.dev/cosmossdk.io/core/appmodule) +package and composing apps using the [appconfig](https://pkg.go.dev/cosmossdk.io/core/appconfig) +package is provided. + +In the future core functionality for building Cosmos SDK app modules will be +provided in this go module. \ No newline at end of file diff --git a/core/appconfig/config.go b/core/appconfig/config.go new file mode 100644 index 000000000000..f0894cc15cd3 --- /dev/null +++ b/core/appconfig/config.go @@ -0,0 +1,111 @@ +package appconfig + +import ( + "fmt" + "reflect" + "strings" + + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/types/known/anypb" + "sigs.k8s.io/yaml" + + "github.com/cosmos/cosmos-sdk/container" + + appv1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/app/v1alpha1" + + "cosmossdk.io/core/internal" +) + +// LoadJSON loads an app config in JSON format. +func LoadJSON(bz []byte) container.Option { + config := &appv1alpha1.Config{} + err := protojson.Unmarshal(bz, config) + if err != nil { + return container.Error(err) + } + + return Compose(config) +} + +// LoadYAML loads an app config in YAML format. +func LoadYAML(bz []byte) container.Option { + j, err := yaml.YAMLToJSON(bz) + if err != nil { + return container.Error(err) + } + + return LoadJSON(j) +} + +// Compose composes a v1alpha1 app config into a container option by resolving +// the required modules and composing their options. +func Compose(appConfig *appv1alpha1.Config) container.Option { + opts := []container.Option{ + container.Supply(appConfig), + } + + for _, module := range appConfig.Modules { + if module.Name == "" { + return container.Error(fmt.Errorf("module is missing name")) + } + + if module.Config == nil { + return container.Error(fmt.Errorf("module %q is missing a config object", module.Name)) + } + + msgType, err := protoregistry.GlobalTypes.FindMessageByURL(module.Config.TypeUrl) + if err != nil { + return container.Error(err) + } + + modules, err := internal.ModulesByProtoMessageName() + if err != nil { + return container.Error(err) + } + + init, ok := modules[msgType.Descriptor().FullName()] + if !ok { + modDesc := proto.GetExtension(msgType.Descriptor().Options(), appv1alpha1.E_Module).(*appv1alpha1.ModuleDescriptor) + if modDesc == nil { + return container.Error(fmt.Errorf("no module registered for type URL %s and that protobuf type does not have the option %s\n\n%s", + module.Config.TypeUrl, appv1alpha1.E_Module.TypeDescriptor().FullName(), dumpRegisteredModules(modules))) + } + + return container.Error(fmt.Errorf("no module registered for type URL %s, did you forget to import %s\n\n%s", + module.Config.TypeUrl, modDesc.GoImport, dumpRegisteredModules(modules))) + } + + config := init.ConfigProtoMessage.ProtoReflect().Type().New().Interface() + err = anypb.UnmarshalTo(module.Config, config, proto.UnmarshalOptions{}) + if err != nil { + + return container.Error(err) + } + + opts = append(opts, container.Provide(container.ProviderDescriptor{ + Inputs: nil, + Outputs: []container.ProviderOutput{{Type: init.ConfigGoType}}, + Fn: func(values []reflect.Value) ([]reflect.Value, error) { + return []reflect.Value{reflect.ValueOf(config)}, nil + }, + Location: container.LocationFromCaller(0), + })) + + for _, provider := range init.Providers { + opts = append(opts, container.ProvideInModule(module.Name, provider)) + } + } + + return container.Options(opts...) +} + +func dumpRegisteredModules(modules map[protoreflect.FullName]*internal.ModuleInitializer) string { + var mods []string + for name := range modules { + mods = append(mods, " "+string(name)) + } + return fmt.Sprintf("registered modules are:\n%s", strings.Join(mods, "\n")) +} diff --git a/core/appconfig/config_test.go b/core/appconfig/config_test.go new file mode 100644 index 000000000000..0f6b579cd88f --- /dev/null +++ b/core/appconfig/config_test.go @@ -0,0 +1,104 @@ +package appconfig_test + +import ( + "bytes" + "reflect" + "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/container" + + "cosmossdk.io/core/appconfig" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/internal" + "cosmossdk.io/core/internal/testpb" + _ "cosmossdk.io/core/internal/testpb" +) + +func expectContainerErrorContains(t *testing.T, option container.Option, contains string) { + t.Helper() + err := container.Build(option) + assert.ErrorContains(t, err, contains) +} + +func TestCompose(t *testing.T) { + opt := appconfig.LoadJSON([]byte(`{"modules":[{}]}`)) + expectContainerErrorContains(t, opt, "module is missing name") + + opt = appconfig.LoadJSON([]byte(`{"modules":[{"name": "a"}]}`)) + expectContainerErrorContains(t, opt, `module "a" is missing a config object`) + + opt = appconfig.LoadYAML([]byte(` +modules: +- name: a + config: + "@type": testpb.ModuleFoo +`)) + expectContainerErrorContains(t, opt, `unable to resolve`) + + opt = appconfig.LoadYAML([]byte(` +modules: +- name: a + config: + "@type": cosmos.app.v1alpha1.Config # this is not actually a module config type! +`)) + expectContainerErrorContains(t, opt, "does not have the option cosmos.app.v1alpha1.module") + expectContainerErrorContains(t, opt, "registered modules are") + expectContainerErrorContains(t, opt, "testpb.TestModuleA") + + opt = appconfig.LoadYAML([]byte(` +modules: +- name: a + config: + "@type": testpb.TestUnregisteredModule +`)) + expectContainerErrorContains(t, opt, "did you forget to import cosmossdk.io/core/internal/testpb") + expectContainerErrorContains(t, opt, "registered modules are") + expectContainerErrorContains(t, opt, "testpb.TestModuleA") + + var app testpb.App + opt = appconfig.LoadYAML([]byte(` +modules: +- name: runtime + config: + "@type": testpb.TestRuntimeModule +- name: a + config: + "@type": testpb.TestModuleA +- name: b + config: + "@type": testpb.TestModuleB +`)) + assert.NilError(t, container.Build(opt, &app)) + buf := &bytes.Buffer{} + app(buf) + const expected = `got store key a +got store key b +running module handler a +result: hello +running module handler b +result: goodbye +` + assert.Equal(t, expected, buf.String()) + + // module registration failures: + appmodule.Register(&testpb.TestNoModuleOptionModule{}) + opt = appconfig.LoadYAML([]byte(` +modules: +- name: a + config: + "@type": testpb.TestNoGoImportModule +`)) + expectContainerErrorContains(t, opt, "module should have the option cosmos.app.v1alpha1.module") + + internal.ModuleRegistry = map[reflect.Type]*internal.ModuleInitializer{} // reset module registry + appmodule.Register(&testpb.TestNoGoImportModule{}) + opt = appconfig.LoadYAML([]byte(` +modules: +- name: a + config: + "@type": testpb.TestNoGoImportModule +`)) + expectContainerErrorContains(t, opt, "module should have ModuleDescriptor.go_import specified") +} diff --git a/core/appconfig/doc.go b/core/appconfig/doc.go new file mode 100644 index 000000000000..a2bf09cfb1a4 --- /dev/null +++ b/core/appconfig/doc.go @@ -0,0 +1,3 @@ +// Package appconfig defines functionality for loading declarative Cosmos SDK +// app configurations. +package appconfig diff --git a/core/appmodule/doc.go b/core/appmodule/doc.go new file mode 100644 index 000000000000..0ea54956c286 --- /dev/null +++ b/core/appmodule/doc.go @@ -0,0 +1,5 @@ +// Package appmodule defines the functionality for registering Cosmos SDK app +// modules that are assembled using the github.com/cosmos/cosmos-sdk/container +// dependency injection system and the declarative app configuration format +// handled by the appconfig package. +package appmodule diff --git a/core/appmodule/option.go b/core/appmodule/option.go new file mode 100644 index 000000000000..ad87098da3d6 --- /dev/null +++ b/core/appmodule/option.go @@ -0,0 +1,35 @@ +package appmodule + +import ( + "github.com/cosmos/cosmos-sdk/container" + + "cosmossdk.io/core/internal" +) + +// Option is a functional option for implementing modules. +type Option interface { + apply(*internal.ModuleInitializer) error +} + +type funcOption func(initializer *internal.ModuleInitializer) error + +func (f funcOption) apply(initializer *internal.ModuleInitializer) error { + return f(initializer) +} + +// Provide registers providers with the dependency injection system that will be +// run within the module scope. See github.com/cosmos/cosmos-sdk/container for +// documentation on the dependency injection system. +func Provide(providers ...interface{}) Option { + return funcOption(func(initializer *internal.ModuleInitializer) error { + for _, provider := range providers { + desc, err := container.ExtractProviderDescriptor(provider) + if err != nil { + return err + } + + initializer.Providers = append(initializer.Providers, desc) + } + return nil + }) +} diff --git a/core/appmodule/register.go b/core/appmodule/register.go new file mode 100644 index 000000000000..56004dbb863c --- /dev/null +++ b/core/appmodule/register.go @@ -0,0 +1,34 @@ +package appmodule + +import ( + "reflect" + + "google.golang.org/protobuf/proto" + + "cosmossdk.io/core/internal" +) + +// Register registers a module with the global module registry. The provided +// protobuf message is used only to uniquely identify the protobuf module config +// type. The instance of the protobuf message used in the actual configuration +// will be injected into the container and can be requested by a provider +// function. All module initialization should be handled by the provided options. +// +// Protobuf message types used for module configuration should define the +// cosmos.app.v1alpha.module option and must explicitly specify go_package +// to make debugging easier for users. +func Register(msg proto.Message, options ...Option) { + ty := reflect.TypeOf(msg) + init := &internal.ModuleInitializer{ + ConfigProtoMessage: msg, + ConfigGoType: ty, + } + internal.ModuleRegistry[ty] = init + + for _, option := range options { + init.Error = option.apply(init) + if init.Error != nil { + return + } + } +} diff --git a/core/go.mod b/core/go.mod new file mode 100644 index 000000000000..00cf457281e7 --- /dev/null +++ b/core/go.mod @@ -0,0 +1,30 @@ +module cosmossdk.io/core + +go 1.18 + +require ( + github.com/cosmos/cosmos-proto v1.0.0-alpha7 + github.com/cosmos/cosmos-sdk/api v0.1.0 + github.com/cosmos/cosmos-sdk/container v1.0.0-alpha.3 + google.golang.org/protobuf v1.28.0 + gotest.tools/v3 v3.2.0 + sigs.k8s.io/yaml v1.3.0 +) + +require ( + github.com/fogleman/gg v1.3.0 // indirect + github.com/goccy/go-graphviz v0.0.9 // indirect + github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/kr/pretty v0.1.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect + golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect + golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect + golang.org/x/text v0.3.5 // indirect + google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect + google.golang.org/grpc v1.46.0 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/core/go.sum b/core/go.sum new file mode 100644 index 000000000000..3da2dfcc70b5 --- /dev/null +++ b/core/go.sum @@ -0,0 +1,192 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= +github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= +github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= +github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= +github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= +github.com/cosmos/cosmos-sdk/api v0.1.0/go.mod h1:CupqQBskAOiTXO1XDZ/wrtWzN/wTxUvbQmOqdUhR8wI= +github.com/cosmos/cosmos-sdk/container v1.0.0-alpha.3 h1:CC8p43RhsrtZdPOkT/Q5q8QkEGKCq3BbTr/wG/3vJ70= +github.com/cosmos/cosmos-sdk/container v1.0.0-alpha.3/go.mod h1:fd4VKEYJiPjjElIRm7xsjUFMh2ljTtooK1H/DJa0uPU= +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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/goccy/go-graphviz v0.0.9 h1:s/FMMJ1Joj6La3S5ApO3Jk2cwM4LpXECC2muFx3IPQQ= +github.com/goccy/go-graphviz v0.0.9/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/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/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.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.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +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 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +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-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +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-20200822124328-c89045814202/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-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/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-20180830151530-49385e6e1522/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-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb h1:ZrsicilzPCS/Xr8qtBZZLpy4P9TYXAfl49ctG1/5tgw= +google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/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 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/core/internal/buf.gen.yaml b/core/internal/buf.gen.yaml new file mode 100644 index 000000000000..f4e31b03e8ae --- /dev/null +++ b/core/internal/buf.gen.yaml @@ -0,0 +1,11 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: cosmossdk.io/core/internal + override: + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api +plugins: + - name: go-pulsar + out: . + opt: paths=source_relative diff --git a/core/internal/buf.yaml b/core/internal/buf.yaml new file mode 100644 index 000000000000..ac1df238ebec --- /dev/null +++ b/core/internal/buf.yaml @@ -0,0 +1,9 @@ +version: v1 +lint: + use: + - DEFAULT + except: + - PACKAGE_VERSION_SUFFIX +breaking: + ignore: + - testpb diff --git a/core/internal/registry.go b/core/internal/registry.go new file mode 100644 index 000000000000..d56a6ed726ba --- /dev/null +++ b/core/internal/registry.go @@ -0,0 +1,59 @@ +package internal + +import ( + "fmt" + "reflect" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/cosmos/cosmos-sdk/container" + + appv1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/app/v1alpha1" +) + +// ModuleRegistry is the registry of module initializers indexed by their golang +// type to avoid any issues with protobuf descriptor initialization. +var ModuleRegistry = map[reflect.Type]*ModuleInitializer{} + +// ModuleInitializer describes how to initialize a module. +type ModuleInitializer struct { + ConfigGoType reflect.Type + ConfigProtoMessage proto.Message + Error error + Providers []container.ProviderDescriptor +} + +// ModulesByProtoMessageName should be used to retrieve modules by their protobuf name. +// This is done lazily after module registration to deal with non-deterministic issues +// that can occur with respect to protobuf descriptor initialization. +func ModulesByProtoMessageName() (map[protoreflect.FullName]*ModuleInitializer, error) { + res := map[protoreflect.FullName]*ModuleInitializer{} + + for _, initializer := range ModuleRegistry { + descriptor := initializer.ConfigProtoMessage.ProtoReflect().Descriptor() + fullName := descriptor.FullName() + if _, ok := res[fullName]; ok { + return nil, fmt.Errorf("duplicate module registratio for %s", fullName) + } + + modDesc := proto.GetExtension(descriptor.Options(), appv1alpha1.E_Module).(*appv1alpha1.ModuleDescriptor) + if modDesc == nil { + return nil, fmt.Errorf( + "protobuf type %s registered as a module should have the option %s", + fullName, + appv1alpha1.E_Module.TypeDescriptor().FullName()) + } + + if modDesc.GoImport == "" { + return nil, fmt.Errorf( + "protobuf type %s registered as a module should have ModuleDescriptor.go_import specified", + fullName, + ) + } + + res[fullName] = initializer + } + + return res, nil +} diff --git a/core/internal/testpb/modules.go b/core/internal/testpb/modules.go new file mode 100644 index 000000000000..e87a2aab03aa --- /dev/null +++ b/core/internal/testpb/modules.go @@ -0,0 +1,99 @@ +package testpb + +import ( + "fmt" + "io" + "sort" + + "github.com/cosmos/cosmos-sdk/container" + + "cosmossdk.io/core/appmodule" +) + +func init() { + appmodule.Register(&TestRuntimeModule{}, + appmodule.Provide(provideRuntimeState, provideStoreKey, provideApp), + ) + + appmodule.Register(&TestModuleA{}, + appmodule.Provide(provideModuleA), + ) + + appmodule.Register(&TestModuleB{}, + appmodule.Provide(provideModuleB), + ) +} + +func provideRuntimeState() *runtimeState { + return &runtimeState{} +} + +func provideStoreKey(key container.ModuleKey, state *runtimeState) StoreKey { + sk := StoreKey{name: key.Name()} + state.storeKeys = append(state.storeKeys, sk) + return sk +} + +func provideApp(state *runtimeState, handlers map[string]Handler) App { + return func(w io.Writer) { + for _, key := range state.storeKeys { + _, _ = fmt.Fprintf(w, "got store key %s\n", key.name) + } + + var modNames []string + for modName := range handlers { + modNames = append(modNames, modName) + } + + sort.Strings(modNames) + for _, name := range modNames { + _, _ = fmt.Fprintf(w, "running module handler %s\n", name) + _, _ = fmt.Fprintf(w, "result: %s\n", handlers[name].DoSomething()) + } + } +} + +type App func(writer io.Writer) + +type runtimeState struct { + storeKeys []StoreKey +} + +type StoreKey struct{ name string } + +type Handler struct { + DoSomething func() string +} + +func (h Handler) IsOnePerModuleType() {} + +func provideModuleA(key StoreKey) (KeeperA, Handler) { + return keeperA{key: key}, Handler{DoSomething: func() string { + return "hello" + }} +} + +type keeperA struct { + key StoreKey +} + +type KeeperA interface { + Foo() +} + +func (k keeperA) Foo() {} + +func provideModuleB(key StoreKey, a KeeperA) (KeeperB, Handler) { + return keeperB{key: key, a: a}, Handler{ + DoSomething: func() string { + return "goodbye" + }, + } +} + +type keeperB struct { + key StoreKey + a KeeperA +} + +type KeeperB interface{} diff --git a/core/internal/testpb/test.proto b/core/internal/testpb/test.proto new file mode 100644 index 000000000000..00aa0bd6c769 --- /dev/null +++ b/core/internal/testpb/test.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package testpb; + +import "cosmos/app/v1alpha1/module.proto"; + +message TestRuntimeModule { + option (cosmos.app.v1alpha1.module) = { + go_import: "cosmossdk.io/core/internal/testpb" + }; +} + +message TestModuleA { + option (cosmos.app.v1alpha1.module) = { + go_import: "cosmossdk.io/core/internal/testpb" + }; +} + +message TestModuleB { + option (cosmos.app.v1alpha1.module) = { + go_import: "cosmossdk.io/core/internal/testpb" + }; +} + +message TestUnregisteredModule { + option (cosmos.app.v1alpha1.module) = { + go_import: "cosmossdk.io/core/internal/testpb" + }; +} + +message TestNoModuleOptionModule {} + +message TestNoGoImportModule { + option (cosmos.app.v1alpha1.module) = {}; +} diff --git a/testutil/testdata_pulsar/query.pulsar.go b/core/internal/testpb/test.pulsar.go similarity index 55% rename from testutil/testdata_pulsar/query.pulsar.go rename to core/internal/testpb/test.pulsar.go index d5e6660a9b88..7ca6f2ed7530 100644 --- a/testutil/testdata_pulsar/query.pulsar.go +++ b/core/internal/testpb/test.pulsar.go @@ -1,39 +1,37 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package testdata_pulsar +package testpb import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/app/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" 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 ( - md_EchoRequest protoreflect.MessageDescriptor - fd_EchoRequest_message protoreflect.FieldDescriptor + md_TestRuntimeModule protoreflect.MessageDescriptor ) func init() { - file_query_proto_init() - md_EchoRequest = File_query_proto.Messages().ByName("EchoRequest") - fd_EchoRequest_message = md_EchoRequest.Fields().ByName("message") + file_testpb_test_proto_init() + md_TestRuntimeModule = File_testpb_test_proto.Messages().ByName("TestRuntimeModule") } -var _ protoreflect.Message = (*fastReflection_EchoRequest)(nil) +var _ protoreflect.Message = (*fastReflection_TestRuntimeModule)(nil) -type fastReflection_EchoRequest EchoRequest +type fastReflection_TestRuntimeModule TestRuntimeModule -func (x *EchoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_EchoRequest)(x) +func (x *TestRuntimeModule) ProtoReflect() protoreflect.Message { + return (*fastReflection_TestRuntimeModule)(x) } -func (x *EchoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[0] +func (x *TestRuntimeModule) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44,43 +42,43 @@ func (x *EchoRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_EchoRequest_messageType fastReflection_EchoRequest_messageType -var _ protoreflect.MessageType = fastReflection_EchoRequest_messageType{} +var _fastReflection_TestRuntimeModule_messageType fastReflection_TestRuntimeModule_messageType +var _ protoreflect.MessageType = fastReflection_TestRuntimeModule_messageType{} -type fastReflection_EchoRequest_messageType struct{} +type fastReflection_TestRuntimeModule_messageType struct{} -func (x fastReflection_EchoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_EchoRequest)(nil) +func (x fastReflection_TestRuntimeModule_messageType) Zero() protoreflect.Message { + return (*fastReflection_TestRuntimeModule)(nil) } -func (x fastReflection_EchoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_EchoRequest) +func (x fastReflection_TestRuntimeModule_messageType) New() protoreflect.Message { + return new(fastReflection_TestRuntimeModule) } -func (x fastReflection_EchoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EchoRequest +func (x fastReflection_TestRuntimeModule_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TestRuntimeModule } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_EchoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_EchoRequest +func (x *fastReflection_TestRuntimeModule) Descriptor() protoreflect.MessageDescriptor { + return md_TestRuntimeModule } // 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_EchoRequest) Type() protoreflect.MessageType { - return _fastReflection_EchoRequest_messageType +func (x *fastReflection_TestRuntimeModule) Type() protoreflect.MessageType { + return _fastReflection_TestRuntimeModule_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_EchoRequest) New() protoreflect.Message { - return new(fastReflection_EchoRequest) +func (x *fastReflection_TestRuntimeModule) New() protoreflect.Message { + return new(fastReflection_TestRuntimeModule) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_EchoRequest) Interface() protoreflect.ProtoMessage { - return (*EchoRequest)(x) +func (x *fastReflection_TestRuntimeModule) Interface() protoreflect.ProtoMessage { + return (*TestRuntimeModule)(x) } // Range iterates over every populated field in an undefined order, @@ -88,13 +86,7 @@ func (x *fastReflection_EchoRequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_EchoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Message != "" { - value := protoreflect.ValueOfString(x.Message) - if !f(fd_EchoRequest_message, value) { - return - } - } +func (x *fastReflection_TestRuntimeModule) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -108,15 +100,13 @@ func (x *fastReflection_EchoRequest) Range(f func(protoreflect.FieldDescriptor, // 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_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TestRuntimeModule) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testdata.EchoRequest.message": - return x.Message != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) } - panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestRuntimeModule does not contain field %s", fd.FullName())) } } @@ -126,15 +116,13 @@ func (x *fastReflection_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TestRuntimeModule) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testdata.EchoRequest.message": - x.Message = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) } - panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestRuntimeModule does not contain field %s", fd.FullName())) } } @@ -144,16 +132,13 @@ func (x *fastReflection_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { // 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_EchoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestRuntimeModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testdata.EchoRequest.message": - value := x.Message - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) } - panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.TestRuntimeModule does not contain field %s", descriptor.FullName())) } } @@ -167,15 +152,13 @@ func (x *fastReflection_EchoRequest) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TestRuntimeModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testdata.EchoRequest.message": - x.Message = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) } - panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestRuntimeModule does not contain field %s", fd.FullName())) } } @@ -189,40 +172,36 @@ func (x *fastReflection_EchoRequest) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestRuntimeModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.EchoRequest.message": - panic(fmt.Errorf("field message of message testdata.EchoRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) } - panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestRuntimeModule 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_EchoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestRuntimeModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.EchoRequest.message": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestRuntimeModule")) } - panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestRuntimeModule 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_EchoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TestRuntimeModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testdata.EchoRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.TestRuntimeModule", d.FullName())) } panic("unreachable") } @@ -230,7 +209,7 @@ func (x *fastReflection_EchoRequest) WhichOneof(d protoreflect.OneofDescriptor) // 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_EchoRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TestRuntimeModule) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -241,7 +220,7 @@ func (x *fastReflection_EchoRequest) 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_EchoRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TestRuntimeModule) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -253,7 +232,7 @@ func (x *fastReflection_EchoRequest) SetUnknown(fields protoreflect.RawFields) { // 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_EchoRequest) IsValid() bool { +func (x *fastReflection_TestRuntimeModule) IsValid() bool { return x != nil } @@ -263,9 +242,9 @@ func (x *fastReflection_EchoRequest) 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_EchoRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TestRuntimeModule) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EchoRequest) + x := input.Message.Interface().(*TestRuntimeModule) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -277,10 +256,6 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Message) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -291,7 +266,7 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EchoRequest) + x := input.Message.Interface().(*TestRuntimeModule) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -310,13 +285,6 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Message) > 0 { - i -= len(x.Message) - copy(dAtA[i:], x.Message) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -328,7 +296,7 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EchoRequest) + x := input.Message.Interface().(*TestRuntimeModule) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -360,44 +328,12 @@ func (x *fastReflection_EchoRequest) 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: EchoRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestRuntimeModule: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestRuntimeModule: 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 Message", 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.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -434,26 +370,24 @@ func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { } var ( - md_EchoResponse protoreflect.MessageDescriptor - fd_EchoResponse_message protoreflect.FieldDescriptor + md_TestModuleA protoreflect.MessageDescriptor ) func init() { - file_query_proto_init() - md_EchoResponse = File_query_proto.Messages().ByName("EchoResponse") - fd_EchoResponse_message = md_EchoResponse.Fields().ByName("message") + file_testpb_test_proto_init() + md_TestModuleA = File_testpb_test_proto.Messages().ByName("TestModuleA") } -var _ protoreflect.Message = (*fastReflection_EchoResponse)(nil) +var _ protoreflect.Message = (*fastReflection_TestModuleA)(nil) -type fastReflection_EchoResponse EchoResponse +type fastReflection_TestModuleA TestModuleA -func (x *EchoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_EchoResponse)(x) +func (x *TestModuleA) ProtoReflect() protoreflect.Message { + return (*fastReflection_TestModuleA)(x) } -func (x *EchoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[1] +func (x *TestModuleA) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -464,43 +398,43 @@ func (x *EchoResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_EchoResponse_messageType fastReflection_EchoResponse_messageType -var _ protoreflect.MessageType = fastReflection_EchoResponse_messageType{} +var _fastReflection_TestModuleA_messageType fastReflection_TestModuleA_messageType +var _ protoreflect.MessageType = fastReflection_TestModuleA_messageType{} -type fastReflection_EchoResponse_messageType struct{} +type fastReflection_TestModuleA_messageType struct{} -func (x fastReflection_EchoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_EchoResponse)(nil) +func (x fastReflection_TestModuleA_messageType) Zero() protoreflect.Message { + return (*fastReflection_TestModuleA)(nil) } -func (x fastReflection_EchoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_EchoResponse) +func (x fastReflection_TestModuleA_messageType) New() protoreflect.Message { + return new(fastReflection_TestModuleA) } -func (x fastReflection_EchoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EchoResponse +func (x fastReflection_TestModuleA_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TestModuleA } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_EchoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_EchoResponse +func (x *fastReflection_TestModuleA) Descriptor() protoreflect.MessageDescriptor { + return md_TestModuleA } // 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_EchoResponse) Type() protoreflect.MessageType { - return _fastReflection_EchoResponse_messageType +func (x *fastReflection_TestModuleA) Type() protoreflect.MessageType { + return _fastReflection_TestModuleA_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_EchoResponse) New() protoreflect.Message { - return new(fastReflection_EchoResponse) +func (x *fastReflection_TestModuleA) New() protoreflect.Message { + return new(fastReflection_TestModuleA) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_EchoResponse) Interface() protoreflect.ProtoMessage { - return (*EchoResponse)(x) +func (x *fastReflection_TestModuleA) Interface() protoreflect.ProtoMessage { + return (*TestModuleA)(x) } // Range iterates over every populated field in an undefined order, @@ -508,13 +442,7 @@ func (x *fastReflection_EchoResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_EchoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Message != "" { - value := protoreflect.ValueOfString(x.Message) - if !f(fd_EchoResponse_message, value) { - return - } - } +func (x *fastReflection_TestModuleA) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -528,15 +456,13 @@ func (x *fastReflection_EchoResponse) Range(f func(protoreflect.FieldDescriptor, // 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_EchoResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TestModuleA) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testdata.EchoResponse.message": - return x.Message != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) } - panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleA does not contain field %s", fd.FullName())) } } @@ -546,15 +472,13 @@ func (x *fastReflection_EchoResponse) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TestModuleA) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testdata.EchoResponse.message": - x.Message = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) } - panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleA does not contain field %s", fd.FullName())) } } @@ -564,16 +488,13 @@ func (x *fastReflection_EchoResponse) Clear(fd protoreflect.FieldDescriptor) { // 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_EchoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestModuleA) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testdata.EchoResponse.message": - value := x.Message - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) } - panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.TestModuleA does not contain field %s", descriptor.FullName())) } } @@ -587,15 +508,13 @@ func (x *fastReflection_EchoResponse) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TestModuleA) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testdata.EchoResponse.message": - x.Message = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) } - panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleA does not contain field %s", fd.FullName())) } } @@ -609,40 +528,36 @@ func (x *fastReflection_EchoResponse) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestModuleA) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.EchoResponse.message": - panic(fmt.Errorf("field message of message testdata.EchoResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) } - panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleA 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_EchoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestModuleA) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.EchoResponse.message": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleA")) } - panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleA 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_EchoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TestModuleA) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testdata.EchoResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.TestModuleA", d.FullName())) } panic("unreachable") } @@ -650,7 +565,7 @@ func (x *fastReflection_EchoResponse) WhichOneof(d protoreflect.OneofDescriptor) // 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_EchoResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TestModuleA) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -661,7 +576,7 @@ func (x *fastReflection_EchoResponse) 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_EchoResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TestModuleA) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -673,7 +588,7 @@ func (x *fastReflection_EchoResponse) SetUnknown(fields protoreflect.RawFields) // 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_EchoResponse) IsValid() bool { +func (x *fastReflection_TestModuleA) IsValid() bool { return x != nil } @@ -683,9 +598,9 @@ func (x *fastReflection_EchoResponse) 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_EchoResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TestModuleA) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EchoResponse) + x := input.Message.Interface().(*TestModuleA) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -697,10 +612,6 @@ func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Message) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -711,7 +622,7 @@ func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EchoResponse) + x := input.Message.Interface().(*TestModuleA) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -730,13 +641,6 @@ func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Message) > 0 { - i -= len(x.Message) - copy(dAtA[i:], x.Message) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -748,7 +652,7 @@ func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EchoResponse) + x := input.Message.Interface().(*TestModuleA) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -780,44 +684,12 @@ func (x *fastReflection_EchoResponse) 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: EchoResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestModuleA: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestModuleA: 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 Message", 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.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -854,26 +726,24 @@ func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { } var ( - md_SayHelloRequest protoreflect.MessageDescriptor - fd_SayHelloRequest_name protoreflect.FieldDescriptor + md_TestModuleB protoreflect.MessageDescriptor ) func init() { - file_query_proto_init() - md_SayHelloRequest = File_query_proto.Messages().ByName("SayHelloRequest") - fd_SayHelloRequest_name = md_SayHelloRequest.Fields().ByName("name") + file_testpb_test_proto_init() + md_TestModuleB = File_testpb_test_proto.Messages().ByName("TestModuleB") } -var _ protoreflect.Message = (*fastReflection_SayHelloRequest)(nil) +var _ protoreflect.Message = (*fastReflection_TestModuleB)(nil) -type fastReflection_SayHelloRequest SayHelloRequest +type fastReflection_TestModuleB TestModuleB -func (x *SayHelloRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SayHelloRequest)(x) +func (x *TestModuleB) ProtoReflect() protoreflect.Message { + return (*fastReflection_TestModuleB)(x) } -func (x *SayHelloRequest) slowProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[2] +func (x *TestModuleB) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -884,43 +754,43 @@ func (x *SayHelloRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SayHelloRequest_messageType fastReflection_SayHelloRequest_messageType -var _ protoreflect.MessageType = fastReflection_SayHelloRequest_messageType{} +var _fastReflection_TestModuleB_messageType fastReflection_TestModuleB_messageType +var _ protoreflect.MessageType = fastReflection_TestModuleB_messageType{} -type fastReflection_SayHelloRequest_messageType struct{} +type fastReflection_TestModuleB_messageType struct{} -func (x fastReflection_SayHelloRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SayHelloRequest)(nil) +func (x fastReflection_TestModuleB_messageType) Zero() protoreflect.Message { + return (*fastReflection_TestModuleB)(nil) } -func (x fastReflection_SayHelloRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SayHelloRequest) +func (x fastReflection_TestModuleB_messageType) New() protoreflect.Message { + return new(fastReflection_TestModuleB) } -func (x fastReflection_SayHelloRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SayHelloRequest +func (x fastReflection_TestModuleB_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TestModuleB } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SayHelloRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SayHelloRequest +func (x *fastReflection_TestModuleB) Descriptor() protoreflect.MessageDescriptor { + return md_TestModuleB } // 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_SayHelloRequest) Type() protoreflect.MessageType { - return _fastReflection_SayHelloRequest_messageType +func (x *fastReflection_TestModuleB) Type() protoreflect.MessageType { + return _fastReflection_TestModuleB_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SayHelloRequest) New() protoreflect.Message { - return new(fastReflection_SayHelloRequest) +func (x *fastReflection_TestModuleB) New() protoreflect.Message { + return new(fastReflection_TestModuleB) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SayHelloRequest) Interface() protoreflect.ProtoMessage { - return (*SayHelloRequest)(x) +func (x *fastReflection_TestModuleB) Interface() protoreflect.ProtoMessage { + return (*TestModuleB)(x) } // Range iterates over every populated field in an undefined order, @@ -928,13 +798,7 @@ func (x *fastReflection_SayHelloRequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SayHelloRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_SayHelloRequest_name, value) { - return - } - } +func (x *fastReflection_TestModuleB) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -948,15 +812,13 @@ func (x *fastReflection_SayHelloRequest) Range(f func(protoreflect.FieldDescript // 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_SayHelloRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TestModuleB) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testdata.SayHelloRequest.name": - return x.Name != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) } - panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleB does not contain field %s", fd.FullName())) } } @@ -966,15 +828,13 @@ func (x *fastReflection_SayHelloRequest) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SayHelloRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TestModuleB) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testdata.SayHelloRequest.name": - x.Name = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) } - panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleB does not contain field %s", fd.FullName())) } } @@ -984,16 +844,13 @@ func (x *fastReflection_SayHelloRequest) Clear(fd protoreflect.FieldDescriptor) // 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_SayHelloRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestModuleB) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testdata.SayHelloRequest.name": - value := x.Name - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) } - panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.TestModuleB does not contain field %s", descriptor.FullName())) } } @@ -1007,15 +864,13 @@ func (x *fastReflection_SayHelloRequest) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SayHelloRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TestModuleB) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testdata.SayHelloRequest.name": - x.Name = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) } - panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleB does not contain field %s", fd.FullName())) } } @@ -1029,40 +884,36 @@ func (x *fastReflection_SayHelloRequest) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SayHelloRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestModuleB) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.SayHelloRequest.name": - panic(fmt.Errorf("field name of message testdata.SayHelloRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) } - panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleB 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_SayHelloRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestModuleB) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.SayHelloRequest.name": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestModuleB")) } - panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestModuleB 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_SayHelloRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TestModuleB) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testdata.SayHelloRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.TestModuleB", d.FullName())) } panic("unreachable") } @@ -1070,7 +921,7 @@ func (x *fastReflection_SayHelloRequest) WhichOneof(d protoreflect.OneofDescript // 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_SayHelloRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TestModuleB) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1081,7 +932,7 @@ func (x *fastReflection_SayHelloRequest) 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_SayHelloRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TestModuleB) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1093,7 +944,7 @@ func (x *fastReflection_SayHelloRequest) SetUnknown(fields protoreflect.RawField // 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_SayHelloRequest) IsValid() bool { +func (x *fastReflection_TestModuleB) IsValid() bool { return x != nil } @@ -1103,9 +954,9 @@ func (x *fastReflection_SayHelloRequest) 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_SayHelloRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TestModuleB) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SayHelloRequest) + x := input.Message.Interface().(*TestModuleB) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1117,10 +968,6 @@ func (x *fastReflection_SayHelloRequest) 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) } @@ -1131,7 +978,7 @@ func (x *fastReflection_SayHelloRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SayHelloRequest) + x := input.Message.Interface().(*TestModuleB) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1150,13 +997,6 @@ func (x *fastReflection_SayHelloRequest) 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 { @@ -1168,7 +1008,7 @@ func (x *fastReflection_SayHelloRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SayHelloRequest) + x := input.Message.Interface().(*TestModuleB) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1200,44 +1040,12 @@ func (x *fastReflection_SayHelloRequest) 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: SayHelloRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestModuleB: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SayHelloRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestModuleB: 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:]) @@ -1274,26 +1082,24 @@ func (x *fastReflection_SayHelloRequest) ProtoMethods() *protoiface.Methods { } var ( - md_SayHelloResponse protoreflect.MessageDescriptor - fd_SayHelloResponse_greeting protoreflect.FieldDescriptor + md_TestUnregisteredModule protoreflect.MessageDescriptor ) func init() { - file_query_proto_init() - md_SayHelloResponse = File_query_proto.Messages().ByName("SayHelloResponse") - fd_SayHelloResponse_greeting = md_SayHelloResponse.Fields().ByName("greeting") + file_testpb_test_proto_init() + md_TestUnregisteredModule = File_testpb_test_proto.Messages().ByName("TestUnregisteredModule") } -var _ protoreflect.Message = (*fastReflection_SayHelloResponse)(nil) +var _ protoreflect.Message = (*fastReflection_TestUnregisteredModule)(nil) -type fastReflection_SayHelloResponse SayHelloResponse +type fastReflection_TestUnregisteredModule TestUnregisteredModule -func (x *SayHelloResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SayHelloResponse)(x) +func (x *TestUnregisteredModule) ProtoReflect() protoreflect.Message { + return (*fastReflection_TestUnregisteredModule)(x) } -func (x *SayHelloResponse) slowProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[3] +func (x *TestUnregisteredModule) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1304,43 +1110,43 @@ func (x *SayHelloResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SayHelloResponse_messageType fastReflection_SayHelloResponse_messageType -var _ protoreflect.MessageType = fastReflection_SayHelloResponse_messageType{} +var _fastReflection_TestUnregisteredModule_messageType fastReflection_TestUnregisteredModule_messageType +var _ protoreflect.MessageType = fastReflection_TestUnregisteredModule_messageType{} -type fastReflection_SayHelloResponse_messageType struct{} +type fastReflection_TestUnregisteredModule_messageType struct{} -func (x fastReflection_SayHelloResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SayHelloResponse)(nil) +func (x fastReflection_TestUnregisteredModule_messageType) Zero() protoreflect.Message { + return (*fastReflection_TestUnregisteredModule)(nil) } -func (x fastReflection_SayHelloResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SayHelloResponse) +func (x fastReflection_TestUnregisteredModule_messageType) New() protoreflect.Message { + return new(fastReflection_TestUnregisteredModule) } -func (x fastReflection_SayHelloResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SayHelloResponse +func (x fastReflection_TestUnregisteredModule_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TestUnregisteredModule } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SayHelloResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SayHelloResponse +func (x *fastReflection_TestUnregisteredModule) Descriptor() protoreflect.MessageDescriptor { + return md_TestUnregisteredModule } // 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_SayHelloResponse) Type() protoreflect.MessageType { - return _fastReflection_SayHelloResponse_messageType +func (x *fastReflection_TestUnregisteredModule) Type() protoreflect.MessageType { + return _fastReflection_TestUnregisteredModule_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SayHelloResponse) New() protoreflect.Message { - return new(fastReflection_SayHelloResponse) +func (x *fastReflection_TestUnregisteredModule) New() protoreflect.Message { + return new(fastReflection_TestUnregisteredModule) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SayHelloResponse) Interface() protoreflect.ProtoMessage { - return (*SayHelloResponse)(x) +func (x *fastReflection_TestUnregisteredModule) Interface() protoreflect.ProtoMessage { + return (*TestUnregisteredModule)(x) } // Range iterates over every populated field in an undefined order, @@ -1348,13 +1154,7 @@ func (x *fastReflection_SayHelloResponse) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SayHelloResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Greeting != "" { - value := protoreflect.ValueOfString(x.Greeting) - if !f(fd_SayHelloResponse_greeting, value) { - return - } - } +func (x *fastReflection_TestUnregisteredModule) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1368,15 +1168,13 @@ func (x *fastReflection_SayHelloResponse) Range(f func(protoreflect.FieldDescrip // 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_SayHelloResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TestUnregisteredModule) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testdata.SayHelloResponse.greeting": - return x.Greeting != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) } - panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestUnregisteredModule does not contain field %s", fd.FullName())) } } @@ -1386,15 +1184,13 @@ func (x *fastReflection_SayHelloResponse) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SayHelloResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TestUnregisteredModule) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testdata.SayHelloResponse.greeting": - x.Greeting = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) } - panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestUnregisteredModule does not contain field %s", fd.FullName())) } } @@ -1404,16 +1200,13 @@ func (x *fastReflection_SayHelloResponse) Clear(fd protoreflect.FieldDescriptor) // 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_SayHelloResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestUnregisteredModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testdata.SayHelloResponse.greeting": - value := x.Greeting - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) } - panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.TestUnregisteredModule does not contain field %s", descriptor.FullName())) } } @@ -1427,15 +1220,13 @@ func (x *fastReflection_SayHelloResponse) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SayHelloResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TestUnregisteredModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testdata.SayHelloResponse.greeting": - x.Greeting = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) } - panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestUnregisteredModule does not contain field %s", fd.FullName())) } } @@ -1449,40 +1240,36 @@ func (x *fastReflection_SayHelloResponse) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SayHelloResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestUnregisteredModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.SayHelloResponse.greeting": - panic(fmt.Errorf("field greeting of message testdata.SayHelloResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) } - panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_SayHelloResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestUnregisteredModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.SayHelloResponse.greeting": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestUnregisteredModule")) } - panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestUnregisteredModule 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_SayHelloResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TestUnregisteredModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testdata.SayHelloResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.TestUnregisteredModule", d.FullName())) } panic("unreachable") } @@ -1490,7 +1277,7 @@ func (x *fastReflection_SayHelloResponse) WhichOneof(d protoreflect.OneofDescrip // 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_SayHelloResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TestUnregisteredModule) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1501,7 +1288,7 @@ func (x *fastReflection_SayHelloResponse) 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_SayHelloResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TestUnregisteredModule) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1513,7 +1300,7 @@ func (x *fastReflection_SayHelloResponse) SetUnknown(fields protoreflect.RawFiel // 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_SayHelloResponse) IsValid() bool { +func (x *fastReflection_TestUnregisteredModule) IsValid() bool { return x != nil } @@ -1523,9 +1310,9 @@ func (x *fastReflection_SayHelloResponse) 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_SayHelloResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TestUnregisteredModule) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SayHelloResponse) + x := input.Message.Interface().(*TestUnregisteredModule) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1537,10 +1324,6 @@ func (x *fastReflection_SayHelloResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Greeting) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1551,7 +1334,7 @@ func (x *fastReflection_SayHelloResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SayHelloResponse) + x := input.Message.Interface().(*TestUnregisteredModule) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1570,13 +1353,6 @@ func (x *fastReflection_SayHelloResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Greeting) > 0 { - i -= len(x.Greeting) - copy(dAtA[i:], x.Greeting) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Greeting))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1588,7 +1364,7 @@ func (x *fastReflection_SayHelloResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SayHelloResponse) + x := input.Message.Interface().(*TestUnregisteredModule) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1620,44 +1396,12 @@ func (x *fastReflection_SayHelloResponse) 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: SayHelloResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestUnregisteredModule: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SayHelloResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestUnregisteredModule: 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 Greeting", 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.Greeting = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1694,26 +1438,24 @@ func (x *fastReflection_SayHelloResponse) ProtoMethods() *protoiface.Methods { } var ( - md_TestAnyRequest protoreflect.MessageDescriptor - fd_TestAnyRequest_any_animal protoreflect.FieldDescriptor + md_TestNoModuleOptionModule protoreflect.MessageDescriptor ) func init() { - file_query_proto_init() - md_TestAnyRequest = File_query_proto.Messages().ByName("TestAnyRequest") - fd_TestAnyRequest_any_animal = md_TestAnyRequest.Fields().ByName("any_animal") + file_testpb_test_proto_init() + md_TestNoModuleOptionModule = File_testpb_test_proto.Messages().ByName("TestNoModuleOptionModule") } -var _ protoreflect.Message = (*fastReflection_TestAnyRequest)(nil) +var _ protoreflect.Message = (*fastReflection_TestNoModuleOptionModule)(nil) -type fastReflection_TestAnyRequest TestAnyRequest +type fastReflection_TestNoModuleOptionModule TestNoModuleOptionModule -func (x *TestAnyRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestAnyRequest)(x) +func (x *TestNoModuleOptionModule) ProtoReflect() protoreflect.Message { + return (*fastReflection_TestNoModuleOptionModule)(x) } -func (x *TestAnyRequest) slowProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[4] +func (x *TestNoModuleOptionModule) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1724,43 +1466,43 @@ func (x *TestAnyRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TestAnyRequest_messageType fastReflection_TestAnyRequest_messageType -var _ protoreflect.MessageType = fastReflection_TestAnyRequest_messageType{} +var _fastReflection_TestNoModuleOptionModule_messageType fastReflection_TestNoModuleOptionModule_messageType +var _ protoreflect.MessageType = fastReflection_TestNoModuleOptionModule_messageType{} -type fastReflection_TestAnyRequest_messageType struct{} +type fastReflection_TestNoModuleOptionModule_messageType struct{} -func (x fastReflection_TestAnyRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestAnyRequest)(nil) +func (x fastReflection_TestNoModuleOptionModule_messageType) Zero() protoreflect.Message { + return (*fastReflection_TestNoModuleOptionModule)(nil) } -func (x fastReflection_TestAnyRequest_messageType) New() protoreflect.Message { - return new(fastReflection_TestAnyRequest) +func (x fastReflection_TestNoModuleOptionModule_messageType) New() protoreflect.Message { + return new(fastReflection_TestNoModuleOptionModule) } -func (x fastReflection_TestAnyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestAnyRequest +func (x fastReflection_TestNoModuleOptionModule_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TestNoModuleOptionModule } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TestAnyRequest) Descriptor() protoreflect.MessageDescriptor { - return md_TestAnyRequest +func (x *fastReflection_TestNoModuleOptionModule) Descriptor() protoreflect.MessageDescriptor { + return md_TestNoModuleOptionModule } // 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_TestAnyRequest) Type() protoreflect.MessageType { - return _fastReflection_TestAnyRequest_messageType +func (x *fastReflection_TestNoModuleOptionModule) Type() protoreflect.MessageType { + return _fastReflection_TestNoModuleOptionModule_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestAnyRequest) New() protoreflect.Message { - return new(fastReflection_TestAnyRequest) +func (x *fastReflection_TestNoModuleOptionModule) New() protoreflect.Message { + return new(fastReflection_TestNoModuleOptionModule) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TestAnyRequest) Interface() protoreflect.ProtoMessage { - return (*TestAnyRequest)(x) +func (x *fastReflection_TestNoModuleOptionModule) Interface() protoreflect.ProtoMessage { + return (*TestNoModuleOptionModule)(x) } // Range iterates over every populated field in an undefined order, @@ -1768,13 +1510,7 @@ func (x *fastReflection_TestAnyRequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TestAnyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AnyAnimal != nil { - value := protoreflect.ValueOfMessage(x.AnyAnimal.ProtoReflect()) - if !f(fd_TestAnyRequest_any_animal, value) { - return - } - } +func (x *fastReflection_TestNoModuleOptionModule) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1788,15 +1524,13 @@ func (x *fastReflection_TestAnyRequest) Range(f func(protoreflect.FieldDescripto // 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_TestAnyRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TestNoModuleOptionModule) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testdata.TestAnyRequest.any_animal": - return x.AnyAnimal != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) } - panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoModuleOptionModule does not contain field %s", fd.FullName())) } } @@ -1806,15 +1540,13 @@ func (x *fastReflection_TestAnyRequest) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TestAnyRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TestNoModuleOptionModule) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testdata.TestAnyRequest.any_animal": - x.AnyAnimal = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) } - panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoModuleOptionModule does not contain field %s", fd.FullName())) } } @@ -1824,16 +1556,13 @@ func (x *fastReflection_TestAnyRequest) Clear(fd protoreflect.FieldDescriptor) { // 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_TestAnyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestNoModuleOptionModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testdata.TestAnyRequest.any_animal": - value := x.AnyAnimal - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) } - panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.TestNoModuleOptionModule does not contain field %s", descriptor.FullName())) } } @@ -1847,15 +1576,13 @@ func (x *fastReflection_TestAnyRequest) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TestAnyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TestNoModuleOptionModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testdata.TestAnyRequest.any_animal": - x.AnyAnimal = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) } - panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoModuleOptionModule does not contain field %s", fd.FullName())) } } @@ -1869,44 +1596,36 @@ func (x *fastReflection_TestAnyRequest) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TestAnyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestNoModuleOptionModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.TestAnyRequest.any_animal": - if x.AnyAnimal == nil { - x.AnyAnimal = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.AnyAnimal.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) } - panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestAnyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestNoModuleOptionModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.TestAnyRequest.any_animal": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoModuleOptionModule")) } - panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoModuleOptionModule 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_TestAnyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TestNoModuleOptionModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestAnyRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.TestNoModuleOptionModule", d.FullName())) } panic("unreachable") } @@ -1914,7 +1633,7 @@ func (x *fastReflection_TestAnyRequest) WhichOneof(d protoreflect.OneofDescripto // 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_TestAnyRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TestNoModuleOptionModule) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1925,7 +1644,7 @@ func (x *fastReflection_TestAnyRequest) 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_TestAnyRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TestNoModuleOptionModule) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1937,7 +1656,7 @@ func (x *fastReflection_TestAnyRequest) SetUnknown(fields protoreflect.RawFields // 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_TestAnyRequest) IsValid() bool { +func (x *fastReflection_TestNoModuleOptionModule) IsValid() bool { return x != nil } @@ -1947,9 +1666,9 @@ func (x *fastReflection_TestAnyRequest) 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_TestAnyRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TestNoModuleOptionModule) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestAnyRequest) + x := input.Message.Interface().(*TestNoModuleOptionModule) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1961,10 +1680,6 @@ func (x *fastReflection_TestAnyRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.AnyAnimal != nil { - l = options.Size(x.AnyAnimal) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1975,7 +1690,7 @@ func (x *fastReflection_TestAnyRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestAnyRequest) + x := input.Message.Interface().(*TestNoModuleOptionModule) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1994,20 +1709,6 @@ func (x *fastReflection_TestAnyRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.AnyAnimal != nil { - encoded, err := options.Marshal(x.AnyAnimal) - 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 { @@ -2019,7 +1720,7 @@ func (x *fastReflection_TestAnyRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestAnyRequest) + x := input.Message.Interface().(*TestNoModuleOptionModule) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2051,48 +1752,12 @@ func (x *fastReflection_TestAnyRequest) 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: TestAnyRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestNoModuleOptionModule: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestAnyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestNoModuleOptionModule: 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 AnyAnimal", 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.AnyAnimal == nil { - x.AnyAnimal = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AnyAnimal); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2129,26 +1794,24 @@ func (x *fastReflection_TestAnyRequest) ProtoMethods() *protoiface.Methods { } var ( - md_TestAnyResponse protoreflect.MessageDescriptor - fd_TestAnyResponse_has_animal protoreflect.FieldDescriptor + md_TestNoGoImportModule protoreflect.MessageDescriptor ) func init() { - file_query_proto_init() - md_TestAnyResponse = File_query_proto.Messages().ByName("TestAnyResponse") - fd_TestAnyResponse_has_animal = md_TestAnyResponse.Fields().ByName("has_animal") + file_testpb_test_proto_init() + md_TestNoGoImportModule = File_testpb_test_proto.Messages().ByName("TestNoGoImportModule") } -var _ protoreflect.Message = (*fastReflection_TestAnyResponse)(nil) +var _ protoreflect.Message = (*fastReflection_TestNoGoImportModule)(nil) -type fastReflection_TestAnyResponse TestAnyResponse +type fastReflection_TestNoGoImportModule TestNoGoImportModule -func (x *TestAnyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestAnyResponse)(x) +func (x *TestNoGoImportModule) ProtoReflect() protoreflect.Message { + return (*fastReflection_TestNoGoImportModule)(x) } -func (x *TestAnyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_query_proto_msgTypes[5] +func (x *TestNoGoImportModule) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2159,43 +1822,43 @@ func (x *TestAnyResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TestAnyResponse_messageType fastReflection_TestAnyResponse_messageType -var _ protoreflect.MessageType = fastReflection_TestAnyResponse_messageType{} +var _fastReflection_TestNoGoImportModule_messageType fastReflection_TestNoGoImportModule_messageType +var _ protoreflect.MessageType = fastReflection_TestNoGoImportModule_messageType{} -type fastReflection_TestAnyResponse_messageType struct{} +type fastReflection_TestNoGoImportModule_messageType struct{} -func (x fastReflection_TestAnyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestAnyResponse)(nil) +func (x fastReflection_TestNoGoImportModule_messageType) Zero() protoreflect.Message { + return (*fastReflection_TestNoGoImportModule)(nil) } -func (x fastReflection_TestAnyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_TestAnyResponse) +func (x fastReflection_TestNoGoImportModule_messageType) New() protoreflect.Message { + return new(fastReflection_TestNoGoImportModule) } -func (x fastReflection_TestAnyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestAnyResponse +func (x fastReflection_TestNoGoImportModule_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TestNoGoImportModule } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TestAnyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_TestAnyResponse +func (x *fastReflection_TestNoGoImportModule) Descriptor() protoreflect.MessageDescriptor { + return md_TestNoGoImportModule } // 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_TestAnyResponse) Type() protoreflect.MessageType { - return _fastReflection_TestAnyResponse_messageType +func (x *fastReflection_TestNoGoImportModule) Type() protoreflect.MessageType { + return _fastReflection_TestNoGoImportModule_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestAnyResponse) New() protoreflect.Message { - return new(fastReflection_TestAnyResponse) +func (x *fastReflection_TestNoGoImportModule) New() protoreflect.Message { + return new(fastReflection_TestNoGoImportModule) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TestAnyResponse) Interface() protoreflect.ProtoMessage { - return (*TestAnyResponse)(x) +func (x *fastReflection_TestNoGoImportModule) Interface() protoreflect.ProtoMessage { + return (*TestNoGoImportModule)(x) } // Range iterates over every populated field in an undefined order, @@ -2203,13 +1866,7 @@ func (x *fastReflection_TestAnyResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TestAnyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HasAnimal != nil { - value := protoreflect.ValueOfMessage(x.HasAnimal.ProtoReflect()) - if !f(fd_TestAnyResponse_has_animal, value) { - return - } - } +func (x *fastReflection_TestNoGoImportModule) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2223,15 +1880,13 @@ func (x *fastReflection_TestAnyResponse) Range(f func(protoreflect.FieldDescript // 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_TestAnyResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TestNoGoImportModule) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "testdata.TestAnyResponse.has_animal": - return x.HasAnimal != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) } - panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoGoImportModule does not contain field %s", fd.FullName())) } } @@ -2241,15 +1896,13 @@ func (x *fastReflection_TestAnyResponse) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TestAnyResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TestNoGoImportModule) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "testdata.TestAnyResponse.has_animal": - x.HasAnimal = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) } - panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoGoImportModule does not contain field %s", fd.FullName())) } } @@ -2259,16 +1912,13 @@ func (x *fastReflection_TestAnyResponse) Clear(fd protoreflect.FieldDescriptor) // 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_TestAnyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestNoGoImportModule) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "testdata.TestAnyResponse.has_animal": - value := x.HasAnimal - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) } - panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message testpb.TestNoGoImportModule does not contain field %s", descriptor.FullName())) } } @@ -2282,15 +1932,13 @@ func (x *fastReflection_TestAnyResponse) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TestAnyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TestNoGoImportModule) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "testdata.TestAnyResponse.has_animal": - x.HasAnimal = value.Message().Interface().(*HasAnimal) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) } - panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoGoImportModule does not contain field %s", fd.FullName())) } } @@ -2304,44 +1952,36 @@ func (x *fastReflection_TestAnyResponse) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TestAnyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestNoGoImportModule) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.TestAnyResponse.has_animal": - if x.HasAnimal == nil { - x.HasAnimal = new(HasAnimal) - } - return protoreflect.ValueOfMessage(x.HasAnimal.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) } - panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestAnyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TestNoGoImportModule) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "testdata.TestAnyResponse.has_animal": - m := new(HasAnimal) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.TestNoGoImportModule")) } - panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message testpb.TestNoGoImportModule 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_TestAnyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TestNoGoImportModule) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestAnyResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in testpb.TestNoGoImportModule", d.FullName())) } panic("unreachable") } @@ -2349,7 +1989,7 @@ func (x *fastReflection_TestAnyResponse) WhichOneof(d protoreflect.OneofDescript // 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_TestAnyResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TestNoGoImportModule) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2360,7 +2000,7 @@ func (x *fastReflection_TestAnyResponse) 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_TestAnyResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TestNoGoImportModule) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2372,7 +2012,7 @@ func (x *fastReflection_TestAnyResponse) SetUnknown(fields protoreflect.RawField // 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_TestAnyResponse) IsValid() bool { +func (x *fastReflection_TestNoGoImportModule) IsValid() bool { return x != nil } @@ -2382,9 +2022,9 @@ func (x *fastReflection_TestAnyResponse) 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_TestAnyResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TestNoGoImportModule) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestAnyResponse) + x := input.Message.Interface().(*TestNoGoImportModule) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2396,10 +2036,6 @@ func (x *fastReflection_TestAnyResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.HasAnimal != nil { - l = options.Size(x.HasAnimal) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2410,7 +2046,7 @@ func (x *fastReflection_TestAnyResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestAnyResponse) + x := input.Message.Interface().(*TestNoGoImportModule) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2429,20 +2065,6 @@ func (x *fastReflection_TestAnyResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.HasAnimal != nil { - encoded, err := options.Marshal(x.HasAnimal) - 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 { @@ -2454,7 +2076,7 @@ func (x *fastReflection_TestAnyResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestAnyResponse) + x := input.Message.Interface().(*TestNoGoImportModule) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2486,48 +2108,12 @@ func (x *fastReflection_TestAnyResponse) 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: TestAnyResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestNoGoImportModule: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestAnyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestNoGoImportModule: 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 HasAnimal", 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.HasAnimal == nil { - x.HasAnimal = &HasAnimal{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HasAnimal); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2567,7 +2153,7 @@ func (x *fastReflection_TestAnyResponse) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: query.proto +// source: testpb/test.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -2576,315 +2162,235 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type EchoRequest struct { +type TestRuntimeModule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } -func (x *EchoRequest) Reset() { - *x = EchoRequest{} +func (x *TestRuntimeModule) Reset() { + *x = TestRuntimeModule{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[0] + mi := &file_testpb_test_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EchoRequest) String() string { +func (x *TestRuntimeModule) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EchoRequest) ProtoMessage() {} +func (*TestRuntimeModule) ProtoMessage() {} -// Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead. -func (*EchoRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{0} +// Deprecated: Use TestRuntimeModule.ProtoReflect.Descriptor instead. +func (*TestRuntimeModule) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{0} } -func (x *EchoRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type EchoResponse struct { +type TestModuleA struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } -func (x *EchoResponse) Reset() { - *x = EchoResponse{} +func (x *TestModuleA) Reset() { + *x = TestModuleA{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[1] + mi := &file_testpb_test_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EchoResponse) String() string { +func (x *TestModuleA) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EchoResponse) ProtoMessage() {} +func (*TestModuleA) ProtoMessage() {} -// Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead. -func (*EchoResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{1} +// Deprecated: Use TestModuleA.ProtoReflect.Descriptor instead. +func (*TestModuleA) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{1} } -func (x *EchoResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type SayHelloRequest struct { +type TestModuleB struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (x *SayHelloRequest) Reset() { - *x = SayHelloRequest{} +func (x *TestModuleB) Reset() { + *x = TestModuleB{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[2] + mi := &file_testpb_test_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SayHelloRequest) String() string { +func (x *TestModuleB) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SayHelloRequest) ProtoMessage() {} +func (*TestModuleB) ProtoMessage() {} -// Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead. -func (*SayHelloRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{2} -} - -func (x *SayHelloRequest) GetName() string { - if x != nil { - return x.Name - } - return "" +// Deprecated: Use TestModuleB.ProtoReflect.Descriptor instead. +func (*TestModuleB) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{2} } -type SayHelloResponse struct { +type TestUnregisteredModule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` } -func (x *SayHelloResponse) Reset() { - *x = SayHelloResponse{} +func (x *TestUnregisteredModule) Reset() { + *x = TestUnregisteredModule{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[3] + mi := &file_testpb_test_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SayHelloResponse) String() string { +func (x *TestUnregisteredModule) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SayHelloResponse) ProtoMessage() {} - -// Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead. -func (*SayHelloResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{3} -} +func (*TestUnregisteredModule) ProtoMessage() {} -func (x *SayHelloResponse) GetGreeting() string { - if x != nil { - return x.Greeting - } - return "" +// Deprecated: Use TestUnregisteredModule.ProtoReflect.Descriptor instead. +func (*TestUnregisteredModule) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{3} } -type TestAnyRequest struct { +type TestNoModuleOptionModule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - AnyAnimal *anypb.Any `protobuf:"bytes,1,opt,name=any_animal,json=anyAnimal,proto3" json:"any_animal,omitempty"` } -func (x *TestAnyRequest) Reset() { - *x = TestAnyRequest{} +func (x *TestNoModuleOptionModule) Reset() { + *x = TestNoModuleOptionModule{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[4] + mi := &file_testpb_test_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TestAnyRequest) String() string { +func (x *TestNoModuleOptionModule) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TestAnyRequest) ProtoMessage() {} - -// Deprecated: Use TestAnyRequest.ProtoReflect.Descriptor instead. -func (*TestAnyRequest) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{4} -} +func (*TestNoModuleOptionModule) ProtoMessage() {} -func (x *TestAnyRequest) GetAnyAnimal() *anypb.Any { - if x != nil { - return x.AnyAnimal - } - return nil +// Deprecated: Use TestNoModuleOptionModule.ProtoReflect.Descriptor instead. +func (*TestNoModuleOptionModule) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{4} } -type TestAnyResponse struct { +type TestNoGoImportModule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - HasAnimal *HasAnimal `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` } -func (x *TestAnyResponse) Reset() { - *x = TestAnyResponse{} +func (x *TestNoGoImportModule) Reset() { + *x = TestNoGoImportModule{} if protoimpl.UnsafeEnabled { - mi := &file_query_proto_msgTypes[5] + mi := &file_testpb_test_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TestAnyResponse) String() string { +func (x *TestNoGoImportModule) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TestAnyResponse) ProtoMessage() {} - -// Deprecated: Use TestAnyResponse.ProtoReflect.Descriptor instead. -func (*TestAnyResponse) Descriptor() ([]byte, []int) { - return file_query_proto_rawDescGZIP(), []int{5} -} - -func (x *TestAnyResponse) GetHasAnimal() *HasAnimal { - if x != nil { - return x.HasAnimal - } - return nil -} - -var File_query_proto protoreflect.FileDescriptor - -var file_query_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x45, - 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, - 0x6f, 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, 0x2e, 0x0a, 0x10, - 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x45, 0x0a, 0x0e, - 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, - 0x0a, 0x0a, 0x61, 0x6e, 0x79, 0x5f, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 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, 0x52, 0x09, 0x61, 0x6e, 0x79, 0x41, 0x6e, 0x69, - 0x6d, 0x61, 0x6c, 0x22, 0x45, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x6e, - 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x48, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x52, - 0x09, 0x68, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x32, 0xc1, 0x01, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x35, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x15, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, - 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x53, - 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x19, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x61, - 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, - 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x12, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x91, - 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, - 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x75, - 0x6c, 0x73, 0x61, 0x72, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x54, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, - 0xe2, 0x02, 0x14, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, - 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (*TestNoGoImportModule) ProtoMessage() {} + +// Deprecated: Use TestNoGoImportModule.ProtoReflect.Descriptor instead. +func (*TestNoGoImportModule) Descriptor() ([]byte, []int) { + return file_testpb_test_proto_rawDescGZIP(), []int{5} +} + +var File_testpb_test_proto protoreflect.FileDescriptor + +var file_testpb_test_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x20, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, + 0x11, 0x54, 0x65, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x3a, 0x29, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x22, 0x38, 0x0a, + 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x3a, 0x29, 0xba, 0xc0, + 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x22, 0x38, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x3a, 0x29, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x22, 0x43, 0x0a, 0x16, 0x54, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x29, 0xba, 0xc0, 0x96, + 0xda, 0x01, 0x23, 0x0a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x65, 0x73, 0x74, 0x4e, 0x6f, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x22, 0x1e, 0x0a, 0x14, 0x54, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x47, 0x6f, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x06, 0xba, 0xc0, 0x96, 0xda, + 0x01, 0x00, 0x42, 0x72, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x42, 0x09, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x21, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, + 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, + 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_query_proto_rawDescOnce sync.Once - file_query_proto_rawDescData = file_query_proto_rawDesc + file_testpb_test_proto_rawDescOnce sync.Once + file_testpb_test_proto_rawDescData = file_testpb_test_proto_rawDesc ) -func file_query_proto_rawDescGZIP() []byte { - file_query_proto_rawDescOnce.Do(func() { - file_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_query_proto_rawDescData) +func file_testpb_test_proto_rawDescGZIP() []byte { + file_testpb_test_proto_rawDescOnce.Do(func() { + file_testpb_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_testpb_test_proto_rawDescData) }) - return file_query_proto_rawDescData -} - -var file_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_query_proto_goTypes = []interface{}{ - (*EchoRequest)(nil), // 0: testdata.EchoRequest - (*EchoResponse)(nil), // 1: testdata.EchoResponse - (*SayHelloRequest)(nil), // 2: testdata.SayHelloRequest - (*SayHelloResponse)(nil), // 3: testdata.SayHelloResponse - (*TestAnyRequest)(nil), // 4: testdata.TestAnyRequest - (*TestAnyResponse)(nil), // 5: testdata.TestAnyResponse - (*anypb.Any)(nil), // 6: google.protobuf.Any - (*HasAnimal)(nil), // 7: testdata.HasAnimal -} -var file_query_proto_depIdxs = []int32{ - 6, // 0: testdata.TestAnyRequest.any_animal:type_name -> google.protobuf.Any - 7, // 1: testdata.TestAnyResponse.has_animal:type_name -> testdata.HasAnimal - 0, // 2: testdata.Query.Echo:input_type -> testdata.EchoRequest - 2, // 3: testdata.Query.SayHello:input_type -> testdata.SayHelloRequest - 4, // 4: testdata.Query.TestAny:input_type -> testdata.TestAnyRequest - 1, // 5: testdata.Query.Echo:output_type -> testdata.EchoResponse - 3, // 6: testdata.Query.SayHello:output_type -> testdata.SayHelloResponse - 5, // 7: testdata.Query.TestAny:output_type -> testdata.TestAnyResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_query_proto_init() } -func file_query_proto_init() { - if File_query_proto != nil { + return file_testpb_test_proto_rawDescData +} + +var file_testpb_test_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_testpb_test_proto_goTypes = []interface{}{ + (*TestRuntimeModule)(nil), // 0: testpb.TestRuntimeModule + (*TestModuleA)(nil), // 1: testpb.TestModuleA + (*TestModuleB)(nil), // 2: testpb.TestModuleB + (*TestUnregisteredModule)(nil), // 3: testpb.TestUnregisteredModule + (*TestNoModuleOptionModule)(nil), // 4: testpb.TestNoModuleOptionModule + (*TestNoGoImportModule)(nil), // 5: testpb.TestNoGoImportModule +} +var file_testpb_test_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_testpb_test_proto_init() } +func file_testpb_test_proto_init() { + if File_testpb_test_proto != nil { return } - file_testdata_proto_init() if !protoimpl.UnsafeEnabled { - file_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoRequest); i { + file_testpb_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestRuntimeModule); i { case 0: return &v.state case 1: @@ -2895,8 +2401,8 @@ func file_query_proto_init() { return nil } } - file_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoResponse); i { + file_testpb_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestModuleA); i { case 0: return &v.state case 1: @@ -2907,8 +2413,8 @@ func file_query_proto_init() { return nil } } - file_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SayHelloRequest); i { + file_testpb_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestModuleB); i { case 0: return &v.state case 1: @@ -2919,8 +2425,8 @@ func file_query_proto_init() { return nil } } - file_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SayHelloResponse); i { + file_testpb_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestUnregisteredModule); i { case 0: return &v.state case 1: @@ -2931,8 +2437,8 @@ func file_query_proto_init() { return nil } } - file_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestAnyRequest); i { + file_testpb_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestNoModuleOptionModule); i { case 0: return &v.state case 1: @@ -2943,8 +2449,8 @@ func file_query_proto_init() { return nil } } - file_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestAnyResponse); i { + file_testpb_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestNoGoImportModule); i { case 0: return &v.state case 1: @@ -2960,18 +2466,18 @@ func file_query_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_query_proto_rawDesc, + RawDescriptor: file_testpb_test_proto_rawDesc, NumEnums: 0, NumMessages: 6, NumExtensions: 0, - NumServices: 1, + NumServices: 0, }, - GoTypes: file_query_proto_goTypes, - DependencyIndexes: file_query_proto_depIdxs, - MessageInfos: file_query_proto_msgTypes, + GoTypes: file_testpb_test_proto_goTypes, + DependencyIndexes: file_testpb_test_proto_depIdxs, + MessageInfos: file_testpb_test_proto_msgTypes, }.Build() - File_query_proto = out.File - file_query_proto_rawDesc = nil - file_query_proto_goTypes = nil - file_query_proto_depIdxs = nil + File_testpb_test_proto = out.File + file_testpb_test_proto_rawDesc = nil + file_testpb_test_proto_goTypes = nil + file_testpb_test_proto_depIdxs = nil } diff --git a/cosmovisor/CHANGELOG.md b/cosmovisor/CHANGELOG.md index 5eb4e921ba5b..60be65797106 100644 --- a/cosmovisor/CHANGELOG.md +++ b/cosmovisor/CHANGELOG.md @@ -37,6 +37,11 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Features + +* [\#11823](https://github.com/cosmos/cosmos-sdk/pull/11823) Refactor `cosmovisor` CLI to use `cobra`. +* [\#11731](https://github.com/cosmos/cosmos-sdk/pull/11731) `cosmovisor version -o json` returns the cosmovisor version and the result of `simd --output json --long` in one JSON object. + ## v1.1.0 2022-10-02 ### Features diff --git a/cosmovisor/README.md b/cosmovisor/README.md index bf5d00933b9d..29dc3d000b6b 100644 --- a/cosmovisor/README.md +++ b/cosmovisor/README.md @@ -37,7 +37,7 @@ To install a previous version, you can specify the version. IMPORTANT: Chains th go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v0.1.0 ``` -You can run `cosmovisor --version` to check the Cosmovisor version (works only with Cosmovisor >=1.0.0). +You can run `cosmovisor version` to check the Cosmovisor version (works only with Cosmovisor >1.1.0). You can also install from source by pulling the cosmos-sdk repository and switching to the correct version and building as follows: @@ -62,7 +62,7 @@ The first argument passed to `cosmovisor` is the action for `cosmovisor` to take * `help`, `--help`, or `-h` - Output `cosmovisor` help information and check your `cosmovisor` configuration. * `run` - Run the configured binary using the rest of the provided arguments. -* `version`, or `--version` - Output the `cosmovisor` version and also run the binary with the `version` argument. +* `version` - Output the `cosmovisor` version and also run the binary with the `version` argument. All arguments passed to `cosmovisor run` will be passed to the application binary (as a subprocess). `cosmovisor` will return `/dev/stdout` and `/dev/stderr` of the subprocess as its own. For this reason, `cosmovisor run` cannot accept any command-line arguments other than those available to the application binary. @@ -209,7 +209,6 @@ You can also use `sha512sum` if you would prefer to use longer hashes, or `md5su The following instructions provide a demonstration of `cosmovisor` using the simulation application (`simapp`) shipped with the Cosmos SDK's source code. The following commands are to be run from within the `cosmos-sdk` repository. - ### Chain Setup Let's create a new chain using the `v0.44` version of simapp (the Cosmos SDK demo app): @@ -234,7 +233,7 @@ Set up app config: ``` Initialize the node and overwrite any previous genesis file (never do this in a production environment): - + ```sh @@ -289,17 +288,15 @@ cp ./build/simd $DAEMON_HOME/cosmovisor/genesis/bin Now you can run cosmovisor with simapp v0.44: - ```sh cosmovisor run start ``` - #### Update App Update app to the latest version (e.g. v0.45). -Next, we can add a migration - which is defined using `x/upgrade` [upgrade plan](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/upgrade.md) (you may refer to a past version if you are using an older Cosmos SDK release). In a migration we can do any deterministic state change. +Next, we can add a migration - which is defined using `x/upgrade` [upgrade plan](https://github.com/cosmos/cosmos-sdk/blob/main/docs/core/upgrade.md) (you may refer to a past version if you are using an older Cosmos SDK release). In a migration we can do any deterministic state change. Build the new version `simd` binary: @@ -314,7 +311,6 @@ mkdir -p $DAEMON_HOME/cosmovisor/upgrades/test1/bin cp ./build/simd $DAEMON_HOME/cosmovisor/upgrades/test1/bin ``` - Open a new terminal window and submit an upgrade proposal along with a deposit and a vote (these commands must be run within 20 seconds of each other): ```sh diff --git a/cosmovisor/RELEASE_NOTES.md b/cosmovisor/RELEASE_NOTES.md index 95e1ddf9538f..ecec04998123 100644 --- a/cosmovisor/RELEASE_NOTES.md +++ b/cosmovisor/RELEASE_NOTES.md @@ -17,7 +17,7 @@ The existing way of starting an app with Cosmovisor has been deprecated (`cosmov ### New Features -We added a new configuration option: `DAEMON_BACKUP_DIR` (as env variable). When set, Cosmovisor will create backup the app data backup in that directory (instead of using the app home directory) before running the update. See the [README](https://github.com/cosmos/cosmos-sdk/blob/master/cosmovisor/README.md#command-line-arguments-and-environment-variables) file for more details. +We added a new configuration option: `DAEMON_BACKUP_DIR` (as env variable). When set, Cosmovisor will create backup the app data backup in that directory (instead of using the app home directory) before running the update. See the [README](https://github.com/cosmos/cosmos-sdk/blob/main/cosmovisor/README.md#command-line-arguments-and-environment-variables) file for more details. ### Bug Fixes diff --git a/cosmovisor/args.go b/cosmovisor/args.go index f3643cdbdbf6..c9a0d36a9279 100644 --- a/cosmovisor/args.go +++ b/cosmovisor/args.go @@ -11,11 +11,10 @@ import ( "strings" "time" - "github.com/rs/zerolog" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/rs/zerolog" ) // environment variable names @@ -184,11 +183,11 @@ func GetConfigFromEnv() (*Config, error) { } // LogConfigOrError logs either the config details or the error. -func LogConfigOrError(logger zerolog.Logger, cfg *Config, err error) { +func LogConfigOrError(logger *zerolog.Logger, cfg *Config, err error) { if cfg == nil && err == nil { return } - logger.Info().Msg("Configuration:") + logger.Info().Msg("configuration:") switch { case err != nil: cverrors.LogErrors(logger, "configuration errors found", err) @@ -227,9 +226,9 @@ func (cfg *Config) validate() []error { // if UnsafeSkipBackup is false, check if the DataBackupPath valid switch { case cfg.DataBackupPath == "": - errs = append(errs, errors.New(EnvDataBackupPath + " must not be empty")) + errs = append(errs, fmt.Errorf("%s must not be empty", EnvDataBackupPath)) case !filepath.IsAbs(cfg.DataBackupPath): - errs = append(errs, errors.New(cfg.DataBackupPath + " must be an absolute path")) + errs = append(errs, fmt.Errorf("%s must be an absolute path", cfg.DataBackupPath)) default: switch info, err := os.Stat(cfg.DataBackupPath); { case err != nil: @@ -281,9 +280,9 @@ func (cfg *Config) SetCurrentUpgrade(u upgradetypes.Plan) error { return f.Close() } -func (cfg *Config) UpgradeInfo() upgradetypes.Plan { +func (cfg *Config) UpgradeInfo() (upgradetypes.Plan, error) { if cfg.currentUpgrade.Name != "" { - return cfg.currentUpgrade + return cfg.currentUpgrade, nil } filename := filepath.Join(cfg.Root(), currentLink, upgradekeeper.UpgradeInfoFileName) @@ -300,12 +299,11 @@ func (cfg *Config) UpgradeInfo() upgradetypes.Plan { goto returnError } cfg.currentUpgrade = u - return cfg.currentUpgrade + return cfg.currentUpgrade, nil returnError: - Logger.Error().Err(err).Str("filename", filename).Msg("failed to read") cfg.currentUpgrade.Name = "_" - return cfg.currentUpgrade + return cfg.currentUpgrade, fmt.Errorf("failed to read %q: %w", filename, err) } // checks and validates env option diff --git a/cosmovisor/args_test.go b/cosmovisor/args_test.go index 67226df6dc7b..136440a63251 100644 --- a/cosmovisor/args_test.go +++ b/cosmovisor/args_test.go @@ -570,9 +570,10 @@ func (s *argsTestSuite) TestLogConfigOrError() { } errMulti := errors.FlattenErrors(errs...) - makeTestLogger := func(testName string, out io.Writer) zerolog.Logger { + makeTestLogger := func(testName string, out io.Writer) *zerolog.Logger { output := zerolog.ConsoleWriter{Out: out, TimeFormat: time.Kitchen, NoColor: true} - return zerolog.New(output).With().Str("test", testName).Timestamp().Logger() + logger := zerolog.New(output).With().Str("test", testName).Timestamp().Logger() + return &logger } tests := []struct { diff --git a/cosmovisor/cmd/cosmovisor/cmd/help.go b/cosmovisor/cmd/cosmovisor/cmd/help.go deleted file mode 100644 index e25df4ee3671..000000000000 --- a/cosmovisor/cmd/cosmovisor/cmd/help.go +++ /dev/null @@ -1,47 +0,0 @@ -package cmd - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/cosmovisor" -) - -// HelpArgs are the strings that indicate a cosmovisor help command. -var HelpArgs = []string{"help", "--help", "-h"} - -// ShouldGiveHelp checks the env and provided args to see if help is needed or being requested. -// Help is needed if either cosmovisor.EnvName and/or cosmovisor.EnvHome env vars aren't set. -// Help is requested if the first arg is "help", "--help", or "-h". -func ShouldGiveHelp(arg string) bool { - return isOneOf(arg, HelpArgs) -} - -// DoHelp outputs help text -func DoHelp() { - // Not using the logger for this output because the header and footer look weird for help text. - fmt.Println(GetHelpText()) -} - -// GetHelpText creates the help text multi-line string. -func GetHelpText() string { - return fmt.Sprintf(`Cosmosvisor - A process manager for Cosmos SDK application binaries. - -Cosmovisor is a wrapper for a Cosmos SDK based App (set using the required %s env variable). -It starts the App by passing all provided arguments and monitors the %s/data/upgrade-info.json -file to perform an update. The upgrade-info.json file is created by the App x/upgrade module -when the blockchain height reaches an approved upgrade proposal. The file includes data from -the proposal. Cosmovisor interprets that data to perform an update: switch a current binary -and restart the App. - -Configuration of Cosmovisor is done through environment variables, which are -documented in: https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor/README.md - -To get help for the configured binary: - cosmovisor run help - -Available Commands: - help This help message - run Runs app passing all subsequent parameters - version Prints version of cosmovisor and the associated app. -`, cosmovisor.EnvName, cosmovisor.EnvHome) -} diff --git a/cosmovisor/cmd/cosmovisor/cmd/root.go b/cosmovisor/cmd/cosmovisor/cmd/root.go deleted file mode 100644 index 2b1921ca5657..000000000000 --- a/cosmovisor/cmd/cosmovisor/cmd/root.go +++ /dev/null @@ -1,40 +0,0 @@ -package cmd - -import ( - "strings" - - "github.com/cosmos/cosmos-sdk/cosmovisor" -) - -// RunCosmovisorCommand executes the desired cosmovisor command. -func RunCosmovisorCommand(args []string) error { - arg0 := "" - if len(args) > 0 { - arg0 = strings.TrimSpace(args[0]) - } - switch { - case IsVersionCommand(arg0): - return PrintVersion() - case ShouldGiveHelp(arg0): - DoHelp() - return nil - case IsRunCommand(arg0): - return Run(args[1:]) - } - warnRun := func() { - cosmovisor.Logger.Warn().Msg("Use of cosmovisor without the 'run' command is deprecated. Use: cosmovisor run [args]") - } - warnRun() - defer warnRun() - return Run(args) -} - -// isOneOf returns true if the given arg equals one of the provided options (ignoring case). -func isOneOf(arg string, options []string) bool { - for _, opt := range options { - if strings.EqualFold(arg, opt) { - return true - } - } - return false -} diff --git a/cosmovisor/cmd/cosmovisor/cmd/run.go b/cosmovisor/cmd/cosmovisor/cmd/run.go deleted file mode 100644 index 8912e1a9775f..000000000000 --- a/cosmovisor/cmd/cosmovisor/cmd/run.go +++ /dev/null @@ -1,39 +0,0 @@ -package cmd - -import ( - "os" - - "github.com/cosmos/cosmos-sdk/cosmovisor" -) - -// RunArgs are the strings that indicate a cosmovisor run command. -var RunArgs = []string{"run"} - -// IsRunCommand checks if the given args indicate that a run is desired. -func IsRunCommand(arg string) bool { - return isOneOf(arg, RunArgs) -} - -// Run runs the configured program with the given args and monitors it for upgrades. -func Run(args []string) error { - cfg, err := cosmovisor.GetConfigFromEnv() - if err != nil { - return err - } - launcher, err := cosmovisor.NewLauncher(cfg) - if err != nil { - return err - } - - doUpgrade, err := launcher.Run(args, os.Stdout, os.Stderr) - // if RestartAfterUpgrade, we launch after a successful upgrade (only condition LaunchProcess returns nil) - for cfg.RestartAfterUpgrade && err == nil && doUpgrade { - cosmovisor.Logger.Info().Str("app", cfg.Name).Msg("upgrade detected, relaunching") - doUpgrade, err = launcher.Run(args, os.Stdout, os.Stderr) - } - if doUpgrade && err == nil { - cosmovisor.Logger.Info().Msg("upgrade detected, DAEMON_RESTART_AFTER_UPGRADE is off. Verify new upgrade and start cosmovisor again.") - } - - return err -} diff --git a/cosmovisor/cmd/cosmovisor/cmd/run_test.go b/cosmovisor/cmd/cosmovisor/cmd/run_test.go deleted file mode 100644 index b54b38fd8fcd..000000000000 --- a/cosmovisor/cmd/cosmovisor/cmd/run_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package cmd - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestIsRunCommand(t *testing.T) { - cases := []struct { - name string - arg string - expected bool - }{ - { - name: "empty string", - arg: "", - expected: false, - }, - { - name: "random", - arg: "random", - expected: false, - }, - { - name: "run", - arg: "run", - expected: true, - }, - { - name: "run weird casing", - arg: "RUn", - expected: true, - }, - { - name: "--run", - arg: "--run", - expected: false, - }, - { - name: "help", - arg: "help", - expected: false, - }, - { - name: "-h", - arg: "-h", - expected: false, - }, - { - name: "--help", - arg: "--help", - expected: false, - }, - { - name: "version", - arg: "version", - expected: false, - }, - { - name: "--version", - arg: "--version", - expected: false, - }, - } - - for _, tc := range cases { - t.Run(fmt.Sprintf("%s - %t", tc.name, tc.expected), func(t *testing.T) { - actual := IsRunCommand(tc.arg) - require.Equal(t, tc.expected, actual) - }) - } -} - -// TODO: Write tests for func Run(args []string) error diff --git a/cosmovisor/cmd/cosmovisor/cmd/version.go b/cosmovisor/cmd/cosmovisor/cmd/version.go deleted file mode 100644 index 8f7e68f940fa..000000000000 --- a/cosmovisor/cmd/cosmovisor/cmd/version.go +++ /dev/null @@ -1,36 +0,0 @@ -package cmd - -import ( - "fmt" - "os" - "time" - - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" - "github.com/rs/zerolog" -) - -// Version represents Cosmovisor version value. Overwritten during build -var Version = "1.1.0" - -// VersionArgs is the strings that indicate a cosmovisor version command. -var VersionArgs = []string{"version", "--version"} - -// IsVersionCommand checks if the given args indicate that the version is being requested. -func IsVersionCommand(arg string) bool { - return isOneOf(arg, VersionArgs) -} - -// PrintVersion prints the cosmovisor version. -func PrintVersion() error { - fmt.Println("Cosmovisor Version: ", Version) - - if err := Run([]string{"version"}); err != nil { - // Check the config and output details or any errors. - // Not using the cosmovisor.Logger in order to ignore any level it might have set, - // and also to not have any of the extra parameters in the output. - output := zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.Kitchen} - logger := zerolog.New(output).With().Timestamp().Logger() - cverrors.LogErrors(logger, "Can't run APP version", err) - } - return nil -} diff --git a/cosmovisor/cmd/cosmovisor/cmd/version_test.go b/cosmovisor/cmd/cosmovisor/cmd/version_test.go deleted file mode 100644 index 6c842494e85f..000000000000 --- a/cosmovisor/cmd/cosmovisor/cmd/version_test.go +++ /dev/null @@ -1,85 +0,0 @@ -package cmd - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestIsVersionCommand(t *testing.T) { - cases := []struct { - name string - arg string - expected bool - }{ - { - name: "empty string", - arg: "", - expected: false, - }, - { - name: "random", - arg: "random", - expected: false, - }, - { - name: "version", - arg: "version", - expected: true, - }, - { - name: "--version", - arg: "--version", - expected: true, - }, - { - name: "version weird casing", - arg: "veRSiOn", - expected: true, - }, - { - // -v should be reserved for verbose, and should not be used for --version. - name: "-v", - arg: "-v", - expected: false, - }, - { - name: "typo", - arg: "vrsion", - expected: false, - }, - { - name: "non version command", - arg: "start", - expected: false, - }, - { - name: "help", - arg: "help", - expected: false, - }, - { - name: "-h", - arg: "-h", - expected: false, - }, - { - name: "--help", - arg: "--help", - expected: false, - }, - { - name: "run", - arg: "run", - expected: false, - }, - } - - for _, tc := range cases { - t.Run(fmt.Sprintf("%s - %t", tc.name, tc.expected), func(t *testing.T) { - actual := IsVersionCommand(tc.arg) - require.Equal(t, tc.expected, actual) - }) - } -} diff --git a/cosmovisor/cmd/cosmovisor/help.go b/cosmovisor/cmd/cosmovisor/help.go new file mode 100644 index 000000000000..25f2ca6c17b4 --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/help.go @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/cosmovisor" +) + +// GetHelpText creates the help text multi-line string. +func GetHelpText() string { + return fmt.Sprintf(`Cosmosvisor - A process manager for Cosmos SDK application binaries. + +Cosmovisor is a wrapper for a Cosmos SDK based App (set using the required %s env variable). +It starts the App by passing all provided arguments and monitors the %s/data/upgrade-info.json +file to perform an update. The upgrade-info.json file is created by the App x/upgrade module +when the blockchain height reaches an approved upgrade proposal. The file includes data from +the proposal. Cosmovisor interprets that data to perform an update: switch a current binary +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`, + cosmovisor.EnvName, cosmovisor.EnvHome, + ) +} diff --git a/cosmovisor/cmd/cosmovisor/cmd/help_test.go b/cosmovisor/cmd/cosmovisor/help_test.go similarity index 66% rename from cosmovisor/cmd/cosmovisor/cmd/help_test.go rename to cosmovisor/cmd/cosmovisor/help_test.go index ebcc252d5701..102dd798ab91 100644 --- a/cosmovisor/cmd/cosmovisor/cmd/help_test.go +++ b/cosmovisor/cmd/cosmovisor/help_test.go @@ -1,11 +1,10 @@ -package cmd +package main import ( "fmt" "os" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -88,77 +87,11 @@ func (s *HelpTestSuite) setEnv(t *testing.T, env *cosmovisorHelpEnv) { } } -func (s HelpTestSuite) TestShouldGiveHelpArg() { - initialEnv := s.clearEnv() - defer s.setEnv(nil, initialEnv) - - s.setEnv(s.T(), &cosmovisorHelpEnv{"/testhome", "testname"}) - - tests := []struct { - name string - arg string - expected bool - }{ - { - name: "empty string", - arg: "", - expected: false, - }, - { - name: "random", - arg: "random", - expected: false, - }, - { - name: "help", - arg: "help", - expected: true, - }, - { - name: "-h", - arg: "-h", - expected: true, - }, - { - name: "--help", - arg: "--help", - expected: true, - }, - { - name: "help weird casing", - arg: "hELP", - expected: true, - }, - { - name: "version", - arg: "version", - expected: false, - }, - { - name: "--version", - arg: "--version", - expected: false, - }, - { - name: "run", - arg: "run", - expected: false, - }, - } - - for _, tc := range tests { - s.T().Run(fmt.Sprintf("%s - %t", tc.name, tc.expected), func(t *testing.T) { - actual := ShouldGiveHelp(tc.arg) - assert.Equal(t, tc.expected, actual) - }) - } -} - func (s *HelpTestSuite) TestGetHelpText() { expectedPieces := []string{ "Cosmosvisor", cosmovisor.EnvName, cosmovisor.EnvHome, - "https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor/README.md", + "https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md", } actual := GetHelpText() diff --git a/cosmovisor/cmd/cosmovisor/main.go b/cosmovisor/cmd/cosmovisor/main.go index 8cd8623c7e7e..628b7da4f7f5 100644 --- a/cosmovisor/cmd/cosmovisor/main.go +++ b/cosmovisor/cmd/cosmovisor/main.go @@ -1,17 +1,19 @@ package main import ( + "context" "os" "github.com/cosmos/cosmos-sdk/cosmovisor" - "github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor/cmd" cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" ) func main() { - cosmovisor.SetupLogging() - if err := cmd.RunCosmovisorCommand(os.Args[1:]); err != nil { - cverrors.LogErrors(cosmovisor.Logger, "", err) + logger := cosmovisor.NewLogger() + ctx := context.WithValue(context.Background(), cosmovisor.LoggerKey, logger) + + if err := rootCmd.ExecuteContext(ctx); err != nil { + cverrors.LogErrors(logger, "", err) os.Exit(1) } } diff --git a/cosmovisor/cmd/cosmovisor/root.go b/cosmovisor/cmd/cosmovisor/root.go new file mode 100644 index 000000000000..69f6cfe075ed --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/root.go @@ -0,0 +1,11 @@ +package main + +import ( + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "cosmovisor", + Short: "A process manager for Cosmos SDK application binaries.", + Long: GetHelpText(), +} diff --git a/cosmovisor/cmd/cosmovisor/run.go b/cosmovisor/cmd/cosmovisor/run.go new file mode 100644 index 000000000000..f0917a3fc949 --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/run.go @@ -0,0 +1,53 @@ +package main + +import ( + "github.com/cosmos/cosmos-sdk/cosmovisor" + "github.com/rs/zerolog" + "github.com/spf13/cobra" +) + +func init() { + rootCmd.AddCommand(runCmd) +} + +var runCmd = &cobra.Command{ + Use: "run", + Short: "Run an APP command.", + SilenceUsage: true, + DisableFlagParsing: true, + RunE: func(cmd *cobra.Command, args []string) error { + logger := cmd.Context().Value(cosmovisor.LoggerKey).(*zerolog.Logger) + + return Run(logger, args) + }, +} + +// Run runs the configured program with the given args and monitors it for upgrades. +func Run(logger *zerolog.Logger, args []string, options ...RunOption) error { + cfg, err := cosmovisor.GetConfigFromEnv() + if err != nil { + return err + } + + runCfg := DefaultRunConfig + for _, opt := range options { + opt(&runCfg) + } + + launcher, err := cosmovisor.NewLauncher(logger, cfg) + if err != nil { + return err + } + + doUpgrade, err := launcher.Run(args, runCfg.StdOut, runCfg.StdErr) + // if RestartAfterUpgrade, we launch after a successful upgrade (only condition LaunchProcess returns nil) + for cfg.RestartAfterUpgrade && err == nil && doUpgrade { + logger.Info().Str("app", cfg.Name).Msg("upgrade detected, relaunching") + doUpgrade, err = launcher.Run(args, runCfg.StdOut, runCfg.StdErr) + } + if doUpgrade && err == nil { + logger.Info().Msg("upgrade detected, DAEMON_RESTART_AFTER_UPGRADE is off. Verify new upgrade and start cosmovisor again.") + } + + return err +} diff --git a/cosmovisor/cmd/cosmovisor/run_config.go b/cosmovisor/cmd/cosmovisor/run_config.go new file mode 100644 index 000000000000..5a77e30b4186 --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/run_config.go @@ -0,0 +1,34 @@ +package main + +import ( + "io" + "os" +) + +// DefaultRunConfig defintes a default RunConfig that writes to os.Stdout and os.Stderr +var DefaultRunConfig = RunConfig{ + StdOut: os.Stdout, + StdErr: os.Stderr, +} + +// RunConfig defines the configuration for running a command +type RunConfig struct { + StdOut io.Writer + StdErr io.Writer +} + +type RunOption func(*RunConfig) + +// StdOutRunOption sets the StdOut writer for the Run command +func StdOutRunOption(w io.Writer) RunOption { + return func(cfg *RunConfig) { + cfg.StdOut = w + } +} + +// SdErrRunOption sets the StdErr writer for the Run command +func StdErrRunOption(w io.Writer) RunOption { + return func(cfg *RunConfig) { + cfg.StdErr = w + } +} diff --git a/cosmovisor/cmd/cosmovisor/run_test.go b/cosmovisor/cmd/cosmovisor/run_test.go new file mode 100644 index 000000000000..7c585d9b6461 --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/run_test.go @@ -0,0 +1,4 @@ +package main + +// TODO: Write tests for func Run(args []string) error +// https://github.com/cosmos/cosmos-sdk/issues/11852 diff --git a/cosmovisor/cmd/cosmovisor/version.go b/cosmovisor/cmd/cosmovisor/version.go new file mode 100644 index 000000000000..de5005a721f4 --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/version.go @@ -0,0 +1,81 @@ +package main + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/cosmos/cosmos-sdk/cosmovisor" + "github.com/rs/zerolog" + "github.com/spf13/cobra" + tmcli "github.com/tendermint/tendermint/libs/cli" +) + +func init() { + versionCmd.Flags().StringP(OutputFlag, "o", "text", "Output format (text|json)") + rootCmd.AddCommand(versionCmd) +} + +var ( + // Version represents Cosmovisor version value. Overwritten during build + Version = "1.1.0" + // OutputFlag defines the output format flag + OutputFlag = tmcli.OutputFlag +) + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Prints the version of Cosmovisor.", + SilenceUsage: true, + RunE: func(cmd *cobra.Command, args []string) error { + logger := cmd.Context().Value(cosmovisor.LoggerKey).(*zerolog.Logger) + + if val, err := cmd.Flags().GetString(OutputFlag); val == "json" && err == nil { + return printVersionJSON(logger, args) + } + + return printVersion(logger, args) + }, +} + +func printVersion(logger *zerolog.Logger, args []string) error { + fmt.Println("cosmovisor version: ", Version) + + if err := Run(logger, append([]string{"version"}, args...)); err != nil { + return fmt.Errorf("failed to run version command: %w", err) + } + + return nil +} + +func printVersionJSON(logger *zerolog.Logger, args []string) error { + buf := new(strings.Builder) + + // disable logger + l := logger.Level(zerolog.Disabled) + logger = &l + + if err := Run( + logger, + []string{"version", "--long", "--output", "json"}, + StdOutRunOption(buf), + ); err != nil { + return fmt.Errorf("failed to run version command: %w", err) + } + + out, err := json.Marshal(struct { + Version string `json:"cosmovisor_version"` + AppVersion json.RawMessage `json:"app_version"` + }{ + Version: Version, + AppVersion: json.RawMessage(buf.String()), + }) + if err != nil { + l := logger.Level(zerolog.TraceLevel) + logger = &l + return fmt.Errorf("can't print version output, expected valid json from APP, got: %s - %w", buf.String(), err) + } + + fmt.Println(string(out)) + return nil +} diff --git a/cosmovisor/cmd/cosmovisor/version_test.go b/cosmovisor/cmd/cosmovisor/version_test.go new file mode 100644 index 000000000000..f9dfa1401443 --- /dev/null +++ b/cosmovisor/cmd/cosmovisor/version_test.go @@ -0,0 +1,21 @@ +package main + +import ( + "context" + "testing" + + "github.com/cosmos/cosmos-sdk/cosmovisor" + "github.com/cosmos/cosmos-sdk/testutil" + "github.com/stretchr/testify/require" +) + +func TestVersionCommand_Error(t *testing.T) { + logger := cosmovisor.NewLogger() + + rootCmd.SetArgs([]string{"version"}) + _, out := testutil.ApplyMockIO(rootCmd) + ctx := context.WithValue(context.Background(), cosmovisor.LoggerKey, logger) + + require.Error(t, rootCmd.ExecuteContext(ctx)) + require.Contains(t, out.String(), "DAEMON_NAME is not set") +} diff --git a/cosmovisor/errors/multi.go b/cosmovisor/errors/multi.go index bb7885a9bb9f..a78a61a4e8f4 100644 --- a/cosmovisor/errors/multi.go +++ b/cosmovisor/errors/multi.go @@ -70,7 +70,7 @@ func (e MultiError) String() string { return e.Error() } -func LogErrors(logger zerolog.Logger, msg string, err error) { +func LogErrors(logger *zerolog.Logger, msg string, err error) { switch err := err.(type) { case *MultiError: if msg != "" { @@ -82,5 +82,4 @@ func LogErrors(logger zerolog.Logger, msg string, err error) { default: logger.Error().Err(err).Msg(msg) } - } diff --git a/cosmovisor/go.mod b/cosmovisor/go.mod index fac943b33d51..0c733c5e63a2 100644 --- a/cosmovisor/go.mod +++ b/cosmovisor/go.mod @@ -1,131 +1,125 @@ module github.com/cosmos/cosmos-sdk/cosmovisor -go 1.17 +go 1.18 require ( - github.com/cosmos/cosmos-sdk v0.45.1 - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.5.11 + github.com/cosmos/cosmos-sdk v0.46.0-beta2 + github.com/hashicorp/go-getter v1.6.1 github.com/otiai10/copy v1.7.0 github.com/rs/zerolog v1.26.1 + github.com/spf13/cobra v1.4.0 github.com/stretchr/testify v1.7.1 - google.golang.org/api v0.44.0 // indirect - google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + github.com/tendermint/tendermint v0.35.4 ) require ( - cloud.google.com/go v0.81.0 // indirect - cloud.google.com/go/storage v1.10.0 // indirect - filippo.io/edwards25519 v1.0.0-beta.2 // indirect + cloud.google.com/go v0.100.2 // indirect + cloud.google.com/go/compute v1.5.0 // indirect + cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go/storage v1.14.0 // indirect + filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/keyring v1.1.6 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/DataDog/zstd v1.4.5 // indirect - github.com/armon/go-metrics v0.3.9 // indirect - github.com/aws/aws-sdk-go v1.27.0 // indirect + github.com/armon/go-metrics v0.3.10 // indirect + github.com/aws/aws-sdk-go v1.40.45 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/btcsuite/btcd v0.22.0-beta // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect - github.com/confio/ics23/go v0.6.6 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/confio/ics23/go v0.7.0 // indirect github.com/cosmos/btcutil v1.0.4 // indirect + github.com/cosmos/cosmos-proto v1.0.0-alpha7 // indirect + github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.3 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/iavl v0.17.3 // indirect + github.com/cosmos/iavl v0.18.0 // indirect github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect github.com/danieljoos/wincred v1.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dgraph-io/badger/v2 v2.2007.2 // indirect - github.com/dgraph-io/ristretto v0.0.3 // 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/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect - github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect - github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/go-kit/kit v0.10.0 // indirect - github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/protobuf v1.3.3 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 // indirect - github.com/google/btree v1.0.0 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.0.1 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/gax-go/v2 v2.3.0 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect - github.com/hashicorp/go-immutable-radix v1.0.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-version v1.2.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/go-version v1.4.0 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/klauspost/compress v1.11.7 // indirect - github.com/libp2p/go-buffer-pool v0.0.2 // indirect - github.com/magiconair/properties v1.8.5 // indirect + github.com/klauspost/compress v1.13.6 // indirect + github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.0.0 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/pelletier/go-toml v1.9.3 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect + github.com/pelletier/go-toml v1.9.4 // indirect + github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.29.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/common v0.33.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect - github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect - github.com/spf13/afero v1.6.0 // indirect - github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.2.1 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.8.1 // indirect + github.com/spf13/viper v1.11.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/btcd v0.1.1 // indirect github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/tendermint v0.34.14 // indirect - github.com/tendermint/tm-db v0.6.4 // indirect + github.com/tendermint/tm-db v0.6.6 // indirect github.com/ulikunitz/xz v0.5.8 // indirect - github.com/zondax/hid v0.9.0 // indirect - go.etcd.io/bbolt v1.3.5 // indirect + github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect + go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e // indirect - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.4.2 // indirect - golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect - golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect - golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect - golang.org/x/text v0.3.6 // indirect - golang.org/x/tools v0.1.7 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect + golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect + golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect + google.golang.org/api v0.74.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/grpc v1.42.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect - gopkg.in/ini.v1 v1.62.0 // indirect + google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect + google.golang.org/grpc v1.45.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/cosmovisor/go.sum b/cosmovisor/go.sum index d0a4bf6c3735..d33a496ba55b 100644 --- a/cosmovisor/go.sum +++ b/cosmovisor/go.sum @@ -1,8 +1,12 @@ +4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= +bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -11,102 +15,128 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= -filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= +filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= +filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Antonboom/errname v0.1.5/go.mod h1:DugbBstvPFQbv/5uLcRRzfrNqKE9tVdVCqWCLp6Cifo= +github.com/Antonboom/nilnil v0.1.0/go.mod h1:PhHLvRPSghY5Y7mX4TW+BHZQYo1A8flE5H20D3IPZBo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= -github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= -github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= +github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0 h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -116,20 +146,18 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/blizzy78/varnamelen v0.6.1/go.mod h1:zy2Eic4qWqjrxa60jG34cfL0VXcSwzUrIx68eJPb4Q8= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/breml/bidichk v0.2.2/go.mod h1:zbfeitpevDUGI7V91Uzzuwrn4Vls8MoBMrwtt78jmso= +github.com/breml/errchkjson v0.2.3/go.mod h1:jZEATw/jF69cL1iy7//Yih8yp/mXp2CBoBr9GJwCAsY= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= @@ -139,14 +167,21 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= 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/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -155,9 +190,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -165,35 +199,41 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= -github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= -github.com/confio/ics23/go v0.6.6 h1:pkOy18YxxJ/r0XFDCnrl4Bjv6h4LkBSpLS6F38mrKL8= -github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/coinbase/rosetta-sdk-go v0.7.6 h1:y3/Lxu9ojIsUKnhNc5UaZF/i0byfuNDWXLYMSKG+IBs= +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/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.45.1 h1:PY79YxPea5qlRLExRnzg8/rT1Scc8GGgRs22p7DX99Q= -github.com/cosmos/cosmos-sdk v0.45.1/go.mod h1:XXS/asyCqWNWkx2rW6pSuen+EVcpAFxq6khrhnZgHaQ= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= +github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= +github.com/cosmos/cosmos-sdk v0.46.0-beta2 h1:emigIPQ6lW2fIeV77yNpb9TR4Ij/tqeWaUJQ2up06Q0= +github.com/cosmos/cosmos-sdk v0.46.0-beta2/go.mod h1:++o5Yd16NY5aWrJUFgbNjBQCJ4bOVZbUxKcfEfkS7bI= +github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= +github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1 h1:6YvzjQtc+cDwCe9XwYPPa8zFCxNG79N7vmCjpK+vGOg= +github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.3 h1:Ep7FHNViVwwGnwLFEPewZYsyN2CJNVMmMvFmtNQtbnw= +github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.3/go.mod h1:HFea93YKmoMJ/mNKtkSeJZDtyJ4inxBsUK928KONcqo= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= -github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= +github.com/cosmos/iavl v0.18.0 h1:02ur4vnalMR2GuWCFNkuseUcl/BCVmg9tOeHOGiZOkE= +github.com/cosmos/iavl v0.18.0/go.mod h1:L0VZHfq0tqMNJvXlslGExaaiZM7eSm+90Vh9QUbp6j4= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -201,46 +241,49 @@ github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9 github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= +github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= +github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/creachadair/tomledit v0.0.16/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +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.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= -github.com/dgraph-io/ristretto v0.0.3/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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 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/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 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/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -249,72 +292,90 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.4.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-critic/go-critic v0.6.2/go.mod h1:td1s27kfmLpe5G/DPjlnFI7o1UCzePptwU7Az0V5iCM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= 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/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -325,6 +386,7 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -346,11 +408,25 @@ 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 h1:ur2rms48b3Ep1dxh7aUV2FZEQ8jEVO2F6ILKx8ofkAg= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.45.2/go.mod h1:f20dpzMmUTRp+oYnX0OGjV1Au3Jm2JeI9yLqHq1/xsI= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +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/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -361,17 +437,19 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -380,70 +458,100 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.5.11 h1:wioTuNmaBU3IE9vdFtFMcmZWj0QzLc6DYaP6sNe5onY= -github.com/hashicorp/go-getter v1.5.11/go.mod h1:9i48BP6wpWweI/0/+FBjqLrp9S8XtwUGjiu0QkWHEaY= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= +github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -452,327 +560,403 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= +github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= -github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= +github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= -github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.5.1/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= +github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.5 h1:J+gdV2cUmX7ZqL2B0lFcW0m+egaHC2V3lpO8nWxyYiQ= +github.com/lib/pq v1.10.5/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.1.4/go.mod h1:ZZq2bmyssGh8MSPz3VVziqRNIMYTJXzP8MUKG90vZ9A= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= +github.com/mroth/weightedrand v0.4.1/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJgAD905gyNE= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= +github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= +github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= 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/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/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b h1:MKwruh+HeCSKWphkxuzvRzU4QzDkg7yiPkDVV0cDFgI= +github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 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.10.3/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.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 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= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/otiai10/mint v1.3.3 h1:7JgpsBaN0uMkyju4tbYHu0mnM55hNKVYLsXmwr15NQI= github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 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/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v0.0.0-20211125173453-6d6d39c5bb8b/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.33.0 h1:rHgav/0a6+uYgGdNt3jwz8FNSesO/Hsang3O0T9A5SE= +github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.15/go.mod h1:NhuWhnlVEM1gT1A4VJHYfy9MuYSxxwHgxWoPsn9llB4= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.12-0.20220101150716-969a394a9451/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.12/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.17/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220103110004-ffaa07af02e3/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= -github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/securego/gosec/v2 v2.10.0/go.mod h1:PVq8Ewh/nCN8l/kKC6zrGXSr7m2NmEK6ITIAWMtIaA0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/tenv v1.4.7/go.mod h1:5nF+bITvkebQVanjU6IuMbvIot/7ReNsUV7I5NbprB0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -781,20 +965,22 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -805,9 +991,12 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +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/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= @@ -816,52 +1005,80 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RM github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.34.14 h1:GCXmlS8Bqd2Ix3TQCpwYLUNHe+Y+QyJsm5YE+S/FkPo= -github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= -github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ= -github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= -github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= -github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/tendermint/tendermint v0.35.4 h1:ZL9Q+rXBwTEYbONBXy0mWkyG08uvdgQNSuYmoBR1sfE= +github.com/tendermint/tendermint v0.35.4/go.mod h1:+9zS92hqCl6mL7XLK3dg71nzoBLJlkl/aNLx4NXKNP8= +github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= +github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.5.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= +github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vektra/mockery/v2 v2.10.6/go.mod h1:8vf4KDDUptfkyypzdHLuE7OE2xA7Gdt60WgIS8PgD+U= +github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.1.1-0.20210918184747-d757024714a1/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= +github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -875,39 +1092,56 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e h1:1SzTfNOXwIS2oWiMF+6qu0OUDKb0dauo6MoDUQyu+yU= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -916,6 +1150,7 @@ 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/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -929,38 +1164,35 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -968,6 +1200,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -985,7 +1218,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -995,11 +1227,24 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f h1:w6wWR0H+nyVpbSAQbzVEIACVyr/h8l/BEkY6Sokc7Eg= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1011,19 +1256,28 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1032,10 +1286,10 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1049,19 +1303,23 @@ golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1078,36 +1336,65 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/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-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20201204225414-ed752295db88/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= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b h1:3Dq0eVHn0uaQJmPO+/aYPI/fRMqdrVDbu7MQcku54gg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e h1:w36l2Uw3dRan1K3TyXriXvY+6T56GNmlKGcqiQUJDfM= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1115,19 +1402,27 @@ 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1136,21 +1431,25 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1160,40 +1459,73 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/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-20201230224404-63754364767c/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= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1211,27 +1543,44 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0 h1:URs6qR1lAxDsqWITsQXI4ZkGiYJ5dHtRNiCpfs2OeKA= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1253,44 +1602,75 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 h1:z+ErRPu0+KS02Td3fOAgdX+lnPDh/VyaABEJPD4JRQs= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= @@ -1298,10 +1678,18 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1312,31 +1700,32 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= 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/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1344,6 +1733,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1352,7 +1742,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1360,10 +1749,18 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= +mvdan.cc/gofumpt v0.3.0/go.mod h1:0+VyGZWleeIj5oostkOex+nDBA0eyavuDnDusAJ8ylo= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= -nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cosmovisor/logger.go b/cosmovisor/logger.go index cc7b58720de6..bcec3a02544c 100644 --- a/cosmovisor/logger.go +++ b/cosmovisor/logger.go @@ -7,9 +7,10 @@ import ( "github.com/rs/zerolog" ) -var Logger zerolog.Logger +var LoggerKey struct{} -func SetupLogging() { +func NewLogger() *zerolog.Logger { output := zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.Kitchen} - Logger = zerolog.New(output).With().Str("module", "cosmovisor").Timestamp().Logger() + logger := zerolog.New(output).With().Str("module", "cosmovisor").Timestamp().Logger() + return &logger } diff --git a/cosmovisor/process.go b/cosmovisor/process.go index 0f57940553ba..17b9b67eaf04 100644 --- a/cosmovisor/process.go +++ b/cosmovisor/process.go @@ -14,18 +14,24 @@ import ( "time" "github.com/otiai10/copy" + "github.com/rs/zerolog" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) type Launcher struct { - cfg *Config - fw *fileWatcher + logger *zerolog.Logger + cfg *Config + fw *fileWatcher } -func NewLauncher(cfg *Config) (Launcher, error) { - fw, err := newUpgradeFileWatcher(cfg.UpgradeInfoFilePath(), cfg.PollInterval) - return Launcher{cfg, fw}, err +func NewLauncher(logger *zerolog.Logger, cfg *Config) (Launcher, error) { + fw, err := newUpgradeFileWatcher(logger, cfg.UpgradeInfoFilePath(), cfg.PollInterval) + if err != nil { + return Launcher{}, err + } + + return Launcher{logger: logger, cfg: cfg, fw: fw}, nil } // Run launches the app in a subprocess and returns when the subprocess (app) @@ -40,7 +46,8 @@ func (l Launcher) Run(args []string, stdout, stderr io.Writer) (bool, error) { if err := EnsureBinary(bin); err != nil { return false, fmt.Errorf("current binary is invalid: %w", err) } - Logger.Info().Str("path", bin).Strs("args", args).Msg("running app") + + l.logger.Info().Str("path", bin).Strs("args", args).Msg("running app") cmd := exec.Command(bin, args...) cmd.Stdout = stdout cmd.Stderr = stderr @@ -53,7 +60,7 @@ func (l Launcher) Run(args []string, stdout, stderr io.Writer) (bool, error) { go func() { sig := <-sigs if err := cmd.Process.Signal(sig); err != nil { - Logger.Fatal().Err(err).Str("bin", bin).Msg("terminated") + l.logger.Fatal().Err(err).Str("bin", bin).Msg("terminated") } }() @@ -63,16 +70,16 @@ func (l Launcher) Run(args []string, stdout, stderr io.Writer) (bool, error) { } if !IsSkipUpgradeHeight(args, l.fw.currentInfo) { - if err := doBackup(l.cfg); err != nil { + if err := l.doBackup(); err != nil { return false, err } - if err = doPreUpgrade(l.cfg); err != nil { + if err = l.doPreUpgrade(); err != nil { return false, err } } - return true, DoUpgrade(l.cfg, l.fw.currentInfo) + return true, DoUpgrade(l.logger, l.cfg, l.fw.currentInfo) } // WaitForUpgradeOrExit checks upgrade plan file created by the app. @@ -83,8 +90,12 @@ func (l Launcher) Run(args []string, stdout, stderr io.Writer) (bool, error) { // It returns (false, nil) if the process exited normally without triggering an upgrade. This is very unlikely // to happened with "start" but may happened with short-lived commands like `gaiad export ...` func (l Launcher) WaitForUpgradeOrExit(cmd *exec.Cmd) (bool, error) { - currentUpgrade := l.cfg.UpgradeInfo() - var cmdDone = make(chan error) + currentUpgrade, err := l.cfg.UpgradeInfo() + if err != nil { + l.logger.Error().Err(err) + } + + cmdDone := make(chan error) go func() { cmdDone <- cmd.Wait() }() @@ -92,7 +103,7 @@ func (l Launcher) WaitForUpgradeOrExit(cmd *exec.Cmd) (bool, error) { select { case <-l.fw.MonitorUpdate(currentUpgrade): // upgrade - kill the process and restart - Logger.Info().Msg("Daemon shutting down in an attempt to restart") + l.logger.Info().Msg("daemon shutting down in an attempt to restart") _ = cmd.Process.Kill() case err := <-cmdDone: l.fw.Stop() @@ -109,12 +120,12 @@ func (l Launcher) WaitForUpgradeOrExit(cmd *exec.Cmd) (bool, error) { return true, nil } -func doBackup(cfg *Config) error { +func (l Launcher) doBackup() error { // take backup if `UNSAFE_SKIP_BACKUP` is not set. - if !cfg.UnsafeSkipBackup { + if !l.cfg.UnsafeSkipBackup { // check if upgrade-info.json is not empty. var uInfo upgradetypes.Plan - upgradeInfoFile, err := os.ReadFile(filepath.Join(cfg.Home, "data", "upgrade-info.json")) + upgradeInfoFile, err := os.ReadFile(filepath.Join(l.cfg.Home, "data", "upgrade-info.json")) if err != nil { return fmt.Errorf("error while reading upgrade-info.json: %w", err) } @@ -131,12 +142,12 @@ func doBackup(cfg *Config) error { // a destination directory, Format YYYY-MM-DD st := time.Now() stStr := fmt.Sprintf("%d-%d-%d", st.Year(), st.Month(), st.Day()) - dst := filepath.Join(cfg.DataBackupPath, fmt.Sprintf("data"+"-backup-%s", stStr)) + dst := filepath.Join(l.cfg.DataBackupPath, fmt.Sprintf("data"+"-backup-%s", stStr)) - Logger.Info().Time("backup start time", st).Msg("starting to take backup of data directory") + l.logger.Info().Time("backup start time", st).Msg("starting to take backup of data directory") // copy the $DAEMON_HOME/data to a backup dir - err = copy.Copy(filepath.Join(cfg.Home, "data"), dst) + err = copy.Copy(filepath.Join(l.cfg.Home, "data"), dst) if err != nil { return fmt.Errorf("error while taking data backup: %w", err) @@ -144,7 +155,7 @@ func doBackup(cfg *Config) error { // backup is done, lets check endtime to calculate total time taken for backup process et := time.Now() - Logger.Info().Str("backup saved at", dst).Time("backup completion time", et).TimeDiff("time taken to complete backup", et, st).Msg("backup completed") + l.logger.Info().Str("backup saved at", dst).Time("backup completion time", et).TimeDiff("time taken to complete backup", et, st).Msg("backup completed") } return nil @@ -152,38 +163,39 @@ func doBackup(cfg *Config) error { // doPreUpgrade runs the pre-upgrade command defined by the application and handles respective error codes // cfg contains the cosmovisor config from env var -func doPreUpgrade(cfg *Config) error { +func (l *Launcher) doPreUpgrade() error { counter := 0 for { - if counter > cfg.PreupgradeMaxRetries { - return fmt.Errorf("pre-upgrade command failed. reached max attempt of retries - %d", cfg.PreupgradeMaxRetries) + if counter > l.cfg.PreupgradeMaxRetries { + return fmt.Errorf("pre-upgrade command failed. reached max attempt of retries - %d", l.cfg.PreupgradeMaxRetries) } - err := executePreUpgradeCmd(cfg) + err := l.executePreUpgradeCmd() counter += 1 if err != nil { if err.(*exec.ExitError).ProcessState.ExitCode() == 1 { - Logger.Info().Msg("pre-upgrade command does not exist. continuing the upgrade.") + l.logger.Info().Msg("pre-upgrade command does not exist. continuing the upgrade.") return nil } if err.(*exec.ExitError).ProcessState.ExitCode() == 30 { return fmt.Errorf("pre-upgrade command failed : %w", err) } if err.(*exec.ExitError).ProcessState.ExitCode() == 31 { - Logger.Error().Err(err).Int("attempt", counter).Msg("pre-upgrade command failed. retrying") + l.logger.Error().Err(err).Int("attempt", counter).Msg("pre-upgrade command failed. retrying") continue } } - fmt.Println("pre-upgrade successful. continuing the upgrade.") + + l.logger.Info().Msg("pre-upgrade successful. continuing the upgrade.") return nil } } // executePreUpgradeCmd runs the pre-upgrade command defined by the application // cfg contains the cosmosvisor config from the env vars -func executePreUpgradeCmd(cfg *Config) error { - bin, err := cfg.CurrentBin() +func (l *Launcher) executePreUpgradeCmd() error { + bin, err := l.cfg.CurrentBin() if err != nil { return err } @@ -200,7 +212,6 @@ func IsSkipUpgradeHeight(args []string, upgradeInfo upgradetypes.Plan) bool { if h == int(upgradeInfo.Height) { return true } - } return false } diff --git a/cosmovisor/process_test.go b/cosmovisor/process_test.go index b0c5ceb88a35..623634277bb6 100644 --- a/cosmovisor/process_test.go +++ b/cosmovisor/process_test.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package cosmovisor_test @@ -28,17 +29,19 @@ func (s *processTestSuite) TestLaunchProcess() { require := s.Require() home := copyTestData(s.T(), "validate") cfg := &cosmovisor.Config{Home: home, Name: "dummyd", PollInterval: 20, UnsafeSkipBackup: true} + logger := cosmovisor.NewLogger() // should run the genesis binary and produce expected output - var stdout, stderr = NewBuffer(), NewBuffer() + stdout, stderr := NewBuffer(), NewBuffer() currentBin, err := cfg.CurrentBin() require.NoError(err) require.Equal(cfg.GenesisBin(), currentBin) - launcher, err := cosmovisor.NewLauncher(cfg) + launcher, err := cosmovisor.NewLauncher(logger, cfg) require.NoError(err) upgradeFile := cfg.UpgradeInfoFilePath() + args := []string{"foo", "bar", "1234", upgradeFile} doUpgrade, err := launcher.Run(args, stdout, stderr) require.NoError(err) @@ -77,6 +80,7 @@ func (s *processTestSuite) TestLaunchProcessWithDownloads() { require := s.Require() home := copyTestData(s.T(), "download") cfg := &cosmovisor.Config{Home: home, Name: "autod", AllowDownloadBinaries: true, PollInterval: 100, UnsafeSkipBackup: true} + logger := cosmovisor.NewLogger() upgradeFilename := cfg.UpgradeInfoFilePath() // should run the genesis binary and produce expected output @@ -84,10 +88,10 @@ func (s *processTestSuite) TestLaunchProcessWithDownloads() { require.NoError(err) require.Equal(cfg.GenesisBin(), currentBin) - launcher, err := cosmovisor.NewLauncher(cfg) + launcher, err := cosmovisor.NewLauncher(logger, cfg) require.NoError(err) - var stdout, stderr = NewBuffer(), NewBuffer() + stdout, stderr := NewBuffer(), NewBuffer() args := []string{"some", "args", upgradeFilename} doUpgrade, err := launcher.Run(args, stdout, stderr) diff --git a/cosmovisor/scanner.go b/cosmovisor/scanner.go index 4dbcb13d7f8d..7ed696f48150 100644 --- a/cosmovisor/scanner.go +++ b/cosmovisor/scanner.go @@ -6,12 +6,16 @@ import ( "fmt" "os" "path/filepath" + "strings" "time" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/rs/zerolog" ) type fileWatcher struct { + logger *zerolog.Logger + // full path to a watched file filename string interval time.Duration @@ -25,22 +29,34 @@ type fileWatcher struct { initialized bool } -func newUpgradeFileWatcher(filename string, interval time.Duration) (*fileWatcher, error) { +func newUpgradeFileWatcher(logger *zerolog.Logger, filename string, interval time.Duration) (*fileWatcher, error) { if filename == "" { return nil, errors.New("filename undefined") } + filenameAbs, err := filepath.Abs(filename) if err != nil { return nil, - fmt.Errorf("wrong path, %s must be a valid file path, [%w]", filename, err) + fmt.Errorf("invalid path; %s must be a valid file path: %w", filename, err) } + dirname := filepath.Dir(filename) info, err := os.Stat(dirname) if err != nil || !info.IsDir() { - return nil, fmt.Errorf("wrong path, %s must be an existing directory, [%w]", dirname, err) + return nil, fmt.Errorf("invalid path; %s must be an existing directory: %w", dirname, err) } - return &fileWatcher{filenameAbs, interval, upgradetypes.Plan{}, time.Time{}, make(chan bool), time.NewTicker(interval), false, false}, nil + return &fileWatcher{ + logger: logger, + filename: filenameAbs, + interval: interval, + currentInfo: upgradetypes.Plan{}, + lastModTime: time.Time{}, + cancel: make(chan bool), + ticker: time.NewTicker(interval), + needsUpdate: false, + initialized: false, + }, nil } func (fw *fileWatcher) Stop() { @@ -64,11 +80,13 @@ func (fw *fileWatcher) MonitorUpdate(currentUpgrade upgradetypes.Plan) <-chan st done <- struct{}{} return } + case <-fw.cancel: return } } }() + return done } @@ -79,25 +97,33 @@ func (fw *fileWatcher) CheckUpdate(currentUpgrade upgradetypes.Plan) bool { if fw.needsUpdate { return true } + stat, err := os.Stat(fw.filename) - if err != nil { // file doesn't exists + if err != nil { + // file doesn't exists return false } + if !stat.ModTime().After(fw.lastModTime) { return false } + info, err := parseUpgradeInfoFile(fw.filename) if err != nil { - Logger.Fatal().Err(err).Msg("Can't parse upgrade info file") + fw.logger.Fatal().Err(err).Msg("failed to parse upgrade info file") return false } - if !fw.initialized { // daemon has restarted + + if !fw.initialized { + // daemon has restarted fw.initialized = true fw.currentInfo = info fw.lastModTime = stat.ModTime() - // heuristic: deamon has restarted, so we don't know if we successfully downloaded the upgrade or not. - // so we try to compare the running upgrade name (read from the cosmovisor file) with the upgrade info - if currentUpgrade.Name != fw.currentInfo.Name { + + // Heuristic: Deamon has restarted, so we don't know if we successfully + // downloaded the upgrade or not. So we try to compare the running upgrade + // name (read from the cosmovisor file) with the upgrade info. + if !strings.EqualFold(currentUpgrade.Name, fw.currentInfo.Name) { fw.needsUpdate = true return true } @@ -109,24 +135,32 @@ func (fw *fileWatcher) CheckUpdate(currentUpgrade upgradetypes.Plan) bool { fw.needsUpdate = true return true } + return false } func parseUpgradeInfoFile(filename string) (upgradetypes.Plan, error) { var ui upgradetypes.Plan + f, err := os.Open(filename) if err != nil { - return ui, err + return upgradetypes.Plan{}, err } defer f.Close() + d := json.NewDecoder(f) - err = d.Decode(&ui) - if err != nil { - return ui, err + if err := d.Decode(&ui); err != nil { + return upgradetypes.Plan{}, err } + // required values must be set - if ui.Height == 0 || ui.Name == "" { - return upgradetypes.Plan{}, fmt.Errorf("invalid upgrade-info.json content. Name and Hight must be not empty. Got: %v", ui) + if ui.Height <= 0 || ui.Name == "" { + return upgradetypes.Plan{}, fmt.Errorf("invalid upgrade-info.json content; name and height must be not empty; got: %v", ui) } + + // Normalize name to prevent operator error in upgrade name case sensitivity + // errors. + ui.Name = strings.ToLower(ui.Name) + return ui, err } diff --git a/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod index 8eb6d32fe565..89cb77365a14 100755 --- a/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod +++ b/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/master/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:e2e178953d176196dcf736afa821121b259697ab4df90582044c313bcae48f13\"}}"}' > $3 +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 sleep 0.1 echo Never should be printed!!! diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod b/cosmovisor/testdata/repo/chain2-zip_bin/autod index 40cbf0fcb405..5bc99c552123 100755 --- a/cosmovisor/testdata/repo/chain2-zip_bin/autod +++ b/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/master/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 -echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/master/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/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 sleep 1 echo 'Do not print' diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip b/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip index a61e2e37918c..68d33a538c5b 100644 Binary files a/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip and b/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip differ diff --git a/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json index 78128c58f422..7baa216b9633 100644 --- a/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json +++ b/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json @@ -1,5 +1,5 @@ { - "binaries": { - "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" - } + "binaries": { + "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" + } } diff --git a/cosmovisor/upgrade.go b/cosmovisor/upgrade.go index a91b40cea8d8..9667ffb5ede4 100644 --- a/cosmovisor/upgrade.go +++ b/cosmovisor/upgrade.go @@ -10,16 +10,16 @@ import ( "runtime" "strings" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/hashicorp/go-getter" "github.com/otiai10/copy" - - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/rs/zerolog" ) // DoUpgrade will be called after the log message has been parsed and the process has terminated. // We can now make any changes to the underlying directory without interference and leave it // in a state, so we can make a proper restart -func DoUpgrade(cfg *Config, info upgradetypes.Plan) error { +func DoUpgrade(logger *zerolog.Logger, cfg *Config, info upgradetypes.Plan) error { // Simplest case is to switch the link err := EnsureBinary(cfg.UpgradeBin(info.Name)) if err == nil { @@ -37,11 +37,11 @@ func DoUpgrade(cfg *Config, info upgradetypes.Plan) error { } // If not there, then we try to download it... maybe - Logger.Info().Msg("No upgrade binary found, beginning to download it") + logger.Info().Msg("no upgrade binary found, beginning to download it") if err := DownloadBinary(cfg, info); err != nil { return fmt.Errorf("cannot download binary. %w", err) } - Logger.Info().Msg("Downloading binary complete") + logger.Info().Msg("downloading binary complete") // and then set the binary again if err := EnsureBinary(cfg.UpgradeBin(info.Name)); err != nil { @@ -91,11 +91,11 @@ func MarkExecutable(path string) error { return fmt.Errorf("stating binary: %w", err) } // end early if world exec already set - if info.Mode()&0001 == 1 { + if info.Mode()&0o001 == 1 { return nil } // now try to set all exec bits - newMode := info.Mode().Perm() | 0111 + newMode := info.Mode().Perm() | 0o111 return os.Chmod(path, newMode) } @@ -162,7 +162,7 @@ func EnsureBinary(path string) error { } // this checks if the world-executable bit is set (we cannot check owner easily) - exec := info.Mode().Perm() & 0001 + exec := info.Mode().Perm() & 0o001 if exec == 0 { return fmt.Errorf("%s is not world executable", info.Name()) } diff --git a/cosmovisor/upgrade_test.go b/cosmovisor/upgrade_test.go index 9002ff4066bb..44a611222d11 100644 --- a/cosmovisor/upgrade_test.go +++ b/cosmovisor/upgrade_test.go @@ -95,6 +95,7 @@ func (s *upgradeTestSuite) assertCurrentLink(cfg cosmovisor.Config, target strin func (s *upgradeTestSuite) TestDoUpgradeNoDownloadUrl() { home := copyTestData(s.T(), "validate") cfg := &cosmovisor.Config{Home: home, Name: "dummyd", AllowDownloadBinaries: true} + logger := cosmovisor.NewLogger() currentBin, err := cfg.CurrentBin() s.Require().NoError(err) @@ -104,7 +105,7 @@ func (s *upgradeTestSuite) TestDoUpgradeNoDownloadUrl() { // do upgrade ignores bad files for _, name := range []string{"missing", "nobin", "noexec"} { info := upgradetypes.Plan{Name: name} - err = cosmovisor.DoUpgrade(cfg, info) + err = cosmovisor.DoUpgrade(logger, cfg, info) s.Require().Error(err, name) currentBin, err := cfg.CurrentBin() s.Require().NoError(err) @@ -115,7 +116,7 @@ func (s *upgradeTestSuite) TestDoUpgradeNoDownloadUrl() { for _, upgrade := range []string{"chain2", "chain3"} { // now set it to a valid upgrade and make sure CurrentBin is now set properly info := upgradetypes.Plan{Name: upgrade} - err = cosmovisor.DoUpgrade(cfg, info) + err = cosmovisor.DoUpgrade(logger, cfg, info) s.Require().NoError(err) // we should see current point to the new upgrade dir upgradeBin := cfg.UpgradeBin(upgrade) @@ -154,7 +155,7 @@ func (s *upgradeTestSuite) TestGetDownloadURL() { }, "follow reference": { info: ref, - url: "https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", + url: "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", }, "malformated reference target": { info: badref, diff --git a/crypto/armor.go b/crypto/armor.go index 2a45e67ce586..1da3e9703326 100644 --- a/crypto/armor.go +++ b/crypto/armor.go @@ -148,7 +148,6 @@ func EncryptArmorPrivKey(privKey cryptotypes.PrivKey, passphrase string, algo st func encryptPrivKey(privKey cryptotypes.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) { saltBytes = crypto.CRandBytes(16) key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), BcryptSecurityParameter) - if err != nil { panic(sdkerrors.Wrap(err, "error generating bcrypt key from passphrase")) } diff --git a/crypto/hd/algo.go b/crypto/hd/algo.go index 5f9965a24531..0feb4ff49b47 100644 --- a/crypto/hd/algo.go +++ b/crypto/hd/algo.go @@ -22,21 +22,20 @@ const ( Sr25519Type = PubKeyType("sr25519") ) -var ( - // Secp256k1 uses the Bitcoin secp256k1 ECDSA parameters. - Secp256k1 = secp256k1Algo{} -) +// Secp256k1 uses the Bitcoin secp256k1 ECDSA parameters. +var Secp256k1 = secp256k1Algo{} -type DeriveFn func(mnemonic string, bip39Passphrase, hdPath string) ([]byte, error) -type GenerateFn func(bz []byte) types.PrivKey +type ( + DeriveFn func(mnemonic string, bip39Passphrase, hdPath string) ([]byte, error) + GenerateFn func(bz []byte) types.PrivKey +) type WalletGenerator interface { Derive(mnemonic string, bip39Passphrase, hdPath string) ([]byte, error) Generate(bz []byte) types.PrivKey } -type secp256k1Algo struct { -} +type secp256k1Algo struct{} func (s secp256k1Algo) Name() PubKeyType { return Secp256k1Type @@ -63,7 +62,7 @@ func (s secp256k1Algo) Derive() DeriveFn { // Generate generates a secp256k1 private key from the given bytes. func (s secp256k1Algo) Generate() GenerateFn { return func(bz []byte) types.PrivKey { - var bzArr = make([]byte, secp256k1.PrivKeySize) + bzArr := make([]byte, secp256k1.PrivKeySize) copy(bzArr, bz) return &secp256k1.PrivKey{Key: bzArr} diff --git a/crypto/hd/fundraiser_test.go b/crypto/hd/fundraiser_test.go index 9cd3b15dfd50..674ab95c71c8 100644 --- a/crypto/hd/fundraiser_test.go +++ b/crypto/hd/fundraiser_test.go @@ -7,10 +7,8 @@ import ( "os" "testing" - "github.com/stretchr/testify/require" - "github.com/cosmos/go-bip39" - + "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/hd" diff --git a/crypto/hd/hdpath_test.go b/crypto/hd/hdpath_test.go index 42abd023870a..6ea418b92db3 100644 --- a/crypto/hd/hdpath_test.go +++ b/crypto/hd/hdpath_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/go-bip39" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/types" ) var defaultBIP39Passphrase = "" @@ -89,7 +89,6 @@ func TestParamsFromPath(t *testing.T) { require.Nil(t, params, errStr) require.Error(t, err, errStr) } - } func TestCreateHDPath(t *testing.T) { @@ -300,7 +299,7 @@ func TestDerivePrivateKeyForPathDoNotCrash(t *testing.T) { for _, path := range paths { path := path t.Run(path, func(t *testing.T) { - hd.DerivePrivateKeyForPath([32]byte{}, [32]byte{}, path) + _, _ = hd.DerivePrivateKeyForPath([32]byte{}, [32]byte{}, path) }) } } diff --git a/crypto/keyring/doc.go b/crypto/keyring/doc.go index 04a8b98cdfba..b642680c0662 100644 --- a/crypto/keyring/doc.go +++ b/crypto/keyring/doc.go @@ -1,17 +1,11 @@ // Package keys provides common key management API. // // -// The Keybase interface +// The Keyring interface // -// The Keybase interface defines the methods that a type needs to implement to be used +// The Keyring interface defines the methods that a type needs to implement to be used // as key storage backend. This package provides few implementations out-of-the-box. // -// NewLegacy -// -// The NewLegacy constructor returns an on-disk implementation backed by LevelDB storage that has been -// the default implementation used by the SDK until v0.38.0. Due to security concerns, it is -// recommended to drop it in favor of the NewKeyring constructor as it will be removed in future releases. -// // NewInMemory // // The NewInMemory constructor returns an implementation backed by an in-memory, goroutine-safe diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 7cd3bd310730..370e0111cec4 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -100,13 +100,6 @@ type Keyring interface { Migrator } -// UnsafeKeyring exposes unsafe operations such as unsafe unarmored export in -// addition to those that are made available by the Keyring interface. -type UnsafeKeyring interface { - Keyring - UnsafeExporter -} - // Signer is implemented by key stores that want to provide signing capabilities. type Signer interface { // Sign sign byte messages with a user key. @@ -125,9 +118,9 @@ type Importer interface { ImportPubKey(uid string, armor string) error } -// Migrator is implemented by key stores and enables migration of keys from amino to proto +// Migrator is implemented by key stores and enables migration of keys from amino to proto type Migrator interface { - MigrateAll() (bool, error) + MigrateAll() error } // Exporter is implemented by key stores that support export of public and private keys. @@ -142,13 +135,6 @@ type Exporter interface { ExportPrivKeyArmorByAddress(address sdk.Address, encryptPassphrase string) (armor string, err error) } -// UnsafeExporter is implemented by key stores that support unsafe export -// of private keys' material. -type UnsafeExporter interface { - // UnsafeExportPrivKeyHex returns a private key in unarmored hex format - UnsafeExportPrivKeyHex(uid string) (string, error) -} - // Option overrides keyring configuration options. type Option func(options *Options) @@ -164,7 +150,13 @@ type Options struct { // purposes and on-the-fly key generation. // Keybase options can be applied when generating this new Keybase. func NewInMemory(cdc codec.Codec, opts ...Option) Keyring { - return newKeystore(keyring.NewArrayKeyring(nil), cdc, BackendMemory, opts...) + return NewInMemoryWithKeyring(keyring.NewArrayKeyring(nil), cdc, opts...) +} + +// NewInMemoryWithKeyring returns an in memory keyring using the specified keyring.Keyring +// as the backing keyring. +func NewInMemoryWithKeyring(kr keyring.Keyring, cdc codec.Codec, opts ...Option) Keyring { + return newKeystore(kr, cdc, BackendMemory, opts...) } // New creates a new instance of a keyring. @@ -500,7 +492,7 @@ func wrapKeyNotFound(err error, msg string) error { } func (ks keystore) List() ([]*Record, error) { - if _, err := ks.MigrateAll(); err != nil { + if err := ks.MigrateAll(); err != nil { return nil, err } @@ -512,7 +504,10 @@ func (ks keystore) List() ([]*Record, error) { var res []*Record //nolint:prealloc sort.Strings(keys) for _, key := range keys { - if strings.Contains(key, addressSuffix) { + // Recall that each key is twice in the keyring: + // - once with the `.info` suffix, which holds the key info + // - another time with the `.address` suffix, which only holds a reference to its associated `.info` key + if !strings.HasSuffix(key, infoSuffix) { continue } @@ -597,7 +592,7 @@ func (ks keystore) isSupportedSigningAlgo(algo SignatureAlgo) bool { } func (ks keystore) Key(uid string) (*Record, error) { - k, _, err := ks.migrate(uid) + k, err := ks.migrate(uid) if err != nil { return nil, err } @@ -778,7 +773,11 @@ func (ks keystore) writeLocalKey(name string, privKey types.PrivKey) (*Record, e return k, ks.writeRecord(k) } -// writeRecord persists a keyring item in keystore if it does not exist there +// writeRecord persists a keyring item in keystore if it does not exist there. +// For each key record, we actually write 2 items: +// - one with key `.info`, with Data = the serialized protobuf key +// - another with key `.address`, with Data = the uid (i.e. the key name) +// This is to be able to query keys both by name and by address. func (ks keystore) writeRecord(k *Record) error { addr, err := k.GetAddress() if err != nil { @@ -797,7 +796,7 @@ func (ks keystore) writeRecord(k *Record) error { serializedRecord, err := ks.cdc.Marshal(k) if err != nil { - return fmt.Errorf("unable to serialize record, err - %s", err) + return fmt.Errorf("unable to serialize record; %+w", err) } item := keyring.Item{ @@ -871,83 +870,95 @@ func (ks keystore) writeMultisigKey(name string, pk types.PubKey) (*Record, erro return k, ks.writeRecord(k) } -func (ks keystore) MigrateAll() (bool, error) { +func (ks keystore) MigrateAll() error { keys, err := ks.db.Keys() if err != nil { - return false, err + return err } if len(keys) == 0 { - return false, nil + return nil } - var migrated bool for _, key := range keys { - if strings.Contains(key, addressSuffix) { + // The keyring items only with `.info` consists the key info. + if !strings.HasSuffix(key, infoSuffix) { continue } - _, migrated2, err := ks.migrate(key) + _, err := ks.migrate(key) if err != nil { - fmt.Printf("migrate err: %q", err) + fmt.Printf("migrate err for key %s: %q\n", key, err) continue } - - if migrated2 { - migrated = true - } } - return migrated, nil + return nil } // migrate converts keyring.Item from amino to proto serialization format. -func (ks keystore) migrate(key string) (*Record, bool, error) { - if !(strings.HasSuffix(key, infoSuffix)) && !(strings.HasPrefix(key, sdk.Bech32PrefixAccAddr)) { +// the `key` argument can be a key uid (e.g. "alice") or with the '.info' +// suffix (e.g. "alice.info"). +// +// It operates as follows: +// 1. retrieve any key +// 2. try to decode it using protobuf +// 3. if ok, then return the key, do nothing else +// 4. if it fails, then try to decode it using amino +// 5. convert from the amino struct to the protobuf struct +// 6. write the proto-encoded key back to the keyring +func (ks keystore) migrate(key string) (*Record, error) { + if !strings.HasSuffix(key, infoSuffix) { key = infoKey(key) } + + // 1. get the key. item, err := ks.db.Get(key) if err != nil { - return nil, false, wrapKeyNotFound(err, key) + return nil, wrapKeyNotFound(err, key) } if len(item.Data) == 0 { - return nil, false, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, key) + return nil, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, key) } - // 2.try to deserialize using proto, if good then continue, otherwise try to deserialize using amino + // 2. Try to deserialize using proto k, err := ks.protoUnmarshalRecord(item.Data) + // 3. If ok then return the key if err == nil { - return k, false, nil + return k, nil } - LegacyInfo, err := unMarshalLegacyInfo(item.Data) + // 4. Try to decode with amino + legacyInfo, err := unMarshalLegacyInfo(item.Data) if err != nil { - return nil, false, fmt.Errorf("unable to unmarshal item.Data, err: %w", err) + return nil, fmt.Errorf("unable to unmarshal item.Data, err: %w", err) } - // 4.serialize info using proto - k, err = ks.convertFromLegacyInfo(LegacyInfo) + // 5. Convert and serialize info using proto + k, err = ks.convertFromLegacyInfo(legacyInfo) if err != nil { - return nil, false, fmt.Errorf("convertFromLegacyInfo, err: %w", err) + return nil, fmt.Errorf("convertFromLegacyInfo, err: %w", err) } serializedRecord, err := ks.cdc.Marshal(k) if err != nil { - return nil, false, fmt.Errorf("unable to serialize record, err: %w", err) + return nil, fmt.Errorf("unable to serialize record, err: %w", err) } item = keyring.Item{ - Key: key, - Data: serializedRecord, - Description: "SDK kerying version", + Key: key, + Data: serializedRecord, } - // 5.overwrite the keyring entry with + + // 6. Overwrite the keyring entry with the new proto-encoded key. if err := ks.SetItem(item); err != nil { - return nil, false, fmt.Errorf("unable to set keyring.Item, err: %w", err) + return nil, fmt.Errorf("unable to set keyring.Item, err: %w", err) } - return k, true, nil + fmt.Printf("Successfully migrated key %s.\n", key) + + return k, nil } func (ks keystore) protoUnmarshalRecord(bz []byte) (*Record, error) { @@ -996,29 +1007,6 @@ func (ks keystore) convertFromLegacyInfo(info LegacyInfo) (*Record, error) { } } -type unsafeKeystore struct { - keystore -} - -// NewUnsafe returns a new keyring that provides support for unsafe operations. -func NewUnsafe(kr Keyring) UnsafeKeyring { - // The type assertion is against the only keystore - // implementation that is currently provided. - ks := kr.(keystore) - - return unsafeKeystore{ks} -} - -// UnsafeExportPrivKeyHex exports private keys in unarmored hexadecimal format. -func (ks unsafeKeystore) UnsafeExportPrivKeyHex(uid string) (privkey string, err error) { - priv, err := ks.ExportPrivateKeyObject(uid) - if err != nil { - return "", err - } - - return hex.EncodeToString(priv.Bytes()), nil -} - func addrHexKeyAsString(address sdk.Address) string { return fmt.Sprintf("%s.%s", hex.EncodeToString(address.Bytes()), addressSuffix) } diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index b57351ba947a..6845b6088212 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -19,7 +19,6 @@ func TestInMemoryCreateLedger(t *testing.T) { kb := NewInMemory(cdc) k, err := kb.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 118, 3, 1) - if err != nil { require.Error(t, err) require.Equal(t, "ledger nano S: support for ledger devices is not available in this executable", err.Error()) diff --git a/crypto/keyring/keyring_test.go b/crypto/keyring/keyring_test.go index ad3e109b74d0..3d5fc132a121 100644 --- a/crypto/keyring/keyring_test.go +++ b/crypto/keyring/keyring_test.go @@ -3,6 +3,8 @@ package keyring import ( "encoding/hex" "fmt" + "os" + "path/filepath" "strings" "testing" @@ -19,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/crypto/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -59,7 +62,8 @@ func TestNewKeyring(t *testing.T) { func TestKeyManagementKeyRing(t *testing.T) { cdc := getCodec() - kb, err := New("keybasename", "test", t.TempDir(), nil, cdc) + tempDir := t.TempDir() + kb, err := New("keybasename", "test", tempDir, nil, cdc) require.NoError(t, err) require.NotNil(t, cdc) @@ -151,6 +155,15 @@ func TestKeyManagementKeyRing(t *testing.T) { require.NoError(t, err) require.Equal(t, 1, len(keyS)) + // create some random directory inside the keyring directory to check migrate ignores + // all files other than *.info + newPath := filepath.Join(tempDir, "random") + require.NoError(t, os.Mkdir(newPath, 0755)) + items, err := os.ReadDir(tempDir) + require.GreaterOrEqual(t, len(items), 2) + keyS, err = kb.List() + require.NoError(t, err) + // addr cache gets nuked - and test skip flag require.NoError(t, kb.Delete(n2)) } @@ -443,6 +456,49 @@ func TestInMemoryLanguage(t *testing.T) { require.Equal(t, "unsupported language: only english is supported", err.Error()) } +func TestInMemoryWithKeyring(t *testing.T) { + priv := cryptotypes.PrivKey(secp256k1.GenPrivKey()) + pub := priv.PubKey() + + cdc := getCodec() + _, err := NewLocalRecord("test record", priv, pub) + + multi := multisig.NewLegacyAminoPubKey( + 1, []cryptotypes.PubKey{ + pub, + }, + ) + + appName := "test-app" + + legacyMultiInfo, err := NewLegacyMultiInfo(appName, multi) + require.NoError(t, err) + serializedLegacyMultiInfo := MarshalInfo(legacyMultiInfo) + + kb := NewInMemoryWithKeyring(keyring.NewArrayKeyring([]keyring.Item{ + { + Key: appName + ".info", + Data: serializedLegacyMultiInfo, + Description: "test description", + }, + }), cdc) + + t.Run("key exists", func(t *testing.T) { + _, err := kb.Key(appName) + require.NoError(t, err) + }) + + t.Run("key deleted", func(t *testing.T) { + err := kb.Delete(appName) + require.NoError(t, err) + + t.Run("key is gone", func(t *testing.T) { + _, err := kb.Key(appName) + require.Error(t, err) + }) + }) +} + func TestInMemoryCreateMultisig(t *testing.T) { cdc := getCodec() kb, err := New("keybasename", "memory", "", nil, cdc) @@ -1077,19 +1133,19 @@ func TestNonConsistentKeyring_SavePubKey(t *testing.T) { priv := ed25519.GenPrivKey() pub := priv.PubKey() - k, err := kr.SaveOfflineKey(key, pub) - require.Nil(t, err) + _, err = kr.SaveOfflineKey(key, pub) + require.NoError(t, err) // broken keyring state test unsafeKr, ok := kr.(keystore) require.True(t, ok) // we lost public key for some reason, but still have an address record - unsafeKr.db.Remove(infoKey(key)) + require.NoError(t, unsafeKr.db.Remove(infoKey(key))) list, err = kr.List() require.NoError(t, err) require.Equal(t, 0, len(list)) - k, err = kr.SaveOfflineKey(key, pub) + k, err := kr.SaveOfflineKey(key, pub) require.Nil(t, err) pubKey, err := k.GetPubKey() require.NoError(t, err) @@ -1287,17 +1343,13 @@ func TestAltKeyring_UnsafeExportPrivKeyHex(t *testing.T) { _, _, err = kr.NewMnemonic(uid, English, sdk.FullFundraiserPath, DefaultBIP39Passphrase, hd.Secp256k1) require.NoError(t, err) - unsafeKeyring := NewUnsafe(kr) - privKey, err := unsafeKeyring.UnsafeExportPrivKeyHex(uid) - - require.NoError(t, err) - require.Equal(t, 64, len(privKey)) + privKey, err := kr.(keystore).ExportPrivateKeyObject(uid) - _, err = hex.DecodeString(privKey) require.NoError(t, err) + require.Equal(t, 64, len(hex.EncodeToString(privKey.Bytes()))) // test error on non existing key - _, err = unsafeKeyring.UnsafeExportPrivKeyHex("non-existing") + _, err = kr.(keystore).ExportPrivateKeyObject("non-existing") require.Error(t, err) } diff --git a/crypto/keyring/legacy_info.go b/crypto/keyring/legacy_info.go index 8b05b6a0312c..8de45feb1be2 100644 --- a/crypto/keyring/legacy_info.go +++ b/crypto/keyring/legacy_info.go @@ -255,7 +255,6 @@ func unMarshalLegacyInfo(bz []byte) (info LegacyInfo, err error) { // privKeyFromLegacyInfo exports a private key from LegacyInfo func privKeyFromLegacyInfo(info LegacyInfo) (cryptotypes.PrivKey, error) { - switch linfo := info.(type) { case legacyLocalInfo: if linfo.PrivKeyArmor == "" { diff --git a/crypto/keyring/migration_test.go b/crypto/keyring/migration_test.go index cfe55bd657a9..2435671e4e47 100644 --- a/crypto/keyring/migration_test.go +++ b/crypto/keyring/migration_test.go @@ -16,7 +16,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -const n1 = "cosmos" +const n1 = "cosmos.info" type MigrationTestSuite struct { suite.Suite @@ -57,8 +57,7 @@ func (s *MigrationTestSuite) TestMigrateLegacyLocalKey() { s.Require().NoError(s.ks.SetItem(item)) - _, migrated, err := s.ks.migrate(n1) - s.Require().True(migrated) + _, err := s.ks.migrate(n1) s.Require().NoError(err) } @@ -76,8 +75,7 @@ func (s *MigrationTestSuite) TestMigrateLegacyLedgerKey() { s.Require().NoError(s.ks.SetItem(item)) - _, migrated, err := s.ks.migrate(n1) - s.Require().True(migrated) + _, err := s.ks.migrate(n1) s.Require().NoError(err) } @@ -93,8 +91,7 @@ func (s *MigrationTestSuite) TestMigrateLegacyOfflineKey() { s.Require().NoError(s.ks.SetItem(item)) - _, migrated, err := s.ks.migrate(n1) - s.Require().True(migrated) + _, err := s.ks.migrate(n1) s.Require().NoError(err) } @@ -117,8 +114,7 @@ func (s *MigrationTestSuite) TestMigrateLegacyMultiKey() { s.Require().NoError(s.ks.SetItem(item)) - _, migrated, err := s.ks.migrate(n1) - s.Require().True(migrated) + _, err = s.ks.migrate(n1) s.Require().NoError(err) } @@ -137,7 +133,7 @@ func (s *MigrationTestSuite) TestMigrateLocalRecord() { s.Require().NoError(s.ks.SetItem(item)) - k2, migrated, err := s.ks.migrate(n1) + k2, err := s.ks.migrate(n1) s.Require().Equal(k2.Name, k1.Name) pub, err := k2.GetPubKey() @@ -148,7 +144,6 @@ func (s *MigrationTestSuite) TestMigrateLocalRecord() { s.Require().NoError(err) s.Require().Equal(priv, s.priv) - s.Require().False(migrated) s.Require().NoError(err) } @@ -162,8 +157,7 @@ func (s *MigrationTestSuite) TestMigrateOneRandomItemError() { s.Require().NoError(s.ks.SetItem(errItem)) - _, migrated, err := s.ks.migrate(n1) - s.Require().False(migrated) + _, err := s.ks.migrate(n1) s.Require().Error(err) } @@ -197,14 +191,12 @@ func (s *MigrationTestSuite) TestMigrateAllLegacyMultiOffline() { s.Require().NoError(s.ks.SetItem(item)) - migrated, err := s.kb.MigrateAll() - s.Require().True(migrated) + err = s.kb.MigrateAll() s.Require().NoError(err) } func (s *MigrationTestSuite) TestMigrateAllNoItem() { - migrated, err := s.kb.MigrateAll() - s.Require().False(migrated) + err := s.kb.MigrateAll() s.Require().NoError(err) } @@ -221,9 +213,8 @@ func (s *MigrationTestSuite) TestMigrateErrUnknownItemKey() { s.Require().NoError(s.ks.SetItem(item)) incorrectItemKey := n1 + "1" - _, migrated, err := s.ks.migrate(incorrectItemKey) - s.Require().False(migrated) - s.Require().EqualError(err, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, incorrectItemKey).Error()) + _, err := s.ks.migrate(incorrectItemKey) + s.Require().EqualError(err, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, infoKey(incorrectItemKey)).Error()) } func (s *MigrationTestSuite) TestMigrateErrEmptyItemData() { @@ -235,10 +226,10 @@ func (s *MigrationTestSuite) TestMigrateErrEmptyItemData() { s.Require().NoError(s.ks.SetItem(item)) - _, migrated, err := s.ks.migrate(n1) - s.Require().False(migrated) + _, err := s.ks.migrate(n1) s.Require().EqualError(err, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, n1).Error()) } + func TestMigrationTestSuite(t *testing.T) { suite.Run(t, new(MigrationTestSuite)) } diff --git a/crypto/keyring/record.go b/crypto/keyring/record.go index acc84f6490b1..1b1885648e5e 100644 --- a/crypto/keyring/record.go +++ b/crypto/keyring/record.go @@ -28,7 +28,7 @@ func NewLocalRecord(name string, priv cryptotypes.PrivKey, pk cryptotypes.PubKey return nil, err } - recordLocal := &Record_Local{any, priv.Type()} + recordLocal := &Record_Local{any} recordLocalItem := &Record_Local_{recordLocal} return newRecord(name, pk, recordLocalItem) diff --git a/crypto/keyring/record.pb.go b/crypto/keyring/record.pb.go index c94e1ce0faa8..5e8df719a5c6 100644 --- a/crypto/keyring/record.pb.go +++ b/crypto/keyring/record.pb.go @@ -146,8 +146,7 @@ func (*Record) XXX_OneofWrappers() []interface{} { // Item is a keyring item stored in a keyring backend. // Local item type Record_Local struct { - PrivKey *types.Any `protobuf:"bytes,1,opt,name=priv_key,json=privKey,proto3" json:"priv_key,omitempty"` - PrivKeyType string `protobuf:"bytes,2,opt,name=priv_key_type,json=privKeyType,proto3" json:"priv_key_type,omitempty"` + PrivKey *types.Any `protobuf:"bytes,1,opt,name=priv_key,json=privKey,proto3" json:"priv_key,omitempty"` } func (m *Record_Local) Reset() { *m = Record_Local{} } @@ -308,34 +307,33 @@ func init() { } var fileDescriptor_36d640103edea005 = []byte{ - // 424 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4d, 0x8b, 0xd4, 0x30, - 0x18, 0xc7, 0x5b, 0xed, 0xb4, 0x4e, 0x16, 0x2f, 0x61, 0x0f, 0xb5, 0x48, 0x19, 0x16, 0xd4, 0x01, - 0xd9, 0x84, 0xd5, 0x39, 0x2f, 0xec, 0xe0, 0x61, 0x16, 0x15, 0x97, 0xe0, 0x49, 0x84, 0xa5, 0x2f, - 0x99, 0xb6, 0x4c, 0xdb, 0x84, 0x4c, 0x3b, 0x90, 0x2f, 0x21, 0x7e, 0xac, 0x3d, 0xee, 0xd1, 0xa3, - 0xce, 0x7c, 0x11, 0xc9, 0x93, 0xf6, 0xe0, 0x82, 0x8e, 0xa7, 0xa6, 0xe4, 0xf7, 0xfc, 0x5f, 0x1e, - 0x82, 0x5e, 0x64, 0x62, 0xdb, 0x88, 0x2d, 0xcd, 0x94, 0x96, 0x9d, 0xa0, 0x1b, 0xae, 0x55, 0xd5, - 0x16, 0x74, 0x77, 0x41, 0x15, 0xcf, 0x84, 0xca, 0x89, 0x54, 0xa2, 0x13, 0x38, 0xb4, 0x18, 0xb1, - 0x18, 0x19, 0x30, 0xb2, 0xbb, 0x88, 0x4e, 0x0b, 0x51, 0x08, 0x80, 0xa8, 0x39, 0x59, 0x3e, 0x7a, - 0x56, 0x08, 0x51, 0xd4, 0x9c, 0xc2, 0x5f, 0xda, 0xaf, 0x69, 0xd2, 0xea, 0xe1, 0xea, 0xf9, 0x9f, - 0x8e, 0x65, 0x6e, 0xcc, 0xca, 0xc1, 0xe8, 0xec, 0x9b, 0x87, 0x7c, 0x06, 0xce, 0x18, 0x23, 0xaf, - 0x4d, 0x1a, 0x1e, 0xba, 0x33, 0x77, 0x3e, 0x65, 0x70, 0xc6, 0xe7, 0x28, 0x90, 0x7d, 0x7a, 0xbb, - 0xe1, 0x3a, 0x7c, 0x34, 0x73, 0xe7, 0x27, 0x6f, 0x4e, 0x89, 0x75, 0x22, 0xa3, 0x13, 0xb9, 0x6a, - 0x35, 0xf3, 0x65, 0x9f, 0xbe, 0xe7, 0x1a, 0x5f, 0xa2, 0x49, 0x2d, 0xb2, 0xa4, 0x0e, 0x1f, 0x03, - 0xfc, 0x92, 0xfc, 0xad, 0x06, 0xb1, 0x9e, 0xe4, 0x83, 0xa1, 0x57, 0x0e, 0xb3, 0x63, 0xf8, 0x0a, - 0xf9, 0x35, 0xcf, 0x0b, 0xae, 0x42, 0x0f, 0x04, 0x5e, 0x1d, 0x17, 0x00, 0x7c, 0xe5, 0xb0, 0x61, - 0xd0, 0x44, 0x68, 0xfa, 0xba, 0xab, 0xc2, 0xc9, 0x7f, 0x46, 0xf8, 0x68, 0x68, 0x13, 0x01, 0xc6, - 0xf0, 0x3b, 0x14, 0x88, 0xf5, 0xba, 0xae, 0x5a, 0x1e, 0xfa, 0xa0, 0x30, 0x3f, 0xaa, 0xf0, 0xc9, - 0xf2, 0x2b, 0x87, 0x8d, 0xa3, 0xd1, 0x57, 0x34, 0x81, 0x6a, 0x98, 0xa2, 0x27, 0x52, 0x55, 0x3b, - 0xd8, 0xa0, 0xfb, 0x8f, 0x0d, 0x06, 0x86, 0x32, 0x2b, 0x3c, 0x43, 0x4f, 0xc7, 0x81, 0xdb, 0x4e, - 0x4b, 0x0e, 0x7b, 0x9f, 0xb2, 0x93, 0xe1, 0xfe, 0xb3, 0x96, 0x3c, 0xba, 0x44, 0xbe, 0xed, 0x8d, - 0x17, 0xc8, 0x93, 0x49, 0x57, 0x0e, 0xd2, 0xb3, 0x07, 0x51, 0xcb, 0xdc, 0xa4, 0x5c, 0x5e, 0xdf, - 0x2c, 0x16, 0x37, 0x89, 0x4a, 0x9a, 0x2d, 0x03, 0x3a, 0x0a, 0xd0, 0x04, 0x5a, 0x47, 0x53, 0x14, - 0x0c, 0xe1, 0x97, 0x3e, 0xf2, 0xaa, 0x8e, 0x37, 0xcb, 0xeb, 0xbb, 0x5f, 0xb1, 0x73, 0xb7, 0x8f, - 0xdd, 0xfb, 0x7d, 0xec, 0xfe, 0xdc, 0xc7, 0xee, 0xf7, 0x43, 0xec, 0xdc, 0x1f, 0x62, 0xe7, 0xc7, - 0x21, 0x76, 0xbe, 0xbc, 0x2e, 0xaa, 0xae, 0xec, 0x53, 0x92, 0x89, 0x86, 0x8e, 0xef, 0x0a, 0x3e, - 0xe7, 0xdb, 0x7c, 0xf3, 0xe0, 0x51, 0xa7, 0x3e, 0x34, 0x7c, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0xe8, 0x29, 0x24, 0x50, 0xf4, 0x02, 0x00, 0x00, + // 408 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x3d, 0x6b, 0xdb, 0x40, + 0x1c, 0xc6, 0xa5, 0x5a, 0x2f, 0xf5, 0x75, 0x3b, 0x3c, 0xa8, 0xa2, 0x08, 0x53, 0x68, 0x6b, 0x28, + 0xbe, 0xc3, 0xad, 0x87, 0x4e, 0x06, 0x9b, 0x0e, 0x36, 0x4e, 0x88, 0xd1, 0x98, 0x25, 0xe8, 0xe5, + 0x2c, 0x09, 0x4b, 0x3a, 0x71, 0x92, 0x0c, 0xfa, 0x16, 0xf9, 0x58, 0x1e, 0x3d, 0x66, 0x4c, 0xec, + 0x2d, 0x9f, 0x22, 0xdc, 0x9d, 0x3c, 0xc4, 0x90, 0x38, 0x93, 0x4e, 0xdc, 0xef, 0xf9, 0x3f, 0xcf, + 0x73, 0xfc, 0xc1, 0x8f, 0x80, 0x96, 0x19, 0x2d, 0x71, 0xc0, 0x9a, 0xa2, 0xa2, 0x78, 0x43, 0x1a, + 0x96, 0xe4, 0x11, 0xde, 0x8e, 0x30, 0x23, 0x01, 0x65, 0x21, 0x2a, 0x18, 0xad, 0x28, 0xb4, 0x24, + 0x86, 0x24, 0x86, 0x5a, 0x0c, 0x6d, 0x47, 0x76, 0x2f, 0xa2, 0x11, 0x15, 0x10, 0xe6, 0x27, 0xc9, + 0xdb, 0x5f, 0x23, 0x4a, 0xa3, 0x94, 0x60, 0xf1, 0xe7, 0xd7, 0x6b, 0xec, 0xe5, 0x4d, 0x7b, 0xf5, + 0xed, 0xb5, 0x63, 0x1c, 0x72, 0xb3, 0xb8, 0x35, 0xfa, 0xfe, 0xdc, 0x01, 0x86, 0x2b, 0x9c, 0x21, + 0x04, 0x5a, 0xee, 0x65, 0xc4, 0x52, 0xfb, 0xea, 0xa0, 0xeb, 0x8a, 0x33, 0x1c, 0x02, 0xb3, 0xa8, + 0xfd, 0xbb, 0x0d, 0x69, 0xac, 0x4f, 0x7d, 0x75, 0xf0, 0xe5, 0x4f, 0x0f, 0x49, 0x27, 0x74, 0x72, + 0x42, 0xd3, 0xbc, 0x71, 0x8d, 0xa2, 0xf6, 0x97, 0xa4, 0x81, 0x13, 0xa0, 0xa7, 0x34, 0xf0, 0x52, + 0xab, 0x23, 0xe0, 0x9f, 0xe8, 0xad, 0x1a, 0x48, 0x7a, 0xa2, 0x2b, 0x4e, 0xcf, 0x15, 0x57, 0xca, + 0xe0, 0x14, 0x18, 0x29, 0x09, 0x23, 0xc2, 0x2c, 0x4d, 0x0c, 0xf8, 0x75, 0x79, 0x80, 0xc0, 0xe7, + 0x8a, 0xdb, 0x0a, 0x79, 0x84, 0xac, 0x4e, 0xab, 0xc4, 0xd2, 0x3f, 0x18, 0xe1, 0x9a, 0xd3, 0x3c, + 0x82, 0x90, 0xc1, 0xff, 0xc0, 0xa4, 0xeb, 0x75, 0x9a, 0xe4, 0xc4, 0x32, 0xc4, 0x84, 0xc1, 0xc5, + 0x09, 0x37, 0x92, 0x9f, 0x2b, 0xee, 0x49, 0x6a, 0xff, 0x03, 0xba, 0xa8, 0x06, 0x31, 0xf8, 0x5c, + 0xb0, 0x64, 0x2b, 0x5e, 0x50, 0x7d, 0xe7, 0x05, 0x4d, 0x4e, 0x2d, 0x49, 0x63, 0x4f, 0x80, 0x21, + 0x3b, 0xc1, 0x31, 0xd0, 0x0a, 0xaf, 0x8a, 0x5b, 0x59, 0xff, 0x2c, 0x46, 0x1c, 0xf2, 0x04, 0xb3, + 0xc5, 0x6a, 0x3c, 0x5e, 0x79, 0xcc, 0xcb, 0x4a, 0x57, 0xd0, 0xb6, 0x09, 0x74, 0xd1, 0xc8, 0xee, + 0x02, 0xb3, 0x0d, 0x36, 0x33, 0x80, 0x96, 0x54, 0x24, 0x9b, 0x2d, 0x76, 0x4f, 0x8e, 0xb2, 0x3b, + 0x38, 0xea, 0xfe, 0xe0, 0xa8, 0x8f, 0x07, 0x47, 0xbd, 0x3f, 0x3a, 0xca, 0xfe, 0xe8, 0x28, 0x0f, + 0x47, 0x47, 0xb9, 0xfd, 0x1d, 0x25, 0x55, 0x5c, 0xfb, 0x28, 0xa0, 0x19, 0x3e, 0xed, 0x8c, 0xf8, + 0x0c, 0xcb, 0x70, 0x73, 0xb6, 0xb0, 0xbe, 0x21, 0xd2, 0xff, 0x7d, 0x09, 0x00, 0x00, 0xff, 0xff, + 0x64, 0x83, 0x0c, 0x89, 0xd0, 0x02, 0x00, 0x00, } func (m *Record) Marshal() (dAtA []byte, err error) { @@ -493,13 +491,6 @@ func (m *Record_Local) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PrivKeyType) > 0 { - i -= len(m.PrivKeyType) - copy(dAtA[i:], m.PrivKeyType) - i = encodeVarintRecord(dAtA, i, uint64(len(m.PrivKeyType))) - i-- - dAtA[i] = 0x12 - } if m.PrivKey != nil { { size, err := m.PrivKey.MarshalToSizedBuffer(dAtA[:i]) @@ -685,10 +676,6 @@ func (m *Record_Local) Size() (n int) { l = m.PrivKey.Size() n += 1 + l + sovRecord(uint64(l)) } - l = len(m.PrivKeyType) - if l > 0 { - n += 1 + l + sovRecord(uint64(l)) - } return n } @@ -1052,38 +1039,6 @@ func (m *Record_Local) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivKeyType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecord - } - 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 ErrInvalidLengthRecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrivKeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRecord(dAtA[iNdEx:]) diff --git a/crypto/keyring/record_test.go b/crypto/keyring/record_test.go index 6c17379b4653..2ec0401d87ff 100644 --- a/crypto/keyring/record_test.go +++ b/crypto/keyring/record_test.go @@ -78,7 +78,6 @@ func (s *RecordTestSuite) TestLocalRecordMarshaling() { anyPrivKey, err := codectypes.NewAnyWithValue(s.priv) s.Require().NoError(err) s.Require().Equal(localRecord2.PrivKey, anyPrivKey) - s.Require().Equal(localRecord2.PrivKeyType, s.priv.Type()) } func (s *RecordTestSuite) TestLedgerRecordMarshaling() { diff --git a/crypto/keyring/signing_algorithms_test.go b/crypto/keyring/signing_algorithms_test.go index e99492f12a17..131ade58b4e2 100644 --- a/crypto/keyring/signing_algorithms_test.go +++ b/crypto/keyring/signing_algorithms_test.go @@ -59,8 +59,7 @@ func TestAltSigningAlgoList_String(t *testing.T) { require.Equal(t, fmt.Sprintf("%s,notSupported", hd.Secp256k1Type), list.String()) } -type notSupportedAlgo struct { -} +type notSupportedAlgo struct{} func (n notSupportedAlgo) Name() hd.PubKeyType { return "notSupported" diff --git a/crypto/keys/ed25519/ed25519.go b/crypto/keys/ed25519/ed25519.go index 4ade041c4137..05d5d7466e13 100644 --- a/crypto/keys/ed25519/ed25519.go +++ b/crypto/keys/ed25519/ed25519.go @@ -34,8 +34,10 @@ const ( keyType = "ed25519" ) -var _ cryptotypes.PrivKey = &PrivKey{} -var _ codec.AminoMarshaler = &PrivKey{} +var ( + _ cryptotypes.PrivKey = &PrivKey{} + _ codec.AminoMarshaler = &PrivKey{} +) // Bytes returns the privkey byte format. func (privKey *PrivKey) Bytes() []byte { @@ -150,8 +152,10 @@ func GenPrivKeyFromSecret(secret []byte) *PrivKey { //------------------------------------- -var _ cryptotypes.PubKey = &PubKey{} -var _ codec.AminoMarshaler = &PubKey{} +var ( + _ cryptotypes.PubKey = &PubKey{} + _ codec.AminoMarshaler = &PubKey{} +) // Address is the SHA256-20 of the raw pubkey bytes. // It doesn't implement ADR-28 addresses and it must not be used diff --git a/crypto/keys/internal/benchmarking/bench.go b/crypto/keys/internal/benchmarking/bench.go index aab5d5f30382..dc99a082fdfa 100644 --- a/crypto/keys/internal/benchmarking/bench.go +++ b/crypto/keys/internal/benchmarking/bench.go @@ -30,7 +30,6 @@ func BenchmarkSigning(b *testing.B, priv types.PrivKey) { b.ResetTimer() for i := 0; i < b.N; i++ { _, err := priv.Sign(message) - if err != nil { b.FailNow() } diff --git a/crypto/keys/internal/ecdsa/privkey.go b/crypto/keys/internal/ecdsa/privkey.go index 690c07670d64..2aeedb1c4ddc 100644 --- a/crypto/keys/internal/ecdsa/privkey.go +++ b/crypto/keys/internal/ecdsa/privkey.go @@ -29,7 +29,6 @@ func IsSNormalized(sigS *big.Int) bool { // NormalizeS will invert the s value if not already in the lower half // of curve order value func NormalizeS(sigS *big.Int) *big.Int { - if IsSNormalized(sigS) { return sigS } @@ -41,7 +40,6 @@ func NormalizeS(sigS *big.Int) *big.Int { // R, S are padded to 32 bytes respectively. // code roughly copied from secp256k1_nocgo.go func signatureRaw(r *big.Int, s *big.Int) []byte { - rBytes := r.Bytes() sBytes := s.Bytes() sigBytes := make([]byte, 64) @@ -90,10 +88,8 @@ func (sk *PrivKey) Bytes() []byte { // It then raw encodes the signature as two fixed width 32-byte values // concatenated, reusing the code copied from secp256k1_nocgo.go func (sk *PrivKey) Sign(msg []byte) ([]byte, error) { - digest := sha256.Sum256(msg) r, s, err := ecdsa.Sign(rand.Reader, &sk.PrivateKey, digest[:]) - if err != nil { return nil, err } diff --git a/crypto/keys/internal/ecdsa/privkey_internal_test.go b/crypto/keys/internal/ecdsa/privkey_internal_test.go index 1eae718f698f..660a62aa2ba8 100644 --- a/crypto/keys/internal/ecdsa/privkey_internal_test.go +++ b/crypto/keys/internal/ecdsa/privkey_internal_test.go @@ -4,11 +4,11 @@ import ( "crypto/ecdsa" "crypto/elliptic" "crypto/sha256" - "github.com/tendermint/tendermint/crypto" "math/big" "testing" "github.com/stretchr/testify/suite" + "github.com/tendermint/tendermint/crypto" ) func TestSKSuite(t *testing.T) { @@ -38,11 +38,12 @@ func (suite *SKSuite) TestMarshal() { require := suite.Require() const size = 32 - var buffer = make([]byte, size) - suite.sk.MarshalTo(buffer) + buffer := make([]byte, size) + _, err := suite.sk.MarshalTo(buffer) + require.NoError(err) - var sk = new(PrivKey) - err := sk.Unmarshal(buffer, secp256r1, size) + sk := new(PrivKey) + err = sk.Unmarshal(buffer, secp256r1, size) require.NoError(err) require.True(sk.Equal(&suite.sk.PrivateKey)) } @@ -80,7 +81,7 @@ func (suite *SKSuite) TestSign() { // leave r untouched! high_s := new(big.Int).Mod(new(big.Int).Neg(low_s), elliptic.P256().Params().N) - require.False(suite.pk.VerifySignature(msg, signatureRaw(r,high_s))) + require.False(suite.pk.VerifySignature(msg, signatureRaw(r, high_s))) // Valid signature using low_s, but too long sigCpy = make([]byte, len(sig)+2) diff --git a/crypto/keys/internal/ecdsa/pubkey.go b/crypto/keys/internal/ecdsa/pubkey.go index 75fbd8b8826d..69b4a7f58504 100644 --- a/crypto/keys/internal/ecdsa/pubkey.go +++ b/crypto/keys/internal/ecdsa/pubkey.go @@ -60,7 +60,6 @@ func (pk *PubKey) Bytes() []byte { // lower half of the curve order // 7/21/21 - expects raw encoded signature (fixed-width 64-bytes, R || S) func (pk *PubKey) VerifySignature(msg []byte, sig []byte) bool { - // check length for raw signature // which is two 32-byte padded big.Ints // concatenated diff --git a/crypto/keys/internal/ecdsa/pubkey_internal_test.go b/crypto/keys/internal/ecdsa/pubkey_internal_test.go index 88dc95a3bbd5..5434c8504c83 100644 --- a/crypto/keys/internal/ecdsa/pubkey_internal_test.go +++ b/crypto/keys/internal/ecdsa/pubkey_internal_test.go @@ -59,12 +59,12 @@ func (suite *PKSuite) TestMarshal() { require := suite.Require() const size = 33 // secp256r1 size - var buffer = make([]byte, size) + buffer := make([]byte, size) n, err := suite.pk.MarshalTo(buffer) require.NoError(err) require.Equal(size, n) - var pk = new(PubKey) + pk := new(PubKey) err = pk.Unmarshal(buffer, secp256r1, size) require.NoError(err) require.True(pk.PublicKey.Equal(&suite.pk.PublicKey)) diff --git a/crypto/keys/multisig/multisig.go b/crypto/keys/multisig/multisig.go index e39c508be6f8..eb381bf5987a 100644 --- a/crypto/keys/multisig/multisig.go +++ b/crypto/keys/multisig/multisig.go @@ -11,8 +11,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" ) -var _ multisigtypes.PubKey = &LegacyAminoPubKey{} -var _ types.UnpackInterfacesMessage = &LegacyAminoPubKey{} +var ( + _ multisigtypes.PubKey = &LegacyAminoPubKey{} + _ types.UnpackInterfacesMessage = &LegacyAminoPubKey{} +) // NewLegacyAminoPubKey returns a new LegacyAminoPubKey. // Multisig can be constructed with multiple same keys - it will increase the power of diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index 1fc16893eb90..ae3023da828b 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -110,7 +110,8 @@ func TestVerifyMultisignature(t *testing.T) { pk = genPk }, true, - }, { + }, + { "wrong size for sig bit array", func(require *require.Assertions) { pubKeys := generatePubKeys(3) @@ -165,7 +166,8 @@ func TestVerifyMultisignature(t *testing.T) { ) }, true, - }, { + }, + { "duplicate signatures", func(require *require.Assertions) { pubKeys, sigs := generatePubKeysAndSignatures(5, msg) @@ -173,12 +175,13 @@ func TestVerifyMultisignature(t *testing.T) { sig = multisig.NewMultisig(5) require.Error(pk.VerifyMultisignature(signBytesFn, sig)) - multisig.AddSignatureFromPubKey(sig, sigs[0], pubKeys[0], pubKeys) + require.NoError(multisig.AddSignatureFromPubKey(sig, sigs[0], pubKeys[0], pubKeys)) // Add second signature manually sig.Signatures = append(sig.Signatures, sigs[0]) }, false, - }, { + }, + { "duplicated key", func(require *require.Assertions) { // here we test an edge case where we create a multi sig with two same @@ -191,7 +194,8 @@ func TestVerifyMultisignature(t *testing.T) { multisig.AddSignature(sig, sigs[0], 1) }, true, - }, { + }, + { "same key used twice", func(require *require.Assertions) { pubkeys, sigs := generatePubKeysAndSignatures(3, msg) @@ -201,15 +205,16 @@ func TestVerifyMultisignature(t *testing.T) { multisig.AddSignature(sig, sigs[0], 1) }, false, - }, { + }, + { "unable to verify signature", func(require *require.Assertions) { pubKeys := generatePubKeys(2) _, sigs := generatePubKeysAndSignatures(2, msg) pk = kmultisig.NewLegacyAminoPubKey(2, pubKeys) sig = multisig.NewMultisig(2) - multisig.AddSignatureFromPubKey(sig, sigs[0], pubKeys[0], pubKeys) - multisig.AddSignatureFromPubKey(sig, sigs[1], pubKeys[1], pubKeys) + require.NoError(multisig.AddSignatureFromPubKey(sig, sigs[0], pubKeys[0], pubKeys)) + require.NoError(multisig.AddSignatureFromPubKey(sig, sigs[1], pubKeys[1], pubKeys)) }, false, }, diff --git a/crypto/keys/secp256k1/internal/secp256k1/curve.go b/crypto/keys/secp256k1/internal/secp256k1/curve.go index fa1b199a3484..b5c80b23ad62 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/curve.go +++ b/crypto/keys/secp256k1/internal/secp256k1/curve.go @@ -93,19 +93,19 @@ func (BitCurve *BitCurve) Params() *elliptic.CurveParams { // IsOnCurve returns true if the given (x,y) lies on the BitCurve. func (BitCurve *BitCurve) IsOnCurve(x, y *big.Int) bool { // y² = x³ + b - y2 := new(big.Int).Mul(y, y) //y² - y2.Mod(y2, BitCurve.P) //y²%P + y2 := new(big.Int).Mul(y, y) // y² + y2.Mod(y2, BitCurve.P) // y²%P - x3 := new(big.Int).Mul(x, x) //x² - x3.Mul(x3, x) //x³ + x3 := new(big.Int).Mul(x, x) // x² + x3.Mul(x3, x) // x³ - x3.Add(x3, BitCurve.B) //x³+B + x3.Add(x3, BitCurve.B) // x³+B x3.Mod(x3, BitCurve.P) //(x³+B)%P return x3.Cmp(y2) == 0 } -//TODO: double check if the function is okay +// TODO: double check if the function is okay // affineFromJacobian reverses the Jacobian transform. See the comment at the // top of the file. func (BitCurve *BitCurve) affineFromJacobian(x, y, z *big.Int) (xOut, yOut *big.Int) { @@ -217,30 +217,30 @@ func (BitCurve *BitCurve) Double(x1, y1 *big.Int) (*big.Int, *big.Int) { func (BitCurve *BitCurve) doubleJacobian(x, y, z *big.Int) (*big.Int, *big.Int, *big.Int) { // See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l - a := new(big.Int).Mul(x, x) //X1² - b := new(big.Int).Mul(y, y) //Y1² - c := new(big.Int).Mul(b, b) //B² + a := new(big.Int).Mul(x, x) // X1² + b := new(big.Int).Mul(y, y) // Y1² + c := new(big.Int).Mul(b, b) // B² - d := new(big.Int).Add(x, b) //X1+B + d := new(big.Int).Add(x, b) // X1+B d.Mul(d, d) //(X1+B)² d.Sub(d, a) //(X1+B)²-A d.Sub(d, c) //(X1+B)²-A-C - d.Mul(d, big.NewInt(2)) //2*((X1+B)²-A-C) + d.Mul(d, big.NewInt(2)) // 2*((X1+B)²-A-C) - e := new(big.Int).Mul(big.NewInt(3), a) //3*A - f := new(big.Int).Mul(e, e) //E² + e := new(big.Int).Mul(big.NewInt(3), a) // 3*A + f := new(big.Int).Mul(e, e) // E² - x3 := new(big.Int).Mul(big.NewInt(2), d) //2*D - x3.Sub(f, x3) //F-2*D + x3 := new(big.Int).Mul(big.NewInt(2), d) // 2*D + x3.Sub(f, x3) // F-2*D x3.Mod(x3, BitCurve.P) - y3 := new(big.Int).Sub(d, x3) //D-X3 - y3.Mul(e, y3) //E*(D-X3) - y3.Sub(y3, new(big.Int).Mul(big.NewInt(8), c)) //E*(D-X3)-8*C + y3 := new(big.Int).Sub(d, x3) // D-X3 + y3.Mul(e, y3) // E*(D-X3) + y3.Sub(y3, new(big.Int).Mul(big.NewInt(8), c)) // E*(D-X3)-8*C y3.Mod(y3, BitCurve.P) - z3 := new(big.Int).Mul(y, z) //Y1*Z1 - z3.Mul(big.NewInt(2), z3) //3*Y1*Z1 + z3 := new(big.Int).Mul(y, z) // Y1*Z1 + z3.Mul(big.NewInt(2), z3) // 3*Y1*Z1 z3.Mod(z3, BitCurve.P) return x3, y3, z3 diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/contrib/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/contrib/dummy.go index fda594be9914..2c946210c54d 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/contrib/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/contrib/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/dummy.go index 379b16992f47..04bbe3d76ecc 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/include/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/include/dummy.go index 5af540c73c4a..64c71b8451d8 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/include/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/include/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/dummy.go index 65868f38a8ea..2df270adc35e 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/dummy.go index 3c7a696439f0..99c538db51b0 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go index b6fc38327ec8..48c2e0aa5453 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/recovery/dummy.go b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/recovery/dummy.go index b9491f0cb9f4..8efbd7abe71b 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/recovery/dummy.go +++ b/crypto/keys/secp256k1/internal/secp256k1/libsecp256k1/src/modules/recovery/dummy.go @@ -1,3 +1,4 @@ +//go:build dummy // +build dummy // Package c contains only a C file. diff --git a/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go b/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go index ef2a3a3790b4..dbf61b37879f 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go +++ b/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go @@ -48,7 +48,7 @@ func randSig() []byte { // tests for malleability // highest bit of signature ECDSA s value must be 0, in the 33th byte func compactSigCheck(t *testing.T, sig []byte) { - var b = int(sig[32]) + b := int(sig[32]) if b < 0 { t.Errorf("highest bit is negative: %d", b) } diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 231a895a6103..51034275cd94 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -17,8 +17,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/errors" ) -var _ cryptotypes.PrivKey = &PrivKey{} -var _ codec.AminoMarshaler = &PrivKey{} +var ( + _ cryptotypes.PrivKey = &PrivKey{} + _ codec.AminoMarshaler = &PrivKey{} +) const ( PrivKeySize = 32 @@ -138,8 +140,10 @@ func GenPrivKeyFromSecret(secret []byte) *PrivKey { //------------------------------------- -var _ cryptotypes.PubKey = &PubKey{} -var _ codec.AminoMarshaler = &PubKey{} +var ( + _ cryptotypes.PubKey = &PubKey{} + _ codec.AminoMarshaler = &PubKey{} +) // PubKeySize is comprised of 32 bytes for one field element // (the x-coordinate), plus one byte for the parity of the y-coordinate. diff --git a/crypto/keys/secp256k1/secp256k1_internal_test.go b/crypto/keys/secp256k1/secp256k1_internal_test.go index a2c8e73bcbe7..7cbe5949f70c 100644 --- a/crypto/keys/secp256k1/secp256k1_internal_test.go +++ b/crypto/keys/secp256k1/secp256k1_internal_test.go @@ -10,7 +10,6 @@ import ( ) func Test_genPrivKey(t *testing.T) { - empty := make([]byte, 32) oneB := big.NewInt(1).Bytes() onePadded := make([]byte, 32) diff --git a/crypto/keys/secp256k1/secp256k1_test.go b/crypto/keys/secp256k1/secp256k1_test.go index 79d2faf5158e..63f5579459f1 100644 --- a/crypto/keys/secp256k1/secp256k1_test.go +++ b/crypto/keys/secp256k1/secp256k1_test.go @@ -41,7 +41,7 @@ func TestPubKeySecp256k1Address(t *testing.T) { addrBbz, _, _ := base58.CheckDecode(d.addr) addrB := crypto.Address(addrBbz) - var priv = secp256k1.PrivKey{Key: privB} + priv := secp256k1.PrivKey{Key: privB} pubKey := priv.PubKey() pubT, _ := pubKey.(*secp256k1.PubKey) diff --git a/crypto/keys/secp256r1/pubkey_internal_test.go b/crypto/keys/secp256r1/pubkey_internal_test.go index 3df25ebedf0e..7c77665cf1b7 100644 --- a/crypto/keys/secp256r1/pubkey_internal_test.go +++ b/crypto/keys/secp256r1/pubkey_internal_test.go @@ -111,8 +111,7 @@ func (suite *PKSuite) TestMarshalProto() { require.NoError(cdc.UnmarshalInterface(bz, &pkI)) require.True(pkI.Equals(suite.pk)) - cdc.UnmarshalInterface(bz, nil) - require.Error(err, "nil should fail") + require.Error(cdc.UnmarshalInterface(bz, nil), "nil should fail") } func (suite *PKSuite) TestSize() { diff --git a/crypto/ledger/encode_test.go b/crypto/ledger/encode_test.go index 447891fde768..7a60c3d147f5 100644 --- a/crypto/ledger/encode_test.go +++ b/crypto/ledger/encode_test.go @@ -30,7 +30,7 @@ func checkAminoJSON(t *testing.T, src interface{}, dst interface{}, isNil bool) // nolint: govet func ExamplePrintRegisteredTypes() { - cdc.PrintTypes(os.Stdout) + _ = cdc.PrintTypes(os.Stdout) // | Type | Name | Prefix | Length | Notes | // | ---- | ---- | ------ | ----- | ------ | // | PrivKeyLedgerSecp256k1 | tendermint/PrivKeyLedgerSecp256k1 | 0x10CAB393 | variable | | @@ -44,7 +44,6 @@ func ExamplePrintRegisteredTypes() { } func TestNilEncodings(t *testing.T) { - // Check nil Signature. var a, b []byte checkAminoJSON(t, &a, &b, true) @@ -59,5 +58,4 @@ func TestNilEncodings(t *testing.T) { var e, f cryptotypes.PrivKey checkAminoJSON(t, &e, &f, true) require.EqualValues(t, e, f) - } diff --git a/crypto/ledger/ledger_mock.go b/crypto/ledger/ledger_mock.go index 868815982e1f..740a773d12ce 100644 --- a/crypto/ledger/ledger_mock.go +++ b/crypto/ledger/ledger_mock.go @@ -28,8 +28,7 @@ func init() { } } -type LedgerSECP256K1Mock struct { -} +type LedgerSECP256K1Mock struct{} func (mock LedgerSECP256K1Mock) Close() error { return nil diff --git a/crypto/ledger/ledger_real.go b/crypto/ledger/ledger_real.go index 07f8a8e3ed6a..48c87aff7683 100644 --- a/crypto/ledger/ledger_real.go +++ b/crypto/ledger/ledger_real.go @@ -1,3 +1,4 @@ +//go:build cgo && ledger && !test_ledger_mock // +build cgo,ledger,!test_ledger_mock package ledger diff --git a/crypto/ledger/ledger_secp256k1.go b/crypto/ledger/ledger_secp256k1.go index db09ba2e8d3a..dffded571ab5 100644 --- a/crypto/ledger/ledger_secp256k1.go +++ b/crypto/ledger/ledger_secp256k1.go @@ -14,11 +14,9 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/types" ) -var ( - // discoverLedger defines a function to be invoked at runtime for discovering - // a connected Ledger device. - discoverLedger discoverLedgerFn -) +// discoverLedger defines a function to be invoked at runtime for discovering +// a connected Ledger device. +var discoverLedger discoverLedgerFn type ( // discoverLedgerFn defines a Ledger discovery function that returns a @@ -102,8 +100,7 @@ func (pkl PrivKeyLedgerSecp256k1) Sign(message []byte) ([]byte, error) { } // ShowAddress triggers a ledger device to show the corresponding address. -func ShowAddress(path hd.BIP44Params, expectedPubKey types.PubKey, - accountAddressPrefix string) error { +func ShowAddress(path hd.BIP44Params, expectedPubKey types.PubKey, accountAddressPrefix string) error { device, err := getDevice() if err != nil { return err diff --git a/crypto/types/compact_bit_array_test.go b/crypto/types/compact_bit_array_test.go index 1a76d4531352..143f3a07891c 100644 --- a/crypto/types/compact_bit_array_test.go +++ b/crypto/types/compact_bit_array_test.go @@ -67,7 +67,6 @@ func TestBitArrayEqual(t *testing.T) { } func TestJSONMarshalUnmarshal(t *testing.T) { - bA1 := NewCompactBitArray(0) bA2 := NewCompactBitArray(1) @@ -218,7 +217,6 @@ func TestCompactBitArrayNumOfTrueBitsBefore(t *testing.T) { require.NoError(t, err) for i := 0; i < len(tc.bAIndex); i++ { - require.Equal(t, tc.trueValueIndex[i], bA.NumTrueBitsBefore(tc.bAIndex[i]), "tc %d, i %d", tcIndex, i) } }) diff --git a/crypto/xsalsa20symmetric/symmetric.go b/crypto/xsalsa20symmetric/symmetric.go index cf24daea35ce..e205985e33fa 100644 --- a/crypto/xsalsa20symmetric/symmetric.go +++ b/crypto/xsalsa20symmetric/symmetric.go @@ -10,8 +10,10 @@ import ( // TODO, make this into a struct that implements crypto.Symmetric. -const nonceLen = 24 -const secretLen = 32 +const ( + nonceLen = 24 + secretLen = 32 +) // secret must be 32 bytes long. Use something like Sha256(Bcrypt(passphrase)) // The ciphertext is (secretbox.Overhead + 24) bytes longer than the plaintext. diff --git a/crypto/xsalsa20symmetric/symmetric_test.go b/crypto/xsalsa20symmetric/symmetric_test.go index b35633b96cb3..0a7431671877 100644 --- a/crypto/xsalsa20symmetric/symmetric_test.go +++ b/crypto/xsalsa20symmetric/symmetric_test.go @@ -11,7 +11,6 @@ import ( ) func TestSimple(t *testing.T) { - plaintext := []byte("sometext") secret := []byte("somesecretoflengththirtytwo===32") ciphertext := EncryptSymmetric(plaintext, secret) @@ -22,7 +21,6 @@ func TestSimple(t *testing.T) { } func TestSimpleWithKDF(t *testing.T) { - plaintext := []byte("sometext") secretPass := []byte("somesecret") secret, err := bcrypt.GenerateFromPassword(secretPass, 12) diff --git a/db/badgerdb/db.go b/db/badgerdb/db.go index 6f0fb1fb3c41..532216b88f63 100644 --- a/db/badgerdb/db.go +++ b/db/badgerdb/db.go @@ -19,9 +19,7 @@ import ( "github.com/dgraph-io/ristretto/z" ) -var ( - versionsFilename = "versions.csv" -) +var versionsFilename = "versions.csv" var ( _ db.DBConnection = (*BadgerDB)(nil) @@ -74,7 +72,7 @@ type versionManager struct { func NewDB(dir string) (*BadgerDB, error) { // Since Badger doesn't support database names, we join both to obtain // the final directory to use for the database. - if err := os.MkdirAll(dir, 0755); err != nil { + if err := os.MkdirAll(dir, 0o755); err != nil { return nil, err } opts := badger.DefaultOptions(dir) @@ -102,7 +100,7 @@ func NewDBWithOptions(opts badger.Options) (*BadgerDB, error) { // Load metadata CSV file containing valid versions func readVersionsFile(path string) (*versionManager, error) { - file, err := os.OpenFile(path, os.O_RDONLY|os.O_CREATE, 0644) + file, err := os.OpenFile(path, os.O_RDONLY|os.O_CREATE, 0o644) if err != nil { return nil, err } @@ -143,14 +141,14 @@ func readVersionsFile(path string) (*versionManager, error) { // Write version metadata to CSV file func writeVersionsFile(vm *versionManager, path string) error { - file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0644) + file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0o644) if err != nil { return err } defer file.Close() w := csv.NewWriter(file) rows := [][]string{ - []string{"0", strconv.FormatUint(vm.lastTs, 10)}, + {"0", strconv.FormatUint(vm.lastTs, 10)}, } for it := vm.Iterator(); it.Next(); { version := it.Value() diff --git a/db/go.mod b/db/go.mod index 973d6074249e..6172bd01b1f4 100644 --- a/db/go.mod +++ b/db/go.mod @@ -1,4 +1,4 @@ -go 1.17 +go 1.18 module github.com/cosmos/cosmos-sdk/db diff --git a/db/go.sum b/db/go.sum index c7e75ea4532d..2dec902cadcf 100644 --- a/db/go.sum +++ b/db/go.sum @@ -33,11 +33,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -115,7 +112,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -159,15 +155,11 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02 h1:7NCfEGl0sfUojmX78nK9pBJuUlSZWEJA/TwASvfiPLo= golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= diff --git a/db/internal/util.go b/db/internal/util.go index b33f8ac67733..ea7425319ce3 100644 --- a/db/internal/util.go +++ b/db/internal/util.go @@ -2,6 +2,7 @@ package util import ( "fmt" + dbm "github.com/cosmos/cosmos-sdk/db" ) diff --git a/db/memdb/db.go b/db/memdb/db.go index f3f50377c7c2..c3c83d525037 100644 --- a/db/memdb/db.go +++ b/db/memdb/db.go @@ -178,7 +178,7 @@ func (dbm *MemDB) Revert() error { if !has { return fmt.Errorf("bad version history: version %v not saved", last) } - for ver, _ := range dbm.saved { + for ver := range dbm.saved { if ver > last { delete(dbm.saved, ver) } diff --git a/db/prefix/prefix.go b/db/prefix/prefix.go index c6ed87cba84f..3ddf1b41b4d0 100644 --- a/db/prefix/prefix.go +++ b/db/prefix/prefix.go @@ -24,9 +24,11 @@ type prefixW struct { prefix []byte } -var _ db.DBReader = (*prefixR)(nil) -var _ db.DBReadWriter = (*prefixRW)(nil) -var _ db.DBWriter = (*prefixW)(nil) +var ( + _ db.DBReader = (*prefixR)(nil) + _ db.DBReadWriter = (*prefixRW)(nil) + _ db.DBWriter = (*prefixW)(nil) +) // NewPrefixReader returns a DBReader that only has access to the subset of DB keys // that contain the given prefix. diff --git a/db/rocksdb/db.go b/db/rocksdb/db.go index cb312b625f03..32a82f817647 100644 --- a/db/rocksdb/db.go +++ b/db/rocksdb/db.go @@ -71,7 +71,7 @@ type dbOptions struct { // NewDB creates a new RocksDB key-value database with inside the given directory. // If dir does not exist, it will be created. func NewDB(dir string) (*dbManager, error) { - if err := os.MkdirAll(dir, 0755); err != nil { + if err := os.MkdirAll(dir, 0o755); err != nil { return nil, err } @@ -100,7 +100,7 @@ func NewDB(dir string) (*dbManager, error) { cpCache: checkpointCache{cache: map[uint64]*cpCacheEntry{}}, } - err := os.MkdirAll(mgr.checkpointsDir(), 0755) + err := os.MkdirAll(mgr.checkpointsDir(), 0o755) if err != nil { return nil, err } diff --git a/db/version_manager.go b/db/version_manager.go index b884e7160114..b8a2a6b055b5 100644 --- a/db/version_manager.go +++ b/db/version_manager.go @@ -65,7 +65,7 @@ func (vm *VersionManager) Save(target uint64) (uint64, error) { } func findLimit(m map[uint64]struct{}, cmp func(uint64, uint64) bool, init uint64) uint64 { - for x, _ := range m { + for x := range m { if cmp(x, init) { init = x } @@ -99,7 +99,7 @@ func (vi *vmIterator) Value() uint64 { return vi.buf } func (vm *VersionManager) Iterator() VersionIterator { ch := make(chan uint64) go func() { - for ver, _ := range vm.versions { + for ver := range vm.versions { ch <- ver } close(ch) @@ -125,7 +125,7 @@ func (vm *VersionManager) Equal(that VersionSet) bool { func (vm *VersionManager) Copy() *VersionManager { vmap := make(map[uint64]struct{}) - for ver, _ := range vm.versions { + for ver := range vm.versions { vmap[ver] = struct{}{} } return &VersionManager{versions: vmap, initial: vm.initial, last: vm.last} diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 8b8f68687393..5b7a4b4566a1 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -5,15 +5,6 @@ module.exports = { "/": { lang: "en-US" }, - ko: { - lang: "ko" - }, - ru: { - lang: "ru" - }, - zh: { - lang: "zh-CN" - } }, base: process.env.VUEPRESS_BASE || "/", head: [ @@ -29,6 +20,7 @@ module.exports = { themeConfig: { repo: "cosmos/cosmos-sdk", docsRepo: "cosmos/cosmos-sdk", + docsBranch: "release/v0.46.x", docsDir: "docs", editLinks: true, label: "sdk", @@ -39,20 +31,20 @@ module.exports = { }, versions: [ { - "label": "v0.39", - "key": "v0.39" + "label": "v0.44", + "key": "v0.44" }, { - "label": "v0.42", - "key": "v0.42" + "label": "v0.45", + "key": "v0.45" }, { - "label": "v0.44", - "key": "v0.44" + "label": "v0.46", + "key": "v0.46" }, { - "label": "master", - "key": "master" + "label": "main", + "key": "main" } ], topbar: { @@ -80,7 +72,7 @@ module.exports = { }, { title: "SDK API Reference", - path: "https://godoc.org/github.com/cosmos/cosmos-sdk" + path: "https://pkg.go.dev/github.com/cosmos/cosmos-sdk" }, { title: "REST API Spec", @@ -146,16 +138,11 @@ module.exports = { url: "https://www.youtube.com/c/CosmosProject" } ], - smallprint: - "This website is maintained by Tendermint Inc. The contents and opinions of this website are those of Tendermint Inc.", + smallprint: "The development of the Cosmos SDK is led primarily by [Interchain Core Teams](https://interchain.io/ecosystem). Funding for this development comes primarily from the Interchain Foundation, a Swiss non-profit.", links: [ { title: "Documentation", children: [ - { - title: "Cosmos SDK", - url: "https://docs.cosmos.network" - }, { title: "Cosmos Hub", url: "https://hub.cosmos.network" @@ -163,7 +150,11 @@ module.exports = { { title: "Tendermint Core", url: "https://docs.tendermint.com" - } + }, + { + title: "IBC-Go", + url: "https://ibc.cosmos.network" + }, ] }, { @@ -189,7 +180,7 @@ module.exports = { { title: "Contributing to the docs", url: - "https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md" + "https://github.com/cosmos/cosmos-sdk/blob/main/docs/DOCS_README.md" }, { title: "Source code on GitHub", diff --git a/docs/.vuepress/enhanceApp.js b/docs/.vuepress/enhanceApp.js index 36cee6366fc8..1bed0f795900 100644 --- a/docs/.vuepress/enhanceApp.js +++ b/docs/.vuepress/enhanceApp.js @@ -1,8 +1,8 @@ export default ({ router }) => { router.addRoutes([ - { path: '/master/spec/*', redirect: '/master/modules/' }, - { path: '/master/spec/governance/', redirect: '/master/modules/gov/' }, - { path: '/v0.41/', redirect: '/v0.42/' }, - { path: '/v0.43/', redirect: '/v0.44/' }, - ]) -} + { path: "/main/spec/*", redirect: "/modules/" }, + { path: "/main/spec/governance/", redirect: "/modules/gov/" }, + { path: "/v0.43/", redirect: "/v0.44/" }, // TODO to fix: https://github.com/cosmos/cosmos-sdk/issues/11798 + { path: "/master/", redirect: "/" }, + ]); +}; diff --git a/docs/CosmWasm/README.md b/docs/CosmWasm/README.md new file mode 100644 index 000000000000..409f31ebda4c --- /dev/null +++ b/docs/CosmWasm/README.md @@ -0,0 +1,13 @@ + + +# CosmWasm smart contracts + +>CosmWasm is a smart contracting platform built for the Cosmos ecosystem. Simply put, it's the Cosmos (Cosm) way of using WebAssembly (Wasm) hence the name. + +>CosmWasm is written as a module that can plug into the Cosmos SDK. This means that anyone currently building a blockchain using the Cosmos SDK can quickly and easily add CosmWasm smart contracting support to their chain, without adjusting existing logic. + +Read more about writing smart contracts with CosmWasm at their [documentation site](https://docs.cosmwasm.com/docs/1.0/), or visit [the repository](https://github.com/CosmWasm/cosmwasm). diff --git a/docs/DOCS_README.md b/docs/DOCS_README.md index 9ec1fd81c1e5..7afa49ad8574 100644 --- a/docs/DOCS_README.md +++ b/docs/DOCS_README.md @@ -1,29 +1,14 @@ # Updating the docs -If you want to open a PR in Cosmos SDK to update the documentation, please follow the guidelines in [`CONTRIBUTING.md`](https://github.com/cosmos/cosmos-sdk/tree/master/CONTRIBUTING.md#updating-documentation). - -## Internationalization - -* Translations for documentation live in a `docs//` folder, where `` is the language code for a specific language. For example, `zh` for Chinese, `ko` for Korean, `ru` for Russian, etc. -* Each `docs//` folder must follow the same folder structure within `docs/`, but only content in the following folders needs to be translated and included in the respective `docs//` folder: - * `docs/basics/` - * `docs/building-modules/` - * `docs/core/` - * `docs/ibc/` - * `docs/intro/` - * `docs/migrations/` - * `docs/run-node/` -* Each `docs//` folder must also have a `README.md` that includes a translated version of both the layout and content within the root-level [`README.md`](https://github.com/cosmos/cosmos-sdk/tree/master/docs/README.md). The layout defined in the `README.md` is used to build the homepage. -* Always translate content living on `master` unless you are revising documentation for a specific release. Translated documentation like the root-level documentation is semantically versioned. -* For additional configuration options, please see [VuePress Internationalization](https://vuepress.vuejs.org/guide/i18n.html). +If you want to open a PR in Cosmos SDK to update the documentation, please follow the guidelines in [`CONTRIBUTING.md`](https://github.com/cosmos/cosmos-sdk/tree/main/CONTRIBUTING.md#updating-documentation). ## Docs Build Workflow -The documentation for Cosmos SDK is hosted at https://docs.cosmos.network/ and built from the files in the `/docs` directory. +The documentation for Cosmos SDK is hosted at https://docs.cosmos.network and built from the files in the `/docs` directory. ### How It Works -There is a CircleCI job listening for changes in the `/docs` directory for the `master` branch and each supported version tag (`v0.39` and `v0.42`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a CircleCI job within that repository. +There is a GitHub Action listening for changes in the `/docs` directory for the `main` branch and each supported version branch (e.g. `release/v0.46.x`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a Github Action within that repository. ## README @@ -92,7 +77,7 @@ To build documentation as a static website run `npm run build`. You will find th First, run `make tools` from the root of repo, to install the swagger-ui tool. -Then, edit the `swagger.yaml` manually; it is found [here](https://github.com/cosmos/cosmos-sdk/blob/master/client/lcd/swagger-ui/swagger.yaml) +Then, edit the `swagger.yaml` manually; it is found [here](https://github.com/cosmos/cosmos-sdk/blob/main/client/lcd/swagger-ui/swagger.yaml) Finally, run `make update_gaia_lite_docs` from the root of the repo. @@ -103,7 +88,7 @@ We are using [Algolia](https://www.algolia.com) to power full-text search. This ## Consistency Because the build processes are identical (as is the information contained herein), this file should be kept in sync as -much as possible with its [counterpart in the Tendermint Core repo](https://github.com/tendermint/tendermint/blob/v0.34.0/docs/DOCS_README.md). +much as possible with its [counterpart in the Tendermint Core repo](https://github.com/tendermint/tendermint/blob/master/docs/DOCS_README.md). ### Update and Build the RPC docs diff --git a/docs/README.md b/docs/README.md index 2e9e03f2cbba..dad6bc92fd48 100644 --- a/docs/README.md +++ b/docs/README.md @@ -48,7 +48,7 @@ aside: false ## Get Started * **[Cosmos SDK Intro](./intro/overview.md)**: High-level overview of the Cosmos SDK. -* **[Starport](https://docs.starport.network/)**: A developer-friendly interface to the Cosmos SDK to scaffold, launch, and maintain any crypto application on a sovereign and secured blockchain. +* **[Ignite CLI](https://docs.ignite.com)**: A developer-friendly interface to the Cosmos SDK to scaffold, launch, and maintain any crypto application on a sovereign and secured blockchain. * **[SDK Tutorials](https://tutorials.cosmos.network/)**: Tutorials that showcase how to build Cosmos SDK-based blockchains from scratch and explain the basic Cosmos SDK principles in the process. ## Reference Docs @@ -56,7 +56,7 @@ aside: false * **[Basics](./basics/)**: Basic concepts of the Cosmos SDK, including the standard anatomy of an application, the transaction lifecycle, and accounts management. * **[Core](./core/)**: Core concepts of the Cosmos SDK, including `baseapp`, the `store`, or the `server`. * **[Building Modules](./building-modules/)**: Important concepts for module developers like `message`, `keeper`, and `querier`. -* **[IBC](./ibc/)**: IBC protocol integration and concepts. +* **[IBC](https://ibc.cosmos.network/)**: IBC protocol integration and concepts. * **[Running a Node, API, CLI](./run-node/)**: How to run a node and interact with the node using the CLI and the API. * **[Migrations](./migrations/)**: Migration guides for updating to newer versions of Cosmos SDK. @@ -64,13 +64,13 @@ aside: false * **[Module Directory](../x/)**: Cosmos SDK module implementations and their respective documentation. * **[Specifications](./spec/)**: Specifications of modules and other parts of the Cosmos SDK. -* **[Cosmos SDK API Reference](https://godoc.org/github.com/cosmos/cosmos-sdk)**: Godocs of the Cosmos SDK. +* **[Cosmos SDK API Reference](https://pkg.go.dev/github.com/cosmos/cosmos-sdk)**: Godocs of the Cosmos SDK. * **[REST and RPC Endpoints](https://cosmos.network/rpc/)**: List of endpoints to interact with a `gaia` full-node. * **[Rosetta API](./run-node/rosetta.md)**: Rosetta API integration. ## Cosmos Hub -The Cosmos Hub (`gaia`) docs have moved to [github.com/cosmos/gaia](https://github.com/cosmos/gaia/tree/master/docs). +The Cosmos Hub (`gaia`) docs have moved to [github.com/cosmos/gaia](https://github.com/cosmos/gaia/tree/main/docs). ## Languages @@ -78,4 +78,4 @@ The Cosmos SDK is written in [Golang](https://golang.org/), though the framework ## Contribute -See the [DOCS_README.md](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md) for details of the build process and considerations when making changes. +See the [DOCS_README.md](https://github.com/cosmos/cosmos-sdk/blob/main/docs/DOCS_README.md) for details of the build process and considerations when making changes. diff --git a/docs/architecture/PROCESS.md b/docs/architecture/PROCESS.md index 528301a67b39..c5140bbe41f3 100644 --- a/docs/architecture/PROCESS.md +++ b/docs/architecture/PROCESS.md @@ -14,7 +14,7 @@ ADR creation is an **iterative** process. Instead of trying to solve all decisio 2. Once the motivation is validated, a GitHub Pull Request (PR) is created with a new document based on the `adr-template.md`. -3. An ADR doesn't have to arrive to `master` with an _accepted_ status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge it and keep a _proposed_ status. It's preferable to have an iterative approach rather than long, not merged Pull Requests. +3. An ADR doesn't have to arrive to `main` with an _accepted_ status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge it and keep a _proposed_ status. It's preferable to have an iterative approach rather than long, not merged Pull Requests. 4. If a _proposed_ ADR is merged, then it should clearly document outstanding issues either in ADR document notes or in a GitHub Issue. diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 18ed71c2df6a..4257d1e87ba8 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -56,6 +56,7 @@ When writing ADRs, follow the same best practices for writing RFCs. When writing * [ADR 029: Fee Grant Module](./adr-029-fee-grant-module.md) * [ADR 030: Message Authorization Module](./adr-030-authz-module.md) * [ADR 031: Protobuf Msg Services](./adr-031-msg-service.md) +* [ADR 055: ORM](./adr-055-orm.md) ### Proposed @@ -83,3 +84,4 @@ When writing ADRs, follow the same best practices for writing RFCs. When writing - [ADR 044: Guidelines for Updating Protobuf Definitions](./adr-044-protobuf-updates-guidelines.md) - [ADR 047: Extend Upgrade Plan](./adr-047-extend-upgrade-plan.md) +- [ADR 053: Go Module Refactoring](./adr-053-go-module-refactoring.md) diff --git a/docs/architecture/adr-010-modular-antehandler.md b/docs/architecture/adr-010-modular-antehandler.md index 1558afab8ed3..386af1a77575 100644 --- a/docs/architecture/adr-010-modular-antehandler.md +++ b/docs/architecture/adr-010-modular-antehandler.md @@ -19,7 +19,7 @@ For example, let's say a user wants to implement some custom signature verificat ### Per-Module AnteHandler -One approach is to use the [ModuleManager](https://godoc.org/github.com/cosmos/cosmos-sdk/types/module) and have each module implement its own antehandler if it requires custom antehandler logic. The ModuleManager can then be passed in an AnteHandler order in the same way it has an order for BeginBlockers and EndBlockers. The ModuleManager returns a single AnteHandler function that will take in a tx and run each module's `AnteHandle` in the specified order. The module manager's AnteHandler is set as the baseapp's AnteHandler. +One approach is to use the [ModuleManager](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/types/module) and have each module implement its own antehandler if it requires custom antehandler logic. The ModuleManager can then be passed in an AnteHandler order in the same way it has an order for BeginBlockers and EndBlockers. The ModuleManager returns a single AnteHandler function that will take in a tx and run each module's `AnteHandle` in the specified order. The module manager's AnteHandler is set as the baseapp's AnteHandler. Pros: diff --git a/docs/architecture/adr-018-extendable-voting-period.md b/docs/architecture/adr-018-extendable-voting-period.md index 2c6a30e80da9..ee238fc35ae8 100644 --- a/docs/architecture/adr-018-extendable-voting-period.md +++ b/docs/architecture/adr-018-extendable-voting-period.md @@ -18,7 +18,7 @@ Thus, we propose the following mechanism: ### Params -* The current gov param `VotingPeriod` is to be replaced by a `MinVotingPeriod` param. This is the the default voting period that all governance proposal voting periods start with. +* The current gov param `VotingPeriod` is to be replaced by a `MinVotingPeriod` param. This is the default voting period that all governance proposal voting periods start with. * There is a new gov param called `MaxVotingPeriodExtension`. ### Mechanism diff --git a/docs/architecture/adr-019-protobuf-state-encoding.md b/docs/architecture/adr-019-protobuf-state-encoding.md index f3b6148764cb..1d20145ae7a1 100644 --- a/docs/architecture/adr-019-protobuf-state-encoding.md +++ b/docs/architecture/adr-019-protobuf-state-encoding.md @@ -149,7 +149,7 @@ and client developer UX. ### Safe usage of `Any` -By default, the [gogo protobuf implementation of `Any`](https://godoc.org/github.com/gogo/protobuf/types) +By default, the [gogo protobuf implementation of `Any`](https://pkg.go.dev/github.com/gogo/protobuf/types) uses [global type registration]( https://github.com/gogo/protobuf/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete go types. This introduces a vulnerability where any malicious module diff --git a/docs/architecture/adr-020-protobuf-transaction-encoding.md b/docs/architecture/adr-020-protobuf-transaction-encoding.md index 32ee3a64a6ab..71bd1f9fd0de 100644 --- a/docs/architecture/adr-020-protobuf-transaction-encoding.md +++ b/docs/architecture/adr-020-protobuf-transaction-encoding.md @@ -222,7 +222,7 @@ Signature verifiers do: * Pull account number and sequence from the state. * Obtain the public key either from state or `AuthInfo`'s `signer_infos`. * Create a `SignDoc` and serialize it using [ADR 027](./adr-027-deterministic-protobuf-serialization.md). - * Verify the signature at the the same list position against the serialized `SignDoc`. + * Verify the signature at the same list position against the serialized `SignDoc`. #### `SIGN_MODE_LEGACY_AMINO` diff --git a/docs/architecture/adr-022-custom-panic-handling.md b/docs/architecture/adr-022-custom-panic-handling.md index 645b9eb4fe5c..6ed7b6246ae4 100644 --- a/docs/architecture/adr-022-custom-panic-handling.md +++ b/docs/architecture/adr-022-custom-panic-handling.md @@ -215,4 +215,4 @@ This method would prepend handlers to an existing chain. ## References * [PR-6053 with proposed solution](https://github.com/cosmos/cosmos-sdk/pull/6053) -* [Similar solution. ADR-010 Modular AnteHandler](https://github.com/cosmos/cosmos-sdk/blob/v0.38.3/docs/architecture/adr-010-modular-antehandler.md) +* [Similar solution. ADR-010 Modular AnteHandler](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-010-modular-antehandler.md) diff --git a/docs/architecture/adr-027-deterministic-protobuf-serialization.md b/docs/architecture/adr-027-deterministic-protobuf-serialization.md index e75b142001c5..a4602c2641d6 100644 --- a/docs/architecture/adr-027-deterministic-protobuf-serialization.md +++ b/docs/architecture/adr-027-deterministic-protobuf-serialization.md @@ -31,7 +31,7 @@ the same serialization of a `SignDoc` as defined in serialization. Currently, for block signatures we are using a workaround: we create a new [TxRaw](https://github.com/cosmos/cosmos-sdk/blob/9e85e81e0e8140067dd893421290c191529c148c/proto/cosmos/tx/v1beta1/tx.proto#L30) -instance (as defined in [adr-020-protobuf-transaction-encoding](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md#transactions)) +instance (as defined in [adr-020-protobuf-transaction-encoding](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-020-protobuf-transaction-encoding.md#transactions)) by converting all [Tx](https://github.com/cosmos/cosmos-sdk/blob/9e85e81e0e8140067dd893421290c191529c148c/proto/cosmos/tx/v1beta1/tx.proto#L13) fields to bytes on the client side. This adds an additional manual step when sending and signing transactions. diff --git a/docs/architecture/adr-030-authz-module.md b/docs/architecture/adr-030-authz-module.md index b9c0720e10f0..1390d0f6b4c5 100644 --- a/docs/architecture/adr-030-authz-module.md +++ b/docs/architecture/adr-030-authz-module.md @@ -6,6 +6,7 @@ * 2020-10-12: Updated Draft * 2020-11-13: Accepted * 2020-05-06: proto API updates, use `sdk.Msg` instead of `sdk.ServiceMsg` (the latter concept was removed from Cosmos SDK) +* 2022-04-20: Updated the `SendAuthorization` proto docs to clarify the `SpendLimit` is a required field. (Generic authorization can be used with bank msg type url to create limit less bank authorization) ## Status @@ -87,8 +88,8 @@ a `SpendLimit` and updates it down to zero: ```go type SendAuthorization struct { // SpendLimit specifies the maximum amount of tokens that can be spent - // by this authorization and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. + // by this authorization and will be updated as tokens are spent. This field is required. (Generic authorization + // can be used with bank msg type url to create limit less bank authorization). SpendLimit sdk.Coins } diff --git a/docs/architecture/adr-033-protobuf-inter-module-comm.md b/docs/architecture/adr-033-protobuf-inter-module-comm.md index f6bb881b9bd5..09b650a61e7c 100644 --- a/docs/architecture/adr-033-protobuf-inter-module-comm.md +++ b/docs/architecture/adr-033-protobuf-inter-module-comm.md @@ -165,7 +165,7 @@ corresponding "public key". From the [ADR 028](./adr-028-public-key-addresses.md or derived accounts that can be used for different pools (ex. staking pools) or managed accounts (ex. group accounts). We can also think of module sub-accounts as similar to derived keys - there is a root key and then some derivation path. `ModuleID` is a simple struct which contains the module name and optional "derivation" path, -and forms its address based on the `AddressHash` method from [the ADR-028](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md): +and forms its address based on the `AddressHash` method from [the ADR-028](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-028-public-key-addresses.md): ```go type ModuleID struct { @@ -330,7 +330,7 @@ ADR. ### Authorization By default, the inter-module router requires that messages are sent by the first signer returned by `GetSigners`. The -inter-module router should also accept authorization middleware such as that provided by [ADR 030](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-030-authz-module.md). +inter-module router should also accept authorization middleware such as that provided by [ADR 030](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-030-authz-module.md). This middleware will allow accounts to otherwise specific module accounts to perform actions on their behalf. Authorization middleware should take into account the need to grant certain modules effectively "admin" privileges to other modules. This will be addressed in separate ADRs or updates to this ADR. diff --git a/docs/architecture/adr-037-gov-split-vote.md b/docs/architecture/adr-037-gov-split-vote.md index c09041a84e17..a2f457c33789 100644 --- a/docs/architecture/adr-037-gov-split-vote.md +++ b/docs/architecture/adr-037-gov-split-vote.md @@ -10,7 +10,7 @@ Accepted ## Abstract -This ADR defines a modification to the the governance module that would allow a staker to split their votes into several voting options. For example, it could use 70% of its voting power to vote Yes and 30% of its voting power to vote No. +This ADR defines a modification to the governance module that would allow a staker to split their votes into several voting options. For example, it could use 70% of its voting power to vote Yes and 30% of its voting power to vote No. ## Context diff --git a/docs/architecture/adr-043-nft-module.md b/docs/architecture/adr-043-nft-module.md index 2779ff2deb8e..7d4498bf843c 100644 --- a/docs/architecture/adr-043-nft-module.md +++ b/docs/architecture/adr-043-nft-module.md @@ -337,4 +337,4 @@ Other networks in the Cosmos ecosystem could design and implement their own NFT * Initial discussion: https://github.com/cosmos/cosmos-sdk/discussions/9065 * x/nft: initialize module: https://github.com/cosmos/cosmos-sdk/pull/9174 -* [ADR 033](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-033-protobuf-inter-module-comm.md) +* [ADR 033](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-033-protobuf-inter-module-comm.md) diff --git a/docs/architecture/adr-044-protobuf-updates-guidelines.md b/docs/architecture/adr-044-protobuf-updates-guidelines.md index 833a5648cc64..6c0b33bc806f 100644 --- a/docs/architecture/adr-044-protobuf-updates-guidelines.md +++ b/docs/architecture/adr-044-protobuf-updates-guidelines.md @@ -15,7 +15,7 @@ This ADR provides guidelines and recommended practices when updating Protobuf de ## Context -The Cosmos SDK maintains a set of [Protobuf definitions](https://github.com/cosmos/cosmos-sdk/tree/master/proto/cosmos). It is important to correctly design Protobuf definitions to avoid any breaking changes within the same version. The reasons are to not break tooling (including indexers and explorers), wallets and other third-party integrations. +The Cosmos SDK maintains a set of [Protobuf definitions](https://github.com/cosmos/cosmos-sdk/tree/main/proto/cosmos). It is important to correctly design Protobuf definitions to avoid any breaking changes within the same version. The reasons are to not break tooling (including indexers and explorers), wallets and other third-party integrations. When making changes to these Protobuf definitions, the Cosmos SDK currently only follows [Buf's](https://docs.buf.build/) recommendations. We noticed however that Buf's recommendations might still result in breaking changes in the SDK in some cases. For example: diff --git a/docs/architecture/adr-045-check-delivertx-middlewares.md b/docs/architecture/adr-045-check-delivertx-middlewares.md index bb108d401ea4..60172977c980 100644 --- a/docs/architecture/adr-045-check-delivertx-middlewares.md +++ b/docs/architecture/adr-045-check-delivertx-middlewares.md @@ -4,10 +4,11 @@ * 20.08.2021: Initial draft. * 07.12.2021: Update `tx.Handler` interface ([\#10693](https://github.com/cosmos/cosmos-sdk/pull/10693)). +* 17.05.2022: ADR is abandoned, as middlewares are deemed too hard to reason about. ## Status -ACCEPTED +ABANDONED. Replacement is being discussed in [#11955](https://github.com/cosmos/cosmos-sdk/issues/11955). ## Abstract @@ -220,7 +221,7 @@ While the app developer can define and compose the middlewares of their choice, | Middleware | Description | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | RunMsgsTxHandler | This is the base `tx.Handler`. It replaces the old baseapp's `runMsgs`, and executes a transaction's `Msg`s. | -| TxDecoderMiddleware | This middleware takes in transaction raw bytes, and decodes them into a `sdk.Tx`. It replaces the `baseapp.txDecoder` field, so that BaseApp stays as thin as possible. Since most middlewares read the contents of the `sdk.Tx`, the TxDecoderMiddleware should be run first in the middelware stack. | +| TxDecoderMiddleware | This middleware takes in transaction raw bytes, and decodes them into a `sdk.Tx`. It replaces the `baseapp.txDecoder` field, so that BaseApp stays as thin as possible. Since most middlewares read the contents of the `sdk.Tx`, the TxDecoderMiddleware should be run first in the middleware stack. | | {Antehandlers} | Each antehandler is converted to its own middleware. These middlewares perform signature verification, fee deductions and other validations on the incoming transaction. | | IndexEventsTxMiddleware | This is a simple middleware that chooses which events to index in Tendermint. Replaces `baseapp.indexEvents` (which unfortunately still exists in baseapp too, because it's used to index Begin/EndBlock events) | | RecoveryTxMiddleware | This index recovers from panics. It replaces baseapp.runTx's panic recovery described in [ADR-022](./adr-022-custom-panic-handling.md). | diff --git a/docs/architecture/adr-048-consensus-fees.md b/docs/architecture/adr-048-consensus-fees.md new file mode 100644 index 000000000000..4ce4c81375d9 --- /dev/null +++ b/docs/architecture/adr-048-consensus-fees.md @@ -0,0 +1,203 @@ +# ADR 048: Multi Tire Gas Price System + +## Changelog + +- Dec 1, 2021: Initial Draft + +## Status + +Rejected + +## Abstract + +This ADR describes a flexible mechanism to maintain a consensus level gas prices, in which one can choose a multi-tier gas price system or EIP-1559 like one through configuration. + +## Context + +Currently, each validator configures it's own `minimal-gas-prices` in `app.yaml`. But setting a proper minimal gas price is critical to protect network from dos attack, and it's hard for all the validators to pick a sensible value, so we propose to maintain a gas price in consensus level. + +Since tendermint 0.35 has supported mempool prioritization, we can take advantage of that to implement more sophisticated gas fee system. + +## Multi-Tier Price System + +We propose a multi-tier price system on consensus to provide maximum flexibility: + +- Tier 1: a constant gas price, which could only be modified occasionally through governance proposal. +- Tier 2: a dynamic gas price which is adjusted according to previous block load. +- Tier 3: a dynamic gas price which is adjusted according to previous block load at a higher speed. + +The gas price of higher tier should bigger than the lower tier. + +The transaction fees are charged with the exact gas price calculated on consensus. + +The parameter schema is like this: + +```protobuf +message TierParams { + uint32 priority = 1 // priority in tendermint mempool + Coin initial_gas_price = 2 // + uint32 parent_gas_target = 3 // the target saturation of block + uint32 change_denominator = 4 // decides the change speed + Coin min_gas_price = 5 // optional lower bound of the price adjustment + Coin max_gas_price = 6 // optional upper bound of the price adjustment +} + +message Params { + repeated TierParams tiers = 1; +} +``` + +### Extension Options + +We need to allow user to specify the tier of service for the transaction, to support it in an extensible way, we add an extension option in `AuthInfo`: + +```protobuf +message ExtensionOptionsTieredTx { + uint32 fee_tier = 1 +} +``` + +The value of `fee_tier` is just the index to the `tiers` parameter list. + +We also change the semantic of existing `fee` field of `Tx`, instead of charging user the exact `fee` amount, we treat it as a fee cap, while the actual amount of fee charged is decided dynamically. If the `fee` is smaller than dynamic one, the transaction won't be included in current block and ideally should stay in the mempool until the consensus gas price drop. The mempool can eventually prune old transactions. + +### Tx Prioritization + +Transactions are prioritized based on the tier, the higher the tier, the higher the priority. + +Within the same tier, follow the default Tendermint order (currently FIFO). Be aware of that the mempool tx ordering logic is not part of consensus and can be modified by malicious validator. + +This mechanism can be easily composed with prioritization mechanisms: +* we can add extra tiers out of a user control: + * Example 1: user can set tier 0, 10 or 20, but the protocol will create tiers 0, 1, 2 ... 29. For example IBC transactions will go to tier `user_tier + 5`: if user selected tier 1, then the transaction will go to tier 15. + * Example 2: we can reserve tier 4, 5, ... only for special transaction types. For example, tier 5 is reserved for evidence tx. So if submits a bank.Send transaction and set tier 5, it will be delegated to tier 3 (the max tier level available for any transaction). + * Example 3: we can enforce that all transactions of a sepecific type will go to specific tier. For example, tier 100 will be reserved for evidence transactions and all evidence transactions will always go to that tier. + +### `min-gas-prices` + +Deprecate the current per-validator `min-gas-prices` configuration, since it would confusing for it to work together with the consensus gas price. + +### Adjust For Block Load + +For tier 2 and tier 3 transactions, the gas price is adjusted according to previous block load, the logic could be similar to EIP-1559: + +```python +def adjust_gas_price(gas_price, parent_gas_used, tier): + if parent_gas_used == tier.parent_gas_target: + return gas_price + elif parent_gas_used > tier.parent_gas_target: + gas_used_delta = parent_gas_used - tier.parent_gas_target + gas_price_delta = max(gas_price * gas_used_delta // tier.parent_gas_target // tier.change_speed, 1) + return gas_price + gas_price_delta + else: + gas_used_delta = parent_gas_target - parent_gas_used + gas_price_delta = gas_price * gas_used_delta // parent_gas_target // tier.change_speed + return gas_price - gas_price_delta +``` + +### Block Segment Reservation + +Ideally we should reserve block segments for each tier, so the lower tiered transactions won't be completely squeezed out by higher tier transactions, which will force user to use higher tier, and the system degraded to a single tier. + +We need help from tendermint to implement this. + +## Implementation + +We can make each tier's gas price strategy fully configurable in protocol parameters, while providing a sensible default one. + +Pseudocode in python-like syntax: + +```python +interface TieredTx: + def tier(self) -> int: + pass + +def tx_tier(tx): + if isinstance(tx, TieredTx): + return tx.tier() + else: + # default tier for custom transactions + return 0 + # NOTE: we can add more rules here per "Tx Prioritization" section + +class TierParams: + 'gas price strategy parameters of one tier' + priority: int # priority in tendermint mempool + initial_gas_price: Coin + parent_gas_target: int + change_speed: Decimal # 0 means don't adjust for block load. + +class Params: + 'protocol parameters' + tiers: List[TierParams] + +class State: + 'consensus state' + # total gas used in last block, None when it's the first block + parent_gas_used: Optional[int] + # gas prices of last block for all tiers + gas_prices: List[Coin] + +def begin_block(): + 'Adjust gas prices' + for i, tier in enumerate(Params.tiers): + if State.parent_gas_used is None: + # initialized gas price for the first block + State.gas_prices[i] = tier.initial_gas_price + else: + # adjust gas price according to gas used in previous block + State.gas_prices[i] = adjust_gas_price(State.gas_prices[i], State.parent_gas_used, tier) + +def mempoolFeeTxHandler_checkTx(ctx, tx): + # the minimal-gas-price configured by validator, zero in deliver_tx context + validator_price = ctx.MinGasPrice() + consensus_price = State.gas_prices[tx_tier(tx)] + min_price = max(validator_price, consensus_price) + + # zero means infinity for gas price cap + if tx.gas_price() > 0 and tx.gas_price() < min_price: + return 'insufficient fees' + return next_CheckTx(ctx, tx) + +def txPriorityHandler_checkTx(ctx, tx): + res, err := next_CheckTx(ctx, tx) + # pass priority to tendermint + res.Priority = Params.tiers[tx_tier(tx)].priority + return res, err + +def end_block(): + 'Update block gas used' + State.parent_gas_used = block_gas_meter.consumed() +``` + +### Dos attack protection + +To fully saturate the blocks and prevent other transactions from executing, attacker need to use transactions of highest tier, the cost would be significantly higher than the default tier. + +If attacker spam with lower tier transactions, user can mitigate by sending higher tier transactions. + +## Consequences + +### Backwards Compatibility + +- New protocol parameters. +- New consensus states. +- New/changed fields in transaction body. + +### Positive + +- The default tier keeps the same predictable gas price experience for client. +- The higher tier's gas price can adapt to block load. +- No priority conflict with custom priority based on transaction types, since this proposal only occupy three priority levels. +- Possibility to compose different priority rules with tiers + +### Negative + +- Wallets & tools need to update to support the new `tier` parameter, and semantic of `fee` field is changed. + +### Neutral + +## References + +- https://eips.ethereum.org/EIPS/eip-1559 +- https://iohk.io/en/blog/posts/2021/11/26/network-traffic-and-tiered-pricing/ diff --git a/docs/architecture/adr-053-go-module-refactoring.md b/docs/architecture/adr-053-go-module-refactoring.md new file mode 100644 index 000000000000..9093ae9d9013 --- /dev/null +++ b/docs/architecture/adr-053-go-module-refactoring.md @@ -0,0 +1,109 @@ +# ADR 053: Go Module Refactoring + +## Changelog + +* 2022-04-27: First Draft + +## Status + +PROPOSED + +## Abstract + +The current SDK is built as a single monolithic go module. This ADR describes +how we refactor the SDK into smaller independently versioned go modules +for ease of maintenance. + +## Context + +Go modules impose certain requirements on software projects with respect to +stable version numbers (anything above 0.x) in that [any API breaking changes +necessitate a major version](https://go.dev/doc/modules/release-workflow#breaking) +increase which technically creates a new go module +(with a v2, v3, etc. suffix). + +[Keeping modules API compatible](https://go.dev/blog/module-compatibility) in +this way requires a fair amount of fair thought and discipline. + +The Cosmos SDK is a fairly large project which originated before go modules +came into existence and has always been under a v0.x release even though +it has been used in production for years now, not because it isn't production +quality software, but rather because the API compatibility guarantees required +by go modules are fairly complex to adhere to with such a large project. +Up to now, it has generally been deemed more important to be able to break the +API if needed rather than require all users update all package import paths +to accommodate breaking changes causing v2, v3, etc. releases. This is in +addition to the other complexities related to protobuf generated code that will +be addressed in a separate ADR. + +Nevertheless, the desire for semantic versioning has been [strong in the +community](https://github.com/cosmos/cosmos-sdk/discussions/10162) and the +single go module release process has made it very hard to +release small changes to isolated features in a timely manner. Release cycles +often exceed six months which means small improvements done in a day or +two get bottle-necked by everything else in the monolithic release cycle. + +## Decision + +To improve the current situation, the SDK is being refactored into multiple +go modules within the current repository. There has been a [fair amount of +debate](https://github.com/cosmos/cosmos-sdk/discussions/10582#discussioncomment-1813377) +as to how to do this, with some developers arguing for larger vs smaller +module scopes. There are pros and cons to both approaches (which will be +discussed below in the [Consequences](#consequences) section), but the +approach being adopted is the following: +* a go module should generally be scoped to a specific coherent set of +functionality (such as math, errors, store, etc.) +* when code is removed from the core SDK and moved to a new module path, every +effort should be made to avoid API breaking changes in the existing code using +aliases and wrapper types (as done in https://github.com/cosmos/cosmos-sdk/pull/10779 +and https://github.com/cosmos/cosmos-sdk/pull/11788) +* new go modules should be moved to a standalone domain (`cosmossdk.io`) before +being tagged as `v1.0.0` to accommodate the possibility that they may be +better served by a standalone repository in the future +* all go modules should follow the guidelines in https://go.dev/blog/module-compatibility +before `v1.0.0` is tagged and should make use of `internal` packages to limit +the exposed API surface +* the new go module's API may deviate from the existing code where there are +clear improvements to be made or to remove legacy dependencies (for instance on +amino or gogo proto), as long the old package attempts +to avoid API breakage with aliases and wrappers +* care should be taken when simply trying to turn an existing package into a +new go module: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. +In general, it seems safer to just create a new module path (appending v2, v3, etc. +if necessary), rather than trying to make an old package a new module. + +## Consequences + +### Backwards Compatibility + +If the above guidelines are followed to use aliases or wrapper types pointing +in existing APIs that point back to the new go modules, there should be no or +very limited breaking changes to existing APIs. + +### Positive + +* standalone pieces of software will reach `v1.0.0` sooner +* new features to specific functionality will be released sooner + +### Negative + +* there will be more go module versions to update in the SDK itself and +per-project, although most of these will hopefully be indirect + +### Neutral + +## Further Discussions + +Further discussions are occurring in primarily in +https://github.com/cosmos/cosmos-sdk/discussions/10582 and within +the Cosmos SDK Framework Working Group. + +## References + +* https://go.dev/doc/modules/release-workflow +* https://go.dev/blog/module-compatibility +* https://github.com/cosmos/cosmos-sdk/discussions/10162 +* https://github.com/cosmos/cosmos-sdk/discussions/10582 +* https://github.com/cosmos/cosmos-sdk/pull/10779 +* https://github.com/cosmos/cosmos-sdk/pull/11788 \ No newline at end of file diff --git a/docs/architecture/adr-055-orm.md b/docs/architecture/adr-055-orm.md new file mode 100644 index 000000000000..71a7595260e1 --- /dev/null +++ b/docs/architecture/adr-055-orm.md @@ -0,0 +1,111 @@ +# ADR 055: ORM + +## Changelog + +* 2022-04-27: First draft + +## Status + +ACCEPTED Implemented + +## Abstract + +In order to make it easier for developers to build Cosmos SDK modules and for clients to query, index and verify proofs +against state data, we have implemented an ORM (object-relational mapping) layer for the Cosmos SDK. + +## Context + +Historically modules in the Cosmos SDK have always used the key-value store directly and created various handwritten +functions for managing key format as well as constructing secondary indexes. This consumes a significant amount of +time when building a module and is error-prone. Because key formats are non-standard, sometimes poorly documented, +and subject to change, it is hard for clients to generically index, query and verify merkle proofs against state data. + +The known first instance of an "ORM" in the Cosmos ecosystem was in [weave](https://github.com/iov-one/weave/tree/master/orm). +A later version was built for [regen-ledger](https://github.com/regen-network/regen-ledger/tree/157181f955823149e1825263a317ad8e16096da4/orm) for +use in the group module and later [ported to the SDK](https://github.com/cosmos/cosmos-sdk/tree/35d3312c3be306591fcba39892223f1244c8d108/x/group/internal/orm) +just for that purpose. + +While these earlier designs made it significantly easier to write state machines, they still required a lot of manual +configuration, didn't expose state format directly to clients, and were limited in their support of different types +of index keys, composite keys, and range queries. + +Discussions about the design continued in https://github.com/cosmos/cosmos-sdk/discussions/9156 and more +sophisticated proofs of concept were created in https://github.com/allinbits/cosmos-sdk-poc/tree/master/runtime/orm +and https://github.com/cosmos/cosmos-sdk/pull/10454. + +## Decision + +These prior efforts culminated in the creation of the Cosmos SDK `orm` go module which uses protobuf annotations +for specifying ORM table definitions. This ORM is based on the new `google.golang.org/protobuf/reflect/protoreflect` +API and supports: +* sorted indexes for all simple protobuf types (except `bytes`, `enum`, `float`, `double`) as well as `Timestamp` and `Duration` +* unsorted `bytes` and `enum` indexes +* composite primary and secondary keys +* unique indexes +* auto-incrementing `uint64` primary keys +* complex prefix and range queries +* paginated queries +* complete logical decoding of KV-store data + +Almost all the information needed to decode state directly is specified in .proto files. Each table definition specifies +an ID which is unique per .proto file and each index within a table is unique within that table. Clients then only need +to know the name of a module and the prefix ORM data for a specific .proto file within that module in order to decode +state data directly. This additional information will be exposed directly through app configs which will be explained +in a future ADR related to app wiring. + +The ORM makes optimizations around storage space by not repeating values in the primary key in the key value +when storing primary key records. For example, if the object `{"a":0,"b":1}` has the primary key `a`, it will +be stored in the key value store as `Key: '0', Value: {"b":1}` (with more efficient protobuf binary encoding). +Also, the generated code from https://github.com/cosmos/cosmos-proto does optimizations around the +`google.golang.org/protobuf/reflect/protoreflect` API to improve performance. + +A code generator is included with the ORM which creates type safe wrappers around the ORM's dynamic `Table` +implementation and is the recommended way for modules to use the ORM. + +The ORM tests provide a simplified bank module demonstration which illustrates: +- [ORM proto options](https://github.com/cosmos/cosmos-sdk/blob/0d846ae2f0424b2eb640f6679a703b52d407813d/orm/internal/testpb/bank.proto) +- [Generated Code](https://github.com/cosmos/cosmos-sdk/blob/0d846ae2f0424b2eb640f6679a703b52d407813d/orm/internal/testpb/bank.cosmos_orm.go) +- [Example Usage in a Module Keeper](https://github.com/cosmos/cosmos-sdk/blob/0d846ae2f0424b2eb640f6679a703b52d407813d/orm/model/ormdb/module_test.go) + +## Consequences + +### Backwards Compatibility + +State machine code that adopts the ORM will need migrations as the state layout is generally backwards incompatible. +These state machines will also need to migrate to https://github.com/cosmos/cosmos-proto at least for state data. + +### Positive + +* easier to build modules +* easier to add secondary indexes to state +* possible to write a generic indexer for ORM state +* easier to write clients that do state proofs +* possible to automatically write query layers rather than needing to manually implement gRPC queries + +### Negative + +* worse performance than handwritten keys (for now). See [Further Discussions](#further-discussions) +for potential improvements + +### Neutral + +## Further Discussions + +Further discussions will happen within the Cosmos SDK Framework Working Group. Current planned and ongoing work includes: +* automatically generate client-facing query layer +* client-side query libraries that transparently verify light client proofs +* index ORM data to SQL databases +* improve performance by: + * optimizing existing reflection based code to avoid unnecessary gets when doing deletes & updates of simple tables + * more sophisticated code generation such as making fast path reflection even faster (avoiding `switch` statements), + or even fully generating code that equals handwritten performance + + +## References + +* https://github.com/iov-one/weave/tree/master/orm). +* https://github.com/regen-network/regen-ledger/tree/157181f955823149e1825263a317ad8e16096da4/orm +* https://github.com/cosmos/cosmos-sdk/tree/35d3312c3be306591fcba39892223f1244c8d108/x/group/internal/orm +* https://github.com/cosmos/cosmos-sdk/discussions/9156 +* https://github.com/allinbits/cosmos-sdk-poc/tree/master/runtime/orm +* https://github.com/cosmos/cosmos-sdk/pull/10454 \ No newline at end of file diff --git a/docs/basics/accounts.md b/docs/basics/accounts.md index 05e9ff268141..dde895cce219 100644 --- a/docs/basics/accounts.md +++ b/docs/basics/accounts.md @@ -66,9 +66,9 @@ In the node, all data is stored using Protocol Buffers serialization. The Cosmos SDK supports the following digital key schemes for creating digital signatures: -* `secp256k1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256k1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/crypto/keys/secp256k1/secp256k1.go). -* `secp256r1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256r1` package](https://github.com/cosmos/cosmos-sdk/blob/master/crypto/keys/secp256r1/pubkey.go), -* `tm-ed25519`, as implemented in the [Cosmos SDK `crypto/keys/ed25519` package](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/crypto/keys/ed25519/ed25519.go). This scheme is supported only for the consensus validation. +* `secp256k1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256k1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/keys/secp256k1/secp256k1.go). +* `secp256r1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256r1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/keys/secp256r1/pubkey.go), +* `tm-ed25519`, as implemented in the [Cosmos SDK `crypto/keys/ed25519` package](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/keys/ed25519/ed25519.go). This scheme is supported only for the consensus validation. | | Address length in bytes | Public key length in bytes | Used for transaction authentication | Used for consensus (tendermint) | | :----------: | :---------------------: | :------------------------: | :---------------------------------: | :-----------------------------: | @@ -88,9 +88,9 @@ Each account is identified using `Address` which is a sequence of bytes derived These types implement the `Address` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/types/address.go#L71-L90 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/address.go#L108-L125 -Address construction algorithm is defined in [ADR-28](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md). +Address construction algorithm is defined in [ADR-28](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-028-public-key-addresses.md). Here is the standard way to obtain an account address from a `pub` public key: ```go @@ -101,7 +101,7 @@ Of note, the `Marshal()` and `Bytes()` method both return the same raw `[]byte` For user interaction, addresses are formatted using [Bech32](https://en.bitcoin.it/wiki/Bech32) and implemented by the `String` method. The Bech32 method is the only supported format to use when interacting with a blockchain. The Bech32 human-readable part (Bech32 prefix) is used to denote an address type. Example: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/types/address.go#L230-L244 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/address.go#L272-L286 | | Address Bech32 Prefix | | ------------------ | --------------------- | @@ -113,7 +113,7 @@ For user interaction, addresses are formatted using [Bech32](https://en.bitcoin. Public keys in Cosmos SDK are defined by `cryptotypes.PubKey` interface. Since public keys are saved in a store, `cryptotypes.PubKey` extends the `proto.Message` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/crypto/types/types.go#L8-L17 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/types/types.go#L8-L17 A compressed format is used for `secp256k1` and `secp256r1` serialization. @@ -123,24 +123,24 @@ A compressed format is used for `secp256k1` and `secp256r1` serialization. This prefix is followed by the `x`-coordinate. Public Keys are not used to reference accounts (or users) and in general are not used when composing transaction messages (with few exceptions: `MsgCreateValidator`, `Validator` and `Multisig` messages). -For user interactions, `PubKey` is formatted using Protobufs JSON ([ProtoMarshalJSON](https://github.com/cosmos/cosmos-sdk/blob/release/v0.42.x/codec/json.go#L12) function). Example: +For user interactions, `PubKey` is formatted using Protobufs JSON ([ProtoMarshalJSON](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/codec/json.go#L14-L34) function). Example: -+++ https://github.com/cosmos/cosmos-sdk/blob/7568b66/crypto/keyring/output.go#L23-L39 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/keyring/output.go#L23-L39 ## Keyring A `Keyring` is an object that stores and manages accounts. In the Cosmos SDK, a `Keyring` implementation follows the `Keyring` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/crypto/keyring/keyring.go#L51-L89 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/keyring/keyring.go#L54-L101 The default implementation of `Keyring` comes from the third-party [`99designs/keyring`](https://github.com/99designs/keyring) library. A few notes on the `Keyring` methods: -* `Sign(uid string, payload []byte) ([]byte, sdkcrypto.PubKey, error)` strictly deals with the signature of the `payload` bytes. You must prepare and encode the transaction into a canonical `[]byte` form. Because protobuf is not deterministic, it has been decided in [ADR-020](../architecture/adr-020-protobuf-transaction-encoding.md) that the canonical `payload` to sign is the `SignDoc` struct, deterministically encoded using [ADR-027](../architecture/adr-027-deterministic-protobuf-serialization.md). Note that signature verification is not implemented in the Cosmos SDK by default, it is deferred to the [`anteHandler`](../core/baseapp.md#antehandler). - +++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/proto/cosmos/tx/v1beta1/tx.proto#L47-L64 +* `Sign(uid string, msg []byte) ([]byte, types.PubKey, error)` strictly deals with the signature of the `msg` bytes. You must prepare and encode the transaction into a canonical `[]byte` form. Because protobuf is not deterministic, it has been decided in [ADR-020](../architecture/adr-020-protobuf-transaction-encoding.md) that the canonical `payload` to sign is the `SignDoc` struct, deterministically encoded using [ADR-027](../architecture/adr-027-deterministic-protobuf-serialization.md). Note that signature verification is not implemented in the Cosmos SDK by default, it is deferred to the [`anteHandler`](../core/baseapp.md#antehandler). + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L48-L65 -* `NewAccount(uid, mnemonic, bip39Passwd, hdPath string, algo SignatureAlgo) (Info, error)` creates a new account based on the [`bip44 path`](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and persists it on disk. The `PrivKey` is **never stored unencrypted**, instead it is [encrypted with a passphrase](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/crypto/armor.go) before being persisted. In the context of this method, the key type and sequence number refer to the segment of the BIP44 derivation path (for example, `0`, `1`, `2`, ...) that is used to derive a private and a public key from the mnemonic. Using the same mnemonic and derivation path, the same `PrivKey`, `PubKey` and `Address` is generated. The following keys are supported by the keyring: +* `NewAccount(uid, mnemonic, bip39Passphrase, hdPath string, algo SignatureAlgo) (*Record, error)` creates a new account based on the [`bip44 path`](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and persists it on disk. The `PrivKey` is **never stored unencrypted**, instead it is [encrypted with a passphrase](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/crypto/armor.go) before being persisted. In the context of this method, the key type and sequence number refer to the segment of the BIP44 derivation path (for example, `0`, `1`, `2`, ...) that is used to derive a private and a public key from the mnemonic. Using the same mnemonic and derivation path, the same `PrivKey`, `PubKey` and `Address` is generated. The following keys are supported by the keyring: * `secp256k1` * `ed25519` diff --git a/docs/basics/app-anatomy.md b/docs/basics/app-anatomy.md index 312b3d72eb32..91a01b8ad23d 100644 --- a/docs/basics/app-anatomy.md +++ b/docs/basics/app-anatomy.md @@ -44,7 +44,7 @@ In general, the core of the state-machine is defined in a file called `app.go`. The first thing defined in `app.go` is the `type` of the application. It is generally comprised of the following parts: -* **A reference to [`baseapp`](../core/baseapp.md).** The custom application defined in `app.go` is an extension of `baseapp`. When a transaction is relayed by Tendermint to the application, `app` uses `baseapp`'s methods to route them to the appropriate module. `baseapp` implements most of the core logic for the application, including all the [ABCI methods](https://tendermint.com/docs/spec/abci/abci.html#overview) and the [routing logic](../core/baseapp.md#routing). +* **A reference to [`baseapp`](../core/baseapp.md).** The custom application defined in `app.go` is an extension of `baseapp`. When a transaction is relayed by Tendermint to the application, `app` uses `baseapp`'s methods to route them to the appropriate module. `baseapp` implements most of the core logic for the application, including all the [ABCI methods](https://docs.tendermint.com/master/spec/abci/abci.html) and the [routing logic](../core/baseapp.md#routing). * **A list of store keys**. The [store](../core/store.md), which contains the entire state, is implemented as a [`multistore`](../core/store.md#multistore) (i.e. a store of stores) in the Cosmos SDK. Each module uses one or multiple stores in the multistore to persist their part of the state. These stores can be accessed with specific keys that are declared in the `app` type. These keys, along with the `keepers`, are at the heart of the [object-capabilities model](../core/ocap.md) of the Cosmos SDK. * **A list of module's `keeper`s.** Each module defines an abstraction called [`keeper`](../building-modules/keeper.md), which handles reads and writes for this module's store(s). The `keeper`'s methods of one module can be called from other modules (if authorized), which is why they are declared in the application's type and exported as interfaces to other modules so that the latter can only access the authorized functions. * **A reference to an [`appCodec`](../core/encoding.md).** The application's `appCodec` is used to serialize and deserialize data structures in order to store them, as stores can only persist `[]bytes`. The default codec is [Protocol Buffers](../core/encoding.md). @@ -53,13 +53,13 @@ The first thing defined in `app.go` is the `type` of the application. It is gene See an example of application type definition from `simapp`, the Cosmos SDK's own app used for demo and testing purposes: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/app.go#L145-L187 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L151-L193 ### Constructor Function This function constructs a new application of the type defined in the section above. It must fulfill the `AppCreator` signature in order to be used in the [`start` command](../core/node.md#start-command) of the application's daemon command. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/server/types/app.go#L48-L50 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/types/app.go#L57-L59 Here are the main actions performed by this function: @@ -81,21 +81,21 @@ Note that this function only creates an instance of the app, while the actual st See an example of application constructor from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/app.go#L198-L441 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L204-L474 ### InitChainer -The `InitChainer` is a function that initializes the state of the application from a genesis file (i.e. token balances of genesis accounts). It is called when the application receives the `InitChain` message from the Tendermint engine, which happens when the node is started at `appBlockHeight == 0` (i.e. on genesis). The application must set the `InitChainer` in its [constructor](#constructor-function) via the [`SetInitChainer`](https://godoc.org/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetInitChainer) method. +The `InitChainer` is a function that initializes the state of the application from a genesis file (i.e. token balances of genesis accounts). It is called when the application receives the `InitChain` message from the Tendermint engine, which happens when the node is started at `appBlockHeight == 0` (i.e. on genesis). The application must set the `InitChainer` in its [constructor](#constructor-function) via the [`SetInitChainer`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetInitChainer) method. In general, the `InitChainer` is mostly composed of the [`InitGenesis`](../building-modules/genesis.md#initgenesis) function of each of the application's modules. This is done by calling the `InitGenesis` function of the module manager, which in turn will call the `InitGenesis` function of each of the modules it contains. Note that the order in which the modules' `InitGenesis` functions must be called has to be set in the module manager using the [module manager's](../building-modules/module-manager.md) `SetOrderInitGenesis` method. This is done in the [application's constructor](#application-constructor), and the `SetOrderInitGenesis` has to be called before the `SetInitChainer`. See an example of an `InitChainer` from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/app.go#L464-L471 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L524-L532 ### BeginBlocker and EndBlocker -The Cosmos SDK offers developers the possibility to implement automatic execution of code as part of their application. This is implemented through two function called `BeginBlocker` and `EndBlocker`. They are called when the application receives respectively the `BeginBlock` and `EndBlock` messages from the Tendermint engine, which happens at the beginning and at the end of each block. The application must set the `BeginBlocker` and `EndBlocker` in its [constructor](#constructor-function) via the [`SetBeginBlocker`](https://godoc.org/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetBeginBlocker) and [`SetEndBlocker`](https://godoc.org/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetEndBlocker) methods. +The Cosmos SDK offers developers the possibility to implement automatic execution of code as part of their application. This is implemented through two function called `BeginBlocker` and `EndBlocker`. They are called when the application receives respectively the `BeginBlock` and `EndBlock` messages from the Tendermint engine, which happens at the beginning and at the end of each block. The application must set the `BeginBlocker` and `EndBlocker` in its [constructor](#constructor-function) via the [`SetBeginBlocker`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetBeginBlocker) and [`SetEndBlocker`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/baseapp#BaseApp.SetEndBlocker) methods. In general, the `BeginBlocker` and `EndBlocker` functions are mostly composed of the [`BeginBlock` and `EndBlock`](../building-modules/beginblock-endblock.md) functions of each of the application's modules. This is done by calling the `BeginBlock` and `EndBlock` functions of the module manager, which in turn will call the `BeginBlock` and `EndBlock` functions of each of the modules it contains. Note that the order in which the modules' `BeginBlock` and `EndBlock` functions must be called has to be set in the module manager using the `SetOrderBeginBlockers` and `SetOrderEndBlockers` methods respectively. This is done via the [module manager](../building-modules/module-manager.md) in the [application's constructor](#application-constructor), and the `SetOrderBeginBlockers` and `SetOrderEndBlockers` methods have to be called before the `SetBeginBlocker` and `SetEndBlocker` functions. @@ -103,37 +103,38 @@ As a sidenote, it is important to remember that application-specific blockchains See an example of `BeginBlocker` and `EndBlocker` functions from `simapp` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/app.go#L454-L462 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L514-L522 ### Register Codec The `EncodingConfig` structure is the last important part of the `app.go` file. The goal of this structure is to define the codecs that will be used throughout the app. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/params/encoding.go#L9-L16 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/params/encoding.go#L9-L16 Here are descriptions of what each of the four fields means: * `InterfaceRegistry`: The `InterfaceRegistry` is used by the Protobuf codec to handle interfaces that are encoded and decoded (we also say "unpacked") using [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). `Any` could be thought as a struct that contains a `type_url` (name of a concrete type implementing the interface) and a `value` (its encoded bytes). `InterfaceRegistry` provides a mechanism for registering interfaces and implementations that can be safely unpacked from `Any`. Each of the application's modules implements the `RegisterInterfaces` method that can be used to register the module's own interfaces and implementations. * You can read more about Any in [ADR-19](../architecture/adr-019-protobuf-state-encoding.md#usage-of-any-to-encode-interfaces). - * To go more into details, the Cosmos SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/gogo/protobuf). By default, the [gogo protobuf implementation of `Any`](https://godoc.org/github.com/gogo/protobuf/types) uses [global type registration](https://github.com/gogo/protobuf/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could register a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). -* `Marshaler`: the default codec used throughout the Cosmos SDK. It is composed of a `BinaryCodec` used to encode and decode state, and a `JSONCodec` used to output data to the users (for example in the [CLI](#cli)). By default, the SDK uses Protobuf as `Marshaler`. + * To go more into details, the Cosmos SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/gogo/protobuf). By default, the [gogo protobuf implementation of `Any`](https://pkg.go.dev/github.com/gogo/protobuf/types) uses [global type registration](https://github.com/gogo/protobuf/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could register a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). +* `Codec`: the default codec used throughout the Cosmos SDK. It is composed of a `BinaryCodec` used to encode and decode state, and a `JSONCodec` used to output data to the users (for example in the [CLI](#cli)). By default, the SDK uses Protobuf as `Codec`. * `TxConfig`: `TxConfig` defines an interface a client can utilize to generate an application-defined concrete transaction type. Currently, the SDK handles two transaction types: `SIGN_MODE_DIRECT` (which uses Protobuf binary as over-the-wire encoding) and `SIGN_MODE_LEGACY_AMINO_JSON` (which depends on Amino). Read more about transactions [here](../core/transactions.md). * `Amino`: Some legacy parts of the Cosmos SDK still use Amino for backwards-compatibility. Each module exposes a `RegisterLegacyAmino` method to register the module's specific types within Amino. This `Amino` codec should not be used by app developers anymore, and will be removed in future releases. -The Cosmos SDK exposes a `MakeTestEncodingConfig` function used to create a `EncodingConfig` for the app constructor (`NewApp`). It uses Protobuf as a default `Marshaler`. -NOTE: this function is marked deprecated and should only be used to create an app or in tests. We are working on refactoring codec management in a post Stargate release. +The Cosmos SDK exposes a `MakeTestEncodingConfig` function used to create a `EncodingConfig` for the app constructor (`NewApp`). It uses Protobuf as a default `Codec`. + +NOTE: This function is deprecated and should only be used to create an app or in tests. See an example of a `MakeTestEncodingConfig` from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/590358652cc1cbc13872ea1659187e073ea38e75/simapp/encoding.go#L8-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/encoding.go#L8-L19 ## Modules -[Modules](../building-modules/intro.md) are the heart and soul of Cosmos SDK applications. They can be considered as state-machines nested within the state-machine. When a transaction is relayed from the underlying Tendermint engine via the ABCI to the application, it is routed by [`baseapp`](../core/baseapp.md) to the appropriate module in order to be processed. This paradigm enables developers to easily build complex state-machines, as most of the modules they need often already exist. For developers, most of the work involved in building a Cosmos SDK application revolves around building custom modules required by their application that do not exist yet, and integrating them with modules that do already exist into one coherent application. In the application directory, the standard practice is to store modules in the `x/` folder (not to be confused with the Cosmos SDK's `x/` folder, which contains already-built modules). +[Modules](../building-modules/intro.md) are the heart and soul of Cosmos SDK applications. They can be considered as state-machines nested within the state-machine. When a transaction is relayed from the underlying Tendermint engine via the ABCI to the application, it is routed by [`baseapp`](../core/baseapp.md) to the appropriate module in order to be processed. This paradigm enables developers to easily build complex state-machines, as most of the modules they need often already exist. **For developers, most of the work involved in building a Cosmos SDK application revolves around building custom modules required by their application that do not exist yet, and integrating them with modules that do already exist into one coherent application**. In the application directory, the standard practice is to store modules in the `x/` folder (not to be confused with the Cosmos SDK's `x/` folder, which contains already-built modules). ### Application Module Interface -Modules must implement [interfaces](../building-modules/module-manager.md#application-module-interfaces) defined in the Cosmos SDK, [`AppModuleBasic`](../building-modules/module-manager.md#appmodulebasic) and [`AppModule`](../building-modules/module-manager.md#appmodule). The former implements basic non-dependent elements of the module, such as the `codec`, while the latter handles the bulk of the module methods (including methods that require references to other modules' `keeper`s). Both the `AppModule` and `AppModuleBasic` types are defined in a file called `./module.go`. +Modules must implement [interfaces](../building-modules/module-manager.md#application-module-interfaces) defined in the Cosmos SDK, [`AppModuleBasic`](../building-modules/module-manager.md#appmodulebasic) and [`AppModule`](../building-modules/module-manager.md#appmodule). The former implements basic non-dependent elements of the module, such as the `codec`, while the latter handles the bulk of the module methods (including methods that require references to other modules' `keeper`s). Both the `AppModule` and `AppModuleBasic` types are, by convention, defined in a file called `module.go`. `AppModule` exposes a collection of useful methods on the module that facilitates the composition of modules into a coherent application. These methods are called from the [`module manager`](../building-modules/module-manager.md#manager), which manages the application's collection of modules. @@ -143,10 +144,10 @@ Each module defines two [Protobuf services](https://developers.google.com/protoc Each Protobuf `Msg` service method is 1:1 related to a Protobuf request type, which must implement `sdk.Msg` interface. Note that `sdk.Msg`s are bundled in [transactions](../core/transactions.md), and each transaction contains one or multiple messages. -When a valid block of transactions is received by the full-node, Tendermint relays each one to the application via [`DeliverTx`](https://tendermint.com/docs/app-dev/abci-spec.html#delivertx). Then, the application handles the transaction: +When a valid block of transactions is received by the full-node, Tendermint relays each one to the application via [`DeliverTx`](https://docs.tendermint.com/master/spec/abci/apps.html#delivertx). Then, the application handles the transaction: -1. Upon receiving the transaction, the application first unmarshalls it from `[]bytes`. -2. Then, it verifies a few things about the transaction like [fee payment and signatures](#gas-fees.md#antehandler) before extracting the `Msg`(s) contained in the transaction. +1. Upon receiving the transaction, the application first unmarshalls it from `[]byte`. +2. Then, it verifies a few things about the transaction like [fee payment and signatures](./gas-fees.md#antehandler) before extracting the `Msg`(s) contained in the transaction. 3. `sdk.Msg`s are encoded using Protobuf [`Any`s](#register-codec). By analyzing each `Any`'s `type_url`, baseapp's `msgServiceRouter` routes the `sdk.Msg` to the corresponding module's `Msg` service. 4. If the message is successfully processed, the state is updated. @@ -154,7 +155,7 @@ For a more details look at a transaction [lifecycle](./tx-lifecycle.md). Module developers create custom `Msg` services when they build their own module. The general practice is to define the `Msg` Protobuf service in a `tx.proto` file. For example, the `x/bank` module defines a service with two methods to transfer tokens: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/proto/cosmos/bank/v1beta1/tx.proto#L10-L17 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L12-L19 Service methods use `keeper` in order to update the module state. @@ -162,7 +163,7 @@ Each module should also implement the `RegisterServices` method as part of the [ ### gRPC `Query` Services -gRPC `Query` services are introduced in the v0.40 Stargate release. They allow users to query the state using [gRPC](https://grpc.io). They are enabled by default, and can be configured under the `grpc.enable` and `grpc.address` fields inside [`app.toml`](../run-node/run-node.md#configuring-the-node-using-apptoml). +gRPC `Query` services allows users to query the state using [gRPC](https://grpc.io). They are enabled by default, and can be configured under the `grpc.enable` and `grpc.address` fields inside [`app.toml`](../run-node/run-node.md#configuring-the-node-using-apptoml). gRPC `Query` services are defined in the module's Protobuf definition files, specifically inside `query.proto`. The `query.proto` definition file exposes a single `Query` [Protobuf service](https://developers.google.com/protocol-buffers/docs/proto#services). Each gRPC query endpoint corresponds to a service method, starting with the `rpc` keyword, inside the `Query` service. @@ -197,7 +198,7 @@ Generally, the [commands related to a module](../building-modules/module-interfa #### gRPC -[gRPC](https://grpc.io) is a modern open source high performance RPC framework that has support in multiple languages. It is the recommended way for external clients (such as wallets, browsers and other backend services) to interact with a node. +[gRPC](https://grpc.io) is a modern open-source high performance RPC framework that has support in multiple languages. It is the recommended way for external clients (such as wallets, browsers and other backend services) to interact with a node. Each module can expose gRPC endpoints, called [service methods](https://grpc.io/docs/what-is-grpc/core-concepts/#service-definition) and are defined in the [module's Protobuf `query.proto` file](#grpc-query-services). A service method is defined by its name, input arguments and output response. The module then needs to: @@ -222,9 +223,9 @@ The main interface is the [Command-Line Interface](../core/cli.md). The CLI of a * **Query commands** are added by calling the `queryCmd` function. This function returns a Cobra command that contains the query commands defined in each of the application's modules (passed as an array of `sdk.ModuleClients` from the `main()` function), as well as some other lower level query commands such as block or validator queries. Query command are called by using the command `appd query [query]` of the CLI. * **Transaction commands** are added by calling the `txCmd` function. Similar to `queryCmd`, the function returns a Cobra command that contains the tx commands defined in each of the application's modules, as well as lower level tx commands like transaction signing or broadcasting. Tx commands are called by using the command `appd tx [tx]` of the CLI. -See an example of an application's main command-line file from the [nameservice tutorial](https://github.com/cosmos/sdk-tutorials/tree/master/nameservice) +See an example of an application's main command-line file from the [Cosmos Hub](https://github.com/cosmos/gaia) -+++ https://github.com/cosmos/sdk-tutorials/blob/86a27321cf89cc637581762e953d0c07f8c78ece/nameservice/cmd/nscli/main.go ++++ https://github.com/cosmos/gaia/blob/Theta-main/cmd/gaiad/cmd/root.go#L39-L77 ## Dependencies and Makefile @@ -240,13 +241,15 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 Please see [issue #8392](https://github.com/cosmos/cosmos-sdk/issues/8392) for more info. ::: -This section is optional, as developers are free to choose their dependency manager and project building method. That said, the current most used framework for versioning control is [`go.mod`](https://github.com/golang/go/wiki/Modules). It ensures each of the libraries used throughout the application are imported with the correct version. See an example from the [nameservice tutorial](https://github.com/cosmos/sdk-tutorials/tree/master/nameservice): +This section is optional, as developers are free to choose their dependency manager and project building method. That said, the current most used framework for versioning control is [`go.mod`](https://github.com/golang/go/wiki/Modules). It ensures each of the libraries used throughout the application are imported with the correct version. + +Below, the `go.mod` of the [Cosmos Hub](https://github.com/cosmos/gaia) is provided as an example. -+++ https://github.com/cosmos/sdk-tutorials/blob/c6754a1e313eb1ed973c5c91dcc606f2fd288811/go.mod#L1-L18 ++++ https://github.com/cosmos/gaia/blob/Theta-main/go.mod#L1-L20 -For building the application, a [Makefile](https://en.wikipedia.org/wiki/Makefile) is generally used. The Makefile primarily ensures that the `go.mod` is run before building the two entrypoints to the application, [`appd`](#node-client) and [`appd`](#application-interface). See an example of Makefile from the [nameservice tutorial](https://tutorials.cosmos.network/nameservice/tutorial/00-intro.html) +For building the application, a [Makefile](https://en.wikipedia.org/wiki/Makefile) is generally used. The Makefile primarily ensures that the `go.mod` is run before building the two entrypoints to the application, [`appd`](#node-client) and [`appd`](#application-interface). -+++ https://github.com/cosmos/sdk-tutorials/blob/86a27321cf89cc637581762e953d0c07f8c78ece/nameservice/Makefile +Here is an example of the [Cosmos Hub Makefile](https://github.com/cosmos/gaia/blob/Theta-main/Makefile). ## Next {hide} diff --git a/docs/basics/gas-fees.md b/docs/basics/gas-fees.md index 81df8096e728..b49bc8a97a98 100644 --- a/docs/basics/gas-fees.md +++ b/docs/basics/gas-fees.md @@ -21,14 +21,16 @@ In the Cosmos SDK, `gas` is a special unit that is used to track the consumption In the Cosmos SDK, `gas` is a simple alias for `uint64`, and is managed by an object called a _gas meter_. Gas meters implement the `GasMeter` interface -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/store/types/gas.go#L34-L43 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/gas.go#L40-L51 where: * `GasConsumed()` returns the amount of gas that was consumed by the gas meter instance. * `GasConsumedToLimit()` returns the amount of gas that was consumed by gas meter instance, or the limit if it is reached. +* `GasRemaining()` returns the gas left in the GasMeter. * `Limit()` returns the limit of the gas meter instance. `0` if the gas meter is infinite. * `ConsumeGas(amount Gas, descriptor string)` consumes the amount of `gas` provided. If the `gas` overflows, it panics with the `descriptor` message. If the gas meter is not infinite, it panics if `gas` consumed goes above the limit. +* `RefundGas()` deducts the given amount from the gas consumed. This functionality enables refunding gas to the transaction or block gas pools so that EVM-compatible chains can fully support the go-ethereum StateDB interface. * `IsPastLimit()` returns `true` if the amount of gas consumed by the gas meter instance is strictly above the limit, `false` otherwise. * `IsOutOfGas()` returns `true` if the amount of gas consumed by the gas meter instance is above or equal to the limit, `false` otherwise. @@ -38,7 +40,7 @@ The gas meter is generally held in [`ctx`](../core/context.md), and consuming ga ctx.GasMeter().ConsumeGas(amount, "description") ``` -By default, the Cosmos SDK makes use of two different gas meters, the [main gas meter](#main-gas-metter[) and the [block gas meter](#block-gas-meter). +By default, the Cosmos SDK makes use of two different gas meters, the [main gas meter](#main-gas-metter) and the [block gas meter](#block-gas-meter). ### Main Gas Meter @@ -48,9 +50,9 @@ Gas consumption can be done manually, generally by the module developer in the [ ### Block Gas Meter -`ctx.BlockGasMeter()` is the gas meter used to track gas consumption per block and make sure it does not go above a certain limit. A new instance of the `BlockGasMeter` is created each time [`BeginBlock`](../core/baseapp.md#beginblock) is called. The `BlockGasMeter` is finite, and the limit of gas per block is defined in the application's consensus parameters. By default Cosmos SDK applications use the default consensus parameters provided by Tendermint: +`ctx.BlockGasMeter()` is the gas meter used to track gas consumption per block and make sure it does not go above a certain limit. A new instance of the `BlockGasMeter` is created each time [`BeginBlock`](../core/baseapp.md#beginblock) is called. The `BlockGasMeter` is finite, and the limit of gas per block is defined in the application's consensus parameters. By default, Cosmos SDK applications use the default consensus parameters provided by Tendermint: -+++ https://github.com/tendermint/tendermint/blob/v0.34.0-rc6/types/params.go#L34-L41 ++++ https://github.com/tendermint/tendermint/blob/v0.35.4/types/params.go#L78-L117 When a new [transaction](../core/transactions.md) is being processed via `DeliverTx`, the current value of `BlockGasMeter` is checked to see if it is above the limit. If it is, `DeliverTx` returns immediately. This can happen even with the first transaction in a block, as `BeginBlock` itself can consume gas. If not, the transaction is processed normally. At the end of `DeliverTx`, the gas tracked by `ctx.BlockGasMeter()` is increased by the amount consumed to process the transaction: @@ -63,24 +65,18 @@ ctx.BlockGasMeter().ConsumeGas( ## AnteHandler -The `AnteHandler` is run for every transaction during `CheckTx` and `DeliverTx`, before a Protobuf `Msg` service method for each `sdk.Msg` in the transaction. `AnteHandler`s have the following signature: +The `AnteHandler` is run for every transaction during `CheckTx` and `DeliverTx`, before a Protobuf `Msg` service method for each `sdk.Msg` in the transaction. -```go -// AnteHandler authenticates transactions, before their internal messages are handled. -// If newCtx.IsZero(), ctx is used instead. -type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, result Result, abort bool) -``` - -The `anteHandler` is not implemented in the core Cosmos SDK but in a module. This gives the possibility to developers to choose which version of `AnteHandler` fits their application's needs. That said, most applications today use the default implementation defined in the [`auth` module](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth). Here is what the `anteHandler` is intended to do in a normal Cosmos SDK application: +The anteHandler is not implemented in the core Cosmos SDK but in a module. That said, most applications today use the default implementation defined in the [`auth` module](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth). Here is what the `anteHandler` is intended to do in a normal Cosmos SDK application: -* Verify that the transaction are of the correct type. Transaction types are defined in the module that implements the `anteHandler`, and they follow the transaction interface: - +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/types/tx_msg.go#L49-L57 +* Verify that the transactions are of the correct type. Transaction types are defined in the module that implements the `anteHandler`, and they follow the transaction interface: + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/tx_msg.go#L38-L46 This enables developers to play with various types for the transaction of their application. In the default `auth` module, the default transaction type is `Tx`: - +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/proto/cosmos/tx/v1beta1/tx.proto#L12-L25 + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L13-L26 * Verify signatures for each [`message`](../building-modules/messages-and-queries.md#messages) contained in the transaction. Each `message` should be signed by one or multiple sender(s), and these signatures must be verified in the `anteHandler`. -* During `CheckTx`, verify that the gas prices provided with the transaction is greater than the local `min-gas-prices` (as a reminder, gas-prices can be deducted from the following equation: `fees = gas * gas-prices`). `min-gas-prices` is a parameter local to each full-node and used during `CheckTx` to discard transactions that do not provide a minimum amount of fees. This ensure that the mempool cannot be spammed with garbage transactions. +* During `CheckTx`, verify that the gas prices provided with the transaction is greater than the local `min-gas-prices` (as a reminder, gas-prices can be deducted from the following equation: `fees = gas * gas-prices`). `min-gas-prices` is a parameter local to each full-node and used during `CheckTx` to discard transactions that do not provide a minimum amount of fees. This ensures that the mempool cannot be spammed with garbage transactions. * Verify that the sender of the transaction has enough funds to cover for the `fees`. When the end-user generates a transaction, they must indicate 2 of the 3 following parameters (the third one being implicit): `fees`, `gas` and `gas-prices`. This signals how much they are willing to pay for nodes to execute their transaction. The provided `gas` value is stored in a parameter called `GasWanted` for later use. -* Set `newCtx.GasMeter` to 0, with a limit of `GasWanted`. **This step is extremely important**, as it not only makes sure the transaction cannot consume infinite gas, but also that `ctx.GasMeter` is reset in-between each `DeliverTx` (`ctx` is set to `newCtx` after `anteHandler` is run, and the `anteHandler` is run each time `DeliverTx` is called). +* Set `newCtx.GasMeter` to 0, with a limit of `GasWanted`. **This step is crucial**, as it not only makes sure the transaction cannot consume infinite gas, but also that `ctx.GasMeter` is reset in-between each `DeliverTx` (`ctx` is set to `newCtx` after `anteHandler` is run, and the `anteHandler` is run each time `DeliverTx` is called). As explained above, the `anteHandler` returns a maximum limit of `gas` the transaction can consume during execution called `GasWanted`. The actual amount consumed in the end is denominated `GasUsed`, and we must therefore have `GasUsed =< GasWanted`. Both `GasWanted` and `GasUsed` are relayed to the underlying consensus engine when [`DeliverTx`](../core/baseapp.md#delivertx) returns. diff --git a/docs/basics/query-lifecycle.md b/docs/basics/query-lifecycle.md index 7d85127d3827..80b492f57542 100644 --- a/docs/basics/query-lifecycle.md +++ b/docs/basics/query-lifecycle.md @@ -36,21 +36,7 @@ To provide values such as `--node` (the full-node the CLI connects to), the user The CLI understands a specific set of commands, defined in a hierarchical structure by the application developer: from the [root command](../core/cli.md#root-command) (`simd`), the type of command (`Myquery`), the module that contains the command (`staking`), and command itself (`delegations`). Thus, the CLI knows exactly which module handles this command and directly passes the call there. -### gRPC - -::: warning -A patch introduced in `go-grpc v1.34.0` made gRPC incompatible with the `gogoproto` library, making some [gRPC queries](https://github.com/cosmos/cosmos-sdk/issues/8426) panic. As such, the Cosmos SDK requires that `go-grpc <=v1.33.2` is installed in your `go.mod`. - -To make sure that gRPC is working properly, it is **highly recommended** to add the following line in your application's `go.mod`: - -```go -replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 -``` - -Please see [issue #8392](https://github.com/cosmos/cosmos-sdk/issues/8392) for more info. -::: - -Another interface through which users can make queries, introduced in Cosmos SDK v0.40, is [gRPC](https://grpc.io) requests to a [gRPC server](../core/grpc_rest.md#grpc-server). The endpoints are defined as [Protocol Buffers](https://developers.google.com/protocol-buffers) service methods inside `.proto` files, written in Protobuf's own language-agnostic interface definition language (IDL). The Protobuf ecosystem developed tools for code-generation from `*.proto` files into various languages. These tools allow to build gRPC clients easily. +Another interface through which users can make queries is [gRPC](https://grpc.io) requests to a [gRPC server](../core/grpc_rest.md#grpc-server). The endpoints are defined as [Protocol Buffers](https://developers.google.com/protocol-buffers) service methods inside `.proto` files, written in Protobuf's own language-agnostic interface definition language (IDL). The Protobuf ecosystem developed tools for code-generation from `*.proto` files into various languages. These tools allow to build gRPC clients easily. One such tool is [grpcurl](https://github.com/fullstorydev/grpcurl), and a gRPC request for `MyQuery` using this client looks like: @@ -83,15 +69,15 @@ The examples above show how an external user can interact with a node by queryin The first thing that is created in the execution of a CLI command is a `client.Context`. A `client.Context` is an object that stores all the data needed to process a request on the user side. In particular, a `client.Context` stores the following: * **Codec**: The [encoder/decoder](../core/encoding.md) used by the application, used to marshal the parameters and query before making the Tendermint RPC request and unmarshal the returned response into a JSON object. The default codec used by the CLI is Protobuf. -* **Account Decoder**: The account decoder from the [`auth`](../..//x/auth/spec/README.md) module, which translates `[]byte`s into accounts. +* **Account Decoder**: The account decoder from the [`auth`](../../x/auth/spec/README.md) module, which translates `[]byte`s into accounts. * **RPC Client**: The Tendermint RPC Client, or node, to which the request will be relayed to. * **Keyring**: A [Key Manager](../basics/accounts.md#keyring) used to sign transactions and handle other operations with keys. -* **Output Writer**: A [Writer](https://golang.org/pkg/io/#Writer) used to output the response. +* **Output Writer**: A [Writer](https://pkg.go.dev/io/#Writer) used to output the response. * **Configurations**: The flags configured by the user for this command, including `--height`, specifying the height of the blockchain to query and `--indent`, which indicates to add an indent to the JSON response. The `client.Context` also contains various functions such as `Query()` which retrieves the RPC Client and makes an ABCI call to relay a query to a full-node. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/client/context.go#L20-L50 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/context.go#L25-L63 The `client.Context`'s primary role is to store data used during interactions with the end-user and provide methods to interact with this data - it is used before and after the query is processed by the full-node. Specifically, in handling `MyQuery`, the `client.Context` is utilized to encode the query parameters, retrieve the full-node, and write the output. Prior to being relayed to a full-node, the query needs to be encoded into a `[]byte` form, as full-nodes are application-agnostic and do not understand specific types. The full-node (RPC Client) itself is retrieved using the `client.Context`, which knows which node the user CLI is connected to. The query is relayed to this full-node to be processed. Finally, the `client.Context` contains a `Writer` to write output when the response is returned. These steps are further described in later sections. @@ -105,29 +91,29 @@ In our case (querying an address's delegations), `MyQuery` contains an [address] Here is what the code looks like for the CLI command: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/x/staking/client/cli/query.go#L324-L327 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/client/cli/query.go#L323-L326 #### gRPC Query Client Creation The Cosmos SDK leverages code generated from Protobuf services to make queries. The `staking` module's `MyQuery` service generates a `queryClient`, which the CLI will use to make queries. Here is the relevant code: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/x/staking/client/cli/query.go#L318-L342 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/client/cli/query.go#L317-L341 Under the hood, the `client.Context` has a `Query()` function used to retrieve the pre-configured node and relay a query to it; the function takes the query fully-qualified service method name as path (in our case: `/cosmos.staking.v1beta1.Query/Delegations`), and arguments as parameters. It first retrieves the RPC Client (called the [**node**](../core/node.md)) configured by the user to relay this query to, and creates the `ABCIQueryOptions` (parameters formatted for the ABCI call). The node is then used to make the ABCI call, `ABCIQueryWithOptions()`. Here is what the code looks like: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/client/query.go#L65-L91 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/query.go#L80-L114 ## RPC With a call to `ABCIQueryWithOptions()`, `MyQuery` is received by a [full-node](../core/encoding.md) which will then process the request. Note that, while the RPC is made to the consensus engine (e.g. Tendermint Core) of a full-node, queries are not part of consensus and will not be broadcasted to the rest of the network, as they do not require anything the network needs to agree upon. -Read more about ABCI Clients and Tendermint RPC in the Tendermint documentation [here](https://tendermint.com/rpc). +Read more about ABCI Clients and Tendermint RPC in the [Tendermint documentation](https://docs.tendermint.com/master/rpc/). ## Application Query Handling -When a query is received by the full-node after it has been relayed from the underlying consensus engine, it is now being handled within an environment that understands application-specific types and has a copy of the state. [`baseapp`](../core/baseapp.md) implements the ABCI [`Query()`](../core/baseapp.md#query) function and handles gRPC queries. The query route is parsed, and it it matches the fully-qualified service method name of an existing service method (most likely in one of the modules), then `baseapp` will relay the request to the relevant module. +When a query is received by the full-node after it has been relayed from the underlying consensus engine, it is now being handled within an environment that understands application-specific types and has a copy of the state. [`baseapp`](../core/baseapp.md) implements the ABCI [`Query()`](../core/baseapp.md#query) function and handles gRPC queries. The query route is parsed, and it matches the fully-qualified service method name of an existing service method (most likely in one of the modules), then `baseapp` will relay the request to the relevant module. Apart from gRPC routes, `baseapp` also handles four different types of queries: `app`, `store`, `p2p`, and `custom`. The first three types (`app`, `store`, `p2p`) are purely application-level and thus directly handled by `baseapp` or the stores, but the `custom` query type requires `baseapp` to route the query to a module's [legacy queriers](../building-modules/query-services.md#legacy-queriers). To learn more about these queries, please refer to [this guide](../core/grpc_rest.md#tendermint-rpc). @@ -137,13 +123,13 @@ Once a result is received from the querier, `baseapp` begins the process of retu ## Response -Since `Query()` is an ABCI function, `baseapp` returns the response as an [`abci.ResponseQuery`](https://tendermint.com/docs/spec/abci/abci.html#messages) type. The `client.Context` `Query()` routine receives the response and. +Since `Query()` is an ABCI function, `baseapp` returns the response as an [`abci.ResponseQuery`](https://docs.tendermint.com/master/spec/abci/abci.html#query-2) type. The `client.Context` `Query()` routine receives the response and. ### CLI Response The application [`codec`](../core/encoding.md) is used to unmarshal the response to a JSON and the `client.Context` prints the output to the command line, applying any configurations such as the output type (text, JSON or YAML). -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/client/context.go#L248-L283 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/context.go#L315-L343 And that's a wrap! The result of the query is outputted to the console by the CLI. diff --git a/docs/basics/tx-lifecycle.md b/docs/basics/tx-lifecycle.md index 8209e2c518a5..efb59e1a00a2 100644 --- a/docs/basics/tx-lifecycle.md +++ b/docs/basics/tx-lifecycle.md @@ -30,7 +30,7 @@ Additionally, there are several [flags](../core/cli.md) users can use to indicat * `--gas` refers to how much [gas](./gas-fees.md), which represents computational resources, `Tx` consumes. Gas is dependent on the transaction and is not precisely calculated until execution, but can be estimated by providing `auto` as the value for `--gas`. * `--gas-adjustment` (optional) can be used to scale `gas` up in order to avoid underestimating. For example, users can specify their gas adjustment as 1.5 to use 1.5 times the estimated gas. -* `--gas-prices` specifies how much the user is willing pay per unit of gas, which can be one or multiple denominations of tokens. For example, `--gas-prices=0.025uatom, 0.025upho` means the user is willing to pay 0.025uatom AND 0.025upho per unit of gas. +* `--gas-prices` specifies how much the user is willing to pay per unit of gas, which can be one or multiple denominations of tokens. For example, `--gas-prices=0.025uatom, 0.025upho` means the user is willing to pay 0.025uatom AND 0.025upho per unit of gas. * `--fees` specifies how much in fees the user is willing to pay in total. * `--timeout-height` specifies a block timeout height to prevent the tx from being committed past a certain height. @@ -40,7 +40,7 @@ Later, validators decide whether or not to include the transaction in their bloc #### CLI Example -Users of application `app` can enter the following command into their CLI to generate a transaction to send 1000uatom from a `senderAddress` to a `recipientAddress`. It specifies how much gas they are willing to pay: an automatic estimate scaled up by 1.5 times, with a gas price of 0.025uatom per unit gas. +Users of the application `app` can enter the following command into their CLI to generate a transaction to send 1000uatom from a `senderAddress` to a `recipientAddress`. It specifies how much gas they are willing to pay: an automatic estimate scaled up by 1.5 times, with a gas price of 0.025uatom per unit gas. ```bash appd tx send 1000uatom --from --gas auto --gas-adjustment 1.5 --gas-prices 0.025uatom @@ -48,13 +48,13 @@ appd tx send 1000uatom --from --gas auto --ga #### Other Transaction Creation Methods -The command-line is an easy way to interact with an application, but `Tx` can also be created using a [gRPC or REST interface](../core/grpc_rest.md) or some other entrypoint defined by the application developer. From the user's perspective, the interaction depends on the web interface or wallet they are using (e.g. creating `Tx` using [Lunie.io](https://lunie.io/#/) and signing it with a Ledger Nano S). +The command-line is an easy way to interact with an application, but `Tx` can also be created using a [gRPC or REST interface](../core/grpc_rest.md) or some other entry point defined by the application developer. From the user's perspective, the interaction depends on the web interface or wallet they are using (e.g. creating `Tx` using [Lunie.io](https://lunie.io/#/) and signing it with a Ledger Nano S). ## Addition to Mempool -Each full-node (running Tendermint) that receives a `Tx` sends an [ABCI message](https://tendermint.com/docs/spec/abci/abci.html#messages), +Each full-node (running Tendermint) that receives a `Tx` sends an [ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#messages), `CheckTx`, to the application layer to check for validity, and receives an `abci.ResponseCheckTx`. If the `Tx` passes the checks, it is held in the nodes' -[**Mempool**](https://tendermint.com/docs/tendermint-core/mempool.html#mempool), an in-memory pool of transactions unique to each node) pending inclusion in a block - honest nodes will discard `Tx` if it is found to be invalid. Prior to consensus, nodes continuously check incoming transactions and gossip them to their peers. +[**Mempool**](https://docs.tendermint.com/master/tendermint-core/mempool/), an in-memory pool of transactions unique to each node, pending inclusion in a block - honest nodes will discard `Tx` if it is found to be invalid. Prior to consensus, nodes continuously check incoming transactions and gossip them to their peers. ### Types of Checks @@ -66,9 +66,9 @@ them - and are thus less computationally expensive. Stateless checks include mak are not empty, enforcing nonnegative numbers, and other logic specified in the definitions. **_Stateful_** checks validate transactions and messages based on a committed state. Examples -include checking that the relevant values exist and are able to be transacted with, the address +include checking that the relevant values exist and can be transacted with, the address has sufficient funds, and the sender is authorized or has the correct ownership to transact. -At any given moment, full-nodes typically have [multiple versions](../core/baseapp.md#volatile-states) +At any given moment, full-nodes typically have [multiple versions](../core/baseapp.md#state-updates) of the application's internal state for different purposes. For example, nodes will execute state changes while in the process of verifying transactions, but still need a copy of the last committed state in order to answer queries - they should not respond using state with uncommitted changes. @@ -79,7 +79,7 @@ through several steps, beginning with decoding `Tx`. ### Decoding -When `Tx` is received by the application from the underlying consensus engine (e.g. Tendermint), it is still in its [encoded](../core/encoding.md) `[]byte` form and needs to be unmarshaled in order to be processed. Then, the [`runTx`](../core/baseapp.md#runtx-and-runmsgs) function is called to run in `runTxModeCheck` mode, meaning the function will run all checks but exit before executing messages and writing state changes. +When `Tx` is received by the application from the underlying consensus engine (e.g. Tendermint), it is still in its [encoded](../core/encoding.md) `[]byte` form and needs to be unmarshaled in order to be processed. Then, the [`runTx`](../core/baseapp.md#runtx-antehandler-runmsgs-posthandler) function is called to run in `runTxModeCheck` mode, meaning the function will run all checks but exit before executing messages and writing state changes. ### ValidateBasic @@ -89,7 +89,7 @@ To discard obviously invalid messages, the `BaseApp` type calls the `ValidateBas #### Guideline -Gas is not charged when `ValidateBasic` is executed so we recommend only performing all necessary stateless checks to enable middleware operations (for example, parsing the required signer accounts to validate a signature by a middleware) and stateless sanity checks not impacting performance of the CheckTx phase. +Gas is not charged when `ValidateBasic` is executed, so we recommend only performing all necessary stateless checks to enable middleware operations (for example, parsing the required signer accounts to validate a signature by a middleware) and stateless sanity checks not impacting performance of the CheckTx phase. Other validation operations must be performed when [handling a message](../building-modules/msg-services#Validation) in a module Msg Server. Example, if the message is to send coins from one address to another, `ValidateBasic` likely checks for non-empty addresses and a non-negative coin amount, but does not require knowledge of state such as the account balance of an address. @@ -100,9 +100,9 @@ See also [Msg Service Validation](../building-modules/msg-services.md#Validation After the ValidateBasic checks, the `AnteHandler`s are run. Technically, they are optional, but in practice, they are very often present to perform signature verification, gas calculation, fee deduction and other core operations related to blockchain transactions. -A copy of the cached context is provided to the `AnteHandler`, which performs limited checks specified for the transaction type. Using a copy allows the AnteHandler to do stateful checks for `Tx` without modifying the last committed state, and revert back to the original if the execution fails. +A copy of the cached context is provided to the `AnteHandler`, which performs limited checks specified for the transaction type. Using a copy allows the `AnteHandler` to do stateful checks for `Tx` without modifying the last committed state, and revert back to the original if the execution fails. -For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth/spec) module `AnteHandler` checks and increments sequence numbers, checks signatures and account numbers, and deducts fees from the first signer of the transaction - all state changes are made using the `checkState`. +For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module `AnteHandler` checks and increments sequence numbers, checks signatures and account numbers, and deducts fees from the first signer of the transaction - all state changes are made using the `checkState`. ### Gas @@ -117,7 +117,7 @@ nodes and add it to the Mempool so that the `Tx` becomes a candidate to be inclu The **mempool** serves the purpose of keeping track of transactions seen by all full-nodes. Full-nodes keep a **mempool cache** of the last `mempool.cache_size` transactions they have seen, as a first line of defense to prevent replay attacks. Ideally, `mempool.cache_size` is large enough to encompass all -of the transactions in the full mempool. If the the mempool cache is too small to keep track of all +of the transactions in the full mempool. If the mempool cache is too small to keep track of all the transactions, `CheckTx` is responsible for identifying and rejecting replayed transactions. Currently existing preventative measures include fees and a `sequence` (nonce) counter to distinguish @@ -137,7 +137,7 @@ Consensus, the process through which validator nodes come to agreement on which accept, happens in **rounds**. Each round begins with a proposer creating a block of the most recent transactions and ends with **validators**, special full-nodes with voting power responsible for consensus, agreeing to accept the block or go with a `nil` block instead. Validator nodes -execute the consensus algorithm, such as [Tendermint BFT](https://tendermint.com/docs/spec/consensus/consensus.html#terms), +execute the consensus algorithm, such as [Tendermint BFT](https://docs.tendermint.com/master/spec/consensus/consensus.html#terms), confirming the transactions using ABCI requests to the application, in order to come to this agreement. The first step of consensus is the **block proposal**. One proposer amongst the validators is chosen @@ -201,20 +201,21 @@ Instead of using their `checkState`, full-nodes use `deliverState`: * **Decoding:** Since `DeliverTx` is an ABCI call, `Tx` is received in the encoded `[]byte` form. Nodes first unmarshal the transaction, using the [`TxConfig`](./app-anatomy#register-codec) defined in the app, then call `runTx` in `runTxModeDeliver`, which is very similar to `CheckTx` but also executes and writes state changes. -* **Checks:** Full-nodes call `validateBasicMsgs` and the `AnteHandler` again. This second check - happens because they may not have seen the same transactions during the addition to Mempool stage\ +* **Checks and AnteHandler:** Full-nodes call `validateBasicMsgs` and `AnteHandler` again. This second check + happens because they may not have seen the same transactions during the addition to Mempool stage and a malicious proposer may have included invalid ones. One difference here is that the `AnteHandler` will not compare `gas-prices` to the node's `min-gas-prices` since that value is local to each node - differing values across nodes would yield nondeterministic results. * **`MsgServiceRouter`:** While `CheckTx` would have exited, `DeliverTx` continues to run - [`runMsgs`](../core/baseapp.md#runtx-and-runmsgs) to fully execute each `Msg` within the transaction. + [`runMsgs`](../core/baseapp.md#runtx-antehandler-runmsgs-posthandler) to fully execute each `Msg` within the transaction. Since the transaction may have messages from different modules, `BaseApp` needs to know which module to find the appropriate handler. This is achieved using `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's Protobuf [`Msg` service](../building-modules/msg-services.md). For `LegacyMsg` routing, the `Route` function is called via the [module manager](../building-modules/module-manager.md) to retrieve the route name and find the legacy [`Handler`](../building-modules/msg-services.md#handler-type) within the module. + +* **`Msg` service:** Protobuf `Msg` service is responsible for executing each message in the `Tx` and causes state transitions to persist in `deliverTxState`. -* **`Msg` service:** a Protobuf `Msg` service, a step up from `AnteHandler`, is responsible for executing each - message in the `Tx` and causes state transitions to persist in `deliverTxState`. +* **PostHandlers:** [`PostHandler`](../core/baseapp.md#posthandler)s run after the execution of the message. If they fail, the state change of `runMsgs`, as well of `PostHandlers` are both reverted. * **Gas:** While a `Tx` is being delivered, a `GasMeter` is used to keep track of how much gas is being used; if execution completes, `GasUsed` is set and returned in the diff --git a/docs/building-modules/README.md b/docs/building-modules/README.md index 411c3e8d38d8..8dd53c945954 100644 --- a/docs/building-modules/README.md +++ b/docs/building-modules/README.md @@ -1,7 +1,7 @@ # Building Modules diff --git a/docs/building-modules/beginblock-endblock.md b/docs/building-modules/beginblock-endblock.md index 2aab17db62f3..e324018fc2ab 100644 --- a/docs/building-modules/beginblock-endblock.md +++ b/docs/building-modules/beginblock-endblock.md @@ -22,17 +22,17 @@ The actual implementation of `BeginBlocker` and `EndBlocker` in `abci.go` are ve * If needed, they use the `keeper` and `ctx` to trigger state-transitions. * If needed, they can emit [`events`](../core/events.md) via the `ctx`'s `EventManager`. -A specificity of the `EndBlocker` is that it can return validator updates to the underlying consensus engine in the form of an [`[]abci.ValidatorUpdates`](https://tendermint.com/docs/app-dev/abci-spec.html#validatorupdate). This is the preferred way to implement custom validator changes. +A specificity of the `EndBlocker` is that it can return validator updates to the underlying consensus engine in the form of an [`[]abci.ValidatorUpdates`](https://docs.tendermint.com/master/spec/abci/abci.html#validatorupdate). This is the preferred way to implement custom validator changes. It is possible for developers to define the order of execution between the `BeginBlocker`/`EndBlocker` functions of each of their application's modules via the module's manager `SetOrderBeginBlocker`/`SetOrderEndBlocker` methods. For more on the module manager, click [here](./module-manager.md#manager). -See an example implementation of `BeginBlocker` from the `distr` module: +See an example implementation of `BeginBlocker` from the `distribution` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/f33749263f4ecc796115ad6e789cb0f7cddf9148/x/distribution/abci.go#L14-L38 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/distribution/abci.go#L14-L38 and an example implementation of `EndBlocker` from the `staking` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/f33749263f4ecc796115ad6e789cb0f7cddf9148/x/staking/abci.go#L22-L27 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/abci.go#L22-L27 ## Next {hide} diff --git a/docs/building-modules/errors.md b/docs/building-modules/errors.md index 0a7990b7686c..9e7b970fc43b 100644 --- a/docs/building-modules/errors.md +++ b/docs/building-modules/errors.md @@ -13,12 +13,12 @@ execution context. ## Registration -Modules should define and register their custom errors in `x/{module}/errors.go`. Registration -of errors is handled via the `types/errors` package. +Modules should define and register their custom errors in `x/{module}/errors.go`. +Registration of errors is handled via the [`errors` package](https://github.com/cosmos/cosmos-sdk/blob/main/errors/errors.go). Example: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/distribution/types/errors.go#L1-L21 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/distribution/types/errors.go#L1-L21 Each custom module error must provide the codespace, which is typically the module name (e.g. "distribution") and is unique per module, and a uint32 code. Together, the codespace and code @@ -28,7 +28,7 @@ necessarily have to be. The only restrictions on error codes are the following: * Must be greater than one, as a code value of one is reserved for internal errors. * Must be unique within the module. -Note, the Cosmos SDK provides a core set of *common* errors. These errors are defined in `types/errors/errors.go`. +Note, the Cosmos SDK provides a core set of *common* errors. These errors are defined in [`types/errors/errors.go`](https://github.com/cosmos/cosmos-sdk/blob/main/types/errors/errors.go). ## Wrapping @@ -38,13 +38,13 @@ execution. Example: -+++ https://github.com/cosmos/cosmos-sdk/blob/b2d48a9e815fe534a7faeec6ca2adb0874252b81/x/bank/keeper/keeper.go#L85-L122 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/keeper/keeper.go#L143-L184 -Regardless if an error is wrapped or not, the Cosmos SDK's `errors` package provides an API to determine if +Regardless if an error is wrapped or not, the Cosmos SDK's `errors` package provides a function to determine if an error is of a particular kind via `Is`. ## ABCI If a module error is registered, the Cosmos SDK `errors` package allows ABCI information to be extracted -through the `ABCIInfo` API. The package also provides `ResponseCheckTx` and `ResponseDeliverTx` as -auxiliary APIs to automatically get `CheckTx` and `DeliverTx` responses from an error. +through the `ABCIInfo` function. The package also provides `ResponseCheckTx` and `ResponseDeliverTx` as +auxiliary functions to automatically get `CheckTx` and `DeliverTx` responses from an error. diff --git a/docs/building-modules/genesis.md b/docs/building-modules/genesis.md index f06115cc389e..9e9c57738544 100644 --- a/docs/building-modules/genesis.md +++ b/docs/building-modules/genesis.md @@ -17,7 +17,7 @@ The subset of the genesis state defined from a given module is generally defined See an example of `GenesisState` protobuf message definition from the `auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/a9547b54ffac9729fe1393651126ddfc0d236cff/proto/cosmos/auth/v1beta1/genesis.proto ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/auth/v1beta1/genesis.proto Next we present the main genesis-related methods that need to be implemented by module developers in order for their module to be used in Cosmos SDK applications. @@ -25,13 +25,13 @@ Next we present the main genesis-related methods that need to be implemented by The `DefaultGenesis()` method is a simple method that calls the constructor function for `GenesisState` with the default value for each parameter. See an example from the `auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/64b6bb5270e1a3b688c2d98a8f481ae04bb713ca/x/auth/module.go#L48-L52 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/module.go#L45-L49 ### `ValidateGenesis` -The `ValidateGenesis(genesisState GenesisState)` method is called to verify that the provided `genesisState` is correct. It should perform validity checks on each of the parameters listed in `GenesisState`. See an example from the `auth` module: +The `ValidateGenesis(data GenesisState)` method is called to verify that the provided `genesisState` is correct. It should perform validity checks on each of the parameters listed in `GenesisState`. See an example from the `auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/64b6bb5270e1a3b688c2d98a8f481ae04bb713ca/x/auth/types/genesis.go#L57-L70 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/types/genesis.go#L61-L74 ## Other Genesis Methods @@ -45,7 +45,7 @@ The [module manager](./module-manager.md#manager) of the application is responsi See an example of `InitGenesis` from the `auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/64b6bb5270e1a3b688c2d98a8f481ae04bb713ca/x/auth/genesis.go#L13-L28 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/keeper/genesis.go#L8-L27 ### `ExportGenesis` @@ -53,7 +53,7 @@ The `ExportGenesis` method is executed whenever an export of the state is made. See an example of `ExportGenesis` from the `auth` module. -+++ https://github.com/cosmos/cosmos-sdk/blob/64b6bb5270e1a3b688c2d98a8f481ae04bb713ca/x/auth/genesis.go#L31-L42 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/keeper/genesis.go#L29-L41 ## Next {hide} diff --git a/docs/building-modules/invariants.md b/docs/building-modules/invariants.md index 3614bbc0a4df..0cbb0adac05d 100644 --- a/docs/building-modules/invariants.md +++ b/docs/building-modules/invariants.md @@ -14,11 +14,11 @@ An invariant is a property of the application that should always be true. In the An `Invariant` is a function that checks for a particular invariant within a module. Module `Invariant`s must follow the `Invariant` type: -+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/invariant.go#L9 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/invariant.go#L9 The `string` return value is the invariant message, which can be used when printing logs, and the `bool` return value is the actual result of the invariant check. -In practice, each module implements `Invariant`s in a `./keeper/invariants.go` file within the module's folder. The standard is to implement one `Invariant` function per logical grouping of invariants with the following model: +In practice, each module implements `Invariant`s in a `keeper/invariants.go` file within the module's folder. The standard is to implement one `Invariant` function per logical grouping of invariants with the following model: ```go // Example for an Invariant that checks balance-related invariants @@ -51,17 +51,9 @@ func AllInvariants(k Keeper) sdk.Invariant { Finally, module developers need to implement the `RegisterInvariants` method as part of the [`AppModule` interface](./module-manager.md#appmodule). Indeed, the `RegisterInvariants` method of the module, implemented in the `module/module.go` file, typically only defers the call to a `RegisterInvariants` method implemented in the `keeper/invariants.go` file. The `RegisterInvariants` method registers a route for each `Invariant` function in the [`InvariantRegistry`](#invariant-registry): -```go -// RegisterInvariants registers all staking invariants -func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { - ir.RegisterRoute(types.ModuleName, "module-accounts", - BalanceInvariants(k)) - ir.RegisterRoute(types.ModuleName, "nonnegative-power", - DepositsInvariant(k)) -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/keeper/invariants.go#L12-L21 -For more, see an example of [`Invariant`s implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/x/staking/keeper/invariants.go). +For more, see an example of [`Invariant`s implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/keeper/invariants.go). ## Invariant Registry @@ -69,17 +61,17 @@ The `InvariantRegistry` is a registry where the `Invariant`s of all the modules At its core, the `InvariantRegistry` is defined in the Cosmos SDK as an interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/invariant.go#L14-L17 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/invariant.go#L14-L17 Typically, this interface is implemented in the `keeper` of a specific module. The most used implementation of an `InvariantRegistry` can be found in the `crisis` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/crisis/keeper/keeper.go#L50-L54 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/crisis/keeper/keeper.go#L49-L53 The `InvariantRegistry` is therefore typically instantiated by instantiating the `keeper` of the `crisis` module in the [application's constructor function](../basics/app-anatomy.md#constructor-function). `Invariant`s can be checked manually via [`message`s](./messages-and-queries.md), but most often they are checked automatically at the end of each block. Here is an example from the `crisis` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/x/crisis/abci.go#L7-L14 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/crisis/abci.go#L12-L21 In both cases, if one of the `Invariant`s returns false, the `InvariantRegistry` can trigger special logic (e.g. have the application panic and print the `Invariant`s message in the log). diff --git a/docs/building-modules/keeper.md b/docs/building-modules/keeper.md index 515dc35318fc..78712a91b3d7 100644 --- a/docs/building-modules/keeper.md +++ b/docs/building-modules/keeper.md @@ -12,9 +12,9 @@ order: 7 ## Motivation -The Cosmos SDK is a framework that makes it easy for developers to build complex decentralised applications from scratch, mainly by composing modules together. As the ecosystem of open source modules for the Cosmos SDK expands, it will become increasingly likely that some of these modules contain vulnerabilities, as a result of the negligence or malice of their developer. +The Cosmos SDK is a framework that makes it easy for developers to build complex decentralized applications from scratch, mainly by composing modules together. As the ecosystem of open-source modules for the Cosmos SDK expands, it will become increasingly likely that some of these modules contain vulnerabilities, as a result of the negligence or malice of their developer. -The Cosmos SDK adopts an [object-capabilities-based approach](../core/ocap.md) to help developers better protect their application from unwanted inter-module interactions, and `keeper`s are at the core of this approach. A `keeper` can be thought of quite literally as the gatekeeper of a module's store(s). Each store (typically an [`IAVL` Store](../core/store.md#iavl-store)) defined within a module comes with a `storeKey`, which grants unlimited access to it. The module's `keeper` holds this `storeKey` (which should otherwise remain unexposed), and defines [methods](#implementing-methods) for reading and writing to the store(s). +The Cosmos SDK adopts an [object-capabilities-based approach](../core/ocap.md) to help developers better protect their application from unwanted inter-module interactions, and `keeper`s are at the core of this approach. A `keeper` can be considered quite literally to be the gatekeeper of a module's store(s). Each store (typically an [`IAVL` Store](../core/store.md#iavl-store)) defined within a module comes with a `storeKey`, which grants unlimited access to it. The module's `keeper` holds this `storeKey` (which should otherwise remain unexposed), and defines [methods](#implementing-methods) for reading and writing to the store(s). The core idea behind the object-capabilities approach is to only reveal what is necessary to get the work done. In practice, this means that instead of handling permissions of modules through access-control lists, module `keeper`s are passed a reference to the specific instance of the other modules' `keeper`s that they need to access (this is done in the [application's constructor function](../basics/app-anatomy.md#constructor-function)). As a consequence, a module can only interact with the subset of state defined in another module via the methods exposed by the instance of the other module's `keeper`. This is a great way for developers to control the interactions that their own module can have with modules developed by external developers. @@ -34,7 +34,7 @@ type Keeper struct { For example, here is the type definition of the `keeper` from the `staking` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/3bafd8255a502e5a9cee07391cf8261538245dfd/x/staking/keeper/keeper.go#L23-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/keeper/keeper.go#L21-L29 Let us go through the different parameters: @@ -56,7 +56,7 @@ func (k Keeper) Get(ctx sdk.Context, key string) returnType and the method will go through the following steps: -1. Retrieve the appropriate store from the `ctx` using the `storeKey`. This is done through the `KVStore(storeKey sdk.StoreKey)` method of the `ctx`. Then it's prefered to use the `prefix.Store` to access only the desired limited subset of the store for convenience and safety. +1. Retrieve the appropriate store from the `ctx` using the `storeKey`. This is done through the `KVStore(storeKey sdk.StoreKey)` method of the `ctx`. Then it's preferred to use the `prefix.Store` to access only the desired limited subset of the store for convenience and safety. 2. If it exists, get the `[]byte` value stored at location `[]byte(key)` using the `Get(key []byte)` method of the store. 3. Unmarshall the retrieved value from `[]byte` to `returnType` using the codec `cdc`. Return the value. @@ -72,13 +72,13 @@ and the method will go through the following steps: 2. Marshal `value` to `[]byte` using the codec `cdc`. 3. Set the encoded value in the store at location `key` using the `Set(key []byte, value []byte)` method of the store. -For more, see an example of `keeper`'s [methods implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/3bafd8255a502e5a9cee07391cf8261538245dfd/x/staking/keeper/keeper.go). +For more, see an example of `keeper`'s [methods implementation from the `staking` module](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/keeper/keeper.go). The [module `KVStore`](../core/store.md#kvstore-and-commitkvstore-interfaces) also provides an `Iterator()` method which returns an `Iterator` object to iterate over a domain of keys. This is an example from the `auth` module to iterate accounts: -+++ https://github.com/cosmos/cosmos-sdk/blob/bf8809ef9840b4f5369887a38d8345e2380a567f/x/auth/keeper/account.go#L70-L83 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/keeper/account.go#L76-L90 ## Next {hide} diff --git a/docs/building-modules/messages-and-queries.md b/docs/building-modules/messages-and-queries.md index 103d17e941e6..6e075bf422e4 100644 --- a/docs/building-modules/messages-and-queries.md +++ b/docs/building-modules/messages-and-queries.md @@ -18,11 +18,11 @@ When a transaction is relayed from the underlying consensus engine to the Cosmos ### `Msg` Services -Starting from v0.40, defining Protobuf `Msg` services is the recommended way to handle messages. A Protobuf `Msg` service should be created for each module, typically in `tx.proto` (see more info about [conventions and naming](../core/encoding.md#faq)). It must have an RPC service method defined for each message in the module. +Defining Protobuf `Msg` services is the recommended way to handle messages. A Protobuf `Msg` service should be created for each module, typically in `tx.proto` (see more info about [conventions and naming](../core/encoding.md#faq)). It must have an RPC service method defined for each message in the module. See an example of a `Msg` service definition from `x/bank` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L10-L17 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L12-L19 Each `Msg` service method must have exactly one argument, which must implement the `sdk.Msg` interface, and a Protobuf response. The naming convention is to call the RPC argument `Msg` and the RPC response `MsgResponse`. For example: @@ -49,39 +49,41 @@ Amino `LegacyMsg`s can be defined as protobuf messages. The messages definition A `LegacyMsg` is typically accompanied by a standard constructor function, that is called from one of the [module's interface](./module-interfaces.md). `message`s also need to implement the `sdk.Msg` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/4a1b2fba43b1052ca162b3a1e0b6db6db9c26656/types/tx_msg.go#L10-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/tx_msg.go#L10-L22 It extends `proto.Message` and contains the following methods: * `Route() string`: Name of the route for this message. Typically all `message`s in a module have the same route, which is most often the module's name. -* `Type() string`: Type of the message, used primarly in [events](../core/events.md). This should return a message-specific `string`, typically the denomination of the message itself. +* `Type() string`: Type of the message, used primarily in [events](../core/events.md). This should return a message-specific `string`, typically the denomination of the message itself. * [`ValidateBasic() error`](../basics/tx-lifecycle.md#ValidateBasic). * `GetSignBytes() []byte`: Return the canonical byte representation of the message. Used to generate a signature. * `GetSigners() []AccAddress`: Return the list of signers. The Cosmos SDK will make sure that each `message` contained in a transaction is signed by all the signers listed in the list returned by this method. ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/migrations/legacytx/stdsign.go#L20-L36 + See an example implementation of a `message` from the `gov` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/gov/types/msgs.go#L77-L125 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/gov/types/v1/msgs.go#L106-L138 ## Queries -A `query` is a request for information made by end-users of applications through an interface and processed by a full-node. A `query` is received by a full-node through its consensus engine and relayed to the application via the ABCI. It is then routed to the appropriate module via `BaseApp`'s `queryrouter` so that it can be processed by the module's query service (./query-services.md). For a deeper look at the lifecycle of a `query`, click [here](../basics/query-lifecycle.md). +A `query` is a request for information made by end-users of applications through an interface and processed by a full-node. A `query` is received by a full-node through its consensus engine and relayed to the application via the ABCI. It is then routed to the appropriate module via `BaseApp`'s `QueryRouter` so that it can be processed by the module's query service (./query-services.md). For a deeper look at the lifecycle of a `query`, click [here](../basics/query-lifecycle.md). ### gRPC Queries -Starting from v0.40, the prefered way to define queries is by using [Protobuf services](https://developers.google.com/protocol-buffers/docs/proto#services). A `Query` service should be created per module in `query.proto`. This service lists endpoints starting with `rpc`. +Queries should be defined using [Protobuf services](https://developers.google.com/protocol-buffers/docs/proto#services). A `Query` service should be created per module in `query.proto`. This service lists endpoints starting with `rpc`. Here's an example of such a `Query` service definition: -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/proto/cosmos/auth/v1beta1/query.proto#L12-L23 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/auth/v1beta1/query.proto#L13-L59 -As `proto.Message`s, generated `Response` types implement by default `String()` method of [`fmt.Stringer`](https://golang.org/pkg/fmt/#Stringer). +As `proto.Message`s, generated `Response` types implement by default `String()` method of [`fmt.Stringer`](https://pkg.go.dev/fmt#Stringer). A `RegisterQueryServer` method is also generated and should be used to register the module's query server in the `RegisterServices` method from the [`AppModule` interface](./module-manager.md#appmodule). ### Legacy Queries -Before the introduction of Protobuf and gRPC in the Cosmos SDK, there was usually no specific `query` object defined by module developers, contrary to `message`s. Instead, the Cosmos SDK took the simpler approach of using a simple `path` to define each `query`. The `path` contains the `query` type and all the arguments needed in order to process it. For most module queries, the `path` should look like the following: +Before the introduction of Protobuf and gRPC in the Cosmos SDK, there was usually no specific `query` object defined by module developers, contrary to `message`s. Instead, the Cosmos SDK took the simpler approach of using a simple `path` to define each `query`. The `path` contains the `query` type and all the arguments needed to process it. For most module queries, the `path` should look like the following: ```text queryCategory/queryRoute/queryType/arg1/arg2/... @@ -98,7 +100,7 @@ The `path` for each `query` must be defined by the module developer in the modul * A [`querier`](./query-services.md#legacy-queriers), to process the `query` once it has been [routed to the module](../core/baseapp.md#query-routing). * [Query commands](./module-interfaces.md#query-commands) in the module's CLI file, where the `path` for each `query` is specified. -* `query` return types. Typically defined in a file `types/querier.go`, they specify the result type of each of the module's `queries`. These custom types must implement the `String()` method of [`fmt.Stringer`](https://golang.org/pkg/fmt/#Stringer). +* `query` return types. Typically defined in a file `types/querier.go`, they specify the result type of each of the module's `queries`. These custom types must implement the `String()` method of [`fmt.Stringer`](https://pkg.go.dev/fmt#Stringer). ### Store Queries @@ -106,9 +108,7 @@ Store queries query directly for store keys. They use `clientCtx.QueryABCI(req a See following examples: -+++ https://github.com/cosmos/cosmos-sdk/blob/080fcf1df25ccdf97f3029b6b6f83caaf5a235e4/x/ibc/core/client/query.go#L36-L46 - -+++ https://github.com/cosmos/cosmos-sdk/blob/080fcf1df25ccdf97f3029b6b6f83caaf5a235e4/baseapp/abci.go#L722-L749 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/abci.go#L756-L777 ## Next {hide} diff --git a/docs/building-modules/module-interfaces.md b/docs/building-modules/module-interfaces.md index c4fe187a9758..91dca7a53d50 100644 --- a/docs/building-modules/module-interfaces.md +++ b/docs/building-modules/module-interfaces.md @@ -16,19 +16,19 @@ One of the main interfaces for an application is the [command-line interface](.. ### Transaction Commands - In order to create messages that trigger state changes, end-users must create [transactions](../core/transactions.md) that wrap and deliver the messages. A transaction command creates a transaction that includes one or more messages. +In order to create messages that trigger state changes, end-users must create [transactions](../core/transactions.md) that wrap and deliver the messages. A transaction command creates a transaction that includes one or more messages. - Transaction commands typically have their own `tx.go` file that lives within the module's `./client/cli` folder. The commands are specified in getter functions and the name of the function should include the name of the command. +Transaction commands typically have their own `tx.go` file that lives within the module's `./client/cli` folder. The commands are specified in getter functions and the name of the function should include the name of the command. Here is an example from the `x/bank` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/bank/client/cli/tx.go#L28-L63 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/client/cli/tx.go#L35-L71 In the example, `NewSendTxCmd()` creates and returns the transaction command for a transaction that wraps and delivers `MsgSend`. `MsgSend` is the message used to send tokens from one account to another. In general, the getter function does the following: -* **Constructs the command:** Read the [Cobra Documentation](https://godoc.org/github.com/spf13/cobra) for more detailed information on how to create commands. +* **Constructs the command:** Read the [Cobra Documentation](https://pkg.go.dev/github.com/spf13/cobra) for more detailed information on how to create commands. * **Use:** Specifies the format of the user input required to invoke the command. In the example above, `send` is the name of the transaction command and `[from_key_or_address]`, `[to_address]`, and `[amount]` are the arguments. * **Args:** The number of arguments the user provides. In this case, there are exactly three: `[from_key_or_address]`, `[to_address]`, and `[amount]`. * **Short and Long:** Descriptions for the command. A `Short` description is expected. A `Long` description can be used to provide additional information that is displayed when a user adds the `--help` flag. @@ -42,23 +42,23 @@ In general, the getter function does the following: Each module must implement `NewTxCmd()`, which aggregates all of the transaction commands of the module. Here is an example from the `x/bank` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/bank/client/cli/tx.go#L13-L26 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/client/cli/tx.go#L17-L33 Each module must also implement the `GetTxCmd()` method for `AppModuleBasic` that simply returns `NewTxCmd()`. This allows the root command to easily aggregate all of the transaction commands for each module. Here is an example: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/bank/module.go#L75-L78 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/module.go#L70-L73 ### Query Commands [Queries](./messages-and-queries.md#queries) allow users to gather information about the application or network state; they are routed by the application and processed by the module in which they are defined. Query commands typically have their own `query.go` file in the module's `./client/cli` folder. Like transaction commands, they are specified in getter functions. Here is an example of a query command from the `x/auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/auth/client/cli/query.go#L75-L105 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/client/cli/query.go#L83-L125 In the example, `GetAccountCmd()` creates and returns a query command that returns the state of an account based on the provided account address. In general, the getter function does the following: -* **Constructs the command:** Read the [Cobra Documentation](https://godoc.org/github.com/spf13/cobra) for more detailed information on how to create commands. +* **Constructs the command:** Read the [Cobra Documentation](https://pkg.go.dev/github.com/spf13/cobra) for more detailed information on how to create commands. * **Use:** Specifies the format of the user input required to invoke the command. In the example above, `account` is the name of the query command and `[address]` is the argument. * **Args:** The number of arguments the user provides. In this case, there is exactly one: `[address]`. * **Short and Long:** Descriptions for the command. A `Short` description is expected. A `Long` description can be used to provide additional information that is displayed when a user adds the `--help` flag. @@ -72,11 +72,11 @@ In general, the getter function does the following: Each module must implement `GetQueryCmd()`, which aggregates all of the query commands of the module. Here is an example from the `x/auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/auth/client/cli/query.go#L25-L42 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/client/cli/query.go#L25-L42 Each module must also implement the `GetQueryCmd()` method for `AppModuleBasic` that returns the `GetQueryCmd()` function. This allows for the root command to easily aggregate all of the query commands for each module. Here is an example: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/auth/module.go#L80-L83 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/client/cli/query.go#L32-L50 ### Flags @@ -102,13 +102,13 @@ For more detailed information on creating flags, visit the [Cobra Documentation] As mentioned in [transaction commands](#transaction-commands), there is a set of flags that all transaction commands must add. This is done with the `AddTxFlagsToCmd` method defined in the Cosmos SDK's `./client/flags` package. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/client/flags/flags.go#L94-L120 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/flags/flags.go#L103-L131 Since `AddTxFlagsToCmd(cmd *cobra.Command)` includes all of the basic flags required for a transaction command, module developers may choose not to add any of their own (specifying arguments instead may often be more appropriate). Similarly, there is a `AddQueryFlagsToCmd(cmd *cobra.Command)` to add common flags to a module query command. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/client/flags/flags.go#L85-L92 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/flags/flags.go#L92-L101 ## gRPC @@ -120,15 +120,15 @@ In order to do that, modules must implement `RegisterGRPCGatewayRoutes(clientCtx Here's an example from the `x/auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/auth/module.go#L68-L73 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/module.go#L61-L66 ## gRPC-gateway REST -Applications need to support web services that use HTTP requests (e.g. a web wallet like [Keplr](https://keplr.xyz)). [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) translates REST calls into gRPC calls, which might be useful for clients that do not use gRPC. +Applications need to support web services that use HTTP requests (e.g. a web wallet like [Keplr](https://keplr.app)). [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) translates REST calls into gRPC calls, which might be useful for clients that do not use gRPC. Modules that want to expose REST queries should add `google.api.http` annotations to their `rpc` methods, such as in the example below from the `x/auth` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/auth/v1beta1/query.proto#L13-L29 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/auth/v1beta1/query.proto#L13-L59 gRPC gateway is started in-process along with the application and Tendermint. It can be enabled or disabled by setting gRPC Configuration `enable` in [`app.toml`](../run-node/run-node.md#configuring-the-node-using-apptoml). diff --git a/docs/building-modules/module-manager.md b/docs/building-modules/module-manager.md index 1facca88deb4..edcab0388ea2 100644 --- a/docs/building-modules/module-manager.md +++ b/docs/building-modules/module-manager.md @@ -29,7 +29,7 @@ are only used for genesis can take advantage of the `Module` patterns without ha The `AppModuleBasic` interface defines the independent methods modules need to implement. -+++ https://github.com/cosmos/cosmos-sdk/blob/325be6ff215db457c6fc7668109640cd7fdac461/types/module/module.go#L49-L63 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/module/module.go#L47-L60 Let us go through the methods: @@ -38,7 +38,6 @@ Let us go through the methods: * `RegisterInterfaces(codectypes.InterfaceRegistry)`: Registers a module's interface types and their concrete implementations as `proto.Message`. * `DefaultGenesis(codec.JSONCodec)`: Returns a default [`GenesisState`](./genesis.md#genesisstate) for the module, marshalled to `json.RawMessage`. The default `GenesisState` need to be defined by the module developer and is primarily used for testing. * `ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage)`: Used to validate the `GenesisState` defined by a module, given in its `json.RawMessage` form. It will usually unmarshall the `json` before running a custom [`ValidateGenesis`](./genesis.md#validategenesis) function defined by the module developer. -* `RegisterRESTRoutes(client.Context, *mux.Router)`: Registers the REST routes for the module. These routes will be used to map REST request to the module in order to process them. See [gRPC and REST](../core/grpc_rest.md) for more. * `RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux)`: Registers gRPC routes for the module. * `GetTxCmd()`: Returns the root [`Tx` command](./module-interfaces.md#tx) for the module. The subcommands of this root command are used by end-users to generate new transactions containing [`message`s](./messages-and-queries.md#queries) defined in the module. * `GetQueryCmd()`: Return the root [`query` command](./module-interfaces.md#query) for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module. @@ -49,7 +48,7 @@ All the `AppModuleBasic` of an application are managed by the [`BasicManager`](# The `AppModuleGenesis` interface is a simple embedding of the `AppModuleBasic` interface with two added methods. -+++ https://github.com/cosmos/cosmos-sdk/blob/325be6ff215db457c6fc7668109640cd7fdac461/types/module/module.go#L152-L158 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/module/module.go#L140-L146 Let us go through the two added methods: @@ -62,14 +61,14 @@ It does not have its own manager, and exists separately from [`AppModule`](#appm The `AppModule` interface defines the inter-dependent methods that modules need to implement. -+++ https://github.com/cosmos/cosmos-sdk/blob/b4cce159bcc6a32ac78245c6866dd87c73f3720d/types/module/module.go#L160-L182 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/module/module.go#L148-L176 `AppModule`s are managed by the [module manager](#manager). This interface embeds the `AppModuleGenesis` interface so that the manager can access all the independent and genesis inter-dependent methods of the module. This means that a concrete type implementing the `AppModule` interface must either implement all the methods of `AppModuleGenesis` (and by extension `AppModuleBasic`), or include a concrete type that does as parameter. Let us go through the methods of `AppModule`: * `RegisterInvariants(sdk.InvariantRegistry)`: Registers the [`invariants`](./invariants.md) of the module. If an invariant deviates from its predicted value, the [`InvariantRegistry`](./invariants.md#registry) triggers appropriate logic (most often the chain will be halted). -* `Route()`: Returns the route for [`message`s](./messages-and-queries.md#messages) to be routed to the module by [`BaseApp`](../core/baseapp.md#message-routing). +* `Route()` (deprecated): Returns the route for [`message`s](./messages-and-queries.md#messages) to be routed to the module by [`BaseApp`](../core/baseapp.md#message-routing). * `QuerierRoute()` (deprecated): Returns the name of the module's query route, for [`queries`](./messages-and-queries.md#queries) to be routes to the module by [`BaseApp`](../core/baseapp.md#query-routing). * `LegacyQuerierHandler(*codec.LegacyAmino)` (deprecated): Returns a [`querier`](./query-services.md#legacy-queriers) given the query `path`, in order to process the `query`. * `RegisterServices(Configurator)`: Allows a module to register services. @@ -106,16 +105,15 @@ Module managers are used to manage collections of `AppModuleBasic` and `AppModul The `BasicManager` is a structure that lists all the `AppModuleBasic` of an application: -+++ https://github.com/cosmos/cosmos-sdk/blob/325be6ff215db457c6fc7668109640cd7fdac461/types/module/module.go#L65-L66 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/module/module.go#L62-L72 It implements the following methods: -* `NewBasicManager(modules ...AppModuleBasic)`: Constructor function. It takes a list of the application's `AppModuleBasic` and builds a new `BasicManager`. This function is generally called in the `init()` function of [`app.go`](../basics/app-anatomy.md#core-application-file) to quickly initialize the independent elements of the application's modules (click [here](https://github.com/cosmos/gaia/blob/master/app/app.go#L59-L74) to see an example). +* `NewBasicManager(modules ...AppModuleBasic)`: Constructor function. It takes a list of the application's `AppModuleBasic` and builds a new `BasicManager`. This function is generally called in the `init()` function of [`app.go`](../basics/app-anatomy.md#core-application-file) to quickly initialize the independent elements of the application's modules (click [here](https://github.com/cosmos/gaia/blob/main/app/app.go#L59-L74) to see an example). * `RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)`: Registers the [`codec.LegacyAmino`s](../core/encoding.md#amino) of each of the application's `AppModuleBasic`. This function is usually called early on in the [application's construction](../basics/app-anatomy.md#constructor). * `RegisterInterfaces(registry codectypes.InterfaceRegistry)`: Registers interface types and implementations of each of the application's `AppModuleBasic`. * `DefaultGenesis(cdc codec.JSONCodec)`: Provides default genesis information for modules in the application by calling the [`DefaultGenesis(cdc codec.JSONCodec)`](./genesis.md#defaultgenesis) function of each module. It is used to construct a default genesis file for the application. * `ValidateGenesis(cdc codec.JSONCodec, txEncCfg client.TxEncodingConfig, genesis map[string]json.RawMessage)`: Validates the genesis information modules by calling the [`ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage)`](./genesis.md#validategenesis) function of each module. -* `RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)`: Registers REST routes for modules by calling the [`RegisterRESTRoutes`](./module-interfaces.md#register-routes) function of each module. This function is usually called function from the `main.go` function of the [application's command-line interface](../core/cli.md). * `RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux)`: Registers gRPC routes for modules. * `AddTxCommands(rootTxCmd *cobra.Command)`: Adds modules' transaction commands to the application's [`rootTxCommand`](../core/cli.md#transaction-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../core/cli.md). * `AddQueryCommands(rootQueryCmd *cobra.Command)`: Adds modules' query commands to the application's [`rootQueryCommand`](../core/cli.md#query-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../core/cli.md). @@ -124,7 +122,7 @@ It implements the following methods: The `Manager` is a structure that holds all the `AppModule` of an application, and defines the order of execution between several key components of these modules: -+++ https://github.com/cosmos/cosmos-sdk/blob/325be6ff215db457c6fc7668109640cd7fdac461/types/module/module.go#L223-L231 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/module/module.go#L216-L225 The module manager is used throughout the application whenever an action on a collection of modules is required. It implements the following methods: @@ -135,6 +133,7 @@ The module manager is used throughout the application whenever an action on a co * `SetOrderExportGenesis(moduleNames ...string)`: Sets the order in which the [`ExportGenesis`](./genesis.md#exportgenesis) function of each module will be called in case of an export. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). * `SetOrderBeginBlockers(moduleNames ...string)`: Sets the order in which the `BeginBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). * `SetOrderEndBlockers(moduleNames ...string)`: Sets the order in which the `EndBlock()` function of each module will be called at the end of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). +* `SetOrderMigrations(moduleNames ...string)`: Sets the order of migrations to be run. If not set then migrations will be run with an order defined in `DefaultMigrationsOrder`. * `RegisterInvariants(ir sdk.InvariantRegistry)`: Registers the [invariants](./invariants.md) of each module. * `RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter, legacyQuerierCdc *codec.LegacyAmino)`: Registers legacy [`Msg`](./messages-and-queries.md#messages) and [`querier`](./query-services.md#legacy-queriers) routes. * `RegisterServices(cfg Configurator)`: Registers all module services. @@ -145,7 +144,7 @@ The module manager is used throughout the application whenever an action on a co Here's an example of a concrete integration within an application: -+++ https://github.com/cosmos/cosmos-sdk/blob/2323f1ac0e9a69a0da6b43693061036134193464/simapp/app.go#L315-L362 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L342-L409 ## Next {hide} diff --git a/docs/building-modules/msg-services.md b/docs/building-modules/msg-services.md index cb52425ff8fc..37cd45cb9144 100644 --- a/docs/building-modules/msg-services.md +++ b/docs/building-modules/msg-services.md @@ -19,21 +19,21 @@ As further described in [ADR 031](../architecture/adr-031-msg-service.md), this Protobuf generates a `MsgServer` interface based on a definition of `Msg` service. It is the role of the module developer to implement this interface, by implementing the state transition logic that should happen upon receival of each `sdk.Msg`. As an example, here is the generated `MsgServer` interface for `x/bank`, which exposes two `sdk.Msg`s: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/x/bank/types/tx.pb.go#L285-L291 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/types/tx.pb.go#L288-L294 When possible, the existing module's [`Keeper`](keeper.md) should implement `MsgServer`, otherwise a `msgServer` struct that embeds the `Keeper` can be created, typically in `./keeper/msg_server.go`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/bank/keeper/msg_server.go#L14-L16 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/keeper/msg_server.go#L14-L16 `msgServer` methods can retrieve the `sdk.Context` from the `context.Context` parameter method using the `sdk.UnwrapSDKContext`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/bank/keeper/msg_server.go#L27-L28 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/keeper/msg_server.go#L27-L27 `sdk.Msg` processing usually follows these 3 steps: ### Validation -Before a `msgServer` method is executed, the message's [`ValidateBasic()`](../basics/tx-lifecycle.md#ValidateBasic) method has already been called. Since `msg.ValidateBasic()` performs only the most basic checks, this stage must perform all other validation (both *stateful* and *stateless*) to make sure the `message` is valid. Checks performed in the `msgServer` method can be more expensive and the signer is charged gas for these operations. +Before a `msgServer` method is executed, the message's [`ValidateBasic()`](../basics/tx-lifecycle.md#ValidateBasic) method has already been called. Since `msg.ValidateBasic()` performs only the most basic checks, this stage must perform all other validation (both *stateful* and *stateless*) to make sure the `message` is valid. Checks performed in the `msgServer` method can be more expensive and the signer is charged gas for these operations. For example, a `msgServer` method for a `transfer` message might check that the sending account has enough funds to actually perform the transfer. It is recommended to implement all validation checks in a separate function that passes state values as arguments. This implementation simplifies testing. As expected, expensive validation functions charge additional gas. Example: @@ -77,57 +77,23 @@ These events are relayed back to the underlying consensus engine and can be used The invoked `msgServer` method returns a `proto.Message` response and an `error`. These return values are then wrapped into an `*sdk.Result` or an `error` using `sdk.WrapServiceResult(ctx sdk.Context, res proto.Message, err error)`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc2/baseapp/msg_service_router.go#L104-L104 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/msg_service_router.go#L127 This method takes care of marshaling the `res` parameter to protobuf and attaching any events on the `ctx.EventManager()` to the `sdk.Result`. -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/proto/cosmos/base/abci/v1beta1/abci.proto#L81-L95 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/base/abci/v1beta1/abci.proto#L88-L109 This diagram shows a typical structure of a Protobuf `Msg` service, and how the message propagates through the module. ![Transaction flow](../uml/svg/transaction_flow.svg) -## Amino `LegacyMsg`s - -### `handler` type - -The `handler` type defined in the Cosmos SDK will be deprecated in favor of [`Msg` Services](#implementation-of-a-module-msg-service). - -Here is the typical structure of a `handler` function: - -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc2/types/handler.go#L4-L4 - -Let us break it down: - -* The [`LegacyMsg`](./messages-and-queries.md#messages) is the actual object being processed. -* The [`Context`](../core/context.md) contains all the necessary information needed to process the `msg`, as well as a branch of the latest state. If the `msg` is successfully processed, the branched version of the state contained in the `ctx` will be written to the main state (branch). -* The `*Result` returned to `BaseApp` contains (among other things) information on the execution of the `handler` and [events](../core/events.md). - -Module `handler`s are typically implemented in a `./handler.go` file inside the module's folder. The [module manager](./module-manager.md) is used to add the module's `handler`s to the -[application's `router`](../core/baseapp.md#message-routing) via the `Route()` method. Typically, -the manager's `Route()` method simply constructs a Route that calls a `NewHandler()` method defined in `handler.go`. - -+++ https://github.com/cosmos/cosmos-sdk/blob/228728cce2af8d494c8b4e996d011492139b04ab/x/gov/module.go#L143-L146 - -### Implementation - -`NewHandler` function dispatches a `LegacyMsg` to appropriate handler function, usually by using a switch statement: - -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/x/bank/handler.go#L13-L29 - -First, `NewHandler` function sets a new `EventManager` to the context to isolate events per `msg`. -Then, a simple switch calls the appropriate `handler` based on the `LegacyMsg` type. - -In this regard, `handler`s functions need to be implemented for each module `LegacyMsg`. This will also involve manual handler registration of `LegacyMsg` types. -`handler`s functions should return a `*Result` and an `error`. - ## Telemetry New [telemetry metrics](../core/telemetry.md) can be created from `msgServer` methods when handling messages. This is an example from the `x/auth/vesting` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/auth/vesting/msg_server.go#L73-L85 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/vesting/msg_server.go#L73-L85 ## Next {hide} diff --git a/docs/building-modules/query-services.md b/docs/building-modules/query-services.md index bb994f08e435..4618480a6d99 100644 --- a/docs/building-modules/query-services.md +++ b/docs/building-modules/query-services.md @@ -15,14 +15,14 @@ A Protobuf Query service processes [`queries`](./messages-and-queries.md#queries The `querier` type defined in the Cosmos SDK will be deprecated in favor of [gRPC Services](#grpc-service). It specifies the typical structure of a `querier` function: -+++ https://github.com/cosmos/cosmos-sdk/blob/9a183ffbcc0163c8deb71c7fd5f8089a83e58f05/types/queryable.go#L9 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/queryable.go#L9 Let us break it down: +* The [`Context`](../core/context.md) contains all the necessary information needed to process the `query`, as well as a branch of the latest state. It is primarily used by the [`keeper`](./keeper.md) to access the state. * The `path` is an array of `string`s that contains the type of the query, and that can also contain `query` arguments. See [`queries`](./messages-and-queries.md#queries) for more information. * The `req` itself is primarily used to retrieve arguments if they are too large to fit in the `path`. This is done using the `Data` field of `req`. -* The [`Context`](../core/context.md) contains all the necessary information needed to process the `query`, as well as a branch of the latest state. It is primarily used by the [`keeper`](./keeper.md) to access the state. -* The result `res` returned to `BaseApp`, marshalled using the application's [`codec`](../core/encoding.md). +* The result in `[]byte` returned to `BaseApp`, marshalled using the application's [`codec`](../core/encoding.md). ## Implementation of a module query service @@ -43,7 +43,7 @@ from the store. Therefore, the Cosmos SDK provides a function `sdk.UnwrapSDKCont Here's an example implementation for the bank module: -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/x/bank/keeper/grpc_query.go ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/keeper/grpc_query.go ### Legacy Queriers @@ -68,9 +68,9 @@ func NewQuerier(keeper Keeper) sdk.Querier { This simple switch returns a `querier` function specific to the type of the received `query`. At this point of the [query lifecycle](../basics/query-lifecycle.md), the first element of the `path` (`path[0]`) contains the type of the query. The following elements are either empty or contain arguments needed to process the query. -The `querier` functions themselves are pretty straighforward. They generally fetch a value or values from the state using the [`keeper`](./keeper.md). Then, they marshall the value(s) using the [`codec`](../core/encoding.md) and return the `[]byte` obtained as result. +The `querier` functions themselves are pretty straightforward. They generally fetch a value or values from the state using the [`keeper`](./keeper.md). Then, they marshall the value(s) using the [`codec`](../core/encoding.md) and return the `[]byte` obtained as result. -For a deeper look at `querier`s, see this [example implementation of a `querier` function](https://github.com/cosmos/cosmos-sdk/blob/7f59723d889b69ca19966167f0b3a7fec7a39e53/x/gov/keeper/querier.go) from the bank module. +For a deeper look at `querier`s, see this [example implementation of a `querier` function](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/gov/keeper/querier.go) from the bank module. ## Next {hide} diff --git a/docs/building-modules/simulator.md b/docs/building-modules/simulator.md index ab5801160dbb..4c2196dad75c 100644 --- a/docs/building-modules/simulator.md +++ b/docs/building-modules/simulator.md @@ -32,7 +32,7 @@ for the key-value pairs from the stores to be decoded (_i.e_ unmarshalled) to their corresponding types. In particular, it matches the key to a concrete type and then unmarshals the value from the `KVPair` to the type provided. -You can use the example [here](https://github.com/cosmos/cosmos-sdk/blob/v0.42.0/x/distribution/simulation/decoder.go) from the distribution module to implement your store decoders. +You can use the example [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/distribution/simulation/decoder.go) from the distribution module to implement your store decoders. ### Randomized genesis @@ -43,13 +43,13 @@ Once the module genesis parameter are generated randomly (or with the key and values defined in a `params` file), they are marshaled to JSON format and added to the app genesis JSON to use it on the simulations. -You can check an example on how to create the randomized genesis [here](https://github.com/cosmos/cosmos-sdk/blob/v0.42.0/x/staking/simulation/genesis.go). +You can check an example on how to create the randomized genesis [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/simulation/genesis.go). ### Randomized parameter changes The simulator is able to test parameter changes at random. The simulator package from each module must contain a `RandomizedParams` func that will simulate parameter changes of the module throughout the simulations lifespan. -You can see how an example of what is needed to fully test parameter changes [here](https://github.com/cosmos/cosmos-sdk/blob/v0.42.0/x/staking/simulation/params.go) +You can see how an example of what is needed to fully test parameter changes [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/simulation/params.go) ### Random weighted operations @@ -62,13 +62,13 @@ Operations on the simulation are simulated using the full [transaction cycle](.. Shown below is how weights are set: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/staking/simulation/operations.go#L18-L68 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/simulation/operations.go#L17-L75 As you can see, the weights are predefined in this case. Options exist to override this behavior with different weights. One option is to use `*rand.Rand` to define a random weight for the operation, or you can inject your own predefined weights. Here is how one can override the above package `simappparams`. -+++ https://github.com/cosmos/gaia/blob/master/sims.mk#L9-L22 ++++ https://github.com/cosmos/gaia/blob/main/sims.mk#L9-L22 For the last test a tool called runsim is used, this is used to parallelize go test instances, provide info to Github and slack integrations to provide information to your team on how the simulations are running. @@ -82,7 +82,7 @@ them to be used on the parameters. Now that all the required functions are defined, we need to integrate them into the module pattern within the `module.go`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.0/x/distribution/module.go ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/distribution/module.go ## App Simulator manager diff --git a/docs/building-modules/upgrade.md b/docs/building-modules/upgrade.md index fc57ec46a1e5..863066ca798d 100644 --- a/docs/building-modules/upgrade.md +++ b/docs/building-modules/upgrade.md @@ -4,7 +4,7 @@ order: 13 # Upgrading Modules -[In-Place Store Migrations](../core/upgrade.html) allow your modules to upgrade to new versions that include breaking changes. This document outlines how to build modules to take advantage of this functionality. {synopsis} +[In-Place Store Migrations](../core/upgrade.md) allow your modules to upgrade to new versions that include breaking changes. This document outlines how to build modules to take advantage of this functionality. {synopsis} ## Prerequisite Readings @@ -41,7 +41,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { Since these migrations are functions that need access to a Keeper's store, use a wrapper around the keepers called `Migrator` as shown in this example: -+++ https://github.com/cosmos/cosmos-sdk/blob/6ac8898fec9bd7ea2c1e5c79e0ed0c3f827beb55/x/bank/keeper/migrations.go#L8-L21 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/keeper/migrations.go#L9-L27 ## Writing Migration Scripts @@ -54,4 +54,4 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { } ``` -To see example code of changes that were implemented in a migration of balance keys, check out [migrateBalanceKeys](https://github.com/cosmos/cosmos-sdk/blob/36f68eb9e041e20a5bb47e216ac5eb8b91f95471/x/bank/legacy/v043/store.go#L41-L62). For context, this code introduced migrations of the bank store that updated addresses to be prefixed by their length in bytes as outlined in [ADR-028](../architecture/adr-028-public-key-addresses.md). +To see example code of changes that were implemented in a migration of balance keys, check out [migrateBalanceKeys](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/migrations/v043/store.go#L50-L71). For context, this code introduced migrations of the bank store that updated addresses to be prefixed by their length in bytes as outlined in [ADR-028](../architecture/adr-028-public-key-addresses.md). diff --git a/docs/core/baseapp.md b/docs/core/baseapp.md index 7d2850b71f99..0144cbeeb36f 100644 --- a/docs/core/baseapp.md +++ b/docs/core/baseapp.md @@ -15,9 +15,9 @@ This document describes `BaseApp`, the abstraction that implements the core func `BaseApp` is a base type that implements the core of a Cosmos SDK application, namely: -* The [Application Blockchain Interface](#abci), for the state-machine to communicate with the underlying consensus engine (e.g. Tendermint). +* The [Application Blockchain Interface](#main-abci-messages), for the state-machine to communicate with the underlying consensus engine (e.g. Tendermint). * [Service Routers](#service-routers), to route messages and queries to the appropriate module. -* Different [states](#states), as the state-machine can have different volatile states updated based on the ABCI message received. +* Different [states](#state-updates), as the state-machine can have different volatile states updated based on the ABCI message received. The goal of `BaseApp` is to provide the fundamental layer of a Cosmos SDK application that developers can easily extend to build their own custom application. Usually, @@ -45,7 +45,7 @@ management logic. The `BaseApp` type holds many important parameters for any Cosmos SDK based application. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/baseapp/baseapp.go#L46-L131 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/baseapp.go#L45-L137 Let us go through the most important components. @@ -67,7 +67,7 @@ First, the important parameters that are initialized during the bootstrapping of * [gRPC Query Router](#grpc-query-router): The `grpcQueryRouter` facilitates the routing of gRPC queries to the appropriate module for it to be processed. These queries are not ABCI messages themselves, but they are relayed to the relevant module's gRPC `Query` service. -* [`TxDecoder`](https://godoc.org/github.com/cosmos/cosmos-sdk/types#TxDecoder): It is used to decode +* [`TxDecoder`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/types#TxDecoder): It is used to decode raw transaction bytes relayed by the underlying Tendermint engine. * [`ParamStore`](#paramstore): The parameter store used to get and set application consensus parameters. * [`AnteHandler`](#antehandler): This handler is used to handle signature verification, fee payment, @@ -78,13 +78,13 @@ First, the important parameters that are initialized during the bootstrapping of the functions executed when the application receives the `InitChain`, `BeginBlock` and `EndBlock` ABCI messages from the underlying Tendermint engine. -Then, parameters used to define [volatile states](#volatile-states) (i.e. cached states): +Then, parameters used to define [volatile states](#state-updates) (i.e. cached states): * `checkState`: This state is updated during [`CheckTx`](#checktx), and reset on [`Commit`](#commit). * `deliverState`: This state is updated during [`DeliverTx`](#delivertx), and set to `nil` on [`Commit`](#commit) and gets re-initialized on BeginBlock. -Finally, a few more important parameterd: +Finally, a few more important parameters: * `voteInfos`: This parameter carries the list of validators whose precommit is missing, either because they did not vote or because the proposer did not include their vote. This information is @@ -93,7 +93,7 @@ Finally, a few more important parameterd: * `minGasPrices`: This parameter defines the minimum gas prices accepted by the node. This is a **local** parameter, meaning each full-node can set a different `minGasPrices`. It is used in the `AnteHandler` during [`CheckTx`](#checktx), mainly as a spam protection mechanism. The transaction - enters the [mempool](https://tendermint.com/docs/tendermint-core/mempool.html#transaction-ordering) + enters the [mempool](https://docs.tendermint.com/master/tendermint-core/mempool/) only if the gas prices of the transaction are greater than one of the minimum gas price in `minGasPrices` (e.g. if `minGasPrices == 1uatom,1photon`, the `gas-price` of the transaction must be greater than `1uatom` OR `1photon`). @@ -112,7 +112,7 @@ func NewBaseApp( ``` The `BaseApp` constructor function is pretty straightforward. The only thing worth noting is the -possibility to provide additional [`options`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/baseapp/options.go) +possibility to provide additional [`options`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/options.go) to the `BaseApp`, which will execute them in order. The `options` are generally `setter` functions for important parameters, like `SetPruning()` to set pruning options or `SetMinGasPrices()` to set the node's `min-gas-prices`. @@ -142,11 +142,11 @@ To avoid unnecessary roundtrip to the main state, all reads to the branched stor ### CheckTx State Updates During `CheckTx`, the `checkState`, which is based off of the last committed state from the root -store, is used for any reads and writes. Here we only execute the `AnteHandler` and verify a service router +store, is used for any reads and writes. Here we only execute the `AnteHandler` and verify a service router exists for every message in the transaction. Note, when we execute the `AnteHandler`, we branch -the already branched `checkState`. This has the side effect that if the `AnteHandler` fails, -the state transitions won't be reflected in the `checkState` -- i.e. `checkState` is only updated on -success. +the already branched `checkState`. +This has the side effect that if the `AnteHandler` fails, the state transitions won't be reflected in the `checkState` +-- i.e. `checkState` is only updated on success. ![CheckTx](./baseapp_state-checktx.png) @@ -193,9 +193,9 @@ When messages and queries are received by the application, they must be routed t [`sdk.Msg`s](#../building-modules/messages-and-queries.md#messages) need to be routed after they are extracted from transactions, which are sent from the underlying Tendermint engine via the [`CheckTx`](#checktx) and [`DeliverTx`](#delivertx) ABCI messages. To do so, `BaseApp` holds a `msgServiceRouter` which maps fully-qualified service methods (`string`, defined in each module's Protobuf `Msg` service) to the appropriate module's `MsgServer` implementation. -The [default `msgServiceRouter` included in `BaseApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/baseapp/msg_service_router.go) is stateless. However, some applications may want to make use of more stateful routing mechanisms such as allowing governance to disable certain routes or point them to new modules for upgrade purposes. For this reason, the `sdk.Context` is also passed into each [route handler inside `msgServiceRouter`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/baseapp/msg_service_router.go#L31-L32). For a stateless router that doesn't want to make use of this, you can just ignore the `ctx`. +The [default `msgServiceRouter` included in `BaseApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/msg_service_router.go) is stateless. However, some applications may want to make use of more stateful routing mechanisms such as allowing governance to disable certain routes or point them to new modules for upgrade purposes. For this reason, the `sdk.Context` is also passed into each [route handler inside `msgServiceRouter`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/msg_service_router.go#L31-L32). For a stateless router that doesn't want to make use of this, you can just ignore the `ctx`. -The application's `msgServiceRouter` is initialized with all the routes using the application's [module manager](../building-modules/module-manager.md#manager) (via the `RegisterServices` method), which itself is initialized with all the application's modules in the application's [constructor](../basics/app-anatomy.md#app-constructor). +The application's `msgServiceRouter` is initialized with all the routes using the application's [module manager](../building-modules/module-manager.md#manager) (via the `RegisterServices` method), which itself is initialized with all the application's modules in the application's [constructor](../basics/app-anatomy.md#constructor-function). ### gRPC Query Router @@ -205,7 +205,7 @@ Just like the `msgServiceRouter`, the `grpcQueryRouter` is initialized with all ## Main ABCI Messages -The [Application-Blockchain Interface](https://tendermint.com/docs/spec/abci/) (ABCI) is a generic interface that connects a state-machine with a consensus engine to form a functional full-node. It can be wrapped in any language, and needs to be implemented by each application-specific blockchain built on top of an ABCI-compatible consensus engine like Tendermint. +The [Application-Blockchain Interface](https://docs.tendermint.com/master/spec/abci/) (ABCI) is a generic interface that connects a state-machine with a consensus engine to form a functional full-node. It can be wrapped in any language, and needs to be implemented by each application-specific blockchain built on top of an ABCI-compatible consensus engine like Tendermint. The consensus engine handles two main tasks: @@ -244,9 +244,9 @@ to do the following checks: Steps 2. and 3. are performed by the [`AnteHandler`](../basics/gas-fees.md#antehandler) in the [`RunTx()`](#runtx-antehandler-and-runmsgs) function, which `CheckTx()` calls with the `runTxModeCheck` mode. During each step of `CheckTx()`, a -special [volatile state](#volatile-states) called `checkState` is updated. This state is used to keep +special [volatile state](#state-updates) called `checkState` is updated. This state is used to keep track of the temporary changes triggered by the `CheckTx()` calls of each transaction without modifying -the [main canonical state](#main-state) . For example, when a transaction goes through `CheckTx()`, the +the [main canonical state](#main-state). For example, when a transaction goes through `CheckTx()`, the transaction's fees are deducted from the sender's account in `checkState`. If a second transaction is received from the same account before the first is processed, and the account has consumed all its funds in `checkState` during the first transaction, the second transaction will fail `CheckTx`() and @@ -254,7 +254,7 @@ be rejected. In any case, the sender's account will not actually pay the fees un is actually included in a block, because `checkState` never gets committed to the main state. The `checkState` is reset to the latest state of the main state each time a blocks gets [committed](#commit). -`CheckTx` returns a response to the underlying consensus engine of type [`abci.ResponseCheckTx`](https://tendermint.com/docs/spec/abci/abci.html#messages). +`CheckTx` returns a response to the underlying consensus engine of type [`abci.ResponseCheckTx`](https://docs.tendermint.com/master/spec/abci/abci.html#checktx-2). The response contains: * `Code (uint32)`: Response Code. `0` if successful. @@ -263,7 +263,7 @@ The response contains: * `Info (string):` Additional information. May be non-deterministic. * `GasWanted (int64)`: Amount of gas requested for transaction. It is provided by users when they generate the transaction. * `GasUsed (int64)`: Amount of gas consumed by transaction. During `CheckTx`, this value is computed by multiplying the standard cost of a transaction byte by the size of the raw transaction. Next is an example: - +++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/x/auth/ante/basic.go#L104-L105 + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/ante/basic.go#L95-L95 * `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./events.md) for more. * `Codespace (string)`: Namespace for the Code. @@ -280,7 +280,7 @@ This allows certain checks like signature verification can be skipped during `Ch When the underlying consensus engine receives a block proposal, each transaction in the block needs to be processed by the application. To that end, the underlying consensus engine sends a `DeliverTx` message to the application for each transaction in a sequential order. -Before the first transaction of a given block is processed, a [volatile state](#volatile-states) called `deliverState` is intialized during [`BeginBlock`](#beginblock). This state is updated each time a transaction is processed via `DeliverTx`, and committed to the [main state](#main-state) when the block is [committed](#commit), after what is is set to `nil`. +Before the first transaction of a given block is processed, a [volatile state](#state-updates) called `deliverState` is initialized during [`BeginBlock`](#beginblock). This state is updated each time a transaction is processed via `DeliverTx`, and committed to the [main state](#main-state) when the block is [committed](#commit), after what it is set to `nil`. `DeliverTx` performs the **exact same steps as `CheckTx`**, with a little caveat at step 3 and the addition of a fifth step: @@ -289,11 +289,11 @@ Before the first transaction of a given block is processed, a [volatile state](# During the additional fifth step outlined in (2), each read/write to the store increases the value of `GasConsumed`. You can find the default cost of each operation: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/store/types/gas.go#L164-L175 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/gas.go#L230-L241 At any point, if `GasConsumed > GasWanted`, the function returns with `Code != 0` and `DeliverTx` fails. -`DeliverTx` returns a response to the underlying consensus engine of type [`abci.ResponseDeliverTx`](https://tendermint.com/docs/spec/abci/abci.html#delivertx). The response contains: +`DeliverTx` returns a response to the underlying consensus engine of type [`abci.ResponseDeliverTx`](https://docs.tendermint.com/master/spec/abci/abci.html#delivertx-2). The response contains: * `Code (uint32)`: Response Code. `0` if successful. * `Data ([]byte)`: Result bytes, if any. @@ -304,7 +304,7 @@ At any point, if `GasConsumed > GasWanted`, the function returns with `Code != 0 * `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./events.md) for more. * `Codespace (string)`: Namespace for the Code. -## RunTx, AnteHandler and RunMsgs +## RunTx, AnteHandler, RunMsgs, PostHandler ### RunTx @@ -316,7 +316,7 @@ After that, `RunTx()` calls `ValidateBasic()` on each `sdk.Msg`in the `Tx`, whic Then, the [`anteHandler`](#antehandler) of the application is run (if it exists). In preparation of this step, both the `checkState`/`deliverState`'s `context` and `context`'s `CacheMultiStore` are branched using the `cacheTxContext()` function. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/baseapp/baseapp.go#L623-L630 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/baseapp.go#L647-L654 This allows `RunTx` not to commit the changes made to the state during the execution of `anteHandler` if it ends up failing. It also prevents the module implementing the `anteHandler` from writing to state, which is an important part of the [object-capabilities](./ocap.md) of the Cosmos SDK. @@ -326,7 +326,7 @@ Finally, the [`RunMsgs()`](#runmsgs) function is called to process the `sdk.Msg` The `AnteHandler` is a special handler that implements the `AnteHandler` interface and is used to authenticate the transaction before the transaction's internal messages are processed. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/types/handler.go#L6-L8 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/handler.go#L6-L8 The `AnteHandler` is theoretically optional, but still a very important component of public blockchain networks. It serves 3 primary purposes: @@ -334,7 +334,7 @@ The `AnteHandler` is theoretically optional, but still a very important componen * Perform preliminary _stateful_ validity checks like ensuring signatures are valid or that the sender has enough funds to pay for fees. * Play a role in the incentivisation of stakeholders via the collection of transaction fees. -`BaseApp` holds an `anteHandler` as parameter that is initialized in the [application's constructor](../basics/app-anatomy.md#application-constructor). The most widely used `anteHandler` is the [`auth` module](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/auth/ante/ante.go). +`BaseApp` holds an `anteHandler` as parameter that is initialized in the [application's constructor](../basics/app-anatomy.md#application-constructor). The most widely used `anteHandler` is the [`auth` module](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/ante/ante.go). Click [here](../basics/gas-fees.md#antehandler) for more on the `anteHandler`. @@ -344,50 +344,61 @@ Click [here](../basics/gas-fees.md#antehandler) for more on the `anteHandler`. First, it retrieves the `sdk.Msg`'s fully-qualified type name, by checking the `type_url` of the Protobuf `Any` representing the `sdk.Msg`. Then, using the application's [`msgServiceRouter`](#msg-service-router), it checks for the existence of `Msg` service method related to that `type_url`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. Otherwise, if `mode == runTxModeDeliver`, the [`Msg` service](../building-modules/msg-services.md) RPC is executed, before `RunMsgs` returns. +### PostHandler + +_PostHandler_ are like `AnteHandler` (they share the same signature), but they execute after [`RunMsgs`](#runmsgs). + +Like `AnteHandler`s, `PostHandler`s are theoretically optional, one use case for `PostHandler`s is transaction tips (enabled by default in simapp). +Other use cases like unused gas refund can also be enabled by `PostHandler`s. + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/posthandler/post.go#L14:L27 + +Note, when `PostHandler`s fail, the state from `runMsgs` is also reverted, effectively making the transaction fail. + ## Other ABCI Messages ### InitChain -The [`InitChain` ABCI message](https://tendermint.com/docs/app-dev/abci-spec.html#initchain) is sent from the underlying Tendermint engine when the chain is first started. It is mainly used to **initialize** parameters and state like: +The [`InitChain` ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#initchain) is sent from the underlying Tendermint engine when the chain is first started. It is mainly used to **initialize** parameters and state like: -* [Consensus Parameters](https://tendermint.com/docs/spec/abci/apps.html#consensus-parameters) via `setConsensusParams`. -* [`checkState` and `deliverState`](#volatile-states) via `setCheckState` and `setDeliverState`. +* [Consensus Parameters](https://docs.tendermint.com/master/spec/abci/apps.html#consensus-parameters) via `setConsensusParams`. +* [`checkState` and `deliverState`](#state-updates) via `setCheckState` and `setDeliverState`. * The [block gas meter](../basics/gas-fees.md#block-gas-meter), with infinite gas to process genesis transactions. Finally, the `InitChain(req abci.RequestInitChain)` method of `BaseApp` calls the [`initChainer()`](../basics/app-anatomy.md#initchainer) of the application in order to initialize the main state of the application from the `genesis file` and, if defined, call the [`InitGenesis`](../building-modules/genesis.md#initgenesis) function of each of the application's modules. ### BeginBlock -The [`BeginBlock` ABCI message](#https://tendermint.com/docs/app-dev/abci-spec.html#beginblock) is sent from the underlying Tendermint engine when a block proposal created by the correct proposer is received, before [`DeliverTx`](#delivertx) is run for each transaction in the block. It allows developers to have logic be executed at the beginning of each block. In the Cosmos SDK, the `BeginBlock(req abci.RequestBeginBlock)` method does the following: +The [`BeginBlock` ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#beginblock) is sent from the underlying Tendermint engine when a block proposal created by the correct proposer is received, before [`DeliverTx`](#delivertx) is run for each transaction in the block. It allows developers to have logic be executed at the beginning of each block. In the Cosmos SDK, the `BeginBlock(req abci.RequestBeginBlock)` method does the following: -* Initialize [`deliverState`](#volatile-states) with the latest header using the `req abci.RequestBeginBlock` passed as parameter via the `setDeliverState` function. - +++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/baseapp/baseapp.go#L387-L397 +* Initialize [`deliverState`](#state-updates) with the latest header using the `req abci.RequestBeginBlock` passed as parameter via the `setDeliverState` function. + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/baseapp.go#L386-L396 This function also resets the [main gas meter](../basics/gas-fees.md#main-gas-meter). * Initialize the [block gas meter](../basics/gas-fees.md#block-gas-meter) with the `maxGas` limit. The `gas` consumed within the block cannot go above `maxGas`. This parameter is defined in the application's consensus parameters. * Run the application's [`beginBlocker()`](../basics/app-anatomy.md#beginblocker-and-endblock), which mainly runs the [`BeginBlocker()`](../building-modules/beginblock-endblock.md#beginblock) method of each of the application's modules. -* Set the [`VoteInfos`](https://tendermint.com/docs/app-dev/abci-spec.html#voteinfo) of the application, i.e. the list of validators whose _precommit_ for the previous block was included by the proposer of the current block. This information is carried into the [`Context`](./context.md) so that it can be used during `DeliverTx` and `EndBlock`. +* Set the [`VoteInfos`](https://docs.tendermint.com/master/spec/abci/abci.html#voteinfo) of the application, i.e. the list of validators whose _precommit_ for the previous block was included by the proposer of the current block. This information is carried into the [`Context`](./context.md) so that it can be used during `DeliverTx` and `EndBlock`. ### EndBlock -The [`EndBlock` ABCI message](#https://tendermint.com/docs/app-dev/abci-spec.html#endblock) is sent from the underlying Tendermint engine after [`DeliverTx`](#delivertx) as been run for each transaction in the block. It allows developers to have logic be executed at the end of each block. In the Cosmos SDK, the bulk `EndBlock(req abci.RequestEndBlock)` method is to run the application's [`EndBlocker()`](../basics/app-anatomy.md#beginblocker-and-endblock), which mainly runs the [`EndBlocker()`](../building-modules/beginblock-endblock.md#beginblock) method of each of the application's modules. +The [`EndBlock` ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#endblock) is sent from the underlying Tendermint engine after [`DeliverTx`](#delivertx) as been run for each transaction in the block. It allows developers to have logic be executed at the end of each block. In the Cosmos SDK, the bulk `EndBlock(req abci.RequestEndBlock)` method is to run the application's [`EndBlocker()`](../basics/app-anatomy.md#beginblocker-and-endblock), which mainly runs the [`EndBlocker()`](../building-modules/beginblock-endblock.md#beginblock) method of each of the application's modules. ### Commit -The [`Commit` ABCI message](https://tendermint.com/docs/app-dev/abci-spec.html#commit) is sent from the underlying Tendermint engine after the full-node has received _precommits_ from 2/3+ of validators (weighted by voting power). On the `BaseApp` end, the `Commit(res abci.ResponseCommit)` function is implemented to commit all the valid state transitions that occured during `BeginBlock`, `DeliverTx` and `EndBlock` and to reset state for the next block. +The [`Commit` ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#commit) is sent from the underlying Tendermint engine after the full-node has received _precommits_ from 2/3+ of validators (weighted by voting power). On the `BaseApp` end, the `Commit(res abci.ResponseCommit)` function is implemented to commit all the valid state transitions that occurred during `BeginBlock`, `DeliverTx` and `EndBlock` and to reset state for the next block. -To commit state-transitions, the `Commit` function calls the `Write()` function on `deliverState.ms`, where `deliverState.ms` is a branched multistore of the main store `app.cms`. Then, the `Commit` function sets `checkState` to the latest header (obtbained from `deliverState.ctx.BlockHeader`) and `deliverState` to `nil`. +To commit state-transitions, the `Commit` function calls the `Write()` function on `deliverState.ms`, where `deliverState.ms` is a branched multistore of the main store `app.cms`. Then, the `Commit` function sets `checkState` to the latest header (obtained from `deliverState.ctx.BlockHeader`) and `deliverState` to `nil`. Finally, `Commit` returns the hash of the commitment of `app.cms` back to the underlying consensus engine. This hash is used as a reference in the header of the next block. ### Info -The [`Info` ABCI message](https://tendermint.com/docs/app-dev/abci-spec.html#info) is a simple query from the underlying consensus engine, notably used to sync the latter with the application during a handshake that happens on startup. When called, the `Info(res abci.ResponseInfo)` function from `BaseApp` will return the application's name, version and the hash of the last commit of `app.cms`. +The [`Info` ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#info) is a simple query from the underlying consensus engine, notably used to sync the latter with the application during a handshake that happens on startup. When called, the `Info(res abci.ResponseInfo)` function from `BaseApp` will return the application's name, version and the hash of the last commit of `app.cms`. ### Query -The [`Query` ABCI message](https://tendermint.com/docs/app-dev/abci-spec.html#query) is used to serve queries received from the underlying consensus engine, including queries received via RPC like Tendermint RPC. It used to be the main entrypoint to build interfaces with the application, but with the introduction of [gRPC queries](../building-modules/query-services.md) in Cosmos SDK v0.40, its usage is more limited. The application must respect a few rules when implementing the `Query` method, which are outlined [here](https://tendermint.com/docs/app-dev/abci-spec.html#query). +The [`Query` ABCI message](https://docs.tendermint.com/master/spec/abci/abci.html#query-2) is used to serve queries received from the underlying consensus engine, including queries received via RPC like Tendermint RPC. It used to be the main entrypoint to build interfaces with the application, but with the introduction of [gRPC queries](../building-modules/query-services.md) in Cosmos SDK v0.40, its usage is more limited. The application must respect a few rules when implementing the `Query` method, which are outlined [here](https://docs.tendermint.com/master/spec/abci/apps.html#query). -Each Tendermint `query` comes with a `path`, which is a `string` which denotes what to query. If the `path` matches a gRPC fully-qualified service method, then `BaseApp` will defer the query to the `grpcQueryRouter` and let it handle it like explained [above](#grpc-query-router). Otherwise, the `path` represents a query that is not (yet) handled by the gRPC router. `BaseApp` splits the `path` string with the `/` delimiter. By convention, the first element of the splitted string (`splitted[0]`) contains the category of `query` (`app`, `p2p`, `store` or `custom` ). The `BaseApp` implementation of the `Query(req abci.RequestQuery)` method is a simple dispatcher serving these 4 main categories of queries: +Each Tendermint `query` comes with a `path`, which is a `string` which denotes what to query. If the `path` matches a gRPC fully-qualified service method, then `BaseApp` will defer the query to the `grpcQueryRouter` and let it handle it like explained [above](#grpc-query-router). Otherwise, the `path` represents a query that is not (yet) handled by the gRPC router. `BaseApp` splits the `path` string with the `/` delimiter. By convention, the first element of the split string (`split[0]`) contains the category of `query` (`app`, `p2p`, `store` or `custom` ). The `BaseApp` implementation of the `Query(req abci.RequestQuery)` method is a simple dispatcher serving these 4 main categories of queries: * Application-related queries like querying the application's version, which are served via the `handleQueryApp` method. * Direct queries to the multistore, which are served by the `handlerQueryStore` method. These direct queries are different from custom queries which go through `app.queryRouter`, and are mainly used by third-party service provider like block explorers. diff --git a/docs/core/baseapp_transaction-middleware.png b/docs/core/baseapp_transaction-middleware.png deleted file mode 100644 index 76db2a6b1475..000000000000 Binary files a/docs/core/baseapp_transaction-middleware.png and /dev/null differ diff --git a/docs/core/cli.md b/docs/core/cli.md index 1d9f5945f48b..f85e3d3071a8 100644 --- a/docs/core/cli.md +++ b/docs/core/cli.md @@ -1,10 +1,10 @@ # Command-Line Interface -This document describes how commmand-line interface (CLI) works on a high-level, for an [**application**](../basics/app-anatomy.md). A separate document for implementing a CLI for a Cosmos SDK [**module**](../building-modules/intro.md) can be found [here](../building-modules/module-interfaces.md#cli). {synopsis} +This document describes how command-line interface (CLI) works on a high-level, for an [**application**](../basics/app-anatomy.md). A separate document for implementing a CLI for a Cosmos SDK [**module**](../building-modules/intro.md) can be found [here](../building-modules/module-interfaces.md#cli). {synopsis} ## Command-Line Interface @@ -38,9 +38,9 @@ The `main.go` file needs to have a `main()` function that creates a root command * **instantiating the `codec`** by calling the application's `MakeCodec()` function (called `MakeTestEncodingConfig` in `simapp`). The [`codec`](../core/encoding.md) is used to encode and decode data structures for the application - stores can only persist `[]byte`s so the developer must define a serialization format for their data structures or use the default, Protobuf. * **adding subcommand** for all the possible user interactions, including [transaction commands](#transaction-commands) and [query commands](#query-commands). -The `main()` function finally creates an executor and [execute](https://godoc.org/github.com/spf13/cobra#Command.Execute) the root command. See an example of `main()` function from the `simapp` application: +The `main()` function finally creates an executor and [execute](https://pkg.go.dev/github.com/spf13/cobra#Command.Execute) the root command. See an example of `main()` function from the `simapp` application: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/main.go#L12-L24 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/main.go#L12-L24 The rest of the document will detail what needs to be implemented for each step and include smaller portions of code from the `simapp` CLI files. @@ -53,50 +53,50 @@ Every application CLI first constructs a root command, then adds functionality b The root command (called `rootCmd`) is what the user first types into the command line to indicate which application they wish to interact with. The string used to invoke the command (the "Use" field) is typically the name of the application suffixed with `-d`, e.g. `simd` or `gaiad`. The root command typically includes the following commands to support basic functionality in the application. * **Status** command from the Cosmos SDK rpc client tools, which prints information about the status of the connected [`Node`](../core/node.md). The Status of a node includes `NodeInfo`,`SyncInfo` and `ValidatorInfo`. -* **Keys** [commands](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/client/keys) from the Cosmos SDK client tools, which includes a collection of subcommands for using the key functions in the Cosmos SDK crypto tools, including adding a new key and saving it to the keyring, listing all public keys stored in the keyring, and deleting a key. For example, users can type `simd keys add ` to add a new key and save an encrypted copy to the keyring, using the flag `--recover` to recover a private key from a seed phrase or the flag `--multisig` to group multiple keys together to create a multisig key. For full details on the `add` key command, see the code [here](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/client/keys/add.go). For more details about usage of `--keyring-backend` for storage of key credentials look at the [keyring docs](../run-node/keyring.md). -* **Server** commands from the Cosmos SDK server package. These commands are responsible for providing the mechanisms necessary to start an ABCI Tendermint application and provides the CLI framework (based on [cobra](github.com/spf13/cobra)) necessary to fully bootstrap an application. The package exposes two core functions: `StartCmd` and `ExportCmd` which creates commands to start the application and export state respectively. Click [here](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/server) to learn more. +* **Keys** [commands](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/keys) from the Cosmos SDK client tools, which includes a collection of subcommands for using the key functions in the Cosmos SDK crypto tools, including adding a new key and saving it to the keyring, listing all public keys stored in the keyring, and deleting a key. For example, users can type `simd keys add ` to add a new key and save an encrypted copy to the keyring, using the flag `--recover` to recover a private key from a seed phrase or the flag `--multisig` to group multiple keys together to create a multisig key. For full details on the `add` key command, see the code [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/keys/add.go). For more details about usage of `--keyring-backend` for storage of key credentials look at the [keyring docs](../run-node/keyring.md). +* **Server** commands from the Cosmos SDK server package. These commands are responsible for providing the mechanisms necessary to start an ABCI Tendermint application and provides the CLI framework (based on [cobra](github.com/spf13/cobra)) necessary to fully bootstrap an application. The package exposes two core functions: `StartCmd` and `ExportCmd` which creates commands to start the application and export state respectively. Click [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server) to learn more. * [**Transaction**](#transaction-commands) commands. * [**Query**](#query-commands) commands. Next is an example `rootCmd` function from the `simapp` application. It instantiates the root command, adds a [_persistent_ flag](#flags) and `PreRun` function to be run before every execution, and adds all of the necessary subcommands. -+++ https://github.com/cosmos/cosmos-sdk/blob/4eea4cafd3b8b1c2cd493886db524500c9dd745c/simapp/simd/cmd/root.go#L37-L150 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L39-L85 `rootCmd` has a function called `initAppConfig()` which is useful for setting the application's custom configs. By default app uses Tendermint app config template from Cosmos SDK, which can be over-written via `initAppConfig()`. Here's an example code to override default `app.toml` template. -+++ https://github.com/cosmos/cosmos-sdk/blob/4eea4cafd3b8b1c2cd493886db524500c9dd745c/simapp/simd/cmd/root.go#L84-L117 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L99-L153 -The `initAppConfig()` also allows overriding the default Cosmos SDK's [server config](https://github.com/cosmos/cosmos-sdk/blob/4eea4cafd3b8b1c2cd493886db524500c9dd745c/server/config/config.go#L199). One example is the `min-gas-prices` config, which defines the minimum gas prices a validator is willing to accept for processing a transaction. By default, the Cosmos SDK sets this parameter to `""` (empty string), which forces all validators to tweak their own `app.toml` and set a non-empty value, or else the node will halt on startup. This might not be the best UX for validators, so the chain developer can set a default `app.toml` value for validators inside this `initAppConfig()` function. +The `initAppConfig()` also allows overriding the default Cosmos SDK's [server config](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/config/config.go#L235). One example is the `min-gas-prices` config, which defines the minimum gas prices a validator is willing to accept for processing a transaction. By default, the Cosmos SDK sets this parameter to `""` (empty string), which forces all validators to tweak their own `app.toml` and set a non-empty value, or else the node will halt on startup. This might not be the best UX for validators, so the chain developer can set a default `app.toml` value for validators inside this `initAppConfig()` function. -+++ https://github.com/cosmos/cosmos-sdk/blob/aa9b055ddb46aacd4737335a92d0b8a82d577341/simapp/simd/cmd/root.go#L101-L116 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L119-L134 The root-level `status` and `keys` subcommands are common across most applications and do not interact with application state. The bulk of an application's functionality - what users can actually _do_ with it - is enabled by its `tx` and `query` commands. ### Transaction Commands -[Transactions](./transactions.md) are objects wrapping [`Msg`s](../building-modules/messages-and-queries.md#messages) that trigger state changes. To enable the creation of transactions using the CLI interface, a function `txCmd` is generally added to the `rootCmd`: +[Transactions](./transactions.md) are objects wrapping [`Msg`s](../building-modules/messages-and-queries.md#messages) that trigger state changes. To enable the creation of transactions using the CLI interface, a function `txCommand` is generally added to the `rootCmd`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L86-L92 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L175-L181 -This `txCmd` function adds all the transaction available to end-users for the application. This typically includes: +This `txCommand` function adds all the transaction available to end-users for the application. This typically includes: * **Sign command** from the [`auth`](../../x/auth/spec/README.md) module that signs messages in a transaction. To enable multisig, add the `auth` module's `MultiSign` command. Since every transaction requires some sort of signature in order to be valid, the signing command is necessary for every application. * **Broadcast command** from the Cosmos SDK client tools, to broadcast transactions. * **All [module transaction commands](../building-modules/module-interfaces.md#transaction-commands)** the application is dependent on, retrieved by using the [basic module manager's](../building-modules/module-manager.md#basic-manager) `AddTxCommands()` function. -Here is an example of a `txCmd` aggregating these subcommands from the `simapp` application: +Here is an example of a `txCommand` aggregating these subcommands from the `simapp` application: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L123-L149 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L215-L240 ### Query Commands -[**Queries**](../building-modules/messages-and-queries.md#queries) are objects that allow users to retrieve information about the application's state. To enable the creation of transactions using the CLI interface, a function `txCmd` is generally added to the `rootCmd`: +[**Queries**](../building-modules/messages-and-queries.md#queries) are objects that allow users to retrieve information about the application's state. To enable the creation of queries using the CLI interface, a function `queryCommand` is generally added to the `rootCmd`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L86-L92 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L175-L181 -This `queryCmd` function adds all the queries available to end-users for the application. This typically includes: +This `queryCommand` function adds all the queries available to end-users for the application. This typically includes: * **QueryTx** and/or other transaction query commands] from the `auth` module which allow the user to search for a transaction by inputting its hash, a list of tags, or a block height. These queries allow users to see if transactions have been included in a block. * **Account command** from the `auth` module, which displays the state (e.g. account balance) of an account given an address. @@ -104,9 +104,9 @@ This `queryCmd` function adds all the queries available to end-users for the app * **Block command** from the Cosmos SDK rpc client tools, which displays the block data for a given height. * **All [module query commands](../building-modules/module-interfaces.md#query-commands)** the application is dependent on, retrieved by using the [basic module manager's](../building-modules/module-manager.md#basic-manager) `AddQueryCommands()` function. -Here is an example of a `queryCmd` aggregating subcommands from the `simapp` application: +Here is an example of a `queryCommand` aggregating subcommands from the `simapp` application: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L99-L121 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L191-L213 ## Flags @@ -116,17 +116,17 @@ A _persistent_ flag (as opposed to a _local_ flag) added to a command transcends Flags are added to commands directly (generally in the [module's CLI file](../building-modules/module-interfaces.md#flags) where module commands are defined) and no flag except for the `rootCmd` persistent flags has to be added at application level. It is common to add a _persistent_ flag for `--chain-id`, the unique identifier of the blockchain the application pertains to, to the root command. Adding this flag can be done in the `main()` function. Adding this flag makes sense as the chain ID should not be changing across commands in this application CLI. Here is an example from the `simapp` application: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L118-L119 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L210-L210 ## Environment variables -Each flag is bound to it's respecteve named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--home` for application with basename `GAIA` is bound to `GAIA_HOME`. It allows to reduce amount of flags typed for routine operations. For example instead of: +Each flag is bound to it's respecteve named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--home` for application with basename `GAIA` is bound to `GAIA_HOME`. It allows reducing the amount of flags typed for routine operations. For example instead of: ```sh gaia --home=./ --node= --chain-id="testchain-1" --keyring-backend=test tx ... --from= ``` -this will be more convinient: +this will be more convenient: ```sh # define env variables in .env, .envrc etc @@ -143,9 +143,9 @@ gaia tx ... --from= It is vital that the root command of an application uses `PersistentPreRun()` cobra command property for executing the command, so all child commands have access to the server and client contexts. These contexts are set as their default values initially and maybe modified, scoped to the command, in their respective `PersistentPreRun()` functions. Note that the `client.Context` is typically pre-populated with "default" values that may be useful for all commands to inherit and override if necessary. -Here is an example of an `PersistentPreRun()` function from `simapp``: +Here is an example of an `PersistentPreRun()` function from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L54-L60 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L56-L79 The `SetCmdClientContextHandler` call reads persistent flags via `ReadPersistentCommandFlags` which creates a `client.Context` and sets that on the root command's `Context`. diff --git a/docs/core/context.md b/docs/core/context.md index 3a0efa4353de..9994839c03b7 100644 --- a/docs/core/context.md +++ b/docs/core/context.md @@ -4,7 +4,7 @@ order: 3 # Context -The `context` is a data structure intended to be passed from function to function that carries information about the current state of the application. It provides an access to a branched storage (a safe branch of the entire state) as well as useful objects and information like `gasMeter`, `block height`, `consensus parameters` and more. {synopsis} +The `context` is a data structure intended to be passed from function to function that carries information about the current state of the application. It provides access to a branched storage (a safe branch of the entire state) as well as useful objects and information like `gasMeter`, `block height`, `consensus parameters` and more. {synopsis} ## Pre-requisites Readings @@ -13,23 +13,25 @@ The `context` is a data structure intended to be passed from function to functio ## Context Definition -The Cosmos SDK `Context` is a custom data structure that contains Go's stdlib [`context`](https://golang.org/pkg/context) as its base, and has many additional types within its definition that are specific to the Cosmos SDK. The `Context` is integral to transaction processing in that it allows modules to easily access their respective [store](./store.md#base-layer-kvstores) in the [`multistore`](./store.md#multistore) and retrieve transactional context such as the block header and gas meter. +The Cosmos SDK `Context` is a custom data structure that contains Go's stdlib [`context`](https://pkg.go.dev/context) as its base, and has many additional types within its definition that are specific to the Cosmos SDK. The `Context` is integral to transaction processing in that it allows modules to easily access their respective [store](./store.md#base-layer-kvstores) in the [`multistore`](./store.md#multistore) and retrieve transactional context such as the block header and gas meter. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/types/context.go#L16-L39 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/context.go#L17-L42 -* **Context:** The base type is a Go [Context](https://golang.org/pkg/context), which is explained further in the [Go Context Package](#go-context-package) section below. +* **Base Context:** The base type is a Go [Context](https://pkg.go.dev/context), which is explained further in the [Go Context Package](#go-context-package) section below. * **Multistore:** Every application's `BaseApp` contains a [`CommitMultiStore`](./store.md#multistore) which is provided when a `Context` is created. Calling the `KVStore()` and `TransientStore()` methods allows modules to fetch their respective [`KVStore`](./store.md#base-layer-kvstores) using their unique `StoreKey`. -* **ABCI Header:** The [header](https://tendermint.com/docs/spec/abci/abci.html#header) is an ABCI type. It carries important information about the state of the blockchain, such as block height and proposer of the current block. +* **Header:** The [header](https://docs.tendermint.com/master/spec/core/data_structures.html#header) is a Blockchain type. It carries important information about the state of the blockchain, such as block height and proposer of the current block. +* **Header Hash:** The current block header hash, obtained during `abci.RequestBeginBlock`. * **Chain ID:** The unique identification number of the blockchain a block pertains to. -* **Transaction Bytes:** The `[]byte` representation of a transaction being processed using the context. Every transaction is processed by various parts of the Cosmos SDK and consensus engine (e.g. Tendermint) throughout its [lifecycle](../basics/tx-lifecycle.md), some of which to not have any understanding of transaction types. Thus, transactions are marshaled into the generic `[]byte` type using some kind of [encoding format](./encoding.md) such as [Amino](./encoding.md). -* **Logger:** A `logger` from the Tendermint libraries. Learn more about logs [here](https://tendermint.com/docs/tendermint-core/how-to-read-logs.html#how-to-read-logs). Modules call this method to create their own unique module-specific logger. -* **VoteInfo:** A list of the ABCI type [`VoteInfo`](https://tendermint.com/docs/spec/abci/abci.html#voteinfo), which includes the name of a validator and a boolean indicating whether they have signed the block. +* **Transaction Bytes:** The `[]byte` representation of a transaction being processed using the context. Every transaction is processed by various parts of the Cosmos SDK and consensus engine (e.g. Tendermint) throughout its [lifecycle](../basics/tx-lifecycle.md), some of which do not have any understanding of transaction types. Thus, transactions are marshaled into the generic `[]byte` type using some kind of [encoding format](./encoding.md) such as [Amino](./encoding.md). +* **Logger:** A `logger` from the Tendermint libraries. Learn more about logs [here](https://docs.tendermint.com/master/nodes/logging.html). Modules call this method to create their own unique module-specific logger. +* **VoteInfo:** A list of the ABCI type [`VoteInfo`](https://docs.tendermint.com/master/spec/abci/abci.html#voteinfo), which includes the name of a validator and a boolean indicating whether they have signed the block. * **Gas Meters:** Specifically, a [`gasMeter`](../basics/gas-fees.md#main-gas-meter) for the transaction currently being processed using the context and a [`blockGasMeter`](../basics/gas-fees.md#block-gas-meter) for the entire block it belongs to. Users specify how much in fees they wish to pay for the execution of their transaction; these gas meters keep track of how much [gas](../basics/gas-fees.md) has been used in the transaction or block so far. If the gas meter runs out, execution halts. * **CheckTx Mode:** A boolean value indicating whether a transaction should be processed in `CheckTx` or `DeliverTx` mode. * **Min Gas Price:** The minimum [gas](../basics/gas-fees.md) price a node is willing to take in order to include a transaction in its block. This price is a local value configured by each node individually, and should therefore **not be used in any functions used in sequences leading to state-transitions**. -* **Consensus Params:** The ABCI type [Consensus Parameters](https://tendermint.com/docs/spec/abci/apps.html#consensus-parameters), which specify certain limits for the blockchain, such as maximum gas for a block. +* **Consensus Params:** The ABCI type [Consensus Parameters](https://docs.tendermint.com/master/spec/abci/apps.html#consensus-parameters), which specify certain limits for the blockchain, such as maximum gas for a block. * **Event Manager:** The event manager allows any caller with access to a `Context` to emit [`Events`](./events.md). Modules may define module specific `Events` by defining various `Types` and `Attributes` or use the common definitions found in `types/`. Clients can subscribe or query for these `Events`. These `Events` are collected throughout `DeliverTx`, `BeginBlock`, and `EndBlock` and are returned to Tendermint for indexing. For example: +* **Priority:** The transaction priority, only relevant in `CheckTx`. ```go ctx.EventManager().EmitEvent(sdk.NewEvent( @@ -40,7 +42,7 @@ ctx.EventManager().EmitEvent(sdk.NewEvent( ## Go Context Package -A basic `Context` is defined in the [Golang Context Package](https://golang.org/pkg/context). A `Context` +A basic `Context` is defined in the [Golang Context Package](https://pkg.go.dev/context). A `Context` is an immutable data structure that carries request-scoped data across APIs and processes. Contexts are also designed to enable concurrency and to be used in goroutines. @@ -51,7 +53,7 @@ to create a child context from its parent using a `With` function. For example: childCtx = parentCtx.WithBlockHeader(header) ``` -The [Golang Context Package](https://golang.org/pkg/context) documentation instructs developers to +The [Golang Context Package](https://pkg.go.dev/context) documentation instructs developers to explicitly pass a context `ctx` as the first argument of a process. ## Store branching @@ -72,18 +74,15 @@ goes wrong. The pattern of usage for a Context is as follows: needs to be done - the branch `ctx` is simply discarded. If successful, the changes made to the `CacheMultiStore` can be committed to the original `ctx.ms` via `Write()`. -For example, here is a snippet from the [`runTx`](./baseapp.md#runtx-and-runmsgs) function in -[`baseapp`](./baseapp.md): +For example, here is a snippet from the [`runTx`](./baseapp.md#runtx-antehandler-runmsgs-posthandler) function in [`baseapp`](./baseapp.md): ```go runMsgCtx, msCache := app.cacheTxContext(ctx, txBytes) result = app.runMsgs(runMsgCtx, msgs, mode) result.GasWanted = gasWanted - if mode != runTxModeDeliver { return result } - if result.IsOK() { msCache.Write() } diff --git a/docs/core/encoding.md b/docs/core/encoding.md index e7a9e330f048..968640145b79 100644 --- a/docs/core/encoding.md +++ b/docs/core/encoding.md @@ -1,5 +1,5 @@ # Encoding @@ -30,20 +30,20 @@ tree. For store encoding, protobuf definitions can exist for any type and will typically have an Amino-based "intermediary" type. Specifically, the protobuf-based type definition is used for serialization and persistence, whereas the Amino-based type -is used for business logic in the state-machine where they may converted back-n-forth. -Note, the Amino-based types may slowly be phased-out in the future so developers +is used for business logic in the state-machine where they may convert back-n-forth. +Note, the Amino-based types may slowly be phased-out in the future, so developers should take note to use the protobuf message definitions where possible. -In the `codec` package, there exists two core interfaces, `Marshaler` and `ProtoMarshaler`, +In the `codec` package, there exists two core interfaces, `BinaryCodec` and `JSONCodec`, where the former encapsulates the current Amino interface except it operates on types implementing the latter instead of generic `interface{}` types. -In addition, there exists two implementations of `Marshaler`. The first being +In addition, there exists two implementations of `Codec`. The first being `AminoCodec`, where both binary and JSON serialization is handled via Amino. The second being `ProtoCodec`, where both binary and JSON serialization is handled via Protobuf. -This means that modules may use Amino or Protobuf encoding but the types must +This means that modules may use Amino or Protobuf encoding, but the types must implement `ProtoMarshaler`. If modules wish to avoid implementing this interface for their types, they may use an Amino codec directly. @@ -109,13 +109,13 @@ the consensus engine accepts only transactions in the form of raw bytes. * The `TxEncoder` object performs the encoding. * The `TxDecoder` object performs the decoding. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc4/types/tx_msg.go#L83-L87 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/tx_msg.go#L72-L76 A standard implementation of both these objects can be found in the [`auth` module](../../x/auth/spec/README.md): -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc4/x/auth/tx/decoder.go ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/tx/decoder.go -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc4/x/auth/tx/encoder.go ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/tx/encoder.go See [ADR-020](../architecture/adr-020-protobuf-transaction-encoding.md) for details of how a transaction is encoded. @@ -134,7 +134,7 @@ message Profile { In this `Profile` example, we hardcoded `account` as a `BaseAccount`. However, there are several other types of [user accounts related to vesting](../../x/auth/spec/05_vesting.md), such as `BaseVestingAccount` or `ContinuousVestingAccount`. All of these accounts are different, but they all implement the `AccountI` interface. How would you create a `Profile` that allows all these types of accounts with an `account` field that accepts an `AccountI` interface? -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/auth/types/account.go#L307-L330 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/types/account.go#L301-L324 In [ADR-019](../architecture/adr-019-protobuf-state-encoding.md), it has been decided to use [`Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto)s to encode interfaces in protobuf. An `Any` contains an arbitrary serialized message as bytes, along with a URL that acts as a globally unique identifier for and resolves to that message's type. This strategy allows us to pack arbitrary Go types inside protobuf messages. Our new `Profile` then looks like: @@ -172,7 +172,7 @@ bz, err := cdc.Marshal(profile) jsonBz, err := cdc.MarshalJSON(profile) ``` -To summarize, to encode an interface, you must 1/ pack the interface into an `Any` and 2/ marshal the `Any`. For convenience, the Cosmos SDK provides a `MarshalInterface` method to bundle these two steps. Have a look at [a real-life example in the x/auth module](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/auth/keeper/keeper.go#L218-L221). +To summarize, to encode an interface, you must 1/ pack the interface into an `Any` and 2/ marshal the `Any`. For convenience, the Cosmos SDK provides a `MarshalInterface` method to bundle these two steps. Have a look at [a real-life example in the x/auth module](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/keeper/keeper.go#L230-L233). The reverse operation of retrieving the concrete Go type from inside an `Any`, called "unpacking", is done with the `GetCachedValue()` on `Any`. @@ -216,11 +216,11 @@ The above `Profile` example is a fictive example used for educational purposes. * the `AccountI` interface for encodinig different types of accounts (similar to the above example) in the x/auth query responses, * the `Evidencei` interface for encoding different types of evidences in the x/evidence module, * the `AuthorizationI` interface for encoding different types of x/authz authorizations, -* the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/x/staking/types/staking.pb.go#L306-L337) struct that contains information about a validator. +* the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/types/staking.pb.go#L306-L339) struct that contains information about a validator. A real-life example of encoding the pubkey as `Any` inside the Validator struct in x/staking is shown in the following example: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/staking/types/validator.go#L40-L61 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/types/validator.go#L40-L61 ## FAQ @@ -247,7 +247,7 @@ may simply migrate any existing types that are encoded and persisted via their concrete Amino codec to Protobuf (see 1. for further guidelines) and accept a `Marshaler` as the codec which is implemented via the `ProtoCodec` without any further customization. -However, if a module type composes an interface, it must wrap it in the `skd.Any` (from `/types` package) type. To do that, a module-level .proto file must use [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto) for respective message type interface types. +However, if a module type composes an interface, it must wrap it in the `sdk.Any` (from `/types` package) type. To do that, a module-level .proto file must use [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto) for respective message type interface types. For example, in the `x/evidence` module defines an `Evidence` interface, which is used by the `MsgSubmitEvidence`. The structure definition must use `sdk.Any` to wrap the evidence file. In the proto file we define it as follows: @@ -262,9 +262,9 @@ message MsgSubmitEvidence { The Cosmos SDK `codec.Codec` interface provides support methods `MarshalInterface` and `UnmarshalInterface` to easy encoding of state to `Any`. -Module should register interfaces using `InterfaceRegistry` which provides a mechanism for registering interfaces: `RegisterInterface(protoName string, iface interface{})` and implementations: `RegisterImplementations(iface interface{}, impls ...proto.Message)` that can be safely unpacked from Any, similarly to type registration with Amino: +Module should register interfaces using `InterfaceRegistry` which provides a mechanism for registering interfaces: `RegisterInterface(protoName string, iface interface{}, impls ...proto.Message)` and implementations: `RegisterImplementations(iface interface{}, impls ...proto.Message)` that can be safely unpacked from Any, similarly to type registration with Amino: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc4/codec/types/interface_registry.go#L25-L66 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/codec/types/interface_registry.go#L25-L55 In addition, an `UnpackInterfaces` phase should be introduced to deserialization to unpack interfaces before they're needed. Protobuf types that contain a protobuf `Any` either directly or via one of their members should implement the `UnpackInterfacesMessage` interface: diff --git a/docs/core/events.md b/docs/core/events.md index 62362a6ded99..63893e1fb5b9 100644 --- a/docs/core/events.md +++ b/docs/core/events.md @@ -1,5 +1,5 @@ # Events @@ -11,12 +11,12 @@ order: 10 * [Anatomy of a Cosmos SDK application](../basics/app-anatomy.md) {prereq} * [Tendermint Documentation on Events](https://docs.tendermint.com/master/spec/abci/abci.html#events) {prereq} -## Events +## Typed Events Events are implemented in the Cosmos SDK as an alias of the ABCI `Event` type and take the form of: `{eventType}.{attributeKey}={attributeValue}`. -+++ https://github.com/tendermint/tendermint/blob/v0.34.8/proto/tendermint/abci/types.proto#L304-L313 ++++ https://github.com/tendermint/tendermint/blob/v0.35.4/proto/tendermint/abci/types.proto#L273-L279 An Event contains: @@ -27,12 +27,14 @@ An Event contains: To parse the attribute values as strings, make sure to add `'` (single quotes) around each attribute value. ::: -Events, the `type` and `attributes` are defined on a **per-module basis** in the module's -`/types/events.go` file, and triggered from the module's Protobuf [`Msg` service](../building-modules/msg-services.md) -by using the [`EventManager`](#eventmanager). In addition, each module documents its Events under -`spec/xx_events.md`. +_Typed Events_ are Protobuf-defined [messages](../architecture/adr-032-typed-events.md) used by the Cosmos SDK +for emitting and querying Events. They are defined in a `event.proto` file, on a **per-module basis**. +They are triggered from the module's Protobuf [`Msg` service](../building-modules/msg-services.md) +by using the [`EventManager`](#eventmanager), where they are read as `proto.Message`. -Events are returned to the underlying consensus engine in the response of the following ABCI messages: +In addition, each module documents its Events under `spec/xx_events.md`. + +Lastly, Events are returned to the underlying consensus engine in the response of the following ABCI messages: * [`BeginBlock`](./baseapp.md#beginblock) * [`EndBlock`](./baseapp.md#endblock) @@ -57,23 +59,19 @@ In Cosmos SDK applications, Events are managed by an abstraction called the `Eve Internally, the `EventManager` tracks a list of Events for the entire execution flow of a transaction or `BeginBlock`/`EndBlock`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/types/events.go#L17-L25 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/events.go#L17-L25 The `EventManager` comes with a set of useful methods to manage Events. The method -that is used most by module and application developers is `EmitEvent` that tracks +that is used most by module and application developers is `EmitTypedEvent` that tracks an Event in the `EventManager`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/types/events.go#L33-L37 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/events.go#L50-L59 -Module developers should handle Event emission via the `EventManager#EmitEvent` in each message +Module developers should handle Event emission via the `EventManager#EmitTypedEvent` in each message `Handler` and in each `BeginBlock`/`EndBlock` handler. The `EventManager` is accessed via -the [`Context`](./context.md), where Event emission generally follows this pattern: +the [`Context`](./context.md), where Event should be already registered, and emitted like this: -```go -ctx.EventManager().EmitEvent( - sdk.NewEvent(eventType, sdk.NewAttribute(attributeKey, attributeValue)), -) -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/keeper/msg_server.go#L89-L92 Module's `handler` function should also set a new `EventManager` to the `context` to isolate emitted Events per `message`: @@ -109,9 +107,11 @@ The main `eventCategory` you can subscribe to are: * `ValidatorSetUpdates`: Contains validator set updates for the block. These Events are triggered from the `state` package after a block is committed. You can get the -full list of Event categories [on the Tendermint Godoc page](https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants). +full list of Event categories [on the Tendermint Go documentation](https://pkg.go.dev/github.com/tendermint/tendermint/types#pkg-constants). -The `type` and `attribute` value of the `query` allow you to filter the specific Event you are looking for. For example, a `transfer` transaction triggers an Event of type `Transfer` and has `Recipient` and `Sender` as `attributes` (as defined in the [`events.go` file of the `bank` module](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/x/bank/types/events.go)). Subscribing to this Event would be done like so: +The `type` and `attribute` value of the `query` allow you to filter the specific Event you are looking for. For example, a `Mint` transaction triggers an Event of type `EventMint` and has an `Id` and an `Owner` as `attributes` (as defined in the [`events.proto` file of the `NFT` module](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/nft/v1beta1/event.proto#L14-L19)). + +Subscribing to this Event would be done like so: ```json { @@ -119,18 +119,20 @@ The `type` and `attribute` value of the `query` allow you to filter the specific "method": "subscribe", "id": "0", "params": { - "query": "tm.event='Tx' AND transfer.sender='senderAddress'" + "query": "tm.event='Tx' AND mint.owner='ownerAddress'" } } ``` -where `senderAddress` is an address following the [`AccAddress`](../basics/accounts.md#addresses) format. +where `ownerAddress` is an address following the [`AccAddress`](../basics/accounts.md#addresses) format. + +## Events (Deprecated) -## Typed Events (coming soon) +Previously, the Cosmos SDK supported emitting Events that were defined in `types/events.go`. It is the responsibility of the module developer to define Event types and Event attributes. Except in the `spec/XX_events.md` file, these Event types and attributes are unfortunately not easily discoverable, -As previously described, Events are defined on a per-module basis. It is the responsibility of the module developer to define Event types and Event attributes. Except in the `spec/XX_events.md` file, these Event types and attributes are unfortunately not easily discoverable, so the Cosmos SDK proposes to use Protobuf-defined [Typed Events](../architecture/adr-032-typed-events.md) for emitting and querying Events. +This is why this methods as been deprecated, and replaced by _[Typed Events](#typed-events). -The Typed Events proposal has not yet been fully implemented. Documentation is not yet available. +To learn more about the previous way of defining events, please refer to the [previous SDK documentation](https://docs.cosmos.network/v0.45/core/events.html#events-2). ## Next {hide} diff --git a/docs/core/grpc_rest.md b/docs/core/grpc_rest.md index 5052f64cfa33..afbeb9c6fbc1 100644 --- a/docs/core/grpc_rest.md +++ b/docs/core/grpc_rest.md @@ -1,5 +1,5 @@ # gRPC, REST, and Tendermint Endpoints @@ -20,23 +20,11 @@ The node also exposes some other endpoints, such as the Tendermint P2P endpoint, ## gRPC Server -::: warning -A patch introduced in `go-grpc v1.34.0` made gRPC incompatible with the `gogoproto` library, making some [gRPC queries](https://github.com/cosmos/cosmos-sdk/issues/8426) panic. As such, the Cosmos SDK requires that `go-grpc <=v1.33.2` is installed in your `go.mod`. - -To make sure that gRPC is working properly, it is **highly recommended** to add the following line in your application's `go.mod`: - -```go -replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 -``` - -Please see [issue #8392](https://github.com/cosmos/cosmos-sdk/issues/8392) for more info. -::: - -Cosmos SDK v0.40 introduced Protobuf as the main [encoding](./encoding) library, and this brings a wide range of Protobuf-based tools that can be plugged into the Cosmos SDK. One such tool is [gRPC](https://grpc.io), a modern open source high performance RPC framework that has decent client support in several languages. +In the Cosmos SDK, Protobuf is the main [encoding](./encoding) library. This brings a wide range of Protobuf-based tools that can be plugged into the Cosmos SDK. One such tool is [gRPC](https://grpc.io), a modern open-source high performance RPC framework that has decent client support in several languages. Each module exposes a [Protobuf `Query` service](../building-modules/messages-and-queries.md#queries) that defines state queries. The `Query` services and a transaction service used to broadcast transactions are hooked up to the gRPC server via the following function inside the application: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-rc0/server/types/app.go#L39-L41 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/types/app.go#L45-L47 Note: It is not possible to expose any [Protobuf `Msg` service](../building-modules/messages-and-queries.md#messages) endpoints via gRPC. Transactions must be generated and signed using the CLI or programmatically before they can be broadcasted using gRPC. See [Generating, Signing, and Broadcasting Transactions](../run-node/txs.html) for more information. @@ -51,7 +39,7 @@ The `grpc.Server` is a concrete gRPC server, which spawns and serves all gRPC qu Once the gRPC server is started, you can send requests to it using a gRPC client. Some examples are given in our [Interact with the Node](../run-node/interact-node.md#using-grpc) tutorial. -An overview of all available gRPC endpoints shipped with the Cosmos SDK is [Protobuf documention](https://buf.build/cosmos/cosmos-sdk). +An overview of all available gRPC endpoints shipped with the Cosmos SDK is [Protobuf documentation](https://buf.build/cosmos/cosmos-sdk). ## REST Server @@ -69,7 +57,7 @@ If, for various reasons, you cannot use gRPC (for example, you are building a we [gRPC-gateway](https://grpc-ecosystem.github.io/grpc-gateway/) is a tool to expose gRPC endpoints as REST endpoints. For each gRPC endpoint defined in a Protobuf `Query` service, the Cosmos SDK offers a REST equivalent. For instance, querying a balance could be done via the `/cosmos.bank.v1beta1.QueryAllBalances` gRPC endpoint, or alternatively via the gRPC-gateway `"/cosmos/bank/v1beta1/balances/{address}"` REST endpoint: both will return the same result. For each RPC method defined in a Protobuf `Query` service, the corresponding REST endpoint is defined as an option: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/proto/cosmos/bank/v1beta1/query.proto#L19-L22 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/bank/v1beta1/query.proto#L19-L22 For application developers, gRPC-gateway REST routes needs to be wired up to the REST server, this is done by calling the `RegisterGRPCGatewayRoutes` function on the ModuleManager. @@ -79,7 +67,8 @@ A [Swagger](https://swagger.io/) (or OpenAPIv2) specification file is exposed un Enabling the `/swagger` endpoint is configurable inside `~/.simapp/config/app.toml` via the `api.swagger` field, which is set to true by default. -For application developers, you may want to generate your own Swagger definitions based on your custom modules. The Cosmos SDK's [Swagger generation script](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc4/scripts/protoc-swagger-gen.sh) is a good place to start. +For application developers, you may want to generate your own Swagger definitions based on your custom modules. +The Cosmos SDK's [Swagger generation script](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/scripts/protoc-swagger-gen.sh) is a good place to start. ## Tendermint RPC diff --git a/docs/core/middleware.md b/docs/core/middleware.md deleted file mode 100644 index 5cbdb18213ca..000000000000 --- a/docs/core/middleware.md +++ /dev/null @@ -1,153 +0,0 @@ - - -# Middlewares - -`Middlewares` are objects that the developer can create to add logic before or after the transaction handler in a composable manner. -{synopsis} - -## Pre-requisite Readings - -* [Anatomy of a Cosmos SDK Application](../basics/app-anatomy.md) {prereq} -* [Transactons](transactions.md) {prereq} - -## Middlewares - -The SDK Baseapp's implementation of ABCI CheckTx, DeliverTx, and Baseapp's own Simulate methods use a middleware-based design. Middlewares can add logic to be executed before or after a transaction handler execution. Middlewares are like an `antehandler` with the added feature of being able to add post-transaction handler execution. Middlewares allow us to solve use cases like transaction Tips and refund unused gas (issue [#2150](https://github.com/cosmos/cosmos-sdk/issues/2150)). - -### Type Definition - -The two following interfaces are the base of the middleware design, and are defined in types/tx: - -+++ https://github.com/cosmos/cosmos-sdk/blob/5491be27d02e796746bd78d3d08bd1b2a9b1deb2/types/tx/middleware.go#L62-L71 - -Where we define the following arguments and return types: - -+++ https://github.com/cosmos/cosmos-sdk/blob/5491be27d02e796746bd78d3d08bd1b2a9b1deb2/types/tx/middleware.go#L25-L60 - -BaseApp holds a reference to a `tx.Handler`, which will process the incoming transactions. It could be a simple `sdk.Msg` executor, but in practice, it will be defined as a middleware stack wrapping around the base `sdk.Msg` executor. - -```go -type BaseApp struct { - // other fields - txHandler tx.Handler -} -``` - -## Implementing a Middleware - -To implement a middleware is done simply by a Go function that takes as arguments and some parameters and returns a `tx.Middleware`. - -For example, we can create a Generic middleware. - -```go -// myTxHandler is the tx.Handler of this middleware. Note that it holds a -// reference to the next tx.Handler in the stack. -type myTxHandler struct { - // next is the next tx.Handler in the middleware stack. - next tx.Handler - // some other fields that are relevant to the middleware can be added here -} - -// NewMyMiddleware returns a middleware that does this and that. -func NewMyMiddleware(arg1, arg2) tx.Middleware { - return func (txh tx.Handler) tx.Handler { - return myTxHandler{ - next: txh, - // optionally, set arg1, arg2... if they are needed in the middleware - } - } -} - -// Assert myTxHandler is a tx.Handler. -var _ tx.Handler = myTxHandler{} -``` - -Next we need to implement the middleware [interface](#Type-Definition). - -```go -func (h myTxHandler) CheckTx(ctx context.Context, req Request, checkReq RequestcheckTx) (Response, ResponseCheckTx, error) { - // CheckTx specific pre-processing logic - - // run the next middleware - res, checkRes, err := txh.next.CheckTx(ctx, req, checkReq) - - // CheckTx specific post-processing logic - - return res, checkRes, err -} - -func (h myTxHandler) DeliverTx(ctx context.Context, req Request) (Response, error) { - // DeliverTx specific pre-processing logic - - // run the next middleware - res, err := txh.next.DeliverTx(ctx, tx, req) - - // DeliverTx specific post-processing logic - - return res, err -} - -func (h myTxHandler) SimulateTx(ctx context.Context, req Request) (Response, error) { - // SimulateTx specific pre-processing logic - - // run the next middleware - res, err := txh.next.SimulateTx(ctx, tx, req) - - // SimulateTx specific post-processing logic - - return res, err -} -``` - -### Composing Middlewares - -While BaseApp holds a reference to a `tx.Handler`, this `tx.Handler` itself is defined using a middleware stack. The Cosmos SDK exposes a base (i.e. innermost) `tx.Handler` called `RunMsgsTxHandler`, which executes messages. It holds a reference to the `MsgServiceRouter`, which is used to map each `sdk.Msg` to the correct module's `Msg` server handler. - -Then, the app developer can compose multiple middlewares on top of the base `tx.Handler`. Each middleware can run pre-and-post-processing logic around its next middleware, as described in the section above. Conceptually, as an example, given the middlewares `A`, `B`, and `C` and the base `tx.Handler` `H` the stack looks like: - -![Composing](baseapp_transaction-middleware.png) - -```text -A.pre - B.pre - C.pre - Handler # The base tx.handler, for example `RunMsgsTxHandler` - C.post - B.post -A.post -``` - -We define a `ComposeMiddlewares` function for composing middlewares. It takes the base handler as first argument, and middlewares in the "outer to inner" order. For the above stack, the final `tx.Handler` is: - -```go -txHandler := middleware.ComposeMiddlewares(H, A, B, C) -``` - -The middleware is set in BaseApp via its `SetTxHandler` setter: - -```go -// simapp/app.go - -txHandler := middleware.ComposeMiddlewares(...) -app.SetTxHandler(txHandler) -``` - -The app developer can define their own middlewares, or use the Cosmos SDK's pre-defined middlewares from `middleware.NewDefaultTxHandler()`. - -### Middlewares Maintained by the Cosmos SDK - -While the app developer can define and compose the middlewares of their choice, the Cosmos SDK provides a set of middlewares that caters to the ecosystem's most common use cases. These middlewares are: - -| Middleware | Description | -| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| RunMsgsTxHandler | This is the base `tx.Handler`. It replaces the old baseapp's `runMsgs`, and executes a transaction's `Msg`s. | -| TxDecoderMiddleware | This middleware takes in transaction raw bytes, and decodes them into a `sdk.Tx`. It replaces the `baseapp.txDecoder` field, so that BaseApp stays as thin as possible. Since most middlewares read the contents of the `sdk.Tx`, the TxDecoderMiddleware should be run first in the middelware stack. | -| {Antehandlers} | Each antehandler is converted to its own middleware. These middlewares perform signature verification, fee deductions and other validations on the incoming transaction. | -| IndexEventsTxMiddleware | This is a simple middleware that chooses which events to index in Tendermint. Replaces `baseapp.indexEvents` (which unfortunately still exists in baseapp too, because it's used to index Begin/EndBlock events) | -| RecoveryTxMiddleware | This index recovers from panics. It replaces baseapp.runTx's panic recovery described in [ADR-022](./adr-022-custom-panic-handling.md). | -| GasTxMiddleware | This replaces the [`Setup`](https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/setup.go) Antehandler. It sets a GasMeter on sdk.Context. Note that before, GasMeter was set on sdk.Context inside the antehandlers, and there was some mess around the fact that antehandlers had their own panic recovery system so that the GasMeter could be read by baseapp's recovery system. Now, this mess is all removed: one middleware sets GasMeter, another one handles recovery. | -| TipMiddleware | This pays for transaction fees using another denom than the native fee denom of the chain. [`docs`](tips.md) | -| SigGasConsumeMiddleware | SigGasConsumeMiddleware consumes parameter-defined amount of gas for each signature. | -| SigVerificationMiddleware | verifies all signatures for a tx and return an error if any are invalid | diff --git a/docs/core/node.md b/docs/core/node.md index a4693643ecf2..698fbf984dfe 100644 --- a/docs/core/node.md +++ b/docs/core/node.md @@ -1,5 +1,5 @@ # Node Client (Daemon) @@ -16,17 +16,17 @@ The full-node client of any Cosmos SDK application is built by running a `main` In general, developers will implement the `main.go` function with the following structure: -* First, an [`appCodec`](./encoding.md) is instantiated for the application. +* First, an [`encodingCodec`](./encoding.md) is instantiated for the application. * Then, the `config` is retrieved and config parameters are set. This mainly involves setting the Bech32 prefixes for [addresses](../basics/accounts.md#addresses). - +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/types/config.go#L13-L24 + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/config.go#L14-L29 * Using [cobra](https://github.com/spf13/cobra), the root command of the full-node client is created. After that, all the custom commands of the application are added using the `AddCommand()` method of `rootCmd`. * Add default server commands to `rootCmd` using the `server.AddCommands()` method. These commands are separated from the ones added above since they are standard and defined at Cosmos SDK level. They should be shared by all Cosmos SDK-based applications. They include the most important command: the [`start` command](#start-command). * Prepare and execute the `executor`. - +++ https://github.com/tendermint/tendermint/blob/v0.34.0-rc6/libs/cli/setup.go#L74-L78 + +++ https://github.com/tendermint/tendermint/blob/v0.35.4/libs/cli/setup.go#L74-L78 See an example of `main` function from the `simapp` application, the Cosmos SDK's application for demo purposes: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/simd/main.go ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/main.go ## `start` command @@ -46,24 +46,25 @@ The flow of the `start` command is pretty straightforward. First, it retrieves t With the `db`, the `start` command creates a new instance of the application using an `appCreator` function: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/server/start.go#L227-L228 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/start.go#L209-L209 Note that an `appCreator` is a function that fulfills the `AppCreator` signature: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/server/types/app.go#L48-L50 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/types/app.go#L57-L59 In practice, the [constructor of the application](../basics/app-anatomy.md#constructor-function) is passed as the `appCreator`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/simapp/simd/cmd/root.go#L170-L215 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/simd/cmd/root.go#L246-L295 -Then, the instance of `app` is used to instanciate a new Tendermint node: +Then, the instance of `app` is used to instantiate a new Tendermint node: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/server/start.go#L235-L244 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/start.go#L291-L294 -The Tendermint node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://github.com/tendermint/tendermint/blob/v0.34.0/abci/types/application.go#L7-L32) (given that `app` extends [`baseapp`](./baseapp.md)). As part of the `NewNode` method, Tendermint makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the Tendermint node. The difference between these two heights should always be negative or null. If it is strictly negative, `NewNode` will replay blocks until the height of the application reaches the height of the Tendermint node. Finally, if the height of the application is `0`, the Tendermint node will call [`InitChain`](./baseapp.md#initchain) on the application to initialize the state from the genesis file. +The Tendermint node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://github.com/tendermint/tendermint/blob/v0.35.4/abci/types/application.go#L7-L32) (given that `app` extends [`baseapp`](./baseapp.md)). As part of the `node.New` method, Tendermint makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the Tendermint node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the Tendermint node. Finally, if the height of the application is `0`, the Tendermint node will call [`InitChain`](./baseapp.md#initchain) on the application to initialize the state from the genesis file. -Once the Tendermint node is instanciated and in sync with the application, the node can be started: +Once the Tendermint node is instantiated and in sync with the application, the node can be started: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/server/start.go#L250-L252 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/server/start.go#L296-L298 Upon starting, the node will bootstrap its RPC and P2P server and start dialing peers. During handshake with its peers, if the node realizes they are ahead, it will query all the blocks sequentially in order to catch up. Then, it will wait for new block proposals and block signatures from validators in order to make progress. diff --git a/docs/core/ocap.md b/docs/core/ocap.md index dd3d40d7ea52..c4dec3106376 100644 --- a/docs/core/ocap.md +++ b/docs/core/ocap.md @@ -1,5 +1,5 @@ # Object-Capability Model @@ -65,10 +65,9 @@ value. The preferred method signature should take a copy instead. sumValue := externalModule.ComputeSumValue(*account) ``` -In the Cosmos SDK, you can see the application of this principle in the -gaia app. +In the Cosmos SDK, you can see the application of this principle in simapp. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.41.4/simapp/app.go#L249-L273 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L258-L283 The following diagram shows the current dependencies between keepers. diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index ba2a6f37c61d..8ea66828cf93 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -1,7 +1,7 @@ # Protobuf Documentation -This file has been replaced by [Cosmos-SDK Buf Proto-docs](https://buf.build/cosmos/cosmos-sdk/docs/main) +See [Cosmos-SDK Buf Proto-docs](https://buf.build/cosmos/cosmos-sdk/docs/main) diff --git a/docs/core/runtx_middleware.md b/docs/core/runtx_middleware.md index 32f7bb1ce882..8b39f127ec9a 100644 --- a/docs/core/runtx_middleware.md +++ b/docs/core/runtx_middleware.md @@ -1,24 +1,20 @@ # RunTx recovery middleware -`BaseApp.runTx()` function handles Golang panics that might occur during transactions execution, for example, keeper has faced an invalid state and paniced. +`BaseApp.runTx()` function handles Go panics that might occur during transactions execution, for example, keeper has faced an invalid state and paniced. Depending on the panic type different handler is used, for instance the default one prints an error log message. Recovery middleware is used to add custom panic recovery for Cosmos SDK application developers. -More context could be found in the corresponding [ADR-022](../architecture/adr-022-custom-panic-handling.md). - -Implementation could be found in the [recovery.go](https://github.com/cosmos/cosmos-sdk/tree/v0.46.0-alpha2/x/auth/middleware/recovery.go) file. +More context can found in the corresponding [ADR-022](../architecture/adr-022-custom-panic-handling.md) and the implementation in [recovery.go](https://github.com/cosmos/cosmos-sdk/tree/v0.46.0-rc1/baseapp/recovery.go). ## Interface -```go -type RecoveryHandtree/v0.46.0-alpha2 -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/baseapp/recovery.go#L11-L14 -`recoveryObj` is a return value for `recover()` function from the `buildin` Golang package. +`recoveryObj` is a return value for `recover()` function from the `buildin` Go package. **Contract:** diff --git a/docs/core/simulation.md b/docs/core/simulation.md index 68503d8af5f2..02befbeacf93 100644 --- a/docs/core/simulation.md +++ b/docs/core/simulation.md @@ -1,5 +1,5 @@ # Cosmos Blockchain Simulator @@ -7,8 +7,8 @@ order: 14 The Cosmos SDK offers a full fledged simulation framework to fuzz test every message defined by a module. -On the Cosmos SDK, this functionality is provided by the[`SimApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/app.go), which is a -`Baseapp` application that is used for running the [`simulation`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/x/simulation) module. +On the Cosmos SDK, this functionality is provided by the[`SimApp`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go), which is a +`Baseapp` application that is used for running the [`simulation`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/simulation) module. This module defines all the simulation logic as well as the operations for randomized parameters like accounts, balances etc. @@ -35,13 +35,13 @@ failure type: inconsistencies between the stores. * `AppSimulationAfterImport`: Queues two simulations together. The first one provides the app state (_i.e_ genesis) to the second. Useful to test software upgrades or hard-forks from a live chain. * `AppStateDeterminism`: Checks that all the nodes return the same values, in the same order. -* `BenchmarkInvariants`: Analysis of the performance of running all modules' invariants (_i.e_ sequentially runs a [benchmark](https://golang.org/pkg/testing/#hdr-Benchmarks) test). An invariant checks for +* `BenchmarkInvariants`: Analysis of the performance of running all modules' invariants (_i.e_ sequentially runs a [benchmark](https://pkg.go.dev/testing/#hdr-Benchmarks) test). An invariant checks for differences between the values that are on the store and the passive tracker. Eg: total coins held by accounts vs total supply tracker. * `FullAppSimulation`: General simulation mode. Runs the chain and the specified operations for a given number of blocks. Tests that there're no `panics` on the simulation. It does also run invariant checks on every `Period` but they are not benchmarked. Each simulation must receive a set of inputs (_i.e_ flags) such as the number of blocks that the simulation is run, seed, block size, etc. -Check the full list of flags [here](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/config.go#L32-L55). +Check the full list of flags [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/config.go#L32-L55). ## Simulator Modes @@ -53,7 +53,7 @@ In addition to the various inputs and commands, the simulator runs in three mode This mode is helpful for running simulations on a known state such as a live network export where a new (mostly likely breaking) version of the application needs to be tested. 3. From a `params.json` file where the initial state is pseudo-randomly generated but the module and simulation parameters can be provided manually. This allows for a more controlled and deterministic simulation setup while allowing the state space to still be pseudo-randomly simulated. - The list of available parameters are listed [here](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/x/simulation/params.go#L44-L52). + The list of available parameters are listed [here](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/config.go#L33-L57). ::: tip These modes are not mutually exclusive. So you can for example run a randomly @@ -63,7 +63,7 @@ generated genesis state (`1`) with manually generated simulation params (`3`). ## Usage This is a general example of how simulations are run. For more specific examples -check the Cosmos SDK [Makefile](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/Makefile#L251-L287). +check the Cosmos SDK [Makefile](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/Makefile#L263-L299). ```bash $ go test -mod=readonly github.com/cosmos/cosmos-sdk/simapp \ @@ -76,7 +76,7 @@ check the Cosmos SDK [Makefile](https://github.com/cosmos/cosmos-sdk/blob/v0.40. Here are some suggestions when encountering a simulation failure: -* Export the app state at the height were the failure was found. You can do this +* Export the app state at the height where the failure was found. You can do this by passing the `-ExportStatePath` flag to the simulator. * Use `-Verbose` logs. They could give you a better hint on all the operations involved. @@ -84,13 +84,13 @@ Here are some suggestions when encountering a simulation failure: frequently. * Print all the failed invariants at once with `-PrintAllInvariants`. * Try using another `-Seed`. If it can reproduce the same error and if it fails - sooner you will spend less time running the simulations. + sooner, you will spend less time running the simulations. * Reduce the `-NumBlocks` . How's the app state at the height previous to the failure? * Run invariants on every operation with `-SimulateEveryOperation`. _Note_: this will slow down your simulation **a lot**. * Try adding logs to operations that are not logged. You will have to define a - [Logger](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/x/staking/keeper/keeper.go#L66-L69) on your `Keeper`. + [Logger](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/keeper/keeper.go#L60-L63) on your `Keeper`. ## Use simulation in your Cosmos SDK-based application diff --git a/docs/core/store.md b/docs/core/store.md index 3a07815620de..b9f649b7f05a 100644 --- a/docs/core/store.md +++ b/docs/core/store.md @@ -1,5 +1,5 @@ # Store @@ -58,11 +58,11 @@ The Cosmos SDK comes with a large set of stores to persist the state of applicat At its very core, a Cosmos SDK `store` is an object that holds a `CacheWrapper` and has a `GetStoreType()` method: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L15-L18 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L16-L19 The `GetStoreType` is a simple method that returns the type of store, whereas a `CacheWrapper` is a simple interface that implements store read caching and write branching through `Write` method: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L240-L264 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L247-L277 Branching and cache is used ubiquitously in the Cosmos SDK and required to be implemented on every store type. A storage branch creates an isolated, ephemeral branch of a store that can be passed around and updated without affecting the main underlying store. This is used to trigger temporary state-transitions that may be reverted later should an error occur. Read more about it in [context](./context.md#Store-branching) @@ -70,11 +70,11 @@ Branching and cache is used ubiquitously in the Cosmos SDK and required to be im A commit store is a store that has the ability to commit changes made to the underlying tree or db. The Cosmos SDK differentiates simple stores from commit stores by extending the basic store interfaces with a `Committer`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L29-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L30-L34 The `Committer` is an interface that defines methods to persist changes to disk: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L20-L27 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L21-L28 The `CommitID` is a deterministic commit of the state tree. Its hash is returned to the underlying consensus engine and stored in the block header. Note that commit store interfaces exist for various purposes, one of which is to make sure not every object can commit the store. As part of the [object-capabilities model](./ocap.md) of the Cosmos SDK, only `baseapp` should have the ability to commit stores. For example, this is the reason why the `ctx.KVStore()` method by which modules typically access stores returns a `KVStore` and not a `CommitKVStore`. @@ -86,7 +86,7 @@ The Cosmos SDK comes with many types of stores, the most used being [`CommitMult Each Cosmos SDK application holds a multistore at its root to persist its state. The multistore is a store of `KVStores` that follows the `Multistore` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L104-L133 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L97-L133 If tracing is enabled, then branching the multistore will firstly wrap all the underlying `KVStore` in [`TraceKv.Store`](#tracekv-store). @@ -94,19 +94,19 @@ If tracing is enabled, then branching the multistore will firstly wrap all the u The main type of `Multistore` used in the Cosmos SDK is `CommitMultiStore`, which is an extension of the `Multistore` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L141-L184 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L141-L187 As for concrete implementation, the [`rootMulti.Store`] is the go-to implementation of the `CommitMultiStore` interface. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/rootmulti/store.go#L43-L61 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/rootmulti/store.go#L38-L61 The `rootMulti.Store` is a base-layer multistore built around a `db` on top of which multiple `KVStores` can be mounted, and is the default multistore store used in [`baseapp`](./baseapp.md). ### CacheMultiStore -Whenever the `rootMulti.Store` needs to be branched, a [`cachemulti.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/store/cachemulti/store.go) is used. +Whenever the `rootMulti.Store` needs to be branched, a [`cachemulti.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/cachemulti/store.go) is used. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/cachemulti/store.go#L17-L28 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/cachemulti/store.go#L20-L36 `cachemulti.Store` branches all substores (creates a virtual store for each substore) in its constructor and hold them in `Store.stores`. Moreover caches all read queries. `Store.GetKVStore()` returns the store from `Store.stores`, and `Store.Write()` recursively calls `CacheWrap.Write()` on all the substores. @@ -120,31 +120,31 @@ Individual `KVStore`s are used by modules to manage a subset of the global state `CommitKVStore`s are declared by proxy of their respective `key` and mounted on the application's [multistore](#multistore) in the [main application file](../basics/app-anatomy.md#core-application-file). In the same file, the `key` is also passed to the module's `keeper` that is responsible for managing the store. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/store.go#L189-L219 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/store.go#L192-L226 -Apart from the traditional `Get` and `Set` methods, a `KVStore` must provide an `Iterator(start, end)` method which returns an `Iterator` object. It is used to iterate over a range of keys, typically keys that share a common prefix. Below is an example from the bank's module keeper, used to iterate over all account balances: +Apart from the traditional `Get` and `Set` methods, that a `KVStore` must implement via the `BasicKVStore` interface; a `KVStore` must provide an `Iterator(start, end)` method which returns an `Iterator` object. It is used to iterate over a range of keys, typically keys that share a common prefix. Below is an example from the bank's module keeper, used to iterate over all account balances: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/x/bank/keeper/view.go#L115-L134 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/keeper/view.go#L114-L132 ### `IAVL` Store The default implementation of `KVStore` and `CommitKVStore` used in `baseapp` is the `iavl.Store`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/iavl/store.go#L37-L40 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/iavl/store.go#L37-L40 -`iavl` stores are based around an [IAVL Tree](https://github.com/tendermint/iavl), a self-balancing binary tree which guarantees that: +`iavl` stores are based around an [IAVL Tree](https://github.com/cosmos/iavl), a self-balancing binary tree which guarantees that: * `Get` and `Set` operations are O(log n), where n is the number of elements in the tree. * Iteration efficiently returns the sorted elements within the range. * Each tree version is immutable and can be retrieved even after a commit (depending on the pruning settings). -The documentation on the IAVL Tree is located [here](https://github.com/cosmos/iavl/blob/v0.15.0-rc5/docs/overview.md). +The documentation on the IAVL Tree is located [here](https://github.com/cosmos/iavl/blob/master/docs/overview.md). ### `DbAdapter` Store `dbadapter.Store` is a adapter for `dbm.DB` making it fulfilling the `KVStore` interface. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/dbadapter/store.go#L13-L16 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/dbadapter/store.go#L14-L17 `dbadapter.Store` embeds `dbm.DB`, meaning most of the `KVStore` interface functions are implemented. The other functions (mostly miscellaneous) are manually implemented. This store is primarily used within [Transient Stores](#transient-stores) @@ -152,17 +152,17 @@ The documentation on the IAVL Tree is located [here](https://github.com/cosmos/i `Transient.Store` is a base-layer `KVStore` which is automatically discarded at the end of the block. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/transient/store.go#L13-L16 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/transient/store.go#L16-L19 `Transient.Store` is a `dbadapter.Store` with a `dbm.NewMemDB()`. All `KVStore` methods are reused. When `Store.Commit()` is called, a new `dbadapter.Store` is assigned, discarding previous reference and making it garbage collected. This type of store is useful to persist information that is only relevant per-block. One example would be to store parameter changes (i.e. a bool set to `true` if a parameter changed in a block). -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/x/params/types/subspace.go#L20-L30 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/params/types/subspace.go#L21-L31 Transient stores are typically accessed via the [`context`](./context.md) via the `TransientStore()` method: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/types/context.go#L232-L235 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/context.go#L264-L267 ## KVStore Wrappers @@ -170,7 +170,7 @@ Transient stores are typically accessed via the [`context`](./context.md) via th `cachekv.Store` is a wrapper `KVStore` which provides buffered writing / cached reading functionalities over the underlying `KVStore`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/cachekv/store.go#L27-L34 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/cachekv/store.go#L27-L35 This is the type used whenever an IAVL Store needs to be branched to create an isolated store (typically when we need to mutate a state that might be reverted later). @@ -188,27 +188,27 @@ This is the type used whenever an IAVL Store needs to be branched to create an i ### `GasKv` Store -Cosmos SDK applications use [`gas`](../basics/gas-fees.md) to track resources usage and prevent spam. [`GasKv.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/gaskv/store.go) is a `KVStore` wrapper that enables automatic gas consumption each time a read or write to the store is made. It is the solution of choice to track storage usage in Cosmos SDK applications. +Cosmos SDK applications use [`gas`](../basics/gas-fees.md) to track resources usage and prevent spam. [`GasKv.Store`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/gaskv/store.go) is a `KVStore` wrapper that enables automatic gas consumption each time a read or write to the store is made. It is the solution of choice to track storage usage in Cosmos SDK applications. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/gaskv/store.go#L13-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/gaskv/store.go#L11-L17 When methods of the parent `KVStore` are called, `GasKv.Store` automatically consumes appropriate amount of gas depending on the `Store.gasConfig`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/gas.go#L153-L162 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/gas.go#L219-L228 By default, all `KVStores` are wrapped in `GasKv.Stores` when retrieved. This is done in the `KVStore()` method of the [`context`](./context.md): -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/types/context.go#L227-L230 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/context.go#L259-L262 In this case, the default gas configuration is used: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/types/gas.go#L164-L175 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/types/gas.go#L230-L241 ### `TraceKv` Store `tracekv.Store` is a wrapper `KVStore` which provides operation tracing functionalities over the underlying `KVStore`. It is applied automatically by the Cosmos SDK on all `KVStore` if tracing is enabled on the parent `MultiStore`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/tracekv/store.go#L20-L43 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/tracekv/store.go#L20-L43 When each `KVStore` methods are called, `tracekv.Store` automatically logs `traceOperation` to the `Store.writer`. `traceOperation.Metadata` is filled with `Store.context` when it is not nil. `TraceContext` is a `map[string]interface{}`. @@ -216,7 +216,7 @@ When each `KVStore` methods are called, `tracekv.Store` automatically logs `trac `prefix.Store` is a wrapper `KVStore` which provides automatic key-prefixing functionalities over the underlying `KVStore`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/store/prefix/store.go#L15-L21 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/prefix/store.go#L16-L22 When `Store.{Get, Set}()` is called, the store forwards the call to its parent, with the key prefixed with the `Store.prefix`. @@ -226,9 +226,9 @@ When `Store.Iterator()` is called, it does not simply prefix the `Store.prefix`, `listenkv.Store` is a wrapper `KVStore` which provides state listening capabilities over the underlying `KVStore`. It is applied automatically by the Cosmos SDK on any `KVStore` whose `StoreKey` is specified during state streaming configuration. -Additional information about state streaming configuration can be found in the [store/streaming/README.md](https://github.com/cosmos/cosmos-sdk/tree/v0.46.0-alpha2/store/streaming). +Additional information about state streaming configuration can be found in the [store/streaming/README.md](https://github.com/cosmos/cosmos-sdk/tree/v0.46.0-rc1/store/streaming). -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.44.1/store/listenkv/store.go#L11-L18 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/store/listenkv/store.go#L11-L18 When `KVStore.Set` or `KVStore.Delete` methods are called, `listenkv.Store` automatically writes the operations to the set of `Store.listeners`. diff --git a/docs/core/telemetry.md b/docs/core/telemetry.md index 3c312c7fa322..c95fac283a68 100644 --- a/docs/core/telemetry.md +++ b/docs/core/telemetry.md @@ -1,5 +1,5 @@ # Telemetry @@ -7,16 +7,17 @@ order: 11 Gather relevant insights about your application and modules with custom metrics and telemetry. {synopsis} The Cosmos SDK enables operators and developers to gain insight into the performance and behavior of -their application through the use of the `telemetry` package. The Cosmos SDK currently supports -enabling in-memory and prometheus as telemetry sinks. This allows the ability to query for and scrape -metrics from a single exposed API endpoint -- `/metrics?format={text|prometheus}`, the default being -`text`. +their application through the use of the `telemetry` package. To enable telemetrics, set `telemetry.enabled = true` in the app.toml config file. + +The Cosmos SDK currently supports enabling in-memory and prometheus as telemetry sinks. In-memory sink is always attached (when the telemetry is enabled) with 10 second interval and 1 minute retention. This means that metrics will be aggregated over 10 seconds, and metrics will be kept alive for 1 minute. + +To query active metrics (see retention note above) you have to enable API server (`api.enabled = true` in the app.toml). Single API endpoint is exposed: `http://localhost:1317/metrics?format={text|prometheus}`, the default being `text`. + +## Emitting metrics If telemetry is enabled via configuration, a single global metrics collector is registered via the [go-metrics](https://github.com/armon/go-metrics) library. This allows emitting and collecting -metrics through simple API calls. - -Example: +metrics through simple [API](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/telemetry/wrapper.go). Example: ```go func EndBlocker(ctx sdk.Context, k keeper.Keeper) { diff --git a/docs/core/tips.md b/docs/core/tips.md index 3765cc9f4452..1f7ef11b8c55 100644 --- a/docs/core/tips.md +++ b/docs/core/tips.md @@ -1,10 +1,10 @@ # Transaction Tips -Transaction tips are a mechanism to pay for transaction fees using another denom than the native fee denom of the chain. {synopsis} +Transaction tips are a mechanism to pay for transaction fees using another denom than the native fee denom of the chain. They are still in beta, and are not included by default in the SDK. {synopsis} ## Context @@ -14,27 +14,27 @@ Transaction tips is a new solution for cross-chain transaction fees payment, whe Assuming we have two chains, A and B, we define the following terms: -- **the tipper**: this is the initiator of the transaction, who wants to execute a `Msg` on chain A, but doesn't have any native chain A tokens, only chain B tokens. In our example above, the tipper is the Osmosis (chain B) user wanting to vote on a Cosmos Hub (chain A) proposal. -- **the fee payer**: this is the party that will relay and broadcast the final transaction on chain A, and has chain A tokens. The tipper doesn't need to trust the feepayer. -- **the target chain**: the chain where the `Msg` is executed, chain A in this case. +* **the tipper**: this is the initiator of the transaction, who wants to execute a `Msg` on chain A, but doesn't have any native chain A tokens, only chain B tokens. In our example above, the tipper is the Osmosis (chain B) user wanting to vote on a Cosmos Hub (chain A) proposal. +* **the fee payer**: this is the party that will relay and broadcast the final transaction on chain A, and has chain A tokens. The tipper doesn't need to trust the feepayer. +* **the target chain**: the chain where the `Msg` is executed, chain A in this case. ## Transaction Tips Flow -The transaction tips flow happens in multipe steps. +The transaction tips flow happens in multiple steps. 1. The tipper sends via IBC some chain B tokens to chain A. These tokens will cover for fees on the target chain A. This means that chain A's bank module holds some IBC tokens under the tipper's address. 2. The tipper drafts a transaction to be executed on the chain A. It can include chain A `Msg`s. However, instead of creating a normal transaction, they create the following `AuxSignerData` document: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-beta1/proto/cosmos/tx/v1beta1/tx.proto#L230-L249 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L230-L249 where we have defined `SignDocDirectAux` as: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-beta1/proto/cosmos/tx/v1beta1/tx.proto#L67-L93 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L67-L93 where `Tip` is defined as -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-beta1/proto/cosmos/tx/v1beta1/tx.proto#L219-L228 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L219-L228 Notice that this document doesn't sign over the final chain A fees. Instead, it includes a `Tip` field. It also doesn't include the whole `AuthInfo` object as in `SIGN_MODE_DIRECT`, only the minimum information needed by the tipper @@ -42,12 +42,12 @@ Notice that this document doesn't sign over the final chain A fees. Instead, it 4. From the signed `AuxSignerData` document, the fee payer constructs a transaction, using the following algorithm: -- use as `TxBody` the exact `AuxSignerData.SignDocDirectAux.body_bytes`, to not alter the original intent of the tipper, -- create an `AuthInfo` with: - - `AuthInfo.Tip` copied from `AuxSignerData.SignDocDirectAux.Tip`, - - `AuthInfo.Fee` chosen by the fee payer, which should cover for the transaction gas, but also be small enough so that the tip/fee exchange rate is economically interesting for the fee payer, - - `AuthInfo.SignerInfos` has two signers: the first signer is the tipper, using the public key, sequence and sign mode specified in `AuxSignerData`; and the second signer is the fee payer, using their favorite sign mode, -- a `Signatures` array with two items: the tipper's signature from `AuxSignerData.Sig`, and the final fee payer's signature. +* use as `TxBody` the exact `AuxSignerData.SignDocDirectAux.body_bytes`, to not alter the original intent of the tipper, +* create an `AuthInfo` with: + * `AuthInfo.Tip` copied from `AuxSignerData.SignDocDirectAux.Tip`, + * `AuthInfo.Fee` chosen by the fee payer, which should cover for the transaction gas, but also be small enough so that the tip/fee exchange rate is economically interesting for the fee payer, + * `AuthInfo.SignerInfos` has two signers: the first signer is the tipper, using the public key, sequence and sign mode specified in `AuxSignerData`; and the second signer is the fee payer, using their favorite sign mode, +* a `Signatures` array with two items: the tipper's signature from `AuxSignerData.Sig`, and the final fee payer's signature. 5. Broadcast the final transaction signed by the two parties to the target chain. Once included, the Cosmos SDK will trigger a transfer of the `Tip` specified in the transaction from the tipper address to the fee payer address. @@ -63,42 +63,59 @@ In the future, we imagine a market where fee payers will compete to include tran As we mentioned in the flow above, the tipper signs over the `SignDocDirectAux`, and the fee payer signs over the whole final transaction. As such, both parties might use different sign modes. -- The tipper MUST use `SIGN_MODE_DIRECT_AUX` or `SIGN_MODE_LEGACY_AMINO_JSON`. That is because the tipper needs to sign over the body, the tip, but not the other signers' information and not over the fee (which is unknown to the tipper). -- The fee payer MUST use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. The fee payer signs over the whole transaction. +* The tipper MUST use `SIGN_MODE_DIRECT_AUX` or `SIGN_MODE_LEGACY_AMINO_JSON`. That is because the tipper needs to sign over the body, the tip, but not the other signers' information and not over the fee (which is unknown to the tipper). +* The fee payer MUST use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. The fee payer signs over the whole transaction. -For example, if the fee payers signs the whole transaction with `SIGN_MODE_DIRECT_AUX`, it will be rejected by the node, as that would introduce malleability issues (`SIGN_MODE_DIRECT_AUX` doesn't sign over fees). +For example, if the fee payer signs the whole transaction with `SIGN_MODE_DIRECT_AUX`, it will be rejected by the node, as that would introduce malleability issues (`SIGN_MODE_DIRECT_AUX` doesn't sign over fees). In both cases, using `SIGN_MODE_LEGACY_AMINO_JSON` is recommended only if hardware wallet signing is needed. ## Enabling Tips on your Chain -The transaction tips functionality is introduced in Cosmos SDK v0.46, so earlier versions do not have support for tips. If you're using v0.46 or later, then enabling tips on your chain is as simple as adding the `TipMiddleware` in your middleware stack: +The transaction tips functionality is introduced in Cosmos SDK v0.46, so earlier versions do not have support for tips. It is however not included by default in a v0.46 app. Sending a transaction with tips to a chain which didn't enable tips will result in a no-op, i.e. the `tip` field in the transaction will be ignored. + +Enabling tips on a chain is done by adding the `TipDecorator` in the posthandler chain: ```go -// NewTxHandler defines a TxHandler middleware stack. -func NewTxHandler(options TxHandlerOptions) (tx.Handler, error) { - // --snip-- - - return ComposeMiddlewares( - // base tx handler that executes Msgs - NewRunMsgsTxHandler(options.MsgServiceRouter, options.LegacyRouter), - // --snip other middlewares-- - - // Add the TipMiddleware - NewTipMiddleware(options.BankKeeper), - ) +// HandlerOptions are the options required for constructing a SDK PostHandler which supports tips. +type HandlerOptions struct { + BankKeeper types.BankKeeper } -``` -Notice that `NewTipMiddleware` needs a reference to the BankKeeper, for transferring the tip to the fee payer. +// MyPostHandler returns a posthandler chain with the TipDecorator. +func MyPostHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if options.BankKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for posthandler") + } + + postDecorators := []sdk.AnteDecorator{ + posthandler.NewTipDecorator(options.bankKeeper), + } + + return sdk.ChainAnteDecorators(postDecorators...), nil +} + +func (app *SimApp) setPostHandler() { + postHandler, err := MyPostHandler( + HandlerOptions{ + BankKeeper: app.BankKeeper, + }, + ) + if err != nil { + panic(err) + } + + app.SetPostHandler(postHandler) +} +``` -If you are using the Cosmos SDK's default middleware stack `NewDefaultTxHandler()`, then the tip middleware is included by default. +Notice that `NewTipDecorator` needs a reference to the BankKeeper, for transferring the tip to the fee payer. ## CLI Usage The Cosmos SDK also provides some CLI tooling for the transaction tips flow, both for the tipper and for the feepayer. -For the tipper, the CLI `tx` subcommand has two new flags: `--aux` and `--tip`. The `--aux` flag is used to denote that we are creating a `AuxSignerData` instead of a , and the `--tip` is used to populate its `Tip` field. +For the tipper, the CLI `tx` subcommand has two new flags: `--aux` and `--tip`. The `--aux` flag is used to denote that we are creating an `AuxSignerData` instead of a `Tx`, and the `--tip` is used to populate its `Tip` field. ```bash $ simd tx gov vote 16 yes --from --aux --tip 50ibcdenom @@ -110,7 +127,7 @@ $ simd tx gov vote 16 yes --from --aux --tip 50ibcdenom It is useful to pipe the JSON output to a file, `> aux_signed_tx.json` -For the fee payer, the Cosmos SDK added a `tx aux-to-fee` subcommand to include a `AuxSignerData` into a transaction, add fees to it, and broadcast it. +For the fee payer, the Cosmos SDK added a `tx aux-to-fee` subcommand to include an `AuxSignerData` into a transaction, add fees to it, and broadcast it. ```bash $ simd tx aux-to-fee aux_signed_tx.json --from --fees 30atom @@ -135,7 +152,7 @@ For both commands, the flag `--sign-mode=amino-json` is still available for hard ## Programmatic Usage -For the tipper, the SDK exposes a new transaction builder, the `AuxTxBuilder`, for generating an `AuxSignerData`. The API of `AuxTxBuilder` is defined [in `client/tx`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-beta1/client/tx/aux_builder.go#L16), and can be used as follows: +For the tipper, the SDK exposes a new transaction builder, the `AuxTxBuilder`, for generating an `AuxSignerData`. The API of `AuxTxBuilder` is defined [in `client/tx`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/tx/aux_builder.go#L16), and can be used as follows: ```go // Note: there's no need to use clientCtx.TxConfig anymore. @@ -170,7 +187,7 @@ For the fee payer, the SDK added a new method on the existing `TxBuilder` to imp txBuilder := clientCtx.TxConfig.NewTxBuilder() err := txBuilder.AddAuxSignerData(auxSignerData) if err != nil { - return err + return err } // A lot of fields will be populated in txBuilder, such as its Msgs, tip @@ -184,6 +201,6 @@ txBuilder.SetGasLimit(...) // Usual signing code err = authclient.SignTx(...) if err != nil { - return err + return err } ``` diff --git a/docs/core/transactions.md b/docs/core/transactions.md index ca146e81d706..a0aabc3acee5 100644 --- a/docs/core/transactions.md +++ b/docs/core/transactions.md @@ -20,12 +20,12 @@ When users want to interact with an application and make state changes (e.g. sen Transaction objects are Cosmos SDK types that implement the `Tx` interface -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/types/tx_msg.go#L49-L57 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/types/tx_msg.go#L38-L46 It contains the following methods: * **GetMsgs:** unwraps the transaction and returns a list of contained `sdk.Msg`s - one transaction may have one or multiple messages, which are defined by module developers. -* **ValidateBasic:** lightweight, [_stateless_](../basics/tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./baseapp.md#checktx) and [`DeliverTx`](./baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth) module's `StdTx` `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. Note that this function is to be distinct from `sdk.Msg` [`ValidateBasic`](../basics/tx-lifecycle.md#ValidateBasic) methods, which perform basic validity checks on messages only. When [`runTx`](./baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth/spec) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. +* **ValidateBasic:** lightweight, [_stateless_](../basics/tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./baseapp.md#checktx) and [`DeliverTx`](./baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) module's `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. Note that this function is to be distinct from `sdk.Msg` [`ValidateBasic`](../basics/tx-lifecycle.md#ValidateBasic) methods, which perform basic validity checks on messages only. When [`runTx`](./baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. As a developer, you should rarely manipulate `Tx` directly, as `Tx` is really an intermediate type used for transaction generation. Instead, developers should prefer the `TxBuilder` interface, which you can learn more about [below](#transaction-generation). @@ -37,29 +37,45 @@ Every message in a transaction must be signed by the addresses specified by its The most used implementation of the `Tx` interface is the Protobuf `Tx` message, which is used in `SIGN_MODE_DIRECT`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/proto/cosmos/tx/v1beta1/tx.proto#L12-L25 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L13-L26 Because Protobuf serialization is not deterministic, the Cosmos SDK uses an additional `TxRaw` type to denote the pinned bytes over which a transaction is signed. Any user can generate a valid `body` and `auth_info` for a transaction, and serialize these two messages using Protobuf. `TxRaw` then pins the user's exact binary representation of `body` and `auth_info`, called respectively `body_bytes` and `auth_info_bytes`. The document that is signed by all signers of the transaction is `SignDoc` (deterministically serialized using [ADR-027](../architecture/adr-027-deterministic-protobuf-serialization.md)): -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/proto/cosmos/tx/v1beta1/tx.proto#L47-L64 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L48-L65 Once signed by all signers, the `body_bytes`, `auth_info_bytes` and `signatures` are gathered into `TxRaw`, whose serialized bytes are broadcasted over the network. #### `SIGN_MODE_LEGACY_AMINO_JSON` -The legacy implemention of the `Tx` interface is the `StdTx` struct from `x/auth`: +The legacy implementation of the `Tx` interface is the `StdTx` struct from `x/auth`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/x/auth/legacy/legacytx/stdtx.go#L120-L130 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/migrations/legacytx/stdtx.go#L82-L92 The document signed by all signers is `StdSignDoc`: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/x/auth/legacy/legacytx/stdsign.go#L20-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/migrations/legacytx/stdsign.go#L38-L52 which is encoded into bytes using Amino JSON. Once all signatures are gathered into `StdTx`, `StdTx` is serialized using Amino JSON, and these bytes are broadcasted over the network. #### Other Sign Modes -Other sign modes, most notably `SIGN_MODE_TEXTUAL`, are being discussed. If you wish to learn more about them, please refer to [ADR-020](../architecture/adr-020-protobuf-transaction-encoding.md). +The Cosmos SDK also provides a couple of other sign modes for particular use cases. + +#### `SIGN_MODE_DIRECT_AUX` + +`SIGN_MODE_DIRECT_AUX` is a sign mode released in the Cosmos SDK v0.46 which targets transactions with multiple signers. Whereas `SIGN_MODE_DIRECT` expects each signer to sign over both `TxBody` and `AuthInfo` (which includes all other signers' signer infos, i.e. their account sequence, public key and mode info), `SIGN_MODE_DIRECT_AUX` allows N-1 signers to only sign over `TxBody` and _their own_ signer info. Morever, each auxiliary signer (i.e. a signer using `SIGN_MODE_DIRECT_AUX`) doesn't +need to sign over the fees: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L67-L93 + +The use case is a multi-signer transaction, where one of the signers is appointed to gather all signatures, broadcast the signature and pay for fees, and the others only care about the transaction body. This generally allows for a better multi-signing UX. If Alice, Bob and Charlie are part of a 3-signer transaction, then Alice and Bob can both use `SIGN_MODE_DIRECT_AUX` to sign over the `TxBody` and their own signer info (no need an additional step to gather other signers' ones, like in `SIGN_MODE_DIRECT`), without specifying a fee in their SignDoc. Charlie can then gather both signatures from Alice and Bob, and +create the final transaction by appending a fee. Note that the fee payer of the transaction (in our case Charlie) must sign over the fees, so must use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. + +A concrete use case is implemented in [transaction tips](./tips.md): the tipper may use `SIGN_MODE_DIRECT_AUX` to specify a tip in the transaction, without signing over the actual transaction fees. Then, the fee payer appends fees inside the tipper's desired `TxBody`, and as an exchange for paying the fees and broadcasting the transaction, receives the tipper's transaction tips as payment. + +#### `SIGN_MODE_TEXTUAL` + +`SIGN_MODE_TEXTUAL` is a new sign mode for delivering a better signing experience on hardware wallets, it is currently still under implementation. If you wish to learn more, please refer to [ADR-050](https://github.com/cosmos/cosmos-sdk/pull/10701). ## Transaction Process @@ -74,12 +90,12 @@ The next paragraphs will describe each of these components, in this order. ### Messages ::: tip -Module `sdk.Msg`s are not to be confused with [ABCI Messages](https://tendermint.com/docs/spec/abci/abci.html#messages) which define interactions between the Tendermint and application layers. +Module `sdk.Msg`s are not to be confused with [ABCI Messages](https://docs.tendermint.com/master/spec/abci/abci.html#messages) which define interactions between the Tendermint and application layers. ::: **Messages** (or `sdk.Msg`s) are module-specific objects that trigger state transitions within the scope of the module they belong to. Module developers define the messages for their module by adding methods to the Protobuf [`Msg` service](../building-modules/msg-services.md), and also implement the corresponding `MsgServer`. -Each `sdk.Msg`s is related to exactly one Protobuf [`Msg` service](../building-modules/msg-services.md) RPC, defined inside each module's `tx.proto` file. An SKD app router automatically maps every `sdk.Msg` to a corresponding RPC. Protobuf generates a `MsgServer` interface for each module `Msg` service, and the module developer needs to implement this interface. +Each `sdk.Msg`s is related to exactly one Protobuf [`Msg` service](../building-modules/msg-services.md) RPC, defined inside each module's `tx.proto` file. A SDK app router automatically maps every `sdk.Msg` to a corresponding RPC. Protobuf generates a `MsgServer` interface for each module `Msg` service, and the module developer needs to implement this interface. This design puts more responsibility on module developers, allowing application developers to reuse common functionalities without having to implement state transition logic repetitively. To learn more about Protobuf `Msg` services and how to implement `MsgServer`, click [here](../building-modules/msg-services.md). @@ -90,7 +106,7 @@ While messages contain the information for state transition logic, a transaction The `TxBuilder` interface contains data closely related with the generation of transactions, which an end-user can freely set to generate the desired transaction: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/client/tx_config.go#L32-L45 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/tx_config.go#L33-L50 * `Msg`s, the array of [messages](#messages) included in the transaction. * `GasLimit`, option chosen by the users for how to calculate how much gas they will need to pay. @@ -101,12 +117,12 @@ The `TxBuilder` interface contains data closely related with the generation of t As there are currently two sign modes for signing transactions, there are also two implementations of `TxBuilder`: -* [wrapper](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/x/auth/tx/builder.go#L19-L33) for creating transactions for `SIGN_MODE_DIRECT`, -* [StdTxBuilder](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/x/auth/legacy/legacytx/stdtx_builder.go#L14-L20) for `SIGN_MODE_LEGACY_AMINO_JSON`. +* [wrapper](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/tx/builder.go#L18-L34) for creating transactions for `SIGN_MODE_DIRECT`, +* [StdTxBuilder](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/migrations/legacytx/stdtx_builder.go#L15-L21) for `SIGN_MODE_LEGACY_AMINO_JSON`. However, the two implementation of `TxBuilder` should be hidden away from end-users, as they should prefer using the overarching `TxConfig` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/client/tx_config.go#L21-L30 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/tx_config.go#L22-L31 `TxConfig` is an app-wide configuration for managing transactions. Most importantly, it holds the information about whether to sign each transaction with `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. By calling `txBuilder := txConfig.NewTxBuilder()`, a new `TxBuilder` will be created with the appropriate sign mode. @@ -126,7 +142,7 @@ Once the transaction bytes are generated, there are currently three ways of broa #### CLI -Application developers create entrypoints to the application by creating a [command-line interface](../core/cli.md), [gRPC and/or REST interface](../core/grpc_rest.md), typically found in the application's `./cmd` folder. These interfaces allow users to interact with the application through command-line. +Application developers create entry points to the application by creating a [command-line interface](../core/cli.md), [gRPC and/or REST interface](../core/grpc_rest.md), typically found in the application's `./cmd` folder. These interfaces allow users to interact with the application through command-line. For the [command-line interface](../building-modules/module-interfaces.md#cli), module developers create subcommands to add as children to the application top-level transaction command `TxCmd`. CLI commands actually bundle all the steps of transaction processing into one simple command: creating messages, generating transactions and broadcasting. For concrete examples, see the [Interacting with a Node](../run-node/interact-node.md) section. An example transaction made using CLI looks like: @@ -136,9 +152,9 @@ simd tx send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake #### gRPC -[gRPC](https://grpc.io) is introduced in Cosmos SDK 0.40 as the main component for the Cosmos SDK's RPC layer. The principal usage of gRPC is in the context of modules' [`Query` services](../building-modules). However, the Cosmos SDK also exposes a few other module-agnostic gRPC services, one of them being the `Tx` service: +[gRPC](https://grpc.io) is the main component for the Cosmos SDK's RPC layer. Its principal usage is in the context of modules' [`Query` services](../building-modules). However, the Cosmos SDK also exposes a few other module-agnostic gRPC services, one of them being the `Tx` service: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/proto/cosmos/tx/v1beta1/service.proto ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/service.proto The `Tx` service exposes a handful of utility functions, such as simulating a transaction or querying a transaction, and also one method to broadcast transactions. diff --git a/docs/core/upgrade.md b/docs/core/upgrade.md index 2495bc515ee1..bcccd4717227 100644 --- a/docs/core/upgrade.md +++ b/docs/core/upgrade.md @@ -5,16 +5,16 @@ order: 15 # In-Place Store Migrations ::: warning -Read and understand all of the in-place store migration documentation before you run a migration on a live chain. +Read and understand all the in-place store migration documentation before you run a migration on a live chain. ::: Upgrade your app modules smoothly with custom in-place store migration logic. {synopsis} -The Cosmos SDK uses two methods to perform upgrades. +The Cosmos SDK uses two methods to perform upgrades: -* Exporting the entire application state to a JSON file using the `export` CLI command, making changes, and then starting a new binary with the changed JSON file as the genesis file. See [Chain Upgrade Guide to v0.42](https://docs.cosmos.network/v0.42/migrations/chain-upgrade-guide-040.html). +* Exporting the entire application state to a JSON file using the `export` CLI command, making changes, and then starting a new binary with the changed JSON file as the genesis file. -* Version v0.44 and later can perform upgrades in place to significantly decrease the upgrade time for chains with a larger state. Use the [Module Upgrade Guide](../building-modules/upgrade.md) to set up your application modules to take advantage of in-place upgrades. +* Perform upgrades in place, which significantly decrease the upgrade time for chains with a larger state. Use the [Module Upgrade Guide](../building-modules/upgrade.md) to set up your application modules to take advantage of in-place upgrades. This document provides steps to use the In-Place Store Migrations upgrade method. @@ -67,7 +67,7 @@ To learn more about configuring migration scripts for your modules, see the [Mod By default, all migrations are run in module name alphabetical ascending order, except `x/auth` which is run last. The reason is state dependencies between x/auth and other modules (you can read more in [issue #10606](https://github.com/cosmos/cosmos-sdk/issues/10606)). -If you want to change the order of migration then you should call `app.mm.SetOrderMigrations(module1, module2, ...)` in your app.go file. The function will panic if you forget to include a module in the argument list. +If you want to change the order of migration, then you should call `app.mm.SetOrderMigrations(module1, module2, ...)` in your app.go file. The function will panic if you forget to include a module in the argument list. ## Adding New Modules During Upgrades @@ -155,6 +155,6 @@ app.UpgradeKeeper.SetUpgradeHandler("my-plan", func(ctx sdk.Context, plan upgrad You can sync a full node to an existing blockchain which has been upgraded using Cosmovisor -In order to successfully sync, you must start with the initial binary that the blockchain started with at genesis. If all Software Upgrade Plans contain binary instruction then you can run Cosmovisor with auto download option to automatically handle downloading and switching to the binaries associated with each sequential upgrade. Otherwise you need to manually provide all binaries to Cosmovisor. +To successfully sync, you must start with the initial binary that the blockchain started with at genesis. If all Software Upgrade Plans contain binary instruction, then you can run Cosmovisor with auto-download option to automatically handle downloading and switching to the binaries associated with each sequential upgrade. Otherwise, you need to manually provide all binaries to Cosmovisor. To learn more about Cosmovisor, see the [Cosmovisor Quick Start](../run-node/cosmovisor.md). diff --git a/docs/ibc/README.md b/docs/ibc/README.md index 8be696391299..872e5c0dcfcc 100644 --- a/docs/ibc/README.md +++ b/docs/ibc/README.md @@ -1,20 +1,9 @@ # IBC -This repository contains reference documentation for the IBC protocol integration and concepts: - -1. [Overview](./overview.md) -2. [Integration](./integration.md) -3. [Customization](./custom.md) -4. [Relayer](./relayer.md) -5. [Governance Proposals](./proposals.md) - -**NOTE**: The IBC module has been moved to its [own repository](https://github.com/cosmos/ibc-go). - -After reading about IBC, head on to the [Building Modules -documentation](../building-modules/README.md) to learn more about the process of building modules. +See the official [`ibc-go` documentation](https://ibc.cosmos.network). diff --git a/docs/ibc/custom.md b/docs/ibc/custom.md deleted file mode 100644 index 1a5e0e306d2a..000000000000 --- a/docs/ibc/custom.md +++ /dev/null @@ -1,468 +0,0 @@ - - -# Customization - -Learn how to configure your application to use IBC and send data packets to other chains. {synopsis} - -This document serves as a guide for developers who want to write their own Inter-blockchain -Communication Protocol (IBC) applications for custom [use-cases](https://github.com/cosmos/ics/blob/master/ibc/4_IBC_USECASES.md). - -Due to the modular design of the IBC protocol, IBC -application developers do not need to concern themselves with the low-level details of clients, -connections, and proof verification. Nevertheless a brief explanation of the lower levels of the -stack is given so that application developers may have a high-level understanding of the IBC -protocol. Then the document goes into detail on the abstraction layer most relevant for application -developers (channels and ports), and describes how to define your own custom packets, and -`IBCModule` callbacks. - -To have your module interact over IBC you must: bind to a port(s), define your own packet data and acknolwedgement structs as well as how to encode/decode them, and implement the -`IBCModule` interface. Below is a more detailed explanation of how to write an IBC application -module correctly. - -## Pre-requisites Readings - -* [IBC Overview](./overview.md)) {prereq} -* [IBC default integration](./integration.md) {prereq} - -## Create a custom IBC application module - -### Implement `IBCModule` Interface and callbacks - -The Cosmos SDK expects all IBC modules to implement the [`IBCModule` -interface](https://github.com/cosmos/ibc-go/tree/main/modules/core/05-port/types/module.go). This -interface contains all of the callbacks IBC expects modules to implement. This section will describe -the callbacks that are called during channel handshake execution. - -Here are the channel handshake callbacks that modules are expected to implement: - -```go -// Called by IBC Handler on MsgOpenInit -func (k Keeper) OnChanOpenInit(ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - channelCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) error { - // OpenInit must claim the channelCapability that IBC passes into the callback - if err := k.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err - } - - // ... do custom initialization logic - - // Use above arguments to determine if we want to abort handshake - // Examples: Abort if order == UNORDERED, - // Abort if version is unsupported - err := checkArguments(args) - return err -} - -// Called by IBC Handler on MsgOpenTry -OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - channelCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version, - counterpartyVersion string, -) error { - // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos - // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) - // If the module can already authenticate the capability then the module already owns it so we don't need to claim - // Otherwise, module does not have channel capability and we must claim it from IBC - if !k.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { - // Only claim channel capability passed back by IBC module if we do not already own it - if err := k.scopedKeeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err - } - } - - // ... do custom initialization logic - - // Use above arguments to determine if we want to abort handshake - err := checkArguments(args) - return err -} - -// Called by IBC Handler on MsgOpenAck -OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - counterpartyVersion string, -) error { - // ... do custom initialization logic - - // Use above arguments to determine if we want to abort handshake - err := checkArguments(args) - return err -} - -// Called by IBC Handler on MsgOpenConfirm -OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - // ... do custom initialization logic - - // Use above arguments to determine if we want to abort handshake - err := checkArguments(args) - return err -} -``` - -The channel closing handshake will also invoke module callbacks that can return errors to abort the -closing handshake. Closing a channel is a 2-step handshake, the initiating chain calls -`ChanCloseInit` and the finalizing chain calls `ChanCloseConfirm`. - -```go -// Called by IBC Handler on MsgCloseInit -OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, -) error { - // ... do custom finalization logic - - // Use above arguments to determine if we want to abort handshake - err := checkArguments(args) - return err -} - -// Called by IBC Handler on MsgCloseConfirm -OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - // ... do custom finalization logic - - // Use above arguments to determine if we want to abort handshake - err := checkArguments(args) - return err -} -``` - -#### Channel Handshake Version Negotiation - -Application modules are expected to verify versioning used during the channel handshake procedure. - -* `ChanOpenInit` callback should verify that the `MsgChanOpenInit.Version` is valid -* `ChanOpenTry` callback should verify that the `MsgChanOpenTry.Version` is valid and that `MsgChanOpenTry.CounterpartyVersion` is valid. -* `ChanOpenAck` callback should verify that the `MsgChanOpenAck.CounterpartyVersion` is valid and supported. - -Versions must be strings but can implement any versioning structure. If your application plans to -have linear releases then semantic versioning is recommended. If your application plans to release -various features in between major releases then it is advised to use the same versioning scheme -as IBC. This versioning scheme specifies a version identifier and compatible feature set with -that identifier. Valid version selection includes selecting a compatible version identifier with -a subset of features supported by your application for that version. The struct is used for this -scheme can be found in `03-connection/types`. - -Since the version type is a string, applications have the ability to do simple version verification -via string matching or they can use the already impelemented versioning system and pass the proto -encoded version into each handhshake call as necessary. - -ICS20 currently implements basic string matching with a single supported version. - -### Bind Ports - -Currently, ports must be bound on app initialization. A module may bind to ports in `InitGenesis` -like so: - -```go -func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, state types.GenesisState) { - // ... other initialization logic - - // Only try to bind to port if it is not already bound, since we may already own - // port capability from capability InitGenesis - if !isBound(ctx, state.PortID) { - // module binds to desired ports on InitChain - // and claims returned capabilities - cap1 := keeper.IBCPortKeeper.BindPort(ctx, port1) - cap2 := keeper.IBCPortKeeper.BindPort(ctx, port2) - cap3 := keeper.IBCPortKeeper.BindPort(ctx, port3) - - // NOTE: The module's scoped capability keeper must be private - keeper.scopedKeeper.ClaimCapability(cap1) - keeper.scopedKeeper.ClaimCapability(cap2) - keeper.scopedKeeper.ClaimCapability(cap3) - } - - // ... more initialization logic -} -``` - -### Custom Packets - -Modules connected by a channel must agree on what application data they are sending over the -channel, as well as how they will encode/decode it. This process is not specified by IBC as it is up -to each application module to determine how to implement this agreement. However, for most -applications this will happen as a version negotiation during the channel handshake. While more -complex version negotiation is possible to implement inside the channel opening handshake, a very -simple version negotation is implemented in the [ibc-transfer module](https://github.com/cosmos/ibc-go/tree/main/modules/apps/transfer/module.go). - -Thus, a module must define its a custom packet data structure, along with a well-defined way to -encode and decode it to and from `[]byte`. - -```go -// Custom packet data defined in application module -type CustomPacketData struct { - // Custom fields ... -} - -EncodePacketData(packetData CustomPacketData) []byte { - // encode packetData to bytes -} - -DecodePacketData(encoded []byte) (CustomPacketData) { - // decode from bytes to packet data -} -``` - -Then a module must encode its packet data before sending it through IBC. - -```go -// Sending custom application packet data -data := EncodePacketData(customPacketData) -packet.Data = data -IBCChannelKeeper.SendPacket(ctx, packet) -``` - -A module receiving a packet must decode the `PacketData` into a structure it expects so that it can -act on it. - -```go -// Receiving custom application packet data (in OnRecvPacket) -packetData := DecodePacketData(packet.Data) -// handle received custom packet data -``` - -#### Packet Flow Handling - -Just as IBC expected modules to implement callbacks for channel handshakes, IBC also expects modules -to implement callbacks for handling the packet flow through a channel. - -Once a module A and module B are connected to each other, relayers can start relaying packets and -acknowledgements back and forth on the channel. - -![IBC packet flow diagram](https://media.githubusercontent.com/media/cosmos/ics/master/spec/ics-004-channel-and-packet-semantics/packet-state-machine.png) - -Briefly, a successful packet flow works as follows: - -1. module A sends a packet through the IBC module -2. the packet is received by module B -3. if module B writes an acknowledgement of the packet then module A will process the - acknowledgement -4. if the packet is not successfully received before the timeout, then module A processes the - packet's timeout. - -##### Sending Packets - -Modules do not send packets through callbacks, since the modules initiate the action of sending -packets to the IBC module, as opposed to other parts of the packet flow where msgs sent to the IBC -module must trigger execution on the port-bound module through the use of callbacks. Thus, to send a -packet a module simply needs to call `SendPacket` on the `IBCChannelKeeper`. - -```go -// retrieve the dynamic capability for this channel -channelCap := scopedKeeper.GetCapability(ctx, channelCapName) -// Sending custom application packet data -data := EncodePacketData(customPacketData) -packet.Data = data -// Send packet to IBC, authenticating with channelCap -IBCChannelKeeper.SendPacket(ctx, channelCap, packet) -``` - -::: warning -In order to prevent modules from sending packets on channels they do not own, IBC expects -modules to pass in the correct channel capability for the packet's source channel. -::: - -##### Receiving Packets - -To handle receiving packets, the module must implement the `OnRecvPacket` callback. This gets -invoked by the IBC module after the packet has been proved valid and correctly processed by the IBC -keepers. Thus, the `OnRecvPacket` callback only needs to worry about making the appropriate state -changes given the packet data without worrying about whether the packet is valid or not. - -Modules may return an acknowledgement as a byte string and return it to the IBC handler. -The IBC handler will then commit this acknowledgement of the packet so that a relayer may relay the -acknowledgement back to the sender module. - -```go -OnRecvPacket( - ctx sdk.Context, - packet channeltypes.Packet, -) (res *sdk.Result, ack []byte, abort error) { - // Decode the packet data - packetData := DecodePacketData(packet.Data) - - // do application state changes based on packet data - // and return result, acknowledgement and abortErr - // Note: abortErr is only not nil if we need to abort the entire receive packet, and allow a replay of the receive. - // If the application state change failed but we do not want to replay the packet, - // simply encode this failure with relevant information in ack and return nil error - res, ack, abortErr := processPacket(ctx, packet, packetData) - - // if we need to abort the entire receive packet, return error - if abortErr != nil { - return nil, nil, abortErr - } - - // Encode the ack since IBC expects acknowledgement bytes - ackBytes := EncodeAcknowledgement(ack) - - return res, ackBytes, nil -} -``` - -::: warning -`OnRecvPacket` should **only** return an error if we want the entire receive packet execution -(including the IBC handling) to be reverted. This will allow the packet to be replayed in the case -that some mistake in the relaying caused the packet processing to fail. - -If some application-level error happened while processing the packet data, in most cases, we will -not want the packet processing to revert. Instead, we may want to encode this failure into the -acknowledgement and finish processing the packet. This will ensure the packet cannot be replayed, -and will also allow the sender module to potentially remediate the situation upon receiving the -acknowledgement. An example of this technique is in the `ibc-transfer` module's -[`OnRecvPacket`](https://github.com/cosmos/ibc-go/tree/main/modules/apps/transfer/module.go). -::: - -### Acknowledgements - -Modules may commit an acknowledgement upon receiving and processing a packet in the case of synchronous packet processing. -In the case where a packet is processed at some later point after the packet has been received (asynchronous execution), the acknowledgement -will be written once the packet has been processed by the application which may be well after the packet receipt. - -NOTE: Most blockchain modules will want to use the synchronous execution model in which the module processes and writes the acknowledgement -for a packet as soon as it has been received from the IBC module. - -This acknowledgement can then be relayed back to the original sender chain, which can take action -depending on the contents of the acknowledgement. - -Just as packet data was opaque to IBC, acknowledgements are similarly opaque. Modules must pass and -receive acknowledegments with the IBC modules as byte strings. - -Thus, modules must agree on how to encode/decode acknowledgements. The process of creating an -acknowledgement struct along with encoding and decoding it, is very similar to the packet data -example above. [ICS 04](https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope) -specifies a recommended format for acknowledgements. This acknowledgement type can be imported from -[channel types](https://github.com/cosmos/ibc-go/tree/main/modules/core/04-channel/types). - -While modules may choose arbitrary acknowledgement structs, a default acknowledgement types is provided by IBC [here](https://github.com/cosmos/ibc-go/blob/main/proto/ibc/core/channel/v1/channel.proto): - -```proto -// Acknowledgement is the recommended acknowledgement format to be used by -// app-specific protocols. -// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -// conflicts with other protobuf message formats used for acknowledgements. -// The first byte of any message with this format will be the non-ASCII values -// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -// https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope -message Acknowledgement { - // response contains either a result or an error and must be non-empty - oneof response { - bytes result = 21; - string error = 22; - } -} -``` - -#### Acknowledging Packets - -After a module writes an acknowledgement, a relayer can relay back the acknowledgement to the sender module. The sender module can -then process the acknowledgement using the `OnAcknowledgementPacket` callback. The contents of the -acknowledgement is entirely upto the modules on the channel (just like the packet data); however, it -may often contain information on whether the packet was successfully processed along -with some additional data that could be useful for remediation if the packet processing failed. - -Since the modules are responsible for agreeing on an encoding/decoding standard for packet data and -acknowledgements, IBC will pass in the acknowledgements as `[]byte` to this callback. The callback -is responsible for decoding the acknowledgement and processing it. - -```go -OnAcknowledgementPacket( - ctx sdk.Context, - packet channeltypes.Packet, - acknowledgement []byte, -) (*sdk.Result, error) { - // Decode acknowledgement - ack := DecodeAcknowledgement(acknowledgement) - - // process ack - res, err := processAck(ack) - return res, err -} -``` - -#### Timeout Packets - -If the timeout for a packet is reached before the packet is successfully received or the -counterparty channel end is closed before the packet is successfully received, then the receiving -chain can no longer process it. Thus, the sending chain must process the timeout using -`OnTimeoutPacket` to handle this situation. Again the IBC module will verify that the timeout is -indeed valid, so our module only needs to implement the state machine logic for what to do once a -timeout is reached and the packet can no longer be received. - -```go -OnTimeoutPacket( - ctx sdk.Context, - packet channeltypes.Packet, -) (*sdk.Result, error) { - // do custom timeout logic -} -``` - -### Routing - -As mentioned above, modules must implement the IBC module interface (which contains both channel -handshake callbacks and packet handling callbacks). The concrete implementation of this interface -must be registered with the module name as a route on the IBC `Router`. - -```go -// app.go -func NewApp(...args) *App { -// ... - -// Create static IBC router, add module routes, then set and seal it -ibcRouter := port.NewRouter() - -ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule) -// Note: moduleCallbacks must implement IBCModule interface -ibcRouter.AddRoute(moduleName, moduleCallbacks) - -// Setting Router will finalize all routes by sealing router -// No more routes can be added -app.IBCKeeper.SetRouter(ibcRouter) -``` - -## Working Example - -For a real working example of an IBC application, you can look through the `ibc-transfer` module -which implements everything discussed above. - -Here are the useful parts of the module to look at: - -[Binding to transfer -port](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/types/genesis.go) - -[Sending transfer -packets](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/relay.go) - -[Implementing IBC -callbacks](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/module.go) - -## Next {hide} - -Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/intro.md) {hide} diff --git a/docs/ibc/integration.md b/docs/ibc/integration.md deleted file mode 100644 index f35da72fc23e..000000000000 --- a/docs/ibc/integration.md +++ /dev/null @@ -1,252 +0,0 @@ - - -# Integration - -Learn how to integrate IBC to your application and send data packets to other chains. {synopsis} - -This document outlines the required steps to integrate and configure the [IBC -module](https://github.com/cosmos/ibc-go/tree/main/modules/core) to your Cosmos SDK application and -send fungible token transfers to other chains. - -## Integrating the IBC module - -Integrating the IBC module to your Cosmos SDK-based application is straighforward. The general changes can be summarized in the following steps: - -* Add required modules to the `module.BasicManager` -* Define additional `Keeper` fields for the new modules on the `App` type -* Add the module's `StoreKeys` and initialize their `Keepers` -* Set up corresponding routers and routes for the `ibc` and `evidence` modules -* Add the modules to the module `Manager` -* Add modules to `Begin/EndBlockers` and `InitGenesis` -* Update the module `SimulationManager` to enable simulations - -### Module `BasicManager` and `ModuleAccount` permissions - -The first step is to add the following modules to the `BasicManager`: `x/capability`, `x/ibc`, -`x/evidence` and `x/ibc-transfer`. After that, we need to grant `Minter` and `Burner` permissions to -the `ibc-transfer` `ModuleAccount` to mint and burn relayed tokens. - -```go -// app.go -var ( - - ModuleBasics = module.NewBasicManager( - // ... - capability.AppModuleBasic{}, - ibc.AppModuleBasic{}, - evidence.AppModuleBasic{}, - transfer.AppModuleBasic{}, // i.e ibc-transfer module - ) - - // module account permissions - maccPerms = map[string][]string{ - // other module accounts permissions - // ... - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, -) -``` - -### Application fields - -Then, we need to register the `Keepers` as follows: - -```go -// app.go -type App struct { - // baseapp, keys and subspaces definitions - - // other keepers - // ... - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - EvidenceKeeper evidencekeeper.Keeper // required to set up the client misbehaviour route - TransferKeeper ibctransferkeeper.Keeper // for cross-chain fungible token transfers - - // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - - /// ... - /// module and simulation manager definitions -} -``` - -### Configure the `Keepers` - -During initialization, besides initializing the IBC `Keepers` (for the `x/ibc`, and -`x/ibc-transfer` modules), we need to grant specific capabilities through the capability module -`ScopedKeepers` so that we can authenticate the object-capability permissions for each of the IBC -channels. - -```go -func NewApp(...args) *App { - // define codecs and baseapp - - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - - // grant capabilities for the ibc and ibc-transfer modules - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - - // ... other modules keepers - - // Create IBC Keeper - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], app.StakingKeeper, scopedIBCKeeper, - ) - - // Create Transfer Keepers - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, keys[ibctransfertypes.StoreKey], - app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, - app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, - ) - transferModule := transfer.NewAppModule(app.TransferKeeper) - - // Create evidence Keeper for to register the IBC light client misbehaviour evidence route - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper, - ) - - // .. continues -} -``` - -### Register `Routers` - -IBC needs to know which module is bound to which port so that it can route packets to the -appropriate module and call the appropriate callbacks. The port to module name mapping is handled by -IBC's port `Keeper`. However, the mapping from module name to the relevant callbacks is accomplished -by the port -[`Router`](https://github.com/cosmos/ibc-go/blob/main/modules/core/05-port/types/router.go) on the -IBC module. - -Adding the module routes allows the IBC handler to call the appropriate callback when processing a -channel handshake or a packet. - -The second `Router` that is required is the evidence module router. This router handles genenal -evidence submission and routes the business logic to each registered evidence handler. In the case -of IBC, it is required to submit evidence for [light client -misbehaviour](https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics#misbehaviour) -in order to freeze a client and prevent further data packets from being sent/received. - -Currently, a `Router` is static so it must be initialized and set correctly on app initialization. -Once the `Router` has been set, no new routes can be added. - -```go -// app.go -func NewApp(...args) *App { - // .. continuation from above - - // Create static IBC router, add ibc-tranfer module route, then set and seal it - ibcRouter := port.NewRouter() - ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule) - // Setting Router will finalize all routes by sealing router - // No more routes can be added - app.IBCKeeper.SetRouter(ibcRouter) - - // create static Evidence routers - - evidenceRouter := evidencetypes.NewRouter(). - // add IBC ClientMisbehaviour evidence handler - AddRoute(ibcclient.RouterKey, ibcclient.HandlerClientMisbehaviour(app.IBCKeeper.ClientKeeper)) - - // Setting Router will finalize all routes by sealing router - // No more routes can be added - evidenceKeeper.SetRouter(evidenceRouter) - - // set the evidence keeper from the section above - app.EvidenceKeeper = *evidenceKeeper - - // .. continues -``` - -### Module Managers - -In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](./../building-modules/simulator.md). - -```go -// app.go -func NewApp(...args) *App { - // .. continuation from above - - app.mm = module.NewManager( - // other modules - // ... - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - transferModule, - ) - - // ... - - app.sm = module.NewSimulationManager( - // other modules - // ... - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - transferModule, - ) - - // .. continues -``` - -### Application ABCI Ordering - -One addition from IBC is the concept of `HistoricalEntries` which are stored on the staking module. -Each entry contains the historical information for the `Header` and `ValidatorSet` of this chain which is stored -at each height during the `BeginBlock` call. The historical info is required to introspect the -past historical info at any given height in order to verify the light client `ConsensusState` during the -connection handhake. - -The IBC module also has -[`BeginBlock`](https://github.com/cosmos/ibc-go/blob/main/modules/core/02-client/abci.go) logic as -well. This is optional as it is only required if your application uses the [localhost -client](https://github.com/cosmos/ibc/tree/master/spec/client/ics-009-loopback-client) to connect two -different modules from the same chain. - -::: tip -Only register the ibc module to the `SetOrderBeginBlockers` if your application will use the -localhost (_aka_ loopback) client. -::: - -```go -// app.go -func NewApp(...args) *App { - // .. continuation from above - - // add evidence, staking and ibc modules to BeginBlockers - app.mm.SetOrderBeginBlockers( - // other modules ... - evidencetypes.ModuleName, stakingtypes.ModuleName, ibchost.ModuleName, - ) - - // ... - - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - app.mm.SetOrderInitGenesis( - capabilitytypes.ModuleName, - // other modules ... - ibchost.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName, - ) - - // .. continues -``` - -::: warning -**IMPORTANT**: The capability module **must** be declared first in `SetOrderInitGenesis` -::: - -That's it! You have now wired up the IBC module and are now able to send fungible tokens across -different chains. If you want to have a broader view of the changes take a look into the Cosmos SDK's -[`SimApp`](https://github.com/cosmos/ibc-go/blob/main/testing/simapp/app.go). - -## Next {hide} - -Learn about how to create [custom IBC modules](./custom.md) for your application {hide} diff --git a/docs/ibc/overview.md b/docs/ibc/overview.md deleted file mode 100644 index 1fb9ee43fabf..000000000000 --- a/docs/ibc/overview.md +++ /dev/null @@ -1,155 +0,0 @@ - - -# IBC Overview - -Learn what IBC is, its components, and use cases. {synopsis} - -## What is the Inter-Blockchain Communication Protocol (IBC) - -The Inter-Blockchain Communication protocol (IBC) allows blockchains to talk to each other. The backbone of the Cosmos ecosystem, IBC handles transport across different sovereign blockchains. This end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains. - -This IBC implementation in Golang is built as a Cosmos SDK module. This document is a guide for developers who want to write their own IBC apps for custom use cases. - -The modular design of the IBC protocol means that IBC app developers do not require in-depth knowledge of the low-level details of clients, connections, and proof verification. This brief explanation of the lower levels of the stack is provided so that app developers can gain a high-level understanding of the IBC protocol. - -The abstraction layer details on channels and ports are relevant for app developers. You can define your own custom packets and IBCModule callbacks. - -The following requirements must be met for a module to interact over IBC: - -* Bind to one or more ports - -* Define the packet data - -* Define optional acknowledgement structures and methods to encode and decode them - -* Implement the IBCModule interface - -## Components Overview - -This section describes the IBC components and links to the repos. - -### [Clients](https://github.com/cosmos/ibc-go/blob/main/modules/core/02-client) - -IBC clients are light clients that are identified by a unique client id. IBC clients track the consensus states of other blockchains and the proof specs of those blockchains that are required to properly verify proofs against the client's consensus state. A client can be associated with any number of connections to multiple chains. The supported IBC clients are: - -* [Solo Machine light client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/06-solomachine): devices such as phones, browsers, or laptops. -* [Tendermint light client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/07-tendermint): The default for Cosmos SDK-based chains. -* [Localhost (loopback) client](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/09-localhost): Useful for testing, simulation, and relaying packets to modules on the same application. - -### [Connections](https://github.com/cosmos/ibc-go/blob/main/modules/core/03-connection) - -Connections encapsulate two `ConnectionEnd` objects on two separate blockchains. Each `ConnectionEnd` is associated with a client of the other blockchain (the counterparty blockchain). The connection handshake is responsible for verifying that the light clients on each chain are correct for their respective counterparties. Connections, once established, are responsible for facilitating all cross-chain verification of IBC state. A connection can be associated with any number of channels. - -### [Proofs](https://github.com/cosmos/ibc-go/blob/main/modules/core/23-commitment) and [Paths](https://github.com/cosmos/ibc-go/blob/main/modules/core/24-host) - -In IBC, blockchains do not directly pass messages to each other over the network. - -* To communicate, a blockchain commits some state to a precisely defined path reserved for a specific message type and a specific counterparty. For example, a blockchain that stores a specific connectionEnd as part of a handshake or a packet intended to be relayed to a module on the counterparty chain. - -* A relayer process monitors for updates to these paths and relays messages by submitting the data stored under the path along with a proof of that data to the counterparty chain. - -* The paths that all IBC implementations must support for committing IBC messages are defined in [ICS-24 host requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). - -* The proof format that all implementations must produce and verify is defined in [ICS-23 implementation](https://github.com/confio/ics23). - -### [Capabilities](./ocap.md) - -IBC is intended to work in execution environments where modules do not necessarily trust each other. IBC must authenticate module actions on ports and channels so that only modules with the appropriate permissions can use the channels. This security is accomplished using [dynamic capabilities](../architecture/adr-003-dynamic-capability-store.md). Upon binding to a port or creating a channel for a module, IBC returns a dynamic capability that the module must claim to use that port or channel. This binding strategy prevents other modules from using that port or channel since those modules do not own the appropriate capability. - -While this explanation is useful background information, IBC modules do not need to interact at all with these lower-level abstractions. The relevant abstraction layer for IBC application developers is that of channels and ports. - -Write your IBC applications as self-contained **modules**. A module on one blockchain can communicate with other modules on other blockchains by sending, receiving, and acknowledging packets through channels that are uniquely identified by the `(channelID, portID)` tuple. - -A useful analogy is to consider IBC modules as internet apps on a computer. A channel can then be conceptualized as an IP connection, with the IBC portID is like an IP port, and the IBC channelID is like an IP address. A single instance of an IBC module can communicate on the same port with any number of other modules and IBC correctly routes all packets to the relevant module using the `(channelID, portID)` tuple. An IBC module can also communicate with another IBC module over multiple ports by sending each `(portID<->portID)` packet stream on a different unique channel. - -### [Ports](https://github.com/cosmos/ibc-go/blob/main/modules/core/05-port) - -An IBC module can bind to any number of ports. Each port must be identified by a unique `portID`. Since IBC is designed to be secure with mutually-distrusted modules that operate on the same ledger, binding a port returns the dynamic object capability. To take action on a particular port, for example, to open a channel with its portID, a module must provide the dynamic object capability to the IBC handler. This requirement prevents a malicious module from opening channels with ports it does not own. - -IBC modules are responsible for claiming the capability that is returned on `BindPort`. - -### [Channels](https://github.com/cosmos/ibc-go/blob/main/modules/core/04-channel) - -An IBC channel can be established between two IBC ports. A port is exclusively owned by a single module. IBC packets are sent over channels. Just as IP packets contain the destination IP address, IP port, the source IP address, and source IP port, IBC packets contain the destination portID, channelID, the source portID, and channelID. The IBC packets enable IBC to correctly route the packets to the destination module, while also allowing modules receiving packets to know the sender module. - -* A channel can be `ORDERED` so that packets from a sending module must be processed by the receiving module in the order they were sent. - -* Recommended, a channel may be `UNORDERED` so that packets from a sending module are processed in the order they arrive, which may not be the order the packets were sent. - -Modules may choose which channels they wish to communicate over with. IBC expects modules to implement callbacks that are called during the channel handshake. These callbacks may do custom channel initialization logic. If an error is returned, the channel handshake fails. By returning errors on callbacks, modules can programmatically reject and accept channels. - -The channel handshake is a 4-step handshake. Briefly, if a given chain A wants to open a channel with chain B using an already established connection: - -1. Chain A sends a `ChanOpenInit` message to signal a channel initialization attempt with chain B. -2. Chain B sends a `ChanOpenTry` message to try opening the channel on chain A. -3. Chain A sends a `ChanOpenAck` message to mark its channel end status as open. -4. Chain B sends a `ChanOpenConfirm` message to mark its channel end status as open. - -If all of these actions happen successfully, the channel is open on both sides. At each step in the handshake, the module associated with the `ChannelEnd` executes its callback for that step of the handshake. So on `ChanOpenInit`, the module on chain A has its callback `OnChanOpenInit` executed. - -Just as ports came with dynamic capabilities, channel initialization returns a dynamic capability that the module **must** claim so that they can pass in a capability to authenticate channel actions like sending packets. The channel capability is passed into the callback on the first parts of the handshake: `OnChanOpenInit` on the initializing chain or `OnChanOpenTry` on the other chain. - -### [Packets](https://github.com/cosmos/ibc-go/blob/main/modules/core/04-channel) - -Modules communicate with each other by sending packets over IBC channels. All IBC packets contain: - -* Destination `portID` - -* Destination `channelID` - -* Source `portID` - -* Source `channelID` - - These port and channels allow the modules to know the sender module of a given packet. - -* A sequence to optionally enforce ordering - -* `TimeoutTimestamp` and `TimeoutHeight` - - When non-zero, these timeout values determine the deadline before which the receiving module must process a packet. - - If the timeout passes without the packet being successfully received, the sending module can timeout the packet and take appropriate actions. - -Modules send custom application data to each other inside the `Data []byte` field of the IBC packet. Packet data is completely opaque to IBC handlers. The sender module must encode their application-specific packet information into the `Data` field of packets. The receiver module must decode that `Data` back to the original application data. - -### [Receipts and Timeouts](https://github.com/cosmos/ibc-go/blob/main/modules/core/04-channel) - -Since IBC works over a distributed network and relies on potentially faulty relayers to relay messages between ledgers, IBC must handle the case where a packet does not get sent to its destination in a timely manner or at all. Packets must specify a timeout height or timeout timestamp after which a packet can no longer be successfully received on the destination chain. - -If the timeout is reached, then a proof-of-packet timeout can be submitted to the original chain which can then perform application-specific logic to timeout the packet, perhaps by rolling back the packet send changes (refunding senders any locked funds, and so on). - -In ORDERED channels, a timeout of a single packet in the channel closes the channel. If packet sequence `n` times out, then no packet at sequence `k > n` can be successfully received without violating the contract of ORDERED channels that packets are processed in the order that they are sent. Since ORDERED channels enforce this invariant, a proof that sequence `n` hasn't been received on the destination chain by packet `n`'s specified timeout is sufficient to timeout packet `n` and close the channel. - -In the UNORDERED case, packets can be received in any order. IBC writes a packet receipt for each sequence it has received in the UNORDERED channel. This receipt contains no information and is simply a marker intended to signify that the UNORDERED channel has received a packet at the specified sequence. To timeout a packet on an UNORDERED channel, proof that a packet receipt does not exist is required for the packet's sequence by the specified timeout. Of course, timing out a packet on an UNORDERED channel triggers the application specific timeout logic for that packet, and does not close the channel. - -For this reason, most modules that use UNORDERED channels are recommended as they require less liveness guarantees to function effectively for users of that channel. - -### [Acknowledgements](https://github.com/cosmos/ibc-go/blob/main/modules/core/04-channel) - -Modules also write application-specific acknowledgements when processing a packet. Acknowledgements can be done: - -* Synchronously on `OnRecvPacket` if the module processes packets as soon as they are received from IBC module. - -* Asynchronously if module processes packets at some later point after receiving the packet. - -This acknowledgement data is opaque to IBC much like the packet `Data` and is treated by IBC as a simple byte string `[]byte`. The receiver modules must encode their acknowledgement so that the sender module can decode it correctly. How the acknowledgement is encoded should be decided through version negotiation during the channel handshake. - -The acknowledgement can encode whether the packet processing succeeded or failed, along with additional information that allows the sender module to take appropriate action. - -After the acknowledgement has been written by the receiving chain, a relayer relays the acknowledgement back to the original sender module which then executes application-specific acknowledgment logic using the contents of the acknowledgement. This acknowledgement can involve rolling back packet-send changes in the case of a failed acknowledgement (refunding senders). - -After an acknowledgement is received successfully on the original sender the chain, the IBC module deletes the corresponding packet commitment as it is no longer needed. - -## Further Readings and Specs - -To learn more about IBC, check out the following specifications: - -* [IBC specs](https://github.com/cosmos/ibc/tree/master/spec) -* [IBC protocol on the Cosmos SDK](https://github.com/cosmos/ibc-go/tree/main/docs) - -## Next {hide} - -Learn about how to [integrate](./integration.md) IBC to your application {hide} diff --git a/docs/ibc/proposals.md b/docs/ibc/proposals.md deleted file mode 100644 index d82609262e42..000000000000 --- a/docs/ibc/proposals.md +++ /dev/null @@ -1,42 +0,0 @@ - - -# Governance Proposals - -In uncommon situations, a highly valued client may become frozen due to uncontrollable -circumstances. A highly valued client might have hundreds of channels being actively used. -Some of those channels might have a significant amount of locked tokens used for ICS 20. - -If the one third of the validator set of the chain the client represents decides to collude, -they can sign off on two valid but conflicting headers each signed by the other one third -of the honest validator set. The light client can now be updated with two valid, but conflicting -headers at the same height. The light client cannot know which header is trustworthy and therefore -evidence of such misbehaviour is likely to be submitted resulting in a frozen light client. - -Frozen light clients cannot be updated under any circumstance except via a governance proposal. -Since a quorum of validators can sign arbitrary state roots which may not be valid executions -of the state machine, a governance proposal has been added to ease the complexity of unfreezing -or updating clients which have become "stuck". Without this mechanism, validator sets would need -to construct a state root to unfreeze the client. Unfreezing clients, re-enables all of the channels -built upon that client. This may result in recovery of otherwise lost funds. - -Tendermint light clients may become expired if the trusting period has passed since their -last update. This may occur if relayers stop submitting headers to update the clients. - -An unplanned upgrade by the counterparty chain may also result in expired clients. If the counterparty -chain undergoes an unplanned upgrade, there may be no commitment to that upgrade signed by the validator -set before the chain-id changes. In this situation, the validator set of the last valid update for the -light client is never expected to produce another valid header since the chain-id has changed, which will -ultimately lead the on-chain light client to become expired. - -In the case that a highly valued light client is frozen, expired, or rendered non-updateable, a -governance proposal may be submitted to update this client, known as the subject client. The -proposal includes the client identifier for the subject, the client identifier for a substitute -client, and an initial height to reference the substitute client from. Light client implementations -may implement custom updating logic, but in most cases, the subject will be updated with information -from the substitute client, if the proposal passes. The substitute client is used as a "stand in" -while the subject is on trial. It is best practice to create a substitute client *after* the subject -has become frozen to avoid the substitute from also becoming frozen. An active substitute client -allows headers to be submitted during the voting period to prevent accidental expiry once the proposal -passes. diff --git a/docs/ibc/relayer.md b/docs/ibc/relayer.md deleted file mode 100644 index b25f95df3bfa..000000000000 --- a/docs/ibc/relayer.md +++ /dev/null @@ -1,47 +0,0 @@ - - -# Relayer - -## Prerequisites Readings - -* [IBC Overview](./overview.md) {prereq} -* [Events](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/events.md) {prereq} - -## Events - -Events are emitted for every transaction processed by the base application to indicate the execution -of some logic clients may want to be aware of. This is extremely useful when relaying IBC packets. -Any message that uses IBC will emit events for the corresponding TAO logic executed as defined in -the [IBC events spec](https://github.com/cosmos/ibc-go/blob/main/modules/core/spec/06_events.md). - -In the Cosmos SDK, it can be assumed that for every message there is an event emitted with the type `message`, -attribute key `action`, and an attribute value representing the type of message sent -(`channel_open_init` would be the attribute value for `MsgChannelOpenInit`). If a relayer queries -for transaction events, it can split message events using this event Type/Attribute Key pair. - -The Event Type `message` with the Attribute Key `module` may be emitted multiple times for a single -message due to application callbacks. It can be assumed that any TAO logic executed will result in -a module event emission with the attribute value `ibc_` (02-client emits `ibc_client`). - -### Subscribing with Tendermint - -Calling the Tendermint RPC method `Subscribe` via [Tendermint's Websocket](https://docs.tendermint.com/master/rpc/) will return events using -Tendermint's internal representation of them. Instead of receiving back a list of events as they -were emitted, Tendermint will return the type `map[string][]string` which maps a string in the -form `.` to `attribute_value`. This causes extraction of the event -ordering to be non-trivial, but still possible. - -A relayer should use the `message.action` key to extract the number of messages in the transaction -and the type of IBC transactions sent. For every IBC transaction within the string array for -`message.action`, the necessary information should be extracted from the other event fields. If -`send_packet` appears at index 2 in the value for `message.action`, a relayer will need to use the -value at index 2 of the key `send_packet.packet_sequence`. This process should be repeated for each -piece of information needed to relay a packet. - -## Example Implementations - -* [Golang Relayer](https://github.com/iqlusioninc/relayer) -* [Hermes](https://github.com/informalsystems/ibc-rs/tree/master/relayer) -* [Typescript Relayer](https://github.com/confio/ts-relayer) diff --git a/docs/ibc/upgrades/README.md b/docs/ibc/upgrades/README.md deleted file mode 100644 index 3e482488e525..000000000000 --- a/docs/ibc/upgrades/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Upgrading IBC Chains Overview - -This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. - -IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. - -1. The [quick-guide](./quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the Cosmos SDK. -2. The [developer-guide](./developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/ibc/upgrades/developer-guide.md b/docs/ibc/upgrades/developer-guide.md deleted file mode 100644 index d41b3346d4f7..000000000000 --- a/docs/ibc/upgrades/developer-guide.md +++ /dev/null @@ -1,50 +0,0 @@ - - -# IBC Client Developer Guide to Upgrades - -Learn how to implement upgrade functionality for your custom IBC client. {synopsis} - -As mentioned in the [README](./README.md), it is vital that high-value IBC clients can upgrade along with their underlying chains to avoid disruption to the IBC ecosystem. Thus, IBC client developers will want to implement upgrade functionality to enable clients to maintain connections and channels even across chain upgrades. - -The IBC protocol allows client implementations to provide a path to upgrading clients given the upgraded client state, upgraded consensus state and proofs for each. - -```go -// Upgrade functions -// NOTE: proof heights are not included as upgrade to a new revision is expected to pass only on the last -// height committed by the current revision. Clients are responsible for ensuring that the planned last -// height of the current revision is somehow encoded in the proof verification process. -// This is to ensure that no premature upgrades occur, since upgrade plans committed to by the counterparty -// may be cancelled or modified before the last planned height. -VerifyUpgradeAndUpdateState( - ctx sdk.Context, - cdc codec.BinaryCodec, - store sdk.KVStore, - newClient ClientState, - newConsState ConsensusState, - proofUpgradeClient, - proofUpgradeConsState []byte, -) (upgradedClient ClientState, upgradedConsensus ConsensusState, err error) -``` - -Note that the clients should have prior knowledge of the merkle path that the upgraded client and upgraded consensus states will use. The height at which the upgrade has occurred should also be encoded in the proof. The Tendermint client implementation accomplishes this by including an `UpgradePath` in the ClientState itself, which is used along with the upgrade height to construct the merkle path under which the client state and consensus state are committed. - -Developers must ensure that the `UpgradeClientMsg` does not pass until the last height of the old chain has been committed, and after the chain upgrades, the `UpgradeClientMsg` should pass once and only once on all counterparty clients. - -Developers must ensure that the new client adopts all of the new Client parameters that must be uniform across every valid light client of a chain (chain-chosen parameters), while maintaining the Client parameters that are customizable by each individual client (client-chosen parameters) from the previous version of the client. - -Upgrades must adhere to the IBC Security Model. IBC does not rely on the assumption of honest relayers for correctness. Thus users should not have to rely on relayers to maintain client correctness and security (though honest relayers must exist to maintain relayer liveness). While relayers may choose any set of client parameters while creating a new `ClientState`, this still holds under the security model since users can always choose a relayer-created client that suits their security and correctness needs or create a Client with their desired parameters if no such client exists. - -However, when upgrading an existing client, one must keep in mind that there are already many users who depend on this client's particular parameters. We cannot give the upgrading relayer free choice over these parameters once they have already been chosen. This would violate the security model since users who rely on the client would have to rely on the upgrading relayer to maintain the same level of security. Thus, developers must make sure that their upgrade mechanism allows clients to upgrade the chain-specified parameters whenever a chain upgrade changes these parameters (examples in the Tendermint client include `UnbondingPeriod`, `ChainID`, `UpgradePath`, etc.), while ensuring that the relayer submitting the `UpgradeClientMsg` cannot alter the client-chosen parameters that the users are relying upon (examples in Tendermint client include `TrustingPeriod`, `TrustLevel`, `MaxClockDrift`, etc). - -Developers should maintain the distinction between Client parameters that are uniform across every valid light client of a chain (chain-chosen parameters), and Client parameters that are customizable by each individual client (client-chosen parameters); since this distinction is necessary to implement the `ZeroCustomFields` method in the `ClientState` interface: - -```go -// Utility function that zeroes out any client customizable fields in client state -// Ledger enforced fields are maintained while all custom fields are zero values -// Used to verify upgrades -ZeroCustomFields() ClientState -``` - -Counterparty clients can upgrade securely by using all of the chain-chosen parameters from the chain-committed `UpgradedClient` and preserving all of the old client-chosen parameters. This enables chains to securely upgrade without relying on an honest relayer, however it can in some cases lead to an invalid final `ClientState` if the new chain-chosen parameters clash with the old client-chosen parameter. This can happen in the Tendermint client case if the upgrading chain lowers the `UnbondingPeriod` (chain-chosen) to a duration below that of a counterparty client's `TrustingPeriod` (client-chosen). Such cases should be clearly documented by developers, so that chains know which upgrades should be avoided to prevent this problem. The final upgraded client should also be validated in `VerifyUpgradeAndUpdateState` before returning to ensure that the client does not upgrade to an invalid `ClientState`. diff --git a/docs/ibc/upgrades/quick-guide.md b/docs/ibc/upgrades/quick-guide.md deleted file mode 100644 index 7a479a58bc18..000000000000 --- a/docs/ibc/upgrades/quick-guide.md +++ /dev/null @@ -1,54 +0,0 @@ - - -# How to Upgrade IBC Chains and their Clients - -Learn how to upgrade your chain and counterparty clients. {synopsis} - -The information in this doc for upgrading chains is relevant to Cosmos SDK chains. However, the guide for counterparty clients is relevant to any Tendermint client that enables upgrades. - -## IBC Client Breaking Upgrades - -IBC-connected chains must perform an IBC upgrade if their upgrade will break counterparty IBC clients. The current IBC protocol supports upgrading tendermint chains for a specific subset of IBC-client-breaking upgrades. Here is the exhaustive list of IBC client-breaking upgrades and whether the IBC protocol currently supports such upgrades. - -IBC currently does **NOT** support unplanned upgrades. All of the following upgrades must be planned and committed to in advance by the upgrading chain, in order for counterparty clients to maintain their connections securely. - -Note: Since upgrades are only implemented for Tendermint clients, this doc only discusses upgrades on Tendermint chains that would break counterparty IBC Tendermint Clients. - -1. Changing the Chain-ID: **Supported** -2. Changing the UnbondingPeriod: **Partially Supported**, chains may increase the unbonding period with no issues. However, decreasing the unbonding period may irreversibly break some counterparty clients. Thus, it is **not recommended** that chains reduce the unbonding period. -3. Changing the height (resetting to 0): **Supported**, so long as chains remember to increment the revision number in their chain-id. -4. Changing the ProofSpecs: **Supported**, this should be changed if the proof structure needed to verify IBC proofs is changed across the upgrade. Ex: Switching from an IAVL store, to a SimpleTree Store -5. Changing the UpgradePath: **Supported**, this might involve changing the key under which upgraded clients and consensus states are stored in the upgrade store, or even migrating the upgrade store itself. -6. Migrating the IBC store: **Unsupported**, as the IBC store location is negotiated by the connection. -7. Upgrading to a backwards compatible version of IBC: Supported -8. Upgrading to a non-backwards compatible version of IBC: **Unsupported**, as IBC version is negotiated on connection handshake. -9. Changing the Tendermint LightClient algorithm: **Partially Supported**. Changes to the light client algorithm that do not change the ClientState or ConsensusState struct may be supported, provided that the counterparty is also upgraded to support the new light client algorithm. Changes that require updating the ClientState and ConsensusState structs themselves are theoretically possible by providing a path to translate an older ClientState struct into the new ClientState struct; however this is not currently implemented. - -## Step-by-Step Upgrade Process for Cosmos SDK chains - -If the IBC-connected chain is conducting an upgrade that will break counterparty clients, it must ensure that the upgrade is first supported by IBC using the list above and then execute the upgrade process described below in order to prevent counterparty clients from breaking. - -1. Create an `UpgradeProposal` with an IBC ClientState in the `UpgradedClientState` field and a `UpgradePlan` in the `Plan` field. Note that the proposal `Plan` must specify an upgrade height **only** (no upgrade time), and the `ClientState` should only include the fields common to all valid clients and zero out any client-customizable fields (such as TrustingPeriod). -2. Vote on and pass the `UpgradeProposal` - -Upon the `UpgradeProposal` passing, the upgrade module will commit the UpgradedClient under the key: `upgrade/UpgradedIBCState/{upgradeHeight}/upgradedClient`. On the block right before the upgrade height, the upgrade module will also commit an initial consensus state for the next chain under the key: `upgrade/UpgradedIBCState/{upgradeHeight}/upgradedConsState`. - -Once the chain reaches the upgrade height and halts, a relayer can upgrade the counterparty clients to the last block of the old chain. They can then submit the proofs of the `UpgradedClient` and `UpgradedConsensusState` against this last block and upgrade the counterparty client. - -## Step-by-Step Upgrade Process for Relayers Upgrading Counterparty Clients - -Once the upgrading chain has committed to upgrading, relayers must wait till the chain halts at the upgrade height before upgrading counterparty clients. This is because chains may reschedule or cancel upgrade plans before they occur. Thus, relayers must wait till the chain reaches the upgrade height and halts before they can be sure the upgrade will take place. - -Thus, the upgrade process for relayers trying to upgrade the counterparty clients is as follows: - -1. Wait for the upgrading chain to reach the upgrade height and halt -2. Query a full node for the proofs of `UpgradedClient` and `UpgradedConsensusState` at the last height of the old chain. -3. Update the counterparty client to the last height of the old chain using the `UpdateClient` msg. -4. Submit an `UpgradeClient` msg to the counterparty chain with the `UpgradedClient`, `UpgradedConsensusState` and their respective proofs. -5. Submit an `UpdateClient` msg to the counterparty chain with a header from the new upgraded chain. - -The Tendermint client on the counterparty chain will verify that the upgrading chain did indeed commit to the upgraded client and upgraded consensus state at the upgrade height (since the upgrade height is included in the key). If the proofs are verified against the upgrade height, then the client will upgrade to the new client while retaining all of its client-customized fields. Thus, it will retain its old TrustingPeriod, TrustLevel, MaxClockDrift, etc; while adopting the new chain-specified fields such as UnbondingPeriod, ChainId, UpgradePath, etc. Note, this can lead to an invalid client since the old client-chosen fields may no longer be valid given the new chain-chosen fields. Upgrading chains should try to avoid these situations by not altering parameters that can break old clients. For an example, see the UnbondingPeriod example in the supported upgrades section. - -The upgraded consensus state will serve purely as a basis of trust for future `UpdateClientMsgs` and will not contain a consensus root to perform proof verification against. Thus, relayers must submit an `UpdateClientMsg` with a header from the new chain so that the connection can be used for proof verification again. diff --git a/docs/intro/overview.md b/docs/intro/overview.md index 792c269f395c..859f0acce9f7 100644 --- a/docs/intro/overview.md +++ b/docs/intro/overview.md @@ -8,11 +8,11 @@ order: 1 The [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) is an open-source framework for building multi-asset public Proof-of-Stake (PoS) blockchains, like the Cosmos Hub, as well as permissioned Proof-of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**. -The goal of the Cosmos SDK is to allow developers to easily create custom blockchains from scratch that can natively interoperate with other blockchains. We envision the Cosmos SDK as the npm-like framework to build secure blockchain applications on top of [Tendermint](https://github.com/tendermint/tendermint). SDK-based blockchains are built out of composable [modules](../building-modules/intro.md), most of which are open source and readily available for any developers to use. Anyone can create a module for the Cosmos SDK, and integrating already-built modules is as simple as importing them into your blockchain application. What's more, the Cosmos SDK is a capabilities-based system that allows developers to better reason about the security of interactions between modules. For a deeper look at capabilities, jump to [Object-Capability Model](../core/ocap.md). +The goal of the Cosmos SDK is to allow developers to easily create custom blockchains from scratch that can natively interoperate with other blockchains. We envision the Cosmos SDK as the npm-like framework to build secure blockchain applications on top of [Tendermint](https://github.com/tendermint/tendermint). SDK-based blockchains are built out of composable [modules](../building-modules/intro.md), most of which are open-source and readily available for any developers to use. Anyone can create a module for the Cosmos SDK, and integrating already-built modules is as simple as importing them into your blockchain application. What's more, the Cosmos SDK is a capabilities-based system that allows developers to better reason about the security of interactions between modules. For a deeper look at capabilities, jump to [Object-Capability Model](../core/ocap.md). ## What are Application-Specific Blockchains -One development paradigm in the blockchain world today is that of virtual-machine blockchains like Ethereum, where development generally revolves around building decentralised applications on top of an existing blockchain as a set of smart contracts. While smart contracts can be very good for some use cases like single-use applications (e.g. ICOs), they often fall short for building complex decentralised platforms. More generally, smart contracts can be limiting in terms of flexibility, sovereignty and performance. +One development paradigm in the blockchain world today is that of virtual-machine blockchains like Ethereum, where development generally revolves around building decentralized applications on top of an existing blockchain as a set of smart contracts. While smart contracts can be very good for some use cases like single-use applications (e.g. ICOs), they often fall short for building complex decentralized platforms. More generally, smart contracts can be limiting in terms of flexibility, sovereignty and performance. Application-specific blockchains offer a radically different development paradigm than virtual-machine blockchains. An application-specific blockchain is a blockchain customized to operate a single application: developers have all the freedom to make the design decisions required for the application to run optimally. They can also provide better sovereignty, security and performance. @@ -20,10 +20,10 @@ Learn more about [application-specific blockchains](./why-app-specific.md). ## Why the Cosmos SDK -The Cosmos SDK is the most advanced framework for building custom application-specific blockchains today. Here are a few reasons why you might want to consider building your decentralised application with the Cosmos SDK: +The Cosmos SDK is the most advanced framework for building custom application-specific blockchains today. Here are a few reasons why you might want to consider building your decentralized application with the Cosmos SDK: * The default consensus engine available within the Cosmos SDK is [Tendermint Core](https://github.com/tendermint/tendermint). Tendermint is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems. -* The Cosmos SDK is open source and designed to make it easy to build blockchains out of composable [modules](../../x/). As the ecosystem of open source Cosmos SDK modules grows, it will become increasingly easier to build complex decentralised platforms with it. +* The Cosmos SDK is open-source and designed to make it easy to build blockchains out of composable [modules](../../x/). As the ecosystem of open-source Cosmos SDK modules grows, it will become increasingly easier to build complex decentralized platforms with it. * The Cosmos SDK is inspired by capabilities-based security, and informed by years of wrestling with blockchain state-machines. This makes the Cosmos SDK a very secure environment to build blockchains. * Most importantly, the Cosmos SDK has already been used to build many application-specific blockchains that are already in production. Among others, we can cite [Cosmos Hub](https://hub.cosmos.network), [IRIS Hub](https://irisnet.org), [Binance Chain](https://docs.binance.org/), [Terra](https://terra.money/) or [Kava](https://www.kava.io/). [Many more](https://cosmos.network/ecosystem) are building on the Cosmos SDK. diff --git a/docs/intro/sdk-app-architecture.md b/docs/intro/sdk-app-architecture.md index 31e82aff25d4..7a111368338f 100644 --- a/docs/intro/sdk-app-architecture.md +++ b/docs/intro/sdk-app-architecture.md @@ -36,7 +36,7 @@ The Cosmos SDK gives developers maximum flexibility to define the state of their ## Tendermint -Thanks to the Cosmos SDK, developers just have to define the state machine, and [*Tendermint*](https://tendermint.com/docs/introduction/what-is-tendermint.html) will handle replication over the network for them. +Thanks to the Cosmos SDK, developers just have to define the state machine, and [*Tendermint*](https://docs.tendermint.com/master/introduction/what-is-tendermint.html) will handle replication over the network for them. ```text ^ +-------------------------------+ ^ @@ -84,11 +84,11 @@ Note that **Tendermint only handles transaction bytes**. It has no knowledge of Here are the most important messages of the ABCI: -* `CheckTx`: When a transaction is received by Tendermint Core, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. A special handler called the [`AnteHandler`](../basics/gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://docs.tendermint.com/v0.34/tendermint-core/mempool.html#mempool) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet. -* `DeliverTx`: When a [valid block](https://docs.tendermint.com/v0.34/spec/blockchain/blockchain.html#validation) is received by Tendermint Core, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again along with the actual [`Msg` service](../building-modules/msg-services.md) RPC for each message in the transaction. -* `BeginBlock`/`EndBlock`: These messages are executed at the beginning and the end of each block, whether the block contains transaction or not. It is useful to trigger automatic execution of logic. Proceed with caution though, as computationally expensive loops could slow down your blockchain, or even freeze it if the loop is infinite. +* `CheckTx`: When a transaction is received by Tendermint Core, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. . A special handler called the [`AnteHandler`](../basics/gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://docs.tendermint.com/v0.34/tendermint-core/mempool.html#mempool) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet. +* `DeliverTx`: When a [valid block](https://docs.tendermint.com/v0.34/spec/blockchain/blockchain.html#validation) is received by Tendermint Core, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again, along with the actual [`Msg` service](../building-modules/msg-services.md) RPC for each message in the transaction. +* `BeginBlock`/`EndBlock`: These messages are executed at the beginning and the end of each block, whether the block contains transactions or not. It is useful to trigger automatic execution of logic. Proceed with caution though, as computationally expensive loops could slow down your blockchain, or even freeze it if the loop is infinite. -Find a more detailed view of the ABCI methods from the [Tendermint docs](https://docs.tendermint.com/v0.34/spec/abci/abci.html#overview). +Find a more detailed view of the ABCI methods from the [Tendermint docs](https://docs.tendermint.com/v0.35/introduction/what-is-tendermint.html#abci-overview). Any application built on Tendermint needs to implement the ABCI interface in order to communicate with the underlying local Tendermint engine. Fortunately, you do not have to implement the ABCI interface. The Cosmos SDK provides a boilerplate implementation of it in the form of [baseapp](./sdk-design.md#baseapp). diff --git a/docs/intro/sdk-design.md b/docs/intro/sdk-design.md index afcbade1833d..e9f61be4e470 100644 --- a/docs/intro/sdk-design.md +++ b/docs/intro/sdk-design.md @@ -15,9 +15,11 @@ Here is a simplified view of how transactions are handled by an application buil ## `baseapp` -`baseapp` is the boilerplate implementation of a Cosmos SDK application. It comes with an implementation of the ABCI to handle the connection with the underlying consensus engine. Typically, a Cosmos SDK application extends `baseapp` by embedding it in [`app.go`](../basics/app-anatomy.md#core-application-file). See an example of this from the Cosmos SDK application tutorial: +`baseapp` is the boilerplate implementation of a Cosmos SDK application. It comes with an implementation of the ABCI to handle the connection with the underlying consensus engine. Typically, a Cosmos SDK application extends `baseapp` by embedding it in [`app.go`](../basics/app-anatomy.md#core-application-file). -+++ https://github.com/cosmos/sdk-tutorials/blob/c6754a1e313eb1ed973c5c91dcc606f2fd288811/app.go#L72-L92 +Here is an example of this from `simapp`, the Cosmos SDK demonstration app: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/simapp/app.go#L154-L193 The goal of `baseapp` is to provide a secure interface between the store and the extensible state machine while defining as little about the state machine as possible (staying true to the ABCI). diff --git a/docs/intro/why-app-specific.md b/docs/intro/why-app-specific.md index 8efb70cb7f3d..91e84ce0c824 100644 --- a/docs/intro/why-app-specific.md +++ b/docs/intro/why-app-specific.md @@ -8,7 +8,7 @@ This document explains what application-specific blockchains are, and why develo ## What are application-specific blockchains -Application-specific blockchains are blockchains customized to operate a single application. Instead of building a decentralised application on top of an underlying blockchain like Ethereum, developers build their own blockchain from the ground up. This means building a full-node client, a light-client, and all the necessary interfaces (CLI, REST, ...) to interact with the nodes. +Application-specific blockchains are blockchains customized to operate a single application. Instead of building a decentralized application on top of an underlying blockchain like Ethereum, developers build their own blockchain from the ground up. This means building a full-node client, a light-client, and all the necessary interfaces (CLI, REST, ...) to interact with the nodes. ```text ^ +-------------------------------+ ^ @@ -28,13 +28,13 @@ Blockchain node | | Consensus | | ## What are the shortcomings of Smart Contracts -Virtual-machine blockchains like Ethereum addressed the demand for more programmability back in 2014. At the time, the options available for building decentralised applications were quite limited. Most developers would build on top of the complex and limited Bitcoin scripting language, or fork the Bitcoin codebase which was hard to work with and customize. +Virtual-machine blockchains like Ethereum addressed the demand for more programmability back in 2014. At the time, the options available for building decentralized applications were quite limited. Most developers would build on top of the complex and limited Bitcoin scripting language, or fork the Bitcoin codebase which was hard to work with and customize. -Virtual-machine blockchains came in with a new value proposition. Their state-machine incorporates a virtual-machine that is able to interpret turing-complete programs called Smart Contracts. These Smart Contracts are very good for use cases like one-time events (e.g. ICOs), but they can fall short for building complex decentralised platforms. Here is why: +Virtual-machine blockchains came in with a new value proposition. Their state-machine incorporates a virtual-machine that is able to interpret turing-complete programs called Smart Contracts. These Smart Contracts are very good for use cases like one-time events (e.g. ICOs), but they can fall short for building complex decentralized platforms. Here is why: * Smart Contracts are generally developed with specific programming languages that can be interpreted by the underlying virtual-machine. These programming languages are often immature and inherently limited by the constraints of the virtual-machine itself. For example, the Ethereum Virtual Machine does not allow developers to implement automatic execution of code. Developers are also limited to the account-based system of the EVM, and they can only choose from a limited set of functions for their cryptographic operations. These are examples, but they hint at the lack of **flexibility** that a smart contract environment often entails. -* Smart Contracts are all run by the same virtual machine. This means that they compete for resources, which can severely restrain **performance**. And even if the state-machine were to be split in multiple subsets (e.g. via sharding), Smart Contracts would still need to be interpeted by a virtual machine, which would limit performance compared to a native application implemented at state-machine level (our benchmarks show an improvement on the order of 10x in performance when the virtual-machine is removed). -* Another issue with the fact that Smart Contracts share the same underlying environment is the resulting limitation in **sovereignty**. A decentralised application is an ecosystem that involves multiple players. If the application is built on a general-purpose virtual-machine blockchain, stakeholders have very limited sovereignty over their application, and are ultimately superseded by the governance of the underlying blockchain. If there is a bug in the application, very little can be done about it. +* Smart Contracts are all run by the same virtual machine. This means that they compete for resources, which can severely restrain **performance**. And even if the state-machine were to be split in multiple subsets (e.g. via sharding), Smart Contracts would still need to be interpreted by a virtual machine, which would limit performance compared to a native application implemented at state-machine level (our benchmarks show an improvement on the order of 10x in performance when the virtual-machine is removed). +* Another issue with the fact that Smart Contracts share the same underlying environment is the resulting limitation in **sovereignty**. A decentralized application is an ecosystem that involves multiple players. If the application is built on a general-purpose virtual-machine blockchain, stakeholders have very limited sovereignty over their application, and are ultimately superseded by the governance of the underlying blockchain. If there is a bug in the application, very little can be done about it. Application-Specific Blockchains are designed to address these shortcomings. @@ -56,7 +56,7 @@ The list above contains a few examples that show how much flexibility applicatio ### Performance -Decentralised applications built with Smart Contracts are inherently capped in performance by the underlying environment. For a decentralised application to optimise performance, it needs to be built as an application-specific blockchain. Next are some of the benefits an application-specific blockchain brings in terms of performance: +decentralized applications built with Smart Contracts are inherently capped in performance by the underlying environment. For a decentralized application to optimise performance, it needs to be built as an application-specific blockchain. Next are some of the benefits an application-specific blockchain brings in terms of performance: * Developers of application-specific blockchains can choose to operate with a novel consensus engine such as Tendermint BFT. Compared to Proof-of-Work (used by most virtual-machine blockchains today), it offers significant gains in throughput. * An application-specific blockchain only operates a single application, so that the application does not compete with others for computation and storage. This is the opposite of most non-sharded virtual-machine blockchains today, where smart contracts all compete for computation and storage. @@ -66,13 +66,13 @@ Decentralised applications built with Smart Contracts are inherently capped in p Security is hard to quantify, and greatly varies from platform to platform. That said here are some important benefits an application-specific blockchain can bring in terms of security: -* Developers can choose proven programming languages like Golang when building their application-specific blockchains, as opposed to smart contract programming languages that are often more immature. +* Developers can choose proven programming languages like Go when building their application-specific blockchains, as opposed to smart contract programming languages that are often more immature. * Developers are not constrained by the cryptographic functions made available by the underlying virtual-machines. They can use their own custom cryptography, and rely on well-audited crypto libraries. * Developers do not have to worry about potential bugs or exploitable mechanisms in the underlying virtual-machine, making it easier to reason about the security of the application. ### Sovereignty -One of the major benefits of application-specific blockchains is sovereignty. A decentralised application is an ecosystem that involves many actors: users, developers, third-party services, and more. When developers build on virtual-machine blockchain where many decentralised applications coexist, the community of the application is different than the community of the underlying blockchain, and the latter supersedes the former in the governance process. If there is a bug or if a new feature is needed, stakeholders of the application have very little leeway to upgrade the code. If the community of the underlying blockchain refuses to act, nothing can happen. +One of the major benefits of application-specific blockchains is sovereignty. A decentralized application is an ecosystem that involves many actors: users, developers, third-party services, and more. When developers build on virtual-machine blockchain where many decentralized applications coexist, the community of the application is different than the community of the underlying blockchain, and the latter supersedes the former in the governance process. If there is a bug or if a new feature is needed, stakeholders of the application have very little leeway to upgrade the code. If the community of the underlying blockchain refuses to act, nothing can happen. The fundamental issue here is that the governance of the application and the governance of the network are not aligned. This issue is solved by application-specific blockchains. Because application-specific blockchains specialize to operate a single application, stakeholders of the application have full control over the entire chain. This ensures that the community will not be stuck if a bug is discovered, and that it has the freedom to choose how it is going to evolve. diff --git a/docs/ko/README.md b/docs/ko/README.md deleted file mode 100755 index d93846331483..000000000000 --- a/docs/ko/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Cosmos SDK Documentation (Korean) - -A Korean translation of the Cosmos SDK documentation is not available for this version. If you would like to help with translating, please see [Internationalization](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md#internationalization). A `v0.39` version of the documentation can be found [here](https://docs.cosmos.network/v0.39/kr/). diff --git a/docs/migrations/README.md b/docs/migrations/README.md index 4b9f85863479..b5e08ec462f4 100644 --- a/docs/migrations/README.md +++ b/docs/migrations/README.md @@ -8,6 +8,6 @@ parent: This document contains all the migration guides to update your app and modules to the current Cosmos SDK. -1. [Chain Upgrade Guide to v0.44](./chain-upgrade-guide-044.md) -1. Chain Upgrade Guide to v0.45: no migration is required. See [Release Notes](https://github.com/cosmos/cosmos-sdk/blob/v0.45.0/RELEASE_NOTES.md) and [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.0/CHANGELOG.md) for the list of API and State Machine breaking changes. -1. [REST Endpoints Migration](./rest.md) +1. Chain Upgrade Guide to v0.46: + * See [UPGRADING.md (TODO)](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md) for breaking changes and deprecations upgrade instructions. + * See [Release Notes](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/RELEASE_NOTES.md) and [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/CHANGELOG.md) for the exhaustive list of API and State Machine breaking changes. diff --git a/docs/migrations/chain-upgrade-guide-044.md b/docs/migrations/chain-upgrade-guide-044.md deleted file mode 100644 index 4e8adf01fba4..000000000000 --- a/docs/migrations/chain-upgrade-guide-044.md +++ /dev/null @@ -1,249 +0,0 @@ - - -# Chain Upgrade Guide to v0.44 - -This document provides guidelines for a chain upgrade from v0.42 to v0.44 and an example of the upgrade process using `simapp`. {synopsis} - -::: tip -You must upgrade to Stargate v0.42 before upgrading to v0.44. If you have not done so, please see [Chain Upgrade Guide to v0.42](/v0.42/migrations/chain-upgrade-guide-040.html). Please note, v0.43 was discontinued shortly after being released and all chains should upgrade directly to v0.44 from v0.42. -::: - -## Prerequisite Readings - -* [Upgrading Modules](../building-modules/upgrade.html) {prereq} -* [In-Place Store Migrations](../core/upgrade.html) {prereq} -* [Cosmovisor](../run-node/cosmovisor.html) {prereq} - -Cosmos SDK v0.44 introduces a new way of handling chain upgrades that no longer requires exporting state to JSON, making the necesssary changes, and then creating a new chain with the modified JSON as the new genesis file. - -The IBC module for the Cosmos SDK has moved to its [own repository](https://github.com/cosmos/ibc-go) for v0.42 and later versions. If you are using IBC, make sure to also go through the [IBC migration docs](https://github.com/cosmos/ibc-go/blob/main/docs/migrations/ibc-migration-043.md). - -Instead of starting a new chain, the upgrade binary will read the existing database and perform in-place store migrations. This new way of handling chain upgrades can be used alongside [Cosmovisor](../run-node/cosmovisor.html) to make the upgrade process seamless. - -## In-Place Store Migrations - -We recommend using [In-Place Store Migrations](../core/upgrade.html) to upgrade your chain from v0.42 to v0.44. The first step is to make sure all your modules follow the [Module Upgrade Guide](../building-modules/upgrade.html). The second step is to add an [upgrade handler](../core/upgrade.html#running-migrations) to `app.go`. - -In this document, we'll provide an example of what the upgrade handler looks like for a chain upgrading module versions for the first time. It's critical to note that the initial consensus version of each module must be set to `1` rather than `0` or else the upgrade handler will re-initialize each module. - -In addition to migrating existing modules, the upgrade handler also performs store upgrades for new modules. In the example below, we'll be adding store migrations for two new modules made available in v0.44: `x/authz` and `x/feegrant`. - -## Using Cosmovisor - -We recommend validators use [Cosmovisor](../run-node/cosmovisor.html), which is a process manager for running application binaries. For security reasons, we recommend validators build their own upgrade binaries rather than enabling the auto-download option. Validators may still choose to use the auto-download option if the necessary security guarantees are in place (i.e. the URL provided in the upgrade proposal for the downloadable upgrade binary includes a proper checksum). - -::: tip -If validators would like to enable the auto-download option, and they are currently running an application using Cosmos SDK `v0.42`, they will need to use Cosmovisor [`v0.1`](https://github.com/cosmos/cosmos-sdk/releases/tag/cosmovisor%2Fv0.1.0). Later versions of Cosmovisor do not support Cosmos SDK `v0.42` or earlier if the auto-download option is enabled. -::: - -Validators can use the auto-restart option to prevent unnecessary downtime during the upgrade process. The auto-restart option will automatically restart the chain with the upgrade binary once the chain has halted at the proposed upgrade height. With the auto-restart option, validators can prepare the upgrade binary in advance and then relax at the time of the upgrade. - -## Migrating app.toml - -With the update to `v0.44`, new server configuration options have been added to `app.toml`. The updates include new configuration sections for Rosetta and gRPC Web as well as a new configuration option for State Sync. Check out the default [`app.toml`](https://github.com/cosmos/cosmos-sdk/blob/release/v0.44.x/server/config/toml.go) file in the latest version of `v0.44` for more information. - -## Example: Simapp Upgrade - -The following example will walk through the upgrade process using `simapp` as our blockchain application. We will be upgrading `simapp` from v0.42 to v0.44. We will be building the upgrade binary ourselves and enabling the auto-restart option. - -::: tip -In the following example, we start a new chain from `v0.42`. The binary for this version will be the genesis binary. For validators using Cosmovisor for the first time on an existing chain, either the binary for the current version of the chain should be used as the genesis binary (i.e. the starting binary) or validators should update the `current` symbolic link to point to the upgrade directory. For more information, see [Cosmovisor](../run-node/cosmovisor.html). -::: - -### Initial Setup - -From within the `cosmos-sdk` repository, check out the latest `v0.42.x` release: - -```sh -git checkout release/v0.42.x -``` - -Build the `simd` binary for the latest `v0.42.x` release (the genesis binary): - -```sh -make build -``` - -Reset `~/.simapp` (never do this in a production environment): - -```sh -./build/simd unsafe-reset-all -``` - -Configure the `simd` binary for testing: - -```sh -./build/simd config chain-id test -./build/simd config keyring-backend test -./build/simd config broadcast-mode block -``` - -Initialize the node and overwrite any previous genesis file (never do this in a production environment): - - - -```sh -./build/simd init test --chain-id test --overwrite -``` - -Set the minimum gas price to `0stake` in `~/.simapp/config/app.toml`: - -```sh -minimum-gas-prices = "0stake" -``` - -For the purpose of this demonstration, change `voting_period` in `genesis.json` to a reduced time of 20 seconds (`20s`): - -```sh -cat <<< $(jq '.app_state.gov.voting_params.voting_period = "20s"' $HOME/.simapp/config/genesis.json) > $HOME/.simapp/config/genesis.json -``` - -Create a new key for the validator, then add a genesis account and transaction: - - - - -```sh -./build/simd keys add validator -./build/simd add-genesis-account validator 5000000000stake --keyring-backend test -./build/simd gentx validator 1000000stake --chain-id test -./build/simd collect-gentxs -``` - -Now that our node is initialized and we are ready to start a new `simapp` chain, let's set up `cosmovisor` and the genesis binary. - -### Cosmovisor Setup - -Install the `cosmovisor` binary: - -```sh -go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v0.1.0 -``` - -::: tip -If you are using go `v1.15` or earlier, you will need to change out of the `cosmos-sdk` directory, run `go get` instead of `go install`, and then change back into the `cosmos-sdk` repository. -::: - -Set the required environment variables: - -```sh -export DAEMON_NAME=simd -export DAEMON_HOME=$HOME/.simapp -``` - -Set the optional environment variable to trigger an automatic restart: - -```sh -export DAEMON_RESTART_AFTER_UPGRADE=true -``` - -Create the folder for the genesis binary and copy the `v0.42.x` binary: - -```sh -mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin -cp ./build/simd $DAEMON_HOME/cosmovisor/genesis/bin -``` - -Now that `cosmovisor` is installed and the genesis binary has been added, let's add the upgrade handler to `simapp/app.go` and prepare the upgrade binary. - -### Chain Upgrade - - - -Check out `release/v0.44.x`: - -```sh -git checkout release/v0.44.x -``` - -Add the following to `simapp/app.go` inside `NewSimApp` and after `app.UpgradeKeeper`: - -```go - app.registerUpgradeHandlers() -``` - -Add the following to `simapp/app.go` after `NewSimApp` (to learn more about the upgrade handler, see the [In-Place Store Migrations](../core/upgrade.html)): - -```go -func (app *SimApp) registerUpgradeHandlers() { - app.UpgradeKeeper.SetUpgradeHandler("v0.44", func(ctx sdk.Context, plan upgradetypes.Plan, _ module.VersionMap) (module.VersionMap, error) { - // 1st-time running in-store migrations, using 1 as fromVersion to - // avoid running InitGenesis. - fromVM := map[string]uint64{ - "auth": 1, - "bank": 1, - "capability": 1, - "crisis": 1, - "distribution": 1, - "evidence": 1, - "gov": 1, - "mint": 1, - "params": 1, - "slashing": 1, - "staking": 1, - "upgrade": 1, - "vesting": 1, - "ibc": 1, - "genutil": 1, - "transfer": 1, - } - - return app.mm.RunMigrations(ctx, app.configurator, fromVM) - }) - - upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() - if err != nil { - panic(err) - } - - if upgradeInfo.Name == "v0.44" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - storeUpgrades := storetypes.StoreUpgrades{ - Added: []string{"authz", "feegrant"}, - } - - // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) - } -} -``` - -Add `storetypes` to imports: - -```go - storetypes "github.com/cosmos/cosmos-sdk/store/types" -``` - -Build the `simd` binary for `v0.44.x` (the upgrade binary): - -```sh -make build -``` - -Create the folder for the upgrade binary and copy the `v0.44.x` binary: - -```sh -mkdir -p $DAEMON_HOME/cosmovisor/upgrades/v0.44/bin -cp ./build/simd $DAEMON_HOME/cosmovisor/upgrades/v0.44/bin -``` - -Now that we have added the upgrade handler and prepared the upgrade binary, we are ready to start `cosmovisor` and simulate the upgrade proposal process. - -### Upgrade Proposal - -Start the node using `cosmovisor`: - -```sh -cosmovisor start -``` - -Open a new terminal window and submit an upgrade proposal along with a deposit and a vote (these commands must be run within 20 seconds of each other): - -```sh -./build/simd tx gov submit-proposal software-upgrade v0.44 --title upgrade --description upgrade --upgrade-height 20 --from validator --yes -./build/simd tx gov deposit 1 10000000stake --from validator --yes -./build/simd tx gov vote 1 yes --from validator --yes -``` - -Confirm the chain automatically upgrades at height 20. diff --git a/docs/migrations/rest.md b/docs/migrations/rest.md deleted file mode 100644 index 9a65a3d95c70..000000000000 --- a/docs/migrations/rest.md +++ /dev/null @@ -1,85 +0,0 @@ - - -# REST Endpoints Migration - -Migrate to gRPC-Gateway REST endpoints. Legacy REST endpoints were marked as deprecated in v0.40 and will be removed in v0.45. {synopsis} - -::: warning -Two Legacy REST endpoints (`POST /txs` and `POST /txs/encode`) were removed ahead of schedule in v0.44 due to a security vulnerability. -::: - -## Legacy REST Endpoints - -Cosmos SDK versions v0.39 and earlier registered REST endpoints using a package called `gorilla/mux`. These REST endpoints were marked as deprecated in v0.40 and have since been referred to as legacy REST endpoints. Legacy REST endpoints will be officially removed in v0.45. - -## gRPC-Gateway REST Endpoints - -Following the Protocol Buffers migration in v0.40, Cosmos SDK has been set to take advantage of a vast number of gRPC tools and solutions. v0.40 introduced new REST endpoints generated from [gRPC `Query` services](../building-modules/query-services.md) using [grpc-gateway](https://grpc-ecosystem.github.io/grpc-gateway/). These new REST endpoints are referred to as gRPC-Gateway REST endpoints. - -## Migrating to New REST Endpoints - -| Legacy REST Endpoint | Description | New gRPC-gateway REST Endpoint | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `GET /txs/{hash}` | Query tx by hash | `GET /cosmos/tx/v1beta1/txs/{hash}` | -| `GET /txs` | Query tx by events | `GET /cosmos/tx/v1beta1/txs` | -| `POST /txs` | Broadcast tx | `POST /cosmos/tx/v1beta1/txs` | -| `POST /txs/encode` | Encodes an Amino JSON tx to an Amino binary tx | N/A, use Protobuf directly | -| `POST /txs/decode` | Decodes an Amino binary tx into an Amino JSON tx | N/A, use Protobuf directly | -| `POST /bank/*` | Create unsigned `Msg`s for bank tx | N/A, use Protobuf directly | -| `GET /bank/balances/{address}` | Get the balance of an address | `GET /cosmos/bank/v1beta1/balances/{address}` | -| `GET /bank/total` | Get the total supply of all coins | `GET /cosmos/bank/v1beta1/supply` | -| `GET /bank/total/{denom}` | Get the total supply of one coin | `GET /cosmos/bank/v1beta1/supply/{denom}` | -| `POST /distribution/delegators/{delegatorAddr}/rewards` | Withdraw all delegator rewards | N/A, use Protobuf directly | -| `POST /distribution/*` | Create unsigned `Msg`s for distribution | N/A, use Protobuf directly | -| `GET /distribution/delegators/{delegatorAddr}/rewards` | Get the total rewards balance from all delegations | `GET /cosmos/distribution/v1beta1/v1beta1/delegators/{delegator_address}/rewards` | -| `GET /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}` | Query a delegation reward | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddr}/rewards/{validatorAddr}` | -| `GET /distribution/delegators/{delegatorAddr}/withdraw_address` | Get the rewards withdrawal address | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddr}/withdraw_address` | -| `GET /distribution/validators/{validatorAddr}` | Validator distribution information | N/A | -| `GET /distribution/validators/{validatorAddr}/rewards` | Commission and outstanding rewards of a single a validator | `GET /cosmos/distribution/v1beta1/validators/{validatorAddr}/commission`
`GET /cosmos/distribution/v1beta1/validators/{validatorAddr}/outstanding_rewards` | -| `GET /distribution/validators/{validatorAddr}/outstanding_rewards` | Outstanding rewards of a single validator | `GET /cosmos/distribution/v1beta1/validators/{validatorAddr}/outstanding_rewards` | -| `GET /distribution/parameters` | Get the current distribution parameter values | `GET /cosmos/distribution/v1beta1/params` | -| `GET /distribution/community_pool` | Get the amount held in the community pool | `GET /cosmos/distribution/v1beta1/community_pool` | -| `GET /evidence/{evidence-hash}` | Get evidence by hash | `GET /cosmos/evidence/v1beta1/evidence/{evidence_hash}` | -| `GET /evidence` | Get all evidence | `GET /cosmos/evidence/v1beta1/evidence` | -| `POST /gov/*` | Create unsigned `Msg`s for gov | N/A, use Protobuf directly | -| `GET /gov/parameters/{type}` | Get government parameters | `GET /cosmos/gov/v1beta1/params/{type}` | -| `GET /gov/proposals` | Get all proposals | `GET /cosmos/gov/v1beta1/proposals` | -| `GET /gov/proposals/{proposal-id}` | Get proposal by id | `GET /cosmos/gov/v1beta1/proposals/{proposal-id}` | -| `GET /gov/proposals/{proposal-id}/proposer` | Get proposer of a proposal | N/A, use Query tx by events endpoint | -| `GET /gov/proposals/{proposal-id}/deposits` | Get deposits of a proposal | `GET /cosmos/gov/v1beta1/proposals/{proposal-id}/deposits` | -| `GET /gov/proposals/{proposal-id}/deposits/{depositor}` | Get depositor a of deposit | `GET /cosmos/gov/v1beta1/proposals/{proposal-id}/deposits/{depositor}` | -| `GET /gov/proposals/{proposal-id}/tally` | Get tally of a proposal | `GET /cosmos/gov/v1beta1/proposals/{proposal-id}/tally` | -| `GET /gov/proposals/{proposal-id}/votes` | Get votes of a proposal | `GET /cosmos/gov/v1beta1/proposals/{proposal-id}/votes` | -| `GET /gov/proposals/{proposal-id}/votes/{vote}` | Get a particular vote | `GET /cosmos/gov/v1beta1/proposals/{proposal-id}/votes/{vote}` | -| `GET /minting/parameters` | Get parameters for minting | `GET /cosmos/minting/v1beta1/params` | -| `GET /minting/inflation` | Get minting inflation | `GET /cosmos/minting/v1beta1/inflation` | -| `GET /minting/annual-provisions` | Get minting annual provisions | `GET /cosmos/minting/v1beta1/annual_provisions` | -| `POST /slashing/*` | Create unsigned `Msg`s for slashing | N/A, use Protobuf directly | -| `GET /slashing/validators/{validatorPubKey}/signing_info` | Get validator signing info | `GET /cosmos/slashing/v1beta1/signing_infos/{cons_address}` (Use consensus address instead of pubkey) | -| `GET /slashing/signing_infos` | Get all signing infos | `GET /cosmos/slashing/v1beta1/signing_infos` | -| `GET /slashing/parameters` | Get slashing parameters | `GET /cosmos/slashing/v1beta1/params` | -| `POST /staking/*` | Create unsigned `Msg`s for staking | N/A, use Protobuf directly | -| `GET /staking/delegators/{delegatorAddr}/delegations` | Get all delegations from a delegator | `GET /cosmos/staking/v1beta1/delegations/{delegatorAddr}` | -| `GET /staking/delegators/{delegatorAddr}/unbonding_delegations` | Get all unbonding delegations from a delegator | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations` | -| `GET /staking/delegators/{delegatorAddr}/txs` | Get all staking txs (i.e msgs) from a delegator | Removed | -| `GET /staking/delegators/{delegatorAddr}/validators` | Query all validators that a delegator is bonded to | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators` | -| `GET /staking/delegators/{delegatorAddr}/validators/{validatorAddr}` | Query a validator that a delegator is bonded to | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr}` | -| `GET /staking/delegators/{delegatorAddr}/delegations/{validatorAddr}` | Query a delegation between a delegator and a validator | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}` | -| `GET /staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}` | Query all unbonding delegations between a delegator and a validator | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}` | -| `GET /staking/redelegations` | Query redelegations | `GET /cosmos/staking/v1beta1/v1beta1/delegators/{delegator_addr}/redelegations` | -| `GET /staking/validators` | Get all validators | `GET /cosmos/staking/v1beta1/validators` | -| `GET /staking/validators/{validatorAddr}` | Get a single validator info | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}` | -| `GET /staking/validators/{validatorAddr}/delegations` | Get all delegations to a validator | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations` | -| `GET /staking/validators/{validatorAddr}/unbonding_delegations` | Get all unbonding delegations from a validator | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations` | -| `GET /staking/historical_info/{height}` | Get HistoricalInfo at a given height | `GET /cosmos/staking/v1beta1/historical_info/{height}` | -| `GET /staking/pool` | Get the current state of the staking pool | `GET /cosmos/staking/v1beta1/pool` | -| `GET /staking/parameters` | Get the current staking parameter values | `GET /cosmos/staking/v1beta1/params` | -| `POST /upgrade/*` | Create unsigned `Msg`s for upgrade | N/A, use Protobuf directly | -| `GET /upgrade/current` | Get the current plan | `GET /cosmos/upgrade/v1beta1/current_plan` | -| `GET /upgrade/applied_plan/{name}` | Get a previously applied plan | `GET /cosmos/upgrade/v1beta1/applied/{name}` | - -## Migrating to gRPC - -Instead of hitting REST endpoints as described above, the Cosmos SDK also exposes a gRPC server. Any client can use gRPC instead of REST to interact with the node. An overview of different ways to communicate with a node can be found [here](../core/grpc_rest.md), and a concrete tutorial for setting up a gRPC client can be found [here](../run-node/txs.md#programmatically-with-go). diff --git a/docs/output/CNAME b/docs/output/CNAME deleted file mode 100644 index 784f0db98683..000000000000 --- a/docs/output/CNAME +++ /dev/null @@ -1 +0,0 @@ -docs.cosmos.network \ No newline at end of file diff --git a/docs/package-lock.json b/docs/package-lock.json index a1227c824858..6197f8c9c3b2 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -2079,9 +2079,9 @@ } }, "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dependencies": { "lodash": "^4.17.14" } @@ -14551,9 +14551,9 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "requires": { "lodash": "^4.17.14" } diff --git a/docs/ru/README.md b/docs/ru/README.md deleted file mode 100755 index e6906b2b89b3..000000000000 --- a/docs/ru/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Cosmos SDK Documentation (Russian) - -A Russian translation of the Cosmos SDK documentation is not available for this version. If you would like to help with translating, please see [Internationalization](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md#internationalization). A `v0.39` version of the documentation can be found [here](https://github.com/cosmos/cosmos-sdk/tree/v0.39.3/docs/ru). diff --git a/docs/run-node/interact-node.md b/docs/run-node/interact-node.md index 270326ad03ad..0daf04e51c5c 100644 --- a/docs/run-node/interact-node.md +++ b/docs/run-node/interact-node.md @@ -109,16 +109,28 @@ Assuming the state at that block has not yet been pruned by the node, this query The following snippet shows how to query the state using gRPC inside a Go program. The idea is to create a gRPC connection, and use the Protobuf-generated client code to query the gRPC server. +#### Install Cosmos SDK + +Add below line to `go.mod` to replace protobuf, read more [#8469](https://github.com/cosmos/cosmos-sdk/issues/8469) + +```go +replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 +``` + +```bash +go get github.com/cosmos/cosmos-sdk@main +``` + ```go import ( "context" "fmt" - "google.golang.org/grpc" + "google.golang.org/grpc" - "github.com/cosmos/cosmo-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) func queryState() error { @@ -128,20 +140,23 @@ func queryState() error { } // Create a connection to the gRPC server. - grpcConn := grpc.Dial( + grpcConn, err := grpc.Dial( "127.0.0.1:9090", // your gRPC server address. grpc.WithInsecure(), // The Cosmos SDK doesn't support any transport security mechanism. // This instantiates a general gRPC codec which handles proto bytes. We pass in a nil interface registry // if the request/response types contain interface instead of 'nil' you should pass the application specific codec. grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(nil).GRPCCodec())), ) + if err != nil { + return err + } defer grpcConn.Close() // This creates a gRPC client to query the x/bank service. bankClient := banktypes.NewQueryClient(grpcConn) bankRes, err := bankClient.Balance( context.Background(), - &banktypes.QueryBalanceRequest{Address: myAddress, Denom: "atom"}, + &banktypes.QueryBalanceRequest{Address: myAddress.String(), Denom: "atom"}, ) if err != nil { return err @@ -167,8 +182,10 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - "github.com/cosmos/cosmos-sdk/types/tx" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) func queryState() error { @@ -177,13 +194,13 @@ func queryState() error { var header metadata.MD bankRes, err = bankClient.Balance( metadata.AppendToOutgoingContext(context.Background(), grpctypes.GRPCBlockHeightHeader, "12"), // Add metadata to request - &banktypes.QueryBalanceRequest{Address: myAddress, Denom: denom}, + &banktypes.QueryBalanceRequest{Address: myAddress.String(), Denom: "atom"}, grpc.Header(&header), // Retrieve header from response ) if err != nil { return err } - blockHeight = header.Get(grpctypes.GRPCBlockHeightHeader) + blockHeight := header.Get(grpctypes.GRPCBlockHeightHeader) fmt.Println(blockHeight) // Prints the block height (12) diff --git a/docs/run-node/keyring.md b/docs/run-node/keyring.md index db971d5a1794..8506ef4c04b4 100644 --- a/docs/run-node/keyring.md +++ b/docs/run-node/keyring.md @@ -110,7 +110,7 @@ The `memory` backend stores keys in memory. The keys are immediately deleted aft Make sure you can build your own binary, and replace `simd` with the name of your binary in the snippets. ::: -Applications developed using the Cosmos SDK come with the `keys` subcommand. For the purpose of this tutorial, we're running the `simd` CLI, which is an application built using the Cosmos SDK for testing and educational purposes. For more information, see [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc3/simapp). +Applications developed using the Cosmos SDK come with the `keys` subcommand. For the purpose of this tutorial, we're running the `simd` CLI, which is an application built using the Cosmos SDK for testing and educational purposes. For more information, see [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/main/simapp). You can use `simd keys` for help about the keys command and `simd keys [command] --help` for more information about a particular subcommand. @@ -129,7 +129,7 @@ MY_VALIDATOR_ADDRESS=$(simd keys show my_validator -a --keyring-backend test) This command generates a new 24-word mnemonic phrase, persists it to the relevant backend, and outputs information about the keypair. If this keypair will be used to hold value-bearing tokens, be sure to write down the mnemonic phrase somewhere safe! -By default, the keyring generates a `secp256k1` keypair. The keyring also supports `ed25519` keys, which may be created by passing the `--algo ed25519` flag. A keyring can of course hold both types of keys simultaneously, and the Cosmos SDK's `x/auth` module (in particular its [AnteHandlers](../core/baseapp.md#antehandler)) supports natively these two public key algorithms. +By default, the keyring generates a `secp256k1` keypair. The keyring also supports `ed25519` keys, which may be created by passing the `--algo ed25519` flag. A keyring can of course hold both types of keys simultaneously, and the Cosmos SDK's `x/auth` module (in particular its [middlewares](../core/baseapp.md#middleware)) supports natively these two public key algorithms. ## Next {hide} diff --git a/docs/run-node/rosetta.md b/docs/run-node/rosetta.md index c1a6a5cc93a4..e3d94492f00d 100644 --- a/docs/run-node/rosetta.md +++ b/docs/run-node/rosetta.md @@ -28,7 +28,7 @@ After that line, add the following: ```go rootCmd.AddCommand( - server.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler) + server.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec) ) ``` diff --git a/docs/run-node/run-node.md b/docs/run-node/run-node.md index 6f70b490d628..2233f63aa128 100644 --- a/docs/run-node/run-node.md +++ b/docs/run-node/run-node.md @@ -4,7 +4,7 @@ order: 2 # Running a Node -Now that the application is ready and the keyring populated, it's time to see how to run the blockchain node. In this section, the application we are running is called [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc3/simapp), and its corresponding CLI binary `simd`. {synopsis} +Now that the application is ready and the keyring populated, it's time to see how to run the blockchain node. In this section, the application we are running is called [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/main/simapp), and its corresponding CLI binary `simd`. {synopsis} ## Pre-requisite Readings @@ -67,7 +67,7 @@ Now that you have created a local account, go ahead and grant it some `stake` to simd add-genesis-account $MY_VALIDATOR_ADDRESS 100000000000stake ``` -Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the Cosmos SDK have the `{amount}{denom}` format: `amount` is is a 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc3/simapp). For your own chain with its own staking denom, that token identifier should be used instead. +Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the Cosmos SDK have the `{amount}{denom}` format: `amount` is is a 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/main/simapp). For your own chain with its own staking denom, that token identifier should be used instead. Now that your account has some tokens, you need to add a validator to your chain. Validators are special full-nodes that participate in the consensus process (implemented in the [underlying consensus engine](../intro/sdk-app-architecture.md#tendermint)) in order to add new blocks to the chain. Any account can declare its intention to become a validator operator, but only those with sufficient delegation get to enter the active set (for example, only the top 125 validator candidates with the most delegation get to be validators in the Cosmos Hub). For this guide, you will add your local node (created via the `init` command above) as a validator of your chain. Validators can be declared before a chain is first started via a special transaction included in the genesis file called a `gentx`: @@ -114,7 +114,7 @@ One example config to tweak is the `minimum-gas-prices` field inside `app.toml`, Now that everything is set up, you can finally start your node: ```bash -simd start --mode validator +simd start ``` > Note: By default nodes are run in full node mode. Running a local network means in most cases, the node is the only node in the network, requiring you to set the mode. @@ -123,7 +123,7 @@ You should see blocks come in. The previous command allow you to run a single node. This is enough for the next section on interacting with this node, but you may wish to run multiple nodes at the same time, and see how consensus happens between them. -The naive way would be to run the same commands again in separate terminal windows. This is possible, however in the Cosmos SDK, we leverage the power of [Docker Compose](https://docs.docker.com/compose/) to run a localnet. If you need inspiration on how to set up your own localnet with Docker Compose, you can have a look at the Cosmos SDK's [`docker-compose.yml`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/docker-compose.yml). +The naive way would be to run the same commands again in separate terminal windows. This is possible, however in the Cosmos SDK, we leverage the power of [Docker Compose](https://docs.docker.com/compose/) to run a localnet. If you need inspiration on how to set up your own localnet with Docker Compose, you can have a look at the Cosmos SDK's [`docker-compose.yml`](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/docker-compose.yml). ## Next {hide} diff --git a/docs/run-node/txs.md b/docs/run-node/txs.md index e5796a533e41..9674d32f4eed 100644 --- a/docs/run-node/txs.md +++ b/docs/run-node/txs.md @@ -144,7 +144,7 @@ priv2, _, addr2 := testdata.KeyTestPubAddr() priv3, _, addr3 := testdata.KeyTestPubAddr() ``` -Populating the `TxBuilder` can be done via its [methods](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/client/tx_config.go#L32-L45): +Populating the `TxBuilder` can be done via its [methods](https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/tx_config.go#L33-L50): ```go import ( @@ -177,7 +177,7 @@ At this point, `TxBuilder`'s underlying transaction is ready to be signed. ### Signing a Transaction -We set encoding config to use Protobuf, which will use `SIGN_MODE_DIRECT` by default. As per [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc6/docs/architecture/adr-020-protobuf-transaction-encoding.md), each signer needs to sign the `SignerInfo`s of all other signers. This means that we need to perform two steps sequentially: +We set encoding config to use Protobuf, which will use `SIGN_MODE_DIRECT` by default. As per [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-020-protobuf-transaction-encoding.md), each signer needs to sign the `SignerInfo`s of all other signers. This means that we need to perform two steps sequentially: * for each signer, populate the signer's `SignerInfo` inside `TxBuilder`, * once all `SignerInfo`s are populated, for each signer, sign the `SignDoc` (the payload to be signed). diff --git a/docs/versions b/docs/versions index aec06db250e3..dece42efc0a4 100644 --- a/docs/versions +++ b/docs/versions @@ -1,4 +1,5 @@ -master master -launchpad/backports v0.39 -release/v0.42.x v0.42 release/v0.44.x v0.44 +release/v0.45.x v0.45 +main master +main main +release/v0.46.x v0.46 diff --git a/docs/zh/README.md b/docs/zh/README.md deleted file mode 100644 index 5cd44487a6f7..000000000000 --- a/docs/zh/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Cosmos SDK Documentation (Chinese) - -A Chinese translation of the Cosmos SDK documentation is not available for this version. If you would like to help with translating, please see [Internationalization](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md#internationalization). A `v0.39` version of the documentation can be found [here](https://docs.cosmos.network/v0.39/cn/). diff --git a/errors/CHANGELOG.md b/errors/CHANGELOG.md index dfe84a504ec9..7b1889d7334e 100644 --- a/errors/CHANGELOG.md +++ b/errors/CHANGELOG.md @@ -15,10 +15,7 @@ Change log entries are to be added to the Unreleased section under the appropriate stanza (see below). Each entry should ideally include a tag and the Github issue reference in the following format: -* () \# message - -The issue numbers will later be link-ified during the release process so you do -not have to worry about including a link manually, but you can if you wish. +* () [#] Changelog message. Types of changes (Stanzas): @@ -26,14 +23,18 @@ Types of changes (Stanzas): "Improvements" for changes in existing functionality. "Deprecated" for soon-to-be removed features. "Bug Fixes" for any bug fixes. -"Client Breaking" for breaking Protobuf, gRPC and REST routes used by end-users. -"CLI Breaking" for breaking CLI commands. "API Breaking" for breaking exported APIs used by developers building on SDK. Ref: https://keepachangelog.com/en/1.0.0/ --> # Changelog +## [Unreleased] + +### Improvements + +* [\#11762](https://github.com/cosmos/cosmos-sdk/pull/11762) Improve error messages + ## v1.0.0 ### Features @@ -42,4 +43,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#11274](https://github.com/cosmos/cosmos-sdk/pull/11274) Add `RegisterWithGRPCCode` function to associate a gRPC error code with errors. ### API Breaking + * [\#11274](https://github.com/cosmos/cosmos-sdk/pull/11274) `New` now is an alias for `Register` and should only be used in initialization code. + +### Bug Fixes + +* [\#11714](https://github.com/cosmos/cosmos-sdk/pull/11714) Add wrapped error messages in `GRPCStatus()` diff --git a/errors/abci.go b/errors/abci.go index afd535e198c6..603f3b36ff1c 100644 --- a/errors/abci.go +++ b/errors/abci.go @@ -42,9 +42,8 @@ func debugErrEncoder(err error) string { return fmt.Sprintf("%+v", err) } -// The defaultErrEncoder applies Redact on the error before encoding it with its internal error message. func defaultErrEncoder(err error) string { - return Redact(err).Error() + return err.Error() } type coder interface { @@ -111,19 +110,3 @@ func errIsNil(err error) bool { } return false } - -var errPanicWithMsg = Wrapf(ErrPanic, "panic message redacted to hide potentially sensitive system info") - -// Redact replaces an error that is not initialized as an ABCI Error with a -// generic internal error instance. If the error is an ABCI Error, that error is -// simply returned. -func Redact(err error) error { - if ErrPanic.Is(err) { - return errPanicWithMsg - } - if abciCode(err) == internalABCICode { - return errInternal - } - - return err -} diff --git a/errors/abci_test.go b/errors/abci_test.go index b9370bd7d601..0982709bf7e6 100644 --- a/errors/abci_test.go +++ b/errors/abci_test.go @@ -57,13 +57,6 @@ func (s *abciTestSuite) TestABCInfo() { wantCode: 0, wantSpace: "", }, - "stdlib is generic message": { - err: io.EOF, - debug: false, - wantLog: "internal", - wantCode: 1, - wantSpace: UndefinedCodespace, - }, "stdlib returns error message in debug mode": { err: io.EOF, debug: true, @@ -71,13 +64,6 @@ func (s *abciTestSuite) TestABCInfo() { wantCode: 1, wantSpace: UndefinedCodespace, }, - "wrapped stdlib is only a generic message": { - err: Wrap(io.EOF, "cannot read file"), - debug: false, - wantLog: "internal", - wantCode: 1, - wantSpace: UndefinedCodespace, - }, // This is hard to test because of attached stacktrace. This // case is tested in an another test. //"wrapped stdlib is a full message in debug mode": { @@ -103,10 +89,12 @@ func (s *abciTestSuite) TestABCInfo() { } for testName, tc := range cases { - space, code, log := ABCIInfo(tc.err, tc.debug) - s.Require().Equal(tc.wantSpace, space, testName) - s.Require().Equal(tc.wantCode, code, testName) - s.Require().Equal(tc.wantLog, log, testName) + s.T().Run(testName, func(t *testing.T) { + space, code, log := ABCIInfo(tc.err, tc.debug) + s.Require().Equal(tc.wantSpace, space, testName) + s.Require().Equal(tc.wantCode, code, testName) + s.Require().Equal(tc.wantLog, log, testName) + }) } } @@ -135,25 +123,20 @@ func (s *abciTestSuite) TestABCIInfoStacktrace() { wantStacktrace: true, wantErrMsg: "wrapped: stdlib", }, - "wrapped stdlib error in non-debug mode does not have stacktrace": { - err: Wrap(fmt.Errorf("stdlib"), "wrapped"), - debug: false, - wantStacktrace: false, - wantErrMsg: "internal", - }, } - const thisTestSrc = "github.com/cosmos/cosmos-sdk/errors.(*abciTestSuite).TestABCIInfoStacktrace" + const thisTestSrc = "cosmossdk.io/errors.(*abciTestSuite).TestABCIInfoStacktrace" for testName, tc := range cases { - _, _, log := ABCIInfo(tc.err, tc.debug) - if !tc.wantStacktrace { - s.Require().Equal(tc.wantErrMsg, log, testName) - continue - } - - s.Require().True(strings.Contains(log, thisTestSrc), testName) - s.Require().True(strings.Contains(log, tc.wantErrMsg), testName) + s.T().Run(testName, func(t *testing.T) { + _, _, log := ABCIInfo(tc.err, tc.debug) + if !tc.wantStacktrace { + s.Require().Equal(tc.wantErrMsg, log, testName) + } else { + s.Require().True(strings.Contains(log, thisTestSrc), testName) + s.Require().True(strings.Contains(log, tc.wantErrMsg), testName) + } + }) } } @@ -163,46 +146,6 @@ func (s *abciTestSuite) TestABCIInfoHidesStacktrace() { s.Require().Equal("wrapped: unauthorized", log) } -func (s *abciTestSuite) TestRedact() { - cases := map[string]struct { - err error - untouched bool // if true we expect the same error after redact - changed error // if untouched == false, expect this error - }{ - "panic looses message": { - err: Wrap(ErrPanic, "some secret stack trace"), - changed: errPanicWithMsg, - }, - "sdk errors untouched": { - err: Wrap(ErrUnauthorized, "cannot drop db"), - untouched: true, - }, - "pass though custom errors with ABCI code": { - err: customErr{}, - untouched: true, - }, - "redact stdlib error": { - err: fmt.Errorf("stdlib error"), - changed: errInternal, - }, - } - - for name, tc := range cases { - spec := tc - redacted := Redact(spec.err) - if spec.untouched { - s.Require().Equal(spec.err, redacted, name) - continue - } - - // see if we got the expected redact - s.Require().Equal(spec.changed, redacted, name) - // make sure the ABCI code did not change - s.Require().Equal(abciCode(spec.err), abciCode(redacted), name) - - } -} - func (s *abciTestSuite) TestABCIInfoSerializeErr() { var ( // Create errors with stacktrace for equal comparison. @@ -231,10 +174,6 @@ func (s *abciTestSuite) TestABCIInfoSerializeErr() { debug: true, exp: fmt.Sprintf("%+v", myErrDecode), }, - "redact in default encoder": { - src: myPanic, - exp: "panic message redacted to hide potentially sensitive system info: panic", - }, "do not redact in debug encoder": { src: myPanic, debug: true, diff --git a/errors/errors.go b/errors/errors.go index 0dedd4268874..854089a40ff0 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -251,7 +251,8 @@ func (e *wrappedError) GRPCStatus() *grpcstatus.Status { if hasStatus, ok := w.(interface { GRPCStatus() *grpcstatus.Status }); ok { - return hasStatus.GRPCStatus() + status := hasStatus.GRPCStatus() + return grpcstatus.New(status.Code(), fmt.Sprintf("%s: %s", status.Message(), e.msg)) } x, ok := w.(causer) diff --git a/errors/errors_test.go b/errors/errors_test.go index acc00fb12977..1dda2344e664 100644 --- a/errors/errors_test.go +++ b/errors/errors_test.go @@ -5,12 +5,10 @@ import ( "fmt" "testing" - grpcstatus "google.golang.org/grpc/status" - - "google.golang.org/grpc/codes" - "github.com/pkg/errors" "github.com/stretchr/testify/suite" + "google.golang.org/grpc/codes" + grpcstatus "google.golang.org/grpc/status" ) type errorsTestSuite struct { @@ -117,8 +115,8 @@ func (s *errorsTestSuite) TestIsOf() { require := s.Require() var errNil *Error - var err = ErrInvalidAddress - var errW = Wrap(ErrLogic, "more info") + err := ErrInvalidAddress + errW := Wrap(ErrLogic, "more info") require.False(IsOf(errNil), "nil error should always have no causer") require.False(IsOf(errNil, err), "nil error should always have no causer") @@ -130,12 +128,11 @@ func (s *errorsTestSuite) TestIsOf() { require.True(IsOf(errW, ErrLogic)) require.True(IsOf(errW, err, ErrLogic)) require.True(IsOf(errW, nil, errW), "error should much itself") - var err2 = errors.New("other error") + err2 := errors.New("other error") require.True(IsOf(err2, nil, err2), "error should much itself") } -type customError struct { -} +type customError struct{} func (customError) Error() string { return "custom error" @@ -172,35 +169,35 @@ func (s *errorsTestSuite) TestWrappedIs() { } func (s *errorsTestSuite) TestWrappedIsMultiple() { - var errTest = errors.New("test error") - var errTest2 = errors.New("test error 2") + errTest := errors.New("test error") + errTest2 := errors.New("test error 2") err := Wrap(errTest2, Wrap(errTest, "some random description").Error()) s.Require().True(stdlib.Is(err, errTest2)) } func (s *errorsTestSuite) TestWrappedIsFail() { - var errTest = errors.New("test error") - var errTest2 = errors.New("test error 2") + errTest := errors.New("test error") + errTest2 := errors.New("test error 2") err := Wrap(errTest2, Wrap(errTest, "some random description").Error()) s.Require().False(stdlib.Is(err, errTest)) } func (s *errorsTestSuite) TestWrappedUnwrap() { - var errTest = errors.New("test error") + errTest := errors.New("test error") err := Wrap(errTest, "some random description") s.Require().Equal(errTest, stdlib.Unwrap(err)) } func (s *errorsTestSuite) TestWrappedUnwrapMultiple() { - var errTest = errors.New("test error") - var errTest2 = errors.New("test error 2") + errTest := errors.New("test error") + errTest2 := errors.New("test error 2") err := Wrap(errTest2, Wrap(errTest, "some random description").Error()) s.Require().Equal(errTest2, stdlib.Unwrap(err)) } func (s *errorsTestSuite) TestWrappedUnwrapFail() { - var errTest = errors.New("test error") - var errTest2 = errors.New("test error 2") + errTest := errors.New("test error") + errTest2 := errors.New("test error 2") err := Wrap(errTest2, Wrap(errTest, "some random description").Error()) s.Require().NotEqual(errTest, stdlib.Unwrap(err)) } @@ -221,6 +218,10 @@ func (s *errorsTestSuite) TestGRPCStatus() { // test wrapping s.Require().Equal(codes.Unimplemented, grpcstatus.Code(ErrNotSupported.Wrap("test"))) s.Require().Equal(codes.FailedPrecondition, grpcstatus.Code(ErrConflict.Wrapf("test %s", "foo"))) + + status, ok = grpcstatus.FromError(ErrNotFound.Wrap("test")) + s.Require().True(ok) + s.Require().Equal("codespace testtesttest code 38: not found: test", status.Message()) } func ExampleWrap() { diff --git a/errors/go.mod b/errors/go.mod index 879d815326f8..c798fa867709 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -1,18 +1,18 @@ -module github.com/cosmos/cosmos-sdk/errors +module cosmossdk.io/errors -go 1.17 +go 1.18 require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.0 - google.golang.org/grpc v1.44.0 + google.golang.org/grpc v1.45.0 ) require ( github.com/davecgh/go-spew v1.1.0 // indirect - github.com/golang/protobuf v1.4.3 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect - google.golang.org/protobuf v1.25.0 // indirect + google.golang.org/protobuf v1.26.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/errors/go.sum b/errors/go.sum index ff1485214faf..cff25191d667 100644 --- a/errors/go.sum +++ b/errors/go.sum @@ -32,14 +32,17 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/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/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -100,8 +103,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= 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= @@ -110,8 +113,10 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/errors/stacktrace.go b/errors/stacktrace.go index b01a3e80911e..dc60870763a5 100644 --- a/errors/stacktrace.go +++ b/errors/stacktrace.go @@ -48,9 +48,9 @@ func trimInternal(st errors.StackTrace) errors.StackTrace { // manual error creation, or runtime for caught panics for matchesFunc(st[0], // where we create errors - "github.com/cosmos/cosmos-sdk/errors.Wrap", - "github.com/cosmos/cosmos-sdk/errors.Wrapf", - "github.com/cosmos/cosmos-sdk/errors.WithType", + "cosmossdk.io/errors.Wrap", + "cosmossdk.io/errors.Wrapf", + "cosmossdk.io/errors.WithType", // runtime are added on panics "runtime.", // _test is defined in coverage tests, causing failure diff --git a/errors/stacktrace_test.go b/errors/stacktrace_test.go index af91cb5951ee..c0a8d6141c25 100644 --- a/errors/stacktrace_test.go +++ b/errors/stacktrace_test.go @@ -32,8 +32,8 @@ func (s *errorsTestSuite) TestStackTrace() { // Wrapping code is unwanted in the errors stack trace. unwantedSrc := []string{ - "github.com/cosmos/cosmos-sdk/errors.Wrap\n", - "github.com/cosmos/cosmos-sdk/errors.Wrapf\n", + "cosmossdk.io/errors.Wrap\n", + "cosmossdk.io/errors.Wrapf\n", "runtime.goexit\n", } const thisTestSrc = "errors/stacktrace_test.go" diff --git a/go.mod b/go.mod index 6bc49b113eb4..39504aa13d89 100644 --- a/go.mod +++ b/go.mod @@ -1,58 +1,59 @@ -go 1.17 +go 1.18 module github.com/cosmos/cosmos-sdk require ( + cosmossdk.io/errors v1.0.0-beta.7 + cosmossdk.io/math v1.0.0-beta.2 github.com/99designs/keyring v1.2.1 - github.com/armon/go-metrics v0.3.10 + github.com/armon/go-metrics v0.4.0 github.com/bgentry/speakeasy v0.1.0 - github.com/btcsuite/btcd v0.22.0-beta + github.com/btcsuite/btcd v0.22.1 github.com/cockroachdb/apd/v2 v2.0.2 - github.com/coinbase/rosetta-sdk-go v0.7.6 + github.com/coinbase/rosetta-sdk-go v0.7.9 github.com/confio/ics23/go v0.7.0 github.com/cosmos/btcutil v1.0.4 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk/api v0.1.0 github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1 - github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.3 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/iavl v0.18.0 + github.com/cosmos/iavl v0.19.0 github.com/cosmos/ledger-cosmos-go v0.11.1 github.com/gogo/gateway v1.1.0 - github.com/gogo/protobuf v1.3.3 + github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 + github.com/google/uuid v1.3.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-getter v1.5.11 + github.com/hashicorp/go-getter v1.6.1 github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 github.com/improbable-eng/grpc-web v0.15.0 - github.com/jhump/protoreflect v1.12.0 + github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753 github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 github.com/magiconair/properties v1.8.6 github.com/mattn/go-isatty v0.0.14 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.12.1 - github.com/prometheus/common v0.33.0 + github.com/prometheus/client_golang v1.12.2 + github.com/prometheus/common v0.34.0 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 - github.com/rs/zerolog v1.26.1 - github.com/spf13/cast v1.4.1 - github.com/spf13/cobra v1.4.0 + github.com/rs/zerolog v1.27.0 + github.com/spf13/cast v1.5.0 + github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.11.0 - github.com/stretchr/testify v1.7.1 + github.com/spf13/viper v1.12.0 + github.com/stretchr/testify v1.8.0 github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 - github.com/tendermint/tendermint v0.35.4 - github.com/tendermint/tm-db v0.6.6 - golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 - google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac - google.golang.org/grpc v1.46.0 + github.com/tendermint/tendermint v0.34.20 + github.com/tendermint/tm-db v0.6.7 + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e + google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad + google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.0 pgregory.net/rapid v0.4.7 sigs.k8s.io/yaml v1.3.0 @@ -60,22 +61,24 @@ require ( require ( cloud.google.com/go v0.100.2 // indirect - cloud.google.com/go/compute v1.5.0 // indirect + 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 filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/aws/aws-sdk-go v1.40.45 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/celestiaorg/go-leopard v0.1.0 // indirect github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 // indirect - github.com/celestiaorg/nmt v0.8.0 // indirect + github.com/celestiaorg/nmt v0.10.0 // indirect github.com/celestiaorg/rsmt2d v0.5.0 // indirect - github.com/cenkalti/backoff/v4 v4.1.1 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -86,86 +89,80 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect - github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/gax-go/v2 v2.3.0 // indirect + github.com/googleapis/gax-go/v2 v2.4.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-version v1.4.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.13.6 // indirect - github.com/kr/pretty v0.3.0 // indirect - github.com/lib/pq v1.10.5 // indirect - github.com/libp2p/go-buffer-pool v0.0.2 // indirect + github.com/klauspost/compress v1.15.6 // indirect + github.com/lib/pq v1.10.6 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.0.0 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect - github.com/onsi/ginkgo v1.16.4 // indirect - github.com/onsi/gomega v1.18.1 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect - github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.2 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect - github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/rs/cors v1.8.2 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/spf13/afero v1.8.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.2.0 // indirect + github.com/subosito/gotenv v1.4.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/ulikunitz/xz v0.5.8 // indirect github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 // indirect - github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect + github.com/zondax/hid v0.9.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect + golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect - google.golang.org/api v0.74.0 // indirect + golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + google.golang.org/api v0.81.0 // indirect google.golang.org/appengine v1.6.7 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect ) replace ( github.com/cosmos/cosmos-sdk/db => ./db - // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.2.2-tm-v0.35.4 + github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.3.0-tm-v0.34.20 ) retract v0.43.0 diff --git a/go.sum b/go.sum index 1bac221ab1f3..3ce5ca9d1101 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,10 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7 cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= @@ -59,6 +61,10 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +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.2 h1:17hSVc9ne1c31IaLDfjRojtN+y4Rd2N8H/6Fht2sBzw= +cosmossdk.io/math v1.0.0-beta.2/go.mod h1:u/MXvf8wbUbCsAEyQSSYXXMsczAsFX48e2D6JI86T4o= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -68,28 +74,19 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -102,7 +99,7 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= -github.com/adlio/schema v1.3.0 h1:eSVYLxYWbm/6ReZBCkLw4Fz7uqC+ZNoPvA39bOwi52A= +github.com/adlio/schema v1.1.13 h1:LeNMVg5Z1FX+Qgz8tJUijBLRdcpbFUElz+d1489On98= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -120,8 +117,8 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -153,8 +150,12 @@ github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BR github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= -github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= -github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -172,20 +173,21 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/celestiaorg/celestia-core v1.2.2-tm-v0.35.4 h1:b+S47xLUVfmRAr+Wi6MH0b5HX6AqZUHxQRVioG851ys= -github.com/celestiaorg/celestia-core v1.2.2-tm-v0.35.4/go.mod h1:qfSLGgzbnzEVXNMv80VxzXH3yAJHT/u6IlpNHJk0/aQ= +github.com/celestiaorg/celestia-core v1.3.0-tm-v0.34.20 h1:Mq/3VB22g1iunaHBIsH2mD0Y/Pm34q6xxokKeHkXCD8= +github.com/celestiaorg/celestia-core v1.3.0-tm-v0.34.20/go.mod h1:bFyLvRuHAPewkGy4WazXJhfYhdV4u79iuoYaeNL3EO4= github.com/celestiaorg/go-leopard v0.1.0 h1:28z2EkvKJIez5J9CEaiiUEC+OxalRLtTGJJ1oScfE1g= github.com/celestiaorg/go-leopard v0.1.0/go.mod h1:NtO/rjlB8dw2aq7jr06vZFKGvryQcTDXaNHelmPNOAM= github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 h1:CJdIpo8n5MFP2MwK0gSRcOVlDlFdQJO1p+FqdxYzmvc= github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4/go.mod h1:fzuHnhzj1pUygGz+1ZkB3uQbEUL4htqCGJ4Qs2LwMZA= -github.com/celestiaorg/nmt v0.8.0 h1:wtX7GRouLbmBe+ffnc8+cOg2UbWteM+Y1imZuZ/EeqU= -github.com/celestiaorg/nmt v0.8.0/go.mod h1:3bqzTj8xKj0DgQUpOgZzoxvtNkC3MS/hTbQ6dn8SIa0= +github.com/celestiaorg/nmt v0.10.0 h1:HLfVWvpagHz5+uiE0QSjzv350wLhhnybNmrxq9NHLKc= +github.com/celestiaorg/nmt v0.10.0/go.mod h1:3bqzTj8xKj0DgQUpOgZzoxvtNkC3MS/hTbQ6dn8SIa0= github.com/celestiaorg/rsmt2d v0.5.0 h1:Wa0uNZUXl8lIMJnSunjoD65ktqBedXZD0z2ZU3xKYYw= github.com/celestiaorg/rsmt2d v0.5.0/go.mod h1:EZ+O2KdCq8xI7WFwjATLdhtMdrdClmAs2w7zENDr010= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -216,40 +218,39 @@ github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOG github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= -github.com/coinbase/rosetta-sdk-go v0.7.6 h1:y3/Lxu9ojIsUKnhNc5UaZF/i0byfuNDWXLYMSKG+IBs= -github.com/coinbase/rosetta-sdk-go v0.7.6/go.mod h1:lt2lJX/HQ2stryuKkukCWMcX3T5fBU62UrdhuwsnVYg= +github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= +github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= 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/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= -github.com/containerd/continuity v0.2.1 h1:/EeEo2EtN3umhbbgCveyjifoMYg0pS+nMMEemaYw634= +github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 h1:NmTXa/uVnDyp0TY5MKi197+3HWcnYWfnHGyaFthlnGw= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= -github.com/cosmos/cosmos-sdk/api v0.1.0/go.mod h1:CupqQBskAOiTXO1XDZ/wrtWzN/wTxUvbQmOqdUhR8wI= -github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.3 h1:Ep7FHNViVwwGnwLFEPewZYsyN2CJNVMmMvFmtNQtbnw= -github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.3/go.mod h1:HFea93YKmoMJ/mNKtkSeJZDtyJ4inxBsUK928KONcqo= +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= -github.com/cosmos/iavl v0.18.0 h1:02ur4vnalMR2GuWCFNkuseUcl/BCVmg9tOeHOGiZOkE= -github.com/cosmos/iavl v0.18.0/go.mod h1:L0VZHfq0tqMNJvXlslGExaaiZM7eSm+90Vh9QUbp6j4= +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.0 h1:sgyrjqOkycXiN7Tuupuo4QAldKFg7Sipyfeg/IL7cps= +github.com/cosmos/iavl v0.19.0/go.mod h1:l5h9pAB3m5fihB3pXVgwYqdY8aBsMagqz7T0MUjxZeA= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -263,12 +264,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= 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= @@ -282,6 +284,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -308,12 +312,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.10.16/go.mod h1:Anj6cxczl+AHy63o4X9O8yWNHuN5wMpfb8MAnHkWn7Y= +github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= 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/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= @@ -323,10 +325,11 @@ github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= 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.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -348,9 +351,12 @@ github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -366,7 +372,6 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/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= @@ -380,6 +385,7 @@ github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -421,7 +427,6 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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= @@ -443,8 +448,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/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.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -470,7 +476,6 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -478,7 +483,7 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -486,8 +491,9 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -507,7 +513,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -515,7 +520,11 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -524,8 +533,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.5.11 h1:wioTuNmaBU3IE9vdFtFMcmZWj0QzLc6DYaP6sNe5onY= -github.com/hashicorp/go-getter v1.5.11/go.mod h1:9i48BP6wpWweI/0/+FBjqLrp9S8XtwUGjiu0QkWHEaY= +github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= +github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -542,8 +551,8 @@ github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1 github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= -github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -561,7 +570,7 @@ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iU github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -589,8 +598,8 @@ github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSl github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= -github.com/jhump/protoreflect v1.12.0 h1:1NQ4FpWMgn3by/n1X0fbeKEUxP1wBt7+Oitpv01HR10= -github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753 h1:uFlcJKZPLQd7rmOY/RrvBuUaYmAFnlFHKLivhO6cOy8= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -627,8 +636,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= +github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -639,7 +648,6 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -653,10 +661,10 @@ github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2 github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.5 h1:J+gdV2cUmX7ZqL2B0lFcW0m+egaHC2V3lpO8nWxyYiQ= -github.com/lib/pq v1.10.5/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= @@ -672,8 +680,8 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -690,6 +698,7 @@ github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4f github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -704,8 +713,9 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -714,6 +724,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= @@ -732,11 +743,8 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +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/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b h1:MKwruh+HeCSKWphkxuzvRzU4QzDkg7yiPkDVV0cDFgI= -github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -745,21 +753,17 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 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/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 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 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -777,10 +781,10 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -790,7 +794,6 @@ github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -808,8 +811,9 @@ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeD github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -827,8 +831,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.33.0 h1:rHgav/0a6+uYgGdNt3jwz8FNSesO/Hsang3O0T9A5SE= -github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= +github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -853,15 +857,13 @@ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRr github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= -github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= +github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -892,12 +894,12 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -906,15 +908,16 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= -github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -922,23 +925,22 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= -github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +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/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= @@ -980,10 +982,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= gitlab.com/NebulousLabs/errors v0.0.0-20171229012116-7ead97ef90b8/go.mod h1:ZkMZ0dpQyWwlENaeZVBiQRjhMEZvk6VTXquzl3FOFP8= gitlab.com/NebulousLabs/errors v0.0.0-20200929122200-06c536cf6975 h1:L/ENs/Ar1bFzUeKx6m3XjlmBgIUlykX9dzvp5k9NGxc= gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 h1:dizWJqTWjwyD8KGcMOwgrkqu1JIkofYgKkmDeNE7oAs= @@ -1023,6 +1023,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200109152110-61a87790db17/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1034,9 +1035,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1115,6 +1115,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1125,17 +1126,20 @@ golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1166,8 +1170,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1227,7 +1231,6 @@ 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= @@ -1254,6 +1257,7 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1263,12 +1267,17 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f h1:xdsejrW/0Wf2diT5CPp3XmKUNbr7Xvw8kYilQ+6qjRY= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1339,7 +1348,6 @@ golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4f 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= @@ -1349,13 +1357,13 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= 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= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1397,8 +1405,11 @@ google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tD google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0 h1:o8WF5AvfidafWbFjsRyupxyEQJNUWxLZJCK5NXrxZZ8= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1484,8 +1495,15 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1519,11 +1537,13 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1552,8 +1572,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1572,8 +1592,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/math/CHANGELOG.md b/math/CHANGELOG.md new file mode 100644 index 000000000000..16de809f2717 --- /dev/null +++ b/math/CHANGELOG.md @@ -0,0 +1,32 @@ + + +# Changelog + +## [Unreleased] diff --git a/math/doc.go b/math/doc.go new file mode 100644 index 000000000000..17664a9531e0 --- /dev/null +++ b/math/doc.go @@ -0,0 +1,6 @@ +/* +Package math implements custom Cosmos SDK math types used for arithmetic +operations. Signed and unsigned integer types utilize Golang's standard library +big integers types, having a maximum bit length of 256 bits. +*/ +package math diff --git a/math/go.mod b/math/go.mod new file mode 100644 index 000000000000..ac1dfad9d0b3 --- /dev/null +++ b/math/go.mod @@ -0,0 +1,11 @@ +module cosmossdk.io/math + +go 1.18 + +require github.com/stretchr/testify v1.7.0 + +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect +) diff --git a/math/go.sum b/math/go.sum new file mode 100644 index 000000000000..acb88a48f684 --- /dev/null +++ b/math/go.sum @@ -0,0 +1,11 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/types/int.go b/math/int.go similarity index 93% rename from types/int.go rename to math/int.go index 04b808fbc69d..159e2d7d224c 100644 --- a/types/int.go +++ b/math/int.go @@ -1,15 +1,15 @@ -package types +package math import ( "encoding" "encoding/json" "fmt" - "testing" - "math/big" + "testing" ) -const maxBitLen = 256 +// MaxBitLen defines the maximum bit length supported bit Int and Uint types. +const MaxBitLen = 256 func newIntegerFromString(s string) (*big.Int, bool) { return new(big.Int).SetString(s, 0) @@ -60,14 +60,14 @@ func unmarshalText(i *big.Int, text string) error { return err } - if i.BitLen() > maxBitLen { + if i.BitLen() > MaxBitLen { return fmt.Errorf("integer out of range: %s", text) } return nil } -var _ CustomProtobufType = (*Int)(nil) +var _ customProtobufType = (*Int)(nil) // Int wraps big.Int with a 257 bit range bound // Checks overflow, underflow and division by zero @@ -108,7 +108,7 @@ func NewIntFromBigInt(i *big.Int) Int { return Int{} } - if i.BitLen() > maxBitLen { + if i.BitLen() > MaxBitLen { panic("NewIntFromBigInt() out of bound") } return Int{i} @@ -121,7 +121,7 @@ func NewIntFromString(s string) (res Int, ok bool) { return } // Check overflow - if i.BitLen() > maxBitLen { + if i.BitLen() > MaxBitLen { ok = false return } @@ -139,7 +139,7 @@ func NewIntWithDecimal(n int64, dec int) Int { i.Mul(big.NewInt(n), exp) // Check overflow - if i.BitLen() > maxBitLen { + if i.BitLen() > MaxBitLen { panic("NewIntWithDecimal() out of bound") } return Int{i} @@ -151,11 +151,6 @@ func ZeroInt() Int { return Int{big.NewInt(0)} } // OneInt returns Int value with one func OneInt() Int { return Int{big.NewInt(1)} } -// ToDec converts Int to Dec -func (i Int) ToDec() Dec { - return NewDecFromInt(i) -} - // Int64 converts Int to int64 // Panics if the value is out of range func (i Int) Int64() int64 { @@ -234,7 +229,7 @@ func (i Int) LTE(i2 Int) bool { func (i Int) Add(i2 Int) (res Int) { res = Int{add(i.i, i2.i)} // Check overflow - if res.i.BitLen() > maxBitLen { + if res.i.BitLen() > MaxBitLen { panic("Int overflow") } return @@ -249,7 +244,7 @@ func (i Int) AddRaw(i2 int64) Int { func (i Int) Sub(i2 Int) (res Int) { res = Int{sub(i.i, i2.i)} // Check overflow - if res.i.BitLen() > maxBitLen { + if res.i.BitLen() > MaxBitLen { panic("Int overflow") } return @@ -263,12 +258,12 @@ func (i Int) SubRaw(i2 int64) Int { // Mul multiples two Ints func (i Int) Mul(i2 Int) (res Int) { // Check overflow - if i.i.BitLen()+i2.i.BitLen()-1 > maxBitLen { + if i.i.BitLen()+i2.i.BitLen()-1 > MaxBitLen { panic("Int overflow") } res = Int{mul(i.i, i2.i)} // Check overflow if sign of both are same - if res.i.BitLen() > maxBitLen { + if res.i.BitLen() > MaxBitLen { panic("Int overflow") } return @@ -388,8 +383,8 @@ func (i *Int) MarshalTo(data []byte) (n int, err error) { i.i = new(big.Int) } if i.i.BitLen() == 0 { // The value 0 - copy(data, []byte{0x30}) - return 1, nil + n = copy(data, []byte{0x30}) + return n, nil } bz, err := i.Marshal() @@ -397,8 +392,8 @@ func (i *Int) MarshalTo(data []byte) (n int, err error) { return 0, err } - copy(data, bz) - return len(bz), nil + n = copy(data, bz) + return n, nil } // Unmarshal implements the gogo proto custom type interface. @@ -416,8 +411,8 @@ func (i *Int) Unmarshal(data []byte) error { return err } - if i.i.BitLen() > maxBitLen { - return fmt.Errorf("integer out of range; got: %d, max: %d", i.i.BitLen(), maxBitLen) + if i.i.BitLen() > MaxBitLen { + return fmt.Errorf("integer out of range; got: %d, max: %d", i.i.BitLen(), MaxBitLen) } return nil @@ -437,7 +432,3 @@ func (i *Int) UnmarshalAmino(bz []byte) error { return i.Unmarshal(bz) } func IntEq(t *testing.T, exp, got Int) (*testing.T, bool, string, string, string) { return t, exp.Equal(got), "expected:\t%v\ngot:\t\t%v", exp.String(), got.String() } - -func (ip IntProto) String() string { - return ip.Int.String() -} diff --git a/types/int_internal_test.go b/math/int_internal_test.go similarity index 99% rename from types/int_internal_test.go rename to math/int_internal_test.go index 77d357bbf750..d2cb90240852 100644 --- a/types/int_internal_test.go +++ b/math/int_internal_test.go @@ -1,4 +1,4 @@ -package types +package math import ( "math/big" diff --git a/types/int_test.go b/math/int_test.go similarity index 69% rename from types/int_test.go rename to math/int_test.go index a6ec8c6d48bd..c39fce0ee51c 100644 --- a/types/int_test.go +++ b/math/int_test.go @@ -1,4 +1,4 @@ -package types_test +package math_test import ( "fmt" @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/suite" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" ) type intTestSuite struct { @@ -27,30 +27,30 @@ func (s *intTestSuite) SetupSuite() { func (s *intTestSuite) TestFromInt64() { for n := 0; n < 20; n++ { r := rand.Int63() - s.Require().Equal(r, sdk.NewInt(r).Int64()) + s.Require().Equal(r, math.NewInt(r).Int64()) } } func (s *intTestSuite) TestFromUint64() { for n := 0; n < 20; n++ { r := rand.Uint64() - s.Require().True(sdk.NewIntFromUint64(r).IsUint64()) - s.Require().Equal(r, sdk.NewIntFromUint64(r).Uint64()) + s.Require().True(math.NewIntFromUint64(r).IsUint64()) + s.Require().Equal(r, math.NewIntFromUint64(r).Uint64()) } } func (s *intTestSuite) TestIntPanic() { // Max Int = 2^256-1 = 1.1579209e+77 // Min Int = -(2^256-1) = -1.1579209e+77 - s.Require().NotPanics(func() { sdk.NewIntWithDecimal(4, 76) }) - i1 := sdk.NewIntWithDecimal(4, 76) - s.Require().NotPanics(func() { sdk.NewIntWithDecimal(5, 76) }) - i2 := sdk.NewIntWithDecimal(5, 76) - s.Require().NotPanics(func() { sdk.NewIntWithDecimal(6, 76) }) - i3 := sdk.NewIntWithDecimal(6, 76) + s.Require().NotPanics(func() { math.NewIntWithDecimal(4, 76) }) + i1 := math.NewIntWithDecimal(4, 76) + s.Require().NotPanics(func() { math.NewIntWithDecimal(5, 76) }) + i2 := math.NewIntWithDecimal(5, 76) + s.Require().NotPanics(func() { math.NewIntWithDecimal(6, 76) }) + i3 := math.NewIntWithDecimal(6, 76) - s.Require().Panics(func() { sdk.NewIntWithDecimal(2, 77) }) - s.Require().Panics(func() { sdk.NewIntWithDecimal(9, 80) }) + s.Require().Panics(func() { math.NewIntWithDecimal(2, 77) }) + s.Require().Panics(func() { math.NewIntWithDecimal(9, 80) }) // Overflow check s.Require().NotPanics(func() { i1.Add(i1) }) @@ -84,20 +84,20 @@ func (s *intTestSuite) TestIntPanic() { s.Require().Panics(func() { i3.Mul(i3.Neg()) }) // Bound check - intmax := sdk.NewIntFromBigInt(new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(256), nil), big.NewInt(1))) + intmax := math.NewIntFromBigInt(new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(256), nil), big.NewInt(1))) intmin := intmax.Neg() - s.Require().NotPanics(func() { intmax.Add(sdk.ZeroInt()) }) - s.Require().NotPanics(func() { intmin.Sub(sdk.ZeroInt()) }) - s.Require().Panics(func() { intmax.Add(sdk.OneInt()) }) - s.Require().Panics(func() { intmin.Sub(sdk.OneInt()) }) + s.Require().NotPanics(func() { intmax.Add(math.ZeroInt()) }) + s.Require().NotPanics(func() { intmin.Sub(math.ZeroInt()) }) + s.Require().Panics(func() { intmax.Add(math.OneInt()) }) + s.Require().Panics(func() { intmin.Sub(math.OneInt()) }) - s.Require().NotPanics(func() { sdk.NewIntFromBigInt(nil) }) - s.Require().True(sdk.NewIntFromBigInt(nil).IsNil()) + s.Require().NotPanics(func() { math.NewIntFromBigInt(nil) }) + s.Require().True(math.NewIntFromBigInt(nil).IsNil()) // Division-by-zero check - s.Require().Panics(func() { i1.Quo(sdk.NewInt(0)) }) + s.Require().Panics(func() { i1.Quo(math.NewInt(0)) }) - s.Require().NotPanics(func() { sdk.Int{}.BigInt() }) + s.Require().NotPanics(func() { math.Int{}.BigInt() }) } // Tests below uses randomness @@ -107,17 +107,17 @@ func (s *intTestSuite) TestIntPanic() { func (s *intTestSuite) TestIdentInt() { for d := 0; d < 1000; d++ { n := rand.Int63() - i := sdk.NewInt(n) + i := math.NewInt(n) - ifromstr, ok := sdk.NewIntFromString(strconv.FormatInt(n, 10)) + ifromstr, ok := math.NewIntFromString(strconv.FormatInt(n, 10)) s.Require().True(ok) cases := []int64{ i.Int64(), i.BigInt().Int64(), ifromstr.Int64(), - sdk.NewIntFromBigInt(big.NewInt(n)).Int64(), - sdk.NewIntWithDecimal(n, 0).Int64(), + math.NewIntFromBigInt(big.NewInt(n)).Int64(), + math.NewIntWithDecimal(n, 0).Int64(), } for tcnum, tc := range cases { @@ -143,12 +143,12 @@ func maxint(i1, i2 int64) int64 { func (s *intTestSuite) TestArithInt() { for d := 0; d < 1000; d++ { n1 := int64(rand.Int31()) - i1 := sdk.NewInt(n1) + i1 := math.NewInt(n1) n2 := int64(rand.Int31()) - i2 := sdk.NewInt(n2) + i2 := math.NewInt(n2) cases := []struct { - ires sdk.Int + ires math.Int nres int64 }{ {i1.Add(i2), n1 + n2}, @@ -159,8 +159,8 @@ func (s *intTestSuite) TestArithInt() { {i1.SubRaw(n2), n1 - n2}, {i1.MulRaw(n2), n1 * n2}, {i1.QuoRaw(n2), n1 / n2}, - {sdk.MinInt(i1, i2), minint(n1, n2)}, - {sdk.MaxInt(i1, i2), maxint(n1, n2)}, + {math.MinInt(i1, i2), minint(n1, n2)}, + {math.MaxInt(i1, i2), maxint(n1, n2)}, {i1.Neg(), -n1}, {i1.Abs(), n1}, {i1.Neg().Abs(), n1}, @@ -170,15 +170,14 @@ func (s *intTestSuite) TestArithInt() { s.Require().Equal(tc.nres, tc.ires.Int64(), "Int arithmetic operation does not match with int64 operation. tc #%d", tcnum) } } - } func (s *intTestSuite) TestCompInt() { for d := 0; d < 1000; d++ { n1 := int64(rand.Int31()) - i1 := sdk.NewInt(n1) + i1 := math.NewInt(n1) n2 := int64(rand.Int31()) - i2 := sdk.NewInt(n2) + i2 := math.NewInt(n2) cases := []struct { ires bool @@ -196,93 +195,93 @@ func (s *intTestSuite) TestCompInt() { } } -func randint() sdk.Int { - return sdk.NewInt(rand.Int63()) +func randint() math.Int { + return math.NewInt(rand.Int63()) } func (s *intTestSuite) TestImmutabilityAllInt() { - ops := []func(*sdk.Int){ - func(i *sdk.Int) { _ = i.Add(randint()) }, - func(i *sdk.Int) { _ = i.Sub(randint()) }, - func(i *sdk.Int) { _ = i.Mul(randint()) }, - func(i *sdk.Int) { _ = i.Quo(randint()) }, - func(i *sdk.Int) { _ = i.AddRaw(rand.Int63()) }, - func(i *sdk.Int) { _ = i.SubRaw(rand.Int63()) }, - func(i *sdk.Int) { _ = i.MulRaw(rand.Int63()) }, - func(i *sdk.Int) { _ = i.QuoRaw(rand.Int63()) }, - func(i *sdk.Int) { _ = i.Neg() }, - func(i *sdk.Int) { _ = i.Abs() }, - func(i *sdk.Int) { _ = i.IsZero() }, - func(i *sdk.Int) { _ = i.Sign() }, - func(i *sdk.Int) { _ = i.Equal(randint()) }, - func(i *sdk.Int) { _ = i.GT(randint()) }, - func(i *sdk.Int) { _ = i.LT(randint()) }, - func(i *sdk.Int) { _ = i.String() }, + ops := []func(*math.Int){ + func(i *math.Int) { _ = i.Add(randint()) }, + func(i *math.Int) { _ = i.Sub(randint()) }, + func(i *math.Int) { _ = i.Mul(randint()) }, + func(i *math.Int) { _ = i.Quo(randint()) }, + func(i *math.Int) { _ = i.AddRaw(rand.Int63()) }, + func(i *math.Int) { _ = i.SubRaw(rand.Int63()) }, + func(i *math.Int) { _ = i.MulRaw(rand.Int63()) }, + func(i *math.Int) { _ = i.QuoRaw(rand.Int63()) }, + func(i *math.Int) { _ = i.Neg() }, + func(i *math.Int) { _ = i.Abs() }, + func(i *math.Int) { _ = i.IsZero() }, + func(i *math.Int) { _ = i.Sign() }, + func(i *math.Int) { _ = i.Equal(randint()) }, + func(i *math.Int) { _ = i.GT(randint()) }, + func(i *math.Int) { _ = i.LT(randint()) }, + func(i *math.Int) { _ = i.String() }, } for i := 0; i < 1000; i++ { n := rand.Int63() - ni := sdk.NewInt(n) + ni := math.NewInt(n) for opnum, op := range ops { op(&ni) s.Require().Equal(n, ni.Int64(), "Int is modified by operation. tc #%d", opnum) - s.Require().Equal(sdk.NewInt(n), ni, "Int is modified by operation. tc #%d", opnum) + s.Require().Equal(math.NewInt(n), ni, "Int is modified by operation. tc #%d", opnum) } } } func (s *intTestSuite) TestEncodingTableInt() { - var i sdk.Int + var i math.Int cases := []struct { - i sdk.Int + i math.Int jsonBz []byte rawBz []byte }{ { - sdk.NewInt(0), + math.NewInt(0), []byte("\"0\""), []byte{0x30}, }, { - sdk.NewInt(100), + math.NewInt(100), []byte("\"100\""), []byte{0x31, 0x30, 0x30}, }, { - sdk.NewInt(-100), + math.NewInt(-100), []byte("\"-100\""), []byte{0x2d, 0x31, 0x30, 0x30}, }, { - sdk.NewInt(51842), + math.NewInt(51842), []byte("\"51842\""), []byte{0x35, 0x31, 0x38, 0x34, 0x32}, }, { - sdk.NewInt(-51842), + math.NewInt(-51842), []byte("\"-51842\""), []byte{0x2d, 0x35, 0x31, 0x38, 0x34, 0x32}, }, { - sdk.NewInt(19513368), + math.NewInt(19513368), []byte("\"19513368\""), []byte{0x31, 0x39, 0x35, 0x31, 0x33, 0x33, 0x36, 0x38}, }, { - sdk.NewInt(-19513368), + math.NewInt(-19513368), []byte("\"-19513368\""), []byte{0x2d, 0x31, 0x39, 0x35, 0x31, 0x33, 0x33, 0x36, 0x38}, }, { - sdk.NewInt(999999999999), + math.NewInt(999999999999), []byte("\"999999999999\""), []byte{0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39}, }, { - sdk.NewInt(-999999999999), + math.NewInt(-999999999999), []byte("\"-999999999999\""), []byte{0x2d, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39}, }, @@ -308,35 +307,35 @@ func (s *intTestSuite) TestEncodingTableInt() { } func (s *intTestSuite) TestEncodingTableUint() { - var i sdk.Uint + var i math.Uint cases := []struct { - i sdk.Uint + i math.Uint jsonBz []byte rawBz []byte }{ { - sdk.NewUint(0), + math.NewUint(0), []byte("\"0\""), []byte{0x30}, }, { - sdk.NewUint(100), + math.NewUint(100), []byte("\"100\""), []byte{0x31, 0x30, 0x30}, }, { - sdk.NewUint(51842), + math.NewUint(51842), []byte("\"51842\""), []byte{0x35, 0x31, 0x38, 0x34, 0x32}, }, { - sdk.NewUint(19513368), + math.NewUint(19513368), []byte("\"19513368\""), []byte{0x31, 0x39, 0x35, 0x31, 0x33, 0x33, 0x36, 0x38}, }, { - sdk.NewUint(999999999999), + math.NewUint(999999999999), []byte("\"999999999999\""), []byte{0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39}, }, @@ -377,24 +376,24 @@ func (s *intTestSuite) TestIntMod() { for _, tt := range tests { if tt.wantPanic { - s.Require().Panics(func() { sdk.NewInt(tt.x).Mod(sdk.NewInt(tt.y)) }) - s.Require().Panics(func() { sdk.NewInt(tt.x).ModRaw(tt.y) }) + s.Require().Panics(func() { math.NewInt(tt.x).Mod(math.NewInt(tt.y)) }) + s.Require().Panics(func() { math.NewInt(tt.x).ModRaw(tt.y) }) return } - s.Require().True(sdk.NewInt(tt.x).Mod(sdk.NewInt(tt.y)).Equal(sdk.NewInt(tt.ret))) - s.Require().True(sdk.NewInt(tt.x).ModRaw(tt.y).Equal(sdk.NewInt(tt.ret))) + s.Require().True(math.NewInt(tt.x).Mod(math.NewInt(tt.y)).Equal(math.NewInt(tt.ret))) + s.Require().True(math.NewInt(tt.x).ModRaw(tt.y).Equal(math.NewInt(tt.ret))) } } func (s *intTestSuite) TestIntEq() { - _, resp, _, _, _ := sdk.IntEq(s.T(), sdk.ZeroInt(), sdk.ZeroInt()) + _, resp, _, _, _ := math.IntEq(s.T(), math.ZeroInt(), math.ZeroInt()) s.Require().True(resp) - _, resp, _, _, _ = sdk.IntEq(s.T(), sdk.OneInt(), sdk.ZeroInt()) + _, resp, _, _, _ = math.IntEq(s.T(), math.OneInt(), math.ZeroInt()) s.Require().False(resp) } func TestRoundTripMarshalToInt(t *testing.T) { - var values = []int64{ + values := []int64{ 0, 1, 1 << 10, @@ -410,12 +409,12 @@ func TestRoundTripMarshalToInt(t *testing.T) { t.Parallel() var scratch [20]byte - iv := sdk.NewInt(value) + iv := math.NewInt(value) n, err := iv.MarshalTo(scratch[:]) if err != nil { t.Fatal(err) } - rt := new(sdk.Int) + rt := new(math.Int) if err := rt.Unmarshal(scratch[:n]); err != nil { t.Fatal(err) } diff --git a/math/proto.go b/math/proto.go new file mode 100644 index 000000000000..86e78bafa90d --- /dev/null +++ b/math/proto.go @@ -0,0 +1,15 @@ +package math + +// customProtobufType defines the interface custom gogo proto types must implement +// in order to be used as a "customtype" extension. +// +// ref: https://github.com/gogo/protobuf/blob/master/custom_types.md +type customProtobufType interface { + Marshal() ([]byte, error) + MarshalTo(data []byte) (n int, err error) + Unmarshal(data []byte) error + Size() int + + MarshalJSON() ([]byte, error) + UnmarshalJSON(data []byte) error +} diff --git a/types/uint.go b/math/uint.go similarity index 94% rename from types/uint.go rename to math/uint.go index dbdd17bd58a9..8ce6105e9fb0 100644 --- a/types/uint.go +++ b/math/uint.go @@ -1,4 +1,4 @@ -package types +package math import ( "errors" @@ -49,7 +49,7 @@ func ZeroUint() Uint { return Uint{big.NewInt(0)} } // OneUint returns Uint value with one. func OneUint() Uint { return Uint{big.NewInt(1)} } -var _ CustomProtobufType = (*Uint)(nil) +var _ customProtobufType = (*Uint)(nil) // Uint64 converts Uint to uint64 // Panics if the value is out of range @@ -162,8 +162,8 @@ func (u *Uint) MarshalTo(data []byte) (n int, err error) { u.i = new(big.Int) } if u.i.BitLen() == 0 { // The value 0 - copy(data, []byte{0x30}) - return 1, nil + n = copy(data, []byte{0x30}) + return n, nil } bz, err := u.Marshal() @@ -171,8 +171,8 @@ func (u *Uint) MarshalTo(data []byte) (n int, err error) { return 0, err } - copy(data, bz) - return len(bz), nil + n = copy(data, bz) + return n, nil } // Unmarshal implements the gogo proto custom type interface. @@ -190,11 +190,8 @@ func (u *Uint) Unmarshal(data []byte) error { return err } - if u.i.BitLen() > maxBitLen { - return fmt.Errorf("integer out of range; got: %d, max: %d", u.i.BitLen(), maxBitLen) - } - - return nil + // Finally check for overflow. + return UintOverflow(u.i) } // Size implements the gogo proto custom type interface. @@ -213,8 +210,9 @@ func UintOverflow(i *big.Int) error { if i.Sign() < 0 { return errors.New("non-positive integer") } - if i.BitLen() > 256 { - return fmt.Errorf("bit length %d greater than 256", i.BitLen()) + + if g, w := i.BitLen(), MaxBitLen; g > w { + return fmt.Errorf("integer out of range; got: %d, max: %d", g, w) } return nil } diff --git a/types/uint_internal_test.go b/math/uint_internal_test.go similarity index 98% rename from types/uint_internal_test.go rename to math/uint_internal_test.go index a39869cac759..a3f1fb4f5e1b 100644 --- a/types/uint_internal_test.go +++ b/math/uint_internal_test.go @@ -1,4 +1,4 @@ -package types +package math import ( "math/big" @@ -51,5 +51,4 @@ func (s *uintInternalTestSuite) TestUintSize() { s.Require().Equal(2, x.Size()) x = NewUint(100) s.Require().Equal(3, x.Size()) - } diff --git a/math/uint_test.go b/math/uint_test.go new file mode 100644 index 000000000000..3077e5094181 --- /dev/null +++ b/math/uint_test.go @@ -0,0 +1,363 @@ +package math_test + +import ( + "fmt" + "math" + "math/big" + "math/rand" + "strings" + "testing" + + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/suite" +) + +type uintTestSuite struct { + suite.Suite +} + +func TestUnitTestSuite(t *testing.T) { + suite.Run(t, new(uintTestSuite)) +} + +func (s *uintTestSuite) SetupSuite() { + s.T().Parallel() +} + +func (s *uintTestSuite) TestUintPanics() { + // Max Uint = 1.15e+77 + // Min Uint = 0 + u1 := sdkmath.NewUint(0) + u2 := sdkmath.OneUint() + + s.Require().Equal(uint64(0), u1.Uint64()) + s.Require().Equal(uint64(1), u2.Uint64()) + + s.Require().Panics(func() { sdkmath.NewUintFromBigInt(big.NewInt(-5)) }) + s.Require().Panics(func() { sdkmath.NewUintFromString("-1") }) + s.Require().NotPanics(func() { + s.Require().True(sdkmath.NewUintFromString("0").Equal(sdkmath.ZeroUint())) + s.Require().True(sdkmath.NewUintFromString("5").Equal(sdkmath.NewUint(5))) + }) + + // Overflow check + s.Require().True(u1.Add(u1).Equal(sdkmath.ZeroUint())) + s.Require().True(u1.Add(sdkmath.OneUint()).Equal(sdkmath.OneUint())) + s.Require().Equal(uint64(0), u1.Uint64()) + s.Require().Equal(uint64(1), sdkmath.OneUint().Uint64()) + s.Require().Panics(func() { u1.SubUint64(2) }) + s.Require().True(u1.SubUint64(0).Equal(sdkmath.ZeroUint())) + s.Require().True(u2.Add(sdkmath.OneUint()).Sub(sdkmath.OneUint()).Equal(sdkmath.OneUint())) // i2 == 1 + s.Require().True(u2.Add(sdkmath.OneUint()).Mul(sdkmath.NewUint(5)).Equal(sdkmath.NewUint(10))) // i2 == 10 + s.Require().True(sdkmath.NewUint(7).Quo(sdkmath.NewUint(2)).Equal(sdkmath.NewUint(3))) + s.Require().True(sdkmath.NewUint(0).Quo(sdkmath.NewUint(2)).Equal(sdkmath.ZeroUint())) + s.Require().True(sdkmath.NewUint(5).MulUint64(4).Equal(sdkmath.NewUint(20))) + s.Require().True(sdkmath.NewUint(5).MulUint64(0).Equal(sdkmath.ZeroUint())) + + uintmax := sdkmath.NewUintFromBigInt(new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(256), nil), big.NewInt(1))) + uintmin := sdkmath.ZeroUint() + + // divs by zero + s.Require().Panics(func() { sdkmath.OneUint().Mul(sdkmath.ZeroUint().SubUint64(uint64(1))) }) + s.Require().Panics(func() { sdkmath.OneUint().QuoUint64(0) }) + s.Require().Panics(func() { sdkmath.OneUint().Quo(sdkmath.ZeroUint()) }) + s.Require().Panics(func() { sdkmath.ZeroUint().QuoUint64(0) }) + s.Require().Panics(func() { sdkmath.OneUint().Quo(sdkmath.ZeroUint().Sub(sdkmath.OneUint())) }) + s.Require().Panics(func() { uintmax.Add(sdkmath.OneUint()) }) + s.Require().Panics(func() { uintmax.Incr() }) + s.Require().Panics(func() { uintmin.Sub(sdkmath.OneUint()) }) + s.Require().Panics(func() { uintmin.Decr() }) + + s.Require().Equal(uint64(0), sdkmath.MinUint(sdkmath.ZeroUint(), sdkmath.OneUint()).Uint64()) + s.Require().Equal(uint64(1), sdkmath.MaxUint(sdkmath.ZeroUint(), sdkmath.OneUint()).Uint64()) + + // comparison ops + s.Require().True( + sdkmath.OneUint().GT(sdkmath.ZeroUint()), + ) + s.Require().False( + sdkmath.OneUint().LT(sdkmath.ZeroUint()), + ) + s.Require().True( + sdkmath.OneUint().GTE(sdkmath.ZeroUint()), + ) + s.Require().False( + sdkmath.OneUint().LTE(sdkmath.ZeroUint()), + ) + + s.Require().False(sdkmath.ZeroUint().GT(sdkmath.OneUint())) + s.Require().True(sdkmath.ZeroUint().LT(sdkmath.OneUint())) + s.Require().False(sdkmath.ZeroUint().GTE(sdkmath.OneUint())) + s.Require().True(sdkmath.ZeroUint().LTE(sdkmath.OneUint())) +} + +func (s *uintTestSuite) TestArithUint() { + for d := 0; d < 1000; d++ { + n1 := uint64(rand.Uint32()) + u1 := sdkmath.NewUint(n1) + n2 := uint64(rand.Uint32()) + u2 := sdkmath.NewUint(n2) + + cases := []struct { + ures sdkmath.Uint + nres uint64 + }{ + {u1.Add(u2), n1 + n2}, + {u1.Mul(u2), n1 * n2}, + {u1.Quo(u2), n1 / n2}, + {u1.AddUint64(n2), n1 + n2}, + {u1.MulUint64(n2), n1 * n2}, + {u1.QuoUint64(n2), n1 / n2}, + {sdkmath.MinUint(u1, u2), minuint(n1, n2)}, + {sdkmath.MaxUint(u1, u2), maxuint(n1, n2)}, + {u1.Incr(), n1 + 1}, + } + + for tcnum, tc := range cases { + s.Require().Equal(tc.nres, tc.ures.Uint64(), "Uint arithmetic operation does not match with uint64 operation. tc #%d", tcnum) + } + + if n2 > n1 { + n1, n2 = n2, n1 + u1, u2 = sdkmath.NewUint(n1), sdkmath.NewUint(n2) + } + + subs := []struct { + ures sdkmath.Uint + nres uint64 + }{ + {u1.Sub(u2), n1 - n2}, + {u1.SubUint64(n2), n1 - n2}, + {u1.Decr(), n1 - 1}, + } + + for tcnum, tc := range subs { + s.Require().Equal(tc.nres, tc.ures.Uint64(), "Uint subtraction does not match with uint64 operation. tc #%d", tcnum) + } + } +} + +func (s *uintTestSuite) TestCompUint() { + for d := 0; d < 10000; d++ { + n1 := rand.Uint64() + i1 := sdkmath.NewUint(n1) + n2 := rand.Uint64() + i2 := sdkmath.NewUint(n2) + + cases := []struct { + ires bool + nres bool + }{ + {i1.Equal(i2), n1 == n2}, + {i1.GT(i2), n1 > n2}, + {i1.LT(i2), n1 < n2}, + {i1.GTE(i2), !i1.LT(i2)}, + {!i1.GTE(i2), i1.LT(i2)}, + {i1.LTE(i2), n1 <= n2}, + {i2.LTE(i1), n2 <= n1}, + } + + for tcnum, tc := range cases { + s.Require().Equal(tc.nres, tc.ires, "Uint comparison operation does not match with uint64 operation. tc #%d", tcnum) + } + } +} + +func (s *uintTestSuite) TestImmutabilityAllUint() { + ops := []func(*sdkmath.Uint){ + func(i *sdkmath.Uint) { _ = i.Add(sdkmath.NewUint(rand.Uint64())) }, + func(i *sdkmath.Uint) { _ = i.Sub(sdkmath.NewUint(rand.Uint64() % i.Uint64())) }, + func(i *sdkmath.Uint) { _ = i.Mul(randuint()) }, + func(i *sdkmath.Uint) { _ = i.Quo(randuint()) }, + func(i *sdkmath.Uint) { _ = i.AddUint64(rand.Uint64()) }, + func(i *sdkmath.Uint) { _ = i.SubUint64(rand.Uint64() % i.Uint64()) }, + func(i *sdkmath.Uint) { _ = i.MulUint64(rand.Uint64()) }, + func(i *sdkmath.Uint) { _ = i.QuoUint64(rand.Uint64()) }, + func(i *sdkmath.Uint) { _ = i.IsZero() }, + func(i *sdkmath.Uint) { _ = i.Equal(randuint()) }, + func(i *sdkmath.Uint) { _ = i.GT(randuint()) }, + func(i *sdkmath.Uint) { _ = i.GTE(randuint()) }, + func(i *sdkmath.Uint) { _ = i.LT(randuint()) }, + func(i *sdkmath.Uint) { _ = i.LTE(randuint()) }, + func(i *sdkmath.Uint) { _ = i.String() }, + func(i *sdkmath.Uint) { _ = i.Incr() }, + func(i *sdkmath.Uint) { + if i.IsZero() { + return + } + + _ = i.Decr() + }, + } + + for i := 0; i < 1000; i++ { + n := rand.Uint64() + ni := sdkmath.NewUint(n) + + for opnum, op := range ops { + op(&ni) + + s.Require().Equal(n, ni.Uint64(), "Uint is modified by operation. #%d", opnum) + s.Require().Equal(sdkmath.NewUint(n), ni, "Uint is modified by operation. #%d", opnum) + } + } +} + +func (s *uintTestSuite) TestSafeSub() { + testCases := []struct { + x, y sdkmath.Uint + expected uint64 + panic bool + }{ + {sdkmath.NewUint(0), sdkmath.NewUint(0), 0, false}, + {sdkmath.NewUint(10), sdkmath.NewUint(5), 5, false}, + {sdkmath.NewUint(5), sdkmath.NewUint(10), 5, true}, + {sdkmath.NewUint(math.MaxUint64), sdkmath.NewUint(0), math.MaxUint64, false}, + } + + for i, tc := range testCases { + tc := tc + if tc.panic { + s.Require().Panics(func() { tc.x.Sub(tc.y) }) + continue + } + s.Require().Equal( + tc.expected, tc.x.Sub(tc.y).Uint64(), + "invalid subtraction result; x: %s, y: %s, tc: #%d", tc.x, tc.y, i, + ) + } +} + +func (s *uintTestSuite) TestParseUint() { + type args struct { + s string + } + tests := []struct { + name string + args args + want sdkmath.Uint + wantErr bool + }{ + {"malformed", args{"malformed"}, sdkmath.Uint{}, true}, + {"empty", args{""}, sdkmath.Uint{}, true}, + {"positive", args{"50"}, sdkmath.NewUint(uint64(50)), false}, + {"negative", args{"-1"}, sdkmath.Uint{}, true}, + {"zero", args{"0"}, sdkmath.ZeroUint(), false}, + } + for _, tt := range tests { + got, err := sdkmath.ParseUint(tt.args.s) + if tt.wantErr { + s.Require().Error(err) + continue + } + s.Require().NoError(err) + s.Require().True(got.Equal(tt.want)) + } +} + +func randuint() sdkmath.Uint { + return sdkmath.NewUint(rand.Uint64()) +} + +func (s *uintTestSuite) TestRelativePow() { + tests := []struct { + args []sdkmath.Uint + want sdkmath.Uint + }{ + {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.ZeroUint(), sdkmath.OneUint()}, sdkmath.OneUint()}, + {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.ZeroUint(), sdkmath.NewUint(10)}, sdkmath.NewUint(10)}, + {[]sdkmath.Uint{sdkmath.ZeroUint(), sdkmath.OneUint(), sdkmath.NewUint(10)}, sdkmath.ZeroUint()}, + {[]sdkmath.Uint{sdkmath.NewUint(10), sdkmath.NewUint(2), sdkmath.OneUint()}, sdkmath.NewUint(100)}, + {[]sdkmath.Uint{sdkmath.NewUint(210), sdkmath.NewUint(2), sdkmath.NewUint(100)}, sdkmath.NewUint(441)}, + {[]sdkmath.Uint{sdkmath.NewUint(2100), sdkmath.NewUint(2), sdkmath.NewUint(1000)}, sdkmath.NewUint(4410)}, + {[]sdkmath.Uint{sdkmath.NewUint(1000000001547125958), sdkmath.NewUint(600), sdkmath.NewUint(1000000000000000000)}, sdkmath.NewUint(1000000928276004850)}, + } + for i, tc := range tests { + res := sdkmath.RelativePow(tc.args[0], tc.args[1], tc.args[2]) + s.Require().Equal(tc.want, res, "unexpected result for test case %d, input: %v, got: %v", i, tc.args, res) + } +} + +func minuint(i1, i2 uint64) uint64 { + if i1 < i2 { + return i1 + } + return i2 +} + +func maxuint(i1, i2 uint64) uint64 { + if i1 > i2 { + return i1 + } + return i2 +} + +func TestRoundTripMarshalToUint(t *testing.T) { + values := []uint64{ + 0, + 1, + 1 << 10, + 1<<10 - 3, + 1<<63 - 1, + 1<<32 - 7, + 1<<22 - 8, + math.MaxUint64, + } + + for _, value := range values { + value := value + t.Run(fmt.Sprintf("%d", value), func(t *testing.T) { + t.Parallel() + + var scratch [20]byte + uv := sdkmath.NewUint(value) + n, err := uv.MarshalTo(scratch[:]) + if err != nil { + t.Fatal(err) + } + rt := new(sdkmath.Uint) + if err := rt.Unmarshal(scratch[:n]); err != nil { + t.Fatal(err) + } + if !rt.Equal(uv) { + t.Fatalf("roundtrip=%q != original=%q", rt, uv) + } + }) + } +} + +func TestWeakUnmarshalNegativeSign(t *testing.T) { + neg10, _ := new(big.Int).SetString("-10", 0) + blob, err := neg10.MarshalText() + if err != nil { + t.Fatal(err) + } + + ui := new(sdkmath.Uint) + err = ui.Unmarshal(blob) + if err == nil { + t.Fatal("Failed to catch the negative value") + } + if errStr := err.Error(); !strings.Contains(errStr, "non-positive") { + t.Fatalf("negative value not reported, got instead %q", errStr) + } +} + +func TestWeakUnmarshalOverflow(t *testing.T) { + exp := new(big.Int).SetUint64(256) + pos10, _ := new(big.Int).SetString("10", 0) + exp10Pow256 := new(big.Int).Exp(pos10, exp, nil) + blob, err := exp10Pow256.MarshalText() + if err != nil { + t.Fatal(err) + } + + ui := new(sdkmath.Uint) + err = ui.Unmarshal(blob) + if err == nil { + t.Fatal("Failed to catch the overflowed value") + } + if errStr := err.Error(); !strings.Contains(errStr, "out of range") { + t.Fatalf("out of range value not reported, got instead %q", errStr) + } +} diff --git a/orm/encoding/ormfield/codec.go b/orm/encoding/ormfield/codec.go index fa0acaed1f3f..14a1d4804c71 100644 --- a/orm/encoding/ormfield/codec.go +++ b/orm/encoding/ormfield/codec.go @@ -13,7 +13,6 @@ import ( // Codec defines an interface for decoding and encoding values in ORM index keys. type Codec interface { - // Decode decodes a value in a key. Decode(r Reader) (protoreflect.Value, error) @@ -55,14 +54,18 @@ var ( // non-terminal segment of a multi-part key. func GetCodec(field protoreflect.FieldDescriptor, nonTerminal bool) (Codec, error) { if field == nil { - return nil, ormerrors.UnsupportedKeyField.Wrap("nil field") + return nil, ormerrors.InvalidKeyField.Wrap("nil field") } if field.IsList() { - return nil, ormerrors.UnsupportedKeyField.Wrapf("repeated field %s", field.FullName()) + return nil, ormerrors.InvalidKeyField.Wrapf("repeated field %s", field.FullName()) } if field.ContainingOneof() != nil { - return nil, ormerrors.UnsupportedKeyField.Wrapf("oneof field %s", field.FullName()) + return nil, ormerrors.InvalidKeyField.Wrapf("oneof field %s", field.FullName()) + } + + if field.HasOptionalKeyword() { + return nil, ormerrors.InvalidKeyField.Wrapf("optional field %s", field.FullName()) } switch field.Kind() { @@ -102,9 +105,9 @@ func GetCodec(field protoreflect.FieldDescriptor, nonTerminal bool) (Codec, erro case durationFullName: return DurationCodec{}, nil default: - return nil, ormerrors.UnsupportedKeyField.Wrapf("%s of type %s", field.FullName(), msgName) + return nil, ormerrors.InvalidKeyField.Wrapf("%s of type %s", field.FullName(), msgName) } default: - return nil, ormerrors.UnsupportedKeyField.Wrapf("%s of kind %s", field.FullName(), field.Kind()) + return nil, ormerrors.InvalidKeyField.Wrapf("%s of kind %s", field.FullName(), field.Kind()) } } diff --git a/orm/encoding/ormfield/codec_test.go b/orm/encoding/ormfield/codec_test.go index 4e7d1574d7d8..898433b4bd42 100644 --- a/orm/encoding/ormfield/codec_test.go +++ b/orm/encoding/ormfield/codec_test.go @@ -65,15 +65,15 @@ func checkEncodeDecodeSize(t *rapid.T, x protoreflect.Value, cdc ormfield.Codec) func TestUnsupportedFields(t *testing.T) { _, err := ormfield.GetCodec(nil, false) - assert.ErrorContains(t, err, ormerrors.UnsupportedKeyField.Error()) + assert.ErrorContains(t, err, ormerrors.InvalidKeyField.Error()) _, err = ormfield.GetCodec(testutil.GetTestField("repeated"), false) - assert.ErrorContains(t, err, ormerrors.UnsupportedKeyField.Error()) + assert.ErrorContains(t, err, ormerrors.InvalidKeyField.Error()) _, err = ormfield.GetCodec(testutil.GetTestField("map"), false) - assert.ErrorContains(t, err, ormerrors.UnsupportedKeyField.Error()) + assert.ErrorContains(t, err, ormerrors.InvalidKeyField.Error()) _, err = ormfield.GetCodec(testutil.GetTestField("msg"), false) - assert.ErrorContains(t, err, ormerrors.UnsupportedKeyField.Error()) + assert.ErrorContains(t, err, ormerrors.InvalidKeyField.Error()) _, err = ormfield.GetCodec(testutil.GetTestField("oneof"), false) - assert.ErrorContains(t, err, ormerrors.UnsupportedKeyField.Error()) + assert.ErrorContains(t, err, ormerrors.InvalidKeyField.Error()) } func TestCompactUInt32(t *testing.T) { diff --git a/orm/encoding/ormfield/int32.go b/orm/encoding/ormfield/int32.go index 97eb93070da8..a3482ba862a6 100644 --- a/orm/encoding/ormfield/int32.go +++ b/orm/encoding/ormfield/int32.go @@ -14,8 +14,10 @@ type Int32Codec struct{} var int32Codec = Int32Codec{} -const int32Max = 2147483647 -const int32Offset = int32Max + 1 +const ( + int32Max = 2147483647 + int32Offset = int32Max + 1 +) func (i Int32Codec) Decode(r Reader) (protoreflect.Value, error) { var x uint32 diff --git a/orm/encoding/ormfield/string.go b/orm/encoding/ormfield/string.go index 90c368f81ffb..3a9955e83e5d 100644 --- a/orm/encoding/ormfield/string.go +++ b/orm/encoding/ormfield/string.go @@ -16,7 +16,7 @@ func (s StringCodec) FixedBufferSize() int { } func (s StringCodec) ComputeBufferSize(value protoreflect.Value) (int, error) { - return len(value.Interface().(string)), nil + return len(value.String()), nil } func (s StringCodec) IsOrdered() bool { @@ -24,7 +24,7 @@ func (s StringCodec) IsOrdered() bool { } func (s StringCodec) Compare(v1, v2 protoreflect.Value) int { - return strings.Compare(v1.Interface().(string), v2.Interface().(string)) + return strings.Compare(v1.String(), v2.String()) } func (s StringCodec) Decode(r Reader) (protoreflect.Value, error) { @@ -33,7 +33,7 @@ func (s StringCodec) Decode(r Reader) (protoreflect.Value, error) { } func (s StringCodec) Encode(value protoreflect.Value, w io.Writer) error { - _, err := w.Write([]byte(value.Interface().(string))) + _, err := w.Write([]byte(value.String())) return err } @@ -46,7 +46,7 @@ func (s NonTerminalStringCodec) FixedBufferSize() int { } func (s NonTerminalStringCodec) ComputeBufferSize(value protoreflect.Value) (int, error) { - return len(value.Interface().(string)) + 1, nil + return len(value.String()) + 1, nil } func (s NonTerminalStringCodec) IsOrdered() bool { @@ -54,7 +54,7 @@ func (s NonTerminalStringCodec) IsOrdered() bool { } func (s NonTerminalStringCodec) Compare(v1, v2 protoreflect.Value) int { - return strings.Compare(v1.Interface().(string), v2.Interface().(string)) + return strings.Compare(v1.String(), v2.String()) } func (s NonTerminalStringCodec) Decode(r Reader) (protoreflect.Value, error) { @@ -69,7 +69,7 @@ func (s NonTerminalStringCodec) Decode(r Reader) (protoreflect.Value, error) { } func (s NonTerminalStringCodec) Encode(value protoreflect.Value, w io.Writer) error { - str := value.Interface().(string) + str := value.String() bz := []byte(str) for _, b := range bz { if b == 0 { diff --git a/orm/encoding/ormkv/codec.go b/orm/encoding/ormkv/codec.go index afaa4b044020..1f93b9e54220 100644 --- a/orm/encoding/ormkv/codec.go +++ b/orm/encoding/ormkv/codec.go @@ -6,7 +6,6 @@ import "google.golang.org/protobuf/reflect/protoreflect" // kv-store backing an ORM instance. EntryCodec's enable full logical decoding // of ORM data. type EntryCodec interface { - // DecodeEntry decodes a kv-pair into an Entry. DecodeEntry(k, v []byte) (Entry, error) diff --git a/orm/encoding/ormkv/entry.go b/orm/encoding/ormkv/entry.go index 869eb9fbef38..2098afbac6a9 100644 --- a/orm/encoding/ormkv/entry.go +++ b/orm/encoding/ormkv/entry.go @@ -26,7 +26,6 @@ type Entry interface { // PrimaryKeyEntry represents a logically decoded primary-key entry. type PrimaryKeyEntry struct { - // TableName is the table this entry represents. TableName protoreflect.FullName @@ -71,7 +70,6 @@ func (p *PrimaryKeyEntry) doNotImplement() {} // IndexKeyEntry represents a logically decoded index entry. type IndexKeyEntry struct { - // TableName is the table this entry represents. TableName protoreflect.FullName @@ -111,14 +109,12 @@ func (i *IndexKeyEntry) String() string { if i.IsUnique { return fmt.Sprintf("UNIQ %s", i.string()) } else { - return fmt.Sprintf("IDX %s", i.string()) } } // SeqEntry represents a sequence for tables with auto-incrementing primary keys. type SeqEntry struct { - // TableName is the table this entry represents. TableName protoreflect.FullName diff --git a/orm/encoding/ormkv/index_key.go b/orm/encoding/ormkv/index_key.go index 335a5f820a92..55284f220636 100644 --- a/orm/encoding/ormkv/index_key.go +++ b/orm/encoding/ormkv/index_key.go @@ -62,7 +62,6 @@ func NewIndexKeyCodec(prefix []byte, messageType protoreflect.MessageType, index } func (cdc IndexKeyCodec) DecodeIndexKey(k, _ []byte) (indexFields, primaryKey []protoreflect.Value, err error) { - values, err := cdc.DecodeKey(bytes.NewReader(k)) // got prefix key if err == io.EOF { diff --git a/orm/encoding/ormkv/key_codec.go b/orm/encoding/ormkv/key_codec.go index 9b3605b5ff9b..00ef51ea28e7 100644 --- a/orm/encoding/ormkv/key_codec.go +++ b/orm/encoding/ormkv/key_codec.go @@ -82,7 +82,7 @@ func (cdc *KeyCodec) EncodeKey(values []protoreflect.Value) ([]byte, error) { return nil, err } - w := bytes.NewBuffer(make([]byte, 0, sz)) + w := bytes.NewBuffer(make([]byte, 0, sz+len(cdc.prefix))) if _, err = w.Write(cdc.prefix); err != nil { return nil, err } diff --git a/orm/encoding/ormkv/primary_key.go b/orm/encoding/ormkv/primary_key.go index 268cb1dc7f28..ff4509cb562e 100644 --- a/orm/encoding/ormkv/primary_key.go +++ b/orm/encoding/ormkv/primary_key.go @@ -51,7 +51,6 @@ func (p PrimaryKeyCodec) DecodeIndexKey(k, _ []byte) (indexFields, primaryKey [] primaryKey = indexFields } return indexFields, primaryKey, nil - } func (p PrimaryKeyCodec) DecodeEntry(k, v []byte) (Entry, error) { diff --git a/orm/encoding/ormkv/unique_key.go b/orm/encoding/ormkv/unique_key.go index 93d2a3033f25..e9d36cb5ae6f 100644 --- a/orm/encoding/ormkv/unique_key.go +++ b/orm/encoding/ormkv/unique_key.go @@ -64,6 +64,13 @@ func NewUniqueKeyCodec(prefix []byte, messageType protoreflect.MessageType, inde } } + // if there is nothing in the value we have a trivial unique index + // which shouldn't actually be a unique index at all + if len(valueFields) == 0 { + return nil, ormerrors.InvalidTableDefinition.Wrapf("unique index %s on table %s introduces no new uniqueness constraint not already in the primary key and should not be marked as unique", + indexFields, messageType.Descriptor().FullName()) + } + valueCodec, err := NewKeyCodec(nil, messageType, valueFields) if err != nil { return nil, err diff --git a/orm/encoding/ormkv/unique_key_test.go b/orm/encoding/ormkv/unique_key_test.go index 3ee688f3910e..a41c1b90e598 100644 --- a/orm/encoding/ormkv/unique_key_test.go +++ b/orm/encoding/ormkv/unique_key_test.go @@ -5,18 +5,36 @@ import ( "fmt" "testing" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" "gotest.tools/v3/assert" "pgregory.net/rapid" "github.com/cosmos/cosmos-sdk/orm/encoding/ormkv" "github.com/cosmos/cosmos-sdk/orm/internal/testpb" "github.com/cosmos/cosmos-sdk/orm/internal/testutil" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" ) func TestUniqueKeyCodec(t *testing.T) { rapid.Check(t, func(t *rapid.T) { keyCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "keyCodec").(testutil.TestKeyCodec) pkCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "primaryKeyCodec").(testutil.TestKeyCodec) + + // check if we have a trivial unique index where all of the fields + // in the primary key are in the unique key, we should expect an + // error in this case + isInPk := map[protoreflect.Name]bool{} + for _, spec := range pkCodec.KeySpecs { + isInPk[spec.FieldName] = true + } + numPkFields := 0 + for _, spec := range keyCodec.KeySpecs { + if isInPk[spec.FieldName] { + numPkFields++ + } + } + isTrivialUniqueKey := numPkFields == len(pkCodec.KeySpecs) + messageType := (&testpb.ExampleTable{}).ProtoReflect().Type() uniqueKeyCdc, err := ormkv.NewUniqueKeyCodec( keyCodec.Codec.Prefix(), @@ -24,7 +42,14 @@ func TestUniqueKeyCodec(t *testing.T) { keyCodec.Codec.GetFieldNames(), pkCodec.Codec.GetFieldNames(), ) - assert.NilError(t, err) + + if isTrivialUniqueKey { + assert.ErrorContains(t, err, "no new uniqueness constraint") + return + } else { + assert.NilError(t, err) + } + for i := 0; i < 100; i++ { a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i)).(*testpb.ExampleTable) key := keyCodec.Codec.GetKeyValues(a.ProtoReflect()) @@ -60,3 +85,9 @@ func TestUniqueKeyCodec(t *testing.T) { } }) } + +func TestTrivialUnique(t *testing.T) { + _, err := ormkv.NewUniqueKeyCodec(nil, (&testpb.ExampleTable{}).ProtoReflect().Type(), + []protoreflect.Name{"u32", "str"}, []protoreflect.Name{"str", "u32"}) + assert.ErrorIs(t, err, ormerrors.InvalidTableDefinition) +} diff --git a/orm/go.mod b/orm/go.mod index 7e32039e8cb6..c619d400c0bb 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -1,20 +1,20 @@ module github.com/cosmos/cosmos-sdk/orm -go 1.17 +go 1.18 require ( + cosmossdk.io/errors v1.0.0-beta.6 github.com/cosmos/cosmos-proto v1.0.0-alpha7 github.com/cosmos/cosmos-sdk/api v0.1.0 - github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.4 github.com/golang/mock v1.6.0 - github.com/google/go-cmp v0.5.7 + github.com/google/go-cmp v0.5.8 github.com/iancoleman/strcase v0.2.0 - github.com/regen-network/gocuke v0.6.1 + github.com/regen-network/gocuke v0.6.2 github.com/stretchr/testify v1.7.1 github.com/tendermint/tm-db v0.6.7 - google.golang.org/grpc v1.45.0 + google.golang.org/grpc v1.46.2 google.golang.org/protobuf v1.28.0 - gotest.tools/v3 v3.1.0 + gotest.tools/v3 v3.2.0 pgregory.net/rapid v0.4.7 ) @@ -24,14 +24,14 @@ require ( github.com/cespare/xxhash v1.1.0 // indirect github.com/cockroachdb/apd/v3 v3.1.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect - github.com/cucumber/messages-go/v16 v16.0.1 // indirect + github.com/cucumber/common/gherkin/go/v22 v22.0.0 // indirect + github.com/cucumber/common/messages/go/v17 v17.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.2 // indirect github.com/dgraph-io/ristretto v0.0.3 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/gofrs/uuid v4.0.0+incompatible // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 // indirect @@ -44,7 +44,6 @@ require ( golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect golang.org/x/text v0.3.6 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect diff --git a/orm/go.sum b/orm/go.sum index bd18bce305b2..0b4e8cb3e2c1 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -1,5 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cosmossdk.io/errors v1.0.0-beta.6 h1:aIn9ZemUfjdgVHNuAgEcKklbOa+ygv6u9gbWOGvzIoU= +cosmossdk.io/errors v1.0.0-beta.6/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= @@ -20,9 +22,9 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= @@ -33,16 +35,13 @@ github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hk github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= github.com/cosmos/cosmos-sdk/api v0.1.0/go.mod h1:CupqQBskAOiTXO1XDZ/wrtWzN/wTxUvbQmOqdUhR8wI= -github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.4 h1:Kjv3QD2Y3C7TvxDh1+Yg9cXefwFbTOUypUtB1tMJRco= -github.com/cosmos/cosmos-sdk/errors v1.0.0-beta.4/go.mod h1:HFea93YKmoMJ/mNKtkSeJZDtyJ4inxBsUK928KONcqo= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cucumber/gherkin-go/v19 v19.0.3 h1:mMSKu1077ffLbTJULUfM5HPokgeBcIGboyeNUof1MdE= -github.com/cucumber/gherkin-go/v19 v19.0.3/go.mod h1:jY/NP6jUtRSArQQJ5h1FXOUgk5fZK24qtE7vKi776Vw= -github.com/cucumber/messages-go/v16 v16.0.0/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= -github.com/cucumber/messages-go/v16 v16.0.1 h1:fvkpwsLgnIm0qugftrw2YwNlio+ABe2Iu94Ap8GMYIY= -github.com/cucumber/messages-go/v16 v16.0.1/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= +github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= +github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= +github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/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= @@ -60,21 +59,19 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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= @@ -108,8 +105,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.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.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= @@ -127,7 +124,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= -github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= 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= @@ -148,8 +144,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/regen-network/gocuke v0.6.1 h1:SEsXbZDg7/DXpy/hPsLbVvfdObpK13PsJ8Pq3ko+S4s= -github.com/regen-network/gocuke v0.6.1/go.mod h1:+i/R+pDBMLx1M7rL3fV7FC18gzyVTdGu3rNLUSOzHIo= +github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= +github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -233,7 +229,6 @@ 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-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b h1:3Dq0eVHn0uaQJmPO+/aYPI/fRMqdrVDbu7MQcku54gg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -265,7 +260,6 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf h1:SVYXkUz2yZS9FWb2Gm8ivSlbNQzL2Z/NpPKE3RG2jWk= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -274,10 +268,9 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 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= @@ -306,8 +299,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= -gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ= +gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= diff --git a/orm/internal/buf.gen.yaml b/orm/internal/buf.gen.yaml index bd2a91632353..7acae39d5714 100644 --- a/orm/internal/buf.gen.yaml +++ b/orm/internal/buf.gen.yaml @@ -4,7 +4,7 @@ managed: go_package_prefix: default: github.com/cosmos/cosmos-sdk/orm/internal override: - buf.build/cosmos/cosmos-sdk: github.com/cosmos/cosmos-sdk/api + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api plugins: - name: go-pulsar out: . diff --git a/orm/internal/codegen/codegen.go b/orm/internal/codegen/codegen.go index 32060091d13f..dc9aa8cf36d8 100644 --- a/orm/internal/codegen/codegen.go +++ b/orm/internal/codegen/codegen.go @@ -3,19 +3,16 @@ package codegen import ( "fmt" + "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" - v1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" - "github.com/cosmos/cosmos-proto/generator" - - "google.golang.org/protobuf/compiler/protogen" + ormv1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" ) const ( contextPkg = protogen.GoImportPath("context") ormListPkg = protogen.GoImportPath("github.com/cosmos/cosmos-sdk/orm/model/ormlist") - ormdbPkg = protogen.GoImportPath("github.com/cosmos/cosmos-sdk/orm/model/ormdb") ormErrPkg = protogen.GoImportPath("github.com/cosmos/cosmos-sdk/orm/types/ormerrors") ormTablePkg = protogen.GoImportPath("github.com/cosmos/cosmos-sdk/orm/model/ormtable") ) @@ -48,11 +45,11 @@ func PluginRunner(p *protogen.Plugin) error { func hasTables(file *protogen.File) bool { for _, message := range file.Messages { - if proto.GetExtension(message.Desc.Options(), v1alpha1.E_Table).(*v1alpha1.TableDescriptor) != nil { + if proto.GetExtension(message.Desc.Options(), ormv1.E_Table).(*ormv1.TableDescriptor) != nil { return true } - if proto.GetExtension(message.Desc.Options(), v1alpha1.E_Singleton).(*v1alpha1.SingletonDescriptor) != nil { + if proto.GetExtension(message.Desc.Options(), ormv1.E_Singleton).(*ormv1.SingletonDescriptor) != nil { return true } } diff --git a/orm/internal/codegen/file.go b/orm/internal/codegen/file.go index f6af30a51bfe..c19b81ac9edb 100644 --- a/orm/internal/codegen/file.go +++ b/orm/internal/codegen/file.go @@ -9,7 +9,7 @@ import ( "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" - v1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + ormv1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" ) type fileGen struct { @@ -23,7 +23,7 @@ func (f fileGen) gen() error { f.P("package ", f.file.GoPackageName) stores := make([]*protogen.Message, 0) for _, msg := range f.file.Messages { - tableDesc := proto.GetExtension(msg.Desc.Options(), v1alpha1.E_Table).(*v1alpha1.TableDescriptor) + tableDesc := proto.GetExtension(msg.Desc.Options(), ormv1.E_Table).(*ormv1.TableDescriptor) if tableDesc != nil { tableGen, err := newTableGen(f, msg, tableDesc) if err != nil { @@ -31,7 +31,7 @@ func (f fileGen) gen() error { } tableGen.gen() } - singletonDesc := proto.GetExtension(msg.Desc.Options(), v1alpha1.E_Singleton).(*v1alpha1.SingletonDescriptor) + singletonDesc := proto.GetExtension(msg.Desc.Options(), ormv1.E_Singleton).(*ormv1.SingletonDescriptor) if singletonDesc != nil { // do some singleton magic singletonGen, err := newSingletonGen(f, msg, singletonDesc) @@ -153,7 +153,6 @@ func (f fileGen) genStoreConstructor(stores []*protogen.Message) { } f.P("}, nil") f.P("}") - } func (f fileGen) fieldsToCamelCase(fields string) string { diff --git a/orm/internal/codegen/index.go b/orm/internal/codegen/index.go index 61c1281e35ae..9b889d431e46 100644 --- a/orm/internal/codegen/index.go +++ b/orm/internal/codegen/index.go @@ -9,7 +9,6 @@ import ( ) func (t tableGen) genIndexKeys() { - // interface that all keys must adhere to t.P("type ", t.indexKeyInterfaceName(), " interface {") t.P("id() uint32") @@ -112,7 +111,6 @@ func (t tableGen) genIndex(fields string, id uint32, isPrimaryKey bool) { for i := 1; i < len(fieldsSlc)+1; i++ { t.genWithMethods(idxKeyName, fieldsSlc[:i]) } - } func (t tableGen) genIndexInterfaceMethods(id uint32, indexStructName string) { diff --git a/orm/internal/codegen/singleton.go b/orm/internal/codegen/singleton.go index be1bc8c5618c..427a54f55f50 100644 --- a/orm/internal/codegen/singleton.go +++ b/orm/internal/codegen/singleton.go @@ -6,18 +6,19 @@ import ( "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/types/dynamicpb" - ormv1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + ormv1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" + "github.com/cosmos/cosmos-sdk/orm/model/ormtable" ) type singletonGen struct { fileGen msg *protogen.Message - table *ormv1alpha1.SingletonDescriptor + table *ormv1.SingletonDescriptor ormTable ormtable.Table } -func newSingletonGen(fileGen fileGen, msg *protogen.Message, table *ormv1alpha1.SingletonDescriptor) (*singletonGen, error) { +func newSingletonGen(fileGen fileGen, msg *protogen.Message, table *ormv1.SingletonDescriptor) (*singletonGen, error) { s := &singletonGen{fileGen: fileGen, msg: msg, table: table} var err error s.ormTable, err = ormtable.Build(ormtable.Options{ diff --git a/orm/internal/codegen/table.go b/orm/internal/codegen/table.go index f4231976ccd0..ed03ac5eb55a 100644 --- a/orm/internal/codegen/table.go +++ b/orm/internal/codegen/table.go @@ -8,7 +8,8 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/dynamicpb" - ormv1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + ormv1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" + "github.com/cosmos/cosmos-sdk/orm/internal/fieldnames" "github.com/cosmos/cosmos-sdk/orm/model/ormtable" ) @@ -16,22 +17,22 @@ import ( type tableGen struct { fileGen msg *protogen.Message - table *ormv1alpha1.TableDescriptor + table *ormv1.TableDescriptor primaryKeyFields fieldnames.FieldNames fields map[protoreflect.Name]*protogen.Field - uniqueIndexes []*ormv1alpha1.SecondaryIndexDescriptor + uniqueIndexes []*ormv1.SecondaryIndexDescriptor ormTable ormtable.Table } const notFoundDocs = " returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found." -func newTableGen(fileGen fileGen, msg *protogen.Message, table *ormv1alpha1.TableDescriptor) (*tableGen, error) { +func newTableGen(fileGen fileGen, msg *protogen.Message, table *ormv1.TableDescriptor) (*tableGen, error) { t := &tableGen{fileGen: fileGen, msg: msg, table: table, fields: map[protoreflect.Name]*protogen.Field{}} t.primaryKeyFields = fieldnames.CommaSeparatedFieldNames(table.PrimaryKey.Fields) for _, field := range msg.Fields { t.fields[field.Desc.Name()] = field } - uniqIndexes := make([]*ormv1alpha1.SecondaryIndexDescriptor, 0) + uniqIndexes := make([]*ormv1.SecondaryIndexDescriptor, 0) for _, idx := range t.table.Index { if idx.Unique { uniqIndexes = append(uniqIndexes, idx) @@ -60,7 +61,7 @@ func (t tableGen) getTableInterface() { t.P("type ", t.messageTableInterfaceName(t.msg), " interface {") t.P("Insert(ctx ", contextPkg.Ident("Context"), ", ", t.param(t.msg.GoIdent.GoName), " *", t.QualifiedGoIdent(t.msg.GoIdent), ") error") if t.table.PrimaryKey.AutoIncrement { - t.P("InsertReturningID(ctx ", contextPkg.Ident("Context"), ", ", t.param(t.msg.GoIdent.GoName), " *", t.QualifiedGoIdent(t.msg.GoIdent), ") (uint64, error)") + t.P("InsertReturning", t.fieldsToCamelCase(t.table.PrimaryKey.Fields), "(ctx ", contextPkg.Ident("Context"), ", ", t.param(t.msg.GoIdent.GoName), " *", t.QualifiedGoIdent(t.msg.GoIdent), ") (uint64, error)") } t.P("Update(ctx ", contextPkg.Ident("Context"), ", ", t.param(t.msg.GoIdent.GoName), " *", t.QualifiedGoIdent(t.msg.GoIdent), ") error") t.P("Save(ctx ", contextPkg.Ident("Context"), ", ", t.param(t.msg.GoIdent.GoName), " *", t.QualifiedGoIdent(t.msg.GoIdent), ") error") @@ -96,7 +97,7 @@ func (t tableGen) uniqueIndexSig(idxFields string) (string, string, string) { return hasFuncSig, getFuncSig, getFuncName } -func (t tableGen) genUniqueIndexSig(idx *ormv1alpha1.SecondaryIndexDescriptor) { +func (t tableGen) genUniqueIndexSig(idx *ormv1.SecondaryIndexDescriptor) { hasSig, getSig, getFuncName := t.uniqueIndexSig(idx.Fields) t.P(hasSig) t.P("// ", getFuncName, notFoundDocs) @@ -179,8 +180,8 @@ func (t tableGen) genTableImpl() { } if t.table.PrimaryKey.AutoIncrement { - t.P(receiver, "InsertReturningID(ctx ", contextPkg.Ident("Context"), ", ", varName, " *", varTypeName, ") (uint64, error) {") - t.P("return ", receiverVar, ".table.InsertReturningID(ctx, ", varName, ")") + t.P(receiver, "InsertReturning", t.fieldsToCamelCase(t.table.PrimaryKey.Fields), "(ctx ", contextPkg.Ident("Context"), ", ", varName, " *", varTypeName, ") (uint64, error) {") + t.P("return ", receiverVar, ".table.InsertReturningPKey(ctx, ", varName, ")") t.P("}") t.P() } diff --git a/orm/internal/testkv/debug.go b/orm/internal/testkv/debug.go index 8cdc032f5a67..5e2382246d46 100644 --- a/orm/internal/testkv/debug.go +++ b/orm/internal/testkv/debug.go @@ -14,7 +14,6 @@ import ( // Debugger is an interface that handles debug info from the debug store wrapper. type Debugger interface { - // Log logs a single log message. Log(string) diff --git a/orm/internal/testkv/leveldb.go b/orm/internal/testkv/leveldb.go new file mode 100644 index 000000000000..e7fb201e0a4e --- /dev/null +++ b/orm/internal/testkv/leveldb.go @@ -0,0 +1,18 @@ +package testkv + +import ( + "testing" + + dbm "github.com/tendermint/tm-db" + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/model/ormtable" +) + +func NewGoLevelDBBackend(t testing.TB) ormtable.Backend { + db, err := dbm.NewGoLevelDB("test", t.TempDir()) + assert.NilError(t, err) + return ormtable.NewBackend(ormtable.BackendOptions{ + CommitmentStore: db, + }) +} diff --git a/orm/internal/testpb/bank.proto b/orm/internal/testpb/bank.proto index 919ae5f163f3..8461b5a99c1e 100644 --- a/orm/internal/testpb/bank.proto +++ b/orm/internal/testpb/bank.proto @@ -2,37 +2,37 @@ syntax = "proto3"; package testpb; -import "cosmos/orm/v1alpha1/orm.proto"; +import "cosmos/orm/v1/orm.proto"; // This is a simulated bank schema used for testing. message Balance { - option (cosmos.orm.v1alpha1.table) = { + option (cosmos.orm.v1.table) = { id: 1; -primary_key: { -fields: - "address,denom" -} -index: { -id: - 1 fields: "denom" -} -}; + primary_key: { + fields: + "address,denom" + } + index: { + id: + 1 fields: "denom" + } + }; -string address = 1; -string denom = 2; -uint64 amount = 3; + string address = 1; + string denom = 2; + uint64 amount = 3; } message Supply { - option (cosmos.orm.v1alpha1.table) = { + option (cosmos.orm.v1.table) = { id: 2; -primary_key: { -fields: - "denom" -} -}; + primary_key: { + fields: + "denom" + } + }; -string denom = 1; -uint64 amount = 2; + string denom = 1; + uint64 amount = 2; } diff --git a/orm/internal/testpb/bank.pulsar.go b/orm/internal/testpb/bank.pulsar.go index 1a347bf5575e..4a434fc7ab77 100644 --- a/orm/internal/testpb/bank.pulsar.go +++ b/orm/internal/testpb/bank.pulsar.go @@ -4,7 +4,7 @@ package testpb import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -1124,30 +1124,30 @@ var File_testpb_bank_proto protoreflect.FileDescriptor var file_testpb_bank_proto_rawDesc = []byte{ 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x1d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x07, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x24, 0xf2, - 0x9e, 0xd3, 0x8e, 0x03, 0x1e, 0x0a, 0x0f, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2c, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x10, - 0x01, 0x18, 0x01, 0x22, 0x49, 0x0a, 0x06, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x11, 0xf2, 0x9e, 0xd3, - 0x8e, 0x03, 0x0b, 0x0a, 0x07, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x42, 0x81, - 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x09, 0x42, - 0x61, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, - 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, - 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x24, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x1e, 0x0a, + 0x0f, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x12, 0x09, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x10, 0x01, 0x18, 0x01, 0x22, 0x49, 0x0a, + 0x06, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x11, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x0b, 0x0a, 0x07, 0x0a, + 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x42, 0x81, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x09, 0x42, 0x61, 0x6e, 0x6b, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, + 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, + 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/orm/internal/testpb/test_schema.cosmos_orm.go b/orm/internal/testpb/test_schema.cosmos_orm.go index 5f62658a0778..a5cf2a6fbd11 100644 --- a/orm/internal/testpb/test_schema.cosmos_orm.go +++ b/orm/internal/testpb/test_schema.cosmos_orm.go @@ -215,7 +215,7 @@ func NewExampleTableTable(db ormtable.Schema) (ExampleTableTable, error) { type ExampleAutoIncrementTableTable interface { Insert(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) error - InsertReturningID(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) (uint64, error) + InsertReturningId(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) (uint64, error) Update(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) error Save(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) error Delete(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) error @@ -298,8 +298,8 @@ func (this exampleAutoIncrementTableTable) Delete(ctx context.Context, exampleAu return this.table.Delete(ctx, exampleAutoIncrementTable) } -func (this exampleAutoIncrementTableTable) InsertReturningID(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) (uint64, error) { - return this.table.InsertReturningID(ctx, exampleAutoIncrementTable) +func (this exampleAutoIncrementTableTable) InsertReturningId(ctx context.Context, exampleAutoIncrementTable *ExampleAutoIncrementTable) (uint64, error) { + return this.table.InsertReturningPKey(ctx, exampleAutoIncrementTable) } func (this exampleAutoIncrementTableTable) Has(ctx context.Context, id uint64) (found bool, err error) { @@ -400,7 +400,7 @@ func NewExampleSingletonTable(db ormtable.Schema) (ExampleSingletonTable, error) type ExampleTimestampTable interface { Insert(ctx context.Context, exampleTimestamp *ExampleTimestamp) error - InsertReturningID(ctx context.Context, exampleTimestamp *ExampleTimestamp) (uint64, error) + InsertReturningId(ctx context.Context, exampleTimestamp *ExampleTimestamp) (uint64, error) Update(ctx context.Context, exampleTimestamp *ExampleTimestamp) error Save(ctx context.Context, exampleTimestamp *ExampleTimestamp) error Delete(ctx context.Context, exampleTimestamp *ExampleTimestamp) error @@ -480,8 +480,8 @@ func (this exampleTimestampTable) Delete(ctx context.Context, exampleTimestamp * return this.table.Delete(ctx, exampleTimestamp) } -func (this exampleTimestampTable) InsertReturningID(ctx context.Context, exampleTimestamp *ExampleTimestamp) (uint64, error) { - return this.table.InsertReturningID(ctx, exampleTimestamp) +func (this exampleTimestampTable) InsertReturningId(ctx context.Context, exampleTimestamp *ExampleTimestamp) (uint64, error) { + return this.table.InsertReturningPKey(ctx, exampleTimestamp) } func (this exampleTimestampTable) Has(ctx context.Context, id uint64) (found bool, err error) { @@ -680,12 +680,132 @@ func NewSimpleExampleTable(db ormtable.Schema) (SimpleExampleTable, error) { return simpleExampleTable{table}, nil } +type ExampleAutoIncFieldNameTable interface { + Insert(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error + InsertReturningFoo(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) (uint64, error) + Update(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error + Save(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error + Delete(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error + Has(ctx context.Context, foo uint64) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, foo uint64) (*ExampleAutoIncFieldName, error) + List(ctx context.Context, prefixKey ExampleAutoIncFieldNameIndexKey, opts ...ormlist.Option) (ExampleAutoIncFieldNameIterator, error) + ListRange(ctx context.Context, from, to ExampleAutoIncFieldNameIndexKey, opts ...ormlist.Option) (ExampleAutoIncFieldNameIterator, error) + DeleteBy(ctx context.Context, prefixKey ExampleAutoIncFieldNameIndexKey) error + DeleteRange(ctx context.Context, from, to ExampleAutoIncFieldNameIndexKey) error + + doNotImplement() +} + +type ExampleAutoIncFieldNameIterator struct { + ormtable.Iterator +} + +func (i ExampleAutoIncFieldNameIterator) Value() (*ExampleAutoIncFieldName, error) { + var exampleAutoIncFieldName ExampleAutoIncFieldName + err := i.UnmarshalMessage(&exampleAutoIncFieldName) + return &exampleAutoIncFieldName, err +} + +type ExampleAutoIncFieldNameIndexKey interface { + id() uint32 + values() []interface{} + exampleAutoIncFieldNameIndexKey() +} + +// primary key starting index.. +type ExampleAutoIncFieldNamePrimaryKey = ExampleAutoIncFieldNameFooIndexKey + +type ExampleAutoIncFieldNameFooIndexKey struct { + vs []interface{} +} + +func (x ExampleAutoIncFieldNameFooIndexKey) id() uint32 { return 0 } +func (x ExampleAutoIncFieldNameFooIndexKey) values() []interface{} { return x.vs } +func (x ExampleAutoIncFieldNameFooIndexKey) exampleAutoIncFieldNameIndexKey() {} + +func (this ExampleAutoIncFieldNameFooIndexKey) WithFoo(foo uint64) ExampleAutoIncFieldNameFooIndexKey { + this.vs = []interface{}{foo} + return this +} + +type exampleAutoIncFieldNameTable struct { + table ormtable.AutoIncrementTable +} + +func (this exampleAutoIncFieldNameTable) Insert(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error { + return this.table.Insert(ctx, exampleAutoIncFieldName) +} + +func (this exampleAutoIncFieldNameTable) Update(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error { + return this.table.Update(ctx, exampleAutoIncFieldName) +} + +func (this exampleAutoIncFieldNameTable) Save(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error { + return this.table.Save(ctx, exampleAutoIncFieldName) +} + +func (this exampleAutoIncFieldNameTable) Delete(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) error { + return this.table.Delete(ctx, exampleAutoIncFieldName) +} + +func (this exampleAutoIncFieldNameTable) InsertReturningFoo(ctx context.Context, exampleAutoIncFieldName *ExampleAutoIncFieldName) (uint64, error) { + return this.table.InsertReturningPKey(ctx, exampleAutoIncFieldName) +} + +func (this exampleAutoIncFieldNameTable) Has(ctx context.Context, foo uint64) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, foo) +} + +func (this exampleAutoIncFieldNameTable) Get(ctx context.Context, foo uint64) (*ExampleAutoIncFieldName, error) { + var exampleAutoIncFieldName ExampleAutoIncFieldName + found, err := this.table.PrimaryKey().Get(ctx, &exampleAutoIncFieldName, foo) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &exampleAutoIncFieldName, nil +} + +func (this exampleAutoIncFieldNameTable) List(ctx context.Context, prefixKey ExampleAutoIncFieldNameIndexKey, opts ...ormlist.Option) (ExampleAutoIncFieldNameIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return ExampleAutoIncFieldNameIterator{it}, err +} + +func (this exampleAutoIncFieldNameTable) ListRange(ctx context.Context, from, to ExampleAutoIncFieldNameIndexKey, opts ...ormlist.Option) (ExampleAutoIncFieldNameIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return ExampleAutoIncFieldNameIterator{it}, err +} + +func (this exampleAutoIncFieldNameTable) DeleteBy(ctx context.Context, prefixKey ExampleAutoIncFieldNameIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this exampleAutoIncFieldNameTable) DeleteRange(ctx context.Context, from, to ExampleAutoIncFieldNameIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this exampleAutoIncFieldNameTable) doNotImplement() {} + +var _ ExampleAutoIncFieldNameTable = exampleAutoIncFieldNameTable{} + +func NewExampleAutoIncFieldNameTable(db ormtable.Schema) (ExampleAutoIncFieldNameTable, error) { + table := db.GetTable(&ExampleAutoIncFieldName{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&ExampleAutoIncFieldName{}).ProtoReflect().Descriptor().FullName())) + } + return exampleAutoIncFieldNameTable{table.(ormtable.AutoIncrementTable)}, nil +} + type TestSchemaStore interface { ExampleTableTable() ExampleTableTable ExampleAutoIncrementTableTable() ExampleAutoIncrementTableTable ExampleSingletonTable() ExampleSingletonTable ExampleTimestampTable() ExampleTimestampTable SimpleExampleTable() SimpleExampleTable + ExampleAutoIncFieldNameTable() ExampleAutoIncFieldNameTable doNotImplement() } @@ -696,6 +816,7 @@ type testSchemaStore struct { exampleSingleton ExampleSingletonTable exampleTimestamp ExampleTimestampTable simpleExample SimpleExampleTable + exampleAutoIncFieldName ExampleAutoIncFieldNameTable } func (x testSchemaStore) ExampleTableTable() ExampleTableTable { @@ -718,6 +839,10 @@ func (x testSchemaStore) SimpleExampleTable() SimpleExampleTable { return x.simpleExample } +func (x testSchemaStore) ExampleAutoIncFieldNameTable() ExampleAutoIncFieldNameTable { + return x.exampleAutoIncFieldName +} + func (testSchemaStore) doNotImplement() {} var _ TestSchemaStore = testSchemaStore{} @@ -748,11 +873,17 @@ func NewTestSchemaStore(db ormtable.Schema) (TestSchemaStore, error) { return nil, err } + exampleAutoIncFieldNameTable, err := NewExampleAutoIncFieldNameTable(db) + if err != nil { + return nil, err + } + return testSchemaStore{ exampleTableTable, exampleAutoIncrementTableTable, exampleSingletonTable, exampleTimestampTable, simpleExampleTable, + exampleAutoIncFieldNameTable, }, nil } diff --git a/orm/internal/testpb/test_schema.proto b/orm/internal/testpb/test_schema.proto index 522e801f994e..ca2137531cf8 100644 --- a/orm/internal/testpb/test_schema.proto +++ b/orm/internal/testpb/test_schema.proto @@ -4,10 +4,10 @@ package testpb; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; -import "cosmos/orm/v1alpha1/orm.proto"; +import "cosmos/orm/v1/orm.proto"; message ExampleTable { - option (cosmos.orm.v1alpha1.table) = { + option (cosmos.orm.v1.table) = { id: 1; primary_key: { fields: @@ -74,7 +74,7 @@ enum Enum { } message ExampleAutoIncrementTable { - option (cosmos.orm.v1alpha1.table) = { + option (cosmos.orm.v1.table) = { id: 3 primary_key: {fields: "id" auto_increment: true} index: {id: 1 fields: "x" unique: true} @@ -86,7 +86,7 @@ message ExampleAutoIncrementTable { } message ExampleSingleton { - option (cosmos.orm.v1alpha1.singleton) = { + option (cosmos.orm.v1.singleton) = { id: 2 }; string foo = 1; @@ -94,7 +94,7 @@ message ExampleSingleton { } message ExampleTimestamp { - option (cosmos.orm.v1alpha1.table) = { + option (cosmos.orm.v1.table) = { id: 4 primary_key: {fields: "id" auto_increment: true} index: {id: 1 fields: "ts"} @@ -106,7 +106,7 @@ message ExampleTimestamp { } message SimpleExample { - option (cosmos.orm.v1alpha1.table) = { + option (cosmos.orm.v1.table) = { id: 5 primary_key: {fields: "name"} index: {id: 1, fields: "unique", unique: true} @@ -115,4 +115,14 @@ message SimpleExample { string name = 1; string unique = 2; string not_unique = 3; +} + +// ExampleAutoIncFieldName is a table for testing InsertReturning. +message ExampleAutoIncFieldName { + option (cosmos.orm.v1.table) = { + id: 6 + primary_key: {fields: "foo" auto_increment: true} + }; + uint64 foo = 1; + uint64 bar = 2; } \ No newline at end of file diff --git a/orm/internal/testpb/test_schema.pulsar.go b/orm/internal/testpb/test_schema.pulsar.go index 6cb4e98cb9a2..25719593c075 100644 --- a/orm/internal/testpb/test_schema.pulsar.go +++ b/orm/internal/testpb/test_schema.pulsar.go @@ -5,7 +5,7 @@ import ( binary "encoding/binary" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -1872,7 +1872,7 @@ func (x *ExampleTable_ExampleMessage) ProtoReflect() protoreflect.Message { } func (x *ExampleTable_ExampleMessage) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_test_schema_proto_msgTypes[6] + mi := &file_testpb_test_schema_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4397,6 +4397,458 @@ func (x *fastReflection_SimpleExample) ProtoMethods() *protoiface.Methods { } } +var ( + md_ExampleAutoIncFieldName protoreflect.MessageDescriptor + fd_ExampleAutoIncFieldName_foo protoreflect.FieldDescriptor + fd_ExampleAutoIncFieldName_bar protoreflect.FieldDescriptor +) + +func init() { + file_testpb_test_schema_proto_init() + md_ExampleAutoIncFieldName = File_testpb_test_schema_proto.Messages().ByName("ExampleAutoIncFieldName") + fd_ExampleAutoIncFieldName_foo = md_ExampleAutoIncFieldName.Fields().ByName("foo") + fd_ExampleAutoIncFieldName_bar = md_ExampleAutoIncFieldName.Fields().ByName("bar") +} + +var _ protoreflect.Message = (*fastReflection_ExampleAutoIncFieldName)(nil) + +type fastReflection_ExampleAutoIncFieldName ExampleAutoIncFieldName + +func (x *ExampleAutoIncFieldName) ProtoReflect() protoreflect.Message { + return (*fastReflection_ExampleAutoIncFieldName)(x) +} + +func (x *ExampleAutoIncFieldName) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_test_schema_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_ExampleAutoIncFieldName_messageType fastReflection_ExampleAutoIncFieldName_messageType +var _ protoreflect.MessageType = fastReflection_ExampleAutoIncFieldName_messageType{} + +type fastReflection_ExampleAutoIncFieldName_messageType struct{} + +func (x fastReflection_ExampleAutoIncFieldName_messageType) Zero() protoreflect.Message { + return (*fastReflection_ExampleAutoIncFieldName)(nil) +} +func (x fastReflection_ExampleAutoIncFieldName_messageType) New() protoreflect.Message { + return new(fastReflection_ExampleAutoIncFieldName) +} +func (x fastReflection_ExampleAutoIncFieldName_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ExampleAutoIncFieldName +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ExampleAutoIncFieldName) Descriptor() protoreflect.MessageDescriptor { + return md_ExampleAutoIncFieldName +} + +// 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_ExampleAutoIncFieldName) Type() protoreflect.MessageType { + return _fastReflection_ExampleAutoIncFieldName_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ExampleAutoIncFieldName) New() protoreflect.Message { + return new(fastReflection_ExampleAutoIncFieldName) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ExampleAutoIncFieldName) Interface() protoreflect.ProtoMessage { + return (*ExampleAutoIncFieldName)(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_ExampleAutoIncFieldName) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Foo != uint64(0) { + value := protoreflect.ValueOfUint64(x.Foo) + if !f(fd_ExampleAutoIncFieldName_foo, value) { + return + } + } + if x.Bar != uint64(0) { + value := protoreflect.ValueOfUint64(x.Bar) + if !f(fd_ExampleAutoIncFieldName_bar, 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_ExampleAutoIncFieldName) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.ExampleAutoIncFieldName.foo": + return x.Foo != uint64(0) + case "testpb.ExampleAutoIncFieldName.bar": + return x.Bar != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ExampleAutoIncFieldName")) + } + panic(fmt.Errorf("message testpb.ExampleAutoIncFieldName 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_ExampleAutoIncFieldName) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.ExampleAutoIncFieldName.foo": + x.Foo = uint64(0) + case "testpb.ExampleAutoIncFieldName.bar": + x.Bar = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ExampleAutoIncFieldName")) + } + panic(fmt.Errorf("message testpb.ExampleAutoIncFieldName 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_ExampleAutoIncFieldName) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.ExampleAutoIncFieldName.foo": + value := x.Foo + return protoreflect.ValueOfUint64(value) + case "testpb.ExampleAutoIncFieldName.bar": + value := x.Bar + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ExampleAutoIncFieldName")) + } + panic(fmt.Errorf("message testpb.ExampleAutoIncFieldName 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_ExampleAutoIncFieldName) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.ExampleAutoIncFieldName.foo": + x.Foo = value.Uint() + case "testpb.ExampleAutoIncFieldName.bar": + x.Bar = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ExampleAutoIncFieldName")) + } + panic(fmt.Errorf("message testpb.ExampleAutoIncFieldName 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_ExampleAutoIncFieldName) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.ExampleAutoIncFieldName.foo": + panic(fmt.Errorf("field foo of message testpb.ExampleAutoIncFieldName is not mutable")) + case "testpb.ExampleAutoIncFieldName.bar": + panic(fmt.Errorf("field bar of message testpb.ExampleAutoIncFieldName is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ExampleAutoIncFieldName")) + } + panic(fmt.Errorf("message testpb.ExampleAutoIncFieldName 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_ExampleAutoIncFieldName) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.ExampleAutoIncFieldName.foo": + return protoreflect.ValueOfUint64(uint64(0)) + case "testpb.ExampleAutoIncFieldName.bar": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.ExampleAutoIncFieldName")) + } + panic(fmt.Errorf("message testpb.ExampleAutoIncFieldName 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_ExampleAutoIncFieldName) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.ExampleAutoIncFieldName", 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_ExampleAutoIncFieldName) 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_ExampleAutoIncFieldName) 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_ExampleAutoIncFieldName) 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_ExampleAutoIncFieldName) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ExampleAutoIncFieldName) + 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.Foo != 0 { + n += 1 + runtime.Sov(uint64(x.Foo)) + } + if x.Bar != 0 { + n += 1 + runtime.Sov(uint64(x.Bar)) + } + 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().(*ExampleAutoIncFieldName) + 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.Bar != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Bar)) + i-- + dAtA[i] = 0x10 + } + if x.Foo != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Foo)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ExampleAutoIncFieldName) + 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: ExampleAutoIncFieldName: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExampleAutoIncFieldName: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) + } + x.Foo = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Foo |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + x.Bar = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Bar |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -4869,6 +5321,50 @@ func (x *SimpleExample) GetNotUnique() string { return "" } +// ExampleAutoIncFieldName is a table for testing InsertReturning. +type ExampleAutoIncFieldName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Foo uint64 `protobuf:"varint,1,opt,name=foo,proto3" json:"foo,omitempty"` + Bar uint64 `protobuf:"varint,2,opt,name=bar,proto3" json:"bar,omitempty"` +} + +func (x *ExampleAutoIncFieldName) Reset() { + *x = ExampleAutoIncFieldName{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_test_schema_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExampleAutoIncFieldName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExampleAutoIncFieldName) ProtoMessage() {} + +// Deprecated: Use ExampleAutoIncFieldName.ProtoReflect.Descriptor instead. +func (*ExampleAutoIncFieldName) Descriptor() ([]byte, []int) { + return file_testpb_test_schema_proto_rawDescGZIP(), []int{5} +} + +func (x *ExampleAutoIncFieldName) GetFoo() uint64 { + if x != nil { + return x.Foo + } + return 0 +} + +func (x *ExampleAutoIncFieldName) GetBar() uint64 { + if x != nil { + return x.Bar + } + return 0 +} + type ExampleTable_ExampleMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4881,7 +5377,7 @@ type ExampleTable_ExampleMessage struct { func (x *ExampleTable_ExampleMessage) Reset() { *x = ExampleTable_ExampleMessage{} if protoimpl.UnsafeEnabled { - mi := &file_testpb_test_schema_proto_msgTypes[6] + mi := &file_testpb_test_schema_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4921,94 +5417,99 @@ var file_testpb_test_schema_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xbd, 0x05, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x7a, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x62, 0x7a, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x02, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x64, 0x75, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, - 0x75, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x69, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x11, 0x52, 0x03, 0x73, 0x33, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x66, 0x33, 0x32, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0f, 0x52, 0x04, 0x73, 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x36, - 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x36, 0x34, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x73, 0x36, 0x34, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x66, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x04, 0x73, 0x66, - 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x33, 0x32, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x07, 0x52, - 0x03, 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x36, 0x34, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x06, 0x52, 0x03, 0x66, 0x36, 0x34, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x01, 0x62, 0x12, 0x1a, 0x0a, 0x01, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x01, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x11, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, - 0x6d, 0x61, 0x70, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x70, 0x62, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x35, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x70, 0x62, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x03, 0x6d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x1a, 0x36, 0x0a, 0x08, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x34, 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x3f, 0xf2, 0x9e, 0xd3, 0x8e, - 0x03, 0x39, 0x0a, 0x0d, 0x0a, 0x0b, 0x75, 0x33, 0x32, 0x2c, 0x69, 0x36, 0x34, 0x2c, 0x73, 0x74, - 0x72, 0x12, 0x0d, 0x0a, 0x07, 0x75, 0x36, 0x34, 0x2c, 0x73, 0x74, 0x72, 0x10, 0x01, 0x18, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x2c, 0x75, 0x33, 0x32, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x62, 0x7a, 0x2c, 0x73, 0x74, 0x72, 0x10, 0x03, 0x18, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x73, - 0x75, 0x6d, 0x22, 0x62, 0x0a, 0x19, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x41, 0x75, 0x74, - 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, - 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x79, 0x3a, 0x19, 0xf2, 0x9e, 0xd3, - 0x8e, 0x03, 0x13, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x01, 0x78, - 0x10, 0x01, 0x18, 0x01, 0x18, 0x03, 0x22, 0x40, 0x0a, 0x10, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, - 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, - 0x62, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x08, - 0xfa, 0x9e, 0xd3, 0x8e, 0x03, 0x02, 0x08, 0x02, 0x22, 0x7c, 0x0a, 0x10, 0x45, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x73, 0x3a, 0x18, 0xf2, 0x9e, - 0xd3, 0x8e, 0x03, 0x12, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, - 0x74, 0x73, 0x10, 0x01, 0x18, 0x04, 0x22, 0x7a, 0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, - 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x6e, 0x69, - 0x71, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x55, 0x6e, 0x69, 0x71, - 0x75, 0x65, 0x3a, 0x1e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x18, 0x0a, 0x06, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x0c, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x10, 0x01, 0x18, 0x01, - 0x18, 0x05, 0x2a, 0x64, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, - 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0c, - 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, - 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x0e, 0x45, - 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x45, 0x47, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0xfd, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, - 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, - 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x05, 0x0a, + 0x0c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, + 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x74, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x7a, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x02, 0x62, 0x7a, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x73, 0x12, + 0x2b, 0x0a, 0x03, 0x64, 0x75, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x75, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x69, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x33, 0x32, 0x12, 0x10, + 0x0a, 0x03, 0x73, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x73, 0x33, 0x32, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x66, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x04, + 0x73, 0x66, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x36, 0x34, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x03, 0x73, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x66, 0x36, 0x34, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x04, 0x73, 0x66, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, + 0x66, 0x33, 0x32, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x66, 0x33, 0x32, 0x12, 0x10, + 0x0a, 0x03, 0x66, 0x36, 0x34, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x66, 0x36, 0x34, + 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x62, 0x12, 0x1a, + 0x0a, 0x01, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x01, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x12, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x35, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x16, + 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x1a, 0x36, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x34, + 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, + 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x62, 0x61, 0x72, 0x3a, 0x3f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x39, 0x0a, 0x0d, 0x0a, 0x0b, + 0x75, 0x33, 0x32, 0x2c, 0x69, 0x36, 0x34, 0x2c, 0x73, 0x74, 0x72, 0x12, 0x0d, 0x0a, 0x07, 0x75, + 0x36, 0x34, 0x2c, 0x73, 0x74, 0x72, 0x10, 0x01, 0x18, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, + 0x72, 0x2c, 0x75, 0x33, 0x32, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x62, 0x7a, 0x2c, 0x73, 0x74, + 0x72, 0x10, 0x03, 0x18, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x62, 0x0a, 0x19, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x01, 0x79, 0x3a, 0x19, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x13, 0x0a, 0x06, 0x0a, + 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x01, 0x78, 0x10, 0x01, 0x18, 0x01, 0x18, 0x03, + 0x22, 0x40, 0x0a, 0x10, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x74, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x08, 0xfa, 0x9e, 0xd3, 0x8e, 0x03, 0x02, + 0x08, 0x02, 0x22, 0x7c, 0x0a, 0x10, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x02, 0x74, 0x73, 0x3a, 0x18, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x12, 0x0a, 0x06, + 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x74, 0x73, 0x10, 0x01, 0x18, 0x04, + 0x22, 0x7a, 0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x3a, 0x1e, 0xf2, 0x9e, + 0xd3, 0x8e, 0x03, 0x18, 0x0a, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0c, 0x0a, 0x06, + 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x10, 0x01, 0x18, 0x01, 0x18, 0x05, 0x22, 0x50, 0x0a, 0x17, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x11, 0xf2, 0x9e, 0xd3, + 0x8e, 0x03, 0x0b, 0x0a, 0x07, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x10, 0x01, 0x18, 0x06, 0x2a, 0x64, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, + 0x5f, 0x46, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x0e, 0x45, 0x4e, 0x55, 0x4d, 0x5f, + 0x4e, 0x45, 0x47, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x70, 0x62, 0x42, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, + 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, + 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5024,7 +5525,7 @@ func file_testpb_test_schema_proto_rawDescGZIP() []byte { } var file_testpb_test_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_testpb_test_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_testpb_test_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_testpb_test_schema_proto_goTypes = []interface{}{ (Enum)(0), // 0: testpb.Enum (*ExampleTable)(nil), // 1: testpb.ExampleTable @@ -5032,23 +5533,24 @@ var file_testpb_test_schema_proto_goTypes = []interface{}{ (*ExampleSingleton)(nil), // 3: testpb.ExampleSingleton (*ExampleTimestamp)(nil), // 4: testpb.ExampleTimestamp (*SimpleExample)(nil), // 5: testpb.SimpleExample - nil, // 6: testpb.ExampleTable.MapEntry - (*ExampleTable_ExampleMessage)(nil), // 7: testpb.ExampleTable.ExampleMessage - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 9: google.protobuf.Duration + (*ExampleAutoIncFieldName)(nil), // 6: testpb.ExampleAutoIncFieldName + nil, // 7: testpb.ExampleTable.MapEntry + (*ExampleTable_ExampleMessage)(nil), // 8: testpb.ExampleTable.ExampleMessage + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 10: google.protobuf.Duration } var file_testpb_test_schema_proto_depIdxs = []int32{ - 8, // 0: testpb.ExampleTable.ts:type_name -> google.protobuf.Timestamp - 9, // 1: testpb.ExampleTable.dur:type_name -> google.protobuf.Duration - 0, // 2: testpb.ExampleTable.e:type_name -> testpb.Enum - 6, // 3: testpb.ExampleTable.map:type_name -> testpb.ExampleTable.MapEntry - 7, // 4: testpb.ExampleTable.msg:type_name -> testpb.ExampleTable.ExampleMessage - 8, // 5: testpb.ExampleTimestamp.ts:type_name -> google.protobuf.Timestamp - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 9, // 0: testpb.ExampleTable.ts:type_name -> google.protobuf.Timestamp + 10, // 1: testpb.ExampleTable.dur:type_name -> google.protobuf.Duration + 0, // 2: testpb.ExampleTable.e:type_name -> testpb.Enum + 7, // 3: testpb.ExampleTable.map:type_name -> testpb.ExampleTable.MapEntry + 8, // 4: testpb.ExampleTable.msg:type_name -> testpb.ExampleTable.ExampleMessage + 9, // 5: testpb.ExampleTimestamp.ts:type_name -> google.protobuf.Timestamp + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_testpb_test_schema_proto_init() } @@ -5117,7 +5619,19 @@ func file_testpb_test_schema_proto_init() { return nil } } - file_testpb_test_schema_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_testpb_test_schema_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExampleAutoIncFieldName); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_test_schema_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExampleTable_ExampleMessage); i { case 0: return &v.state @@ -5139,7 +5653,7 @@ func file_testpb_test_schema_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_testpb_test_schema_proto_rawDesc, NumEnums: 1, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/orm/model/ormdb/json.go b/orm/model/ormdb/json.go index c8c78252ea1a..3a64ae52fbe6 100644 --- a/orm/model/ormdb/json.go +++ b/orm/model/ormdb/json.go @@ -11,7 +11,7 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" - "github.com/cosmos/cosmos-sdk/errors" + "cosmossdk.io/errors" ) func (m moduleDB) DefaultJSON(target ormjson.WriteTarget) error { diff --git a/orm/model/ormdb/module.go b/orm/model/ormdb/module.go index dfdc63f72047..4c6e1a0a34c5 100644 --- a/orm/model/ormdb/module.go +++ b/orm/model/ormdb/module.go @@ -51,7 +51,6 @@ type moduleDB struct { // ModuleDBOptions are options for constructing a ModuleDB. type ModuleDBOptions struct { - // TypeResolver is an optional type resolver to be used when unmarshaling // protobuf messages. If it is nil, protoregistry.GlobalTypes will be used. TypeResolver ormtable.TypeResolver diff --git a/orm/model/ormdb/module_test.go b/orm/model/ormdb/module_test.go index d7150455111d..5bb7a68420e5 100644 --- a/orm/model/ormdb/module_test.go +++ b/orm/model/ormdb/module_test.go @@ -355,13 +355,14 @@ func TestGetBackendResolver(t *testing.T) { }) assert.ErrorContains(t, err, "unsupported") - _, err = ormdb.NewModuleDB(&ormv1alpha1.ModuleSchemaDescriptor{SchemaFile: []*ormv1alpha1.ModuleSchemaDescriptor_FileEntry{ - { - Id: 1, - ProtoFileName: testpb.File_testpb_bank_proto.Path(), - StorageType: ormv1alpha1.StorageType_STORAGE_TYPE_MEMORY, + _, err = ormdb.NewModuleDB(&ormv1alpha1.ModuleSchemaDescriptor{ + SchemaFile: []*ormv1alpha1.ModuleSchemaDescriptor_FileEntry{ + { + Id: 1, + ProtoFileName: testpb.File_testpb_bank_proto.Path(), + StorageType: ormv1alpha1.StorageType_STORAGE_TYPE_MEMORY, + }, }, - }, }, ormdb.ModuleDBOptions{ GetBackendResolver: getResolver, }) diff --git a/orm/model/ormtable/auto_increment.go b/orm/model/ormtable/auto_increment.go index 40f625b73fac..2a0eed6f94b6 100644 --- a/orm/model/ormtable/auto_increment.go +++ b/orm/model/ormtable/auto_increment.go @@ -22,7 +22,7 @@ type autoIncrementTable struct { seqCodec *ormkv.SeqCodec } -func (t autoIncrementTable) InsertReturningID(ctx context.Context, message proto.Message) (newId uint64, err error) { +func (t autoIncrementTable) InsertReturningPKey(ctx context.Context, message proto.Message) (newPK uint64, err error) { backend, err := t.getWriteBackend(ctx) if err != nil { return 0, err @@ -61,7 +61,7 @@ func (t autoIncrementTable) Update(ctx context.Context, message proto.Message) e return err } -func (t *autoIncrementTable) save(ctx context.Context, backend Backend, message proto.Message, mode saveMode) (newId uint64, err error) { +func (t *autoIncrementTable) save(ctx context.Context, backend Backend, message proto.Message, mode saveMode) (newPK uint64, err error) { messageRef := message.ProtoReflect() val := messageRef.Get(t.autoIncField).Uint() writer := newBatchIndexCommitmentWriter(backend) @@ -73,12 +73,12 @@ func (t *autoIncrementTable) save(ctx context.Context, backend Backend, message } mode = saveModeInsert - newId, err = t.nextSeqValue(writer.IndexStore()) + newPK, err = t.nextSeqValue(writer.IndexStore()) if err != nil { return 0, err } - messageRef.Set(t.autoIncField, protoreflect.ValueOfUint64(newId)) + messageRef.Set(t.autoIncField, protoreflect.ValueOfUint64(newPK)) } else { if mode == saveModeInsert { return 0, ormerrors.AutoIncrementKeyAlreadySet @@ -87,7 +87,7 @@ func (t *autoIncrementTable) save(ctx context.Context, backend Backend, message mode = saveModeUpdate } - return newId, t.tableImpl.doSave(ctx, writer, message, mode) + return newPK, t.tableImpl.doSave(ctx, writer, message, mode) } func (t *autoIncrementTable) curSeqValue(kv kv.ReadonlyStore) (uint64, error) { @@ -121,11 +121,12 @@ func (t autoIncrementTable) EncodeEntry(entry ormkv.Entry) (k, v []byte, err err } func (t autoIncrementTable) ValidateJSON(reader io.Reader) error { - return t.decodeAutoIncJson(nil, reader, func(message proto.Message, maxID uint64) error { + return t.decodeAutoIncJson(nil, reader, func(message proto.Message, maxSeq uint64) error { messageRef := message.ProtoReflect() - id := messageRef.Get(t.autoIncField).Uint() - if id > maxID { - return fmt.Errorf("invalid ID %d, expected a value <= %d, the highest sequence number", id, maxID) + pkey := messageRef.Get(t.autoIncField).Uint() + if pkey > maxSeq { + return fmt.Errorf("invalid auto increment primary key %d, expected a value <= %d, the highest "+ + "sequence number", pkey, maxSeq) } if t.customJSONValidator != nil { @@ -142,22 +143,23 @@ func (t autoIncrementTable) ImportJSON(ctx context.Context, reader io.Reader) er return err } - return t.decodeAutoIncJson(backend, reader, func(message proto.Message, maxID uint64) error { + return t.decodeAutoIncJson(backend, reader, func(message proto.Message, maxSeq uint64) error { messageRef := message.ProtoReflect() - id := messageRef.Get(t.autoIncField).Uint() - if id == 0 { - // we don't have an ID in the JSON, so we call Save to insert and + pkey := messageRef.Get(t.autoIncField).Uint() + if pkey == 0 { + // we don't have a primary key in the JSON, so we call Save to insert and // generate one _, err = t.save(ctx, backend, message, saveModeInsert) return err } else { - if id > maxID { - return fmt.Errorf("invalid ID %d, expected a value <= %d, the highest sequence number", id, maxID) + if pkey > maxSeq { + return fmt.Errorf("invalid auto increment primary key %d, expected a value <= %d, the highest "+ + "sequence number", pkey, maxSeq) } - // we do have an ID and calling Save will fail because it expects - // either no ID or SAVE_MODE_UPDATE. So instead we drop one level + // we do have a primary key and calling Save will fail because it expects + // either no primary key or SAVE_MODE_UPDATE. So instead we drop one level // down and insert using tableImpl which doesn't know about - // auto-incrementing IDs + // auto-incrementing primary keys. return t.tableImpl.save(ctx, backend, message, saveModeInsert) } }) diff --git a/orm/model/ormtable/auto_increment_test.go b/orm/model/ormtable/auto_increment_test.go index 4f1556f4f1a3..c3180000dc5a 100644 --- a/orm/model/ormtable/auto_increment_test.go +++ b/orm/model/ormtable/auto_increment_test.go @@ -54,7 +54,7 @@ func runAutoIncrementScenario(t *testing.T, table ormtable.AutoIncrementTable, c assert.Equal(t, uint64(1), ex1.Id) ex2 := &testpb.ExampleAutoIncrementTable{X: "bar", Y: 10} - newId, err := table.InsertReturningID(ctx, ex2) + newId, err := table.InsertReturningPKey(ctx, ex2) assert.NilError(t, err) assert.Equal(t, uint64(2), ex2.Id) assert.Equal(t, newId, ex2.Id) @@ -89,9 +89,9 @@ func TestBadJSON(t *testing.T) { store := ormtable.WrapContextDefault(testkv.NewSplitMemBackend()) f, err := os.Open("testdata/bad_auto_inc.json") assert.NilError(t, err) - assert.ErrorContains(t, table.ImportJSON(store, f), "invalid ID") + assert.ErrorContains(t, table.ImportJSON(store, f), "invalid auto increment primary key") f, err = os.Open("testdata/bad_auto_inc2.json") assert.NilError(t, err) - assert.ErrorContains(t, table.ImportJSON(store, f), "invalid ID") + assert.ErrorContains(t, table.ImportJSON(store, f), "invalid auto increment primary key") } diff --git a/orm/model/ormtable/backend.go b/orm/model/ormtable/backend.go index 8013309d0fab..66ff949ad5c0 100644 --- a/orm/model/ormtable/backend.go +++ b/orm/model/ormtable/backend.go @@ -50,7 +50,6 @@ type Backend interface { // If the index store is not defined, the commitment store will be // used for all operations. type ReadBackendOptions struct { - // CommitmentStoreReader is a reader for the commitment store. CommitmentStoreReader kv.ReadonlyStore @@ -135,7 +134,6 @@ func (c backend) IndexStore() kv.Store { // If the index store is not defined, the commitment store will be // used for all operations. type BackendOptions struct { - // CommitmentStore is the commitment store. CommitmentStore kv.Store diff --git a/orm/model/ormtable/batch.go b/orm/model/ormtable/batch.go index c34dbf44464a..7983bee77269 100644 --- a/orm/model/ormtable/batch.go +++ b/orm/model/ormtable/batch.go @@ -75,7 +75,6 @@ func flushBuf(store kv.Store, writes []*batchWriterEntry) error { return err } } - } return nil } diff --git a/orm/model/ormtable/bench_test.go b/orm/model/ormtable/bench_test.go new file mode 100644 index 000000000000..6194b3cfed46 --- /dev/null +++ b/orm/model/ormtable/bench_test.go @@ -0,0 +1,315 @@ +package ormtable_test + +import ( + "context" + "fmt" + "testing" + + "google.golang.org/protobuf/proto" + + "github.com/cosmos/cosmos-sdk/orm/internal/testkv" + "github.com/cosmos/cosmos-sdk/orm/testing/ormtest" + + dbm "github.com/tendermint/tm-db" + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/internal/testpb" + "github.com/cosmos/cosmos-sdk/orm/model/ormtable" + "github.com/cosmos/cosmos-sdk/orm/types/kv" +) + +func initBalanceTable(t testing.TB) testpb.BalanceTable { + table, err := ormtable.Build(ormtable.Options{ + MessageType: (&testpb.Balance{}).ProtoReflect().Type(), + }) + assert.NilError(t, err) + + balanceTable, err := testpb.NewBalanceTable(table) + assert.NilError(t, err) + + return balanceTable +} + +func BenchmarkMemory(b *testing.B) { + bench(b, func(tb testing.TB) ormtable.Backend { + return ormtest.NewMemoryBackend() + }) +} + +func BenchmarkLevelDB(b *testing.B) { + bench(b, testkv.NewGoLevelDBBackend) +} + +func bench(b *testing.B, newBackend func(testing.TB) ormtable.Backend) { + b.Run("insert", func(b *testing.B) { + b.StopTimer() + ctx := ormtable.WrapContextDefault(newBackend(b)) + b.StartTimer() + benchInsert(b, ctx) + }) + b.Run("update", func(b *testing.B) { + b.StopTimer() + ctx := ormtable.WrapContextDefault(newBackend(b)) + benchInsert(b, ctx) + b.StartTimer() + benchUpdate(b, ctx) + }) + b.Run("get", func(b *testing.B) { + b.StopTimer() + ctx := ormtable.WrapContextDefault(newBackend(b)) + benchInsert(b, ctx) + b.StartTimer() + benchGet(b, ctx) + }) + b.Run("delete", func(b *testing.B) { + b.StopTimer() + ctx := ormtable.WrapContextDefault(newBackend(b)) + benchInsert(b, ctx) + b.StartTimer() + benchDelete(b, ctx) + }) +} + +func benchInsert(b *testing.B, ctx context.Context) { + balanceTable := initBalanceTable(b) + for i := 0; i < b.N; i++ { + assert.NilError(b, balanceTable.Insert(ctx, &testpb.Balance{ + Address: fmt.Sprintf("acct%d", i), + Denom: "bar", + Amount: 10, + })) + } +} + +func benchUpdate(b *testing.B, ctx context.Context) { + balanceTable := initBalanceTable(b) + for i := 0; i < b.N; i++ { + assert.NilError(b, balanceTable.Update(ctx, &testpb.Balance{ + Address: fmt.Sprintf("acct%d", i), + Denom: "bar", + Amount: 11, + })) + } +} + +func benchGet(b *testing.B, ctx context.Context) { + balanceTable := initBalanceTable(b) + for i := 0; i < b.N; i++ { + balance, err := balanceTable.Get(ctx, fmt.Sprintf("acct%d", i), "bar") + assert.NilError(b, err) + assert.Equal(b, uint64(10), balance.Amount) + } +} + +func benchDelete(b *testing.B, ctx context.Context) { + balanceTable := initBalanceTable(b) + for i := 0; i < b.N; i++ { + assert.NilError(b, balanceTable.Delete(ctx, &testpb.Balance{ + Address: fmt.Sprintf("acct%d", i), + Denom: "bar", + })) + } +} + +// +// Manually written versions of insert, update, delete and get for testpb.Balance +// + +const ( + addressDenomPrefix byte = iota + denomAddressPrefix +) + +func insertBalance(store kv.Store, balance *testpb.Balance) error { + denom := balance.Denom + balance.Denom = "" + addr := balance.Address + balance.Address = "" + + addressDenomKey := []byte{addressDenomPrefix} + addressDenomKey = append(addressDenomKey, []byte(addr)...) + addressDenomKey = append(addressDenomKey, 0x0) + addressDenomKey = append(addressDenomKey, []byte(denom)...) + has, err := store.Has(addressDenomKey) + if err != nil { + return err + } + + if has { + return fmt.Errorf("already exists") + } + + bz, err := proto.Marshal(balance) + if err != nil { + return err + } + balance.Denom = denom + balance.Address = addr + + err = store.Set(addressDenomKey, bz) + if err != nil { + return err + } + + // set denom address index + denomAddressKey := []byte{denomAddressPrefix} + denomAddressKey = append(denomAddressKey, []byte(balance.Denom)...) + denomAddressKey = append(denomAddressKey, 0x0) + denomAddressKey = append(denomAddressKey, []byte(balance.Address)...) + err = store.Set(denomAddressKey, []byte{}) + if err != nil { + return err + } + + return nil +} + +func updateBalance(store kv.Store, balance *testpb.Balance) error { + denom := balance.Denom + balance.Denom = "" + addr := balance.Address + balance.Address = "" + bz, err := proto.Marshal(balance) + if err != nil { + return err + } + balance.Denom = denom + balance.Address = addr + + addressDenomKey := []byte{addressDenomPrefix} + addressDenomKey = append(addressDenomKey, []byte(addr)...) + addressDenomKey = append(addressDenomKey, 0x0) + addressDenomKey = append(addressDenomKey, []byte(denom)...) + + return store.Set(addressDenomKey, bz) +} + +func deleteBalance(store kv.Store, balance *testpb.Balance) error { + denom := balance.Denom + addr := balance.Address + + addressDenomKey := []byte{addressDenomPrefix} + addressDenomKey = append(addressDenomKey, []byte(addr)...) + addressDenomKey = append(addressDenomKey, 0x0) + addressDenomKey = append(addressDenomKey, []byte(denom)...) + err := store.Delete(addressDenomKey) + if err != nil { + return err + } + + denomAddressKey := []byte{denomAddressPrefix} + denomAddressKey = append(denomAddressKey, []byte(balance.Denom)...) + denomAddressKey = append(denomAddressKey, 0x0) + denomAddressKey = append(denomAddressKey, []byte(balance.Address)...) + return store.Delete(denomAddressKey) +} + +func getBalance(store kv.Store, address, denom string) (*testpb.Balance, error) { + addressDenomKey := []byte{addressDenomPrefix} + addressDenomKey = append(addressDenomKey, []byte(address)...) + addressDenomKey = append(addressDenomKey, 0x0) + addressDenomKey = append(addressDenomKey, []byte(denom)...) + + bz, err := store.Get(addressDenomKey) + if err != nil { + return nil, err + } + + if bz == nil { + return nil, fmt.Errorf("not found") + } + + balance := testpb.Balance{} + err = proto.Unmarshal(bz, &balance) + if err != nil { + return nil, err + } + + balance.Address = address + balance.Denom = denom + + return &balance, nil +} + +func BenchmarkManualInsertMemory(b *testing.B) { + benchManual(b, func() (dbm.DB, error) { + return dbm.NewMemDB(), nil + }) +} + +func BenchmarkManualInsertLevelDB(b *testing.B) { + benchManual(b, func() (dbm.DB, error) { + return dbm.NewGoLevelDB("test", b.TempDir()) + }) +} + +func benchManual(b *testing.B, newStore func() (dbm.DB, error)) { + b.Run("insert", func(b *testing.B) { + b.StopTimer() + store, err := newStore() + assert.NilError(b, err) + b.StartTimer() + benchManualInsert(b, store) + }) + b.Run("update", func(b *testing.B) { + b.StopTimer() + store, err := newStore() + assert.NilError(b, err) + benchManualInsert(b, store) + b.StartTimer() + benchManualUpdate(b, store) + }) + b.Run("get", func(b *testing.B) { + b.StopTimer() + store, err := newStore() + assert.NilError(b, err) + benchManualInsert(b, store) + b.StartTimer() + benchManualGet(b, store) + }) + b.Run("delete", func(b *testing.B) { + b.StopTimer() + store, err := newStore() + assert.NilError(b, err) + benchManualInsert(b, store) + b.StartTimer() + benchManualDelete(b, store) + }) +} + +func benchManualInsert(b *testing.B, store kv.Store) { + for i := 0; i < b.N; i++ { + assert.NilError(b, insertBalance(store, &testpb.Balance{ + Address: fmt.Sprintf("acct%d", i), + Denom: "bar", + Amount: 10, + })) + } +} + +func benchManualUpdate(b *testing.B, store kv.Store) { + for i := 0; i < b.N; i++ { + assert.NilError(b, updateBalance(store, &testpb.Balance{ + Address: fmt.Sprintf("acct%d", i), + Denom: "bar", + Amount: 11, + })) + } +} + +func benchManualDelete(b *testing.B, store kv.Store) { + for i := 0; i < b.N; i++ { + assert.NilError(b, deleteBalance(store, &testpb.Balance{ + Address: fmt.Sprintf("acct%d", i), + Denom: "bar", + })) + } +} + +func benchManualGet(b *testing.B, store kv.Store) { + for i := 0; i < b.N; i++ { + balance, err := getBalance(store, fmt.Sprintf("acct%d", i), "bar") + assert.NilError(b, err) + assert.Equal(b, uint64(10), balance.Amount) + } +} diff --git a/orm/model/ormtable/build.go b/orm/model/ormtable/build.go index fcf198888ae3..d91bdbaf4755 100644 --- a/orm/model/ormtable/build.go +++ b/orm/model/ormtable/build.go @@ -12,7 +12,8 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - ormv1alpha1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + ormv1 "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" + "github.com/cosmos/cosmos-sdk/orm/encoding/ormkv" "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" ) @@ -35,13 +36,13 @@ type Options struct { // with the table. Generally this should be nil and the table descriptor // should be pulled from the table message option. TableDescriptor // cannot be used together with SingletonDescriptor. - TableDescriptor *ormv1alpha1.TableDescriptor + TableDescriptor *ormv1.TableDescriptor // SingletonDescriptor is an optional singleton descriptor to be explicitly used. // Generally this should be nil and the table descriptor // should be pulled from the singleton message option. SingletonDescriptor // cannot be used together with TableDescriptor. - SingletonDescriptor *ormv1alpha1.SingletonDescriptor + SingletonDescriptor *ormv1.SingletonDescriptor // TypeResolver is an optional type resolver to be used when unmarshaling // protobuf messages. @@ -96,12 +97,12 @@ func Build(options Options) (Table, error) { tableDesc := options.TableDescriptor if tableDesc == nil { - tableDesc = proto.GetExtension(messageDescriptor.Options(), ormv1alpha1.E_Table).(*ormv1alpha1.TableDescriptor) + tableDesc = proto.GetExtension(messageDescriptor.Options(), ormv1.E_Table).(*ormv1.TableDescriptor) } singletonDesc := options.SingletonDescriptor if singletonDesc == nil { - singletonDesc = proto.GetExtension(messageDescriptor.Options(), ormv1alpha1.E_Singleton).(*ormv1alpha1.SingletonDescriptor) + singletonDesc = proto.GetExtension(messageDescriptor.Options(), ormv1.E_Singleton).(*ormv1.SingletonDescriptor) } switch { diff --git a/orm/model/ormtable/hooks.go b/orm/model/ormtable/hooks.go index 288bfd2b43db..c5a76a6af8fa 100644 --- a/orm/model/ormtable/hooks.go +++ b/orm/model/ormtable/hooks.go @@ -9,7 +9,6 @@ import ( // ValidateHooks defines an interface for a table hooks which can intercept // insert, update and delete operations and possibly return an error. type ValidateHooks interface { - // ValidateInsert is called before the message is inserted. // If error is not nil the insertion will fail. ValidateInsert(context.Context, proto.Message) error @@ -30,7 +29,6 @@ type ValidateHooks interface { // may be called but the enclosing transaction may still fail. The context // is provided in each method to help coordinate this. type WriteHooks interface { - // OnInsert is called after an message is inserted into the store. OnInsert(context.Context, proto.Message) diff --git a/orm/model/ormtable/index.go b/orm/model/ormtable/index.go index eb4974d6c13e..903c19348505 100644 --- a/orm/model/ormtable/index.go +++ b/orm/model/ormtable/index.go @@ -16,7 +16,6 @@ import ( // are stateless, with all state existing only in the store passed // to index methods. type Index interface { - // List does iteration over the index with the provided prefix key and options. // Prefix key values must correspond in type to the index's fields and the // number of values provided cannot exceed the number of fields in the index, diff --git a/orm/model/ormtable/index_impl.go b/orm/model/ormtable/index_impl.go index a566b93964a7..7289efc40af4 100644 --- a/orm/model/ormtable/index_impl.go +++ b/orm/model/ormtable/index_impl.go @@ -61,8 +61,10 @@ func (i indexKeyIndex) ListRange(ctx context.Context, from, to []interface{}, op return rangeIterator(backend.IndexStoreReader(), backend, i, i.KeyCodec, from, to, options) } -var _ indexer = &indexKeyIndex{} -var _ Index = &indexKeyIndex{} +var ( + _ indexer = &indexKeyIndex{} + _ Index = &indexKeyIndex{} +) func (i indexKeyIndex) doNotImplement() {} diff --git a/orm/model/ormtable/iterator.go b/orm/model/ormtable/iterator.go index 3aa62d314acf..baf662febd65 100644 --- a/orm/model/ormtable/iterator.go +++ b/orm/model/ormtable/iterator.go @@ -18,7 +18,6 @@ import ( // Instead you should do reads and writes separately, or use a helper // function like DeleteBy which does this efficiently. type Iterator interface { - // Next advances the iterator and returns true if a valid entry is found. // Next must be called before starting iteration. Next() bool diff --git a/orm/model/ormtable/paginate.go b/orm/model/ormtable/paginate.go index 56f30cf8fb04..7c38405c1443 100644 --- a/orm/model/ormtable/paginate.go +++ b/orm/model/ormtable/paginate.go @@ -76,7 +76,6 @@ func (it *paginationIterator) Next() bool { // so the index == total entries. it.pageRes.Total = uint64(it.i) } - } return false } diff --git a/orm/model/ormtable/save_test.go b/orm/model/ormtable/save_test.go index dc3a24edd0ca..564a8edb2f1d 100644 --- a/orm/model/ormtable/save_test.go +++ b/orm/model/ormtable/save_test.go @@ -3,11 +3,12 @@ package ormtable_test import ( "context" "fmt" + "testing" + "github.com/cosmos/cosmos-sdk/orm/model/ormtable" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/protojson" - "testing" "github.com/regen-network/gocuke" "gotest.tools/v3/assert" diff --git a/orm/model/ormtable/singleton.go b/orm/model/ormtable/singleton.go index ec3dc3cab373..1a7017662579 100644 --- a/orm/model/ormtable/singleton.go +++ b/orm/model/ormtable/singleton.go @@ -5,9 +5,8 @@ import ( "encoding/json" "io" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" ) // singleton implements a Table instance for singletons. diff --git a/orm/model/ormtable/table.go b/orm/model/ormtable/table.go index 7594fcadbbf6..b66520ac8e61 100644 --- a/orm/model/ormtable/table.go +++ b/orm/model/ormtable/table.go @@ -153,7 +153,7 @@ type Schema interface { type AutoIncrementTable interface { Table - // InsertReturningID inserts the provided entry in the store and returns the newly - // generated ID for the message or an error. - InsertReturningID(ctx context.Context, message proto.Message) (newId uint64, err error) + // InsertReturningPKey inserts the provided entry in the store and returns the newly + // generated primary key for the message or an error. + InsertReturningPKey(ctx context.Context, message proto.Message) (newPK uint64, err error) } diff --git a/orm/model/ormtable/table_impl.go b/orm/model/ormtable/table_impl.go index b598161b6cf6..b0d77ccf7c69 100644 --- a/orm/model/ormtable/table_impl.go +++ b/orm/model/ormtable/table_impl.go @@ -414,8 +414,10 @@ func (t tableImpl) Get(ctx context.Context, message proto.Message) (found bool, return t.primaryKeyIndex.get(backend, message, keyValues) } -var _ Table = &tableImpl{} -var _ Schema = &tableImpl{} +var ( + _ Table = &tableImpl{} + _ Schema = &tableImpl{} +) type saveMode int diff --git a/orm/model/ormtable/table_test.go b/orm/model/ormtable/table_test.go index 06df3f3cb48b..d3f0f5925b4b 100644 --- a/orm/model/ormtable/table_test.go +++ b/orm/model/ormtable/table_test.go @@ -22,8 +22,9 @@ import ( "github.com/cosmos/cosmos-sdk/orm/types/kv" + sdkerrors "cosmossdk.io/errors" queryv1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - sdkerrors "github.com/cosmos/cosmos-sdk/errors" + "github.com/cosmos/cosmos-sdk/orm/encoding/ormkv" "github.com/cosmos/cosmos-sdk/orm/internal/testkv" "github.com/cosmos/cosmos-sdk/orm/internal/testpb" @@ -97,7 +98,6 @@ func TestPaginationLimitCountTotal(t *testing.T) { pr := it.PageResponse() assert.Check(t, pr != nil) assert.Equal(t, uint64(3), pr.Total) - } func TestImportedMessageIterator(t *testing.T) { @@ -186,7 +186,7 @@ func runTestScenario(t *testing.T, table ormtable.Table, backend ormtable.Backen assert.Assert(t, it.Next()) msg, err := it.GetMessage() assert.NilError(t, err) - //t.Logf("data[%d] %v == %v", i, data[i], msg) + // t.Logf("data[%d] %v == %v", i, data[i], msg) assert.DeepEqual(t, data[i], msg, protocmp.Transform()) } // make sure the iterator is done @@ -497,7 +497,6 @@ func runTestScenario(t *testing.T, table ormtable.Table, backend ormtable.Backen it, err = store.List(ctx, testpb.ExampleTablePrimaryKey{}) assert.NilError(t, err) assertIteratorItems(it, 2, 6, 10) - } func TestRandomTableData(t *testing.T) { @@ -603,7 +602,6 @@ func testIndex(t *testing.T, model *IndexModel) { assert.DeepEqual(t, model.data[i], data2[i], protocmp.Transform()) } } - } func reverseData(data []proto.Message) []proto.Message { @@ -790,3 +788,18 @@ func TestReadonly(t *testing.T) { ctx := ormtable.WrapContextDefault(readBackend) assert.ErrorIs(t, ormerrors.ReadOnly, table.Insert(ctx, &testpb.ExampleTable{})) } + +func TestInsertReturningFieldName(t *testing.T) { + table, err := ormtable.Build(ormtable.Options{ + MessageType: (&testpb.ExampleAutoIncFieldName{}).ProtoReflect().Type(), + }) + backend := testkv.NewSplitMemBackend() + ctx := ormtable.WrapContextDefault(backend) + store, err := testpb.NewExampleAutoIncFieldNameTable(table) + assert.NilError(t, err) + foo, err := store.InsertReturningFoo(ctx, &testpb.ExampleAutoIncFieldName{ + Bar: 45, + }) + assert.NilError(t, err) + assert.Equal(t, uint64(1), foo) +} diff --git a/orm/model/ormtable/unique.go b/orm/model/ormtable/unique.go index 63386942ae09..912b9db16fd8 100644 --- a/orm/model/ormtable/unique.go +++ b/orm/model/ormtable/unique.go @@ -190,8 +190,10 @@ func (u uniqueKeyIndex) Fields() string { return u.fields.String() } -var _ indexer = &uniqueKeyIndex{} -var _ UniqueIndex = &uniqueKeyIndex{} +var ( + _ indexer = &uniqueKeyIndex{} + _ UniqueIndex = &uniqueKeyIndex{} +) // isNonTrivialUniqueKey checks if unique key fields are non-trivial, meaning that they // don't contain the full primary key. If they contain the full primary key, then diff --git a/orm/types/ormerrors/errors.go b/orm/types/ormerrors/errors.go index 73a3418e61d1..d62d1f0ba2b1 100644 --- a/orm/types/ormerrors/errors.go +++ b/orm/types/ormerrors/errors.go @@ -1,7 +1,7 @@ package ormerrors import ( - "github.com/cosmos/cosmos-sdk/errors" + "cosmossdk.io/errors" "google.golang.org/grpc/codes" ) @@ -30,7 +30,7 @@ var ( BadDecodeEntry = errors.New(codespace, 17, "bad decode entry") IndexOutOfBounds = errors.New(codespace, 18, "index out of bounds") InvalidListOptions = errors.New(codespace, 19, "invalid list options") - UnsupportedKeyField = errors.New(codespace, 20, "unsupported key field") + InvalidKeyField = errors.New(codespace, 20, "invalid key field") UnexpectedError = errors.New(codespace, 21, "unexpected error") InvalidRangeIterationKeys = errors.New(codespace, 22, "invalid range iteration keys") JSONImportError = errors.New(codespace, 23, "json import error") diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml index c1085e526134..fada5e7dd3b0 100644 --- a/proto/buf.gen.pulsar.yaml +++ b/proto/buf.gen.pulsar.yaml @@ -2,7 +2,7 @@ version: v1 managed: enabled: true go_package_prefix: - default: github.com/cosmos/cosmos-sdk/api + default: cosmossdk.io/api except: - buf.build/googleapis/googleapis - buf.build/cosmos/gogo-proto diff --git a/proto/cosmos/app/v1alpha1/module.proto b/proto/cosmos/app/v1alpha1/module.proto index 599078d7ee05..990857172ec5 100644 --- a/proto/cosmos/app/v1alpha1/module.proto +++ b/proto/cosmos/app/v1alpha1/module.proto @@ -18,10 +18,8 @@ extend google.protobuf.MessageOptions { // ModuleDescriptor describes an app module. message ModuleDescriptor { // go_import names the package that should be imported by an app to load the - // module in the runtime module registry. Either go_import must be defined here - // or the go_package option must be defined at the file level to indicate - // to users where to location the module implementation. go_import takes - // precedence over go_package when both are defined. + // module in the runtime module registry. It is required to make debugging + // of configuration errors easier for users. string go_import = 1; // use_package refers to a protobuf package that this module @@ -53,8 +51,8 @@ message PackageReference { // present in a previous version. // // A package should indicate its revision with a source code comment - // above the package declaration in one of its fields containing the - // test "Revision N" where N is an integer revision. All packages start + // above the package declaration in one of its files containing the + // text "Revision N" where N is an integer revision. All packages start // at revision 0 the first time they are released in a module. // // When a new version of a module is released and items are added to existing diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 7798da00233a..d09c63c113cc 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -24,27 +24,40 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; } + // AccountAddressByID returns account address based on account id + rpc AccountAddressByID(QueryAccountAddressByIDRequest) returns (QueryAccountAddressByIDResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}"; + } + // Params queries all parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/params"; } // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; } - // Bech32 queries bech32Prefix + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; } // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; } // AddressStringToBytes converts Address string to bytes + // + // Since: cosmos-sdk 0.46 rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; } @@ -79,6 +92,8 @@ message QueryAccountRequest { } // 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. @@ -97,34 +112,58 @@ message QueryAccountResponse { message QueryParamsRequest {} // QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 message QueryModuleAccountsResponse { repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; } -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method +// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 message Bech32PrefixRequest {} -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method +// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 message Bech32PrefixResponse { string bech32_prefix = 1; } -// AddressBytesToStringRequest is the request type for AddressString rpc method +// AddressBytesToStringRequest is the request type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 message AddressBytesToStringRequest { bytes address_bytes = 1; } -// AddressBytesToStringResponse is the response type for AddressString rpc method +// AddressBytesToStringResponse is the response type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 message AddressBytesToStringResponse { string address_string = 1; } -// AddressStringToBytesRequest is the request type for AccountBytes rpc method +// AddressStringToBytesRequest is the request type for AccountBytes rpc method. +// +// Since: cosmos-sdk 0.46 message AddressStringToBytesRequest { string address_string = 1; } -// AddressStringToBytesResponse is the response type for AddressBytes rpc method +// AddressStringToBytesResponse is the response type for AddressBytes rpc method. +// +// Since: cosmos-sdk 0.46 message AddressStringToBytesResponse { bytes address_bytes = 1; } + +// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +message QueryAccountAddressByIDRequest{ + int64 id = 1; +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +message QueryAccountAddressByIDResponse { + string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index cbe7f38adcf7..635471c4b9dd 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -24,6 +24,8 @@ service Query { // SpendableBalances queries the spenable balance of all coins for a single // account. + // + // Since: cosmos-sdk 0.46 rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) { option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}"; } @@ -56,6 +58,8 @@ service Query { // DenomOwners queries for all account addresses that own a particular token // denomination. + // + // Since: cosmos-sdk 0.46 rpc DenomOwners(QueryDenomOwnersRequest) returns (QueryDenomOwnersResponse) { option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}"; } @@ -104,6 +108,8 @@ message QueryAllBalancesResponse { // QuerySpendableBalancesRequest defines the gRPC request structure for querying // an account's spendable balances. +// +// Since: cosmos-sdk 0.46 message QuerySpendableBalancesRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -117,6 +123,8 @@ message QuerySpendableBalancesRequest { // QuerySpendableBalancesResponse defines the gRPC response structure for querying // an account's spendable balances. +// +// Since: cosmos-sdk 0.46 message QuerySpendableBalancesResponse { // balances is the spendable balances of all the coins. repeated cosmos.base.v1beta1.Coin balances = 1 @@ -214,6 +222,8 @@ message QueryDenomOwnersRequest { // DenomOwner defines structure representing an account that owns or holds a // particular denominated token. It contains the account address and account // balance of the denominated token. +// +// Since: cosmos-sdk 0.46 message DenomOwner { // address defines the address that owns a particular denomination. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -223,6 +233,8 @@ message DenomOwner { } // QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. +// +// Since: cosmos-sdk 0.46 message QueryDenomOwnersResponse { repeated DenomOwner denom_owners = 1; diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index 09a2fcc4789d..ddaa63561774 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -41,7 +41,7 @@ message TxResponse { string timestamp = 12; // Events defines all the events emitted by processing a transaction. Note, // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with + // emitted from the ante. Whereas Logs contains the events, with // additional metadata, emitted only by processing the messages. // // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot.proto b/proto/cosmos/base/snapshots/v1beta1/snapshot.proto index a89e0b4c361c..022f8e067263 100644 --- a/proto/cosmos/base/snapshots/v1beta1/snapshot.proto +++ b/proto/cosmos/base/snapshots/v1beta1/snapshot.proto @@ -20,6 +20,8 @@ message Metadata { } // SnapshotItem is an item contained in a rootmulti.Store snapshot. +// +// Since: cosmos-sdk 0.46 message SnapshotItem { // item is the specific type of snapshot item. oneof item { @@ -33,11 +35,15 @@ message SnapshotItem { } // SnapshotStoreItem contains metadata about a snapshotted store. +// +// Since: cosmos-sdk 0.46 message SnapshotStoreItem { string name = 1; } // SnapshotIAVLItem is an exported IAVL node. +// +// Since: cosmos-sdk 0.46 message SnapshotIAVLItem { bytes key = 1; bytes value = 2; @@ -48,23 +54,31 @@ message SnapshotIAVLItem { } // SnapshotExtensionMeta contains metadata about an external snapshotter. +// +// Since: cosmos-sdk 0.46 message SnapshotExtensionMeta { string name = 1; uint32 format = 2; } // SnapshotExtensionPayload contains payloads of an external snapshotter. +// +// Since: cosmos-sdk 0.46 message SnapshotExtensionPayload { bytes payload = 1; } // SnapshotKVItem is an exported Key/Value Pair +// +// Since: cosmos-sdk 0.46 message SnapshotKVItem { bytes key = 1; bytes value = 2; } // SnapshotSchema is an exported schema of smt store +// +// Since: cosmos-sdk 0.46 message SnapshotSchema{ repeated bytes keys = 1; } diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto index b6ddb1a5e737..df00f6b6ebd6 100644 --- a/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -5,10 +5,11 @@ import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "tendermint/p2p/types.proto"; -import "tendermint/types/block.proto"; import "tendermint/types/types.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/tendermint/v1beta1/types.proto"; import "cosmos_proto/cosmos.proto"; +import "tendermint/types/block.proto"; option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; @@ -26,27 +27,34 @@ service Service { // GetLatestBlock returns the latest block. rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; + option (google.api.http).get = + "/cosmos/base/tendermint/v1beta1/blocks/latest"; } // GetBlockByHeight queries block for given height. - rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; + rpc GetBlockByHeight(GetBlockByHeightRequest) + returns (GetBlockByHeightResponse) { + option (google.api.http).get = + "/cosmos/base/tendermint/v1beta1/blocks/{height}"; } // GetLatestValidatorSet queries latest validator-set. - rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; + rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) + returns (GetLatestValidatorSetResponse) { + option (google.api.http).get = + "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; } // GetValidatorSetByHeight queries validator-set at a given height. - rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; + rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) + returns (GetValidatorSetByHeightResponse) { + option (google.api.http).get = + "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; } - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. + // ABCIQuery defines a query handler that supports ABCI queries directly to + // the application, bypassing Tendermint completely. The ABCI query must + // contain a valid and supported path, including app, custom, p2p, and store. // // Since: cosmos-sdk 0.46 rpc ABCIQuery(ABCIQueryRequest) returns (ABCIQueryResponse) { @@ -54,14 +62,16 @@ service Service { } } -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +// GetValidatorSetByHeightRequest is the request type for the +// Query/GetValidatorSetByHeight RPC method. message GetValidatorSetByHeightRequest { int64 height = 1; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +// GetValidatorSetByHeightResponse is the response type for the +// Query/GetValidatorSetByHeight RPC method. message GetValidatorSetByHeightResponse { int64 block_height = 1; repeated Validator validators = 2; @@ -69,13 +79,15 @@ message GetValidatorSetByHeightResponse { cosmos.base.query.v1beta1.PageResponse pagination = 3; } -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +// GetLatestValidatorSetRequest is the request type for the +// Query/GetValidatorSetByHeight RPC method. message GetLatestValidatorSetRequest { // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +// GetLatestValidatorSetResponse is the response type for the +// Query/GetValidatorSetByHeight RPC method. message GetLatestValidatorSetResponse { int64 block_height = 1; repeated Validator validators = 2; @@ -85,30 +97,44 @@ message GetLatestValidatorSetResponse { // Validator is the type for the validator-set. message Validator { - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; google.protobuf.Any pub_key = 2; int64 voting_power = 3; int64 proposer_priority = 4; } -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. +// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight +// RPC method. message GetBlockByHeightRequest { int64 height = 1; } -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. +// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight +// RPC method. message GetBlockByHeightResponse { .tendermint.types.BlockID block_id = 1; + + // Deprecated: please use `sdk_block` instead .tendermint.types.Block block = 2; + + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. +// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC +// method. message GetLatestBlockRequest {} -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. +// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC +// method. message GetLatestBlockResponse { .tendermint.types.BlockID block_id = 1; + + // Deprecated: please use `sdk_block` instead .tendermint.types.Block block = 2; + + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. @@ -122,10 +148,11 @@ message GetSyncingResponse { // GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. message GetNodeInfoRequest {} -// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. +// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC +// method. message GetNodeInfoResponse { - .tendermint.p2p.NodeInfo node_info = 1; - VersionInfo application_version = 2; + .tendermint.p2p.DefaultNodeInfo default_node_info = 1; + VersionInfo application_version = 2; } // VersionInfo is the type for the GetNodeInfoResponse message. @@ -159,7 +186,8 @@ message ABCIQueryRequest { bool prove = 4; } -// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. +// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC +// query. // // Note: This type is a duplicate of the ResponseQuery proto type defined in // Tendermint. @@ -167,8 +195,8 @@ message ABCIQueryResponse { uint32 code = 1; // DEPRECATED: use "value" instead reserved 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; @@ -181,7 +209,8 @@ message ABCIQueryResponse { // be arbitrary format, providing nessecary data for example neighbouring node // hash. // -// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. +// Note: This type is a duplicate of the ProofOp proto type defined in +// Tendermint. message ProofOp { string type = 1; bytes key = 2; @@ -190,7 +219,8 @@ message ProofOp { // ProofOps is Merkle proof defined by the list of ProofOps. // -// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. +// Note: This type is a duplicate of the ProofOps proto type defined in +// Tendermint. message ProofOps { repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/base/tendermint/v1beta1/types.proto b/proto/cosmos/base/tendermint/v1beta1/types.proto new file mode 100644 index 000000000000..1c690bfc76c6 --- /dev/null +++ b/proto/cosmos/base/tendermint/v1beta1/types.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package cosmos.base.tendermint.v1beta1; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/version/types.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; + +// Block is tendermint type Block, with the Header proposer address +// field converted to bech32 string. +message Block { + Header header = 1 [(gogoproto.nullable) = false]; + .tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; + .tendermint.types.Commit last_commit = 4; +} + +// Header defines the structure of a Tendermint block header. +message Header { + // basic block info + .tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // prev block info + .tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + + // hashes of block data + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + + // proposer_address is the original block proposer address, formatted as a Bech32 string. + // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + // for better UX. + string proposer_address = 14; // original proposer of the block +} diff --git a/proto/cosmos/crypto/hd/v1/hd.proto b/proto/cosmos/crypto/hd/v1/hd.proto index e4a95afcba9f..bb079ce66501 100644 --- a/proto/cosmos/crypto/hd/v1/hd.proto +++ b/proto/cosmos/crypto/hd/v1/hd.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.crypto.hd.v1; diff --git a/proto/cosmos/crypto/keyring/v1/record.proto b/proto/cosmos/crypto/keyring/v1/record.proto index 9b2d3c96439f..ca70aa984af6 100644 --- a/proto/cosmos/crypto/keyring/v1/record.proto +++ b/proto/cosmos/crypto/keyring/v1/record.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.crypto.keyring.v1; @@ -17,13 +18,13 @@ message Record { // Record contains one of the following items oneof item { - // local stores the public information about a locally stored key + // local stores the private key locally. Local local = 3; - // ledger stores the public information about a Ledger key + // ledger stores the information about a Ledger key. Ledger ledger = 4; - // Multi does not store any information. + // Multi does not store any other information. Multi multi = 5; - // Offline does not store any information. + // Offline does not store any other information. Offline offline = 6; } @@ -31,7 +32,6 @@ message Record { // Local item message Local { google.protobuf.Any priv_key = 1; - string priv_key_type = 2; } // Ledger item diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto index ad12bd6049fa..1afe25ae4ffb 100644 --- a/proto/cosmos/distribution/v1beta1/distribution.proto +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -102,6 +102,7 @@ message CommunityPoolSpendProposal { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2; @@ -143,6 +144,7 @@ message DelegationDelegatorReward { message CommunityPoolSpendProposalWithDeposit { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2; diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto index eca71e2b9deb..ec4e7a1e0966 100644 --- a/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -11,13 +11,13 @@ import "google/protobuf/duration.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; -// BasicAllowance implements Allowance with a one-time grant of tokens +// BasicAllowance implements Allowance with a one-time grant of coins // that optionally expires. The grantee can use up to SpendLimit to cover fees. message BasicAllowance { option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - // spend_limit specifies the maximum amount of tokens that can be spent - // by this allowance and will be updated as tokens are spent. If it is + // spend_limit specifies the maximum amount of coins that can be spent + // by this allowance and will be updated as coins are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. repeated cosmos.base.v1beta1.Coin spend_limit = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto index 59c992c911d6..baef77701623 100644 --- a/proto/cosmos/feegrant/v1beta1/query.proto +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -23,7 +23,8 @@ service Query { } // AllowancesByGranter returns all the grants given by an address - // Since v0.46 + // + // Since: cosmos-sdk 0.46 rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; } @@ -62,6 +63,8 @@ message QueryAllowancesResponse { } // QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. +// +// Since: cosmos-sdk 0.46 message QueryAllowancesByGranterRequest { string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -70,6 +73,8 @@ message QueryAllowancesByGranterRequest { } // QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. +// +// Since: cosmos-sdk 0.46 message QueryAllowancesByGranterResponse { // allowances that have been issued by the granter. repeated cosmos.feegrant.v1beta1.Grant allowances = 1; diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index fb014d65ce6b..8a8572335d75 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -60,7 +60,7 @@ message Proposal { // ProposalStatus enumerates the valid statuses of a proposal. enum ProposalStatus { - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. PROPOSAL_STATUS_UNSPECIFIED = 0; // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit // period. diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index ea46472aa723..b9d5914507d8 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -93,7 +93,7 @@ message QueryVoteRequest { // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; - // voter defines the oter address for the proposals. + // voter defines the voter address for the proposals. string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index f1487fe4b56e..0e65d65b20d5 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -88,7 +88,7 @@ message Proposal { enum ProposalStatus { option (gogoproto.goproto_enum_prefix) = false; - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit // period. diff --git a/proto/cosmos/gov/v1beta1/query.proto b/proto/cosmos/gov/v1beta1/query.proto index e8837fd275a7..168e1f5e077b 100644 --- a/proto/cosmos/gov/v1beta1/query.proto +++ b/proto/cosmos/gov/v1beta1/query.proto @@ -98,7 +98,7 @@ message QueryVoteRequest { // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; - // voter defines the oter address for the proposals. + // voter defines the voter address for the proposals. string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/proto/cosmos/group/v1/events.proto b/proto/cosmos/group/v1/events.proto index e8907243aa17..c2cfe8728f72 100644 --- a/proto/cosmos/group/v1/events.proto +++ b/proto/cosmos/group/v1/events.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.group.v1; @@ -64,6 +65,9 @@ message EventExec { // result is the proposal execution result. ProposalExecutorResult result = 2; + + // logs contains error logs in case the execution result is FAILURE. + string logs = 3; } // EventLeaveGroup is an event emitted when group member leaves the group. diff --git a/proto/cosmos/group/v1/genesis.proto b/proto/cosmos/group/v1/genesis.proto index 49655ad2fafb..e4c895e96ee8 100644 --- a/proto/cosmos/group/v1/genesis.proto +++ b/proto/cosmos/group/v1/genesis.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.group.v1; diff --git a/proto/cosmos/group/v1/query.proto b/proto/cosmos/group/v1/query.proto index 1690d5b731c5..51a011a9db8f 100644 --- a/proto/cosmos/group/v1/query.proto +++ b/proto/cosmos/group/v1/query.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.group.v1; @@ -73,7 +74,11 @@ service Query { option (google.api.http).get = "/cosmos/group/v1/groups_by_member/{address}"; }; - // TallyResult queries the tally of a proposal votes. + // TallyResult returns the tally result of a proposal. If the proposal is + // still in voting period, then this query computes the current tally state, + // which might not be final. On the other hand, if the proposal is final, + // then it simply returns the `final_tally_result` state stored in the + // proposal itself. rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { option (google.api.http).get = "/cosmos/group/v1/proposals/{proposal_id}/tally"; }; diff --git a/proto/cosmos/group/v1/tx.proto b/proto/cosmos/group/v1/tx.proto index 08d83ede87ab..1983d31ba864 100644 --- a/proto/cosmos/group/v1/tx.proto +++ b/proto/cosmos/group/v1/tx.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.group.v1; @@ -45,7 +46,7 @@ service Msg { // SubmitProposal submits a new proposal. rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse); // Vote allows a voter to vote on a proposal. @@ -65,11 +66,12 @@ service Msg { // MsgCreateGroup is the Msg/CreateGroup request type. message MsgCreateGroup { option (cosmos.msg.v1.signer) = "admin"; + // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // members defines the group members. - repeated Member members = 2 [(gogoproto.nullable) = false]; + repeated MemberRequest members = 2 [(gogoproto.nullable) = false]; // metadata is any arbitrary metadata to attached to the group. string metadata = 3; @@ -94,7 +96,7 @@ message MsgUpdateGroupMembers { // member_updates is the list of members to update, // set weight to 0 to remove a member. - repeated Member member_updates = 3 [(gogoproto.nullable) = false]; + repeated MemberRequest member_updates = 3 [(gogoproto.nullable) = false]; } // MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. @@ -154,7 +156,7 @@ message MsgCreateGroupPolicy { string metadata = 3; // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; } // MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. @@ -171,8 +173,8 @@ message MsgUpdateGroupPolicyAdmin { // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // address is the account address of the group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_policy_address is the account address of the group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // new_admin is the new group policy admin. string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -180,13 +182,14 @@ message MsgUpdateGroupPolicyAdmin { // MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. message MsgCreateGroupWithPolicy { + option (cosmos.msg.v1.signer) = "admin"; option (gogoproto.goproto_getters) = false; // admin is the account address of the group and group policy admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // members defines the group members. - repeated Member members = 2 [(gogoproto.nullable) = false]; + repeated MemberRequest members = 2 [(gogoproto.nullable) = false]; // group_metadata is any arbitrary metadata attached to the group. string group_metadata = 3; @@ -194,11 +197,12 @@ message MsgCreateGroupWithPolicy { // group_policy_metadata is any arbitrary metadata attached to the group policy. string group_policy_metadata = 4; - // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. - bool group_policy_as_admin = 5; + // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group + // and group policy admin. + bool group_policy_as_admin = 5; // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; } // MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. @@ -223,11 +227,11 @@ message MsgUpdateGroupPolicyDecisionPolicy { // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // address is the account address of group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_policy_address is the account address of group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // decision_policy is the updated group policy's decision policy. - google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; } // MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. @@ -240,8 +244,8 @@ message MsgUpdateGroupPolicyMetadata { // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // address is the account address of group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_policy_address is the account address of group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // metadata is the updated group policy metadata. string metadata = 3; @@ -274,8 +278,8 @@ message MsgSubmitProposal { option (gogoproto.goproto_getters) = false; - // address is the account address of group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_policy_address is the account address of group policy. + string group_policy_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // proposers are the account addresses of the proposers. // Proposers signatures will be counted as yes votes. @@ -302,6 +306,8 @@ message MsgSubmitProposalResponse { // MsgWithdrawProposal is the Msg/WithdrawProposal request type. message MsgWithdrawProposal { + option (cosmos.msg.v1.signer) = "address"; + // proposal is the unique ID of the proposal. uint64 proposal_id = 1; @@ -342,12 +348,15 @@ message MsgExec { // proposal is the unique ID of the proposal. uint64 proposal_id = 1; - // signer is the account address used to execute the proposal. - string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // executor is the account address used to execute the proposal. + string executor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgExecResponse is the Msg/Exec request type. -message MsgExecResponse {} +message MsgExecResponse { + // result is the final result of the proposal execution. + ProposalExecutorResult result = 2; +} // MsgLeaveGroup is the Msg/LeaveGroup request type. message MsgLeaveGroup { diff --git a/proto/cosmos/group/v1/types.proto b/proto/cosmos/group/v1/types.proto index e09a74c135d1..63e20c8f6ff2 100644 --- a/proto/cosmos/group/v1/types.proto +++ b/proto/cosmos/group/v1/types.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.group.v1; @@ -11,7 +12,7 @@ import "cosmos_proto/cosmos.proto"; import "google/protobuf/any.proto"; // Member represents a group member with an account address, -// non-zero weight and metadata. +// non-zero weight, metadata and added_at timestamp. message Member { // address is the member's account address. @@ -20,36 +21,57 @@ message Member { // weight is the member's voting weight that should be greater than 0. string weight = 2; - // metadata is any arbitrary metadata to attached to the member. + // metadata is any arbitrary metadata attached to the member. string metadata = 3; // added_at is a timestamp specifying when a member was added. google.protobuf.Timestamp added_at = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } -// Members defines a repeated slice of Member objects. -message Members { - // members is the list of members. - repeated Member members = 1 [(gogoproto.nullable) = false]; +// MemberRequest represents a group member to be used in Msg server requests. +// Contrary to `Member`, it doesn't have any `added_at` field +// since this field cannot be set as part of requests. +message MemberRequest { + + // address is the member's account address. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // weight is the member's voting weight that should be greater than 0. + string weight = 2; + + // metadata is any arbitrary metadata attached to the member. + string metadata = 3; } -// ThresholdDecisionPolicy implements the DecisionPolicy interface +// ThresholdDecisionPolicy is a decision policy where a proposal passes when it +// satisfies the two following conditions: +// 1. The sum of all `YES` voters' weights is greater or equal than the defined +// `threshold`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. message ThresholdDecisionPolicy { option (cosmos_proto.implements_interface) = "DecisionPolicy"; - // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. + // threshold is the minimum weighted sum of `YES` votes that must be met or + // exceeded for a proposal to succeed. string threshold = 1; // windows defines the different windows for voting and execution. DecisionPolicyWindows windows = 2; } -// PercentageDecisionPolicy implements the DecisionPolicy interface +// PercentageDecisionPolicy is a decision policy where a proposal passes when +// it satisfies the two following conditions: +// 1. The percentage of all `YES` voters' weights out of the total group weight +// is greater or equal than the given `percentage`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. message PercentageDecisionPolicy { option (cosmos_proto.implements_interface) = "DecisionPolicy"; - // percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. + // percentage is the minimum percentage the weighted sum of `YES` votes must + // meet for a proposal to succeed. string percentage = 1; // windows defines the different windows for voting and execution. @@ -80,7 +102,8 @@ message DecisionPolicyWindows { enum VoteOption { option (gogoproto.goproto_enum_prefix) = false; - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + // VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + // return an error. VOTE_OPTION_UNSPECIFIED = 0; // VOTE_OPTION_YES defines a yes vote option. VOTE_OPTION_YES = 1; @@ -153,7 +176,7 @@ message GroupPolicyInfo { uint64 version = 5; // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; // created_at is a timestamp specifying when a group policy was created. google.protobuf.Timestamp created_at = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; @@ -169,8 +192,8 @@ message Proposal { // id is the unique id of the proposal. uint64 id = 1; - // address is the account address of group policy. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // group_policy_address is the account address of group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // metadata is any arbitrary metadata to attached to the proposal. string metadata = 3; @@ -181,39 +204,37 @@ message Proposal { // submit_time is a timestamp specifying when a proposal was submitted. google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // group_version tracks the version of the group that this proposal corresponds to. - // When group membership is changed, existing proposals from previous group versions will become invalid. + // group_version tracks the version of the group at proposal submission. + // This field is here for informational purposes only. uint64 group_version = 6; - // group_policy_version tracks the version of the group policy that this proposal corresponds to. - // When a decision policy is changed, existing proposals from previous policy versions will become invalid. + // group_policy_version tracks the version of the group policy at proposal submission. + // When a decision policy is changed, existing proposals from previous policy + // versions will become invalid with the `ABORTED` status. + // This field is here for informational purposes only. uint64 group_policy_version = 7; // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. ProposalStatus status = 8; - // result is the final result based on the votes and election rule. Initial value is unfinalized. - // The result is persisted so that clients can always rely on this state and not have to replicate the logic. - ProposalResult result = 9; - // final_tally_result contains the sums of all weighted votes for this - // proposal for each vote option, after tallying. When querying a proposal - // via gRPC, this field is not populated until the proposal's voting period - // has ended. - TallyResult final_tally_result = 10 [(gogoproto.nullable) = false]; + // proposal for each vote option. It is empty at submission, and only + // populated after tallying, at voting period end or at proposal execution, + // whichever happens first. + TallyResult final_tally_result = 9 [(gogoproto.nullable) = false]; // voting_period_end is the timestamp before which voting must be done. // Unless a successfull MsgExec is called before (to execute a proposal whose // tally is successful before the voting period ends), tallying will be done - // at this point, and the `final_tally_result`, as well - // as `status` and `result` fields will be accordingly updated. - google.protobuf.Timestamp voting_period_end = 11 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // at this point, and the `final_tally_result`and `status` fields will be + // accordingly updated. + google.protobuf.Timestamp voting_period_end = 10 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. - ProposalExecutorResult executor_result = 12; + // executor_result is the final result of the proposal execution. Initial value is NotRun. + ProposalExecutorResult executor_result = 11; - // messages is a list of Msgs that will be executed if the proposal passes. - repeated google.protobuf.Any messages = 13; + // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + repeated google.protobuf.Any messages = 12; } // ProposalStatus defines proposal statuses. @@ -223,35 +244,24 @@ enum ProposalStatus { // An empty value is invalid and not allowed. PROPOSAL_STATUS_UNSPECIFIED = 0; - // Initial status of a proposal when persisted. + // Initial status of a proposal when submitted. PROPOSAL_STATUS_SUBMITTED = 1; - // Final status of a proposal when the final tally was executed. - PROPOSAL_STATUS_CLOSED = 2; - - // Final status of a proposal when the group was modified before the final tally. - PROPOSAL_STATUS_ABORTED = 3; - - // A proposal can be deleted before the voting start time by the owner. When this happens the final status - // is Withdrawn. - PROPOSAL_STATUS_WITHDRAWN = 4; -} - -// ProposalResult defines types of proposal results. -enum ProposalResult { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is invalid and not allowed - PROPOSAL_RESULT_UNSPECIFIED = 0; + // Final status of a proposal when the final tally is done and the outcome + // passes the group policy's decision policy. + PROPOSAL_STATUS_ACCEPTED = 2; - // Until a final tally has happened the status is unfinalized - PROPOSAL_RESULT_UNFINALIZED = 1; + // Final status of a proposal when the final tally is done and the outcome + // is rejected by the group policy's decision policy. + PROPOSAL_STATUS_REJECTED = 3; - // Final result of the tally - PROPOSAL_RESULT_ACCEPTED = 2; + // Final status of a proposal when the group policy is modified before the + // final tally. + PROPOSAL_STATUS_ABORTED = 4; - // Final result of the tally - PROPOSAL_RESULT_REJECTED = 3; + // A proposal can be withdrawn before the voting start time by the owner. + // When this happens the final status is Withdrawn. + PROPOSAL_STATUS_WITHDRAWN = 5; } // ProposalExecutorResult defines types of proposal executor results. @@ -281,7 +291,7 @@ message TallyResult { // abstain_count is the weighted sum of abstainers. string abstain_count = 2; - // no is the weighted sum of no votes. + // no_count is the weighted sum of no votes. string no_count = 3; // no_with_veto_count is the weighted sum of veto. diff --git a/proto/cosmos/orm/v1/orm.proto b/proto/cosmos/orm/v1/orm.proto index abfbbd4f5cea..389babd19665 100644 --- a/proto/cosmos/orm/v1/orm.proto +++ b/proto/cosmos/orm/v1/orm.proto @@ -79,7 +79,7 @@ message SecondaryIndexDescriptor { // Index keys are prefixed by the varint encoded table id and the varint // encoded index id plus any additional prefix specified by the schema. // - // In addition the the field segments, non-unique index keys are suffixed with + // In addition the field segments, non-unique index keys are suffixed with // any additional primary key fields not present in the index fields so that the // primary key can be reconstructed. Unique indexes instead of being suffixed // store the remaining primary key fields in the value.. diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto index 5382fd799964..e5aabfeca4ca 100644 --- a/proto/cosmos/params/v1beta1/params.proto +++ b/proto/cosmos/params/v1beta1/params.proto @@ -5,11 +5,13 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/prop option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; // ParameterChangeProposal defines a proposal to change one or more parameters. message ParameterChangeProposal { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2; diff --git a/proto/cosmos/params/v1beta1/query.proto b/proto/cosmos/params/v1beta1/query.proto index 3b1c9a760092..97d0a71d7f5e 100644 --- a/proto/cosmos/params/v1beta1/query.proto +++ b/proto/cosmos/params/v1beta1/query.proto @@ -16,6 +16,8 @@ service Query { } // Subspaces queries for all registered subspaces and all keys for a subspace. + // + // Since: cosmos-sdk 0.46 rpc Subspaces(QuerySubspacesRequest) returns (QuerySubspacesResponse) { option (google.api.http).get = "/cosmos/params/v1beta1/subspaces"; } @@ -38,16 +40,22 @@ message QueryParamsResponse { // QuerySubspacesRequest defines a request type for querying for all registered // subspaces and all keys for a subspace. +// +// Since: cosmos-sdk 0.46 message QuerySubspacesRequest {} // QuerySubspacesResponse defines the response types for querying for all // registered subspaces and all keys for a subspace. +// +// Since: cosmos-sdk 0.46 message QuerySubspacesResponse { repeated Subspace subspaces = 1; } // Subspace defines a parameter subspace name and all the keys that exist for // the subspace. +// +// Since: cosmos-sdk 0.46 message Subspace { string subspace = 1; repeated string keys = 2; diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto index 02469232ba06..2cbb750b0bde 100644 --- a/proto/cosmos/staking/v1beta1/query.proto +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -119,7 +119,7 @@ message QueryValidatorRequest { // QueryValidatorResponse is response type for the Query/Validator RPC method message QueryValidatorResponse { - // validator defines the the validator info. + // validator defines the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } @@ -289,7 +289,7 @@ message QueryDelegatorValidatorsRequest { // QueryDelegatorValidatorsResponse is response type for the // Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. + // validators defines the validators' info of a delegator. repeated Validator validators = 1 [(gogoproto.nullable) = false]; // pagination defines the pagination in the response. @@ -312,7 +312,7 @@ message QueryDelegatorValidatorRequest { // QueryDelegatorValidatorResponse response type for the // Query/DelegatorValidator RPC method. message QueryDelegatorValidatorResponse { - // validator defines the the validator info. + // validator defines the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index dcf2645fa247..6dc965feab47 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -117,6 +117,8 @@ message Validator { // commission defines the commission parameters. Commission commission = 10 [(gogoproto.nullable) = false]; // min_self_delegation is the validator's self declared minimum self delegation. + // + // Since: cosmos-sdk 0.46 string min_self_delegation = 11 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index b7dac39861d8..ca8f76df19dc 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -35,6 +35,8 @@ service Msg { // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation // and delegate back to previous validator. + // + // Since: cosmos-sdk 0.46 rpc CancelUnbondingDelegation(MsgCancelUnbondingDelegation) returns (MsgCancelUnbondingDelegationResponse); } @@ -142,6 +144,8 @@ message MsgUndelegateResponse { } // MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +// +// Since: cosmos-sdk 0.46 message MsgCancelUnbondingDelegation{ option (cosmos.msg.v1.signer) = "delegator_address"; option (gogoproto.equal) = false; @@ -156,4 +160,6 @@ message MsgCancelUnbondingDelegation{ } // MsgCancelUnbondingDelegationResponse +// +// Since: cosmos-sdk 0.46 message MsgCancelUnbondingDelegationResponse{} diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index e7af15269bf1..4b008ae75847 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -48,8 +48,14 @@ message GetTxsEventRequest { // events is the list of transaction event type. repeated string events = 1; // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; + // Deprecated post v0.46.x: use page and limit instead. + cosmos.base.query.v1beta1.PageRequest pagination = 2 [deprecated = true];; OrderBy order_by = 3; + // page is the page number to query, starts at 1. If not provided, will default to first page. + uint64 page = 4; + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + uint64 limit = 5; } // OrderBy defines the sorting order @@ -70,7 +76,10 @@ message GetTxsEventResponse { // tx_responses is the list of queried TxResponses. repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; + // Deprecated post v0.46.x: use total instead. + cosmos.base.query.v1beta1.PageResponse pagination = 3 [deprecated = true]; + // total is total number of results available + uint64 total = 4; } // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto index ac7b690f4661..a71a3e115dc5 100644 --- a/proto/cosmos/tx/v1beta1/tx.proto +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -87,8 +87,12 @@ message SignDocDirectAux { // sequence is the sequence number of the signing account. uint64 sequence = 5; - // Tip is the optional tip used for meta-transactions. It should be left - // empty if the signer is not the tipper for this transaction. + // Tip is the optional tip used for transactions fees paid in another denom. + // It should be left empty if the signer is not the tipper for this + // transaction. + // + // This field is ignored if the chain didn't enable tips, i.e. didn't add the + // `TipDecorator` in its posthandler. Tip tip = 6; } @@ -138,7 +142,10 @@ message AuthInfo { // of the signers. This can be estimated via simulation. Fee fee = 2; - // Tip is the optional tip used for meta-transactions. + // Tip is the optional tip used for transactions fees paid in another denom. + // + // This field is ignored if the chain didn't enable tips, i.e. didn't add the + // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 Tip tip = 3; @@ -238,11 +245,11 @@ message AuxSignerData { // AuxSignerData across different chains, the bech32 prefix of the target // chain (where the final transaction is broadcasted) should be used. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // sign_doc is the SIGN_MOD_DIRECT_AUX sign doc that the auxiliary signer + // sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer // signs. Note: we use the same sign doc even if we're signing with // LEGACY_AMINO_JSON. SignDocDirectAux sign_doc = 2; - // mode is the signing mode of the single signer + // mode is the signing mode of the single signer. cosmos.tx.signing.v1beta1.SignMode mode = 3; // sig is the signature of the sign doc. bytes sig = 4; diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index e8c4baa0d66b..870cf9ee6bbc 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -37,6 +37,8 @@ service Query { } // Returns the account with authority to conduct upgrades + // + // Since: cosmos-sdk 0.46 rpc Authority(QueryAuthorityRequest) returns (QueryAuthorityResponse) { option (google.api.http).get = "/cosmos/upgrade/v1beta1/authority"; } diff --git a/proto/cosmos/upgrade/v1beta1/tx.proto b/proto/cosmos/upgrade/v1beta1/tx.proto index 9b04bf44bebc..7a2931da2148 100644 --- a/proto/cosmos/upgrade/v1beta1/tx.proto +++ b/proto/cosmos/upgrade/v1beta1/tx.proto @@ -1,3 +1,4 @@ +// Since: cosmos-sdk 0.46 syntax = "proto3"; package cosmos.upgrade.v1beta1; @@ -52,4 +53,4 @@ message MsgCancelUpgrade { // MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. // // Since: cosmos-sdk 0.46 -message MsgCancelUpgradeResponse {} \ No newline at end of file +message MsgCancelUpgradeResponse {} diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto index 4de7d01fc304..9831c894d235 100644 --- a/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -4,6 +4,7 @@ package cosmos.upgrade.v1beta1; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; option (gogoproto.goproto_getters_all) = false; @@ -47,6 +48,7 @@ message Plan { // proposals, see MsgSoftwareUpgrade. message SoftwareUpgradeProposal { option deprecated = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; @@ -61,6 +63,7 @@ message SoftwareUpgradeProposal { // proposals, see MsgCancelUpgrade. message CancelSoftwareUpgradeProposal { option deprecated = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto index 211bad09e0ad..27511ba80cbd 100644 --- a/proto/cosmos/vesting/v1beta1/tx.proto +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -17,9 +17,13 @@ service Msg { rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); // CreatePermanentLockedAccount defines a method that enables creating a permanent // locked account. + // + // Since: cosmos-sdk 0.46 rpc CreatePermanentLockedAccount(MsgCreatePermanentLockedAccount) returns (MsgCreatePermanentLockedAccountResponse); // CreatePeriodicVestingAccount defines a method that enables creating a // periodic vesting account. + // + // Since: cosmos-sdk 0.46 rpc CreatePeriodicVestingAccount(MsgCreatePeriodicVestingAccount) returns (MsgCreatePeriodicVestingAccountResponse); } @@ -44,6 +48,8 @@ message MsgCreateVestingAccountResponse {} // MsgCreatePermanentLockedAccount defines a message that enables creating a permanent // locked account. +// +// Since: cosmos-sdk 0.46 message MsgCreatePermanentLockedAccount { option (gogoproto.equal) = true; @@ -54,10 +60,14 @@ message MsgCreatePermanentLockedAccount { } // MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. +// +// Since: cosmos-sdk 0.46 message MsgCreatePermanentLockedAccountResponse {} // MsgCreateVestingAccount defines a message that enables creating a vesting // account. +// +// Since: cosmos-sdk 0.46 message MsgCreatePeriodicVestingAccount { option (cosmos.msg.v1.signer) = "from_address"; @@ -71,4 +81,6 @@ message MsgCreatePeriodicVestingAccount { // MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount // response type. +// +// Since: cosmos-sdk 0.46 message MsgCreatePeriodicVestingAccountResponse {} diff --git a/proto/tendermint/p2p/types.proto b/proto/tendermint/p2p/types.proto index 216a6d8d0699..dc56d9c6c15b 100644 --- a/proto/tendermint/p2p/types.proto +++ b/proto/tendermint/p2p/types.proto @@ -1,10 +1,14 @@ syntax = "proto3"; package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; + +message NetAddress { + string id = 1 [(gogoproto.customname) = "ID"]; + string ip = 2 [(gogoproto.customname) = "IP"]; + uint32 port = 3; +} message ProtocolVersion { uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; @@ -12,31 +16,18 @@ message ProtocolVersion { uint64 app = 3; } -message NodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string node_id = 2 [(gogoproto.customname) = "NodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - NodeInfoOther other = 8 [(gogoproto.nullable) = false]; +message DefaultNodeInfo { + ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; + string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; + string listen_addr = 3; + string network = 4; + string version = 5; + bytes channels = 6; + string moniker = 7; + DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; } -message NodeInfoOther { +message DefaultNodeInfoOther { string tx_index = 1; string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; } - -message PeerInfo { - string id = 1 [(gogoproto.customname) = "ID"]; - repeated PeerAddressInfo address_info = 2; - google.protobuf.Timestamp last_connected = 3 [(gogoproto.stdtime) = true]; -} - -message PeerAddressInfo { - string address = 1; - google.protobuf.Timestamp last_dial_success = 2 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp last_dial_failure = 3 [(gogoproto.stdtime) = true]; - uint32 dial_failures = 4; -} diff --git a/proto/tendermint/types/block.proto b/proto/tendermint/types/block.proto index 84e9bb15d86a..d395501f5f6b 100644 --- a/proto/tendermint/types/block.proto +++ b/proto/tendermint/types/block.proto @@ -5,11 +5,9 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; + Header header = 1 [(gogoproto.nullable) = false]; + Data data = 2 [(gogoproto.nullable) = false]; + Commit last_commit = 4; } diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto deleted file mode 100644 index d9548a430296..000000000000 --- a/proto/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 57efc33c5b7e..256e584f4132 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -66,19 +66,19 @@ message Header { BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block } // Data contains the set of transactions included in the block @@ -87,6 +87,68 @@ message Data { // NOTE: not all txs here are valid. We're just agreeing on the order first. // This means that block.AppHash does not include these txs. repeated bytes txs = 1; + + // field number 2 is reserved for intermediate state roots + EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + Messages messages = 4 [(gogoproto.nullable) = false]; + uint64 original_square_size = 5; + bytes hash = 6; +} + +// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. +message DuplicateVoteEvidence { + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. +message LightClientAttackEvidence { + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; + repeated tendermint.types.Validator byzantine_validators = 3; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +message Evidence { + oneof sum { + DuplicateVoteEvidence duplicate_vote_evidence = 1; + LightClientAttackEvidence light_client_attack_evidence = 2; + } +} + +// EvidenceData contains any evidence of malicious wrong-doing by validators +message EvidenceList { + repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; +} + +message Messages { + repeated Message messages_list = 1; +} + +message Message { + bytes namespace_id = 1; + bytes data = 2; +} + +// DataAvailabilityHeader contains the row and column roots of the erasure +// coded version of the data in Block.Data. +// Therefor the original Block.Data is arranged in a +// k × k matrix, which is then "extended" to a +// 2k × 2k matrix applying multiple times Reed-Solomon encoding. +// For details see Section 5.2: https://arxiv.org/abs/1809.09044 +// or the Celestia specification: +// https://github.com/celestiaorg/celestia-specs/blob/master/specs/data_structures.md#availabledataheader +// Note that currently we list row and column roots in separate fields +// (different from the spec). +message DataAvailabilityHeader { + // RowRoot_j = root((M_{j,1} || M_{j,2} || ... || M_{j,2k} )) + repeated bytes row_roots = 1; + // ColumnRoot_j = root((M_{1,j} || M_{2,j} || ... || M_{2k,j} )) + repeated bytes column_roots = 2; } // Vote represents a prevote, precommit, or commit vote from validators for @@ -95,11 +157,13 @@ message Vote { SignedMsgType type = 1; int64 height = 2; int32 round = 3; - BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; + BlockID block_id = 4 + [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; } // Commit contains the evidence that a block was committed by a set of validators. @@ -114,8 +178,9 @@ message Commit { message CommitSig { BlockIDFlag block_id_flag = 1; bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; + google.protobuf.Timestamp timestamp = 3 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; } message Proposal { @@ -124,8 +189,9 @@ message Proposal { int32 round = 3; int32 pol_round = 4; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; + google.protobuf.Timestamp timestamp = 6 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; } message SignedHeader { @@ -147,7 +213,37 @@ message BlockMeta { // TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; + repeated bytes row_roots = 1; + repeated bytes data = 2; + repeated NMTProof proofs = 3; +} + +// MalleatedTx wraps a transaction that was derived from a different original +// transaction. This allows for tendermint to track malleated and original +// transactions +message MalleatedTx { + bytes original_tx_hash = 1; + bytes tx = 2; +} + +// Proof represents proof of a namespace.ID in an NMT. +// In case this proof proves the absence of a namespace.ID +// in a tree it also contains the leaf hashes of the range +// where that namespace would be. +message NMTProof { + // start index of this proof. + int32 start = 1; + // end index of this proof. + int32 end = 2; + // Nodes that together with the corresponding leaf values can be used to + // recompute the root and verify this proof. Nodes should consist of the max + // and min namespaces along with the actual hash, resulting in each being 48 + // bytes each + repeated bytes nodes = 3; + // leafHash are nil if the namespace is present in the NMT. In case the + // namespace to be proved is in the min/max range of the tree but absent, this + // will contain the leaf hash necessary to verify the proof of absence. Leaf + // hashes should consist of the namespace along with the actual hash, + // resulting 40 bytes total. + bytes leaf_hash = 4; } diff --git a/pruning/README.md b/pruning/README.md new file mode 100644 index 000000000000..f7afae8e6ac3 --- /dev/null +++ b/pruning/README.md @@ -0,0 +1,29 @@ +# Pruning + +## Overview + +Pruning is the mechanism for deleting old application heights from the disk. Depending on the use case, +nodes may require different pruning strategies. For example, archive nodes must keep all +the states and prune nothing. On the other hand, a regular validator node may want to only keep 100 latest heights for performance reasons. + +## Strategies + +The strategies are configured in `app.toml`, with the format `pruning = ""` where the options are: + +- `default`: only the last 362,880 states(approximately 3.5 weeks worth of state) are kept; pruning at 10 block intervals +- `nothing`: all historic states will be saved, nothing will be deleted (i.e. archiving node) +- `everything`: 2 latest states will be kept; pruning at 10 block intervals. +- `custom`: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' + +If no strategy is given to the BaseApp, `nothing` is selected. However, we perform validation on the CLI layer to require these to be always set in the config file. + +## Custom Pruning + +These are applied if and only if the pruning strategy is custom: +- `pruning-keep-recent`: N means to keep all of the last N states +- `pruning-interval`: N means to delete old states from disk every Nth block. + +## Relationship to State Sync Snapshots + +Snapshot settings are optional. However, if set, they have an effect on how pruning is done by +persisting the heights that are multiples of `state-sync.snapshot-interval` until after the snapshot is complete. See the "Relationship to Pruning" section in `snapshots/README.md` for more details. diff --git a/pruning/export_test.go b/pruning/export_test.go new file mode 100644 index 000000000000..8c38778bf93d --- /dev/null +++ b/pruning/export_test.go @@ -0,0 +1,11 @@ +package pruning + +var ( + PruneHeightsKey = pruneHeightsKey + PruneSnapshotHeightsKey = pruneSnapshotHeightsKey + + Int64SliceToBytes = int64SliceToBytes + ListToBytes = listToBytes + LoadPruningHeights = loadPruningHeights + LoadPruningSnapshotHeights = loadPruningSnapshotHeights +) diff --git a/pruning/manager.go b/pruning/manager.go new file mode 100644 index 000000000000..8e7c61cc9ef6 --- /dev/null +++ b/pruning/manager.go @@ -0,0 +1,282 @@ +package pruning + +import ( + "container/list" + "encoding/binary" + "fmt" + "sync" + + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" + + "github.com/cosmos/cosmos-sdk/pruning/types" +) + +// Manager is an abstraction to handle the logic needed for +// determinging when to prune old heights of the store +// based on the strategy described by the pruning options. +type Manager struct { + db dbm.DB + logger log.Logger + opts types.PruningOptions + snapshotInterval uint64 + // Although pruneHeights happen in the same goroutine with the normal execution, + // we sync access to them to avoid soundness issues in the future if concurrency pattern changes. + pruneHeightsMx sync.Mutex + pruneHeights []int64 + // Snapshots are taken in a separate goroutine from the regular execution + // and can be delivered asynchrounously via HandleHeightSnapshot. + // Therefore, we sync access to pruneSnapshotHeights with this mutex. + pruneSnapshotHeightsMx sync.Mutex + // These are the heights that are multiples of snapshotInterval and kept for state sync snapshots. + // The heights are added to this list to be pruned when a snapshot is complete. + pruneSnapshotHeights *list.List +} + +// NegativeHeightsError is returned when a negative height is provided to the manager. +type NegativeHeightsError struct { + Height int64 +} + +var _ error = &NegativeHeightsError{} + +func (e *NegativeHeightsError) Error() string { + return fmt.Sprintf("failed to get pruned heights: %d", e.Height) +} + +var ( + pruneHeightsKey = []byte("s/pruneheights") + pruneSnapshotHeightsKey = []byte("s/prunesnapshotheights") +) + +// NewManager returns a new Manager with the given db and logger. +// The retuned manager uses a pruning strategy of "nothing" which +// keeps all heights. Users of the Manager may change the strategy +// by calling SetOptions. +func NewManager(db dbm.DB, logger log.Logger) *Manager { + return &Manager{ + db: db, + logger: logger, + opts: types.NewPruningOptions(types.PruningNothing), + pruneHeights: []int64{}, + pruneSnapshotHeights: list.New(), + } +} + +// SetOptions sets the pruning strategy on the manager. +func (m *Manager) SetOptions(opts types.PruningOptions) { + m.opts = opts +} + +// GetOptions fetches the pruning strategy from the manager. +func (m *Manager) GetOptions() types.PruningOptions { + return m.opts +} + +// GetFlushAndResetPruningHeights returns all heights to be pruned during the next call to Prune(). +// It also flushes and resets the pruning heights. +func (m *Manager) GetFlushAndResetPruningHeights() ([]int64, error) { + if m.opts.GetPruningStrategy() == types.PruningNothing { + return []int64{}, nil + } + m.pruneHeightsMx.Lock() + defer m.pruneHeightsMx.Unlock() + + // flush the updates to disk so that it is not lost if crash happens. + if err := m.db.SetSync(pruneHeightsKey, int64SliceToBytes(m.pruneHeights)); err != nil { + return nil, err + } + + // Return a copy to prevent data races. + pruningHeights := make([]int64, len(m.pruneHeights)) + copy(pruningHeights, m.pruneHeights) + m.pruneHeights = m.pruneHeights[:0] + + return pruningHeights, nil +} + +// HandleHeight determines if previousHeight height needs to be kept for pruning at the right interval prescribed by +// the pruning strategy. Returns previousHeight, if it was kept to be pruned at the next call to Prune(), 0 otherwise. +// previousHeight must be greater than 0 for the handling to take effect since valid heights start at 1 and 0 represents +// the latest height. The latest height cannot be pruned. As a result, if previousHeight is less than or equal to 0, 0 is returned. +func (m *Manager) HandleHeight(previousHeight int64) int64 { + if m.opts.GetPruningStrategy() == types.PruningNothing || previousHeight <= 0 { + return 0 + } + + defer func() { + m.pruneHeightsMx.Lock() + defer m.pruneHeightsMx.Unlock() + + m.pruneSnapshotHeightsMx.Lock() + defer m.pruneSnapshotHeightsMx.Unlock() + + // move persisted snapshot heights to pruneHeights which + // represent the heights to be pruned at the next pruning interval. + var next *list.Element + for e := m.pruneSnapshotHeights.Front(); e != nil; e = next { + snHeight := e.Value.(int64) + if snHeight < previousHeight-int64(m.opts.KeepRecent) { + m.pruneHeights = append(m.pruneHeights, snHeight) + + // We must get next before removing to be able to continue iterating. + next = e.Next() + m.pruneSnapshotHeights.Remove(e) + } else { + next = e.Next() + } + } + + // flush the updates to disk so that they are not lost if crash happens. + if err := m.db.SetSync(pruneHeightsKey, int64SliceToBytes(m.pruneHeights)); err != nil { + panic(err) + } + }() + + if int64(m.opts.KeepRecent) < previousHeight { + pruneHeight := previousHeight - int64(m.opts.KeepRecent) + // We consider this height to be pruned iff: + // + // - snapshotInterval is zero as that means that all heights should be pruned. + // - snapshotInterval % (height - KeepRecent) != 0 as that means the height is not + // a 'snapshot' height. + if m.snapshotInterval == 0 || pruneHeight%int64(m.snapshotInterval) != 0 { + m.pruneHeightsMx.Lock() + defer m.pruneHeightsMx.Unlock() + + m.pruneHeights = append(m.pruneHeights, pruneHeight) + return pruneHeight + } + } + return 0 +} + +// HandleHeightSnapshot persists the snapshot height to be pruned at the next appropriate +// height defined by the pruning strategy. Flushes the update to disk and panics if the flush fails +// The input height must be greater than 0 and pruning strategy any but pruning nothing. +// If one of these conditions is not met, this function does nothing. +func (m *Manager) HandleHeightSnapshot(height int64) { + if m.opts.GetPruningStrategy() == types.PruningNothing || height <= 0 { + return + } + + m.pruneSnapshotHeightsMx.Lock() + defer m.pruneSnapshotHeightsMx.Unlock() + + m.logger.Debug("HandleHeightSnapshot", "height", height) + m.pruneSnapshotHeights.PushBack(height) + + // flush the updates to disk so that they are not lost if crash happens. + if err := m.db.SetSync(pruneSnapshotHeightsKey, listToBytes(m.pruneSnapshotHeights)); err != nil { + panic(err) + } +} + +// SetSnapshotInterval sets the interval at which the snapshots are taken. +func (m *Manager) SetSnapshotInterval(snapshotInterval uint64) { + m.snapshotInterval = snapshotInterval +} + +// ShouldPruneAtHeight return true if the given height should be pruned, false otherwise +func (m *Manager) ShouldPruneAtHeight(height int64) bool { + return m.opts.Interval > 0 && m.opts.GetPruningStrategy() != types.PruningNothing && height%int64(m.opts.Interval) == 0 +} + +// LoadPruningHeights loads the pruning heights from the database as a crash recovery. +func (m *Manager) LoadPruningHeights(db dbm.DB) error { + if m.opts.GetPruningStrategy() == types.PruningNothing { + return nil + } + loadedPruneHeights, err := loadPruningHeights(db) + if err != nil { + return err + } + + if len(loadedPruneHeights) > 0 { + m.pruneHeightsMx.Lock() + defer m.pruneHeightsMx.Unlock() + m.pruneHeights = loadedPruneHeights + } + + loadedPruneSnapshotHeights, err := loadPruningSnapshotHeights(db) + if err != nil { + return err + } + + if loadedPruneSnapshotHeights.Len() > 0 { + m.pruneSnapshotHeightsMx.Lock() + defer m.pruneSnapshotHeightsMx.Unlock() + m.pruneSnapshotHeights = loadedPruneSnapshotHeights + } + + return nil +} + +func loadPruningHeights(db dbm.DB) ([]int64, error) { + bz, err := db.Get(pruneHeightsKey) + if err != nil { + return nil, fmt.Errorf("failed to get pruned heights: %w", err) + } + if len(bz) == 0 { + return []int64{}, nil + } + + prunedHeights := make([]int64, len(bz)/8) + i, offset := 0, 0 + for offset < len(bz) { + h := int64(binary.BigEndian.Uint64(bz[offset : offset+8])) + if h < 0 { + return []int64{}, &NegativeHeightsError{Height: h} + } + + prunedHeights[i] = h + i++ + offset += 8 + } + + return prunedHeights, nil +} + +func loadPruningSnapshotHeights(db dbm.DB) (*list.List, error) { + bz, err := db.Get(pruneSnapshotHeightsKey) + if err != nil { + return nil, fmt.Errorf("failed to get post-snapshot pruned heights: %w", err) + } + pruneSnapshotHeights := list.New() + if len(bz) == 0 { + return pruneSnapshotHeights, nil + } + + i, offset := 0, 0 + for offset < len(bz) { + h := int64(binary.BigEndian.Uint64(bz[offset : offset+8])) + if h < 0 { + return nil, &NegativeHeightsError{Height: h} + } + pruneSnapshotHeights.PushBack(h) + i++ + offset += 8 + } + + return pruneSnapshotHeights, nil +} + +func int64SliceToBytes(slice []int64) []byte { + bz := make([]byte, 0, len(slice)*8) + for _, ph := range slice { + buf := make([]byte, 8) + binary.BigEndian.PutUint64(buf, uint64(ph)) + bz = append(bz, buf...) + } + return bz +} + +func listToBytes(list *list.List) []byte { + bz := make([]byte, 0, list.Len()*8) + for e := list.Front(); e != nil; e = e.Next() { + buf := make([]byte, 8) + binary.BigEndian.PutUint64(buf, uint64(e.Value.(int64))) + bz = append(bz, buf...) + } + return bz +} diff --git a/pruning/manager_test.go b/pruning/manager_test.go new file mode 100644 index 000000000000..85d38e8c8af7 --- /dev/null +++ b/pruning/manager_test.go @@ -0,0 +1,532 @@ +package pruning_test + +import ( + "container/list" + "errors" + "fmt" + "testing" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" + db "github.com/tendermint/tm-db" + + "github.com/cosmos/cosmos-sdk/pruning" + "github.com/cosmos/cosmos-sdk/pruning/mock" + "github.com/cosmos/cosmos-sdk/pruning/types" +) + +const dbErr = "db error" + +func TestNewManager(t *testing.T) { + manager := pruning.NewManager(db.NewMemDB(), log.NewNopLogger()) + + require.NotNil(t, manager) + heights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.NotNil(t, heights) + require.Equal(t, types.PruningNothing, manager.GetOptions().GetPruningStrategy()) +} + +func TestStrategies(t *testing.T) { + testcases := map[string]struct { + strategy types.PruningOptions + snapshotInterval uint64 + strategyToAssert types.PruningStrategy + isValid bool + }{ + "prune nothing - no snapshot": { + strategy: types.NewPruningOptions(types.PruningNothing), + strategyToAssert: types.PruningNothing, + }, + "prune nothing - snapshot": { + strategy: types.NewPruningOptions(types.PruningNothing), + strategyToAssert: types.PruningNothing, + snapshotInterval: 100, + }, + "prune default - no snapshot": { + strategy: types.NewPruningOptions(types.PruningDefault), + strategyToAssert: types.PruningDefault, + }, + "prune default - snapshot": { + strategy: types.NewPruningOptions(types.PruningDefault), + strategyToAssert: types.PruningDefault, + snapshotInterval: 100, + }, + "prune everything - no snapshot": { + strategy: types.NewPruningOptions(types.PruningEverything), + strategyToAssert: types.PruningEverything, + }, + "prune everything - snapshot": { + strategy: types.NewPruningOptions(types.PruningEverything), + strategyToAssert: types.PruningEverything, + snapshotInterval: 100, + }, + "custom 100-10-15": { + strategy: types.NewCustomPruningOptions(100, 15), + snapshotInterval: 10, + strategyToAssert: types.PruningCustom, + }, + "custom 10-10-15": { + strategy: types.NewCustomPruningOptions(10, 15), + snapshotInterval: 10, + strategyToAssert: types.PruningCustom, + }, + "custom 100-0-15": { + strategy: types.NewCustomPruningOptions(100, 15), + snapshotInterval: 0, + strategyToAssert: types.PruningCustom, + }, + } + + manager := pruning.NewManager(db.NewMemDB(), log.NewNopLogger()) + + require.NotNil(t, manager) + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + curStrategy := tc.strategy + manager.SetSnapshotInterval(tc.snapshotInterval) + + pruneStrategy := curStrategy.GetPruningStrategy() + require.Equal(t, tc.strategyToAssert, pruneStrategy) + + // Validate strategy parameters + switch pruneStrategy { + case types.PruningDefault: + require.Equal(t, uint64(362880), curStrategy.KeepRecent) + require.Equal(t, uint64(10), curStrategy.Interval) + case types.PruningNothing: + require.Equal(t, uint64(0), curStrategy.KeepRecent) + require.Equal(t, uint64(0), curStrategy.Interval) + case types.PruningEverything: + require.Equal(t, uint64(2), curStrategy.KeepRecent) + require.Equal(t, uint64(10), curStrategy.Interval) + default: + // + } + + manager.SetOptions(curStrategy) + require.Equal(t, tc.strategy, manager.GetOptions()) + + curKeepRecent := curStrategy.KeepRecent + curInterval := curStrategy.Interval + + for curHeight := int64(0); curHeight < 110000; curHeight++ { + handleHeightActual := manager.HandleHeight(curHeight) + shouldPruneAtHeightActual := manager.ShouldPruneAtHeight(curHeight) + + curPruningHeihts, err := manager.GetFlushAndResetPruningHeights() + require.Nil(t, err) + + curHeightStr := fmt.Sprintf("height: %d", curHeight) + + switch curStrategy.GetPruningStrategy() { + case types.PruningNothing: + require.Equal(t, int64(0), handleHeightActual, curHeightStr) + require.False(t, shouldPruneAtHeightActual, curHeightStr) + + heights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, 0, len(heights)) + default: + if curHeight > int64(curKeepRecent) && (tc.snapshotInterval != 0 && (curHeight-int64(curKeepRecent))%int64(tc.snapshotInterval) != 0 || tc.snapshotInterval == 0) { + expectedHeight := curHeight - int64(curKeepRecent) + require.Equal(t, curHeight-int64(curKeepRecent), handleHeightActual, curHeightStr) + + require.Contains(t, curPruningHeihts, expectedHeight, curHeightStr) + } else { + require.Equal(t, int64(0), handleHeightActual, curHeightStr) + + heights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, 0, len(heights)) + } + require.Equal(t, curHeight%int64(curInterval) == 0, shouldPruneAtHeightActual, curHeightStr) + } + heights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, 0, len(heights)) + } + }) + } +} + +func TestHandleHeight_Inputs(t *testing.T) { + var keepRecent int64 = int64(types.NewPruningOptions(types.PruningEverything).KeepRecent) + + testcases := map[string]struct { + height int64 + expectedResult int64 + strategy types.PruningStrategy + expectedHeights []int64 + }{ + "previousHeight is negative - prune everything - invalid previousHeight": { + -1, + 0, + types.PruningEverything, + []int64{}, + }, + "previousHeight is zero - prune everything - invalid previousHeight": { + 0, + 0, + types.PruningEverything, + []int64{}, + }, + "previousHeight is positive but within keep recent- prune everything - not kept": { + keepRecent, + 0, + types.PruningEverything, + []int64{}, + }, + "previousHeight is positive and greater than keep recent - kept": { + keepRecent + 1, + keepRecent + 1 - keepRecent, + types.PruningEverything, + []int64{keepRecent + 1 - keepRecent}, + }, + "pruning nothing, previousHeight is positive and greater than keep recent - not kept": { + keepRecent + 1, + 0, + types.PruningNothing, + []int64{}, + }, + } + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + manager := pruning.NewManager(db.NewMemDB(), log.NewNopLogger()) + require.NotNil(t, manager) + manager.SetOptions(types.NewPruningOptions(tc.strategy)) + + handleHeightActual := manager.HandleHeight(tc.height) + require.Equal(t, tc.expectedResult, handleHeightActual) + + actualHeights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, len(tc.expectedHeights), len(actualHeights)) + require.Equal(t, tc.expectedHeights, actualHeights) + }) + } +} + +func TestHandleHeight_FlushLoadFromDisk(t *testing.T) { + testcases := map[string]struct { + previousHeight int64 + keepRecent uint64 + snapshotInterval uint64 + movedSnapshotHeights []int64 + expectedHandleHeightResult int64 + expectedLoadPruningHeightsResult error + expectedLoadedHeights []int64 + }{ + "simple flush occurs": { + previousHeight: 11, + keepRecent: 10, + snapshotInterval: 0, + movedSnapshotHeights: []int64{}, + expectedHandleHeightResult: 11 - 10, + expectedLoadPruningHeightsResult: nil, + expectedLoadedHeights: []int64{11 - 10}, + }, + "previous height <= keep recent - no update and no flush": { + previousHeight: 9, + keepRecent: 10, + snapshotInterval: 0, + movedSnapshotHeights: []int64{}, + expectedHandleHeightResult: 0, + expectedLoadPruningHeightsResult: nil, + expectedLoadedHeights: []int64{}, + }, + "previous height alligns with snapshot interval - no update and no flush": { + previousHeight: 12, + keepRecent: 10, + snapshotInterval: 2, + movedSnapshotHeights: []int64{}, + expectedHandleHeightResult: 0, + expectedLoadPruningHeightsResult: nil, + expectedLoadedHeights: []int64{}, + }, + "previous height does not align with snapshot interval - flush": { + previousHeight: 12, + keepRecent: 10, + snapshotInterval: 3, + movedSnapshotHeights: []int64{}, + expectedHandleHeightResult: 2, + expectedLoadPruningHeightsResult: nil, + expectedLoadedHeights: []int64{2}, + }, + "moved snapshot heights - flushed": { + previousHeight: 32, + keepRecent: 10, + snapshotInterval: 5, + movedSnapshotHeights: []int64{15, 20, 25}, + expectedHandleHeightResult: 22, + expectedLoadPruningHeightsResult: nil, + expectedLoadedHeights: []int64{15, 20, 22}, + }, + "previous height alligns with snapshot interval - no update but flush snapshot heights": { + previousHeight: 30, + keepRecent: 10, + snapshotInterval: 5, + movedSnapshotHeights: []int64{15, 20, 25}, + expectedHandleHeightResult: 0, + expectedLoadPruningHeightsResult: nil, + expectedLoadedHeights: []int64{15}, + }, + } + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + // Setup + db := db.NewMemDB() + manager := pruning.NewManager(db, log.NewNopLogger()) + require.NotNil(t, manager) + + manager.SetSnapshotInterval(tc.snapshotInterval) + manager.SetOptions(types.NewCustomPruningOptions(uint64(tc.keepRecent), uint64(10))) + + for _, snapshotHeight := range tc.movedSnapshotHeights { + manager.HandleHeightSnapshot(snapshotHeight) + } + + // Test HandleHeight and flush + handleHeightActual := manager.HandleHeight(tc.previousHeight) + require.Equal(t, tc.expectedHandleHeightResult, handleHeightActual) + + loadedPruneHeights, err := pruning.LoadPruningHeights(db) + require.NoError(t, err) + require.Equal(t, len(loadedPruneHeights), len(loadedPruneHeights)) + + // Test load back + err = manager.LoadPruningHeights(db) + require.NoError(t, err) + + heights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, len(tc.expectedLoadedHeights), len(heights)) + require.ElementsMatch(t, tc.expectedLoadedHeights, heights) + }) + } +} + +func TestHandleHeight_DbErr_Panic(t *testing.T) { + ctrl := gomock.NewController(t) + + // Setup + dbMock := mock.NewMockDB(ctrl) + + dbMock.EXPECT().SetSync(gomock.Any(), gomock.Any()).Return(errors.New(dbErr)).Times(1) + + manager := pruning.NewManager(dbMock, log.NewNopLogger()) + manager.SetOptions(types.NewPruningOptions(types.PruningEverything)) + require.NotNil(t, manager) + + defer func() { + if r := recover(); r == nil { + t.Fail() + } + }() + + manager.HandleHeight(10) +} + +func TestHandleHeightSnapshot_FlushLoadFromDisk(t *testing.T) { + loadedHeightsMirror := []int64{} + + // Setup + db := db.NewMemDB() + manager := pruning.NewManager(db, log.NewNopLogger()) + require.NotNil(t, manager) + + manager.SetOptions(types.NewPruningOptions(types.PruningEverything)) + + for snapshotHeight := int64(-1); snapshotHeight < 100; snapshotHeight++ { + // Test flush + manager.HandleHeightSnapshot(snapshotHeight) + + // Post test + if snapshotHeight > 0 { + loadedHeightsMirror = append(loadedHeightsMirror, snapshotHeight) + } + + loadedSnapshotHeights, err := pruning.LoadPruningSnapshotHeights(db) + require.NoError(t, err) + require.Equal(t, len(loadedHeightsMirror), loadedSnapshotHeights.Len()) + + // Test load back + err = manager.LoadPruningHeights(db) + require.NoError(t, err) + + loadedSnapshotHeights, err = pruning.LoadPruningSnapshotHeights(db) + require.NoError(t, err) + require.Equal(t, len(loadedHeightsMirror), loadedSnapshotHeights.Len()) + } +} + +func TestHandleHeightSnapshot_DbErr_Panic(t *testing.T) { + ctrl := gomock.NewController(t) + + // Setup + dbMock := mock.NewMockDB(ctrl) + + dbMock.EXPECT().SetSync(gomock.Any(), gomock.Any()).Return(errors.New(dbErr)).Times(1) + + manager := pruning.NewManager(dbMock, log.NewNopLogger()) + manager.SetOptions(types.NewPruningOptions(types.PruningEverything)) + require.NotNil(t, manager) + + defer func() { + if r := recover(); r == nil { + t.Fail() + } + }() + + manager.HandleHeightSnapshot(10) +} + +func TestFlushLoad(t *testing.T) { + db := db.NewMemDB() + manager := pruning.NewManager(db, log.NewNopLogger()) + require.NotNil(t, manager) + + curStrategy := types.NewCustomPruningOptions(100, 15) + + snapshotInterval := uint64(10) + manager.SetSnapshotInterval(snapshotInterval) + + manager.SetOptions(curStrategy) + require.Equal(t, curStrategy, manager.GetOptions()) + + keepRecent := curStrategy.KeepRecent + + heightsToPruneMirror := make([]int64, 0) + + for curHeight := int64(0); curHeight < 1000; curHeight++ { + handleHeightActual := manager.HandleHeight(curHeight) + + curHeightStr := fmt.Sprintf("height: %d", curHeight) + + if curHeight > int64(keepRecent) && (snapshotInterval != 0 && (curHeight-int64(keepRecent))%int64(snapshotInterval) != 0 || snapshotInterval == 0) { + expectedHandleHeight := curHeight - int64(keepRecent) + require.Equal(t, expectedHandleHeight, handleHeightActual, curHeightStr) + heightsToPruneMirror = append(heightsToPruneMirror, expectedHandleHeight) + } else { + require.Equal(t, int64(0), handleHeightActual, curHeightStr) + } + + if manager.ShouldPruneAtHeight(curHeight) && curHeight > int64(keepRecent) { + actualHeights, err := manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, len(heightsToPruneMirror), len(actualHeights)) + require.Equal(t, heightsToPruneMirror, actualHeights) + + err = manager.LoadPruningHeights(db) + require.NoError(t, err) + + actualHeights, err = manager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, len(heightsToPruneMirror), len(actualHeights)) + require.Equal(t, heightsToPruneMirror, actualHeights) + + heightsToPruneMirror = make([]int64, 0) + } + } +} + +func TestLoadPruningHeights(t *testing.T) { + var ( + manager = pruning.NewManager(db.NewMemDB(), log.NewNopLogger()) + err error + ) + require.NotNil(t, manager) + + // must not be PruningNothing + manager.SetOptions(types.NewPruningOptions(types.PruningDefault)) + + testcases := map[string]struct { + flushedPruningHeights []int64 + getFlushedPruningSnapshotHeights func() *list.List + expectedResult error + }{ + "negative pruningHeight - error": { + flushedPruningHeights: []int64{10, 0, -1}, + expectedResult: &pruning.NegativeHeightsError{Height: -1}, + }, + "negative snapshotPruningHeight - error": { + getFlushedPruningSnapshotHeights: func() *list.List { + l := list.New() + l.PushBack(int64(5)) + l.PushBack(int64(-2)) + l.PushBack(int64(3)) + return l + }, + expectedResult: &pruning.NegativeHeightsError{Height: -2}, + }, + "both have negative - pruningHeight error": { + flushedPruningHeights: []int64{10, 0, -1}, + getFlushedPruningSnapshotHeights: func() *list.List { + l := list.New() + l.PushBack(int64(5)) + l.PushBack(int64(-2)) + l.PushBack(int64(3)) + return l + }, + expectedResult: &pruning.NegativeHeightsError{Height: -1}, + }, + "both non-negative - success": { + flushedPruningHeights: []int64{10, 0, 3}, + getFlushedPruningSnapshotHeights: func() *list.List { + l := list.New() + l.PushBack(int64(5)) + l.PushBack(int64(0)) + l.PushBack(int64(3)) + return l + }, + }, + } + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + db := db.NewMemDB() + if tc.flushedPruningHeights != nil { + err = db.Set(pruning.PruneHeightsKey, pruning.Int64SliceToBytes(tc.flushedPruningHeights)) + require.NoError(t, err) + } + + if tc.getFlushedPruningSnapshotHeights != nil { + err = db.Set(pruning.PruneSnapshotHeightsKey, pruning.ListToBytes(tc.getFlushedPruningSnapshotHeights())) + require.NoError(t, err) + } + + err = manager.LoadPruningHeights(db) + require.Equal(t, tc.expectedResult, err) + }) + } +} + +func TestLoadPruningHeights_PruneNothing(t *testing.T) { + manager := pruning.NewManager(db.NewMemDB(), log.NewNopLogger()) + require.NotNil(t, manager) + + manager.SetOptions(types.NewPruningOptions(types.PruningNothing)) + + require.Nil(t, manager.LoadPruningHeights(db.NewMemDB())) +} + +func TestGetFlushAndResetPruningHeights_DbErr_Panic(t *testing.T) { + ctrl := gomock.NewController(t) + + // Setup + dbMock := mock.NewMockDB(ctrl) + + dbMock.EXPECT().SetSync(gomock.Any(), gomock.Any()).Return(errors.New(dbErr)).Times(1) + + manager := pruning.NewManager(dbMock, log.NewNopLogger()) + manager.SetOptions(types.NewPruningOptions(types.PruningEverything)) + require.NotNil(t, manager) + + heights, err := manager.GetFlushAndResetPruningHeights() + require.Error(t, err) + require.Nil(t, heights) +} diff --git a/pruning/mock/db_mock.go b/pruning/mock/db_mock.go new file mode 100644 index 000000000000..fb6ee740b972 --- /dev/null +++ b/pruning/mock/db_mock.go @@ -0,0 +1,420 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: /home/roman/projects/cosmos-sdk/vendor/github.com/tendermint/tm-db/types.go + +// Package mock_db is a generated GoMock package. +package mock + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + db "github.com/tendermint/tm-db" +) + +// MockDB is a mock of DB interface. +type MockDB struct { + ctrl *gomock.Controller + recorder *MockDBMockRecorder +} + +// MockDBMockRecorder is the mock recorder for MockDB. +type MockDBMockRecorder struct { + mock *MockDB +} + +// NewMockDB creates a new mock instance. +func NewMockDB(ctrl *gomock.Controller) *MockDB { + mock := &MockDB{ctrl: ctrl} + mock.recorder = &MockDBMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockDB) EXPECT() *MockDBMockRecorder { + return m.recorder +} + +// Close mocks base method. +func (m *MockDB) Close() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close") + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockDBMockRecorder) Close() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDB)(nil).Close)) +} + +// Delete mocks base method. +func (m *MockDB) Delete(arg0 []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockDBMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDB)(nil).Delete), arg0) +} + +// DeleteSync mocks base method. +func (m *MockDB) DeleteSync(arg0 []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteSync", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteSync indicates an expected call of DeleteSync. +func (mr *MockDBMockRecorder) DeleteSync(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSync", reflect.TypeOf((*MockDB)(nil).DeleteSync), arg0) +} + +// Get mocks base method. +func (m *MockDB) Get(arg0 []byte) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockDBMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDB)(nil).Get), arg0) +} + +// Has mocks base method. +func (m *MockDB) Has(key []byte) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Has", key) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Has indicates an expected call of Has. +func (mr *MockDBMockRecorder) Has(key interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockDB)(nil).Has), key) +} + +// Iterator mocks base method. +func (m *MockDB) Iterator(start, end []byte) (db.Iterator, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Iterator", start, end) + ret0, _ := ret[0].(db.Iterator) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Iterator indicates an expected call of Iterator. +func (mr *MockDBMockRecorder) Iterator(start, end interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterator", reflect.TypeOf((*MockDB)(nil).Iterator), start, end) +} + +// NewBatch mocks base method. +func (m *MockDB) NewBatch() db.Batch { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewBatch") + ret0, _ := ret[0].(db.Batch) + return ret0 +} + +// NewBatch indicates an expected call of NewBatch. +func (mr *MockDBMockRecorder) NewBatch() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBatch", reflect.TypeOf((*MockDB)(nil).NewBatch)) +} + +// Print mocks base method. +func (m *MockDB) Print() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Print") + ret0, _ := ret[0].(error) + return ret0 +} + +// Print indicates an expected call of Print. +func (mr *MockDBMockRecorder) Print() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Print", reflect.TypeOf((*MockDB)(nil).Print)) +} + +// ReverseIterator mocks base method. +func (m *MockDB) ReverseIterator(start, end []byte) (db.Iterator, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReverseIterator", start, end) + ret0, _ := ret[0].(db.Iterator) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReverseIterator indicates an expected call of ReverseIterator. +func (mr *MockDBMockRecorder) ReverseIterator(start, end interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReverseIterator", reflect.TypeOf((*MockDB)(nil).ReverseIterator), start, end) +} + +// Set mocks base method. +func (m *MockDB) Set(arg0, arg1 []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Set", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// Set indicates an expected call of Set. +func (mr *MockDBMockRecorder) Set(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockDB)(nil).Set), arg0, arg1) +} + +// SetSync mocks base method. +func (m *MockDB) SetSync(arg0, arg1 []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetSync", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetSync indicates an expected call of SetSync. +func (mr *MockDBMockRecorder) SetSync(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSync", reflect.TypeOf((*MockDB)(nil).SetSync), arg0, arg1) +} + +// Stats mocks base method. +func (m *MockDB) Stats() map[string]string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Stats") + ret0, _ := ret[0].(map[string]string) + return ret0 +} + +// Stats indicates an expected call of Stats. +func (mr *MockDBMockRecorder) Stats() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stats", reflect.TypeOf((*MockDB)(nil).Stats)) +} + +// MockBatch is a mock of Batch interface. +type MockBatch struct { + ctrl *gomock.Controller + recorder *MockBatchMockRecorder +} + +// MockBatchMockRecorder is the mock recorder for MockBatch. +type MockBatchMockRecorder struct { + mock *MockBatch +} + +// NewMockBatch creates a new mock instance. +func NewMockBatch(ctrl *gomock.Controller) *MockBatch { + mock := &MockBatch{ctrl: ctrl} + mock.recorder = &MockBatchMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBatch) EXPECT() *MockBatchMockRecorder { + return m.recorder +} + +// Close mocks base method. +func (m *MockBatch) Close() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close") + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockBatchMockRecorder) Close() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockBatch)(nil).Close)) +} + +// Delete mocks base method. +func (m *MockBatch) Delete(key []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", key) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockBatchMockRecorder) Delete(key interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockBatch)(nil).Delete), key) +} + +// Set mocks base method. +func (m *MockBatch) Set(key, value []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Set", key, value) + ret0, _ := ret[0].(error) + return ret0 +} + +// Set indicates an expected call of Set. +func (mr *MockBatchMockRecorder) Set(key, value interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockBatch)(nil).Set), key, value) +} + +// Write mocks base method. +func (m *MockBatch) Write() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Write") + ret0, _ := ret[0].(error) + return ret0 +} + +// Write indicates an expected call of Write. +func (mr *MockBatchMockRecorder) Write() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockBatch)(nil).Write)) +} + +// WriteSync mocks base method. +func (m *MockBatch) WriteSync() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WriteSync") + ret0, _ := ret[0].(error) + return ret0 +} + +// WriteSync indicates an expected call of WriteSync. +func (mr *MockBatchMockRecorder) WriteSync() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteSync", reflect.TypeOf((*MockBatch)(nil).WriteSync)) +} + +// MockIterator is a mock of Iterator interface. +type MockIterator struct { + ctrl *gomock.Controller + recorder *MockIteratorMockRecorder +} + +// MockIteratorMockRecorder is the mock recorder for MockIterator. +type MockIteratorMockRecorder struct { + mock *MockIterator +} + +// NewMockIterator creates a new mock instance. +func NewMockIterator(ctrl *gomock.Controller) *MockIterator { + mock := &MockIterator{ctrl: ctrl} + mock.recorder = &MockIteratorMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockIterator) EXPECT() *MockIteratorMockRecorder { + return m.recorder +} + +// Close mocks base method. +func (m *MockIterator) Close() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close") + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockIteratorMockRecorder) Close() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockIterator)(nil).Close)) +} + +// Domain mocks base method. +func (m *MockIterator) Domain() ([]byte, []byte) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Domain") + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].([]byte) + return ret0, ret1 +} + +// Domain indicates an expected call of Domain. +func (mr *MockIteratorMockRecorder) Domain() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Domain", reflect.TypeOf((*MockIterator)(nil).Domain)) +} + +// Error mocks base method. +func (m *MockIterator) Error() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Error") + ret0, _ := ret[0].(error) + return ret0 +} + +// Error indicates an expected call of Error. +func (mr *MockIteratorMockRecorder) Error() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockIterator)(nil).Error)) +} + +// Key mocks base method. +func (m *MockIterator) Key() []byte { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Key") + ret0, _ := ret[0].([]byte) + return ret0 +} + +// Key indicates an expected call of Key. +func (mr *MockIteratorMockRecorder) Key() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Key", reflect.TypeOf((*MockIterator)(nil).Key)) +} + +// Next mocks base method. +func (m *MockIterator) Next() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "Next") +} + +// Next indicates an expected call of Next. +func (mr *MockIteratorMockRecorder) Next() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockIterator)(nil).Next)) +} + +// Valid mocks base method. +func (m *MockIterator) Valid() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Valid") + ret0, _ := ret[0].(bool) + return ret0 +} + +// Valid indicates an expected call of Valid. +func (mr *MockIteratorMockRecorder) Valid() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Valid", reflect.TypeOf((*MockIterator)(nil).Valid)) +} + +// Value mocks base method. +func (m *MockIterator) Value() []byte { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Value") + ret0, _ := ret[0].([]byte) + return ret0 +} + +// Value indicates an expected call of Value. +func (mr *MockIteratorMockRecorder) Value() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockIterator)(nil).Value)) +} diff --git a/pruning/types/options.go b/pruning/types/options.go new file mode 100644 index 000000000000..229dbed984d5 --- /dev/null +++ b/pruning/types/options.go @@ -0,0 +1,130 @@ +package types + +import ( + "errors" + "fmt" +) + +// PruningOptions defines the pruning strategy used when determining which +// heights are removed from disk when committing state. +type PruningOptions struct { + // KeepRecent defines how many recent heights to keep on disk. + KeepRecent uint64 + + // Interval defines when the pruned heights are removed from disk. + Interval uint64 + + // Strategy defines the kind of pruning strategy. See below for more information on each. + Strategy PruningStrategy +} + +type PruningStrategy int + +// Pruning option string constants +const ( + PruningOptionDefault = "default" + PruningOptionEverything = "everything" + PruningOptionNothing = "nothing" + PruningOptionCustom = "custom" +) + +const ( + // PruningDefault defines a pruning strategy where the last 362880 heights are + // kept where to-be pruned heights are pruned at every 10th height. + // The last 362880 heights are kept(approximately 3.5 weeks worth of state) assuming the typical + // block time is 6s. If these values do not match the applications' requirements, use the "custom" option. + PruningDefault PruningStrategy = iota + // PruningEverything defines a pruning strategy where all committed heights are + // deleted, storing only the current height and last 2 states. To-be pruned heights are + // pruned at every 10th height. + PruningEverything + // PruningNothing defines a pruning strategy where all heights are kept on disk. + // This is the only stretegy where KeepEvery=1 is allowed with state-sync snapshots disabled. + PruningNothing + // PruningCustom defines a pruning strategy where the user specifies the pruning. + PruningCustom + // PruningUndefined defines an undefined pruning strategy. It is to be returned by stores that do not support pruning. + PruningUndefined +) + +const ( + pruneEverythingKeepRecent = 2 + pruneEverythingInterval = 10 +) + +var ( + ErrPruningIntervalZero = errors.New("'pruning-interval' must not be 0. If you want to disable pruning, select pruning = \"nothing\"") + ErrPruningIntervalTooSmall = fmt.Errorf("'pruning-interval' must not be less than %d. For the most aggressive pruning, select pruning = \"everything\"", pruneEverythingInterval) + ErrPruningKeepRecentTooSmall = fmt.Errorf("'pruning-keep-recent' must not be less than %d. For the most aggressive pruning, select pruning = \"everything\"", pruneEverythingKeepRecent) +) + +func NewPruningOptions(pruningStrategy PruningStrategy) PruningOptions { + switch pruningStrategy { + case PruningDefault: + return PruningOptions{ + KeepRecent: 362880, + Interval: 10, + Strategy: PruningDefault, + } + case PruningEverything: + return PruningOptions{ + KeepRecent: pruneEverythingKeepRecent, + Interval: pruneEverythingInterval, + Strategy: PruningEverything, + } + case PruningNothing: + return PruningOptions{ + KeepRecent: 0, + Interval: 0, + Strategy: PruningNothing, + } + default: + return PruningOptions{ + Strategy: PruningCustom, + } + } +} + +func NewCustomPruningOptions(keepRecent, interval uint64) PruningOptions { + return PruningOptions{ + KeepRecent: keepRecent, + Interval: interval, + Strategy: PruningCustom, + } +} + +func (po PruningOptions) GetPruningStrategy() PruningStrategy { + return po.Strategy +} + +func (po PruningOptions) Validate() error { + if po.Strategy == PruningNothing { + return nil + } + if po.Interval == 0 { + return ErrPruningIntervalZero + } + if po.Interval < pruneEverythingInterval { + return ErrPruningIntervalTooSmall + } + if po.KeepRecent < pruneEverythingKeepRecent { + return ErrPruningKeepRecentTooSmall + } + return nil +} + +func NewPruningOptionsFromString(strategy string) PruningOptions { + switch strategy { + case PruningOptionEverything: + return NewPruningOptions(PruningEverything) + + case PruningOptionNothing: + return NewPruningOptions(PruningNothing) + + case PruningOptionDefault: + return NewPruningOptions(PruningDefault) + + default: + return NewPruningOptions(PruningDefault) + } +} diff --git a/pruning/types/options_test.go b/pruning/types/options_test.go new file mode 100644 index 000000000000..abc6bf39e2a3 --- /dev/null +++ b/pruning/types/options_test.go @@ -0,0 +1,65 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestPruningOptions_Validate(t *testing.T) { + testCases := []struct { + opts PruningOptions + expectErr error + }{ + {NewPruningOptions(PruningDefault), nil}, + {NewPruningOptions(PruningEverything), nil}, + {NewPruningOptions(PruningNothing), nil}, + {NewPruningOptions(PruningCustom), ErrPruningIntervalZero}, + {NewCustomPruningOptions(2, 10), nil}, + {NewCustomPruningOptions(100, 15), nil}, + {NewCustomPruningOptions(1, 10), ErrPruningKeepRecentTooSmall}, + {NewCustomPruningOptions(2, 9), ErrPruningIntervalTooSmall}, + {NewCustomPruningOptions(2, 0), ErrPruningIntervalZero}, + {NewCustomPruningOptions(2, 0), ErrPruningIntervalZero}, + } + + for _, tc := range testCases { + err := tc.opts.Validate() + require.Equal(t, tc.expectErr, err, "options: %v, err: %s", tc.opts, err) + } +} + +func TestPruningOptions_GetStrategy(t *testing.T) { + testCases := []struct { + opts PruningOptions + expectedStrategy PruningStrategy + }{ + {NewPruningOptions(PruningDefault), PruningDefault}, + {NewPruningOptions(PruningEverything), PruningEverything}, + {NewPruningOptions(PruningNothing), PruningNothing}, + {NewPruningOptions(PruningCustom), PruningCustom}, + {NewCustomPruningOptions(2, 10), PruningCustom}, + } + + for _, tc := range testCases { + actualStrategy := tc.opts.GetPruningStrategy() + require.Equal(t, tc.expectedStrategy, actualStrategy) + } +} + +func TestNewPruningOptionsFromString(t *testing.T) { + testCases := []struct { + optString string + expect PruningOptions + }{ + {PruningOptionDefault, NewPruningOptions(PruningDefault)}, + {PruningOptionEverything, NewPruningOptions(PruningEverything)}, + {PruningOptionNothing, NewPruningOptions(PruningNothing)}, + {"invalid", NewPruningOptions(PruningDefault)}, + } + + for _, tc := range testCases { + actual := NewPruningOptionsFromString(tc.optString) + require.Equal(t, tc.expect, actual) + } +} diff --git a/scripts/module-tests.sh b/scripts/module-tests.sh index b6be64240e3b..86998b5aa99f 100644 --- a/scripts/module-tests.sh +++ b/scripts/module-tests.sh @@ -21,7 +21,7 @@ execute_mod_tests() { echo ">>> running $go_mod tests" cd $mod_dir; - go test -mod=readonly -timeout 30m -coverprofile=${root_dir}/${coverage_file}.tmp -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=${root_dir}/${coverage_file}.tmp -covermode=atomic -tags='norace ledger test_ledger_mock' ./... local ret=$? echo "test return: " $ret; cd -; diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 02e498646cd2..7b61f31ea5f2 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,36 +1,24 @@ #!/usr/bin/env bash #== Requirements == - # - ## make sure your `go env GOPATH` is in the `$PATH` - ## Install: - ## + latest buf (v1.0.0-rc11 or later) - ## + protobuf v3 - # - ## All protoc dependencies must be installed not in the module scope - ## currently we must use grpc-gateway v1 - # cd ~ - # go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - # go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - # go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0 - # go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest - # go get github.com/regen-network/cosmos-proto@latest # doesn't work in install mode +# +## make sure your `go env GOPATH` is in the `$PATH` +## Install: +## + latest buf (v1.0.0-rc11 or later) +## + protobuf v3 +# +## All protoc dependencies must be installed not in the module scope +## currently we must use grpc-gateway v1 +# cd ~ +# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +# go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0 +# go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest +# go get github.com/regen-network/cosmos-proto@latest # doesn't work in install mode +# go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@v0.3.1 set -eo pipefail -protoc_install_gocosmos() { - echo "Installing protobuf gocosmos plugin" - # we should use go install, but regen-network/cosmos-proto contains - # replace directives. It must not contain directives that would cause - # it to be interpreted differently than if it were the main module. - # So the command below issues a warning and we are muting it for now. - # - # Installing plugins must be done outside of the module - (go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@v0.3.1 2> /dev/null) - } - - protoc_install_gocosmos - echo "Generating gogo proto code" cd proto proto_dirs=$(find ./cosmos -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) @@ -51,6 +39,4 @@ cd .. cp -r github.com/cosmos/cosmos-sdk/* ./ rm -rf github.com -go mod tidy - -./scripts/protocgen2.sh +go mod tidy -compat=1.18 diff --git a/scripts/protocgen2.sh b/scripts/protocgen2.sh deleted file mode 100755 index 05d1e8532dc7..000000000000 --- a/scripts/protocgen2.sh +++ /dev/null @@ -1,19 +0,0 @@ -# this script is for generating protobuf files for the new google.golang.org/protobuf API - -set -eo pipefail - -protoc_install_gopulsar() { - go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest -} - -protoc_install_gopulsar - -echo "Cleaning API directory" -(cd api; find ./ -type f \( -iname \*.pulsar.go -o -iname \*.pb.go -o -iname \*.cosmos_orm.go -o -iname \*.pb.gw.go \) -delete; find . -empty -type d -delete; cd ..) - -echo "Generating API module" -(cd proto; buf generate --template buf.gen.pulsar.yaml) - -echo "Generate Pulsar Test Data" -(cd testutil/testdata; buf generate --template buf.gen.pulsar.yaml) diff --git a/server/api/server.go b/server/api/server.go index c052c03f52ca..5bc406acfa38 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -90,16 +90,6 @@ func New(clientCtx client.Context, logger log.Logger) *Server { // non-blocking, so an external signal handler must be used. func (s *Server) Start(cfg config.Config) error { s.mtx.Lock() - if cfg.Telemetry.Enabled { - m, err := telemetry.New(cfg.Telemetry) - if err != nil { - s.mtx.Unlock() - return err - } - - s.metrics = m - s.registerMetrics() - } tmCfg := tmrpcserver.DefaultConfig() tmCfg.MaxOpenConnections = int(cfg.API.MaxOpenConnections) @@ -107,25 +97,24 @@ func (s *Server) Start(cfg config.Config) error { tmCfg.WriteTimeout = time.Duration(cfg.API.RPCWriteTimeout) * time.Second tmCfg.MaxBodyBytes = int64(cfg.API.RPCMaxBodyBytes) - listener, err := tmrpcserver.Listen(cfg.API.Address, tmCfg.MaxOpenConnections) + listener, err := tmrpcserver.Listen(cfg.API.Address, tmCfg) if err != nil { s.mtx.Unlock() return err } s.registerGRPCGatewayRoutes() - s.listener = listener var h http.Handler = s.Router + s.mtx.Unlock() + if cfg.API.EnableUnsafeCORS { allowAllCORS := handlers.CORS(handlers.AllowedHeaders([]string{"Content-Type"})) - s.mtx.Unlock() return tmrpcserver.Serve(s.listener, allowAllCORS(h), s.logger, tmCfg) } s.logger.Info("starting API server...") - s.mtx.Unlock() return tmrpcserver.Serve(s.listener, s.Router, s.logger, tmCfg) } @@ -140,6 +129,13 @@ func (s *Server) registerGRPCGatewayRoutes() { s.Router.PathPrefix("/").Handler(s.GRPCGatewayRouter) } +func (s *Server) SetTelemetry(m *telemetry.Metrics) { + s.mtx.Lock() + s.metrics = m + s.registerMetrics() + s.mtx.Unlock() +} + func (s *Server) registerMetrics() { metricsHandler := func(w http.ResponseWriter, r *http.Request) { format := strings.TrimSpace(r.FormValue("format")) diff --git a/server/cmd/execute.go b/server/cmd/execute.go index 4f715d3cc3de..38e08797a563 100644 --- a/server/cmd/execute.go +++ b/server/cmd/execute.go @@ -5,8 +5,8 @@ import ( "github.com/rs/zerolog" "github.com/spf13/cobra" + tmcfg "github.com/tendermint/tendermint/config" tmcli "github.com/tendermint/tendermint/libs/cli" - tmlog "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -30,7 +30,7 @@ func Execute(rootCmd *cobra.Command, envPrefix string, defaultHome string) error ctx = context.WithValue(ctx, server.ServerContextKey, srvCtx) rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)") - rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmlog.LogFormatPlain, "The logging format (json|plain)") + rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmcfg.LogFormatPlain, "The logging format (json|plain)") executor := tmcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome) return executor.ExecuteContext(ctx) diff --git a/server/config/config.go b/server/config/config.go index 8d4c003eae46..bd0ba7ae58ce 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -2,11 +2,13 @@ package config import ( "fmt" + "math" "strings" "github.com/spf13/viper" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + clientflags "github.com/cosmos/cosmos-sdk/client/flags" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -23,6 +25,14 @@ const ( // DefaultGRPCWebAddress defines the default address to bind the gRPC-web server to. DefaultGRPCWebAddress = "0.0.0.0:9091" + + // DefaultGRPCMaxRecvMsgSize defines the default gRPC max message size in + // bytes the server can receive. + DefaultGRPCMaxRecvMsgSize = 1024 * 1024 * 10 + + // DefaultGRPCMaxSendMsgSize defines the default gRPC max message size in + // bytes the server can send. + DefaultGRPCMaxSendMsgSize = math.MaxInt32 ) // BaseConfig defines the server's basic configuration @@ -131,6 +141,15 @@ type RosettaConfig struct { // Offline defines if the server must be run in offline mode Offline bool `mapstructure:"offline"` + + // EnableFeeSuggestion defines if the server should suggest fee by default + EnableFeeSuggestion bool `mapstructure:"enable-fee-suggestion"` + + // GasToSuggest defines gas limit when calculating the fee + GasToSuggest int `mapstructure:"gas-to-suggest"` + + // DenomToSuggest defines the defult denom for fee suggestion + DenomToSuggest string `mapstructure:"denom-to-suggest"` } // GRPCConfig defines configuration for the gRPC server. @@ -140,6 +159,14 @@ type GRPCConfig struct { // Address defines the API server to listen on Address string `mapstructure:"address"` + + // MaxRecvMsgSize defines the max message size in bytes the server can receive. + // The default value is 10MB. + MaxRecvMsgSize int `mapstructure:"max-recv-msg-size"` + + // MaxSendMsgSize defines the max message size in bytes the server can send. + // The default value is math.MaxInt32. + MaxSendMsgSize int `mapstructure:"max-send-msg-size"` } // GRPCWebConfig defines configuration for the gRPC-web server. @@ -157,7 +184,7 @@ type GRPCWebConfig struct { // StateSyncConfig defines the state sync snapshot configuration. type StateSyncConfig struct { // SnapshotInterval sets the interval at which state sync snapshots are taken. - // 0 disables snapshots. Must be a multiple of PruningKeepEvery. + // 0 disables snapshots. SnapshotInterval uint64 `mapstructure:"snapshot-interval"` // SnapshotKeepRecent sets the number of recent state sync snapshots to keep. @@ -211,7 +238,7 @@ func DefaultConfig() *Config { BaseConfig: BaseConfig{ MinGasPrices: defaultMinGasPrices, InterBlockCache: true, - Pruning: storetypes.PruningOptionDefault, + Pruning: pruningtypes.PruningOptionDefault, PruningKeepRecent: "0", PruningInterval: "0", MinRetainBlocks: 0, @@ -232,16 +259,21 @@ func DefaultConfig() *Config { RPCMaxBodyBytes: 1000000, }, GRPC: GRPCConfig{ - Enable: true, - Address: DefaultGRPCAddress, + Enable: true, + Address: DefaultGRPCAddress, + MaxRecvMsgSize: DefaultGRPCMaxRecvMsgSize, + MaxSendMsgSize: DefaultGRPCMaxSendMsgSize, }, Rosetta: RosettaConfig{ - Enable: false, - Address: ":8080", - Blockchain: "app", - Network: "network", - Retries: 3, - Offline: false, + Enable: false, + Address: ":8080", + Blockchain: "app", + Network: "network", + Retries: 3, + Offline: false, + EnableFeeSuggestion: false, + GasToSuggest: clientflags.DefaultGasLimit, + DenomToSuggest: "uatom", }, GRPCWeb: GRPCWebConfig{ Enable: true, @@ -299,16 +331,21 @@ func GetConfig(v *viper.Viper) Config { EnableUnsafeCORS: v.GetBool("api.enabled-unsafe-cors"), }, Rosetta: RosettaConfig{ - Enable: v.GetBool("rosetta.enable"), - Address: v.GetString("rosetta.address"), - Blockchain: v.GetString("rosetta.blockchain"), - Network: v.GetString("rosetta.network"), - Retries: v.GetInt("rosetta.retries"), - Offline: v.GetBool("rosetta.offline"), + Enable: v.GetBool("rosetta.enable"), + Address: v.GetString("rosetta.address"), + Blockchain: v.GetString("rosetta.blockchain"), + Network: v.GetString("rosetta.network"), + Retries: v.GetInt("rosetta.retries"), + Offline: v.GetBool("rosetta.offline"), + EnableFeeSuggestion: v.GetBool("rosetta.enable-fee-suggestion"), + GasToSuggest: v.GetInt("rosetta.gas-to-suggest"), + DenomToSuggest: v.GetString("rosetta.denom-to-suggest"), }, GRPC: GRPCConfig{ - Enable: v.GetBool("grpc.enable"), - Address: v.GetString("grpc.address"), + Enable: v.GetBool("grpc.enable"), + Address: v.GetString("grpc.address"), + MaxRecvMsgSize: v.GetInt("grpc.max-recv-msg-size"), + MaxSendMsgSize: v.GetInt("grpc.max-send-msg-size"), }, GRPCWeb: GRPCWebConfig{ Enable: v.GetBool("grpc-web.enable"), @@ -327,9 +364,9 @@ func (c Config) ValidateBasic() error { if c.BaseConfig.MinGasPrices == "" { return sdkerrors.ErrAppConfig.Wrap("set min gas price in app.toml or flag or env variable") } - if c.Pruning == storetypes.PruningOptionEverything && c.StateSync.SnapshotInterval > 0 { + if c.Pruning == pruningtypes.PruningOptionEverything && c.StateSync.SnapshotInterval > 0 { return sdkerrors.ErrAppConfig.Wrapf( - "cannot enable state sync snapshots with '%s' pruning setting", storetypes.PruningOptionEverything, + "cannot enable state sync snapshots with '%s' pruning setting", pruningtypes.PruningOptionEverything, ) } diff --git a/server/config/config_test.go b/server/config/config_test.go index 4c396cf45586..442e56026ec4 100644 --- a/server/config/config_test.go +++ b/server/config/config_test.go @@ -2,11 +2,11 @@ package config import ( "bytes" - "github.com/spf13/viper" - "github.com/stretchr/testify/assert" "path/filepath" "testing" + "github.com/spf13/viper" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/server/config/toml.go b/server/config/toml.go index 4b574b5e7849..a93fffd1ecd6 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -24,8 +24,8 @@ minimum-gas-prices = "{{ .BaseConfig.MinGasPrices }}" # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -# everything: all saved states will be deleted, storing only the current and previous state; pruning at 10 block intervals -# custom: allow pruning options to be manually specified through 'pruning-keep-recent' and 'pruning-interval' +# everything: 2 latest states will be kept; pruning at 10 block intervals. +# custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' pruning = "{{ .BaseConfig.Pruning }}" # These are applied if and only if the pruning strategy is custom. @@ -170,6 +170,18 @@ retries = {{ .Rosetta.Retries }} # Offline defines if Rosetta server should run in offline mode. offline = {{ .Rosetta.Offline }} +# EnableDefaultSuggestedFee defines if the server should suggest fee by default. +# If 'construction/medata' is called without gas limit and gas price, +# suggested fee based on gas-to-suggest and denom-to-suggest will be given. +enable-fee-suggestion = {{ .Rosetta.EnableFeeSuggestion }} + +# GasToSuggest defines gas limit when calculating the fee +gas-to-suggest = {{ .Rosetta.GasToSuggest }} + +# DenomToSuggest defines the defult denom for fee suggestion. +# Price must be in minimum-gas-prices. +denom-to-suggest = "{{ .Rosetta.DenomToSuggest }}" + ############################################################################### ### gRPC Configuration ### ############################################################################### @@ -182,6 +194,14 @@ enable = {{ .GRPC.Enable }} # Address defines the gRPC server address to bind to. address = "{{ .GRPC.Address }}" +# MaxRecvMsgSize defines the max message size in bytes the server can receive. +# The default value is 10MB. +max-recv-msg-size = "{{ .GRPC.MaxRecvMsgSize }}" + +# MaxSendMsgSize defines the max message size in bytes the server can send. +# The default value is math.MaxInt32. +max-send-msg-size = "{{ .GRPC.MaxSendMsgSize }}" + ############################################################################### ### gRPC Web Configuration ### ############################################################################### @@ -256,7 +276,7 @@ func WriteConfigFile(configFilePath string, config interface{}) { panic(err) } - mustWriteFile(configFilePath, buffer.Bytes(), 0644) + mustWriteFile(configFilePath, buffer.Bytes(), 0o644) } func mustWriteFile(filePath string, contents []byte, mode os.FileMode) { diff --git a/server/export.go b/server/export.go index 512c3d86d284..a832c1340a9c 100644 --- a/server/export.go +++ b/server/export.go @@ -8,6 +8,7 @@ import ( "github.com/spf13/cobra" tmjson "github.com/tendermint/tendermint/libs/json" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/client/flags" @@ -79,17 +80,17 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com doc.AppState = exported.AppState doc.Validators = exported.Validators doc.InitialHeight = exported.Height - doc.ConsensusParams = &tmtypes.ConsensusParams{ - Block: tmtypes.BlockParams{ + doc.ConsensusParams = &tmproto.ConsensusParams{ + Block: tmproto.BlockParams{ MaxBytes: exported.ConsensusParams.Block.MaxBytes, MaxGas: exported.ConsensusParams.Block.MaxGas, }, - Evidence: tmtypes.EvidenceParams{ + Evidence: tmproto.EvidenceParams{ MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks, MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration, MaxBytes: exported.ConsensusParams.Evidence.MaxBytes, }, - Validator: tmtypes.ValidatorParams{ + Validator: tmproto.ValidatorParams{ PubKeyTypes: exported.ConsensusParams.Validator.PubKeyTypes, }, } @@ -102,6 +103,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com return err } + cmd.SetOut(cmd.OutOrStdout()) cmd.Println(string(sdk.MustSortJSON(encoded))) return nil }, diff --git a/server/export_test.go b/server/export_test.go index d48b99ebec76..b9def353d1d7 100644 --- a/server/export_test.go +++ b/server/export_test.go @@ -116,7 +116,6 @@ func TestExportCmd_Height(t *testing.T) { require.Equal(t, tc.expHeight, exportedGenDoc.InitialHeight) }) } - } func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *tmtypes.GenesisDoc, *cobra.Command) { @@ -126,7 +125,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t t.Fatalf("error creating config folder: %s", err) } - logger, _ := log.NewDefaultLogger("plain", "info", false) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) db := dbm.NewMemDB() encCfg := simapp.MakeTestEncodingConfig() app := simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, tempDir, 0, encCfg, simapp.EmptyAppOptions{}) @@ -180,7 +179,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t } func createConfigFolder(dir string) error { - return os.Mkdir(path.Join(dir, "config"), 0700) + return os.Mkdir(path.Join(dir, "config"), 0o700) } func saveGenesisFile(genDoc *tmtypes.GenesisDoc, dir string) error { diff --git a/server/grpc/grpc_web_test.go b/server/grpc/grpc_web_test.go index 37202fdfabbe..384b06453bad 100644 --- a/server/grpc/grpc_web_test.go +++ b/server/grpc/grpc_web_test.go @@ -195,7 +195,9 @@ func (s *GRPCWebTestSuite) makeGrpcRequest( if err != nil { return nil, Trailer{}, nil, err } - defer resp.Body.Close() + defer func() { + _ = resp.Body.Close() + }() contents, err := io.ReadAll(resp.Body) if err != nil { return nil, Trailer{}, nil, err diff --git a/server/grpc/server.go b/server/grpc/server.go index ae96ac647ff4..78a8e1955af5 100644 --- a/server/grpc/server.go +++ b/server/grpc/server.go @@ -2,13 +2,14 @@ package grpc import ( "fmt" - "github.com/cosmos/cosmos-sdk/codec" "net" "time" "google.golang.org/grpc" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/server/grpc/gogoreflection" reflection "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1" "github.com/cosmos/cosmos-sdk/server/types" @@ -16,14 +17,28 @@ import ( ) // StartGRPCServer starts a gRPC server on the given address. -func StartGRPCServer(clientCtx client.Context, app types.Application, address string) (*grpc.Server, error) { +func StartGRPCServer(clientCtx client.Context, app types.Application, cfg config.GRPCConfig) (*grpc.Server, error) { + maxSendMsgSize := cfg.MaxSendMsgSize + if maxSendMsgSize == 0 { + maxSendMsgSize = config.DefaultGRPCMaxSendMsgSize + } + + maxRecvMsgSize := cfg.MaxRecvMsgSize + if maxRecvMsgSize == 0 { + maxRecvMsgSize = config.DefaultGRPCMaxRecvMsgSize + } + grpcSrv := grpc.NewServer( grpc.ForceServerCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), + grpc.MaxSendMsgSize(maxSendMsgSize), + grpc.MaxRecvMsgSize(maxRecvMsgSize), ) app.RegisterGRPCServer(grpcSrv) - // reflection allows consumers to build dynamic clients that can write - // to any cosmos-sdk application without relying on application packages at compile time + + // Reflection allows consumers to build dynamic clients that can write to any + // Cosmos SDK application without relying on application packages at compile + // time. err := reflection.Register(grpcSrv, reflection.Config{ SigningModes: func() map[string]int32 { modes := make(map[string]int32, len(clientCtx.TxConfig.SignModeHandler().Modes())) @@ -39,10 +54,12 @@ func StartGRPCServer(clientCtx client.Context, app types.Application, address st if err != nil { return nil, err } + // Reflection allows external clients to see what services and methods // the gRPC server exposes. gogoreflection.Register(grpcSrv) - listener, err := net.Listen("tcp", address) + + listener, err := net.Listen("tcp", cfg.Address) if err != nil { return nil, err } @@ -58,7 +75,9 @@ func StartGRPCServer(clientCtx client.Context, app types.Application, address st select { case err := <-errCh: return nil, err - case <-time.After(types.ServerStartTime): // assume server started successfully + + case <-time.After(types.ServerStartTime): + // assume server started successfully return grpcSrv, nil } } diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 082399425306..5655d700c684 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -6,10 +6,11 @@ package grpc_test import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/codec" "testing" "time" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/jhump/protoreflect/grpcreflect" "github.com/stretchr/testify/require" diff --git a/server/mock/app.go b/server/mock/app.go index 9fd4d72f480e..b059d62e0e53 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -6,36 +6,22 @@ import ( "fmt" "path/filepath" + "github.com/tendermint/tendermint/types" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/simapp" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" ) -func testTxHandler(options middleware.TxHandlerOptions) tx.Handler { - return middleware.ComposeMiddlewares( - middleware.NewRunMsgsTxHandler(options.MsgServiceRouter, options.LegacyRouter), - middleware.NewTxDecoderMiddleware(options.TxDecoder), - middleware.GasTxMiddleware, - middleware.RecoveryTxMiddleware, - middleware.NewIndexEventsTxMiddleware(options.IndexEvents), - ) -} - // NewApp creates a simple mock kvstore app for testing. It should work // similar to a real app. Make sure rootDir is empty before running the test, // in order to guarantee consistent results func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { - db, err := dbm.NewDB("mock", dbm.MemDBBackend, filepath.Join(rootDir, "data")) + db, err := sdk.NewLevelDB("mock", filepath.Join(rootDir, "data")) if err != nil { return nil, err } @@ -44,7 +30,7 @@ func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { capKeyMainStore := sdk.NewKVStoreKey("main") // Create BaseApp. - baseApp := bam.NewBaseApp("kvstore", logger, db) + baseApp := bam.NewBaseApp("kvstore", logger, db, decodeTx) // Set mounts for BaseApp's MultiStore. baseApp.MountStores(capKeyMainStore) @@ -52,19 +38,7 @@ func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { baseApp.SetInitChainer(InitChainer(capKeyMainStore)) // Set a Route. - encCfg := simapp.MakeTestEncodingConfig() - legacyRouter := middleware.NewLegacyRouter() - // We're adding a test legacy route here, which accesses the kvstore - // and simply sets the Msg's key/value pair in the kvstore. - legacyRouter.AddRoute(sdk.NewRoute("kvstore", KVStoreHandler(capKeyMainStore))) - txHandler := testTxHandler( - middleware.TxHandlerOptions{ - LegacyRouter: legacyRouter, - MsgServiceRouter: middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry), - TxDecoder: decodeTx, - }, - ) - baseApp.SetTxHandler(txHandler) + baseApp.Router().AddRoute(sdk.NewRoute("kvstore", KVStoreHandler(capKeyMainStore))) // Load latest version. if err := baseApp.LoadLatestVersion(); err != nil { @@ -78,7 +52,7 @@ func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { // them to the db func KVStoreHandler(storeKey storetypes.StoreKey) sdk.Handler { return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - dTx, ok := msg.(*kvstoreTx) + dTx, ok := msg.(kvstoreTx) if !ok { return nil, errors.New("KVStoreHandler should only receive kvstoreTx") } @@ -90,14 +64,8 @@ func KVStoreHandler(storeKey storetypes.StoreKey) sdk.Handler { store := ctx.KVStore(storeKey) store.Set(key, value) - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - return &sdk.Result{ - Log: fmt.Sprintf("set %s=%s", key, value), - MsgResponses: []*codectypes.Any{any}, + Log: fmt.Sprintf("set %s=%s", key, value), }, nil } } @@ -136,8 +104,7 @@ func InitChainer(key storetypes.StoreKey) func(sdk.Context, abci.RequestInitChai // AppGenState can be passed into InitCmd, returns a static string of a few // key-values that can be parsed by InitChainer -func AppGenState(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) (appState json. - RawMessage, err error) { +func AppGenState(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) (appState json.RawMessage, err error) { appState = json.RawMessage(`{ "values": [ { @@ -154,8 +121,7 @@ func AppGenState(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) } // AppGenStateEmpty returns an empty transaction state for mocking. -func AppGenStateEmpty(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) ( - appState json.RawMessage, err error) { +func AppGenStateEmpty(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) (appState json.RawMessage, err error) { appState = json.RawMessage(``) return } diff --git a/server/mock/app_test.go b/server/mock/app_test.go index 2741925df026..94362c887068 100644 --- a/server/mock/app_test.go +++ b/server/mock/app_test.go @@ -24,7 +24,7 @@ func TestInitApp(t *testing.T) { appState, err := AppGenState(nil, types.GenesisDoc{}, nil) require.NoError(t, err) - //TODO test validators in the init chain? + // TODO test validators in the init chain? req := abci.RequestInitChain{ AppStateBytes: appState, } diff --git a/server/mock/store.go b/server/mock/store.go index 37852de711eb..ebc4caaa421f 100644 --- a/server/mock/store.go +++ b/server/mock/store.go @@ -6,6 +6,7 @@ import ( protoio "github.com/gogo/protobuf/io" dbm "github.com/tendermint/tm-db" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -65,11 +66,11 @@ func (ms multiStore) LastCommitID() storetypes.CommitID { panic("not implemented") } -func (ms multiStore) SetPruning(opts sdk.PruningOptions) { +func (ms multiStore) SetPruning(opts pruningtypes.PruningOptions) { panic("not implemented") } -func (ms multiStore) GetPruning() sdk.PruningOptions { +func (ms multiStore) GetPruning() pruningtypes.PruningOptions { panic("not implemented") } @@ -113,9 +114,18 @@ func (ms multiStore) GetStoreType() storetypes.StoreType { panic("not implemented") } +func (ms multiStore) PruneSnapshotHeight(height int64) { + panic("not implemented") +} + +func (ms multiStore) SetSnapshotInterval(snapshotInterval uint64) { + panic("not implemented") +} + func (ms multiStore) SetInterBlockCache(_ sdk.MultiStorePersistentCache) { panic("not implemented") } + func (ms multiStore) SetIAVLCacheSize(size int) { panic("not implemented") } diff --git a/server/mock/tx.go b/server/mock/tx.go index bfa6e6ad6b4b..0cb79c28986f 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -4,16 +4,12 @@ package mock import ( "bytes" "fmt" - "math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" ) -// kvstoreTx defines a tx for mock purposes. The `key` and `value` fields will -// set those bytes in the kvstore, and the `bytes` field represents its -// GetSignBytes value. +// An sdk.Tx which is its own sdk.Msg. type kvstoreTx struct { key []byte value []byte @@ -21,13 +17,12 @@ type kvstoreTx struct { } // dummy implementation of proto.Message -func (msg *kvstoreTx) Reset() {} -func (msg *kvstoreTx) String() string { return "TODO" } -func (msg *kvstoreTx) ProtoMessage() {} +func (msg kvstoreTx) Reset() {} +func (msg kvstoreTx) String() string { return "TODO" } +func (msg kvstoreTx) ProtoMessage() {} -var _ sdk.Tx = &kvstoreTx{} -var _ sdk.Msg = &kvstoreTx{} -var _ middleware.GasTx = &kvstoreTx{} +var _ sdk.Tx = kvstoreTx{} +var _ sdk.Msg = kvstoreTx{} func NewTx(key, value string) kvstoreTx { bytes := fmt.Sprintf("%s=%s", key, value) @@ -46,7 +41,7 @@ func (tx kvstoreTx) Type() string { return "kvstore_tx" } -func (tx *kvstoreTx) GetMsgs() []sdk.Msg { +func (tx kvstoreTx) GetMsgs() []sdk.Msg { return []sdk.Msg{tx} } @@ -67,10 +62,6 @@ func (tx kvstoreTx) GetSigners() []sdk.AccAddress { return nil } -func (tx kvstoreTx) GetGas() uint64 { - return math.MaxUint64 -} - // takes raw transaction bytes and decodes them into an sdk.Tx. An sdk.Tx has // all the signatures and can be used to authenticate. func decodeTx(txBytes []byte) (sdk.Tx, error) { @@ -79,10 +70,10 @@ func decodeTx(txBytes []byte) (sdk.Tx, error) { split := bytes.Split(txBytes, []byte("=")) if len(split) == 1 { k := split[0] - tx = &kvstoreTx{k, k, txBytes} + tx = kvstoreTx{k, k, txBytes} } else if len(split) == 2 { k, v := split[0], split[1] - tx = &kvstoreTx{k, v, txBytes} + tx = kvstoreTx{k, v, txBytes} } else { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "too many '='") } diff --git a/server/pruning.go b/server/pruning.go index fb2ba34e8f87..2e21579032c1 100644 --- a/server/pruning.go +++ b/server/pruning.go @@ -6,23 +6,22 @@ import ( "github.com/spf13/cast" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" ) // GetPruningOptionsFromFlags parses command flags and returns the correct // PruningOptions. If a pruning strategy is provided, that will be parsed and // returned, otherwise, it is assumed custom pruning options are provided. -func GetPruningOptionsFromFlags(appOpts types.AppOptions) (storetypes.PruningOptions, error) { +func GetPruningOptionsFromFlags(appOpts types.AppOptions) (pruningtypes.PruningOptions, error) { strategy := strings.ToLower(cast.ToString(appOpts.Get(FlagPruning))) switch strategy { - case storetypes.PruningOptionDefault, storetypes.PruningOptionNothing, storetypes.PruningOptionEverything: - return storetypes.NewPruningOptionsFromString(strategy), nil + case pruningtypes.PruningOptionDefault, pruningtypes.PruningOptionNothing, pruningtypes.PruningOptionEverything: + return pruningtypes.NewPruningOptionsFromString(strategy), nil - case storetypes.PruningOptionCustom: - opts := storetypes.NewPruningOptions( + case pruningtypes.PruningOptionCustom: + opts := pruningtypes.NewCustomPruningOptions( cast.ToUint64(appOpts.Get(FlagPruningKeepRecent)), cast.ToUint64(appOpts.Get(FlagPruningInterval)), ) @@ -34,6 +33,6 @@ func GetPruningOptionsFromFlags(appOpts types.AppOptions) (storetypes.PruningOpt return opts, nil default: - return store.PruningOptions{}, fmt.Errorf("unknown pruning strategy %s", strategy) + return pruningtypes.PruningOptions{}, fmt.Errorf("unknown pruning strategy %s", strategy) } } diff --git a/server/pruning_test.go b/server/pruning_test.go index 8b4af74cad8b..2d7bc976d92e 100644 --- a/server/pruning_test.go +++ b/server/pruning_test.go @@ -6,48 +6,45 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "github.com/cosmos/cosmos-sdk/store/types" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" ) func TestGetPruningOptionsFromFlags(t *testing.T) { tests := []struct { name string initParams func() *viper.Viper - expectedOptions types.PruningOptions + expectedOptions pruningtypes.PruningOptions wantErr bool }{ { name: FlagPruning, initParams: func() *viper.Viper { v := viper.New() - v.Set(FlagPruning, types.PruningOptionNothing) + v.Set(FlagPruning, pruningtypes.PruningOptionNothing) return v }, - expectedOptions: types.PruneNothing, + expectedOptions: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), }, { name: "custom pruning options", initParams: func() *viper.Viper { v := viper.New() - v.Set(FlagPruning, types.PruningOptionCustom) + v.Set(FlagPruning, pruningtypes.PruningOptionCustom) v.Set(FlagPruningKeepRecent, 1234) v.Set(FlagPruningInterval, 10) return v }, - expectedOptions: types.PruningOptions{ - KeepRecent: 1234, - Interval: 10, - }, + expectedOptions: pruningtypes.NewCustomPruningOptions(1234, 10), }, { - name: types.PruningOptionDefault, + name: pruningtypes.PruningOptionDefault, initParams: func() *viper.Viper { v := viper.New() - v.Set(FlagPruning, types.PruningOptionDefault) + v.Set(FlagPruning, pruningtypes.PruningOptionDefault) return v }, - expectedOptions: types.PruneDefault, + expectedOptions: pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), }, } @@ -56,7 +53,7 @@ func TestGetPruningOptionsFromFlags(t *testing.T) { t.Run(tt.name, func(j *testing.T) { viper.Reset() - viper.SetDefault(FlagPruning, types.PruningOptionDefault) + viper.SetDefault(FlagPruning, pruningtypes.PruningOptionDefault) v := tt.initParams() opts, err := GetPruningOptionsFromFlags(v) diff --git a/server/rollback.go b/server/rollback.go index 1413967d54b7..e99088dd73cc 100644 --- a/server/rollback.go +++ b/server/rollback.go @@ -18,7 +18,7 @@ func NewRollbackCmd(defaultNodeHome string) *cobra.Command { A state rollback is performed to recover from an incorrect application state transition, when Tendermint has persisted an incorrect app hash and is thus unable to make progress. Rollback overwrites a state at height n with the state at height n - 1. -The application also roll back to height n - 1. No blocks are removed, so upon +The application also rolls back to height n - 1. No blocks are removed, so upon restarting Tendermint the transactions in block n will be re-executed against the application. `, @@ -36,7 +36,7 @@ application. return fmt.Errorf("failed to rollback tendermint state: %w", err) } // rollback the multistore - cms := rootmulti.NewStore(db) + cms := rootmulti.NewStore(db, ctx.Logger) cms.RollbackToVersion(height) fmt.Printf("Rolled back state to height %d and hash %X", height, hash) diff --git a/server/rosetta/client_online.go b/server/rosetta/client_online.go index dc46e187e8cc..07dea20e76e1 100644 --- a/server/rosetta/client_online.go +++ b/server/rosetta/client_online.go @@ -11,27 +11,33 @@ import ( "strconv" "time" - rosettatypes "github.com/coinbase/rosetta-sdk-go/types" + "github.com/cosmos/cosmos-sdk/version" + abcitypes "github.com/tendermint/tendermint/abci/types" - tmrpc "github.com/tendermint/tendermint/rpc/client" + + rosettatypes "github.com/coinbase/rosetta-sdk-go/types" + "google.golang.org/grpc/metadata" + "github.com/tendermint/tendermint/rpc/client/http" "google.golang.org/grpc" - "google.golang.org/grpc/metadata" crgerrs "github.com/cosmos/cosmos-sdk/server/rosetta/lib/errors" crgtypes "github.com/cosmos/cosmos-sdk/server/rosetta/lib/types" + sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - "github.com/cosmos/cosmos-sdk/version" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" auth "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" + + tmrpc "github.com/tendermint/tendermint/rpc/client" ) // interface assertion var _ crgtypes.Client = (*Client)(nil) -const defaultNodeTimeout = 15 * time.Second +const defaultNodeTimeout = time.Minute +const tmWebsocketPath = "/websocket" // Client implements a single network client to interact with cosmos based chains type Client struct { @@ -98,7 +104,7 @@ func (c *Client) Bootstrap() error { return err } - tmRPC, err := http.New(c.config.TendermintRPC) + tmRPC, err := http.New(c.config.TendermintRPC, tmWebsocketPath) if err != nil { return err } @@ -121,6 +127,14 @@ func (c *Client) Ready() error { if err != nil { return err } + + // to prevent timeout of reading genesis block + var height int64 = -1 + _, err = c.BlockByHeight(ctx, &height) + if err != nil { + return err + } + _, err = c.bank.TotalSupply(ctx, &bank.QueryTotalSupplyRequest{}) if err != nil { return err @@ -395,6 +409,27 @@ func (c *Client) ConstructionMetadataFromOptions(ctx context.Context, options ma return nil, err } + // if default fees suggestion is enabled and gas limit or price is unset, use default + if c.config.EnableFeeSuggestion { + if constructionOptions.GasLimit <= 0 { + constructionOptions.GasLimit = uint64(c.config.GasToSuggest) + } + if constructionOptions.GasPrice == "" { + denom := c.config.DenomToSuggest + constructionOptions.GasPrice = c.config.GasPrices.AmountOf(denom).String() + denom + } + } + + if constructionOptions.GasLimit > 0 && constructionOptions.GasPrice != "" { + gasPrice, err := sdk.ParseDecCoin(constructionOptions.GasPrice) + if err != nil { + return nil, err + } + if !gasPrice.IsPositive() { + return nil, crgerrs.WrapError(crgerrs.ErrBadArgument, "gas price must be positive") + } + } + signersData := make([]*SignerData, len(constructionOptions.ExpectedSigners)) for i, signer := range constructionOptions.ExpectedSigners { diff --git a/server/rosetta/config.go b/server/rosetta/config.go index dac86e25de93..a6492cd1f193 100644 --- a/server/rosetta/config.go +++ b/server/rosetta/config.go @@ -10,8 +10,10 @@ import ( crg "github.com/cosmos/cosmos-sdk/server/rosetta/lib/server" + clientflags "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) // configuration defaults constants @@ -30,17 +32,27 @@ const ( DefaultNetwork = "network" // DefaultOffline defines the default offline value DefaultOffline = false + // DefaultEnableFeeSuggestion indicates to use fee suggestion if `construction/metadata` is called without gas limit and price + DefaultEnableFeeSuggestion = false + // DenomToSuggest defines the default denom for fee suggestion + DenomToSuggest = "uatom" + // DefaultPrices defines the default list of prices to suggest + DefaultPrices = "1uatom,1stake" ) // configuration flags const ( - FlagBlockchain = "blockchain" - FlagNetwork = "network" - FlagTendermintEndpoint = "tendermint" - FlagGRPCEndpoint = "grpc" - FlagAddr = "addr" - FlagRetries = "retries" - FlagOffline = "offline" + FlagBlockchain = "blockchain" + FlagNetwork = "network" + FlagTendermintEndpoint = "tendermint" + FlagGRPCEndpoint = "grpc" + FlagAddr = "addr" + FlagRetries = "retries" + FlagOffline = "offline" + FlagEnableFeeSuggestion = "enable-fee-suggestion" + FlagGasToSuggest = "gas-to-suggest" + FlagDenomToSuggest = "denom-to-suggest" + FlagPricesToSuggest = "prices-to-suggest" ) // Config defines the configuration of the rosetta server @@ -65,6 +77,14 @@ type Config struct { Retries int // Offline defines if the server must be run in offline mode Offline bool + // EnableFeeSuggestion indicates to use fee suggestion when `construction/metadata` is called without gas limit and price + EnableFeeSuggestion bool + // GasToSuggest defines the gas limit for fee suggestion + GasToSuggest int + // DenomToSuggest defines the default denom for fee suggestion + DenomToSuggest string + // GasPrices defines the gas prices for fee suggestion + GasPrices sdk.DecCoins // Codec overrides the default data and construction api client codecs Codec *codec.ProtoCodec // InterfaceRegistry overrides the default data and construction api interface registry @@ -99,8 +119,20 @@ func (c *Config) validate() error { if c.Network == "" { return fmt.Errorf("network not provided") } - if c.Offline { - return fmt.Errorf("offline mode is not supported for stargate implementation due to how sigv2 works") + if c.GasToSuggest <= 0 { + return fmt.Errorf("gas to suggest must be positive") + } + if c.EnableFeeSuggestion { + found := false + for i := 0; i < c.GasPrices.Len(); i++ { + if c.GasPrices.GetDenomByIndex(i) == c.DenomToSuggest { + found = true + break + } + } + if !found { + return fmt.Errorf("default suggest denom is not found in prices to suggest") + } } // these are optional but it must be online @@ -153,14 +185,43 @@ func FromFlags(flags *pflag.FlagSet) (*Config, error) { if err != nil { return nil, err } + enableDefaultFeeSuggestion, err := flags.GetBool(FlagEnableFeeSuggestion) + if err != nil { + return nil, err + } + gasToSuggest, err := flags.GetInt(FlagGasToSuggest) + if err != nil { + return nil, err + } + denomToSuggest, err := flags.GetString(FlagDenomToSuggest) + if err != nil { + return nil, err + } + + var prices sdk.DecCoins + if enableDefaultFeeSuggestion { + pricesToSuggest, err := flags.GetString(FlagPricesToSuggest) + if err != nil { + return nil, err + } + prices, err = sdk.ParseDecCoins(pricesToSuggest) + if err != nil { + return nil, err + } + } + conf := &Config{ - Blockchain: blockchain, - Network: network, - TendermintRPC: tendermintRPC, - GRPCEndpoint: gRPCEndpoint, - Addr: addr, - Retries: retries, - Offline: offline, + Blockchain: blockchain, + Network: network, + TendermintRPC: tendermintRPC, + GRPCEndpoint: gRPCEndpoint, + Addr: addr, + Retries: retries, + Offline: offline, + EnableFeeSuggestion: enableDefaultFeeSuggestion, + GasToSuggest: gasToSuggest, + DenomToSuggest: denomToSuggest, + GasPrices: prices, } err = conf.validate() if err != nil { @@ -201,4 +262,8 @@ func SetFlags(flags *pflag.FlagSet) { flags.String(FlagAddr, DefaultAddr, "the address rosetta will bind to") flags.Int(FlagRetries, DefaultRetries, "the number of retries that will be done before quitting") flags.Bool(FlagOffline, DefaultOffline, "run rosetta only with construction API") + flags.Bool(FlagEnableFeeSuggestion, DefaultEnableFeeSuggestion, "enable default fee suggestion") + flags.Int(FlagGasToSuggest, clientflags.DefaultGasLimit, "default gas for fee suggestion") + flags.String(FlagDenomToSuggest, DenomToSuggest, "default denom for fee suggestion") + flags.String(FlagPricesToSuggest, DefaultPrices, "default prices for fee suggestion") } diff --git a/server/rosetta/converter.go b/server/rosetta/converter.go index 6782073aaff6..314674498218 100644 --- a/server/rosetta/converter.go +++ b/server/rosetta/converter.go @@ -10,7 +10,7 @@ import ( rosettatypes "github.com/coinbase/rosetta-sdk-go/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" - tmcoretypes "github.com/tendermint/tendermint/rpc/coretypes" + tmcoretypes "github.com/tendermint/tendermint/rpc/core/types" tmtypes "github.com/tendermint/tendermint/types" sdkclient "github.com/cosmos/cosmos-sdk/client" @@ -206,7 +206,6 @@ func (c converter) UnsignedTx(ops []*rosettatypes.Operation) (tx authsigning.Tx, } return builder.GetTx(), nil - } // Msg unmarshals the rosetta metadata to the given sdk.Msg @@ -297,7 +296,7 @@ func (c converter) Tx(rawTx tmtypes.Tx, txResult *abci.ResponseDeliverTx) (*rose var balanceOps []*rosettatypes.Operation // tx result might be nil, in case we're querying an unconfirmed tx from the mempool if txResult != nil { - balanceOps = c.BalanceOps(status, txResult.Events) + balanceOps = c.BalanceOps(StatusTxSuccess, txResult.Events) // force set to success because no events for failed tx } // now normalize indexes @@ -328,7 +327,6 @@ func (c converter) BalanceOps(status string, events []abci.Event) []*rosettatype // has changed and rosetta needs to reflect those changes too. // The balance operations are multiple, one for each denom. func sdkEventToBalanceOperations(status string, event abci.Event) (operations []*rosettatypes.Operation, isBalanceEvent bool) { - var ( accountIdentifier string coinChange sdk.Coins @@ -339,11 +337,8 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations [] default: return nil, false case banktypes.EventTypeCoinSpent: - spender, err := sdk.AccAddressFromBech32(event.Attributes[0].Value) - if err != nil { - panic(err) - } - coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value) + spender := sdk.MustAccAddressFromBech32(string(event.Attributes[0].Value)) + coins, err := sdk.ParseCoinsNormalized(string(event.Attributes[1].Value)) if err != nil { panic(err) } @@ -353,11 +348,8 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations [] accountIdentifier = spender.String() case banktypes.EventTypeCoinReceived: - receiver, err := sdk.AccAddressFromBech32(event.Attributes[0].Value) - if err != nil { - panic(err) - } - coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value) + receiver := sdk.MustAccAddressFromBech32(string(event.Attributes[0].Value)) + coins, err := sdk.ParseCoinsNormalized(string(event.Attributes[1].Value)) if err != nil { panic(err) } @@ -369,7 +361,7 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations [] // rosetta does not have the concept of burning coins, so we need to mock // the burn as a send to an address that cannot be resolved to anything case banktypes.EventTypeCoinBurn: - coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value) + coins, err := sdk.ParseCoinsNormalized(string(event.Attributes[1].Value)) if err != nil { panic(err) } @@ -510,7 +502,7 @@ func (c converter) HashToTxType(hashBytes []byte) (txType TransactionType, realH // StatusToSyncStatus converts a tendermint status to rosetta sync status func (c converter) SyncStatus(status *tmcoretypes.ResultStatus) *rosettatypes.SyncStatus { // determine sync status - var stage = StatusPeerSynced + stage := StatusPeerSynced if status.SyncInfo.CatchingUp { stage = StatusPeerSyncing } @@ -565,9 +557,9 @@ func (c converter) Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer { for i, peer := range peers { converted[i] = &rosettatypes.Peer{ - PeerID: string(peer.ID), + PeerID: string(peer.NodeInfo.Moniker), Metadata: map[string]interface{}{ - "addr": peer.URL, + "addr": peer.NodeInfo.ListenAddr, }, } } @@ -578,7 +570,6 @@ func (c converter) Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer { // OpsAndSigners takes transactions bytes and returns the operation, is signed is true it will return // the account identifiers which have signed the transaction func (c converter) OpsAndSigners(txBytes []byte) (ops []*rosettatypes.Operation, signers []*rosettatypes.AccountIdentifier, err error) { - rosTx, err := c.ToRosetta().Tx(txBytes, nil) if err != nil { return nil, nil, err @@ -672,7 +663,6 @@ func (c converter) PubKey(pubKey *rosettatypes.PublicKey) (cryptotypes.PubKey, e // SigningComponents takes a sdk tx and construction metadata and returns signable components func (c converter) SigningComponents(tx authsigning.Tx, metadata *ConstructionMetadata, rosPubKeys []*rosettatypes.PublicKey) (txBytes []byte, payloadsToSign []*rosettatypes.SigningPayload, err error) { - // verify metadata correctness feeAmount, err := sdk.ParseCoinsNormalized(metadata.GasPrice) if err != nil { diff --git a/server/rosetta/converter_test.go b/server/rosetta/converter_test.go index 1177d33405df..4fecf99dc51b 100644 --- a/server/rosetta/converter_test.go +++ b/server/rosetta/converter_test.go @@ -92,7 +92,6 @@ func (s *ConverterTestSuite) TestFromRosettaOpsToTxSuccess() { s.Require().Equal(getMsgs[0], msg1) s.Require().Equal(getMsgs[1], msg2) - } func (s *ConverterTestSuite) TestFromRosettaOpsToTxErrors() { @@ -114,9 +113,7 @@ func (s *ConverterTestSuite) TestFromRosettaOpsToTxErrors() { _, err := s.c.ToSDK().UnsignedTx([]*rosettatypes.Operation{op}) s.Require().ErrorIs(err, crgerrs.ErrBadArgument) - }) - } func (s *ConverterTestSuite) TestMsgToMetaMetaToMsg() { @@ -137,7 +134,6 @@ func (s *ConverterTestSuite) TestMsgToMetaMetaToMsg() { } func (s *ConverterTestSuite) TestSignedTx() { - s.Run("success", func() { const payloadsJSON = `[{"hex_bytes":"82ccce81a3e4a7272249f0e25c3037a316ee2acce76eb0c25db00ef6634a4d57303b2420edfdb4c9a635ad8851fe5c7a9379b7bc2baadc7d74f7e76ac97459b5","signing_payload":{"address":"cosmos147klh7th5jkjy3aajsj2rqvhtvh9mfde37wq5g","hex_bytes":"ed574d84b095250280de38bf8c254e4a1f8755e5bd300b1f6ca2671688136ecc","account_identifier":{"address":"cosmos147klh7th5jkjy3aajsj2rqvhtvh9mfde37wq5g"},"signature_type":"ecdsa"},"public_key":{"hex_bytes":"034c92046950c876f4a5cb6c7797d6eeb9ef80d67ced4d45fb62b1e859240ba9ad","curve_type":"secp256k1"},"signature_type":"ecdsa"}]` const expectedSignedTxHex = "0a8e010a8b010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126b0a2d636f736d6f733134376b6c68377468356a6b6a793361616a736a3272717668747668396d666465333777713567122d636f736d6f73316d6e7670386c786b616679346c787777617175356561653764787630647a36687767797436331a0b0a057374616b651202313612620a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034c92046950c876f4a5cb6c7797d6eeb9ef80d67ced4d45fb62b1e859240ba9ad12040a02087f12100a0a0a057374616b651201311090a10f1a4082ccce81a3e4a7272249f0e25c3037a316ee2acce76eb0c25db00ef6634a4d57303b2420edfdb4c9a635ad8851fe5c7a9379b7bc2baadc7d74f7e76ac97459b5" @@ -291,7 +287,6 @@ func (s *ConverterTestSuite) TestSigningComponents() { }) s.Require().NoError(err) }) - } func (s *ConverterTestSuite) TestBalanceOps() { diff --git a/server/rosetta/lib/errors/errors_test.go b/server/rosetta/lib/errors/errors_test.go index 6efe446f5b2c..84be297e0ba1 100644 --- a/server/rosetta/lib/errors/errors_test.go +++ b/server/rosetta/lib/errors/errors_test.go @@ -30,7 +30,6 @@ func TestRegisterError(t *testing.T) { // add a new error on a sealed registry error = RegisterError(1024, "bytes", false, "bytes") assert.NotNil(t, error) - } func TestError_Error(t *testing.T) { @@ -58,12 +57,12 @@ func TestToRosetta(t *testing.T) { assert.NotNil(t, ToRosetta(&MyError{})) } -type MyError struct { -} +type MyError struct{} func (e *MyError) Error() string { return "" } + func (e *MyError) Is(err error) bool { return true } diff --git a/server/rosetta/lib/internal/service/construction.go b/server/rosetta/lib/internal/service/construction.go index 4be6e9461241..6f2d0f85da6e 100644 --- a/server/rosetta/lib/internal/service/construction.go +++ b/server/rosetta/lib/internal/service/construction.go @@ -4,8 +4,11 @@ import ( "context" "crypto/sha256" "encoding/hex" + "strconv" "strings" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/coinbase/rosetta-sdk-go/types" "github.com/cosmos/cosmos-sdk/server/rosetta/lib/errors" @@ -69,9 +72,43 @@ func (on OnlineNetwork) ConstructionMetadata(ctx context.Context, request *types return nil, errors.ToRosetta(err) } - return &types.ConstructionMetadataResponse{ + response := &types.ConstructionMetadataResponse{ Metadata: metadata, - }, nil + } + + if metadata["gas_price"] != nil && metadata["gas_limit"] != nil { + gasPrice, ok := metadata["gas_price"].(string) + if !ok { + return nil, errors.ToRosetta(errors.WrapError(errors.ErrBadArgument, "invalid gas_price")) + } + if gasPrice == "" { // gas_price is unset. skip fee suggestion + return response, nil + } + price, err := sdk.ParseDecCoin(gasPrice) + if err != nil { + return nil, errors.ToRosetta(err) + } + + gasLimit, ok := metadata["gas_limit"].(float64) + if !ok { + return nil, errors.ToRosetta(errors.WrapError(errors.ErrBadArgument, "invalid gas_limit")) + } + if gasLimit == 0 { // gas_limit is unset. skip fee suggestion + return response, nil + } + gas := sdk.NewIntFromUint64(uint64(gasLimit)) + + suggestedFee := types.Amount{ + Value: strconv.FormatInt(price.Amount.MulInt64(gas.Int64()).Ceil().TruncateInt64(), 10), + Currency: &(types.Currency{ + Symbol: price.Denom, + Decimals: 0, + }), + } + response.SuggestedFee = []*types.Amount{&suggestedFee} + } + + return response, nil } // ConstructionParse Parse is called on both unsigned and signed transactions to understand the @@ -92,7 +129,6 @@ func (on OnlineNetwork) ConstructionParse(ctx context.Context, request *types.Co AccountIdentifierSigners: signers, Metadata: nil, }, nil - } // ConstructionPayloads Payloads is called with an array of operations and the response from diff --git a/server/rosetta/lib/internal/service/data.go b/server/rosetta/lib/internal/service/data.go index cda420487202..c814ff4c7289 100644 --- a/server/rosetta/lib/internal/service/data.go +++ b/server/rosetta/lib/internal/service/data.go @@ -4,7 +4,6 @@ import ( "context" "github.com/coinbase/rosetta-sdk-go/types" - "github.com/cosmos/cosmos-sdk/server/rosetta/lib/errors" crgtypes "github.com/cosmos/cosmos-sdk/server/rosetta/lib/types" ) @@ -56,9 +55,14 @@ func (on OnlineNetwork) Block(ctx context.Context, request *types.BlockRequest) blockResponse crgtypes.BlockTransactionsResponse err error ) - // block identifier is assumed not to be nil as rosetta will do this check for us - // check if we have to query via hash or block number + + // When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. + // If neither property is specified, it is assumed that the client is making a request at the current block. switch { + case request.BlockIdentifier == nil: // unlike AccountBalance(), BlockIdentifer is mandatory by spec 1.4.10. + err := errors.WrapError(errors.ErrBadArgument, "block identifier needs to be specified") + return nil, errors.ToRosetta(err) + case request.BlockIdentifier.Hash != nil: blockResponse, err = on.client.BlockTransactionsByHash(ctx, *request.BlockIdentifier.Hash) if err != nil { @@ -69,8 +73,23 @@ func (on OnlineNetwork) Block(ctx context.Context, request *types.BlockRequest) if err != nil { return nil, errors.ToRosetta(err) } + default: - err := errors.WrapError(errors.ErrBadArgument, "at least one of hash or index needs to be specified") + // both empty + blockResponse, err = on.client.BlockTransactionsByHeight(ctx, nil) + if err != nil { + return nil, errors.ToRosetta(err) + } + } + + // Both of index and hash can be specified in reuqest, so make sure they are not mismatching. + if request.BlockIdentifier.Index != nil && *request.BlockIdentifier.Index != blockResponse.Block.Index { + err := errors.WrapError(errors.ErrBadArgument, "mismatching index") + return nil, errors.ToRosetta(err) + } + + if request.BlockIdentifier.Hash != nil && *request.BlockIdentifier.Hash != blockResponse.Block.Hash { + err := errors.WrapError(errors.ErrBadArgument, "mismatching hash") return nil, errors.ToRosetta(err) } diff --git a/server/rosetta/lib/server/server.go b/server/rosetta/lib/server/server.go index 1d82ce8a6ff5..238583103ae6 100644 --- a/server/rosetta/lib/server/server.go +++ b/server/rosetta/lib/server/server.go @@ -13,8 +13,10 @@ import ( crgtypes "github.com/cosmos/cosmos-sdk/server/rosetta/lib/types" ) -const DefaultRetries = 5 -const DefaultRetryWait = 5 * time.Second +const ( + DefaultRetries = 5 + DefaultRetryWait = 5 * time.Second +) // Settings define the rosetta server settings type Settings struct { @@ -55,9 +57,7 @@ func NewServer(settings Settings) (Server, error) { return Server{}, fmt.Errorf("cannot build asserter: %w", err) } - var ( - adapter crgtypes.API - ) + var adapter crgtypes.API switch settings.Offline { case true: adapter, err = newOfflineAdapter(settings) diff --git a/server/start.go b/server/start.go index f93ace066dd1..7be0cec68be0 100644 --- a/server/start.go +++ b/server/start.go @@ -11,27 +11,30 @@ import ( "time" "github.com/spf13/cobra" - abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/server" tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" tmos "github.com/tendermint/tendermint/libs/os" - tmservice "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/node" + "github.com/tendermint/tendermint/p2p" + pvm "github.com/tendermint/tendermint/privval" + "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/rpc/client/local" - tmtypes "github.com/tendermint/tendermint/types" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" + serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" "github.com/cosmos/cosmos-sdk/server/rosetta" crgserver "github.com/cosmos/cosmos-sdk/server/rosetta/lib/server" "github.com/cosmos/cosmos-sdk/server/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/telemetry" + sdktypes "github.com/cosmos/cosmos-sdk/types" ) const ( @@ -86,15 +89,15 @@ func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Comman Long: `Run the full node application with Tendermint in or out of process. By default, the application will run with Tendermint in process. -Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent' -and 'pruning-interval' together. +Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', and +'pruning-interval' together. For '--pruning' the options are as follows: default: the last 362880 states are kept, pruning at 10 block intervals nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -everything: all saved states will be deleted, storing only the current and previous state; pruning at 10 block intervals -custom: allow pruning options to be manually specified through 'pruning-keep-recent' and 'pruning-interval' +everything: 2 latest states will be kept; pruning at 10 block intervals. +custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' Node halting configurations exist in the form of two flags: '--halt-height' and '--halt-time'. During the ABCI Commit phase, the node will check if the current block height is greater than or equal to @@ -115,7 +118,9 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. // Bind flags to the Context's Viper so the app construction can set // options accordingly. - serverCtx.Viper.BindPFlags(cmd.Flags()) + if err := serverCtx.Viper.BindPFlags(cmd.Flags()); err != nil { + return err + } _, err := GetPruningOptionsFromFlags(serverCtx.Viper) return err @@ -157,15 +162,15 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. cmd.Flags().Bool(FlagInterBlockCache, true, "Enable inter-block caching") cmd.Flags().String(flagCPUProfile, "", "Enable CPU profiling and write to the provided file") cmd.Flags().Bool(FlagTrace, false, "Provide full stack traces for errors in ABCI Log") - cmd.Flags().String(FlagPruning, storetypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") + cmd.Flags().String(FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") cmd.Flags().Uint64(FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") cmd.Flags().Uint64(FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") cmd.Flags().Uint(FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") cmd.Flags().Bool(FlagAPIEnable, false, "Define if the API server should be enabled") - cmd.Flags().Bool(FlagAPISwagger, false, "Define if swagger documentation should automatically be registered (Note: api must also be enabled.)") - cmd.Flags().String(FlagAPIAddress, config.DefaultAPIAddress, "the API server address to listen on") + cmd.Flags().Bool(FlagAPISwagger, false, "Define if swagger documentation should automatically be registered (Note: the API must also be enabled)") + cmd.Flags().String(FlagAPIAddress, serverconfig.DefaultAPIAddress, "the API server address to listen on") cmd.Flags().Uint(FlagAPIMaxOpenConnections, 1000, "Define the number of maximum open connections") cmd.Flags().Uint(FlagRPCReadTimeout, 10, "Define the Tendermint RPC read timeout (in seconds)") cmd.Flags().Uint(FlagRPCWriteTimeout, 0, "Define the Tendermint RPC write timeout (in seconds)") @@ -174,10 +179,10 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. cmd.Flags().Bool(flagGRPCOnly, false, "Start the node in gRPC query only mode (no Tendermint process is started)") cmd.Flags().Bool(flagGRPCEnable, true, "Define if the gRPC server should be enabled") - cmd.Flags().String(flagGRPCAddress, config.DefaultGRPCAddress, "the gRPC server address to listen on") + cmd.Flags().String(flagGRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") - cmd.Flags().Bool(flagGRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") - cmd.Flags().String(flagGRPCWebAddress, config.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") + cmd.Flags().Bool(flagGRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled)") + cmd.Flags().String(flagGRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") cmd.Flags().Uint64(FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") cmd.Flags().Uint32(FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") @@ -204,6 +209,10 @@ func startStandAlone(ctx *Context, appCreator types.AppCreator) error { } app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper) + _, err = startTelemetry(serverconfig.GetConfig(ctx.Viper)) + if err != nil { + return err + } svr, err := server.NewServer(addr, transport, app) if err != nil { @@ -246,7 +255,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App cpuProfileCleanup = func() { ctx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) pprof.StopCPUProfile() - f.Close() + if err := f.Close(); err != nil { + ctx.Logger.Info("failed to close cpu-profile file", "profile", cpuProfile, "err", err.Error()) + } } } @@ -261,33 +272,44 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App return err } - config := config.GetConfig(ctx.Viper) + config := serverconfig.GetConfig(ctx.Viper) if err := config.ValidateBasic(); err != nil { return err } app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper) - genDoc, err := tmtypes.GenesisDocFromFile(cfg.GenesisFile()) + nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) if err != nil { return err } + genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) + var ( - tmNode tmservice.Service + tmNode *node.Node gRPCOnly = ctx.Viper.GetBool(flagGRPCOnly) ) + if gRPCOnly { ctx.Logger.Info("starting node in gRPC only mode; Tendermint is disabled") config.GRPC.Enable = true } else { ctx.Logger.Info("starting node with ABCI Tendermint in-process") - tmNode, err = node.New(cfg, ctx.Logger, abciclient.NewLocalCreator(app), genDoc) + tmNode, err = node.NewNode( + cfg, + pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), + nodeKey, + proxy.NewLocalClientCreator(app), + genDocProvider, + node.DefaultDBProvider, + node.DefaultMetricsProvider(cfg.Instrumentation), + ctx.Logger, + ) if err != nil { return err } - if err := tmNode.Start(); err != nil { return err } @@ -297,25 +319,20 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App // service if API or gRPC is enabled, and avoid doing so in the general // case, because it spawns a new local tendermint RPC client. if (config.API.Enable || config.GRPC.Enable) && tmNode != nil { - node, ok := tmNode.(local.NodeService) - if !ok { - return fmt.Errorf("unable to set node type; please try re-installing the binary") - } - - localNode, err := local.New(node) - if err != nil { - return err - } - - clientCtx = clientCtx.WithClient(localNode) + clientCtx = clientCtx.WithClient(local.New(tmNode)) app.RegisterTxService(clientCtx) app.RegisterTendermintService(clientCtx) } + metrics, err := startTelemetry(config) + if err != nil { + return err + } + var apiSrv *api.Server if config.API.Enable { - genDoc, err := tmtypes.GenesisDocFromFile(cfg.GenesisFile()) + genDoc, err := genDocProvider() if err != nil { return err } @@ -328,13 +345,27 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App return err } + maxSendMsgSize := config.GRPC.MaxSendMsgSize + if maxSendMsgSize == 0 { + maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize + } + + maxRecvMsgSize := config.GRPC.MaxRecvMsgSize + if maxRecvMsgSize == 0 { + maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize + } + grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) // If grpc is enabled, configure grpc client for grpc gateway. grpcClient, err := grpc.Dial( grpcAddress, grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec())), + grpc.WithDefaultCallOptions( + grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), + grpc.MaxCallRecvMsgSize(maxRecvMsgSize), + grpc.MaxCallSendMsgSize(maxSendMsgSize), + ), ) if err != nil { return err @@ -346,6 +377,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App apiSrv = api.New(clientCtx, ctx.Logger.With("module", "api-server")) app.RegisterAPIRoutes(apiSrv, config.API) + if config.Telemetry.Enabled { + apiSrv.SetTelemetry(metrics) + } errCh := make(chan error) go func() { @@ -368,7 +402,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App ) if config.GRPC.Enable { - grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, config.GRPC.Address) + grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, config.GRPC) if err != nil { return err } @@ -399,16 +433,25 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App offlineMode = true } + minGasPrices, err := sdktypes.ParseDecCoins(config.MinGasPrices) + if err != nil { + ctx.Logger.Error("failed to parse minimum-gas-prices: ", err) + return err + } + conf := &rosetta.Config{ - Blockchain: config.Rosetta.Blockchain, - Network: config.Rosetta.Network, - TendermintRPC: ctx.Config.RPC.ListenAddress, - GRPCEndpoint: config.GRPC.Address, - Addr: config.Rosetta.Address, - Retries: config.Rosetta.Retries, - Offline: offlineMode, - Codec: clientCtx.Codec.(*codec.ProtoCodec), - InterfaceRegistry: clientCtx.InterfaceRegistry, + Blockchain: config.Rosetta.Blockchain, + Network: config.Rosetta.Network, + TendermintRPC: ctx.Config.RPC.ListenAddress, + GRPCEndpoint: config.GRPC.Address, + Addr: config.Rosetta.Address, + Retries: config.Rosetta.Retries, + Offline: offlineMode, + GasToSuggest: config.Rosetta.GasToSuggest, + EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, + GasPrices: minGasPrices.Sort(), + Codec: clientCtx.Codec.(*codec.ProtoCodec), + InterfaceRegistry: clientCtx.InterfaceRegistry, } rosettaSrv, err = rosetta.ServerFromConfig(conf) @@ -447,7 +490,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App if grpcSrv != nil { grpcSrv.Stop() if grpcWebSrv != nil { - grpcWebSrv.Close() + if err := grpcWebSrv.Close(); err != nil { + ctx.Logger.Error("failed to close grpc-web http server: ", err) + } } } @@ -457,3 +502,10 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App // wait for signal capture and gracefully return return WaitForQuitSignals() } + +func startTelemetry(cfg config.Config) (*telemetry.Metrics, error) { + if !cfg.Telemetry.Enabled { + return nil, nil + } + return telemetry.New(cfg.Telemetry) +} diff --git a/server/tm_cmds.go b/server/tm_cmds.go index 54755ab541db..2dc1ddc57336 100644 --- a/server/tm_cmds.go +++ b/server/tm_cmds.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/p2p" pvm "github.com/tendermint/tendermint/privval" tversion "github.com/tendermint/tendermint/version" "sigs.k8s.io/yaml" @@ -24,11 +25,12 @@ func ShowNodeIDCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - nodeKey, err := cfg.LoadNodeKeyID() + nodeKey, err := p2p.LoadNodeKey(cfg.NodeKeyFile()) if err != nil { return err } - fmt.Println(nodeKey) + + fmt.Println(nodeKey.ID()) return nil }, } @@ -43,23 +45,23 @@ func ShowValidatorCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - privValidator, err := pvm.LoadFilePV(cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile()) - if err != nil { - return err - } - pk, err := privValidator.GetPubKey(cmd.Context()) + privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) + pk, err := privValidator.GetPubKey() if err != nil { return err } + sdkPK, err := cryptocodec.FromTmPubKeyInterface(pk) if err != nil { return err } + clientCtx := client.GetClientContextFromCmd(cmd) bz, err := clientCtx.Codec.MarshalInterfaceJSON(sdkPK) if err != nil { return err } + fmt.Println(string(bz)) return nil }, @@ -77,10 +79,8 @@ func ShowAddressCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - privValidator, err := pvm.LoadFilePV(cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile()) - if err != nil { - return err - } + privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) + valConsAddr := (sdk.ConsAddress)(privValidator.GetAddress()) fmt.Println(valConsAddr.String()) return nil @@ -95,9 +95,7 @@ func VersionCmd() *cobra.Command { return &cobra.Command{ Use: "version", Short: "Print tendermint libraries' version", - Long: `Print protocols' and libraries' version numbers -against which this app has been compiled. -`, + Long: "Print protocols' and libraries' version numbers against which this app has been compiled.", RunE: func(cmd *cobra.Command, args []string) error { bs, err := yaml.Marshal(&struct { Tendermint string @@ -105,7 +103,7 @@ against which this app has been compiled. BlockProtocol uint64 P2PProtocol uint64 }{ - Tendermint: tversion.TMVersion, + Tendermint: tversion.TMCoreSemVer, ABCI: tversion.ABCIVersion, BlockProtocol: tversion.BlockProtocol, P2PProtocol: tversion.P2PProtocol, diff --git a/server/types/app.go b/server/types/app.go index 76493b060351..467f627c605f 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -9,7 +9,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" @@ -71,7 +70,7 @@ type ( // Height is the app's latest block height. Height int64 // ConsensusParams are the exported consensus params for ABCI. - ConsensusParams *tmproto.ConsensusParams + ConsensusParams *abci.ConsensusParams } // AppExporter is a function that dumps all app state to diff --git a/server/util.go b/server/util.go index 00d1e74e4d9b..f3a7aae75527 100644 --- a/server/util.go +++ b/server/util.go @@ -67,7 +67,9 @@ func NewContext(v *viper.Viper, config *tmcfg.Config, logger tmlog.Logger) *Cont func bindFlags(basename string, cmd *cobra.Command, v *viper.Viper) (err error) { defer func() { - recover() + if r := recover(); r != nil { + err = fmt.Errorf("bindFlags failed: %v", r) + } }() cmd.Flags().VisitAll(func(f *pflag.Flag) { @@ -120,8 +122,12 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate s basename := path.Base(executableName) // Configure the viper instance - serverCtx.Viper.BindPFlags(cmd.Flags()) - serverCtx.Viper.BindPFlags(cmd.PersistentFlags()) + if err := serverCtx.Viper.BindPFlags(cmd.Flags()); err != nil { + return err + } + if err := serverCtx.Viper.BindPFlags(cmd.PersistentFlags()); err != nil { + return err + } serverCtx.Viper.SetEnvPrefix(basename) serverCtx.Viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_")) serverCtx.Viper.AutomaticEnv() @@ -139,7 +145,7 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate s } var logWriter io.Writer - if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == tmlog.LogFormatPlain { + if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == tmcfg.LogFormatPlain { logWriter = zerolog.ConsoleWriter{Out: os.Stderr} } else { logWriter = os.Stderr @@ -197,13 +203,13 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo tmcfg.EnsureRoot(rootDir) if err = conf.ValidateBasic(); err != nil { - return nil, fmt.Errorf("error in config file: %v", err) + return nil, fmt.Errorf("error in config file: %w", err) } conf.RPC.PprofListenAddress = "localhost:6060" conf.P2P.RecvRate = 5120000 conf.P2P.SendRate = 5120000 - tmcfg.WriteConfigFile(rootDir, conf) + tmcfg.WriteConfigFile(tmCfgFile, conf) case err != nil: return nil, err @@ -272,7 +278,6 @@ func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator type VersionCmd(), tmcmd.ResetAllCmd, tmcmd.ResetStateCmd, - tmcmd.InspectCmd, ) startCmd := StartCmd(appCreator, defaultNodeHome) @@ -402,6 +407,6 @@ func openTraceWriter(traceWriterFile string) (w io.Writer, err error) { return os.OpenFile( traceWriterFile, os.O_WRONLY|os.O_APPEND|os.O_CREATE, - 0666, + 0o666, ) } diff --git a/server/util_test.go b/server/util_test.go index 3a4cb8138c98..630a2795dc3f 100644 --- a/server/util_test.go +++ b/server/util_test.go @@ -109,7 +109,7 @@ func TestInterceptConfigsPreRunHandlerReadsConfigToml(t *testing.T) { t.Fatalf("creating config.toml file failed: %v", err) } - _, err = writer.WriteString(fmt.Sprintf("db-backend = '%s'\n", testDbBackend)) + _, err = writer.WriteString(fmt.Sprintf("db_backend = '%s'\n", testDbBackend)) if err != nil { t.Fatalf("Failed writing string to config.toml: %v", err) } @@ -218,9 +218,9 @@ func TestInterceptConfigsPreRunHandlerReadsEnvVars(t *testing.T) { basename = strings.ReplaceAll(basename, ".", "_") // This is added by tendermint envVarName := fmt.Sprintf("%s_RPC_LADDR", strings.ToUpper(basename)) - os.Setenv(envVarName, testAddr) + require.NoError(t, os.Setenv(envVarName, testAddr)) t.Cleanup(func() { - os.Unsetenv(envVarName) + require.NoError(t, os.Unsetenv(envVarName)) }) cmd.PreRunE = preRunETestImpl @@ -305,7 +305,7 @@ func (v precedenceCommon) setAll(t *testing.T, setFlag *string, setEnvVar *strin } if setEnvVar != nil { - os.Setenv(v.envVarName, *setEnvVar) + require.NoError(t, os.Setenv(v.envVarName, *setEnvVar)) } if setConfigFile != nil { @@ -395,7 +395,7 @@ func TestInterceptConfigsPreRunHandlerPrecedenceConfigDefault(t *testing.T) { func TestInterceptConfigsWithBadPermissions(t *testing.T) { tempDir := t.TempDir() subDir := filepath.Join(tempDir, "nonPerms") - if err := os.Mkdir(subDir, 0600); err != nil { + if err := os.Mkdir(subDir, 0o600); err != nil { t.Fatalf("Failed to create sub directory: %v", err) } cmd := server.StartCmd(nil, "/foobar") diff --git a/simapp/app.go b/simapp/app.go index b592b1eb3cf6..1112fbc1ecab 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -20,20 +20,20 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/store/streaming" storetypes "github.com/cosmos/cosmos-sdk/store/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata_pulsar" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authmiddleware "github.com/cosmos/cosmos-sdk/x/auth/middleware" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -155,8 +155,6 @@ type SimApp struct { legacyAmino *codec.LegacyAmino appCodec codec.Codec interfaceRegistry types.InterfaceRegistry - msgSvcRouter *authmiddleware.MsgServiceRouter - legacyRouter sdk.Router invCheckPeriod uint @@ -208,12 +206,11 @@ func NewSimApp( homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { - appCodec := encodingConfig.Codec legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry - bApp := baseapp.NewBaseApp(appName, logger, db, baseAppOptions...) + bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) @@ -241,8 +238,6 @@ func NewSimApp( legacyAmino: legacyAmino, appCodec: appCodec, interfaceRegistry: interfaceRegistry, - legacyRouter: authmiddleware.NewLegacyRouter(), - msgSvcRouter: authmiddleware.NewMsgServiceRouter(interfaceRegistry), invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, @@ -292,16 +287,19 @@ func NewSimApp( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) - app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.msgSvcRouter, app.AccountKeeper) + app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper) groupConfig := group.DefaultConfig() /* Example of setting group params: groupConfig.MaxMetadataLen = 1000 */ - app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.msgSvcRouter, app.AccountKeeper, groupConfig) + app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper, groupConfig) - // register the proposal types + // Register the proposal types + // Deprecated: Avoid adding new handlers, instead use the new proposal flow + // by granting the governance module the right to execute the message. + // See: https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/gov/spec/01_concepts.md#proposal-messages govRouter := govv1beta1.NewRouter() govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). @@ -314,7 +312,7 @@ func NewSimApp( */ govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, govRouter, app.msgSvcRouter, govConfig, + &stakingKeeper, govRouter, app.MsgServiceRouter(), govConfig, ) app.GovKeeper = *govKeeper.SetHooks( @@ -324,6 +322,7 @@ func NewSimApp( ) // set the governance module account as the authority for conducting upgrades app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + app.NFTKeeper = nftkeeper.NewKeeper(keys[nftkeeper.StoreKey], appCodec, app.AccountKeeper, app.BankKeeper) // create evidence keeper with router @@ -337,7 +336,7 @@ func NewSimApp( // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. - var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) + skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. @@ -404,33 +403,25 @@ func NewSimApp( // app.mm.SetOrderMigrations(custom order) app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.legacyRouter, app.QueryRouter(), encodingConfig.Amino) - app.configurator = module.NewConfigurator(app.appCodec, app.msgSvcRouter, app.GRPCQueryRouter()) + app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) + app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.mm.RegisterServices(app.configurator) + // RegisterUpgradeHandlers is used for registering any on-chain upgrades. + // Make sure it's called after `app.mm` and `app.configurator` are set. + app.RegisterUpgradeHandlers() + // add test gRPC service for testing gRPC queries in isolation - testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{}) + testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{}) // create the simulation manager and define the order of the modules for deterministic simulations // // NOTE: this is not required apps that don't use the simulator for fuzz testing // transactions - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - ) + overrideModules := map[string]module.AppModuleSimulation{ + authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), + } + app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules) app.sm.RegisterStoreDecoders() @@ -443,7 +434,21 @@ func NewSimApp( app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) app.SetEndBlocker(app.EndBlocker) - app.setTxHandler(encodingConfig.TxConfig, cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))) + app.setAnteHandler(encodingConfig.TxConfig) + // In v0.46, the SDK introduces _postHandlers_. PostHandlers are like + // antehandlers, but are run _after_ the `runMsgs` execution. They are also + // defined as a chain, and have the same signature as antehandlers. + // + // In baseapp, postHandlers are run in the same store branch as `runMsgs`, + // meaning that both `runMsgs` and `postHandler` state will be committed if + // both are successful, and both will be reverted if any of the two fails. + // + // The SDK exposes a default empty postHandlers chain. + // + // Please note that changing any of the anteHandler or postHandler chain is + // likely to be a state-machine breaking change, which needs a coordinated + // upgrade. + app.setPostHandler() if loadLatest { if err := app.LoadLatestVersion(); err != nil { @@ -454,28 +459,33 @@ func NewSimApp( return app } -func (app *SimApp) setTxHandler(txConfig client.TxConfig, indexEventsStr []string) { - indexEvents := map[string]struct{}{} - for _, e := range indexEventsStr { - indexEvents[e] = struct{}{} +func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { + anteHandler, err := ante.NewAnteHandler( + ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: txConfig.SignModeHandler(), + FeegrantKeeper: app.FeeGrantKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + ) + + if err != nil { + panic(err) } - txHandler, err := authmiddleware.NewDefaultTxHandler(authmiddleware.TxHandlerOptions{ - Debug: app.Trace(), - IndexEvents: indexEvents, - LegacyRouter: app.legacyRouter, - MsgServiceRouter: app.msgSvcRouter, - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: authmiddleware.DefaultSigVerificationGasConsumer, - TxDecoder: txConfig.TxDecoder(), - }) + + app.SetAnteHandler(anteHandler) +} + +func (app *SimApp) setPostHandler() { + postHandler, err := posthandler.NewPostHandler( + posthandler.HandlerOptions{}, + ) if err != nil { panic(err) } - app.SetTxHandler(txHandler) + app.SetPostHandler(postHandler) } // Name returns the name of the App @@ -580,8 +590,7 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - // Register legacy and grpc-gateway routes for all modules. - ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router) + // Register grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // register swagger API from root so that other applications can override easily @@ -606,7 +615,7 @@ func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { } // RegisterSwaggerAPI registers swagger route with API Server -func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { +func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router) { statikFS, err := fs.New() if err != nil { panic(err) diff --git a/simapp/app_test.go b/simapp/app_test.go index 72acc777d9eb..25d8263980d0 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -2,6 +2,7 @@ package simapp import ( "encoding/json" + "os" "testing" "github.com/golang/mock/gomock" @@ -16,7 +17,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" - authmiddleware "github.com/cosmos/cosmos-sdk/x/auth/middleware" "github.com/cosmos/cosmos-sdk/x/auth/vesting" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/cosmos/cosmos-sdk/x/bank" @@ -39,7 +39,7 @@ import ( func TestSimAppExportAndBlockedAddrs(t *testing.T) { encCfg := MakeTestEncodingConfig() db := dbm.NewMemDB() - logger, _ := log.NewDefaultLogger("plain", "info", false) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := NewSimappWithCustomOptions(t, false, SetupOptions{ Logger: logger, DB: db, @@ -60,7 +60,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) { app.Commit() - logger2, _ := log.NewDefaultLogger("plain", "info", false) + logger2 := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) // Making a new app object with the db, so that initchain hasn't been called app2 := NewSimApp(logger2, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) _, err := app2.ExportAppStateAndValidators(false, []string{}) @@ -75,16 +75,15 @@ func TestGetMaccPerms(t *testing.T) { func TestRunMigrations(t *testing.T) { db := dbm.NewMemDB() encCfg := MakeTestEncodingConfig() - logger, _ := log.NewDefaultLogger("plain", "info", false) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) // Create a new baseapp and configurator for the purpose of this test. - bApp := baseapp.NewBaseApp(appName, logger, db) + bApp := baseapp.NewBaseApp(appName, logger, db, encCfg.TxConfig.TxDecoder()) bApp.SetCommitMultiStoreTracer(nil) bApp.SetInterfaceRegistry(encCfg.InterfaceRegistry) - msr := authmiddleware.NewMsgServiceRouter(encCfg.InterfaceRegistry) app.BaseApp = bApp - app.configurator = module.NewConfigurator(app.appCodec, msr, app.GRPCQueryRouter()) + app.configurator = module.NewConfigurator(app.appCodec, bApp.MsgServiceRouter(), app.GRPCQueryRouter()) // We register all modules on the Configurator, except x/bank. x/bank will // serve as the test subject on which we run the migration tests. @@ -205,7 +204,7 @@ func TestRunMigrations(t *testing.T) { func TestInitGenesisOnMigration(t *testing.T) { db := dbm.NewMemDB() encCfg := MakeTestEncodingConfig() - logger, _ := log.NewDefaultLogger("plain", "info", false) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) @@ -249,7 +248,7 @@ func TestInitGenesisOnMigration(t *testing.T) { func TestUpgradeStateOnGenesis(t *testing.T) { encCfg := MakeTestEncodingConfig() db := dbm.NewMemDB() - logger, _ := log.NewDefaultLogger("plain", "info", false) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := NewSimappWithCustomOptions(t, false, SetupOptions{ Logger: logger, DB: db, diff --git a/simapp/export.go b/simapp/export.go index 7c59ffc69c0a..a1587e58e83e 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -2,6 +2,7 @@ package simapp import ( "encoding/json" + "fmt" "log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -84,10 +85,8 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] panic(err) } - delAddr, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) - if err != nil { - panic(err) - } + delAddr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) } @@ -121,12 +120,17 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] if err != nil { panic(err) } - delAddr, err := sdk.AccAddressFromBech32(del.DelegatorAddress) - if err != nil { - panic(err) + delAddr := sdk.MustAccAddressFromBech32(del.DelegatorAddress) + + if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { + // never called as BeforeDelegationCreated always returns nil + panic(fmt.Errorf("error while incrementing period: %w", err)) + } + + if err := app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr); err != nil { + // never called as AfterDelegationModified always returns nil + panic(fmt.Errorf("error while creating a new delegation period record: %w", err)) } - app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) - app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) } // reset context height @@ -174,7 +178,10 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] counter++ } - iter.Close() + if err := iter.Close(); err != nil { + app.Logger().Error("error while closing the key-value store reverse prefix iterator: ", err) + return + } _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go index f0be36ad42fe..a0888c09019e 100644 --- a/simapp/helpers/test_helpers.go +++ b/simapp/helpers/test_helpers.go @@ -2,7 +2,6 @@ package helpers import ( "math/rand" - "time" "github.com/cosmos/cosmos-sdk/client" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -14,20 +13,18 @@ import ( // SimAppChainID hardcoded chainID for simulation const ( - DefaultGenTxGas = 1000000 + DefaultGenTxGas = 10000000 SimAppChainID = "simulation-app" ) -// GenTx generates a signed mock transaction. -func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { +// GenSignedMockTx generates a signed mock transaction. +func GenSignedMockTx(r *rand.Rand, txConfig client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo - r := rand.New(rand.NewSource(time.Now().UnixNano())) - memo := simulation.RandStringOfLength(r, simulation.RandIntBetween(r, 0, 100)) - signMode := gen.SignModeHandler().DefaultMode() + signMode := txConfig.SignModeHandler().DefaultMode() // 1st round: set SignatureV2 with empty signatures, to set correct // signer infos. @@ -41,7 +38,7 @@ func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, ch } } - tx := gen.NewTxBuilder() + tx := txConfig.NewTxBuilder() err := tx.SetMsgs(msgs...) if err != nil { return nil, err @@ -63,7 +60,7 @@ func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, ch Sequence: accSeqs[i], PubKey: p.PubKey(), } - signBytes, err := gen.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) + signBytes, err := txConfig.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) if err != nil { panic(err) } diff --git a/simapp/params/amino.go b/simapp/params/amino.go index cdf86d0ea2e0..d603987dd5f5 100644 --- a/simapp/params/amino.go +++ b/simapp/params/amino.go @@ -1,3 +1,4 @@ +//go:build test_amino // +build test_amino package params diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go index b5592051001f..788299dc11aa 100644 --- a/simapp/sim_bench_test.go +++ b/simapp/sim_bench_test.go @@ -5,6 +5,7 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -25,11 +26,8 @@ func BenchmarkFullAppSimulation(b *testing.B) { } defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } + require.NoError(b, db.Close()) + require.NoError(b, os.RemoveAll(dir)) }() app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) @@ -75,11 +73,8 @@ func BenchmarkInvariants(b *testing.B) { config.AllInvariants = false defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } + require.NoError(b, db.Close()) + require.NoError(b, os.RemoveAll(dir)) }() app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 20b751ffa0c0..bde9aa5859e4 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -66,7 +66,7 @@ func TestFullAppSimulation(t *testing.T) { require.NoError(t, err, "simulation setup failed") defer func() { - db.Close() + require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() @@ -104,7 +104,7 @@ func TestAppImportExport(t *testing.T) { require.NoError(t, err, "simulation setup failed") defer func() { - db.Close() + require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() @@ -144,7 +144,7 @@ func TestAppImportExport(t *testing.T) { require.NoError(t, err, "simulation setup failed") defer func() { - newDB.Close() + require.NoError(t, newDB.Close()) require.NoError(t, os.RemoveAll(newDir)) }() @@ -175,11 +175,13 @@ func TestAppImportExport(t *testing.T) { storeKeysPrefixes := []StoreKeysPrefixes{ {app.keys[authtypes.StoreKey], newApp.keys[authtypes.StoreKey], [][]byte{}}, - {app.keys[stakingtypes.StoreKey], newApp.keys[stakingtypes.StoreKey], + { + app.keys[stakingtypes.StoreKey], newApp.keys[stakingtypes.StoreKey], [][]byte{ stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, stakingtypes.HistoricalInfoKey, - }}, // ordering may change but it doesn't matter + }, + }, // ordering may change but it doesn't matter {app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{}}, {app.keys[minttypes.StoreKey], newApp.keys[minttypes.StoreKey], [][]byte{}}, {app.keys[distrtypes.StoreKey], newApp.keys[distrtypes.StoreKey], [][]byte{}}, @@ -211,7 +213,7 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, err, "simulation setup failed") defer func() { - db.Close() + require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() @@ -256,7 +258,7 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, err, "simulation setup failed") defer func() { - newDB.Close() + require.NoError(t, newDB.Close()) require.NoError(t, os.RemoveAll(newDir)) }() diff --git a/simapp/simd/cmd/cmd_test.go b/simapp/simd/cmd/cmd_test.go index 0e2a291e9c74..ab9d8de71064 100644 --- a/simapp/simd/cmd/cmd_test.go +++ b/simapp/simd/cmd/cmd_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/client/flags" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/simapp/simd/cmd" @@ -22,3 +23,21 @@ func TestInitCmd(t *testing.T) { require.NoError(t, svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome)) } + +func TestHomeFlagRegistration(t *testing.T) { + homeDir := "/tmp/foo" + + rootCmd, _ := cmd.NewRootCmd() + + rootCmd.SetArgs([]string{ + "query", + fmt.Sprintf("--%s", flags.FlagHome), + homeDir, + }) + + require.NoError(t, svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome)) + + result, err := rootCmd.Flags().GetString(flags.FlagHome) + require.NoError(t, err) + require.Equal(t, result, homeDir) +} diff --git a/simapp/simd/cmd/genaccounts_test.go b/simapp/simd/cmd/genaccounts_test.go index ed6d93508567..ca751fc34f62 100644 --- a/simapp/simd/cmd/genaccounts_test.go +++ b/simapp/simd/cmd/genaccounts_test.go @@ -3,10 +3,11 @@ package cmd_test import ( "context" "fmt" + "testing" + "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - "testing" "github.com/spf13/viper" "github.com/stretchr/testify/require" @@ -96,7 +97,8 @@ func TestAddGenesisAccountCmd(t *testing.T) { cmd.SetArgs([]string{ tc.addr, tc.denom, - fmt.Sprintf("--%s=home", flags.FlagHome)}) + fmt.Sprintf("--%s=home", flags.FlagHome), + }) if tc.expectErr { require.Error(t, cmd.ExecuteContext(ctx)) diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 9ae7f10a7b48..cb0d3f6e0c34 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -26,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" @@ -192,7 +193,7 @@ func queryCommand() *cobra.Command { Use: "query", Aliases: []string{"q"}, Short: "Querying subcommands", - DisableFlagParsing: true, + DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } @@ -215,7 +216,7 @@ func txCommand() *cobra.Command { cmd := &cobra.Command{ Use: "tx", Short: "Transactions subcommands", - DisableFlagParsing: true, + DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } @@ -270,6 +271,11 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a panic(err) } + snapshotOptions := snapshottypes.NewSnapshotOptions( + cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), + cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), + ) + return simapp.NewSimApp( logger, db, traceStore, true, skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), @@ -284,18 +290,15 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshotStore(snapshotStore), - baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))), - baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), + baseapp.SetSnapshot(snapshotStore, snapshotOptions), ) } // appExport creates a new simapp (optionally at a given height) // and exports state. func (a appCreator) appExport( - logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, - appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { - + logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, +) (servertypes.ExportedApp, error) { var simApp *simapp.SimApp homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 20ded76a92e1..9f54d4a1a8bc 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -15,8 +15,8 @@ import ( tmconfig "github.com/tendermint/tendermint/config" tmos "github.com/tendermint/tendermint/libs/os" tmrand "github.com/tendermint/tendermint/libs/rand" - tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -100,7 +100,7 @@ func NewTestnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBala return testnetCmd } -// get cmd to initialize all files for tendermint testnet and application +// testnetInitFilesCmd returns a cmd to initialize all files for tendermint testnet and application func testnetInitFilesCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command { cmd := &cobra.Command{ Use: "init-files", @@ -137,7 +137,6 @@ Example: args.algo, _ = cmd.Flags().GetString(flags.FlagKeyAlgorithm) return initTestnetFiles(clientCtx, cmd, config, mbm, genBalIterator, args) - }, } @@ -150,7 +149,7 @@ Example: return cmd } -// get cmd to start multi validator in-process testnet +// testnetStartCmd returns a cmd to start multi validator in-process testnet func testnetStartCmd() *cobra.Command { cmd := &cobra.Command{ Use: "start", @@ -163,7 +162,6 @@ Example: simd testnet --v 4 --output-dir ./.testnets `, RunE: func(cmd *cobra.Command, _ []string) error { - args := startArgs{} args.outputDir, _ = cmd.Flags().GetString(flagOutputDir) args.chainID, _ = cmd.Flags().GetString(flags.FlagChainID) @@ -177,7 +175,6 @@ Example: args.printMnemonic, _ = cmd.Flags().GetBool(flagPrintMnemonic) return startTestnet(cmd, args) - }, } @@ -190,7 +187,7 @@ Example: return cmd } -const nodeDirPerm = 0755 +const nodeDirPerm = 0o755 // initTestnetFiles initializes testnet files for a testnet to be run in a separate process func initTestnetFiles( @@ -231,7 +228,6 @@ func initTestnetFiles( nodeConfig.SetRoot(nodeDir) nodeConfig.Moniker = nodeDirName nodeConfig.RPC.ListenAddress = "tcp://0.0.0.0:26657" - nodeConfig.Mode = tmconfig.ModeValidator if err := os.MkdirAll(filepath.Join(nodeDir, "config"), nodeDirPerm); err != nil { _ = os.RemoveAll(args.outputDir) @@ -356,7 +352,6 @@ func initGenFiles( genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string, numValidators int, ) error { - appGenState := mbm.DefaultGenesis(clientCtx.Codec) // set the accounts in the genesis state @@ -406,7 +401,6 @@ func collectGenFiles( nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, ) error { - var appState json.RawMessage genTime := tmtime.Now() @@ -475,12 +469,12 @@ func writeFile(name string, dir string, contents []byte) error { writePath := filepath.Join(dir) file := filepath.Join(writePath, name) - err := tmos.EnsureDir(writePath, 0755) + err := tmos.EnsureDir(writePath, 0o755) if err != nil { return err } - err = ioutil.WriteFile(file, contents, 0644) // nolint: gosec + err = ioutil.WriteFile(file, contents, 0o644) // nolint: gosec if err != nil { return err } @@ -519,9 +513,13 @@ func startTestnet(cmd *cobra.Command, args startArgs) error { return err } - testnet.WaitForHeight(1) + if _, err := testnet.WaitForHeight(1); err != nil { + return err + } cmd.Println("press the Enter Key to terminate") - fmt.Scanln() // wait for Enter Key + if _, err := fmt.Scanln(); err != nil { // wait for Enter Key + return err + } testnet.Cleanup() return nil diff --git a/simapp/state.go b/simapp/state.go index f888a45bcd8b..135863c5bd7c 100644 --- a/simapp/state.go +++ b/simapp/state.go @@ -11,6 +11,7 @@ import ( tmjson "github.com/tendermint/tendermint/libs/json" tmtypes "github.com/tendermint/tendermint/types" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" @@ -28,7 +29,6 @@ import ( func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn { return func(r *rand.Rand, accs []simtypes.Account, config simtypes.Config, ) (appState json.RawMessage, simAccs []simtypes.Account, chainID string, genesisTimestamp time.Time) { - if FlagGenesisTimeValue == 0 { genesisTimestamp = simtypes.RandTimestamp(r) } else { @@ -147,10 +147,13 @@ func AppStateRandomizedFn( // generate a random amount of initial stake coins and a random initial // number of bonded accounts - var initialStake, numInitiallyBonded int64 + var ( + numInitiallyBonded int64 + initialStake sdkmath.Int + ) appParams.GetOrGenerate( cdc, simappparams.StakePerAccount, &initialStake, r, - func(r *rand.Rand) { initialStake = r.Int63n(1e12) }, + func(r *rand.Rand) { initialStake = sdkmath.NewInt(r.Int63n(1e12)) }, ) appParams.GetOrGenerate( cdc, simappparams.InitiallyBondedValidators, &numInitiallyBonded, r, diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 364891a5f0c9..fc1ac3195260 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -2,10 +2,10 @@ package simapp import ( "bytes" - "context" "encoding/hex" "encoding/json" "fmt" + "math/rand" "strconv" "testing" "time" @@ -39,8 +39,8 @@ import ( // DefaultConsensusParams defines the default Tendermint consensus params used in // SimApp testing. -var DefaultConsensusParams = &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ +var DefaultConsensusParams = &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, @@ -82,7 +82,7 @@ func NewSimappWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptio t.Helper() privVal := mock.NewPV() - pubKey, err := privVal.GetPubKey(context.TODO()) + pubKey, err := privVal.GetPubKey() require.NoError(t, err) // create validator set with single validator validator := tmtypes.NewValidator(pubKey, 1) @@ -123,7 +123,7 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp { t.Helper() privVal := mock.NewPV() - pubKey, err := privVal.GetPubKey(context.TODO()) + pubKey, err := privVal.GetPubKey() require.NoError(t, err) // create validator set with single validator @@ -146,7 +146,8 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp { func genesisStateWithValSet(t *testing.T, app *SimApp, genesisState GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, - balances ...banktypes.Balance) GenesisState { + balances ...banktypes.Balance, +) GenesisState { // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) @@ -246,7 +247,7 @@ func SetupWithGenesisAccounts(t *testing.T, genAccs []authtypes.GenesisAccount, t.Helper() privVal := mock.NewPV() - pubKey, err := privVal.GetPubKey(context.TODO()) + pubKey, err := privVal.GetPubKey() require.NoError(t, err) // create validator set with single validator @@ -256,13 +257,13 @@ func SetupWithGenesisAccounts(t *testing.T, genAccs []authtypes.GenesisAccount, return SetupWithGenesisValSet(t, valSet, genAccs, balances...) } -// SetupWithGenesisValSet initializes GenesisState with a single validator and genesis accounts +// GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts // that also act as delegators. func GenesisStateWithSingleValidator(t *testing.T, app *SimApp) GenesisState { t.Helper() privVal := mock.NewPV() - pubKey, err := privVal.GetPubKey(context.TODO()) + pubKey, err := privVal.GetPubKey() require.NoError(t, err) // create validator set with single validator @@ -309,7 +310,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { buffer.WriteString("A58856F0FD53BF058B4909A21AEC019107BA6") // base address string buffer.WriteString(numString) // adding on final two digits to make addresses unique - res, _ := sdk.AccAddressFromHex(buffer.String()) + res, _ := sdk.AccAddressFromHexUnsafe(buffer.String()) bech := res.String() addr, _ := TestAddr(buffer.String(), bech) @@ -335,7 +336,7 @@ func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sd return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts) } -// AddTestAddrs constructs and returns accNum amount of accounts with an +// AddTestAddrsIncremental constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) @@ -377,7 +378,7 @@ func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress { } func TestAddr(addr string, bech string) (sdk.AccAddress, error) { - res, err := sdk.AccAddressFromHex(addr) + res, err := sdk.AccAddressFromHexUnsafe(addr) if err != nil { return nil, err } @@ -411,8 +412,8 @@ func SignCheckDeliver( t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { - - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, @@ -462,7 +463,8 @@ func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, i txs := make([]sdk.Tx, numToGenerate) var err error for i := 0; i < numToGenerate; i++ { - txs[i], err = helpers.GenTx( + txs[i], err = helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txGen, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, diff --git a/simapp/upgrades.go b/simapp/upgrades.go new file mode 100644 index 000000000000..d6bd283402e6 --- /dev/null +++ b/simapp/upgrades.go @@ -0,0 +1,40 @@ +package simapp + +import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/group" + "github.com/cosmos/cosmos-sdk/x/nft" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +// UpgradeName defines the on-chain upgrade name for the sample simap upgrade from v045 to v046. +// +// NOTE: This upgrade defines a reference implementation of what an upgrade could look like +// when an application is migrating from Cosmos SDK version v0.45.x to v0.46.x. +const UpgradeName = "v045-to-v046" + +func (app SimApp) RegisterUpgradeHandlers() { + app.UpgradeKeeper.SetUpgradeHandler(UpgradeName, + func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + + upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() + if err != nil { + panic(err) + } + + if upgradeInfo.Name == UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + storeUpgrades := storetypes.StoreUpgrades{ + Added: []string{ + group.ModuleName, + nft.ModuleName, + }, + } + + // configure store loader that checks if version == upgradeHeight and applies store upgrades + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) + } +} diff --git a/simapp/utils.go b/simapp/utils.go index 1478104a5d8c..8c4a5abd1b78 100644 --- a/simapp/utils.go +++ b/simapp/utils.go @@ -84,7 +84,7 @@ func CheckExportSimulation( return err } - if err := os.WriteFile(config.ExportStatePath, []byte(exported.AppState), 0600); err != nil { + if err := os.WriteFile(config.ExportStatePath, []byte(exported.AppState), 0o600); err != nil { return err } } @@ -96,7 +96,7 @@ func CheckExportSimulation( return err } - if err := os.WriteFile(config.ExportParamsPath, paramsBz, 0600); err != nil { + if err := os.WriteFile(config.ExportParamsPath, paramsBz, 0o600); err != nil { return err } } diff --git a/snapshots/README.md b/snapshots/README.md index 8f6e526f0832..1c80f05d5633 100644 --- a/snapshots/README.md +++ b/snapshots/README.md @@ -28,7 +28,9 @@ filesystem under `/data/snapshots/`, with metadata in a LevelDB datab Snapshots are taken asynchronously, i.e. new blocks will be applied concurrently with snapshots being taken. This is possible because IAVL supports querying -immutable historical heights. +immutable historical heights. However, this requires heights that are multiples of `state-sync.snapshot-interval` +to be kept until after the snapshot is complete. It is done to prevent a height from being removed +while it is being snapshotted. When a remote node is state syncing, Tendermint calls the ABCI method `ListSnapshots` to list available local snapshots and `LoadSnapshotChunk` to @@ -47,6 +49,53 @@ can be trivially forged by an adversary. This was considered out of scope for the initial implementation, but can be added later without changes to the ABCI state sync protocol. +## Relationship to Pruning + +Snapshot settings are optional. However, if set, they have an effect on how pruning is done by +persisting the heights that are multiples of `state-sync.snapshot-interval` until after the snapshot is complete. + +If pruning is enabled (not `pruning = "nothing"`), we avoid pruning heights that are multiples of +`state-sync.snapshot-interval` in the regular logic determined by the +pruning settings and applied after every `Commit()`. This is done to prevent a +height from being removed before a snapshot is complete. Therefore, we keep +such heights until after a snapshot is done. At this point, the height is sent to +the `pruning.Manager` to be pruned according to the pruning settings after the next `Commit()`. + +To illustrate, assume that we are currently at height 960 with `pruning-keep-recent = 50`, +`pruning-interval = 10`, and `state-sync.snapshot-interval = 100`. Let's assume that +the snapshot that was triggered at height `900` **just finishes**. Then, we can prune height +`900` right away (that is, when we call `Commit()` at height 960 because 900 is less than `960 - 50 = 910`. + +Let's now assume that all conditions stay the same but the snapshot at height 900 is **not complete yet**. +Then, we cannot prune it to avoid deleting a height that is still being snapshotted. Therefore, we keep track +of this height until the snapshot is complete. The height 900 will be pruned at the first height h that satisfied the following conditions: + +* the snapshot is complete +* h is a multiple of `pruning-interval` +* snapshot height is less than h - `pruning-keep-recent` + +Note that in both examples, if we let current height = C, and previous height P = C - 1, then for every height h that is: + +P - `pruning-keep-recent` - `pruning-interval` <= h <= P - `pruning-keep-recent` + +we can prune height h. In our first example, all heights 899 - 909 fall in this range and are pruned at height 960 as long as +h is not a snapshot height (E.g. 900). + +That is, we always use current height to determine at which height to prune (960) while we use previous +to determine which heights are to be pruned (959 - 50 - 10 = 899-909 = 959 - 50). + + +## Configuration + +* `state-sync.snapshot-interval` + * the interval at which to take snapshots. + * the value of 0 disables snapshots. + * if pruning is enabled, it is done after a snapshot is complete for the heights that are multiples of this interval. + +* `state-sync.snapshot-keep-recent`: + * the number of recent snapshots to keep. + * 0 means keep all. + ## Snapshot Metadata The ABCI Protobuf type for a snapshot is listed below (refer to the ABCI spec @@ -132,14 +181,14 @@ Snapshots are generated by `rootmulti.Store.Snapshot()` as follows: 1. Iterate over each IAVL store in lexicographical order by store name. 2. Emit a `SnapshotStoreItem` containing the store name. 3. Start an IAVL export for the store using - [`iavl.ImmutableTree.Export()`](https://pkg.go.dev/github.com/tendermint/iavl#ImmutableTree.Export). + [`iavl.ImmutableTree.Export()`](https://pkg.go.dev/github.com/cosmos/iavl#ImmutableTree.Export). 4. Iterate over each IAVL node. 5. Emit a `SnapshotIAVLItem` for the IAVL node. 2. Pass the serialized Protobuf output stream to a zlib compression writer. 3. Split the zlib output stream into chunks at exactly every 10th megabyte. Snapshots are restored via `rootmulti.Store.Restore()` as the inverse of the above, using -[`iavl.MutableTree.Import()`](https://pkg.go.dev/github.com/tendermint/iavl#MutableTree.Import) +[`iavl.MutableTree.Import()`](https://pkg.go.dev/github.com/cosmos/iavl#MutableTree.Import) to reconstruct each IAVL tree. ## Snapshot Storage @@ -181,7 +230,9 @@ concurrently. During `BaseApp.Commit`, once a state transition has been committed, the height is checked against the `state-sync.snapshot-interval` setting. If the committed height should be snapshotted, a goroutine `BaseApp.snapshot()` is spawned that -calls `snapshots.Manager.Create()` to create the snapshot. +calls `snapshots.Manager.Create()` to create the snapshot. Once a snapshot is +complete and if pruning is enabled, the snapshot height is pruned away by the manager +with the call `PruneSnapshotHeight(...)` to the `snapshots.types.Snapshotter`. `Manager.Create()` will do some basic pre-flight checks, and then start generating a snapshot by calling `rootmulti.Store.Snapshot()`. The chunk stream diff --git a/snapshots/chunk.go b/snapshots/chunk.go index 4f02fccd7b06..74503f058027 100644 --- a/snapshots/chunk.go +++ b/snapshots/chunk.go @@ -1,10 +1,10 @@ package snapshots import ( - snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "io" "math" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -61,7 +61,7 @@ func (w *ChunkWriter) CloseWithError(err error) { w.closed = true close(w.ch) if w.pipe != nil { - w.pipe.CloseWithError(err) + _ = w.pipe.CloseWithError(err) // CloseWithError always returns nil } } } diff --git a/snapshots/chunk_test.go b/snapshots/chunk_test.go index 6935c082ad75..49440e00f390 100644 --- a/snapshots/chunk_test.go +++ b/snapshots/chunk_test.go @@ -132,7 +132,7 @@ func TestChunkReader(t *testing.T) { pr, pw := io.Pipe() pch := make(chan io.ReadCloser, 1) pch <- pr - pw.CloseWithError(theErr) + _ = pw.CloseWithError(theErr) chunkReader = snapshots.NewChunkReader(pch) buf = make([]byte, 4) diff --git a/snapshots/helpers_test.go b/snapshots/helpers_test.go index 00016b1529d2..24051a17a927 100644 --- a/snapshots/helpers_test.go +++ b/snapshots/helpers_test.go @@ -7,17 +7,17 @@ import ( "crypto/sha256" "errors" "io" - "os" "testing" "time" protoio "github.com/gogo/protobuf/io" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/snapshots" - "github.com/cosmos/cosmos-sdk/snapshots/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + "github.com/cosmos/cosmos-sdk/testutil" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -74,12 +74,12 @@ func snapshotItems(items [][]byte) [][]byte { zWriter, _ := zlib.NewWriterLevel(bufWriter, 7) protoWriter := protoio.NewDelimitedWriter(zWriter) for _, item := range items { - types.WriteExtensionItem(protoWriter, item) + _ = snapshottypes.WriteExtensionItem(protoWriter, item) } - protoWriter.Close() - zWriter.Close() - bufWriter.Flush() - chunkWriter.Close() + _ = protoWriter.Close() + _ = zWriter.Close() + _ = bufWriter.Flush() + _ = chunkWriter.Close() }() var chunks [][]byte @@ -90,18 +90,21 @@ func snapshotItems(items [][]byte) [][]byte { } chunks = append(chunks, chunk) } + return chunks } type mockSnapshotter struct { - items [][]byte + items [][]byte + prunedHeights map[int64]struct{} + snapshotInterval uint64 } func (m *mockSnapshotter) Restore( height uint64, format uint32, protoReader protoio.Reader, ) (snapshottypes.SnapshotItem, error) { if format == 0 { - return snapshottypes.SnapshotItem{}, types.ErrUnknownFormat + return snapshottypes.SnapshotItem{}, snapshottypes.ErrUnknownFormat } if m.items != nil { return snapshottypes.SnapshotItem{}, errors.New("already has contents") @@ -128,7 +131,7 @@ func (m *mockSnapshotter) Restore( func (m *mockSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) error { for _, item := range m.items { - if err := types.WriteExtensionItem(protoWriter, item); err != nil { + if err := snapshottypes.WriteExtensionItem(protoWriter, item); err != nil { return err } } @@ -138,28 +141,38 @@ func (m *mockSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) er func (m *mockSnapshotter) SnapshotFormat() uint32 { return snapshottypes.CurrentFormat } + func (m *mockSnapshotter) SupportedFormats() []uint32 { return []uint32{snapshottypes.CurrentFormat} } +func (m *mockSnapshotter) PruneSnapshotHeight(height int64) { + m.prunedHeights[height] = struct{}{} +} + +func (m *mockSnapshotter) GetSnapshotInterval() uint64 { + return m.snapshotInterval +} + +func (m *mockSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { + m.snapshotInterval = snapshotInterval +} + // setupBusyManager creates a manager with an empty store that is busy creating a snapshot at height 1. // The snapshot will complete when the returned closer is called. func setupBusyManager(t *testing.T) *snapshots.Manager { - // os.MkdirTemp() is used instead of testing.T.TempDir() - // see https://github.com/cosmos/cosmos-sdk/pull/8475 for - // this change's rationale. - tempdir, err := os.MkdirTemp("", "") - require.NoError(t, err) - t.Cleanup(func() { _ = os.RemoveAll(tempdir) }) - - store, err := snapshots.NewStore(db.NewMemDB(), tempdir) + store, err := snapshots.NewStore(db.NewMemDB(), testutil.GetTempDir(t)) require.NoError(t, err) hung := newHungSnapshotter() - mgr := snapshots.NewManager(store, hung, nil) + hung.SetSnapshotInterval(opts.Interval) + mgr := snapshots.NewManager(store, opts, hung, nil, log.NewNopLogger()) + require.Equal(t, opts.Interval, hung.snapshotInterval) go func() { _, err := mgr.Create(1) require.NoError(t, err) + _, didPruneHeight := hung.prunedHeights[1] + require.True(t, didPruneHeight) }() time.Sleep(10 * time.Millisecond) t.Cleanup(hung.Close) @@ -169,12 +182,15 @@ func setupBusyManager(t *testing.T) *snapshots.Manager { // hungSnapshotter can be used to test operations in progress. Call close to end the snapshot. type hungSnapshotter struct { - ch chan struct{} + ch chan struct{} + prunedHeights map[int64]struct{} + snapshotInterval uint64 } func newHungSnapshotter() *hungSnapshotter { return &hungSnapshotter{ - ch: make(chan struct{}), + ch: make(chan struct{}), + prunedHeights: make(map[int64]struct{}), } } @@ -187,6 +203,14 @@ func (m *hungSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) er return nil } +func (m *hungSnapshotter) PruneSnapshotHeight(height int64) { + m.prunedHeights[height] = struct{}{} +} + +func (m *hungSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { + m.snapshotInterval = snapshotInterval +} + func (m *hungSnapshotter) Restore( height uint64, format uint32, protoReader protoio.Reader, ) (snapshottypes.SnapshotItem, error) { diff --git a/snapshots/manager.go b/snapshots/manager.go index bdcbfe0a9357..dbca39ea2be7 100644 --- a/snapshots/manager.go +++ b/snapshots/manager.go @@ -3,36 +3,19 @@ package snapshots import ( "bytes" "crypto/sha256" + "errors" "fmt" "io" "math" "sort" "sync" + "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/snapshots/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -const ( - opNone operation = "" - opSnapshot operation = "snapshot" - opPrune operation = "prune" - opRestore operation = "restore" - - chunkBufferSize = 4 - - snapshotMaxItemSize = int(64e6) // SDK has no key/value size limit, so we set an arbitrary limit -) - -// operation represents a Manager operation. Only one operation can be in progress at a time. -type operation string - -// restoreDone represents the result of a restore operation. -type restoreDone struct { - complete bool // if true, restore completed successfully (not prematurely) - err error // if non-nil, restore errored -} - // Manager manages snapshot and restore operations for an app, making sure only a single // long-running operation is in progress at any given time, and provides convenience methods // mirroring the ABCI interface. @@ -47,9 +30,13 @@ type restoreDone struct { // 2) io.ReadCloser streams automatically propagate IO errors, and can pass arbitrary // errors via io.Pipe.CloseWithError(). type Manager struct { - store *Store - multistore types.Snapshotter extensions map[string]types.ExtensionSnapshotter + // store is the snapshot store where all completed snapshots are persisted. + store *Store + opts types.SnapshotOptions + // multistore is the store from which snapshots are taken. + multistore types.Snapshotter + logger log.Logger mtx sync.Mutex operation operation @@ -59,12 +46,39 @@ type Manager struct { restoreChunkIndex uint32 } +// operation represents a Manager operation. Only one operation can be in progress at a time. +type operation string + +// restoreDone represents the result of a restore operation. +type restoreDone struct { + complete bool // if true, restore completed successfully (not prematurely) + err error // if non-nil, restore errored +} + +const ( + opNone operation = "" + opSnapshot operation = "snapshot" + opPrune operation = "prune" + opRestore operation = "restore" + + chunkBufferSize = 4 + + snapshotMaxItemSize = int(64e6) // SDK has no key/value size limit, so we set an arbitrary limit +) + +var ErrOptsZeroSnapshotInterval = errors.New("snaphot-interval must not be 0") + // NewManager creates a new manager. -func NewManager(store *Store, multistore types.Snapshotter, extensions map[string]types.ExtensionSnapshotter) *Manager { +func NewManager(store *Store, opts types.SnapshotOptions, multistore types.Snapshotter, extensions map[string]types.ExtensionSnapshotter, logger log.Logger) *Manager { + if extensions == nil { + extensions = map[string]types.ExtensionSnapshotter{} + } return &Manager{ store: store, + opts: opts, multistore: multistore, extensions: extensions, + logger: logger, } } @@ -121,15 +135,22 @@ func (m *Manager) endLocked() { m.restoreChunkIndex = 0 } -// sortedExtensionNames sort extension names for deterministic iteration. -func (m *Manager) sortedExtensionNames() []string { - names := make([]string, 0, len(m.extensions)) - for name := range m.extensions { - names = append(names, name) - } +// GetInterval returns snapshot interval represented in heights. +func (m *Manager) GetInterval() uint64 { + return m.opts.Interval +} - sort.Strings(names) - return names +// GetKeepRecent returns snapshot keep-recent represented in heights. +func (m *Manager) GetKeepRecent() uint32 { + return m.opts.KeepRecent +} + +// GetSnapshotBlockRetentionHeights returns the number of heights needed +// for block retention. Blocks since the oldest available snapshot must be +// available for state sync nodes to catch up (oldest because a node may be +// restoring an old snapshot while a new snapshot was taken). +func (m *Manager) GetSnapshotBlockRetentionHeights() int64 { + return int64(m.opts.Interval * uint64(m.opts.KeepRecent)) } // Create creates a snapshot and returns its metadata. @@ -137,6 +158,9 @@ func (m *Manager) Create(height uint64) (*types.Snapshot, error) { if m == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "no snapshot store configured") } + + defer m.multistore.PruneSnapshotHeight(int64(height)) + err := m.begin(opSnapshot) if err != nil { return nil, err @@ -166,7 +190,12 @@ func (m *Manager) createSnapshot(height uint64, ch chan<- io.ReadCloser) { if streamWriter == nil { return } - defer streamWriter.Close() + defer func() { + if err := streamWriter.Close(); err != nil { + streamWriter.CloseWithError(err) + } + }() + if err := m.multistore.Snapshot(height, streamWriter); err != nil { streamWriter.CloseWithError(err) return @@ -362,6 +391,17 @@ func (m *Manager) RestoreChunk(chunk []byte) (bool, error) { return false, nil } +// sortedExtensionNames sort extension names for deterministic iteration. +func (m *Manager) sortedExtensionNames() []string { + names := make([]string, 0, len(m.extensions)) + for name := range m.extensions { + names = append(names, name) + } + + sort.Strings(names) + return names +} + // IsFormatSupported returns if the snapshotter supports restoration from given format. func IsFormatSupported(snapshotter types.ExtensionSnapshotter, format uint32) bool { for _, i := range snapshotter.SupportedFormats() { @@ -371,3 +411,50 @@ func IsFormatSupported(snapshotter types.ExtensionSnapshotter, format uint32) bo } return false } + +// SnapshotIfApplicable takes a snapshot of the current state if we are on a snapshot height. +// It also prunes any old snapshots. +func (m *Manager) SnapshotIfApplicable(height int64) { + if m == nil { + return + } + if !m.shouldTakeSnapshot(height) { + m.logger.Debug("snapshot is skipped", "height", height) + return + } + m.snapshot(height) +} + +// shouldTakeSnapshot returns true is snapshot should be taken at height. +func (m *Manager) shouldTakeSnapshot(height int64) bool { + return m.opts.Interval > 0 && uint64(height)%m.opts.Interval == 0 +} + +func (m *Manager) snapshot(height int64) { + m.logger.Info("creating state snapshot", "height", height) + + if height <= 0 { + m.logger.Error("snapshot height must be positive", "height", height) + return + } + + snapshot, err := m.Create(uint64(height)) + if err != nil { + m.logger.Error("failed to create state snapshot", "height", height, "err", err) + return + } + + m.logger.Info("completed state snapshot", "height", height, "format", snapshot.Format) + + if m.opts.KeepRecent > 0 { + m.logger.Debug("pruning state snapshots") + + pruned, err := m.Prune(m.opts.KeepRecent) + if err != nil { + m.logger.Error("Failed to prune state snapshots", "err", err) + return + } + + m.logger.Debug("pruned state snapshots", "pruned", pruned) + } +} diff --git a/snapshots/manager_test.go b/snapshots/manager_test.go index 0989bb4bd210..7fbddd6c7d6d 100644 --- a/snapshots/manager_test.go +++ b/snapshots/manager_test.go @@ -6,14 +6,20 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/snapshots/types" ) +var opts = types.NewSnapshotOptions(1500, 2) + func TestManager_List(t *testing.T) { store := setupStore(t) - manager := snapshots.NewManager(store, nil, nil) + snapshotter := &mockSnapshotter{} + snapshotter.SetSnapshotInterval(opts.Interval) + manager := snapshots.NewManager(store, opts, snapshotter, nil, log.NewNopLogger()) + require.Equal(t, opts.Interval, snapshotter.GetSnapshotInterval()) mgrList, err := manager.List() require.NoError(t, err) @@ -32,7 +38,7 @@ func TestManager_List(t *testing.T) { func TestManager_LoadChunk(t *testing.T) { store := setupStore(t) - manager := snapshots.NewManager(store, nil, nil) + manager := snapshots.NewManager(store, opts, &mockSnapshotter{}, nil, log.NewNopLogger()) // Existing chunk should return body chunk, err := manager.LoadChunk(2, 1, 1) @@ -59,10 +65,11 @@ func TestManager_Take(t *testing.T) { {7, 8, 9}, } snapshotter := &mockSnapshotter{ - items: items, + items: items, + prunedHeights: make(map[int64]struct{}), } expectChunks := snapshotItems(items) - manager := snapshots.NewManager(store, snapshotter, nil) + manager := snapshots.NewManager(store, opts, snapshotter, nil, log.NewNopLogger()) // nil manager should return error _, err := (*snapshots.Manager)(nil).Create(1) @@ -71,10 +78,15 @@ func TestManager_Take(t *testing.T) { // creating a snapshot at a lower height than the latest should error _, err = manager.Create(3) require.Error(t, err) + _, didPruneHeight := snapshotter.prunedHeights[3] + require.True(t, didPruneHeight) // creating a snapshot at a higher height should be fine, and should return it snapshot, err := manager.Create(5) require.NoError(t, err) + _, didPruneHeight = snapshotter.prunedHeights[5] + require.True(t, didPruneHeight) + assert.Equal(t, &types.Snapshot{ Height: 5, Format: snapshotter.SnapshotFormat(), @@ -98,7 +110,9 @@ func TestManager_Take(t *testing.T) { func TestManager_Prune(t *testing.T) { store := setupStore(t) - manager := snapshots.NewManager(store, nil, nil) + snapshotter := &mockSnapshotter{} + snapshotter.SetSnapshotInterval(opts.Interval) + manager := snapshots.NewManager(store, opts, snapshotter, nil, log.NewNopLogger()) pruned, err := manager.Prune(2) require.NoError(t, err) @@ -116,8 +130,10 @@ func TestManager_Prune(t *testing.T) { func TestManager_Restore(t *testing.T) { store := setupStore(t) - target := &mockSnapshotter{} - manager := snapshots.NewManager(store, target, nil) + target := &mockSnapshotter{ + prunedHeights: make(map[int64]struct{}), + } + manager := snapshots.NewManager(store, opts, target, nil, log.NewNopLogger()) expectItems := [][]byte{ {1, 2, 3}, @@ -165,6 +181,8 @@ func TestManager_Restore(t *testing.T) { // While the restore is in progress, any other operations fail _, err = manager.Create(4) require.Error(t, err) + _, didPruneHeight := target.prunedHeights[4] + require.True(t, didPruneHeight) _, err = manager.Prune(1) require.Error(t, err) diff --git a/snapshots/store.go b/snapshots/store.go index 77ff58e22ff6..8105938b80f1 100644 --- a/snapshots/store.go +++ b/snapshots/store.go @@ -36,7 +36,7 @@ func NewStore(db db.DB, dir string) (*Store, error) { if dir == "" { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "snapshot directory not given") } - err := os.MkdirAll(dir, 0755) + err := os.MkdirAll(dir, 0o755) if err != nil { return nil, sdkerrors.Wrapf(err, "failed to create snapshot directory %q", dir) } @@ -145,13 +145,13 @@ func (s *Store) Load(height uint64, format uint32) (*types.Snapshot, <-chan io.R ch <- pr chunk, err := s.loadChunkFile(height, format, i) if err != nil { - pw.CloseWithError(err) + _ = pw.CloseWithError(err) return } defer chunk.Close() _, err = io.Copy(pw, chunk) if err != nil { - pw.CloseWithError(err) + _ = pw.CloseWithError(err) return } chunk.Close() @@ -261,7 +261,7 @@ func (s *Store) Save( for chunkBody := range chunks { defer chunkBody.Close() // nolint: staticcheck dir := s.pathSnapshot(height, format) - err = os.MkdirAll(dir, 0755) + err = os.MkdirAll(dir, 0o755) if err != nil { return nil, sdkerrors.Wrapf(err, "failed to create snapshot directory %q", dir) } diff --git a/snapshots/store_test.go b/snapshots/store_test.go index 77ff32a3c465..b2a8354bb2b9 100644 --- a/snapshots/store_test.go +++ b/snapshots/store_test.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "io" - "os" "path/filepath" "testing" "time" @@ -19,14 +18,7 @@ import ( ) func setupStore(t *testing.T) *snapshots.Store { - // os.MkdirTemp() is used instead of testing.T.TempDir() - // see https://github.com/cosmos/cosmos-sdk/pull/8475 for - // this change's rationale. - tempdir, err := os.MkdirTemp("", "") - require.NoError(t, err) - t.Cleanup(func() { _ = os.RemoveAll(tempdir) }) - - store, err := snapshots.NewStore(db.NewMemDB(), tempdir) + store, err := snapshots.NewStore(db.NewMemDB(), testutil.GetTempDir(t)) require.NoError(t, err) _, err = store.Save(1, 1, makeChunks([][]byte{ @@ -88,7 +80,10 @@ func TestStore_Delete(t *testing.T) { // Deleting a snapshot being saved should error ch := make(chan io.ReadCloser) - go store.Save(9, 1, ch) + go func() { + _, err := store.Save(9, 1, ch) + require.NoError(t, err) + }() time.Sleep(10 * time.Millisecond) err = store.Delete(9, 1) @@ -119,7 +114,8 @@ func TestStore_Get(t *testing.T) { Hash: hash([][]byte{{2, 1, 0}, {2, 1, 1}}), Metadata: types.Metadata{ ChunkHashes: checksums([][]byte{ - {2, 1, 0}, {2, 1, 1}}), + {2, 1, 0}, {2, 1, 1}, + }), }, }, snapshot) } @@ -154,16 +150,20 @@ func TestStore_List(t *testing.T) { require.NoError(t, err) require.Equal(t, []*types.Snapshot{ - {Height: 3, Format: 2, Chunks: 3, Hash: hash([][]byte{{3, 2, 0}, {3, 2, 1}, {3, 2, 2}}), + { + Height: 3, Format: 2, Chunks: 3, Hash: hash([][]byte{{3, 2, 0}, {3, 2, 1}, {3, 2, 2}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{3, 2, 0}, {3, 2, 1}, {3, 2, 2}})}, }, - {Height: 2, Format: 2, Chunks: 3, Hash: hash([][]byte{{2, 2, 0}, {2, 2, 1}, {2, 2, 2}}), + { + Height: 2, Format: 2, Chunks: 3, Hash: hash([][]byte{{2, 2, 0}, {2, 2, 1}, {2, 2, 2}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{2, 2, 0}, {2, 2, 1}, {2, 2, 2}})}, }, - {Height: 2, Format: 1, Chunks: 2, Hash: hash([][]byte{{2, 1, 0}, {2, 1, 1}}), + { + Height: 2, Format: 1, Chunks: 2, Hash: hash([][]byte{{2, 1, 0}, {2, 1, 1}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{2, 1, 0}, {2, 1, 1}})}, }, - {Height: 1, Format: 1, Chunks: 2, Hash: hash([][]byte{{1, 1, 0}, {1, 1, 1}}), + { + Height: 1, Format: 1, Chunks: 2, Hash: hash([][]byte{{1, 1, 0}, {1, 1, 1}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{1, 1, 0}, {1, 1, 1}})}, }, }, snapshots) @@ -187,7 +187,8 @@ func TestStore_Load(t *testing.T) { Hash: hash([][]byte{{2, 1, 0}, {2, 1, 1}}), Metadata: types.Metadata{ ChunkHashes: checksums([][]byte{ - {2, 1, 0}, {2, 1, 1}}), + {2, 1, 0}, {2, 1, 1}, + }), }, }, snapshot) @@ -245,13 +246,16 @@ func TestStore_Prune(t *testing.T) { snapshots, err = store.List() require.NoError(t, err) require.Equal(t, []*types.Snapshot{ - {Height: 3, Format: 2, Chunks: 3, Hash: hash([][]byte{{3, 2, 0}, {3, 2, 1}, {3, 2, 2}}), + { + Height: 3, Format: 2, Chunks: 3, Hash: hash([][]byte{{3, 2, 0}, {3, 2, 1}, {3, 2, 2}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{3, 2, 0}, {3, 2, 1}, {3, 2, 2}})}, }, - {Height: 2, Format: 2, Chunks: 3, Hash: hash([][]byte{{2, 2, 0}, {2, 2, 1}, {2, 2, 2}}), + { + Height: 2, Format: 2, Chunks: 3, Hash: hash([][]byte{{2, 2, 0}, {2, 2, 1}, {2, 2, 2}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{2, 2, 0}, {2, 2, 1}, {2, 2, 2}})}, }, - {Height: 2, Format: 1, Chunks: 2, Hash: hash([][]byte{{2, 1, 0}, {2, 1, 1}}), + { + Height: 2, Format: 1, Chunks: 2, Hash: hash([][]byte{{2, 1, 0}, {2, 1, 1}}), Metadata: types.Metadata{ChunkHashes: checksums([][]byte{{2, 1, 0}, {2, 1, 1}})}, }, }, snapshots) @@ -324,7 +328,10 @@ func TestStore_Save(t *testing.T) { // Saving a snapshot should error if a snapshot is already in progress for the same height, // regardless of format. However, a different height should succeed. ch = make(chan io.ReadCloser) - go store.Save(7, 1, ch) + go func() { + _, err := store.Save(7, 1, ch) + require.NoError(t, err) + }() time.Sleep(10 * time.Millisecond) _, err = store.Save(7, 2, makeChunks(nil)) require.Error(t, err) diff --git a/snapshots/stream.go b/snapshots/stream.go index 80cd5c3dfdcb..935028313bb5 100644 --- a/snapshots/stream.go +++ b/snapshots/stream.go @@ -103,7 +103,15 @@ func (sr *StreamReader) ReadMsg(msg proto.Message) error { // Close implements io.Closer interface func (sr *StreamReader) Close() error { - sr.protoReader.Close() - sr.zReader.Close() - return sr.chunkReader.Close() + var err error + if err1 := sr.protoReader.Close(); err1 != nil { + err = err1 + } + if err2 := sr.zReader.Close(); err2 != nil { + err = err2 + } + if err3 := sr.chunkReader.Close(); err3 != nil { + err = err3 + } + return err } diff --git a/snapshots/types/options.go b/snapshots/types/options.go new file mode 100644 index 000000000000..1ce39d486adb --- /dev/null +++ b/snapshots/types/options.go @@ -0,0 +1,22 @@ +package types + +// SnapshotOptions defines the snapshot strategy used when determining which +// heights are snapshotted for state sync. +type SnapshotOptions struct { + // Interval defines at which heights the snapshot is taken. + Interval uint64 + + // KeepRecent defines how many snapshots to keep in heights. + KeepRecent uint32 +} + +// SnapshotIntervalOff represents the snapshot interval, at which +// no snapshots are taken. +const SnapshotIntervalOff uint64 = 0 + +func NewSnapshotOptions(interval uint64, keepRecent uint32) SnapshotOptions { + return SnapshotOptions{ + Interval: interval, + KeepRecent: keepRecent, + } +} diff --git a/snapshots/types/snapshot.pb.go b/snapshots/types/snapshot.pb.go index fa3f5e2a8633..703e9769e9cb 100644 --- a/snapshots/types/snapshot.pb.go +++ b/snapshots/types/snapshot.pb.go @@ -146,6 +146,8 @@ func (m *Metadata) GetChunkHashes() [][]byte { } // SnapshotItem is an item contained in a rootmulti.Store snapshot. +// +// Since: cosmos-sdk 0.46 type SnapshotItem struct { // item is the specific type of snapshot item. // @@ -286,6 +288,8 @@ func (*SnapshotItem) XXX_OneofWrappers() []interface{} { } // SnapshotStoreItem contains metadata about a snapshotted store. +// +// Since: cosmos-sdk 0.46 type SnapshotStoreItem struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -331,6 +335,8 @@ func (m *SnapshotStoreItem) GetName() string { } // SnapshotIAVLItem is an exported IAVL node. +// +// Since: cosmos-sdk 0.46 type SnapshotIAVLItem struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` @@ -402,6 +408,8 @@ func (m *SnapshotIAVLItem) GetHeight() int32 { } // SnapshotExtensionMeta contains metadata about an external snapshotter. +// +// Since: cosmos-sdk 0.46 type SnapshotExtensionMeta struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` @@ -455,6 +463,8 @@ func (m *SnapshotExtensionMeta) GetFormat() uint32 { } // SnapshotExtensionPayload contains payloads of an external snapshotter. +// +// Since: cosmos-sdk 0.46 type SnapshotExtensionPayload struct { Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` } @@ -500,6 +510,8 @@ func (m *SnapshotExtensionPayload) GetPayload() []byte { } // SnapshotKVItem is an exported Key/Value Pair +// +// Since: cosmos-sdk 0.46 type SnapshotKVItem struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` @@ -553,6 +565,8 @@ func (m *SnapshotKVItem) GetValue() []byte { } // SnapshotSchema is an exported schema of smt store +// +// Since: cosmos-sdk 0.46 type SnapshotSchema struct { Keys [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` } diff --git a/snapshots/types/snapshotter.go b/snapshots/types/snapshotter.go index f747920d13ad..76f800484a49 100644 --- a/snapshots/types/snapshotter.go +++ b/snapshots/types/snapshotter.go @@ -11,7 +11,18 @@ type Snapshotter interface { // Snapshot writes snapshot items into the protobuf writer. Snapshot(height uint64, protoWriter protoio.Writer) error - // Restore restores a state snapshot from the protobuf items read from the reader. + // PruneSnapshotHeight prunes the given height according to the prune strategy. + // If PruneNothing, this is a no-op. + // If other strategy, this height is persisted until it is + // less than - KeepRecent and % Interval == 0 + PruneSnapshotHeight(height int64) + + // SetSnapshotInterval sets the interval at which the snapshots are taken. + // It is used by the store that implements the Snapshotter interface + // to determine which heights to retain until after the snapshot is complete. + SetSnapshotInterval(snapshotInterval uint64) + + // Restore restores a state snapshot, taking snapshot chunk readers as input. // If the ready channel is non-nil, it returns a ready signal (by being closed) once the // restorer is ready to accept chunks. Restore(height uint64, format uint32, protoReader protoio.Reader) (SnapshotItem, error) diff --git a/store/README.md b/store/README.md index 3b1c81a0595a..115f9816be93 100644 --- a/store/README.md +++ b/store/README.md @@ -56,7 +56,7 @@ type Store struct { 2. Iteration efficiently returns the sorted elements within the range 3. Each tree version is immutable and can be retrieved even after a commit(depending on the pruning settings) -Specification and implementation of IAVL tree can be found in https://github.com/tendermint/iavl. +Specification and implementation of IAVL tree can be found in https://github.com/cosmos/iavl. ## GasKV diff --git a/store/cachekv/memiterator.go b/store/cachekv/memiterator.go index 04df40ff56aa..e65e8a580fce 100644 --- a/store/cachekv/memiterator.go +++ b/store/cachekv/memiterator.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/types" ) -// Iterates over iterKVCache items. +// memIterator iterates over iterKVCache items. // if key is nil, means it was deleted. // Implements Iterator. type memIterator struct { diff --git a/store/cachekv/store.go b/store/cachekv/store.go index 68fe7213dbfa..28063504b208 100644 --- a/store/cachekv/store.go +++ b/store/cachekv/store.go @@ -15,14 +15,16 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" ) -// If value is nil but deleted is false, it means the parent doesn't have the -// key. (No need to delete upon Write()) +// cValue represents a cached value. +// If dirty is true, it indicates the cached value is different from the underlying value. type cValue struct { value []byte dirty bool } // Store wraps an in-memory cache around an underlying types.KVStore. +// If a cached value is nil but deleted is defined for the corresponding key, +// it means the parent doesn't have the key. (No need to delete upon Write()) type Store struct { mtx sync.Mutex cache map[string]*cValue diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index 0404f33f2a28..d589932d30fc 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -112,7 +112,7 @@ func TestCacheKVIteratorBounds(t *testing.T) { // iterate over all of them itr := st.Iterator(nil, nil) - var i = 0 + i := 0 for ; itr.Valid(); itr.Next() { k, v := itr.Key(), itr.Value() require.Equal(t, keyFmt(i), k) @@ -380,7 +380,7 @@ func doRandomOp(t *testing.T, st types.CacheKVStore, truth dbm.DB, maxKey int) { // iterate over whole domain func assertIterateDomain(t *testing.T, st types.KVStore, expectedN int) { itr := st.Iterator(nil, nil) - var i = 0 + i := 0 for ; itr.Valid(); itr.Next() { k, v := itr.Key(), itr.Value() require.Equal(t, keyFmt(i), k) diff --git a/store/cachemulti/store.go b/store/cachemulti/store.go index 8e11ccee0dca..2e39554e17ce 100644 --- a/store/cachemulti/store.go +++ b/store/cachemulti/store.go @@ -77,7 +77,6 @@ func NewStore( db dbm.DB, stores map[types.StoreKey]types.CacheWrapper, keys map[string]types.StoreKey, traceWriter io.Writer, traceContext types.TraceContext, listeners map[types.StoreKey][]types.WriteListener, ) Store { - return NewFromKVStore(dbadapter.Store{DB: db}, stores, keys, traceWriter, traceContext, listeners) } diff --git a/store/firstlast.go b/store/firstlast.go index 307f932fb0c8..0ab4e319e08a 100644 --- a/store/firstlast.go +++ b/store/firstlast.go @@ -7,7 +7,7 @@ import ( sdkkv "github.com/cosmos/cosmos-sdk/types/kv" ) -// Gets the first item. +// First gets the first item. func First(st KVStore, start, end []byte) (kv sdkkv.Pair, ok bool) { iter := st.Iterator(start, end) if !iter.Valid() { @@ -18,7 +18,7 @@ func First(st KVStore, start, end []byte) (kv sdkkv.Pair, ok bool) { return sdkkv.Pair{Key: iter.Key(), Value: iter.Value()}, true } -// Gets the last item. `end` is exclusive. +// Last gets the last item. `end` is exclusive. func Last(st KVStore, start, end []byte) (kv sdkkv.Pair, ok bool) { iter := st.ReverseIterator(end, start) if !iter.Valid() { diff --git a/store/iavl/store.go b/store/iavl/store.go index a5706553668c..e8b12c47b40b 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -9,9 +9,11 @@ import ( ics23 "github.com/confio/ics23/go" "github.com/cosmos/iavl" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" dbm "github.com/tendermint/tm-db" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/cachekv" "github.com/cosmos/cosmos-sdk/store/listenkv" "github.com/cosmos/cosmos-sdk/store/tracekv" @@ -41,20 +43,35 @@ type Store struct { // LoadStore returns an IAVL Store as a CommitKVStore. Internally, it will load the // store's version (id) from the provided DB. An error is returned if the version // fails to load, or if called with a positive version on an empty tree. -func LoadStore(db dbm.DB, id types.CommitID, lazyLoading bool, cacheSize int) (types.CommitKVStore, error) { - return LoadStoreWithInitialVersion(db, id, lazyLoading, 0, cacheSize) +func LoadStore(db dbm.DB, logger log.Logger, key types.StoreKey, id types.CommitID, lazyLoading bool, cacheSize int) (types.CommitKVStore, error) { + return LoadStoreWithInitialVersion(db, logger, key, id, lazyLoading, 0, cacheSize) } // LoadStoreWithInitialVersion returns an IAVL Store as a CommitKVStore setting its initialVersion // to the one given. Internally, it will load the store's version (id) from the // provided DB. An error is returned if the version fails to load, or if called with a positive // version on an empty tree. -func LoadStoreWithInitialVersion(db dbm.DB, id types.CommitID, lazyLoading bool, initialVersion uint64, cacheSize int) (types.CommitKVStore, error) { +func LoadStoreWithInitialVersion(db dbm.DB, logger log.Logger, key types.StoreKey, id types.CommitID, lazyLoading bool, initialVersion uint64, cacheSize int) (types.CommitKVStore, error) { tree, err := iavl.NewMutableTreeWithOpts(db, cacheSize, &iavl.Options{InitialVersion: initialVersion}) if err != nil { return nil, err } + isUpgradeable, err := tree.IsUpgradeable() + if err != nil { + return nil, err + } + + if isUpgradeable && logger != nil { + logger.Info( + "Upgrading IAVL storage for faster queries + execution on live state. This may take a while", + "store_key", key.String(), + "version", initialVersion, + "commit", fmt.Sprintf("%X", id), + "is_lazy", lazyLoading, + ) + } + if lazyLoading { _, err = tree.LazyLoadVersion(id.Version) } else { @@ -65,6 +82,10 @@ func LoadStoreWithInitialVersion(db dbm.DB, id types.CommitID, lazyLoading bool, return nil, err } + if logger != nil { + logger.Debug("Finished loading IAVL tree") + } + return &Store{ tree: tree, }, nil @@ -120,21 +141,26 @@ func (st *Store) Commit() types.CommitID { // LastCommitID implements Committer. func (st *Store) LastCommitID() types.CommitID { + hash, err := st.tree.Hash() + if err != nil { + panic(err) + } + return types.CommitID{ Version: st.tree.Version(), - Hash: st.tree.Hash(), + Hash: hash, } } // SetPruning panics as pruning options should be provided at initialization // since IAVl accepts pruning options directly. -func (st *Store) SetPruning(_ types.PruningOptions) { +func (st *Store) SetPruning(_ pruningtypes.PruningOptions) { panic("cannot set pruning options on an initialized IAVL store") } // SetPruning panics as pruning options should be provided at initialization // since IAVl accepts pruning options directly. -func (st *Store) GetPruning() types.PruningOptions { +func (st *Store) GetPruning() pruningtypes.PruningOptions { panic("cannot get pruning options on an initialized IAVL store") } @@ -178,14 +204,21 @@ func (st *Store) Set(key, value []byte) { // Implements types.KVStore. func (st *Store) Get(key []byte) []byte { defer telemetry.MeasureSince(time.Now(), "store", "iavl", "get") - _, value := st.tree.Get(key) + value, err := st.tree.Get(key) + if err != nil { + panic(err) + } return value } // Implements types.KVStore. func (st *Store) Has(key []byte) (exists bool) { defer telemetry.MeasureSince(time.Now(), "store", "iavl", "has") - return st.tree.Has(key) + has, err := st.tree.Has(key) + if err != nil { + panic(err) + } + return has } // Implements types.KVStore. @@ -203,30 +236,20 @@ func (st *Store) DeleteVersions(versions ...int64) error { // Implements types.KVStore. func (st *Store) Iterator(start, end []byte) types.Iterator { - var iTree *iavl.ImmutableTree - - switch tree := st.tree.(type) { - case *immutableTree: - iTree = tree.ImmutableTree - case *iavl.MutableTree: - iTree = tree.ImmutableTree + iterator, err := st.tree.Iterator(start, end, true) + if err != nil { + panic(err) } - - return newIAVLIterator(iTree, start, end, true) + return iterator } // Implements types.KVStore. func (st *Store) ReverseIterator(start, end []byte) types.Iterator { - var iTree *iavl.ImmutableTree - - switch tree := st.tree.(type) { - case *immutableTree: - iTree = tree.ImmutableTree - case *iavl.MutableTree: - iTree = tree.ImmutableTree + iterator, err := st.tree.Iterator(start, end, false) + if err != nil { + panic(err) } - - return newIAVLIterator(iTree, start, end, false) + return iterator } // SetInitialVersion sets the initial version of the IAVL tree. It is used when @@ -301,7 +324,12 @@ func (st *Store) Query(req abci.RequestQuery) (res abci.ResponseQuery) { break } - _, res.Value = tree.GetVersioned(key, res.Height) + value, err := tree.GetVersioned(key, res.Height) + if err != nil { + panic(err) + } + res.Value = value + if !req.Prove { break } @@ -379,9 +407,9 @@ func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *tmcrypto //---------------------------------------- -// Implements types.Iterator. +// iavlIterator implements types.Iterator. type iavlIterator struct { - *iavl.Iterator + dbm.Iterator } var _ types.Iterator = (*iavlIterator)(nil) @@ -390,8 +418,12 @@ var _ types.Iterator = (*iavlIterator)(nil) // CONTRACT: Caller must release the iavlIterator, as each one creates a new // goroutine. func newIAVLIterator(tree *iavl.ImmutableTree, start, end []byte, ascending bool) *iavlIterator { + iterator, err := tree.Iterator(start, end, ascending) + if err != nil { + panic(err) + } iter := &iavlIterator{ - Iterator: tree.Iterator(start, end, ascending), + Iterator: iterator, } return iter } diff --git a/store/iavl/store_test.go b/store/iavl/store_test.go index b9c9e25ad43d..c70bedfd7e6e 100644 --- a/store/iavl/store_test.go +++ b/store/iavl/store_test.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/iavl" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store/types" @@ -58,13 +59,17 @@ func TestLoadStore(t *testing.T) { store := UnsafeNewStore(tree) // Create non-pruned height H - require.True(t, tree.Set([]byte("hello"), []byte("hallo"))) + updated, err := tree.Set([]byte("hello"), []byte("hallo")) + require.NoError(t, err) + require.True(t, updated) hash, verH, err := tree.SaveVersion() cIDH := types.CommitID{Version: verH, Hash: hash} require.Nil(t, err) // Create pruned height Hp - require.True(t, tree.Set([]byte("hello"), []byte("hola"))) + updated, err = tree.Set([]byte("hello"), []byte("hola")) + require.NoError(t, err) + require.True(t, updated) hash, verHp, err := tree.SaveVersion() cIDHp := types.CommitID{Version: verHp, Hash: hash} require.Nil(t, err) @@ -72,7 +77,9 @@ func TestLoadStore(t *testing.T) { // TODO: Prune this height // Create current height Hc - require.True(t, tree.Set([]byte("hello"), []byte("ciao"))) + updated, err = tree.Set([]byte("hello"), []byte("ciao")) + require.NoError(t, err) + require.True(t, updated) hash, verHc, err := tree.SaveVersion() cIDHc := types.CommitID{Version: verHc, Hash: hash} require.Nil(t, err) @@ -93,17 +100,17 @@ func TestLoadStore(t *testing.T) { require.Equal(t, string(hcStore.Get([]byte("hello"))), "ciao") // Querying a new store at some previous non-pruned height H - newHStore, err := LoadStore(db, cIDH, false, DefaultIAVLCacheSize) + newHStore, err := LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), cIDH, false, DefaultIAVLCacheSize) require.NoError(t, err) require.Equal(t, string(newHStore.Get([]byte("hello"))), "hallo") // Querying a new store at some previous pruned height Hp - newHpStore, err := LoadStore(db, cIDHp, false, DefaultIAVLCacheSize) + newHpStore, err := LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), cIDHp, false, DefaultIAVLCacheSize) require.NoError(t, err) require.Equal(t, string(newHpStore.Get([]byte("hello"))), "hola") // Querying a new store at current height H - newHcStore, err := LoadStore(db, cIDHc, false, DefaultIAVLCacheSize) + newHcStore, err := LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), cIDHc, false, DefaultIAVLCacheSize) require.NoError(t, err) require.Equal(t, string(newHcStore.Get([]byte("hello"))), "ciao") } @@ -113,7 +120,8 @@ func TestGetImmutable(t *testing.T) { tree, cID := newAlohaTree(t, db) store := UnsafeNewStore(tree) - require.True(t, tree.Set([]byte("hello"), []byte("adios"))) + updated, err := tree.Set([]byte("hello"), []byte("adios")) + require.True(t, updated) hash, ver, err := tree.SaveVersion() cID = types.CommitID{Version: ver, Hash: hash} require.Nil(t, err) @@ -284,7 +292,7 @@ func TestIAVLReverseIterator(t *testing.T) { iavlStore.Set([]byte{0x00, 0x02}, []byte("0 2")) iavlStore.Set([]byte{0x01}, []byte("1")) - var testReverseIterator = func(t *testing.T, start []byte, end []byte, expected []string) { + testReverseIterator := func(t *testing.T, start []byte, end []byte, expected []string) { iter := iavlStore.ReverseIterator(start, end) var i int for i = 0; iter.Valid(); iter.Next() { diff --git a/store/iavl/tree.go b/store/iavl/tree.go index c78782e49e38..210663a21509 100644 --- a/store/iavl/tree.go +++ b/store/iavl/tree.go @@ -3,6 +3,7 @@ package iavl import ( "fmt" + "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/iavl" ) @@ -17,20 +18,21 @@ type ( // implemented by an iavl.MutableTree. For an immutable IAVL tree, a wrapper // must be made. Tree interface { - Has(key []byte) bool - Get(key []byte) (index int64, value []byte) - Set(key, value []byte) bool - Remove(key []byte) ([]byte, bool) + Has(key []byte) (bool, error) + Get(key []byte) ([]byte, error) + Set(key, value []byte) (bool, error) + Remove(key []byte) ([]byte, bool, error) SaveVersion() ([]byte, int64, error) DeleteVersion(version int64) error DeleteVersions(versions ...int64) error Version() int64 - Hash() []byte + Hash() ([]byte, error) VersionExists(version int64) bool - GetVersioned(key []byte, version int64) (int64, []byte) + GetVersioned(key []byte, version int64) ([]byte, error) GetVersionedWithProof(key []byte, version int64) ([]byte, *iavl.RangeProof, error) GetImmutable(version int64) (*iavl.ImmutableTree, error) SetInitialVersion(version uint64) + Iterator(start, end []byte, ascending bool) (types.Iterator, error) AvailableVersions() []int } @@ -42,11 +44,11 @@ type ( } ) -func (it *immutableTree) Set(_, _ []byte) bool { +func (it *immutableTree) Set(_, _ []byte) (bool, error) { panic("cannot call 'Set' on an immutable IAVL tree") } -func (it *immutableTree) Remove(_ []byte) ([]byte, bool) { +func (it *immutableTree) Remove(_ []byte) ([]byte, bool, error) { panic("cannot call 'Remove' on an immutable IAVL tree") } @@ -70,9 +72,9 @@ func (it *immutableTree) VersionExists(version int64) bool { return it.Version() == version } -func (it *immutableTree) GetVersioned(key []byte, version int64) (int64, []byte) { +func (it *immutableTree) GetVersioned(key []byte, version int64) ([]byte, error) { if it.Version() != version { - return -1, nil + return nil, fmt.Errorf("version mismatch on immutable IAVL tree; got: %d, expected: %d", version, it.Version()) } return it.Get(key) diff --git a/store/iavl/tree_test.go b/store/iavl/tree_test.go index 24332b42e06a..44ba844473f2 100644 --- a/store/iavl/tree_test.go +++ b/store/iavl/tree_test.go @@ -16,10 +16,6 @@ func TestImmutableTreePanics(t *testing.T) { require.Panics(t, func() { it.Remove([]byte{}) }) require.Panics(t, func() { it.SaveVersion() }) // nolint:errcheck require.Panics(t, func() { it.DeleteVersion(int64(1)) }) // nolint:errcheck - v, _ := it.GetVersioned([]byte{0x01}, 1) - require.Equal(t, int64(-1), v) - v, _ = it.GetVersioned([]byte{0x01}, 0) - require.Equal(t, int64(0), v) val, proof, err := it.GetVersionedWithProof(nil, 1) require.Error(t, err) diff --git a/store/internal/maps/maps_test.go b/store/internal/maps/maps_test.go index 8f6b1163eaec..ce7ad72e649d 100644 --- a/store/internal/maps/maps_test.go +++ b/store/internal/maps/maps_test.go @@ -12,6 +12,7 @@ func TestEmptyKeyMerkleMap(t *testing.T) { db := newMerkleMap() require.Panics(t, func() { db.set("", []byte("value")) }, "setting an empty key should panic") } + func TestMerkleMap(t *testing.T) { tests := []struct { keys []string @@ -59,6 +60,7 @@ func TestEmptyKeySimpleMap(t *testing.T) { db := newSimpleMap() require.Panics(t, func() { db.Set("", []byte("value")) }, "setting an empty key should panic") } + func TestSimpleMap(t *testing.T) { tests := []struct { keys []string diff --git a/store/listenkv/store_test.go b/store/listenkv/store_test.go index 5d4fd0cca9c4..8d0510ba49ce 100644 --- a/store/listenkv/store_test.go +++ b/store/listenkv/store_test.go @@ -29,9 +29,11 @@ var kvPairs = []types.KVPair{ {Key: keyFmt(3), Value: valFmt(3)}, } -var testStoreKey = types.NewKVStoreKey("listen_test") -var interfaceRegistry = codecTypes.NewInterfaceRegistry() -var testMarshaller = codec.NewProtoCodec(interfaceRegistry) +var ( + testStoreKey = types.NewKVStoreKey("listen_test") + interfaceRegistry = codecTypes.NewInterfaceRegistry() + testMarshaller = codec.NewProtoCodec(interfaceRegistry) +) func newListenKVStore(w io.Writer) *listenkv.Store { store := newEmptyListenKVStore(w) @@ -130,7 +132,6 @@ func TestListenKVStoreSet(t *testing.T) { store := newEmptyListenKVStore(&buf) require.Panics(t, func() { store.Set([]byte(""), []byte("value")) }, "setting an empty key should panic") require.Panics(t, func() { store.Set(nil, []byte("value")) }, "setting a nil key should panic") - } func TestListenKVStoreDelete(t *testing.T) { diff --git a/store/mem/store.go b/store/mem/store.go index c8aa6dca5997..06d7b63f5506 100644 --- a/store/mem/store.go +++ b/store/mem/store.go @@ -5,6 +5,7 @@ import ( dbm "github.com/tendermint/tm-db" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/cachekv" "github.com/cosmos/cosmos-sdk/store/dbadapter" "github.com/cosmos/cosmos-sdk/store/listenkv" @@ -54,10 +55,12 @@ func (s Store) CacheWrapWithListeners(storeKey types.StoreKey, listeners []types // Commit performs a no-op as entries are persistent between commitments. func (s *Store) Commit() (id types.CommitID) { return } -func (s *Store) SetPruning(pruning types.PruningOptions) {} +func (s *Store) SetPruning(pruning pruningtypes.PruningOptions) {} // GetPruning is a no-op as pruning options cannot be directly set on this store. // They must be set on the root commit multi-store. -func (s *Store) GetPruning() types.PruningOptions { return types.PruningOptions{} } +func (s *Store) GetPruning() pruningtypes.PruningOptions { + return pruningtypes.NewPruningOptions(pruningtypes.PruningUndefined) +} func (s Store) LastCommitID() (id types.CommitID) { return } diff --git a/store/reexport.go b/store/reexport.go index 8a365ab758fd..5b101b4ac30f 100644 --- a/store/reexport.go +++ b/store/reexport.go @@ -6,7 +6,6 @@ import ( // Import cosmos-sdk/types/store.go for convenience. type ( - PruningOptions = types.PruningOptions Store = types.Store Committer = types.Committer CommitStore = types.CommitStore diff --git a/store/rootmulti/dbadapter.go b/store/rootmulti/dbadapter.go index 4d6e5afeb875..00ca37553823 100644 --- a/store/rootmulti/dbadapter.go +++ b/store/rootmulti/dbadapter.go @@ -3,6 +3,8 @@ package rootmulti import ( "github.com/cosmos/cosmos-sdk/store/dbadapter" "github.com/cosmos/cosmos-sdk/store/types" + + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" ) var commithash = []byte("FAKE_HASH") @@ -30,8 +32,10 @@ func (cdsa commitDBStoreAdapter) LastCommitID() types.CommitID { } } -func (cdsa commitDBStoreAdapter) SetPruning(_ types.PruningOptions) {} +func (cdsa commitDBStoreAdapter) SetPruning(_ pruningtypes.PruningOptions) {} // GetPruning is a no-op as pruning options cannot be directly set on this store. // They must be set on the root commit multi-store. -func (cdsa commitDBStoreAdapter) GetPruning() types.PruningOptions { return types.PruningOptions{} } +func (cdsa commitDBStoreAdapter) GetPruning() pruningtypes.PruningOptions { + return pruningtypes.NewPruningOptions(pruningtypes.PruningUndefined) +} diff --git a/store/rootmulti/proof_test.go b/store/rootmulti/proof_test.go index 10f8397e7284..3e5d42067d9e 100644 --- a/store/rootmulti/proof_test.go +++ b/store/rootmulti/proof_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store/iavl" @@ -14,7 +15,7 @@ import ( func TestVerifyIAVLStoreQueryProof(t *testing.T) { // Create main tree for testing. db := dbm.NewMemDB() - iStore, err := iavl.LoadStore(db, types.CommitID{}, false, iavl.DefaultIAVLCacheSize) + iStore, err := iavl.LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), types.CommitID{}, false, iavl.DefaultIAVLCacheSize) store := iStore.(*iavl.Store) require.Nil(t, err) store.Set([]byte("MYKEY"), []byte("MYVALUE")) @@ -57,7 +58,7 @@ func TestVerifyIAVLStoreQueryProof(t *testing.T) { func TestVerifyMultiStoreQueryProof(t *testing.T) { // Create main tree for testing. db := dbm.NewMemDB() - store := NewStore(db) + store := NewStore(db, log.NewNopLogger()) iavlStoreKey := types.NewKVStoreKey("iavlStoreKey") store.MountStoreWithDB(iavlStoreKey, types.StoreTypeIAVL, nil) @@ -112,7 +113,7 @@ func TestVerifyMultiStoreQueryProof(t *testing.T) { func TestVerifyMultiStoreQueryProofAbsence(t *testing.T) { // Create main tree for testing. db := dbm.NewMemDB() - store := NewStore(db) + store := NewStore(db, log.NewNopLogger()) iavlStoreKey := types.NewKVStoreKey("iavlStoreKey") store.MountStoreWithDB(iavlStoreKey, types.StoreTypeIAVL, nil) diff --git a/store/rootmulti/snapshot_test.go b/store/rootmulti/snapshot_test.go index 92e1311fdd81..bad1603da7c9 100644 --- a/store/rootmulti/snapshot_test.go +++ b/store/rootmulti/snapshot_test.go @@ -18,11 +18,12 @@ import ( "github.com/cosmos/cosmos-sdk/store/iavl" "github.com/cosmos/cosmos-sdk/store/rootmulti" "github.com/cosmos/cosmos-sdk/store/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" ) func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *rootmulti.Store { - multiStore := rootmulti.NewStore(db) + multiStore := rootmulti.NewStore(db, log.NewNopLogger()) r := rand.New(rand.NewSource(49872768940)) // Fixed seed for deterministic tests keys := []*types.KVStoreKey{} @@ -54,7 +55,7 @@ func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) * } func newMultiStoreWithMixedMounts(db dbm.DB) *rootmulti.Store { - store := rootmulti.NewStore(db) + store := rootmulti.NewStore(db, log.NewNopLogger()) store.MountStoreWithDB(types.NewKVStoreKey("iavl1"), types.StoreTypeIAVL, nil) store.MountStoreWithDB(types.NewKVStoreKey("iavl2"), types.StoreTypeIAVL, nil) store.MountStoreWithDB(types.NewKVStoreKey("iavl3"), types.StoreTypeIAVL, nil) @@ -234,7 +235,7 @@ func benchmarkMultistoreSnapshot(b *testing.B, stores uint8, storeKeys uint64) { b.StartTimer() for i := 0; i < b.N; i++ { - target := rootmulti.NewStore(dbm.NewMemDB()) + target := rootmulti.NewStore(dbm.NewMemDB(), log.NewNopLogger()) for _, key := range source.StoreKeysByName() { target.MountStoreWithDB(key, types.StoreTypeIAVL, nil) } @@ -269,7 +270,7 @@ func benchmarkMultistoreSnapshotRestore(b *testing.B, stores uint8, storeKeys ui b.StartTimer() for i := 0; i < b.N; i++ { - target := rootmulti.NewStore(dbm.NewMemDB()) + target := rootmulti.NewStore(dbm.NewMemDB(), log.NewNopLogger()) for _, key := range source.StoreKeysByName() { target.MountStoreWithDB(key, types.StoreTypeIAVL, nil) } diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 2157e6bd287c..d8f02059bac5 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -1,7 +1,6 @@ package rootmulti import ( - "encoding/binary" "fmt" "io" "math" @@ -14,8 +13,11 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/pruning" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store/cachemulti" "github.com/cosmos/cosmos-sdk/store/dbadapter" @@ -30,7 +32,6 @@ import ( const ( latestVersionKey = "s/latest" - pruneHeightsKey = "s/pruneheights" commitInfoKeyFmt = "s/%d" // s/ ) @@ -39,14 +40,14 @@ const ( // the CommitMultiStore interface. type Store struct { db dbm.DB + logger log.Logger lastCommitInfo *types.CommitInfo - pruningOpts types.PruningOptions + pruningManager *pruning.Manager iavlCacheSize int storesParams map[types.StoreKey]storeParams stores map[types.StoreKey]types.CommitKVStore keysByName map[string]types.StoreKey lazyLoading bool - pruneHeights []int64 initialVersion int64 removalMap map[types.StoreKey]bool @@ -68,30 +69,36 @@ var ( // store will be created with a PruneNothing pruning strategy by default. After // a store is created, KVStores must be mounted and finally LoadLatestVersion or // LoadVersion must be called. -func NewStore(db dbm.DB) *Store { +func NewStore(db dbm.DB, logger log.Logger) *Store { return &Store{ - db: db, - pruningOpts: types.PruneNothing, - iavlCacheSize: iavl.DefaultIAVLCacheSize, - storesParams: make(map[types.StoreKey]storeParams), - stores: make(map[types.StoreKey]types.CommitKVStore), - keysByName: make(map[string]types.StoreKey), - pruneHeights: make([]int64, 0), - listeners: make(map[types.StoreKey][]types.WriteListener), - removalMap: make(map[types.StoreKey]bool), + db: db, + logger: logger, + iavlCacheSize: iavl.DefaultIAVLCacheSize, + storesParams: make(map[types.StoreKey]storeParams), + stores: make(map[types.StoreKey]types.CommitKVStore), + keysByName: make(map[string]types.StoreKey), + listeners: make(map[types.StoreKey][]types.WriteListener), + removalMap: make(map[types.StoreKey]bool), + pruningManager: pruning.NewManager(db, logger), } } // GetPruning fetches the pruning strategy from the root store. -func (rs *Store) GetPruning() types.PruningOptions { - return rs.pruningOpts +func (rs *Store) GetPruning() pruningtypes.PruningOptions { + return rs.pruningManager.GetOptions() } // SetPruning sets the pruning strategy on the root store and all the sub-stores. // Note, calling SetPruning on the root store prior to LoadVersion or // LoadLatestVersion performs a no-op as the stores aren't mounted yet. -func (rs *Store) SetPruning(pruningOpts types.PruningOptions) { - rs.pruningOpts = pruningOpts +func (rs *Store) SetPruning(pruningOpts pruningtypes.PruningOptions) { + rs.pruningManager.SetOptions(pruningOpts) +} + +// SetSnapshotInterval sets the interval at which the snapshots are taken. +// It is used by the store to determine which heights to retain until after the snapshot is complete. +func (rs *Store) SetSnapshotInterval(snapshotInterval uint64) { + rs.pruningManager.SetSnapshotInterval(snapshotInterval) } func (rs *Store) SetIAVLCacheSize(cacheSize int) { @@ -195,7 +202,7 @@ func (rs *Store) loadVersion(ver int64, upgrades *types.StoreUpgrades) error { } // load each Store (note this doesn't panic on unmounted keys now) - var newStores = make(map[types.StoreKey]types.CommitKVStore) + newStores := make(map[types.StoreKey]types.CommitKVStore) storesKeys := make([]types.StoreKey, 0, len(rs.storesParams)) @@ -262,9 +269,8 @@ func (rs *Store) loadVersion(ver int64, upgrades *types.StoreUpgrades) error { rs.stores = newStores // load any pruned heights we missed from disk to be pruned on the next run - ph, err := getPruningHeights(rs.db) - if err == nil && len(ph) > 0 { - rs.pruneHeights = ph + if err := rs.pruningManager.LoadPruningHeights(rs.db); err != nil { + return err } return nil @@ -309,6 +315,14 @@ func moveKVStoreData(oldDB types.KVStore, newDB types.KVStore) error { return deleteKVStore(oldDB) } +// PruneSnapshotHeight prunes the given height according to the prune strategy. +// If PruneNothing, this is a no-op. +// If other strategy, this height is persisted until it is +// less than - KeepRecent and % Interval == 0 +func (rs *Store) PruneSnapshotHeight(height int64) { + rs.pruningManager.HandleHeightSnapshot(height) +} + // SetInterBlockCache sets the Store's internal inter-block (persistent) cache. // When this is defined, all CommitKVStores will be wrapped with their respective // inter-block cache. @@ -391,7 +405,6 @@ func (rs *Store) Commit() types.CommitID { // This case means that no commit has been made in the store, we // start from initialVersion. version = rs.initialVersion - } else { // This case can means two things: // - either there was already a previous commit in the store, in which @@ -403,6 +416,7 @@ func (rs *Store) Commit() types.CommitID { } rs.lastCommitInfo = commitStores(version, rs.stores, rs.removalMap) + defer rs.flushMetadata(rs.db, version, rs.lastCommitInfo) // remove remnants of removed stores for sk := range rs.removalMap { @@ -412,54 +426,19 @@ func (rs *Store) Commit() types.CommitID { delete(rs.keysByName, sk.Name()) } } - // reset the removalMap rs.removalMap = make(map[types.StoreKey]bool) - // Determine if pruneHeight height needs to be added to the list of heights to - // be pruned, where pruneHeight = (commitHeight - 1) - KeepRecent. - if rs.pruningOpts.Interval > 0 && int64(rs.pruningOpts.KeepRecent) < previousHeight { - pruneHeight := previousHeight - int64(rs.pruningOpts.KeepRecent) - rs.pruneHeights = append(rs.pruneHeights, pruneHeight) - } - - // batch prune if the current height is a pruning interval height - if rs.pruningOpts.Interval > 0 && version%int64(rs.pruningOpts.Interval) == 0 { - rs.pruneStores() + if err := rs.handlePruning(version); err != nil { + panic(err) } - flushMetadata(rs.db, version, rs.lastCommitInfo, rs.pruneHeights) - return types.CommitID{ Version: version, Hash: rs.lastCommitInfo.Hash(), } } -// pruneStores will batch delete a list of heights from each mounted sub-store. -// Afterwards, pruneHeights is reset. -func (rs *Store) pruneStores() { - if len(rs.pruneHeights) == 0 { - return - } - - for key, store := range rs.stores { - if store.GetStoreType() == types.StoreTypeIAVL { - // If the store is wrapped with an inter-block cache, we must first unwrap - // it to get the underlying IAVL store. - store = rs.GetCommitKVStore(key) - - if err := store.(*iavl.Store).DeleteVersions(rs.pruneHeights...); err != nil { - if errCause := errors.Cause(err); errCause != nil && errCause != iavltree.ErrVersionDoesNotExist { - panic(err) - } - } - } - } - - rs.pruneHeights = make([]int64, 0) -} - // CacheWrap implements CacheWrapper/Store/CommitStore. func (rs *Store) CacheWrap() types.CacheWrap { return rs.CacheMultiStore().(types.CacheWrap) @@ -553,7 +532,51 @@ func (rs *Store) GetKVStore(key types.StoreKey) types.KVStore { return store } -// GetStoreByName performs a lookup of a StoreKey given a store name typically +func (rs *Store) handlePruning(version int64) error { + rs.pruningManager.HandleHeight(version - 1) // we should never prune the current version. + if !rs.pruningManager.ShouldPruneAtHeight(version) { + return nil + } + rs.logger.Info("prune start", "height", version) + defer rs.logger.Info("prune end", "height", version) + return rs.pruneStores() +} + +func (rs *Store) pruneStores() error { + pruningHeights, err := rs.pruningManager.GetFlushAndResetPruningHeights() + if err != nil { + return err + } + + if len(pruningHeights) == 0 { + rs.logger.Debug("pruning skipped; no heights to prune") + return nil + } + + rs.logger.Debug("pruning heights", "heights", pruningHeights) + + for key, store := range rs.stores { + // If the store is wrapped with an inter-block cache, we must first unwrap + // it to get the underlying IAVL store. + if store.GetStoreType() != types.StoreTypeIAVL { + continue + } + + store = rs.GetCommitKVStore(key) + + err := store.(*iavl.Store).DeleteVersions(pruningHeights...) + if err == nil { + continue + } + + if errCause := errors.Cause(err); errCause != nil && errCause != iavltree.ErrVersionDoesNotExist { + return err + } + } + return nil +} + +// getStoreByName performs a lookup of a StoreKey given a store name typically // provided in a path. The StoreKey is then used to perform a lookup and return // a Store. If the Store is wrapped in an inter-block cache, it will be unwrapped // prior to being returned. If the StoreKey does not exist, nil is returned. @@ -666,7 +689,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error { if height == 0 { return sdkerrors.Wrap(sdkerrors.ErrLogic, "cannot snapshot height 0") } - if height > uint64(rs.LastCommitID().Version) { + if height > uint64(getLatestVersion(rs.db)) { return sdkerrors.Wrapf(sdkerrors.ErrLogic, "cannot snapshot future height %v", height) } @@ -819,7 +842,7 @@ loop: importer.Close() } - flushMetadata(rs.db, int64(height), rs.buildCommitInfo(int64(height)), []int64{}) + rs.flushMetadata(rs.db, int64(height), rs.buildCommitInfo(int64(height))) return snapshotItem, rs.LoadLatestVersion() } @@ -842,9 +865,9 @@ func (rs *Store) loadCommitStoreFromParams(key types.StoreKey, id types.CommitID var err error if params.initialVersion == 0 { - store, err = iavl.LoadStore(db, id, rs.lazyLoading, rs.iavlCacheSize) + store, err = iavl.LoadStore(db, rs.logger, key, id, rs.lazyLoading, rs.iavlCacheSize) } else { - store, err = iavl.LoadStoreWithInitialVersion(db, id, rs.lazyLoading, params.initialVersion, rs.iavlCacheSize) + store, err = iavl.LoadStoreWithInitialVersion(db, rs.logger, key, id, rs.lazyLoading, params.initialVersion, rs.iavlCacheSize) } if err != nil { @@ -910,9 +933,11 @@ func (rs *Store) RollbackToVersion(target int64) int64 { return current } for ; current > target; current-- { - rs.pruneHeights = append(rs.pruneHeights, current) + rs.pruningManager.HandleHeight(current) + } + if err := rs.pruneStores(); err != nil { + panic(err) } - rs.pruneStores() // update latest height bz, err := gogotypes.StdInt64Marshal(current) @@ -924,6 +949,25 @@ func (rs *Store) RollbackToVersion(target int64) int64 { return current } +func (rs *Store) flushMetadata(db dbm.DB, version int64, cInfo *types.CommitInfo) { + rs.logger.Debug("flushing metadata", "height", version) + batch := db.NewBatch() + defer batch.Close() + + if cInfo != nil { + flushCommitInfo(batch, version, cInfo) + } else { + rs.logger.Debug("commitInfo is nil, not flushed", "height", version) + } + + flushLatestVersion(batch, version) + + if err := batch.WriteSync(); err != nil { + panic(fmt.Errorf("error on batch write %w", err)) + } + rs.logger.Debug("flushing metadata finished", "height", version) +} + type storeParams struct { key types.StoreKey db dbm.DB @@ -967,6 +1011,10 @@ func commitStores(version int64, storeMap map[types.StoreKey]types.CommitKVStore } } + sort.SliceStable(storeInfos, func(i, j int) bool { + return strings.Compare(storeInfos[i].Name, storeInfos[j].Name) < 0 + }) + return &types.CommitInfo{ Version: version, StoreInfos: storeInfos, @@ -992,7 +1040,7 @@ func getCommitInfo(db dbm.DB, ver int64) (*types.CommitInfo, error) { return cInfo, nil } -func setCommitInfo(batch dbm.Batch, version int64, cInfo *types.CommitInfo) { +func flushCommitInfo(batch dbm.Batch, version int64, cInfo *types.CommitInfo) { bz, err := cInfo.Marshal() if err != nil { panic(err) @@ -1002,7 +1050,7 @@ func setCommitInfo(batch dbm.Batch, version int64, cInfo *types.CommitInfo) { batch.Set([]byte(cInfoKey), bz) } -func setLatestVersion(batch dbm.Batch, version int64) { +func flushLatestVersion(batch dbm.Batch, version int64) { bz, err := gogotypes.StdInt64Marshal(version) if err != nil { panic(err) @@ -1010,47 +1058,3 @@ func setLatestVersion(batch dbm.Batch, version int64) { batch.Set([]byte(latestVersionKey), bz) } - -func setPruningHeights(batch dbm.Batch, pruneHeights []int64) { - bz := make([]byte, 0) - for _, ph := range pruneHeights { - buf := make([]byte, 8) - binary.BigEndian.PutUint64(buf, uint64(ph)) - bz = append(bz, buf...) - } - - batch.Set([]byte(pruneHeightsKey), bz) -} - -func getPruningHeights(db dbm.DB) ([]int64, error) { - bz, err := db.Get([]byte(pruneHeightsKey)) - if err != nil { - return nil, fmt.Errorf("failed to get pruned heights: %w", err) - } - if len(bz) == 0 { - return nil, errors.New("no pruned heights found") - } - - prunedHeights := make([]int64, len(bz)/8) - i, offset := 0, 0 - for offset < len(bz) { - prunedHeights[i] = int64(binary.BigEndian.Uint64(bz[offset : offset+8])) - i++ - offset += 8 - } - - return prunedHeights, nil -} - -func flushMetadata(db dbm.DB, version int64, cInfo *types.CommitInfo, pruneHeights []int64) { - batch := db.NewBatch() - defer batch.Close() - - setCommitInfo(batch, version, cInfo) - setLatestVersion(batch, version) - setPruningHeights(batch, pruneHeights) - - if err := batch.Write(); err != nil { - panic(fmt.Errorf("error on batch write %w", err)) - } -} diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index 80cbcf68cbd0..ccd58b153feb 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/codec" codecTypes "github.com/cosmos/cosmos-sdk/codec/types" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/cachemulti" "github.com/cosmos/cosmos-sdk/store/iavl" sdkmaps "github.com/cosmos/cosmos-sdk/store/internal/maps" @@ -22,13 +24,13 @@ import ( func TestStoreType(t *testing.T) { db := dbm.NewMemDB() - store := NewStore(db) + store := NewStore(db, log.NewNopLogger()) store.MountStoreWithDB(types.NewKVStoreKey("store1"), types.StoreTypeIAVL, db) } func TestGetCommitKVStore(t *testing.T) { var db dbm.DB = dbm.NewMemDB() - ms := newMultiStoreWithMounts(db, types.PruneDefault) + ms := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) err := ms.LoadLatestVersion() require.Nil(t, err) @@ -45,7 +47,7 @@ func TestGetCommitKVStore(t *testing.T) { func TestStoreMount(t *testing.T) { db := dbm.NewMemDB() - store := NewStore(db) + store := NewStore(db, log.NewNopLogger()) key1 := types.NewKVStoreKey("store1") key2 := types.NewKVStoreKey("store2") @@ -61,7 +63,7 @@ func TestStoreMount(t *testing.T) { func TestCacheMultiStore(t *testing.T) { var db dbm.DB = dbm.NewMemDB() - ms := newMultiStoreWithMounts(db, types.PruneNothing) + ms := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) cacheMulti := ms.CacheMultiStore() require.IsType(t, cachemulti.Store{}, cacheMulti) @@ -69,7 +71,7 @@ func TestCacheMultiStore(t *testing.T) { func TestCacheMultiStoreWithVersion(t *testing.T) { var db dbm.DB = dbm.NewMemDB() - ms := newMultiStoreWithMounts(db, types.PruneNothing) + ms := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err := ms.LoadLatestVersion() require.Nil(t, err) @@ -106,7 +108,7 @@ func TestCacheMultiStoreWithVersion(t *testing.T) { func TestHashStableWithEmptyCommit(t *testing.T) { var db dbm.DB = dbm.NewMemDB() - ms := newMultiStoreWithMounts(db, types.PruneNothing) + ms := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err := ms.LoadLatestVersion() require.Nil(t, err) @@ -130,7 +132,7 @@ func TestHashStableWithEmptyCommit(t *testing.T) { func TestMultistoreCommitLoad(t *testing.T) { var db dbm.DB = dbm.NewMemDB() - store := newMultiStoreWithMounts(db, types.PruneNothing) + store := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err := store.LoadLatestVersion() require.Nil(t, err) @@ -155,7 +157,7 @@ func TestMultistoreCommitLoad(t *testing.T) { } // Load the latest multistore again and check version. - store = newMultiStoreWithMounts(db, types.PruneNothing) + store = newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err = store.LoadLatestVersion() require.Nil(t, err) commitID = getExpectedCommitID(store, nCommits) @@ -168,7 +170,7 @@ func TestMultistoreCommitLoad(t *testing.T) { // Load an older multistore and check version. ver := nCommits - 1 - store = newMultiStoreWithMounts(db, types.PruneNothing) + store = newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err = store.LoadVersion(ver) require.Nil(t, err) commitID = getExpectedCommitID(store, ver) @@ -177,7 +179,7 @@ func TestMultistoreCommitLoad(t *testing.T) { func TestMultistoreLoadWithUpgrade(t *testing.T) { var db dbm.DB = dbm.NewMemDB() - store := newMultiStoreWithMounts(db, types.PruneNothing) + store := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err := store.LoadLatestVersion() require.Nil(t, err) @@ -212,7 +214,7 @@ func TestMultistoreLoadWithUpgrade(t *testing.T) { checkContains(t, ci.StoreInfos, []string{"store1", "store2", "store3"}) // Load without changes and make sure it is sensible - store = newMultiStoreWithMounts(db, types.PruneNothing) + store = newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err = store.LoadLatestVersion() require.Nil(t, err) @@ -225,7 +227,7 @@ func TestMultistoreLoadWithUpgrade(t *testing.T) { require.Equal(t, v2, s2.Get(k2)) // now, let's load with upgrades... - restore, upgrades := newMultiStoreWithModifiedMounts(db, types.PruneNothing) + restore, upgrades := newMultiStoreWithModifiedMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err = restore.LoadLatestVersionAndUpgrade(upgrades) require.Nil(t, err) @@ -270,7 +272,7 @@ func TestMultistoreLoadWithUpgrade(t *testing.T) { migratedID := restore.Commit() require.Equal(t, migratedID.Version, int64(2)) - reload, _ := newMultiStoreWithModifiedMounts(db, types.PruneNothing) + reload, _ := newMultiStoreWithModifiedMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err = reload.LoadLatestVersion() require.Nil(t, err) require.Equal(t, migratedID, reload.LastCommitID()) @@ -314,15 +316,11 @@ func TestParsePath(t *testing.T) { require.NoError(t, err) require.Equal(t, substore, "bang") require.Equal(t, subsubpath, "/baz") - } func TestMultiStoreRestart(t *testing.T) { db := dbm.NewMemDB() - pruning := types.PruningOptions{ - KeepRecent: 2, - Interval: 1, - } + pruning := pruningtypes.NewCustomPruningOptions(2, 1) multi := newMultiStoreWithMounts(db, pruning) err := multi.LoadLatestVersion() require.Nil(t, err) @@ -401,7 +399,7 @@ func TestMultiStoreRestart(t *testing.T) { func TestMultiStoreQuery(t *testing.T) { db := dbm.NewMemDB() - multi := newMultiStoreWithMounts(db, types.PruneNothing) + multi := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err := multi.LoadLatestVersion() require.Nil(t, err) @@ -428,7 +426,7 @@ func TestMultiStoreQuery(t *testing.T) { ver := cid.Version // Reload multistore from database - multi = newMultiStoreWithMounts(db, types.PruneNothing) + multi = newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err = multi.LoadLatestVersion() require.Nil(t, err) @@ -473,15 +471,15 @@ func TestMultiStore_Pruning(t *testing.T) { testCases := []struct { name string numVersions int64 - po types.PruningOptions + po pruningtypes.PruningOptions deleted []int64 saved []int64 }{ - {"prune nothing", 10, types.PruneNothing, nil, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, - {"prune everything", 10, types.PruneEverything, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9}, []int64{10}}, - {"prune some; no batch", 10, types.NewPruningOptions(2, 1), []int64{1, 2, 4, 5, 7}, []int64{3, 6, 8, 9, 10}}, - {"prune some; small batch", 10, types.NewPruningOptions(2, 3), []int64{1, 2, 4, 5}, []int64{3, 6, 7, 8, 9, 10}}, - {"prune some; large batch", 10, types.NewPruningOptions(2, 11), nil, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + {"prune nothing", 10, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), nil, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + {"prune everything", 10, pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), []int64{1, 2, 3, 4, 5, 6, 7, 8, 9}, []int64{10}}, + {"prune some; no batch", 10, pruningtypes.NewCustomPruningOptions(2, 1), []int64{1, 2, 4, 5, 7}, []int64{3, 6, 8, 9, 10}}, + {"prune some; small batch", 10, pruningtypes.NewCustomPruningOptions(2, 3), []int64{1, 2, 4, 5}, []int64{3, 6, 7, 8, 9, 10}}, + {"prune some; large batch", 10, pruningtypes.NewCustomPruningOptions(2, 11), nil, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, } for _, tc := range testCases { @@ -509,9 +507,64 @@ func TestMultiStore_Pruning(t *testing.T) { } } +func TestMultiStore_Pruning_SameHeightsTwice(t *testing.T) { + const ( + numVersions int64 = 10 + keepRecent uint64 = 2 + interval uint64 = 10 + ) + + expectedHeights := []int64{} + for i := int64(1); i < numVersions-int64(keepRecent); i++ { + expectedHeights = append(expectedHeights, i) + } + + db := dbm.NewMemDB() + + ms := newMultiStoreWithMounts(db, pruningtypes.NewCustomPruningOptions(keepRecent, interval)) + require.NoError(t, ms.LoadLatestVersion()) + + var lastCommitInfo types.CommitID + for i := int64(0); i < numVersions; i++ { + lastCommitInfo = ms.Commit() + } + + require.Equal(t, numVersions, lastCommitInfo.Version) + + for v := int64(1); v < numVersions-int64(keepRecent); v++ { + err := ms.LoadVersion(v) + require.Error(t, err, "expected error when loading pruned height: %d", v) + } + + for v := int64(numVersions - int64(keepRecent)); v < numVersions; v++ { + err := ms.LoadVersion(v) + require.NoError(t, err, "expected no error when loading height: %d", v) + } + + // Get latest + err := ms.LoadVersion(numVersions - 1) + require.NoError(t, err) + + // Ensure already pruned heights were loaded + heights, err := ms.pruningManager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, expectedHeights, heights) + + require.NoError(t, ms.pruningManager.LoadPruningHeights(db)) + + // Test pruning the same heights again + lastCommitInfo = ms.Commit() + require.Equal(t, numVersions, lastCommitInfo.Version) + + // Ensure that can commit one more height with no panic + lastCommitInfo = ms.Commit() + require.Equal(t, numVersions+1, lastCommitInfo.Version) +} + func TestMultiStore_PruningRestart(t *testing.T) { db := dbm.NewMemDB() - ms := newMultiStoreWithMounts(db, types.NewPruningOptions(2, 11)) + ms := newMultiStoreWithMounts(db, pruningtypes.NewCustomPruningOptions(2, 11)) + ms.SetSnapshotInterval(3) require.NoError(t, ms.LoadLatestVersion()) // Commit enough to build up heights to prune, where on the next block we should @@ -523,19 +576,30 @@ func TestMultiStore_PruningRestart(t *testing.T) { pruneHeights := []int64{1, 2, 4, 5, 7} // ensure we've persisted the current batch of heights to prune to the store's DB - ph, err := getPruningHeights(ms.db) + err := ms.pruningManager.LoadPruningHeights(ms.db) + require.NoError(t, err) + + actualHeightsToPrune, err := ms.pruningManager.GetFlushAndResetPruningHeights() require.NoError(t, err) - require.Equal(t, []int64{1, 2, 3, 4, 5, 6, 7}, ph) + require.Equal(t, len(pruneHeights), len(actualHeightsToPrune)) + require.Equal(t, pruneHeights, actualHeightsToPrune) // "restart" - ms = newMultiStoreWithMounts(db, types.NewPruningOptions(2, 11)) + ms = newMultiStoreWithMounts(db, pruningtypes.NewCustomPruningOptions(2, 11)) + ms.SetSnapshotInterval(3) err = ms.LoadLatestVersion() require.NoError(t, err) - require.Equal(t, []int64{1, 2, 3, 4, 5, 6, 7}, ms.pruneHeights) + + actualHeightsToPrune, err = ms.pruningManager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Equal(t, pruneHeights, actualHeightsToPrune) // commit one more block and ensure the heights have been pruned ms.Commit() - require.Empty(t, ms.pruneHeights) + + actualHeightsToPrune, err = ms.pruningManager.GetFlushAndResetPruningHeights() + require.NoError(t, err) + require.Empty(t, actualHeightsToPrune) for _, v := range pruneHeights { _, err := ms.CacheMultiStoreWithVersion(v) @@ -545,7 +609,7 @@ func TestMultiStore_PruningRestart(t *testing.T) { func TestSetInitialVersion(t *testing.T) { db := dbm.NewMemDB() - multi := newMultiStoreWithMounts(db, types.PruneNothing) + multi := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) require.NoError(t, multi.LoadLatestVersion()) @@ -563,7 +627,7 @@ func TestSetInitialVersion(t *testing.T) { func TestAddListenersAndListeningEnabled(t *testing.T) { db := dbm.NewMemDB() - multi := newMultiStoreWithMounts(db, types.PruneNothing) + multi := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) testKey := types.NewKVStoreKey("listening_test_key") enabled := multi.ListeningEnabled(testKey) require.False(t, enabled) @@ -594,7 +658,7 @@ var ( func TestGetListenWrappedKVStore(t *testing.T) { buf := new(bytes.Buffer) var db dbm.DB = dbm.NewMemDB() - ms := newMultiStoreWithMounts(db, types.PruneNothing) + ms := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) ms.LoadLatestVersion() mockListeners := []types.WriteListener{types.NewStoreKVPairWriteListener(buf, testMarshaller)} ms.AddListeners(testStoreKey1, mockListeners) @@ -637,6 +701,7 @@ func TestGetListenWrappedKVStore(t *testing.T) { StoreKey: testStoreKey2.Name(), Delete: false, }) + require.NoError(t, err) kvPairSet2Bytes := buf.Bytes() buf.Reset() require.Equal(t, expectedOutputKVPairSet2, kvPairSet2Bytes) @@ -648,6 +713,7 @@ func TestGetListenWrappedKVStore(t *testing.T) { StoreKey: testStoreKey2.Name(), Delete: true, }) + require.NoError(t, err) kvPairDelete2Bytes := buf.Bytes() buf.Reset() require.Equal(t, expectedOutputKVPairDelete2, kvPairDelete2Bytes) @@ -668,7 +734,7 @@ func TestGetListenWrappedKVStore(t *testing.T) { func TestCacheWraps(t *testing.T) { db := dbm.NewMemDB() - multi := newMultiStoreWithMounts(db, types.PruneNothing) + multi := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) cacheWrapper := multi.CacheWrap() require.IsType(t, cachemulti.Store{}, cacheWrapper) @@ -682,7 +748,7 @@ func TestCacheWraps(t *testing.T) { func TestTraceConcurrency(t *testing.T) { db := dbm.NewMemDB() - multi := newMultiStoreWithMounts(db, types.PruneNothing) + multi := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) err := multi.LoadLatestVersion() require.NoError(t, err) @@ -730,6 +796,40 @@ func TestTraceConcurrency(t *testing.T) { stopW <- struct{}{} } +func TestCommitOrdered(t *testing.T) { + var db dbm.DB = dbm.NewMemDB() + multi := newMultiStoreWithMounts(db, pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) + err := multi.LoadLatestVersion() + require.Nil(t, err) + + commitID := types.CommitID{} + checkStore(t, multi, commitID, commitID) + + k, v := []byte("wind"), []byte("blows") + k2, v2 := []byte("water"), []byte("flows") + k3, v3 := []byte("fire"), []byte("burns") + + store1 := multi.GetStoreByName("store1").(types.KVStore) + store1.Set(k, v) + + store2 := multi.GetStoreByName("store2").(types.KVStore) + store2.Set(k2, v2) + + store3 := multi.GetStoreByName("store3").(types.KVStore) + store3.Set(k3, v3) + + typeID := multi.Commit() + require.Equal(t, int64(1), typeID.Version) + + ci, err := getCommitInfo(db, 1) + require.NoError(t, err) + require.Equal(t, int64(1), ci.Version) + require.Equal(t, 3, len(ci.StoreInfos)) + for i, s := range ci.StoreInfos { + require.Equal(t, s.Name, fmt.Sprintf("store%d", i+1)) + } +} + //----------------------------------------------------------------------- // utils @@ -739,9 +839,9 @@ var ( testStoreKey3 = types.NewKVStoreKey("store3") ) -func newMultiStoreWithMounts(db dbm.DB, pruningOpts types.PruningOptions) *Store { - store := NewStore(db) - store.pruningOpts = pruningOpts +func newMultiStoreWithMounts(db dbm.DB, pruningOpts pruningtypes.PruningOptions) *Store { + store := NewStore(db, log.NewNopLogger()) + store.SetPruning(pruningOpts) store.MountStoreWithDB(testStoreKey1, types.StoreTypeIAVL, nil) store.MountStoreWithDB(testStoreKey2, types.StoreTypeIAVL, nil) @@ -750,9 +850,9 @@ func newMultiStoreWithMounts(db dbm.DB, pruningOpts types.PruningOptions) *Store return store } -func newMultiStoreWithModifiedMounts(db dbm.DB, pruningOpts types.PruningOptions) (*Store, *types.StoreUpgrades) { - store := NewStore(db) - store.pruningOpts = pruningOpts +func newMultiStoreWithModifiedMounts(db dbm.DB, pruningOpts pruningtypes.PruningOptions) (*Store, *types.StoreUpgrades) { + store := NewStore(db, log.NewNopLogger()) + store.SetPruning(pruningOpts) store.MountStoreWithDB(types.NewKVStoreKey("store1"), types.StoreTypeIAVL, nil) store.MountStoreWithDB(types.NewKVStoreKey("restore2"), types.StoreTypeIAVL, nil) diff --git a/store/store.go b/store/store.go index 2c068c413f47..492bd4fee1dc 100644 --- a/store/store.go +++ b/store/store.go @@ -1,6 +1,7 @@ package store import ( + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store/cache" @@ -9,7 +10,7 @@ import ( ) func NewCommitMultiStore(db dbm.DB) types.CommitMultiStore { - return rootmulti.NewStore(db) + return rootmulti.NewStore(db, log.NewNopLogger()) } func NewCommitKVStoreCacheManager() types.MultiStorePersistentCache { diff --git a/store/streaming/README.md b/store/streaming/README.md index 46e343416a52..3118ceed9834 100644 --- a/store/streaming/README.md +++ b/store/streaming/README.md @@ -1,7 +1,7 @@ # State Streaming Service This package contains the constructors for the `StreamingService`s used to write state changes out from individual KVStores to a -file or stream, as described in [ADR-038](../../docs/architecture/adr-038-state-listening.md) and defined in [types/streaming.go](../../baseapp/streaming.go). +file or stream, as described in [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-038-state-listening.md) and defined in [types/streaming.go](https://github.com/cosmos/cosmos-sdk/blob/main/baseapp/streaming.go). The child directories contain the implementations for specific output destinations. Currently, a `StreamingService` implementation that writes state changes out to files is supported, in the future support for additional diff --git a/store/streaming/constructor_test.go b/store/streaming/constructor_test.go index 5f9d58016f68..79051d16500a 100644 --- a/store/streaming/constructor_test.go +++ b/store/streaming/constructor_test.go @@ -1,13 +1,19 @@ -package streaming +package streaming_test import ( "testing" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codecTypes "github.com/cosmos/cosmos-sdk/codec/types" + serverTypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/store/streaming" "github.com/cosmos/cosmos-sdk/store/streaming/file" "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" "github.com/stretchr/testify/require" ) @@ -24,12 +30,12 @@ var ( ) func TestStreamingServiceConstructor(t *testing.T) { - _, err := NewServiceConstructor("unexpectedName") + _, err := streaming.NewServiceConstructor("unexpectedName") require.NotNil(t, err) - constructor, err := NewServiceConstructor("file") + constructor, err := streaming.NewServiceConstructor("file") require.Nil(t, err) - var expectedType ServiceConstructor + var expectedType streaming.ServiceConstructor require.IsType(t, expectedType, constructor) serv, err := constructor(mockOptions, mockKeys, testMarshaller) @@ -41,3 +47,54 @@ func TestStreamingServiceConstructor(t *testing.T) { require.True(t, ok) } } + +func TestLoadStreamingServices(t *testing.T) { + db := dbm.NewMemDB() + encCdc := simapp.MakeTestEncodingConfig() + keys := sdk.NewKVStoreKeys("mockKey1", "mockKey2") + bApp := baseapp.NewBaseApp("appName", log.NewNopLogger(), db, nil) + + testCases := map[string]struct { + appOpts serverTypes.AppOptions + activeStreamersLen int + }{ + "empty app options": { + appOpts: simapp.EmptyAppOptions{}, + }, + "all StoreKeys exposed": { + appOpts: streamingAppOptions{keys: []string{"*"}}, + activeStreamersLen: 1, + }, + "some StoreKey exposed": { + appOpts: streamingAppOptions{keys: []string{"mockKey1"}}, + activeStreamersLen: 1, + }, + "not exposing anything": { + appOpts: streamingAppOptions{keys: []string{"mockKey3"}}, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + activeStreamers, _, err := streaming.LoadStreamingServices(bApp, tc.appOpts, encCdc.Codec, keys) + require.NoError(t, err) + require.Equal(t, tc.activeStreamersLen, len(activeStreamers)) + }) + } + +} + +type streamingAppOptions struct { + keys []string +} + +func (ao streamingAppOptions) Get(o string) interface{} { + switch o { + case "store.streamers": + return []string{"file"} + case "streamers.file.keys": + return ao.keys + default: + return nil + } +} diff --git a/store/streaming/file/service.go b/store/streaming/file/service.go index 02feb403e99b..28e77a52fa39 100644 --- a/store/streaming/file/service.go +++ b/store/streaming/file/service.go @@ -39,7 +39,7 @@ type IntermediateWriter struct { outChan chan<- []byte } -// NewIntermediateWriter create an instance of an intermediateWriter that sends to the provided channel +// NewIntermediateWriter create an instance of an IntermediateWriter that sends to the provided channel func NewIntermediateWriter(outChan chan<- []byte) *IntermediateWriter { return &IntermediateWriter{ outChan: outChan, @@ -62,7 +62,7 @@ func NewStreamingService(writeDir, filePrefix string, storeKeys []types.StoreKey for _, key := range storeKeys { listeners[key] = append(listeners[key], listener) } - // check that the writeDir exists and is writeable so that we can catch the error here at initialization if it is not + // check that the writeDir exists and is writable so that we can catch the error here at initialization if it is not // we don't open a dstFile until we receive our first ABCI message if err := isDirWriteable(writeDir); err != nil { return nil, err @@ -133,7 +133,7 @@ func (fss *StreamingService) openBeginBlockFile(req abci.RequestBeginBlock) (*os if fss.filePrefix != "" { fileName = fmt.Sprintf("%s-%s", fss.filePrefix, fileName) } - return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0600) + return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0o600) } // ListenDeliverTx satisfies the baseapp.ABCIListener interface @@ -183,7 +183,7 @@ func (fss *StreamingService) openDeliverTxFile() (*os.File, error) { fileName = fmt.Sprintf("%s-%s", fss.filePrefix, fileName) } fss.currentTxIndex++ - return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0600) + return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0o600) } // ListenEndBlock satisfies the baseapp.ABCIListener interface @@ -232,7 +232,7 @@ func (fss *StreamingService) openEndBlockFile() (*os.File, error) { if fss.filePrefix != "" { fileName = fmt.Sprintf("%s-%s", fss.filePrefix, fileName) } - return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0600) + return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0o600) } // Stream satisfies the baseapp.StreamingService interface @@ -272,7 +272,7 @@ func (fss *StreamingService) Close() error { // to dir. It returns nil if dir is writable. func isDirWriteable(dir string) error { f := path.Join(dir, ".touch") - if err := ioutil.WriteFile(f, []byte(""), 0600); err != nil { + if err := ioutil.WriteFile(f, []byte(""), 0o600); err != nil { return err } return os.Remove(f) diff --git a/store/streaming/file/service_test.go b/store/streaming/file/service_test.go index 1276b163642d..d89918efab03 100644 --- a/store/streaming/file/service_test.go +++ b/store/streaming/file/service_test.go @@ -54,7 +54,7 @@ var ( } testEndBlockRes = abci.ResponseEndBlock{ Events: []abci.Event{}, - ConsensusParamUpdates: &types1.ConsensusParams{}, + ConsensusParamUpdates: &abci.ConsensusParams{}, ValidatorUpdates: []abci.ValidatorUpdate{}, } mockTxBytes1 = []byte{9, 8, 7, 6, 5, 4, 3, 2, 1} @@ -128,7 +128,7 @@ func TestFileStreamingService(t *testing.T) { if os.Getenv("CI") != "" { t.Skip("Skipping TestFileStreamingService in CI environment") } - err := os.Mkdir(testDir, 0700) + err := os.Mkdir(testDir, 0o700) require.Nil(t, err) defer os.RemoveAll(testDir) @@ -372,7 +372,7 @@ func readInFile(name string) ([]byte, error) { return ioutil.ReadFile(path) } -// Returns all of the protobuf messages contained in the byte array as an array of byte arrays +// segmentBytes returns all of the protobuf messages contained in the byte array as an array of byte arrays // The messages have their length prefix removed func segmentBytes(bz []byte) ([][]byte, error) { var err error @@ -388,7 +388,7 @@ func segmentBytes(bz []byte) ([][]byte, error) { return segments, nil } -// Returns the bytes for the leading protobuf object in the byte array (removing the length prefix) and returns the remainder of the byte array +// getHeadSegment returns the bytes for the leading protobuf object in the byte array (removing the length prefix) and returns the remainder of the byte array func getHeadSegment(bz []byte) ([]byte, []byte, error) { size, prefixSize := binary.Uvarint(bz) if prefixSize < 0 { diff --git a/store/tools/ics23/go.mod b/store/tools/ics23/go.mod index 5d82c0ef4d36..f8daac839010 100644 --- a/store/tools/ics23/go.mod +++ b/store/tools/ics23/go.mod @@ -1,42 +1,40 @@ module github.com/cosmos/cosmos-sdk/store/tools/ics23 -go 1.17 +go 1.18 require ( - github.com/confio/ics23/go v0.6.7-0.20220201201850-606d5105384e - github.com/cosmos/cosmos-sdk v0.45.0 - github.com/cosmos/iavl v0.17.3 + github.com/confio/ics23/go v0.7.0 + github.com/cosmos/cosmos-sdk v0.46.0-rc3 + github.com/cosmos/iavl v0.19.0 github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 - github.com/tendermint/tendermint v0.34.14 - github.com/tendermint/tm-db v0.6.4 + github.com/tendermint/tendermint v0.34.20 + github.com/tendermint/tm-db v0.6.7 ) require ( - github.com/DataDog/zstd v1.4.5 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/dgraph-io/badger/v2 v2.2007.2 // indirect - github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/cespare/xxhash/v2 v2.1.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.3 // indirect + github.com/golang/glog v1.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 // indirect - github.com/google/btree v1.0.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // 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.1 // 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.2.1-0.20190427202633-1595213edefa // indirect - github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect - go.etcd.io/bbolt v1.3.5 // indirect - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect - golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect - golang.org/x/text v0.3.6 // indirect - google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 // indirect - google.golang.org/grpc v1.42.0 // indirect - google.golang.org/protobuf v1.27.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-20220525230936-793ad666bf5e // indirect + golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect + golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + google.golang.org/protobuf v1.28.0 // indirect ) replace github.com/cosmos/cosmos-sdk/store/tools/ics23 => ./ diff --git a/store/tools/ics23/go.sum b/store/tools/ics23/go.sum index 2655f0cffef2..69c30cf16a33 100644 --- a/store/tools/ics23/go.sum +++ b/store/tools/ics23/go.sum @@ -1,8 +1,11 @@ +4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -11,110 +14,134 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= -github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= +github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0/go.mod h1:LGOGuvEgCfCQsy3JF2tRmpGDpzA53iZfyGEWSPwQ6/4= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= -github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= +github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -123,23 +150,30 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/bufbuild/buf v1.4.0/go.mod h1:mwHG7klTHnX+rM/ym8LXGl7vYpVmnwT96xWoRB4H5QI= +github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +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/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -147,75 +181,73 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= -github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/confio/ics23/go v0.6.7-0.20220201201850-606d5105384e h1:GhCdFUgGIg9MC3vigJIhubUKE4VAYW6ZyEapsQ3HR6E= -github.com/confio/ics23/go v0.6.7-0.20220201201850-606d5105384e/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +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/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.45.0 h1:DHD+CIRZ+cYgiLXuTEUL/aprnfPsWSwaww/fIZEsZlk= -github.com/cosmos/cosmos-sdk v0.45.0/go.mod h1:XXS/asyCqWNWkx2rW6pSuen+EVcpAFxq6khrhnZgHaQ= +github.com/cosmos/cosmos-sdk v0.46.0-rc3 h1:BWU0YJ1RXUCYUmKY8k3kH/yEavMF/7y81Sjd+2otZpY= +github.com/cosmos/cosmos-sdk v0.46.0-rc3/go.mod h1:fWrmJ90UcB11LoaaTtF/qsqkA8HusUc8+XARAdnJfmA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= -github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +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.0 h1:sgyrjqOkycXiN7Tuupuo4QAldKFg7Sipyfeg/IL7cps= +github.com/cosmos/iavl v0.19.0/go.mod h1:l5h9pAB3m5fihB3pXVgwYqdY8aBsMagqz7T0MUjxZeA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +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.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= -github.com/dgraph-io/ristretto v0.0.3/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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 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/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/cli v20.10.14+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 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/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -224,62 +256,90 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +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/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/firefart/nonamedreturns v1.0.1/go.mod h1:D3dpIBojGGNh5UfElmwPu73SwDCm+VKhHYqwlNOk2uQ= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= 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/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -288,9 +348,10 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -310,11 +371,25 @@ 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 h1:ur2rms48b3Ep1dxh7aUV2FZEQ8jEVO2F6ILKx8ofkAg= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +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/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -325,14 +400,16 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -340,411 +417,580 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= +github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= 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/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= +github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= 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/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 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.10.3/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.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 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= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= +github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 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/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.19/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= +github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= +github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +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/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.34.14 h1:GCXmlS8Bqd2Ix3TQCpwYLUNHe+Y+QyJsm5YE+S/FkPo= -github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= -github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ= -github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= -github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= -github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/tendermint/tendermint v0.34.20 h1:/pmvJhO3IqOxhbi8iRXudTjA2YKpaMqrLwFNkyxDSzw= +github.com/tendermint/tendermint v0.34.20/go.mod h1:KtOwCLYJcsS1ymtAfnjjAtXfXClbqcqjdqzFt2Em1Ac= +github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +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/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= +github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vektra/mockery/v2 v2.14.0/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= +github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -757,38 +1003,58 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -797,6 +1063,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/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -813,28 +1081,27 @@ golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -847,6 +1114,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -864,7 +1132,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -874,10 +1141,26 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f h1:w6wWR0H+nyVpbSAQbzVEIACVyr/h8l/BEkY6Sokc7Eg= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -889,12 +1172,20 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -902,6 +1193,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -909,10 +1201,10 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -922,23 +1214,25 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -955,34 +1249,74 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/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-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20201204225414-ed752295db88/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= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b h1:3Dq0eVHn0uaQJmPO+/aYPI/fRMqdrVDbu7MQcku54gg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -990,42 +1324,56 @@ 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190228203856-589c23e65e65/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1035,38 +1383,74 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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-20201230224404-63754364767c/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= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= 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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1084,25 +1468,44 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1124,44 +1527,79 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 h1:z+ErRPu0+KS02Td3fOAgdX+lnPDh/VyaABEJPD4JRQs= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= @@ -1169,10 +1607,19 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1183,28 +1630,29 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= 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/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1212,15 +1660,19 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1228,9 +1680,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= +mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/store/tools/ics23/iavl/README.md b/store/tools/ics23/iavl/README.md index 45f2e81a5e83..756f04871079 100644 --- a/store/tools/ics23/iavl/README.md +++ b/store/tools/ics23/iavl/README.md @@ -13,7 +13,7 @@ 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 does not exist in the 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. diff --git a/store/tools/ics23/iavl/cmd/testgen-iavl/main.go b/store/tools/ics23/iavl/cmd/testgen-iavl/main.go index fe43459c9ac8..615a24b513ce 100644 --- a/store/tools/ics23/iavl/cmd/testgen-iavl/main.go +++ b/store/tools/ics23/iavl/cmd/testgen-iavl/main.go @@ -75,12 +75,12 @@ func main() { fmt.Println("Usage: testgen-iavl [exist|nonexist] [left|right|middle] ") os.Exit(1) } - root := tree.WorkingHash() + root, _ := tree.WorkingHash() var key, value []byte if exist { key = helpers.GetKey(allkeys, loc) - _, value = tree.Get(key) + value, _ = tree.Get(key) } else { key = helpers.GetNonKey(allkeys, loc) } @@ -132,14 +132,20 @@ func doBatch(args []string) error { if err != nil { return err } - root := tree.WorkingHash() + 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 := tree.Get(key) + 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) diff --git a/store/tools/ics23/iavl/create.go b/store/tools/ics23/iavl/create.go index fa7020e548fd..b1d046983721 100644 --- a/store/tools/ics23/iavl/create.go +++ b/store/tools/ics23/iavl/create.go @@ -47,18 +47,23 @@ 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 := tree.Get(key) + 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") } - var err error nonexist := &ics23.NonExistenceProof{ Key: key, } if idx >= 1 { - leftkey, _ := tree.GetByIndex(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 @@ -66,7 +71,10 @@ func CreateNonMembershipProof(tree *iavl.MutableTree, key []byte) (*ics23.Commit } // this will be nil if nothing right of the queried key - rightkey, _ := tree.GetByIndex(idx) + rightkey, _, err := tree.GetByIndex(idx) + if err != nil { + return nil, err + } if rightkey != nil { nonexist.Right, err = createExistenceProof(tree, rightkey) if err != nil { diff --git a/store/tools/ics23/iavl/create_test.go b/store/tools/ics23/iavl/create_test.go index 20fd0cac310e..1a1f29561612 100644 --- a/store/tools/ics23/iavl/create_test.go +++ b/store/tools/ics23/iavl/create_test.go @@ -29,13 +29,13 @@ func TestCreateMembership(t *testing.T) { t.Fatalf("Creating tree: %+v", err) } key := helpers.GetKey(allkeys, tc.loc) - _, val := tree.Get(key) + val, err := tree.Get(key) proof, err := CreateMembershipProof(tree, key) if err != nil { t.Fatalf("Creating Proof: %+v", err) } - root := tree.WorkingHash() + root, _ := tree.WorkingHash() valid := ics23.VerifyMembership(IavlSpec, root, proof, key, val) if !valid { t.Fatalf("Membership Proof Invalid") @@ -70,7 +70,7 @@ func TestCreateNonMembership(t *testing.T) { t.Fatalf("Creating Proof: %+v", err) } - root := tree.WorkingHash() + 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 index c39da851c651..57f1296d79b5 100644 --- a/store/tools/ics23/iavl/helpers/helpers.go +++ b/store/tools/ics23/iavl/helpers/helpers.go @@ -1,7 +1,7 @@ /* Package helpers contains functions to build sample data for tests/testgen -In it's own package to avoid poluting the godoc for ics23-iavl +In it's own package to avoid polluting the godoc for ics23-iavl */ package helpers @@ -45,7 +45,7 @@ func GenerateIavlResult(size int, loc tmproofs.Where) (*IavlResult, error) { if len(proof.Leaves) != 1 { return nil, fmt.Errorf("GetWithProof returned %d leaves", len(proof.Leaves)) } - root := tree.WorkingHash() + root, _ := tree.WorkingHash() res := &IavlResult{ Key: key, @@ -56,7 +56,7 @@ func GenerateIavlResult(size int, loc tmproofs.Where) (*IavlResult, error) { return res, nil } -// GetKey this returns a key, on Left/Right/Middle +// GetKey returns a key, on Left/Right/Middle func GetKey(allkeys [][]byte, loc tmproofs.Where) []byte { if loc == tmproofs.Left { return allkeys[0] diff --git a/store/tools/ics23/smt/README.md b/store/tools/ics23/smt/README.md index 0e65e87e2249..82c06eddcbf1 100644 --- a/store/tools/ics23/smt/README.md +++ b/store/tools/ics23/smt/README.md @@ -10,7 +10,7 @@ It exposes a two main functions : 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 does not exist in the tree. +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. diff --git a/store/tools/ics23/smt/create_test.go b/store/tools/ics23/smt/create_test.go index 1a3e74e70869..71ec7722661e 100644 --- a/store/tools/ics23/smt/create_test.go +++ b/store/tools/ics23/smt/create_test.go @@ -10,21 +10,23 @@ import ( "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt/helpers" ) -var numKeys = 50 -var 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}, -} +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 { diff --git a/store/tools/ics23/smt/helpers/helpers.go b/store/tools/ics23/smt/helpers/helpers.go index 1c8a1415a7c6..d444c47d61ec 100644 --- a/store/tools/ics23/smt/helpers/helpers.go +++ b/store/tools/ics23/smt/helpers/helpers.go @@ -1,7 +1,7 @@ /* Package helpers contains functions to build sample data for tests/testgen -In it's own package to avoid poluting the godoc for ics23-smt +In it's own package to avoid polluting the godoc for ics23-smt */ package helpers diff --git a/store/tracekv/store.go b/store/tracekv/store.go index a454edc7dd5f..91f3c657682c 100644 --- a/store/tracekv/store.go +++ b/store/tracekv/store.go @@ -79,13 +79,13 @@ func (tkv *Store) Has(key []byte) bool { } // Iterator implements the KVStore interface. It delegates the Iterator call -// the to the parent KVStore. +// to the parent KVStore. func (tkv *Store) Iterator(start, end []byte) types.Iterator { return tkv.iterator(start, end, true) } // ReverseIterator implements the KVStore interface. It delegates the -// ReverseIterator call the to the parent KVStore. +// ReverseIterator call to the parent KVStore. func (tkv *Store) ReverseIterator(start, end []byte) types.Iterator { return tkv.iterator(start, end, false) } diff --git a/store/tracekv/store_test.go b/store/tracekv/store_test.go index db9a981237f4..1b81e89bafd2 100644 --- a/store/tracekv/store_test.go +++ b/store/tracekv/store_test.go @@ -111,7 +111,6 @@ func TestTraceKVStoreSet(t *testing.T) { store := newEmptyTraceKVStore(&buf) require.Panics(t, func() { store.Set([]byte(""), []byte("value")) }, "setting an empty key should panic") require.Panics(t, func() { store.Set(nil, []byte("value")) }, "setting a nil key should panic") - } func TestTraceKVStoreDelete(t *testing.T) { diff --git a/store/transient/store.go b/store/transient/store.go index 572ab55f7697..4d4fc5b81d6e 100644 --- a/store/transient/store.go +++ b/store/transient/store.go @@ -3,12 +3,15 @@ package transient import ( dbm "github.com/tendermint/tm-db" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/dbadapter" "github.com/cosmos/cosmos-sdk/store/types" ) -var _ types.Committer = (*Store)(nil) -var _ types.KVStore = (*Store)(nil) +var ( + _ types.Committer = (*Store)(nil) + _ types.KVStore = (*Store)(nil) +) // Store is a wrapper for a MemDB with Commiter implementation type Store struct { @@ -27,11 +30,13 @@ func (ts *Store) Commit() (id types.CommitID) { return } -func (ts *Store) SetPruning(_ types.PruningOptions) {} +func (ts *Store) SetPruning(_ pruningtypes.PruningOptions) {} // GetPruning is a no-op as pruning options cannot be directly set on this store. // They must be set on the root commit multi-store. -func (ts *Store) GetPruning() types.PruningOptions { return types.PruningOptions{} } +func (ts *Store) GetPruning() pruningtypes.PruningOptions { + return pruningtypes.NewPruningOptions(pruningtypes.PruningUndefined) +} // Implements CommitStore func (ts *Store) LastCommitID() (id types.CommitID) { diff --git a/store/transient/store_test.go b/store/transient/store_test.go index 16a165b3ba2e..900e6cb7a918 100644 --- a/store/transient/store_test.go +++ b/store/transient/store_test.go @@ -6,8 +6,9 @@ import ( "github.com/stretchr/testify/require" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + "github.com/cosmos/cosmos-sdk/store/transient" types "github.com/cosmos/cosmos-sdk/store/v2alpha1" - "github.com/cosmos/cosmos-sdk/store/v2alpha1/transient" ) var k, v = []byte("hello"), []byte("world") @@ -26,7 +27,7 @@ func TestTransientStore(t *testing.T) { require.Nil(t, tstore.Get(k)) // no-op - tstore.SetPruning(types.PruningOptions{}) + tstore.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningUndefined)) emptyCommitID := tstore.LastCommitID() require.Equal(t, emptyCommitID.Version, int64(0)) diff --git a/store/types/errors.go b/store/types/errors.go index 780fcdef37ab..f2f395aea806 100644 --- a/store/types/errors.go +++ b/store/types/errors.go @@ -6,6 +6,4 @@ import ( const StoreCodespace = "store" -var ( - ErrInvalidProof = sdkerrors.Register(StoreCodespace, 2, "invalid proof") -) +var ErrInvalidProof = sdkerrors.Register(StoreCodespace, 2, "invalid proof") diff --git a/store/types/iterator.go b/store/types/iterator.go index cfce4124e397..a328e87a68a6 100644 --- a/store/types/iterator.go +++ b/store/types/iterator.go @@ -34,7 +34,6 @@ type PaginatedIterator struct { page, limit uint // provided during initialization iterated uint // incremented in a call to Next - } func (pi *PaginatedIterator) skip() { diff --git a/store/types/iterator_test.go b/store/types/iterator_test.go index 686aa1123708..57b072475eaf 100644 --- a/store/types/iterator_test.go +++ b/store/types/iterator_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store/iavl" @@ -12,7 +13,7 @@ import ( func newMemTestKVStore(t *testing.T) types.KVStore { db := dbm.NewMemDB() - store, err := iavl.LoadStore(db, types.CommitID{}, false, iavl.DefaultIAVLCacheSize) + store, err := iavl.LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), types.CommitID{}, false, iavl.DefaultIAVLCacheSize) require.NoError(t, err) return store } diff --git a/store/types/listening.go b/store/types/listening.go index 2294a5ada531..02cde4c715c7 100644 --- a/store/types/listening.go +++ b/store/types/listening.go @@ -9,7 +9,7 @@ import ( // WriteListener interface for streaming data out from a listenkv.Store type WriteListener interface { // if value is nil then it was deleted - // storeKey indicates the source KVStore, to facilitate using the the same WriteListener across separate KVStores + // storeKey indicates the source KVStore, to facilitate using the same WriteListener across separate KVStores // delete bool indicates if it was a delete; true: delete, false: set OnWrite(storeKey StoreKey, key []byte, value []byte, delete bool) error } diff --git a/store/types/pruning.go b/store/types/pruning.go deleted file mode 100644 index 3dd05b02bd12..000000000000 --- a/store/types/pruning.go +++ /dev/null @@ -1,71 +0,0 @@ -package types - -import ( - "fmt" -) - -// Pruning option string constants -const ( - PruningOptionDefault = "default" - PruningOptionEverything = "everything" - PruningOptionNothing = "nothing" - PruningOptionCustom = "custom" -) - -var ( - // PruneDefault defines a pruning strategy where the last 362880 heights are - // kept in addition to every 100th and where to-be pruned heights are pruned - // at every 10th height. The last 362880 heights are kept assuming the typical - // block time is 5s and typical unbonding period is 21 days. If these values - // do not match the applications' requirements, use the "custom" option. - PruneDefault = NewPruningOptions(362880, 10) - - // PruneEverything defines a pruning strategy where all committed heights are - // deleted, storing only the current and previous height and where to-be pruned - // heights are pruned at every 10th height. - PruneEverything = NewPruningOptions(2, 10) - - // PruneNothing defines a pruning strategy where all heights are kept on disk. - PruneNothing = NewPruningOptions(0, 0) -) - -// PruningOptions defines the pruning strategy used when determining which -// heights are removed from disk when committing state. -type PruningOptions struct { - // KeepRecent defines how many recent heights to keep on disk. - KeepRecent uint64 - - // Interval defines when the pruned heights are removed from disk. - Interval uint64 -} - -func NewPruningOptions(keepRecent, interval uint64) PruningOptions { - return PruningOptions{ - KeepRecent: keepRecent, - Interval: interval, - } -} - -func (po PruningOptions) Validate() error { - if po.KeepRecent > 0 && po.Interval == 0 { - return fmt.Errorf("invalid 'Interval' when pruning recent heights: %d", po.Interval) - } - - return nil -} - -func NewPruningOptionsFromString(strategy string) PruningOptions { - switch strategy { - case PruningOptionEverything: - return PruneEverything - - case PruningOptionNothing: - return PruneNothing - - case PruningOptionDefault: - return PruneDefault - - default: - return PruneDefault - } -} diff --git a/store/types/pruning_test.go b/store/types/pruning_test.go deleted file mode 100644 index d524aea70ed4..000000000000 --- a/store/types/pruning_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestPruningOptions_Validate(t *testing.T) { - testCases := []struct { - keepRecent uint64 - interval uint64 - expectErr bool - }{ - {100, 10, false}, // default - {0, 10, false}, // everything - {0, 0, false}, // nothing - {100, 0, true}, // invalid interval - } - - for _, tc := range testCases { - po := NewPruningOptions(tc.keepRecent, tc.interval) - err := po.Validate() - require.Equal(t, tc.expectErr, err != nil, "options: %v, err: %s", po, err) - } -} diff --git a/store/types/store.go b/store/types/store.go index 770f5887946f..37f583900909 100644 --- a/store/types/store.go +++ b/store/types/store.go @@ -5,9 +5,9 @@ import ( "io" abci "github.com/tendermint/tendermint/abci/types" - tmstrings "github.com/tendermint/tendermint/libs/strings" dbm "github.com/tendermint/tm-db" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/types/kv" ) @@ -22,8 +22,8 @@ type Committer interface { Commit() CommitID LastCommitID() CommitID - SetPruning(PruningOptions) - GetPruning() PruningOptions + SetPruning(pruningtypes.PruningOptions) + GetPruning() pruningtypes.PruningOptions } // Stores of MultiStore must implement CommitStore. @@ -58,12 +58,17 @@ type StoreRename struct { NewKey string `json:"new_key"` } -// IsDeleted returns true if the given key should be added +// IsAdded returns true if the given key should be added func (s *StoreUpgrades) IsAdded(key string) bool { if s == nil { return false } - return tmstrings.StringInSlice(key, s.Added) + for _, added := range s.Added { + if key == added { + return true + } + } + return false } // IsDeleted returns true if the given key should be deleted @@ -91,7 +96,6 @@ func (s *StoreUpgrades) RenamedFrom(key string) string { } } return "" - } type MultiStore interface { @@ -191,7 +195,7 @@ type CommitMultiStore interface { // BasicKVStore is a simple interface to get/set data type BasicKVStore interface { - // Get returns nil iff key doesn't exist. Panics on nil key. + // Get returns nil if key doesn't exist. Panics on nil key. Get(key []byte) []byte // Has checks if a key exists. Panics on nil key. @@ -337,7 +341,7 @@ type StoreKey interface { } // CapabilityKey represent the Cosmos SDK keys for object-capability -// generation in the IBC protocol as defined in https://github.com/cosmos/ics/tree/master/spec/ics-005-port-allocation#data-structures +// generation in the IBC protocol as defined in https://github.com/cosmos/ibc/tree/master/spec/core/ics-005-port-allocation#data-structures type CapabilityKey StoreKey // KVStoreKey is used for accessing substores. diff --git a/store/types/utils.go b/store/types/utils.go index 22c8ca0761f9..f0cf469871d9 100644 --- a/store/types/utils.go +++ b/store/types/utils.go @@ -6,12 +6,12 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" ) -// Iterator over all the keys with a certain prefix in ascending order +// KVStorePrefixIterator iterates over all the keys with a certain prefix in ascending order func KVStorePrefixIterator(kvs KVStore, prefix []byte) Iterator { return kvs.Iterator(prefix, PrefixEndBytes(prefix)) } -// Iterator over all the keys with a certain prefix in descending order. +// KVStoreReversePrefixIterator iterates over all the keys with a certain prefix in descending order. func KVStoreReversePrefixIterator(kvs KVStore, prefix []byte) Iterator { return kvs.ReverseIterator(prefix, PrefixEndBytes(prefix)) } diff --git a/store/types/utils_test.go b/store/types/utils_test.go index 32064d7e1821..a13a2d9a5a55 100644 --- a/store/types/utils_test.go +++ b/store/types/utils_test.go @@ -5,20 +5,21 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store/rootmulti" - "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/store/types" ) -func initTestStores(t *testing.T) (types.KVStore, types.KVStore) { +func initTestStores(t *testing.T) (sdk.KVStore, sdk.KVStore) { db := dbm.NewMemDB() - ms := rootmulti.NewStore(db) + ms := rootmulti.NewStore(db, log.NewNopLogger()) - key1 := types.NewKVStoreKey("store1") - key2 := types.NewKVStoreKey("store2") - require.NotPanics(t, func() { ms.MountStoreWithDB(key1, types.StoreTypeIAVL, db) }) - require.NotPanics(t, func() { ms.MountStoreWithDB(key2, types.StoreTypeIAVL, db) }) + key1 := sdk.NewKVStoreKey("store1") + key2 := sdk.NewKVStoreKey("store2") + require.NotPanics(t, func() { ms.MountStoreWithDB(key1, sdk.StoreTypeIAVL, db) }) + require.NotPanics(t, func() { ms.MountStoreWithDB(key2, sdk.StoreTypeIAVL, db) }) require.NoError(t, ms.LoadLatestVersion()) return ms.GetKVStore(key1), ms.GetKVStore(key2) } @@ -31,27 +32,27 @@ func TestDiffKVStores(t *testing.T) { store1.Set(k1, v1) store2.Set(k1, v1) - kvAs, kvBs := types.DiffKVStores(store1, store2, nil) + kvAs, kvBs := sdk.DiffKVStores(store1, store2, nil) require.Equal(t, 0, len(kvAs)) require.Equal(t, len(kvAs), len(kvBs)) // delete k1 from store2, which is now empty store2.Delete(k1) - kvAs, kvBs = types.DiffKVStores(store1, store2, nil) + kvAs, kvBs = sdk.DiffKVStores(store1, store2, nil) require.Equal(t, 1, len(kvAs)) require.Equal(t, len(kvAs), len(kvBs)) // set k1 in store2, different value than what store1 holds for k1 v2 := []byte("v2") store2.Set(k1, v2) - kvAs, kvBs = types.DiffKVStores(store1, store2, nil) + kvAs, kvBs = sdk.DiffKVStores(store1, store2, nil) require.Equal(t, 1, len(kvAs)) require.Equal(t, len(kvAs), len(kvBs)) // add k2 to store2 k2 := []byte("k2") store2.Set(k2, v2) - kvAs, kvBs = types.DiffKVStores(store1, store2, nil) + kvAs, kvBs = sdk.DiffKVStores(store1, store2, nil) require.Equal(t, 2, len(kvAs)) require.Equal(t, len(kvAs), len(kvBs)) @@ -65,7 +66,7 @@ func TestDiffKVStores(t *testing.T) { k1Prefixed := append(prefix, k1...) store1.Set(k1Prefixed, v1) store2.Set(k1Prefixed, v2) - kvAs, kvBs = types.DiffKVStores(store1, store2, [][]byte{prefix}) + kvAs, kvBs = sdk.DiffKVStores(store1, store2, [][]byte{prefix}) require.Equal(t, 0, len(kvAs)) require.Equal(t, len(kvAs), len(kvBs)) } @@ -73,16 +74,16 @@ func TestDiffKVStores(t *testing.T) { func TestPrefixEndBytes(t *testing.T) { t.Parallel() bs1 := []byte{0x23, 0xA5, 0x06} - require.True(t, bytes.Equal([]byte{0x23, 0xA5, 0x07}, types.PrefixEndBytes(bs1))) + require.True(t, bytes.Equal([]byte{0x23, 0xA5, 0x07}, sdk.PrefixEndBytes(bs1))) bs2 := []byte{0x23, 0xA5, 0xFF} - require.True(t, bytes.Equal([]byte{0x23, 0xA6}, types.PrefixEndBytes(bs2))) - require.Nil(t, types.PrefixEndBytes([]byte{0xFF})) - require.Nil(t, types.PrefixEndBytes(nil)) + require.True(t, bytes.Equal([]byte{0x23, 0xA6}, sdk.PrefixEndBytes(bs2))) + require.Nil(t, sdk.PrefixEndBytes([]byte{0xFF})) + require.Nil(t, sdk.PrefixEndBytes(nil)) } func TestInclusiveEndBytes(t *testing.T) { t.Parallel() - require.True(t, bytes.Equal([]byte{0x00}, types.InclusiveEndBytes(nil))) + require.True(t, bytes.Equal([]byte{0x00}, sdk.InclusiveEndBytes(nil))) bs := []byte("test") - require.True(t, bytes.Equal(append(bs, byte(0x00)), types.InclusiveEndBytes(bs))) + require.True(t, bytes.Equal(append(bs, byte(0x00)), sdk.InclusiveEndBytes(bs))) } diff --git a/store/types/validity.go b/store/types/validity.go index ef2387a69269..32619271b488 100644 --- a/store/types/validity.go +++ b/store/types/validity.go @@ -1,13 +1,13 @@ package types -// Check if the key is valid(key is not nil) +// AssertValidKey checks if the key is valid(key is not nil) func AssertValidKey(key []byte) { if len(key) == 0 { panic("key is nil") } } -// Check if the value is valid(value is not nil) +// AssertValidValue checks if the value is valid(value is not nil) func AssertValidValue(value []byte) { if value == nil { panic("value is nil") diff --git a/store/v2alpha1/mem/store.go b/store/v2alpha1/mem/store.go index b984aac81dc8..3c8fa82bbaba 100644 --- a/store/v2alpha1/mem/store.go +++ b/store/v2alpha1/mem/store.go @@ -3,6 +3,7 @@ package mem import ( dbm "github.com/cosmos/cosmos-sdk/db" "github.com/cosmos/cosmos-sdk/db/memdb" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/store/v2alpha1/dbadapter" ) @@ -38,7 +39,7 @@ func (s *Store) Commit() (id types.CommitID) { return } -func (s *Store) SetPruning(pruning types.PruningOptions) {} -func (s *Store) GetPruning() types.PruningOptions { return types.PruningOptions{} } +func (s *Store) SetPruning(pruningtypes.PruningOptions) {} +func (s *Store) GetPruning() pruningtypes.PruningOptions { return pruningtypes.PruningOptions{} } func (s Store) LastCommitID() (id types.CommitID) { return } diff --git a/store/v2alpha1/multi/migration_test.go b/store/v2alpha1/multi/migration_test.go index 09f1f74b5a16..bf7b0f921cd0 100644 --- a/store/v2alpha1/multi/migration_test.go +++ b/store/v2alpha1/multi/migration_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/rootmulti" "github.com/cosmos/cosmos-sdk/store/types" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" ) @@ -19,7 +20,7 @@ func TestMigrationV2(t *testing.T) { // setup a rootmulti store db := dbm.NewMemDB() - v1Store := rootmulti.NewStore(db) + v1Store := rootmulti.NewStore(db, log.NewNopLogger()) // mount the kvStores var keys []*types.KVStoreKey @@ -94,7 +95,7 @@ func TestMigrationV2(t *testing.T) { func TestMigrateV2ForEmptyStore(t *testing.T) { // setup a rootmulti store db := dbm.NewMemDB() - v1Store := rootmulti.NewStore(db) + v1Store := rootmulti.NewStore(db, log.NewNopLogger()) err := v1Store.LoadLatestVersion() require.Nil(t, err) db2 := memdb.NewDB() diff --git a/store/v2alpha1/multi/snapshot.go b/store/v2alpha1/multi/snapshot.go index 37f687873954..434c5e1c6fc5 100644 --- a/store/v2alpha1/multi/snapshot.go +++ b/store/v2alpha1/multi/snapshot.go @@ -107,7 +107,7 @@ func (rs *Store) Restore( } var subStore *substore - var storeSchemaReceived = false + storeSchemaReceived := false var snapshotItem snapshottypes.SnapshotItem diff --git a/store/v2alpha1/multi/snapshot_test.go b/store/v2alpha1/multi/snapshot_test.go index 0495e95e1e10..77637910e768 100644 --- a/store/v2alpha1/multi/snapshot_test.go +++ b/store/v2alpha1/multi/snapshot_test.go @@ -17,6 +17,7 @@ import ( dbm "github.com/cosmos/cosmos-sdk/db" "github.com/cosmos/cosmos-sdk/db/memdb" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store/types" @@ -24,7 +25,7 @@ import ( func multiStoreConfig(t *testing.T, stores int) StoreConfig { opts := DefaultStoreConfig() - opts.Pruning = types.PruneNothing + opts.Pruning = pruningtypes.NewPruningOptions(pruningtypes.PruningNothing) for i := 0; i < stores; i++ { sKey := types.NewKVStoreKey(fmt.Sprintf("store%d", i)) diff --git a/store/v2alpha1/multi/store.go b/store/v2alpha1/multi/store.go index 191239bc83f7..e4eb13c7d9a1 100644 --- a/store/v2alpha1/multi/store.go +++ b/store/v2alpha1/multi/store.go @@ -13,6 +13,7 @@ import ( dbm "github.com/cosmos/cosmos-sdk/db" prefixdb "github.com/cosmos/cosmos-sdk/db/prefix" util "github.com/cosmos/cosmos-sdk/internal" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" sdkmaps "github.com/cosmos/cosmos-sdk/store/internal/maps" "github.com/cosmos/cosmos-sdk/store/listenkv" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -56,7 +57,7 @@ func ErrStoreNotFound(skey string) error { // StoreConfig is used to define a schema and other options and pass them to the MultiStore constructor. type StoreConfig struct { // Version pruning options for backing DBs. - Pruning types.PruningOptions + Pruning pruningtypes.PruningOptions // The minimum allowed version number. InitialVersion uint64 // The backing DB to use for the state commitment Merkle tree data. @@ -92,7 +93,7 @@ type Store struct { mtx sync.RWMutex // Copied from StoreConfig - Pruning types.PruningOptions + Pruning pruningtypes.PruningOptions InitialVersion uint64 // if *traceListenMixin @@ -152,7 +153,7 @@ func newTraceListenMixin() *traceListenMixin { // pruning with PruneDefault, no listeners and no tracer. func DefaultStoreConfig() StoreConfig { return StoreConfig{ - Pruning: types.PruneDefault, + Pruning: pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), prefixRegistry: prefixRegistry{ StoreSchema: StoreSchema{}, }, @@ -175,12 +176,12 @@ func validSubStoreType(sst types.StoreType) bool { } // Returns true iff both schema maps match exactly (including mem/tran stores) -func (this StoreSchema) equal(that StoreSchema) bool { - if len(this) != len(that) { +func (ss StoreSchema) equal(that StoreSchema) bool { + if len(ss) != len(that) { return false } for key, val := range that { - myval, has := this[key] + myval, has := ss[key] if !has { return false } @@ -248,7 +249,7 @@ func NewStore(db dbm.DBConnection, opts StoreConfig) (ret *Store, err error) { } // Version sets of each DB must match if !versions.Equal(scVersions) { - err = fmt.Errorf("Storage and StateCommitment DB have different version history") //nolint:stylecheck + err = fmt.Errorf("different version history between Storage and StateCommitment DB ") return } err = opts.StateCommitmentDB.Revert() @@ -689,6 +690,20 @@ func (rs *Store) CacheMultiStore() types.CacheMultiStore { } } +// PruneSnapshotHeight prunes the given height according to the prune strategy. +// If PruneNothing, this is a no-op. +// If other strategy, this height is persisted until it is +// less than - KeepRecent and % Interval == 0 +func (rs *Store) PruneSnapshotHeight(height int64) { + panic("not implemented") +} + +// SetSnapshotInterval sets the interval at which the snapshots are taken. +// It is used by the store to determine which heights to retain until after the snapshot is complete. +func (rs *Store) SetSnapshotInterval(snapshotInterval uint64) { + panic("not implemented") +} + // parsePath expects a format like /[/] // Must start with /, subpath may be empty // Returns error if it doesn't start with / @@ -769,7 +784,7 @@ func (rs *Store) Query(req abci.RequestQuery) (res abci.ResponseQuery) { // TODO: actual IBC compatible proof. This is a placeholder so unit tests can pass res.ProofOps, err = substore.GetProof(res.Key) if err != nil { - return sdkerrors.QueryResult(fmt.Errorf("Merkle proof creation failed for key: %v", res.Key), false) //nolint: stylecheck // proper name + return sdkerrors.QueryResult(fmt.Errorf("merkle proof creation failed for key: %v", res.Key), false) } case "/subspace": @@ -877,9 +892,11 @@ func (tlm *traceListenMixin) ListeningEnabled(key types.StoreKey) bool { func (tlm *traceListenMixin) TracingEnabled() bool { return tlm.TraceWriter != nil } + func (tlm *traceListenMixin) SetTracer(w io.Writer) { tlm.TraceWriter = w } + func (tlm *traceListenMixin) SetTraceContext(tc types.TraceContext) { tlm.TraceContext = tc } @@ -894,5 +911,5 @@ func (tlm *traceListenMixin) wrapTraceListen(store types.KVStore, skey types.Sto return store } -func (s *Store) GetPruning() types.PruningOptions { return s.Pruning } -func (s *Store) SetPruning(po types.PruningOptions) { s.Pruning = po } +func (s *Store) GetPruning() pruningtypes.PruningOptions { return s.Pruning } +func (s *Store) SetPruning(po pruningtypes.PruningOptions) { s.Pruning = po } diff --git a/store/v2alpha1/multi/store_test.go b/store/v2alpha1/multi/store_test.go index d157f0099084..de09003518d0 100644 --- a/store/v2alpha1/multi/store_test.go +++ b/store/v2alpha1/multi/store_test.go @@ -13,12 +13,12 @@ import ( codecTypes "github.com/cosmos/cosmos-sdk/codec/types" dbm "github.com/cosmos/cosmos-sdk/db" "github.com/cosmos/cosmos-sdk/db/memdb" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" types "github.com/cosmos/cosmos-sdk/store/v2alpha1" "github.com/cosmos/cosmos-sdk/types/kv" ) var ( - cacheSize = 100 alohaData = map[string]string{ "hello": "goodbye", "aloha": "shalom", @@ -40,7 +40,7 @@ func simpleStoreConfig(t *testing.T) StoreConfig { func storeConfig123(t *testing.T) StoreConfig { opts := DefaultStoreConfig() - opts.Pruning = types.PruneNothing + opts.Pruning = pruningtypes.NewPruningOptions(pruningtypes.PruningNothing) require.NoError(t, opts.RegisterSubstore(skey_1.Name(), types.StoreTypePersistent)) require.NoError(t, opts.RegisterSubstore(skey_2.Name(), types.StoreTypePersistent)) require.NoError(t, opts.RegisterSubstore(skey_3.Name(), types.StoreTypePersistent)) @@ -101,7 +101,7 @@ func TestConstructors(t *testing.T) { require.NoError(t, store.Close()) t.Run("fail to load if InitialVersion > lowest existing version", func(t *testing.T) { - opts := StoreConfig{InitialVersion: 5, Pruning: types.PruneNothing} + opts := StoreConfig{InitialVersion: 5, Pruning: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)} store, err = NewStore(db, opts) require.Error(t, err) db.Close() @@ -163,7 +163,7 @@ func TestIterators(t *testing.T) { string([]byte{0x01}): "1", }) - var testCase = func(t *testing.T, iter types.Iterator, expected []string) { + testCase := func(t *testing.T, iter types.Iterator, expected []string) { var i int for i = 0; iter.Valid(); iter.Next() { expectedValue := expected[i] @@ -247,7 +247,7 @@ func TestCommit(t *testing.T) { } } basicOpts := simpleStoreConfig(t) - basicOpts.Pruning = types.PruneNothing + basicOpts.Pruning = pruningtypes.NewPruningOptions(pruningtypes.PruningNothing) t.Run("sanity tests for Merkle hashing", func(t *testing.T) { testBasic(basicOpts) }) @@ -260,7 +260,8 @@ func TestCommit(t *testing.T) { testFailedCommit := func(t *testing.T, store *Store, db dbm.DBConnection, - opts StoreConfig) { + opts StoreConfig, + ) { if db == nil { db = store.stateDB } @@ -286,7 +287,7 @@ func TestCommit(t *testing.T) { } opts := simpleStoreConfig(t) - opts.Pruning = types.PruneNothing + opts.Pruning = pruningtypes.NewPruningOptions(pruningtypes.PruningNothing) // Ensure Store's commit is rolled back in each failure case... t.Run("recover after failed Commit", func(t *testing.T) { @@ -349,7 +350,7 @@ func TestCommit(t *testing.T) { t.Run("height overflow triggers failure", func(t *testing.T) { opts.StateCommitmentDB = nil opts.InitialVersion = math.MaxInt64 - opts.Pruning = types.PruneNothing + opts.Pruning = pruningtypes.NewPruningOptions(pruningtypes.PruningNothing) store, err := NewStore(memdb.NewDB(), opts) require.NoError(t, err) require.Equal(t, int64(math.MaxInt64), store.Commit().Version) @@ -360,7 +361,7 @@ func TestCommit(t *testing.T) { t.Run("first commit version matches InitialVersion", func(t *testing.T) { opts = simpleStoreConfig(t) opts.InitialVersion = 5 - opts.Pruning = types.PruneNothing + opts.Pruning = pruningtypes.NewPruningOptions(pruningtypes.PruningNothing) opts.StateCommitmentDB = memdb.NewDB() store, err := NewStore(memdb.NewDB(), opts) require.NoError(t, err) @@ -395,13 +396,13 @@ func sliceToSet(slice []uint64) map[uint64]struct{} { func TestPruning(t *testing.T) { // Save versions up to 10 and verify pruning at final commit testCases := []struct { - types.PruningOptions + pruningtypes.PruningOptions kept []uint64 }{ - {types.PruningOptions{2, 10}, []uint64{8, 9, 10}}, - {types.PruningOptions{0, 10}, []uint64{10}}, - {types.PruneEverything, []uint64{8, 9, 10}}, - {types.PruneNothing, []uint64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + {pruningtypes.NewCustomPruningOptions(2, 10), []uint64{8, 9, 10}}, + {pruningtypes.NewCustomPruningOptions(0, 10), []uint64{10}}, + {pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), []uint64{8, 9, 10}}, + {pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), []uint64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, } for tci, tc := range testCases { @@ -443,7 +444,7 @@ func TestPruning(t *testing.T) { db := memdb.NewDB() opts := simpleStoreConfig(t) - opts.Pruning = types.PruningOptions{0, 10} + opts.Pruning = pruningtypes.NewCustomPruningOptions(0, 10) store, err := NewStore(db, opts) require.NoError(t, err) @@ -689,7 +690,7 @@ func TestGetVersion(t *testing.T) { require.Panics(t, func() { subview.Set([]byte{1}, []byte{1}) }) require.Panics(t, func() { subview.Delete([]byte{0}) }) // nonexistent version shouldn't be accessible - view, err = store.GetVersion(cid.Version + 1) + _, err = store.GetVersion(cid.Version + 1) require.Equal(t, ErrVersionDoesNotExist, err) substore := store.GetKVStore(skey_1) @@ -750,7 +751,7 @@ func TestMultiStoreMigration(t *testing.T) { t.Run("basic migration", func(t *testing.T) { // now, let's load with upgrades... opts.Upgrades = []types.StoreUpgrades{ - types.StoreUpgrades{ + { Added: []string{skey_4.Name()}, Renamed: []types.StoreRename{{ OldKey: skey_2.Name(), @@ -936,8 +937,8 @@ func TestListeners(t *testing.T) { }, } - var interfaceRegistry = codecTypes.NewInterfaceRegistry() - var marshaller = codec.NewProtoCodec(interfaceRegistry) + interfaceRegistry := codecTypes.NewInterfaceRegistry() + marshaller := codec.NewProtoCodec(interfaceRegistry) db := memdb.NewDB() opts := simpleStoreConfig(t) diff --git a/store/v2alpha1/multi/test_util.go b/store/v2alpha1/multi/test_util.go index cc03639906d9..a03d60f54f03 100644 --- a/store/v2alpha1/multi/test_util.go +++ b/store/v2alpha1/multi/test_util.go @@ -7,25 +7,30 @@ import ( dbm "github.com/cosmos/cosmos-sdk/db" ) -type dbDeleteVersionFails struct{ dbm.DBConnection } -type dbRWCommitFails struct{ dbm.DBConnection } -type dbRWCrudFails struct{ dbm.DBConnection } -type dbSaveVersionFails struct{ dbm.DBConnection } -type dbRevertFails struct { - dbm.DBConnection - // order of calls to fail on (eg. [1, 0] => first call fails; second succeeds) - failOn []bool -} +type ( + dbDeleteVersionFails struct{ dbm.DBConnection } + dbRWCommitFails struct{ dbm.DBConnection } + dbRWCrudFails struct{ dbm.DBConnection } + dbSaveVersionFails struct{ dbm.DBConnection } + dbRevertFails struct { + dbm.DBConnection + // order of calls to fail on (eg. [1, 0] => first call fails; second succeeds) + failOn []bool + } +) + type dbVersionsIs struct { dbm.DBConnection vset dbm.VersionSet } -type dbVersionsFails struct{ dbm.DBConnection } -type rwCommitFails struct{ dbm.DBReadWriter } -type rwCrudFails struct { - dbm.DBReadWriter - onKey []byte -} +type ( + dbVersionsFails struct{ dbm.DBConnection } + rwCommitFails struct{ dbm.DBReadWriter } + rwCrudFails struct { + dbm.DBReadWriter + onKey []byte + } +) func (dbVersionsFails) Versions() (dbm.VersionSet, error) { return nil, errors.New("dbVersionsFails") } func (db dbVersionsIs) Versions() (dbm.VersionSet, error) { return db.vset, nil } @@ -48,6 +53,7 @@ func (tx rwCommitFails) Commit() error { tx.Discard() return errors.New("rwCommitFails") } + func (db dbRWCommitFails) ReadWriter() dbm.DBReadWriter { return rwCommitFails{db.DBConnection.ReadWriter()} } @@ -58,18 +64,21 @@ func (rw rwCrudFails) Get(k []byte) ([]byte, error) { } return rw.DBReadWriter.Get(k) } + func (rw rwCrudFails) Has(k []byte) (bool, error) { if rw.onKey == nil || bytes.Equal(rw.onKey, k) { return false, errors.New("rwCrudFails.Has") } return rw.DBReadWriter.Has(k) } + func (rw rwCrudFails) Set(k []byte, v []byte) error { if rw.onKey == nil || bytes.Equal(rw.onKey, k) { return errors.New("rwCrudFails.Set") } return rw.DBReadWriter.Set(k, v) } + func (rw rwCrudFails) Delete(k []byte) error { if rw.onKey == nil || bytes.Equal(rw.onKey, k) { return errors.New("rwCrudFails.Delete") diff --git a/store/v2alpha1/multi/view_store.go b/store/v2alpha1/multi/view_store.go index 29c391287a93..d4b97325dd15 100644 --- a/store/v2alpha1/multi/view_store.go +++ b/store/v2alpha1/multi/view_store.go @@ -86,7 +86,7 @@ func (st *viewSubstore) CacheWrapWithListeners(storeKey types.StoreKey, listener func (s *viewStore) getMerkleRoots() (ret map[string][]byte, err error) { ret = map[string][]byte{} - for key, _ := range s.schema { + for key := range s.schema { sub, has := s.substoreCache[key] if !has { sub, err = s.getSubstore(key) diff --git a/store/v2alpha1/smt/proof_test.go b/store/v2alpha1/smt/proof_test.go index 3ef6573dab32..b2d3b191929e 100644 --- a/store/v2alpha1/smt/proof_test.go +++ b/store/v2alpha1/smt/proof_test.go @@ -55,7 +55,7 @@ func TestProofOpInterface(t *testing.T) { assert.Equal(t, key, tmProofOp.Key, key) assert.NotEmpty(t, tmProofOp.Data) - //decode + // decode decoded, err := smtstore.ProofDecoder(tmProofOp) assert.NoError(t, err) assert.NotNil(t, decoded) diff --git a/store/v2alpha1/transient/store.go b/store/v2alpha1/transient/store.go index 2a9609afb12b..586cc4e9d36e 100644 --- a/store/v2alpha1/transient/store.go +++ b/store/v2alpha1/transient/store.go @@ -3,6 +3,7 @@ package transient import ( dbm "github.com/cosmos/cosmos-sdk/db" "github.com/cosmos/cosmos-sdk/db/memdb" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/store/v2alpha1/dbadapter" ) @@ -40,7 +41,7 @@ func (ts *Store) Commit() (id types.CommitID) { return } -func (ts *Store) SetPruning(types.PruningOptions) {} -func (ts *Store) GetPruning() types.PruningOptions { return types.PruningOptions{} } +func (ts *Store) SetPruning(pruningtypes.PruningOptions) {} +func (ts *Store) GetPruning() pruningtypes.PruningOptions { return pruningtypes.PruningOptions{} } func (ts *Store) LastCommitID() (id types.CommitID) { return } diff --git a/store/v2alpha1/types.go b/store/v2alpha1/types.go index 5aacfc2d4133..44c97ff4f52d 100644 --- a/store/v2alpha1/types.go +++ b/store/v2alpha1/types.go @@ -9,13 +9,12 @@ import ( // Re-export relevant original store types type ( - StoreKey = v1.StoreKey - StoreType = v1.StoreType - CommitID = v1.CommitID - StoreUpgrades = v1.StoreUpgrades - StoreRename = v1.StoreRename - Iterator = v1.Iterator - PruningOptions = v1.PruningOptions + StoreKey = v1.StoreKey + StoreType = v1.StoreType + CommitID = v1.CommitID + StoreUpgrades = v1.StoreUpgrades + StoreRename = v1.StoreRename + Iterator = v1.Iterator TraceContext = v1.TraceContext WriteListener = v1.WriteListener @@ -46,10 +45,6 @@ const ( ) var ( - PruneDefault = v1.PruneDefault - PruneEverything = v1.PruneEverything - PruneNothing = v1.PruneNothing - NewKVStoreKey = v1.NewKVStoreKey PrefixEndBytes = v1.PrefixEndBytes KVStorePrefixIterator = v1.KVStorePrefixIterator diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index 772dc5de6ebe..5a07c7563d61 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -14,7 +14,6 @@ import ( types0 "github.com/cosmos/cosmos-sdk/types" module "github.com/cosmos/cosmos-sdk/types/module" gomock "github.com/golang/mock/gomock" - mux "github.com/gorilla/mux" runtime "github.com/grpc-ecosystem/grpc-gateway/runtime" cobra "github.com/spf13/cobra" types1 "github.com/tendermint/tendermint/abci/types" @@ -135,18 +134,6 @@ func (mr *MockAppModuleBasicMockRecorder) RegisterLegacyAminoCodec(arg0 interfac return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterLegacyAminoCodec), arg0) } -// RegisterRESTRoutes mocks base method. -func (m *MockAppModuleBasic) RegisterRESTRoutes(arg0 client.Context, arg1 *mux.Router) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterRESTRoutes", arg0, arg1) -} - -// RegisterRESTRoutes indicates an expected call of RegisterRESTRoutes. -func (mr *MockAppModuleBasicMockRecorder) RegisterRESTRoutes(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRESTRoutes", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterRESTRoutes), arg0, arg1) -} - // ValidateGenesis mocks base method. func (m *MockAppModuleBasic) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { m.ctrl.T.Helper() @@ -304,18 +291,6 @@ func (mr *MockAppModuleGenesisMockRecorder) RegisterLegacyAminoCodec(arg0 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterLegacyAminoCodec), arg0) } -// RegisterRESTRoutes mocks base method. -func (m *MockAppModuleGenesis) RegisterRESTRoutes(arg0 client.Context, arg1 *mux.Router) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterRESTRoutes", arg0, arg1) -} - -// RegisterRESTRoutes indicates an expected call of RegisterRESTRoutes. -func (mr *MockAppModuleGenesisMockRecorder) RegisterRESTRoutes(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRESTRoutes", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterRESTRoutes), arg0, arg1) -} - // ValidateGenesis mocks base method. func (m *MockAppModuleGenesis) ValidateGenesis(arg0 codec.JSONCodec, arg1 client.TxEncodingConfig, arg2 json.RawMessage) error { m.ctrl.T.Helper() @@ -553,18 +528,6 @@ func (mr *MockAppModuleMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModule)(nil).RegisterLegacyAminoCodec), arg0) } -// RegisterRESTRoutes mocks base method. -func (m *MockAppModule) RegisterRESTRoutes(arg0 client.Context, arg1 *mux.Router) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterRESTRoutes", arg0, arg1) -} - -// RegisterRESTRoutes indicates an expected call of RegisterRESTRoutes. -func (mr *MockAppModuleMockRecorder) RegisterRESTRoutes(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRESTRoutes", reflect.TypeOf((*MockAppModule)(nil).RegisterRESTRoutes), arg0, arg1) -} - // RegisterServices mocks base method. func (m *MockAppModule) RegisterServices(arg0 module.Configurator) { m.ctrl.T.Helper() diff --git a/testutil/ioutil.go b/testutil/ioutil.go index 6ff54d24ecb0..ef33eaa4411e 100644 --- a/testutil/ioutil.go +++ b/testutil/ioutil.go @@ -67,8 +67,21 @@ func WriteToNewTempFile(t testing.TB, s string) *os.File { func TempFile(t testing.TB) *os.File { t.Helper() - fp, err := os.CreateTemp(t.TempDir(), "") + fp, err := os.CreateTemp(GetTempDir(t), "") require.NoError(t, err) return fp } + +// GetTempDir returns a writable temporary director for the test to use. +func GetTempDir(t testing.TB) string { + t.Helper() + // os.MkDir() is used instead of testing.T.TempDir() + // see https://github.com/cosmos/cosmos-sdk/pull/8475 and + // https://github.com/cosmos/cosmos-sdk/pull/10341 for + // this change's rationale. + tempdir, err := os.MkdirTemp("", "") + require.NoError(t, err) + t.Cleanup(func() { _ = os.RemoveAll(tempdir) }) + return tempdir +} diff --git a/testutil/ioutil_test.go b/testutil/ioutil_test.go index 03250fbab6a3..59b4a0a840a6 100644 --- a/testutil/ioutil_test.go +++ b/testutil/ioutil_test.go @@ -27,7 +27,7 @@ func TestApplyMockIO(t *testing.T) { func TestWriteToNewTempFile(t *testing.T) { tempfile := testutil.WriteToNewTempFile(t, "test string") - tempfile.Close() + require.NoError(t, tempfile.Close()) bs, err := os.ReadFile(tempfile.Name()) require.NoError(t, err) diff --git a/testutil/mock/privval.go b/testutil/mock/privval.go index 6aaceedd2e34..0aa5f3678eec 100644 --- a/testutil/mock/privval.go +++ b/testutil/mock/privval.go @@ -1,8 +1,6 @@ package mock import ( - "context" - "github.com/tendermint/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" @@ -14,7 +12,7 @@ import ( var _ tmtypes.PrivValidator = PV{} -// MockPV implements PrivValidator without any safety or persistence. +// PV implements PrivValidator without any safety or persistence. // Only use it for testing. type PV struct { PrivKey cryptotypes.PrivKey @@ -25,12 +23,12 @@ func NewPV() PV { } // GetPubKey implements PrivValidator interface -func (pv PV) GetPubKey(_ context.Context) (crypto.PubKey, error) { +func (pv PV) GetPubKey() (crypto.PubKey, error) { return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey()) } // SignVote implements PrivValidator interface -func (pv PV) SignVote(_ context.Context, chainID string, vote *tmproto.Vote) error { +func (pv PV) SignVote(chainID string, vote *tmproto.Vote) error { signBytes := tmtypes.VoteSignBytes(chainID, vote) sig, err := pv.PrivKey.Sign(signBytes) if err != nil { @@ -41,7 +39,7 @@ func (pv PV) SignVote(_ context.Context, chainID string, vote *tmproto.Vote) err } // SignProposal implements PrivValidator interface -func (pv PV) SignProposal(_ context.Context, chainID string, proposal *tmproto.Proposal) error { +func (pv PV) SignProposal(chainID string, proposal *tmproto.Proposal) error { signBytes := tmtypes.ProposalSignBytes(chainID, proposal) sig, err := pv.PrivKey.Sign(signBytes) if err != nil { diff --git a/testutil/mock/privval_test.go b/testutil/mock/privval_test.go new file mode 100644 index 000000000000..10f778a1db20 --- /dev/null +++ b/testutil/mock/privval_test.go @@ -0,0 +1,31 @@ +package mock + +import ( + "testing" + + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +func TestGetPubKey(t *testing.T) { + pv := NewPV() + pb, err := pv.GetPubKey() + require.NoError(t, err) + require.NotNil(t, pb) +} + +func TestSignVote(t *testing.T) { + pv := NewPV() + v := tmproto.Vote{} + err := pv.SignVote("chain-id", &v) + require.NoError(t, err) + require.NotNil(t, v.Signature) +} + +func TestSignProposal(t *testing.T) { + pv := NewPV() + p := tmproto.Proposal{} + err := pv.SignProposal("chain-id", &p) + require.NoError(t, err) + require.NotNil(t, p.Signature) +} diff --git a/testutil/network/doc.go b/testutil/network/doc.go index 9e44f371ab6c..fa7cc7d7715c 100644 --- a/testutil/network/doc.go +++ b/testutil/network/doc.go @@ -24,20 +24,22 @@ A typical testing flow might look like the following: type IntegrationTestSuite struct { suite.Suite - cfg testutil.Config - network *testutil.Network + cfg network.Config + network *network.Network } func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") - cfg := testutil.DefaultConfig() + cfg := network.DefaultConfig() cfg.NumValidators = 1 - s.cfg = cfg - s.network = testutil.New(s.T(), cfg) - _, err := s.network.WaitForHeight(1) + var err error + s.network, err = network.New(s.T(), s.T().TempDir(), cfg) + s.Require().NoError(err) + + _, err = s.network.WaitForHeight(1) s.Require().NoError(err) } diff --git a/testutil/network/network.go b/testutil/network/network.go index c21c78d54fd5..5820091f9027 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -17,9 +17,8 @@ import ( "github.com/rs/zerolog" "github.com/spf13/cobra" - "github.com/tendermint/tendermint/config" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/libs/service" + "github.com/tendermint/tendermint/node" tmclient "github.com/tendermint/tendermint/rpc/client" dbm "github.com/tendermint/tm-db" "google.golang.org/grpc" @@ -32,13 +31,13 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/simapp/params" - storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -61,7 +60,7 @@ func NewAppConstructor(encodingCfg params.EncodingConfig) AppConstructor { val.Ctx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.Ctx.Config.RootDir, 0, encodingCfg, simapp.EmptyAppOptions{}, - baseapp.SetPruning(storetypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), + baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), ) } @@ -77,7 +76,7 @@ type Config struct { TxConfig client.TxConfig AccountRetriever client.AccountRetriever AppConstructor AppConstructor // the ABCI application constructor - GenesisState map[string]json.RawMessage // custom gensis state to provide + GenesisState map[string]json.RawMessage // custom genesis state to provide TimeoutCommit time.Duration // the consensus commitment timeout ChainID string // the network chain-id NumValidators int // the total number of validators to create and bond @@ -119,7 +118,7 @@ func DefaultConfig() Config { AccountTokens: sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction), StakingTokens: sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction), BondedTokens: sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), - PruningStrategy: storetypes.PruningOptionNothing, + PruningStrategy: pruningtypes.PruningOptionNothing, CleanupDir: true, SigningAlgo: string(hd.Secp256k1Type), KeyringOptions: []keyring.Option{}, @@ -164,7 +163,7 @@ type ( ValAddress sdk.ValAddress RPCClient tmclient.Client - tmNode service.Service + tmNode *node.Node api *api.Server grpc *grpc.Server grpcWeb *http.Server @@ -178,21 +177,27 @@ type Logger interface { Logf(format string, args ...interface{}) } -var _ Logger = (*testing.T)(nil) -var _ Logger = (*CLILogger)(nil) +var ( + _ Logger = (*testing.T)(nil) + _ Logger = (*CLILogger)(nil) +) +// CLILogger wraps a cobra.Command and provides command logging methods. type CLILogger struct { cmd *cobra.Command } +// Log logs given args. func (s CLILogger) Log(args ...interface{}) { s.cmd.Println(args...) } +// Logf logs given args according to a format specifier. func (s CLILogger) Logf(format string, args ...interface{}) { s.cmd.Printf(format, args...) } +// NewCLILogger creates a new CLILogger. func NewCLILogger(cmd *cobra.Command) CLILogger { return CLILogger{cmd} } @@ -236,7 +241,6 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { ctx := server.NewDefaultContext() tmCfg := ctx.Config tmCfg.Consensus.TimeoutCommit = cfg.TimeoutCommit - tmCfg.Mode = config.ModeValidator // Only allow the first validator to expose an RPC, API and gRPC // server/client due to Tendermint in-process constraints. @@ -305,12 +309,12 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { clientDir := filepath.Join(network.BaseDir, nodeDirName, "simcli") gentxsDir := filepath.Join(network.BaseDir, "gentxs") - err := os.MkdirAll(filepath.Join(nodeDir, "config"), 0755) + err := os.MkdirAll(filepath.Join(nodeDir, "config"), 0o755) if err != nil { return nil, err } - err = os.MkdirAll(clientDir, 0755) + err = os.MkdirAll(clientDir, 0o755) if err != nil { return nil, err } @@ -443,6 +447,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { if err != nil { return nil, err } + srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config", "app.toml"), appCfg) clientCtx := client.Context{}. diff --git a/testutil/network/network_test.go b/testutil/network/network_test.go index 43859ff5a8a4..c7b5e4291ccc 100644 --- a/testutil/network/network_test.go +++ b/testutil/network/network_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package network_test diff --git a/testutil/network/util.go b/testutil/network/util.go index eeeb043003da..05931dc886b8 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -6,12 +6,14 @@ import ( "path/filepath" "time" - abciclient "github.com/tendermint/tendermint/abci/client" tmos "github.com/tendermint/tendermint/libs/os" - tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/node" + "github.com/tendermint/tendermint/p2p" + pvm "github.com/tendermint/tendermint/privval" + "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/rpc/client/local" "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/server/api" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" @@ -31,36 +33,36 @@ func startInProcess(cfg Config, val *Validator) error { return err } - app := cfg.AppConstructor(*val) - - genDoc, err := types.GenesisDocFromFile(tmCfg.GenesisFile()) + nodeKey, err := p2p.LoadOrGenNodeKey(tmCfg.NodeKeyFile()) if err != nil { return err } - val.tmNode, err = node.New( + app := cfg.AppConstructor(*val) + genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg) + + tmNode, err := node.NewNode( tmCfg, + pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()), + nodeKey, + proxy.NewLocalClientCreator(app), + genDocProvider, + node.DefaultDBProvider, + node.DefaultMetricsProvider(tmCfg.Instrumentation), logger.With("module", val.Moniker), - abciclient.NewLocalCreator(app), - genDoc, ) if err != nil { return err } - if err := val.tmNode.Start(); err != nil { + if err := tmNode.Start(); err != nil { return err } + val.tmNode = tmNode + if val.RPCAddress != "" { - node, ok := val.tmNode.(local.NodeService) - if !ok { - panic("can't cast service.Service to NodeService") - } - val.RPCClient, err = local.New(node) - if err != nil { - panic("cant create a local node") - } + val.RPCClient = local.New(tmNode) } // We'll need a RPC client if the validator exposes a gRPC or REST endpoint. @@ -97,7 +99,7 @@ func startInProcess(cfg Config, val *Validator) error { } if val.AppConfig.GRPC.Enable { - grpcSrv, err := servergrpc.StartGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC.Address) + grpcSrv, err := servergrpc.StartGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) if err != nil { return err } @@ -150,7 +152,6 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error { } func initGenFiles(cfg Config, genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string) error { - // set the accounts in the genesis state var authGenState authtypes.GenesisState cfg.Codec.MustUnmarshalJSON(cfg.GenesisState[authtypes.ModuleName], &authGenState) @@ -195,12 +196,12 @@ func writeFile(name string, dir string, contents []byte) error { writePath := filepath.Join(dir) file := filepath.Join(writePath, name) - err := tmos.EnsureDir(writePath, 0755) + err := tmos.EnsureDir(writePath, 0o755) if err != nil { return err } - err = ioutil.WriteFile(file, contents, 0644) // nolint: gosec + err = ioutil.WriteFile(file, contents, 0o644) // nolint: gosec if err != nil { return err } diff --git a/testutil/rest/rest.go b/testutil/rest/rest.go index e56ef90a201e..c2cd418d0d14 100644 --- a/testutil/rest/rest.go +++ b/testutil/rest/rest.go @@ -16,7 +16,9 @@ func GetRequest(url string) ([]byte, error) { if err != nil { return nil, err } - defer res.Body.Close() + defer func() { + _ = res.Body.Close() + }() body, err := io.ReadAll(res.Body) if err != nil { @@ -33,7 +35,9 @@ func PostRequest(url string, contentType string, data []byte) ([]byte, error) { if err != nil { return nil, fmt.Errorf("error while sending post request: %w", err) } - defer res.Body.Close() + defer func() { + _ = res.Body.Close() + }() bz, err := io.ReadAll(res.Body) if err != nil { diff --git a/testutil/testdata/buf.gen.pulsar.yaml b/testutil/testdata/buf.gen.pulsar.yaml index 1565993c4a94..fbfec36e7610 100644 --- a/testutil/testdata/buf.gen.pulsar.yaml +++ b/testutil/testdata/buf.gen.pulsar.yaml @@ -8,7 +8,7 @@ managed: - buf.build/cosmos/gogo-proto - buf.build/cosmos/cosmos-proto override: - buf.build/cosmos/cosmos-sdk: github.com/cosmos/cosmos-sdk/api + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api plugins: - name: go-pulsar out: ../testdata_pulsar diff --git a/testutil/testdata/table.go b/testutil/testdata/table.go index 8faae88a451d..691d6c8cc34a 100644 --- a/testutil/testdata/table.go +++ b/testutil/testdata/table.go @@ -2,9 +2,7 @@ package testdata import "github.com/cosmos/cosmos-sdk/types/errors" -var ( - ErrTest = errors.Register("table_testdata", 2, "test") -) +var ErrTest = errors.Register("table_testdata", 2, "test") func (g TableModel) PrimaryKeyFields() []interface{} { return []interface{}{g.Id} diff --git a/testutil/testdata/tx.go b/testutil/testdata/tx.go index 5d0051f41a6a..d16dd06d0ebd 100644 --- a/testutil/testdata/tx.go +++ b/testutil/testdata/tx.go @@ -63,6 +63,7 @@ func (msg *TestMsg) GetSignBytes() []byte { } return sdk.MustSortJSON(bz) } + func (msg *TestMsg) GetSigners() []sdk.AccAddress { signers := make([]sdk.AccAddress, 0, len(msg.Signers)) for _, addr := range msg.Signers { @@ -71,6 +72,7 @@ func (msg *TestMsg) GetSigners() []sdk.AccAddress { } return signers } + func (msg *TestMsg) ValidateBasic() error { for _, addr := range msg.Signers { if _, err := sdk.AccAddressFromBech32(addr); err != nil { diff --git a/testutil/testdata_pulsar/query.go b/testutil/testdata_pulsar/query.go deleted file mode 100644 index 7103798a22d9..000000000000 --- a/testutil/testdata_pulsar/query.go +++ /dev/null @@ -1,28 +0,0 @@ -package testdata_pulsar - -import ( - "context" - "fmt" -) - -type QueryImpl struct { - UnimplementedQueryServer -} - -func (q QueryImpl) Echo(_ context.Context, request *EchoRequest) (*EchoResponse, error) { - return &EchoResponse{Message: request.Message}, nil -} - -func (q QueryImpl) SayHello(_ context.Context, request *SayHelloRequest) (*SayHelloResponse, error) { - greeting := fmt.Sprintf("Hello %s!", request.Name) - return &SayHelloResponse{Greeting: greeting}, nil -} - -func (q QueryImpl) TestAny(_ context.Context, request *TestAnyRequest) (*TestAnyResponse, error) { - return &TestAnyResponse{HasAnimal: &HasAnimal{ - Animal: request.AnyAnimal, - X: 10, - }}, nil -} - -var _ QueryServer = QueryImpl{} diff --git a/testutil/testdata_pulsar/query_grpc.pb.go b/testutil/testdata_pulsar/query_grpc.pb.go deleted file mode 100644 index 91d788dcc681..000000000000 --- a/testutil/testdata_pulsar/query_grpc.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: query.proto - -package testdata_pulsar - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) - SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) - TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { - out := new(EchoResponse) - err := c.cc.Invoke(ctx, "/testdata.Query/Echo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) { - out := new(SayHelloResponse) - err := c.cc.Invoke(ctx, "/testdata.Query/SayHello", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) { - out := new(TestAnyResponse) - err := c.cc.Invoke(ctx, "/testdata.Query/TestAny", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - Echo(context.Context, *EchoRequest) (*EchoResponse, error) - SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) - TestAny(context.Context, *TestAnyRequest) (*TestAnyResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") -} -func (UnimplementedQueryServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") -} -func (UnimplementedQueryServer) TestAny(context.Context, *TestAnyRequest) (*TestAnyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestAny not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EchoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Echo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.Query/Echo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SayHelloRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SayHello(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.Query/SayHello", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SayHello(ctx, req.(*SayHelloRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TestAny_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestAnyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TestAny(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.Query/TestAny", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TestAny(ctx, req.(*TestAnyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "testdata.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Echo", - Handler: _Query_Echo_Handler, - }, - { - MethodName: "SayHello", - Handler: _Query_SayHello_Handler, - }, - { - MethodName: "TestAny", - Handler: _Query_TestAny_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "query.proto", -} diff --git a/testutil/testdata_pulsar/testdata.pulsar.go b/testutil/testdata_pulsar/testdata.pulsar.go deleted file mode 100644 index 118749dd95ca..000000000000 --- a/testutil/testdata_pulsar/testdata.pulsar.go +++ /dev/null @@ -1,3961 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package testdata_pulsar - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - 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 ( - md_Dog protoreflect.MessageDescriptor - fd_Dog_size protoreflect.FieldDescriptor - fd_Dog_name protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_Dog = File_testdata_proto.Messages().ByName("Dog") - fd_Dog_size = md_Dog.Fields().ByName("size") - fd_Dog_name = md_Dog.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_Dog)(nil) - -type fastReflection_Dog Dog - -func (x *Dog) ProtoReflect() protoreflect.Message { - return (*fastReflection_Dog)(x) -} - -func (x *Dog) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Dog_messageType fastReflection_Dog_messageType -var _ protoreflect.MessageType = fastReflection_Dog_messageType{} - -type fastReflection_Dog_messageType struct{} - -func (x fastReflection_Dog_messageType) Zero() protoreflect.Message { - return (*fastReflection_Dog)(nil) -} -func (x fastReflection_Dog_messageType) New() protoreflect.Message { - return new(fastReflection_Dog) -} -func (x fastReflection_Dog_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Dog -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Dog) Descriptor() protoreflect.MessageDescriptor { - return md_Dog -} - -// 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_Dog) Type() protoreflect.MessageType { - return _fastReflection_Dog_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Dog) New() protoreflect.Message { - return new(fastReflection_Dog) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Dog) Interface() protoreflect.ProtoMessage { - return (*Dog)(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_Dog) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Size != "" { - value := protoreflect.ValueOfString(x.Size) - if !f(fd_Dog_size, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Dog_name, 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_Dog) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Dog.size": - return x.Size != "" - case "testdata.Dog.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Dog")) - } - panic(fmt.Errorf("message testdata.Dog 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_Dog) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Dog.size": - x.Size = "" - case "testdata.Dog.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Dog")) - } - panic(fmt.Errorf("message testdata.Dog 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_Dog) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Dog.size": - value := x.Size - return protoreflect.ValueOfString(value) - case "testdata.Dog.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Dog")) - } - panic(fmt.Errorf("message testdata.Dog 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_Dog) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Dog.size": - x.Size = value.Interface().(string) - case "testdata.Dog.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Dog")) - } - panic(fmt.Errorf("message testdata.Dog 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_Dog) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Dog.size": - panic(fmt.Errorf("field size of message testdata.Dog is not mutable")) - case "testdata.Dog.name": - panic(fmt.Errorf("field name of message testdata.Dog is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Dog")) - } - panic(fmt.Errorf("message testdata.Dog 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_Dog) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Dog.size": - return protoreflect.ValueOfString("") - case "testdata.Dog.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Dog")) - } - panic(fmt.Errorf("message testdata.Dog 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_Dog) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Dog", 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_Dog) 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_Dog) 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_Dog) 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_Dog) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Dog) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Size) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Dog) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if len(x.Size) > 0 { - i -= len(x.Size) - copy(dAtA[i:], x.Size) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Size))) - 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().(*Dog) - 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: Dog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Dog: 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 Size", 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.Size = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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:]) - 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_Cat protoreflect.MessageDescriptor - fd_Cat_moniker protoreflect.FieldDescriptor - fd_Cat_lives protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_Cat = File_testdata_proto.Messages().ByName("Cat") - fd_Cat_moniker = md_Cat.Fields().ByName("moniker") - fd_Cat_lives = md_Cat.Fields().ByName("lives") -} - -var _ protoreflect.Message = (*fastReflection_Cat)(nil) - -type fastReflection_Cat Cat - -func (x *Cat) ProtoReflect() protoreflect.Message { - return (*fastReflection_Cat)(x) -} - -func (x *Cat) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Cat_messageType fastReflection_Cat_messageType -var _ protoreflect.MessageType = fastReflection_Cat_messageType{} - -type fastReflection_Cat_messageType struct{} - -func (x fastReflection_Cat_messageType) Zero() protoreflect.Message { - return (*fastReflection_Cat)(nil) -} -func (x fastReflection_Cat_messageType) New() protoreflect.Message { - return new(fastReflection_Cat) -} -func (x fastReflection_Cat_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Cat -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Cat) Descriptor() protoreflect.MessageDescriptor { - return md_Cat -} - -// 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_Cat) Type() protoreflect.MessageType { - return _fastReflection_Cat_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Cat) New() protoreflect.Message { - return new(fastReflection_Cat) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Cat) Interface() protoreflect.ProtoMessage { - return (*Cat)(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_Cat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Moniker != "" { - value := protoreflect.ValueOfString(x.Moniker) - if !f(fd_Cat_moniker, value) { - return - } - } - if x.Lives != int32(0) { - value := protoreflect.ValueOfInt32(x.Lives) - if !f(fd_Cat_lives, 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_Cat) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Cat.moniker": - return x.Moniker != "" - case "testdata.Cat.lives": - return x.Lives != int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Cat")) - } - panic(fmt.Errorf("message testdata.Cat 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_Cat) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Cat.moniker": - x.Moniker = "" - case "testdata.Cat.lives": - x.Lives = int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Cat")) - } - panic(fmt.Errorf("message testdata.Cat 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_Cat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Cat.moniker": - value := x.Moniker - return protoreflect.ValueOfString(value) - case "testdata.Cat.lives": - value := x.Lives - return protoreflect.ValueOfInt32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Cat")) - } - panic(fmt.Errorf("message testdata.Cat 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_Cat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Cat.moniker": - x.Moniker = value.Interface().(string) - case "testdata.Cat.lives": - x.Lives = int32(value.Int()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Cat")) - } - panic(fmt.Errorf("message testdata.Cat 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_Cat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Cat.moniker": - panic(fmt.Errorf("field moniker of message testdata.Cat is not mutable")) - case "testdata.Cat.lives": - panic(fmt.Errorf("field lives of message testdata.Cat is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Cat")) - } - panic(fmt.Errorf("message testdata.Cat 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_Cat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Cat.moniker": - return protoreflect.ValueOfString("") - case "testdata.Cat.lives": - return protoreflect.ValueOfInt32(int32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Cat")) - } - panic(fmt.Errorf("message testdata.Cat 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_Cat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Cat", 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_Cat) 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_Cat) 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_Cat) 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_Cat) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Cat) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Moniker) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Lives != 0 { - n += 1 + runtime.Sov(uint64(x.Lives)) - } - 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().(*Cat) - 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.Lives != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Lives)) - i-- - dAtA[i] = 0x10 - } - if len(x.Moniker) > 0 { - i -= len(x.Moniker) - copy(dAtA[i:], x.Moniker) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Moniker))) - 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().(*Cat) - 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: Cat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Cat: 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 Moniker", 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.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Lives", wireType) - } - x.Lives = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Lives |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_HasAnimal protoreflect.MessageDescriptor - fd_HasAnimal_animal protoreflect.FieldDescriptor - fd_HasAnimal_x protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_HasAnimal = File_testdata_proto.Messages().ByName("HasAnimal") - fd_HasAnimal_animal = md_HasAnimal.Fields().ByName("animal") - fd_HasAnimal_x = md_HasAnimal.Fields().ByName("x") -} - -var _ protoreflect.Message = (*fastReflection_HasAnimal)(nil) - -type fastReflection_HasAnimal HasAnimal - -func (x *HasAnimal) ProtoReflect() protoreflect.Message { - return (*fastReflection_HasAnimal)(x) -} - -func (x *HasAnimal) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_HasAnimal_messageType fastReflection_HasAnimal_messageType -var _ protoreflect.MessageType = fastReflection_HasAnimal_messageType{} - -type fastReflection_HasAnimal_messageType struct{} - -func (x fastReflection_HasAnimal_messageType) Zero() protoreflect.Message { - return (*fastReflection_HasAnimal)(nil) -} -func (x fastReflection_HasAnimal_messageType) New() protoreflect.Message { - return new(fastReflection_HasAnimal) -} -func (x fastReflection_HasAnimal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HasAnimal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HasAnimal) Descriptor() protoreflect.MessageDescriptor { - return md_HasAnimal -} - -// 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_HasAnimal) Type() protoreflect.MessageType { - return _fastReflection_HasAnimal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HasAnimal) New() protoreflect.Message { - return new(fastReflection_HasAnimal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HasAnimal) Interface() protoreflect.ProtoMessage { - return (*HasAnimal)(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_HasAnimal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Animal != nil { - value := protoreflect.ValueOfMessage(x.Animal.ProtoReflect()) - if !f(fd_HasAnimal_animal, value) { - return - } - } - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_HasAnimal_x, 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_HasAnimal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.HasAnimal.animal": - return x.Animal != nil - case "testdata.HasAnimal.x": - return x.X != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasAnimal")) - } - panic(fmt.Errorf("message testdata.HasAnimal 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_HasAnimal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.HasAnimal.animal": - x.Animal = nil - case "testdata.HasAnimal.x": - x.X = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasAnimal")) - } - panic(fmt.Errorf("message testdata.HasAnimal 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_HasAnimal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.HasAnimal.animal": - value := x.Animal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.HasAnimal.x": - value := x.X - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasAnimal")) - } - panic(fmt.Errorf("message testdata.HasAnimal 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_HasAnimal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.HasAnimal.animal": - x.Animal = value.Message().Interface().(*anypb.Any) - case "testdata.HasAnimal.x": - x.X = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasAnimal")) - } - panic(fmt.Errorf("message testdata.HasAnimal 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_HasAnimal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.HasAnimal.animal": - if x.Animal == nil { - x.Animal = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Animal.ProtoReflect()) - case "testdata.HasAnimal.x": - panic(fmt.Errorf("field x of message testdata.HasAnimal is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasAnimal")) - } - panic(fmt.Errorf("message testdata.HasAnimal 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_HasAnimal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.HasAnimal.animal": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.HasAnimal.x": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasAnimal")) - } - panic(fmt.Errorf("message testdata.HasAnimal 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_HasAnimal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.HasAnimal", 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_HasAnimal) 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_HasAnimal) 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_HasAnimal) 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_HasAnimal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HasAnimal) - 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.Animal != nil { - l = options.Size(x.Animal) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - 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().(*HasAnimal) - 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.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x10 - } - if x.Animal != nil { - encoded, err := options.Marshal(x.Animal) - 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().(*HasAnimal) - 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: HasAnimal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HasAnimal: 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 Animal", 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.Animal == nil { - x.Animal = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Animal); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_HasHasAnimal protoreflect.MessageDescriptor - fd_HasHasAnimal_has_animal protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_HasHasAnimal = File_testdata_proto.Messages().ByName("HasHasAnimal") - fd_HasHasAnimal_has_animal = md_HasHasAnimal.Fields().ByName("has_animal") -} - -var _ protoreflect.Message = (*fastReflection_HasHasAnimal)(nil) - -type fastReflection_HasHasAnimal HasHasAnimal - -func (x *HasHasAnimal) ProtoReflect() protoreflect.Message { - return (*fastReflection_HasHasAnimal)(x) -} - -func (x *HasHasAnimal) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_HasHasAnimal_messageType fastReflection_HasHasAnimal_messageType -var _ protoreflect.MessageType = fastReflection_HasHasAnimal_messageType{} - -type fastReflection_HasHasAnimal_messageType struct{} - -func (x fastReflection_HasHasAnimal_messageType) Zero() protoreflect.Message { - return (*fastReflection_HasHasAnimal)(nil) -} -func (x fastReflection_HasHasAnimal_messageType) New() protoreflect.Message { - return new(fastReflection_HasHasAnimal) -} -func (x fastReflection_HasHasAnimal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HasHasAnimal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HasHasAnimal) Descriptor() protoreflect.MessageDescriptor { - return md_HasHasAnimal -} - -// 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_HasHasAnimal) Type() protoreflect.MessageType { - return _fastReflection_HasHasAnimal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HasHasAnimal) New() protoreflect.Message { - return new(fastReflection_HasHasAnimal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HasHasAnimal) Interface() protoreflect.ProtoMessage { - return (*HasHasAnimal)(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_HasHasAnimal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HasAnimal != nil { - value := protoreflect.ValueOfMessage(x.HasAnimal.ProtoReflect()) - if !f(fd_HasHasAnimal_has_animal, 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_HasHasAnimal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.HasHasAnimal.has_animal": - return x.HasAnimal != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasAnimal 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_HasHasAnimal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.HasHasAnimal.has_animal": - x.HasAnimal = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasAnimal 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_HasHasAnimal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.HasHasAnimal.has_animal": - value := x.HasAnimal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasAnimal 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_HasHasAnimal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.HasHasAnimal.has_animal": - x.HasAnimal = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasAnimal 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_HasHasAnimal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.HasHasAnimal.has_animal": - if x.HasAnimal == nil { - x.HasAnimal = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.HasAnimal.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasAnimal 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_HasHasAnimal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.HasHasAnimal.has_animal": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasAnimal 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_HasHasAnimal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.HasHasAnimal", 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_HasHasAnimal) 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_HasHasAnimal) 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_HasHasAnimal) 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_HasHasAnimal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HasHasAnimal) - 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.HasAnimal != nil { - l = options.Size(x.HasAnimal) - 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().(*HasHasAnimal) - 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.HasAnimal != nil { - encoded, err := options.Marshal(x.HasAnimal) - 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().(*HasHasAnimal) - 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: HasHasAnimal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HasHasAnimal: 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 HasAnimal", 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.HasAnimal == nil { - x.HasAnimal = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HasAnimal); 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_HasHasHasAnimal protoreflect.MessageDescriptor - fd_HasHasHasAnimal_has_has_animal protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_HasHasHasAnimal = File_testdata_proto.Messages().ByName("HasHasHasAnimal") - fd_HasHasHasAnimal_has_has_animal = md_HasHasHasAnimal.Fields().ByName("has_has_animal") -} - -var _ protoreflect.Message = (*fastReflection_HasHasHasAnimal)(nil) - -type fastReflection_HasHasHasAnimal HasHasHasAnimal - -func (x *HasHasHasAnimal) ProtoReflect() protoreflect.Message { - return (*fastReflection_HasHasHasAnimal)(x) -} - -func (x *HasHasHasAnimal) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_HasHasHasAnimal_messageType fastReflection_HasHasHasAnimal_messageType -var _ protoreflect.MessageType = fastReflection_HasHasHasAnimal_messageType{} - -type fastReflection_HasHasHasAnimal_messageType struct{} - -func (x fastReflection_HasHasHasAnimal_messageType) Zero() protoreflect.Message { - return (*fastReflection_HasHasHasAnimal)(nil) -} -func (x fastReflection_HasHasHasAnimal_messageType) New() protoreflect.Message { - return new(fastReflection_HasHasHasAnimal) -} -func (x fastReflection_HasHasHasAnimal_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HasHasHasAnimal -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HasHasHasAnimal) Descriptor() protoreflect.MessageDescriptor { - return md_HasHasHasAnimal -} - -// 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_HasHasHasAnimal) Type() protoreflect.MessageType { - return _fastReflection_HasHasHasAnimal_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HasHasHasAnimal) New() protoreflect.Message { - return new(fastReflection_HasHasHasAnimal) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HasHasHasAnimal) Interface() protoreflect.ProtoMessage { - return (*HasHasHasAnimal)(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_HasHasHasAnimal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HasHasAnimal != nil { - value := protoreflect.ValueOfMessage(x.HasHasAnimal.ProtoReflect()) - if !f(fd_HasHasHasAnimal_has_has_animal, 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_HasHasHasAnimal) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.HasHasHasAnimal.has_has_animal": - return x.HasHasAnimal != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasHasAnimal 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_HasHasHasAnimal) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.HasHasHasAnimal.has_has_animal": - x.HasHasAnimal = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasHasAnimal 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_HasHasHasAnimal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.HasHasHasAnimal.has_has_animal": - value := x.HasHasAnimal - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasHasAnimal 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_HasHasHasAnimal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.HasHasHasAnimal.has_has_animal": - x.HasHasAnimal = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasHasAnimal 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_HasHasHasAnimal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.HasHasHasAnimal.has_has_animal": - if x.HasHasAnimal == nil { - x.HasHasAnimal = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.HasHasAnimal.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasHasAnimal 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_HasHasHasAnimal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.HasHasHasAnimal.has_has_animal": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.HasHasHasAnimal")) - } - panic(fmt.Errorf("message testdata.HasHasHasAnimal 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_HasHasHasAnimal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.HasHasHasAnimal", 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_HasHasHasAnimal) 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_HasHasHasAnimal) 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_HasHasHasAnimal) 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_HasHasHasAnimal) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HasHasHasAnimal) - 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.HasHasAnimal != nil { - l = options.Size(x.HasHasAnimal) - 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().(*HasHasHasAnimal) - 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.HasHasAnimal != nil { - encoded, err := options.Marshal(x.HasHasAnimal) - 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().(*HasHasHasAnimal) - 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: HasHasHasAnimal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HasHasHasAnimal: 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 HasHasAnimal", 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.HasHasAnimal == nil { - x.HasHasAnimal = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HasHasAnimal); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_BadMultiSignature_1_list)(nil) - -type _BadMultiSignature_1_list struct { - list *[][]byte -} - -func (x *_BadMultiSignature_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BadMultiSignature_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_BadMultiSignature_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_BadMultiSignature_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_BadMultiSignature_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message BadMultiSignature at list field Signatures as it is not of Message kind")) -} - -func (x *_BadMultiSignature_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_BadMultiSignature_1_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_BadMultiSignature_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_BadMultiSignature protoreflect.MessageDescriptor - fd_BadMultiSignature_signatures protoreflect.FieldDescriptor - fd_BadMultiSignature_malicious_field protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_BadMultiSignature = File_testdata_proto.Messages().ByName("BadMultiSignature") - fd_BadMultiSignature_signatures = md_BadMultiSignature.Fields().ByName("signatures") - fd_BadMultiSignature_malicious_field = md_BadMultiSignature.Fields().ByName("malicious_field") -} - -var _ protoreflect.Message = (*fastReflection_BadMultiSignature)(nil) - -type fastReflection_BadMultiSignature BadMultiSignature - -func (x *BadMultiSignature) ProtoReflect() protoreflect.Message { - return (*fastReflection_BadMultiSignature)(x) -} - -func (x *BadMultiSignature) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_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_BadMultiSignature_messageType fastReflection_BadMultiSignature_messageType -var _ protoreflect.MessageType = fastReflection_BadMultiSignature_messageType{} - -type fastReflection_BadMultiSignature_messageType struct{} - -func (x fastReflection_BadMultiSignature_messageType) Zero() protoreflect.Message { - return (*fastReflection_BadMultiSignature)(nil) -} -func (x fastReflection_BadMultiSignature_messageType) New() protoreflect.Message { - return new(fastReflection_BadMultiSignature) -} -func (x fastReflection_BadMultiSignature_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BadMultiSignature -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BadMultiSignature) Descriptor() protoreflect.MessageDescriptor { - return md_BadMultiSignature -} - -// 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_BadMultiSignature) Type() protoreflect.MessageType { - return _fastReflection_BadMultiSignature_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BadMultiSignature) New() protoreflect.Message { - return new(fastReflection_BadMultiSignature) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BadMultiSignature) Interface() protoreflect.ProtoMessage { - return (*BadMultiSignature)(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_BadMultiSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_BadMultiSignature_1_list{list: &x.Signatures}) - if !f(fd_BadMultiSignature_signatures, value) { - return - } - } - if len(x.MaliciousField) != 0 { - value := protoreflect.ValueOfBytes(x.MaliciousField) - if !f(fd_BadMultiSignature_malicious_field, 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_BadMultiSignature) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.BadMultiSignature.signatures": - return len(x.Signatures) != 0 - case "testdata.BadMultiSignature.malicious_field": - return len(x.MaliciousField) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.BadMultiSignature")) - } - panic(fmt.Errorf("message testdata.BadMultiSignature 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_BadMultiSignature) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.BadMultiSignature.signatures": - x.Signatures = nil - case "testdata.BadMultiSignature.malicious_field": - x.MaliciousField = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.BadMultiSignature")) - } - panic(fmt.Errorf("message testdata.BadMultiSignature 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_BadMultiSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.BadMultiSignature.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_BadMultiSignature_1_list{}) - } - listValue := &_BadMultiSignature_1_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - case "testdata.BadMultiSignature.malicious_field": - value := x.MaliciousField - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.BadMultiSignature")) - } - panic(fmt.Errorf("message testdata.BadMultiSignature 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_BadMultiSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.BadMultiSignature.signatures": - lv := value.List() - clv := lv.(*_BadMultiSignature_1_list) - x.Signatures = *clv.list - case "testdata.BadMultiSignature.malicious_field": - x.MaliciousField = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.BadMultiSignature")) - } - panic(fmt.Errorf("message testdata.BadMultiSignature 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_BadMultiSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.BadMultiSignature.signatures": - if x.Signatures == nil { - x.Signatures = [][]byte{} - } - value := &_BadMultiSignature_1_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - case "testdata.BadMultiSignature.malicious_field": - panic(fmt.Errorf("field malicious_field of message testdata.BadMultiSignature is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.BadMultiSignature")) - } - panic(fmt.Errorf("message testdata.BadMultiSignature 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_BadMultiSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.BadMultiSignature.signatures": - list := [][]byte{} - return protoreflect.ValueOfList(&_BadMultiSignature_1_list{list: &list}) - case "testdata.BadMultiSignature.malicious_field": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.BadMultiSignature")) - } - panic(fmt.Errorf("message testdata.BadMultiSignature 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_BadMultiSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.BadMultiSignature", 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_BadMultiSignature) 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_BadMultiSignature) 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_BadMultiSignature) 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_BadMultiSignature) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BadMultiSignature) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Signatures) > 0 { - for _, b := range x.Signatures { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.MaliciousField) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BadMultiSignature) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MaliciousField) > 0 { - i -= len(x.MaliciousField) - copy(dAtA[i:], x.MaliciousField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaliciousField))) - i-- - dAtA[i] = 0x2a - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Signatures[iNdEx]) - copy(dAtA[i:], x.Signatures[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signatures[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BadMultiSignature) - 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: BadMultiSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BadMultiSignature: 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 Signatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, make([]byte, postIndex-iNdEx)) - copy(x.Signatures[len(x.Signatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaliciousField", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaliciousField = append(x.MaliciousField[:0], dAtA[iNdEx:postIndex]...) - if x.MaliciousField == nil { - x.MaliciousField = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TableModel protoreflect.MessageDescriptor - fd_TableModel_id protoreflect.FieldDescriptor - fd_TableModel_name protoreflect.FieldDescriptor - fd_TableModel_number protoreflect.FieldDescriptor - fd_TableModel_metadata protoreflect.FieldDescriptor -) - -func init() { - file_testdata_proto_init() - md_TableModel = File_testdata_proto.Messages().ByName("TableModel") - fd_TableModel_id = md_TableModel.Fields().ByName("id") - fd_TableModel_name = md_TableModel.Fields().ByName("name") - fd_TableModel_number = md_TableModel.Fields().ByName("number") - fd_TableModel_metadata = md_TableModel.Fields().ByName("metadata") -} - -var _ protoreflect.Message = (*fastReflection_TableModel)(nil) - -type fastReflection_TableModel TableModel - -func (x *TableModel) ProtoReflect() protoreflect.Message { - return (*fastReflection_TableModel)(x) -} - -func (x *TableModel) slowProtoReflect() protoreflect.Message { - mi := &file_testdata_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_TableModel_messageType fastReflection_TableModel_messageType -var _ protoreflect.MessageType = fastReflection_TableModel_messageType{} - -type fastReflection_TableModel_messageType struct{} - -func (x fastReflection_TableModel_messageType) Zero() protoreflect.Message { - return (*fastReflection_TableModel)(nil) -} -func (x fastReflection_TableModel_messageType) New() protoreflect.Message { - return new(fastReflection_TableModel) -} -func (x fastReflection_TableModel_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TableModel -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TableModel) Descriptor() protoreflect.MessageDescriptor { - return md_TableModel -} - -// 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_TableModel) Type() protoreflect.MessageType { - return _fastReflection_TableModel_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TableModel) New() protoreflect.Message { - return new(fastReflection_TableModel) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TableModel) Interface() protoreflect.ProtoMessage { - return (*TableModel)(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_TableModel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_TableModel_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_TableModel_name, value) { - return - } - } - if x.Number != uint64(0) { - value := protoreflect.ValueOfUint64(x.Number) - if !f(fd_TableModel_number, value) { - return - } - } - if len(x.Metadata) != 0 { - value := protoreflect.ValueOfBytes(x.Metadata) - if !f(fd_TableModel_metadata, 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_TableModel) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TableModel.id": - return x.Id != uint64(0) - case "testdata.TableModel.name": - return x.Name != "" - case "testdata.TableModel.number": - return x.Number != uint64(0) - case "testdata.TableModel.metadata": - return len(x.Metadata) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TableModel")) - } - panic(fmt.Errorf("message testdata.TableModel 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_TableModel) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TableModel.id": - x.Id = uint64(0) - case "testdata.TableModel.name": - x.Name = "" - case "testdata.TableModel.number": - x.Number = uint64(0) - case "testdata.TableModel.metadata": - x.Metadata = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TableModel")) - } - panic(fmt.Errorf("message testdata.TableModel 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_TableModel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TableModel.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "testdata.TableModel.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.TableModel.number": - value := x.Number - return protoreflect.ValueOfUint64(value) - case "testdata.TableModel.metadata": - value := x.Metadata - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TableModel")) - } - panic(fmt.Errorf("message testdata.TableModel 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_TableModel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TableModel.id": - x.Id = value.Uint() - case "testdata.TableModel.name": - x.Name = value.Interface().(string) - case "testdata.TableModel.number": - x.Number = value.Uint() - case "testdata.TableModel.metadata": - x.Metadata = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TableModel")) - } - panic(fmt.Errorf("message testdata.TableModel 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_TableModel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TableModel.id": - panic(fmt.Errorf("field id of message testdata.TableModel is not mutable")) - case "testdata.TableModel.name": - panic(fmt.Errorf("field name of message testdata.TableModel is not mutable")) - case "testdata.TableModel.number": - panic(fmt.Errorf("field number of message testdata.TableModel is not mutable")) - case "testdata.TableModel.metadata": - panic(fmt.Errorf("field metadata of message testdata.TableModel is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TableModel")) - } - panic(fmt.Errorf("message testdata.TableModel 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_TableModel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TableModel.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "testdata.TableModel.name": - return protoreflect.ValueOfString("") - case "testdata.TableModel.number": - return protoreflect.ValueOfUint64(uint64(0)) - case "testdata.TableModel.metadata": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TableModel")) - } - panic(fmt.Errorf("message testdata.TableModel 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_TableModel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TableModel", 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_TableModel) 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_TableModel) 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_TableModel) 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_TableModel) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TableModel) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Number != 0 { - n += 1 + runtime.Sov(uint64(x.Number)) - } - l = len(x.Metadata) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TableModel) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Metadata) > 0 { - i -= len(x.Metadata) - copy(dAtA[i:], x.Metadata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Metadata))) - i-- - dAtA[i] = 0x22 - } - if x.Number != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Number)) - i-- - dAtA[i] = 0x18 - } - 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] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TableModel) - 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: TableModel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TableModel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - x.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Number |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Metadata = append(x.Metadata[:0], dAtA[iNdEx:postIndex]...) - if x.Metadata == nil { - x.Metadata = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: testdata.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Dog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Dog) Reset() { - *x = Dog{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Dog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Dog) ProtoMessage() {} - -// Deprecated: Use Dog.ProtoReflect.Descriptor instead. -func (*Dog) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{0} -} - -func (x *Dog) GetSize() string { - if x != nil { - return x.Size - } - return "" -} - -func (x *Dog) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type Cat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - Lives int32 `protobuf:"varint,2,opt,name=lives,proto3" json:"lives,omitempty"` -} - -func (x *Cat) Reset() { - *x = Cat{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cat) ProtoMessage() {} - -// Deprecated: Use Cat.ProtoReflect.Descriptor instead. -func (*Cat) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{1} -} - -func (x *Cat) GetMoniker() string { - if x != nil { - return x.Moniker - } - return "" -} - -func (x *Cat) GetLives() int32 { - if x != nil { - return x.Lives - } - return 0 -} - -type HasAnimal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Animal *anypb.Any `protobuf:"bytes,1,opt,name=animal,proto3" json:"animal,omitempty"` - X int64 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` -} - -func (x *HasAnimal) Reset() { - *x = HasAnimal{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HasAnimal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HasAnimal) ProtoMessage() {} - -// Deprecated: Use HasAnimal.ProtoReflect.Descriptor instead. -func (*HasAnimal) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{2} -} - -func (x *HasAnimal) GetAnimal() *anypb.Any { - if x != nil { - return x.Animal - } - return nil -} - -func (x *HasAnimal) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -type HasHasAnimal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HasAnimal *anypb.Any `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` -} - -func (x *HasHasAnimal) Reset() { - *x = HasHasAnimal{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HasHasAnimal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HasHasAnimal) ProtoMessage() {} - -// Deprecated: Use HasHasAnimal.ProtoReflect.Descriptor instead. -func (*HasHasAnimal) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{3} -} - -func (x *HasHasAnimal) GetHasAnimal() *anypb.Any { - if x != nil { - return x.HasAnimal - } - return nil -} - -type HasHasHasAnimal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HasHasAnimal *anypb.Any `protobuf:"bytes,1,opt,name=has_has_animal,json=hasHasAnimal,proto3" json:"has_has_animal,omitempty"` -} - -func (x *HasHasHasAnimal) Reset() { - *x = HasHasHasAnimal{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HasHasHasAnimal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HasHasHasAnimal) ProtoMessage() {} - -// Deprecated: Use HasHasHasAnimal.ProtoReflect.Descriptor instead. -func (*HasHasHasAnimal) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{4} -} - -func (x *HasHasHasAnimal) GetHasHasAnimal() *anypb.Any { - if x != nil { - return x.HasHasAnimal - } - return nil -} - -// bad MultiSignature with extra fields -type BadMultiSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` - MaliciousField []byte `protobuf:"bytes,5,opt,name=malicious_field,json=maliciousField,proto3" json:"malicious_field,omitempty"` -} - -func (x *BadMultiSignature) Reset() { - *x = BadMultiSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BadMultiSignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BadMultiSignature) ProtoMessage() {} - -// Deprecated: Use BadMultiSignature.ProtoReflect.Descriptor instead. -func (*BadMultiSignature) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{5} -} - -func (x *BadMultiSignature) GetSignatures() [][]byte { - if x != nil { - return x.Signatures - } - return nil -} - -func (x *BadMultiSignature) GetMaliciousField() []byte { - if x != nil { - return x.MaliciousField - } - return nil -} - -type TableModel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Number uint64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *TableModel) Reset() { - *x = TableModel{} - if protoimpl.UnsafeEnabled { - mi := &file_testdata_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TableModel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TableModel) ProtoMessage() {} - -// Deprecated: Use TableModel.ProtoReflect.Descriptor instead. -func (*TableModel) Descriptor() ([]byte, []int) { - return file_testdata_proto_rawDescGZIP(), []int{6} -} - -func (x *TableModel) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *TableModel) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TableModel) GetNumber() uint64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *TableModel) GetMetadata() []byte { - if x != nil { - return x.Metadata - } - return nil -} - -var File_testdata_proto protoreflect.FileDescriptor - -var file_testdata_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x03, 0x44, - 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x03, 0x43, 0x61, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x69, 0x76, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x76, 0x65, - 0x73, 0x22, 0x47, 0x0a, 0x09, 0x48, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x2c, - 0x0a, 0x06, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 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, 0x52, 0x06, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x0c, 0x0a, 0x01, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x22, 0x43, 0x0a, 0x0c, 0x48, 0x61, - 0x73, 0x48, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x0a, 0x68, 0x61, - 0x73, 0x5f, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 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, 0x52, 0x09, 0x68, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x22, - 0x4d, 0x0a, 0x0f, 0x48, 0x61, 0x73, 0x48, 0x61, 0x73, 0x48, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, - 0x61, 0x6c, 0x12, 0x3a, 0x0a, 0x0e, 0x68, 0x61, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x6e, - 0x69, 0x6d, 0x61, 0x6c, 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, - 0x52, 0x0c, 0x68, 0x61, 0x73, 0x48, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x22, 0x62, - 0x0a, 0x11, 0x42, 0x61, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, - 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6d, 0x61, - 0x6c, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x04, 0xd0, 0xa1, - 0x1f, 0x01, 0x22, 0x64, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x94, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0d, 0x54, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x75, 0x74, 0x69, - 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x75, 0x6c, 0x73, 0x61, - 0x72, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, - 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xe2, 0x02, 0x14, - 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_testdata_proto_rawDescOnce sync.Once - file_testdata_proto_rawDescData = file_testdata_proto_rawDesc -) - -func file_testdata_proto_rawDescGZIP() []byte { - file_testdata_proto_rawDescOnce.Do(func() { - file_testdata_proto_rawDescData = protoimpl.X.CompressGZIP(file_testdata_proto_rawDescData) - }) - return file_testdata_proto_rawDescData -} - -var file_testdata_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_testdata_proto_goTypes = []interface{}{ - (*Dog)(nil), // 0: testdata.Dog - (*Cat)(nil), // 1: testdata.Cat - (*HasAnimal)(nil), // 2: testdata.HasAnimal - (*HasHasAnimal)(nil), // 3: testdata.HasHasAnimal - (*HasHasHasAnimal)(nil), // 4: testdata.HasHasHasAnimal - (*BadMultiSignature)(nil), // 5: testdata.BadMultiSignature - (*TableModel)(nil), // 6: testdata.TableModel - (*anypb.Any)(nil), // 7: google.protobuf.Any -} -var file_testdata_proto_depIdxs = []int32{ - 7, // 0: testdata.HasAnimal.animal:type_name -> google.protobuf.Any - 7, // 1: testdata.HasHasAnimal.has_animal:type_name -> google.protobuf.Any - 7, // 2: testdata.HasHasHasAnimal.has_has_animal:type_name -> google.protobuf.Any - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_testdata_proto_init() } -func file_testdata_proto_init() { - if File_testdata_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_testdata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testdata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testdata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HasAnimal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testdata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HasHasAnimal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testdata_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HasHasHasAnimal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testdata_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BadMultiSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testdata_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TableModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_testdata_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_testdata_proto_goTypes, - DependencyIndexes: file_testdata_proto_depIdxs, - MessageInfos: file_testdata_proto_msgTypes, - }.Build() - File_testdata_proto = out.File - file_testdata_proto_rawDesc = nil - file_testdata_proto_goTypes = nil - file_testdata_proto_depIdxs = nil -} diff --git a/testutil/testdata_pulsar/tx.pulsar.go b/testutil/testdata_pulsar/tx.pulsar.go deleted file mode 100644 index 8651945e2f03..000000000000 --- a/testutil/testdata_pulsar/tx.pulsar.go +++ /dev/null @@ -1,1595 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package testdata_pulsar - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgCreateDog protoreflect.MessageDescriptor - fd_MsgCreateDog_dog protoreflect.FieldDescriptor -) - -func init() { - file_tx_proto_init() - md_MsgCreateDog = File_tx_proto.Messages().ByName("MsgCreateDog") - fd_MsgCreateDog_dog = md_MsgCreateDog.Fields().ByName("dog") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateDog)(nil) - -type fastReflection_MsgCreateDog MsgCreateDog - -func (x *MsgCreateDog) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateDog)(x) -} - -func (x *MsgCreateDog) slowProtoReflect() protoreflect.Message { - mi := &file_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateDog_messageType fastReflection_MsgCreateDog_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateDog_messageType{} - -type fastReflection_MsgCreateDog_messageType struct{} - -func (x fastReflection_MsgCreateDog_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateDog)(nil) -} -func (x fastReflection_MsgCreateDog_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateDog) -} -func (x fastReflection_MsgCreateDog_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateDog -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateDog) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateDog -} - -// 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_MsgCreateDog) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateDog_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateDog) New() protoreflect.Message { - return new(fastReflection_MsgCreateDog) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateDog) Interface() protoreflect.ProtoMessage { - return (*MsgCreateDog)(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_MsgCreateDog) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Dog != nil { - value := protoreflect.ValueOfMessage(x.Dog.ProtoReflect()) - if !f(fd_MsgCreateDog_dog, 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_MsgCreateDog) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.MsgCreateDog.dog": - return x.Dog != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDog")) - } - panic(fmt.Errorf("message testdata.MsgCreateDog 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_MsgCreateDog) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.MsgCreateDog.dog": - x.Dog = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDog")) - } - panic(fmt.Errorf("message testdata.MsgCreateDog 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_MsgCreateDog) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.MsgCreateDog.dog": - value := x.Dog - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDog")) - } - panic(fmt.Errorf("message testdata.MsgCreateDog 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_MsgCreateDog) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.MsgCreateDog.dog": - x.Dog = value.Message().Interface().(*Dog) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDog")) - } - panic(fmt.Errorf("message testdata.MsgCreateDog 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_MsgCreateDog) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.MsgCreateDog.dog": - if x.Dog == nil { - x.Dog = new(Dog) - } - return protoreflect.ValueOfMessage(x.Dog.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDog")) - } - panic(fmt.Errorf("message testdata.MsgCreateDog 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_MsgCreateDog) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.MsgCreateDog.dog": - m := new(Dog) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDog")) - } - panic(fmt.Errorf("message testdata.MsgCreateDog 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_MsgCreateDog) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.MsgCreateDog", 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_MsgCreateDog) 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_MsgCreateDog) 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_MsgCreateDog) 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_MsgCreateDog) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateDog) - 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.Dog != nil { - l = options.Size(x.Dog) - 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().(*MsgCreateDog) - 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.Dog != nil { - encoded, err := options.Marshal(x.Dog) - 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().(*MsgCreateDog) - 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: MsgCreateDog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateDog: 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 Dog", 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.Dog == nil { - x.Dog = &Dog{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Dog); 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_MsgCreateDogResponse protoreflect.MessageDescriptor - fd_MsgCreateDogResponse_name protoreflect.FieldDescriptor -) - -func init() { - file_tx_proto_init() - md_MsgCreateDogResponse = File_tx_proto.Messages().ByName("MsgCreateDogResponse") - fd_MsgCreateDogResponse_name = md_MsgCreateDogResponse.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateDogResponse)(nil) - -type fastReflection_MsgCreateDogResponse MsgCreateDogResponse - -func (x *MsgCreateDogResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateDogResponse)(x) -} - -func (x *MsgCreateDogResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateDogResponse_messageType fastReflection_MsgCreateDogResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateDogResponse_messageType{} - -type fastReflection_MsgCreateDogResponse_messageType struct{} - -func (x fastReflection_MsgCreateDogResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateDogResponse)(nil) -} -func (x fastReflection_MsgCreateDogResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateDogResponse) -} -func (x fastReflection_MsgCreateDogResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateDogResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateDogResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateDogResponse -} - -// 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_MsgCreateDogResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateDogResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateDogResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateDogResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateDogResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateDogResponse)(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_MsgCreateDogResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_MsgCreateDogResponse_name, 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_MsgCreateDogResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.MsgCreateDogResponse.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDogResponse")) - } - panic(fmt.Errorf("message testdata.MsgCreateDogResponse 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_MsgCreateDogResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.MsgCreateDogResponse.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDogResponse")) - } - panic(fmt.Errorf("message testdata.MsgCreateDogResponse 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_MsgCreateDogResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.MsgCreateDogResponse.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDogResponse")) - } - panic(fmt.Errorf("message testdata.MsgCreateDogResponse 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_MsgCreateDogResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.MsgCreateDogResponse.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDogResponse")) - } - panic(fmt.Errorf("message testdata.MsgCreateDogResponse 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_MsgCreateDogResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.MsgCreateDogResponse.name": - panic(fmt.Errorf("field name of message testdata.MsgCreateDogResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDogResponse")) - } - panic(fmt.Errorf("message testdata.MsgCreateDogResponse 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_MsgCreateDogResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.MsgCreateDogResponse.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.MsgCreateDogResponse")) - } - panic(fmt.Errorf("message testdata.MsgCreateDogResponse 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_MsgCreateDogResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.MsgCreateDogResponse", 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_MsgCreateDogResponse) 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_MsgCreateDogResponse) 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_MsgCreateDogResponse) 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_MsgCreateDogResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateDogResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateDogResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.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 { - 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().(*MsgCreateDogResponse) - 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: MsgCreateDogResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateDogResponse: 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:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestMsg_1_list)(nil) - -type _TestMsg_1_list struct { - list *[]string -} - -func (x *_TestMsg_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestMsg_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_TestMsg_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_TestMsg_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestMsg_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message TestMsg at list field Signers as it is not of Message kind")) -} - -func (x *_TestMsg_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_TestMsg_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_TestMsg_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestMsg protoreflect.MessageDescriptor - fd_TestMsg_signers protoreflect.FieldDescriptor -) - -func init() { - file_tx_proto_init() - md_TestMsg = File_tx_proto.Messages().ByName("TestMsg") - fd_TestMsg_signers = md_TestMsg.Fields().ByName("signers") -} - -var _ protoreflect.Message = (*fastReflection_TestMsg)(nil) - -type fastReflection_TestMsg TestMsg - -func (x *TestMsg) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestMsg)(x) -} - -func (x *TestMsg) slowProtoReflect() protoreflect.Message { - mi := &file_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestMsg_messageType fastReflection_TestMsg_messageType -var _ protoreflect.MessageType = fastReflection_TestMsg_messageType{} - -type fastReflection_TestMsg_messageType struct{} - -func (x fastReflection_TestMsg_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestMsg)(nil) -} -func (x fastReflection_TestMsg_messageType) New() protoreflect.Message { - return new(fastReflection_TestMsg) -} -func (x fastReflection_TestMsg_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestMsg -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestMsg) Descriptor() protoreflect.MessageDescriptor { - return md_TestMsg -} - -// 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_TestMsg) Type() protoreflect.MessageType { - return _fastReflection_TestMsg_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestMsg) New() protoreflect.Message { - return new(fastReflection_TestMsg) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestMsg) Interface() protoreflect.ProtoMessage { - return (*TestMsg)(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_TestMsg) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Signers) != 0 { - value := protoreflect.ValueOfList(&_TestMsg_1_list{list: &x.Signers}) - if !f(fd_TestMsg_signers, 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_TestMsg) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestMsg.signers": - return len(x.Signers) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestMsg")) - } - panic(fmt.Errorf("message testdata.TestMsg 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_TestMsg) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestMsg.signers": - x.Signers = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestMsg")) - } - panic(fmt.Errorf("message testdata.TestMsg 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_TestMsg) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestMsg.signers": - if len(x.Signers) == 0 { - return protoreflect.ValueOfList(&_TestMsg_1_list{}) - } - listValue := &_TestMsg_1_list{list: &x.Signers} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestMsg")) - } - panic(fmt.Errorf("message testdata.TestMsg 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_TestMsg) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestMsg.signers": - lv := value.List() - clv := lv.(*_TestMsg_1_list) - x.Signers = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestMsg")) - } - panic(fmt.Errorf("message testdata.TestMsg 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_TestMsg) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestMsg.signers": - if x.Signers == nil { - x.Signers = []string{} - } - value := &_TestMsg_1_list{list: &x.Signers} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestMsg")) - } - panic(fmt.Errorf("message testdata.TestMsg 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_TestMsg) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestMsg.signers": - list := []string{} - return protoreflect.ValueOfList(&_TestMsg_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestMsg")) - } - panic(fmt.Errorf("message testdata.TestMsg 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_TestMsg) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestMsg", 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_TestMsg) 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_TestMsg) 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_TestMsg) 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_TestMsg) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestMsg) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Signers) > 0 { - for _, s := range x.Signers { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestMsg) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Signers) > 0 { - for iNdEx := len(x.Signers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Signers[iNdEx]) - copy(dAtA[i:], x.Signers[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signers[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestMsg) - 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: TestMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestMsg: 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 Signers", 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.Signers = append(x.Signers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type MsgCreateDog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dog *Dog `protobuf:"bytes,1,opt,name=dog,proto3" json:"dog,omitempty"` -} - -func (x *MsgCreateDog) Reset() { - *x = MsgCreateDog{} - if protoimpl.UnsafeEnabled { - mi := &file_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateDog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateDog) ProtoMessage() {} - -// Deprecated: Use MsgCreateDog.ProtoReflect.Descriptor instead. -func (*MsgCreateDog) Descriptor() ([]byte, []int) { - return file_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgCreateDog) GetDog() *Dog { - if x != nil { - return x.Dog - } - return nil -} - -type MsgCreateDogResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *MsgCreateDogResponse) Reset() { - *x = MsgCreateDogResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateDogResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateDogResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateDogResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateDogResponse) Descriptor() ([]byte, []int) { - return file_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgCreateDogResponse) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// TestMsg is msg type for testing protobuf message using any, as defined in -// https://github.com/cosmos/cosmos-sdk/issues/6213. -type TestMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Signers []string `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` -} - -func (x *TestMsg) Reset() { - *x = TestMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestMsg) ProtoMessage() {} - -// Deprecated: Use TestMsg.ProtoReflect.Descriptor instead. -func (*TestMsg) Descriptor() ([]byte, []int) { - return file_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *TestMsg) GetSigners() []string { - if x != nil { - return x.Signers - } - return nil -} - -var File_tx_proto protoreflect.FileDescriptor - -var file_tx_proto_rawDesc = []byte{ - 0x0a, 0x08, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x0c, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x67, 0x12, 0x1f, 0x0a, 0x03, 0x64, 0x6f, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x44, 0x6f, 0x67, 0x52, 0x03, 0x64, 0x6f, 0x67, 0x22, 0x2a, 0x0a, 0x14, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x4d, - 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x3a, 0x04, 0x88, 0xa0, - 0x1f, 0x00, 0x32, 0x4a, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x43, 0x0a, 0x09, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x6f, 0x67, 0x12, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x67, 0x1a, 0x1e, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x8e, - 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x75, 0x74, 0x69, - 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x75, 0x6c, 0x73, 0x61, - 0x72, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, - 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xe2, 0x02, 0x14, - 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_tx_proto_rawDescOnce sync.Once - file_tx_proto_rawDescData = file_tx_proto_rawDesc -) - -func file_tx_proto_rawDescGZIP() []byte { - file_tx_proto_rawDescOnce.Do(func() { - file_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tx_proto_rawDescData) - }) - return file_tx_proto_rawDescData -} - -var file_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_tx_proto_goTypes = []interface{}{ - (*MsgCreateDog)(nil), // 0: testdata.MsgCreateDog - (*MsgCreateDogResponse)(nil), // 1: testdata.MsgCreateDogResponse - (*TestMsg)(nil), // 2: testdata.TestMsg - (*Dog)(nil), // 3: testdata.Dog -} -var file_tx_proto_depIdxs = []int32{ - 3, // 0: testdata.MsgCreateDog.dog:type_name -> testdata.Dog - 0, // 1: testdata.Msg.CreateDog:input_type -> testdata.MsgCreateDog - 1, // 2: testdata.Msg.CreateDog:output_type -> testdata.MsgCreateDogResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_tx_proto_init() } -func file_tx_proto_init() { - if File_tx_proto != nil { - return - } - file_testdata_proto_init() - if !protoimpl.UnsafeEnabled { - file_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateDog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateDogResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_tx_proto_goTypes, - DependencyIndexes: file_tx_proto_depIdxs, - MessageInfos: file_tx_proto_msgTypes, - }.Build() - File_tx_proto = out.File - file_tx_proto_rawDesc = nil - file_tx_proto_goTypes = nil - file_tx_proto_depIdxs = nil -} diff --git a/testutil/testdata_pulsar/tx_grpc.pb.go b/testutil/testdata_pulsar/tx_grpc.pb.go deleted file mode 100644 index 781e3c93e5c8..000000000000 --- a/testutil/testdata_pulsar/tx_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: tx.proto - -package testdata_pulsar - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MsgClient interface { - CreateDog(ctx context.Context, in *MsgCreateDog, opts ...grpc.CallOption) (*MsgCreateDogResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateDog(ctx context.Context, in *MsgCreateDog, opts ...grpc.CallOption) (*MsgCreateDogResponse, error) { - out := new(MsgCreateDogResponse) - err := c.cc.Invoke(ctx, "/testdata.Msg/CreateDog", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility -type MsgServer interface { - CreateDog(context.Context, *MsgCreateDog) (*MsgCreateDogResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (UnimplementedMsgServer) CreateDog(context.Context, *MsgCreateDog) (*MsgCreateDogResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDog not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_CreateDog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateDog) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateDog(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.Msg/CreateDog", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateDog(ctx, req.(*MsgCreateDog)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "testdata.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateDog", - Handler: _Msg_CreateDog_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "tx.proto", -} diff --git a/testutil/testdata_pulsar/unknonwnproto.pulsar.go b/testutil/testdata_pulsar/unknonwnproto.pulsar.go deleted file mode 100644 index c362fee3fbf0..000000000000 --- a/testutil/testdata_pulsar/unknonwnproto.pulsar.go +++ /dev/null @@ -1,28040 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package testdata_pulsar - -import ( - binary "encoding/binary" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/tx/v1beta1" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - math "math" - reflect "reflect" - sort "sort" - sync "sync" -) - -var ( - md_Customer1 protoreflect.MessageDescriptor - fd_Customer1_id protoreflect.FieldDescriptor - fd_Customer1_name protoreflect.FieldDescriptor - fd_Customer1_subscription_fee protoreflect.FieldDescriptor - fd_Customer1_payment protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Customer1 = File_unknonwnproto_proto.Messages().ByName("Customer1") - fd_Customer1_id = md_Customer1.Fields().ByName("id") - fd_Customer1_name = md_Customer1.Fields().ByName("name") - fd_Customer1_subscription_fee = md_Customer1.Fields().ByName("subscription_fee") - fd_Customer1_payment = md_Customer1.Fields().ByName("payment") -} - -var _ protoreflect.Message = (*fastReflection_Customer1)(nil) - -type fastReflection_Customer1 Customer1 - -func (x *Customer1) ProtoReflect() protoreflect.Message { - return (*fastReflection_Customer1)(x) -} - -func (x *Customer1) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Customer1_messageType fastReflection_Customer1_messageType -var _ protoreflect.MessageType = fastReflection_Customer1_messageType{} - -type fastReflection_Customer1_messageType struct{} - -func (x fastReflection_Customer1_messageType) Zero() protoreflect.Message { - return (*fastReflection_Customer1)(nil) -} -func (x fastReflection_Customer1_messageType) New() protoreflect.Message { - return new(fastReflection_Customer1) -} -func (x fastReflection_Customer1_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Customer1 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Customer1) Descriptor() protoreflect.MessageDescriptor { - return md_Customer1 -} - -// 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_Customer1) Type() protoreflect.MessageType { - return _fastReflection_Customer1_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Customer1) New() protoreflect.Message { - return new(fastReflection_Customer1) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Customer1) Interface() protoreflect.ProtoMessage { - return (*Customer1)(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_Customer1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Customer1_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Customer1_name, value) { - return - } - } - if x.SubscriptionFee != float32(0) || math.Signbit(float64(x.SubscriptionFee)) { - value := protoreflect.ValueOfFloat32(x.SubscriptionFee) - if !f(fd_Customer1_subscription_fee, value) { - return - } - } - if x.Payment != "" { - value := protoreflect.ValueOfString(x.Payment) - if !f(fd_Customer1_payment, 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_Customer1) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Customer1.id": - return x.Id != int32(0) - case "testdata.Customer1.name": - return x.Name != "" - case "testdata.Customer1.subscription_fee": - return x.SubscriptionFee != float32(0) || math.Signbit(float64(x.SubscriptionFee)) - case "testdata.Customer1.payment": - return x.Payment != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer1")) - } - panic(fmt.Errorf("message testdata.Customer1 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_Customer1) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Customer1.id": - x.Id = int32(0) - case "testdata.Customer1.name": - x.Name = "" - case "testdata.Customer1.subscription_fee": - x.SubscriptionFee = float32(0) - case "testdata.Customer1.payment": - x.Payment = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer1")) - } - panic(fmt.Errorf("message testdata.Customer1 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_Customer1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Customer1.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Customer1.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.Customer1.subscription_fee": - value := x.SubscriptionFee - return protoreflect.ValueOfFloat32(value) - case "testdata.Customer1.payment": - value := x.Payment - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer1")) - } - panic(fmt.Errorf("message testdata.Customer1 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_Customer1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Customer1.id": - x.Id = int32(value.Int()) - case "testdata.Customer1.name": - x.Name = value.Interface().(string) - case "testdata.Customer1.subscription_fee": - x.SubscriptionFee = float32(value.Float()) - case "testdata.Customer1.payment": - x.Payment = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer1")) - } - panic(fmt.Errorf("message testdata.Customer1 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_Customer1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Customer1.id": - panic(fmt.Errorf("field id of message testdata.Customer1 is not mutable")) - case "testdata.Customer1.name": - panic(fmt.Errorf("field name of message testdata.Customer1 is not mutable")) - case "testdata.Customer1.subscription_fee": - panic(fmt.Errorf("field subscription_fee of message testdata.Customer1 is not mutable")) - case "testdata.Customer1.payment": - panic(fmt.Errorf("field payment of message testdata.Customer1 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer1")) - } - panic(fmt.Errorf("message testdata.Customer1 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_Customer1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Customer1.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Customer1.name": - return protoreflect.ValueOfString("") - case "testdata.Customer1.subscription_fee": - return protoreflect.ValueOfFloat32(float32(0)) - case "testdata.Customer1.payment": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer1")) - } - panic(fmt.Errorf("message testdata.Customer1 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_Customer1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Customer1", 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_Customer1) 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_Customer1) 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_Customer1) 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_Customer1) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Customer1) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SubscriptionFee != 0 || math.Signbit(float64(x.SubscriptionFee)) { - n += 5 - } - l = len(x.Payment) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Customer1) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Payment) > 0 { - i -= len(x.Payment) - copy(dAtA[i:], x.Payment) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payment))) - i-- - dAtA[i] = 0x3a - } - if x.SubscriptionFee != 0 || math.Signbit(float64(x.SubscriptionFee)) { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.SubscriptionFee)))) - i-- - dAtA[i] = 0x1d - } - 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] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Customer1) - 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: Customer1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Customer1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 5 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubscriptionFee", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - x.SubscriptionFee = float32(math.Float32frombits(v)) - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payment", 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.Payment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Customer2 protoreflect.MessageDescriptor - fd_Customer2_id protoreflect.FieldDescriptor - fd_Customer2_industry protoreflect.FieldDescriptor - fd_Customer2_name protoreflect.FieldDescriptor - fd_Customer2_fewer protoreflect.FieldDescriptor - fd_Customer2_reserved protoreflect.FieldDescriptor - fd_Customer2_city protoreflect.FieldDescriptor - fd_Customer2_miscellaneous protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Customer2 = File_unknonwnproto_proto.Messages().ByName("Customer2") - fd_Customer2_id = md_Customer2.Fields().ByName("id") - fd_Customer2_industry = md_Customer2.Fields().ByName("industry") - fd_Customer2_name = md_Customer2.Fields().ByName("name") - fd_Customer2_fewer = md_Customer2.Fields().ByName("fewer") - fd_Customer2_reserved = md_Customer2.Fields().ByName("reserved") - fd_Customer2_city = md_Customer2.Fields().ByName("city") - fd_Customer2_miscellaneous = md_Customer2.Fields().ByName("miscellaneous") -} - -var _ protoreflect.Message = (*fastReflection_Customer2)(nil) - -type fastReflection_Customer2 Customer2 - -func (x *Customer2) ProtoReflect() protoreflect.Message { - return (*fastReflection_Customer2)(x) -} - -func (x *Customer2) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Customer2_messageType fastReflection_Customer2_messageType -var _ protoreflect.MessageType = fastReflection_Customer2_messageType{} - -type fastReflection_Customer2_messageType struct{} - -func (x fastReflection_Customer2_messageType) Zero() protoreflect.Message { - return (*fastReflection_Customer2)(nil) -} -func (x fastReflection_Customer2_messageType) New() protoreflect.Message { - return new(fastReflection_Customer2) -} -func (x fastReflection_Customer2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Customer2 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Customer2) Descriptor() protoreflect.MessageDescriptor { - return md_Customer2 -} - -// 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_Customer2) Type() protoreflect.MessageType { - return _fastReflection_Customer2_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Customer2) New() protoreflect.Message { - return new(fastReflection_Customer2) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Customer2) Interface() protoreflect.ProtoMessage { - return (*Customer2)(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_Customer2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Customer2_id, value) { - return - } - } - if x.Industry != int32(0) { - value := protoreflect.ValueOfInt32(x.Industry) - if !f(fd_Customer2_industry, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Customer2_name, value) { - return - } - } - if x.Fewer != float32(0) || math.Signbit(float64(x.Fewer)) { - value := protoreflect.ValueOfFloat32(x.Fewer) - if !f(fd_Customer2_fewer, value) { - return - } - } - if x.Reserved != int64(0) { - value := protoreflect.ValueOfInt64(x.Reserved) - if !f(fd_Customer2_reserved, value) { - return - } - } - if x.City != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.City)) - if !f(fd_Customer2_city, value) { - return - } - } - if x.Miscellaneous != nil { - value := protoreflect.ValueOfMessage(x.Miscellaneous.ProtoReflect()) - if !f(fd_Customer2_miscellaneous, 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_Customer2) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Customer2.id": - return x.Id != int32(0) - case "testdata.Customer2.industry": - return x.Industry != int32(0) - case "testdata.Customer2.name": - return x.Name != "" - case "testdata.Customer2.fewer": - return x.Fewer != float32(0) || math.Signbit(float64(x.Fewer)) - case "testdata.Customer2.reserved": - return x.Reserved != int64(0) - case "testdata.Customer2.city": - return x.City != 0 - case "testdata.Customer2.miscellaneous": - return x.Miscellaneous != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer2")) - } - panic(fmt.Errorf("message testdata.Customer2 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_Customer2) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Customer2.id": - x.Id = int32(0) - case "testdata.Customer2.industry": - x.Industry = int32(0) - case "testdata.Customer2.name": - x.Name = "" - case "testdata.Customer2.fewer": - x.Fewer = float32(0) - case "testdata.Customer2.reserved": - x.Reserved = int64(0) - case "testdata.Customer2.city": - x.City = 0 - case "testdata.Customer2.miscellaneous": - x.Miscellaneous = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer2")) - } - panic(fmt.Errorf("message testdata.Customer2 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_Customer2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Customer2.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Customer2.industry": - value := x.Industry - return protoreflect.ValueOfInt32(value) - case "testdata.Customer2.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.Customer2.fewer": - value := x.Fewer - return protoreflect.ValueOfFloat32(value) - case "testdata.Customer2.reserved": - value := x.Reserved - return protoreflect.ValueOfInt64(value) - case "testdata.Customer2.city": - value := x.City - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "testdata.Customer2.miscellaneous": - value := x.Miscellaneous - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer2")) - } - panic(fmt.Errorf("message testdata.Customer2 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_Customer2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Customer2.id": - x.Id = int32(value.Int()) - case "testdata.Customer2.industry": - x.Industry = int32(value.Int()) - case "testdata.Customer2.name": - x.Name = value.Interface().(string) - case "testdata.Customer2.fewer": - x.Fewer = float32(value.Float()) - case "testdata.Customer2.reserved": - x.Reserved = value.Int() - case "testdata.Customer2.city": - x.City = (Customer2_City)(value.Enum()) - case "testdata.Customer2.miscellaneous": - x.Miscellaneous = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer2")) - } - panic(fmt.Errorf("message testdata.Customer2 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_Customer2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Customer2.miscellaneous": - if x.Miscellaneous == nil { - x.Miscellaneous = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Miscellaneous.ProtoReflect()) - case "testdata.Customer2.id": - panic(fmt.Errorf("field id of message testdata.Customer2 is not mutable")) - case "testdata.Customer2.industry": - panic(fmt.Errorf("field industry of message testdata.Customer2 is not mutable")) - case "testdata.Customer2.name": - panic(fmt.Errorf("field name of message testdata.Customer2 is not mutable")) - case "testdata.Customer2.fewer": - panic(fmt.Errorf("field fewer of message testdata.Customer2 is not mutable")) - case "testdata.Customer2.reserved": - panic(fmt.Errorf("field reserved of message testdata.Customer2 is not mutable")) - case "testdata.Customer2.city": - panic(fmt.Errorf("field city of message testdata.Customer2 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer2")) - } - panic(fmt.Errorf("message testdata.Customer2 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_Customer2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Customer2.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Customer2.industry": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Customer2.name": - return protoreflect.ValueOfString("") - case "testdata.Customer2.fewer": - return protoreflect.ValueOfFloat32(float32(0)) - case "testdata.Customer2.reserved": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.Customer2.city": - return protoreflect.ValueOfEnum(0) - case "testdata.Customer2.miscellaneous": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer2")) - } - panic(fmt.Errorf("message testdata.Customer2 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_Customer2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Customer2", 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_Customer2) 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_Customer2) 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_Customer2) 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_Customer2) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Customer2) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Industry != 0 { - n += 1 + runtime.Sov(uint64(x.Industry)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Fewer != 0 || math.Signbit(float64(x.Fewer)) { - n += 5 - } - if x.Reserved != 0 { - n += 2 + runtime.Sov(uint64(x.Reserved)) - } - if x.City != 0 { - n += 1 + runtime.Sov(uint64(x.City)) - } - if x.Miscellaneous != nil { - l = options.Size(x.Miscellaneous) - 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().(*Customer2) - 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.Reserved != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Reserved)) - i-- - dAtA[i] = 0x41 - i-- - dAtA[i] = 0xb8 - } - if x.Miscellaneous != nil { - encoded, err := options.Marshal(x.Miscellaneous) - 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] = 0x52 - } - if x.City != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.City)) - i-- - dAtA[i] = 0x30 - } - if x.Fewer != 0 || math.Signbit(float64(x.Fewer)) { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.Fewer)))) - i-- - dAtA[i] = 0x25 - } - 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] = 0x1a - } - if x.Industry != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Industry)) - i-- - dAtA[i] = 0x10 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Customer2) - 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: Customer2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Customer2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Industry", wireType) - } - x.Industry = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Industry |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 4: - if wireType != 5 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fewer", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - x.Fewer = float32(math.Float32frombits(v)) - case 1047: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reserved", wireType) - } - x.Reserved = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Reserved |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field City", wireType) - } - x.City = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.City |= Customer2_City(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Miscellaneous", 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.Miscellaneous == nil { - x.Miscellaneous = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Miscellaneous); 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_Nested4A protoreflect.MessageDescriptor - fd_Nested4A_id protoreflect.FieldDescriptor - fd_Nested4A_name protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested4A = File_unknonwnproto_proto.Messages().ByName("Nested4A") - fd_Nested4A_id = md_Nested4A.Fields().ByName("id") - fd_Nested4A_name = md_Nested4A.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_Nested4A)(nil) - -type fastReflection_Nested4A Nested4A - -func (x *Nested4A) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested4A)(x) -} - -func (x *Nested4A) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Nested4A_messageType fastReflection_Nested4A_messageType -var _ protoreflect.MessageType = fastReflection_Nested4A_messageType{} - -type fastReflection_Nested4A_messageType struct{} - -func (x fastReflection_Nested4A_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested4A)(nil) -} -func (x fastReflection_Nested4A_messageType) New() protoreflect.Message { - return new(fastReflection_Nested4A) -} -func (x fastReflection_Nested4A_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested4A -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested4A) Descriptor() protoreflect.MessageDescriptor { - return md_Nested4A -} - -// 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_Nested4A) Type() protoreflect.MessageType { - return _fastReflection_Nested4A_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested4A) New() protoreflect.Message { - return new(fastReflection_Nested4A) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested4A) Interface() protoreflect.ProtoMessage { - return (*Nested4A)(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_Nested4A) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested4A_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Nested4A_name, 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_Nested4A) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested4A.id": - return x.Id != int32(0) - case "testdata.Nested4A.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4A")) - } - panic(fmt.Errorf("message testdata.Nested4A 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_Nested4A) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested4A.id": - x.Id = int32(0) - case "testdata.Nested4A.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4A")) - } - panic(fmt.Errorf("message testdata.Nested4A 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_Nested4A) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested4A.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested4A.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4A")) - } - panic(fmt.Errorf("message testdata.Nested4A 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_Nested4A) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested4A.id": - x.Id = int32(value.Int()) - case "testdata.Nested4A.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4A")) - } - panic(fmt.Errorf("message testdata.Nested4A 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_Nested4A) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested4A.id": - panic(fmt.Errorf("field id of message testdata.Nested4A is not mutable")) - case "testdata.Nested4A.name": - panic(fmt.Errorf("field name of message testdata.Nested4A is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4A")) - } - panic(fmt.Errorf("message testdata.Nested4A 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_Nested4A) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested4A.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested4A.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4A")) - } - panic(fmt.Errorf("message testdata.Nested4A 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_Nested4A) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested4A", 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_Nested4A) 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_Nested4A) 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_Nested4A) 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_Nested4A) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested4A) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Nested4A) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested4A) - 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: Nested4A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested4A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Nested3A_4_list)(nil) - -type _Nested3A_4_list struct { - list *[]*Nested4A -} - -func (x *_Nested3A_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Nested3A_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Nested3A_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Nested4A) - (*x.list)[i] = concreteValue -} - -func (x *_Nested3A_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Nested4A) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Nested3A_4_list) AppendMutable() protoreflect.Value { - v := new(Nested4A) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Nested3A_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Nested3A_4_list) NewElement() protoreflect.Value { - v := new(Nested4A) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Nested3A_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.Map = (*_Nested3A_5_map)(nil) - -type _Nested3A_5_map struct { - m *map[int64]*Nested4A -} - -func (x *_Nested3A_5_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Nested3A_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfInt64(k)) - mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Nested3A_5_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.Int() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_Nested3A_5_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.Int() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Nested3A_5_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.Int() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Nested3A_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.Int() - concreteKey := keyUnwrapped - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Nested4A) - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Nested3A_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - keyUnwrapped := key.Int() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if ok { - return protoreflect.ValueOfMessage(v.ProtoReflect()) - } - newValue := new(Nested4A) - (*x.m)[concreteKey] = newValue - return protoreflect.ValueOfMessage(newValue.ProtoReflect()) -} - -func (x *_Nested3A_5_map) NewValue() protoreflect.Value { - v := new(Nested4A) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Nested3A_5_map) IsValid() bool { - return x.m != nil -} - -var ( - md_Nested3A protoreflect.MessageDescriptor - fd_Nested3A_id protoreflect.FieldDescriptor - fd_Nested3A_name protoreflect.FieldDescriptor - fd_Nested3A_a4 protoreflect.FieldDescriptor - fd_Nested3A_index protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested3A = File_unknonwnproto_proto.Messages().ByName("Nested3A") - fd_Nested3A_id = md_Nested3A.Fields().ByName("id") - fd_Nested3A_name = md_Nested3A.Fields().ByName("name") - fd_Nested3A_a4 = md_Nested3A.Fields().ByName("a4") - fd_Nested3A_index = md_Nested3A.Fields().ByName("index") -} - -var _ protoreflect.Message = (*fastReflection_Nested3A)(nil) - -type fastReflection_Nested3A Nested3A - -func (x *Nested3A) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested3A)(x) -} - -func (x *Nested3A) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Nested3A_messageType fastReflection_Nested3A_messageType -var _ protoreflect.MessageType = fastReflection_Nested3A_messageType{} - -type fastReflection_Nested3A_messageType struct{} - -func (x fastReflection_Nested3A_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested3A)(nil) -} -func (x fastReflection_Nested3A_messageType) New() protoreflect.Message { - return new(fastReflection_Nested3A) -} -func (x fastReflection_Nested3A_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested3A -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested3A) Descriptor() protoreflect.MessageDescriptor { - return md_Nested3A -} - -// 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_Nested3A) Type() protoreflect.MessageType { - return _fastReflection_Nested3A_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested3A) New() protoreflect.Message { - return new(fastReflection_Nested3A) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested3A) Interface() protoreflect.ProtoMessage { - return (*Nested3A)(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_Nested3A) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested3A_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Nested3A_name, value) { - return - } - } - if len(x.A4) != 0 { - value := protoreflect.ValueOfList(&_Nested3A_4_list{list: &x.A4}) - if !f(fd_Nested3A_a4, value) { - return - } - } - if len(x.Index) != 0 { - value := protoreflect.ValueOfMap(&_Nested3A_5_map{m: &x.Index}) - if !f(fd_Nested3A_index, 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_Nested3A) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested3A.id": - return x.Id != int32(0) - case "testdata.Nested3A.name": - return x.Name != "" - case "testdata.Nested3A.a4": - return len(x.A4) != 0 - case "testdata.Nested3A.index": - return len(x.Index) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3A")) - } - panic(fmt.Errorf("message testdata.Nested3A 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_Nested3A) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested3A.id": - x.Id = int32(0) - case "testdata.Nested3A.name": - x.Name = "" - case "testdata.Nested3A.a4": - x.A4 = nil - case "testdata.Nested3A.index": - x.Index = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3A")) - } - panic(fmt.Errorf("message testdata.Nested3A 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_Nested3A) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested3A.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested3A.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.Nested3A.a4": - if len(x.A4) == 0 { - return protoreflect.ValueOfList(&_Nested3A_4_list{}) - } - listValue := &_Nested3A_4_list{list: &x.A4} - return protoreflect.ValueOfList(listValue) - case "testdata.Nested3A.index": - if len(x.Index) == 0 { - return protoreflect.ValueOfMap(&_Nested3A_5_map{}) - } - mapValue := &_Nested3A_5_map{m: &x.Index} - return protoreflect.ValueOfMap(mapValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3A")) - } - panic(fmt.Errorf("message testdata.Nested3A 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_Nested3A) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested3A.id": - x.Id = int32(value.Int()) - case "testdata.Nested3A.name": - x.Name = value.Interface().(string) - case "testdata.Nested3A.a4": - lv := value.List() - clv := lv.(*_Nested3A_4_list) - x.A4 = *clv.list - case "testdata.Nested3A.index": - mv := value.Map() - cmv := mv.(*_Nested3A_5_map) - x.Index = *cmv.m - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3A")) - } - panic(fmt.Errorf("message testdata.Nested3A 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_Nested3A) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested3A.a4": - if x.A4 == nil { - x.A4 = []*Nested4A{} - } - value := &_Nested3A_4_list{list: &x.A4} - return protoreflect.ValueOfList(value) - case "testdata.Nested3A.index": - if x.Index == nil { - x.Index = make(map[int64]*Nested4A) - } - value := &_Nested3A_5_map{m: &x.Index} - return protoreflect.ValueOfMap(value) - case "testdata.Nested3A.id": - panic(fmt.Errorf("field id of message testdata.Nested3A is not mutable")) - case "testdata.Nested3A.name": - panic(fmt.Errorf("field name of message testdata.Nested3A is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3A")) - } - panic(fmt.Errorf("message testdata.Nested3A 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_Nested3A) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested3A.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested3A.name": - return protoreflect.ValueOfString("") - case "testdata.Nested3A.a4": - list := []*Nested4A{} - return protoreflect.ValueOfList(&_Nested3A_4_list{list: &list}) - case "testdata.Nested3A.index": - m := make(map[int64]*Nested4A) - return protoreflect.ValueOfMap(&_Nested3A_5_map{m: &m}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3A")) - } - panic(fmt.Errorf("message testdata.Nested3A 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_Nested3A) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested3A", 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_Nested3A) 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_Nested3A) 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_Nested3A) 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_Nested3A) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested3A) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.A4) > 0 { - for _, e := range x.A4 { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Index) > 0 { - SiZeMaP := func(k int64, v *Nested4A) { - l := 0 - if v != nil { - l = options.Size(v) - } - l += 1 + runtime.Sov(uint64(l)) - mapEntrySize := 1 + runtime.Sov(uint64(k)) + l - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]int64, 0, len(x.Index)) - for k := range x.Index { - sortme = append(sortme, k) - } - sort.Slice(sortme, func(i, j int) bool { - return sortme[i] < sortme[j] - }) - for _, k := range sortme { - v := x.Index[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Index { - SiZeMaP(k, v) - } - } - } - 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().(*Nested3A) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Index) > 0 { - MaRsHaLmAp := func(k int64, v *Nested4A) (protoiface.MarshalOutput, error) { - baseI := i - encoded, err := options.Marshal(v) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - i = runtime.EncodeVarint(dAtA, i, uint64(k)) - i-- - dAtA[i] = 0x8 - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForIndex := make([]int64, 0, len(x.Index)) - for k := range x.Index { - keysForIndex = append(keysForIndex, int64(k)) - } - sort.Slice(keysForIndex, func(i, j int) bool { - return keysForIndex[i] < keysForIndex[j] - }) - for iNdEx := len(keysForIndex) - 1; iNdEx >= 0; iNdEx-- { - v := x.Index[int64(keysForIndex[iNdEx])] - out, err := MaRsHaLmAp(keysForIndex[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Index { - v := x.Index[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.A4) > 0 { - for iNdEx := len(x.A4) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.A4[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested3A) - 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: Nested3A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested3A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.A4 = append(x.A4, &Nested4A{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A4[len(x.A4)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index == nil { - x.Index = make(map[int64]*Nested4A) - } - var mapkey int64 - var mapvalue *Nested4A - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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++ - mapkey |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen 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++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postmsgIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = &Nested4A{} - if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - 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) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Index[mapkey] = mapvalue - 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_Nested2A protoreflect.MessageDescriptor - fd_Nested2A_id protoreflect.FieldDescriptor - fd_Nested2A_name protoreflect.FieldDescriptor - fd_Nested2A_nested protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested2A = File_unknonwnproto_proto.Messages().ByName("Nested2A") - fd_Nested2A_id = md_Nested2A.Fields().ByName("id") - fd_Nested2A_name = md_Nested2A.Fields().ByName("name") - fd_Nested2A_nested = md_Nested2A.Fields().ByName("nested") -} - -var _ protoreflect.Message = (*fastReflection_Nested2A)(nil) - -type fastReflection_Nested2A Nested2A - -func (x *Nested2A) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested2A)(x) -} - -func (x *Nested2A) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Nested2A_messageType fastReflection_Nested2A_messageType -var _ protoreflect.MessageType = fastReflection_Nested2A_messageType{} - -type fastReflection_Nested2A_messageType struct{} - -func (x fastReflection_Nested2A_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested2A)(nil) -} -func (x fastReflection_Nested2A_messageType) New() protoreflect.Message { - return new(fastReflection_Nested2A) -} -func (x fastReflection_Nested2A_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested2A -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested2A) Descriptor() protoreflect.MessageDescriptor { - return md_Nested2A -} - -// 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_Nested2A) Type() protoreflect.MessageType { - return _fastReflection_Nested2A_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested2A) New() protoreflect.Message { - return new(fastReflection_Nested2A) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested2A) Interface() protoreflect.ProtoMessage { - return (*Nested2A)(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_Nested2A) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested2A_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Nested2A_name, value) { - return - } - } - if x.Nested != nil { - value := protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - if !f(fd_Nested2A_nested, 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_Nested2A) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested2A.id": - return x.Id != int32(0) - case "testdata.Nested2A.name": - return x.Name != "" - case "testdata.Nested2A.nested": - return x.Nested != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2A")) - } - panic(fmt.Errorf("message testdata.Nested2A 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_Nested2A) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested2A.id": - x.Id = int32(0) - case "testdata.Nested2A.name": - x.Name = "" - case "testdata.Nested2A.nested": - x.Nested = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2A")) - } - panic(fmt.Errorf("message testdata.Nested2A 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_Nested2A) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested2A.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested2A.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.Nested2A.nested": - value := x.Nested - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2A")) - } - panic(fmt.Errorf("message testdata.Nested2A 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_Nested2A) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested2A.id": - x.Id = int32(value.Int()) - case "testdata.Nested2A.name": - x.Name = value.Interface().(string) - case "testdata.Nested2A.nested": - x.Nested = value.Message().Interface().(*Nested3A) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2A")) - } - panic(fmt.Errorf("message testdata.Nested2A 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_Nested2A) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested2A.nested": - if x.Nested == nil { - x.Nested = new(Nested3A) - } - return protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - case "testdata.Nested2A.id": - panic(fmt.Errorf("field id of message testdata.Nested2A is not mutable")) - case "testdata.Nested2A.name": - panic(fmt.Errorf("field name of message testdata.Nested2A is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2A")) - } - panic(fmt.Errorf("message testdata.Nested2A 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_Nested2A) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested2A.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested2A.name": - return protoreflect.ValueOfString("") - case "testdata.Nested2A.nested": - m := new(Nested3A) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2A")) - } - panic(fmt.Errorf("message testdata.Nested2A 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_Nested2A) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested2A", 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_Nested2A) 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_Nested2A) 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_Nested2A) 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_Nested2A) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested2A) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Nested != nil { - l = options.Size(x.Nested) - 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().(*Nested2A) - 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.Nested != nil { - encoded, err := options.Marshal(x.Nested) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested2A) - 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: Nested2A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested2A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested", 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.Nested == nil { - x.Nested = &Nested3A{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nested); 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_Nested1A protoreflect.MessageDescriptor - fd_Nested1A_id protoreflect.FieldDescriptor - fd_Nested1A_nested protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested1A = File_unknonwnproto_proto.Messages().ByName("Nested1A") - fd_Nested1A_id = md_Nested1A.Fields().ByName("id") - fd_Nested1A_nested = md_Nested1A.Fields().ByName("nested") -} - -var _ protoreflect.Message = (*fastReflection_Nested1A)(nil) - -type fastReflection_Nested1A Nested1A - -func (x *Nested1A) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested1A)(x) -} - -func (x *Nested1A) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_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_Nested1A_messageType fastReflection_Nested1A_messageType -var _ protoreflect.MessageType = fastReflection_Nested1A_messageType{} - -type fastReflection_Nested1A_messageType struct{} - -func (x fastReflection_Nested1A_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested1A)(nil) -} -func (x fastReflection_Nested1A_messageType) New() protoreflect.Message { - return new(fastReflection_Nested1A) -} -func (x fastReflection_Nested1A_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested1A -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested1A) Descriptor() protoreflect.MessageDescriptor { - return md_Nested1A -} - -// 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_Nested1A) Type() protoreflect.MessageType { - return _fastReflection_Nested1A_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested1A) New() protoreflect.Message { - return new(fastReflection_Nested1A) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested1A) Interface() protoreflect.ProtoMessage { - return (*Nested1A)(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_Nested1A) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested1A_id, value) { - return - } - } - if x.Nested != nil { - value := protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - if !f(fd_Nested1A_nested, 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_Nested1A) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested1A.id": - return x.Id != int32(0) - case "testdata.Nested1A.nested": - return x.Nested != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1A")) - } - panic(fmt.Errorf("message testdata.Nested1A 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_Nested1A) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested1A.id": - x.Id = int32(0) - case "testdata.Nested1A.nested": - x.Nested = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1A")) - } - panic(fmt.Errorf("message testdata.Nested1A 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_Nested1A) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested1A.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested1A.nested": - value := x.Nested - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1A")) - } - panic(fmt.Errorf("message testdata.Nested1A 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_Nested1A) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested1A.id": - x.Id = int32(value.Int()) - case "testdata.Nested1A.nested": - x.Nested = value.Message().Interface().(*Nested2A) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1A")) - } - panic(fmt.Errorf("message testdata.Nested1A 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_Nested1A) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested1A.nested": - if x.Nested == nil { - x.Nested = new(Nested2A) - } - return protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - case "testdata.Nested1A.id": - panic(fmt.Errorf("field id of message testdata.Nested1A is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1A")) - } - panic(fmt.Errorf("message testdata.Nested1A 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_Nested1A) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested1A.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested1A.nested": - m := new(Nested2A) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1A")) - } - panic(fmt.Errorf("message testdata.Nested1A 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_Nested1A) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested1A", 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_Nested1A) 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_Nested1A) 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_Nested1A) 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_Nested1A) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested1A) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Nested != nil { - l = options.Size(x.Nested) - 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().(*Nested1A) - 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.Nested != nil { - encoded, err := options.Marshal(x.Nested) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested1A) - 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: Nested1A: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested1A: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested", 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.Nested == nil { - x.Nested = &Nested2A{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nested); 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_Nested4B protoreflect.MessageDescriptor - fd_Nested4B_id protoreflect.FieldDescriptor - fd_Nested4B_age protoreflect.FieldDescriptor - fd_Nested4B_name protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested4B = File_unknonwnproto_proto.Messages().ByName("Nested4B") - fd_Nested4B_id = md_Nested4B.Fields().ByName("id") - fd_Nested4B_age = md_Nested4B.Fields().ByName("age") - fd_Nested4B_name = md_Nested4B.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_Nested4B)(nil) - -type fastReflection_Nested4B Nested4B - -func (x *Nested4B) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested4B)(x) -} - -func (x *Nested4B) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_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_Nested4B_messageType fastReflection_Nested4B_messageType -var _ protoreflect.MessageType = fastReflection_Nested4B_messageType{} - -type fastReflection_Nested4B_messageType struct{} - -func (x fastReflection_Nested4B_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested4B)(nil) -} -func (x fastReflection_Nested4B_messageType) New() protoreflect.Message { - return new(fastReflection_Nested4B) -} -func (x fastReflection_Nested4B_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested4B -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested4B) Descriptor() protoreflect.MessageDescriptor { - return md_Nested4B -} - -// 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_Nested4B) Type() protoreflect.MessageType { - return _fastReflection_Nested4B_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested4B) New() protoreflect.Message { - return new(fastReflection_Nested4B) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested4B) Interface() protoreflect.ProtoMessage { - return (*Nested4B)(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_Nested4B) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested4B_id, value) { - return - } - } - if x.Age != int32(0) { - value := protoreflect.ValueOfInt32(x.Age) - if !f(fd_Nested4B_age, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Nested4B_name, 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_Nested4B) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested4B.id": - return x.Id != int32(0) - case "testdata.Nested4B.age": - return x.Age != int32(0) - case "testdata.Nested4B.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4B")) - } - panic(fmt.Errorf("message testdata.Nested4B 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_Nested4B) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested4B.id": - x.Id = int32(0) - case "testdata.Nested4B.age": - x.Age = int32(0) - case "testdata.Nested4B.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4B")) - } - panic(fmt.Errorf("message testdata.Nested4B 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_Nested4B) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested4B.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested4B.age": - value := x.Age - return protoreflect.ValueOfInt32(value) - case "testdata.Nested4B.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4B")) - } - panic(fmt.Errorf("message testdata.Nested4B 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_Nested4B) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested4B.id": - x.Id = int32(value.Int()) - case "testdata.Nested4B.age": - x.Age = int32(value.Int()) - case "testdata.Nested4B.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4B")) - } - panic(fmt.Errorf("message testdata.Nested4B 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_Nested4B) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested4B.id": - panic(fmt.Errorf("field id of message testdata.Nested4B is not mutable")) - case "testdata.Nested4B.age": - panic(fmt.Errorf("field age of message testdata.Nested4B is not mutable")) - case "testdata.Nested4B.name": - panic(fmt.Errorf("field name of message testdata.Nested4B is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4B")) - } - panic(fmt.Errorf("message testdata.Nested4B 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_Nested4B) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested4B.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested4B.age": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested4B.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested4B")) - } - panic(fmt.Errorf("message testdata.Nested4B 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_Nested4B) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested4B", 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_Nested4B) 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_Nested4B) 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_Nested4B) 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_Nested4B) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested4B) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Age != 0 { - n += 1 + runtime.Sov(uint64(x.Age)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Nested4B) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x1a - } - if x.Age != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Age)) - i-- - dAtA[i] = 0x10 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested4B) - 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: Nested4B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested4B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) - } - x.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Age |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Nested3B_4_list)(nil) - -type _Nested3B_4_list struct { - list *[]*Nested4B -} - -func (x *_Nested3B_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Nested3B_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Nested3B_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Nested4B) - (*x.list)[i] = concreteValue -} - -func (x *_Nested3B_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Nested4B) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Nested3B_4_list) AppendMutable() protoreflect.Value { - v := new(Nested4B) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Nested3B_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Nested3B_4_list) NewElement() protoreflect.Value { - v := new(Nested4B) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Nested3B_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Nested3B protoreflect.MessageDescriptor - fd_Nested3B_id protoreflect.FieldDescriptor - fd_Nested3B_age protoreflect.FieldDescriptor - fd_Nested3B_name protoreflect.FieldDescriptor - fd_Nested3B_b4 protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested3B = File_unknonwnproto_proto.Messages().ByName("Nested3B") - fd_Nested3B_id = md_Nested3B.Fields().ByName("id") - fd_Nested3B_age = md_Nested3B.Fields().ByName("age") - fd_Nested3B_name = md_Nested3B.Fields().ByName("name") - fd_Nested3B_b4 = md_Nested3B.Fields().ByName("b4") -} - -var _ protoreflect.Message = (*fastReflection_Nested3B)(nil) - -type fastReflection_Nested3B Nested3B - -func (x *Nested3B) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested3B)(x) -} - -func (x *Nested3B) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Nested3B_messageType fastReflection_Nested3B_messageType -var _ protoreflect.MessageType = fastReflection_Nested3B_messageType{} - -type fastReflection_Nested3B_messageType struct{} - -func (x fastReflection_Nested3B_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested3B)(nil) -} -func (x fastReflection_Nested3B_messageType) New() protoreflect.Message { - return new(fastReflection_Nested3B) -} -func (x fastReflection_Nested3B_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested3B -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested3B) Descriptor() protoreflect.MessageDescriptor { - return md_Nested3B -} - -// 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_Nested3B) Type() protoreflect.MessageType { - return _fastReflection_Nested3B_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested3B) New() protoreflect.Message { - return new(fastReflection_Nested3B) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested3B) Interface() protoreflect.ProtoMessage { - return (*Nested3B)(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_Nested3B) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested3B_id, value) { - return - } - } - if x.Age != int32(0) { - value := protoreflect.ValueOfInt32(x.Age) - if !f(fd_Nested3B_age, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Nested3B_name, value) { - return - } - } - if len(x.B4) != 0 { - value := protoreflect.ValueOfList(&_Nested3B_4_list{list: &x.B4}) - if !f(fd_Nested3B_b4, 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_Nested3B) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested3B.id": - return x.Id != int32(0) - case "testdata.Nested3B.age": - return x.Age != int32(0) - case "testdata.Nested3B.name": - return x.Name != "" - case "testdata.Nested3B.b4": - return len(x.B4) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3B")) - } - panic(fmt.Errorf("message testdata.Nested3B 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_Nested3B) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested3B.id": - x.Id = int32(0) - case "testdata.Nested3B.age": - x.Age = int32(0) - case "testdata.Nested3B.name": - x.Name = "" - case "testdata.Nested3B.b4": - x.B4 = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3B")) - } - panic(fmt.Errorf("message testdata.Nested3B 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_Nested3B) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested3B.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested3B.age": - value := x.Age - return protoreflect.ValueOfInt32(value) - case "testdata.Nested3B.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.Nested3B.b4": - if len(x.B4) == 0 { - return protoreflect.ValueOfList(&_Nested3B_4_list{}) - } - listValue := &_Nested3B_4_list{list: &x.B4} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3B")) - } - panic(fmt.Errorf("message testdata.Nested3B 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_Nested3B) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested3B.id": - x.Id = int32(value.Int()) - case "testdata.Nested3B.age": - x.Age = int32(value.Int()) - case "testdata.Nested3B.name": - x.Name = value.Interface().(string) - case "testdata.Nested3B.b4": - lv := value.List() - clv := lv.(*_Nested3B_4_list) - x.B4 = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3B")) - } - panic(fmt.Errorf("message testdata.Nested3B 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_Nested3B) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested3B.b4": - if x.B4 == nil { - x.B4 = []*Nested4B{} - } - value := &_Nested3B_4_list{list: &x.B4} - return protoreflect.ValueOfList(value) - case "testdata.Nested3B.id": - panic(fmt.Errorf("field id of message testdata.Nested3B is not mutable")) - case "testdata.Nested3B.age": - panic(fmt.Errorf("field age of message testdata.Nested3B is not mutable")) - case "testdata.Nested3B.name": - panic(fmt.Errorf("field name of message testdata.Nested3B is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3B")) - } - panic(fmt.Errorf("message testdata.Nested3B 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_Nested3B) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested3B.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested3B.age": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested3B.name": - return protoreflect.ValueOfString("") - case "testdata.Nested3B.b4": - list := []*Nested4B{} - return protoreflect.ValueOfList(&_Nested3B_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested3B")) - } - panic(fmt.Errorf("message testdata.Nested3B 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_Nested3B) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested3B", 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_Nested3B) 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_Nested3B) 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_Nested3B) 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_Nested3B) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested3B) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Age != 0 { - n += 1 + runtime.Sov(uint64(x.Age)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.B4) > 0 { - for _, e := range x.B4 { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Nested3B) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.B4) > 0 { - for iNdEx := len(x.B4) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.B4[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x1a - } - if x.Age != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Age)) - i-- - dAtA[i] = 0x10 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested3B) - 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: Nested3B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested3B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) - } - x.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Age |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B4", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.B4 = append(x.B4, &Nested4B{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B4[len(x.B4)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Nested2B protoreflect.MessageDescriptor - fd_Nested2B_id protoreflect.FieldDescriptor - fd_Nested2B_fee protoreflect.FieldDescriptor - fd_Nested2B_nested protoreflect.FieldDescriptor - fd_Nested2B_route protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested2B = File_unknonwnproto_proto.Messages().ByName("Nested2B") - fd_Nested2B_id = md_Nested2B.Fields().ByName("id") - fd_Nested2B_fee = md_Nested2B.Fields().ByName("fee") - fd_Nested2B_nested = md_Nested2B.Fields().ByName("nested") - fd_Nested2B_route = md_Nested2B.Fields().ByName("route") -} - -var _ protoreflect.Message = (*fastReflection_Nested2B)(nil) - -type fastReflection_Nested2B Nested2B - -func (x *Nested2B) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested2B)(x) -} - -func (x *Nested2B) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Nested2B_messageType fastReflection_Nested2B_messageType -var _ protoreflect.MessageType = fastReflection_Nested2B_messageType{} - -type fastReflection_Nested2B_messageType struct{} - -func (x fastReflection_Nested2B_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested2B)(nil) -} -func (x fastReflection_Nested2B_messageType) New() protoreflect.Message { - return new(fastReflection_Nested2B) -} -func (x fastReflection_Nested2B_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested2B -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested2B) Descriptor() protoreflect.MessageDescriptor { - return md_Nested2B -} - -// 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_Nested2B) Type() protoreflect.MessageType { - return _fastReflection_Nested2B_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested2B) New() protoreflect.Message { - return new(fastReflection_Nested2B) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested2B) Interface() protoreflect.ProtoMessage { - return (*Nested2B)(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_Nested2B) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested2B_id, value) { - return - } - } - if x.Fee != float64(0) || math.Signbit(x.Fee) { - value := protoreflect.ValueOfFloat64(x.Fee) - if !f(fd_Nested2B_fee, value) { - return - } - } - if x.Nested != nil { - value := protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - if !f(fd_Nested2B_nested, value) { - return - } - } - if x.Route != "" { - value := protoreflect.ValueOfString(x.Route) - if !f(fd_Nested2B_route, 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_Nested2B) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested2B.id": - return x.Id != int32(0) - case "testdata.Nested2B.fee": - return x.Fee != float64(0) || math.Signbit(x.Fee) - case "testdata.Nested2B.nested": - return x.Nested != nil - case "testdata.Nested2B.route": - return x.Route != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2B")) - } - panic(fmt.Errorf("message testdata.Nested2B 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_Nested2B) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested2B.id": - x.Id = int32(0) - case "testdata.Nested2B.fee": - x.Fee = float64(0) - case "testdata.Nested2B.nested": - x.Nested = nil - case "testdata.Nested2B.route": - x.Route = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2B")) - } - panic(fmt.Errorf("message testdata.Nested2B 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_Nested2B) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested2B.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested2B.fee": - value := x.Fee - return protoreflect.ValueOfFloat64(value) - case "testdata.Nested2B.nested": - value := x.Nested - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.Nested2B.route": - value := x.Route - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2B")) - } - panic(fmt.Errorf("message testdata.Nested2B 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_Nested2B) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested2B.id": - x.Id = int32(value.Int()) - case "testdata.Nested2B.fee": - x.Fee = value.Float() - case "testdata.Nested2B.nested": - x.Nested = value.Message().Interface().(*Nested3B) - case "testdata.Nested2B.route": - x.Route = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2B")) - } - panic(fmt.Errorf("message testdata.Nested2B 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_Nested2B) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested2B.nested": - if x.Nested == nil { - x.Nested = new(Nested3B) - } - return protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - case "testdata.Nested2B.id": - panic(fmt.Errorf("field id of message testdata.Nested2B is not mutable")) - case "testdata.Nested2B.fee": - panic(fmt.Errorf("field fee of message testdata.Nested2B is not mutable")) - case "testdata.Nested2B.route": - panic(fmt.Errorf("field route of message testdata.Nested2B is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2B")) - } - panic(fmt.Errorf("message testdata.Nested2B 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_Nested2B) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested2B.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested2B.fee": - return protoreflect.ValueOfFloat64(float64(0)) - case "testdata.Nested2B.nested": - m := new(Nested3B) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.Nested2B.route": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested2B")) - } - panic(fmt.Errorf("message testdata.Nested2B 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_Nested2B) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested2B", 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_Nested2B) 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_Nested2B) 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_Nested2B) 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_Nested2B) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested2B) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Fee != 0 || math.Signbit(x.Fee) { - n += 9 - } - if x.Nested != nil { - l = options.Size(x.Nested) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Route) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Nested2B) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Route) > 0 { - i -= len(x.Route) - copy(dAtA[i:], x.Route) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Route))) - i-- - dAtA[i] = 0x22 - } - if x.Nested != nil { - encoded, err := options.Marshal(x.Nested) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.Fee != 0 || math.Signbit(x.Fee) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.Fee)))) - i-- - dAtA[i] = 0x11 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested2B) - 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: Nested2B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested2B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - x.Fee = float64(math.Float64frombits(v)) - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested", 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.Nested == nil { - x.Nested = &Nested3B{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nested); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", 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.Route = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Nested1B protoreflect.MessageDescriptor - fd_Nested1B_id protoreflect.FieldDescriptor - fd_Nested1B_nested protoreflect.FieldDescriptor - fd_Nested1B_age protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Nested1B = File_unknonwnproto_proto.Messages().ByName("Nested1B") - fd_Nested1B_id = md_Nested1B.Fields().ByName("id") - fd_Nested1B_nested = md_Nested1B.Fields().ByName("nested") - fd_Nested1B_age = md_Nested1B.Fields().ByName("age") -} - -var _ protoreflect.Message = (*fastReflection_Nested1B)(nil) - -type fastReflection_Nested1B Nested1B - -func (x *Nested1B) ProtoReflect() protoreflect.Message { - return (*fastReflection_Nested1B)(x) -} - -func (x *Nested1B) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Nested1B_messageType fastReflection_Nested1B_messageType -var _ protoreflect.MessageType = fastReflection_Nested1B_messageType{} - -type fastReflection_Nested1B_messageType struct{} - -func (x fastReflection_Nested1B_messageType) Zero() protoreflect.Message { - return (*fastReflection_Nested1B)(nil) -} -func (x fastReflection_Nested1B_messageType) New() protoreflect.Message { - return new(fastReflection_Nested1B) -} -func (x fastReflection_Nested1B_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Nested1B -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Nested1B) Descriptor() protoreflect.MessageDescriptor { - return md_Nested1B -} - -// 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_Nested1B) Type() protoreflect.MessageType { - return _fastReflection_Nested1B_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Nested1B) New() protoreflect.Message { - return new(fastReflection_Nested1B) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Nested1B) Interface() protoreflect.ProtoMessage { - return (*Nested1B)(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_Nested1B) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Nested1B_id, value) { - return - } - } - if x.Nested != nil { - value := protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - if !f(fd_Nested1B_nested, value) { - return - } - } - if x.Age != int32(0) { - value := protoreflect.ValueOfInt32(x.Age) - if !f(fd_Nested1B_age, 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_Nested1B) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Nested1B.id": - return x.Id != int32(0) - case "testdata.Nested1B.nested": - return x.Nested != nil - case "testdata.Nested1B.age": - return x.Age != int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1B")) - } - panic(fmt.Errorf("message testdata.Nested1B 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_Nested1B) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Nested1B.id": - x.Id = int32(0) - case "testdata.Nested1B.nested": - x.Nested = nil - case "testdata.Nested1B.age": - x.Age = int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1B")) - } - panic(fmt.Errorf("message testdata.Nested1B 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_Nested1B) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Nested1B.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Nested1B.nested": - value := x.Nested - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.Nested1B.age": - value := x.Age - return protoreflect.ValueOfInt32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1B")) - } - panic(fmt.Errorf("message testdata.Nested1B 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_Nested1B) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Nested1B.id": - x.Id = int32(value.Int()) - case "testdata.Nested1B.nested": - x.Nested = value.Message().Interface().(*Nested2B) - case "testdata.Nested1B.age": - x.Age = int32(value.Int()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1B")) - } - panic(fmt.Errorf("message testdata.Nested1B 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_Nested1B) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested1B.nested": - if x.Nested == nil { - x.Nested = new(Nested2B) - } - return protoreflect.ValueOfMessage(x.Nested.ProtoReflect()) - case "testdata.Nested1B.id": - panic(fmt.Errorf("field id of message testdata.Nested1B is not mutable")) - case "testdata.Nested1B.age": - panic(fmt.Errorf("field age of message testdata.Nested1B is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1B")) - } - panic(fmt.Errorf("message testdata.Nested1B 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_Nested1B) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Nested1B.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Nested1B.nested": - m := new(Nested2B) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.Nested1B.age": - return protoreflect.ValueOfInt32(int32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Nested1B")) - } - panic(fmt.Errorf("message testdata.Nested1B 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_Nested1B) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Nested1B", 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_Nested1B) 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_Nested1B) 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_Nested1B) 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_Nested1B) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Nested1B) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Nested != nil { - l = options.Size(x.Nested) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Age != 0 { - n += 1 + runtime.Sov(uint64(x.Age)) - } - 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().(*Nested1B) - 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.Age != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Age)) - i-- - dAtA[i] = 0x18 - } - if x.Nested != nil { - encoded, err := options.Marshal(x.Nested) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Nested1B) - 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: Nested1B: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Nested1B: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested", 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.Nested == nil { - x.Nested = &Nested2B{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nested); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) - } - x.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Age |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Customer3 protoreflect.MessageDescriptor - fd_Customer3_id protoreflect.FieldDescriptor - fd_Customer3_name protoreflect.FieldDescriptor - fd_Customer3_sf protoreflect.FieldDescriptor - fd_Customer3_surcharge protoreflect.FieldDescriptor - fd_Customer3_destination protoreflect.FieldDescriptor - fd_Customer3_credit_card_no protoreflect.FieldDescriptor - fd_Customer3_cheque_no protoreflect.FieldDescriptor - fd_Customer3_original protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_Customer3 = File_unknonwnproto_proto.Messages().ByName("Customer3") - fd_Customer3_id = md_Customer3.Fields().ByName("id") - fd_Customer3_name = md_Customer3.Fields().ByName("name") - fd_Customer3_sf = md_Customer3.Fields().ByName("sf") - fd_Customer3_surcharge = md_Customer3.Fields().ByName("surcharge") - fd_Customer3_destination = md_Customer3.Fields().ByName("destination") - fd_Customer3_credit_card_no = md_Customer3.Fields().ByName("credit_card_no") - fd_Customer3_cheque_no = md_Customer3.Fields().ByName("cheque_no") - fd_Customer3_original = md_Customer3.Fields().ByName("original") -} - -var _ protoreflect.Message = (*fastReflection_Customer3)(nil) - -type fastReflection_Customer3 Customer3 - -func (x *Customer3) ProtoReflect() protoreflect.Message { - return (*fastReflection_Customer3)(x) -} - -func (x *Customer3) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Customer3_messageType fastReflection_Customer3_messageType -var _ protoreflect.MessageType = fastReflection_Customer3_messageType{} - -type fastReflection_Customer3_messageType struct{} - -func (x fastReflection_Customer3_messageType) Zero() protoreflect.Message { - return (*fastReflection_Customer3)(nil) -} -func (x fastReflection_Customer3_messageType) New() protoreflect.Message { - return new(fastReflection_Customer3) -} -func (x fastReflection_Customer3_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Customer3 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Customer3) Descriptor() protoreflect.MessageDescriptor { - return md_Customer3 -} - -// 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_Customer3) Type() protoreflect.MessageType { - return _fastReflection_Customer3_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Customer3) New() protoreflect.Message { - return new(fastReflection_Customer3) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Customer3) Interface() protoreflect.ProtoMessage { - return (*Customer3)(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_Customer3) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int32(0) { - value := protoreflect.ValueOfInt32(x.Id) - if !f(fd_Customer3_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Customer3_name, value) { - return - } - } - if x.Sf != float32(0) || math.Signbit(float64(x.Sf)) { - value := protoreflect.ValueOfFloat32(x.Sf) - if !f(fd_Customer3_sf, value) { - return - } - } - if x.Surcharge != float32(0) || math.Signbit(float64(x.Surcharge)) { - value := protoreflect.ValueOfFloat32(x.Surcharge) - if !f(fd_Customer3_surcharge, value) { - return - } - } - if x.Destination != "" { - value := protoreflect.ValueOfString(x.Destination) - if !f(fd_Customer3_destination, value) { - return - } - } - if x.Payment != nil { - switch o := x.Payment.(type) { - case *Customer3_CreditCardNo: - v := o.CreditCardNo - value := protoreflect.ValueOfString(v) - if !f(fd_Customer3_credit_card_no, value) { - return - } - case *Customer3_ChequeNo: - v := o.ChequeNo - value := protoreflect.ValueOfString(v) - if !f(fd_Customer3_cheque_no, value) { - return - } - } - } - if x.Original != nil { - value := protoreflect.ValueOfMessage(x.Original.ProtoReflect()) - if !f(fd_Customer3_original, 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_Customer3) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.Customer3.id": - return x.Id != int32(0) - case "testdata.Customer3.name": - return x.Name != "" - case "testdata.Customer3.sf": - return x.Sf != float32(0) || math.Signbit(float64(x.Sf)) - case "testdata.Customer3.surcharge": - return x.Surcharge != float32(0) || math.Signbit(float64(x.Surcharge)) - case "testdata.Customer3.destination": - return x.Destination != "" - case "testdata.Customer3.credit_card_no": - if x.Payment == nil { - return false - } else if _, ok := x.Payment.(*Customer3_CreditCardNo); ok { - return true - } else { - return false - } - case "testdata.Customer3.cheque_no": - if x.Payment == nil { - return false - } else if _, ok := x.Payment.(*Customer3_ChequeNo); ok { - return true - } else { - return false - } - case "testdata.Customer3.original": - return x.Original != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer3")) - } - panic(fmt.Errorf("message testdata.Customer3 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_Customer3) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.Customer3.id": - x.Id = int32(0) - case "testdata.Customer3.name": - x.Name = "" - case "testdata.Customer3.sf": - x.Sf = float32(0) - case "testdata.Customer3.surcharge": - x.Surcharge = float32(0) - case "testdata.Customer3.destination": - x.Destination = "" - case "testdata.Customer3.credit_card_no": - x.Payment = nil - case "testdata.Customer3.cheque_no": - x.Payment = nil - case "testdata.Customer3.original": - x.Original = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer3")) - } - panic(fmt.Errorf("message testdata.Customer3 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_Customer3) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.Customer3.id": - value := x.Id - return protoreflect.ValueOfInt32(value) - case "testdata.Customer3.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.Customer3.sf": - value := x.Sf - return protoreflect.ValueOfFloat32(value) - case "testdata.Customer3.surcharge": - value := x.Surcharge - return protoreflect.ValueOfFloat32(value) - case "testdata.Customer3.destination": - value := x.Destination - return protoreflect.ValueOfString(value) - case "testdata.Customer3.credit_card_no": - if x.Payment == nil { - return protoreflect.ValueOfString("") - } else if v, ok := x.Payment.(*Customer3_CreditCardNo); ok { - return protoreflect.ValueOfString(v.CreditCardNo) - } else { - return protoreflect.ValueOfString("") - } - case "testdata.Customer3.cheque_no": - if x.Payment == nil { - return protoreflect.ValueOfString("") - } else if v, ok := x.Payment.(*Customer3_ChequeNo); ok { - return protoreflect.ValueOfString(v.ChequeNo) - } else { - return protoreflect.ValueOfString("") - } - case "testdata.Customer3.original": - value := x.Original - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer3")) - } - panic(fmt.Errorf("message testdata.Customer3 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_Customer3) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.Customer3.id": - x.Id = int32(value.Int()) - case "testdata.Customer3.name": - x.Name = value.Interface().(string) - case "testdata.Customer3.sf": - x.Sf = float32(value.Float()) - case "testdata.Customer3.surcharge": - x.Surcharge = float32(value.Float()) - case "testdata.Customer3.destination": - x.Destination = value.Interface().(string) - case "testdata.Customer3.credit_card_no": - cv := value.Interface().(string) - x.Payment = &Customer3_CreditCardNo{CreditCardNo: cv} - case "testdata.Customer3.cheque_no": - cv := value.Interface().(string) - x.Payment = &Customer3_ChequeNo{ChequeNo: cv} - case "testdata.Customer3.original": - x.Original = value.Message().Interface().(*Customer1) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer3")) - } - panic(fmt.Errorf("message testdata.Customer3 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_Customer3) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Customer3.original": - if x.Original == nil { - x.Original = new(Customer1) - } - return protoreflect.ValueOfMessage(x.Original.ProtoReflect()) - case "testdata.Customer3.id": - panic(fmt.Errorf("field id of message testdata.Customer3 is not mutable")) - case "testdata.Customer3.name": - panic(fmt.Errorf("field name of message testdata.Customer3 is not mutable")) - case "testdata.Customer3.sf": - panic(fmt.Errorf("field sf of message testdata.Customer3 is not mutable")) - case "testdata.Customer3.surcharge": - panic(fmt.Errorf("field surcharge of message testdata.Customer3 is not mutable")) - case "testdata.Customer3.destination": - panic(fmt.Errorf("field destination of message testdata.Customer3 is not mutable")) - case "testdata.Customer3.credit_card_no": - panic(fmt.Errorf("field credit_card_no of message testdata.Customer3 is not mutable")) - case "testdata.Customer3.cheque_no": - panic(fmt.Errorf("field cheque_no of message testdata.Customer3 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer3")) - } - panic(fmt.Errorf("message testdata.Customer3 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_Customer3) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.Customer3.id": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.Customer3.name": - return protoreflect.ValueOfString("") - case "testdata.Customer3.sf": - return protoreflect.ValueOfFloat32(float32(0)) - case "testdata.Customer3.surcharge": - return protoreflect.ValueOfFloat32(float32(0)) - case "testdata.Customer3.destination": - return protoreflect.ValueOfString("") - case "testdata.Customer3.credit_card_no": - return protoreflect.ValueOfString("") - case "testdata.Customer3.cheque_no": - return protoreflect.ValueOfString("") - case "testdata.Customer3.original": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.Customer3")) - } - panic(fmt.Errorf("message testdata.Customer3 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_Customer3) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.Customer3.payment": - if x.Payment == nil { - return nil - } - switch x.Payment.(type) { - case *Customer3_CreditCardNo: - return x.Descriptor().Fields().ByName("credit_card_no") - case *Customer3_ChequeNo: - return x.Descriptor().Fields().ByName("cheque_no") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.Customer3", 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_Customer3) 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_Customer3) 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_Customer3) 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_Customer3) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Customer3) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Sf != 0 || math.Signbit(float64(x.Sf)) { - n += 5 - } - if x.Surcharge != 0 || math.Signbit(float64(x.Surcharge)) { - n += 5 - } - l = len(x.Destination) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - switch x := x.Payment.(type) { - case *Customer3_CreditCardNo: - if x == nil { - break - } - l = len(x.CreditCardNo) - n += 1 + l + runtime.Sov(uint64(l)) - case *Customer3_ChequeNo: - if x == nil { - break - } - l = len(x.ChequeNo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Original != nil { - l = options.Size(x.Original) - 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().(*Customer3) - 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) - } - switch x := x.Payment.(type) { - case *Customer3_CreditCardNo: - i -= len(x.CreditCardNo) - copy(dAtA[i:], x.CreditCardNo) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CreditCardNo))) - i-- - dAtA[i] = 0x3a - case *Customer3_ChequeNo: - i -= len(x.ChequeNo) - copy(dAtA[i:], x.ChequeNo) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChequeNo))) - i-- - dAtA[i] = 0x42 - } - if x.Original != nil { - encoded, err := options.Marshal(x.Original) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if len(x.Destination) > 0 { - i -= len(x.Destination) - copy(dAtA[i:], x.Destination) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Destination))) - i-- - dAtA[i] = 0x2a - } - if x.Surcharge != 0 || math.Signbit(float64(x.Surcharge)) { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.Surcharge)))) - i-- - dAtA[i] = 0x25 - } - if x.Sf != 0 || math.Signbit(float64(x.Sf)) { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.Sf)))) - i-- - dAtA[i] = 0x1d - } - 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] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Customer3) - 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: Customer3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Customer3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 5 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sf", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - x.Sf = float32(math.Float32frombits(v)) - case 4: - if wireType != 5 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Surcharge", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - x.Surcharge = float32(math.Float32frombits(v)) - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Destination", 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.Destination = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreditCardNo", 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.Payment = &Customer3_CreditCardNo{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChequeNo", 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.Payment = &Customer3_ChequeNo{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Original", 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.Original == nil { - x.Original = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Original); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersion1_4_list)(nil) - -type _TestVersion1_4_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion1_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion1_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion1_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion1_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion1_4_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion1_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion1_4_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion1_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion1_5_list)(nil) - -type _TestVersion1_5_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion1_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion1_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion1_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion1_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion1_5_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion1_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion1_5_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion1_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion1_9_list)(nil) - -type _TestVersion1_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion1_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion1_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion1_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion1_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion1_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion1_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion1_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion1_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersion1 protoreflect.MessageDescriptor - fd_TestVersion1_x protoreflect.FieldDescriptor - fd_TestVersion1_a protoreflect.FieldDescriptor - fd_TestVersion1_b protoreflect.FieldDescriptor - fd_TestVersion1_c protoreflect.FieldDescriptor - fd_TestVersion1_d protoreflect.FieldDescriptor - fd_TestVersion1_e protoreflect.FieldDescriptor - fd_TestVersion1_f protoreflect.FieldDescriptor - fd_TestVersion1_g protoreflect.FieldDescriptor - fd_TestVersion1_h protoreflect.FieldDescriptor - fd_TestVersion1_k protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion1 = File_unknonwnproto_proto.Messages().ByName("TestVersion1") - fd_TestVersion1_x = md_TestVersion1.Fields().ByName("x") - fd_TestVersion1_a = md_TestVersion1.Fields().ByName("a") - fd_TestVersion1_b = md_TestVersion1.Fields().ByName("b") - fd_TestVersion1_c = md_TestVersion1.Fields().ByName("c") - fd_TestVersion1_d = md_TestVersion1.Fields().ByName("d") - fd_TestVersion1_e = md_TestVersion1.Fields().ByName("e") - fd_TestVersion1_f = md_TestVersion1.Fields().ByName("f") - fd_TestVersion1_g = md_TestVersion1.Fields().ByName("g") - fd_TestVersion1_h = md_TestVersion1.Fields().ByName("h") - fd_TestVersion1_k = md_TestVersion1.Fields().ByName("k") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion1)(nil) - -type fastReflection_TestVersion1 TestVersion1 - -func (x *TestVersion1) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion1)(x) -} - -func (x *TestVersion1) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion1_messageType fastReflection_TestVersion1_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion1_messageType{} - -type fastReflection_TestVersion1_messageType struct{} - -func (x fastReflection_TestVersion1_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion1)(nil) -} -func (x fastReflection_TestVersion1_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion1) -} -func (x fastReflection_TestVersion1_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion1 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion1) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion1 -} - -// 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_TestVersion1) Type() protoreflect.MessageType { - return _fastReflection_TestVersion1_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion1) New() protoreflect.Message { - return new(fastReflection_TestVersion1) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion1) Interface() protoreflect.ProtoMessage { - return (*TestVersion1)(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_TestVersion1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersion1_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersion1_a, value) { - return - } - } - if x.B != nil { - value := protoreflect.ValueOfMessage(x.B.ProtoReflect()) - if !f(fd_TestVersion1_b, value) { - return - } - } - if len(x.C) != 0 { - value := protoreflect.ValueOfList(&_TestVersion1_4_list{list: &x.C}) - if !f(fd_TestVersion1_c, value) { - return - } - } - if len(x.D) != 0 { - value := protoreflect.ValueOfList(&_TestVersion1_5_list{list: &x.D}) - if !f(fd_TestVersion1_d, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersion1_E: - v := o.E - value := protoreflect.ValueOfInt32(v) - if !f(fd_TestVersion1_e, value) { - return - } - case *TestVersion1_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersion1_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersion1_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersion1_9_list{list: &x.H}) - if !f(fd_TestVersion1_h, value) { - return - } - } - if x.K != nil { - value := protoreflect.ValueOfMessage(x.K.ProtoReflect()) - if !f(fd_TestVersion1_k, 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_TestVersion1) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion1.x": - return x.X != int64(0) - case "testdata.TestVersion1.a": - return x.A != nil - case "testdata.TestVersion1.b": - return x.B != nil - case "testdata.TestVersion1.c": - return len(x.C) != 0 - case "testdata.TestVersion1.d": - return len(x.D) != 0 - case "testdata.TestVersion1.e": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion1_E); ok { - return true - } else { - return false - } - case "testdata.TestVersion1.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion1_F); ok { - return true - } else { - return false - } - case "testdata.TestVersion1.g": - return x.G != nil - case "testdata.TestVersion1.h": - return len(x.H) != 0 - case "testdata.TestVersion1.k": - return x.K != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion1")) - } - panic(fmt.Errorf("message testdata.TestVersion1 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_TestVersion1) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion1.x": - x.X = int64(0) - case "testdata.TestVersion1.a": - x.A = nil - case "testdata.TestVersion1.b": - x.B = nil - case "testdata.TestVersion1.c": - x.C = nil - case "testdata.TestVersion1.d": - x.D = nil - case "testdata.TestVersion1.e": - x.Sum = nil - case "testdata.TestVersion1.f": - x.Sum = nil - case "testdata.TestVersion1.g": - x.G = nil - case "testdata.TestVersion1.h": - x.H = nil - case "testdata.TestVersion1.k": - x.K = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion1")) - } - panic(fmt.Errorf("message testdata.TestVersion1 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_TestVersion1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion1.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion1.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion1.b": - value := x.B - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion1.c": - if len(x.C) == 0 { - return protoreflect.ValueOfList(&_TestVersion1_4_list{}) - } - listValue := &_TestVersion1_4_list{list: &x.C} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion1.d": - if len(x.D) == 0 { - return protoreflect.ValueOfList(&_TestVersion1_5_list{}) - } - listValue := &_TestVersion1_5_list{list: &x.D} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion1.e": - if x.Sum == nil { - return protoreflect.ValueOfInt32(int32(0)) - } else if v, ok := x.Sum.(*TestVersion1_E); ok { - return protoreflect.ValueOfInt32(v.E) - } else { - return protoreflect.ValueOfInt32(int32(0)) - } - case "testdata.TestVersion1.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion1)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersion1_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion1)(nil).ProtoReflect()) - } - case "testdata.TestVersion1.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion1.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersion1_9_list{}) - } - listValue := &_TestVersion1_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion1.k": - value := x.K - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion1")) - } - panic(fmt.Errorf("message testdata.TestVersion1 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_TestVersion1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion1.x": - x.X = value.Int() - case "testdata.TestVersion1.a": - x.A = value.Message().Interface().(*TestVersion1) - case "testdata.TestVersion1.b": - x.B = value.Message().Interface().(*TestVersion1) - case "testdata.TestVersion1.c": - lv := value.List() - clv := lv.(*_TestVersion1_4_list) - x.C = *clv.list - case "testdata.TestVersion1.d": - lv := value.List() - clv := lv.(*_TestVersion1_5_list) - x.D = *clv.list - case "testdata.TestVersion1.e": - cv := int32(value.Int()) - x.Sum = &TestVersion1_E{E: cv} - case "testdata.TestVersion1.f": - cv := value.Message().Interface().(*TestVersion1) - x.Sum = &TestVersion1_F{F: cv} - case "testdata.TestVersion1.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersion1.h": - lv := value.List() - clv := lv.(*_TestVersion1_9_list) - x.H = *clv.list - case "testdata.TestVersion1.k": - x.K = value.Message().Interface().(*Customer1) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion1")) - } - panic(fmt.Errorf("message testdata.TestVersion1 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_TestVersion1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion1.a": - if x.A == nil { - x.A = new(TestVersion1) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersion1.b": - if x.B == nil { - x.B = new(TestVersion1) - } - return protoreflect.ValueOfMessage(x.B.ProtoReflect()) - case "testdata.TestVersion1.c": - if x.C == nil { - x.C = []*TestVersion1{} - } - value := &_TestVersion1_4_list{list: &x.C} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion1.d": - if x.D == nil { - x.D = []*TestVersion1{} - } - value := &_TestVersion1_5_list{list: &x.D} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion1.f": - if x.Sum == nil { - value := &TestVersion1{} - oneofValue := &TestVersion1_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersion1_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion1{} - oneofValue := &TestVersion1_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersion1.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersion1.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersion1_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion1.k": - if x.K == nil { - x.K = new(Customer1) - } - return protoreflect.ValueOfMessage(x.K.ProtoReflect()) - case "testdata.TestVersion1.x": - panic(fmt.Errorf("field x of message testdata.TestVersion1 is not mutable")) - case "testdata.TestVersion1.e": - panic(fmt.Errorf("field e of message testdata.TestVersion1 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion1")) - } - panic(fmt.Errorf("message testdata.TestVersion1 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_TestVersion1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion1.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion1.a": - m := new(TestVersion1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion1.b": - m := new(TestVersion1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion1.c": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion1_4_list{list: &list}) - case "testdata.TestVersion1.d": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion1_5_list{list: &list}) - case "testdata.TestVersion1.e": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.TestVersion1.f": - value := &TestVersion1{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion1.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion1.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion1_9_list{list: &list}) - case "testdata.TestVersion1.k": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion1")) - } - panic(fmt.Errorf("message testdata.TestVersion1 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_TestVersion1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersion1.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersion1_E: - return x.Descriptor().Fields().ByName("e") - case *TestVersion1_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion1", 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_TestVersion1) 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_TestVersion1) 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_TestVersion1) 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_TestVersion1) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion1) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != nil { - l = options.Size(x.B) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.C) > 0 { - for _, e := range x.C { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.D) > 0 { - for _, e := range x.D { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - switch x := x.Sum.(type) { - case *TestVersion1_E: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.E)) - case *TestVersion1_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.K != nil { - l = options.Size(x.K) - 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().(*TestVersion1) - 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) - } - switch x := x.Sum.(type) { - case *TestVersion1_E: - i = runtime.EncodeVarint(dAtA, i, uint64(x.E)) - i-- - dAtA[i] = 0x30 - case *TestVersion1_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.K != nil { - encoded, err := options.Marshal(x.K) - 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] = 0x62 - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.D) > 0 { - for iNdEx := len(x.D) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.D[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.C) > 0 { - for iNdEx := len(x.C) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.C[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.B != nil { - encoded, err := options.Marshal(x.B) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion1) - 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: TestVersion1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", 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.B == nil { - x.B = &TestVersion1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.C = append(x.C, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.C[len(x.C)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.D = append(x.D, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.D[len(x.D)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &TestVersion1_E{v} - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion1{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersion1_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field K", 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.K == nil { - x.K = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.K); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersion2_4_list)(nil) - -type _TestVersion2_4_list struct { - list *[]*TestVersion2 -} - -func (x *_TestVersion2_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion2_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion2_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion2) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion2_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion2) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion2_4_list) AppendMutable() protoreflect.Value { - v := new(TestVersion2) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion2_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion2_4_list) NewElement() protoreflect.Value { - v := new(TestVersion2) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion2_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion2_5_list)(nil) - -type _TestVersion2_5_list struct { - list *[]*TestVersion2 -} - -func (x *_TestVersion2_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion2_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion2_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion2) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion2_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion2) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion2_5_list) AppendMutable() protoreflect.Value { - v := new(TestVersion2) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion2_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion2_5_list) NewElement() protoreflect.Value { - v := new(TestVersion2) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion2_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion2_9_list)(nil) - -type _TestVersion2_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion2_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion2_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion2_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion2_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion2_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion2_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion2_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion2_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersion2 protoreflect.MessageDescriptor - fd_TestVersion2_x protoreflect.FieldDescriptor - fd_TestVersion2_a protoreflect.FieldDescriptor - fd_TestVersion2_b protoreflect.FieldDescriptor - fd_TestVersion2_c protoreflect.FieldDescriptor - fd_TestVersion2_d protoreflect.FieldDescriptor - fd_TestVersion2_e protoreflect.FieldDescriptor - fd_TestVersion2_f protoreflect.FieldDescriptor - fd_TestVersion2_g protoreflect.FieldDescriptor - fd_TestVersion2_h protoreflect.FieldDescriptor - fd_TestVersion2_k protoreflect.FieldDescriptor - fd_TestVersion2_new_field protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion2 = File_unknonwnproto_proto.Messages().ByName("TestVersion2") - fd_TestVersion2_x = md_TestVersion2.Fields().ByName("x") - fd_TestVersion2_a = md_TestVersion2.Fields().ByName("a") - fd_TestVersion2_b = md_TestVersion2.Fields().ByName("b") - fd_TestVersion2_c = md_TestVersion2.Fields().ByName("c") - fd_TestVersion2_d = md_TestVersion2.Fields().ByName("d") - fd_TestVersion2_e = md_TestVersion2.Fields().ByName("e") - fd_TestVersion2_f = md_TestVersion2.Fields().ByName("f") - fd_TestVersion2_g = md_TestVersion2.Fields().ByName("g") - fd_TestVersion2_h = md_TestVersion2.Fields().ByName("h") - fd_TestVersion2_k = md_TestVersion2.Fields().ByName("k") - fd_TestVersion2_new_field = md_TestVersion2.Fields().ByName("new_field") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion2)(nil) - -type fastReflection_TestVersion2 TestVersion2 - -func (x *TestVersion2) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion2)(x) -} - -func (x *TestVersion2) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion2_messageType fastReflection_TestVersion2_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion2_messageType{} - -type fastReflection_TestVersion2_messageType struct{} - -func (x fastReflection_TestVersion2_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion2)(nil) -} -func (x fastReflection_TestVersion2_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion2) -} -func (x fastReflection_TestVersion2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion2 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion2) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion2 -} - -// 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_TestVersion2) Type() protoreflect.MessageType { - return _fastReflection_TestVersion2_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion2) New() protoreflect.Message { - return new(fastReflection_TestVersion2) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion2) Interface() protoreflect.ProtoMessage { - return (*TestVersion2)(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_TestVersion2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersion2_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersion2_a, value) { - return - } - } - if x.B != nil { - value := protoreflect.ValueOfMessage(x.B.ProtoReflect()) - if !f(fd_TestVersion2_b, value) { - return - } - } - if len(x.C) != 0 { - value := protoreflect.ValueOfList(&_TestVersion2_4_list{list: &x.C}) - if !f(fd_TestVersion2_c, value) { - return - } - } - if len(x.D) != 0 { - value := protoreflect.ValueOfList(&_TestVersion2_5_list{list: &x.D}) - if !f(fd_TestVersion2_d, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersion2_E: - v := o.E - value := protoreflect.ValueOfInt32(v) - if !f(fd_TestVersion2_e, value) { - return - } - case *TestVersion2_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersion2_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersion2_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersion2_9_list{list: &x.H}) - if !f(fd_TestVersion2_h, value) { - return - } - } - if x.K != nil { - value := protoreflect.ValueOfMessage(x.K.ProtoReflect()) - if !f(fd_TestVersion2_k, value) { - return - } - } - if x.NewField_ != uint64(0) { - value := protoreflect.ValueOfUint64(x.NewField_) - if !f(fd_TestVersion2_new_field, 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_TestVersion2) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion2.x": - return x.X != int64(0) - case "testdata.TestVersion2.a": - return x.A != nil - case "testdata.TestVersion2.b": - return x.B != nil - case "testdata.TestVersion2.c": - return len(x.C) != 0 - case "testdata.TestVersion2.d": - return len(x.D) != 0 - case "testdata.TestVersion2.e": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion2_E); ok { - return true - } else { - return false - } - case "testdata.TestVersion2.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion2_F); ok { - return true - } else { - return false - } - case "testdata.TestVersion2.g": - return x.G != nil - case "testdata.TestVersion2.h": - return len(x.H) != 0 - case "testdata.TestVersion2.k": - return x.K != nil - case "testdata.TestVersion2.new_field": - return x.NewField_ != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion2")) - } - panic(fmt.Errorf("message testdata.TestVersion2 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_TestVersion2) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion2.x": - x.X = int64(0) - case "testdata.TestVersion2.a": - x.A = nil - case "testdata.TestVersion2.b": - x.B = nil - case "testdata.TestVersion2.c": - x.C = nil - case "testdata.TestVersion2.d": - x.D = nil - case "testdata.TestVersion2.e": - x.Sum = nil - case "testdata.TestVersion2.f": - x.Sum = nil - case "testdata.TestVersion2.g": - x.G = nil - case "testdata.TestVersion2.h": - x.H = nil - case "testdata.TestVersion2.k": - x.K = nil - case "testdata.TestVersion2.new_field": - x.NewField_ = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion2")) - } - panic(fmt.Errorf("message testdata.TestVersion2 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_TestVersion2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion2.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion2.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion2.b": - value := x.B - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion2.c": - if len(x.C) == 0 { - return protoreflect.ValueOfList(&_TestVersion2_4_list{}) - } - listValue := &_TestVersion2_4_list{list: &x.C} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion2.d": - if len(x.D) == 0 { - return protoreflect.ValueOfList(&_TestVersion2_5_list{}) - } - listValue := &_TestVersion2_5_list{list: &x.D} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion2.e": - if x.Sum == nil { - return protoreflect.ValueOfInt32(int32(0)) - } else if v, ok := x.Sum.(*TestVersion2_E); ok { - return protoreflect.ValueOfInt32(v.E) - } else { - return protoreflect.ValueOfInt32(int32(0)) - } - case "testdata.TestVersion2.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion2)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersion2_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion2)(nil).ProtoReflect()) - } - case "testdata.TestVersion2.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion2.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersion2_9_list{}) - } - listValue := &_TestVersion2_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion2.k": - value := x.K - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion2.new_field": - value := x.NewField_ - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion2")) - } - panic(fmt.Errorf("message testdata.TestVersion2 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_TestVersion2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion2.x": - x.X = value.Int() - case "testdata.TestVersion2.a": - x.A = value.Message().Interface().(*TestVersion2) - case "testdata.TestVersion2.b": - x.B = value.Message().Interface().(*TestVersion2) - case "testdata.TestVersion2.c": - lv := value.List() - clv := lv.(*_TestVersion2_4_list) - x.C = *clv.list - case "testdata.TestVersion2.d": - lv := value.List() - clv := lv.(*_TestVersion2_5_list) - x.D = *clv.list - case "testdata.TestVersion2.e": - cv := int32(value.Int()) - x.Sum = &TestVersion2_E{E: cv} - case "testdata.TestVersion2.f": - cv := value.Message().Interface().(*TestVersion2) - x.Sum = &TestVersion2_F{F: cv} - case "testdata.TestVersion2.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersion2.h": - lv := value.List() - clv := lv.(*_TestVersion2_9_list) - x.H = *clv.list - case "testdata.TestVersion2.k": - x.K = value.Message().Interface().(*Customer1) - case "testdata.TestVersion2.new_field": - x.NewField_ = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion2")) - } - panic(fmt.Errorf("message testdata.TestVersion2 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_TestVersion2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion2.a": - if x.A == nil { - x.A = new(TestVersion2) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersion2.b": - if x.B == nil { - x.B = new(TestVersion2) - } - return protoreflect.ValueOfMessage(x.B.ProtoReflect()) - case "testdata.TestVersion2.c": - if x.C == nil { - x.C = []*TestVersion2{} - } - value := &_TestVersion2_4_list{list: &x.C} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion2.d": - if x.D == nil { - x.D = []*TestVersion2{} - } - value := &_TestVersion2_5_list{list: &x.D} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion2.f": - if x.Sum == nil { - value := &TestVersion2{} - oneofValue := &TestVersion2_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersion2_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion2{} - oneofValue := &TestVersion2_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersion2.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersion2.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersion2_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion2.k": - if x.K == nil { - x.K = new(Customer1) - } - return protoreflect.ValueOfMessage(x.K.ProtoReflect()) - case "testdata.TestVersion2.x": - panic(fmt.Errorf("field x of message testdata.TestVersion2 is not mutable")) - case "testdata.TestVersion2.e": - panic(fmt.Errorf("field e of message testdata.TestVersion2 is not mutable")) - case "testdata.TestVersion2.new_field": - panic(fmt.Errorf("field new_field of message testdata.TestVersion2 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion2")) - } - panic(fmt.Errorf("message testdata.TestVersion2 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_TestVersion2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion2.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion2.a": - m := new(TestVersion2) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion2.b": - m := new(TestVersion2) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion2.c": - list := []*TestVersion2{} - return protoreflect.ValueOfList(&_TestVersion2_4_list{list: &list}) - case "testdata.TestVersion2.d": - list := []*TestVersion2{} - return protoreflect.ValueOfList(&_TestVersion2_5_list{list: &list}) - case "testdata.TestVersion2.e": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.TestVersion2.f": - value := &TestVersion2{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion2.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion2.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion2_9_list{list: &list}) - case "testdata.TestVersion2.k": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion2.new_field": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion2")) - } - panic(fmt.Errorf("message testdata.TestVersion2 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_TestVersion2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersion2.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersion2_E: - return x.Descriptor().Fields().ByName("e") - case *TestVersion2_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion2", 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_TestVersion2) 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_TestVersion2) 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_TestVersion2) 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_TestVersion2) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion2) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != nil { - l = options.Size(x.B) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.C) > 0 { - for _, e := range x.C { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.D) > 0 { - for _, e := range x.D { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - switch x := x.Sum.(type) { - case *TestVersion2_E: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.E)) - case *TestVersion2_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.K != nil { - l = options.Size(x.K) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.NewField_ != 0 { - n += 2 + runtime.Sov(uint64(x.NewField_)) - } - 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().(*TestVersion2) - 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) - } - switch x := x.Sum.(type) { - case *TestVersion2_E: - i = runtime.EncodeVarint(dAtA, i, uint64(x.E)) - i-- - dAtA[i] = 0x30 - case *TestVersion2_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.NewField_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NewField_)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - } - if x.K != nil { - encoded, err := options.Marshal(x.K) - 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] = 0x62 - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.D) > 0 { - for iNdEx := len(x.D) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.D[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.C) > 0 { - for iNdEx := len(x.C) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.C[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.B != nil { - encoded, err := options.Marshal(x.B) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion2) - 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: TestVersion2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion2{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", 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.B == nil { - x.B = &TestVersion2{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.C = append(x.C, &TestVersion2{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.C[len(x.C)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.D = append(x.D, &TestVersion2{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.D[len(x.D)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &TestVersion2_E{v} - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion2{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersion2_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field K", 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.K == nil { - x.K = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.K); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 25: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewField_", wireType) - } - x.NewField_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.NewField_ |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersion3_4_list)(nil) - -type _TestVersion3_4_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion3_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3_4_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3_4_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion3_5_list)(nil) - -type _TestVersion3_5_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion3_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3_5_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3_5_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion3_9_list)(nil) - -type _TestVersion3_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion3_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersion3 protoreflect.MessageDescriptor - fd_TestVersion3_x protoreflect.FieldDescriptor - fd_TestVersion3_a protoreflect.FieldDescriptor - fd_TestVersion3_b protoreflect.FieldDescriptor - fd_TestVersion3_c protoreflect.FieldDescriptor - fd_TestVersion3_d protoreflect.FieldDescriptor - fd_TestVersion3_e protoreflect.FieldDescriptor - fd_TestVersion3_f protoreflect.FieldDescriptor - fd_TestVersion3_g protoreflect.FieldDescriptor - fd_TestVersion3_h protoreflect.FieldDescriptor - fd_TestVersion3_k protoreflect.FieldDescriptor - fd_TestVersion3_non_critical_field protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3 = File_unknonwnproto_proto.Messages().ByName("TestVersion3") - fd_TestVersion3_x = md_TestVersion3.Fields().ByName("x") - fd_TestVersion3_a = md_TestVersion3.Fields().ByName("a") - fd_TestVersion3_b = md_TestVersion3.Fields().ByName("b") - fd_TestVersion3_c = md_TestVersion3.Fields().ByName("c") - fd_TestVersion3_d = md_TestVersion3.Fields().ByName("d") - fd_TestVersion3_e = md_TestVersion3.Fields().ByName("e") - fd_TestVersion3_f = md_TestVersion3.Fields().ByName("f") - fd_TestVersion3_g = md_TestVersion3.Fields().ByName("g") - fd_TestVersion3_h = md_TestVersion3.Fields().ByName("h") - fd_TestVersion3_k = md_TestVersion3.Fields().ByName("k") - fd_TestVersion3_non_critical_field = md_TestVersion3.Fields().ByName("non_critical_field") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3)(nil) - -type fastReflection_TestVersion3 TestVersion3 - -func (x *TestVersion3) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3)(x) -} - -func (x *TestVersion3) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3_messageType fastReflection_TestVersion3_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3_messageType{} - -type fastReflection_TestVersion3_messageType struct{} - -func (x fastReflection_TestVersion3_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3)(nil) -} -func (x fastReflection_TestVersion3_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3) -} -func (x fastReflection_TestVersion3_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3 -} - -// 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_TestVersion3) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3) New() protoreflect.Message { - return new(fastReflection_TestVersion3) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3) Interface() protoreflect.ProtoMessage { - return (*TestVersion3)(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_TestVersion3) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersion3_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersion3_a, value) { - return - } - } - if x.B != nil { - value := protoreflect.ValueOfMessage(x.B.ProtoReflect()) - if !f(fd_TestVersion3_b, value) { - return - } - } - if len(x.C) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3_4_list{list: &x.C}) - if !f(fd_TestVersion3_c, value) { - return - } - } - if len(x.D) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3_5_list{list: &x.D}) - if !f(fd_TestVersion3_d, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersion3_E: - v := o.E - value := protoreflect.ValueOfInt32(v) - if !f(fd_TestVersion3_e, value) { - return - } - case *TestVersion3_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersion3_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersion3_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3_9_list{list: &x.H}) - if !f(fd_TestVersion3_h, value) { - return - } - } - if x.K != nil { - value := protoreflect.ValueOfMessage(x.K.ProtoReflect()) - if !f(fd_TestVersion3_k, value) { - return - } - } - if x.NonCriticalField != "" { - value := protoreflect.ValueOfString(x.NonCriticalField) - if !f(fd_TestVersion3_non_critical_field, 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_TestVersion3) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3.x": - return x.X != int64(0) - case "testdata.TestVersion3.a": - return x.A != nil - case "testdata.TestVersion3.b": - return x.B != nil - case "testdata.TestVersion3.c": - return len(x.C) != 0 - case "testdata.TestVersion3.d": - return len(x.D) != 0 - case "testdata.TestVersion3.e": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion3_E); ok { - return true - } else { - return false - } - case "testdata.TestVersion3.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion3_F); ok { - return true - } else { - return false - } - case "testdata.TestVersion3.g": - return x.G != nil - case "testdata.TestVersion3.h": - return len(x.H) != 0 - case "testdata.TestVersion3.k": - return x.K != nil - case "testdata.TestVersion3.non_critical_field": - return x.NonCriticalField != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3")) - } - panic(fmt.Errorf("message testdata.TestVersion3 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_TestVersion3) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3.x": - x.X = int64(0) - case "testdata.TestVersion3.a": - x.A = nil - case "testdata.TestVersion3.b": - x.B = nil - case "testdata.TestVersion3.c": - x.C = nil - case "testdata.TestVersion3.d": - x.D = nil - case "testdata.TestVersion3.e": - x.Sum = nil - case "testdata.TestVersion3.f": - x.Sum = nil - case "testdata.TestVersion3.g": - x.G = nil - case "testdata.TestVersion3.h": - x.H = nil - case "testdata.TestVersion3.k": - x.K = nil - case "testdata.TestVersion3.non_critical_field": - x.NonCriticalField = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3")) - } - panic(fmt.Errorf("message testdata.TestVersion3 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_TestVersion3) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion3.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3.b": - value := x.B - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3.c": - if len(x.C) == 0 { - return protoreflect.ValueOfList(&_TestVersion3_4_list{}) - } - listValue := &_TestVersion3_4_list{list: &x.C} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3.d": - if len(x.D) == 0 { - return protoreflect.ValueOfList(&_TestVersion3_5_list{}) - } - listValue := &_TestVersion3_5_list{list: &x.D} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3.e": - if x.Sum == nil { - return protoreflect.ValueOfInt32(int32(0)) - } else if v, ok := x.Sum.(*TestVersion3_E); ok { - return protoreflect.ValueOfInt32(v.E) - } else { - return protoreflect.ValueOfInt32(int32(0)) - } - case "testdata.TestVersion3.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion3)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersion3_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion3)(nil).ProtoReflect()) - } - case "testdata.TestVersion3.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersion3_9_list{}) - } - listValue := &_TestVersion3_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3.k": - value := x.K - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3.non_critical_field": - value := x.NonCriticalField - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3")) - } - panic(fmt.Errorf("message testdata.TestVersion3 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_TestVersion3) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3.x": - x.X = value.Int() - case "testdata.TestVersion3.a": - x.A = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion3.b": - x.B = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion3.c": - lv := value.List() - clv := lv.(*_TestVersion3_4_list) - x.C = *clv.list - case "testdata.TestVersion3.d": - lv := value.List() - clv := lv.(*_TestVersion3_5_list) - x.D = *clv.list - case "testdata.TestVersion3.e": - cv := int32(value.Int()) - x.Sum = &TestVersion3_E{E: cv} - case "testdata.TestVersion3.f": - cv := value.Message().Interface().(*TestVersion3) - x.Sum = &TestVersion3_F{F: cv} - case "testdata.TestVersion3.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersion3.h": - lv := value.List() - clv := lv.(*_TestVersion3_9_list) - x.H = *clv.list - case "testdata.TestVersion3.k": - x.K = value.Message().Interface().(*Customer1) - case "testdata.TestVersion3.non_critical_field": - x.NonCriticalField = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3")) - } - panic(fmt.Errorf("message testdata.TestVersion3 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_TestVersion3) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3.a": - if x.A == nil { - x.A = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersion3.b": - if x.B == nil { - x.B = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.B.ProtoReflect()) - case "testdata.TestVersion3.c": - if x.C == nil { - x.C = []*TestVersion3{} - } - value := &_TestVersion3_4_list{list: &x.C} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3.d": - if x.D == nil { - x.D = []*TestVersion3{} - } - value := &_TestVersion3_5_list{list: &x.D} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3.f": - if x.Sum == nil { - value := &TestVersion3{} - oneofValue := &TestVersion3_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersion3_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion3{} - oneofValue := &TestVersion3_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersion3.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersion3.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersion3_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3.k": - if x.K == nil { - x.K = new(Customer1) - } - return protoreflect.ValueOfMessage(x.K.ProtoReflect()) - case "testdata.TestVersion3.x": - panic(fmt.Errorf("field x of message testdata.TestVersion3 is not mutable")) - case "testdata.TestVersion3.e": - panic(fmt.Errorf("field e of message testdata.TestVersion3 is not mutable")) - case "testdata.TestVersion3.non_critical_field": - panic(fmt.Errorf("field non_critical_field of message testdata.TestVersion3 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3")) - } - panic(fmt.Errorf("message testdata.TestVersion3 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_TestVersion3) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion3.a": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3.b": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3.c": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion3_4_list{list: &list}) - case "testdata.TestVersion3.d": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion3_5_list{list: &list}) - case "testdata.TestVersion3.e": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.TestVersion3.f": - value := &TestVersion3{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion3_9_list{list: &list}) - case "testdata.TestVersion3.k": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3.non_critical_field": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3")) - } - panic(fmt.Errorf("message testdata.TestVersion3 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_TestVersion3) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersion3.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersion3_E: - return x.Descriptor().Fields().ByName("e") - case *TestVersion3_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3", 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_TestVersion3) 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_TestVersion3) 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_TestVersion3) 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_TestVersion3) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != nil { - l = options.Size(x.B) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.C) > 0 { - for _, e := range x.C { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.D) > 0 { - for _, e := range x.D { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - switch x := x.Sum.(type) { - case *TestVersion3_E: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.E)) - case *TestVersion3_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.K != nil { - l = options.Size(x.K) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NonCriticalField) - if l > 0 { - n += 2 + 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().(*TestVersion3) - 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) - } - switch x := x.Sum.(type) { - case *TestVersion3_E: - i = runtime.EncodeVarint(dAtA, i, uint64(x.E)) - i-- - dAtA[i] = 0x30 - case *TestVersion3_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.NonCriticalField) > 0 { - i -= len(x.NonCriticalField) - copy(dAtA[i:], x.NonCriticalField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NonCriticalField))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0xba - } - if x.K != nil { - encoded, err := options.Marshal(x.K) - 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] = 0x62 - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.D) > 0 { - for iNdEx := len(x.D) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.D[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.C) > 0 { - for iNdEx := len(x.C) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.C[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.B != nil { - encoded, err := options.Marshal(x.B) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion3) - 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: TestVersion3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", 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.B == nil { - x.B = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.C = append(x.C, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.C[len(x.C)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.D = append(x.D, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.D[len(x.D)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &TestVersion3_E{v} - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion3{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersion3_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field K", 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.K == nil { - x.K = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.K); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 1031: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonCriticalField", 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.NonCriticalField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersion3LoneOneOfValue_4_list)(nil) - -type _TestVersion3LoneOneOfValue_4_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion3LoneOneOfValue_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3LoneOneOfValue_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3LoneOneOfValue_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3LoneOneOfValue_4_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3LoneOneOfValue_4_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion3LoneOneOfValue_5_list)(nil) - -type _TestVersion3LoneOneOfValue_5_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion3LoneOneOfValue_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3LoneOneOfValue_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3LoneOneOfValue_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3LoneOneOfValue_5_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3LoneOneOfValue_5_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion3LoneOneOfValue_9_list)(nil) - -type _TestVersion3LoneOneOfValue_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion3LoneOneOfValue_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3LoneOneOfValue_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3LoneOneOfValue_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3LoneOneOfValue_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3LoneOneOfValue_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneOneOfValue_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersion3LoneOneOfValue protoreflect.MessageDescriptor - fd_TestVersion3LoneOneOfValue_x protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_a protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_b protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_c protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_d protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_e protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_g protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_h protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_k protoreflect.FieldDescriptor - fd_TestVersion3LoneOneOfValue_non_critical_field protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3LoneOneOfValue = File_unknonwnproto_proto.Messages().ByName("TestVersion3LoneOneOfValue") - fd_TestVersion3LoneOneOfValue_x = md_TestVersion3LoneOneOfValue.Fields().ByName("x") - fd_TestVersion3LoneOneOfValue_a = md_TestVersion3LoneOneOfValue.Fields().ByName("a") - fd_TestVersion3LoneOneOfValue_b = md_TestVersion3LoneOneOfValue.Fields().ByName("b") - fd_TestVersion3LoneOneOfValue_c = md_TestVersion3LoneOneOfValue.Fields().ByName("c") - fd_TestVersion3LoneOneOfValue_d = md_TestVersion3LoneOneOfValue.Fields().ByName("d") - fd_TestVersion3LoneOneOfValue_e = md_TestVersion3LoneOneOfValue.Fields().ByName("e") - fd_TestVersion3LoneOneOfValue_g = md_TestVersion3LoneOneOfValue.Fields().ByName("g") - fd_TestVersion3LoneOneOfValue_h = md_TestVersion3LoneOneOfValue.Fields().ByName("h") - fd_TestVersion3LoneOneOfValue_k = md_TestVersion3LoneOneOfValue.Fields().ByName("k") - fd_TestVersion3LoneOneOfValue_non_critical_field = md_TestVersion3LoneOneOfValue.Fields().ByName("non_critical_field") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3LoneOneOfValue)(nil) - -type fastReflection_TestVersion3LoneOneOfValue TestVersion3LoneOneOfValue - -func (x *TestVersion3LoneOneOfValue) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3LoneOneOfValue)(x) -} - -func (x *TestVersion3LoneOneOfValue) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3LoneOneOfValue_messageType fastReflection_TestVersion3LoneOneOfValue_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3LoneOneOfValue_messageType{} - -type fastReflection_TestVersion3LoneOneOfValue_messageType struct{} - -func (x fastReflection_TestVersion3LoneOneOfValue_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3LoneOneOfValue)(nil) -} -func (x fastReflection_TestVersion3LoneOneOfValue_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneOneOfValue) -} -func (x fastReflection_TestVersion3LoneOneOfValue_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneOneOfValue -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3LoneOneOfValue) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneOneOfValue -} - -// 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_TestVersion3LoneOneOfValue) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3LoneOneOfValue_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3LoneOneOfValue) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneOneOfValue) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3LoneOneOfValue) Interface() protoreflect.ProtoMessage { - return (*TestVersion3LoneOneOfValue)(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_TestVersion3LoneOneOfValue) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersion3LoneOneOfValue_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersion3LoneOneOfValue_a, value) { - return - } - } - if x.B != nil { - value := protoreflect.ValueOfMessage(x.B.ProtoReflect()) - if !f(fd_TestVersion3LoneOneOfValue_b, value) { - return - } - } - if len(x.C) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_4_list{list: &x.C}) - if !f(fd_TestVersion3LoneOneOfValue_c, value) { - return - } - } - if len(x.D) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_5_list{list: &x.D}) - if !f(fd_TestVersion3LoneOneOfValue_d, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersion3LoneOneOfValue_E: - v := o.E - value := protoreflect.ValueOfInt32(v) - if !f(fd_TestVersion3LoneOneOfValue_e, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersion3LoneOneOfValue_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_9_list{list: &x.H}) - if !f(fd_TestVersion3LoneOneOfValue_h, value) { - return - } - } - if x.K != nil { - value := protoreflect.ValueOfMessage(x.K.ProtoReflect()) - if !f(fd_TestVersion3LoneOneOfValue_k, value) { - return - } - } - if x.NonCriticalField != "" { - value := protoreflect.ValueOfString(x.NonCriticalField) - if !f(fd_TestVersion3LoneOneOfValue_non_critical_field, 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_TestVersion3LoneOneOfValue) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3LoneOneOfValue.x": - return x.X != int64(0) - case "testdata.TestVersion3LoneOneOfValue.a": - return x.A != nil - case "testdata.TestVersion3LoneOneOfValue.b": - return x.B != nil - case "testdata.TestVersion3LoneOneOfValue.c": - return len(x.C) != 0 - case "testdata.TestVersion3LoneOneOfValue.d": - return len(x.D) != 0 - case "testdata.TestVersion3LoneOneOfValue.e": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion3LoneOneOfValue_E); ok { - return true - } else { - return false - } - case "testdata.TestVersion3LoneOneOfValue.g": - return x.G != nil - case "testdata.TestVersion3LoneOneOfValue.h": - return len(x.H) != 0 - case "testdata.TestVersion3LoneOneOfValue.k": - return x.K != nil - case "testdata.TestVersion3LoneOneOfValue.non_critical_field": - return x.NonCriticalField != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneOneOfValue")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneOneOfValue 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_TestVersion3LoneOneOfValue) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3LoneOneOfValue.x": - x.X = int64(0) - case "testdata.TestVersion3LoneOneOfValue.a": - x.A = nil - case "testdata.TestVersion3LoneOneOfValue.b": - x.B = nil - case "testdata.TestVersion3LoneOneOfValue.c": - x.C = nil - case "testdata.TestVersion3LoneOneOfValue.d": - x.D = nil - case "testdata.TestVersion3LoneOneOfValue.e": - x.Sum = nil - case "testdata.TestVersion3LoneOneOfValue.g": - x.G = nil - case "testdata.TestVersion3LoneOneOfValue.h": - x.H = nil - case "testdata.TestVersion3LoneOneOfValue.k": - x.K = nil - case "testdata.TestVersion3LoneOneOfValue.non_critical_field": - x.NonCriticalField = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneOneOfValue")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneOneOfValue 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_TestVersion3LoneOneOfValue) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3LoneOneOfValue.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion3LoneOneOfValue.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.b": - value := x.B - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.c": - if len(x.C) == 0 { - return protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_4_list{}) - } - listValue := &_TestVersion3LoneOneOfValue_4_list{list: &x.C} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3LoneOneOfValue.d": - if len(x.D) == 0 { - return protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_5_list{}) - } - listValue := &_TestVersion3LoneOneOfValue_5_list{list: &x.D} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3LoneOneOfValue.e": - if x.Sum == nil { - return protoreflect.ValueOfInt32(int32(0)) - } else if v, ok := x.Sum.(*TestVersion3LoneOneOfValue_E); ok { - return protoreflect.ValueOfInt32(v.E) - } else { - return protoreflect.ValueOfInt32(int32(0)) - } - case "testdata.TestVersion3LoneOneOfValue.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_9_list{}) - } - listValue := &_TestVersion3LoneOneOfValue_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3LoneOneOfValue.k": - value := x.K - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.non_critical_field": - value := x.NonCriticalField - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneOneOfValue")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneOneOfValue 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_TestVersion3LoneOneOfValue) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3LoneOneOfValue.x": - x.X = value.Int() - case "testdata.TestVersion3LoneOneOfValue.a": - x.A = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion3LoneOneOfValue.b": - x.B = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion3LoneOneOfValue.c": - lv := value.List() - clv := lv.(*_TestVersion3LoneOneOfValue_4_list) - x.C = *clv.list - case "testdata.TestVersion3LoneOneOfValue.d": - lv := value.List() - clv := lv.(*_TestVersion3LoneOneOfValue_5_list) - x.D = *clv.list - case "testdata.TestVersion3LoneOneOfValue.e": - cv := int32(value.Int()) - x.Sum = &TestVersion3LoneOneOfValue_E{E: cv} - case "testdata.TestVersion3LoneOneOfValue.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersion3LoneOneOfValue.h": - lv := value.List() - clv := lv.(*_TestVersion3LoneOneOfValue_9_list) - x.H = *clv.list - case "testdata.TestVersion3LoneOneOfValue.k": - x.K = value.Message().Interface().(*Customer1) - case "testdata.TestVersion3LoneOneOfValue.non_critical_field": - x.NonCriticalField = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneOneOfValue")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneOneOfValue 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_TestVersion3LoneOneOfValue) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneOneOfValue.a": - if x.A == nil { - x.A = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.b": - if x.B == nil { - x.B = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.B.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.c": - if x.C == nil { - x.C = []*TestVersion3{} - } - value := &_TestVersion3LoneOneOfValue_4_list{list: &x.C} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3LoneOneOfValue.d": - if x.D == nil { - x.D = []*TestVersion3{} - } - value := &_TestVersion3LoneOneOfValue_5_list{list: &x.D} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3LoneOneOfValue.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersion3LoneOneOfValue_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3LoneOneOfValue.k": - if x.K == nil { - x.K = new(Customer1) - } - return protoreflect.ValueOfMessage(x.K.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.x": - panic(fmt.Errorf("field x of message testdata.TestVersion3LoneOneOfValue is not mutable")) - case "testdata.TestVersion3LoneOneOfValue.e": - panic(fmt.Errorf("field e of message testdata.TestVersion3LoneOneOfValue is not mutable")) - case "testdata.TestVersion3LoneOneOfValue.non_critical_field": - panic(fmt.Errorf("field non_critical_field of message testdata.TestVersion3LoneOneOfValue is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneOneOfValue")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneOneOfValue 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_TestVersion3LoneOneOfValue) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneOneOfValue.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion3LoneOneOfValue.a": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.b": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.c": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_4_list{list: &list}) - case "testdata.TestVersion3LoneOneOfValue.d": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_5_list{list: &list}) - case "testdata.TestVersion3LoneOneOfValue.e": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.TestVersion3LoneOneOfValue.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion3LoneOneOfValue_9_list{list: &list}) - case "testdata.TestVersion3LoneOneOfValue.k": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneOneOfValue.non_critical_field": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneOneOfValue")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneOneOfValue 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_TestVersion3LoneOneOfValue) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersion3LoneOneOfValue.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersion3LoneOneOfValue_E: - return x.Descriptor().Fields().ByName("e") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3LoneOneOfValue", 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_TestVersion3LoneOneOfValue) 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_TestVersion3LoneOneOfValue) 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_TestVersion3LoneOneOfValue) 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_TestVersion3LoneOneOfValue) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3LoneOneOfValue) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != nil { - l = options.Size(x.B) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.C) > 0 { - for _, e := range x.C { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.D) > 0 { - for _, e := range x.D { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - switch x := x.Sum.(type) { - case *TestVersion3LoneOneOfValue_E: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.E)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.K != nil { - l = options.Size(x.K) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NonCriticalField) - if l > 0 { - n += 2 + 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().(*TestVersion3LoneOneOfValue) - 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) - } - switch x := x.Sum.(type) { - case *TestVersion3LoneOneOfValue_E: - i = runtime.EncodeVarint(dAtA, i, uint64(x.E)) - i-- - dAtA[i] = 0x30 - } - if len(x.NonCriticalField) > 0 { - i -= len(x.NonCriticalField) - copy(dAtA[i:], x.NonCriticalField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NonCriticalField))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0xba - } - if x.K != nil { - encoded, err := options.Marshal(x.K) - 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] = 0x62 - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.D) > 0 { - for iNdEx := len(x.D) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.D[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.C) > 0 { - for iNdEx := len(x.C) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.C[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.B != nil { - encoded, err := options.Marshal(x.B) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion3LoneOneOfValue) - 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: TestVersion3LoneOneOfValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3LoneOneOfValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", 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.B == nil { - x.B = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.C = append(x.C, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.C[len(x.C)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.D = append(x.D, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.D[len(x.D)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &TestVersion3LoneOneOfValue_E{v} - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field K", 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.K == nil { - x.K = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.K); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 1031: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonCriticalField", 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.NonCriticalField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersion3LoneNesting_4_list)(nil) - -type _TestVersion3LoneNesting_4_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion3LoneNesting_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3LoneNesting_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3LoneNesting_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3LoneNesting_4_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3LoneNesting_4_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion3LoneNesting_5_list)(nil) - -type _TestVersion3LoneNesting_5_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion3LoneNesting_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3LoneNesting_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3LoneNesting_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3LoneNesting_5_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3LoneNesting_5_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion3LoneNesting_9_list)(nil) - -type _TestVersion3LoneNesting_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion3LoneNesting_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion3LoneNesting_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion3LoneNesting_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion3LoneNesting_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion3LoneNesting_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion3LoneNesting_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersion3LoneNesting protoreflect.MessageDescriptor - fd_TestVersion3LoneNesting_x protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_a protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_b protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_c protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_d protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_f protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_g protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_h protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_k protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_non_critical_field protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_inner1 protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_inner2 protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3LoneNesting = File_unknonwnproto_proto.Messages().ByName("TestVersion3LoneNesting") - fd_TestVersion3LoneNesting_x = md_TestVersion3LoneNesting.Fields().ByName("x") - fd_TestVersion3LoneNesting_a = md_TestVersion3LoneNesting.Fields().ByName("a") - fd_TestVersion3LoneNesting_b = md_TestVersion3LoneNesting.Fields().ByName("b") - fd_TestVersion3LoneNesting_c = md_TestVersion3LoneNesting.Fields().ByName("c") - fd_TestVersion3LoneNesting_d = md_TestVersion3LoneNesting.Fields().ByName("d") - fd_TestVersion3LoneNesting_f = md_TestVersion3LoneNesting.Fields().ByName("f") - fd_TestVersion3LoneNesting_g = md_TestVersion3LoneNesting.Fields().ByName("g") - fd_TestVersion3LoneNesting_h = md_TestVersion3LoneNesting.Fields().ByName("h") - fd_TestVersion3LoneNesting_k = md_TestVersion3LoneNesting.Fields().ByName("k") - fd_TestVersion3LoneNesting_non_critical_field = md_TestVersion3LoneNesting.Fields().ByName("non_critical_field") - fd_TestVersion3LoneNesting_inner1 = md_TestVersion3LoneNesting.Fields().ByName("inner1") - fd_TestVersion3LoneNesting_inner2 = md_TestVersion3LoneNesting.Fields().ByName("inner2") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3LoneNesting)(nil) - -type fastReflection_TestVersion3LoneNesting TestVersion3LoneNesting - -func (x *TestVersion3LoneNesting) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting)(x) -} - -func (x *TestVersion3LoneNesting) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3LoneNesting_messageType fastReflection_TestVersion3LoneNesting_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3LoneNesting_messageType{} - -type fastReflection_TestVersion3LoneNesting_messageType struct{} - -func (x fastReflection_TestVersion3LoneNesting_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting)(nil) -} -func (x fastReflection_TestVersion3LoneNesting_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting) -} -func (x fastReflection_TestVersion3LoneNesting_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3LoneNesting) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting -} - -// 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_TestVersion3LoneNesting) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3LoneNesting_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3LoneNesting) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3LoneNesting) Interface() protoreflect.ProtoMessage { - return (*TestVersion3LoneNesting)(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_TestVersion3LoneNesting) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersion3LoneNesting_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_a, value) { - return - } - } - if x.B != nil { - value := protoreflect.ValueOfMessage(x.B.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_b, value) { - return - } - } - if len(x.C) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3LoneNesting_4_list{list: &x.C}) - if !f(fd_TestVersion3LoneNesting_c, value) { - return - } - } - if len(x.D) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3LoneNesting_5_list{list: &x.D}) - if !f(fd_TestVersion3LoneNesting_d, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersion3LoneNesting_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersion3LoneNesting_9_list{list: &x.H}) - if !f(fd_TestVersion3LoneNesting_h, value) { - return - } - } - if x.K != nil { - value := protoreflect.ValueOfMessage(x.K.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_k, value) { - return - } - } - if x.NonCriticalField != "" { - value := protoreflect.ValueOfString(x.NonCriticalField) - if !f(fd_TestVersion3LoneNesting_non_critical_field, value) { - return - } - } - if x.Inner1 != nil { - value := protoreflect.ValueOfMessage(x.Inner1.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_inner1, value) { - return - } - } - if x.Inner2 != nil { - value := protoreflect.ValueOfMessage(x.Inner2.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_inner2, 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_TestVersion3LoneNesting) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.x": - return x.X != int64(0) - case "testdata.TestVersion3LoneNesting.a": - return x.A != nil - case "testdata.TestVersion3LoneNesting.b": - return x.B != nil - case "testdata.TestVersion3LoneNesting.c": - return len(x.C) != 0 - case "testdata.TestVersion3LoneNesting.d": - return len(x.D) != 0 - case "testdata.TestVersion3LoneNesting.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion3LoneNesting_F); ok { - return true - } else { - return false - } - case "testdata.TestVersion3LoneNesting.g": - return x.G != nil - case "testdata.TestVersion3LoneNesting.h": - return len(x.H) != 0 - case "testdata.TestVersion3LoneNesting.k": - return x.K != nil - case "testdata.TestVersion3LoneNesting.non_critical_field": - return x.NonCriticalField != "" - case "testdata.TestVersion3LoneNesting.inner1": - return x.Inner1 != nil - case "testdata.TestVersion3LoneNesting.inner2": - return x.Inner2 != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting 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_TestVersion3LoneNesting) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.x": - x.X = int64(0) - case "testdata.TestVersion3LoneNesting.a": - x.A = nil - case "testdata.TestVersion3LoneNesting.b": - x.B = nil - case "testdata.TestVersion3LoneNesting.c": - x.C = nil - case "testdata.TestVersion3LoneNesting.d": - x.D = nil - case "testdata.TestVersion3LoneNesting.f": - x.Sum = nil - case "testdata.TestVersion3LoneNesting.g": - x.G = nil - case "testdata.TestVersion3LoneNesting.h": - x.H = nil - case "testdata.TestVersion3LoneNesting.k": - x.K = nil - case "testdata.TestVersion3LoneNesting.non_critical_field": - x.NonCriticalField = "" - case "testdata.TestVersion3LoneNesting.inner1": - x.Inner1 = nil - case "testdata.TestVersion3LoneNesting.inner2": - x.Inner2 = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting 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_TestVersion3LoneNesting) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3LoneNesting.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion3LoneNesting.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.b": - value := x.B - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.c": - if len(x.C) == 0 { - return protoreflect.ValueOfList(&_TestVersion3LoneNesting_4_list{}) - } - listValue := &_TestVersion3LoneNesting_4_list{list: &x.C} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3LoneNesting.d": - if len(x.D) == 0 { - return protoreflect.ValueOfList(&_TestVersion3LoneNesting_5_list{}) - } - listValue := &_TestVersion3LoneNesting_5_list{list: &x.D} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3LoneNesting.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion3LoneNesting)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersion3LoneNesting_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion3LoneNesting)(nil).ProtoReflect()) - } - case "testdata.TestVersion3LoneNesting.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersion3LoneNesting_9_list{}) - } - listValue := &_TestVersion3LoneNesting_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion3LoneNesting.k": - value := x.K - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.non_critical_field": - value := x.NonCriticalField - return protoreflect.ValueOfString(value) - case "testdata.TestVersion3LoneNesting.inner1": - value := x.Inner1 - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.inner2": - value := x.Inner2 - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting 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_TestVersion3LoneNesting) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.x": - x.X = value.Int() - case "testdata.TestVersion3LoneNesting.a": - x.A = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion3LoneNesting.b": - x.B = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion3LoneNesting.c": - lv := value.List() - clv := lv.(*_TestVersion3LoneNesting_4_list) - x.C = *clv.list - case "testdata.TestVersion3LoneNesting.d": - lv := value.List() - clv := lv.(*_TestVersion3LoneNesting_5_list) - x.D = *clv.list - case "testdata.TestVersion3LoneNesting.f": - cv := value.Message().Interface().(*TestVersion3LoneNesting) - x.Sum = &TestVersion3LoneNesting_F{F: cv} - case "testdata.TestVersion3LoneNesting.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersion3LoneNesting.h": - lv := value.List() - clv := lv.(*_TestVersion3LoneNesting_9_list) - x.H = *clv.list - case "testdata.TestVersion3LoneNesting.k": - x.K = value.Message().Interface().(*Customer1) - case "testdata.TestVersion3LoneNesting.non_critical_field": - x.NonCriticalField = value.Interface().(string) - case "testdata.TestVersion3LoneNesting.inner1": - x.Inner1 = value.Message().Interface().(*TestVersion3LoneNesting_Inner1) - case "testdata.TestVersion3LoneNesting.inner2": - x.Inner2 = value.Message().Interface().(*TestVersion3LoneNesting_Inner2) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting 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_TestVersion3LoneNesting) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.a": - if x.A == nil { - x.A = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.b": - if x.B == nil { - x.B = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.B.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.c": - if x.C == nil { - x.C = []*TestVersion3{} - } - value := &_TestVersion3LoneNesting_4_list{list: &x.C} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3LoneNesting.d": - if x.D == nil { - x.D = []*TestVersion3{} - } - value := &_TestVersion3LoneNesting_5_list{list: &x.D} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3LoneNesting.f": - if x.Sum == nil { - value := &TestVersion3LoneNesting{} - oneofValue := &TestVersion3LoneNesting_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersion3LoneNesting_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion3LoneNesting{} - oneofValue := &TestVersion3LoneNesting_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersion3LoneNesting.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersion3LoneNesting_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion3LoneNesting.k": - if x.K == nil { - x.K = new(Customer1) - } - return protoreflect.ValueOfMessage(x.K.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.inner1": - if x.Inner1 == nil { - x.Inner1 = new(TestVersion3LoneNesting_Inner1) - } - return protoreflect.ValueOfMessage(x.Inner1.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.inner2": - if x.Inner2 == nil { - x.Inner2 = new(TestVersion3LoneNesting_Inner2) - } - return protoreflect.ValueOfMessage(x.Inner2.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.x": - panic(fmt.Errorf("field x of message testdata.TestVersion3LoneNesting is not mutable")) - case "testdata.TestVersion3LoneNesting.non_critical_field": - panic(fmt.Errorf("field non_critical_field of message testdata.TestVersion3LoneNesting is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting 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_TestVersion3LoneNesting) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion3LoneNesting.a": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.b": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.c": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion3LoneNesting_4_list{list: &list}) - case "testdata.TestVersion3LoneNesting.d": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion3LoneNesting_5_list{list: &list}) - case "testdata.TestVersion3LoneNesting.f": - value := &TestVersion3LoneNesting{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion3LoneNesting_9_list{list: &list}) - case "testdata.TestVersion3LoneNesting.k": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.non_critical_field": - return protoreflect.ValueOfString("") - case "testdata.TestVersion3LoneNesting.inner1": - m := new(TestVersion3LoneNesting_Inner1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.inner2": - m := new(TestVersion3LoneNesting_Inner2) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting 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_TestVersion3LoneNesting) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersion3LoneNesting.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersion3LoneNesting_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3LoneNesting", 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_TestVersion3LoneNesting) 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_TestVersion3LoneNesting) 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_TestVersion3LoneNesting) 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_TestVersion3LoneNesting) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3LoneNesting) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != nil { - l = options.Size(x.B) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.C) > 0 { - for _, e := range x.C { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.D) > 0 { - for _, e := range x.D { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - switch x := x.Sum.(type) { - case *TestVersion3LoneNesting_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.K != nil { - l = options.Size(x.K) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NonCriticalField) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.Inner1 != nil { - l = options.Size(x.Inner1) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Inner2 != nil { - l = options.Size(x.Inner2) - 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().(*TestVersion3LoneNesting) - 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) - } - switch x := x.Sum.(type) { - case *TestVersion3LoneNesting_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.NonCriticalField) > 0 { - i -= len(x.NonCriticalField) - copy(dAtA[i:], x.NonCriticalField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NonCriticalField))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0xba - } - if x.Inner2 != nil { - encoded, err := options.Marshal(x.Inner2) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x7a - } - if x.Inner1 != nil { - encoded, err := options.Marshal(x.Inner1) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x72 - } - if x.K != nil { - encoded, err := options.Marshal(x.K) - 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] = 0x62 - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.D) > 0 { - for iNdEx := len(x.D) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.D[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.C) > 0 { - for iNdEx := len(x.C) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.C[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.B != nil { - encoded, err := options.Marshal(x.B) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion3LoneNesting) - 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: TestVersion3LoneNesting: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3LoneNesting: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", 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.B == nil { - x.B = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.C = append(x.C, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.C[len(x.C)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.D = append(x.D, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.D[len(x.D)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion3LoneNesting{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersion3LoneNesting_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field K", 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.K == nil { - x.K = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.K); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 1031: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonCriticalField", 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.NonCriticalField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner1", 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.Inner1 == nil { - x.Inner1 = &TestVersion3LoneNesting_Inner1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner1); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner2", 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.Inner2 == nil { - x.Inner2 = &TestVersion3LoneNesting_Inner2{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner2); 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_TestVersion3LoneNesting_Inner1 protoreflect.MessageDescriptor - fd_TestVersion3LoneNesting_Inner1_id protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_Inner1_name protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_Inner1_inner protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3LoneNesting_Inner1 = File_unknonwnproto_proto.Messages().ByName("TestVersion3LoneNesting").Messages().ByName("Inner1") - fd_TestVersion3LoneNesting_Inner1_id = md_TestVersion3LoneNesting_Inner1.Fields().ByName("id") - fd_TestVersion3LoneNesting_Inner1_name = md_TestVersion3LoneNesting_Inner1.Fields().ByName("name") - fd_TestVersion3LoneNesting_Inner1_inner = md_TestVersion3LoneNesting_Inner1.Fields().ByName("inner") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3LoneNesting_Inner1)(nil) - -type fastReflection_TestVersion3LoneNesting_Inner1 TestVersion3LoneNesting_Inner1 - -func (x *TestVersion3LoneNesting_Inner1) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner1)(x) -} - -func (x *TestVersion3LoneNesting_Inner1) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3LoneNesting_Inner1_messageType fastReflection_TestVersion3LoneNesting_Inner1_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3LoneNesting_Inner1_messageType{} - -type fastReflection_TestVersion3LoneNesting_Inner1_messageType struct{} - -func (x fastReflection_TestVersion3LoneNesting_Inner1_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner1)(nil) -} -func (x fastReflection_TestVersion3LoneNesting_Inner1_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner1) -} -func (x fastReflection_TestVersion3LoneNesting_Inner1_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner1 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3LoneNesting_Inner1) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner1 -} - -// 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_TestVersion3LoneNesting_Inner1) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3LoneNesting_Inner1_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3LoneNesting_Inner1) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner1) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3LoneNesting_Inner1) Interface() protoreflect.ProtoMessage { - return (*TestVersion3LoneNesting_Inner1)(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_TestVersion3LoneNesting_Inner1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int64(0) { - value := protoreflect.ValueOfInt64(x.Id) - if !f(fd_TestVersion3LoneNesting_Inner1_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_TestVersion3LoneNesting_Inner1_name, value) { - return - } - } - if x.Inner != nil { - value := protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_Inner1_inner, 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_TestVersion3LoneNesting_Inner1) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.id": - return x.Id != int64(0) - case "testdata.TestVersion3LoneNesting.Inner1.name": - return x.Name != "" - case "testdata.TestVersion3LoneNesting.Inner1.inner": - return x.Inner != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1 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_TestVersion3LoneNesting_Inner1) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.id": - x.Id = int64(0) - case "testdata.TestVersion3LoneNesting.Inner1.name": - x.Name = "" - case "testdata.TestVersion3LoneNesting.Inner1.inner": - x.Inner = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1 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_TestVersion3LoneNesting_Inner1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.id": - value := x.Id - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion3LoneNesting.Inner1.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.TestVersion3LoneNesting.Inner1.inner": - value := x.Inner - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1 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_TestVersion3LoneNesting_Inner1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.id": - x.Id = value.Int() - case "testdata.TestVersion3LoneNesting.Inner1.name": - x.Name = value.Interface().(string) - case "testdata.TestVersion3LoneNesting.Inner1.inner": - x.Inner = value.Message().Interface().(*TestVersion3LoneNesting_Inner1_InnerInner) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1 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_TestVersion3LoneNesting_Inner1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.inner": - if x.Inner == nil { - x.Inner = new(TestVersion3LoneNesting_Inner1_InnerInner) - } - return protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.Inner1.id": - panic(fmt.Errorf("field id of message testdata.TestVersion3LoneNesting.Inner1 is not mutable")) - case "testdata.TestVersion3LoneNesting.Inner1.name": - panic(fmt.Errorf("field name of message testdata.TestVersion3LoneNesting.Inner1 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1 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_TestVersion3LoneNesting_Inner1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.id": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion3LoneNesting.Inner1.name": - return protoreflect.ValueOfString("") - case "testdata.TestVersion3LoneNesting.Inner1.inner": - m := new(TestVersion3LoneNesting_Inner1_InnerInner) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1 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_TestVersion3LoneNesting_Inner1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3LoneNesting.Inner1", 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_TestVersion3LoneNesting_Inner1) 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_TestVersion3LoneNesting_Inner1) 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_TestVersion3LoneNesting_Inner1) 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_TestVersion3LoneNesting_Inner1) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner1) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Inner != nil { - l = options.Size(x.Inner) - 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().(*TestVersion3LoneNesting_Inner1) - 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.Inner != nil { - encoded, err := options.Marshal(x.Inner) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner1) - 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: TestVersion3LoneNesting_Inner1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3LoneNesting_Inner1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner", 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.Inner == nil { - x.Inner = &TestVersion3LoneNesting_Inner1_InnerInner{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner); 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_TestVersion3LoneNesting_Inner1_InnerInner protoreflect.MessageDescriptor - fd_TestVersion3LoneNesting_Inner1_InnerInner_id protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_Inner1_InnerInner_city protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3LoneNesting_Inner1_InnerInner = File_unknonwnproto_proto.Messages().ByName("TestVersion3LoneNesting").Messages().ByName("Inner1").Messages().ByName("InnerInner") - fd_TestVersion3LoneNesting_Inner1_InnerInner_id = md_TestVersion3LoneNesting_Inner1_InnerInner.Fields().ByName("id") - fd_TestVersion3LoneNesting_Inner1_InnerInner_city = md_TestVersion3LoneNesting_Inner1_InnerInner.Fields().ByName("city") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3LoneNesting_Inner1_InnerInner)(nil) - -type fastReflection_TestVersion3LoneNesting_Inner1_InnerInner TestVersion3LoneNesting_Inner1_InnerInner - -func (x *TestVersion3LoneNesting_Inner1_InnerInner) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner1_InnerInner)(x) -} - -func (x *TestVersion3LoneNesting_Inner1_InnerInner) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType{} - -type fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType struct{} - -func (x fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner1_InnerInner)(nil) -} -func (x fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner1_InnerInner) -} -func (x fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner1_InnerInner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3LoneNesting_Inner1_InnerInner) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner1_InnerInner -} - -// 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_TestVersion3LoneNesting_Inner1_InnerInner) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3LoneNesting_Inner1_InnerInner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3LoneNesting_Inner1_InnerInner) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner1_InnerInner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3LoneNesting_Inner1_InnerInner) Interface() protoreflect.ProtoMessage { - return (*TestVersion3LoneNesting_Inner1_InnerInner)(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_TestVersion3LoneNesting_Inner1_InnerInner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_TestVersion3LoneNesting_Inner1_InnerInner_id, value) { - return - } - } - if x.City != "" { - value := protoreflect.ValueOfString(x.City) - if !f(fd_TestVersion3LoneNesting_Inner1_InnerInner_city, 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_TestVersion3LoneNesting_Inner1_InnerInner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.id": - return x.Id != "" - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.city": - return x.City != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1.InnerInner 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_TestVersion3LoneNesting_Inner1_InnerInner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.id": - x.Id = "" - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.city": - x.City = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1.InnerInner 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_TestVersion3LoneNesting_Inner1_InnerInner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.city": - value := x.City - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1.InnerInner 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_TestVersion3LoneNesting_Inner1_InnerInner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.id": - x.Id = value.Interface().(string) - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.city": - x.City = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1.InnerInner 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_TestVersion3LoneNesting_Inner1_InnerInner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.id": - panic(fmt.Errorf("field id of message testdata.TestVersion3LoneNesting.Inner1.InnerInner is not mutable")) - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.city": - panic(fmt.Errorf("field city of message testdata.TestVersion3LoneNesting.Inner1.InnerInner is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1.InnerInner 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_TestVersion3LoneNesting_Inner1_InnerInner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.id": - return protoreflect.ValueOfString("") - case "testdata.TestVersion3LoneNesting.Inner1.InnerInner.city": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner1.InnerInner 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_TestVersion3LoneNesting_Inner1_InnerInner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3LoneNesting.Inner1.InnerInner", 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_TestVersion3LoneNesting_Inner1_InnerInner) 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_TestVersion3LoneNesting_Inner1_InnerInner) 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_TestVersion3LoneNesting_Inner1_InnerInner) 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_TestVersion3LoneNesting_Inner1_InnerInner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner1_InnerInner) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.City) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner1_InnerInner) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.City) > 0 { - i -= len(x.City) - copy(dAtA[i:], x.City) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.City))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*TestVersion3LoneNesting_Inner1_InnerInner) - 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: TestVersion3LoneNesting_Inner1_InnerInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3LoneNesting_Inner1_InnerInner: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field City", 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.City = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TestVersion3LoneNesting_Inner2 protoreflect.MessageDescriptor - fd_TestVersion3LoneNesting_Inner2_id protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_Inner2_country protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_Inner2_inner protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3LoneNesting_Inner2 = File_unknonwnproto_proto.Messages().ByName("TestVersion3LoneNesting").Messages().ByName("Inner2") - fd_TestVersion3LoneNesting_Inner2_id = md_TestVersion3LoneNesting_Inner2.Fields().ByName("id") - fd_TestVersion3LoneNesting_Inner2_country = md_TestVersion3LoneNesting_Inner2.Fields().ByName("country") - fd_TestVersion3LoneNesting_Inner2_inner = md_TestVersion3LoneNesting_Inner2.Fields().ByName("inner") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3LoneNesting_Inner2)(nil) - -type fastReflection_TestVersion3LoneNesting_Inner2 TestVersion3LoneNesting_Inner2 - -func (x *TestVersion3LoneNesting_Inner2) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner2)(x) -} - -func (x *TestVersion3LoneNesting_Inner2) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3LoneNesting_Inner2_messageType fastReflection_TestVersion3LoneNesting_Inner2_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3LoneNesting_Inner2_messageType{} - -type fastReflection_TestVersion3LoneNesting_Inner2_messageType struct{} - -func (x fastReflection_TestVersion3LoneNesting_Inner2_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner2)(nil) -} -func (x fastReflection_TestVersion3LoneNesting_Inner2_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner2) -} -func (x fastReflection_TestVersion3LoneNesting_Inner2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner2 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3LoneNesting_Inner2) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner2 -} - -// 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_TestVersion3LoneNesting_Inner2) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3LoneNesting_Inner2_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3LoneNesting_Inner2) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner2) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3LoneNesting_Inner2) Interface() protoreflect.ProtoMessage { - return (*TestVersion3LoneNesting_Inner2)(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_TestVersion3LoneNesting_Inner2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_TestVersion3LoneNesting_Inner2_id, value) { - return - } - } - if x.Country != "" { - value := protoreflect.ValueOfString(x.Country) - if !f(fd_TestVersion3LoneNesting_Inner2_country, value) { - return - } - } - if x.Inner != nil { - value := protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - if !f(fd_TestVersion3LoneNesting_Inner2_inner, 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_TestVersion3LoneNesting_Inner2) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.id": - return x.Id != "" - case "testdata.TestVersion3LoneNesting.Inner2.country": - return x.Country != "" - case "testdata.TestVersion3LoneNesting.Inner2.inner": - return x.Inner != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2 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_TestVersion3LoneNesting_Inner2) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.id": - x.Id = "" - case "testdata.TestVersion3LoneNesting.Inner2.country": - x.Country = "" - case "testdata.TestVersion3LoneNesting.Inner2.inner": - x.Inner = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2 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_TestVersion3LoneNesting_Inner2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "testdata.TestVersion3LoneNesting.Inner2.country": - value := x.Country - return protoreflect.ValueOfString(value) - case "testdata.TestVersion3LoneNesting.Inner2.inner": - value := x.Inner - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2 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_TestVersion3LoneNesting_Inner2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.id": - x.Id = value.Interface().(string) - case "testdata.TestVersion3LoneNesting.Inner2.country": - x.Country = value.Interface().(string) - case "testdata.TestVersion3LoneNesting.Inner2.inner": - x.Inner = value.Message().Interface().(*TestVersion3LoneNesting_Inner2_InnerInner) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2 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_TestVersion3LoneNesting_Inner2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.inner": - if x.Inner == nil { - x.Inner = new(TestVersion3LoneNesting_Inner2_InnerInner) - } - return protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - case "testdata.TestVersion3LoneNesting.Inner2.id": - panic(fmt.Errorf("field id of message testdata.TestVersion3LoneNesting.Inner2 is not mutable")) - case "testdata.TestVersion3LoneNesting.Inner2.country": - panic(fmt.Errorf("field country of message testdata.TestVersion3LoneNesting.Inner2 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2 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_TestVersion3LoneNesting_Inner2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.id": - return protoreflect.ValueOfString("") - case "testdata.TestVersion3LoneNesting.Inner2.country": - return protoreflect.ValueOfString("") - case "testdata.TestVersion3LoneNesting.Inner2.inner": - m := new(TestVersion3LoneNesting_Inner2_InnerInner) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2 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_TestVersion3LoneNesting_Inner2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3LoneNesting.Inner2", 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_TestVersion3LoneNesting_Inner2) 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_TestVersion3LoneNesting_Inner2) 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_TestVersion3LoneNesting_Inner2) 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_TestVersion3LoneNesting_Inner2) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner2) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Country) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Inner != nil { - l = options.Size(x.Inner) - 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().(*TestVersion3LoneNesting_Inner2) - 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.Inner != nil { - encoded, err := options.Marshal(x.Inner) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Country) > 0 { - i -= len(x.Country) - copy(dAtA[i:], x.Country) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Country))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*TestVersion3LoneNesting_Inner2) - 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: TestVersion3LoneNesting_Inner2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3LoneNesting_Inner2: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Country", 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.Country = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner", 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.Inner == nil { - x.Inner = &TestVersion3LoneNesting_Inner2_InnerInner{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner); 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_TestVersion3LoneNesting_Inner2_InnerInner protoreflect.MessageDescriptor - fd_TestVersion3LoneNesting_Inner2_InnerInner_id protoreflect.FieldDescriptor - fd_TestVersion3LoneNesting_Inner2_InnerInner_city protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion3LoneNesting_Inner2_InnerInner = File_unknonwnproto_proto.Messages().ByName("TestVersion3LoneNesting").Messages().ByName("Inner2").Messages().ByName("InnerInner") - fd_TestVersion3LoneNesting_Inner2_InnerInner_id = md_TestVersion3LoneNesting_Inner2_InnerInner.Fields().ByName("id") - fd_TestVersion3LoneNesting_Inner2_InnerInner_city = md_TestVersion3LoneNesting_Inner2_InnerInner.Fields().ByName("city") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion3LoneNesting_Inner2_InnerInner)(nil) - -type fastReflection_TestVersion3LoneNesting_Inner2_InnerInner TestVersion3LoneNesting_Inner2_InnerInner - -func (x *TestVersion3LoneNesting_Inner2_InnerInner) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner2_InnerInner)(x) -} - -func (x *TestVersion3LoneNesting_Inner2_InnerInner) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType{} - -type fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType struct{} - -func (x fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion3LoneNesting_Inner2_InnerInner)(nil) -} -func (x fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner2_InnerInner) -} -func (x fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner2_InnerInner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion3LoneNesting_Inner2_InnerInner) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion3LoneNesting_Inner2_InnerInner -} - -// 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_TestVersion3LoneNesting_Inner2_InnerInner) Type() protoreflect.MessageType { - return _fastReflection_TestVersion3LoneNesting_Inner2_InnerInner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion3LoneNesting_Inner2_InnerInner) New() protoreflect.Message { - return new(fastReflection_TestVersion3LoneNesting_Inner2_InnerInner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion3LoneNesting_Inner2_InnerInner) Interface() protoreflect.ProtoMessage { - return (*TestVersion3LoneNesting_Inner2_InnerInner)(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_TestVersion3LoneNesting_Inner2_InnerInner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_TestVersion3LoneNesting_Inner2_InnerInner_id, value) { - return - } - } - if x.City != "" { - value := protoreflect.ValueOfString(x.City) - if !f(fd_TestVersion3LoneNesting_Inner2_InnerInner_city, 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_TestVersion3LoneNesting_Inner2_InnerInner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.id": - return x.Id != "" - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.city": - return x.City != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2.InnerInner 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_TestVersion3LoneNesting_Inner2_InnerInner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.id": - x.Id = "" - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.city": - x.City = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2.InnerInner 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_TestVersion3LoneNesting_Inner2_InnerInner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.city": - value := x.City - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2.InnerInner 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_TestVersion3LoneNesting_Inner2_InnerInner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.id": - x.Id = value.Interface().(string) - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.city": - x.City = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2.InnerInner 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_TestVersion3LoneNesting_Inner2_InnerInner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.id": - panic(fmt.Errorf("field id of message testdata.TestVersion3LoneNesting.Inner2.InnerInner is not mutable")) - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.city": - panic(fmt.Errorf("field city of message testdata.TestVersion3LoneNesting.Inner2.InnerInner is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2.InnerInner 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_TestVersion3LoneNesting_Inner2_InnerInner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.id": - return protoreflect.ValueOfString("") - case "testdata.TestVersion3LoneNesting.Inner2.InnerInner.city": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion3LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion3LoneNesting.Inner2.InnerInner 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_TestVersion3LoneNesting_Inner2_InnerInner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion3LoneNesting.Inner2.InnerInner", 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_TestVersion3LoneNesting_Inner2_InnerInner) 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_TestVersion3LoneNesting_Inner2_InnerInner) 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_TestVersion3LoneNesting_Inner2_InnerInner) 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_TestVersion3LoneNesting_Inner2_InnerInner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner2_InnerInner) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.City) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestVersion3LoneNesting_Inner2_InnerInner) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.City) > 0 { - i -= len(x.City) - copy(dAtA[i:], x.City) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.City))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*TestVersion3LoneNesting_Inner2_InnerInner) - 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: TestVersion3LoneNesting_Inner2_InnerInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion3LoneNesting_Inner2_InnerInner: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field City", 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.City = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersion4LoneNesting_4_list)(nil) - -type _TestVersion4LoneNesting_4_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion4LoneNesting_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion4LoneNesting_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion4LoneNesting_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion4LoneNesting_4_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion4LoneNesting_4_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion4LoneNesting_5_list)(nil) - -type _TestVersion4LoneNesting_5_list struct { - list *[]*TestVersion3 -} - -func (x *_TestVersion4LoneNesting_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion4LoneNesting_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion4LoneNesting_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion3) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion4LoneNesting_5_list) AppendMutable() protoreflect.Value { - v := new(TestVersion3) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion4LoneNesting_5_list) NewElement() protoreflect.Value { - v := new(TestVersion3) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestVersion4LoneNesting_9_list)(nil) - -type _TestVersion4LoneNesting_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersion4LoneNesting_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersion4LoneNesting_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersion4LoneNesting_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersion4LoneNesting_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersion4LoneNesting_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersion4LoneNesting_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersion4LoneNesting protoreflect.MessageDescriptor - fd_TestVersion4LoneNesting_x protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_a protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_b protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_c protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_d protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_f protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_g protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_h protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_k protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_non_critical_field protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_inner1 protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_inner2 protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion4LoneNesting = File_unknonwnproto_proto.Messages().ByName("TestVersion4LoneNesting") - fd_TestVersion4LoneNesting_x = md_TestVersion4LoneNesting.Fields().ByName("x") - fd_TestVersion4LoneNesting_a = md_TestVersion4LoneNesting.Fields().ByName("a") - fd_TestVersion4LoneNesting_b = md_TestVersion4LoneNesting.Fields().ByName("b") - fd_TestVersion4LoneNesting_c = md_TestVersion4LoneNesting.Fields().ByName("c") - fd_TestVersion4LoneNesting_d = md_TestVersion4LoneNesting.Fields().ByName("d") - fd_TestVersion4LoneNesting_f = md_TestVersion4LoneNesting.Fields().ByName("f") - fd_TestVersion4LoneNesting_g = md_TestVersion4LoneNesting.Fields().ByName("g") - fd_TestVersion4LoneNesting_h = md_TestVersion4LoneNesting.Fields().ByName("h") - fd_TestVersion4LoneNesting_k = md_TestVersion4LoneNesting.Fields().ByName("k") - fd_TestVersion4LoneNesting_non_critical_field = md_TestVersion4LoneNesting.Fields().ByName("non_critical_field") - fd_TestVersion4LoneNesting_inner1 = md_TestVersion4LoneNesting.Fields().ByName("inner1") - fd_TestVersion4LoneNesting_inner2 = md_TestVersion4LoneNesting.Fields().ByName("inner2") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion4LoneNesting)(nil) - -type fastReflection_TestVersion4LoneNesting TestVersion4LoneNesting - -func (x *TestVersion4LoneNesting) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting)(x) -} - -func (x *TestVersion4LoneNesting) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion4LoneNesting_messageType fastReflection_TestVersion4LoneNesting_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion4LoneNesting_messageType{} - -type fastReflection_TestVersion4LoneNesting_messageType struct{} - -func (x fastReflection_TestVersion4LoneNesting_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting)(nil) -} -func (x fastReflection_TestVersion4LoneNesting_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting) -} -func (x fastReflection_TestVersion4LoneNesting_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion4LoneNesting) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting -} - -// 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_TestVersion4LoneNesting) Type() protoreflect.MessageType { - return _fastReflection_TestVersion4LoneNesting_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion4LoneNesting) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion4LoneNesting) Interface() protoreflect.ProtoMessage { - return (*TestVersion4LoneNesting)(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_TestVersion4LoneNesting) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersion4LoneNesting_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_a, value) { - return - } - } - if x.B != nil { - value := protoreflect.ValueOfMessage(x.B.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_b, value) { - return - } - } - if len(x.C) != 0 { - value := protoreflect.ValueOfList(&_TestVersion4LoneNesting_4_list{list: &x.C}) - if !f(fd_TestVersion4LoneNesting_c, value) { - return - } - } - if len(x.D) != 0 { - value := protoreflect.ValueOfList(&_TestVersion4LoneNesting_5_list{list: &x.D}) - if !f(fd_TestVersion4LoneNesting_d, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersion4LoneNesting_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersion4LoneNesting_9_list{list: &x.H}) - if !f(fd_TestVersion4LoneNesting_h, value) { - return - } - } - if x.K != nil { - value := protoreflect.ValueOfMessage(x.K.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_k, value) { - return - } - } - if x.NonCriticalField != "" { - value := protoreflect.ValueOfString(x.NonCriticalField) - if !f(fd_TestVersion4LoneNesting_non_critical_field, value) { - return - } - } - if x.Inner1 != nil { - value := protoreflect.ValueOfMessage(x.Inner1.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_inner1, value) { - return - } - } - if x.Inner2 != nil { - value := protoreflect.ValueOfMessage(x.Inner2.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_inner2, 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_TestVersion4LoneNesting) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.x": - return x.X != int64(0) - case "testdata.TestVersion4LoneNesting.a": - return x.A != nil - case "testdata.TestVersion4LoneNesting.b": - return x.B != nil - case "testdata.TestVersion4LoneNesting.c": - return len(x.C) != 0 - case "testdata.TestVersion4LoneNesting.d": - return len(x.D) != 0 - case "testdata.TestVersion4LoneNesting.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersion4LoneNesting_F); ok { - return true - } else { - return false - } - case "testdata.TestVersion4LoneNesting.g": - return x.G != nil - case "testdata.TestVersion4LoneNesting.h": - return len(x.H) != 0 - case "testdata.TestVersion4LoneNesting.k": - return x.K != nil - case "testdata.TestVersion4LoneNesting.non_critical_field": - return x.NonCriticalField != "" - case "testdata.TestVersion4LoneNesting.inner1": - return x.Inner1 != nil - case "testdata.TestVersion4LoneNesting.inner2": - return x.Inner2 != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting 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_TestVersion4LoneNesting) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.x": - x.X = int64(0) - case "testdata.TestVersion4LoneNesting.a": - x.A = nil - case "testdata.TestVersion4LoneNesting.b": - x.B = nil - case "testdata.TestVersion4LoneNesting.c": - x.C = nil - case "testdata.TestVersion4LoneNesting.d": - x.D = nil - case "testdata.TestVersion4LoneNesting.f": - x.Sum = nil - case "testdata.TestVersion4LoneNesting.g": - x.G = nil - case "testdata.TestVersion4LoneNesting.h": - x.H = nil - case "testdata.TestVersion4LoneNesting.k": - x.K = nil - case "testdata.TestVersion4LoneNesting.non_critical_field": - x.NonCriticalField = "" - case "testdata.TestVersion4LoneNesting.inner1": - x.Inner1 = nil - case "testdata.TestVersion4LoneNesting.inner2": - x.Inner2 = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting 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_TestVersion4LoneNesting) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion4LoneNesting.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion4LoneNesting.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.b": - value := x.B - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.c": - if len(x.C) == 0 { - return protoreflect.ValueOfList(&_TestVersion4LoneNesting_4_list{}) - } - listValue := &_TestVersion4LoneNesting_4_list{list: &x.C} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion4LoneNesting.d": - if len(x.D) == 0 { - return protoreflect.ValueOfList(&_TestVersion4LoneNesting_5_list{}) - } - listValue := &_TestVersion4LoneNesting_5_list{list: &x.D} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion4LoneNesting.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion3LoneNesting)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersion4LoneNesting_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion3LoneNesting)(nil).ProtoReflect()) - } - case "testdata.TestVersion4LoneNesting.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersion4LoneNesting_9_list{}) - } - listValue := &_TestVersion4LoneNesting_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - case "testdata.TestVersion4LoneNesting.k": - value := x.K - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.non_critical_field": - value := x.NonCriticalField - return protoreflect.ValueOfString(value) - case "testdata.TestVersion4LoneNesting.inner1": - value := x.Inner1 - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.inner2": - value := x.Inner2 - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting 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_TestVersion4LoneNesting) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.x": - x.X = value.Int() - case "testdata.TestVersion4LoneNesting.a": - x.A = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion4LoneNesting.b": - x.B = value.Message().Interface().(*TestVersion3) - case "testdata.TestVersion4LoneNesting.c": - lv := value.List() - clv := lv.(*_TestVersion4LoneNesting_4_list) - x.C = *clv.list - case "testdata.TestVersion4LoneNesting.d": - lv := value.List() - clv := lv.(*_TestVersion4LoneNesting_5_list) - x.D = *clv.list - case "testdata.TestVersion4LoneNesting.f": - cv := value.Message().Interface().(*TestVersion3LoneNesting) - x.Sum = &TestVersion4LoneNesting_F{F: cv} - case "testdata.TestVersion4LoneNesting.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersion4LoneNesting.h": - lv := value.List() - clv := lv.(*_TestVersion4LoneNesting_9_list) - x.H = *clv.list - case "testdata.TestVersion4LoneNesting.k": - x.K = value.Message().Interface().(*Customer1) - case "testdata.TestVersion4LoneNesting.non_critical_field": - x.NonCriticalField = value.Interface().(string) - case "testdata.TestVersion4LoneNesting.inner1": - x.Inner1 = value.Message().Interface().(*TestVersion4LoneNesting_Inner1) - case "testdata.TestVersion4LoneNesting.inner2": - x.Inner2 = value.Message().Interface().(*TestVersion4LoneNesting_Inner2) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting 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_TestVersion4LoneNesting) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.a": - if x.A == nil { - x.A = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.b": - if x.B == nil { - x.B = new(TestVersion3) - } - return protoreflect.ValueOfMessage(x.B.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.c": - if x.C == nil { - x.C = []*TestVersion3{} - } - value := &_TestVersion4LoneNesting_4_list{list: &x.C} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion4LoneNesting.d": - if x.D == nil { - x.D = []*TestVersion3{} - } - value := &_TestVersion4LoneNesting_5_list{list: &x.D} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion4LoneNesting.f": - if x.Sum == nil { - value := &TestVersion3LoneNesting{} - oneofValue := &TestVersion4LoneNesting_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersion4LoneNesting_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion3LoneNesting{} - oneofValue := &TestVersion4LoneNesting_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersion4LoneNesting.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersion4LoneNesting_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersion4LoneNesting.k": - if x.K == nil { - x.K = new(Customer1) - } - return protoreflect.ValueOfMessage(x.K.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.inner1": - if x.Inner1 == nil { - x.Inner1 = new(TestVersion4LoneNesting_Inner1) - } - return protoreflect.ValueOfMessage(x.Inner1.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.inner2": - if x.Inner2 == nil { - x.Inner2 = new(TestVersion4LoneNesting_Inner2) - } - return protoreflect.ValueOfMessage(x.Inner2.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.x": - panic(fmt.Errorf("field x of message testdata.TestVersion4LoneNesting is not mutable")) - case "testdata.TestVersion4LoneNesting.non_critical_field": - panic(fmt.Errorf("field non_critical_field of message testdata.TestVersion4LoneNesting is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting 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_TestVersion4LoneNesting) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion4LoneNesting.a": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.b": - m := new(TestVersion3) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.c": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion4LoneNesting_4_list{list: &list}) - case "testdata.TestVersion4LoneNesting.d": - list := []*TestVersion3{} - return protoreflect.ValueOfList(&_TestVersion4LoneNesting_5_list{list: &list}) - case "testdata.TestVersion4LoneNesting.f": - value := &TestVersion3LoneNesting{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersion4LoneNesting_9_list{list: &list}) - case "testdata.TestVersion4LoneNesting.k": - m := new(Customer1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.non_critical_field": - return protoreflect.ValueOfString("") - case "testdata.TestVersion4LoneNesting.inner1": - m := new(TestVersion4LoneNesting_Inner1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.inner2": - m := new(TestVersion4LoneNesting_Inner2) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting 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_TestVersion4LoneNesting) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersion4LoneNesting.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersion4LoneNesting_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion4LoneNesting", 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_TestVersion4LoneNesting) 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_TestVersion4LoneNesting) 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_TestVersion4LoneNesting) 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_TestVersion4LoneNesting) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion4LoneNesting) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != nil { - l = options.Size(x.B) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.C) > 0 { - for _, e := range x.C { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.D) > 0 { - for _, e := range x.D { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - switch x := x.Sum.(type) { - case *TestVersion4LoneNesting_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.K != nil { - l = options.Size(x.K) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NonCriticalField) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.Inner1 != nil { - l = options.Size(x.Inner1) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Inner2 != nil { - l = options.Size(x.Inner2) - 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().(*TestVersion4LoneNesting) - 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) - } - switch x := x.Sum.(type) { - case *TestVersion4LoneNesting_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.NonCriticalField) > 0 { - i -= len(x.NonCriticalField) - copy(dAtA[i:], x.NonCriticalField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NonCriticalField))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0xba - } - if x.Inner2 != nil { - encoded, err := options.Marshal(x.Inner2) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x7a - } - if x.Inner1 != nil { - encoded, err := options.Marshal(x.Inner1) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x72 - } - if x.K != nil { - encoded, err := options.Marshal(x.K) - 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] = 0x62 - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.D) > 0 { - for iNdEx := len(x.D) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.D[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.C) > 0 { - for iNdEx := len(x.C) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.C[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if x.B != nil { - encoded, err := options.Marshal(x.B) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion4LoneNesting) - 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: TestVersion4LoneNesting: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion4LoneNesting: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", 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.B == nil { - x.B = &TestVersion3{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.B); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.C = append(x.C, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.C[len(x.C)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field D", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.D = append(x.D, &TestVersion3{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.D[len(x.D)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion3LoneNesting{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersion4LoneNesting_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field K", 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.K == nil { - x.K = &Customer1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.K); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 1031: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonCriticalField", 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.NonCriticalField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner1", 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.Inner1 == nil { - x.Inner1 = &TestVersion4LoneNesting_Inner1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner1); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner2", 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.Inner2 == nil { - x.Inner2 = &TestVersion4LoneNesting_Inner2{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner2); 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_TestVersion4LoneNesting_Inner1 protoreflect.MessageDescriptor - fd_TestVersion4LoneNesting_Inner1_id protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_Inner1_name protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_Inner1_inner protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion4LoneNesting_Inner1 = File_unknonwnproto_proto.Messages().ByName("TestVersion4LoneNesting").Messages().ByName("Inner1") - fd_TestVersion4LoneNesting_Inner1_id = md_TestVersion4LoneNesting_Inner1.Fields().ByName("id") - fd_TestVersion4LoneNesting_Inner1_name = md_TestVersion4LoneNesting_Inner1.Fields().ByName("name") - fd_TestVersion4LoneNesting_Inner1_inner = md_TestVersion4LoneNesting_Inner1.Fields().ByName("inner") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion4LoneNesting_Inner1)(nil) - -type fastReflection_TestVersion4LoneNesting_Inner1 TestVersion4LoneNesting_Inner1 - -func (x *TestVersion4LoneNesting_Inner1) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner1)(x) -} - -func (x *TestVersion4LoneNesting_Inner1) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion4LoneNesting_Inner1_messageType fastReflection_TestVersion4LoneNesting_Inner1_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion4LoneNesting_Inner1_messageType{} - -type fastReflection_TestVersion4LoneNesting_Inner1_messageType struct{} - -func (x fastReflection_TestVersion4LoneNesting_Inner1_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner1)(nil) -} -func (x fastReflection_TestVersion4LoneNesting_Inner1_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner1) -} -func (x fastReflection_TestVersion4LoneNesting_Inner1_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner1 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion4LoneNesting_Inner1) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner1 -} - -// 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_TestVersion4LoneNesting_Inner1) Type() protoreflect.MessageType { - return _fastReflection_TestVersion4LoneNesting_Inner1_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion4LoneNesting_Inner1) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner1) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion4LoneNesting_Inner1) Interface() protoreflect.ProtoMessage { - return (*TestVersion4LoneNesting_Inner1)(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_TestVersion4LoneNesting_Inner1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int64(0) { - value := protoreflect.ValueOfInt64(x.Id) - if !f(fd_TestVersion4LoneNesting_Inner1_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_TestVersion4LoneNesting_Inner1_name, value) { - return - } - } - if x.Inner != nil { - value := protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_Inner1_inner, 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_TestVersion4LoneNesting_Inner1) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.id": - return x.Id != int64(0) - case "testdata.TestVersion4LoneNesting.Inner1.name": - return x.Name != "" - case "testdata.TestVersion4LoneNesting.Inner1.inner": - return x.Inner != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1 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_TestVersion4LoneNesting_Inner1) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.id": - x.Id = int64(0) - case "testdata.TestVersion4LoneNesting.Inner1.name": - x.Name = "" - case "testdata.TestVersion4LoneNesting.Inner1.inner": - x.Inner = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1 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_TestVersion4LoneNesting_Inner1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.id": - value := x.Id - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion4LoneNesting.Inner1.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "testdata.TestVersion4LoneNesting.Inner1.inner": - value := x.Inner - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1 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_TestVersion4LoneNesting_Inner1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.id": - x.Id = value.Int() - case "testdata.TestVersion4LoneNesting.Inner1.name": - x.Name = value.Interface().(string) - case "testdata.TestVersion4LoneNesting.Inner1.inner": - x.Inner = value.Message().Interface().(*TestVersion4LoneNesting_Inner1_InnerInner) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1 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_TestVersion4LoneNesting_Inner1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.inner": - if x.Inner == nil { - x.Inner = new(TestVersion4LoneNesting_Inner1_InnerInner) - } - return protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.Inner1.id": - panic(fmt.Errorf("field id of message testdata.TestVersion4LoneNesting.Inner1 is not mutable")) - case "testdata.TestVersion4LoneNesting.Inner1.name": - panic(fmt.Errorf("field name of message testdata.TestVersion4LoneNesting.Inner1 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1 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_TestVersion4LoneNesting_Inner1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.id": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion4LoneNesting.Inner1.name": - return protoreflect.ValueOfString("") - case "testdata.TestVersion4LoneNesting.Inner1.inner": - m := new(TestVersion4LoneNesting_Inner1_InnerInner) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1 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_TestVersion4LoneNesting_Inner1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion4LoneNesting.Inner1", 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_TestVersion4LoneNesting_Inner1) 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_TestVersion4LoneNesting_Inner1) 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_TestVersion4LoneNesting_Inner1) 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_TestVersion4LoneNesting_Inner1) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner1) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Inner != nil { - l = options.Size(x.Inner) - 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().(*TestVersion4LoneNesting_Inner1) - 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.Inner != nil { - encoded, err := options.Marshal(x.Inner) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner1) - 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: TestVersion4LoneNesting_Inner1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion4LoneNesting_Inner1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner", 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.Inner == nil { - x.Inner = &TestVersion4LoneNesting_Inner1_InnerInner{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner); 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_TestVersion4LoneNesting_Inner1_InnerInner protoreflect.MessageDescriptor - fd_TestVersion4LoneNesting_Inner1_InnerInner_id protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_Inner1_InnerInner_city protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion4LoneNesting_Inner1_InnerInner = File_unknonwnproto_proto.Messages().ByName("TestVersion4LoneNesting").Messages().ByName("Inner1").Messages().ByName("InnerInner") - fd_TestVersion4LoneNesting_Inner1_InnerInner_id = md_TestVersion4LoneNesting_Inner1_InnerInner.Fields().ByName("id") - fd_TestVersion4LoneNesting_Inner1_InnerInner_city = md_TestVersion4LoneNesting_Inner1_InnerInner.Fields().ByName("city") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion4LoneNesting_Inner1_InnerInner)(nil) - -type fastReflection_TestVersion4LoneNesting_Inner1_InnerInner TestVersion4LoneNesting_Inner1_InnerInner - -func (x *TestVersion4LoneNesting_Inner1_InnerInner) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner1_InnerInner)(x) -} - -func (x *TestVersion4LoneNesting_Inner1_InnerInner) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType{} - -type fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType struct{} - -func (x fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner1_InnerInner)(nil) -} -func (x fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner1_InnerInner) -} -func (x fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner1_InnerInner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion4LoneNesting_Inner1_InnerInner) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner1_InnerInner -} - -// 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_TestVersion4LoneNesting_Inner1_InnerInner) Type() protoreflect.MessageType { - return _fastReflection_TestVersion4LoneNesting_Inner1_InnerInner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion4LoneNesting_Inner1_InnerInner) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner1_InnerInner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion4LoneNesting_Inner1_InnerInner) Interface() protoreflect.ProtoMessage { - return (*TestVersion4LoneNesting_Inner1_InnerInner)(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_TestVersion4LoneNesting_Inner1_InnerInner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int64(0) { - value := protoreflect.ValueOfInt64(x.Id) - if !f(fd_TestVersion4LoneNesting_Inner1_InnerInner_id, value) { - return - } - } - if x.City != "" { - value := protoreflect.ValueOfString(x.City) - if !f(fd_TestVersion4LoneNesting_Inner1_InnerInner_city, 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_TestVersion4LoneNesting_Inner1_InnerInner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.id": - return x.Id != int64(0) - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.city": - return x.City != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1.InnerInner 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_TestVersion4LoneNesting_Inner1_InnerInner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.id": - x.Id = int64(0) - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.city": - x.City = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1.InnerInner 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_TestVersion4LoneNesting_Inner1_InnerInner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.id": - value := x.Id - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.city": - value := x.City - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1.InnerInner 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_TestVersion4LoneNesting_Inner1_InnerInner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.id": - x.Id = value.Int() - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.city": - x.City = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1.InnerInner 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_TestVersion4LoneNesting_Inner1_InnerInner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.id": - panic(fmt.Errorf("field id of message testdata.TestVersion4LoneNesting.Inner1.InnerInner is not mutable")) - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.city": - panic(fmt.Errorf("field city of message testdata.TestVersion4LoneNesting.Inner1.InnerInner is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1.InnerInner 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_TestVersion4LoneNesting_Inner1_InnerInner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.id": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersion4LoneNesting.Inner1.InnerInner.city": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner1.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner1.InnerInner 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_TestVersion4LoneNesting_Inner1_InnerInner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion4LoneNesting.Inner1.InnerInner", 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_TestVersion4LoneNesting_Inner1_InnerInner) 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_TestVersion4LoneNesting_Inner1_InnerInner) 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_TestVersion4LoneNesting_Inner1_InnerInner) 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_TestVersion4LoneNesting_Inner1_InnerInner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner1_InnerInner) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.City) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner1_InnerInner) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.City) > 0 { - i -= len(x.City) - copy(dAtA[i:], x.City) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.City))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner1_InnerInner) - 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: TestVersion4LoneNesting_Inner1_InnerInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion4LoneNesting_Inner1_InnerInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field City", 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.City = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TestVersion4LoneNesting_Inner2 protoreflect.MessageDescriptor - fd_TestVersion4LoneNesting_Inner2_id protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_Inner2_country protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_Inner2_inner protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion4LoneNesting_Inner2 = File_unknonwnproto_proto.Messages().ByName("TestVersion4LoneNesting").Messages().ByName("Inner2") - fd_TestVersion4LoneNesting_Inner2_id = md_TestVersion4LoneNesting_Inner2.Fields().ByName("id") - fd_TestVersion4LoneNesting_Inner2_country = md_TestVersion4LoneNesting_Inner2.Fields().ByName("country") - fd_TestVersion4LoneNesting_Inner2_inner = md_TestVersion4LoneNesting_Inner2.Fields().ByName("inner") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion4LoneNesting_Inner2)(nil) - -type fastReflection_TestVersion4LoneNesting_Inner2 TestVersion4LoneNesting_Inner2 - -func (x *TestVersion4LoneNesting_Inner2) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner2)(x) -} - -func (x *TestVersion4LoneNesting_Inner2) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersion4LoneNesting_Inner2_messageType fastReflection_TestVersion4LoneNesting_Inner2_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion4LoneNesting_Inner2_messageType{} - -type fastReflection_TestVersion4LoneNesting_Inner2_messageType struct{} - -func (x fastReflection_TestVersion4LoneNesting_Inner2_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner2)(nil) -} -func (x fastReflection_TestVersion4LoneNesting_Inner2_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner2) -} -func (x fastReflection_TestVersion4LoneNesting_Inner2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner2 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion4LoneNesting_Inner2) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner2 -} - -// 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_TestVersion4LoneNesting_Inner2) Type() protoreflect.MessageType { - return _fastReflection_TestVersion4LoneNesting_Inner2_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion4LoneNesting_Inner2) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner2) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion4LoneNesting_Inner2) Interface() protoreflect.ProtoMessage { - return (*TestVersion4LoneNesting_Inner2)(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_TestVersion4LoneNesting_Inner2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_TestVersion4LoneNesting_Inner2_id, value) { - return - } - } - if x.Country != "" { - value := protoreflect.ValueOfString(x.Country) - if !f(fd_TestVersion4LoneNesting_Inner2_country, value) { - return - } - } - if x.Inner != nil { - value := protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - if !f(fd_TestVersion4LoneNesting_Inner2_inner, 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_TestVersion4LoneNesting_Inner2) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.id": - return x.Id != "" - case "testdata.TestVersion4LoneNesting.Inner2.country": - return x.Country != "" - case "testdata.TestVersion4LoneNesting.Inner2.inner": - return x.Inner != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2 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_TestVersion4LoneNesting_Inner2) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.id": - x.Id = "" - case "testdata.TestVersion4LoneNesting.Inner2.country": - x.Country = "" - case "testdata.TestVersion4LoneNesting.Inner2.inner": - x.Inner = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2 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_TestVersion4LoneNesting_Inner2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "testdata.TestVersion4LoneNesting.Inner2.country": - value := x.Country - return protoreflect.ValueOfString(value) - case "testdata.TestVersion4LoneNesting.Inner2.inner": - value := x.Inner - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2 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_TestVersion4LoneNesting_Inner2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.id": - x.Id = value.Interface().(string) - case "testdata.TestVersion4LoneNesting.Inner2.country": - x.Country = value.Interface().(string) - case "testdata.TestVersion4LoneNesting.Inner2.inner": - x.Inner = value.Message().Interface().(*TestVersion4LoneNesting_Inner2_InnerInner) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2 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_TestVersion4LoneNesting_Inner2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.inner": - if x.Inner == nil { - x.Inner = new(TestVersion4LoneNesting_Inner2_InnerInner) - } - return protoreflect.ValueOfMessage(x.Inner.ProtoReflect()) - case "testdata.TestVersion4LoneNesting.Inner2.id": - panic(fmt.Errorf("field id of message testdata.TestVersion4LoneNesting.Inner2 is not mutable")) - case "testdata.TestVersion4LoneNesting.Inner2.country": - panic(fmt.Errorf("field country of message testdata.TestVersion4LoneNesting.Inner2 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2 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_TestVersion4LoneNesting_Inner2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.id": - return protoreflect.ValueOfString("") - case "testdata.TestVersion4LoneNesting.Inner2.country": - return protoreflect.ValueOfString("") - case "testdata.TestVersion4LoneNesting.Inner2.inner": - m := new(TestVersion4LoneNesting_Inner2_InnerInner) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2 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_TestVersion4LoneNesting_Inner2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion4LoneNesting.Inner2", 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_TestVersion4LoneNesting_Inner2) 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_TestVersion4LoneNesting_Inner2) 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_TestVersion4LoneNesting_Inner2) 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_TestVersion4LoneNesting_Inner2) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner2) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Country) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Inner != nil { - l = options.Size(x.Inner) - 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().(*TestVersion4LoneNesting_Inner2) - 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.Inner != nil { - encoded, err := options.Marshal(x.Inner) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Country) > 0 { - i -= len(x.Country) - copy(dAtA[i:], x.Country) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Country))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*TestVersion4LoneNesting_Inner2) - 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: TestVersion4LoneNesting_Inner2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion4LoneNesting_Inner2: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Country", 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.Country = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Inner", 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.Inner == nil { - x.Inner = &TestVersion4LoneNesting_Inner2_InnerInner{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Inner); 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_TestVersion4LoneNesting_Inner2_InnerInner protoreflect.MessageDescriptor - fd_TestVersion4LoneNesting_Inner2_InnerInner_id protoreflect.FieldDescriptor - fd_TestVersion4LoneNesting_Inner2_InnerInner_value protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersion4LoneNesting_Inner2_InnerInner = File_unknonwnproto_proto.Messages().ByName("TestVersion4LoneNesting").Messages().ByName("Inner2").Messages().ByName("InnerInner") - fd_TestVersion4LoneNesting_Inner2_InnerInner_id = md_TestVersion4LoneNesting_Inner2_InnerInner.Fields().ByName("id") - fd_TestVersion4LoneNesting_Inner2_InnerInner_value = md_TestVersion4LoneNesting_Inner2_InnerInner.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_TestVersion4LoneNesting_Inner2_InnerInner)(nil) - -type fastReflection_TestVersion4LoneNesting_Inner2_InnerInner TestVersion4LoneNesting_Inner2_InnerInner - -func (x *TestVersion4LoneNesting_Inner2_InnerInner) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner2_InnerInner)(x) -} - -func (x *TestVersion4LoneNesting_Inner2_InnerInner) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[32] - 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_TestVersion4LoneNesting_Inner2_InnerInner_messageType fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType -var _ protoreflect.MessageType = fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType{} - -type fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType struct{} - -func (x fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersion4LoneNesting_Inner2_InnerInner)(nil) -} -func (x fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner2_InnerInner) -} -func (x fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner2_InnerInner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersion4LoneNesting_Inner2_InnerInner) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersion4LoneNesting_Inner2_InnerInner -} - -// 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_TestVersion4LoneNesting_Inner2_InnerInner) Type() protoreflect.MessageType { - return _fastReflection_TestVersion4LoneNesting_Inner2_InnerInner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersion4LoneNesting_Inner2_InnerInner) New() protoreflect.Message { - return new(fastReflection_TestVersion4LoneNesting_Inner2_InnerInner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersion4LoneNesting_Inner2_InnerInner) Interface() protoreflect.ProtoMessage { - return (*TestVersion4LoneNesting_Inner2_InnerInner)(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_TestVersion4LoneNesting_Inner2_InnerInner) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_TestVersion4LoneNesting_Inner2_InnerInner_id, value) { - return - } - } - if x.Value != int64(0) { - value := protoreflect.ValueOfInt64(x.Value) - if !f(fd_TestVersion4LoneNesting_Inner2_InnerInner_value, 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_TestVersion4LoneNesting_Inner2_InnerInner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.id": - return x.Id != "" - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.value": - return x.Value != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2.InnerInner 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_TestVersion4LoneNesting_Inner2_InnerInner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.id": - x.Id = "" - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.value": - x.Value = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2.InnerInner 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_TestVersion4LoneNesting_Inner2_InnerInner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.value": - value := x.Value - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2.InnerInner 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_TestVersion4LoneNesting_Inner2_InnerInner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.id": - x.Id = value.Interface().(string) - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.value": - x.Value = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2.InnerInner 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_TestVersion4LoneNesting_Inner2_InnerInner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.id": - panic(fmt.Errorf("field id of message testdata.TestVersion4LoneNesting.Inner2.InnerInner is not mutable")) - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.value": - panic(fmt.Errorf("field value of message testdata.TestVersion4LoneNesting.Inner2.InnerInner is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2.InnerInner 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_TestVersion4LoneNesting_Inner2_InnerInner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.id": - return protoreflect.ValueOfString("") - case "testdata.TestVersion4LoneNesting.Inner2.InnerInner.value": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersion4LoneNesting.Inner2.InnerInner")) - } - panic(fmt.Errorf("message testdata.TestVersion4LoneNesting.Inner2.InnerInner 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_TestVersion4LoneNesting_Inner2_InnerInner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersion4LoneNesting.Inner2.InnerInner", 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_TestVersion4LoneNesting_Inner2_InnerInner) 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_TestVersion4LoneNesting_Inner2_InnerInner) 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_TestVersion4LoneNesting_Inner2_InnerInner) 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_TestVersion4LoneNesting_Inner2_InnerInner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersion4LoneNesting_Inner2_InnerInner) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Value != 0 { - n += 1 + runtime.Sov(uint64(x.Value)) - } - 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().(*TestVersion4LoneNesting_Inner2_InnerInner) - 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.Value != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Value)) - i-- - dAtA[i] = 0x10 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - 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().(*TestVersion4LoneNesting_Inner2_InnerInner) - 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: TestVersion4LoneNesting_Inner2_InnerInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersion4LoneNesting_Inner2_InnerInner: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - x.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Value |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersionFD1_9_list)(nil) - -type _TestVersionFD1_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersionFD1_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersionFD1_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersionFD1_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersionFD1_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersionFD1_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersionFD1_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersionFD1_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersionFD1_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersionFD1 protoreflect.MessageDescriptor - fd_TestVersionFD1_x protoreflect.FieldDescriptor - fd_TestVersionFD1_a protoreflect.FieldDescriptor - fd_TestVersionFD1_e protoreflect.FieldDescriptor - fd_TestVersionFD1_f protoreflect.FieldDescriptor - fd_TestVersionFD1_g protoreflect.FieldDescriptor - fd_TestVersionFD1_h protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersionFD1 = File_unknonwnproto_proto.Messages().ByName("TestVersionFD1") - fd_TestVersionFD1_x = md_TestVersionFD1.Fields().ByName("x") - fd_TestVersionFD1_a = md_TestVersionFD1.Fields().ByName("a") - fd_TestVersionFD1_e = md_TestVersionFD1.Fields().ByName("e") - fd_TestVersionFD1_f = md_TestVersionFD1.Fields().ByName("f") - fd_TestVersionFD1_g = md_TestVersionFD1.Fields().ByName("g") - fd_TestVersionFD1_h = md_TestVersionFD1.Fields().ByName("h") -} - -var _ protoreflect.Message = (*fastReflection_TestVersionFD1)(nil) - -type fastReflection_TestVersionFD1 TestVersionFD1 - -func (x *TestVersionFD1) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersionFD1)(x) -} - -func (x *TestVersionFD1) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersionFD1_messageType fastReflection_TestVersionFD1_messageType -var _ protoreflect.MessageType = fastReflection_TestVersionFD1_messageType{} - -type fastReflection_TestVersionFD1_messageType struct{} - -func (x fastReflection_TestVersionFD1_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersionFD1)(nil) -} -func (x fastReflection_TestVersionFD1_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersionFD1) -} -func (x fastReflection_TestVersionFD1_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersionFD1 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersionFD1) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersionFD1 -} - -// 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_TestVersionFD1) Type() protoreflect.MessageType { - return _fastReflection_TestVersionFD1_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersionFD1) New() protoreflect.Message { - return new(fastReflection_TestVersionFD1) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersionFD1) Interface() protoreflect.ProtoMessage { - return (*TestVersionFD1)(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_TestVersionFD1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersionFD1_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersionFD1_a, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersionFD1_E: - v := o.E - value := protoreflect.ValueOfInt32(v) - if !f(fd_TestVersionFD1_e, value) { - return - } - case *TestVersionFD1_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersionFD1_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersionFD1_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersionFD1_9_list{list: &x.H}) - if !f(fd_TestVersionFD1_h, 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_TestVersionFD1) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersionFD1.x": - return x.X != int64(0) - case "testdata.TestVersionFD1.a": - return x.A != nil - case "testdata.TestVersionFD1.e": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersionFD1_E); ok { - return true - } else { - return false - } - case "testdata.TestVersionFD1.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersionFD1_F); ok { - return true - } else { - return false - } - case "testdata.TestVersionFD1.g": - return x.G != nil - case "testdata.TestVersionFD1.h": - return len(x.H) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1 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_TestVersionFD1) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersionFD1.x": - x.X = int64(0) - case "testdata.TestVersionFD1.a": - x.A = nil - case "testdata.TestVersionFD1.e": - x.Sum = nil - case "testdata.TestVersionFD1.f": - x.Sum = nil - case "testdata.TestVersionFD1.g": - x.G = nil - case "testdata.TestVersionFD1.h": - x.H = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1 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_TestVersionFD1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersionFD1.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersionFD1.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersionFD1.e": - if x.Sum == nil { - return protoreflect.ValueOfInt32(int32(0)) - } else if v, ok := x.Sum.(*TestVersionFD1_E); ok { - return protoreflect.ValueOfInt32(v.E) - } else { - return protoreflect.ValueOfInt32(int32(0)) - } - case "testdata.TestVersionFD1.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion1)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersionFD1_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion1)(nil).ProtoReflect()) - } - case "testdata.TestVersionFD1.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersionFD1.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersionFD1_9_list{}) - } - listValue := &_TestVersionFD1_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1 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_TestVersionFD1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersionFD1.x": - x.X = value.Int() - case "testdata.TestVersionFD1.a": - x.A = value.Message().Interface().(*TestVersion1) - case "testdata.TestVersionFD1.e": - cv := int32(value.Int()) - x.Sum = &TestVersionFD1_E{E: cv} - case "testdata.TestVersionFD1.f": - cv := value.Message().Interface().(*TestVersion1) - x.Sum = &TestVersionFD1_F{F: cv} - case "testdata.TestVersionFD1.g": - x.G = value.Message().Interface().(*anypb.Any) - case "testdata.TestVersionFD1.h": - lv := value.List() - clv := lv.(*_TestVersionFD1_9_list) - x.H = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1 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_TestVersionFD1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersionFD1.a": - if x.A == nil { - x.A = new(TestVersion1) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersionFD1.f": - if x.Sum == nil { - value := &TestVersion1{} - oneofValue := &TestVersionFD1_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersionFD1_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion1{} - oneofValue := &TestVersionFD1_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersionFD1.g": - if x.G == nil { - x.G = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersionFD1.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersionFD1_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersionFD1.x": - panic(fmt.Errorf("field x of message testdata.TestVersionFD1 is not mutable")) - case "testdata.TestVersionFD1.e": - panic(fmt.Errorf("field e of message testdata.TestVersionFD1 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1 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_TestVersionFD1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersionFD1.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersionFD1.a": - m := new(TestVersion1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersionFD1.e": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.TestVersionFD1.f": - value := &TestVersion1{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersionFD1.g": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersionFD1.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersionFD1_9_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1 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_TestVersionFD1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersionFD1.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersionFD1_E: - return x.Descriptor().Fields().ByName("e") - case *TestVersionFD1_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersionFD1", 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_TestVersionFD1) 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_TestVersionFD1) 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_TestVersionFD1) 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_TestVersionFD1) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersionFD1) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - switch x := x.Sum.(type) { - case *TestVersionFD1_E: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.E)) - case *TestVersionFD1_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestVersionFD1) - 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) - } - switch x := x.Sum.(type) { - case *TestVersionFD1_E: - i = runtime.EncodeVarint(dAtA, i, uint64(x.E)) - i-- - dAtA[i] = 0x30 - case *TestVersionFD1_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersionFD1) - 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: TestVersionFD1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersionFD1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &TestVersionFD1_E{v} - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion1{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersionFD1_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestVersionFD1WithExtraAny_9_list)(nil) - -type _TestVersionFD1WithExtraAny_9_list struct { - list *[]*TestVersion1 -} - -func (x *_TestVersionFD1WithExtraAny_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestVersionFD1WithExtraAny_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestVersionFD1WithExtraAny_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - (*x.list)[i] = concreteValue -} - -func (x *_TestVersionFD1WithExtraAny_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TestVersion1) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestVersionFD1WithExtraAny_9_list) AppendMutable() protoreflect.Value { - v := new(TestVersion1) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersionFD1WithExtraAny_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestVersionFD1WithExtraAny_9_list) NewElement() protoreflect.Value { - v := new(TestVersion1) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestVersionFD1WithExtraAny_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestVersionFD1WithExtraAny protoreflect.MessageDescriptor - fd_TestVersionFD1WithExtraAny_x protoreflect.FieldDescriptor - fd_TestVersionFD1WithExtraAny_a protoreflect.FieldDescriptor - fd_TestVersionFD1WithExtraAny_e protoreflect.FieldDescriptor - fd_TestVersionFD1WithExtraAny_f protoreflect.FieldDescriptor - fd_TestVersionFD1WithExtraAny_g protoreflect.FieldDescriptor - fd_TestVersionFD1WithExtraAny_h protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestVersionFD1WithExtraAny = File_unknonwnproto_proto.Messages().ByName("TestVersionFD1WithExtraAny") - fd_TestVersionFD1WithExtraAny_x = md_TestVersionFD1WithExtraAny.Fields().ByName("x") - fd_TestVersionFD1WithExtraAny_a = md_TestVersionFD1WithExtraAny.Fields().ByName("a") - fd_TestVersionFD1WithExtraAny_e = md_TestVersionFD1WithExtraAny.Fields().ByName("e") - fd_TestVersionFD1WithExtraAny_f = md_TestVersionFD1WithExtraAny.Fields().ByName("f") - fd_TestVersionFD1WithExtraAny_g = md_TestVersionFD1WithExtraAny.Fields().ByName("g") - fd_TestVersionFD1WithExtraAny_h = md_TestVersionFD1WithExtraAny.Fields().ByName("h") -} - -var _ protoreflect.Message = (*fastReflection_TestVersionFD1WithExtraAny)(nil) - -type fastReflection_TestVersionFD1WithExtraAny TestVersionFD1WithExtraAny - -func (x *TestVersionFD1WithExtraAny) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestVersionFD1WithExtraAny)(x) -} - -func (x *TestVersionFD1WithExtraAny) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestVersionFD1WithExtraAny_messageType fastReflection_TestVersionFD1WithExtraAny_messageType -var _ protoreflect.MessageType = fastReflection_TestVersionFD1WithExtraAny_messageType{} - -type fastReflection_TestVersionFD1WithExtraAny_messageType struct{} - -func (x fastReflection_TestVersionFD1WithExtraAny_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestVersionFD1WithExtraAny)(nil) -} -func (x fastReflection_TestVersionFD1WithExtraAny_messageType) New() protoreflect.Message { - return new(fastReflection_TestVersionFD1WithExtraAny) -} -func (x fastReflection_TestVersionFD1WithExtraAny_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersionFD1WithExtraAny -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestVersionFD1WithExtraAny) Descriptor() protoreflect.MessageDescriptor { - return md_TestVersionFD1WithExtraAny -} - -// 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_TestVersionFD1WithExtraAny) Type() protoreflect.MessageType { - return _fastReflection_TestVersionFD1WithExtraAny_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestVersionFD1WithExtraAny) New() protoreflect.Message { - return new(fastReflection_TestVersionFD1WithExtraAny) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestVersionFD1WithExtraAny) Interface() protoreflect.ProtoMessage { - return (*TestVersionFD1WithExtraAny)(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_TestVersionFD1WithExtraAny) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.X != int64(0) { - value := protoreflect.ValueOfInt64(x.X) - if !f(fd_TestVersionFD1WithExtraAny_x, value) { - return - } - } - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_TestVersionFD1WithExtraAny_a, value) { - return - } - } - if x.Sum != nil { - switch o := x.Sum.(type) { - case *TestVersionFD1WithExtraAny_E: - v := o.E - value := protoreflect.ValueOfInt32(v) - if !f(fd_TestVersionFD1WithExtraAny_e, value) { - return - } - case *TestVersionFD1WithExtraAny_F: - v := o.F - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_TestVersionFD1WithExtraAny_f, value) { - return - } - } - } - if x.G != nil { - value := protoreflect.ValueOfMessage(x.G.ProtoReflect()) - if !f(fd_TestVersionFD1WithExtraAny_g, value) { - return - } - } - if len(x.H) != 0 { - value := protoreflect.ValueOfList(&_TestVersionFD1WithExtraAny_9_list{list: &x.H}) - if !f(fd_TestVersionFD1WithExtraAny_h, 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_TestVersionFD1WithExtraAny) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestVersionFD1WithExtraAny.x": - return x.X != int64(0) - case "testdata.TestVersionFD1WithExtraAny.a": - return x.A != nil - case "testdata.TestVersionFD1WithExtraAny.e": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersionFD1WithExtraAny_E); ok { - return true - } else { - return false - } - case "testdata.TestVersionFD1WithExtraAny.f": - if x.Sum == nil { - return false - } else if _, ok := x.Sum.(*TestVersionFD1WithExtraAny_F); ok { - return true - } else { - return false - } - case "testdata.TestVersionFD1WithExtraAny.g": - return x.G != nil - case "testdata.TestVersionFD1WithExtraAny.h": - return len(x.H) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1WithExtraAny")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1WithExtraAny 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_TestVersionFD1WithExtraAny) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestVersionFD1WithExtraAny.x": - x.X = int64(0) - case "testdata.TestVersionFD1WithExtraAny.a": - x.A = nil - case "testdata.TestVersionFD1WithExtraAny.e": - x.Sum = nil - case "testdata.TestVersionFD1WithExtraAny.f": - x.Sum = nil - case "testdata.TestVersionFD1WithExtraAny.g": - x.G = nil - case "testdata.TestVersionFD1WithExtraAny.h": - x.H = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1WithExtraAny")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1WithExtraAny 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_TestVersionFD1WithExtraAny) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestVersionFD1WithExtraAny.x": - value := x.X - return protoreflect.ValueOfInt64(value) - case "testdata.TestVersionFD1WithExtraAny.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.e": - if x.Sum == nil { - return protoreflect.ValueOfInt32(int32(0)) - } else if v, ok := x.Sum.(*TestVersionFD1WithExtraAny_E); ok { - return protoreflect.ValueOfInt32(v.E) - } else { - return protoreflect.ValueOfInt32(int32(0)) - } - case "testdata.TestVersionFD1WithExtraAny.f": - if x.Sum == nil { - return protoreflect.ValueOfMessage((*TestVersion1)(nil).ProtoReflect()) - } else if v, ok := x.Sum.(*TestVersionFD1WithExtraAny_F); ok { - return protoreflect.ValueOfMessage(v.F.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*TestVersion1)(nil).ProtoReflect()) - } - case "testdata.TestVersionFD1WithExtraAny.g": - value := x.G - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.h": - if len(x.H) == 0 { - return protoreflect.ValueOfList(&_TestVersionFD1WithExtraAny_9_list{}) - } - listValue := &_TestVersionFD1WithExtraAny_9_list{list: &x.H} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1WithExtraAny")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1WithExtraAny 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_TestVersionFD1WithExtraAny) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestVersionFD1WithExtraAny.x": - x.X = value.Int() - case "testdata.TestVersionFD1WithExtraAny.a": - x.A = value.Message().Interface().(*TestVersion1) - case "testdata.TestVersionFD1WithExtraAny.e": - cv := int32(value.Int()) - x.Sum = &TestVersionFD1WithExtraAny_E{E: cv} - case "testdata.TestVersionFD1WithExtraAny.f": - cv := value.Message().Interface().(*TestVersion1) - x.Sum = &TestVersionFD1WithExtraAny_F{F: cv} - case "testdata.TestVersionFD1WithExtraAny.g": - x.G = value.Message().Interface().(*AnyWithExtra) - case "testdata.TestVersionFD1WithExtraAny.h": - lv := value.List() - clv := lv.(*_TestVersionFD1WithExtraAny_9_list) - x.H = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1WithExtraAny")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1WithExtraAny 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_TestVersionFD1WithExtraAny) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersionFD1WithExtraAny.a": - if x.A == nil { - x.A = new(TestVersion1) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.f": - if x.Sum == nil { - value := &TestVersion1{} - oneofValue := &TestVersionFD1WithExtraAny_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Sum.(type) { - case *TestVersionFD1WithExtraAny_F: - return protoreflect.ValueOfMessage(m.F.ProtoReflect()) - default: - value := &TestVersion1{} - oneofValue := &TestVersionFD1WithExtraAny_F{F: value} - x.Sum = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - case "testdata.TestVersionFD1WithExtraAny.g": - if x.G == nil { - x.G = new(AnyWithExtra) - } - return protoreflect.ValueOfMessage(x.G.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.h": - if x.H == nil { - x.H = []*TestVersion1{} - } - value := &_TestVersionFD1WithExtraAny_9_list{list: &x.H} - return protoreflect.ValueOfList(value) - case "testdata.TestVersionFD1WithExtraAny.x": - panic(fmt.Errorf("field x of message testdata.TestVersionFD1WithExtraAny is not mutable")) - case "testdata.TestVersionFD1WithExtraAny.e": - panic(fmt.Errorf("field e of message testdata.TestVersionFD1WithExtraAny is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1WithExtraAny")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1WithExtraAny 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_TestVersionFD1WithExtraAny) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestVersionFD1WithExtraAny.x": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestVersionFD1WithExtraAny.a": - m := new(TestVersion1) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.e": - return protoreflect.ValueOfInt32(int32(0)) - case "testdata.TestVersionFD1WithExtraAny.f": - value := &TestVersion1{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.g": - m := new(AnyWithExtra) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestVersionFD1WithExtraAny.h": - list := []*TestVersion1{} - return protoreflect.ValueOfList(&_TestVersionFD1WithExtraAny_9_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestVersionFD1WithExtraAny")) - } - panic(fmt.Errorf("message testdata.TestVersionFD1WithExtraAny 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_TestVersionFD1WithExtraAny) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "testdata.TestVersionFD1WithExtraAny.sum": - if x.Sum == nil { - return nil - } - switch x.Sum.(type) { - case *TestVersionFD1WithExtraAny_E: - return x.Descriptor().Fields().ByName("e") - case *TestVersionFD1WithExtraAny_F: - return x.Descriptor().Fields().ByName("f") - } - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestVersionFD1WithExtraAny", 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_TestVersionFD1WithExtraAny) 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_TestVersionFD1WithExtraAny) 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_TestVersionFD1WithExtraAny) 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_TestVersionFD1WithExtraAny) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestVersionFD1WithExtraAny) - 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.X != 0 { - n += 1 + runtime.Sov(uint64(x.X)) - } - if x.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - switch x := x.Sum.(type) { - case *TestVersionFD1WithExtraAny_E: - if x == nil { - break - } - n += 1 + runtime.Sov(uint64(x.E)) - case *TestVersionFD1WithExtraAny_F: - if x == nil { - break - } - l = options.Size(x.F) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.G != nil { - l = options.Size(x.G) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.H) > 0 { - for _, e := range x.H { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestVersionFD1WithExtraAny) - 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) - } - switch x := x.Sum.(type) { - case *TestVersionFD1WithExtraAny_E: - i = runtime.EncodeVarint(dAtA, i, uint64(x.E)) - i-- - dAtA[i] = 0x30 - case *TestVersionFD1WithExtraAny_F: - encoded, err := options.Marshal(x.F) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if len(x.H) > 0 { - for iNdEx := len(x.H) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.H[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.G != nil { - encoded, err := options.Marshal(x.G) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.X != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.X)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestVersionFD1WithExtraAny) - 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: TestVersionFD1WithExtraAny: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestVersionFD1WithExtraAny: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - x.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field A", 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.A == nil { - x.A = &TestVersion1{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Sum = &TestVersionFD1WithExtraAny_E{v} - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field F", 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 - } - v := &TestVersion1{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Sum = &TestVersionFD1WithExtraAny_F{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field G", 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.G == nil { - x.G = &AnyWithExtra{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.G); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field H", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.H = append(x.H, &TestVersion1{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.H[len(x.H)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AnyWithExtra protoreflect.MessageDescriptor - fd_AnyWithExtra_a protoreflect.FieldDescriptor - fd_AnyWithExtra_b protoreflect.FieldDescriptor - fd_AnyWithExtra_c protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_AnyWithExtra = File_unknonwnproto_proto.Messages().ByName("AnyWithExtra") - fd_AnyWithExtra_a = md_AnyWithExtra.Fields().ByName("a") - fd_AnyWithExtra_b = md_AnyWithExtra.Fields().ByName("b") - fd_AnyWithExtra_c = md_AnyWithExtra.Fields().ByName("c") -} - -var _ protoreflect.Message = (*fastReflection_AnyWithExtra)(nil) - -type fastReflection_AnyWithExtra AnyWithExtra - -func (x *AnyWithExtra) ProtoReflect() protoreflect.Message { - return (*fastReflection_AnyWithExtra)(x) -} - -func (x *AnyWithExtra) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AnyWithExtra_messageType fastReflection_AnyWithExtra_messageType -var _ protoreflect.MessageType = fastReflection_AnyWithExtra_messageType{} - -type fastReflection_AnyWithExtra_messageType struct{} - -func (x fastReflection_AnyWithExtra_messageType) Zero() protoreflect.Message { - return (*fastReflection_AnyWithExtra)(nil) -} -func (x fastReflection_AnyWithExtra_messageType) New() protoreflect.Message { - return new(fastReflection_AnyWithExtra) -} -func (x fastReflection_AnyWithExtra_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AnyWithExtra -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AnyWithExtra) Descriptor() protoreflect.MessageDescriptor { - return md_AnyWithExtra -} - -// 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_AnyWithExtra) Type() protoreflect.MessageType { - return _fastReflection_AnyWithExtra_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AnyWithExtra) New() protoreflect.Message { - return new(fastReflection_AnyWithExtra) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AnyWithExtra) Interface() protoreflect.ProtoMessage { - return (*AnyWithExtra)(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_AnyWithExtra) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.A != nil { - value := protoreflect.ValueOfMessage(x.A.ProtoReflect()) - if !f(fd_AnyWithExtra_a, value) { - return - } - } - if x.B != int64(0) { - value := protoreflect.ValueOfInt64(x.B) - if !f(fd_AnyWithExtra_b, value) { - return - } - } - if x.C != int64(0) { - value := protoreflect.ValueOfInt64(x.C) - if !f(fd_AnyWithExtra_c, 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_AnyWithExtra) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.AnyWithExtra.a": - return x.A != nil - case "testdata.AnyWithExtra.b": - return x.B != int64(0) - case "testdata.AnyWithExtra.c": - return x.C != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.AnyWithExtra")) - } - panic(fmt.Errorf("message testdata.AnyWithExtra 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_AnyWithExtra) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.AnyWithExtra.a": - x.A = nil - case "testdata.AnyWithExtra.b": - x.B = int64(0) - case "testdata.AnyWithExtra.c": - x.C = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.AnyWithExtra")) - } - panic(fmt.Errorf("message testdata.AnyWithExtra 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_AnyWithExtra) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.AnyWithExtra.a": - value := x.A - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.AnyWithExtra.b": - value := x.B - return protoreflect.ValueOfInt64(value) - case "testdata.AnyWithExtra.c": - value := x.C - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.AnyWithExtra")) - } - panic(fmt.Errorf("message testdata.AnyWithExtra 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_AnyWithExtra) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.AnyWithExtra.a": - x.A = value.Message().Interface().(*anypb.Any) - case "testdata.AnyWithExtra.b": - x.B = value.Int() - case "testdata.AnyWithExtra.c": - x.C = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.AnyWithExtra")) - } - panic(fmt.Errorf("message testdata.AnyWithExtra 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_AnyWithExtra) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.AnyWithExtra.a": - if x.A == nil { - x.A = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.A.ProtoReflect()) - case "testdata.AnyWithExtra.b": - panic(fmt.Errorf("field b of message testdata.AnyWithExtra is not mutable")) - case "testdata.AnyWithExtra.c": - panic(fmt.Errorf("field c of message testdata.AnyWithExtra is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.AnyWithExtra")) - } - panic(fmt.Errorf("message testdata.AnyWithExtra 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_AnyWithExtra) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.AnyWithExtra.a": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.AnyWithExtra.b": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.AnyWithExtra.c": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.AnyWithExtra")) - } - panic(fmt.Errorf("message testdata.AnyWithExtra 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_AnyWithExtra) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.AnyWithExtra", 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_AnyWithExtra) 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_AnyWithExtra) 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_AnyWithExtra) 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_AnyWithExtra) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AnyWithExtra) - 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.A != nil { - l = options.Size(x.A) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.B != 0 { - n += 1 + runtime.Sov(uint64(x.B)) - } - if x.C != 0 { - n += 1 + runtime.Sov(uint64(x.C)) - } - 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().(*AnyWithExtra) - 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.C != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.C)) - i-- - dAtA[i] = 0x20 - } - if x.B != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.B)) - i-- - dAtA[i] = 0x18 - } - if x.A != nil { - encoded, err := options.Marshal(x.A) - 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().(*AnyWithExtra) - 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: AnyWithExtra: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AnyWithExtra: 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 A", 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.A == nil { - x.A = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.A); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field B", wireType) - } - x.B = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.B |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field C", wireType) - } - x.C = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.C |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestUpdatedTxRaw_3_list)(nil) - -type _TestUpdatedTxRaw_3_list struct { - list *[][]byte -} - -func (x *_TestUpdatedTxRaw_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestUpdatedTxRaw_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_TestUpdatedTxRaw_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_TestUpdatedTxRaw_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestUpdatedTxRaw_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message TestUpdatedTxRaw at list field Signatures as it is not of Message kind")) -} - -func (x *_TestUpdatedTxRaw_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_TestUpdatedTxRaw_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_TestUpdatedTxRaw_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestUpdatedTxRaw protoreflect.MessageDescriptor - fd_TestUpdatedTxRaw_body_bytes protoreflect.FieldDescriptor - fd_TestUpdatedTxRaw_auth_info_bytes protoreflect.FieldDescriptor - fd_TestUpdatedTxRaw_signatures protoreflect.FieldDescriptor - fd_TestUpdatedTxRaw_new_field_5 protoreflect.FieldDescriptor - fd_TestUpdatedTxRaw_new_field_1024 protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestUpdatedTxRaw = File_unknonwnproto_proto.Messages().ByName("TestUpdatedTxRaw") - fd_TestUpdatedTxRaw_body_bytes = md_TestUpdatedTxRaw.Fields().ByName("body_bytes") - fd_TestUpdatedTxRaw_auth_info_bytes = md_TestUpdatedTxRaw.Fields().ByName("auth_info_bytes") - fd_TestUpdatedTxRaw_signatures = md_TestUpdatedTxRaw.Fields().ByName("signatures") - fd_TestUpdatedTxRaw_new_field_5 = md_TestUpdatedTxRaw.Fields().ByName("new_field_5") - fd_TestUpdatedTxRaw_new_field_1024 = md_TestUpdatedTxRaw.Fields().ByName("new_field_1024") -} - -var _ protoreflect.Message = (*fastReflection_TestUpdatedTxRaw)(nil) - -type fastReflection_TestUpdatedTxRaw TestUpdatedTxRaw - -func (x *TestUpdatedTxRaw) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestUpdatedTxRaw)(x) -} - -func (x *TestUpdatedTxRaw) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestUpdatedTxRaw_messageType fastReflection_TestUpdatedTxRaw_messageType -var _ protoreflect.MessageType = fastReflection_TestUpdatedTxRaw_messageType{} - -type fastReflection_TestUpdatedTxRaw_messageType struct{} - -func (x fastReflection_TestUpdatedTxRaw_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestUpdatedTxRaw)(nil) -} -func (x fastReflection_TestUpdatedTxRaw_messageType) New() protoreflect.Message { - return new(fastReflection_TestUpdatedTxRaw) -} -func (x fastReflection_TestUpdatedTxRaw_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestUpdatedTxRaw -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestUpdatedTxRaw) Descriptor() protoreflect.MessageDescriptor { - return md_TestUpdatedTxRaw -} - -// 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_TestUpdatedTxRaw) Type() protoreflect.MessageType { - return _fastReflection_TestUpdatedTxRaw_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestUpdatedTxRaw) New() protoreflect.Message { - return new(fastReflection_TestUpdatedTxRaw) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestUpdatedTxRaw) Interface() protoreflect.ProtoMessage { - return (*TestUpdatedTxRaw)(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_TestUpdatedTxRaw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BodyBytes) != 0 { - value := protoreflect.ValueOfBytes(x.BodyBytes) - if !f(fd_TestUpdatedTxRaw_body_bytes, value) { - return - } - } - if len(x.AuthInfoBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AuthInfoBytes) - if !f(fd_TestUpdatedTxRaw_auth_info_bytes, value) { - return - } - } - if len(x.Signatures) != 0 { - value := protoreflect.ValueOfList(&_TestUpdatedTxRaw_3_list{list: &x.Signatures}) - if !f(fd_TestUpdatedTxRaw_signatures, value) { - return - } - } - if len(x.NewField_5) != 0 { - value := protoreflect.ValueOfBytes(x.NewField_5) - if !f(fd_TestUpdatedTxRaw_new_field_5, value) { - return - } - } - if len(x.NewField_1024) != 0 { - value := protoreflect.ValueOfBytes(x.NewField_1024) - if !f(fd_TestUpdatedTxRaw_new_field_1024, 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_TestUpdatedTxRaw) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestUpdatedTxRaw.body_bytes": - return len(x.BodyBytes) != 0 - case "testdata.TestUpdatedTxRaw.auth_info_bytes": - return len(x.AuthInfoBytes) != 0 - case "testdata.TestUpdatedTxRaw.signatures": - return len(x.Signatures) != 0 - case "testdata.TestUpdatedTxRaw.new_field_5": - return len(x.NewField_5) != 0 - case "testdata.TestUpdatedTxRaw.new_field_1024": - return len(x.NewField_1024) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxRaw")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxRaw 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_TestUpdatedTxRaw) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestUpdatedTxRaw.body_bytes": - x.BodyBytes = nil - case "testdata.TestUpdatedTxRaw.auth_info_bytes": - x.AuthInfoBytes = nil - case "testdata.TestUpdatedTxRaw.signatures": - x.Signatures = nil - case "testdata.TestUpdatedTxRaw.new_field_5": - x.NewField_5 = nil - case "testdata.TestUpdatedTxRaw.new_field_1024": - x.NewField_1024 = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxRaw")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxRaw 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_TestUpdatedTxRaw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestUpdatedTxRaw.body_bytes": - value := x.BodyBytes - return protoreflect.ValueOfBytes(value) - case "testdata.TestUpdatedTxRaw.auth_info_bytes": - value := x.AuthInfoBytes - return protoreflect.ValueOfBytes(value) - case "testdata.TestUpdatedTxRaw.signatures": - if len(x.Signatures) == 0 { - return protoreflect.ValueOfList(&_TestUpdatedTxRaw_3_list{}) - } - listValue := &_TestUpdatedTxRaw_3_list{list: &x.Signatures} - return protoreflect.ValueOfList(listValue) - case "testdata.TestUpdatedTxRaw.new_field_5": - value := x.NewField_5 - return protoreflect.ValueOfBytes(value) - case "testdata.TestUpdatedTxRaw.new_field_1024": - value := x.NewField_1024 - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxRaw")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxRaw 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_TestUpdatedTxRaw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestUpdatedTxRaw.body_bytes": - x.BodyBytes = value.Bytes() - case "testdata.TestUpdatedTxRaw.auth_info_bytes": - x.AuthInfoBytes = value.Bytes() - case "testdata.TestUpdatedTxRaw.signatures": - lv := value.List() - clv := lv.(*_TestUpdatedTxRaw_3_list) - x.Signatures = *clv.list - case "testdata.TestUpdatedTxRaw.new_field_5": - x.NewField_5 = value.Bytes() - case "testdata.TestUpdatedTxRaw.new_field_1024": - x.NewField_1024 = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxRaw")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxRaw 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_TestUpdatedTxRaw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestUpdatedTxRaw.signatures": - if x.Signatures == nil { - x.Signatures = [][]byte{} - } - value := &_TestUpdatedTxRaw_3_list{list: &x.Signatures} - return protoreflect.ValueOfList(value) - case "testdata.TestUpdatedTxRaw.body_bytes": - panic(fmt.Errorf("field body_bytes of message testdata.TestUpdatedTxRaw is not mutable")) - case "testdata.TestUpdatedTxRaw.auth_info_bytes": - panic(fmt.Errorf("field auth_info_bytes of message testdata.TestUpdatedTxRaw is not mutable")) - case "testdata.TestUpdatedTxRaw.new_field_5": - panic(fmt.Errorf("field new_field_5 of message testdata.TestUpdatedTxRaw is not mutable")) - case "testdata.TestUpdatedTxRaw.new_field_1024": - panic(fmt.Errorf("field new_field_1024 of message testdata.TestUpdatedTxRaw is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxRaw")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxRaw 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_TestUpdatedTxRaw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestUpdatedTxRaw.body_bytes": - return protoreflect.ValueOfBytes(nil) - case "testdata.TestUpdatedTxRaw.auth_info_bytes": - return protoreflect.ValueOfBytes(nil) - case "testdata.TestUpdatedTxRaw.signatures": - list := [][]byte{} - return protoreflect.ValueOfList(&_TestUpdatedTxRaw_3_list{list: &list}) - case "testdata.TestUpdatedTxRaw.new_field_5": - return protoreflect.ValueOfBytes(nil) - case "testdata.TestUpdatedTxRaw.new_field_1024": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxRaw")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxRaw 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_TestUpdatedTxRaw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestUpdatedTxRaw", 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_TestUpdatedTxRaw) 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_TestUpdatedTxRaw) 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_TestUpdatedTxRaw) 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_TestUpdatedTxRaw) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestUpdatedTxRaw) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.BodyBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AuthInfoBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Signatures) > 0 { - for _, b := range x.Signatures { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.NewField_5) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NewField_1024) - if l > 0 { - n += 2 + 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().(*TestUpdatedTxRaw) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NewField_1024) > 0 { - i -= len(x.NewField_1024) - copy(dAtA[i:], x.NewField_1024) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewField_1024))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0x82 - } - if len(x.NewField_5) > 0 { - i -= len(x.NewField_5) - copy(dAtA[i:], x.NewField_5) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewField_5))) - i-- - dAtA[i] = 0x2a - } - if len(x.Signatures) > 0 { - for iNdEx := len(x.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Signatures[iNdEx]) - copy(dAtA[i:], x.Signatures[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signatures[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.AuthInfoBytes) > 0 { - i -= len(x.AuthInfoBytes) - copy(dAtA[i:], x.AuthInfoBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthInfoBytes))) - i-- - dAtA[i] = 0x12 - } - if len(x.BodyBytes) > 0 { - i -= len(x.BodyBytes) - copy(dAtA[i:], x.BodyBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BodyBytes))) - 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().(*TestUpdatedTxRaw) - 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: TestUpdatedTxRaw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestUpdatedTxRaw: 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 BodyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BodyBytes = append(x.BodyBytes[:0], dAtA[iNdEx:postIndex]...) - if x.BodyBytes == nil { - x.BodyBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthInfoBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AuthInfoBytes = append(x.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AuthInfoBytes == nil { - x.AuthInfoBytes = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Signatures = append(x.Signatures, make([]byte, postIndex-iNdEx)) - copy(x.Signatures[len(x.Signatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewField_5", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NewField_5 = append(x.NewField_5[:0], dAtA[iNdEx:postIndex]...) - if x.NewField_5 == nil { - x.NewField_5 = []byte{} - } - iNdEx = postIndex - case 1024: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewField_1024", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NewField_1024 = append(x.NewField_1024[:0], dAtA[iNdEx:postIndex]...) - if x.NewField_1024 == nil { - x.NewField_1024 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestUpdatedTxBody_1_list)(nil) - -type _TestUpdatedTxBody_1_list struct { - list *[]*anypb.Any -} - -func (x *_TestUpdatedTxBody_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestUpdatedTxBody_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TestUpdatedTxBody_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestUpdatedTxBody_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestUpdatedTxBody_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestUpdatedTxBody_1023_list)(nil) - -type _TestUpdatedTxBody_1023_list struct { - list *[]*anypb.Any -} - -func (x *_TestUpdatedTxBody_1023_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestUpdatedTxBody_1023_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_1023_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TestUpdatedTxBody_1023_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestUpdatedTxBody_1023_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_1023_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestUpdatedTxBody_1023_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_1023_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_TestUpdatedTxBody_2047_list)(nil) - -type _TestUpdatedTxBody_2047_list struct { - list *[]*anypb.Any -} - -func (x *_TestUpdatedTxBody_2047_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestUpdatedTxBody_2047_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_2047_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_TestUpdatedTxBody_2047_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestUpdatedTxBody_2047_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_2047_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestUpdatedTxBody_2047_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedTxBody_2047_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestUpdatedTxBody protoreflect.MessageDescriptor - fd_TestUpdatedTxBody_messages protoreflect.FieldDescriptor - fd_TestUpdatedTxBody_memo protoreflect.FieldDescriptor - fd_TestUpdatedTxBody_timeout_height protoreflect.FieldDescriptor - fd_TestUpdatedTxBody_some_new_field protoreflect.FieldDescriptor - fd_TestUpdatedTxBody_some_new_field_non_critical_field protoreflect.FieldDescriptor - fd_TestUpdatedTxBody_extension_options protoreflect.FieldDescriptor - fd_TestUpdatedTxBody_non_critical_extension_options protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestUpdatedTxBody = File_unknonwnproto_proto.Messages().ByName("TestUpdatedTxBody") - fd_TestUpdatedTxBody_messages = md_TestUpdatedTxBody.Fields().ByName("messages") - fd_TestUpdatedTxBody_memo = md_TestUpdatedTxBody.Fields().ByName("memo") - fd_TestUpdatedTxBody_timeout_height = md_TestUpdatedTxBody.Fields().ByName("timeout_height") - fd_TestUpdatedTxBody_some_new_field = md_TestUpdatedTxBody.Fields().ByName("some_new_field") - fd_TestUpdatedTxBody_some_new_field_non_critical_field = md_TestUpdatedTxBody.Fields().ByName("some_new_field_non_critical_field") - fd_TestUpdatedTxBody_extension_options = md_TestUpdatedTxBody.Fields().ByName("extension_options") - fd_TestUpdatedTxBody_non_critical_extension_options = md_TestUpdatedTxBody.Fields().ByName("non_critical_extension_options") -} - -var _ protoreflect.Message = (*fastReflection_TestUpdatedTxBody)(nil) - -type fastReflection_TestUpdatedTxBody TestUpdatedTxBody - -func (x *TestUpdatedTxBody) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestUpdatedTxBody)(x) -} - -func (x *TestUpdatedTxBody) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestUpdatedTxBody_messageType fastReflection_TestUpdatedTxBody_messageType -var _ protoreflect.MessageType = fastReflection_TestUpdatedTxBody_messageType{} - -type fastReflection_TestUpdatedTxBody_messageType struct{} - -func (x fastReflection_TestUpdatedTxBody_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestUpdatedTxBody)(nil) -} -func (x fastReflection_TestUpdatedTxBody_messageType) New() protoreflect.Message { - return new(fastReflection_TestUpdatedTxBody) -} -func (x fastReflection_TestUpdatedTxBody_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestUpdatedTxBody -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestUpdatedTxBody) Descriptor() protoreflect.MessageDescriptor { - return md_TestUpdatedTxBody -} - -// 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_TestUpdatedTxBody) Type() protoreflect.MessageType { - return _fastReflection_TestUpdatedTxBody_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestUpdatedTxBody) New() protoreflect.Message { - return new(fastReflection_TestUpdatedTxBody) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestUpdatedTxBody) Interface() protoreflect.ProtoMessage { - return (*TestUpdatedTxBody)(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_TestUpdatedTxBody) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Messages) != 0 { - value := protoreflect.ValueOfList(&_TestUpdatedTxBody_1_list{list: &x.Messages}) - if !f(fd_TestUpdatedTxBody_messages, value) { - return - } - } - if x.Memo != "" { - value := protoreflect.ValueOfString(x.Memo) - if !f(fd_TestUpdatedTxBody_memo, value) { - return - } - } - if x.TimeoutHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.TimeoutHeight) - if !f(fd_TestUpdatedTxBody_timeout_height, value) { - return - } - } - if x.SomeNewField != uint64(0) { - value := protoreflect.ValueOfUint64(x.SomeNewField) - if !f(fd_TestUpdatedTxBody_some_new_field, value) { - return - } - } - if x.SomeNewFieldNonCriticalField != "" { - value := protoreflect.ValueOfString(x.SomeNewFieldNonCriticalField) - if !f(fd_TestUpdatedTxBody_some_new_field_non_critical_field, value) { - return - } - } - if len(x.ExtensionOptions) != 0 { - value := protoreflect.ValueOfList(&_TestUpdatedTxBody_1023_list{list: &x.ExtensionOptions}) - if !f(fd_TestUpdatedTxBody_extension_options, value) { - return - } - } - if len(x.NonCriticalExtensionOptions) != 0 { - value := protoreflect.ValueOfList(&_TestUpdatedTxBody_2047_list{list: &x.NonCriticalExtensionOptions}) - if !f(fd_TestUpdatedTxBody_non_critical_extension_options, 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_TestUpdatedTxBody) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestUpdatedTxBody.messages": - return len(x.Messages) != 0 - case "testdata.TestUpdatedTxBody.memo": - return x.Memo != "" - case "testdata.TestUpdatedTxBody.timeout_height": - return x.TimeoutHeight != int64(0) - case "testdata.TestUpdatedTxBody.some_new_field": - return x.SomeNewField != uint64(0) - case "testdata.TestUpdatedTxBody.some_new_field_non_critical_field": - return x.SomeNewFieldNonCriticalField != "" - case "testdata.TestUpdatedTxBody.extension_options": - return len(x.ExtensionOptions) != 0 - case "testdata.TestUpdatedTxBody.non_critical_extension_options": - return len(x.NonCriticalExtensionOptions) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxBody")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxBody 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_TestUpdatedTxBody) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestUpdatedTxBody.messages": - x.Messages = nil - case "testdata.TestUpdatedTxBody.memo": - x.Memo = "" - case "testdata.TestUpdatedTxBody.timeout_height": - x.TimeoutHeight = int64(0) - case "testdata.TestUpdatedTxBody.some_new_field": - x.SomeNewField = uint64(0) - case "testdata.TestUpdatedTxBody.some_new_field_non_critical_field": - x.SomeNewFieldNonCriticalField = "" - case "testdata.TestUpdatedTxBody.extension_options": - x.ExtensionOptions = nil - case "testdata.TestUpdatedTxBody.non_critical_extension_options": - x.NonCriticalExtensionOptions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxBody")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxBody 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_TestUpdatedTxBody) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestUpdatedTxBody.messages": - if len(x.Messages) == 0 { - return protoreflect.ValueOfList(&_TestUpdatedTxBody_1_list{}) - } - listValue := &_TestUpdatedTxBody_1_list{list: &x.Messages} - return protoreflect.ValueOfList(listValue) - case "testdata.TestUpdatedTxBody.memo": - value := x.Memo - return protoreflect.ValueOfString(value) - case "testdata.TestUpdatedTxBody.timeout_height": - value := x.TimeoutHeight - return protoreflect.ValueOfInt64(value) - case "testdata.TestUpdatedTxBody.some_new_field": - value := x.SomeNewField - return protoreflect.ValueOfUint64(value) - case "testdata.TestUpdatedTxBody.some_new_field_non_critical_field": - value := x.SomeNewFieldNonCriticalField - return protoreflect.ValueOfString(value) - case "testdata.TestUpdatedTxBody.extension_options": - if len(x.ExtensionOptions) == 0 { - return protoreflect.ValueOfList(&_TestUpdatedTxBody_1023_list{}) - } - listValue := &_TestUpdatedTxBody_1023_list{list: &x.ExtensionOptions} - return protoreflect.ValueOfList(listValue) - case "testdata.TestUpdatedTxBody.non_critical_extension_options": - if len(x.NonCriticalExtensionOptions) == 0 { - return protoreflect.ValueOfList(&_TestUpdatedTxBody_2047_list{}) - } - listValue := &_TestUpdatedTxBody_2047_list{list: &x.NonCriticalExtensionOptions} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxBody")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxBody 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_TestUpdatedTxBody) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestUpdatedTxBody.messages": - lv := value.List() - clv := lv.(*_TestUpdatedTxBody_1_list) - x.Messages = *clv.list - case "testdata.TestUpdatedTxBody.memo": - x.Memo = value.Interface().(string) - case "testdata.TestUpdatedTxBody.timeout_height": - x.TimeoutHeight = value.Int() - case "testdata.TestUpdatedTxBody.some_new_field": - x.SomeNewField = value.Uint() - case "testdata.TestUpdatedTxBody.some_new_field_non_critical_field": - x.SomeNewFieldNonCriticalField = value.Interface().(string) - case "testdata.TestUpdatedTxBody.extension_options": - lv := value.List() - clv := lv.(*_TestUpdatedTxBody_1023_list) - x.ExtensionOptions = *clv.list - case "testdata.TestUpdatedTxBody.non_critical_extension_options": - lv := value.List() - clv := lv.(*_TestUpdatedTxBody_2047_list) - x.NonCriticalExtensionOptions = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxBody")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxBody 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_TestUpdatedTxBody) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestUpdatedTxBody.messages": - if x.Messages == nil { - x.Messages = []*anypb.Any{} - } - value := &_TestUpdatedTxBody_1_list{list: &x.Messages} - return protoreflect.ValueOfList(value) - case "testdata.TestUpdatedTxBody.extension_options": - if x.ExtensionOptions == nil { - x.ExtensionOptions = []*anypb.Any{} - } - value := &_TestUpdatedTxBody_1023_list{list: &x.ExtensionOptions} - return protoreflect.ValueOfList(value) - case "testdata.TestUpdatedTxBody.non_critical_extension_options": - if x.NonCriticalExtensionOptions == nil { - x.NonCriticalExtensionOptions = []*anypb.Any{} - } - value := &_TestUpdatedTxBody_2047_list{list: &x.NonCriticalExtensionOptions} - return protoreflect.ValueOfList(value) - case "testdata.TestUpdatedTxBody.memo": - panic(fmt.Errorf("field memo of message testdata.TestUpdatedTxBody is not mutable")) - case "testdata.TestUpdatedTxBody.timeout_height": - panic(fmt.Errorf("field timeout_height of message testdata.TestUpdatedTxBody is not mutable")) - case "testdata.TestUpdatedTxBody.some_new_field": - panic(fmt.Errorf("field some_new_field of message testdata.TestUpdatedTxBody is not mutable")) - case "testdata.TestUpdatedTxBody.some_new_field_non_critical_field": - panic(fmt.Errorf("field some_new_field_non_critical_field of message testdata.TestUpdatedTxBody is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxBody")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxBody 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_TestUpdatedTxBody) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestUpdatedTxBody.messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TestUpdatedTxBody_1_list{list: &list}) - case "testdata.TestUpdatedTxBody.memo": - return protoreflect.ValueOfString("") - case "testdata.TestUpdatedTxBody.timeout_height": - return protoreflect.ValueOfInt64(int64(0)) - case "testdata.TestUpdatedTxBody.some_new_field": - return protoreflect.ValueOfUint64(uint64(0)) - case "testdata.TestUpdatedTxBody.some_new_field_non_critical_field": - return protoreflect.ValueOfString("") - case "testdata.TestUpdatedTxBody.extension_options": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TestUpdatedTxBody_1023_list{list: &list}) - case "testdata.TestUpdatedTxBody.non_critical_extension_options": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_TestUpdatedTxBody_2047_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedTxBody")) - } - panic(fmt.Errorf("message testdata.TestUpdatedTxBody 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_TestUpdatedTxBody) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestUpdatedTxBody", 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_TestUpdatedTxBody) 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_TestUpdatedTxBody) 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_TestUpdatedTxBody) 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_TestUpdatedTxBody) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestUpdatedTxBody) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Messages) > 0 { - for _, e := range x.Messages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Memo) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TimeoutHeight != 0 { - n += 1 + runtime.Sov(uint64(x.TimeoutHeight)) - } - if x.SomeNewField != 0 { - n += 1 + runtime.Sov(uint64(x.SomeNewField)) - } - l = len(x.SomeNewFieldNonCriticalField) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if len(x.ExtensionOptions) > 0 { - for _, e := range x.ExtensionOptions { - l = options.Size(e) - n += 2 + l + runtime.Sov(uint64(l)) - } - } - if len(x.NonCriticalExtensionOptions) > 0 { - for _, e := range x.NonCriticalExtensionOptions { - l = options.Size(e) - n += 2 + 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().(*TestUpdatedTxBody) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NonCriticalExtensionOptions) > 0 { - for iNdEx := len(x.NonCriticalExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.NonCriticalExtensionOptions[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] = 0x7f - i-- - dAtA[i] = 0xfa - } - } - if len(x.SomeNewFieldNonCriticalField) > 0 { - i -= len(x.SomeNewFieldNonCriticalField) - copy(dAtA[i:], x.SomeNewFieldNonCriticalField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SomeNewFieldNonCriticalField))) - i-- - dAtA[i] = 0x41 - i-- - dAtA[i] = 0xd2 - } - if len(x.ExtensionOptions) > 0 { - for iNdEx := len(x.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExtensionOptions[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] = 0x3f - i-- - dAtA[i] = 0xfa - } - } - if x.SomeNewField != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SomeNewField)) - i-- - dAtA[i] = 0x20 - } - if x.TimeoutHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TimeoutHeight)) - i-- - dAtA[i] = 0x18 - } - if len(x.Memo) > 0 { - i -= len(x.Memo) - copy(dAtA[i:], x.Memo) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Memo))) - i-- - dAtA[i] = 0x12 - } - if len(x.Messages) > 0 { - for iNdEx := len(x.Messages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Messages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestUpdatedTxBody) - 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: TestUpdatedTxBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestUpdatedTxBody: 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 Messages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Messages = append(x.Messages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Messages[len(x.Messages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Memo", 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.Memo = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) - } - x.TimeoutHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TimeoutHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeNewField", wireType) - } - x.SomeNewField = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SomeNewField |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 1050: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeNewFieldNonCriticalField", 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.SomeNewFieldNonCriticalField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1023: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExtensionOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ExtensionOptions = append(x.ExtensionOptions, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExtensionOptions[len(x.ExtensionOptions)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2047: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonCriticalExtensionOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NonCriticalExtensionOptions = append(x.NonCriticalExtensionOptions, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NonCriticalExtensionOptions[len(x.NonCriticalExtensionOptions)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestUpdatedAuthInfo_1_list)(nil) - -type _TestUpdatedAuthInfo_1_list struct { - list *[]*v1beta1.SignerInfo -} - -func (x *_TestUpdatedAuthInfo_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestUpdatedAuthInfo_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_TestUpdatedAuthInfo_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.SignerInfo) - (*x.list)[i] = concreteValue -} - -func (x *_TestUpdatedAuthInfo_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.SignerInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestUpdatedAuthInfo_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.SignerInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedAuthInfo_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_TestUpdatedAuthInfo_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.SignerInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_TestUpdatedAuthInfo_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestUpdatedAuthInfo protoreflect.MessageDescriptor - fd_TestUpdatedAuthInfo_signer_infos protoreflect.FieldDescriptor - fd_TestUpdatedAuthInfo_fee protoreflect.FieldDescriptor - fd_TestUpdatedAuthInfo_new_field_3 protoreflect.FieldDescriptor - fd_TestUpdatedAuthInfo_new_field_1024 protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestUpdatedAuthInfo = File_unknonwnproto_proto.Messages().ByName("TestUpdatedAuthInfo") - fd_TestUpdatedAuthInfo_signer_infos = md_TestUpdatedAuthInfo.Fields().ByName("signer_infos") - fd_TestUpdatedAuthInfo_fee = md_TestUpdatedAuthInfo.Fields().ByName("fee") - fd_TestUpdatedAuthInfo_new_field_3 = md_TestUpdatedAuthInfo.Fields().ByName("new_field_3") - fd_TestUpdatedAuthInfo_new_field_1024 = md_TestUpdatedAuthInfo.Fields().ByName("new_field_1024") -} - -var _ protoreflect.Message = (*fastReflection_TestUpdatedAuthInfo)(nil) - -type fastReflection_TestUpdatedAuthInfo TestUpdatedAuthInfo - -func (x *TestUpdatedAuthInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestUpdatedAuthInfo)(x) -} - -func (x *TestUpdatedAuthInfo) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestUpdatedAuthInfo_messageType fastReflection_TestUpdatedAuthInfo_messageType -var _ protoreflect.MessageType = fastReflection_TestUpdatedAuthInfo_messageType{} - -type fastReflection_TestUpdatedAuthInfo_messageType struct{} - -func (x fastReflection_TestUpdatedAuthInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestUpdatedAuthInfo)(nil) -} -func (x fastReflection_TestUpdatedAuthInfo_messageType) New() protoreflect.Message { - return new(fastReflection_TestUpdatedAuthInfo) -} -func (x fastReflection_TestUpdatedAuthInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestUpdatedAuthInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestUpdatedAuthInfo) Descriptor() protoreflect.MessageDescriptor { - return md_TestUpdatedAuthInfo -} - -// 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_TestUpdatedAuthInfo) Type() protoreflect.MessageType { - return _fastReflection_TestUpdatedAuthInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestUpdatedAuthInfo) New() protoreflect.Message { - return new(fastReflection_TestUpdatedAuthInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestUpdatedAuthInfo) Interface() protoreflect.ProtoMessage { - return (*TestUpdatedAuthInfo)(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_TestUpdatedAuthInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SignerInfos) != 0 { - value := protoreflect.ValueOfList(&_TestUpdatedAuthInfo_1_list{list: &x.SignerInfos}) - if !f(fd_TestUpdatedAuthInfo_signer_infos, value) { - return - } - } - if x.Fee != nil { - value := protoreflect.ValueOfMessage(x.Fee.ProtoReflect()) - if !f(fd_TestUpdatedAuthInfo_fee, value) { - return - } - } - if len(x.NewField_3) != 0 { - value := protoreflect.ValueOfBytes(x.NewField_3) - if !f(fd_TestUpdatedAuthInfo_new_field_3, value) { - return - } - } - if len(x.NewField_1024) != 0 { - value := protoreflect.ValueOfBytes(x.NewField_1024) - if !f(fd_TestUpdatedAuthInfo_new_field_1024, 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_TestUpdatedAuthInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestUpdatedAuthInfo.signer_infos": - return len(x.SignerInfos) != 0 - case "testdata.TestUpdatedAuthInfo.fee": - return x.Fee != nil - case "testdata.TestUpdatedAuthInfo.new_field_3": - return len(x.NewField_3) != 0 - case "testdata.TestUpdatedAuthInfo.new_field_1024": - return len(x.NewField_1024) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedAuthInfo")) - } - panic(fmt.Errorf("message testdata.TestUpdatedAuthInfo 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_TestUpdatedAuthInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestUpdatedAuthInfo.signer_infos": - x.SignerInfos = nil - case "testdata.TestUpdatedAuthInfo.fee": - x.Fee = nil - case "testdata.TestUpdatedAuthInfo.new_field_3": - x.NewField_3 = nil - case "testdata.TestUpdatedAuthInfo.new_field_1024": - x.NewField_1024 = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedAuthInfo")) - } - panic(fmt.Errorf("message testdata.TestUpdatedAuthInfo 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_TestUpdatedAuthInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestUpdatedAuthInfo.signer_infos": - if len(x.SignerInfos) == 0 { - return protoreflect.ValueOfList(&_TestUpdatedAuthInfo_1_list{}) - } - listValue := &_TestUpdatedAuthInfo_1_list{list: &x.SignerInfos} - return protoreflect.ValueOfList(listValue) - case "testdata.TestUpdatedAuthInfo.fee": - value := x.Fee - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testdata.TestUpdatedAuthInfo.new_field_3": - value := x.NewField_3 - return protoreflect.ValueOfBytes(value) - case "testdata.TestUpdatedAuthInfo.new_field_1024": - value := x.NewField_1024 - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedAuthInfo")) - } - panic(fmt.Errorf("message testdata.TestUpdatedAuthInfo 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_TestUpdatedAuthInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestUpdatedAuthInfo.signer_infos": - lv := value.List() - clv := lv.(*_TestUpdatedAuthInfo_1_list) - x.SignerInfos = *clv.list - case "testdata.TestUpdatedAuthInfo.fee": - x.Fee = value.Message().Interface().(*v1beta1.Fee) - case "testdata.TestUpdatedAuthInfo.new_field_3": - x.NewField_3 = value.Bytes() - case "testdata.TestUpdatedAuthInfo.new_field_1024": - x.NewField_1024 = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedAuthInfo")) - } - panic(fmt.Errorf("message testdata.TestUpdatedAuthInfo 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_TestUpdatedAuthInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestUpdatedAuthInfo.signer_infos": - if x.SignerInfos == nil { - x.SignerInfos = []*v1beta1.SignerInfo{} - } - value := &_TestUpdatedAuthInfo_1_list{list: &x.SignerInfos} - return protoreflect.ValueOfList(value) - case "testdata.TestUpdatedAuthInfo.fee": - if x.Fee == nil { - x.Fee = new(v1beta1.Fee) - } - return protoreflect.ValueOfMessage(x.Fee.ProtoReflect()) - case "testdata.TestUpdatedAuthInfo.new_field_3": - panic(fmt.Errorf("field new_field_3 of message testdata.TestUpdatedAuthInfo is not mutable")) - case "testdata.TestUpdatedAuthInfo.new_field_1024": - panic(fmt.Errorf("field new_field_1024 of message testdata.TestUpdatedAuthInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedAuthInfo")) - } - panic(fmt.Errorf("message testdata.TestUpdatedAuthInfo 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_TestUpdatedAuthInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestUpdatedAuthInfo.signer_infos": - list := []*v1beta1.SignerInfo{} - return protoreflect.ValueOfList(&_TestUpdatedAuthInfo_1_list{list: &list}) - case "testdata.TestUpdatedAuthInfo.fee": - m := new(v1beta1.Fee) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testdata.TestUpdatedAuthInfo.new_field_3": - return protoreflect.ValueOfBytes(nil) - case "testdata.TestUpdatedAuthInfo.new_field_1024": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestUpdatedAuthInfo")) - } - panic(fmt.Errorf("message testdata.TestUpdatedAuthInfo 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_TestUpdatedAuthInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestUpdatedAuthInfo", 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_TestUpdatedAuthInfo) 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_TestUpdatedAuthInfo) 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_TestUpdatedAuthInfo) 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_TestUpdatedAuthInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestUpdatedAuthInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.SignerInfos) > 0 { - for _, e := range x.SignerInfos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Fee != nil { - l = options.Size(x.Fee) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NewField_3) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NewField_1024) - if l > 0 { - n += 2 + 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().(*TestUpdatedAuthInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.NewField_1024) > 0 { - i -= len(x.NewField_1024) - copy(dAtA[i:], x.NewField_1024) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewField_1024))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0x82 - } - if len(x.NewField_3) > 0 { - i -= len(x.NewField_3) - copy(dAtA[i:], x.NewField_3) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewField_3))) - i-- - dAtA[i] = 0x1a - } - if x.Fee != nil { - encoded, err := options.Marshal(x.Fee) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.SignerInfos) > 0 { - for iNdEx := len(x.SignerInfos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SignerInfos[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TestUpdatedAuthInfo) - 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: TestUpdatedAuthInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestUpdatedAuthInfo: 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 SignerInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SignerInfos = append(x.SignerInfos, &v1beta1.SignerInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignerInfos[len(x.SignerInfos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fee", 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.Fee == nil { - x.Fee = &v1beta1.Fee{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Fee); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewField_3", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NewField_3 = append(x.NewField_3[:0], dAtA[iNdEx:postIndex]...) - if x.NewField_3 == nil { - x.NewField_3 = []byte{} - } - iNdEx = postIndex - case 1024: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewField_1024", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NewField_1024 = append(x.NewField_1024[:0], dAtA[iNdEx:postIndex]...) - if x.NewField_1024 == nil { - x.NewField_1024 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_TestRepeatedUints_1_list)(nil) - -type _TestRepeatedUints_1_list struct { - list *[]uint64 -} - -func (x *_TestRepeatedUints_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_TestRepeatedUints_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_TestRepeatedUints_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_TestRepeatedUints_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_TestRepeatedUints_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message TestRepeatedUints at list field Nums as it is not of Message kind")) -} - -func (x *_TestRepeatedUints_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_TestRepeatedUints_1_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_TestRepeatedUints_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_TestRepeatedUints protoreflect.MessageDescriptor - fd_TestRepeatedUints_nums protoreflect.FieldDescriptor -) - -func init() { - file_unknonwnproto_proto_init() - md_TestRepeatedUints = File_unknonwnproto_proto.Messages().ByName("TestRepeatedUints") - fd_TestRepeatedUints_nums = md_TestRepeatedUints.Fields().ByName("nums") -} - -var _ protoreflect.Message = (*fastReflection_TestRepeatedUints)(nil) - -type fastReflection_TestRepeatedUints TestRepeatedUints - -func (x *TestRepeatedUints) ProtoReflect() protoreflect.Message { - return (*fastReflection_TestRepeatedUints)(x) -} - -func (x *TestRepeatedUints) slowProtoReflect() protoreflect.Message { - mi := &file_unknonwnproto_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TestRepeatedUints_messageType fastReflection_TestRepeatedUints_messageType -var _ protoreflect.MessageType = fastReflection_TestRepeatedUints_messageType{} - -type fastReflection_TestRepeatedUints_messageType struct{} - -func (x fastReflection_TestRepeatedUints_messageType) Zero() protoreflect.Message { - return (*fastReflection_TestRepeatedUints)(nil) -} -func (x fastReflection_TestRepeatedUints_messageType) New() protoreflect.Message { - return new(fastReflection_TestRepeatedUints) -} -func (x fastReflection_TestRepeatedUints_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TestRepeatedUints -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TestRepeatedUints) Descriptor() protoreflect.MessageDescriptor { - return md_TestRepeatedUints -} - -// 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_TestRepeatedUints) Type() protoreflect.MessageType { - return _fastReflection_TestRepeatedUints_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TestRepeatedUints) New() protoreflect.Message { - return new(fastReflection_TestRepeatedUints) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TestRepeatedUints) Interface() protoreflect.ProtoMessage { - return (*TestRepeatedUints)(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_TestRepeatedUints) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Nums) != 0 { - value := protoreflect.ValueOfList(&_TestRepeatedUints_1_list{list: &x.Nums}) - if !f(fd_TestRepeatedUints_nums, 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_TestRepeatedUints) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testdata.TestRepeatedUints.nums": - return len(x.Nums) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestRepeatedUints")) - } - panic(fmt.Errorf("message testdata.TestRepeatedUints 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_TestRepeatedUints) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testdata.TestRepeatedUints.nums": - x.Nums = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestRepeatedUints")) - } - panic(fmt.Errorf("message testdata.TestRepeatedUints 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_TestRepeatedUints) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testdata.TestRepeatedUints.nums": - if len(x.Nums) == 0 { - return protoreflect.ValueOfList(&_TestRepeatedUints_1_list{}) - } - listValue := &_TestRepeatedUints_1_list{list: &x.Nums} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestRepeatedUints")) - } - panic(fmt.Errorf("message testdata.TestRepeatedUints 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_TestRepeatedUints) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testdata.TestRepeatedUints.nums": - lv := value.List() - clv := lv.(*_TestRepeatedUints_1_list) - x.Nums = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestRepeatedUints")) - } - panic(fmt.Errorf("message testdata.TestRepeatedUints 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_TestRepeatedUints) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestRepeatedUints.nums": - if x.Nums == nil { - x.Nums = []uint64{} - } - value := &_TestRepeatedUints_1_list{list: &x.Nums} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestRepeatedUints")) - } - panic(fmt.Errorf("message testdata.TestRepeatedUints 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_TestRepeatedUints) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testdata.TestRepeatedUints.nums": - list := []uint64{} - return protoreflect.ValueOfList(&_TestRepeatedUints_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestRepeatedUints")) - } - panic(fmt.Errorf("message testdata.TestRepeatedUints 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_TestRepeatedUints) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testdata.TestRepeatedUints", 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_TestRepeatedUints) 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_TestRepeatedUints) 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_TestRepeatedUints) 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_TestRepeatedUints) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TestRepeatedUints) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Nums) > 0 { - l = 0 - for _, e := range x.Nums { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TestRepeatedUints) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Nums) > 0 { - var pksize2 int - for _, num := range x.Nums { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.Nums { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 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().(*TestRepeatedUints) - 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: TestRepeatedUints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestRepeatedUints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Nums = append(x.Nums, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.Nums) == 0 { - x.Nums = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Nums = append(x.Nums, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nums", wireType) - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: unknonwnproto.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Customer2_City int32 - -const ( - Customer2_Laos Customer2_City = 0 - Customer2_LosAngeles Customer2_City = 1 - Customer2_PaloAlto Customer2_City = 2 - Customer2_Moscow Customer2_City = 3 - Customer2_Nairobi Customer2_City = 4 -) - -// Enum value maps for Customer2_City. -var ( - Customer2_City_name = map[int32]string{ - 0: "Laos", - 1: "LosAngeles", - 2: "PaloAlto", - 3: "Moscow", - 4: "Nairobi", - } - Customer2_City_value = map[string]int32{ - "Laos": 0, - "LosAngeles": 1, - "PaloAlto": 2, - "Moscow": 3, - "Nairobi": 4, - } -) - -func (x Customer2_City) Enum() *Customer2_City { - p := new(Customer2_City) - *p = x - return p -} - -func (x Customer2_City) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Customer2_City) Descriptor() protoreflect.EnumDescriptor { - return file_unknonwnproto_proto_enumTypes[0].Descriptor() -} - -func (Customer2_City) Type() protoreflect.EnumType { - return &file_unknonwnproto_proto_enumTypes[0] -} - -func (x Customer2_City) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Customer2_City.Descriptor instead. -func (Customer2_City) EnumDescriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{1, 0} -} - -type Customer1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - SubscriptionFee float32 `protobuf:"fixed32,3,opt,name=subscription_fee,json=subscriptionFee,proto3" json:"subscription_fee,omitempty"` - Payment string `protobuf:"bytes,7,opt,name=payment,proto3" json:"payment,omitempty"` -} - -func (x *Customer1) Reset() { - *x = Customer1{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Customer1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Customer1) ProtoMessage() {} - -// Deprecated: Use Customer1.ProtoReflect.Descriptor instead. -func (*Customer1) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{0} -} - -func (x *Customer1) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Customer1) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Customer1) GetSubscriptionFee() float32 { - if x != nil { - return x.SubscriptionFee - } - return 0 -} - -func (x *Customer1) GetPayment() string { - if x != nil { - return x.Payment - } - return "" -} - -type Customer2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Industry int32 `protobuf:"varint,2,opt,name=industry,proto3" json:"industry,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Fewer float32 `protobuf:"fixed32,4,opt,name=fewer,proto3" json:"fewer,omitempty"` - Reserved int64 `protobuf:"varint,1047,opt,name=reserved,proto3" json:"reserved,omitempty"` - City Customer2_City `protobuf:"varint,6,opt,name=city,proto3,enum=testdata.Customer2_City" json:"city,omitempty"` - Miscellaneous *anypb.Any `protobuf:"bytes,10,opt,name=miscellaneous,proto3" json:"miscellaneous,omitempty"` -} - -func (x *Customer2) Reset() { - *x = Customer2{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Customer2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Customer2) ProtoMessage() {} - -// Deprecated: Use Customer2.ProtoReflect.Descriptor instead. -func (*Customer2) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{1} -} - -func (x *Customer2) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Customer2) GetIndustry() int32 { - if x != nil { - return x.Industry - } - return 0 -} - -func (x *Customer2) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Customer2) GetFewer() float32 { - if x != nil { - return x.Fewer - } - return 0 -} - -func (x *Customer2) GetReserved() int64 { - if x != nil { - return x.Reserved - } - return 0 -} - -func (x *Customer2) GetCity() Customer2_City { - if x != nil { - return x.City - } - return Customer2_Laos -} - -func (x *Customer2) GetMiscellaneous() *anypb.Any { - if x != nil { - return x.Miscellaneous - } - return nil -} - -type Nested4A struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Nested4A) Reset() { - *x = Nested4A{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested4A) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested4A) ProtoMessage() {} - -// Deprecated: Use Nested4A.ProtoReflect.Descriptor instead. -func (*Nested4A) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{2} -} - -func (x *Nested4A) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested4A) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type Nested3A struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - A4 []*Nested4A `protobuf:"bytes,4,rep,name=a4,proto3" json:"a4,omitempty"` - Index map[int64]*Nested4A `protobuf:"bytes,5,rep,name=index,proto3" json:"index,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Nested3A) Reset() { - *x = Nested3A{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested3A) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested3A) ProtoMessage() {} - -// Deprecated: Use Nested3A.ProtoReflect.Descriptor instead. -func (*Nested3A) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{3} -} - -func (x *Nested3A) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested3A) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Nested3A) GetA4() []*Nested4A { - if x != nil { - return x.A4 - } - return nil -} - -func (x *Nested3A) GetIndex() map[int64]*Nested4A { - if x != nil { - return x.Index - } - return nil -} - -type Nested2A struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Nested *Nested3A `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"` -} - -func (x *Nested2A) Reset() { - *x = Nested2A{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested2A) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested2A) ProtoMessage() {} - -// Deprecated: Use Nested2A.ProtoReflect.Descriptor instead. -func (*Nested2A) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{4} -} - -func (x *Nested2A) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested2A) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Nested2A) GetNested() *Nested3A { - if x != nil { - return x.Nested - } - return nil -} - -type Nested1A struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Nested *Nested2A `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` -} - -func (x *Nested1A) Reset() { - *x = Nested1A{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested1A) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested1A) ProtoMessage() {} - -// Deprecated: Use Nested1A.ProtoReflect.Descriptor instead. -func (*Nested1A) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{5} -} - -func (x *Nested1A) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested1A) GetNested() *Nested2A { - if x != nil { - return x.Nested - } - return nil -} - -type Nested4B struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Nested4B) Reset() { - *x = Nested4B{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested4B) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested4B) ProtoMessage() {} - -// Deprecated: Use Nested4B.ProtoReflect.Descriptor instead. -func (*Nested4B) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{6} -} - -func (x *Nested4B) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested4B) GetAge() int32 { - if x != nil { - return x.Age - } - return 0 -} - -func (x *Nested4B) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type Nested3B struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - B4 []*Nested4B `protobuf:"bytes,4,rep,name=b4,proto3" json:"b4,omitempty"` -} - -func (x *Nested3B) Reset() { - *x = Nested3B{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested3B) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested3B) ProtoMessage() {} - -// Deprecated: Use Nested3B.ProtoReflect.Descriptor instead. -func (*Nested3B) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{7} -} - -func (x *Nested3B) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested3B) GetAge() int32 { - if x != nil { - return x.Age - } - return 0 -} - -func (x *Nested3B) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Nested3B) GetB4() []*Nested4B { - if x != nil { - return x.B4 - } - return nil -} - -type Nested2B struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Fee float64 `protobuf:"fixed64,2,opt,name=fee,proto3" json:"fee,omitempty"` - Nested *Nested3B `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"` - Route string `protobuf:"bytes,4,opt,name=route,proto3" json:"route,omitempty"` -} - -func (x *Nested2B) Reset() { - *x = Nested2B{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested2B) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested2B) ProtoMessage() {} - -// Deprecated: Use Nested2B.ProtoReflect.Descriptor instead. -func (*Nested2B) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{8} -} - -func (x *Nested2B) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested2B) GetFee() float64 { - if x != nil { - return x.Fee - } - return 0 -} - -func (x *Nested2B) GetNested() *Nested3B { - if x != nil { - return x.Nested - } - return nil -} - -func (x *Nested2B) GetRoute() string { - if x != nil { - return x.Route - } - return "" -} - -type Nested1B struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Nested *Nested2B `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` - Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` -} - -func (x *Nested1B) Reset() { - *x = Nested1B{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nested1B) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nested1B) ProtoMessage() {} - -// Deprecated: Use Nested1B.ProtoReflect.Descriptor instead. -func (*Nested1B) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{9} -} - -func (x *Nested1B) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Nested1B) GetNested() *Nested2B { - if x != nil { - return x.Nested - } - return nil -} - -func (x *Nested1B) GetAge() int32 { - if x != nil { - return x.Age - } - return 0 -} - -type Customer3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Sf float32 `protobuf:"fixed32,3,opt,name=sf,proto3" json:"sf,omitempty"` - Surcharge float32 `protobuf:"fixed32,4,opt,name=surcharge,proto3" json:"surcharge,omitempty"` - Destination string `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"` - // Types that are assignable to Payment: - // *Customer3_CreditCardNo - // *Customer3_ChequeNo - Payment isCustomer3_Payment `protobuf_oneof:"payment"` - Original *Customer1 `protobuf:"bytes,9,opt,name=original,proto3" json:"original,omitempty"` -} - -func (x *Customer3) Reset() { - *x = Customer3{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Customer3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Customer3) ProtoMessage() {} - -// Deprecated: Use Customer3.ProtoReflect.Descriptor instead. -func (*Customer3) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{10} -} - -func (x *Customer3) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Customer3) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Customer3) GetSf() float32 { - if x != nil { - return x.Sf - } - return 0 -} - -func (x *Customer3) GetSurcharge() float32 { - if x != nil { - return x.Surcharge - } - return 0 -} - -func (x *Customer3) GetDestination() string { - if x != nil { - return x.Destination - } - return "" -} - -func (x *Customer3) GetPayment() isCustomer3_Payment { - if x != nil { - return x.Payment - } - return nil -} - -func (x *Customer3) GetCreditCardNo() string { - if x, ok := x.GetPayment().(*Customer3_CreditCardNo); ok { - return x.CreditCardNo - } - return "" -} - -func (x *Customer3) GetChequeNo() string { - if x, ok := x.GetPayment().(*Customer3_ChequeNo); ok { - return x.ChequeNo - } - return "" -} - -func (x *Customer3) GetOriginal() *Customer1 { - if x != nil { - return x.Original - } - return nil -} - -type isCustomer3_Payment interface { - isCustomer3_Payment() -} - -type Customer3_CreditCardNo struct { - CreditCardNo string `protobuf:"bytes,7,opt,name=credit_card_no,json=creditCardNo,proto3,oneof"` -} - -type Customer3_ChequeNo struct { - ChequeNo string `protobuf:"bytes,8,opt,name=cheque_no,json=chequeNo,proto3,oneof"` -} - -func (*Customer3_CreditCardNo) isCustomer3_Payment() {} - -func (*Customer3_ChequeNo) isCustomer3_Payment() {} - -type TestVersion1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion1 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` // [(gogoproto.nullable) = false] generates invalid recursive structs; - C []*TestVersion1 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion1 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` - // Types that are assignable to Sum: - // *TestVersion1_E - // *TestVersion1_F - Sum isTestVersion1_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` // [(gogoproto.castrepeated) = "TestVersion1"]; - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - K *Customer1 `protobuf:"bytes,12,opt,name=k,proto3" json:"k,omitempty"` -} - -func (x *TestVersion1) Reset() { - *x = TestVersion1{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion1) ProtoMessage() {} - -// Deprecated: Use TestVersion1.ProtoReflect.Descriptor instead. -func (*TestVersion1) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{11} -} - -func (x *TestVersion1) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersion1) GetA() *TestVersion1 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersion1) GetB() *TestVersion1 { - if x != nil { - return x.B - } - return nil -} - -func (x *TestVersion1) GetC() []*TestVersion1 { - if x != nil { - return x.C - } - return nil -} - -func (x *TestVersion1) GetD() []*TestVersion1 { - if x != nil { - return x.D - } - return nil -} - -func (x *TestVersion1) GetSum() isTestVersion1_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersion1) GetE() int32 { - if x, ok := x.GetSum().(*TestVersion1_E); ok { - return x.E - } - return 0 -} - -func (x *TestVersion1) GetF() *TestVersion1 { - if x, ok := x.GetSum().(*TestVersion1_F); ok { - return x.F - } - return nil -} - -func (x *TestVersion1) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersion1) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -func (x *TestVersion1) GetK() *Customer1 { - if x != nil { - return x.K - } - return nil -} - -type isTestVersion1_Sum interface { - isTestVersion1_Sum() -} - -type TestVersion1_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof"` -} - -type TestVersion1_F struct { - F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersion1_E) isTestVersion1_Sum() {} - -func (*TestVersion1_F) isTestVersion1_Sum() {} - -type TestVersion2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion2 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion2 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` // [(gogoproto.nullable) = false]; - C []*TestVersion2 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion2 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // [(gogoproto.nullable) = false]; - // Types that are assignable to Sum: - // *TestVersion2_E - // *TestVersion2_F - Sum isTestVersion2_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` // [(gogoproto.castrepeated) = "TestVersion1"]; - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - K *Customer1 `protobuf:"bytes,12,opt,name=k,proto3" json:"k,omitempty"` - NewField_ uint64 `protobuf:"varint,25,opt,name=new_field,json=newField,proto3" json:"new_field,omitempty"` -} - -func (x *TestVersion2) Reset() { - *x = TestVersion2{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion2) ProtoMessage() {} - -// Deprecated: Use TestVersion2.ProtoReflect.Descriptor instead. -func (*TestVersion2) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{12} -} - -func (x *TestVersion2) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersion2) GetA() *TestVersion2 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersion2) GetB() *TestVersion2 { - if x != nil { - return x.B - } - return nil -} - -func (x *TestVersion2) GetC() []*TestVersion2 { - if x != nil { - return x.C - } - return nil -} - -func (x *TestVersion2) GetD() []*TestVersion2 { - if x != nil { - return x.D - } - return nil -} - -func (x *TestVersion2) GetSum() isTestVersion2_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersion2) GetE() int32 { - if x, ok := x.GetSum().(*TestVersion2_E); ok { - return x.E - } - return 0 -} - -func (x *TestVersion2) GetF() *TestVersion2 { - if x, ok := x.GetSum().(*TestVersion2_F); ok { - return x.F - } - return nil -} - -func (x *TestVersion2) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersion2) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -func (x *TestVersion2) GetK() *Customer1 { - if x != nil { - return x.K - } - return nil -} - -func (x *TestVersion2) GetNewField_() uint64 { - if x != nil { - return x.NewField_ - } - return 0 -} - -type isTestVersion2_Sum interface { - isTestVersion2_Sum() -} - -type TestVersion2_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof"` -} - -type TestVersion2_F struct { - F *TestVersion2 `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersion2_E) isTestVersion2_Sum() {} - -func (*TestVersion2_F) isTestVersion2_Sum() {} - -type TestVersion3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` // [(gogoproto.nullable) = false]; - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // [(gogoproto.nullable) = false]; - // Types that are assignable to Sum: - // *TestVersion3_E - // *TestVersion3_F - Sum isTestVersion3_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` //[(gogoproto.castrepeated) = "TestVersion1"]; - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - K *Customer1 `protobuf:"bytes,12,opt,name=k,proto3" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` -} - -func (x *TestVersion3) Reset() { - *x = TestVersion3{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3) ProtoMessage() {} - -// Deprecated: Use TestVersion3.ProtoReflect.Descriptor instead. -func (*TestVersion3) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{13} -} - -func (x *TestVersion3) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersion3) GetA() *TestVersion3 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersion3) GetB() *TestVersion3 { - if x != nil { - return x.B - } - return nil -} - -func (x *TestVersion3) GetC() []*TestVersion3 { - if x != nil { - return x.C - } - return nil -} - -func (x *TestVersion3) GetD() []*TestVersion3 { - if x != nil { - return x.D - } - return nil -} - -func (x *TestVersion3) GetSum() isTestVersion3_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersion3) GetE() int32 { - if x, ok := x.GetSum().(*TestVersion3_E); ok { - return x.E - } - return 0 -} - -func (x *TestVersion3) GetF() *TestVersion3 { - if x, ok := x.GetSum().(*TestVersion3_F); ok { - return x.F - } - return nil -} - -func (x *TestVersion3) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersion3) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -func (x *TestVersion3) GetK() *Customer1 { - if x != nil { - return x.K - } - return nil -} - -func (x *TestVersion3) GetNonCriticalField() string { - if x != nil { - return x.NonCriticalField - } - return "" -} - -type isTestVersion3_Sum interface { - isTestVersion3_Sum() -} - -type TestVersion3_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof"` -} - -type TestVersion3_F struct { - F *TestVersion3 `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersion3_E) isTestVersion3_Sum() {} - -func (*TestVersion3_F) isTestVersion3_Sum() {} - -type TestVersion3LoneOneOfValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` // [(gogoproto.nullable) = false]; - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // [(gogoproto.nullable) = false]; - // Types that are assignable to Sum: - // *TestVersion3LoneOneOfValue_E - Sum isTestVersion3LoneOneOfValue_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` //[(gogoproto.castrepeated) = "TestVersion1"]; - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - K *Customer1 `protobuf:"bytes,12,opt,name=k,proto3" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` -} - -func (x *TestVersion3LoneOneOfValue) Reset() { - *x = TestVersion3LoneOneOfValue{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3LoneOneOfValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3LoneOneOfValue) ProtoMessage() {} - -// Deprecated: Use TestVersion3LoneOneOfValue.ProtoReflect.Descriptor instead. -func (*TestVersion3LoneOneOfValue) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{14} -} - -func (x *TestVersion3LoneOneOfValue) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersion3LoneOneOfValue) GetA() *TestVersion3 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetB() *TestVersion3 { - if x != nil { - return x.B - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetC() []*TestVersion3 { - if x != nil { - return x.C - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetD() []*TestVersion3 { - if x != nil { - return x.D - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetSum() isTestVersion3LoneOneOfValue_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetE() int32 { - if x, ok := x.GetSum().(*TestVersion3LoneOneOfValue_E); ok { - return x.E - } - return 0 -} - -func (x *TestVersion3LoneOneOfValue) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetK() *Customer1 { - if x != nil { - return x.K - } - return nil -} - -func (x *TestVersion3LoneOneOfValue) GetNonCriticalField() string { - if x != nil { - return x.NonCriticalField - } - return "" -} - -type isTestVersion3LoneOneOfValue_Sum interface { - isTestVersion3LoneOneOfValue_Sum() -} - -type TestVersion3LoneOneOfValue_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof"` -} - -func (*TestVersion3LoneOneOfValue_E) isTestVersion3LoneOneOfValue_Sum() {} - -type TestVersion3LoneNesting struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` // [(gogoproto.nullable) = false]; - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // [(gogoproto.nullable) = false]; - // Types that are assignable to Sum: - // *TestVersion3LoneNesting_F - Sum isTestVersion3LoneNesting_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` //[(gogoproto.castrepeated) = "TestVersion1"]; - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - K *Customer1 `protobuf:"bytes,12,opt,name=k,proto3" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` - Inner1 *TestVersion3LoneNesting_Inner1 `protobuf:"bytes,14,opt,name=inner1,proto3" json:"inner1,omitempty"` - Inner2 *TestVersion3LoneNesting_Inner2 `protobuf:"bytes,15,opt,name=inner2,proto3" json:"inner2,omitempty"` -} - -func (x *TestVersion3LoneNesting) Reset() { - *x = TestVersion3LoneNesting{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3LoneNesting) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3LoneNesting) ProtoMessage() {} - -// Deprecated: Use TestVersion3LoneNesting.ProtoReflect.Descriptor instead. -func (*TestVersion3LoneNesting) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{15} -} - -func (x *TestVersion3LoneNesting) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersion3LoneNesting) GetA() *TestVersion3 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersion3LoneNesting) GetB() *TestVersion3 { - if x != nil { - return x.B - } - return nil -} - -func (x *TestVersion3LoneNesting) GetC() []*TestVersion3 { - if x != nil { - return x.C - } - return nil -} - -func (x *TestVersion3LoneNesting) GetD() []*TestVersion3 { - if x != nil { - return x.D - } - return nil -} - -func (x *TestVersion3LoneNesting) GetSum() isTestVersion3LoneNesting_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersion3LoneNesting) GetF() *TestVersion3LoneNesting { - if x, ok := x.GetSum().(*TestVersion3LoneNesting_F); ok { - return x.F - } - return nil -} - -func (x *TestVersion3LoneNesting) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersion3LoneNesting) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -func (x *TestVersion3LoneNesting) GetK() *Customer1 { - if x != nil { - return x.K - } - return nil -} - -func (x *TestVersion3LoneNesting) GetNonCriticalField() string { - if x != nil { - return x.NonCriticalField - } - return "" -} - -func (x *TestVersion3LoneNesting) GetInner1() *TestVersion3LoneNesting_Inner1 { - if x != nil { - return x.Inner1 - } - return nil -} - -func (x *TestVersion3LoneNesting) GetInner2() *TestVersion3LoneNesting_Inner2 { - if x != nil { - return x.Inner2 - } - return nil -} - -type isTestVersion3LoneNesting_Sum interface { - isTestVersion3LoneNesting_Sum() -} - -type TestVersion3LoneNesting_F struct { - F *TestVersion3LoneNesting `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersion3LoneNesting_F) isTestVersion3LoneNesting_Sum() {} - -type TestVersion4LoneNesting struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` // [(gogoproto.nullable) = false]; - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // [(gogoproto.nullable) = false]; - // Types that are assignable to Sum: - // *TestVersion4LoneNesting_F - Sum isTestVersion4LoneNesting_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` //[(gogoproto.castrepeated) = "TestVersion1"]; - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - K *Customer1 `protobuf:"bytes,12,opt,name=k,proto3" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` - Inner1 *TestVersion4LoneNesting_Inner1 `protobuf:"bytes,14,opt,name=inner1,proto3" json:"inner1,omitempty"` - Inner2 *TestVersion4LoneNesting_Inner2 `protobuf:"bytes,15,opt,name=inner2,proto3" json:"inner2,omitempty"` -} - -func (x *TestVersion4LoneNesting) Reset() { - *x = TestVersion4LoneNesting{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion4LoneNesting) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion4LoneNesting) ProtoMessage() {} - -// Deprecated: Use TestVersion4LoneNesting.ProtoReflect.Descriptor instead. -func (*TestVersion4LoneNesting) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{16} -} - -func (x *TestVersion4LoneNesting) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersion4LoneNesting) GetA() *TestVersion3 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersion4LoneNesting) GetB() *TestVersion3 { - if x != nil { - return x.B - } - return nil -} - -func (x *TestVersion4LoneNesting) GetC() []*TestVersion3 { - if x != nil { - return x.C - } - return nil -} - -func (x *TestVersion4LoneNesting) GetD() []*TestVersion3 { - if x != nil { - return x.D - } - return nil -} - -func (x *TestVersion4LoneNesting) GetSum() isTestVersion4LoneNesting_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersion4LoneNesting) GetF() *TestVersion3LoneNesting { - if x, ok := x.GetSum().(*TestVersion4LoneNesting_F); ok { - return x.F - } - return nil -} - -func (x *TestVersion4LoneNesting) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersion4LoneNesting) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -func (x *TestVersion4LoneNesting) GetK() *Customer1 { - if x != nil { - return x.K - } - return nil -} - -func (x *TestVersion4LoneNesting) GetNonCriticalField() string { - if x != nil { - return x.NonCriticalField - } - return "" -} - -func (x *TestVersion4LoneNesting) GetInner1() *TestVersion4LoneNesting_Inner1 { - if x != nil { - return x.Inner1 - } - return nil -} - -func (x *TestVersion4LoneNesting) GetInner2() *TestVersion4LoneNesting_Inner2 { - if x != nil { - return x.Inner2 - } - return nil -} - -type isTestVersion4LoneNesting_Sum interface { - isTestVersion4LoneNesting_Sum() -} - -type TestVersion4LoneNesting_F struct { - F *TestVersion3LoneNesting `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersion4LoneNesting_F) isTestVersion4LoneNesting_Sum() {} - -type TestVersionFD1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - // Types that are assignable to Sum: - // *TestVersionFD1_E - // *TestVersionFD1_F - Sum isTestVersionFD1_Sum `protobuf_oneof:"sum"` - G *anypb.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` // [(gogoproto.castrepeated) = "TestVersion1"]; -} - -func (x *TestVersionFD1) Reset() { - *x = TestVersionFD1{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersionFD1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersionFD1) ProtoMessage() {} - -// Deprecated: Use TestVersionFD1.ProtoReflect.Descriptor instead. -func (*TestVersionFD1) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{17} -} - -func (x *TestVersionFD1) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersionFD1) GetA() *TestVersion1 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersionFD1) GetSum() isTestVersionFD1_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersionFD1) GetE() int32 { - if x, ok := x.GetSum().(*TestVersionFD1_E); ok { - return x.E - } - return 0 -} - -func (x *TestVersionFD1) GetF() *TestVersion1 { - if x, ok := x.GetSum().(*TestVersionFD1_F); ok { - return x.F - } - return nil -} - -func (x *TestVersionFD1) GetG() *anypb.Any { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersionFD1) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -type isTestVersionFD1_Sum interface { - isTestVersionFD1_Sum() -} - -type TestVersionFD1_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof"` -} - -type TestVersionFD1_F struct { - F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersionFD1_E) isTestVersionFD1_Sum() {} - -func (*TestVersionFD1_F) isTestVersionFD1_Sum() {} - -type TestVersionFD1WithExtraAny struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - // Types that are assignable to Sum: - // *TestVersionFD1WithExtraAny_E - // *TestVersionFD1WithExtraAny_F - Sum isTestVersionFD1WithExtraAny_Sum `protobuf_oneof:"sum"` - G *AnyWithExtra `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` // [(gogoproto.castrepeated) = "TestVersion1"]; -} - -func (x *TestVersionFD1WithExtraAny) Reset() { - *x = TestVersionFD1WithExtraAny{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersionFD1WithExtraAny) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersionFD1WithExtraAny) ProtoMessage() {} - -// Deprecated: Use TestVersionFD1WithExtraAny.ProtoReflect.Descriptor instead. -func (*TestVersionFD1WithExtraAny) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{18} -} - -func (x *TestVersionFD1WithExtraAny) GetX() int64 { - if x != nil { - return x.X - } - return 0 -} - -func (x *TestVersionFD1WithExtraAny) GetA() *TestVersion1 { - if x != nil { - return x.A - } - return nil -} - -func (x *TestVersionFD1WithExtraAny) GetSum() isTestVersionFD1WithExtraAny_Sum { - if x != nil { - return x.Sum - } - return nil -} - -func (x *TestVersionFD1WithExtraAny) GetE() int32 { - if x, ok := x.GetSum().(*TestVersionFD1WithExtraAny_E); ok { - return x.E - } - return 0 -} - -func (x *TestVersionFD1WithExtraAny) GetF() *TestVersion1 { - if x, ok := x.GetSum().(*TestVersionFD1WithExtraAny_F); ok { - return x.F - } - return nil -} - -func (x *TestVersionFD1WithExtraAny) GetG() *AnyWithExtra { - if x != nil { - return x.G - } - return nil -} - -func (x *TestVersionFD1WithExtraAny) GetH() []*TestVersion1 { - if x != nil { - return x.H - } - return nil -} - -type isTestVersionFD1WithExtraAny_Sum interface { - isTestVersionFD1WithExtraAny_Sum() -} - -type TestVersionFD1WithExtraAny_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof"` -} - -type TestVersionFD1WithExtraAny_F struct { - F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof"` -} - -func (*TestVersionFD1WithExtraAny_E) isTestVersionFD1WithExtraAny_Sum() {} - -func (*TestVersionFD1WithExtraAny_F) isTestVersionFD1WithExtraAny_Sum() {} - -type AnyWithExtra struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - A *anypb.Any `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"` - B int64 `protobuf:"varint,3,opt,name=b,proto3" json:"b,omitempty"` - C int64 `protobuf:"varint,4,opt,name=c,proto3" json:"c,omitempty"` -} - -func (x *AnyWithExtra) Reset() { - *x = AnyWithExtra{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AnyWithExtra) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnyWithExtra) ProtoMessage() {} - -// Deprecated: Use AnyWithExtra.ProtoReflect.Descriptor instead. -func (*AnyWithExtra) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{19} -} - -func (x *AnyWithExtra) GetA() *anypb.Any { - if x != nil { - return x.A - } - return nil -} - -func (x *AnyWithExtra) GetB() int64 { - if x != nil { - return x.B - } - return 0 -} - -func (x *AnyWithExtra) GetC() int64 { - if x != nil { - return x.C - } - return 0 -} - -type TestUpdatedTxRaw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` - NewField_5 []byte `protobuf:"bytes,5,opt,name=new_field_5,json=newField5,proto3" json:"new_field_5,omitempty"` - NewField_1024 []byte `protobuf:"bytes,1024,opt,name=new_field_1024,json=newField1024,proto3" json:"new_field_1024,omitempty"` -} - -func (x *TestUpdatedTxRaw) Reset() { - *x = TestUpdatedTxRaw{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestUpdatedTxRaw) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestUpdatedTxRaw) ProtoMessage() {} - -// Deprecated: Use TestUpdatedTxRaw.ProtoReflect.Descriptor instead. -func (*TestUpdatedTxRaw) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{20} -} - -func (x *TestUpdatedTxRaw) GetBodyBytes() []byte { - if x != nil { - return x.BodyBytes - } - return nil -} - -func (x *TestUpdatedTxRaw) GetAuthInfoBytes() []byte { - if x != nil { - return x.AuthInfoBytes - } - return nil -} - -func (x *TestUpdatedTxRaw) GetSignatures() [][]byte { - if x != nil { - return x.Signatures - } - return nil -} - -func (x *TestUpdatedTxRaw) GetNewField_5() []byte { - if x != nil { - return x.NewField_5 - } - return nil -} - -func (x *TestUpdatedTxRaw) GetNewField_1024() []byte { - if x != nil { - return x.NewField_1024 - } - return nil -} - -type TestUpdatedTxBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Messages []*anypb.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` - TimeoutHeight int64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - SomeNewField uint64 `protobuf:"varint,4,opt,name=some_new_field,json=someNewField,proto3" json:"some_new_field,omitempty"` - SomeNewFieldNonCriticalField string `protobuf:"bytes,1050,opt,name=some_new_field_non_critical_field,json=someNewFieldNonCriticalField,proto3" json:"some_new_field_non_critical_field,omitempty"` - ExtensionOptions []*anypb.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` - NonCriticalExtensionOptions []*anypb.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"` -} - -func (x *TestUpdatedTxBody) Reset() { - *x = TestUpdatedTxBody{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestUpdatedTxBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestUpdatedTxBody) ProtoMessage() {} - -// Deprecated: Use TestUpdatedTxBody.ProtoReflect.Descriptor instead. -func (*TestUpdatedTxBody) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{21} -} - -func (x *TestUpdatedTxBody) GetMessages() []*anypb.Any { - if x != nil { - return x.Messages - } - return nil -} - -func (x *TestUpdatedTxBody) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -func (x *TestUpdatedTxBody) GetTimeoutHeight() int64 { - if x != nil { - return x.TimeoutHeight - } - return 0 -} - -func (x *TestUpdatedTxBody) GetSomeNewField() uint64 { - if x != nil { - return x.SomeNewField - } - return 0 -} - -func (x *TestUpdatedTxBody) GetSomeNewFieldNonCriticalField() string { - if x != nil { - return x.SomeNewFieldNonCriticalField - } - return "" -} - -func (x *TestUpdatedTxBody) GetExtensionOptions() []*anypb.Any { - if x != nil { - return x.ExtensionOptions - } - return nil -} - -func (x *TestUpdatedTxBody) GetNonCriticalExtensionOptions() []*anypb.Any { - if x != nil { - return x.NonCriticalExtensionOptions - } - return nil -} - -type TestUpdatedAuthInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SignerInfos []*v1beta1.SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` - Fee *v1beta1.Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` - NewField_3 []byte `protobuf:"bytes,3,opt,name=new_field_3,json=newField3,proto3" json:"new_field_3,omitempty"` - NewField_1024 []byte `protobuf:"bytes,1024,opt,name=new_field_1024,json=newField1024,proto3" json:"new_field_1024,omitempty"` -} - -func (x *TestUpdatedAuthInfo) Reset() { - *x = TestUpdatedAuthInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestUpdatedAuthInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestUpdatedAuthInfo) ProtoMessage() {} - -// Deprecated: Use TestUpdatedAuthInfo.ProtoReflect.Descriptor instead. -func (*TestUpdatedAuthInfo) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{22} -} - -func (x *TestUpdatedAuthInfo) GetSignerInfos() []*v1beta1.SignerInfo { - if x != nil { - return x.SignerInfos - } - return nil -} - -func (x *TestUpdatedAuthInfo) GetFee() *v1beta1.Fee { - if x != nil { - return x.Fee - } - return nil -} - -func (x *TestUpdatedAuthInfo) GetNewField_3() []byte { - if x != nil { - return x.NewField_3 - } - return nil -} - -func (x *TestUpdatedAuthInfo) GetNewField_1024() []byte { - if x != nil { - return x.NewField_1024 - } - return nil -} - -type TestRepeatedUints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nums []uint64 `protobuf:"varint,1,rep,packed,name=nums,proto3" json:"nums,omitempty"` -} - -func (x *TestRepeatedUints) Reset() { - *x = TestRepeatedUints{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestRepeatedUints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestRepeatedUints) ProtoMessage() {} - -// Deprecated: Use TestRepeatedUints.ProtoReflect.Descriptor instead. -func (*TestRepeatedUints) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{23} -} - -func (x *TestRepeatedUints) GetNums() []uint64 { - if x != nil { - return x.Nums - } - return nil -} - -type TestVersion3LoneNesting_Inner1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Inner *TestVersion3LoneNesting_Inner1_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (x *TestVersion3LoneNesting_Inner1) Reset() { - *x = TestVersion3LoneNesting_Inner1{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3LoneNesting_Inner1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3LoneNesting_Inner1) ProtoMessage() {} - -// Deprecated: Use TestVersion3LoneNesting_Inner1.ProtoReflect.Descriptor instead. -func (*TestVersion3LoneNesting_Inner1) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{15, 0} -} - -func (x *TestVersion3LoneNesting_Inner1) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *TestVersion3LoneNesting_Inner1) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TestVersion3LoneNesting_Inner1) GetInner() *TestVersion3LoneNesting_Inner1_InnerInner { - if x != nil { - return x.Inner - } - return nil -} - -type TestVersion3LoneNesting_Inner2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` - Inner *TestVersion3LoneNesting_Inner2_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (x *TestVersion3LoneNesting_Inner2) Reset() { - *x = TestVersion3LoneNesting_Inner2{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3LoneNesting_Inner2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3LoneNesting_Inner2) ProtoMessage() {} - -// Deprecated: Use TestVersion3LoneNesting_Inner2.ProtoReflect.Descriptor instead. -func (*TestVersion3LoneNesting_Inner2) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{15, 1} -} - -func (x *TestVersion3LoneNesting_Inner2) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TestVersion3LoneNesting_Inner2) GetCountry() string { - if x != nil { - return x.Country - } - return "" -} - -func (x *TestVersion3LoneNesting_Inner2) GetInner() *TestVersion3LoneNesting_Inner2_InnerInner { - if x != nil { - return x.Inner - } - return nil -} - -type TestVersion3LoneNesting_Inner1_InnerInner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` -} - -func (x *TestVersion3LoneNesting_Inner1_InnerInner) Reset() { - *x = TestVersion3LoneNesting_Inner1_InnerInner{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3LoneNesting_Inner1_InnerInner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3LoneNesting_Inner1_InnerInner) ProtoMessage() {} - -// Deprecated: Use TestVersion3LoneNesting_Inner1_InnerInner.ProtoReflect.Descriptor instead. -func (*TestVersion3LoneNesting_Inner1_InnerInner) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{15, 0, 0} -} - -func (x *TestVersion3LoneNesting_Inner1_InnerInner) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TestVersion3LoneNesting_Inner1_InnerInner) GetCity() string { - if x != nil { - return x.City - } - return "" -} - -type TestVersion3LoneNesting_Inner2_InnerInner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` -} - -func (x *TestVersion3LoneNesting_Inner2_InnerInner) Reset() { - *x = TestVersion3LoneNesting_Inner2_InnerInner{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion3LoneNesting_Inner2_InnerInner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion3LoneNesting_Inner2_InnerInner) ProtoMessage() {} - -// Deprecated: Use TestVersion3LoneNesting_Inner2_InnerInner.ProtoReflect.Descriptor instead. -func (*TestVersion3LoneNesting_Inner2_InnerInner) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{15, 1, 0} -} - -func (x *TestVersion3LoneNesting_Inner2_InnerInner) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TestVersion3LoneNesting_Inner2_InnerInner) GetCity() string { - if x != nil { - return x.City - } - return "" -} - -type TestVersion4LoneNesting_Inner1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Inner *TestVersion4LoneNesting_Inner1_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (x *TestVersion4LoneNesting_Inner1) Reset() { - *x = TestVersion4LoneNesting_Inner1{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion4LoneNesting_Inner1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion4LoneNesting_Inner1) ProtoMessage() {} - -// Deprecated: Use TestVersion4LoneNesting_Inner1.ProtoReflect.Descriptor instead. -func (*TestVersion4LoneNesting_Inner1) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{16, 0} -} - -func (x *TestVersion4LoneNesting_Inner1) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *TestVersion4LoneNesting_Inner1) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TestVersion4LoneNesting_Inner1) GetInner() *TestVersion4LoneNesting_Inner1_InnerInner { - if x != nil { - return x.Inner - } - return nil -} - -type TestVersion4LoneNesting_Inner2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` - Inner *TestVersion4LoneNesting_Inner2_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (x *TestVersion4LoneNesting_Inner2) Reset() { - *x = TestVersion4LoneNesting_Inner2{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion4LoneNesting_Inner2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion4LoneNesting_Inner2) ProtoMessage() {} - -// Deprecated: Use TestVersion4LoneNesting_Inner2.ProtoReflect.Descriptor instead. -func (*TestVersion4LoneNesting_Inner2) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{16, 1} -} - -func (x *TestVersion4LoneNesting_Inner2) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TestVersion4LoneNesting_Inner2) GetCountry() string { - if x != nil { - return x.Country - } - return "" -} - -func (x *TestVersion4LoneNesting_Inner2) GetInner() *TestVersion4LoneNesting_Inner2_InnerInner { - if x != nil { - return x.Inner - } - return nil -} - -type TestVersion4LoneNesting_Inner1_InnerInner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` -} - -func (x *TestVersion4LoneNesting_Inner1_InnerInner) Reset() { - *x = TestVersion4LoneNesting_Inner1_InnerInner{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion4LoneNesting_Inner1_InnerInner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion4LoneNesting_Inner1_InnerInner) ProtoMessage() {} - -// Deprecated: Use TestVersion4LoneNesting_Inner1_InnerInner.ProtoReflect.Descriptor instead. -func (*TestVersion4LoneNesting_Inner1_InnerInner) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{16, 0, 0} -} - -func (x *TestVersion4LoneNesting_Inner1_InnerInner) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *TestVersion4LoneNesting_Inner1_InnerInner) GetCity() string { - if x != nil { - return x.City - } - return "" -} - -type TestVersion4LoneNesting_Inner2_InnerInner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *TestVersion4LoneNesting_Inner2_InnerInner) Reset() { - *x = TestVersion4LoneNesting_Inner2_InnerInner{} - if protoimpl.UnsafeEnabled { - mi := &file_unknonwnproto_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestVersion4LoneNesting_Inner2_InnerInner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestVersion4LoneNesting_Inner2_InnerInner) ProtoMessage() {} - -// Deprecated: Use TestVersion4LoneNesting_Inner2_InnerInner.ProtoReflect.Descriptor instead. -func (*TestVersion4LoneNesting_Inner2_InnerInner) Descriptor() ([]byte, []int) { - return file_unknonwnproto_proto_rawDescGZIP(), []int{16, 1, 0} -} - -func (x *TestVersion4LoneNesting_Inner2_InnerInner) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TestVersion4LoneNesting_Inner2_InnerInner) GetValue() int64 { - if x != nil { - return x.Value - } - return 0 -} - -var File_unknonwnproto_proto protoreflect.FileDescriptor - -var file_unknonwnproto_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x6e, 0x77, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x09, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, - 0x10, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x65, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x22, 0xb1, 0x02, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x32, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x65, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, - 0x05, 0x66, 0x65, 0x77, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x18, 0x97, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x32, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, - 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x6d, 0x69, 0x73, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x6e, 0x65, 0x6f, - 0x75, 0x73, 0x18, 0x0a, 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, 0x52, 0x0d, - 0x6d, 0x69, 0x73, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x6e, 0x65, 0x6f, 0x75, 0x73, 0x22, 0x47, 0x0a, - 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x61, 0x6f, 0x73, 0x10, 0x00, 0x12, - 0x0e, 0x0a, 0x0a, 0x4c, 0x6f, 0x73, 0x41, 0x6e, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x50, 0x61, 0x6c, 0x6f, 0x41, 0x6c, 0x74, 0x6f, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x4d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x61, 0x69, - 0x72, 0x6f, 0x62, 0x69, 0x10, 0x04, 0x22, 0x2e, 0x0a, 0x08, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x34, 0x41, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x08, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x33, 0x41, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x02, 0x61, 0x34, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x34, 0x41, 0x52, 0x02, 0x61, 0x34, 0x12, 0x33, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x33, 0x41, 0x2e, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x1a, 0x4c, 0x0a, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x34, 0x41, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5a, - 0x0a, 0x08, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x41, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, - 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x33, 0x41, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x08, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x31, 0x41, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x41, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x22, 0x40, 0x0a, 0x08, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x34, 0x42, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x08, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x33, 0x42, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x02, 0x62, 0x34, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x34, 0x42, 0x52, 0x02, 0x62, 0x34, 0x22, 0x6e, 0x0a, 0x08, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x32, 0x42, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x33, 0x42, 0x52, 0x06, 0x6e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x58, 0x0a, 0x08, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x31, 0x42, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x42, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x61, 0x67, 0x65, 0x22, 0x82, 0x02, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, - 0x72, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x73, 0x66, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x02, 0x73, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x72, 0x63, 0x68, 0x61, - 0x72, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x73, 0x75, 0x72, 0x63, 0x68, - 0x61, 0x72, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4e, 0x6f, 0x12, 0x1d, - 0x0a, 0x09, 0x63, 0x68, 0x65, 0x71, 0x75, 0x65, 0x5f, 0x6e, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x08, 0x63, 0x68, 0x65, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x12, 0x2f, 0x0a, - 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x31, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x42, 0x09, - 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xec, 0x02, 0x0a, 0x0c, 0x54, 0x65, - 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x24, 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x61, 0x12, 0x24, - 0x0a, 0x01, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x31, 0x52, 0x01, 0x62, 0x12, 0x24, 0x0a, 0x01, 0x63, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x63, 0x12, 0x2a, 0x0a, 0x01, 0x64, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x01, 0x64, 0x12, 0x0e, 0x0a, 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x48, 0x00, 0x52, 0x01, 0x65, 0x12, 0x26, 0x0a, 0x01, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x48, 0x00, 0x52, 0x01, 0x66, 0x12, 0x22, - 0x0a, 0x01, 0x67, 0x18, 0x08, 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, 0x52, - 0x01, 0x67, 0x12, 0x24, 0x0a, 0x01, 0x68, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x68, 0x12, 0x27, 0x0a, 0x01, 0x6b, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x31, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, - 0x6b, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x83, 0x03, 0x0a, 0x0c, 0x54, 0x65, 0x73, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x24, 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, - 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x52, 0x01, 0x61, 0x12, 0x24, 0x0a, - 0x01, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, - 0x52, 0x01, 0x62, 0x12, 0x24, 0x0a, 0x01, 0x63, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x52, 0x01, 0x63, 0x12, 0x24, 0x0a, 0x01, 0x64, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x52, 0x01, 0x64, 0x12, - 0x0e, 0x0a, 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x01, 0x65, 0x12, - 0x26, 0x0a, 0x01, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x32, 0x48, 0x00, 0x52, 0x01, 0x66, 0x12, 0x22, 0x0a, 0x01, 0x67, 0x18, 0x08, 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, 0x52, 0x01, 0x67, 0x12, 0x24, 0x0a, 0x01, 0x68, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, - 0x68, 0x12, 0x27, 0x0a, 0x01, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, - 0x31, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, - 0x77, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6e, - 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x95, - 0x03, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x12, - 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x24, 0x0a, - 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, - 0x52, 0x01, 0x61, 0x12, 0x24, 0x0a, 0x01, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x62, 0x12, 0x24, 0x0a, 0x01, 0x63, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x63, 0x12, - 0x24, 0x0a, 0x01, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x33, 0x52, 0x01, 0x64, 0x12, 0x0e, 0x0a, 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, - 0x48, 0x00, 0x52, 0x01, 0x65, 0x12, 0x26, 0x0a, 0x01, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x48, 0x00, 0x52, 0x01, 0x66, 0x12, 0x22, 0x0a, - 0x01, 0x67, 0x18, 0x08, 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, 0x52, 0x01, - 0x67, 0x12, 0x24, 0x0a, 0x01, 0x68, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x68, 0x12, 0x27, 0x0a, 0x01, 0x6b, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x31, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, 0x6b, - 0x12, 0x2d, 0x0a, 0x12, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x87, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, - 0x6f, 0x6e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, - 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0xfb, 0x02, 0x0a, 0x1a, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4f, 0x6e, 0x65, 0x4f, 0x66, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x01, 0x78, 0x12, 0x24, 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x61, 0x12, 0x24, 0x0a, 0x01, 0x62, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x62, 0x12, - 0x24, 0x0a, 0x01, 0x63, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x33, 0x52, 0x01, 0x63, 0x12, 0x24, 0x0a, 0x01, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x64, 0x12, 0x0e, 0x0a, 0x01, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x01, 0x65, 0x12, 0x22, 0x0a, 0x01, 0x67, - 0x18, 0x08, 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, 0x52, 0x01, 0x67, 0x12, - 0x24, 0x0a, 0x01, 0x68, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x31, 0x52, 0x01, 0x68, 0x12, 0x27, 0x0a, 0x01, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x65, 0x72, 0x31, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, 0x6b, 0x12, 0x2d, - 0x0a, 0x12, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x18, 0x87, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x6f, 0x6e, - 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x05, 0x0a, - 0x03, 0x73, 0x75, 0x6d, 0x22, 0xfd, 0x06, 0x0a, 0x17, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x24, - 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x33, 0x52, 0x01, 0x61, 0x12, 0x24, 0x0a, 0x01, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x62, 0x12, 0x24, 0x0a, 0x01, 0x63, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x63, - 0x12, 0x24, 0x0a, 0x01, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x64, 0x12, 0x31, 0x0a, 0x01, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x01, 0x66, 0x12, 0x22, 0x0a, 0x01, 0x67, 0x18, 0x08, - 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, 0x52, 0x01, 0x67, 0x12, 0x24, 0x0a, - 0x01, 0x68, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, - 0x52, 0x01, 0x68, 0x12, 0x27, 0x0a, 0x01, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x65, 0x72, 0x31, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, 0x6b, 0x12, 0x2d, 0x0a, 0x12, - 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x18, 0x87, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x43, 0x72, - 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x69, - 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x52, 0x06, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x12, 0x40, 0x0a, - 0x06, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x52, 0x06, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x1a, - 0xa9, 0x01, 0x0a, 0x06, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, - 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x6e, - 0x65, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x30, 0x0a, 0x0a, 0x49, 0x6e, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x1a, 0xaf, 0x01, 0x0a, 0x06, - 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x49, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x30, 0x0a, 0x0a, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x42, 0x05, 0x0a, - 0x03, 0x73, 0x75, 0x6d, 0x22, 0xff, 0x06, 0x0a, 0x17, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x34, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x24, - 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x33, 0x52, 0x01, 0x61, 0x12, 0x24, 0x0a, 0x01, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x62, 0x12, 0x24, 0x0a, 0x01, 0x63, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x63, - 0x12, 0x24, 0x0a, 0x01, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x33, 0x52, 0x01, 0x64, 0x12, 0x31, 0x0a, 0x01, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x33, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x01, 0x66, 0x12, 0x22, 0x0a, 0x01, 0x67, 0x18, 0x08, - 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, 0x52, 0x01, 0x67, 0x12, 0x24, 0x0a, - 0x01, 0x68, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, - 0x52, 0x01, 0x68, 0x12, 0x27, 0x0a, 0x01, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x65, 0x72, 0x31, 0x42, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, 0x6b, 0x12, 0x2d, 0x0a, 0x12, - 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x18, 0x87, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x43, 0x72, - 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x69, - 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x34, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x52, 0x06, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x12, 0x40, 0x0a, - 0x06, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x34, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x52, 0x06, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x1a, - 0xa9, 0x01, 0x0a, 0x06, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, - 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x34, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x31, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x6e, - 0x65, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x30, 0x0a, 0x0a, 0x49, 0x6e, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x1a, 0xb1, 0x01, 0x0a, 0x06, - 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x49, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x34, 0x4c, 0x6f, 0x6e, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x32, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x32, 0x0a, 0x0a, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0xcd, 0x01, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x44, 0x31, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x24, 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, - 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x61, 0x12, 0x0e, 0x0a, - 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x01, 0x65, 0x12, 0x26, 0x0a, - 0x01, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, - 0x48, 0x00, 0x52, 0x01, 0x66, 0x12, 0x22, 0x0a, 0x01, 0x67, 0x18, 0x08, 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, 0x52, 0x01, 0x67, 0x12, 0x24, 0x0a, 0x01, 0x68, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x68, 0x42, - 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0xdb, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x73, 0x74, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x44, 0x31, 0x57, 0x69, 0x74, 0x68, 0x45, 0x78, 0x74, - 0x72, 0x61, 0x41, 0x6e, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x01, 0x78, 0x12, 0x24, 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x61, 0x12, 0x0e, 0x0a, 0x01, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x01, 0x65, 0x12, 0x26, 0x0a, 0x01, 0x66, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x48, 0x00, 0x52, 0x01, - 0x66, 0x12, 0x24, 0x0a, 0x01, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x79, 0x57, 0x69, 0x74, 0x68, 0x45, - 0x78, 0x74, 0x72, 0x61, 0x52, 0x01, 0x67, 0x12, 0x24, 0x0a, 0x01, 0x68, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, - 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x01, 0x68, 0x42, 0x05, 0x0a, - 0x03, 0x73, 0x75, 0x6d, 0x22, 0x54, 0x0a, 0x0c, 0x41, 0x6e, 0x79, 0x57, 0x69, 0x74, 0x68, 0x45, - 0x78, 0x74, 0x72, 0x61, 0x12, 0x28, 0x0a, 0x01, 0x61, 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, 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x01, 0x61, 0x12, 0x0c, - 0x0a, 0x01, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x62, 0x12, 0x0c, 0x0a, 0x01, - 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x63, 0x22, 0xc0, 0x01, 0x0a, 0x10, 0x54, - 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x61, 0x77, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x26, - 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6e, 0x65, 0x77, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x35, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x31, 0x30, 0x32, 0x34, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0c, 0x6e, 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x30, 0x32, 0x34, 0x22, 0x90, 0x03, - 0x0a, 0x11, 0x54, 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x78, 0x42, - 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x52, 0x08, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x6f, 0x6d, 0x65, 0x4e, 0x65, - 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x48, 0x0a, 0x21, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x6e, - 0x65, 0x77, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, - 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x9a, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x1c, 0x73, 0x6f, 0x6d, 0x65, 0x4e, 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4e, 0x6f, 0x6e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x07, 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, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x1e, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x0f, 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, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xc8, 0x01, 0x0a, 0x13, 0x54, 0x65, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x66, 0x65, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x52, - 0x03, 0x66, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x33, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x31, 0x30, 0x32, 0x34, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6e, - 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x30, 0x32, 0x34, 0x22, 0x27, 0x0a, 0x11, 0x54, - 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, - 0x6e, 0x75, 0x6d, 0x73, 0x42, 0x99, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, 0x12, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x6e, 0x77, 0x6e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x75, 0x74, - 0x69, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x75, 0x6c, 0x73, - 0x61, 0x72, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xe2, 0x02, - 0x14, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_unknonwnproto_proto_rawDescOnce sync.Once - file_unknonwnproto_proto_rawDescData = file_unknonwnproto_proto_rawDesc -) - -func file_unknonwnproto_proto_rawDescGZIP() []byte { - file_unknonwnproto_proto_rawDescOnce.Do(func() { - file_unknonwnproto_proto_rawDescData = protoimpl.X.CompressGZIP(file_unknonwnproto_proto_rawDescData) - }) - return file_unknonwnproto_proto_rawDescData -} - -var file_unknonwnproto_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_unknonwnproto_proto_msgTypes = make([]protoimpl.MessageInfo, 33) -var file_unknonwnproto_proto_goTypes = []interface{}{ - (Customer2_City)(0), // 0: testdata.Customer2.City - (*Customer1)(nil), // 1: testdata.Customer1 - (*Customer2)(nil), // 2: testdata.Customer2 - (*Nested4A)(nil), // 3: testdata.Nested4A - (*Nested3A)(nil), // 4: testdata.Nested3A - (*Nested2A)(nil), // 5: testdata.Nested2A - (*Nested1A)(nil), // 6: testdata.Nested1A - (*Nested4B)(nil), // 7: testdata.Nested4B - (*Nested3B)(nil), // 8: testdata.Nested3B - (*Nested2B)(nil), // 9: testdata.Nested2B - (*Nested1B)(nil), // 10: testdata.Nested1B - (*Customer3)(nil), // 11: testdata.Customer3 - (*TestVersion1)(nil), // 12: testdata.TestVersion1 - (*TestVersion2)(nil), // 13: testdata.TestVersion2 - (*TestVersion3)(nil), // 14: testdata.TestVersion3 - (*TestVersion3LoneOneOfValue)(nil), // 15: testdata.TestVersion3LoneOneOfValue - (*TestVersion3LoneNesting)(nil), // 16: testdata.TestVersion3LoneNesting - (*TestVersion4LoneNesting)(nil), // 17: testdata.TestVersion4LoneNesting - (*TestVersionFD1)(nil), // 18: testdata.TestVersionFD1 - (*TestVersionFD1WithExtraAny)(nil), // 19: testdata.TestVersionFD1WithExtraAny - (*AnyWithExtra)(nil), // 20: testdata.AnyWithExtra - (*TestUpdatedTxRaw)(nil), // 21: testdata.TestUpdatedTxRaw - (*TestUpdatedTxBody)(nil), // 22: testdata.TestUpdatedTxBody - (*TestUpdatedAuthInfo)(nil), // 23: testdata.TestUpdatedAuthInfo - (*TestRepeatedUints)(nil), // 24: testdata.TestRepeatedUints - nil, // 25: testdata.Nested3A.IndexEntry - (*TestVersion3LoneNesting_Inner1)(nil), // 26: testdata.TestVersion3LoneNesting.Inner1 - (*TestVersion3LoneNesting_Inner2)(nil), // 27: testdata.TestVersion3LoneNesting.Inner2 - (*TestVersion3LoneNesting_Inner1_InnerInner)(nil), // 28: testdata.TestVersion3LoneNesting.Inner1.InnerInner - (*TestVersion3LoneNesting_Inner2_InnerInner)(nil), // 29: testdata.TestVersion3LoneNesting.Inner2.InnerInner - (*TestVersion4LoneNesting_Inner1)(nil), // 30: testdata.TestVersion4LoneNesting.Inner1 - (*TestVersion4LoneNesting_Inner2)(nil), // 31: testdata.TestVersion4LoneNesting.Inner2 - (*TestVersion4LoneNesting_Inner1_InnerInner)(nil), // 32: testdata.TestVersion4LoneNesting.Inner1.InnerInner - (*TestVersion4LoneNesting_Inner2_InnerInner)(nil), // 33: testdata.TestVersion4LoneNesting.Inner2.InnerInner - (*anypb.Any)(nil), // 34: google.protobuf.Any - (*v1beta1.SignerInfo)(nil), // 35: cosmos.tx.v1beta1.SignerInfo - (*v1beta1.Fee)(nil), // 36: cosmos.tx.v1beta1.Fee -} -var file_unknonwnproto_proto_depIdxs = []int32{ - 0, // 0: testdata.Customer2.city:type_name -> testdata.Customer2.City - 34, // 1: testdata.Customer2.miscellaneous:type_name -> google.protobuf.Any - 3, // 2: testdata.Nested3A.a4:type_name -> testdata.Nested4A - 25, // 3: testdata.Nested3A.index:type_name -> testdata.Nested3A.IndexEntry - 4, // 4: testdata.Nested2A.nested:type_name -> testdata.Nested3A - 5, // 5: testdata.Nested1A.nested:type_name -> testdata.Nested2A - 7, // 6: testdata.Nested3B.b4:type_name -> testdata.Nested4B - 8, // 7: testdata.Nested2B.nested:type_name -> testdata.Nested3B - 9, // 8: testdata.Nested1B.nested:type_name -> testdata.Nested2B - 1, // 9: testdata.Customer3.original:type_name -> testdata.Customer1 - 12, // 10: testdata.TestVersion1.a:type_name -> testdata.TestVersion1 - 12, // 11: testdata.TestVersion1.b:type_name -> testdata.TestVersion1 - 12, // 12: testdata.TestVersion1.c:type_name -> testdata.TestVersion1 - 12, // 13: testdata.TestVersion1.d:type_name -> testdata.TestVersion1 - 12, // 14: testdata.TestVersion1.f:type_name -> testdata.TestVersion1 - 34, // 15: testdata.TestVersion1.g:type_name -> google.protobuf.Any - 12, // 16: testdata.TestVersion1.h:type_name -> testdata.TestVersion1 - 1, // 17: testdata.TestVersion1.k:type_name -> testdata.Customer1 - 13, // 18: testdata.TestVersion2.a:type_name -> testdata.TestVersion2 - 13, // 19: testdata.TestVersion2.b:type_name -> testdata.TestVersion2 - 13, // 20: testdata.TestVersion2.c:type_name -> testdata.TestVersion2 - 13, // 21: testdata.TestVersion2.d:type_name -> testdata.TestVersion2 - 13, // 22: testdata.TestVersion2.f:type_name -> testdata.TestVersion2 - 34, // 23: testdata.TestVersion2.g:type_name -> google.protobuf.Any - 12, // 24: testdata.TestVersion2.h:type_name -> testdata.TestVersion1 - 1, // 25: testdata.TestVersion2.k:type_name -> testdata.Customer1 - 14, // 26: testdata.TestVersion3.a:type_name -> testdata.TestVersion3 - 14, // 27: testdata.TestVersion3.b:type_name -> testdata.TestVersion3 - 14, // 28: testdata.TestVersion3.c:type_name -> testdata.TestVersion3 - 14, // 29: testdata.TestVersion3.d:type_name -> testdata.TestVersion3 - 14, // 30: testdata.TestVersion3.f:type_name -> testdata.TestVersion3 - 34, // 31: testdata.TestVersion3.g:type_name -> google.protobuf.Any - 12, // 32: testdata.TestVersion3.h:type_name -> testdata.TestVersion1 - 1, // 33: testdata.TestVersion3.k:type_name -> testdata.Customer1 - 14, // 34: testdata.TestVersion3LoneOneOfValue.a:type_name -> testdata.TestVersion3 - 14, // 35: testdata.TestVersion3LoneOneOfValue.b:type_name -> testdata.TestVersion3 - 14, // 36: testdata.TestVersion3LoneOneOfValue.c:type_name -> testdata.TestVersion3 - 14, // 37: testdata.TestVersion3LoneOneOfValue.d:type_name -> testdata.TestVersion3 - 34, // 38: testdata.TestVersion3LoneOneOfValue.g:type_name -> google.protobuf.Any - 12, // 39: testdata.TestVersion3LoneOneOfValue.h:type_name -> testdata.TestVersion1 - 1, // 40: testdata.TestVersion3LoneOneOfValue.k:type_name -> testdata.Customer1 - 14, // 41: testdata.TestVersion3LoneNesting.a:type_name -> testdata.TestVersion3 - 14, // 42: testdata.TestVersion3LoneNesting.b:type_name -> testdata.TestVersion3 - 14, // 43: testdata.TestVersion3LoneNesting.c:type_name -> testdata.TestVersion3 - 14, // 44: testdata.TestVersion3LoneNesting.d:type_name -> testdata.TestVersion3 - 16, // 45: testdata.TestVersion3LoneNesting.f:type_name -> testdata.TestVersion3LoneNesting - 34, // 46: testdata.TestVersion3LoneNesting.g:type_name -> google.protobuf.Any - 12, // 47: testdata.TestVersion3LoneNesting.h:type_name -> testdata.TestVersion1 - 1, // 48: testdata.TestVersion3LoneNesting.k:type_name -> testdata.Customer1 - 26, // 49: testdata.TestVersion3LoneNesting.inner1:type_name -> testdata.TestVersion3LoneNesting.Inner1 - 27, // 50: testdata.TestVersion3LoneNesting.inner2:type_name -> testdata.TestVersion3LoneNesting.Inner2 - 14, // 51: testdata.TestVersion4LoneNesting.a:type_name -> testdata.TestVersion3 - 14, // 52: testdata.TestVersion4LoneNesting.b:type_name -> testdata.TestVersion3 - 14, // 53: testdata.TestVersion4LoneNesting.c:type_name -> testdata.TestVersion3 - 14, // 54: testdata.TestVersion4LoneNesting.d:type_name -> testdata.TestVersion3 - 16, // 55: testdata.TestVersion4LoneNesting.f:type_name -> testdata.TestVersion3LoneNesting - 34, // 56: testdata.TestVersion4LoneNesting.g:type_name -> google.protobuf.Any - 12, // 57: testdata.TestVersion4LoneNesting.h:type_name -> testdata.TestVersion1 - 1, // 58: testdata.TestVersion4LoneNesting.k:type_name -> testdata.Customer1 - 30, // 59: testdata.TestVersion4LoneNesting.inner1:type_name -> testdata.TestVersion4LoneNesting.Inner1 - 31, // 60: testdata.TestVersion4LoneNesting.inner2:type_name -> testdata.TestVersion4LoneNesting.Inner2 - 12, // 61: testdata.TestVersionFD1.a:type_name -> testdata.TestVersion1 - 12, // 62: testdata.TestVersionFD1.f:type_name -> testdata.TestVersion1 - 34, // 63: testdata.TestVersionFD1.g:type_name -> google.protobuf.Any - 12, // 64: testdata.TestVersionFD1.h:type_name -> testdata.TestVersion1 - 12, // 65: testdata.TestVersionFD1WithExtraAny.a:type_name -> testdata.TestVersion1 - 12, // 66: testdata.TestVersionFD1WithExtraAny.f:type_name -> testdata.TestVersion1 - 20, // 67: testdata.TestVersionFD1WithExtraAny.g:type_name -> testdata.AnyWithExtra - 12, // 68: testdata.TestVersionFD1WithExtraAny.h:type_name -> testdata.TestVersion1 - 34, // 69: testdata.AnyWithExtra.a:type_name -> google.protobuf.Any - 34, // 70: testdata.TestUpdatedTxBody.messages:type_name -> google.protobuf.Any - 34, // 71: testdata.TestUpdatedTxBody.extension_options:type_name -> google.protobuf.Any - 34, // 72: testdata.TestUpdatedTxBody.non_critical_extension_options:type_name -> google.protobuf.Any - 35, // 73: testdata.TestUpdatedAuthInfo.signer_infos:type_name -> cosmos.tx.v1beta1.SignerInfo - 36, // 74: testdata.TestUpdatedAuthInfo.fee:type_name -> cosmos.tx.v1beta1.Fee - 3, // 75: testdata.Nested3A.IndexEntry.value:type_name -> testdata.Nested4A - 28, // 76: testdata.TestVersion3LoneNesting.Inner1.inner:type_name -> testdata.TestVersion3LoneNesting.Inner1.InnerInner - 29, // 77: testdata.TestVersion3LoneNesting.Inner2.inner:type_name -> testdata.TestVersion3LoneNesting.Inner2.InnerInner - 32, // 78: testdata.TestVersion4LoneNesting.Inner1.inner:type_name -> testdata.TestVersion4LoneNesting.Inner1.InnerInner - 33, // 79: testdata.TestVersion4LoneNesting.Inner2.inner:type_name -> testdata.TestVersion4LoneNesting.Inner2.InnerInner - 80, // [80:80] is the sub-list for method output_type - 80, // [80:80] is the sub-list for method input_type - 80, // [80:80] is the sub-list for extension type_name - 80, // [80:80] is the sub-list for extension extendee - 0, // [0:80] is the sub-list for field type_name -} - -func init() { file_unknonwnproto_proto_init() } -func file_unknonwnproto_proto_init() { - if File_unknonwnproto_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_unknonwnproto_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Customer1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Customer2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested4A); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested3A); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested2A); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested1A); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested4B); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested3B); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested2B); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nested1B); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Customer3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3LoneOneOfValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3LoneNesting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion4LoneNesting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersionFD1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersionFD1WithExtraAny); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AnyWithExtra); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestUpdatedTxRaw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestUpdatedTxBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestUpdatedAuthInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestRepeatedUints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3LoneNesting_Inner1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3LoneNesting_Inner2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3LoneNesting_Inner1_InnerInner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion3LoneNesting_Inner2_InnerInner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion4LoneNesting_Inner1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion4LoneNesting_Inner2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion4LoneNesting_Inner1_InnerInner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_unknonwnproto_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestVersion4LoneNesting_Inner2_InnerInner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_unknonwnproto_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*Customer3_CreditCardNo)(nil), - (*Customer3_ChequeNo)(nil), - } - file_unknonwnproto_proto_msgTypes[11].OneofWrappers = []interface{}{ - (*TestVersion1_E)(nil), - (*TestVersion1_F)(nil), - } - file_unknonwnproto_proto_msgTypes[12].OneofWrappers = []interface{}{ - (*TestVersion2_E)(nil), - (*TestVersion2_F)(nil), - } - file_unknonwnproto_proto_msgTypes[13].OneofWrappers = []interface{}{ - (*TestVersion3_E)(nil), - (*TestVersion3_F)(nil), - } - file_unknonwnproto_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*TestVersion3LoneOneOfValue_E)(nil), - } - file_unknonwnproto_proto_msgTypes[15].OneofWrappers = []interface{}{ - (*TestVersion3LoneNesting_F)(nil), - } - file_unknonwnproto_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*TestVersion4LoneNesting_F)(nil), - } - file_unknonwnproto_proto_msgTypes[17].OneofWrappers = []interface{}{ - (*TestVersionFD1_E)(nil), - (*TestVersionFD1_F)(nil), - } - file_unknonwnproto_proto_msgTypes[18].OneofWrappers = []interface{}{ - (*TestVersionFD1WithExtraAny_E)(nil), - (*TestVersionFD1WithExtraAny_F)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_unknonwnproto_proto_rawDesc, - NumEnums: 1, - NumMessages: 33, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_unknonwnproto_proto_goTypes, - DependencyIndexes: file_unknonwnproto_proto_depIdxs, - EnumInfos: file_unknonwnproto_proto_enumTypes, - MessageInfos: file_unknonwnproto_proto_msgTypes, - }.Build() - File_unknonwnproto_proto = out.File - file_unknonwnproto_proto_rawDesc = nil - file_unknonwnproto_proto_goTypes = nil - file_unknonwnproto_proto_depIdxs = nil -} diff --git a/types/abci.pb.go b/types/abci.pb.go index b7f135248421..80d0bf6fb486 100644 --- a/types/abci.pb.go +++ b/types/abci.pb.go @@ -59,7 +59,7 @@ type TxResponse struct { Timestamp string `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Events defines all the events emitted by processing a transaction. Note, // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with + // emitted from the ante. Whereas Logs contains the events, with // additional metadata, emitted only by processing the messages. // // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 diff --git a/types/address.go b/types/address.go index e7486e27a95f..c569e56dd4d1 100644 --- a/types/address.go +++ b/types/address.go @@ -85,6 +85,11 @@ var ( valAddrCache *simplelru.LRU ) +// sentinel errors +var ( + ErrEmptyHexAddress = errors.New("decoding address from hex string failed: empty address") +) + func init() { var err error // in total the cache size is 61k entries. Key is 32 bytes and value is around 50-70 bytes. @@ -112,9 +117,11 @@ type Address interface { } // Ensure that different address types implement the interface -var _ Address = AccAddress{} -var _ Address = ValAddress{} -var _ Address = ConsAddress{} +var ( + _ Address = AccAddress{} + _ Address = ValAddress{} + _ Address = ConsAddress{} +) // ---------------------------------------------------------------------------- // account @@ -124,8 +131,12 @@ var _ Address = ConsAddress{} // When marshaled to a string or JSON, it uses Bech32. type AccAddress []byte -// AccAddressFromHex creates an AccAddress from a hex string. -func AccAddressFromHex(address string) (addr AccAddress, err error) { +// AccAddressFromHexUnsafe creates an AccAddress from a HEX-encoded string. +// +// Note, this function is considered unsafe as it may produce an AccAddress from +// otherwise invalid input, such as a transaction hash. Please use +// AccAddressFromBech32. +func AccAddressFromHexUnsafe(address string) (addr AccAddress, err error) { bz, err := addressBytesFromHexString(address) return AccAddress(bz), err } @@ -152,6 +163,16 @@ func VerifyAddressFormat(bz []byte) error { return nil } +// MustAccAddressFromBech32 calls AccAddressFromBech32 and panics on error. +func MustAccAddressFromBech32(address string) AccAddress { + addr, err := AccAddressFromBech32(address) + if err != nil { + panic(err) + } + + return addr +} + // AccAddressFromBech32 creates an AccAddress from a Bech32 string. func AccAddressFromBech32(address string) (addr AccAddress, err error) { if len(strings.TrimSpace(address)) == 0 { @@ -214,7 +235,6 @@ func (aa AccAddress) MarshalYAML() (interface{}, error) { func (aa *AccAddress) UnmarshalJSON(data []byte) error { var s string err := json.Unmarshal(data, &s) - if err != nil { return err } @@ -264,7 +284,7 @@ func (aa AccAddress) String() string { return "" } - var key = conv.UnsafeBytesToStr(aa) + key := conv.UnsafeBytesToStr(aa) accAddrMu.Lock() defer accAddrMu.Unlock() addr, ok := accAddrCache.Get(key) @@ -414,7 +434,7 @@ func (va ValAddress) String() string { return "" } - var key = conv.UnsafeBytesToStr(va) + key := conv.UnsafeBytesToStr(va) valAddrMu.Lock() defer valAddrMu.Unlock() addr, ok := valAddrCache.Get(key) @@ -569,7 +589,7 @@ func (ca ConsAddress) String() string { return "" } - var key = conv.UnsafeBytesToStr(ca) + key := conv.UnsafeBytesToStr(ca) consAddrMu.Lock() defer consAddrMu.Unlock() addr, ok := consAddrCache.Get(key) @@ -642,7 +662,7 @@ func GetFromBech32(bech32str, prefix string) ([]byte, error) { func addressBytesFromHexString(address string) ([]byte, error) { if len(address) == 0 { - return nil, errors.New("decoding Bech32 address failed: must provide an address") + return nil, ErrEmptyHexAddress } return hex.DecodeString(address) diff --git a/types/address/README.md b/types/address/README.md index 92c092e04680..473838090eea 100644 --- a/types/address/README.md +++ b/types/address/README.md @@ -4,4 +4,4 @@ This package defines Cosmos SDK address-related functions. ## References -* [ADR-028](../../docs/architecture/adr-028-public-key-addresses.md) +* [ADR-028](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-028-public-key-addresses.md) diff --git a/types/address/hash_test.go b/types/address/hash_test.go index ae712c18dd4a..06fede65948c 100644 --- a/types/address/hash_test.go +++ b/types/address/hash_test.go @@ -63,7 +63,7 @@ func (suite *AddressSuite) TestComposed() { func (suite *AddressSuite) TestModule() { assert := suite.Assert() - var modName, key = "myModule", []byte{1, 2} + modName, key := "myModule", []byte{1, 2} addr := Module(modName, key) assert.Len(addr, Len, "must have address length") @@ -77,7 +77,7 @@ func (suite *AddressSuite) TestModule() { func (suite *AddressSuite) TestDerive() { assert := suite.Assert() - var addr, key1, key2 = []byte{1, 2}, []byte{3, 4}, []byte{1, 2} + addr, key1, key2 := []byte{1, 2}, []byte{3, 4}, []byte{1, 2} d1 := Derive(addr, key1) d2 := Derive(addr, key2) d3 := Derive(key1, key2) diff --git a/types/address_race_test.go b/types/address_race_test.go index c603df976207..5d363fda1381 100644 --- a/types/address_race_test.go +++ b/types/address_race_test.go @@ -2,7 +2,6 @@ package types_test import ( "encoding/binary" - "fmt" "testing" "time" @@ -33,19 +32,22 @@ func addressStringCaller(require *require.Assertions, prefix byte, max uint32, c } func (s *addressTestSuite) TestAddressRace() { - fmt.Println("starting test") if testing.Short() { s.T().Skip("AddressRace test is not short") } + workers := 4 done := make(chan bool, workers) cancel := make(chan bool) + for i := byte(1); i <= 2; i++ { // workes which will loop in first 100 addresses go addressStringCaller(s.Require(), i, 100, cancel, done) } + for i := byte(1); i <= 2; i++ { // workes which will generate 1e6 new addresses go addressStringCaller(s.Require(), i, 1000000, cancel, done) } + <-time.After(time.Millisecond * 30) close(cancel) diff --git a/types/address_test.go b/types/address_test.go index 251732c03a01..18bb929c61fa 100644 --- a/types/address_test.go +++ b/types/address_test.go @@ -105,13 +105,13 @@ func (s *addressTestSuite) TestRandBech32AccAddrConsistency() { s.Require().Equal(acc, res) str = hex.EncodeToString(acc) - res, err = types.AccAddressFromHex(str) + res, err = types.AccAddressFromHexUnsafe(str) s.Require().Nil(err) s.Require().Equal(acc, res) } for _, str := range invalidStrs { - _, err := types.AccAddressFromHex(str) + _, err := types.AccAddressFromHexUnsafe(str) s.Require().NotNil(err) _, err = types.AccAddressFromBech32(str) @@ -121,8 +121,8 @@ func (s *addressTestSuite) TestRandBech32AccAddrConsistency() { s.Require().NotNil(err) } - _, err := types.AccAddressFromHex("") - s.Require().Equal("decoding Bech32 address failed: must provide an address", err.Error()) + _, err := types.AccAddressFromHexUnsafe("") + s.Require().Equal(types.ErrEmptyHexAddress, err) } func (s *addressTestSuite) TestValAddr() { @@ -163,7 +163,7 @@ func (s *addressTestSuite) TestValAddr() { // test empty string _, err := types.ValAddressFromHex("") - s.Require().Equal("decoding Bech32 address failed: must provide an address", err.Error()) + s.Require().Equal(types.ErrEmptyHexAddress, err) } func (s *addressTestSuite) TestConsAddress() { @@ -203,7 +203,7 @@ func (s *addressTestSuite) TestConsAddress() { // test empty string _, err := types.ConsAddressFromHex("") - s.Require().Equal("decoding Bech32 address failed: must provide an address", err.Error()) + s.Require().Equal(types.ErrEmptyHexAddress, err) } const letterBytes = "abcdefghijklmnopqrstuvwxyz" @@ -298,7 +298,6 @@ func (s *addressTestSuite) TestAddressInterface() { s.T().Fail() } } - } func (s *addressTestSuite) TestVerifyAddressFormat() { diff --git a/types/bench_test.go b/types/bench_test.go index e9ed9fa12bff..639ba471d214 100644 --- a/types/bench_test.go +++ b/types/bench_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) var coinStrs = []string{ @@ -14,11 +14,11 @@ var coinStrs = []string{ } func BenchmarkParseCoin(b *testing.B) { - var blankCoin types.Coin + var blankCoin sdk.Coin b.ReportAllocs() for i := 0; i < b.N; i++ { for _, coinStr := range coinStrs { - coin, err := types.ParseCoinNormalized(coinStr) + coin, err := sdk.ParseCoinNormalized(coinStr) if err != nil { b.Fatal(err) } @@ -30,7 +30,7 @@ func BenchmarkParseCoin(b *testing.B) { } func BenchmarkUintMarshal(b *testing.B) { - var values = []uint64{ + values := []uint64{ 0, 1, 1 << 10, @@ -44,7 +44,7 @@ func BenchmarkUintMarshal(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { for _, value := range values { - u := types.NewUint(value) + u := sdk.NewUint(value) n, err := u.MarshalTo(scratch[:]) if err != nil { b.Fatal(err) @@ -55,7 +55,7 @@ func BenchmarkUintMarshal(b *testing.B) { } func BenchmarkIntMarshal(b *testing.B) { - var values = []int64{ + values := []int64{ 0, 1, 1 << 10, @@ -69,7 +69,7 @@ func BenchmarkIntMarshal(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { for _, value := range values { - in := types.NewInt(value) + in := sdk.NewInt(value) n, err := in.MarshalTo(scratch[:]) if err != nil { b.Fatal(err) diff --git a/types/coin.go b/types/coin.go index 23ed62fb6ada..c5bf96aeac04 100644 --- a/types/coin.go +++ b/types/coin.go @@ -115,19 +115,29 @@ func (coin Coin) AddAmount(amount Int) Coin { return Coin{coin.Denom, coin.Amount.Add(amount)} } -// Sub subtracts amounts of two coins with same denom. If the coins differ in denom -// then it panics. +// Sub subtracts amounts of two coins with same denom and panics on error. func (coin Coin) Sub(coinB Coin) Coin { + res, err := coin.SafeSub(coinB) + if err != nil { + panic(err) + } + + return res +} + +// SafeSub safely subtracts the amounts of two coins. It returns an error if the coins differ +// in denom or subtraction results in negative coin denom. +func (coin Coin) SafeSub(coinB Coin) (Coin, error) { if coin.Denom != coinB.Denom { - panic(fmt.Sprintf("invalid coin denominations; %s, %s", coin.Denom, coinB.Denom)) + return Coin{}, fmt.Errorf("invalid coin denoms: %s, %s", coin.Denom, coinB.Denom) } res := Coin{coin.Denom, coin.Amount.Sub(coinB.Amount)} if res.IsNegative() { - panic("negative coin amount") + return Coin{}, fmt.Errorf("negative coin amount") } - return res + return res, nil } // SubAmount subtracts an amount from the Coin. @@ -156,7 +166,7 @@ func (coin Coin) IsNegative() bool { // IsNil returns true if the coin amount is nil and false otherwise. func (coin Coin) IsNil() bool { - return coin.Amount.i == nil + return coin.Amount.BigInt() == nil } //----------------------------------------------------------------------------- @@ -383,8 +393,8 @@ func (coins Coins) DenomsSubsetOf(coinsB Coins) bool { // // CONTRACT: Sub will never return Coins where one Coin has a non-positive // amount. In otherwords, IsValid will always return true. -func (coins Coins) Sub(coinsB Coins) Coins { - diff, hasNeg := coins.SafeSub(coinsB) +func (coins Coins) Sub(coinsB ...Coin) Coins { + diff, hasNeg := coins.SafeSub(coinsB...) if hasNeg { panic("negative coin amount") } @@ -395,8 +405,8 @@ func (coins Coins) Sub(coinsB Coins) Coins { // SafeSub performs the same arithmetic as Sub but returns a boolean if any // negative coin amount was returned. // The function panics if `coins` or `coinsB` are not sorted (ascending). -func (coins Coins) SafeSub(coinsB Coins) (Coins, bool) { - diff := coins.safeAdd(coinsB.negative()) +func (coins Coins) SafeSub(coinsB ...Coin) (Coins, bool) { + diff := coins.safeAdd(NewCoins(coinsB...).negative()) return diff, diff.IsAnyNegative() } @@ -693,28 +703,37 @@ func (coins Coins) AmountOf(denom string) Int { // AmountOfNoDenomValidation returns the amount of a denom from coins // without validating the denomination. func (coins Coins) AmountOfNoDenomValidation(denom string) Int { + if ok, c := coins.Find(denom); ok { + return c.Amount + } + return ZeroInt() +} + +// Find returns true and coin if the denom exists in coins. Otherwise it returns false +// and a zero coin. Uses binary search. +// CONTRACT: coins must be valid (sorted). +func (coins Coins) Find(denom string) (bool, Coin) { switch len(coins) { case 0: - return ZeroInt() + return false, Coin{} case 1: coin := coins[0] if coin.Denom == denom { - return coin.Amount + return true, coin } - return ZeroInt() + return false, Coin{} default: - // Binary search the amount of coins remaining midIdx := len(coins) / 2 // 2:1, 3:1, 4:2 coin := coins[midIdx] switch { case denom < coin.Denom: - return coins[:midIdx].AmountOfNoDenomValidation(denom) + return coins[:midIdx].Find(denom) case denom == coin.Denom: - return coin.Amount + return true, coin default: - return coins[midIdx+1:].AmountOfNoDenomValidation(denom) + return coins[midIdx+1:].Find(denom) } } } diff --git a/types/coin_test.go b/types/coin_test.go index b95fcbec7714..8f2e6c92d023 100644 --- a/types/coin_test.go +++ b/types/coin_test.go @@ -26,7 +26,6 @@ func TestCoinTestSuite(t *testing.T) { } func (s *coinTestSuite) SetupSuite() { - s.T().Parallel() zero := sdk.NewInt(0) one := sdk.OneInt() two := sdk.NewInt(2) @@ -108,7 +107,6 @@ func (s *coinTestSuite) TestCoinIsValid() { } func (s *coinTestSuite) TestCustomValidation() { - newDnmRegex := `[\x{1F600}-\x{1F6FF}]` sdk.SetCoinDenomRegex(func() string { return newDnmRegex @@ -550,15 +548,39 @@ func (s *coinTestSuite) TestSubCoins() { for i, tc := range testCases { tc := tc if tc.shouldPanic { - assert.Panics(func() { tc.inputOne.Sub(tc.inputTwo) }) + assert.Panics(func() { tc.inputOne.Sub(tc.inputTwo...) }) } else { - res := tc.inputOne.Sub(tc.inputTwo) + res := tc.inputOne.Sub(tc.inputTwo...) assert.True(res.IsValid()) assert.Equal(tc.expected, res, "sum of coins is incorrect, tc #%d", i) } } } +func (s *coinTestSuite) TestSafeSubCoin() { + cases := []struct { + inputOne sdk.Coin + inputTwo sdk.Coin + expected sdk.Coin + expErrMsg string + }{ + {sdk.NewInt64Coin(testDenom1, 1), sdk.NewInt64Coin(testDenom2, 1), sdk.NewInt64Coin(testDenom1, 1), "invalid coin denoms"}, + {sdk.NewInt64Coin(testDenom1, 10), sdk.NewInt64Coin(testDenom1, 1), sdk.NewInt64Coin(testDenom1, 9), ""}, + {sdk.NewInt64Coin(testDenom1, 5), sdk.NewInt64Coin(testDenom1, 0), sdk.NewInt64Coin(testDenom1, 5), ""}, + {sdk.NewInt64Coin(testDenom1, 1), sdk.NewInt64Coin(testDenom1, 5), sdk.Coin{}, "negative coin amount"}, + } + + for _, tc := range cases { + tc := tc + res, err := tc.inputOne.SafeSub(tc.inputTwo) + if err != nil { + s.Require().Contains(err.Error(), tc.expErrMsg) + return + } + s.Require().Equal(tc.expected, res) + } +} + func (s *coinTestSuite) TestCoins_Validate() { testCases := []struct { name string @@ -715,7 +737,8 @@ func (s *coinTestSuite) TestCoins_Validate() { {"mineral", sdk.OneInt()}, }, false, - }, { + }, + { "duplicate denomination", sdk.Coins{ {"gas", sdk.OneInt()}, @@ -751,8 +774,13 @@ func (s *coinTestSuite) TestMinMax() { {"zero-one", sdk.Coins{}, sdk.Coins{{testDenom1, one}}, sdk.Coins{}, sdk.Coins{{testDenom1, one}}}, {"two-zero", sdk.Coins{{testDenom2, two}}, sdk.Coins{}, sdk.Coins{}, sdk.Coins{{testDenom2, two}}}, {"disjoint", sdk.Coins{{testDenom1, one}}, sdk.Coins{{testDenom2, two}}, sdk.Coins{}, sdk.Coins{{testDenom1, one}, {testDenom2, two}}}, - {"overlap", sdk.Coins{{testDenom1, one}, {testDenom2, two}}, sdk.Coins{{testDenom1, two}, {testDenom2, one}}, - sdk.Coins{{testDenom1, one}, {testDenom2, one}}, sdk.Coins{{testDenom1, two}, {testDenom2, two}}}, + { + "overlap", + sdk.Coins{{testDenom1, one}, {testDenom2, two}}, + sdk.Coins{{testDenom1, two}, {testDenom2, one}}, + sdk.Coins{{testDenom1, one}, {testDenom2, one}}, + sdk.Coins{{testDenom1, two}, {testDenom2, two}}, + }, } for _, tc := range cases { @@ -907,7 +935,8 @@ func (s *coinTestSuite) TestSortCoins() { } } -func (s *coinTestSuite) TestAmountOf() { +func (s *coinTestSuite) TestSearch() { + require := s.Require() case0 := sdk.Coins{} case1 := sdk.Coins{ sdk.NewInt64Coin("gold", 0), @@ -925,7 +954,7 @@ func (s *coinTestSuite) TestAmountOf() { sdk.NewInt64Coin("gas", 8), } - cases := []struct { + amountOfCases := []struct { coins sdk.Coins amountOf int64 amountOfSpace int64 @@ -940,13 +969,38 @@ func (s *coinTestSuite) TestAmountOf() { {case4, 0, 0, 8, 0, 0}, } - for _, tc := range cases { - s.Require().Equal(sdk.NewInt(tc.amountOfGAS), tc.coins.AmountOf("gas")) - s.Require().Equal(sdk.NewInt(tc.amountOfMINERAL), tc.coins.AmountOf("mineral")) - s.Require().Equal(sdk.NewInt(tc.amountOfTREE), tc.coins.AmountOf("tree")) - } + s.Run("AmountOf", func() { + for i, tc := range amountOfCases { + require.Equal(sdk.NewInt(tc.amountOfGAS), tc.coins.AmountOf("gas"), i) + require.Equal(sdk.NewInt(tc.amountOfMINERAL), tc.coins.AmountOf("mineral"), i) + require.Equal(sdk.NewInt(tc.amountOfTREE), tc.coins.AmountOf("tree"), i) + } + require.Panics(func() { amountOfCases[0].coins.AmountOf("10Invalid") }) + }) - s.Require().Panics(func() { cases[0].coins.AmountOf("10Invalid") }) + zeroCoin := sdk.Coin{} + findCases := []struct { + coins sdk.Coins + denom string + expectedOk bool + expectedCoin sdk.Coin + }{ + {case0, "any", false, zeroCoin}, + {case1, "other", false, zeroCoin}, + {case1, "gold", true, case1[0]}, + {case4, "gas", true, case4[0]}, + {case2, "gas", true, case2[0]}, + {case2, "mineral", true, case2[1]}, + {case2, "tree", true, case2[2]}, + {case2, "other", false, zeroCoin}, + } + s.Run("Find", func() { + for i, tc := range findCases { + ok, c := tc.coins.Find(tc.denom) + require.Equal(tc.expectedOk, ok, i) + require.Equal(tc.expectedCoin, c, i) + } + }) } func (s *coinTestSuite) TestCoinsIsAnyGTE() { @@ -1076,7 +1130,6 @@ func (s *coinTestSuite) TestCoinsIsAnyNil() { s.Require().True(sdk.Coins{twoAtom, nilAtom, fiveAtom, threeEth}.IsAnyNil()) s.Require().True(sdk.Coins{nilAtom, twoAtom, fiveAtom, threeEth}.IsAnyNil()) s.Require().False(sdk.Coins{twoAtom, fiveAtom, threeEth}.IsAnyNil()) - } func (s *coinTestSuite) TestMarshalJSONCoins() { diff --git a/types/context.go b/types/context.go index ccd860efa057..d4bca9cec645 100644 --- a/types/context.go +++ b/types/context.go @@ -36,8 +36,9 @@ type Context struct { checkTx bool recheckTx bool // if recheckTx == true, then checkTx must also be true minGasPrice DecCoins - consParams *tmproto.ConsensusParams + consParams *abci.ConsensusParams eventManager *EventManager + priority int64 // The tx priority, only relevant in CheckTx } // Proposed rename, not done to avoid API breakage @@ -58,10 +59,11 @@ func (c Context) IsCheckTx() bool { return c.checkTx } func (c Context) IsReCheckTx() bool { return c.recheckTx } func (c Context) MinGasPrices() DecCoins { return c.minGasPrice } func (c Context) EventManager() *EventManager { return c.eventManager } +func (c Context) Priority() int64 { return c.priority } // clone the header before returning func (c Context) BlockHeader() tmproto.Header { - var msg = proto.Clone(&c.header).(*tmproto.Header) + msg := proto.Clone(&c.header).(*tmproto.Header) return *msg } @@ -72,8 +74,8 @@ func (c Context) HeaderHash() tmbytes.HexBytes { return hash } -func (c Context) ConsensusParams() *tmproto.ConsensusParams { - return proto.Clone(c.consParams).(*tmproto.ConsensusParams) +func (c Context) ConsensusParams() *abci.ConsensusParams { + return proto.Clone(c.consParams).(*abci.ConsensusParams) } func (c Context) Deadline() (deadline time.Time, ok bool) { @@ -215,7 +217,7 @@ func (c Context) WithMinGasPrices(gasPrices DecCoins) Context { } // WithConsensusParams returns a Context with an updated consensus params -func (c Context) WithConsensusParams(params *tmproto.ConsensusParams) Context { +func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context { c.consParams = params return c } @@ -226,6 +228,12 @@ func (c Context) WithEventManager(em *EventManager) Context { return c } +// WithEventManager returns a Context with an updated tx priority +func (c Context) WithPriority(p int64) Context { + c.priority = p + return c +} + // TODO: remove??? func (c Context) IsZero() bool { return c.ms == nil diff --git a/types/context_test.go b/types/context_test.go index fafbfb441211..95406f55c8a9 100644 --- a/types/context_test.go +++ b/types/context_test.go @@ -127,7 +127,7 @@ func (s *contextTestSuite) TestContextWithCustom() { // test consensus param s.Require().Nil(ctx.ConsensusParams()) - cp := &tmproto.ConsensusParams{} + cp := &abci.ConsensusParams{} s.Require().Equal(cp, ctx.WithConsensusParams(cp).ConsensusParams()) // test inner context diff --git a/types/dec_coin.go b/types/dec_coin.go index aebfcc12192c..99c77a970668 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -17,7 +17,7 @@ func NewDecCoin(denom string, amount Int) DecCoin { return DecCoin{ Denom: coin.Denom, - Amount: coin.Amount.ToDec(), + Amount: NewDecFromInt(coin.Amount), } } @@ -43,7 +43,7 @@ func NewDecCoinFromCoin(coin Coin) DecCoin { return DecCoin{ Denom: coin.Denom, - Amount: coin.Amount.ToDec(), + Amount: NewDecFromInt(coin.Amount), } } @@ -111,7 +111,7 @@ func (coin DecCoin) Sub(coinB DecCoin) DecCoin { // change. Note, the change may be zero. func (coin DecCoin) TruncateDecimal() (Coin, DecCoin) { truncated := coin.Amount.TruncateInt() - change := coin.Amount.Sub(truncated.ToDec()) + change := coin.Amount.Sub(NewDecFromInt(truncated)) return NewCoin(coin.Denom, truncated), NewDecCoinFromDec(coin.Denom, change) } diff --git a/types/dec_coin_test.go b/types/dec_coin_test.go index 52f50d24fc22..170ec0e53519 100644 --- a/types/dec_coin_test.go +++ b/types/dec_coin_test.go @@ -399,7 +399,8 @@ func (s *decCoinTestSuite) TestParseDecCoins() { }, false, }, - {"0.0stake,0.004stake,5.04atom", // remove zero coins + { + "0.0stake,0.004stake,5.04atom", // remove zero coins sdk.DecCoins{ sdk.NewDecCoinFromDec("atom", sdk.NewDecWithPrec(5040000000000000000, sdk.Precision)), sdk.NewDecCoinFromDec("stake", sdk.NewDecWithPrec(4000000000000000, sdk.Precision)), @@ -644,7 +645,8 @@ func (s *decCoinTestSuite) TestDecCoins_GetDenomByIndex() { sdk.DecCoins{ sdk.DecCoin{testDenom1, sdk.NewDec(5)}, sdk.DecCoin{testDenom2, sdk.NewDec(57)}, - }, 1, testDenom2, false, + }, + 1, testDenom2, false, }, } @@ -710,7 +712,6 @@ func (s *decCoinTestSuite) TestDecCoin_IsLT() { expectedResult bool expectedPanic bool }{ - {"Same Denom - Less than other coin", sdk.DecCoin{testDenom1, sdk.NewDec(3)}, sdk.DecCoin{testDenom1, sdk.NewDec(19)}, true, false}, {"Same Denom - Greater than other coin", sdk.DecCoin{testDenom1, sdk.NewDec(343340)}, sdk.DecCoin{testDenom1, sdk.NewDec(14)}, false, false}, @@ -748,7 +749,6 @@ func (s *decCoinTestSuite) TestDecCoin_IsGTE() { expectedResult bool expectedPanic bool }{ - {"Same Denom - Less than other coin", sdk.DecCoin{testDenom1, sdk.NewDec(3)}, sdk.DecCoin{testDenom1, sdk.NewDec(19)}, false, false}, {"Same Denom - Greater than other coin", sdk.DecCoin{testDenom1, sdk.NewDec(343340)}, sdk.DecCoin{testDenom1, sdk.NewDec(14)}, true, false}, @@ -924,7 +924,6 @@ func (s *decCoinTestSuite) TestDecCoins_MulDecTruncate() { } func (s *decCoinTestSuite) TestDecCoins_QuoDec() { - testCases := []struct { name string coins sdk.DecCoins @@ -985,22 +984,33 @@ func (s *decCoinTestSuite) TestDecCoin_IsEqual() { expectedResult bool expectedPanic bool }{ - - {"Different Denom Same Amount", sdk.DecCoin{testDenom1, sdk.NewDec(20)}, + { + "Different Denom Same Amount", + sdk.DecCoin{testDenom1, sdk.NewDec(20)}, sdk.DecCoin{testDenom2, sdk.NewDec(20)}, - false, true}, + false, true, + }, - {"Different Denom Different Amount", sdk.DecCoin{testDenom1, sdk.NewDec(20)}, + { + "Different Denom Different Amount", + sdk.DecCoin{testDenom1, sdk.NewDec(20)}, sdk.DecCoin{testDenom2, sdk.NewDec(10)}, - false, true}, + false, true, + }, - {"Same Denom Different Amount", sdk.DecCoin{testDenom1, sdk.NewDec(20)}, + { + "Same Denom Different Amount", + sdk.DecCoin{testDenom1, sdk.NewDec(20)}, sdk.DecCoin{testDenom1, sdk.NewDec(10)}, - false, false}, + false, false, + }, - {"Same Denom Same Amount", sdk.DecCoin{testDenom1, sdk.NewDec(20)}, + { + "Same Denom Same Amount", sdk.DecCoin{testDenom1, sdk.NewDec(20)}, - true, false}, + sdk.DecCoin{testDenom1, sdk.NewDec(20)}, + true, false, + }, } for i, tc := range testCases { diff --git a/types/decimal.go b/types/decimal.go index 3be55863c068..ca9dc3ca5730 100644 --- a/types/decimal.go +++ b/types/decimal.go @@ -31,10 +31,10 @@ const ( // Floor[Log2[10^Precision - 1]]. decimalTruncateBits = DecimalPrecisionBits - 1 - maxDecBitLen = maxBitLen + decimalTruncateBits + maxDecBitLen = MaxBitLen + decimalTruncateBits // max number of iterations in ApproxRoot function - maxApproxRootIterations = 100 + maxApproxRootIterations = 300 ) var ( @@ -143,7 +143,7 @@ func NewDecFromIntWithPrec(i Int, prec int64) Dec { // CONTRACT - This function does not mutate the input str. func NewDecFromStr(str string) (Dec, error) { if len(str) == 0 { - return Dec{}, ErrEmptyDecimalStr + return Dec{}, fmt.Errorf("%s: %w", str, ErrEmptyDecimalStr) } // first extract any negative symbol @@ -154,7 +154,7 @@ func NewDecFromStr(str string) (Dec, error) { } if len(str) == 0 { - return Dec{}, ErrEmptyDecimalStr + return Dec{}, fmt.Errorf("%s: %w", str, ErrEmptyDecimalStr) } strs := strings.Split(str, ".") @@ -172,7 +172,7 @@ func NewDecFromStr(str string) (Dec, error) { } if lenDecs > Precision { - return Dec{}, fmt.Errorf("invalid precision; max: %d, got: %d", Precision, lenDecs) + return Dec{}, fmt.Errorf("value '%s' exceeds max precision by %d decimal places: max precision %d", str, Precision-lenDecs, Precision) } // add some extra zero's to correct to the Precision factor @@ -182,10 +182,10 @@ func NewDecFromStr(str string) (Dec, error) { combined, ok := new(big.Int).SetString(combinedStr, 10) // base 10 if !ok { - return Dec{}, fmt.Errorf("failed to set decimal string: %s", combinedStr) + return Dec{}, fmt.Errorf("failed to set decimal string with base 10: %s", combinedStr) } if combined.BitLen() > maxDecBitLen { - return Dec{}, fmt.Errorf("decimal out of range; bitLen: got %d, max %d", combined.BitLen(), maxDecBitLen) + return Dec{}, fmt.Errorf("decimal '%s' out of range; bitLen: got %d, max %d", str, combined.BitLen(), maxDecBitLen) } if neg { combined = new(big.Int).Neg(combined) @@ -318,7 +318,7 @@ func (d Dec) MulInt(i Int) Dec { } func (d Dec) MulIntMut(i Int) Dec { - d.i.Mul(d.i, i.i) + d.i.Mul(d.i, i.BigInt()) if d.i.BitLen() > maxDecBitLen { panic("Int overflow") } @@ -402,7 +402,7 @@ func (d Dec) QuoInt(i Int) Dec { } func (d Dec) QuoIntMut(i Int) Dec { - d.i.Quo(d.i, i.i) + d.i.Quo(d.i, i.BigInt()) return d } diff --git a/types/decimal_test.go b/types/decimal_test.go index 684888b49363..9416b94938aa 100644 --- a/types/decimal_test.go +++ b/types/decimal_test.go @@ -78,10 +78,14 @@ func (s *decimalTestSuite) TestNewDecFromStr() { {"0.8", false, sdk.NewDecWithPrec(8, 1)}, {"0.11111", false, sdk.NewDecWithPrec(11111, 5)}, {"314460551102969.3144278234343371835", true, sdk.NewDec(3141203149163817869)}, - {"314460551102969314427823434337.1835718092488231350", - true, sdk.NewDecFromBigIntWithPrec(largeBigInt, 4)}, - {"314460551102969314427823434337.1835", - false, sdk.NewDecFromBigIntWithPrec(largeBigInt, 4)}, + { + "314460551102969314427823434337.1835718092488231350", + true, sdk.NewDecFromBigIntWithPrec(largeBigInt, 4), + }, + { + "314460551102969314427823434337.1835", + false, sdk.NewDecFromBigIntWithPrec(largeBigInt, 4), + }, {".", true, sdk.Dec{}}, {".0", true, sdk.NewDec(0)}, {"1.", true, sdk.NewDec(1)}, @@ -189,7 +193,6 @@ func (s *decimalTestSuite) TestEqualities() { s.Require().Equal(tc.lt, tc.d1.LT(tc.d2), "LT result is incorrect, tc %d", tcIndex) s.Require().Equal(tc.eq, tc.d1.Equal(tc.d2), "equality result is incorrect, tc %d", tcIndex) } - } func (s *decimalTestSuite) TestDecsEqual() { @@ -233,19 +236,27 @@ func (s *decimalTestSuite) TestArithmetic() { {sdk.NewDec(1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(0), sdk.NewDec(2)}, {sdk.NewDec(-1), sdk.NewDec(1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(-1), sdk.NewDec(0), sdk.NewDec(-2)}, - {sdk.NewDec(3), sdk.NewDec(7), sdk.NewDec(21), sdk.NewDec(21), + { + sdk.NewDec(3), sdk.NewDec(7), sdk.NewDec(21), sdk.NewDec(21), sdk.NewDecWithPrec(428571428571428571, 18), sdk.NewDecWithPrec(428571428571428572, 18), sdk.NewDecWithPrec(428571428571428571, 18), - sdk.NewDec(10), sdk.NewDec(-4)}, - {sdk.NewDec(2), sdk.NewDec(4), sdk.NewDec(8), sdk.NewDec(8), sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), - sdk.NewDec(6), sdk.NewDec(-2)}, + sdk.NewDec(10), sdk.NewDec(-4), + }, + { + sdk.NewDec(2), sdk.NewDec(4), sdk.NewDec(8), sdk.NewDec(8), sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), + sdk.NewDec(6), sdk.NewDec(-2), + }, {sdk.NewDec(100), sdk.NewDec(100), sdk.NewDec(10000), sdk.NewDec(10000), sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(200), sdk.NewDec(0)}, - {sdk.NewDecWithPrec(15, 1), sdk.NewDecWithPrec(15, 1), sdk.NewDecWithPrec(225, 2), sdk.NewDecWithPrec(225, 2), - sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(3), sdk.NewDec(0)}, - {sdk.NewDecWithPrec(3333, 4), sdk.NewDecWithPrec(333, 4), sdk.NewDecWithPrec(1109889, 8), sdk.NewDecWithPrec(1109889, 8), + { + sdk.NewDecWithPrec(15, 1), sdk.NewDecWithPrec(15, 1), sdk.NewDecWithPrec(225, 2), sdk.NewDecWithPrec(225, 2), + sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(3), sdk.NewDec(0), + }, + { + sdk.NewDecWithPrec(3333, 4), sdk.NewDecWithPrec(333, 4), sdk.NewDecWithPrec(1109889, 8), sdk.NewDecWithPrec(1109889, 8), sdk.MustNewDecFromStr("10.009009009009009009"), sdk.MustNewDecFromStr("10.009009009009009010"), sdk.MustNewDecFromStr("10.009009009009009009"), - sdk.NewDecWithPrec(3666, 4), sdk.NewDecWithPrec(3, 1)}, + sdk.NewDecWithPrec(3666, 4), sdk.NewDecWithPrec(3, 1), + }, } for tcIndex, tc := range tests { @@ -422,11 +433,12 @@ func (s *decimalTestSuite) TestApproxRoot() { {sdk.SmallestDec(), 2, sdk.NewDecWithPrec(1, 9)}, // 1e-18 ^ (0.5) => 1e-9 {sdk.SmallestDec(), 3, sdk.MustNewDecFromStr("0.000000999999999997")}, // 1e-18 ^ (1/3) => 1e-6 {sdk.NewDecWithPrec(1, 8), 3, sdk.MustNewDecFromStr("0.002154434690031900")}, // 1e-8 ^ (1/3) ≈ 0.00215443469 + {sdk.MustNewDecFromStr("9000002314687921634000000000000000000021394871242000000000000000"), 2, sdk.MustNewDecFromStr("94868342004527103646332858502867.899477053226766107")}, } // In the case of 1e-8 ^ (1/3), the result repeats every 5 iterations starting from iteration 24 // (i.e. 24, 29, 34, ... give the same result) and never converges enough. The maximum number of - // iterations (100) causes the result at iteration 100 to be returned, regardless of convergence. + // iterations (300) causes the result at iteration 300 to be returned, regardless of convergence. for i, tc := range testCases { res, err := tc.input.ApproxRoot(tc.root) diff --git a/types/denom.go b/types/denom.go index 0e8d716a2670..df25dd4b55ed 100644 --- a/types/denom.go +++ b/types/denom.go @@ -75,7 +75,7 @@ func ConvertCoin(coin Coin, denom string) (Coin, error) { return NewCoin(denom, coin.Amount), nil } - return NewCoin(denom, coin.Amount.ToDec().Mul(srcUnit).Quo(dstUnit).TruncateInt()), nil + return NewCoin(denom, NewDecFromInt(coin.Amount).Mul(srcUnit).Quo(dstUnit).TruncateInt()), nil } // ConvertDecCoin attempts to convert a decimal coin to a given denomination. If the given diff --git a/types/errors/abci.go b/types/errors/abci.go index fef8dfa8ab69..729e3c554085 100644 --- a/types/errors/abci.go +++ b/types/errors/abci.go @@ -17,6 +17,20 @@ func ResponseCheckTx(err error, gw, gu uint64, debug bool) abci.ResponseCheckTx } } +// ResponseCheckTxWithEvents returns an ABCI ResponseCheckTx object with fields filled in +// from the given error, gas values and events. +func ResponseCheckTxWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) abci.ResponseCheckTx { + space, code, log := ABCIInfo(err, debug) + return abci.ResponseCheckTx{ + Codespace: space, + Code: code, + Log: log, + GasWanted: int64(gw), + GasUsed: int64(gu), + Events: events, + } +} + // ResponseDeliverTx returns an ABCI ResponseDeliverTx object with fields filled in // from the given error and gas values. func ResponseDeliverTx(err error, gw, gu uint64, debug bool) abci.ResponseDeliverTx { @@ -30,6 +44,20 @@ func ResponseDeliverTx(err error, gw, gu uint64, debug bool) abci.ResponseDelive } } +// ResponseDeliverTxWithEvents returns an ABCI ResponseDeliverTx object with fields filled in +// from the given error, gas values and events. +func ResponseDeliverTxWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) abci.ResponseDeliverTx { + space, code, log := ABCIInfo(err, debug) + return abci.ResponseDeliverTx{ + Codespace: space, + Code: code, + Log: log, + GasWanted: int64(gw), + GasUsed: int64(gu), + Events: events, + } +} + // QueryResult returns a ResponseQuery from an error. It will try to parse ABCI // info from the error. func QueryResult(err error, debug bool) abci.ResponseQuery { diff --git a/types/errors/doc.go b/types/errors/doc.go index 31f9e6cdaa1d..e55370a43d39 100644 --- a/types/errors/doc.go +++ b/types/errors/doc.go @@ -1,9 +1,9 @@ // Package errors provides a shared set of errors for use in the SDK, -// aliases functionality in the github.com/cosmos/cosmos-sdk/errors module +// aliases functionality in the cosmossdk.io/errors module // that used to be in this package, and provides some helpers for converting // errors to ABCI response code. // -// New code should generally import github.com/cosmos/cosmos-sdk/errors directly +// New code should generally import cosmossdk.io/errors directly // and define a custom set of errors in custom codespace, rather than importing // this package. package errors diff --git a/types/errors/errors.go b/types/errors/errors.go index aa6bffe0616d..c81af4b5ae89 100644 --- a/types/errors/errors.go +++ b/types/errors/errors.go @@ -1,18 +1,17 @@ package errors import ( - errorsmod "github.com/cosmos/cosmos-sdk/errors" + errorsmod "cosmossdk.io/errors" ) // Type Aliases to errors module // // Deprecated: functionality of this package has been moved to it's own module: -// github.com/cosmos/cosmos-sdk/errors +// cosmossdk.io/errors // Please use the above module instead of this package. var ( SuccessABCICode = errorsmod.SuccessABCICode ABCIInfo = errorsmod.ABCIInfo - Redact = errorsmod.Redact UndefinedCodespace = errorsmod.UndefinedCodespace Register = errorsmod.Register ABCIError = errorsmod.ABCIError @@ -27,7 +26,7 @@ var ( // Error type alias for errorsmod.Error // -// Deprecated: the type has been moved to github.com/cosmos/cosmos-sdk/errors +// Deprecated: the type has been moved to cosmossdk.io/errors // module. Please use the above module instead of this package. type Error = errorsmod.Error @@ -162,6 +161,10 @@ var ( // ErrAppConfig defines an error occurred if min-gas-prices field in BaseConfig is empty. ErrAppConfig = Register(RootCodespace, 40, "error in app.toml") + // ErrInvalidGasLimit defines an error when an invalid GasWanted value is + // supplied. + ErrInvalidGasLimit = Register(RootCodespace, 41, "invalid gas limit") + // ErrPanic is only set when we recover from a panic, so we know to // redact potentially sensitive system info ErrPanic = errorsmod.ErrPanic diff --git a/types/events.go b/types/events.go index 664a0082f8aa..4e49d07ba5ec 100644 --- a/types/events.go +++ b/types/events.go @@ -90,8 +90,8 @@ func TypedEventToEvent(tev proto.Message) (Event, error) { attrs := make([]abci.EventAttribute, 0, len(attrMap)) for k, v := range attrMap { attrs = append(attrs, abci.EventAttribute{ - Key: k, - Value: string(v), + Key: []byte(k), + Value: v, }) } @@ -122,7 +122,7 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { attrMap := make(map[string]json.RawMessage) for _, attr := range event.Attributes { - attrMap[attr.Key] = json.RawMessage(attr.Value) + attrMap[string(attr.Key)] = json.RawMessage(attr.Value) } attrBytes, err := json.Marshal(attrMap) @@ -178,7 +178,18 @@ func (a Attribute) String() string { // ToKVPair converts an Attribute object into a Tendermint key/value pair. func (a Attribute) ToKVPair() abci.EventAttribute { - return abci.EventAttribute{Key: a.Key, Value: a.Value} + return abci.EventAttribute{Key: toBytes(a.Key), Value: toBytes(a.Value)} +} + +func toBytes(i interface{}) []byte { + switch x := i.(type) { + case []uint8: + return x + case string: + return []byte(x) + default: + panic(i) + } } // AppendAttributes adds one or more attributes to an Event. @@ -211,7 +222,7 @@ func (e Events) ToABCIEvents() []abci.Event { } // Common event types and attribute keys -var ( +const ( EventTypeTx = "tx" AttributeKeyAccountSequence = "acc_seq" @@ -275,7 +286,7 @@ func StringifyEvent(e abci.Event) StringEvent { for _, attr := range e.Attributes { res.Attributes = append( res.Attributes, - Attribute{Key: attr.Key, Value: attr.Value}, + Attribute{Key: string(attr.Key), Value: string(attr.Value)}, ) } diff --git a/types/events_test.go b/types/events_test.go index 87622550d26a..db108d3df772 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -21,10 +21,6 @@ func TestEventsTestSuite(t *testing.T) { suite.Run(t, new(eventsTestSuite)) } -func (s *eventsTestSuite) SetupSuite() { - s.T().Parallel() -} - func (s *eventsTestSuite) TestAppendEvents() { e1 := sdk.NewEvent("transfer", sdk.NewAttribute("sender", "foo")) e2 := sdk.NewEvent("transfer", sdk.NewAttribute("sender", "bar")) @@ -103,20 +99,43 @@ func (s *eventsTestSuite) TestEventManagerTypedEvents() { } func (s *eventsTestSuite) TestStringifyEvents() { - e := sdk.Events{ - sdk.NewEvent("message", sdk.NewAttribute("sender", "foo")), - sdk.NewEvent("message", sdk.NewAttribute("module", "bank")), + cases := []struct { + name string + events sdk.Events + expTxtStr string + expJSONStr string + }{ + { + name: "default", + events: sdk.Events{ + sdk.NewEvent("message", sdk.NewAttribute(sdk.AttributeKeySender, "foo")), + sdk.NewEvent("message", sdk.NewAttribute(sdk.AttributeKeyModule, "bank")), + }, + expTxtStr: "\t\t- message\n\t\t\t- sender: foo\n\t\t\t- module: bank", + expJSONStr: "[{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"foo\"},{\"key\":\"module\",\"value\":\"bank\"}]}]", + }, + { + name: "multiple events with same attributes", + events: sdk.Events{ + sdk.NewEvent( + "message", + sdk.NewAttribute(sdk.AttributeKeyModule, "staking"), + sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1foo"), + ), + sdk.NewEvent("message", sdk.NewAttribute(sdk.AttributeKeySender, "foo")), + }, + expTxtStr: "\t\t- message\n\t\t\t- module: staking\n\t\t\t- sender: cosmos1foo\n\t\t\t- sender: foo", + expJSONStr: `[{"type":"message","attributes":[{"key":"module","value":"staking"},{"key":"sender","value":"cosmos1foo"},{"key":"sender","value":"foo"}]}]`, + }, } - se := sdk.StringifyEvents(e.ToABCIEvents()) - - expectedTxtStr := "\t\t- message\n\t\t\t- sender: foo\n\t\t\t- module: bank" - s.Require().Equal(expectedTxtStr, se.String()) - bz, err := json.Marshal(se) - s.Require().NoError(err) - - expectedJSONStr := "[{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"foo\"},{\"key\":\"module\",\"value\":\"bank\"}]}]" - s.Require().Equal(expectedJSONStr, string(bz)) + for _, test := range cases { + se := sdk.StringifyEvents(test.events.ToABCIEvents()) + s.Require().Equal(test.expTxtStr, se.String()) + bz, err := json.Marshal(se) + s.Require().NoError(err) + s.Require().Equal(test.expJSONStr, string(bz)) + } } func (s *eventsTestSuite) TestMarkEventsToIndex() { @@ -124,15 +143,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo"}, - {Key: "recipient", Value: "bar"}, + {Key: []byte("sender"), Value: []byte("foo")}, + {Key: []byte("recipient"), Value: []byte("bar")}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5"}, - {Key: "unbond", Value: "10"}, + {Key: []byte("deposit"), Value: []byte("5")}, + {Key: []byte("unbond"), Value: []byte("10")}, }, }, } @@ -148,15 +167,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo", Index: true}, - {Key: "recipient", Value: "bar", Index: true}, + {Key: []byte("sender"), Value: []byte("foo"), Index: true}, + {Key: []byte("recipient"), Value: []byte("bar"), Index: true}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5", Index: true}, - {Key: "unbond", Value: "10", Index: true}, + {Key: []byte("deposit"), Value: []byte("5"), Index: true}, + {Key: []byte("unbond"), Value: []byte("10"), Index: true}, }, }, }, @@ -168,15 +187,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo", Index: true}, - {Key: "recipient", Value: "bar"}, + {Key: []byte("sender"), Value: []byte("foo"), Index: true}, + {Key: []byte("recipient"), Value: []byte("bar")}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5", Index: true}, - {Key: "unbond", Value: "10"}, + {Key: []byte("deposit"), Value: []byte("5"), Index: true}, + {Key: []byte("unbond"), Value: []byte("10")}, }, }, }, @@ -191,15 +210,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo", Index: true}, - {Key: "recipient", Value: "bar", Index: true}, + {Key: []byte("sender"), Value: []byte("foo"), Index: true}, + {Key: []byte("recipient"), Value: []byte("bar"), Index: true}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5", Index: true}, - {Key: "unbond", Value: "10", Index: true}, + {Key: []byte("deposit"), Value: []byte("5"), Index: true}, + {Key: []byte("unbond"), Value: []byte("10"), Index: true}, }, }, }, diff --git a/types/kv/list.go b/types/kv/list.go index 9e928c84912b..2b0793d343cd 100644 --- a/types/kv/list.go +++ b/types/kv/list.go @@ -1,6 +1,6 @@ package kv -// This code was copied from golang.org/pkg/container/list, but specially adapted +// This code was copied from pkg.go.dev/container/list, but specially adapted // for use with kv.Pair to avoid the type assertion CPU expense of using Value with // an interface, per https://github.com/cosmos/cosmos-sdk/issues/8810 // diff --git a/types/math.go b/types/math.go new file mode 100644 index 000000000000..be46b0591677 --- /dev/null +++ b/types/math.go @@ -0,0 +1,37 @@ +package types + +import ( + sdkmath "cosmossdk.io/math" +) + +// Type aliases to the SDK's math sub-module +// +// Deprecated: Functionality of this package has been moved to it's own module: +// cosmossdk.io/math +// +// Please use the above module instead of this package. +type ( + Int = sdkmath.Int + Uint = sdkmath.Uint +) + +var ( + NewIntFromBigInt = sdkmath.NewIntFromBigInt + OneInt = sdkmath.OneInt + NewInt = sdkmath.NewInt + ZeroInt = sdkmath.ZeroInt + IntEq = sdkmath.IntEq + NewIntFromString = sdkmath.NewIntFromString + NewUint = sdkmath.NewUint + NewIntFromUint64 = sdkmath.NewIntFromUint64 + MaxInt = sdkmath.MaxInt + MinInt = sdkmath.MinInt +) + +const ( + MaxBitLen = sdkmath.MaxBitLen +) + +func (ip IntProto) String() string { + return ip.Int.String() +} diff --git a/types/module/configurator.go b/types/module/configurator.go index c0b25a82e970..811fb51996d5 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -89,8 +89,8 @@ func (c configurator) RegisterMigration(moduleName string, fromVersion uint64, h // runModuleMigrations runs all in-place store migrations for one given module from a // version to another version. func (c configurator) runModuleMigrations(ctx sdk.Context, moduleName string, fromVersion, toVersion uint64) error { - // No-op if toVersion is the initial version. - if toVersion <= 1 { + // No-op if toVersion is the initial version or if the version is unchanged. + if toVersion <= 1 || fromVersion == toVersion { return nil } diff --git a/types/module/module.go b/types/module/module.go index e38e6bc78fc0..bbf4abcadba7 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -33,7 +33,6 @@ import ( "fmt" "sort" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -55,7 +54,6 @@ type AppModuleBasic interface { ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage) error // client functionality - RegisterRESTRoutes(client.Context, *mux.Router) RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux) GetTxCmd() *cobra.Command GetQueryCmd() *cobra.Command @@ -108,13 +106,6 @@ func (bm BasicManager) ValidateGenesis(cdc codec.JSONCodec, txEncCfg client.TxEn return nil } -// RegisterRESTRoutes registers all module rest routes -func (bm BasicManager) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - for _, b := range bm { - b.RegisterRESTRoutes(clientCtx, rtr) - } -} - // RegisterGRPCGatewayRoutes registers all module rest routes func (bm BasicManager) RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux) { for _, b := range bm { @@ -178,9 +169,17 @@ type AppModule interface { // introduced by the module. To avoid wrong/empty versions, the initial version // should be set to 1. ConsensusVersion() uint64 +} - // ABCI +// BeginBlockAppModule is an extension interface that contains information about the AppModule and BeginBlock. +type BeginBlockAppModule interface { + AppModule BeginBlock(sdk.Context, abci.RequestBeginBlock) +} + +// EndBlockAppModule is an extension interface that contains information about the AppModule and EndBlock. +type EndBlockAppModule interface { + AppModule EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate } @@ -235,7 +234,6 @@ type Manager struct { // NewManager creates a new Manager object func NewManager(modules ...AppModule) *Manager { - moduleMap := make(map[string]AppModule) modulesStr := make([]string, 0, len(modules)) for _, module := range modules { @@ -431,7 +429,7 @@ func (m Manager) RunMigrations(ctx sdk.Context, cfg Configurator, fromVM Version if !ok { return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expected %T, got %T", configurator{}, cfg) } - var modules = m.OrderMigrations + modules := m.OrderMigrations if modules == nil { modules = DefaultMigrationsOrder(m.ModuleNames()) } @@ -478,7 +476,10 @@ func (m *Manager) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) abci.R ctx = ctx.WithEventManager(sdk.NewEventManager()) for _, moduleName := range m.OrderBeginBlockers { - m.Modules[moduleName].BeginBlock(ctx, req) + module, ok := m.Modules[moduleName].(BeginBlockAppModule) + if ok { + module.BeginBlock(ctx, req) + } } return abci.ResponseBeginBlock{ @@ -494,7 +495,11 @@ func (m *Manager) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) abci.Respo validatorUpdates := []abci.ValidatorUpdate{} for _, moduleName := range m.OrderEndBlockers { - moduleValUpdates := m.Modules[moduleName].EndBlock(ctx, req) + module, ok := m.Modules[moduleName].(EndBlockAppModule) + if !ok { + continue + } + moduleValUpdates := module.EndBlock(ctx, req) // use these validator updates if provided, the module manager assumes // only one module will update the validator set diff --git a/types/module/module_test.go b/types/module/module_test.go index 4dbb4a73c5b6..926a4a4ab3f8 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -5,7 +5,6 @@ import ( "errors" "testing" - "github.com/gorilla/mux" "github.com/golang/mock/gomock" "github.com/spf13/cobra" "github.com/stretchr/testify/require" @@ -13,9 +12,9 @@ import ( "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/tests/mocks" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -41,7 +40,6 @@ func TestBasicManager(t *testing.T) { mockAppModuleBasic1.EXPECT().ValidateGenesis(gomock.Eq(cdc), gomock.Eq(nil), gomock.Eq(wantDefaultGenesis["mockAppModuleBasic1"])).Times(1).Return(errFoo) mockAppModuleBasic1.EXPECT().RegisterLegacyAminoCodec(gomock.Eq(legacyAmino)).Times(1) mockAppModuleBasic1.EXPECT().RegisterInterfaces(gomock.Eq(interfaceRegistry)).Times(1) - mockAppModuleBasic1.EXPECT().RegisterRESTRoutes(gomock.Eq(client.Context{}), gomock.Eq(&mux.Router{})).Times(1) mockAppModuleBasic1.EXPECT().GetTxCmd().Times(1).Return(nil) mockAppModuleBasic1.EXPECT().GetQueryCmd().Times(1).Return(nil) @@ -58,8 +56,6 @@ func TestBasicManager(t *testing.T) { require.True(t, errors.Is(errFoo, mm.ValidateGenesis(cdc, nil, wantDefaultGenesis))) - mm.RegisterRESTRoutes(client.Context{}, &mux.Router{}) - mockCmd := &cobra.Command{Use: "root"} mm.AddTxCommands(mockCmd) @@ -83,8 +79,6 @@ func TestGenesisOnlyAppModule(t *testing.T) { // no-op goam.RegisterInvariants(mockInvariantRegistry) - goam.BeginBlock(sdk.Context{}, abci.RequestBeginBlock{}) - require.Equal(t, []abci.ValidatorUpdate{}, goam.EndBlock(sdk.Context{}, abci.RequestEndBlock{})) } func TestManagerOrderSetters(t *testing.T) { @@ -213,7 +207,8 @@ func TestManager_InitGenesis(t *testing.T) { // test panic genesisData = map[string]json.RawMessage{ "module1": json.RawMessage(`{"key": "value"}`), - "module2": json.RawMessage(`{"key": "value"}`)} + "module2": json.RawMessage(`{"key": "value"}`), + } mockAppModule1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module1"])).Times(1).Return([]abci.ValidatorUpdate{{}}) mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(cdc), gomock.Eq(genesisData["module2"])).Times(1).Return([]abci.ValidatorUpdate{{}}) require.Panics(t, func() { mm.InitGenesis(ctx, cdc, genesisData) }) @@ -239,7 +234,8 @@ func TestManager_ExportGenesis(t *testing.T) { want := map[string]json.RawMessage{ "module1": json.RawMessage(`{"key1": "value1"}`), - "module2": json.RawMessage(`{"key2": "value2"}`)} + "module2": json.RawMessage(`{"key2": "value2"}`), + } require.Equal(t, want, mm.ExportGenesis(ctx, cdc)) } diff --git a/types/module/simulation.go b/types/module/simulation.go index 252cf268f837..8cba9093452e 100644 --- a/types/module/simulation.go +++ b/types/module/simulation.go @@ -2,10 +2,11 @@ package module import ( "encoding/json" - "math/rand" + "sort" "time" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/simulation" @@ -47,6 +48,38 @@ func NewSimulationManager(modules ...AppModuleSimulation) *SimulationManager { } } +// NewSimulationManagerFromAppModules creates a new SimulationManager object. +// +// First it sets any SimulationModule provided by overrideModules, and ignores any AppModule +// with the same moduleName. +// Then it attempts to cast every provided AppModule into an AppModuleSimulation. +// If the cast succeeds, its included, otherwise it is excluded. +func NewSimulationManagerFromAppModules(modules map[string]AppModule, overrideModules map[string]AppModuleSimulation) *SimulationManager { + simModules := []AppModuleSimulation{} + appModuleNamesSorted := make([]string, 0, len(modules)) + for moduleName := range modules { + appModuleNamesSorted = append(appModuleNamesSorted, moduleName) + } + + sort.Strings(appModuleNamesSorted) + + for _, moduleName := range appModuleNamesSorted { + // for every module, see if we override it. If so, use override. + // Else, if we can cast the app module into a simulation module add it. + // otherwise no simulation module. + if simModule, ok := overrideModules[moduleName]; ok { + simModules = append(simModules, simModule) + } else { + appModule := modules[moduleName] + if simModule, ok := appModule.(AppModuleSimulation); ok { + simModules = append(simModules, simModule) + } + // cannot cast, so we continue + } + } + return NewSimulationManager(simModules...) +} + // GetProposalContents returns each module's proposal content generator function // with their default operation weight and key. func (sm *SimulationManager) GetProposalContents(simState SimulationState) []simulation.WeightedProposalContent { @@ -103,7 +136,7 @@ type SimulationState struct { Rand *rand.Rand // random number GenState map[string]json.RawMessage // genesis state Accounts []simulation.Account // simulation accounts - InitialStake int64 // initial coins per account + InitialStake sdkmath.Int // initial coins per account NumBonded int64 // number of initially bonded accounts GenTimestamp time.Time // genesis timestamp UnbondTime time.Duration // staking unbond time stored to use it as the slashing maximum evidence duration diff --git a/types/query/filtered_pagination.go b/types/query/filtered_pagination.go index 47dd31aaba71..50c85ac49a51 100644 --- a/types/query/filtered_pagination.go +++ b/types/query/filtered_pagination.go @@ -3,6 +3,7 @@ package query import ( "fmt" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/types" ) @@ -19,7 +20,6 @@ func FilteredPaginate( pageRequest *PageRequest, onResult func(key []byte, value []byte, accumulate bool) (bool, error), ) (*PageResponse, error) { - // if the PageRequest is nil, use default PageRequest if pageRequest == nil { pageRequest = &PageRequest{} @@ -46,8 +46,10 @@ func FilteredPaginate( iterator := getIterator(prefixStore, key, reverse) defer iterator.Close() - var numHits uint64 - var nextKey []byte + var ( + numHits uint64 + nextKey []byte + ) for ; iterator.Valid(); iterator.Next() { if numHits == limit { @@ -79,8 +81,10 @@ func FilteredPaginate( end := offset + limit - var numHits uint64 - var nextKey []byte + var ( + numHits uint64 + nextKey []byte + ) for ; iterator.Valid(); iterator.Next() { if iterator.Error() != nil { @@ -115,3 +119,137 @@ func FilteredPaginate( return res, nil } + +// GenericFilteredPaginate does pagination of all the results in the PrefixStore based on the +// provided PageRequest. `onResult` should be used to filter or transform the results. +// `c` is a constructor function that needs to return a new instance of the type T (this is to +// workaround some generic pitfalls in which we can't instantiate a T struct inside the function). +// If key is provided, the pagination uses the optimized querying. +// If offset is used, the pagination uses lazy filtering i.e., searches through all the records. +// The resulting slice (of type F) can be of a different type than the one being iterated through +// (type T), so it's possible to do any necessary transformation inside the onResult function. +func GenericFilteredPaginate[T codec.ProtoMarshaler, F codec.ProtoMarshaler]( + cdc codec.BinaryCodec, + prefixStore types.KVStore, + pageRequest *PageRequest, + onResult func(key []byte, value T) (F, error), + constructor func() T, +) ([]F, *PageResponse, error) { + // if the PageRequest is nil, use default PageRequest + if pageRequest == nil { + pageRequest = &PageRequest{} + } + + offset := pageRequest.Offset + key := pageRequest.Key + limit := pageRequest.Limit + countTotal := pageRequest.CountTotal + reverse := pageRequest.Reverse + results := []F{} + + if offset > 0 && key != nil { + return results, nil, fmt.Errorf("invalid request, either offset or key is expected, got both") + } + + if limit == 0 { + limit = DefaultLimit + + // count total results when the limit is zero/not supplied + countTotal = true + } + + if len(key) != 0 { + iterator := getIterator(prefixStore, key, reverse) + defer iterator.Close() + + var ( + numHits uint64 + nextKey []byte + ) + + for ; iterator.Valid(); iterator.Next() { + if numHits == limit { + nextKey = iterator.Key() + break + } + + if iterator.Error() != nil { + return nil, nil, iterator.Error() + } + + protoMsg := constructor() + + err := cdc.Unmarshal(iterator.Value(), protoMsg) + if err != nil { + return nil, nil, err + } + + val, err := onResult(iterator.Key(), protoMsg) + if err != nil { + return nil, nil, err + } + + if val.Size() != 0 { + results = append(results, val) + numHits++ + } + } + + return results, &PageResponse{ + NextKey: nextKey, + }, nil + } + + iterator := getIterator(prefixStore, nil, reverse) + defer iterator.Close() + + end := offset + limit + + var ( + numHits uint64 + nextKey []byte + ) + + for ; iterator.Valid(); iterator.Next() { + if iterator.Error() != nil { + return nil, nil, iterator.Error() + } + + protoMsg := constructor() + + err := cdc.Unmarshal(iterator.Value(), protoMsg) + if err != nil { + return nil, nil, err + } + + val, err := onResult(iterator.Key(), protoMsg) + if err != nil { + return nil, nil, err + } + + if val.Size() != 0 { + // Previously this was the "accumulate" flag + if numHits >= offset && numHits < end { + results = append(results, val) + } + numHits++ + } + + if numHits == end+1 { + if nextKey == nil { + nextKey = iterator.Key() + } + + if !countTotal { + break + } + } + } + + res := &PageResponse{NextKey: nextKey} + if countTotal { + res.Total = numHits + } + + return results, res, nil +} diff --git a/types/query/filtered_pagination_test.go b/types/query/filtered_pagination_test.go index 694d0c3cbbcd..2da46f83125c 100644 --- a/types/query/filtered_pagination_test.go +++ b/types/query/filtered_pagination_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" @@ -141,7 +142,7 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.Require().NotNil(res) s.Require().Equal(2, len(balns)) s.Require().NotNil(res.NextKey) - s.Require().Equal(string(res.NextKey), fmt.Sprintf("test7denom")) + s.Require().Equal(string(res.NextKey), "test7denom") s.Require().Equal(uint64(10), res.Total) s.T().Log("verify both key and offset can't be given") @@ -168,7 +169,6 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.T().Log("verify Reverse pagination returns valid result") s.Require().Equal(balances[235:241].String(), balns.Sort().String()) - } func ExampleFilteredPaginate(t *testing.T) { @@ -201,7 +201,7 @@ func ExampleFilteredPaginate(t *testing.T) { var balResult sdk.Coins pageRes, err := query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) { - var amount sdk.Int + var amount math.Int err := amount.Unmarshal(value) if err != nil { return false, err @@ -218,7 +218,6 @@ func ExampleFilteredPaginate(t *testing.T) { return false, nil }) - if err != nil { // should return no error fmt.Println(err) } @@ -233,7 +232,7 @@ func execFilterPaginate(store sdk.KVStore, pageReq *query.PageRequest, appCodec var balResult sdk.Coins res, err = query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) { - var amount sdk.Int + var amount math.Int err := amount.Unmarshal(value) if err != nil { return false, err @@ -277,7 +276,7 @@ func (s *paginationTestSuite) TestFilteredPaginationsNextKey() { var balResult sdk.Coins res, err = query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) { - var amount sdk.Int + var amount math.Int err := amount.Unmarshal(value) if err != nil { return false, err diff --git a/types/query/pagination.go b/types/query/pagination.go index e5cd71b71c83..a01587387d12 100644 --- a/types/query/pagination.go +++ b/types/query/pagination.go @@ -54,7 +54,6 @@ func Paginate( pageRequest *PageRequest, onResult func(key []byte, value []byte) error, ) (*PageResponse, error) { - // if the PageRequest is nil, use default PageRequest if pageRequest == nil { pageRequest = &PageRequest{} diff --git a/types/result.go b/types/result.go index 38787e8eb5eb..9c9704e0cbc9 100644 --- a/types/result.go +++ b/types/result.go @@ -8,7 +8,7 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -230,8 +230,8 @@ func (r TxResponse) GetTx() Tx { return nil } -// WrapServiceResult wraps a result from a protobuf RPC service method call in -// a Result object or error. This method takes care of marshaling the res param to +// WrapServiceResult wraps a result from a protobuf RPC service method call (res proto.Message, err error) +// in a Result object or error. This method takes care of marshaling the res param to // protobuf and attaching any events on the ctx.EventManager() to the Result. func WrapServiceResult(ctx Context, res proto.Message, err error) (*Result, error) { if err != nil { diff --git a/types/result_test.go b/types/result_test.go index 8364f166f77c..a7ef4ef06ab7 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -159,8 +159,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Type: "message", Attributes: []abci.EventAttribute{ { - Key: "action", - Value: "foo", + Key: []byte("action"), + Value: []byte("foo"), Index: true, }, }, @@ -184,8 +184,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Type: "message", Attributes: []abci.EventAttribute{ { - Key: "action", - Value: "foo", + Key: []byte("action"), + Value: []byte("foo"), Index: true, }, }, @@ -209,8 +209,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Type: "message", Attributes: []abci.EventAttribute{ { - Key: "action", - Value: "foo", + Key: []byte("action"), + Value: []byte("foo"), Index: true, }, }, diff --git a/types/simulation/rand_util.go b/types/simulation/rand_util.go index f136da396990..ce64bd7e8645 100644 --- a/types/simulation/rand_util.go +++ b/types/simulation/rand_util.go @@ -53,7 +53,7 @@ func RandPositiveInt(r *rand.Rand, max sdk.Int) (sdk.Int, error) { // RandomAmount generates a random amount // Note: The range of RandomAmount includes max, and is, in fact, biased to return max as well as 0. func RandomAmount(r *rand.Rand, max sdk.Int) sdk.Int { - var randInt = big.NewInt(0) + randInt := big.NewInt(0) switch r.Intn(10) { case 0: @@ -70,7 +70,7 @@ func RandomAmount(r *rand.Rand, max sdk.Int) sdk.Int { // RandomDecAmount generates a random decimal amount // Note: The range of RandomDecAmount includes max, and is, in fact, biased to return max as well as 0. func RandomDecAmount(r *rand.Rand, max sdk.Dec) sdk.Dec { - var randInt = big.NewInt(0) + randInt := big.NewInt(0) switch r.Intn(10) { case 0: diff --git a/types/simulation/types.go b/types/simulation/types.go index 7efb64ba3149..199f47fa38e2 100644 --- a/types/simulation/types.go +++ b/types/simulation/types.go @@ -84,7 +84,6 @@ func NewOperationMsg(msg sdk.Msg, ok bool, comment string, cdc *codec.ProtoCodec bz := cdc.MustMarshalJSON(msg) return NewOperationMsgBasic(sdk.MsgTypeURL(msg), sdk.MsgTypeURL(msg), comment, ok, bz) - } // NoOpMsg - create a no-operation message diff --git a/types/store.go b/types/store.go index b50f95d02a7a..274d4f9c2c2b 100644 --- a/types/store.go +++ b/types/store.go @@ -9,10 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" ) -type ( - PruningOptions = types.PruningOptions -) - type ( Store = types.Store Committer = types.Committer @@ -155,15 +151,15 @@ type ( GasConfig = types.GasConfig ) -func NewGasMeter(limit Gas) GasMeter { - return types.NewGasMeter(limit) -} - type ( ErrorOutOfGas = types.ErrorOutOfGas ErrorGasOverflow = types.ErrorGasOverflow ) +func NewGasMeter(limit Gas) GasMeter { + return types.NewGasMeter(limit) +} + func NewInfiniteGasMeter() GasMeter { return types.NewInfiniteGasMeter() } diff --git a/types/store_internal_test.go b/types/store_internal_test.go index e55ae175dbdc..2ec4c6944cf0 100644 --- a/types/store_internal_test.go +++ b/types/store_internal_test.go @@ -16,7 +16,7 @@ func TestStoreIntSuite(t *testing.T) { } func (s *storeIntSuite) TestAssertNoPrefix() { - var testCases = []struct { + testCases := []struct { keys []string expectPanic bool }{ diff --git a/types/store_test.go b/types/store_test.go index d2039f8cb896..0588e40b6e4d 100644 --- a/types/store_test.go +++ b/types/store_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/suite" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store/rootmulti" @@ -24,7 +25,7 @@ func (s *storeTestSuite) SetupSuite() { } func (s *storeTestSuite) TestPrefixEndBytes() { - var testCases = []struct { + testCases := []struct { prefix []byte expected []byte }{ @@ -47,7 +48,7 @@ func (s *storeTestSuite) TestCommitID() { var empty types.CommitID s.Require().True(empty.IsZero()) - var nonempty = types.CommitID{ + nonempty := types.CommitID{ Version: 1, Hash: []byte("testhash"), } @@ -108,7 +109,7 @@ func (s *storeTestSuite) TestDiffKVStores() { func (s *storeTestSuite) initTestStores() (types.KVStore, types.KVStore) { db := dbm.NewMemDB() - ms := rootmulti.NewStore(db) + ms := rootmulti.NewStore(db, log.NewNopLogger()) key1 := types.NewKVStoreKey("store1") key2 := types.NewKVStoreKey("store2") diff --git a/types/tx/middleware.go b/types/tx/middleware.go deleted file mode 100644 index abe29be672d8..000000000000 --- a/types/tx/middleware.go +++ /dev/null @@ -1,71 +0,0 @@ -package tx - -import ( - context "context" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - abci "github.com/tendermint/tendermint/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// RequestSimulateTx is the request type for the tx.Handler.RequestSimulateTx -// method. -type RequestSimulateTx struct { - TxBytes []byte -} - -// ResponseSimulateTx is the response type for the tx.Handler.RequestSimulateTx -// method. -type ResponseSimulateTx struct { - GasInfo sdk.GasInfo - Result *sdk.Result -} - -// Request is the tx request type used in middlewares. -// At least one of Tx or TxBytes must be set. If only TxBytes is set, then -// Tx will be populated by the TxDecoderMiddleware. If only Tx is set, then -// some middlewares (such as signature verification) will fail. -// -// In practice, the middleware stack is called from {Check,Deliver}Tx, which -// only passes the TxBytes. Then, the TxDecoderMiddleware decodes the bytes -// into the Tx field. -type Request struct { - Tx sdk.Tx - TxBytes []byte -} - -// Response is the tx response type used in middlewares. -type Response struct { - GasWanted uint64 - GasUsed uint64 - // MsgResponses is an array containing each Msg service handler's response - // type, packed in an Any. This will get proto-serialized into the `Data` field - // in the ABCI Check/DeliverTx responses. - MsgResponses []*codectypes.Any - Log string - Events []abci.Event -} - -// RequestCheckTx is the additional request type used in middlewares CheckTx -// method. -type RequestCheckTx struct { - Type abci.CheckTxType -} - -// RequestCheckTx is the additional response type used in middlewares CheckTx -// method. -type ResponseCheckTx struct { - Priority int64 -} - -// TxHandler defines the baseapp's CheckTx, DeliverTx and Simulate respective -// handlers. It is designed as a middleware stack. -type Handler interface { - CheckTx(ctx context.Context, req Request, checkReq RequestCheckTx) (Response, ResponseCheckTx, error) - DeliverTx(ctx context.Context, req Request) (Response, error) - SimulateTx(ctx context.Context, req Request) (Response, error) -} - -// TxMiddleware defines one layer of the TxHandler middleware stack. -type Middleware func(Handler) Handler diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index ee8ee8ac5608..909bac30aca8 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -108,8 +108,14 @@ type GetTxsEventRequest struct { // events is the list of transaction event type. Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // pagination defines a pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Deprecated post v0.46.x: use page and limit instead. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // Deprecated: Do not use. OrderBy OrderBy `protobuf:"varint,3,opt,name=order_by,json=orderBy,proto3,enum=cosmos.tx.v1beta1.OrderBy" json:"order_by,omitempty"` + // page is the page number to query, starts at 1. If not provided, will default to first page. + Page uint64 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` } func (m *GetTxsEventRequest) Reset() { *m = GetTxsEventRequest{} } @@ -152,6 +158,7 @@ func (m *GetTxsEventRequest) GetEvents() []string { return nil } +// Deprecated: Do not use. func (m *GetTxsEventRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -166,6 +173,20 @@ func (m *GetTxsEventRequest) GetOrderBy() OrderBy { return OrderBy_ORDER_BY_UNSPECIFIED } +func (m *GetTxsEventRequest) GetPage() uint64 { + if m != nil { + return m.Page + } + return 0 +} + +func (m *GetTxsEventRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + // GetTxsEventResponse is the response type for the Service.TxsByEvents // RPC method. type GetTxsEventResponse struct { @@ -174,7 +195,10 @@ type GetTxsEventResponse struct { // tx_responses is the list of queried TxResponses. TxResponses []*types.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"` // pagination defines a pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Deprecated post v0.46.x: use total instead. + Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` // Deprecated: Do not use. + // total is total number of results available + Total uint64 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` } func (m *GetTxsEventResponse) Reset() { *m = GetTxsEventResponse{} } @@ -224,6 +248,7 @@ func (m *GetTxsEventResponse) GetTxResponses() []*types.TxResponse { return nil } +// Deprecated: Do not use. func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination @@ -231,6 +256,13 @@ func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { return nil } +func (m *GetTxsEventResponse) GetTotal() uint64 { + if m != nil { + return m.Total + } + return 0 +} + // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest // RPC method. type BroadcastTxRequest struct { @@ -700,68 +732,70 @@ func init() { func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } var fileDescriptor_e0b00a618705eca7 = []byte{ - // 962 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xd1, 0x6e, 0x1a, 0x47, - 0x14, 0xf5, 0x2e, 0xb6, 0x21, 0x17, 0x3b, 0x21, 0xe3, 0xd4, 0x26, 0x24, 0xc5, 0x64, 0x53, 0x6c, - 0x07, 0xc9, 0xbb, 0x0a, 0x4d, 0xa5, 0xaa, 0xaa, 0x54, 0x79, 0x81, 0xb8, 0xa8, 0x4d, 0x88, 0x06, - 0x57, 0x51, 0xaa, 0x4a, 0x68, 0x81, 0x09, 0xac, 0x62, 0x76, 0xf0, 0xce, 0x60, 0x2d, 0x72, 0xac, - 0x4a, 0x7d, 0xec, 0x53, 0xd5, 0x3e, 0xf4, 0x23, 0xfa, 0x23, 0x7d, 0xb4, 0xd4, 0x97, 0x3e, 0x56, - 0x76, 0x3f, 0xa0, 0x9f, 0x50, 0xed, 0xec, 0x00, 0x0b, 0x5e, 0xe2, 0xd4, 0xea, 0x8b, 0x3d, 0xc3, - 0x9c, 0x7b, 0xef, 0x99, 0x33, 0x73, 0xee, 0x2c, 0x6c, 0xb6, 0x28, 0xeb, 0x51, 0x66, 0x70, 0xcf, - 0x38, 0x7e, 0xdc, 0x24, 0xdc, 0x7a, 0x6c, 0x30, 0xe2, 0x1e, 0xdb, 0x2d, 0xa2, 0xf7, 0x5d, 0xca, - 0x29, 0xba, 0x1d, 0x00, 0x74, 0xee, 0xe9, 0x12, 0x90, 0xb9, 0xdf, 0xa1, 0xb4, 0x73, 0x48, 0x0c, - 0xab, 0x6f, 0x1b, 0x96, 0xe3, 0x50, 0x6e, 0x71, 0x9b, 0x3a, 0x2c, 0x08, 0xc8, 0x3c, 0x94, 0x19, - 0x9b, 0x16, 0x23, 0x86, 0xd5, 0x6c, 0xd9, 0xe3, 0xc4, 0xfe, 0x44, 0x82, 0x32, 0x97, 0xcb, 0x72, - 0x4f, 0xae, 0x15, 0xc2, 0x09, 0x8e, 0x06, 0xc4, 0x1d, 0x8e, 0x31, 0x7d, 0xab, 0x63, 0x3b, 0xa2, - 0x9a, 0xc4, 0xde, 0xe7, 0xc4, 0x69, 0x13, 0xb7, 0x67, 0x3b, 0xdc, 0xe0, 0xc3, 0x3e, 0x61, 0x46, - 0xf3, 0x90, 0xb6, 0xde, 0xcc, 0x5d, 0x15, 0x7f, 0x83, 0x55, 0xed, 0x37, 0x05, 0xd0, 0x3e, 0xe1, - 0x07, 0x1e, 0xab, 0x1c, 0x13, 0x87, 0x63, 0x72, 0x34, 0x20, 0x8c, 0xa3, 0x75, 0x58, 0x26, 0xfe, - 0x9c, 0xa5, 0x95, 0x5c, 0x6c, 0xe7, 0x06, 0x96, 0x33, 0xf4, 0x14, 0x60, 0x52, 0x3e, 0xad, 0xe6, - 0x94, 0x9d, 0x64, 0x71, 0x4b, 0x97, 0xea, 0xf8, 0x5c, 0x75, 0xc1, 0x75, 0xa4, 0x92, 0xfe, 0xc2, - 0xea, 0x10, 0x99, 0x13, 0x87, 0x22, 0xd1, 0x27, 0x90, 0xa0, 0x6e, 0x9b, 0xb8, 0x8d, 0xe6, 0x30, - 0x1d, 0xcb, 0x29, 0x3b, 0x37, 0x8b, 0x19, 0xfd, 0x92, 0xc6, 0x7a, 0xcd, 0x87, 0x98, 0x43, 0x1c, - 0xa7, 0xc1, 0x40, 0x3b, 0x53, 0x60, 0x6d, 0x8a, 0x2d, 0xeb, 0x53, 0x87, 0x11, 0xb4, 0x0d, 0x31, - 0xee, 0x05, 0x5c, 0x93, 0xc5, 0x0f, 0x22, 0x32, 0x1d, 0x78, 0xd8, 0x47, 0xa0, 0x7d, 0x58, 0xe1, - 0x5e, 0xc3, 0x95, 0x71, 0x2c, 0xad, 0x8a, 0x88, 0x8f, 0xa6, 0x76, 0x20, 0x4e, 0x28, 0x14, 0x28, - 0xc1, 0x38, 0xc9, 0xc7, 0x63, 0x3f, 0x51, 0x58, 0x88, 0x98, 0x10, 0x62, 0xfb, 0x4a, 0x21, 0x64, - 0xa6, 0x50, 0xa8, 0x46, 0x00, 0x99, 0x2e, 0xb5, 0xda, 0x2d, 0x8b, 0x71, 0xbf, 0x58, 0xa0, 0xff, - 0x5d, 0x48, 0x70, 0xaf, 0xd1, 0x1c, 0x72, 0xe2, 0xef, 0x4a, 0xd9, 0x59, 0xc1, 0x71, 0xee, 0x99, - 0xfe, 0x14, 0x3d, 0x81, 0xc5, 0x1e, 0x6d, 0x13, 0x21, 0xfe, 0xcd, 0x62, 0x2e, 0x62, 0xb3, 0xe3, - 0x7c, 0xcf, 0x68, 0x9b, 0x60, 0x81, 0xd6, 0xbe, 0x83, 0xb5, 0xa9, 0x32, 0x52, 0xb8, 0x0a, 0x24, - 0x43, 0x7a, 0x88, 0x52, 0xef, 0x2b, 0x07, 0x4c, 0xe4, 0xd0, 0x5e, 0xc2, 0xad, 0xba, 0xdd, 0x1b, - 0x1c, 0x5a, 0x7c, 0x74, 0xda, 0xe8, 0x11, 0xa8, 0xdc, 0x93, 0x09, 0xa3, 0x4f, 0xc4, 0x54, 0xd3, - 0x0a, 0x56, 0xb9, 0x37, 0xb5, 0x59, 0x75, 0x6a, 0xb3, 0xda, 0x8f, 0x0a, 0xa4, 0x26, 0x99, 0x25, - 0xe9, 0xcf, 0x21, 0xd1, 0xb1, 0x58, 0xc3, 0x76, 0x5e, 0x53, 0x59, 0xe0, 0xc1, 0x7c, 0xc6, 0xfb, - 0x16, 0xab, 0x3a, 0xaf, 0x29, 0x8e, 0x77, 0x82, 0x01, 0xfa, 0x14, 0x96, 0x5d, 0xc2, 0x06, 0x87, - 0x5c, 0x5e, 0xdf, 0xdc, 0xfc, 0x58, 0x2c, 0x70, 0x58, 0xe2, 0x35, 0x0d, 0x56, 0xc4, 0xe5, 0x1b, - 0x6d, 0x11, 0xc1, 0x62, 0xd7, 0x62, 0x5d, 0xc1, 0xe1, 0x06, 0x16, 0x63, 0xed, 0x14, 0x56, 0x25, - 0x46, 0x92, 0xcd, 0x5f, 0xa9, 0x83, 0xd0, 0x60, 0xe6, 0x20, 0xd4, 0x6b, 0x1e, 0x84, 0x07, 0xeb, - 0xfb, 0x84, 0x9b, 0xbe, 0xfd, 0x5f, 0xda, 0xbc, 0x7b, 0xe0, 0xb1, 0x90, 0xa3, 0xbb, 0xc4, 0xee, - 0x74, 0xb9, 0xe0, 0x12, 0xc3, 0x72, 0xf6, 0x7f, 0x39, 0x5a, 0xfb, 0x47, 0x81, 0x8d, 0x4b, 0xa5, - 0xff, 0xab, 0x3d, 0x9f, 0x40, 0x42, 0xb4, 0xae, 0x86, 0xdd, 0x96, 0x54, 0xee, 0xea, 0x93, 0xf6, - 0xa5, 0x07, 0x8d, 0x4b, 0x94, 0xa8, 0x96, 0x71, 0x5c, 0x40, 0xab, 0x6d, 0xb4, 0x0b, 0x4b, 0x62, - 0x28, 0x6d, 0xb8, 0x31, 0x27, 0x04, 0x07, 0xa8, 0x19, 0xeb, 0x2e, 0x5e, 0xdb, 0xba, 0x85, 0x2f, - 0x21, 0x2e, 0x3b, 0x14, 0x4a, 0xc3, 0x9d, 0x1a, 0x2e, 0x57, 0x70, 0xc3, 0x7c, 0xd5, 0xf8, 0xe6, - 0x79, 0xfd, 0x45, 0xa5, 0x54, 0x7d, 0x5a, 0xad, 0x94, 0x53, 0x0b, 0x28, 0x05, 0x2b, 0xe3, 0x95, - 0xbd, 0x7a, 0x29, 0xa5, 0xa0, 0xdb, 0xb0, 0x3a, 0xfe, 0xa5, 0x5c, 0xa9, 0x97, 0x52, 0x6a, 0xe1, - 0x2d, 0xac, 0x4e, 0x99, 0x16, 0x65, 0x21, 0x63, 0xe2, 0xda, 0x5e, 0xb9, 0xb4, 0x57, 0x3f, 0x68, - 0x3c, 0xab, 0x95, 0x2b, 0x33, 0x59, 0xd3, 0x70, 0x67, 0x66, 0xdd, 0xfc, 0xba, 0x56, 0xfa, 0x2a, - 0xa5, 0xa0, 0x0d, 0x58, 0x9b, 0x59, 0xa9, 0xbf, 0x7a, 0x5e, 0x4a, 0xa9, 0x11, 0x21, 0x7b, 0x62, - 0x25, 0x56, 0xfc, 0x79, 0x09, 0xe2, 0xf5, 0xe0, 0xbd, 0x43, 0x27, 0x90, 0x18, 0xf9, 0x0d, 0x69, - 0x11, 0x27, 0x35, 0x63, 0xf3, 0xcc, 0xc3, 0x77, 0x62, 0xe4, 0xad, 0xdc, 0xfa, 0xe1, 0x8f, 0xbf, - 0x7f, 0x51, 0x73, 0xda, 0x3d, 0x23, 0xe2, 0xa1, 0x95, 0xe0, 0xcf, 0x94, 0x02, 0x3a, 0x82, 0x25, - 0x61, 0x1e, 0xb4, 0x19, 0x91, 0x35, 0x6c, 0xbd, 0x4c, 0x6e, 0x3e, 0x40, 0xd6, 0xcc, 0x8b, 0x9a, - 0x9b, 0xe8, 0x43, 0x23, 0xea, 0x95, 0x65, 0xc6, 0x89, 0x6f, 0xd7, 0x53, 0xf4, 0x3d, 0x24, 0x43, - 0x7d, 0x11, 0xe5, 0xdf, 0xd5, 0x4e, 0x27, 0xe5, 0xb7, 0xae, 0x82, 0x49, 0x12, 0x0f, 0x04, 0x89, - 0x7b, 0xda, 0x7a, 0x34, 0x09, 0x7f, 0xcf, 0x6f, 0x21, 0x19, 0x7a, 0xd1, 0x22, 0x09, 0x5c, 0x7e, - 0x9f, 0x23, 0x09, 0x44, 0x3c, 0x8c, 0x5a, 0x56, 0x10, 0x48, 0xa3, 0x39, 0x04, 0xd0, 0xaf, 0x0a, - 0xdc, 0x9a, 0x71, 0x2d, 0x7a, 0x14, 0x9d, 0x3b, 0xa2, 0xa9, 0x64, 0x0a, 0xef, 0x03, 0x95, 0x54, - 0x76, 0x05, 0x95, 0x6d, 0x94, 0x9f, 0x73, 0x20, 0xc2, 0x9c, 0xc6, 0x49, 0xd0, 0x96, 0x4e, 0xcd, - 0x2f, 0x7e, 0x3f, 0xcf, 0x2a, 0x67, 0xe7, 0x59, 0xe5, 0xaf, 0xf3, 0xac, 0xf2, 0xd3, 0x45, 0x76, - 0xe1, 0xec, 0x22, 0xbb, 0xf0, 0xe7, 0x45, 0x76, 0xe1, 0xdb, 0x7c, 0xc7, 0xe6, 0xdd, 0x41, 0x53, - 0x6f, 0xd1, 0xde, 0x28, 0x55, 0xf0, 0x6f, 0x97, 0xb5, 0xdf, 0x8c, 0x3e, 0x71, 0xbc, 0xe6, 0xb2, - 0xf8, 0xc0, 0xf9, 0xf8, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x11, 0xc0, 0x8c, 0xdd, 0x09, - 0x00, 0x00, + // 1008 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1a, 0xc7, + 0x17, 0xf7, 0x2e, 0x60, 0xc8, 0xc3, 0x4e, 0xc8, 0xd8, 0x5f, 0x7b, 0x43, 0xf2, 0xc5, 0x64, 0x53, + 0x6c, 0x82, 0xe4, 0x5d, 0x85, 0xa6, 0x52, 0x55, 0x55, 0xaa, 0xcc, 0x8f, 0x50, 0x9a, 0x26, 0x44, + 0x8b, 0xab, 0x28, 0x55, 0x25, 0xb4, 0xc0, 0x04, 0x56, 0x81, 0x1d, 0xcc, 0x0c, 0xd6, 0x22, 0xc7, + 0xaa, 0xd4, 0x63, 0x4f, 0x55, 0x7b, 0xe8, 0xbf, 0xd4, 0x63, 0xa4, 0x5e, 0xda, 0x5b, 0x65, 0xf7, + 0xd4, 0x53, 0xff, 0x84, 0x6a, 0x67, 0x07, 0x58, 0x60, 0x89, 0x93, 0x5c, 0xec, 0x19, 0xe6, 0xf3, + 0xde, 0xfb, 0xbc, 0xcf, 0x9b, 0xf7, 0x66, 0x61, 0xaf, 0x45, 0x68, 0x9f, 0x50, 0x9d, 0x39, 0xfa, + 0xe9, 0x83, 0x26, 0x66, 0xe6, 0x03, 0x9d, 0xe2, 0xe1, 0xa9, 0xd5, 0xc2, 0xda, 0x60, 0x48, 0x18, + 0x41, 0x37, 0x3d, 0x80, 0xc6, 0x1c, 0x4d, 0x00, 0x92, 0x77, 0x3a, 0x84, 0x74, 0x7a, 0x58, 0x37, + 0x07, 0x96, 0x6e, 0xda, 0x36, 0x61, 0x26, 0xb3, 0x88, 0x4d, 0x3d, 0x83, 0xe4, 0x3d, 0xe1, 0xb1, + 0x69, 0x52, 0xac, 0x9b, 0xcd, 0x96, 0x35, 0x75, 0xec, 0x6e, 0x04, 0x28, 0xb9, 0x1c, 0x96, 0x39, + 0xe2, 0x2c, 0xe7, 0x77, 0x70, 0x32, 0xc2, 0xc3, 0xf1, 0x14, 0x33, 0x30, 0x3b, 0x96, 0xcd, 0xa3, + 0x09, 0xec, 0x1d, 0x86, 0xed, 0x36, 0x1e, 0xf6, 0x2d, 0x9b, 0xe9, 0x6c, 0x3c, 0xc0, 0x54, 0x6f, + 0xf6, 0x48, 0xeb, 0xd5, 0xca, 0x53, 0xfe, 0xd7, 0x3b, 0x55, 0xff, 0x94, 0x00, 0x55, 0x30, 0x3b, + 0x76, 0x68, 0xf9, 0x14, 0xdb, 0xcc, 0xc0, 0x27, 0x23, 0x4c, 0x19, 0xda, 0x81, 0x75, 0xec, 0xee, + 0xa9, 0x22, 0xa5, 0x43, 0xd9, 0x6b, 0x86, 0xd8, 0xa1, 0xaf, 0x00, 0x66, 0xe1, 0x15, 0x39, 0x2d, + 0x65, 0xe3, 0xf9, 0x7d, 0x4d, 0xa8, 0xe3, 0x72, 0xd5, 0x38, 0xd7, 0x89, 0x4a, 0xda, 0x33, 0xb3, + 0x83, 0x85, 0xcf, 0x82, 0xac, 0x48, 0x86, 0xcf, 0x1a, 0x7d, 0x02, 0x31, 0x32, 0x6c, 0xe3, 0x61, + 0xa3, 0x39, 0x56, 0x42, 0x69, 0x29, 0x7b, 0x3d, 0x9f, 0xd4, 0x96, 0x74, 0xd6, 0x6a, 0x2e, 0xa4, + 0x30, 0x36, 0xa2, 0xc4, 0x5b, 0x20, 0x04, 0xe1, 0x81, 0xd9, 0xc1, 0x4a, 0x38, 0x2d, 0x65, 0xc3, + 0x06, 0x5f, 0xa3, 0x6d, 0x88, 0xf4, 0xac, 0xbe, 0xc5, 0x94, 0x08, 0xff, 0xd1, 0xdb, 0xa8, 0xff, + 0x48, 0xb0, 0x35, 0x97, 0x1b, 0x1d, 0x10, 0x9b, 0x62, 0x74, 0x00, 0x21, 0xe6, 0x78, 0x99, 0xc5, + 0xf3, 0xff, 0x0b, 0x88, 0x79, 0xec, 0x18, 0x2e, 0x02, 0x55, 0x60, 0x83, 0x39, 0x8d, 0xa1, 0xb0, + 0xa3, 0x8a, 0xcc, 0x2d, 0x3e, 0x9a, 0xcb, 0x97, 0xd7, 0xd3, 0x67, 0x28, 0xc0, 0x46, 0x9c, 0x4d, + 0xd7, 0x14, 0x3d, 0x9e, 0x93, 0x2d, 0xc4, 0x65, 0x3b, 0xb8, 0x52, 0x36, 0xcf, 0x7a, 0x49, 0xb7, + 0x6d, 0x88, 0x30, 0xc2, 0xcc, 0x9e, 0x50, 0xc0, 0xdb, 0xa8, 0x18, 0x50, 0x61, 0x48, 0xcc, 0x76, + 0xcb, 0xa4, 0xcc, 0xa5, 0xe1, 0xd5, 0xf1, 0x16, 0xc4, 0x98, 0xd3, 0x68, 0x8e, 0x19, 0x76, 0xf3, + 0x95, 0xb2, 0x1b, 0x46, 0x94, 0x39, 0x05, 0x77, 0x8b, 0x1e, 0x42, 0xb8, 0x4f, 0xda, 0x98, 0x17, + 0xf1, 0x7a, 0x3e, 0x1d, 0x20, 0xc3, 0xd4, 0xdf, 0x13, 0xd2, 0xc6, 0x06, 0x47, 0xab, 0xdf, 0xc1, + 0xd6, 0x5c, 0x18, 0x21, 0x69, 0x19, 0xe2, 0x3e, 0xa5, 0x78, 0xa8, 0x77, 0x15, 0x0a, 0x66, 0x42, + 0xa9, 0xcf, 0xe1, 0x46, 0xdd, 0xea, 0x8f, 0x7a, 0x26, 0x9b, 0xdc, 0x1a, 0x74, 0x1f, 0x64, 0xe6, + 0x08, 0x87, 0xc1, 0xb5, 0xe2, 0x02, 0xc9, 0xcc, 0x99, 0x4b, 0x56, 0x9e, 0x4b, 0x56, 0xfd, 0x51, + 0x82, 0xc4, 0xcc, 0xb3, 0x20, 0xfd, 0x39, 0xc4, 0x3a, 0x26, 0x6d, 0x58, 0xf6, 0x4b, 0x22, 0x02, + 0xdc, 0x5d, 0xcd, 0xb8, 0x62, 0xd2, 0xaa, 0xfd, 0x92, 0x18, 0xd1, 0x8e, 0xb7, 0x40, 0x9f, 0xc2, + 0xfa, 0x10, 0xd3, 0x51, 0x8f, 0x89, 0x36, 0x48, 0xaf, 0xb6, 0x35, 0x38, 0xce, 0x10, 0x78, 0x55, + 0x85, 0x0d, 0x7e, 0x2d, 0x27, 0x29, 0x22, 0x08, 0x77, 0x4d, 0xda, 0xe5, 0x1c, 0xae, 0x19, 0x7c, + 0xad, 0x9e, 0xc3, 0xa6, 0xc0, 0x08, 0xb2, 0x99, 0x2b, 0x75, 0xe0, 0x1a, 0x2c, 0x14, 0x42, 0xfe, + 0xc0, 0x42, 0x38, 0xb0, 0x53, 0xc1, 0xac, 0xe0, 0x8e, 0x91, 0xe7, 0x16, 0xeb, 0x1e, 0x3b, 0xd4, + 0x37, 0x19, 0xba, 0xd8, 0xea, 0x74, 0x19, 0xe7, 0x12, 0x32, 0xc4, 0x0e, 0x3d, 0xfa, 0xf0, 0xc9, + 0xe0, 0xbf, 0xdd, 0xea, 0xbf, 0x12, 0xec, 0x2e, 0x85, 0x7e, 0xdf, 0xc6, 0x7d, 0x08, 0x31, 0x3e, + 0x02, 0x1b, 0x56, 0x5b, 0x50, 0xb9, 0xa5, 0xcd, 0xc6, 0xa0, 0xe6, 0x0d, 0x40, 0x1e, 0xa2, 0x5a, + 0x32, 0xa2, 0x1c, 0x5a, 0x6d, 0xa3, 0x43, 0x88, 0xf0, 0xa5, 0x68, 0xd0, 0xdd, 0x15, 0x26, 0x86, + 0x87, 0x42, 0x95, 0xb9, 0x8c, 0xc3, 0xef, 0xd5, 0xd4, 0xfe, 0x94, 0x73, 0x5f, 0x42, 0x54, 0x4c, + 0x39, 0xa4, 0xc0, 0x76, 0xcd, 0x28, 0x95, 0x8d, 0x46, 0xe1, 0x45, 0xe3, 0x9b, 0xa7, 0xf5, 0x67, + 0xe5, 0x62, 0xf5, 0x51, 0xb5, 0x5c, 0x4a, 0xac, 0xa1, 0x04, 0x6c, 0x4c, 0x4f, 0x8e, 0xea, 0xc5, + 0x84, 0x84, 0x6e, 0xc2, 0xe6, 0xf4, 0x97, 0x52, 0xb9, 0x5e, 0x4c, 0xc8, 0xb9, 0xd7, 0xb0, 0x39, + 0xd7, 0xb4, 0x28, 0x05, 0xc9, 0x82, 0x51, 0x3b, 0x2a, 0x15, 0x8f, 0xea, 0xc7, 0x8d, 0x27, 0xb5, + 0x52, 0x79, 0xc1, 0xab, 0x02, 0xdb, 0x0b, 0xe7, 0x85, 0xaf, 0x6b, 0xc5, 0xc7, 0x09, 0x09, 0xed, + 0xc2, 0xd6, 0xc2, 0x49, 0xfd, 0xc5, 0xd3, 0x62, 0x42, 0x0e, 0x30, 0x39, 0xe2, 0x27, 0xa1, 0xfc, + 0xcf, 0x11, 0x88, 0xd6, 0xbd, 0x77, 0x13, 0x9d, 0x41, 0x6c, 0xd2, 0x6f, 0x48, 0x0d, 0xa8, 0xd4, + 0x42, 0x9b, 0x27, 0xef, 0xbd, 0x15, 0x23, 0x6e, 0xe5, 0xfe, 0x0f, 0xbf, 0xff, 0xfd, 0x8b, 0x9c, + 0x56, 0x6f, 0xeb, 0x01, 0x0f, 0xb6, 0x00, 0x7f, 0x26, 0xe5, 0xd0, 0x09, 0x44, 0x78, 0xf3, 0xa0, + 0xbd, 0x00, 0xaf, 0xfe, 0xd6, 0x4b, 0xa6, 0x57, 0x03, 0x44, 0xcc, 0x0c, 0x8f, 0xb9, 0x87, 0xfe, + 0xaf, 0x07, 0xbd, 0xd6, 0x54, 0x3f, 0x73, 0xdb, 0xf5, 0x1c, 0x7d, 0x0f, 0x71, 0xdf, 0x5c, 0x44, + 0x99, 0xb7, 0x8d, 0xd3, 0x59, 0xf8, 0xfd, 0xab, 0x60, 0x82, 0xc4, 0x5d, 0x4e, 0xe2, 0xb6, 0xba, + 0x13, 0x4c, 0xc2, 0xcd, 0xf9, 0x35, 0xc4, 0x7d, 0x6f, 0x5d, 0x20, 0x81, 0xe5, 0x77, 0x3e, 0x90, + 0x40, 0xc0, 0x93, 0xa9, 0xa6, 0x38, 0x01, 0x05, 0xad, 0x20, 0x80, 0x7e, 0x95, 0xe0, 0xc6, 0x42, + 0xd7, 0xa2, 0xfb, 0xc1, 0xbe, 0x03, 0x86, 0x4a, 0x32, 0xf7, 0x2e, 0x50, 0x41, 0xe5, 0x90, 0x53, + 0x39, 0x40, 0x99, 0x15, 0x05, 0xe1, 0xcd, 0xa9, 0x9f, 0x79, 0x63, 0xe9, 0xbc, 0xf0, 0xc5, 0x6f, + 0x17, 0x29, 0xe9, 0xcd, 0x45, 0x4a, 0xfa, 0xeb, 0x22, 0x25, 0xfd, 0x74, 0x99, 0x5a, 0x7b, 0x73, + 0x99, 0x5a, 0xfb, 0xe3, 0x32, 0xb5, 0xf6, 0x6d, 0xa6, 0x63, 0xb1, 0xee, 0xa8, 0xa9, 0xb5, 0x48, + 0x7f, 0xe2, 0xca, 0xfb, 0x77, 0x48, 0xdb, 0xaf, 0x26, 0x9f, 0x4a, 0x4e, 0x73, 0x9d, 0x7f, 0x28, + 0x7d, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x12, 0x2b, 0xbc, 0x25, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1022,6 +1056,16 @@ func (m *GetTxsEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Limit != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x28 + } + if m.Page != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Page)) + i-- + dAtA[i] = 0x20 + } if m.OrderBy != 0 { i = encodeVarintService(dAtA, i, uint64(m.OrderBy)) i-- @@ -1071,6 +1115,11 @@ func (m *GetTxsEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Total != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x20 + } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -1493,6 +1542,12 @@ func (m *GetTxsEventRequest) Size() (n int) { if m.OrderBy != 0 { n += 1 + sovService(uint64(m.OrderBy)) } + if m.Page != 0 { + n += 1 + sovService(uint64(m.Page)) + } + if m.Limit != 0 { + n += 1 + sovService(uint64(m.Limit)) + } return n } @@ -1518,6 +1573,9 @@ func (m *GetTxsEventResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovService(uint64(l)) } + if m.Total != 0 { + n += 1 + sovService(uint64(m.Total)) + } return n } @@ -1779,6 +1837,44 @@ func (m *GetTxsEventRequest) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + m.Page = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Page |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) @@ -1933,6 +2029,25 @@ func (m *GetTxsEventResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) diff --git a/types/tx/signing/signature.go b/types/tx/signing/signature.go index 1323543f023a..c5faf4b8d1d4 100644 --- a/types/tx/signing/signature.go +++ b/types/tx/signing/signature.go @@ -92,7 +92,6 @@ var _, _ codectypes.UnpackInterfacesMessage = &SignatureDescriptors{}, &Signatur func (sds *SignatureDescriptors) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { for _, sig := range sds.Signatures { err := sig.UnpackInterfaces(unpacker) - if err != nil { return err } diff --git a/types/tx/signing/signing.pb.go b/types/tx/signing/signing.pb.go index 10226405243b..95989270b493 100644 --- a/types/tx/signing/signing.pb.go +++ b/types/tx/signing/signing.pb.go @@ -58,7 +58,13 @@ const ( // SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos // SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 // - // Since: cosmos-sdk 0.45 + // Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + // but is not implemented on the SDK by default. To enable EIP-191, you need + // to pass a custom `TxConfig` that has an implementation of + // `SignModeHandler` for EIP-191. The SDK may decide to fully support + // EIP-191 in the future. + // + // Since: cosmos-sdk 0.45.2 SignMode_SIGN_MODE_EIP_191 SignMode = 191 ) diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index d16c7898116b..75abd48f283a 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -263,8 +263,12 @@ type SignDocDirectAux struct { AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` // sequence is the sequence number of the signing account. Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Tip is the optional tip used for meta-transactions. It should be left - // empty if the signer is not the tipper for this transaction. + // Tip is the optional tip used for transactions fees paid in another denom. + // It should be left empty if the signer is not the tipper for this + // transaction. + // + // This field is ignored if the chain didn't enable tips, i.e. didn't add the + // `TipDecorator` in its posthandler. Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` } @@ -451,7 +455,10 @@ type AuthInfo struct { // based on the cost of evaluating the body and doing signature verification // of the signers. This can be estimated via simulation. Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` - // Tip is the optional tip used for meta-transactions. + // Tip is the optional tip used for transactions fees paid in another denom. + // + // This field is ignored if the chain didn't enable tips, i.e. didn't add the + // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` @@ -922,11 +929,11 @@ type AuxSignerData struct { // AuxSignerData across different chains, the bech32 prefix of the target // chain (where the final transaction is broadcasted) should be used. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // sign_doc is the SIGN_MOD_DIRECT_AUX sign doc that the auxiliary signer + // sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer // signs. Note: we use the same sign doc even if we're signing with // LEGACY_AMINO_JSON. SignDoc *SignDocDirectAux `protobuf:"bytes,2,opt,name=sign_doc,json=signDoc,proto3" json:"sign_doc,omitempty"` - // mode is the signing mode of the single signer + // mode is the signing mode of the single signer. Mode signing.SignMode `protobuf:"varint,3,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` // sig is the signature of the sign doc. Sig []byte `protobuf:"bytes,4,opt,name=sig,proto3" json:"sig,omitempty"` diff --git a/types/tx/types.go b/types/tx/types.go index cbdb50a43ca4..1c39d6c085c3 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -114,10 +114,7 @@ func (t *Tx) GetSigners() []sdk.AccAddress { // ensure any specified fee payer is included in the required signers (at the end) feePayer := t.AuthInfo.Fee.Payer if feePayer != "" && !seen[feePayer] { - payerAddr, err := sdk.AccAddressFromBech32(feePayer) - if err != nil { - panic(err) - } + payerAddr := sdk.MustAccAddressFromBech32(feePayer) signers = append(signers, payerAddr) seen[feePayer] = true } @@ -128,17 +125,15 @@ func (t *Tx) GetSigners() []sdk.AccAddress { func (t *Tx) GetGas() uint64 { return t.AuthInfo.Fee.GasLimit } + func (t *Tx) GetFee() sdk.Coins { return t.AuthInfo.Fee.Amount } + func (t *Tx) FeePayer() sdk.AccAddress { feePayer := t.AuthInfo.Fee.Payer if feePayer != "" { - payerAddr, err := sdk.AccAddressFromBech32(feePayer) - if err != nil { - panic(err) - } - return payerAddr + return sdk.MustAccAddressFromBech32(feePayer) } // use first signer as default if no payer specified return t.GetSigners()[0] @@ -147,11 +142,7 @@ func (t *Tx) FeePayer() sdk.AccAddress { func (t *Tx) FeeGranter() sdk.AccAddress { feePayer := t.AuthInfo.Fee.Granter if feePayer != "" { - granterAddr, err := sdk.AccAddressFromBech32(feePayer) - if err != nil { - panic(err) - } - return granterAddr + return sdk.MustAccAddressFromBech32(feePayer) } return nil } diff --git a/types/uint_test.go b/types/uint_test.go deleted file mode 100644 index b91f9ab4a96a..000000000000 --- a/types/uint_test.go +++ /dev/null @@ -1,326 +0,0 @@ -package types_test - -import ( - "fmt" - "math" - "math/big" - "math/rand" - "testing" - - "github.com/stretchr/testify/suite" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type uintTestSuite struct { - suite.Suite -} - -func TestUnitTestSuite(t *testing.T) { - suite.Run(t, new(uintTestSuite)) -} - -func (s *uintTestSuite) SetupSuite() { - s.T().Parallel() -} - -func (s *uintTestSuite) TestUintPanics() { - // Max Uint = 1.15e+77 - // Min Uint = 0 - u1 := sdk.NewUint(0) - u2 := sdk.OneUint() - - s.Require().Equal(uint64(0), u1.Uint64()) - s.Require().Equal(uint64(1), u2.Uint64()) - - s.Require().Panics(func() { sdk.NewUintFromBigInt(big.NewInt(-5)) }) - s.Require().Panics(func() { sdk.NewUintFromString("-1") }) - s.Require().NotPanics(func() { - s.Require().True(sdk.NewUintFromString("0").Equal(sdk.ZeroUint())) - s.Require().True(sdk.NewUintFromString("5").Equal(sdk.NewUint(5))) - }) - - // Overflow check - s.Require().True(u1.Add(u1).Equal(sdk.ZeroUint())) - s.Require().True(u1.Add(sdk.OneUint()).Equal(sdk.OneUint())) - s.Require().Equal(uint64(0), u1.Uint64()) - s.Require().Equal(uint64(1), sdk.OneUint().Uint64()) - s.Require().Panics(func() { u1.SubUint64(2) }) - s.Require().True(u1.SubUint64(0).Equal(sdk.ZeroUint())) - s.Require().True(u2.Add(sdk.OneUint()).Sub(sdk.OneUint()).Equal(sdk.OneUint())) // i2 == 1 - s.Require().True(u2.Add(sdk.OneUint()).Mul(sdk.NewUint(5)).Equal(sdk.NewUint(10))) // i2 == 10 - s.Require().True(sdk.NewUint(7).Quo(sdk.NewUint(2)).Equal(sdk.NewUint(3))) - s.Require().True(sdk.NewUint(0).Quo(sdk.NewUint(2)).Equal(sdk.ZeroUint())) - s.Require().True(sdk.NewUint(5).MulUint64(4).Equal(sdk.NewUint(20))) - s.Require().True(sdk.NewUint(5).MulUint64(0).Equal(sdk.ZeroUint())) - - uintmax := sdk.NewUintFromBigInt(new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(256), nil), big.NewInt(1))) - uintmin := sdk.ZeroUint() - - // divs by zero - s.Require().Panics(func() { sdk.OneUint().Mul(sdk.ZeroUint().SubUint64(uint64(1))) }) - s.Require().Panics(func() { sdk.OneUint().QuoUint64(0) }) - s.Require().Panics(func() { sdk.OneUint().Quo(sdk.ZeroUint()) }) - s.Require().Panics(func() { sdk.ZeroUint().QuoUint64(0) }) - s.Require().Panics(func() { sdk.OneUint().Quo(sdk.ZeroUint().Sub(sdk.OneUint())) }) - s.Require().Panics(func() { uintmax.Add(sdk.OneUint()) }) - s.Require().Panics(func() { uintmax.Incr() }) - s.Require().Panics(func() { uintmin.Sub(sdk.OneUint()) }) - s.Require().Panics(func() { uintmin.Decr() }) - - s.Require().Equal(uint64(0), sdk.MinUint(sdk.ZeroUint(), sdk.OneUint()).Uint64()) - s.Require().Equal(uint64(1), sdk.MaxUint(sdk.ZeroUint(), sdk.OneUint()).Uint64()) - - // comparison ops - s.Require().True( - sdk.OneUint().GT(sdk.ZeroUint()), - ) - s.Require().False( - sdk.OneUint().LT(sdk.ZeroUint()), - ) - s.Require().True( - sdk.OneUint().GTE(sdk.ZeroUint()), - ) - s.Require().False( - sdk.OneUint().LTE(sdk.ZeroUint()), - ) - - s.Require().False(sdk.ZeroUint().GT(sdk.OneUint())) - s.Require().True(sdk.ZeroUint().LT(sdk.OneUint())) - s.Require().False(sdk.ZeroUint().GTE(sdk.OneUint())) - s.Require().True(sdk.ZeroUint().LTE(sdk.OneUint())) -} - -func (s *uintTestSuite) TestArithUint() { - for d := 0; d < 1000; d++ { - n1 := uint64(rand.Uint32()) - u1 := sdk.NewUint(n1) - n2 := uint64(rand.Uint32()) - u2 := sdk.NewUint(n2) - - cases := []struct { - ures sdk.Uint - nres uint64 - }{ - {u1.Add(u2), n1 + n2}, - {u1.Mul(u2), n1 * n2}, - {u1.Quo(u2), n1 / n2}, - {u1.AddUint64(n2), n1 + n2}, - {u1.MulUint64(n2), n1 * n2}, - {u1.QuoUint64(n2), n1 / n2}, - {sdk.MinUint(u1, u2), minuint(n1, n2)}, - {sdk.MaxUint(u1, u2), maxuint(n1, n2)}, - {u1.Incr(), n1 + 1}, - } - - for tcnum, tc := range cases { - s.Require().Equal(tc.nres, tc.ures.Uint64(), "Uint arithmetic operation does not match with uint64 operation. tc #%d", tcnum) - } - - if n2 > n1 { - n1, n2 = n2, n1 - u1, u2 = sdk.NewUint(n1), sdk.NewUint(n2) - } - - subs := []struct { - ures sdk.Uint - nres uint64 - }{ - {u1.Sub(u2), n1 - n2}, - {u1.SubUint64(n2), n1 - n2}, - {u1.Decr(), n1 - 1}, - } - - for tcnum, tc := range subs { - s.Require().Equal(tc.nres, tc.ures.Uint64(), "Uint subtraction does not match with uint64 operation. tc #%d", tcnum) - } - } -} - -func (s *uintTestSuite) TestCompUint() { - for d := 0; d < 10000; d++ { - n1 := rand.Uint64() - i1 := sdk.NewUint(n1) - n2 := rand.Uint64() - i2 := sdk.NewUint(n2) - - cases := []struct { - ires bool - nres bool - }{ - {i1.Equal(i2), n1 == n2}, - {i1.GT(i2), n1 > n2}, - {i1.LT(i2), n1 < n2}, - {i1.GTE(i2), !i1.LT(i2)}, - {!i1.GTE(i2), i1.LT(i2)}, - {i1.LTE(i2), n1 <= n2}, - {i2.LTE(i1), n2 <= n1}, - } - - for tcnum, tc := range cases { - s.Require().Equal(tc.nres, tc.ires, "Uint comparison operation does not match with uint64 operation. tc #%d", tcnum) - } - } -} - -func (s *uintTestSuite) TestImmutabilityAllUint() { - ops := []func(*sdk.Uint){ - func(i *sdk.Uint) { _ = i.Add(sdk.NewUint(rand.Uint64())) }, - func(i *sdk.Uint) { _ = i.Sub(sdk.NewUint(rand.Uint64() % i.Uint64())) }, - func(i *sdk.Uint) { _ = i.Mul(randuint()) }, - func(i *sdk.Uint) { _ = i.Quo(randuint()) }, - func(i *sdk.Uint) { _ = i.AddUint64(rand.Uint64()) }, - func(i *sdk.Uint) { _ = i.SubUint64(rand.Uint64() % i.Uint64()) }, - func(i *sdk.Uint) { _ = i.MulUint64(rand.Uint64()) }, - func(i *sdk.Uint) { _ = i.QuoUint64(rand.Uint64()) }, - func(i *sdk.Uint) { _ = i.IsZero() }, - func(i *sdk.Uint) { _ = i.Equal(randuint()) }, - func(i *sdk.Uint) { _ = i.GT(randuint()) }, - func(i *sdk.Uint) { _ = i.GTE(randuint()) }, - func(i *sdk.Uint) { _ = i.LT(randuint()) }, - func(i *sdk.Uint) { _ = i.LTE(randuint()) }, - func(i *sdk.Uint) { _ = i.String() }, - func(i *sdk.Uint) { _ = i.Incr() }, - func(i *sdk.Uint) { - if i.IsZero() { - return - } - - _ = i.Decr() - }, - } - - for i := 0; i < 1000; i++ { - n := rand.Uint64() - ni := sdk.NewUint(n) - - for opnum, op := range ops { - op(&ni) - - s.Require().Equal(n, ni.Uint64(), "Uint is modified by operation. #%d", opnum) - s.Require().Equal(sdk.NewUint(n), ni, "Uint is modified by operation. #%d", opnum) - } - } -} - -func (s *uintTestSuite) TestSafeSub() { - testCases := []struct { - x, y sdk.Uint - expected uint64 - panic bool - }{ - {sdk.NewUint(0), sdk.NewUint(0), 0, false}, - {sdk.NewUint(10), sdk.NewUint(5), 5, false}, - {sdk.NewUint(5), sdk.NewUint(10), 5, true}, - {sdk.NewUint(math.MaxUint64), sdk.NewUint(0), math.MaxUint64, false}, - } - - for i, tc := range testCases { - tc := tc - if tc.panic { - s.Require().Panics(func() { tc.x.Sub(tc.y) }) - continue - } - s.Require().Equal( - tc.expected, tc.x.Sub(tc.y).Uint64(), - "invalid subtraction result; x: %s, y: %s, tc: #%d", tc.x, tc.y, i, - ) - } -} - -func (s *uintTestSuite) TestParseUint() { - type args struct { - s string - } - tests := []struct { - name string - args args - want sdk.Uint - wantErr bool - }{ - {"malformed", args{"malformed"}, sdk.Uint{}, true}, - {"empty", args{""}, sdk.Uint{}, true}, - {"positive", args{"50"}, sdk.NewUint(uint64(50)), false}, - {"negative", args{"-1"}, sdk.Uint{}, true}, - {"zero", args{"0"}, sdk.ZeroUint(), false}, - } - for _, tt := range tests { - got, err := sdk.ParseUint(tt.args.s) - if tt.wantErr { - s.Require().Error(err) - continue - } - s.Require().NoError(err) - s.Require().True(got.Equal(tt.want)) - } -} - -func randuint() sdk.Uint { - return sdk.NewUint(rand.Uint64()) -} - -func (s *uintTestSuite) TestRelativePow() { - tests := []struct { - args []sdk.Uint - want sdk.Uint - }{ - {[]sdk.Uint{sdk.ZeroUint(), sdk.ZeroUint(), sdk.OneUint()}, sdk.OneUint()}, - {[]sdk.Uint{sdk.ZeroUint(), sdk.ZeroUint(), sdk.NewUint(10)}, sdk.NewUint(10)}, - {[]sdk.Uint{sdk.ZeroUint(), sdk.OneUint(), sdk.NewUint(10)}, sdk.ZeroUint()}, - {[]sdk.Uint{sdk.NewUint(10), sdk.NewUint(2), sdk.OneUint()}, sdk.NewUint(100)}, - {[]sdk.Uint{sdk.NewUint(210), sdk.NewUint(2), sdk.NewUint(100)}, sdk.NewUint(441)}, - {[]sdk.Uint{sdk.NewUint(2100), sdk.NewUint(2), sdk.NewUint(1000)}, sdk.NewUint(4410)}, - {[]sdk.Uint{sdk.NewUint(1000000001547125958), sdk.NewUint(600), sdk.NewUint(1000000000000000000)}, sdk.NewUint(1000000928276004850)}, - } - for i, tc := range tests { - res := sdk.RelativePow(tc.args[0], tc.args[1], tc.args[2]) - s.Require().Equal(tc.want, res, "unexpected result for test case %d, input: %v, got: %v", i, tc.args, res) - } -} - -func minuint(i1, i2 uint64) uint64 { - if i1 < i2 { - return i1 - } - return i2 -} - -func maxuint(i1, i2 uint64) uint64 { - if i1 > i2 { - return i1 - } - return i2 -} - -func TestRoundTripMarshalToUint(t *testing.T) { - var values = []uint64{ - 0, - 1, - 1 << 10, - 1<<10 - 3, - 1<<63 - 1, - 1<<32 - 7, - 1<<22 - 8, - } - - for _, value := range values { - value := value - t.Run(fmt.Sprintf("%d", value), func(t *testing.T) { - t.Parallel() - - var scratch [20]byte - uv := sdk.NewUint(value) - n, err := uv.MarshalTo(scratch[:]) - if err != nil { - t.Fatal(err) - } - rt := new(sdk.Uint) - if err := rt.Unmarshal(scratch[:n]); err != nil { - t.Fatal(err) - } - if !rt.Equal(uv) { - t.Fatalf("roundtrip=%q != original=%q", rt, uv) - } - }) - } -} diff --git a/types/utils.go b/types/utils.go index dc13af6f9b21..50074f2b052d 100644 --- a/types/utils.go +++ b/types/utils.go @@ -6,6 +6,7 @@ import ( "fmt" "time" + "github.com/cosmos/cosmos-sdk/types/kv" dbm "github.com/tendermint/tm-db" ) @@ -106,3 +107,30 @@ func CopyBytes(bz []byte) (ret []byte) { copy(ret, bz) return ret } + +// AppendLengthPrefixedBytes combines the slices of bytes to one slice of bytes. +func AppendLengthPrefixedBytes(args ...[]byte) []byte { + length := 0 + for _, v := range args { + length += len(v) + } + res := make([]byte, length) + + length = 0 + for _, v := range args { + copy(res[length:length+len(v)], v) + length += len(v) + } + + return res +} + +// ParseLengthPrefixedBytes panics when store key length is not equal to the given length. +func ParseLengthPrefixedBytes(key []byte, startIndex int, sliceLength int) ([]byte, int) { + neededLength := startIndex + sliceLength + endIndex := neededLength - 1 + kv.AssertKeyAtLeastLength(key, neededLength) + byteSlice := key[startIndex:neededLength] + + return byteSlice, endIndex +} diff --git a/types/utils_test.go b/types/utils_test.go index c04c9c81f3e1..7a196acafe2c 100644 --- a/types/utils_test.go +++ b/types/utils_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) type utilsTestSuite struct { @@ -29,20 +30,28 @@ func (s *utilsTestSuite) TestSortJSON() { wantErr bool }{ // simple case - {unsortedJSON: `{"cosmos":"foo", "atom":"bar", "tendermint":"foobar"}`, - want: `{"atom":"bar","cosmos":"foo","tendermint":"foobar"}`, wantErr: false}, + { + unsortedJSON: `{"cosmos":"foo", "atom":"bar", "tendermint":"foobar"}`, + want: `{"atom":"bar","cosmos":"foo","tendermint":"foobar"}`, wantErr: false, + }, // failing case (invalid JSON): - {unsortedJSON: `"cosmos":"foo",,,, "atom":"bar", "tendermint":"foobar"}`, - want: "", - wantErr: true}, + { + unsortedJSON: `"cosmos":"foo",,,, "atom":"bar", "tendermint":"foobar"}`, + want: "", + wantErr: true, + }, // genesis.json - {unsortedJSON: `{"consensus_params":{"block_size_params":{"max_bytes":22020096,"max_txs":100000,"max_gas":-1},"tx_size_params":{"max_bytes":10240,"max_gas":-1},"block_gossip_params":{"block_part_size_bytes":65536},"evidence_params":{"max_age":100000}},"validators":[{"pub_key":{"type":"AC26791624DE60","value":"c7UMMAbjFuc5GhGPy0E5q5tefy12p9Tq0imXqdrKXwo="},"power":100,"name":""}],"app_hash":"","genesis_time":"2018-05-11T15:52:25.424795506Z","chain_id":"test-chain-Q6VeoW","app_state":{"accounts":[{"address":"718C9C23F98C9642569742ADDD9F9AB9743FBD5D","coins":[{"denom":"Token","amount":1000},{"denom":"stake","amount":50}]}],"stake":{"pool":{"total_supply":50,"bonded_shares":"0","unbonded_shares":"0","bonded_pool":0,"unbonded_pool":0,"inflation_last_time":0,"inflation":"7/100"},"params":{"inflation_rate_change":"13/100","inflation_max":"1/5","inflation_min":"7/100","goal_bonded":"67/100","max_validators":100,"bond_denom":"stake"},"candidates":null,"bonds":null}}}`, - want: `{"app_hash":"","app_state":{"accounts":[{"address":"718C9C23F98C9642569742ADDD9F9AB9743FBD5D","coins":[{"amount":1000,"denom":"Token"},{"amount":50,"denom":"stake"}]}],"stake":{"bonds":null,"candidates":null,"params":{"bond_denom":"stake","goal_bonded":"67/100","inflation_max":"1/5","inflation_min":"7/100","inflation_rate_change":"13/100","max_validators":100},"pool":{"bonded_pool":0,"bonded_shares":"0","inflation":"7/100","inflation_last_time":0,"total_supply":50,"unbonded_pool":0,"unbonded_shares":"0"}}},"chain_id":"test-chain-Q6VeoW","consensus_params":{"block_gossip_params":{"block_part_size_bytes":65536},"block_size_params":{"max_bytes":22020096,"max_gas":-1,"max_txs":100000},"evidence_params":{"max_age":100000},"tx_size_params":{"max_bytes":10240,"max_gas":-1}},"genesis_time":"2018-05-11T15:52:25.424795506Z","validators":[{"name":"","power":100,"pub_key":{"type":"AC26791624DE60","value":"c7UMMAbjFuc5GhGPy0E5q5tefy12p9Tq0imXqdrKXwo="}}]}`, - wantErr: false}, + { + unsortedJSON: `{"consensus_params":{"block_size_params":{"max_bytes":22020096,"max_txs":100000,"max_gas":-1},"tx_size_params":{"max_bytes":10240,"max_gas":-1},"block_gossip_params":{"block_part_size_bytes":65536},"evidence_params":{"max_age":100000}},"validators":[{"pub_key":{"type":"AC26791624DE60","value":"c7UMMAbjFuc5GhGPy0E5q5tefy12p9Tq0imXqdrKXwo="},"power":100,"name":""}],"app_hash":"","genesis_time":"2018-05-11T15:52:25.424795506Z","chain_id":"test-chain-Q6VeoW","app_state":{"accounts":[{"address":"718C9C23F98C9642569742ADDD9F9AB9743FBD5D","coins":[{"denom":"Token","amount":1000},{"denom":"stake","amount":50}]}],"stake":{"pool":{"total_supply":50,"bonded_shares":"0","unbonded_shares":"0","bonded_pool":0,"unbonded_pool":0,"inflation_last_time":0,"inflation":"7/100"},"params":{"inflation_rate_change":"13/100","inflation_max":"1/5","inflation_min":"7/100","goal_bonded":"67/100","max_validators":100,"bond_denom":"stake"},"candidates":null,"bonds":null}}}`, + want: `{"app_hash":"","app_state":{"accounts":[{"address":"718C9C23F98C9642569742ADDD9F9AB9743FBD5D","coins":[{"amount":1000,"denom":"Token"},{"amount":50,"denom":"stake"}]}],"stake":{"bonds":null,"candidates":null,"params":{"bond_denom":"stake","goal_bonded":"67/100","inflation_max":"1/5","inflation_min":"7/100","inflation_rate_change":"13/100","max_validators":100},"pool":{"bonded_pool":0,"bonded_shares":"0","inflation":"7/100","inflation_last_time":0,"total_supply":50,"unbonded_pool":0,"unbonded_shares":"0"}}},"chain_id":"test-chain-Q6VeoW","consensus_params":{"block_gossip_params":{"block_part_size_bytes":65536},"block_size_params":{"max_bytes":22020096,"max_gas":-1,"max_txs":100000},"evidence_params":{"max_age":100000},"tx_size_params":{"max_bytes":10240,"max_gas":-1}},"genesis_time":"2018-05-11T15:52:25.424795506Z","validators":[{"name":"","power":100,"pub_key":{"type":"AC26791624DE60","value":"c7UMMAbjFuc5GhGPy0E5q5tefy12p9Tq0imXqdrKXwo="}}]}`, + wantErr: false, + }, // from the TXSpec: - {unsortedJSON: `{"chain_id":"test-chain-1","sequence":1,"fee_bytes":{"amount":[{"amount":5,"denom":"photon"}],"gas":10000},"msg_bytes":{"inputs":[{"address":"696E707574","coins":[{"amount":10,"denom":"atom"}]}],"outputs":[{"address":"6F7574707574","coins":[{"amount":10,"denom":"atom"}]}]},"alt_bytes":null}`, - want: `{"alt_bytes":null,"chain_id":"test-chain-1","fee_bytes":{"amount":[{"amount":5,"denom":"photon"}],"gas":10000},"msg_bytes":{"inputs":[{"address":"696E707574","coins":[{"amount":10,"denom":"atom"}]}],"outputs":[{"address":"6F7574707574","coins":[{"amount":10,"denom":"atom"}]}]},"sequence":1}`, - wantErr: false}, + { + unsortedJSON: `{"chain_id":"test-chain-1","sequence":1,"fee_bytes":{"amount":[{"amount":5,"denom":"photon"}],"gas":10000},"msg_bytes":{"inputs":[{"address":"696E707574","coins":[{"amount":10,"denom":"atom"}]}],"outputs":[{"address":"6F7574707574","coins":[{"amount":10,"denom":"atom"}]}]},"alt_bytes":null}`, + want: `{"alt_bytes":null,"chain_id":"test-chain-1","fee_bytes":{"amount":[{"amount":5,"denom":"photon"}],"gas":10000},"msg_bytes":{"inputs":[{"address":"696E707574","coins":[{"amount":10,"denom":"atom"}]}],"outputs":[{"address":"6F7574707574","coins":[{"amount":10,"denom":"atom"}]}]},"sequence":1}`, + wantErr: false, + }, } for tcIndex, tc := range cases { @@ -109,3 +118,23 @@ func (s *utilsTestSuite) TestParseTimeBytes() { _, err = sdk.ParseTimeBytes([]byte{}) s.Require().Error(err) } + +func (s *utilsTestSuite) TestAppendParseBytes() { + test1 := "test1" + test2 := "testString2" + testByte1 := []byte(test1) + testByte2 := []byte(test2) + + combinedBytes := sdk.AppendLengthPrefixedBytes(address.MustLengthPrefix(testByte1), address.MustLengthPrefix(testByte2)) + testCombineBytes := append([]byte{}, address.MustLengthPrefix(testByte1)...) + testCombineBytes = append(testCombineBytes, address.MustLengthPrefix(testByte2)...) + s.Require().Equal(combinedBytes, testCombineBytes) + + test1Len, test1LenEndIndex := sdk.ParseLengthPrefixedBytes(combinedBytes, 0, 1) + parseTest1, parseTest1EndIndex := sdk.ParseLengthPrefixedBytes(combinedBytes, test1LenEndIndex+1, int(test1Len[0])) + s.Require().Equal(testByte1, parseTest1) + + test2Len, test2LenEndIndex := sdk.ParseLengthPrefixedBytes(combinedBytes, parseTest1EndIndex+1, 1) + parseTest2, _ := sdk.ParseLengthPrefixedBytes(combinedBytes, test2LenEndIndex+1, int(test2Len[0])) + s.Require().Equal(testByte2, parseTest2) +} diff --git a/x/README.md b/x/README.md index 32e7b5df8ca0..9ae681208c59 100644 --- a/x/README.md +++ b/x/README.md @@ -27,3 +27,7 @@ To learn more about the process of building modules, visit the [building modules ## IBC The IBC module for the SDK has moved to its [own repository](https://github.com/cosmos/ibc-go). + +## CosmWasm + +The CosmWasm module enables smart contracts, and has its [own repository](https://github.com/CosmWasm/cosmwasm) and [documentation site](https://docs.cosmwasm.com/docs/1.0). \ No newline at end of file diff --git a/x/auth/ante/ante.go b/x/auth/ante/ante.go new file mode 100644 index 000000000000..a562e67ee39c --- /dev/null +++ b/x/auth/ante/ante.go @@ -0,0 +1,54 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// HandlerOptions are the options required for constructing a default SDK AnteHandler. +type HandlerOptions struct { + AccountKeeper AccountKeeper + BankKeeper types.BankKeeper + ExtensionOptionChecker ExtensionOptionChecker + FeegrantKeeper FeegrantKeeper + SignModeHandler authsigning.SignModeHandler + SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error + TxFeeChecker TxFeeChecker +} + +// NewAnteHandler returns an AnteHandler that checks and increments sequence +// numbers, checks signatures & account numbers, and deducts fees from the first +// signer. +func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if options.AccountKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for ante builder") + } + + if options.BankKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for ante builder") + } + + if options.SignModeHandler == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder") + } + + anteDecorators := []sdk.AnteDecorator{ + NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first + NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + NewValidateBasicDecorator(), + NewTxTimeoutHeightDecorator(), + NewValidateMemoDecorator(options.AccountKeeper), + NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), + NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators + NewValidateSigCountDecorator(options.AccountKeeper), + NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), + NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + NewIncrementSequenceDecorator(options.AccountKeeper), + } + + return sdk.ChainAnteDecorators(anteDecorators...), nil +} diff --git a/x/auth/middleware/middleware_test.go b/x/auth/ante/ante_test.go similarity index 66% rename from x/auth/middleware/middleware_test.go rename to x/auth/ante/ante_test.go index d923b84b2c3d..017b05461cee 100644 --- a/x/auth/middleware/middleware_test.go +++ b/x/auth/ante/ante_test.go @@ -1,4 +1,4 @@ -package middleware_test +package ante_test import ( "encoding/json" @@ -7,6 +7,11 @@ import ( "strings" "testing" + "github.com/cosmos/cosmos-sdk/x/bank/testutil" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -14,25 +19,17 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" + "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/bank/testutil" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" ) -var testCoins = sdk.Coins{sdk.NewInt64Coin("atom", 10000000)} - // Test that simulate transaction accurately estimates gas cost -func (s *MWTestSuite) TestSimulateGasCost() { - ctx := s.SetupTest(false) // reset - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestSimulateGasCost() { + suite.SetupTest(false) // reset // Same data for every test cases - accounts := s.createTestAccounts(ctx, 3, testCoins) + accounts := suite.CreateTestAccounts(3) msgs := []sdk.Msg{ testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()), testdata.NewTestMsg(accounts[2].acc.GetAddress(), accounts[0].acc.GetAddress()), @@ -48,8 +45,8 @@ func (s *MWTestSuite) TestSimulateGasCost() { { "tx with 150atom fee", func() { - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) }, true, true, @@ -58,11 +55,11 @@ func (s *MWTestSuite) TestSimulateGasCost() { { "with previously estimated gas", func() { - simulatedGas := ctx.GasMeter().GasConsumed() + simulatedGas := suite.ctx.GasMeter().GasConsumed() accSeqs = []uint64{1, 1, 1} - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(simulatedGas) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(simulatedGas) }, false, true, @@ -71,18 +68,18 @@ func (s *MWTestSuite) TestSimulateGasCost() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } -// Test various error cases in the TxHandler control flow. -func (s *MWTestSuite) TestTxHandlerSigErrors() { - ctx := s.SetupTest(false) // reset - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +// Test various error cases in the AnteHandler control flow. +func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { + suite.SetupTest(false) // reset // Same data for every test cases priv0, _, addr0 := testdata.KeyTestPubAddr() @@ -109,12 +106,12 @@ func (s *MWTestSuite) TestTxHandlerSigErrors() { privs, accNums, accSeqs = []cryptotypes.PrivKey{}, []uint64{}, []uint64{} // Create tx manually to test the tx's signers - s.Require().NoError(txBuilder.SetMsgs(msgs...)) - tx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) + suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) // tx.GetSigners returns addresses in correct order: addr1, addr2, addr3 expectedSigners := []sdk.AccAddress{addr0, addr1, addr2} - s.Require().Equal(expectedSigners, tx.GetSigners()) + suite.Require().Equal(expectedSigners, tx.GetSigners()) }, false, false, @@ -141,12 +138,12 @@ func (s *MWTestSuite) TestTxHandlerSigErrors() { { "save the first account, but second is still unrecognized", func() { - acc1 := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr0) - s.app.AccountKeeper.SetAccount(ctx, acc1) - err := s.app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, feeAmount) - s.Require().NoError(err) - err = s.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr0, feeAmount) - s.Require().NoError(err) + acc1 := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr0) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc1) + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, feeAmount) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, addr0, feeAmount) + suite.Require().NoError(err) }, false, false, @@ -155,21 +152,21 @@ func (s *MWTestSuite) TestTxHandlerSigErrors() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } // Test logic around account number checking with one signer and many signers. -func (s *MWTestSuite) TestTxHandlerAccountNumbers() { - ctx := s.SetupTest(false) // reset - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { + suite.SetupTest(false) // reset // Same data for every test cases - accounts := s.createTestAccounts(ctx, 2, testCoins) + accounts := suite.CreateTestAccounts(2) feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() @@ -236,22 +233,22 @@ func (s *MWTestSuite) TestTxHandlerAccountNumbers() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } // Test logic around account number checking with many signers when BlockHeight is 0. -func (s *MWTestSuite) TestTxHandlerAccountNumbersAtBlockHeightZero() { - ctx := s.SetupTest(false) // setup - ctx = ctx.WithBlockHeight(0) - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { + suite.SetupTest(false) // setup + suite.ctx = suite.ctx.WithBlockHeight(0) // Same data for every test cases - accounts := s.createTestAccounts(ctx, 2, testCoins) + accounts := suite.CreateTestAccounts(2) feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() @@ -320,21 +317,21 @@ func (s *MWTestSuite) TestTxHandlerAccountNumbersAtBlockHeightZero() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } // Test logic around sequence checking with one signer and many signers. -func (s *MWTestSuite) TestTxHandlerSequences() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerSequences() { + suite.SetupTest(false) // setup // Same data for every test cases - accounts := s.createTestAccounts(ctx, 3, testCoins) + accounts := suite.CreateTestAccounts(3) feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() @@ -432,24 +429,24 @@ func (s *MWTestSuite) TestTxHandlerSequences() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } // Test logic around fee deduction. -func (s *MWTestSuite) TestTxHandlerFees() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerFees() { + suite.SetupTest(false) // setup // Same data for every test cases priv0, _, addr0 := testdata.KeyTestPubAddr() - acc1 := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr0) - s.app.AccountKeeper.SetAccount(ctx, acc1) + acc1 := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr0) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc1) msgs := []sdk.Msg{testdata.NewTestMsg(addr0)} feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() @@ -474,8 +471,8 @@ func (s *MWTestSuite) TestTxHandlerFees() { { "signer does not have enough funds to pay the fee", func() { - err := testutil.FundAccount(s.app.BankKeeper, ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 149))) - s.Require().NoError(err) + err := testutil.FundAccount(suite.app.BankKeeper, suite.ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 149))) + suite.Require().NoError(err) }, false, false, @@ -486,13 +483,13 @@ func (s *MWTestSuite) TestTxHandlerFees() { func() { accNums = []uint64{acc1.GetAccountNumber()} - modAcc := s.app.AccountKeeper.GetModuleAccount(ctx, types.FeeCollectorName) + modAcc := suite.app.AccountKeeper.GetModuleAccount(suite.ctx, types.FeeCollectorName) - s.Require().True(s.app.BankKeeper.GetAllBalances(ctx, modAcc.GetAddress()).Empty()) - require.True(sdk.IntEq(s.T(), s.app.BankKeeper.GetAllBalances(ctx, addr0).AmountOf("atom"), sdk.NewInt(149))) + suite.Require().True(suite.app.BankKeeper.GetAllBalances(suite.ctx, modAcc.GetAddress()).Empty()) + require.True(sdk.IntEq(suite.T(), suite.app.BankKeeper.GetAllBalances(suite.ctx, addr0).AmountOf("atom"), sdk.NewInt(149))) - err := testutil.FundAccount(s.app.BankKeeper, ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 1))) - s.Require().NoError(err) + err := testutil.FundAccount(suite.app.BankKeeper, suite.ctx, addr0, sdk.NewCoins(sdk.NewInt64Coin("atom", 1))) + suite.Require().NoError(err) }, false, true, @@ -501,10 +498,10 @@ func (s *MWTestSuite) TestTxHandlerFees() { { "signer doesn't have any more funds", func() { - modAcc := s.app.AccountKeeper.GetModuleAccount(ctx, types.FeeCollectorName) + modAcc := suite.app.AccountKeeper.GetModuleAccount(suite.ctx, types.FeeCollectorName) - require.True(sdk.IntEq(s.T(), s.app.BankKeeper.GetAllBalances(ctx, modAcc.GetAddress()).AmountOf("atom"), sdk.NewInt(150))) - require.True(sdk.IntEq(s.T(), s.app.BankKeeper.GetAllBalances(ctx, addr0).AmountOf("atom"), sdk.NewInt(0))) + require.True(sdk.IntEq(suite.T(), suite.app.BankKeeper.GetAllBalances(suite.ctx, modAcc.GetAddress()).AmountOf("atom"), sdk.NewInt(150))) + require.True(sdk.IntEq(suite.T(), suite.app.BankKeeper.GetAllBalances(suite.ctx, addr0).AmountOf("atom"), sdk.NewInt(0))) }, false, false, @@ -513,21 +510,22 @@ func (s *MWTestSuite) TestTxHandlerFees() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } // Test logic around memo gas consumption. -func (s *MWTestSuite) TestTxHandlerMemoGas() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerMemoGas() { + suite.SetupTest(false) // setup // Same data for every test cases - accounts := s.createTestAccounts(ctx, 1, testCoins) + accounts := suite.CreateTestAccounts(1) msgs := []sdk.Msg{testdata.NewTestMsg(accounts[0].acc.GetAddress())} privs, accNums, accSeqs := []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} @@ -553,7 +551,7 @@ func (s *MWTestSuite) TestTxHandlerMemoGas() { func() { feeAmount = sdk.NewCoins(sdk.NewInt64Coin("atom", 0)) gasLimit = 801 - txBuilder.SetMemo("abcininasidniandsinasindiansdiansdinaisndiasndiadninsd") + suite.txBuilder.SetMemo("abcininasidniandsinasindiansdiansdinaisndiasndiadninsd") }, false, false, @@ -564,7 +562,7 @@ func (s *MWTestSuite) TestTxHandlerMemoGas() { func() { feeAmount = sdk.NewCoins(sdk.NewInt64Coin("atom", 0)) gasLimit = 50000 - txBuilder.SetMemo(strings.Repeat("01234567890", 500)) + suite.txBuilder.SetMemo(strings.Repeat("01234567890", 500)) }, false, false, @@ -574,8 +572,8 @@ func (s *MWTestSuite) TestTxHandlerMemoGas() { "tx with memo has enough gas", func() { feeAmount = sdk.NewCoins(sdk.NewInt64Coin("atom", 0)) - gasLimit = 50000 - txBuilder.SetMemo(strings.Repeat("0123456789", 10)) + gasLimit = 60000 + suite.txBuilder.SetMemo(strings.Repeat("0123456789", 10)) }, false, true, @@ -584,20 +582,20 @@ func (s *MWTestSuite) TestTxHandlerMemoGas() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } -func (s *MWTestSuite) TestTxHandlerMultiSigner() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { + suite.SetupTest(false) // setup // Same data for every test cases - accounts := s.createTestAccounts(ctx, 3, testCoins) + accounts := suite.CreateTestAccounts(3) msg1 := testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()) msg2 := testdata.NewTestMsg(accounts[2].acc.GetAddress(), accounts[0].acc.GetAddress()) msg3 := testdata.NewTestMsg(accounts[1].acc.GetAddress(), accounts[2].acc.GetAddress()) @@ -618,7 +616,7 @@ func (s *MWTestSuite) TestTxHandlerMultiSigner() { func() { msgs = []sdk.Msg{msg1, msg2, msg3} privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{0, 0, 0} - txBuilder.SetMemo("Check signers are in expected order and different account numbers works") + suite.txBuilder.SetMemo("Check signers are in expected order and different account numbers works") }, false, true, @@ -657,20 +655,20 @@ func (s *MWTestSuite) TestTxHandlerMultiSigner() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } -func (s *MWTestSuite) TestTxHandlerBadSignBytes() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { + suite.SetupTest(false) // setup // Same data for every test cases - accounts := s.createTestAccounts(ctx, 2, testCoins) + accounts := suite.CreateTestAccounts(2) msg0 := testdata.NewTestMsg(accounts[0].acc.GetAddress()) // Variable data per test case @@ -688,7 +686,7 @@ func (s *MWTestSuite) TestTxHandlerBadSignBytes() { { "test good tx and signBytes", func() { - chainID = ctx.ChainID() + chainID = suite.ctx.ChainID() feeAmount = testdata.NewTestFeeAmount() gasLimit = testdata.NewTestGasLimit() msgs = []sdk.Msg{msg0} @@ -711,7 +709,7 @@ func (s *MWTestSuite) TestTxHandlerBadSignBytes() { { "test wrong accSeqs", func() { - chainID = ctx.ChainID() // Back to correct chainID + chainID = suite.ctx.ChainID() // Back to correct chainID accSeqs = []uint64{2} }, false, @@ -783,20 +781,20 @@ func (s *MWTestSuite) TestTxHandlerBadSignBytes() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, chainID, tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, chainID, tc) }) } } -func (s *MWTestSuite) TestTxHandlerSetPubKey() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerSetPubKey() { + suite.SetupTest(false) // setup // Same data for every test cases - accounts := s.createTestAccounts(ctx, 2, testCoins) + accounts := suite.CreateTestAccounts(2) feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() @@ -823,8 +821,8 @@ func (s *MWTestSuite) TestTxHandlerSetPubKey() { "make sure public key has been set (tx itself should fail because of replay protection)", func() { // Make sure public key has been set from previous test. - acc0 := s.app.AccountKeeper.GetAccount(ctx, accounts[0].acc.GetAddress()) - s.Require().Equal(acc0.GetPubKey(), accounts[0].priv.PubKey()) + acc0 := suite.app.AccountKeeper.GetAccount(suite.ctx, accounts[0].acc.GetAddress()) + suite.Require().Equal(acc0.GetPubKey(), accounts[0].priv.PubKey()) }, false, false, @@ -844,30 +842,30 @@ func (s *MWTestSuite) TestTxHandlerSetPubKey() { "make sure public key is not set, when tx has no pubkey or signature", func() { // Make sure public key has not been set from previous test. - acc1 := s.app.AccountKeeper.GetAccount(ctx, accounts[1].acc.GetAddress()) - s.Require().Nil(acc1.GetPubKey()) + acc1 := suite.app.AccountKeeper.GetAccount(suite.ctx, accounts[1].acc.GetAddress()) + suite.Require().Nil(acc1.GetPubKey()) privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{0} msgs = []sdk.Msg{testdata.NewTestMsg(accounts[1].acc.GetAddress())} - txBuilder.SetMsgs(msgs...) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) + suite.txBuilder.SetMsgs(msgs...) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) // Manually create tx, and remove signature. - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - txBuilder, err := s.clientCtx.TxConfig.WrapTxBuilder(testTx) - s.Require().NoError(err) - s.Require().NoError(txBuilder.SetSignatures()) + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + txBuilder, err := suite.clientCtx.TxConfig.WrapTxBuilder(tx) + suite.Require().NoError(err) + suite.Require().NoError(txBuilder.SetSignatures()) - // Run txHandler manually, expect ErrNoSignatures. - _, _, err = s.txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: txBuilder.GetTx()}, tx.RequestCheckTx{}) - s.Require().Error(err) - s.Require().True(errors.Is(err, sdkerrors.ErrNoSignatures)) + // Run anteHandler manually, expect ErrNoSignatures. + _, err = suite.anteHandler(suite.ctx, txBuilder.GetTx(), false) + suite.Require().Error(err) + suite.Require().True(errors.Is(err, sdkerrors.ErrNoSignatures)) // Make sure public key has not been set. - acc1 = s.app.AccountKeeper.GetAccount(ctx, accounts[1].acc.GetAddress()) - s.Require().Nil(acc1.GetPubKey()) + acc1 = suite.app.AccountKeeper.GetAccount(suite.ctx, accounts[1].acc.GetAddress()) + suite.Require().Nil(acc1.GetPubKey()) // Set incorrect accSeq, to generate incorrect signature. privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{1} @@ -879,10 +877,10 @@ func (s *MWTestSuite) TestTxHandlerSetPubKey() { { "make sure previous public key has been set after wrong signature", func() { - // Make sure public key has been set, as SetPubKeyMiddleware - // is called before all signature verification middlewares. - acc1 := s.app.AccountKeeper.GetAccount(ctx, accounts[1].acc.GetAddress()) - s.Require().Equal(acc1.GetPubKey(), accounts[1].priv.PubKey()) + // Make sure public key has been set, as SetPubKeyDecorator + // is called before all signature verification decorators. + acc1 := suite.app.AccountKeeper.GetAccount(suite.ctx, accounts[1].acc.GetAddress()) + suite.Require().Equal(acc1.GetPubKey(), accounts[1].priv.PubKey()) }, false, false, @@ -891,10 +889,11 @@ func (s *MWTestSuite) TestTxHandlerSetPubKey() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } @@ -949,7 +948,8 @@ func TestCountSubkeys(t *testing.T) { multiLevelSubKey1 := kmultisig.NewLegacyAminoPubKey(4, genPubKeys(5)) multiLevelSubKey2 := kmultisig.NewLegacyAminoPubKey(4, genPubKeys(5)) multiLevelMultiKey := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{ - multiLevelSubKey1, multiLevelSubKey2, secp256k1.GenPrivKey().PubKey()}) + multiLevelSubKey1, multiLevelSubKey2, secp256k1.GenPrivKey().PubKey(), + }) type args struct { pub cryptotypes.PubKey } @@ -964,17 +964,16 @@ func TestCountSubkeys(t *testing.T) { } for _, tc := range testCases { t.Run(tc.name, func(T *testing.T) { - require.Equal(t, tc.want, middleware.CountSubKeys(tc.args.pub)) + require.Equal(t, tc.want, ante.CountSubKeys(tc.args.pub)) }) } } -func (s *MWTestSuite) TestTxHandlerSigLimitExceeded() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() +func (suite *AnteTestSuite) TestAnteHandlerSigLimitExceeded() { + suite.SetupTest(false) // setup // Same data for every test cases - accounts := s.createTestAccounts(ctx, 8, testCoins) + accounts := suite.CreateTestAccounts(8) var addrs []sdk.AccAddress var privs []cryptotypes.PrivKey for i := 0; i < 8; i++ { @@ -997,25 +996,26 @@ func (s *MWTestSuite) TestTxHandlerSigLimitExceeded() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - s.runTestCase(ctx, txBuilder, privs, msgs, feeAmount, gasLimit, accNums, accSeqs, ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } // Test custom SignatureVerificationGasConsumer -func (s *MWTestSuite) TestCustomSignatureVerificationGasConsumer() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - txHandler, err := middleware.NewDefaultTxHandler( - middleware.TxHandlerOptions{ - AccountKeeper: s.app.AccountKeeper, - BankKeeper: s.app.BankKeeper, - FeegrantKeeper: s.app.FeeGrantKeeper, - SignModeHandler: s.clientCtx.TxConfig.SignModeHandler(), +func (suite *AnteTestSuite) TestCustomSignatureVerificationGasConsumer() { + suite.SetupTest(false) // setup + + // setup an ante handler that only accepts PubKeyEd25519 + anteHandler, err := ante.NewAnteHandler( + ante.HandlerOptions{ + AccountKeeper: suite.app.AccountKeeper, + BankKeeper: suite.app.BankKeeper, + FeegrantKeeper: suite.app.FeeGrantKeeper, + SignModeHandler: suite.clientCtx.TxConfig.SignModeHandler(), SigGasConsumer: func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error { switch pubkey := sig.PubKey.(type) { case *ed25519.PubKey: @@ -1025,22 +1025,21 @@ func (s *MWTestSuite) TestCustomSignatureVerificationGasConsumer() { return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "unrecognized public key type: %T", pubkey) } }, - TxDecoder: s.clientCtx.TxConfig.TxDecoder(), }, ) - s.Require().NoError(err) - s.Require().NoError(err) + suite.Require().NoError(err) + suite.anteHandler = anteHandler // Same data for every test cases - accounts := s.createTestAccounts(ctx, 1, testCoins) - txBuilder.SetFeeAmount(testdata.NewTestFeeAmount()) - txBuilder.SetGasLimit(testdata.NewTestGasLimit()) - txBuilder.SetMsgs(testdata.NewTestMsg(accounts[0].acc.GetAddress())) + accounts := suite.CreateTestAccounts(1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() // Variable data per test case var ( accNums []uint64 + msgs []sdk.Msg privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -1049,6 +1048,7 @@ func (s *MWTestSuite) TestCustomSignatureVerificationGasConsumer() { { "verify that an secp256k1 account gets rejected", func() { + msgs = []sdk.Msg{testdata.NewTestMsg(accounts[0].acc.GetAddress())} privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, @@ -1058,57 +1058,53 @@ func (s *MWTestSuite) TestCustomSignatureVerificationGasConsumer() { } for _, tc := range testCases { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - testTx, txBytes, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: txBytes}) - s.Require().Error(err) - s.Require().True(errors.Is(err, tc.expErr)) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) }) } } -func (s *MWTestSuite) TestTxHandlerReCheck() { - ctx := s.SetupTest(false) // setup +func (suite *AnteTestSuite) TestAnteHandlerReCheck() { + suite.SetupTest(false) // setup // Set recheck=true - ctx = ctx.WithIsReCheckTx(true) - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() + suite.ctx = suite.ctx.WithIsReCheckTx(true) + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() // Same data for every test cases - accounts := s.createTestAccounts(ctx, 1, testCoins) + accounts := suite.CreateTestAccounts(1) feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) msg := testdata.NewTestMsg(accounts[0].acc.GetAddress()) msgs := []sdk.Msg{msg} - s.Require().NoError(txBuilder.SetMsgs(msgs...)) + suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) - txBuilder.SetMemo("thisisatestmemo") + suite.txBuilder.SetMemo("thisisatestmemo") // test that operations skipped on recheck do not run privs, accNums, accSeqs := []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) - // make signature array empty which would normally cause ValidateBasicMiddleware and SigVerificationMiddleware fail - // since these middlewares don't run on recheck, the tx should pass the middleware - txBuilder, err = s.clientCtx.TxConfig.WrapTxBuilder(testTx) - s.Require().NoError(err) - s.Require().NoError(txBuilder.SetSignatures()) + // make signature array empty which would normally cause ValidateBasicDecorator and SigVerificationDecorator fail + // since these decorators don't run on recheck, the tx should pass the antehandler + txBuilder, err := suite.clientCtx.TxConfig.WrapTxBuilder(tx) + suite.Require().NoError(err) - _, _, err = s.txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: txBuilder.GetTx()}, tx.RequestCheckTx{Type: abci.CheckTxType_Recheck}) - s.Require().Nil(err, "TxHandler errored on recheck unexpectedly: %v", err) + _, err = suite.anteHandler(suite.ctx, txBuilder.GetTx(), false) + suite.Require().Nil(err, "AnteHandler errored on recheck unexpectedly: %v", err) - testTx, _, err = s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - txBytes, err := json.Marshal(testTx) - s.Require().Nil(err, "Error marshalling tx: %v", err) - ctx = ctx.WithTxBytes(txBytes) + tx, err = suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + txBytes, err := json.Marshal(tx) + suite.Require().Nil(err, "Error marshalling tx: %v", err) + suite.ctx = suite.ctx.WithTxBytes(txBytes) // require that state machine param-dependent checking is still run on recheck since parameters can change between check and recheck testCases := []struct { @@ -1119,37 +1115,35 @@ func (s *MWTestSuite) TestTxHandlerReCheck() { {"txsize check", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, 10000000, types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1)}, {"sig verify cost check", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, types.DefaultSigVerifyCostED25519, 100000000)}, } - for _, tc := range testCases { // set testcase parameters - s.app.AccountKeeper.SetParams(ctx, tc.params) + suite.app.AccountKeeper.SetParams(suite.ctx, tc.params) - _, _, err = s.txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: txBytes}, tx.RequestCheckTx{Type: abci.CheckTxType_Recheck}) + _, err := suite.anteHandler(suite.ctx, tx, false) - s.Require().NotNil(err, "tx does not fail on recheck with updated params in test case: %s", tc.name) + suite.Require().NotNil(err, "tx does not fail on recheck with updated params in test case: %s", tc.name) // reset parameters to default values - s.app.AccountKeeper.SetParams(ctx, types.DefaultParams()) + suite.app.AccountKeeper.SetParams(suite.ctx, types.DefaultParams()) } // require that local mempool fee check is still run on recheck since validator may change minFee between check and recheck - // create new minimum gas price so txhandler fails on recheck - ctx = ctx.WithMinGasPrices([]sdk.DecCoin{{ + // create new minimum gas price so antehandler fails on recheck + suite.ctx = suite.ctx.WithMinGasPrices([]sdk.DecCoin{{ Denom: "dnecoin", // fee does not have this denom Amount: sdk.NewDec(5), }}) - _, _, err = s.txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{}) - - s.Require().NotNil(err, "txhandler on recheck did not fail when mingasPrice was changed") + _, err = suite.anteHandler(suite.ctx, tx, false) + suite.Require().NotNil(err, "antehandler on recheck did not fail when mingasPrice was changed") // reset min gasprice - ctx = ctx.WithMinGasPrices(sdk.DecCoins{}) + suite.ctx = suite.ctx.WithMinGasPrices(sdk.DecCoins{}) - // remove funds for account so txhandler fails on recheck - s.app.AccountKeeper.SetAccount(ctx, accounts[0].acc) - balances := s.app.BankKeeper.GetAllBalances(ctx, accounts[0].acc.GetAddress()) - err = s.app.BankKeeper.SendCoinsFromAccountToModule(ctx, accounts[0].acc.GetAddress(), minttypes.ModuleName, balances) - s.Require().NoError(err) + // remove funds for account so antehandler fails on recheck + suite.app.AccountKeeper.SetAccount(suite.ctx, accounts[0].acc) + balances := suite.app.BankKeeper.GetAllBalances(suite.ctx, accounts[0].acc.GetAddress()) + err = suite.app.BankKeeper.SendCoinsFromAccountToModule(suite.ctx, accounts[0].acc.GetAddress(), minttypes.ModuleName, balances) + suite.Require().NoError(err) - _, _, err = s.txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{}) - s.Require().NotNil(err, "txhandler on recheck did not fail once feePayer no longer has sufficient funds") + _, err = suite.anteHandler(suite.ctx, tx, false) + suite.Require().NotNil(err, "antehandler on recheck did not fail once feePayer no longer has sufficient funds") } diff --git a/x/auth/ante/basic.go b/x/auth/ante/basic.go new file mode 100644 index 000000000000..52c219f79e4d --- /dev/null +++ b/x/auth/ante/basic.go @@ -0,0 +1,206 @@ +package ante + +import ( + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +// ValidateBasicDecorator will call tx.ValidateBasic and return any non-nil error. +// If ValidateBasic passes, decorator calls next AnteHandler in chain. Note, +// ValidateBasicDecorator decorator will not get executed on ReCheckTx since it +// is not dependent on application state. +type ValidateBasicDecorator struct{} + +func NewValidateBasicDecorator() ValidateBasicDecorator { + return ValidateBasicDecorator{} +} + +func (vbd ValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + // no need to validate basic on recheck tx, call next antehandler + if ctx.IsReCheckTx() { + return next(ctx, tx, simulate) + } + + if err := tx.ValidateBasic(); err != nil { + return ctx, err + } + + return next(ctx, tx, simulate) +} + +// ValidateMemoDecorator will validate memo given the parameters passed in +// If memo is too large decorator returns with error, otherwise call next AnteHandler +// CONTRACT: Tx must implement TxWithMemo interface +type ValidateMemoDecorator struct { + ak AccountKeeper +} + +func NewValidateMemoDecorator(ak AccountKeeper) ValidateMemoDecorator { + return ValidateMemoDecorator{ + ak: ak, + } +} + +func (vmd ValidateMemoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + memoTx, ok := tx.(sdk.TxWithMemo) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + } + + params := vmd.ak.GetParams(ctx) + + memoLength := len(memoTx.GetMemo()) + if uint64(memoLength) > params.MaxMemoCharacters { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrMemoTooLarge, + "maximum number of characters is %d but received %d characters", + params.MaxMemoCharacters, memoLength, + ) + } + + return next(ctx, tx, simulate) +} + +// ConsumeTxSizeGasDecorator will take in parameters and consume gas proportional +// to the size of tx before calling next AnteHandler. Note, the gas costs will be +// slightly over estimated due to the fact that any given signing account may need +// to be retrieved from state. +// +// CONTRACT: If simulate=true, then signatures must either be completely filled +// in or empty. +// CONTRACT: To use this decorator, signatures of transaction must be represented +// as legacytx.StdSignature otherwise simulate mode will incorrectly estimate gas cost. +type ConsumeTxSizeGasDecorator struct { + ak AccountKeeper +} + +func NewConsumeGasForTxSizeDecorator(ak AccountKeeper) ConsumeTxSizeGasDecorator { + return ConsumeTxSizeGasDecorator{ + ak: ak, + } +} + +func (cgts ConsumeTxSizeGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") + } + params := cgts.ak.GetParams(ctx) + + ctx.GasMeter().ConsumeGas(params.TxSizeCostPerByte*sdk.Gas(len(ctx.TxBytes())), "txSize") + + // simulate gas cost for signatures in simulate mode + if simulate { + // in simulate mode, each element should be a nil signature + sigs, err := sigTx.GetSignaturesV2() + if err != nil { + return ctx, err + } + n := len(sigs) + + for i, signer := range sigTx.GetSigners() { + // if signature is already filled in, no need to simulate gas cost + if i < n && !isIncompleteSignature(sigs[i].Data) { + continue + } + + var pubkey cryptotypes.PubKey + + acc := cgts.ak.GetAccount(ctx, signer) + + // use placeholder simSecp256k1Pubkey if sig is nil + if acc == nil || acc.GetPubKey() == nil { + pubkey = simSecp256k1Pubkey + } else { + pubkey = acc.GetPubKey() + } + + // use stdsignature to mock the size of a full signature + simSig := legacytx.StdSignature{ //nolint:staticcheck // this will be removed when proto is ready + Signature: simSecp256k1Sig[:], + PubKey: pubkey, + } + + sigBz := legacy.Cdc.MustMarshal(simSig) + cost := sdk.Gas(len(sigBz) + 6) + + // If the pubkey is a multi-signature pubkey, then we estimate for the maximum + // number of signers. + if _, ok := pubkey.(*multisig.LegacyAminoPubKey); ok { + cost *= params.TxSigLimit + } + + ctx.GasMeter().ConsumeGas(params.TxSizeCostPerByte*cost, "txSize") + } + } + + return next(ctx, tx, simulate) +} + +// isIncompleteSignature tests whether SignatureData is fully filled in for simulation purposes +func isIncompleteSignature(data signing.SignatureData) bool { + if data == nil { + return true + } + + switch data := data.(type) { + case *signing.SingleSignatureData: + return len(data.Signature) == 0 + case *signing.MultiSignatureData: + if len(data.Signatures) == 0 { + return true + } + for _, s := range data.Signatures { + if isIncompleteSignature(s) { + return true + } + } + } + + return false +} + +type ( + // TxTimeoutHeightDecorator defines an AnteHandler decorator that checks for a + // tx height timeout. + TxTimeoutHeightDecorator struct{} + + // TxWithTimeoutHeight defines the interface a tx must implement in order for + // TxHeightTimeoutDecorator to process the tx. + TxWithTimeoutHeight interface { + sdk.Tx + + GetTimeoutHeight() uint64 + } +) + +// TxTimeoutHeightDecorator defines an AnteHandler decorator that checks for a +// tx height timeout. +func NewTxTimeoutHeightDecorator() TxTimeoutHeightDecorator { + return TxTimeoutHeightDecorator{} +} + +// AnteHandle implements an AnteHandler decorator for the TxHeightTimeoutDecorator +// type where the current block height is checked against the tx's height timeout. +// If a height timeout is provided (non-zero) and is less than the current block +// height, then an error is returned. +func (txh TxTimeoutHeightDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + timeoutTx, ok := tx.(TxWithTimeoutHeight) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "expected tx to implement TxWithTimeoutHeight") + } + + timeoutHeight := timeoutTx.GetTimeoutHeight() + if timeoutHeight > 0 && uint64(ctx.BlockHeight()) > timeoutHeight { + return ctx, sdkerrors.Wrapf( + sdkerrors.ErrTxTimeoutHeight, "block height: %d, timeout height: %d", ctx.BlockHeight(), timeoutHeight, + ) + } + + return next(ctx, tx, simulate) +} diff --git a/x/auth/ante/basic_test.go b/x/auth/ante/basic_test.go new file mode 100644 index 000000000000..4a8cb830fdf6 --- /dev/null +++ b/x/auth/ante/basic_test.go @@ -0,0 +1,224 @@ +package ante_test + +import ( + "strings" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/crypto/types/multisig" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" +) + +func (suite *AnteTestSuite) TestValidateBasic() { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{}, []uint64{}, []uint64{} + invalidTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + vbd := ante.NewValidateBasicDecorator() + antehandler := sdk.ChainAnteDecorators(vbd) + _, err = antehandler(suite.ctx, invalidTx, false) + + suite.Require().NotNil(err, "Did not error on invalid tx") + + privs, accNums, accSeqs = []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + validTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + _, err = antehandler(suite.ctx, validTx, false) + suite.Require().Nil(err, "ValidateBasicDecorator returned error on valid tx. err: %v", err) + + // test decorator skips on recheck + suite.ctx = suite.ctx.WithIsReCheckTx(true) + + // decorator should skip processing invalidTx on recheck and thus return nil-error + _, err = antehandler(suite.ctx, invalidTx, false) + + suite.Require().Nil(err, "ValidateBasicDecorator ran on ReCheck") +} + +func (suite *AnteTestSuite) TestValidateMemo() { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + suite.txBuilder.SetMemo(strings.Repeat("01234567890", 500)) + invalidTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + // require that long memos get rejected + vmd := ante.NewValidateMemoDecorator(suite.app.AccountKeeper) + antehandler := sdk.ChainAnteDecorators(vmd) + _, err = antehandler(suite.ctx, invalidTx, false) + + suite.Require().NotNil(err, "Did not error on tx with high memo") + + suite.txBuilder.SetMemo(strings.Repeat("01234567890", 10)) + validTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + // require small memos pass ValidateMemo Decorator + _, err = antehandler(suite.ctx, validTx, false) + suite.Require().Nil(err, "ValidateBasicDecorator returned error on valid tx. err: %v", err) +} + +func (suite *AnteTestSuite) TestConsumeGasForTxSize() { + suite.SetupTest(true) // setup + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + + cgtsd := ante.NewConsumeGasForTxSizeDecorator(suite.app.AccountKeeper) + antehandler := sdk.ChainAnteDecorators(cgtsd) + + testCases := []struct { + name string + sigV2 signing.SignatureV2 + }{ + {"SingleSignatureData", signing.SignatureV2{PubKey: priv1.PubKey()}}, + {"MultiSignatureData", signing.SignatureV2{PubKey: priv1.PubKey(), Data: multisig.NewMultisig(2)}}, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + suite.txBuilder.SetMemo(strings.Repeat("01234567890", 10)) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + txBytes, err := suite.clientCtx.TxConfig.TxJSONEncoder()(tx) + suite.Require().Nil(err, "Cannot marshal tx: %v", err) + + params := suite.app.AccountKeeper.GetParams(suite.ctx) + expectedGas := sdk.Gas(len(txBytes)) * params.TxSizeCostPerByte + + // Set suite.ctx with TxBytes manually + suite.ctx = suite.ctx.WithTxBytes(txBytes) + + // track how much gas is necessary to retrieve parameters + beforeGas := suite.ctx.GasMeter().GasConsumed() + suite.app.AccountKeeper.GetParams(suite.ctx) + afterGas := suite.ctx.GasMeter().GasConsumed() + expectedGas += afterGas - beforeGas + + beforeGas = suite.ctx.GasMeter().GasConsumed() + suite.ctx, err = antehandler(suite.ctx, tx, false) + suite.Require().Nil(err, "ConsumeTxSizeGasDecorator returned error: %v", err) + + // require that decorator consumes expected amount of gas + consumedGas := suite.ctx.GasMeter().GasConsumed() - beforeGas + suite.Require().Equal(expectedGas, consumedGas, "Decorator did not consume the correct amount of gas") + + // simulation must not underestimate gas of this decorator even with nil signatures + txBuilder, err := suite.clientCtx.TxConfig.WrapTxBuilder(tx) + suite.Require().NoError(err) + suite.Require().NoError(txBuilder.SetSignatures(tc.sigV2)) + tx = txBuilder.GetTx() + + simTxBytes, err := suite.clientCtx.TxConfig.TxJSONEncoder()(tx) + suite.Require().Nil(err, "Cannot marshal tx: %v", err) + // require that simulated tx is smaller than tx with signatures + suite.Require().True(len(simTxBytes) < len(txBytes), "simulated tx still has signatures") + + // Set suite.ctx with smaller simulated TxBytes manually + suite.ctx = suite.ctx.WithTxBytes(simTxBytes) + + beforeSimGas := suite.ctx.GasMeter().GasConsumed() + + // run antehandler with simulate=true + suite.ctx, err = antehandler(suite.ctx, tx, true) + consumedSimGas := suite.ctx.GasMeter().GasConsumed() - beforeSimGas + + // require that antehandler passes and does not underestimate decorator cost + suite.Require().Nil(err, "ConsumeTxSizeGasDecorator returned error: %v", err) + suite.Require().True(consumedSimGas >= expectedGas, "Simulate mode underestimates gas on AnteDecorator. Simulated cost: %d, expected cost: %d", consumedSimGas, expectedGas) + + }) + } + +} + +func (suite *AnteTestSuite) TestTxHeightTimeoutDecorator() { + suite.SetupTest(true) + + antehandler := sdk.ChainAnteDecorators(ante.NewTxTimeoutHeightDecorator()) + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + + testCases := []struct { + name string + timeout uint64 + height int64 + expectErr bool + }{ + {"default value", 0, 10, false}, + {"no timeout (greater height)", 15, 10, false}, + {"no timeout (same height)", 10, 10, false}, + {"timeout (smaller height)", 9, 10, true}, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + suite.txBuilder.SetMemo(strings.Repeat("01234567890", 10)) + suite.txBuilder.SetTimeoutHeight(tc.timeout) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + ctx := suite.ctx.WithBlockHeight(tc.height) + _, err = antehandler(ctx, tx, true) + suite.Require().Equal(tc.expectErr, err != nil, err) + }) + } +} diff --git a/x/auth/middleware/expected_keepers.go b/x/auth/ante/expected_keepers.go similarity index 85% rename from x/auth/middleware/expected_keepers.go rename to x/auth/ante/expected_keepers.go index 33bb6339c1f3..4dbbbd21c713 100644 --- a/x/auth/middleware/expected_keepers.go +++ b/x/auth/ante/expected_keepers.go @@ -1,4 +1,4 @@ -package middleware +package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" @@ -6,7 +6,7 @@ import ( ) // AccountKeeper defines the contract needed for AccountKeeper related APIs. -// Interface provides support to use non-sdk AccountKeeper for TxHandler's middlewares. +// Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators. type AccountKeeper interface { GetParams(ctx sdk.Context) (params types.Params) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI diff --git a/x/auth/ante/ext.go b/x/auth/ante/ext.go new file mode 100644 index 000000000000..6a072526aa0f --- /dev/null +++ b/x/auth/ante/ext.go @@ -0,0 +1,65 @@ +package ante + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +type HasExtensionOptionsTx interface { + GetExtensionOptions() []*codectypes.Any + GetNonCriticalExtensionOptions() []*codectypes.Any +} + +// ExtensionOptionChecker is a function that returns true if the extension option is accepted. +type ExtensionOptionChecker func(*codectypes.Any) bool + +// rejectExtensionOption is the default extension check that reject all tx +// extensions. +func rejectExtensionOption(*codectypes.Any) bool { + return false +} + +// RejectExtensionOptionsDecorator is an AnteDecorator that rejects all extension +// options which can optionally be included in protobuf transactions. Users that +// need extension options should create a custom AnteHandler chain that handles +// needed extension options properly and rejects unknown ones. +type RejectExtensionOptionsDecorator struct { + checker ExtensionOptionChecker +} + +// NewExtensionOptionsDecorator creates a new antehandler that rejects all extension +// options which can optionally be included in protobuf transactions that don't pass the checker. +// Users that need extension options should pass a custom checker that returns true for the +// needed extension options. +func NewExtensionOptionsDecorator(checker ExtensionOptionChecker) sdk.AnteDecorator { + if checker == nil { + checker = rejectExtensionOption + } + + return RejectExtensionOptionsDecorator{checker: checker} +} + +var _ sdk.AnteDecorator = RejectExtensionOptionsDecorator{} + +// AnteHandle implements the AnteDecorator.AnteHandle method +func (r RejectExtensionOptionsDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + err = checkExtOpts(tx, r.checker) + if err != nil { + return ctx, err + } + + return next(ctx, tx, simulate) +} + +func checkExtOpts(tx sdk.Tx, checker ExtensionOptionChecker) error { + if hasExtOptsTx, ok := tx.(HasExtensionOptionsTx); ok { + for _, opt := range hasExtOptsTx.GetExtensionOptions() { + if !checker(opt) { + return sdkerrors.ErrUnknownExtensionOptions + } + } + } + + return nil +} diff --git a/x/auth/ante/ext_test.go b/x/auth/ante/ext_test.go new file mode 100644 index 000000000000..3bd0f8f60275 --- /dev/null +++ b/x/auth/ante/ext_test.go @@ -0,0 +1,54 @@ +package ante_test + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/tx" +) + +func (suite *AnteTestSuite) TestRejectExtensionOptionsDecorator() { + suite.SetupTest(true) // setup + + testCases := []struct { + msg string + allow bool + }{ + {"allow extension", true}, + {"reject extension", false}, + } + for _, tc := range testCases { + suite.Run(tc.msg, func() { + txBuilder := suite.clientCtx.TxConfig.NewTxBuilder() + + reod := ante.NewExtensionOptionsDecorator(func(_ *codectypes.Any) bool { + return tc.allow + }) + antehandler := sdk.ChainAnteDecorators(reod) + + // no extension options should not trigger an error + theTx := txBuilder.GetTx() + _, err := antehandler(suite.ctx, theTx, false) + suite.Require().NoError(err) + + extOptsTxBldr, ok := txBuilder.(tx.ExtensionOptionsTxBuilder) + if !ok { + // if we can't set extension options, this decorator doesn't apply and we're done + return + } + + // set an extension option and check + any, err := codectypes.NewAnyWithValue(testdata.NewTestMsg()) + suite.Require().NoError(err) + extOptsTxBldr.SetExtensionOptions(any) + theTx = txBuilder.GetTx() + _, err = antehandler(suite.ctx, theTx, false) + if tc.allow { + suite.Require().NoError(err) + } else { + suite.Require().EqualError(err, "unknown extension options") + } + }) + } +} diff --git a/x/auth/middleware/fee.go b/x/auth/ante/fee.go similarity index 51% rename from x/auth/middleware/fee.go rename to x/auth/ante/fee.go index 2ae83c37269e..b6927eababe0 100644 --- a/x/auth/middleware/fee.go +++ b/x/auth/ante/fee.go @@ -1,12 +1,10 @@ -package middleware +package ante import ( - "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -14,36 +12,62 @@ import ( // the effective fee should be deducted later, and the priority should be returned in abci response. type TxFeeChecker func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) -var _ tx.Handler = deductFeeTxHandler{} - -type deductFeeTxHandler struct { +// DeductFeeDecorator deducts fees from the first signer of the tx +// If the first signer does not have the funds to pay for the fees, return with InsufficientFunds error +// Call next AnteHandler if fees successfully deducted +// CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator +type DeductFeeDecorator struct { accountKeeper AccountKeeper bankKeeper types.BankKeeper feegrantKeeper FeegrantKeeper txFeeChecker TxFeeChecker - next tx.Handler } -// DeductFeeMiddleware deducts fees from the first signer of the tx -// If the first signer does not have the funds to pay for the fees, return with InsufficientFunds error -// Call next middleware if fees successfully deducted -// CONTRACT: Tx must implement FeeTx interface to use deductFeeTxHandler -func DeductFeeMiddleware(ak AccountKeeper, bk types.BankKeeper, fk FeegrantKeeper, tfc TxFeeChecker) tx.Middleware { +func NewDeductFeeDecorator(ak AccountKeeper, bk types.BankKeeper, fk FeegrantKeeper, tfc TxFeeChecker) DeductFeeDecorator { if tfc == nil { tfc = checkTxFeeWithValidatorMinGasPrices } - return func(txh tx.Handler) tx.Handler { - return deductFeeTxHandler{ - accountKeeper: ak, - bankKeeper: bk, - feegrantKeeper: fk, - txFeeChecker: tfc, - next: txh, + + return DeductFeeDecorator{ + accountKeeper: ak, + bankKeeper: bk, + feegrantKeeper: fk, + txFeeChecker: tfc, + } +} + +func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + feeTx, ok := tx.(sdk.FeeTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + } + + if !simulate && ctx.BlockHeight() > 0 && feeTx.GetGas() == 0 { + return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidGasLimit, "must provide positive gas") + } + + var ( + priority int64 + err error + ) + + fee := feeTx.GetFee() + if !simulate { + fee, priority, err = dfd.txFeeChecker(ctx, tx) + if err != nil { + return ctx, err } } + if err := dfd.checkDeductFee(ctx, tx, fee); err != nil { + return ctx, err + } + + newCtx := ctx.WithPriority(priority) + + return next(newCtx, tx, simulate) } -func (dfd deductFeeTxHandler) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee sdk.Coins) error { +func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee sdk.Coins) error { feeTx, ok := sdkTx.(sdk.FeeTx) if !ok { return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") @@ -93,60 +117,15 @@ func (dfd deductFeeTxHandler) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee return nil } -// CheckTx implements tx.Handler.CheckTx. -func (dfd deductFeeTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - fee, priority, err := dfd.txFeeChecker(sdkCtx, req.Tx) - if err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - if err := dfd.checkDeductFee(sdkCtx, req.Tx, fee); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - res, checkRes, err := dfd.next.CheckTx(ctx, req, checkReq) - checkRes.Priority = priority - - return res, checkRes, err -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (dfd deductFeeTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - fee, _, err := dfd.txFeeChecker(sdkCtx, req.Tx) - if err != nil { - return tx.Response{}, err - } - if err := dfd.checkDeductFee(sdkCtx, req.Tx, fee); err != nil { - return tx.Response{}, err - } - - return dfd.next.DeliverTx(ctx, req) -} - -func (dfd deductFeeTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - fee, _, err := dfd.txFeeChecker(sdkCtx, req.Tx) - if err != nil { - return tx.Response{}, err - } - if err := dfd.checkDeductFee(sdkCtx, req.Tx, fee); err != nil { - return tx.Response{}, err - } - - return dfd.next.SimulateTx(ctx, req) -} - -// Deprecated: DeductFees deducts fees from the given account. -// This function will be private in the next release. +// DeductFees deducts fees from the given account. func DeductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc types.AccountI, fees sdk.Coins) error { if !fees.IsValid() { - return sdkerrors.ErrInsufficientFee.Wrapf("invalid fee amount: %s", fees) + return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "invalid fee amount: %s", fees) } err := bankKeeper.SendCoinsFromAccountToModule(ctx, acc.GetAddress(), types.FeeCollectorName, fees) if err != nil { - return sdkerrors.ErrInsufficientFunds.Wrap(err.Error()) + return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error()) } return nil diff --git a/x/auth/ante/fee_test.go b/x/auth/ante/fee_test.go new file mode 100644 index 000000000000..a182b4fa15b1 --- /dev/null +++ b/x/auth/ante/fee_test.go @@ -0,0 +1,148 @@ +package ante_test + +import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/bank/testutil" +) + +func (s *AnteTestSuite) TestDeductFeeDecorator_ZeroGas() { + s.SetupTest(true) // setup + s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() + + mfd := ante.NewDeductFeeDecorator(s.app.AccountKeeper, s.app.BankKeeper, s.app.FeeGrantKeeper, nil) + antehandler := sdk.ChainAnteDecorators(mfd) + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + coins := sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(300))) + testutil.FundAccount(s.app.BankKeeper, s.ctx, addr1, coins) + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + s.Require().NoError(s.txBuilder.SetMsgs(msg)) + + // set zero gas + s.txBuilder.SetGasLimit(0) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) + s.Require().NoError(err) + + // Set IsCheckTx to true + s.ctx = s.ctx.WithIsCheckTx(true) + + _, err = antehandler(s.ctx, tx, false) + s.Require().Error(err) + + // zero gas is accepted in simulation mode + _, err = antehandler(s.ctx, tx, true) + s.Require().NoError(err) +} + +func (s *AnteTestSuite) TestEnsureMempoolFees() { + s.SetupTest(true) // setup + s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() + + mfd := ante.NewDeductFeeDecorator(s.app.AccountKeeper, s.app.BankKeeper, s.app.FeeGrantKeeper, nil) + antehandler := sdk.ChainAnteDecorators(mfd) + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + coins := sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(300))) + testutil.FundAccount(s.app.BankKeeper, s.ctx, addr1, coins) + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + s.Require().NoError(s.txBuilder.SetMsgs(msg)) + s.txBuilder.SetFeeAmount(feeAmount) + s.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) + s.Require().NoError(err) + + // Set high gas price so standard test fee fails + atomPrice := sdk.NewDecCoinFromDec("atom", sdk.NewDec(200).Quo(sdk.NewDec(100000))) + highGasPrice := []sdk.DecCoin{atomPrice} + s.ctx = s.ctx.WithMinGasPrices(highGasPrice) + + // Set IsCheckTx to true + s.ctx = s.ctx.WithIsCheckTx(true) + + // antehandler errors with insufficient fees + _, err = antehandler(s.ctx, tx, false) + s.Require().NotNil(err, "Decorator should have errored on too low fee for local gasPrice") + + // antehandler should not error since we do not check minGasPrice in simulation mode + cacheCtx, _ := s.ctx.CacheContext() + _, err = antehandler(cacheCtx, tx, true) + s.Require().Nil(err, "Decorator should not have errored in simulation mode") + + // Set IsCheckTx to false + s.ctx = s.ctx.WithIsCheckTx(false) + + // antehandler should not error since we do not check minGasPrice in DeliverTx + _, err = antehandler(s.ctx, tx, false) + s.Require().Nil(err, "MempoolFeeDecorator returned error in DeliverTx") + + // Set IsCheckTx back to true for testing sufficient mempool fee + s.ctx = s.ctx.WithIsCheckTx(true) + + atomPrice = sdk.NewDecCoinFromDec("atom", sdk.NewDec(0).Quo(sdk.NewDec(100000))) + lowGasPrice := []sdk.DecCoin{atomPrice} + s.ctx = s.ctx.WithMinGasPrices(lowGasPrice) + + newCtx, err := antehandler(s.ctx, tx, false) + s.Require().Nil(err, "Decorator should not have errored on fee higher than local gasPrice") + // Priority is the smallest amount in any denom. Since we have only 1 fee + // of 150atom, the priority here is 150. + s.Require().Equal(feeAmount.AmountOf("atom").Int64(), newCtx.Priority()) +} + +func (s *AnteTestSuite) TestDeductFees() { + s.SetupTest(false) // setup + s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + s.Require().NoError(s.txBuilder.SetMsgs(msg)) + s.txBuilder.SetFeeAmount(feeAmount) + s.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) + s.Require().NoError(err) + + // Set account with insufficient funds + acc := s.app.AccountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.app.AccountKeeper.SetAccount(s.ctx, acc) + coins := sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(10))) + err = testutil.FundAccount(s.app.BankKeeper, s.ctx, addr1, coins) + s.Require().NoError(err) + + dfd := ante.NewDeductFeeDecorator(s.app.AccountKeeper, s.app.BankKeeper, nil, nil) + antehandler := sdk.ChainAnteDecorators(dfd) + + _, err = antehandler(s.ctx, tx, false) + + s.Require().NotNil(err, "Tx did not error when fee payer had insufficient funds") + + // Set account with sufficient funds + s.app.AccountKeeper.SetAccount(s.ctx, acc) + err = testutil.FundAccount(s.app.BankKeeper, s.ctx, addr1, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(200)))) + s.Require().NoError(err) + + _, err = antehandler(s.ctx, tx, false) + + s.Require().Nil(err, "Tx errored after account has been set with sufficient funds") +} diff --git a/x/auth/middleware/feegrant_test.go b/x/auth/ante/feegrant_test.go similarity index 78% rename from x/auth/middleware/feegrant_test.go rename to x/auth/ante/feegrant_test.go index 547f57a589d1..c8689ca3c7a1 100644 --- a/x/auth/middleware/feegrant_test.go +++ b/x/auth/ante/feegrant_test.go @@ -1,4 +1,4 @@ -package middleware_test +package ante_test import ( "math/rand" @@ -10,13 +10,13 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp/helpers" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/simulation" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" + "github.com/cosmos/cosmos-sdk/x/auth/ante" authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -24,21 +24,19 @@ import ( "github.com/cosmos/cosmos-sdk/x/feegrant" ) -func (s *MWTestSuite) TestDeductFeesNoDelegation() { - ctx := s.SetupTest(false) // setup - app := s.app +func (suite *AnteTestSuite) TestDeductFeesNoDelegation() { + suite.SetupTest(false) + // setup + app, ctx := suite.app, suite.ctx protoTxCfg := tx.NewTxConfig(codec.NewProtoCodec(app.InterfaceRegistry()), tx.DefaultSignModes) - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.DeductFeeMiddleware( - s.app.AccountKeeper, - s.app.BankKeeper, - s.app.FeeGrantKeeper, - nil, - ), - ) + // this just tests our handler + dfd := ante.NewDeductFeeDecorator(app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, nil) + feeAnteHandler := sdk.ChainAnteDecorators(dfd) + + // this tests the whole stack + anteHandlerStack := suite.anteHandler // keys and addresses priv1, _, addr1 := testdata.KeyTestPubAddr() @@ -48,24 +46,24 @@ func (s *MWTestSuite) TestDeductFeesNoDelegation() { priv5, _, addr5 := testdata.KeyTestPubAddr() // Set addr1 with insufficient funds - err := testutil.FundAccount(s.app.BankKeeper, ctx, addr1, []sdk.Coin{sdk.NewCoin("atom", sdk.NewInt(10))}) - s.Require().NoError(err) + err := testutil.FundAccount(suite.app.BankKeeper, suite.ctx, addr1, []sdk.Coin{sdk.NewCoin("atom", sdk.NewInt(10))}) + suite.Require().NoError(err) // Set addr2 with more funds - err = testutil.FundAccount(s.app.BankKeeper, ctx, addr2, []sdk.Coin{sdk.NewCoin("atom", sdk.NewInt(99999))}) - s.Require().NoError(err) + err = testutil.FundAccount(suite.app.BankKeeper, suite.ctx, addr2, []sdk.Coin{sdk.NewCoin("atom", sdk.NewInt(99999))}) + suite.Require().NoError(err) // grant fee allowance from `addr2` to `addr3` (plenty to pay) err = app.FeeGrantKeeper.GrantAllowance(ctx, addr2, addr3, &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 500)), }) - s.Require().NoError(err) + suite.Require().NoError(err) // grant low fee allowance (20atom), to check the tx requesting more than allowed. err = app.FeeGrantKeeper.GrantAllowance(ctx, addr2, addr4, &feegrant.BasicAllowance{ SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 20)), }) - s.Require().NoError(err) + suite.Require().NoError(err) cases := map[string]struct { signerKey cryptotypes.PrivKey @@ -136,7 +134,7 @@ func (s *MWTestSuite) TestDeductFeesNoDelegation() { for name, stc := range cases { tc := stc // to make scopelint happy - s.T().Run(name, func(t *testing.T) { + suite.T().Run(name, func(t *testing.T) { fee := sdk.NewCoins(sdk.NewInt64Coin("atom", tc.fee)) msgs := []sdk.Msg{testdata.NewTestMsg(tc.signer)} @@ -146,23 +144,20 @@ func (s *MWTestSuite) TestDeductFeesNoDelegation() { accNums, seqs = []uint64{acc.GetAccountNumber()}, []uint64{acc.GetSequence()} } - testTx, err := genTxWithFeeGranter(protoTxCfg, msgs, fee, helpers.DefaultGenTxGas, ctx.ChainID(), accNums, seqs, tc.feeAccount, privs...) - s.Require().NoError(err) - - // tests only feegrant middleware - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), txtypes.Request{Tx: testTx}) + tx, err := genTxWithFeeGranter(protoTxCfg, msgs, fee, helpers.DefaultGenTxGas, ctx.ChainID(), accNums, seqs, tc.feeAccount, privs...) + suite.Require().NoError(err) + _, err = feeAnteHandler(ctx, tx, false) // tests only feegrant ante if tc.valid { - s.Require().NoError(err) + suite.Require().NoError(err) } else { - s.Require().Error(err) + suite.Require().Error(err) } - // tests while stack - _, err = s.txHandler.DeliverTx(sdk.WrapSDKContext(ctx), txtypes.Request{Tx: testTx}) + _, err = anteHandlerStack(ctx, tx, false) // tests while stack if tc.valid { - s.Require().NoError(err) + suite.Require().NoError(err) } else { - s.Require().Error(err) + suite.Require().Error(err) } }) } @@ -174,7 +169,8 @@ func SigGasNoConsumer(meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, para } func genTxWithFeeGranter(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, - accSeqs []uint64, feeGranter sdk.AccAddress, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { + accSeqs []uint64, feeGranter sdk.AccAddress, priv ...cryptotypes.PrivKey, +) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo @@ -213,11 +209,9 @@ func genTxWithFeeGranter(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, // 2nd round: once all signer infos are set, every signer can sign. for i, p := range priv { signerData := authsign.SignerData{ - Address: sdk.AccAddress(p.PubKey().Address()).String(), ChainID: chainID, AccountNumber: accNums[i], Sequence: accSeqs[i], - PubKey: p.PubKey(), } signBytes, err := gen.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) if err != nil { diff --git a/x/auth/ante/setup.go b/x/auth/ante/setup.go new file mode 100644 index 000000000000..6d6d4344c0c3 --- /dev/null +++ b/x/auth/ante/setup.go @@ -0,0 +1,76 @@ +package ante + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" +) + +var ( + _ GasTx = (*legacytx.StdTx)(nil) // assert StdTx implements GasTx +) + +// GasTx defines a Tx with a GetGas() method which is needed to use SetUpContextDecorator +type GasTx interface { + sdk.Tx + GetGas() uint64 +} + +// SetUpContextDecorator sets the GasMeter in the Context and wraps the next AnteHandler with a defer clause +// to recover from any downstream OutOfGas panics in the AnteHandler chain to return an error with information +// on gas provided and gas used. +// CONTRACT: Must be first decorator in the chain +// CONTRACT: Tx must implement GasTx interface +type SetUpContextDecorator struct{} + +func NewSetUpContextDecorator() SetUpContextDecorator { + return SetUpContextDecorator{} +} + +func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + // all transactions must implement GasTx + gasTx, ok := tx.(GasTx) + if !ok { + // Set a gas meter with limit 0 as to prevent an infinite gas meter attack + // during runTx. + newCtx = SetGasMeter(simulate, ctx, 0) + return newCtx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be GasTx") + } + + newCtx = SetGasMeter(simulate, ctx, gasTx.GetGas()) + + // Decorator will catch an OutOfGasPanic caused in the next antehandler + // AnteHandlers must have their own defer/recover in order for the BaseApp + // to know how much gas was used! This is because the GasMeter is created in + // the AnteHandler, but if it panics the context won't be set properly in + // runTx's recover call. + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + log := fmt.Sprintf( + "out of gas in location: %v; gasWanted: %d, gasUsed: %d", + rType.Descriptor, gasTx.GetGas(), newCtx.GasMeter().GasConsumed()) + + err = sdkerrors.Wrap(sdkerrors.ErrOutOfGas, log) + default: + panic(r) + } + } + }() + + return next(newCtx, tx, simulate) +} + +// SetGasMeter returns a new context with a gas meter set from a given context. +func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context { + // In various cases such as simulation and during the genesis block, we do not + // meter any gas utilization. + if simulate || ctx.BlockHeight() == 0 { + return ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + } + + return ctx.WithGasMeter(sdk.NewGasMeter(gasLimit)) +} diff --git a/x/auth/ante/setup_test.go b/x/auth/ante/setup_test.go new file mode 100644 index 000000000000..ed4e543b56a4 --- /dev/null +++ b/x/auth/ante/setup_test.go @@ -0,0 +1,99 @@ +package ante_test + +import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/ante" +) + +func (suite *AnteTestSuite) TestSetup() { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + sud := ante.NewSetUpContextDecorator() + antehandler := sdk.ChainAnteDecorators(sud) + + // Set height to non-zero value for GasMeter to be set + suite.ctx = suite.ctx.WithBlockHeight(1).WithGasMeter(sdk.NewGasMeter(0)) + + // Context GasMeter Limit not set + suite.Require().Equal(uint64(0), suite.ctx.GasMeter().Limit(), "GasMeter set with limit before setup") + + newCtx, err := antehandler(suite.ctx, tx, false) + suite.Require().Nil(err, "SetUpContextDecorator returned error") + + // Context GasMeter Limit should be set after SetUpContextDecorator runs + suite.Require().Equal(gasLimit, newCtx.GasMeter().Limit(), "GasMeter not set correctly") +} + +func (suite *AnteTestSuite) TestRecoverPanic() { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + + // msg and signatures + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + sud := ante.NewSetUpContextDecorator() + antehandler := sdk.ChainAnteDecorators(sud, OutOfGasDecorator{}) + + // Set height to non-zero value for GasMeter to be set + suite.ctx = suite.ctx.WithBlockHeight(1) + + newCtx, err := antehandler(suite.ctx, tx, false) + + suite.Require().NotNil(err, "Did not return error on OutOfGas panic") + + suite.Require().True(sdkerrors.ErrOutOfGas.Is(err), "Returned error is not an out of gas error") + suite.Require().Equal(gasLimit, newCtx.GasMeter().Limit()) + + antehandler = sdk.ChainAnteDecorators(sud, PanicDecorator{}) + suite.Require().Panics(func() { antehandler(suite.ctx, tx, false) }, "Recovered from non-Out-of-Gas panic") // nolint:errcheck +} + +type OutOfGasDecorator struct{} + +// AnteDecorator that will throw OutOfGas panic +func (ogd OutOfGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + overLimit := ctx.GasMeter().Limit() + 1 + + // Should panic with outofgas error + ctx.GasMeter().ConsumeGas(overLimit, "test panic") + + // not reached + return next(ctx, tx, simulate) +} + +type PanicDecorator struct{} + +func (pd PanicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + panic("random error") +} diff --git a/x/auth/middleware/sigverify.go b/x/auth/ante/sigverify.go similarity index 51% rename from x/auth/middleware/sigverify.go rename to x/auth/ante/sigverify.go index 6189546df0d2..98b628a12fc2 100644 --- a/x/auth/middleware/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -1,9 +1,9 @@ -package middleware +package ante import ( "bytes" - "context" "encoding/base64" + "encoding/hex" "fmt" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -14,11 +14,10 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/auth/types" - abci "github.com/tendermint/tendermint/abci/types" ) var ( @@ -26,42 +25,44 @@ var ( key = make([]byte, secp256k1.PubKeySize) simSecp256k1Pubkey = &secp256k1.PubKey{Key: key} simSecp256k1Sig [64]byte + + _ authsigning.SigVerifiableTx = (*legacytx.StdTx)(nil) // assert StdTx implements SigVerifiableTx ) +func init() { + // This decodes a valid hex string into a sepc256k1Pubkey for use in transaction simulation + bz, _ := hex.DecodeString("035AD6810A47F073553FF30D2FCC7E0D3B1C0B74B61A1AAA2582344037151E143A") + copy(key, bz) + simSecp256k1Pubkey.Key = key +} + // SignatureVerificationGasConsumer is the type of function that is used to both // consume gas when verifying signatures and also to accept or reject different types of pubkeys // This is where apps can define their own PubKey type SignatureVerificationGasConsumer = func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error -var _ tx.Handler = setPubKeyTxHandler{} - -type setPubKeyTxHandler struct { - ak AccountKeeper - next tx.Handler +// SetPubKeyDecorator sets PubKeys in context for any signer which does not already have pubkey set +// PubKeys must be set in context for all signers before any other sigverify decorators run +// CONTRACT: Tx must implement SigVerifiableTx interface +type SetPubKeyDecorator struct { + ak AccountKeeper } -// SetPubKeyMiddleware sets PubKeys in context for any signer which does not already have pubkey set -// PubKeys must be set in context for all signers before any other sigverify middlewares run -// CONTRACT: Tx must implement SigVerifiableTx interface -func SetPubKeyMiddleware(ak AccountKeeper) tx.Middleware { - return func(txh tx.Handler) tx.Handler { - return setPubKeyTxHandler{ - ak: ak, - next: txh, - } +func NewSetPubKeyDecorator(ak AccountKeeper) SetPubKeyDecorator { + return SetPubKeyDecorator{ + ak: ak, } } -func (spkm setPubKeyTxHandler) setPubKey(ctx context.Context, req tx.Request, simulate bool) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - sigTx, ok := req.Tx.(authsigning.SigVerifiableTx) +func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") } pubkeys, err := sigTx.GetPubKeys() if err != nil { - return err + return ctx, err } signers := sigTx.GetSigners() @@ -75,13 +76,13 @@ func (spkm setPubKeyTxHandler) setPubKey(ctx context.Context, req tx.Request, si } // Only make check if simulate=false if !simulate && !bytes.Equal(pk.Address(), signers[i]) { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, + return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "pubKey does not match signer address %s with signer index: %d", signers[i], i) } - acc, err := GetSignerAcc(sdkCtx, spkm.ak, signers[i]) + acc, err := GetSignerAcc(ctx, spkd.ak, signers[i]) if err != nil { - return err + return ctx, err } // account already has pubkey set,no need to reset if acc.GetPubKey() != nil { @@ -89,9 +90,9 @@ func (spkm setPubKeyTxHandler) setPubKey(ctx context.Context, req tx.Request, si } err = acc.SetPubKey(pk) if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) + return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) } - spkm.ak.SetAccount(sdkCtx, acc) + spkd.ak.SetAccount(ctx, acc) } // Also emit the following events, so that txs can be indexed by these @@ -100,7 +101,7 @@ func (spkm setPubKeyTxHandler) setPubKey(ctx context.Context, req tx.Request, si // - concat(address,"/",sequence) (via `tx.acc_seq='cosmos1abc...def/42'`). sigs, err := sigTx.GetSignaturesV2() if err != nil { - return err + return ctx, err } var events sdk.Events @@ -111,7 +112,7 @@ func (spkm setPubKeyTxHandler) setPubKey(ctx context.Context, req tx.Request, si sigBzs, err := signatureDataToBz(sig.Data) if err != nil { - return err + return ctx, err } for _, sigBz := range sigBzs { events = append(events, sdk.NewEvent(sdk.EventTypeTx, @@ -120,206 +121,41 @@ func (spkm setPubKeyTxHandler) setPubKey(ctx context.Context, req tx.Request, si } } - sdkCtx.EventManager().EmitEvents(events) - - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (spkm setPubKeyTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := spkm.setPubKey(ctx, req, false); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return spkm.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (spkm setPubKeyTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := spkm.setPubKey(ctx, req, false); err != nil { - return tx.Response{}, err - } - return spkm.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx. -func (spkm setPubKeyTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := spkm.setPubKey(ctx, req, true); err != nil { - return tx.Response{}, err - } - return spkm.next.SimulateTx(ctx, req) -} - -var _ tx.Handler = validateSigCountTxHandler{} + ctx.EventManager().EmitEvents(events) -type validateSigCountTxHandler struct { - ak AccountKeeper - next tx.Handler + return next(ctx, tx, simulate) } -// ValidateSigCountMiddleware takes in Params and returns errors if there are too many signatures in the tx for the given params -// otherwise it calls next middleware -// Use this middleware to set parameterized limit on number of signatures in tx +// Consume parameter-defined amount of gas for each signature according to the passed-in SignatureVerificationGasConsumer function +// before calling the next AnteHandler +// CONTRACT: Pubkeys are set in context for all signers before this decorator runs // CONTRACT: Tx must implement SigVerifiableTx interface -func ValidateSigCountMiddleware(ak AccountKeeper) tx.Middleware { - return func(txh tx.Handler) tx.Handler { - return validateSigCountTxHandler{ - ak: ak, - next: txh, - } - } -} - -func (vscd validateSigCountTxHandler) checkSigCount(ctx context.Context, req tx.Request) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - sigTx, ok := req.Tx.(authsigning.SigVerifiableTx) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a sigTx") - } - - params := vscd.ak.GetParams(sdkCtx) - pubKeys, err := sigTx.GetPubKeys() - if err != nil { - return err - } - - sigCount := 0 - for _, pk := range pubKeys { - sigCount += CountSubKeys(pk) - if uint64(sigCount) > params.TxSigLimit { - return sdkerrors.Wrapf(sdkerrors.ErrTooManySignatures, - "signatures: %d, limit: %d", sigCount, params.TxSigLimit) - } - } - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (vscd validateSigCountTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := vscd.checkSigCount(ctx, req); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return vscd.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (vscd validateSigCountTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := vscd.checkSigCount(ctx, req); err != nil { - return tx.Response{}, err - } - - return vscd.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx. -func (vscd validateSigCountTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := vscd.checkSigCount(ctx, req); err != nil { - return tx.Response{}, err - } - - return vscd.next.SimulateTx(ctx, req) -} - -// DefaultSigVerificationGasConsumer is the default implementation of SignatureVerificationGasConsumer. It consumes gas -// for signature verification based upon the public key type. The cost is fetched from the given params and is matched -// by the concrete type. -func DefaultSigVerificationGasConsumer( - meter sdk.GasMeter, sig signing.SignatureV2, params types.Params, -) error { - pubkey := sig.PubKey - switch pubkey := pubkey.(type) { - case *ed25519.PubKey: - meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519") - return sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "ED25519 public keys are unsupported") - - case *secp256k1.PubKey: - meter.ConsumeGas(params.SigVerifyCostSecp256k1, "ante verify: secp256k1") - return nil - - case *secp256r1.PubKey: - meter.ConsumeGas(params.SigVerifyCostSecp256r1(), "ante verify: secp256r1") - return nil - - case multisig.PubKey: - multisignature, ok := sig.Data.(*signing.MultiSignatureData) - if !ok { - return fmt.Errorf("expected %T, got, %T", &signing.MultiSignatureData{}, sig.Data) - } - err := ConsumeMultisignatureVerificationGas(meter, multisignature, pubkey, params, sig.Sequence) - if err != nil { - return err - } - return nil - - default: - return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "unrecognized public key type: %T", pubkey) - } -} - -// ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature -func ConsumeMultisignatureVerificationGas( - meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, - params types.Params, accSeq uint64, -) error { - - size := sig.BitArray.Count() - sigIndex := 0 - - for i := 0; i < size; i++ { - if !sig.BitArray.GetIndex(i) { - continue - } - sigV2 := signing.SignatureV2{ - PubKey: pubkey.GetPubKeys()[i], - Data: sig.Signatures[sigIndex], - Sequence: accSeq, - } - err := DefaultSigVerificationGasConsumer(meter, sigV2, params) - if err != nil { - return err - } - sigIndex++ - } - - return nil -} - -var _ tx.Handler = sigGasConsumeTxHandler{} - -type sigGasConsumeTxHandler struct { +type SigGasConsumeDecorator struct { ak AccountKeeper sigGasConsumer SignatureVerificationGasConsumer - next tx.Handler } -// SigGasConsumeMiddleware consumes parameter-defined amount of gas for each signature according to the passed-in SignatureVerificationGasConsumer function -// before calling the next middleware -// CONTRACT: Pubkeys are set in context for all signers before this middleware runs -// CONTRACT: Tx must implement SigVerifiableTx interface -func SigGasConsumeMiddleware(ak AccountKeeper, sigGasConsumer SignatureVerificationGasConsumer) tx.Middleware { - return func(h tx.Handler) tx.Handler { - return sigGasConsumeTxHandler{ - ak: ak, - sigGasConsumer: sigGasConsumer, - next: h, - } +func NewSigGasConsumeDecorator(ak AccountKeeper, sigGasConsumer SignatureVerificationGasConsumer) SigGasConsumeDecorator { + if sigGasConsumer == nil { + sigGasConsumer = DefaultSigVerificationGasConsumer } -} -func (sgcm sigGasConsumeTxHandler) sigGasConsume(ctx context.Context, req tx.Request, simulate bool) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) + return SigGasConsumeDecorator{ + ak: ak, + sigGasConsumer: sigGasConsumer, + } +} - sigTx, ok := req.Tx.(authsigning.SigVerifiableTx) +func (sgcd SigGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } - params := sgcm.ak.GetParams(sdkCtx) + params := sgcd.ak.GetParams(ctx) sigs, err := sigTx.GetSignaturesV2() if err != nil { - return err + return ctx, err } // stdSigs contains the sequence number, account number, and signatures. @@ -327,9 +163,9 @@ func (sgcm sigGasConsumeTxHandler) sigGasConsume(ctx context.Context, req tx.Req signerAddrs := sigTx.GetSigners() for i, sig := range sigs { - signerAcc, err := GetSignerAcc(sdkCtx, sgcm.ak, signerAddrs[i]) + signerAcc, err := GetSignerAcc(ctx, sgcd.ak, signerAddrs[i]) if err != nil { - return err + return ctx, err } pubKey := signerAcc.GetPubKey() @@ -349,62 +185,29 @@ func (sgcm sigGasConsumeTxHandler) sigGasConsume(ctx context.Context, req tx.Req Sequence: sig.Sequence, } - err = sgcm.sigGasConsumer(sdkCtx.GasMeter(), sig, params) + err = sgcd.sigGasConsumer(ctx.GasMeter(), sig, params) if err != nil { - return err + return ctx, err } } - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (sgcm sigGasConsumeTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := sgcm.sigGasConsume(ctx, req, false); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return sgcm.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (sgcm sigGasConsumeTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := sgcm.sigGasConsume(ctx, req, false); err != nil { - return tx.Response{}, err - } - - return sgcm.next.DeliverTx(ctx, req) + return next(ctx, tx, simulate) } -// SimulateTx implements tx.Handler.SimulateTx. -func (sgcm sigGasConsumeTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := sgcm.sigGasConsume(ctx, req, true); err != nil { - return tx.Response{}, err - } - - return sgcm.next.SimulateTx(ctx, req) -} - -var _ tx.Handler = sigVerificationTxHandler{} - -type sigVerificationTxHandler struct { +// Verify all signatures for a tx and return an error if any are invalid. Note, +// the SigVerificationDecorator will not check signatures on ReCheck. +// +// CONTRACT: Pubkeys are set in context for all signers before this decorator runs +// CONTRACT: Tx must implement SigVerifiableTx interface +type SigVerificationDecorator struct { ak AccountKeeper signModeHandler authsigning.SignModeHandler - next tx.Handler } -// SigVerificationMiddleware verifies all signatures for a tx and return an error if any are invalid. Note, -// the sigVerificationTxHandler middleware will not get executed on ReCheck. -// -// CONTRACT: Pubkeys are set in context for all signers before this middleware runs -// CONTRACT: Tx must implement SigVerifiableTx interface -func SigVerificationMiddleware(ak AccountKeeper, signModeHandler authsigning.SignModeHandler) tx.Middleware { - return func(h tx.Handler) tx.Handler { - return sigVerificationTxHandler{ - ak: ak, - signModeHandler: signModeHandler, - next: h, - } +func NewSigVerificationDecorator(ak AccountKeeper, signModeHandler authsigning.SignModeHandler) SigVerificationDecorator { + return SigVerificationDecorator{ + ak: ak, + signModeHandler: signModeHandler, } } @@ -412,7 +215,7 @@ func SigVerificationMiddleware(ak AccountKeeper, signModeHandler authsigning.Sig // signers are using SIGN_MODE_LEGACY_AMINO_JSON. If this is the case // then the corresponding SignatureV2 struct will not have account sequence // explicitly set, and we should skip the explicit verification of sig.Sequence -// in the SigVerificationMiddleware's middleware function. +// in the SigVerificationDecorator's AnteHandler function. func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool { switch v := sigData.(type) { case *signing.SingleSignatureData: @@ -429,69 +232,64 @@ func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool { } } -func (svd sigVerificationTxHandler) sigVerify(ctx context.Context, req tx.Request, isReCheckTx, simulate bool) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - // no need to verify signatures on recheck tx - if isReCheckTx { - return nil - } - sigTx, ok := req.Tx.(authsigning.SigVerifiableTx) +func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } // stdSigs contains the sequence number, account number, and signatures. // When simulating, this would just be a 0-length slice. sigs, err := sigTx.GetSignaturesV2() if err != nil { - return err + return ctx, err } signerAddrs := sigTx.GetSigners() // check that signer length and signature length are the same if len(sigs) != len(signerAddrs) { - return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "invalid number of signer; expected: %d, got %d", len(signerAddrs), len(sigs)) + return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "invalid number of signer; expected: %d, got %d", len(signerAddrs), len(sigs)) } for i, sig := range sigs { - acc, err := GetSignerAcc(sdkCtx, svd.ak, signerAddrs[i]) + acc, err := GetSignerAcc(ctx, svd.ak, signerAddrs[i]) if err != nil { - return err + return ctx, err } // retrieve pubkey pubKey := acc.GetPubKey() if !simulate && pubKey == nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "pubkey on account is not set") + return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "pubkey on account is not set") } // Check account sequence number. if sig.Sequence != acc.GetSequence() { - return sdkerrors.Wrapf( + return ctx, sdkerrors.Wrapf( sdkerrors.ErrWrongSequence, "account sequence mismatch, expected %d, got %d", acc.GetSequence(), sig.Sequence, ) } // retrieve signer data - genesis := sdkCtx.BlockHeight() == 0 - chainID := sdkCtx.ChainID() + genesis := ctx.BlockHeight() == 0 + chainID := ctx.ChainID() var accNum uint64 if !genesis { accNum = acc.GetAccountNumber() } - signerData := authsigning.SignerData{ - Address: signerAddrs[i].String(), + Address: acc.GetAddress().String(), ChainID: chainID, AccountNumber: accNum, Sequence: acc.GetSequence(), PubKey: pubKey, } - if !simulate { - err := authsigning.VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, req.Tx) + // no need to verify signatures on recheck tx + if !simulate && !ctx.IsReCheckTx() { + err := authsigning.VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, tx) if err != nil { var errMsg string if OnlyLegacyAminoSigners(sig.Data) { @@ -501,112 +299,153 @@ func (svd sigVerificationTxHandler) sigVerify(ctx context.Context, req tx.Reques } else { errMsg = fmt.Sprintf("signature verification failed; please verify account number (%d) and chain-id (%s)", accNum, chainID) } - return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg) + return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg) } } } - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (svd sigVerificationTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := svd.sigVerify(ctx, req, checkReq.Type == abci.CheckTxType_Recheck, false); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return svd.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (svd sigVerificationTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := svd.sigVerify(ctx, req, false, false); err != nil { - return tx.Response{}, err - } - - return svd.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx. -func (svd sigVerificationTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := svd.sigVerify(ctx, req, false, true); err != nil { - return tx.Response{}, err - } - - return svd.next.SimulateTx(ctx, req) -} - -var _ tx.Handler = incrementSequenceTxHandler{} - -type incrementSequenceTxHandler struct { - ak AccountKeeper - next tx.Handler + return next(ctx, tx, simulate) } -// IncrementSequenceMiddleware handles incrementing sequences of all signers. -// Use the incrementSequenceTxHandler middleware to prevent replay attacks. Note, -// there is no need to execute incrementSequenceTxHandler on RecheckTX since -// CheckTx would already bump the sequence number. +// IncrementSequenceDecorator handles incrementing sequences of all signers. +// Use the IncrementSequenceDecorator decorator to prevent replay attacks. Note, +// there is need to execute IncrementSequenceDecorator on RecheckTx since +// BaseApp.Commit() will set the check state based on the latest header. // // NOTE: Since CheckTx and DeliverTx state are managed separately, subsequent and // sequential txs orginating from the same account cannot be handled correctly in // a reliable way unless sequence numbers are managed and tracked manually by a // client. It is recommended to instead use multiple messages in a tx. -func IncrementSequenceMiddleware(ak AccountKeeper) tx.Middleware { - return func(h tx.Handler) tx.Handler { - return incrementSequenceTxHandler{ - ak: ak, - next: h, - } +type IncrementSequenceDecorator struct { + ak AccountKeeper +} + +func NewIncrementSequenceDecorator(ak AccountKeeper) IncrementSequenceDecorator { + return IncrementSequenceDecorator{ + ak: ak, } } -func (isd incrementSequenceTxHandler) incrementSeq(ctx context.Context, req tx.Request) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - sigTx, ok := req.Tx.(authsigning.SigVerifiableTx) +func (isd IncrementSequenceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } // increment sequence of all signers for _, addr := range sigTx.GetSigners() { - acc := isd.ak.GetAccount(sdkCtx, addr) + acc := isd.ak.GetAccount(ctx, addr) if err := acc.SetSequence(acc.GetSequence() + 1); err != nil { panic(err) } - isd.ak.SetAccount(sdkCtx, acc) + isd.ak.SetAccount(ctx, acc) } - return nil + return next(ctx, tx, simulate) } -// CheckTx implements tx.Handler.CheckTx. -func (isd incrementSequenceTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := isd.incrementSeq(ctx, req); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } +// ValidateSigCountDecorator takes in Params and returns errors if there are too many signatures in the tx for the given params +// otherwise it calls next AnteHandler +// Use this decorator to set parameterized limit on number of signatures in tx +// CONTRACT: Tx must implement SigVerifiableTx interface +type ValidateSigCountDecorator struct { + ak AccountKeeper +} - return isd.next.CheckTx(ctx, req, checkReq) +func NewValidateSigCountDecorator(ak AccountKeeper) ValidateSigCountDecorator { + return ValidateSigCountDecorator{ + ak: ak, + } } -// DeliverTx implements tx.Handler.DeliverTx. -func (isd incrementSequenceTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := isd.incrementSeq(ctx, req); err != nil { - return tx.Response{}, err +func (vscd ValidateSigCountDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a sigTx") + } + + params := vscd.ak.GetParams(ctx) + pubKeys, err := sigTx.GetPubKeys() + if err != nil { + return ctx, err + } + + sigCount := 0 + for _, pk := range pubKeys { + sigCount += CountSubKeys(pk) + if uint64(sigCount) > params.TxSigLimit { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrTooManySignatures, + "signatures: %d, limit: %d", sigCount, params.TxSigLimit) + } } - return isd.next.DeliverTx(ctx, req) + return next(ctx, tx, simulate) +} + +// DefaultSigVerificationGasConsumer is the default implementation of SignatureVerificationGasConsumer. It consumes gas +// for signature verification based upon the public key type. The cost is fetched from the given params and is matched +// by the concrete type. +func DefaultSigVerificationGasConsumer( + meter sdk.GasMeter, sig signing.SignatureV2, params types.Params, +) error { + pubkey := sig.PubKey + switch pubkey := pubkey.(type) { + case *ed25519.PubKey: + meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519") + return sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "ED25519 public keys are unsupported") + + case *secp256k1.PubKey: + meter.ConsumeGas(params.SigVerifyCostSecp256k1, "ante verify: secp256k1") + return nil + + case *secp256r1.PubKey: + meter.ConsumeGas(params.SigVerifyCostSecp256r1(), "ante verify: secp256r1") + return nil + + case multisig.PubKey: + multisignature, ok := sig.Data.(*signing.MultiSignatureData) + if !ok { + return fmt.Errorf("expected %T, got, %T", &signing.MultiSignatureData{}, sig.Data) + } + err := ConsumeMultisignatureVerificationGas(meter, multisignature, pubkey, params, sig.Sequence) + if err != nil { + return err + } + return nil + + default: + return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "unrecognized public key type: %T", pubkey) + } } -// SimulateTx implements tx.Handler.SimulateTx. -func (isd incrementSequenceTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := isd.incrementSeq(ctx, req); err != nil { - return tx.Response{}, err +// ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature +func ConsumeMultisignatureVerificationGas( + meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, + params types.Params, accSeq uint64, +) error { + + size := sig.BitArray.Count() + sigIndex := 0 + + for i := 0; i < size; i++ { + if !sig.BitArray.GetIndex(i) { + continue + } + sigV2 := signing.SignatureV2{ + PubKey: pubkey.GetPubKeys()[i], + Data: sig.Signatures[sigIndex], + Sequence: accSeq, + } + err := DefaultSigVerificationGasConsumer(meter, sigV2, params) + if err != nil { + return err + } + sigIndex++ } - return isd.next.SimulateTx(ctx, req) + return nil } // GetSignerAcc returns an account for a given address that is expected to sign diff --git a/x/auth/middleware/sigverify_benchmark_test.go b/x/auth/ante/sigverify_benchmark_test.go similarity index 89% rename from x/auth/middleware/sigverify_benchmark_test.go rename to x/auth/ante/sigverify_benchmark_test.go index dc635985170b..56e596fa6b55 100644 --- a/x/auth/middleware/sigverify_benchmark_test.go +++ b/x/auth/ante/sigverify_benchmark_test.go @@ -1,4 +1,4 @@ -package middleware_test +package ante_test import ( "testing" @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" ) -// This benchmark is used to asses the middleware.Secp256k1ToR1GasFactor value +// This benchmark is used to asses the ante.Secp256k1ToR1GasFactor value func BenchmarkSig(b *testing.B) { require := require.New(b) msg := tmcrypto.CRandBytes(1000) diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go new file mode 100644 index 000000000000..c002818d3b26 --- /dev/null +++ b/x/auth/ante/sigverify_test.go @@ -0,0 +1,406 @@ +package ante_test + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/crypto/types/multisig" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +func (suite *AnteTestSuite) TestSetPubKey() { + suite.SetupTest(true) // setup + require := suite.Require() + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // keys and addresses + priv1, pub1, addr1 := testdata.KeyTestPubAddr() + priv2, pub2, addr2 := testdata.KeyTestPubAddr() + priv3, pub3, addr3 := testdata.KeyTestPubAddrSecp256R1(require) + + addrs := []sdk.AccAddress{addr1, addr2, addr3} + pubs := []cryptotypes.PubKey{pub1, pub2, pub3} + + msgs := make([]sdk.Msg, len(addrs)) + // set accounts and create msg for each address + for i, addr := range addrs { + acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + require.NoError(acc.SetAccountNumber(uint64(i))) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc) + msgs[i] = testdata.NewTestMsg(addr) + } + require.NoError(suite.txBuilder.SetMsgs(msgs...)) + suite.txBuilder.SetFeeAmount(testdata.NewTestFeeAmount()) + suite.txBuilder.SetGasLimit(testdata.NewTestGasLimit()) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0} + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + require.NoError(err) + + spkd := ante.NewSetPubKeyDecorator(suite.app.AccountKeeper) + antehandler := sdk.ChainAnteDecorators(spkd) + + ctx, err := antehandler(suite.ctx, tx, false) + require.NoError(err) + + // Require that all accounts have pubkey set after Decorator runs + for i, addr := range addrs { + pk, err := suite.app.AccountKeeper.GetPubKey(ctx, addr) + require.NoError(err, "Error on retrieving pubkey from account") + require.True(pubs[i].Equals(pk), + "Wrong Pubkey retrieved from AccountKeeper, idx=%d\nexpected=%s\n got=%s", i, pubs[i], pk) + } +} + +func (suite *AnteTestSuite) TestConsumeSignatureVerificationGas() { + params := types.DefaultParams() + msg := []byte{1, 2, 3, 4} + cdc := simapp.MakeTestEncodingConfig().Amino + + p := types.DefaultParams() + skR1, _ := secp256r1.GenPrivKey() + pkSet1, sigSet1 := generatePubKeysAndSignatures(5, msg, false) + multisigKey1 := kmultisig.NewLegacyAminoPubKey(2, pkSet1) + multisignature1 := multisig.NewMultisig(len(pkSet1)) + expectedCost1 := expectedGasCostByKeys(pkSet1) + for i := 0; i < len(pkSet1); i++ { + stdSig := legacytx.StdSignature{PubKey: pkSet1[i], Signature: sigSet1[i]} + sigV2, err := legacytx.StdSignatureToSignatureV2(cdc, stdSig) + suite.Require().NoError(err) + err = multisig.AddSignatureV2(multisignature1, sigV2, pkSet1) + suite.Require().NoError(err) + } + + type args struct { + meter sdk.GasMeter + sig signing.SignatureData + pubkey cryptotypes.PubKey + params types.Params + } + tests := []struct { + name string + args args + gasConsumed uint64 + shouldErr bool + }{ + {"PubKeyEd25519", args{sdk.NewInfiniteGasMeter(), nil, ed25519.GenPrivKey().PubKey(), params}, p.SigVerifyCostED25519, true}, + {"PubKeySecp256k1", args{sdk.NewInfiniteGasMeter(), nil, secp256k1.GenPrivKey().PubKey(), params}, p.SigVerifyCostSecp256k1, false}, + {"PubKeySecp256r1", args{sdk.NewInfiniteGasMeter(), nil, skR1.PubKey(), params}, p.SigVerifyCostSecp256r1(), false}, + {"Multisig", args{sdk.NewInfiniteGasMeter(), multisignature1, multisigKey1, params}, expectedCost1, false}, + {"unknown key", args{sdk.NewInfiniteGasMeter(), nil, nil, params}, 0, true}, + } + for _, tt := range tests { + sigV2 := signing.SignatureV2{ + PubKey: tt.args.pubkey, + Data: tt.args.sig, + Sequence: 0, // Arbitrary account sequence + } + err := ante.DefaultSigVerificationGasConsumer(tt.args.meter, sigV2, tt.args.params) + + if tt.shouldErr { + suite.Require().NotNil(err) + } else { + suite.Require().Nil(err) + suite.Require().Equal(tt.gasConsumed, tt.args.meter.GasConsumed(), fmt.Sprintf("%d != %d", tt.gasConsumed, tt.args.meter.GasConsumed())) + } + } +} + +func (suite *AnteTestSuite) TestSigVerification() { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // make block height non-zero to ensure account numbers part of signBytes + suite.ctx = suite.ctx.WithBlockHeight(1) + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + priv2, _, addr2 := testdata.KeyTestPubAddr() + priv3, _, addr3 := testdata.KeyTestPubAddr() + + addrs := []sdk.AccAddress{addr1, addr2, addr3} + + msgs := make([]sdk.Msg, len(addrs)) + // set accounts and create msg for each address + for i, addr := range addrs { + acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.Require().NoError(acc.SetAccountNumber(uint64(i))) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc) + msgs[i] = testdata.NewTestMsg(addr) + } + + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + + spkd := ante.NewSetPubKeyDecorator(suite.app.AccountKeeper) + svd := ante.NewSigVerificationDecorator(suite.app.AccountKeeper, suite.clientCtx.TxConfig.SignModeHandler()) + antehandler := sdk.ChainAnteDecorators(spkd, svd) + + type testCase struct { + name string + privs []cryptotypes.PrivKey + accNums []uint64 + accSeqs []uint64 + invalidSigs bool + recheck bool + shouldErr bool + } + validSigs := false + testCases := []testCase{ + {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, validSigs, false, true}, + {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, validSigs, false, true}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, validSigs, false, true}, + {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, validSigs, false, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, validSigs, false, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, validSigs, false, false}, + {"no err on recheck", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 0, 0}, []uint64{0, 0, 0}, !validSigs, true, false}, + } + for i, tc := range testCases { + suite.ctx = suite.ctx.WithIsReCheckTx(tc.recheck) + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() // Create new txBuilder for each test + + suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + tx, err := suite.CreateTestTx(tc.privs, tc.accNums, tc.accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + if tc.invalidSigs { + txSigs, _ := tx.GetSignaturesV2() + badSig, _ := tc.privs[0].Sign([]byte("unrelated message")) + txSigs[0] = signing.SignatureV2{ + PubKey: tc.privs[0].PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + Signature: badSig, + }, + Sequence: tc.accSeqs[0], + } + suite.txBuilder.SetSignatures(txSigs...) + tx = suite.txBuilder.GetTx() + } + + _, err = antehandler(suite.ctx, tx, false) + if tc.shouldErr { + suite.Require().NotNil(err, "TestCase %d: %s did not error as expected", i, tc.name) + } else { + suite.Require().Nil(err, "TestCase %d: %s errored unexpectedly. Err: %v", i, tc.name, err) + } + } +} + +// This test is exactly like the one above, but we set the codec explicitly to +// Amino. +// Once https://github.com/cosmos/cosmos-sdk/issues/6190 is in, we can remove +// this, since it'll be handled by the test matrix. +// In the meantime, we want to make double-sure amino compatibility works. +// ref: https://github.com/cosmos/cosmos-sdk/issues/7229 +func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { + suite.app, suite.ctx = createTestApp(suite.T(), true) + suite.ctx = suite.ctx.WithBlockHeight(1) + + // Set up TxConfig. + aminoCdc := codec.NewLegacyAmino() + // We're using TestMsg amino encoding in some tests, so register it here. + txConfig := legacytx.StdTxConfig{Cdc: aminoCdc} + + suite.clientCtx = client.Context{}. + WithTxConfig(txConfig) + + anteHandler, err := ante.NewAnteHandler( + ante.HandlerOptions{ + AccountKeeper: suite.app.AccountKeeper, + BankKeeper: suite.app.BankKeeper, + FeegrantKeeper: suite.app.FeeGrantKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + ) + + suite.Require().NoError(err) + suite.anteHandler = anteHandler + + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // make block height non-zero to ensure account numbers part of signBytes + suite.ctx = suite.ctx.WithBlockHeight(1) + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + priv2, _, addr2 := testdata.KeyTestPubAddr() + priv3, _, addr3 := testdata.KeyTestPubAddr() + + addrs := []sdk.AccAddress{addr1, addr2, addr3} + + msgs := make([]sdk.Msg, len(addrs)) + // set accounts and create msg for each address + for i, addr := range addrs { + acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.Require().NoError(acc.SetAccountNumber(uint64(i))) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc) + msgs[i] = testdata.NewTestMsg(addr) + } + + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + + spkd := ante.NewSetPubKeyDecorator(suite.app.AccountKeeper) + svd := ante.NewSigVerificationDecorator(suite.app.AccountKeeper, suite.clientCtx.TxConfig.SignModeHandler()) + antehandler := sdk.ChainAnteDecorators(spkd, svd) + + type testCase struct { + name string + privs []cryptotypes.PrivKey + accNums []uint64 + accSeqs []uint64 + recheck bool + shouldErr bool + } + testCases := []testCase{ + {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, + {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, + {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, + {"no err on recheck", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, true, false}, + } + for i, tc := range testCases { + suite.ctx = suite.ctx.WithIsReCheckTx(tc.recheck) + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() // Create new txBuilder for each test + + suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + tx, err := suite.CreateTestTx(tc.privs, tc.accNums, tc.accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + _, err = antehandler(suite.ctx, tx, false) + if tc.shouldErr { + suite.Require().NotNil(err, "TestCase %d: %s did not error as expected", i, tc.name) + } else { + suite.Require().Nil(err, "TestCase %d: %s errored unexpectedly. Err: %v", i, tc.name, err) + } + } +} + +func (suite *AnteTestSuite) TestSigIntegration() { + // generate private keys + privs := []cryptotypes.PrivKey{ + secp256k1.GenPrivKey(), + secp256k1.GenPrivKey(), + secp256k1.GenPrivKey(), + } + + params := types.DefaultParams() + initialSigCost := params.SigVerifyCostSecp256k1 + initialCost, err := suite.runSigDecorators(params, false, privs...) + suite.Require().Nil(err) + + params.SigVerifyCostSecp256k1 *= 2 + doubleCost, err := suite.runSigDecorators(params, false, privs...) + suite.Require().Nil(err) + + suite.Require().Equal(initialSigCost*uint64(len(privs)), doubleCost-initialCost) +} + +func (suite *AnteTestSuite) runSigDecorators(params types.Params, _ bool, privs ...cryptotypes.PrivKey) (sdk.Gas, error) { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + // Make block-height non-zero to include accNum in SignBytes + suite.ctx = suite.ctx.WithBlockHeight(1) + suite.app.AccountKeeper.SetParams(suite.ctx, params) + + msgs := make([]sdk.Msg, len(privs)) + accNums := make([]uint64, len(privs)) + accSeqs := make([]uint64, len(privs)) + // set accounts and create msg for each address + for i, priv := range privs { + addr := sdk.AccAddress(priv.PubKey().Address()) + acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.Require().NoError(acc.SetAccountNumber(uint64(i))) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc) + msgs[i] = testdata.NewTestMsg(addr) + accNums[i] = uint64(i) + accSeqs[i] = uint64(0) + } + suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) + + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + spkd := ante.NewSetPubKeyDecorator(suite.app.AccountKeeper) + svgc := ante.NewSigGasConsumeDecorator(suite.app.AccountKeeper, ante.DefaultSigVerificationGasConsumer) + svd := ante.NewSigVerificationDecorator(suite.app.AccountKeeper, suite.clientCtx.TxConfig.SignModeHandler()) + antehandler := sdk.ChainAnteDecorators(spkd, svgc, svd) + + // Determine gas consumption of antehandler with default params + before := suite.ctx.GasMeter().GasConsumed() + ctx, err := antehandler(suite.ctx, tx, false) + after := ctx.GasMeter().GasConsumed() + + return after - before, err +} + +func (suite *AnteTestSuite) TestIncrementSequenceDecorator() { + suite.SetupTest(true) // setup + suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() + + priv, _, addr := testdata.KeyTestPubAddr() + acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.Require().NoError(acc.SetAccountNumber(uint64(50))) + suite.app.AccountKeeper.SetAccount(suite.ctx, acc) + + msgs := []sdk.Msg{testdata.NewTestMsg(addr)} + suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) + privs := []cryptotypes.PrivKey{priv} + accNums := []uint64{suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetAccountNumber()} + accSeqs := []uint64{suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetSequence()} + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + suite.txBuilder.SetFeeAmount(feeAmount) + suite.txBuilder.SetGasLimit(gasLimit) + + tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + suite.Require().NoError(err) + + isd := ante.NewIncrementSequenceDecorator(suite.app.AccountKeeper) + antehandler := sdk.ChainAnteDecorators(isd) + + testCases := []struct { + ctx sdk.Context + simulate bool + expectedSeq uint64 + }{ + {suite.ctx.WithIsReCheckTx(true), false, 1}, + {suite.ctx.WithIsCheckTx(true).WithIsReCheckTx(false), false, 2}, + {suite.ctx.WithIsReCheckTx(true), false, 3}, + {suite.ctx.WithIsReCheckTx(true), false, 4}, + {suite.ctx.WithIsReCheckTx(true), true, 5}, + } + + for i, tc := range testCases { + _, err := antehandler(tc.ctx, tx, tc.simulate) + suite.Require().NoError(err, "unexpected error; tc #%d, %v", i, tc) + suite.Require().Equal(tc.expectedSeq, suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetSequence()) + } +} diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go new file mode 100644 index 000000000000..62e577b6a8f1 --- /dev/null +++ b/x/auth/ante/testutil_test.go @@ -0,0 +1,199 @@ +package ante_test + +import ( + "errors" + "fmt" + "testing" + + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/tx" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +) + +// TestAccount represents an account used in the tests in x/auth/ante. +type TestAccount struct { + acc types.AccountI + priv cryptotypes.PrivKey +} + +// AnteTestSuite is a test suite to be used with ante handler tests. +type AnteTestSuite struct { + suite.Suite + + app *simapp.SimApp + anteHandler sdk.AnteHandler + ctx sdk.Context + clientCtx client.Context + txBuilder client.TxBuilder +} + +// returns context and app with params set on account keeper +func createTestApp(t *testing.T, isCheckTx bool) (*simapp.SimApp, sdk.Context) { + app := simapp.Setup(t, isCheckTx) + ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) + app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) + + return app, ctx +} + +func TestAnteTestSuite(t *testing.T) { + suite.Run(t, new(AnteTestSuite)) +} + +// SetupTest setups a new test, with new app, context, and anteHandler. +func (s *AnteTestSuite) SetupTest(isCheckTx bool) { + s.app, s.ctx = createTestApp(s.T(), isCheckTx) + s.ctx = s.ctx.WithBlockHeight(1) + + // Set up TxConfig. + encodingConfig := simapp.MakeTestEncodingConfig() + // We're using TestMsg encoding in some tests, so register it here. + encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) + testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry) + + s.clientCtx = client.Context{}. + WithTxConfig(encodingConfig.TxConfig) + + anteHandler, err := ante.NewAnteHandler( + ante.HandlerOptions{ + AccountKeeper: s.app.AccountKeeper, + BankKeeper: s.app.BankKeeper, + FeegrantKeeper: s.app.FeeGrantKeeper, + SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + ) + + s.Require().NoError(err) + s.anteHandler = anteHandler +} + +// CreateTestAccounts creates `numAccs` accounts, and return all relevant +// information about them including their private keys. +func (s *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount { + var accounts []TestAccount + + for i := 0; i < numAccs; i++ { + priv, _, addr := testdata.KeyTestPubAddr() + acc := s.app.AccountKeeper.NewAccountWithAddress(s.ctx, addr) + err := acc.SetAccountNumber(uint64(i)) + s.Require().NoError(err) + s.app.AccountKeeper.SetAccount(s.ctx, acc) + someCoins := sdk.Coins{ + sdk.NewInt64Coin("atom", 10000000), + } + err = s.app.BankKeeper.MintCoins(s.ctx, minttypes.ModuleName, someCoins) + s.Require().NoError(err) + + err = s.app.BankKeeper.SendCoinsFromModuleToAccount(s.ctx, minttypes.ModuleName, addr, someCoins) + s.Require().NoError(err) + + accounts = append(accounts, TestAccount{acc, priv}) + } + + return accounts +} + +// CreateTestTx is a helper function to create a tx given multiple inputs. +func (s *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { + // First round: we gather all the signer infos. We use the "set empty + // signature" hack to do that. + var sigsV2 []signing.SignatureV2 + for i, priv := range privs { + sigV2 := signing.SignatureV2{ + PubKey: priv.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: accSeqs[i], + } + + sigsV2 = append(sigsV2, sigV2) + } + err := s.txBuilder.SetSignatures(sigsV2...) + if err != nil { + return nil, err + } + + // Second round: all signer infos are set, so each signer can sign. + sigsV2 = []signing.SignatureV2{} + for i, priv := range privs { + signerData := xauthsigning.SignerData{ + ChainID: chainID, + AccountNumber: accNums[i], + Sequence: accSeqs[i], + } + sigV2, err := tx.SignWithPrivKey( + s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData, + s.txBuilder, priv, s.clientCtx.TxConfig, accSeqs[i]) + if err != nil { + return nil, err + } + + sigsV2 = append(sigsV2, sigV2) + } + err = s.txBuilder.SetSignatures(sigsV2...) + if err != nil { + return nil, err + } + + return s.txBuilder.GetTx(), nil +} + +// TestCase represents a test case used in test tables. +type TestCase struct { + desc string + malleate func() + simulate bool + expPass bool + expErr error +} + +// CreateTestTx is a helper function to create a tx given multiple inputs. +func (s *AnteTestSuite) RunTestCase(privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, accNums, accSeqs []uint64, chainID string, tc TestCase) { + s.Run(fmt.Sprintf("Case %s", tc.desc), func() { + s.Require().NoError(s.txBuilder.SetMsgs(msgs...)) + s.txBuilder.SetFeeAmount(feeAmount) + s.txBuilder.SetGasLimit(gasLimit) + + // Theoretically speaking, ante handler unit tests should only test + // ante handlers, but here we sometimes also test the tx creation + // process. + tx, txErr := s.CreateTestTx(privs, accNums, accSeqs, chainID) + newCtx, anteErr := s.anteHandler(s.ctx, tx, tc.simulate) + + if tc.expPass { + s.Require().NoError(txErr) + s.Require().NoError(anteErr) + s.Require().NotNil(newCtx) + + s.ctx = newCtx + } else { + switch { + case txErr != nil: + s.Require().Error(txErr) + s.Require().True(errors.Is(txErr, tc.expErr)) + + case anteErr != nil: + s.Require().Error(anteErr) + s.Require().True(errors.Is(anteErr, tc.expErr)) + + default: + s.Fail("expected one of txErr,anteErr to be an error") + } + } + }) +} diff --git a/x/auth/middleware/validator_tx_fee.go b/x/auth/ante/validator_tx_fee.go similarity index 59% rename from x/auth/middleware/validator_tx_fee.go rename to x/auth/ante/validator_tx_fee.go index 687608da55a9..b1725d62ddc0 100644 --- a/x/auth/middleware/validator_tx_fee.go +++ b/x/auth/ante/validator_tx_fee.go @@ -1,4 +1,4 @@ -package middleware +package ante import ( "math" @@ -19,21 +19,24 @@ func checkTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, gas := feeTx.GetGas() // Ensure that the provided fees meet a minimum threshold for the validator, - // This is only for local mempool purposes, if this is a DeliverTx, the `MinGasPrices` should be zero. - minGasPrices := ctx.MinGasPrices() - if !minGasPrices.IsZero() { - requiredFees := make(sdk.Coins, len(minGasPrices)) - - // Determine the required fees by multiplying each required minimum gas - // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). - glDec := sdk.NewDec(int64(gas)) - for i, gp := range minGasPrices { - fee := gp.Amount.Mul(glDec) - requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) - } - - if !feeCoins.IsAnyGTE(requiredFees) { - return nil, 0, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, requiredFees) + // if this is a CheckTx. This is only for local mempool purposes, and thus + // is only ran on check tx. + if ctx.IsCheckTx() { + minGasPrices := ctx.MinGasPrices() + if !minGasPrices.IsZero() { + requiredFees := make(sdk.Coins, len(minGasPrices)) + + // Determine the required fees by multiplying each required minimum gas + // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). + glDec := sdk.NewDec(int64(gas)) + for i, gp := range minGasPrices { + fee := gp.Amount.Mul(glDec) + requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) + } + + if !feeCoins.IsAnyGTE(requiredFees) { + return nil, 0, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, requiredFees) + } } } diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 41fd652dc86b..c3eda5b2d03e 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -3,6 +3,7 @@ package cli import ( "context" "fmt" + "strconv" "strings" "github.com/spf13/cobra" @@ -41,6 +42,7 @@ func GetQueryCmd() *cobra.Command { cmd.AddCommand( GetAccountCmd(), + GetAccountAddressByIDCmd(), GetAccountsCmd(), QueryParamsCmd(), QueryModuleAccountsCmd(), @@ -124,6 +126,39 @@ func GetAccountCmd() *cobra.Command { return cmd } +// GetAccountAddressByIDCmd returns a query account that will display the account address of a given account id. +func GetAccountAddressByIDCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "address-by-id [id]", + Short: "Query for account address by account id", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf("%s q auth address-by-id 1", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{Id: id}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetAccountsCmd returns a query command that will display a list of accounts func GetAccountsCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/auth/client/cli/tx_multisign.go b/x/auth/client/cli/tx_multisign.go index 3a3334334001..48c819cb8eab 100644 --- a/x/auth/client/cli/tx_multisign.go +++ b/x/auth/client/cli/tx_multisign.go @@ -139,7 +139,7 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { err = signing.VerifySignature(sig.PubKey, signingData, sig.Data, txCfg.SignModeHandler(), txBuilder.GetTx()) if err != nil { - addr, _ := sdk.AccAddressFromHex(sig.PubKey.Address().String()) + addr, _ := sdk.AccAddressFromHexUnsafe(sig.PubKey.Address().String()) return fmt.Errorf("couldn't verify signature for address %s", addr) } @@ -192,7 +192,7 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { return } - fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) + fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o644) if err != nil { return err } @@ -259,7 +259,7 @@ func makeBatchMultisignCmd() func(cmd *cobra.Command, args []string) error { txFactory = txFactory.WithSignMode(signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) } - var infile = os.Stdin + infile := os.Stdin if args[0] != "-" { infile, err = os.Open(args[0]) defer func() { diff --git a/x/auth/client/cli/tx_sign.go b/x/auth/client/cli/tx_sign.go index fd32d96767fe..39626e5ed1ac 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -54,9 +54,10 @@ account key. It implies --signature-only. cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT") cmd.Flags().Bool(flagSigOnly, true, "Print only the generated signature, then exit") cmd.Flags().String(flags.FlagChainID, "", "network chain ID") - cmd.MarkFlagRequired(flags.FlagFrom) flags.AddTxFlagsToCmd(cmd) + cmd.MarkFlagRequired(flags.FlagFrom) + return cmd } @@ -106,7 +107,7 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error { } if ms == "" { from, _ := cmd.Flags().GetString(flags.FlagFrom) - _, fromName, _, err := client.GetFromFields(txFactory.Keybase(), from, clientCtx.GenerateOnly) + _, fromName, _, err := client.GetFromFields(clientCtx, txFactory.Keybase(), from) if err != nil { return fmt.Errorf("error getting account from keybase: %w", err) } @@ -115,7 +116,7 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error { return err } } else { - multisigAddr, _, _, err := client.GetFromFields(txFactory.Keybase(), ms, clientCtx.GenerateOnly) + multisigAddr, _, _, err := client.GetFromFields(clientCtx, txFactory.Keybase(), ms) if err != nil { return fmt.Errorf("error getting account from keybase: %w", err) } @@ -152,7 +153,7 @@ func setOutputFile(cmd *cobra.Command) (func(), error) { return func() {}, nil } - fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) + fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o644) if err != nil { return func() {}, err } @@ -192,9 +193,10 @@ be generated via the 'multisign' command. cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT") cmd.Flags().String(flags.FlagChainID, "", "The network chain ID") cmd.Flags().Bool(flagAmino, false, "Generate Amino encoded JSON suitable for submiting to the txs REST endpoint") - cmd.MarkFlagRequired(flags.FlagFrom) flags.AddTxFlagsToCmd(cmd) + cmd.MarkFlagRequired(flags.FlagFrom) + return cmd } @@ -235,7 +237,7 @@ func makeSignCmd() func(cmd *cobra.Command, args []string) error { return err } from, _ := cmd.Flags().GetString(flags.FlagFrom) - _, fromName, _, err := client.GetFromFields(txF.Keybase(), from, clientCtx.GenerateOnly) + _, fromName, _, err := client.GetFromFields(clientCtx, txF.Keybase(), from) if err != nil { return fmt.Errorf("error getting account from keybase: %w", err) } @@ -245,7 +247,7 @@ func makeSignCmd() func(cmd *cobra.Command, args []string) error { multisigAddr, err := sdk.AccAddressFromBech32(multisig) if err != nil { // Bech32 decode error, maybe it's a name, we try to fetch from keyring - multisigAddr, _, _, err = client.GetFromFields(txFactory.Keybase(), multisig, clientCtx.GenerateOnly) + multisigAddr, _, _, err = client.GetFromFields(clientCtx, txFactory.Keybase(), multisig) if err != nil { return fmt.Errorf("error getting account from keybase: %w", err) } @@ -300,7 +302,7 @@ func makeSignCmd() func(cmd *cobra.Command, args []string) error { return nil } - fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) + fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o644) if err != nil { return err } diff --git a/x/auth/client/testutil/cli_test.go b/x/auth/client/testutil/cli_test.go index 0a7a5cc25871..f23e88847c30 100644 --- a/x/auth/client/testutil/cli_test.go +++ b/x/auth/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/auth/client/testutil/suite.go b/x/auth/client/testutil/suite.go index 71f28f47f67b..e6cb30d02ac7 100644 --- a/x/auth/client/testutil/suite.go +++ b/x/auth/client/testutil/suite.go @@ -29,6 +29,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + "github.com/cosmos/cosmos-sdk/x/auth/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli" bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" @@ -231,7 +232,7 @@ func (s *IntegrationTestSuite) TestCLISignGenOnly() { func (s *IntegrationTestSuite) TestCLISignBatch() { val := s.network.Validators[0] - var sendTokens = sdk.NewCoins( + sendTokens := sdk.NewCoins( sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), ) @@ -280,11 +281,55 @@ func (s *IntegrationTestSuite) TestCLISignBatch() { s.Require().Error(err) } +func (s *IntegrationTestSuite) TestCliGetAccountAddressByID() { + require := s.Require() + val1 := s.network.Validators[0] + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "not enough args", + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + }, + { + "invalid account id", + []string{fmt.Sprint(-1), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + }, + { + "valid account id", + []string{fmt.Sprint(0), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.GetAccountAddressByIDCmd() + clientCtx := val1.ClientCtx + + queryResJSON, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + var res types.QueryAccountAddressByIDResponse + require.NoError(val1.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &res)) + require.NotNil(res.GetAccountAddress()) + } + }) + } +} + func (s *IntegrationTestSuite) TestCLISignAminoJSON() { require := s.Require() val1 := s.network.Validators[0] txCfg := val1.ClientCtx.TxConfig - var sendTokens = sdk.NewCoins( + sendTokens := sdk.NewCoins( sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)), sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), ) @@ -599,7 +644,6 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { name string args []string expectEmpty bool - expectError string }{ { "fee event happy case", @@ -609,8 +653,6 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, - "transaction spanned more than two shares, this is not yet supported", - // TODO: change this to not expect an error when functionality is added to celestia-core }, { "no matching fee event", @@ -620,7 +662,6 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, - "", }, } @@ -631,10 +672,6 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectError != "" { - s.Require().Equal(tc.expectError, err.Error()) - return - } s.Require().NoError(err) var result sdk.SearchTxsResult @@ -925,7 +962,7 @@ func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() { err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) s.Require().NoError(err) - diff, _ := balRes.Balances.SafeSub(intialCoins) + diff, _ := balRes.Balances.SafeSub(intialCoins...) s.Require().Equal(sendTokens.Amount, diff.AmountOf(s.cfg.BondDenom)) // Generate multisig transaction. @@ -1569,7 +1606,10 @@ func (s *IntegrationTestSuite) TestAuxSigner() { } } -func (s *IntegrationTestSuite) TestAuxToFee() { +func (s *IntegrationTestSuite) TestAuxToFeeWithTips() { + // Skipping this test as it needs a simapp with the TipDecorator in post handler. + s.T().Skip() + require := s.Require() val := s.network.Validators[0] @@ -1585,13 +1625,13 @@ func (s *IntegrationTestSuite) TestAuxToFee() { fee := sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1000)) tip := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(1000)) - s.Require().NoError(s.network.WaitForNextBlock()) + require.NoError(s.network.WaitForNextBlock()) _, err = s.createBankMsg(val, tipper, sdk.NewCoins(tipperInitialBal)) require.NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) + require.NoError(s.network.WaitForNextBlock()) bal := s.getBalances(val.ClientCtx, tipper, tip.Denom) - s.Require().True(bal.Equal(tipperInitialBal.Amount)) + require.True(bal.Equal(tipperInitialBal.Amount)) testCases := []struct { name string @@ -1604,24 +1644,6 @@ func (s *IntegrationTestSuite) TestAuxToFee() { tipperArgs []string feePayerArgs []string }{ - { - name: "when --aux and --sign-mode = direct set: error", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - expectErrAux: true, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, { name: "when --aux and --sign-mode = direct set: error", tipper: tipper, @@ -1760,7 +1782,7 @@ func (s *IntegrationTestSuite) TestAuxToFee() { feePayerArgs: []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), }, @@ -1817,21 +1839,21 @@ func (s *IntegrationTestSuite) TestAuxToFee() { require.NoError(err) var txRes sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) + require.NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) require.Contains(txRes.RawLog, tc.errMsg) } else { require.NoError(err) var txRes sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) + require.NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) - s.Require().Equal(uint32(0), txRes.Code) - s.Require().NotNil(int64(0), txRes.Height) + require.Equal(uint32(0), txRes.Code) + require.NotNil(int64(0), txRes.Height) bal = s.getBalances(val.ClientCtx, tipper, tc.tip.Denom) tipperInitialBal = tipperInitialBal.Sub(tc.tip) - s.Require().True(bal.Equal(tipperInitialBal.Amount)) + require.True(bal.Equal(tipperInitialBal.Amount)) } } }) @@ -1839,7 +1861,8 @@ func (s *IntegrationTestSuite) TestAuxToFee() { } func (s *IntegrationTestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddress, amount sdk.Coins, extraFlags ...string) (testutil.BufferWriter, error) { - flags := []string{fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + flags := []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), diff --git a/x/auth/client/tx.go b/x/auth/client/tx.go index a57f28d3d956..38203299de87 100644 --- a/x/auth/client/tx.go +++ b/x/auth/client/tx.go @@ -68,7 +68,8 @@ func SignTx(txFactory tx.Factory, clientCtx client.Context, name string, txBuild // This function should only be used when signing with a multisig. For // normal keys, please use SignTx directly. func SignTxWithSignerAddress(txFactory tx.Factory, clientCtx client.Context, addr sdk.AccAddress, - name string, txBuilder client.TxBuilder, offline, overwrite bool) (err error) { + name string, txBuilder client.TxBuilder, offline, overwrite bool, +) (err error) { // Multisigs only support LEGACY_AMINO_JSON signing. if txFactory.SignMode() == signing.SignMode_SIGN_MODE_UNSPECIFIED { txFactory = txFactory.WithSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) @@ -145,7 +146,6 @@ func (bs *BatchScanner) Scan() bool { func populateAccountFromState( txBldr tx.Factory, clientCtx client.Context, addr sdk.AccAddress, ) (tx.Factory, error) { - num, seq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, addr) if err != nil { return txBldr, err diff --git a/x/auth/client/tx_test.go b/x/auth/client/tx_test.go index fc52206d6e07..4934e0febc91 100644 --- a/x/auth/client/tx_test.go +++ b/x/auth/client/tx_test.go @@ -149,7 +149,7 @@ func compareEncoders(t *testing.T, expected sdk.TxEncoder, actual sdk.TxEncoder) } func makeCodec() *codec.LegacyAmino { - var cdc = codec.NewLegacyAmino() + cdc := codec.NewLegacyAmino() sdk.RegisterLegacyAminoCodec(cdc) cryptocodec.RegisterCrypto(cdc) authtypes.RegisterLegacyAminoCodec(cdc) diff --git a/x/auth/keeper/account.go b/x/auth/keeper/account.go index 7474e93a5469..a18a5240dce8 100644 --- a/x/auth/keeper/account.go +++ b/x/auth/keeper/account.go @@ -31,6 +31,12 @@ func (ak AccountKeeper) HasAccount(ctx sdk.Context, addr sdk.AccAddress) bool { return store.Has(types.AddressStoreKey(addr)) } +// HasAccountAddressByID checks account address exists by id. +func (ak AccountKeeper) HasAccountAddressByID(ctx sdk.Context, id uint64) bool { + store := ctx.KVStore(ak.key) + return store.Has(types.AccountNumberStoreKey(id)) +} + // GetAccount implements AccountKeeperI. func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI { store := ctx.KVStore(ak.key) @@ -42,6 +48,16 @@ func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.A return ak.decodeAccount(bz) } +// GetAccountAddressById returns account address by id. +func (ak AccountKeeper) GetAccountAddressByID(ctx sdk.Context, id uint64) string { + store := ctx.KVStore(ak.key) + bz := store.Get(types.AccountNumberStoreKey(id)) + if bz == nil { + return "" + } + return sdk.AccAddress(bz).String() +} + // GetAllAccounts returns all accounts in the accountKeeper. func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []types.AccountI) { ak.IterateAccounts(ctx, func(acc types.AccountI) (stop bool) { @@ -63,6 +79,7 @@ func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc types.AccountI) { } store.Set(types.AddressStoreKey(addr), bz) + store.Set(types.AccountNumberStoreKey(acc.GetAccountNumber()), addr.Bytes()) } // RemoveAccount removes an account for the account mapper store. @@ -71,6 +88,7 @@ func (ak AccountKeeper) RemoveAccount(ctx sdk.Context, acc types.AccountI) { addr := acc.GetAddress() store := ctx.KVStore(ak.key) store.Delete(types.AddressStoreKey(addr)) + store.Delete(types.AccountNumberStoreKey(acc.GetAccountNumber())) } // IterateAccounts iterates over all the stored accounts and performs a callback function. diff --git a/x/auth/genesis.go b/x/auth/keeper/genesis.go similarity index 81% rename from x/auth/genesis.go rename to x/auth/keeper/genesis.go index 851b588083d4..50d36381fd6f 100644 --- a/x/auth/genesis.go +++ b/x/auth/keeper/genesis.go @@ -1,8 +1,7 @@ -package auth +package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -10,7 +9,7 @@ import ( // // CONTRACT: old coins from the FeeCollectionKeeper need to be transferred through // a genesis port script to the new fee collector account -func InitGenesis(ctx sdk.Context, ak keeper.AccountKeeper, data types.GenesisState) { +func (ak AccountKeeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { ak.SetParams(ctx, data.Params) accounts, err := types.UnpackAccounts(data.Accounts) @@ -28,7 +27,7 @@ func InitGenesis(ctx sdk.Context, ak keeper.AccountKeeper, data types.GenesisSta } // ExportGenesis returns a GenesisState for a given context and keeper -func ExportGenesis(ctx sdk.Context, ak keeper.AccountKeeper) *types.GenesisState { +func (ak AccountKeeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { params := ak.GetParams(ctx) var genAccounts types.GenesisAccounts diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index a18de05d0730..9d37a4ecc9f6 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -3,6 +3,7 @@ package keeper import ( "context" "errors" + "sort" "strings" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -18,6 +19,24 @@ import ( var _ types.QueryServer = AccountKeeper{} +func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if req.Id < 0 { + return nil, status.Error(codes.InvalidArgument, "Invalid account id") + } + + ctx := sdk.UnwrapSDKContext(c) + address := ak.GetAccountAddressByID(ctx, uint64(req.GetId())) + if len(address) == 0 { + return nil, status.Errorf(codes.NotFound, "account address not found with id %d", req.Id) + } + + return &types.QueryAccountAddressByIDResponse{AccountAddress: address}, nil +} + func (ak AccountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") @@ -38,7 +57,6 @@ func (ak AccountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequ accounts = append(accounts, any) return nil }) - if err != nil { return nil, status.Errorf(codes.Internal, "paginate: %v", err) } @@ -58,7 +76,6 @@ func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountReques ctx := sdk.UnwrapSDKContext(c) addr, err := sdk.AccAddressFromBech32(req.Address) - if err != nil { return nil, err } @@ -94,9 +111,16 @@ func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModule ctx := sdk.UnwrapSDKContext(c) + // For deterministic output, sort the permAddrs by module name. + sortedPermAddrs := make([]string, 0, len(ak.permAddrs)) + for moduleName := range ak.permAddrs { + sortedPermAddrs = append(sortedPermAddrs, moduleName) + } + sort.Strings(sortedPermAddrs) + modAccounts := make([]*codectypes.Any, 0, len(ak.permAddrs)) - for moduleName := range ak.permAddrs { + for _, moduleName := range sortedPermAddrs { account := ak.GetModuleAccount(ctx, moduleName) if account == nil { return nil, status.Errorf(codes.NotFound, "account %s not found", moduleName) @@ -111,6 +135,7 @@ func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModule return &types.QueryModuleAccountsResponse{Accounts: modAccounts}, 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() if err != nil { @@ -120,6 +145,8 @@ func (ak AccountKeeper) Bech32Prefix(ctx context.Context, req *types.Bech32Prefi return &types.Bech32PrefixResponse{Bech32Prefix: bech32Prefix}, nil } +// AddressBytesToString converts an address from bytes to string, using the +// keeper's bech32 prefix. func (ak AccountKeeper) AddressBytesToString(ctx context.Context, req *types.AddressBytesToStringRequest) (*types.AddressBytesToStringResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") @@ -137,6 +164,8 @@ func (ak AccountKeeper) AddressBytesToString(ctx context.Context, req *types.Add return &types.AddressBytesToStringResponse{AddressString: text}, nil } +// AddressStringToBytes converts an address from string to bytes, using the +// keeper's bech32 prefix. func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.AddressStringToBytesRequest) (*types.AddressStringToBytesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 9052873d94ae..2b99a257aa1e 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -1,9 +1,11 @@ package keeper_test import ( - "fmt" - "context" "bytes" + "context" + "fmt" + "math" + "sort" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,12 +13,11 @@ import ( ) const addrStr = "cosmos13c3d4wq2t22dl0dstraf8jc3f902e3fsy9n3wv" + var addrBytes = []byte{0x8e, 0x22, 0xda, 0xb8, 0xa, 0x5a, 0x94, 0xdf, 0xbd, 0xb0, 0x58, 0xfa, 0x93, 0xcb, 0x11, 0x49, 0x5e, 0xac, 0xc5, 0x30} func (suite *KeeperTestSuite) TestGRPCQueryAccounts() { - var ( - req *types.QueryAccountsRequest - ) + var req *types.QueryAccountsRequest _, _, first := testdata.KeyTestPubAddr() _, _, second := testdata.KeyTestPubAddr() @@ -72,9 +73,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccounts() { } func (suite *KeeperTestSuite) TestGRPCQueryAccount() { - var ( - req *types.QueryAccountRequest - ) + var req *types.QueryAccountRequest _, _, addr := testdata.KeyTestPubAddr() testCases := []struct { @@ -155,6 +154,68 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccount() { } } +func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { + var req *types.QueryAccountAddressByIDRequest + _, _, addr := testdata.KeyTestPubAddr() + + testCases := []struct { + msg string + malleate func() + expPass bool + posttests func(res *types.QueryAccountAddressByIDResponse) + }{ + { + "invalid request", + func() { + req = &types.QueryAccountAddressByIDRequest{Id: -1} + }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, + }, + { + "account address not found", + func() { + req = &types.QueryAccountAddressByIDRequest{Id: math.MaxInt64} + }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, + }, + { + "valid request", + func() { + account := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.app.AccountKeeper.SetAccount(suite.ctx, account) + req = &types.QueryAccountAddressByIDRequest{Id: int64(account.GetAccountNumber())} + }, + true, + func(res *types.QueryAccountAddressByIDResponse) { + suite.Require().NotNil(res.AccountAddress) + }, + }, + } + + 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.AccountAddressByID(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) TestGRPCQueryParameters() { var ( req *types.QueryParamsRequest @@ -198,9 +259,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryParameters() { } func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { - var ( - req *types.QueryModuleAccountsRequest - ) + var req *types.QueryModuleAccountsRequest testCases := []struct { msg string @@ -215,7 +274,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { }, true, func(res *types.QueryModuleAccountsResponse) { - var mintModuleExists = false + mintModuleExists := false for _, acc := range res.Accounts { var account types.AccountI err := suite.app.InterfaceRegistry().UnpackAny(acc, &account) @@ -238,7 +297,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { }, true, func(res *types.QueryModuleAccountsResponse) { - var mintModuleExists = false + mintModuleExists := false for _, acc := range res.Accounts { var account types.AccountI err := suite.app.InterfaceRegistry().UnpackAny(acc, &account) @@ -268,6 +327,17 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) + // Make sure output is sorted alphabetically. + var moduleNames []string + for _, any := range res.Accounts { + var account types.AccountI + err := suite.app.InterfaceRegistry().UnpackAny(any, &account) + suite.Require().NoError(err) + moduleAccount, ok := account.(types.ModuleAccountI) + suite.Require().True(ok) + moduleNames = append(moduleNames, moduleAccount.GetName()) + } + suite.Require().True(sort.StringsAreSorted(moduleNames)) } else { suite.Require().Error(err) suite.Require().Nil(res) @@ -289,9 +359,9 @@ func (suite *KeeperTestSuite) TestBech32Prefix() { func (suite *KeeperTestSuite) TestAddressBytesToString() { testCases := []struct { - msg string - req *types.AddressBytesToStringRequest - expPass bool + msg string + req *types.AddressBytesToStringRequest + expPass bool }{ { "success", @@ -324,16 +394,15 @@ func (suite *KeeperTestSuite) TestAddressBytesToString() { suite.Require().Error(err) suite.Require().Nil(res) } - }) } } func (suite *KeeperTestSuite) TestAddressStringToBytes() { testCases := []struct { - msg string - req *types.AddressStringToBytesRequest - expPass bool + msg string + req *types.AddressStringToBytesRequest + expPass bool }{ { "success", @@ -352,10 +421,9 @@ func (suite *KeeperTestSuite) TestAddressStringToBytes() { }, { "address prefix is incorrect", - &types.AddressStringToBytesRequest{AddressString: "regen13c3d4wq2t22dl0dstraf8jc3f902e3fsy9n3wv" }, + &types.AddressStringToBytesRequest{AddressString: "regen13c3d4wq2t22dl0dstraf8jc3f902e3fsy9n3wv"}, false, }, - } for _, tc := range testCases { @@ -372,7 +440,6 @@ func (suite *KeeperTestSuite) TestAddressStringToBytes() { suite.Require().Error(err) suite.Require().Nil(res) } - }) } } diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 25592115a3e9..207f65b0f838 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -1,7 +1,6 @@ package keeper import ( - "errors" "fmt" gogotypes "github.com/gogo/protobuf/types" @@ -9,10 +8,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -76,7 +74,6 @@ func NewAccountKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramstore paramtypes.Subspace, proto func() types.AccountI, maccPerms map[string][]string, bech32Prefix string, ) AccountKeeper { - // set KeyTable if it has not already been set if !paramstore.HasKeyTable() { paramstore = paramstore.WithKeyTable(types.ParamKeyTable()) @@ -249,7 +246,7 @@ func (ak AccountKeeper) GetCodec() codec.BinaryCodec { return ak.cdc } func (ak AccountKeeper) getBech32Prefix() (string, error) { bech32Codec, ok := ak.addressCdc.(bech32Codec) if !ok { - return "", errors.New("unable cast addressCdc to bech32Codec") + return "", fmt.Errorf("unable cast addressCdc to bech32Codec; expected %T got %T", bech32Codec, ak.addressCdc) } return bech32Codec.bech32Prefix, nil diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index 4cbc3694d181..768bc7c10caa 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -4,6 +4,8 @@ import ( "github.com/gogo/protobuf/grpc" v043 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v043" + v046 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v046" + "github.com/cosmos/cosmos-sdk/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -41,3 +43,26 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { return iterErr } + +// Migrate2to3 migrates from consensus version 2 to version 3. Specifically, for each account +// we index the account's ID to their address. +func (m Migrator) Migrate2to3(ctx sdk.Context) error { + return v046.MigrateStore(ctx, m.keeper.key, m.keeper.cdc) +} + +// V45_SetAccount implements V45_SetAccount +// set the account without map to accAddr to accNumber. +// +// NOTE: This is used for testing purposes only. +func (m Migrator) V45_SetAccount(ctx sdk.Context, acc types.AccountI) error { + addr := acc.GetAddress() + store := ctx.KVStore(m.keeper.key) + + bz, err := m.keeper.MarshalAccount(acc) + if err != nil { + return err + } + + store.Set(types.AddressStoreKey(addr), bz) + return nil +} diff --git a/x/auth/middleware/basic.go b/x/auth/middleware/basic.go deleted file mode 100644 index 429c9a39537f..000000000000 --- a/x/auth/middleware/basic.go +++ /dev/null @@ -1,359 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/codec/legacy" - "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - abci "github.com/tendermint/tendermint/abci/types" -) - -type validateBasicTxHandler struct { - next tx.Handler -} - -// ValidateBasicMiddleware will call tx.ValidateBasic, msg.ValidateBasic(for each msg inside tx) -// and return any non-nil error. -// If ValidateBasic passes, middleware calls next middleware in chain. Note, -// validateBasicTxHandler will not get executed on ReCheckTx since it -// is not dependent on application state. -func ValidateBasicMiddleware(txh tx.Handler) tx.Handler { - return validateBasicTxHandler{ - next: txh, - } -} - -var _ tx.Handler = validateBasicTxHandler{} - -// validateBasicTxMsgs executes basic validator calls for messages. -func validateBasicTxMsgs(msgs []sdk.Msg) error { - if len(msgs) == 0 { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "must contain at least one message") - } - - for _, msg := range msgs { - err := msg.ValidateBasic() - if err != nil { - return err - } - } - - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (txh validateBasicTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - // no need to validate basic on recheck tx, call next middleware - if checkReq.Type == abci.CheckTxType_Recheck { - return txh.next.CheckTx(ctx, req, checkReq) - } - - if err := validateBasicTxMsgs(req.Tx.GetMsgs()); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - if err := req.Tx.ValidateBasic(); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return txh.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (txh validateBasicTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := req.Tx.ValidateBasic(); err != nil { - return tx.Response{}, err - } - - if err := validateBasicTxMsgs(req.Tx.GetMsgs()); err != nil { - return tx.Response{}, err - } - - return txh.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx. -func (txh validateBasicTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := req.Tx.ValidateBasic(); err != nil { - return tx.Response{}, err - } - - if err := validateBasicTxMsgs(req.Tx.GetMsgs()); err != nil { - return tx.Response{}, err - } - - return txh.next.SimulateTx(ctx, req) -} - -var _ tx.Handler = txTimeoutHeightTxHandler{} - -type txTimeoutHeightTxHandler struct { - next tx.Handler -} - -// TxTimeoutHeightMiddleware defines a middleware that checks for a -// tx height timeout. -func TxTimeoutHeightMiddleware(txh tx.Handler) tx.Handler { - return txTimeoutHeightTxHandler{ - next: txh, - } -} - -func checkTimeout(ctx context.Context, tx sdk.Tx) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - timeoutTx, ok := tx.(sdk.TxWithTimeoutHeight) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "expected tx to implement TxWithTimeoutHeight") - } - - timeoutHeight := timeoutTx.GetTimeoutHeight() - if timeoutHeight > 0 && uint64(sdkCtx.BlockHeight()) > timeoutHeight { - return sdkerrors.Wrapf( - sdkerrors.ErrTxTimeoutHeight, "block height: %d, timeout height: %d", sdkCtx.BlockHeight(), timeoutHeight, - ) - } - - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (txh txTimeoutHeightTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := checkTimeout(ctx, req.Tx); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return txh.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (txh txTimeoutHeightTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := checkTimeout(ctx, req.Tx); err != nil { - return tx.Response{}, err - } - - return txh.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx. -func (txh txTimeoutHeightTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := checkTimeout(ctx, req.Tx); err != nil { - return tx.Response{}, err - } - - return txh.next.SimulateTx(ctx, req) -} - -type validateMemoTxHandler struct { - ak AccountKeeper - next tx.Handler -} - -// ValidateMemoMiddleware will validate memo given the parameters passed in -// If memo is too large middleware returns with error, otherwise call next middleware -// CONTRACT: Tx must implement TxWithMemo interface -func ValidateMemoMiddleware(ak AccountKeeper) tx.Middleware { - return func(txHandler tx.Handler) tx.Handler { - return validateMemoTxHandler{ - ak: ak, - next: txHandler, - } - } -} - -var _ tx.Handler = validateMemoTxHandler{} - -func (vmm validateMemoTxHandler) checkForValidMemo(ctx context.Context, tx sdk.Tx) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - memoTx, ok := tx.(sdk.TxWithMemo) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") - } - - params := vmm.ak.GetParams(sdkCtx) - - memoLength := len(memoTx.GetMemo()) - if uint64(memoLength) > params.MaxMemoCharacters { - return sdkerrors.Wrapf(sdkerrors.ErrMemoTooLarge, - "maximum number of characters is %d but received %d characters", - params.MaxMemoCharacters, memoLength, - ) - } - - return nil -} - -// CheckTx implements tx.Handler.CheckTx method. -func (vmm validateMemoTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := vmm.checkForValidMemo(ctx, req.Tx); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return vmm.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx method. -func (vmm validateMemoTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := vmm.checkForValidMemo(ctx, req.Tx); err != nil { - return tx.Response{}, err - } - - return vmm.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (vmm validateMemoTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := vmm.checkForValidMemo(ctx, req.Tx); err != nil { - return tx.Response{}, err - } - - return vmm.next.SimulateTx(ctx, req) -} - -var _ tx.Handler = consumeTxSizeGasTxHandler{} - -type consumeTxSizeGasTxHandler struct { - ak AccountKeeper - next tx.Handler -} - -// ConsumeTxSizeGasMiddleware will take in parameters and consume gas proportional -// to the size of tx before calling next middleware. Note, the gas costs will be -// slightly over estimated due to the fact that any given signing account may need -// to be retrieved from state. -// -// CONTRACT: If simulate=true, then signatures must either be completely filled -// in or empty. -// CONTRACT: To use this middleware, signatures of transaction must be represented -// as legacytx.StdSignature otherwise simulate mode will incorrectly estimate gas cost. -func ConsumeTxSizeGasMiddleware(ak AccountKeeper) tx.Middleware { - return func(txHandler tx.Handler) tx.Handler { - return consumeTxSizeGasTxHandler{ - ak: ak, - next: txHandler, - } - } -} - -func (cgts consumeTxSizeGasTxHandler) simulateSigGasCost(ctx context.Context, tx sdk.Tx) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - params := cgts.ak.GetParams(sdkCtx) - - sigTx, ok := tx.(authsigning.SigVerifiableTx) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") - } - - // in simulate mode, each element should be a nil signature - sigs, err := sigTx.GetSignaturesV2() - if err != nil { - return err - } - n := len(sigs) - - for i, signer := range sigTx.GetSigners() { - // if signature is already filled in, no need to simulate gas cost - if i < n && !isIncompleteSignature(sigs[i].Data) { - continue - } - - var pubkey cryptotypes.PubKey - - acc := cgts.ak.GetAccount(sdkCtx, signer) - - // use placeholder simSecp256k1Pubkey if sig is nil - if acc == nil || acc.GetPubKey() == nil { - pubkey = simSecp256k1Pubkey - } else { - pubkey = acc.GetPubKey() - } - - // use stdsignature to mock the size of a full signature - simSig := legacytx.StdSignature{ //nolint:staticcheck // this will be removed when proto is ready - Signature: simSecp256k1Sig[:], - PubKey: pubkey, - } - - sigBz := legacy.Cdc.MustMarshal(simSig) - cost := sdk.Gas(len(sigBz) + 6) - - // If the pubkey is a multi-signature pubkey, then we estimate for the maximum - // number of signers. - if _, ok := pubkey.(*multisig.LegacyAminoPubKey); ok { - cost *= params.TxSigLimit - } - - sdkCtx.GasMeter().ConsumeGas(params.TxSizeCostPerByte*cost, "txSize") - } - - return nil -} - -//nolint:unparam -func (cgts consumeTxSizeGasTxHandler) consumeTxSizeGas(ctx context.Context, _ sdk.Tx, txBytes []byte) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - params := cgts.ak.GetParams(sdkCtx) - sdkCtx.GasMeter().ConsumeGas(params.TxSizeCostPerByte*sdk.Gas(len(txBytes)), "txSize") - - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (cgts consumeTxSizeGasTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := cgts.consumeTxSizeGas(ctx, req.Tx, req.TxBytes); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return cgts.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (cgts consumeTxSizeGasTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := cgts.consumeTxSizeGas(ctx, req.Tx, req.TxBytes); err != nil { - return tx.Response{}, err - } - - return cgts.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx. -func (cgts consumeTxSizeGasTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := cgts.consumeTxSizeGas(ctx, req.Tx, req.TxBytes); err != nil { - return tx.Response{}, err - } - - if err := cgts.simulateSigGasCost(ctx, req.Tx); err != nil { - return tx.Response{}, err - } - - return cgts.next.SimulateTx(ctx, req) -} - -// isIncompleteSignature tests whether SignatureData is fully filled in for simulation purposes -func isIncompleteSignature(data signing.SignatureData) bool { - if data == nil { - return true - } - - switch data := data.(type) { - case *signing.SingleSignatureData: - return len(data.Signature) == 0 - case *signing.MultiSignatureData: - if len(data.Signatures) == 0 { - return true - } - for _, s := range data.Signatures { - if isIncompleteSignature(s) { - return true - } - } - } - - return false -} diff --git a/x/auth/middleware/basic_test.go b/x/auth/middleware/basic_test.go deleted file mode 100644 index 1c44e292eb93..000000000000 --- a/x/auth/middleware/basic_test.go +++ /dev/null @@ -1,221 +0,0 @@ -package middleware_test - -import ( - "strings" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" -) - -func (s *MWTestSuite) TestValidateBasic() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.ValidateBasicMiddleware) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{}, []uint64{}, []uint64{} - invalidTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: invalidTx}) - s.Require().NotNil(err, "Did not error on invalid tx") - - privs, accNums, accSeqs = []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - validTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: validTx}) - s.Require().Nil(err, "ValidateBasicMiddleware returned error on valid tx. err: %v", err) - - // test middleware skips on recheck - ctx = ctx.WithIsReCheckTx(true) - - // middleware should skip processing invalidTx on recheck and thus return nil-error - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: invalidTx}) - s.Require().Nil(err, "ValidateBasicMiddleware ran on ReCheck") -} - -func (s *MWTestSuite) TestValidateMemo() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.ValidateMemoMiddleware(s.app.AccountKeeper)) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - txBuilder.SetMemo(strings.Repeat("01234567890", 500)) - invalidTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - // require that long memos get rejected - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: invalidTx}) - - s.Require().NotNil(err, "Did not error on tx with high memo") - - txBuilder.SetMemo(strings.Repeat("01234567890", 10)) - validTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - // require small memos pass ValidateMemo middleware - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: validTx}) - s.Require().Nil(err, "ValidateBasicMiddleware returned error on valid tx. err: %v", err) -} - -func (s *MWTestSuite) TestConsumeGasForTxSize() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.ConsumeTxSizeGasMiddleware(s.app.AccountKeeper)) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - - testCases := []struct { - name string - sigV2 signing.SignatureV2 - }{ - {"SingleSignatureData", signing.SignatureV2{PubKey: priv1.PubKey()}}, - {"MultiSignatureData", signing.SignatureV2{PubKey: priv1.PubKey(), Data: multisig.NewMultisig(2)}}, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - txBuilder = s.clientCtx.TxConfig.NewTxBuilder() - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - txBuilder.SetMemo(strings.Repeat("01234567890", 10)) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - txBytes, err := s.clientCtx.TxConfig.TxJSONEncoder()(testTx) - s.Require().Nil(err, "Cannot marshal tx: %v", err) - - params := s.app.AccountKeeper.GetParams(ctx) - expectedGas := sdk.Gas(len(txBytes)) * params.TxSizeCostPerByte - - // Set ctx with TxBytes manually - ctx = ctx.WithTxBytes(txBytes) - - // track how much gas is necessary to retrieve parameters - beforeGas := ctx.GasMeter().GasConsumed() - s.app.AccountKeeper.GetParams(ctx) - afterGas := ctx.GasMeter().GasConsumed() - expectedGas += afterGas - beforeGas - - beforeGas = ctx.GasMeter().GasConsumed() - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: txBytes}) - - s.Require().Nil(err, "ConsumeTxSizeGasMiddleware returned error: %v", err) - - // require that middleware consumes expected amount of gas - consumedGas := ctx.GasMeter().GasConsumed() - beforeGas - s.Require().Equal(expectedGas, consumedGas, "Middleware did not consume the correct amount of gas") - - // simulation must not underestimate gas of this middleware even with nil signatures - txBuilder, err := s.clientCtx.TxConfig.WrapTxBuilder(testTx) - s.Require().NoError(err) - s.Require().NoError(txBuilder.SetSignatures(tc.sigV2)) - testTx = txBuilder.GetTx() - - simTxBytes, err := s.clientCtx.TxConfig.TxJSONEncoder()(testTx) - s.Require().Nil(err, "Cannot marshal tx: %v", err) - // require that simulated tx is smaller than tx with signatures - s.Require().True(len(simTxBytes) < len(txBytes), "simulated tx still has signatures") - - // Set s.ctx with smaller simulated TxBytes manually - ctx = ctx.WithTxBytes(simTxBytes) - - beforeSimGas := ctx.GasMeter().GasConsumed() - - // run txhandler in simulate mode - _, err = txHandler.SimulateTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: simTxBytes}) - consumedSimGas := ctx.GasMeter().GasConsumed() - beforeSimGas - - // require that txhandler passes and does not underestimate middleware cost - s.Require().Nil(err, "ConsumeTxSizeGasMiddleware returned error: %v", err) - s.Require().True(consumedSimGas >= expectedGas, "Simulate mode underestimates gas on Middleware. Simulated cost: %d, expected cost: %d", consumedSimGas, expectedGas) - }) - } -} - -func (s *MWTestSuite) TestTxHeightTimeoutMiddleware() { - ctx := s.SetupTest(true) - - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.TxTimeoutHeightMiddleware) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - - testCases := []struct { - name string - timeout uint64 - height int64 - expectErr bool - }{ - {"default value", 0, 10, false}, - {"no timeout (greater height)", 15, 10, false}, - {"no timeout (same height)", 10, 10, false}, - {"timeout (smaller height)", 9, 10, true}, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - s.Require().NoError(txBuilder.SetMsgs(msg)) - - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - txBuilder.SetMemo(strings.Repeat("01234567890", 10)) - txBuilder.SetTimeoutHeight(tc.timeout) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - ctx := ctx.WithBlockHeight(tc.height) - _, err = txHandler.SimulateTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - s.Require().Equal(tc.expectErr, err != nil, err) - }) - } -} diff --git a/x/auth/middleware/block_gas.go b/x/auth/middleware/block_gas.go deleted file mode 100644 index bfd67f92ecbe..000000000000 --- a/x/auth/middleware/block_gas.go +++ /dev/null @@ -1,53 +0,0 @@ -package middleware - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" -) - -type consumeBlockGasHandler struct { - next tx.Handler -} - -// ConsumeBlockGasMiddleware check and consume block gas meter. -func ConsumeBlockGasMiddleware(txh tx.Handler) tx.Handler { - return consumeBlockGasHandler{next: txh} -} - -var _ tx.Handler = consumeBlockGasHandler{} - -// CheckTx implements tx.Handler.CheckTx method. -func (cbgh consumeBlockGasHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (res tx.Response, resCheckTx tx.ResponseCheckTx, err error) { - return cbgh.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx method. -// Consume block gas meter, panic when block gas meter exceeded, -// the panic should be caught by `RecoveryTxMiddleware`. -func (cbgh consumeBlockGasHandler) DeliverTx(ctx context.Context, req tx.Request) (res tx.Response, err error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - // only run the tx if there is block gas remaining - if sdkCtx.BlockGasMeter().IsOutOfGas() { - err = sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "no block gas left to run tx") - return - } - - // If BlockGasMeter() panics it will be caught by the `RecoveryTxMiddleware` and will - // return an error - in any case BlockGasMeter will consume gas past the limit. - defer func() { - sdkCtx.BlockGasMeter().ConsumeGas( - sdkCtx.GasMeter().GasConsumedToLimit(), "block gas meter", - ) - - }() - - return cbgh.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (cbgh consumeBlockGasHandler) SimulateTx(ctx context.Context, req tx.Request) (res tx.Response, err error) { - return cbgh.next.SimulateTx(ctx, req) -} diff --git a/x/auth/middleware/branch_store.go b/x/auth/middleware/branch_store.go deleted file mode 100644 index 236d288c122b..000000000000 --- a/x/auth/middleware/branch_store.go +++ /dev/null @@ -1,70 +0,0 @@ -package middleware - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - tmtypes "github.com/tendermint/tendermint/types" -) - -type branchStoreHandler struct { - next tx.Handler -} - -// WithBranchedStore creates a new MultiStore branch and commits the store if the downstream -// returned no error. It cancels writes from the failed transactions. -func WithBranchedStore(txh tx.Handler) tx.Handler { - return branchStoreHandler{next: txh} -} - -// CheckTx implements tx.Handler.CheckTx method. -// Do nothing during CheckTx. -func (sh branchStoreHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - return sh.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx method. -func (sh branchStoreHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - return branchAndRun(ctx, req, sh.next.DeliverTx) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (sh branchStoreHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - return branchAndRun(ctx, req, sh.next.SimulateTx) -} - -type nextFn func(ctx context.Context, req tx.Request) (tx.Response, error) - -// branchAndRun creates a new Context based on the existing Context with a MultiStore branch -// in case message processing fails. -func branchAndRun(ctx context.Context, req tx.Request, fn nextFn) (tx.Response, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - runMsgCtx, branchedStore := branchStore(sdkCtx, tmtypes.Tx(req.TxBytes)) - - rsp, err := fn(sdk.WrapSDKContext(runMsgCtx), req) - if err == nil { - // commit storage iff no error - branchedStore.Write() - } - - return rsp, err -} - -// branchStore returns a new context based off of the provided context with -// a branched multi-store. -func branchStore(sdkCtx sdk.Context, tx tmtypes.Tx) (sdk.Context, sdk.CacheMultiStore) { - ms := sdkCtx.MultiStore() - msCache := ms.CacheMultiStore() - if msCache.TracingEnabled() { - msCache = msCache.SetTracingContext( - sdk.TraceContext( - map[string]interface{}{ - "txHash": tx.Hash(), - }, - ), - ).(sdk.CacheMultiStore) - } - - return sdkCtx.WithMultiStore(msCache), msCache -} diff --git a/x/auth/middleware/branch_store_test.go b/x/auth/middleware/branch_store_test.go deleted file mode 100644 index 80e116fb2a82..000000000000 --- a/x/auth/middleware/branch_store_test.go +++ /dev/null @@ -1,129 +0,0 @@ -package middleware_test - -import ( - "context" - "fmt" - "math" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" -) - -var blockMaxGas = uint64(simapp.DefaultConsensusParams.Block.MaxGas) - -func (s *MWTestSuite) TestBranchStore() { - testcases := []struct { - name string - gasToConsume uint64 // gas to consume in the msg execution - panicTx bool // panic explicitly in tx execution - expErr bool - }{ - {"less than block gas meter", 10, false, false}, - {"more than block gas meter", blockMaxGas, false, true}, - {"more than block gas meter", uint64(float64(blockMaxGas) * 1.2), false, true}, - {"consume MaxUint64", math.MaxUint64, false, true}, - {"consume block gas when paniced", 10, true, true}, - } - - for _, tc := range testcases { - s.Run(tc.name, func() { - ctx := s.SetupTest(true).WithBlockGasMeter(sdk.NewGasMeter(blockMaxGas)) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - // tx fee - feeCoin := sdk.NewCoin("atom", sdk.NewInt(150)) - feeAmount := sdk.NewCoins(feeCoin) - - // test account and fund - priv1, _, addr1 := testdata.KeyTestPubAddr() - err := s.app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, feeAmount) - s.Require().NoError(err) - err = s.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr1, feeAmount) - s.Require().NoError(err) - s.Require().Equal(feeCoin.Amount, s.app.BankKeeper.GetBalance(ctx, addr1, feeCoin.Denom).Amount) - seq, _ := s.app.AccountKeeper.GetSequence(ctx, addr1) - s.Require().Equal(uint64(0), seq) - - // testMsgTxHandler is a test txHandler that handles one single TestMsg, - // consumes the given `tc.gasToConsume`, and sets the bank store "ok" key to "ok". - var testMsgTxHandler = customTxHandler{func(ctx context.Context, req tx.Request) (tx.Response, error) { - msg, ok := req.Tx.GetMsgs()[0].(*testdata.TestMsg) - if !ok { - return tx.Response{}, fmt.Errorf("Wrong Msg type, expected %T, got %T", (*testdata.TestMsg)(nil), msg) - } - - sdkCtx := sdk.UnwrapSDKContext(ctx) - sdkCtx.KVStore(s.app.GetKey("bank")).Set([]byte("ok"), []byte("ok")) - sdkCtx.GasMeter().ConsumeGas(tc.gasToConsume, "TestMsg") - if tc.panicTx { - panic("panic in tx execution") - } - return tx.Response{}, nil - }} - - txHandler := middleware.ComposeMiddlewares( - testMsgTxHandler, - middleware.NewTxDecoderMiddleware(s.clientCtx.TxConfig.TxDecoder()), - middleware.GasTxMiddleware, - middleware.RecoveryTxMiddleware, - middleware.DeductFeeMiddleware(s.app.AccountKeeper, s.app.BankKeeper, s.app.FeeGrantKeeper, nil), - middleware.IncrementSequenceMiddleware(s.app.AccountKeeper), - middleware.WithBranchedStore, - middleware.ConsumeBlockGasMiddleware, - ) - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - var gasLimit uint64 = math.MaxUint64 // no limit on sdk.GasMeter - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - - bankStore := ctx.KVStore(s.app.GetKey("bank")) - okValue := bankStore.Get([]byte("ok")) - - if tc.expErr { - s.Require().Error(err) - if tc.panicTx { - s.Require().True(sdkerrors.IsOf(err, sdkerrors.ErrPanic)) - } else { - s.Require().True(sdkerrors.IsOf(err, sdkerrors.ErrOutOfGas)) - } - s.Require().Empty(okValue) - } else { - s.Require().NoError(err) - s.Require().Equal([]byte("ok"), okValue) - } - // block gas is always consumed - baseGas := uint64(24564) // baseGas is the gas consumed by middlewares - expGasConsumed := addUint64Saturating(tc.gasToConsume, baseGas) - s.Require().Equal(expGasConsumed, ctx.BlockGasMeter().GasConsumed()) - // tx fee is always deducted - s.Require().Equal(int64(0), s.app.BankKeeper.GetBalance(ctx, addr1, feeCoin.Denom).Amount.Int64()) - // sender's sequence is always increased - seq, err = s.app.AccountKeeper.GetSequence(ctx, addr1) - s.Require().NoError(err) - s.Require().Equal(uint64(1), seq) - }) - } -} - -func addUint64Saturating(a, b uint64) uint64 { - if math.MaxUint64-a < b { - return math.MaxUint64 - } - - return a + b -} diff --git a/x/auth/middleware/ext.go b/x/auth/middleware/ext.go deleted file mode 100644 index 5159e3c5f1f8..000000000000 --- a/x/auth/middleware/ext.go +++ /dev/null @@ -1,86 +0,0 @@ -package middleware - -import ( - "context" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" -) - -type HasExtensionOptionsTx interface { - GetExtensionOptions() []*codectypes.Any - GetNonCriticalExtensionOptions() []*codectypes.Any -} - -// ExtensionOptionChecker is a function that returns true if the extension option is accepted. -type ExtensionOptionChecker func(*codectypes.Any) bool - -// rejectExtensionOption is the default extension check that reject all tx -// extensions. -func rejectExtensionOption(*codectypes.Any) bool { - return false -} - -type rejectExtensionOptionsTxHandler struct { - next tx.Handler - checker ExtensionOptionChecker -} - -// NewExtensionOptionsMiddleware creates a new middleware that rejects all extension -// options which can optionally be included in protobuf transactions that don't pass the checker. -// Users that need extension options should pass a custom checker that returns true for the -// needed extension options. -func NewExtensionOptionsMiddleware(checker ExtensionOptionChecker) tx.Middleware { - if checker == nil { - checker = rejectExtensionOption - } - return func(txh tx.Handler) tx.Handler { - return rejectExtensionOptionsTxHandler{ - next: txh, - checker: checker, - } - } -} - -var _ tx.Handler = rejectExtensionOptionsTxHandler{} - -func checkExtOpts(tx sdk.Tx, checker ExtensionOptionChecker) error { - if hasExtOptsTx, ok := tx.(HasExtensionOptionsTx); ok { - for _, opt := range hasExtOptsTx.GetExtensionOptions() { - if !checker(opt) { - return sdkerrors.ErrUnknownExtensionOptions - } - } - } - - return nil -} - -// CheckTx implements tx.Handler.CheckTx. -func (txh rejectExtensionOptionsTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - if err := checkExtOpts(req.Tx, txh.checker); err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return txh.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (txh rejectExtensionOptionsTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := checkExtOpts(req.Tx, txh.checker); err != nil { - return tx.Response{}, err - } - - return txh.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh rejectExtensionOptionsTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - if err := checkExtOpts(req.Tx, txh.checker); err != nil { - return tx.Response{}, err - } - - return txh.next.SimulateTx(ctx, req) -} diff --git a/x/auth/middleware/ext_test.go b/x/auth/middleware/ext_test.go deleted file mode 100644 index 27c294794cfb..000000000000 --- a/x/auth/middleware/ext_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package middleware_test - -import ( - "github.com/cosmos/cosmos-sdk/codec/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - typestx "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" - "github.com/cosmos/cosmos-sdk/x/auth/tx" -) - -func (s *MWTestSuite) TestExtensionOptionsMiddleware() { - testCases := []struct { - msg string - allow bool - }{ - {"allow extension", true}, - {"reject extension", false}, - } - for _, tc := range testCases { - s.Run(tc.msg, func() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.NewExtensionOptionsMiddleware(func(_ *codectypes.Any) bool { - return tc.allow - })) - - // no extension options should not trigger an error - theTx := txBuilder.GetTx() - _, _, err := txHandler.CheckTx(sdk.WrapSDKContext(ctx), typestx.Request{Tx: theTx}, typestx.RequestCheckTx{}) - s.Require().NoError(err) - - extOptsTxBldr, ok := txBuilder.(tx.ExtensionOptionsTxBuilder) - if !ok { - // if we can't set extension options, this middleware doesn't apply and we're done - return - } - - // set an extension option and check - any, err := types.NewAnyWithValue(testdata.NewTestMsg()) - s.Require().NoError(err) - extOptsTxBldr.SetExtensionOptions(any) - theTx = txBuilder.GetTx() - _, _, err = txHandler.CheckTx(sdk.WrapSDKContext(ctx), typestx.Request{Tx: theTx}, typestx.RequestCheckTx{}) - if tc.allow { - s.Require().NoError(err) - } else { - s.Require().EqualError(err, "unknown extension options") - } - }) - } -} diff --git a/x/auth/middleware/fee_test.go b/x/auth/middleware/fee_test.go deleted file mode 100644 index 7c1f54463fff..000000000000 --- a/x/auth/middleware/fee_test.go +++ /dev/null @@ -1,114 +0,0 @@ -package middleware_test - -import ( - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" - "github.com/cosmos/cosmos-sdk/x/bank/testutil" -) - -func (s *MWTestSuite) TestEnsureMempoolFees() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.DeductFeeMiddleware( - s.app.AccountKeeper, - s.app.BankKeeper, - s.app.FeeGrantKeeper, - nil, - )) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - atomCoin := sdk.NewCoin("atom", sdk.NewInt(150)) - apeCoin := sdk.NewInt64Coin("ape", 1500000) - feeAmount := sdk.NewCoins(apeCoin, atomCoin) - gasLimit := testdata.NewTestGasLimit() - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - // Set high gas price so standard test fee fails - atomPrice := sdk.NewDecCoinFromDec("atom", sdk.NewDec(200).Quo(sdk.NewDec(100000))) - highGasPrice := []sdk.DecCoin{atomPrice} - ctx = ctx.WithMinGasPrices(highGasPrice) - - // txHandler errors with insufficient fees - _, _, err = txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{}) - s.Require().NotNil(err, "Middleware should have errored on too low fee for local gasPrice") - - // txHandler should fail since we also check minGasPrice in DeliverTx - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - s.Require().Error(err, "MempoolFeeMiddleware don't error in DeliverTx") - - atomPrice = sdk.NewDecCoinFromDec("atom", sdk.NewDec(0).Quo(sdk.NewDec(100000))) - lowGasPrice := []sdk.DecCoin{atomPrice} - ctx = ctx.WithMinGasPrices(lowGasPrice) - - // Set account with sufficient funds - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - s.app.AccountKeeper.SetAccount(ctx, acc) - err = testutil.FundAccount(s.app.BankKeeper, ctx, addr1, feeAmount) - s.Require().NoError(err) - - _, checkTxRes, err := txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{}) - s.Require().Nil(err, "Middleware should not have errored on fee higher than local gasPrice") - s.Require().Equal(atomCoin.Amount.Int64(), checkTxRes.Priority, "priority should be atom amount") -} - -func (s *MWTestSuite) TestDeductFees() { - ctx := s.SetupTest(false) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.DeductFeeMiddleware( - s.app.AccountKeeper, - s.app.BankKeeper, - s.app.FeeGrantKeeper, - nil, - ), - ) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - // Set account with insufficient funds - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - s.app.AccountKeeper.SetAccount(ctx, acc) - coins := sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(10))) - err = testutil.FundAccount(s.app.BankKeeper, ctx, addr1, coins) - s.Require().NoError(err) - - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - s.Require().NotNil(err, "Tx did not error when fee payer had insufficient funds") - - // Set account with sufficient funds - s.app.AccountKeeper.SetAccount(ctx, acc) - err = testutil.FundAccount(s.app.BankKeeper, ctx, addr1, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(200)))) - s.Require().NoError(err) - - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - - s.Require().Nil(err, "Tx errored after account has been set with sufficient funds") -} diff --git a/x/auth/middleware/gas.go b/x/auth/middleware/gas.go deleted file mode 100644 index ee31fc1bff89..000000000000 --- a/x/auth/middleware/gas.go +++ /dev/null @@ -1,97 +0,0 @@ -package middleware - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" -) - -// GasTx defines a Tx with a GetGas() method which is needed to use gasTxHandler. -type GasTx interface { - sdk.Tx - GetGas() uint64 -} - -type gasTxHandler struct { - next tx.Handler -} - -// GasTxMiddleware defines a simple middleware that sets a new GasMeter on -// the sdk.Context, and sets the GasInfo on the result. It reads the tx.GetGas() -// by default, or sets to infinity in simulate mode. -func GasTxMiddleware(txh tx.Handler) tx.Handler { - return gasTxHandler{next: txh} -} - -var _ tx.Handler = gasTxHandler{} - -// CheckTx implements tx.Handler.CheckTx. -func (txh gasTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - sdkCtx, err := gasContext(sdk.UnwrapSDKContext(ctx), req.Tx, false) - if err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - res, resCheckTx, err := txh.next.CheckTx(sdk.WrapSDKContext(sdkCtx), req, checkReq) - - return populateGas(res, sdkCtx), resCheckTx, err -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (txh gasTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - sdkCtx, err := gasContext(sdk.UnwrapSDKContext(ctx), req.Tx, false) - if err != nil { - return tx.Response{}, err - } - - res, err := txh.next.DeliverTx(sdk.WrapSDKContext(sdkCtx), req) - - return populateGas(res, sdkCtx), err -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh gasTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - sdkCtx, err := gasContext(sdk.UnwrapSDKContext(ctx), req.Tx, true) - if err != nil { - return tx.Response{}, err - } - - res, err := txh.next.SimulateTx(sdk.WrapSDKContext(sdkCtx), req) - - return populateGas(res, sdkCtx), err -} - -// populateGas returns a new tx.Response with gas fields populated. -func populateGas(res tx.Response, sdkCtx sdk.Context) tx.Response { - res.GasWanted = sdkCtx.GasMeter().Limit() - res.GasUsed = sdkCtx.GasMeter().GasConsumed() - - return res -} - -// gasContext returns a new context with a gas meter set from a given context. -func gasContext(ctx sdk.Context, tx sdk.Tx, isSimulate bool) (sdk.Context, error) { - // all transactions must implement GasTx - gasTx, ok := tx.(GasTx) - if !ok { - // Set a gas meter with limit 0 as to prevent an infinite gas meter attack - // during runTx. - newCtx := setGasMeter(ctx, 0, isSimulate) - return newCtx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be GasTx") - } - - return setGasMeter(ctx, gasTx.GetGas(), isSimulate), nil -} - -// setGasMeter returns a new context with a gas meter set from a given context. -func setGasMeter(ctx sdk.Context, gasLimit uint64, simulate bool) sdk.Context { - // In various cases such as simulation and during the genesis block, we do not - // meter any gas utilization. - if simulate || ctx.BlockHeight() == 0 { - return ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) - } - - return ctx.WithGasMeter(sdk.NewGasMeter(gasLimit)) -} diff --git a/x/auth/middleware/gas_test.go b/x/auth/middleware/gas_test.go deleted file mode 100644 index 78685fa6c766..000000000000 --- a/x/auth/middleware/gas_test.go +++ /dev/null @@ -1,124 +0,0 @@ -package middleware_test - -import ( - "context" - "errors" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -// txTest is a dummy tx that doesn't implement GasTx. It should set the GasMeter -// to 0 in this case. -type txTest struct{} - -var _ sdk.Tx = txTest{} - -func (t txTest) GetMsgs() []sdk.Msg { return []sdk.Msg{} } -func (t txTest) ValidateBasic() error { return nil } - -func (s *MWTestSuite) setupGasTx() (signing.Tx, []byte, sdk.Context, uint64) { - ctx := s.SetupTest(true) - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - - // msg and signatures - msg := testdata.NewTestMsg(addr1) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - s.Require().NoError(txBuilder.SetMsgs(msg)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - // test tx - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - tx, txBytes, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - // Set height to non-zero value for GasMeter to be set - ctx = ctx.WithBlockHeight(1) - - return tx, txBytes, ctx, gasLimit -} - -func (s *MWTestSuite) TestSetup() { - testTx, _, ctx, gasLimit := s.setupGasTx() - txHandler := middleware.ComposeMiddlewares(noopTxHandler, middleware.GasTxMiddleware) - - testcases := []struct { - name string - tx sdk.Tx - expGasLimit uint64 - expErr bool - errorStr string - }{ - {"not a gas tx", txTest{}, 0, true, "Tx must be GasTx: tx parse error"}, - {"tx with its own gas limit", testTx, gasLimit, false, ""}, - } - for _, tc := range testcases { - s.Run(tc.name, func() { - res, _, err := txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: tc.tx}, tx.RequestCheckTx{}) - if tc.expErr { - s.Require().EqualError(err, tc.errorStr) - } else { - s.Require().Nil(err, "SetUpContextMiddleware returned error") - s.Require().Equal(tc.expGasLimit, uint64(res.GasWanted)) - } - }) - } -} - -func (s *MWTestSuite) TestRecoverPanic() { - testTx, txBytes, ctx, gasLimit := s.setupGasTx() - txHandler := middleware.ComposeMiddlewares(outOfGasTxHandler, middleware.GasTxMiddleware, middleware.RecoveryTxMiddleware) - res, _, err := txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: txBytes}, tx.RequestCheckTx{}) - s.Require().Error(err, "Did not return error on OutOfGas panic") - s.Require().True(errors.Is(sdkerrors.ErrOutOfGas, err), "Returned error is not an out of gas error") - s.Require().Equal(gasLimit, uint64(res.GasWanted)) - - txHandler = middleware.ComposeMiddlewares(outOfGasTxHandler, middleware.GasTxMiddleware) - s.Require().Panics(func() { - txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: txBytes}, tx.RequestCheckTx{}) - }, "Recovered from non-Out-of-Gas panic") -} - -// customTxHandler is a test middleware that will run a custom function. -type customTxHandler struct { - fn func(context.Context, tx.Request) (tx.Response, error) -} - -var _ tx.Handler = customTxHandler{} - -func (h customTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - return h.fn(ctx, req) -} -func (h customTxHandler) CheckTx(ctx context.Context, req tx.Request, _ tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - res, err := h.fn(ctx, req) - return res, tx.ResponseCheckTx{}, err -} -func (h customTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - return h.fn(ctx, req) -} - -// noopTxHandler is a test middleware that returns an empty response. -var noopTxHandler = customTxHandler{func(_ context.Context, _ tx.Request) (tx.Response, error) { - return tx.Response{}, nil -}} - -// outOfGasTxHandler is a test middleware that panics with an outOfGas error. -var outOfGasTxHandler = customTxHandler{func(ctx context.Context, _ tx.Request) (tx.Response, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - overLimit := sdkCtx.GasMeter().Limit() + 1 - - // Should panic with outofgas error - sdkCtx.GasMeter().ConsumeGas(overLimit, "test panic") - - panic("not reached") -}} diff --git a/x/auth/middleware/index_events.go b/x/auth/middleware/index_events.go deleted file mode 100644 index 2dd831417c2e..000000000000 --- a/x/auth/middleware/index_events.go +++ /dev/null @@ -1,61 +0,0 @@ -package middleware - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" -) - -type indexEventsTxHandler struct { - // indexEvents defines the set of events in the form {eventType}.{attributeKey}, - // which informs Tendermint what to index. If empty, all events will be indexed. - indexEvents map[string]struct{} - next tx.Handler -} - -// NewIndexEventsTxMiddleware defines a middleware to optionally only index a -// subset of the emitted events inside the Tendermint events indexer. -func NewIndexEventsTxMiddleware(indexEvents map[string]struct{}) tx.Middleware { - return func(txHandler tx.Handler) tx.Handler { - return indexEventsTxHandler{ - indexEvents: indexEvents, - next: txHandler, - } - } -} - -var _ tx.Handler = indexEventsTxHandler{} - -// CheckTx implements tx.Handler.CheckTx method. -func (txh indexEventsTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - res, resCheckTx, err := txh.next.CheckTx(ctx, req, checkReq) - if err != nil { - return res, tx.ResponseCheckTx{}, err - } - - res.Events = sdk.MarkEventsToIndex(res.Events, txh.indexEvents) - return res, resCheckTx, nil -} - -// DeliverTx implements tx.Handler.DeliverTx method. -func (txh indexEventsTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - res, err := txh.next.DeliverTx(ctx, req) - if err != nil { - return res, err - } - - res.Events = sdk.MarkEventsToIndex(res.Events, txh.indexEvents) - return res, nil -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh indexEventsTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - res, err := txh.next.SimulateTx(ctx, req) - if err != nil { - return res, err - } - - res.Events = sdk.MarkEventsToIndex(res.Events, txh.indexEvents) - return res, nil -} diff --git a/x/auth/middleware/middleware.go b/x/auth/middleware/middleware.go deleted file mode 100644 index a3fb30b0d6ae..000000000000 --- a/x/auth/middleware/middleware.go +++ /dev/null @@ -1,130 +0,0 @@ -package middleware - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// ComposeMiddlewares compose multiple middlewares on top of a tx.Handler. The -// middleware order in the variadic arguments is from outer to inner. -// -// Example: Given a base tx.Handler H, and two middlewares A and B, the -// middleware stack: -// ``` -// A.pre -// B.pre -// H -// B.post -// A.post -// ``` -// is created by calling `ComposeMiddlewares(H, A, B)`. -func ComposeMiddlewares(txHandler tx.Handler, middlewares ...tx.Middleware) tx.Handler { - for i := len(middlewares) - 1; i >= 0; i-- { - txHandler = middlewares[i](txHandler) - } - - return txHandler -} - -type TxHandlerOptions struct { - Debug bool - - // TxDecoder is used to decode the raw tx bytes into a sdk.Tx. - TxDecoder sdk.TxDecoder - - // IndexEvents defines the set of events in the form {eventType}.{attributeKey}, - // which informs Tendermint what to index. If empty, all events will be indexed. - IndexEvents map[string]struct{} - - LegacyRouter sdk.Router - MsgServiceRouter *MsgServiceRouter - - AccountKeeper AccountKeeper - BankKeeper types.BankKeeper - FeegrantKeeper FeegrantKeeper - SignModeHandler authsigning.SignModeHandler - SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error - ExtensionOptionChecker ExtensionOptionChecker - TxFeeChecker TxFeeChecker -} - -// NewDefaultTxHandler defines a TxHandler middleware stacks that should work -// for most applications. -func NewDefaultTxHandler(options TxHandlerOptions) (tx.Handler, error) { - if options.TxDecoder == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "txDecoder is required for middlewares") - } - - if options.AccountKeeper == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for middlewares") - } - - if options.BankKeeper == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for middlewares") - } - - if options.SignModeHandler == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for middlewares") - } - - var sigGasConsumer = options.SigGasConsumer - if sigGasConsumer == nil { - sigGasConsumer = DefaultSigVerificationGasConsumer - } - - var extensionOptionChecker = options.ExtensionOptionChecker - if extensionOptionChecker == nil { - extensionOptionChecker = rejectExtensionOption - } - - var txFeeChecker = options.TxFeeChecker - if txFeeChecker == nil { - txFeeChecker = checkTxFeeWithValidatorMinGasPrices - } - - return ComposeMiddlewares( - NewRunMsgsTxHandler(options.MsgServiceRouter, options.LegacyRouter), - NewTxDecoderMiddleware(options.TxDecoder), - // Set a new GasMeter on sdk.Context. - // - // Make sure the Gas middleware is outside of all other middlewares - // that reads the GasMeter. In our case, the Recovery middleware reads - // the GasMeter to populate GasInfo. - GasTxMiddleware, - // Recover from panics. Panics outside of this middleware won't be - // caught, be careful! - RecoveryTxMiddleware, - // Choose which events to index in Tendermint. Make sure no events are - // emitted outside of this middleware. - NewIndexEventsTxMiddleware(options.IndexEvents), - // Reject all extension options other than the ones needed by the feemarket. - NewExtensionOptionsMiddleware(extensionOptionChecker), - ValidateBasicMiddleware, - TxTimeoutHeightMiddleware, - ValidateMemoMiddleware(options.AccountKeeper), - ConsumeTxSizeGasMiddleware(options.AccountKeeper), - // No gas should be consumed in any middleware above in a "post" handler part. See - // ComposeMiddlewares godoc for details. - // `DeductFeeMiddleware` and `IncrementSequenceMiddleware` should be put outside of `WithBranchedStore` middleware, - // so their storage writes are not discarded when tx fails. - DeductFeeMiddleware(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, txFeeChecker), - SetPubKeyMiddleware(options.AccountKeeper), - ValidateSigCountMiddleware(options.AccountKeeper), - SigGasConsumeMiddleware(options.AccountKeeper, sigGasConsumer), - SigVerificationMiddleware(options.AccountKeeper, options.SignModeHandler), - IncrementSequenceMiddleware(options.AccountKeeper), - // Creates a new MultiStore branch, discards downstream writes if the downstream returns error. - // These kinds of middlewares should be put under this: - // - Could return error after messages executed succesfully. - // - Storage writes should be discarded together when tx failed. - WithBranchedStore, - // Consume block gas. All middlewares whose gas consumption after their `next` handler - // should be accounted for, should go below this middleware. - ConsumeBlockGasMiddleware, - NewTipMiddleware(options.BankKeeper), - ), nil -} diff --git a/x/auth/middleware/msg_service_router_test.go b/x/auth/middleware/msg_service_router_test.go deleted file mode 100644 index ca6ec79b5b9a..000000000000 --- a/x/auth/middleware/msg_service_router_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package middleware_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" -) - -func TestRegisterMsgService(t *testing.T) { - // Create an encoding config that doesn't register testdata Msg services. - encCfg := simapp.MakeTestEncodingConfig() - msr := middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry) - require.Panics(t, func() { - testdata.RegisterMsgServer( - msr, - testdata.MsgServerImpl{}, - ) - }) - - // Register testdata Msg services, and rerun `RegisterService`. - testdata.RegisterInterfaces(encCfg.InterfaceRegistry) - require.NotPanics(t, func() { - testdata.RegisterMsgServer( - msr, - testdata.MsgServerImpl{}, - ) - }) -} - -func TestRegisterMsgServiceTwice(t *testing.T) { - // Setup baseapp. - encCfg := simapp.MakeTestEncodingConfig() - msr := middleware.NewMsgServiceRouter(encCfg.InterfaceRegistry) - testdata.RegisterInterfaces(encCfg.InterfaceRegistry) - - // First time registering service shouldn't panic. - require.NotPanics(t, func() { - testdata.RegisterMsgServer( - msr, - testdata.MsgServerImpl{}, - ) - }) - - // Second time should panic. - require.Panics(t, func() { - testdata.RegisterMsgServer( - msr, - testdata.MsgServerImpl{}, - ) - }) -} diff --git a/x/auth/middleware/recovery.go b/x/auth/middleware/recovery.go deleted file mode 100644 index 563389d85fc5..000000000000 --- a/x/auth/middleware/recovery.go +++ /dev/null @@ -1,78 +0,0 @@ -package middleware - -import ( - "context" - "runtime/debug" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" -) - -type recoveryTxHandler struct { - next tx.Handler -} - -// RecoveryTxMiddleware defines a middleware that catches all panics that -// happen in inner middlewares. -// -// Be careful, it won't catch any panics happening outside! -func RecoveryTxMiddleware(txh tx.Handler) tx.Handler { - return recoveryTxHandler{next: txh} -} - -var _ tx.Handler = recoveryTxHandler{} - -// CheckTx implements tx.Handler.CheckTx method. -func (txh recoveryTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (res tx.Response, resCheckTx tx.ResponseCheckTx, err error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - // Panic recovery. - defer func() { - if r := recover(); r != nil { - err = handleRecovery(r, sdkCtx) - } - }() - - return txh.next.CheckTx(ctx, req, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx method. -func (txh recoveryTxHandler) DeliverTx(ctx context.Context, req tx.Request) (res tx.Response, err error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - // Panic recovery. - defer func() { - if r := recover(); r != nil { - err = handleRecovery(r, sdkCtx) - } - }() - - return txh.next.DeliverTx(ctx, req) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh recoveryTxHandler) SimulateTx(ctx context.Context, req tx.Request) (res tx.Response, err error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - // Panic recovery. - defer func() { - if r := recover(); r != nil { - err = handleRecovery(r, sdkCtx) - } - }() - - return txh.next.SimulateTx(ctx, req) -} - -func handleRecovery(r interface{}, sdkCtx sdk.Context) error { - switch r := r.(type) { - case sdk.ErrorOutOfGas: - return sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, - "out of gas in location: %v; gasWanted: %d, gasUsed: %d", - r.Descriptor, sdkCtx.GasMeter().Limit(), sdkCtx.GasMeter().GasConsumed(), - ) - - default: - return sdkerrors.ErrPanic.Wrapf( - "recovered: %v\nstack:\n%v", r, string(debug.Stack()), - ) - } -} diff --git a/x/auth/middleware/run_msgs.go b/x/auth/middleware/run_msgs.go deleted file mode 100644 index d333e5918995..000000000000 --- a/x/auth/middleware/run_msgs.go +++ /dev/null @@ -1,117 +0,0 @@ -package middleware - -import ( - "context" - "strings" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" -) - -type runMsgsTxHandler struct { - legacyRouter sdk.Router // router for redirecting legacy Msgs - msgServiceRouter *MsgServiceRouter // router for redirecting Msg service messages -} - -func NewRunMsgsTxHandler(msr *MsgServiceRouter, legacyRouter sdk.Router) tx.Handler { - return runMsgsTxHandler{ - legacyRouter: legacyRouter, - msgServiceRouter: msr, - } -} - -var _ tx.Handler = runMsgsTxHandler{} - -// CheckTx implements tx.Handler.CheckTx method. -func (txh runMsgsTxHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - // Don't run Msgs during CheckTx. - return tx.Response{}, tx.ResponseCheckTx{}, nil -} - -// DeliverTx implements tx.Handler.DeliverTx method. -func (txh runMsgsTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - return txh.runMsgs(sdk.UnwrapSDKContext(ctx), req.Tx.GetMsgs(), req.TxBytes) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh runMsgsTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - return txh.runMsgs(sdk.UnwrapSDKContext(ctx), req.Tx.GetMsgs(), req.TxBytes) -} - -// runMsgs iterates through a list of messages and executes them with the provided -// Context and execution mode. Messages will only be executed during simulation -// and DeliverTx. An error is returned if any single message fails or if a -// Handler does not exist for a given message route. Otherwise, a reference to a -// Result is returned. The caller must not commit state if an error is returned. -func (txh runMsgsTxHandler) runMsgs(sdkCtx sdk.Context, msgs []sdk.Msg, txBytes []byte) (tx.Response, error) { - // Attempt to execute all messages and only update state if all messages pass - // and we're in DeliverTx. Note, runMsgs will never return a reference to a - // Result if any single message fails or does not have a registered Handler. - msgLogs := make(sdk.ABCIMessageLogs, 0, len(msgs)) - events := sdkCtx.EventManager().Events() - msgResponses := make([]*codectypes.Any, len(msgs)) - - // NOTE: GasWanted is determined by the Gas TxHandler and GasUsed by the GasMeter. - for i, msg := range msgs { - var ( - msgResult *sdk.Result - eventMsgName string // name to use as value in event `message.action` - err error - ) - - if handler := txh.msgServiceRouter.Handler(msg); handler != nil { - // ADR 031 request type routing - msgResult, err = handler(sdkCtx, msg) - eventMsgName = sdk.MsgTypeURL(msg) - } else if legacyMsg, ok := msg.(legacytx.LegacyMsg); ok { - // legacy sdk.Msg routing - // Assuming that the app developer has migrated all their Msgs to - // proto messages and has registered all `Msg services`, then this - // path should never be called, because all those Msgs should be - // registered within the `MsgServiceRouter` already. - msgRoute := legacyMsg.Route() - eventMsgName = legacyMsg.Type() - handler := txh.legacyRouter.Route(sdkCtx, msgRoute) - if handler == nil { - return tx.Response{}, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message route: %s; message index: %d", msgRoute, i) - } - - msgResult, err = handler(sdkCtx, msg) - } else { - return tx.Response{}, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "can't route message %+v", msg) - } - - if err != nil { - return tx.Response{}, sdkerrors.Wrapf(err, "failed to execute message; message index: %d", i) - } - - msgEvents := sdk.Events{ - sdk.NewEvent(sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyAction, eventMsgName)), - } - msgEvents = msgEvents.AppendEvents(msgResult.GetEvents()) - - // append message events, data and logs - // - // Note: Each message result's data must be length-prefixed in order to - // separate each result. - events = events.AppendEvents(msgEvents) - - // Each individual sdk.Result has exactly one Msg response. We aggregate here. - msgResponse := msgResult.MsgResponses[0] - if msgResponse == nil { - return tx.Response{}, sdkerrors.ErrLogic.Wrapf("got nil Msg response at index %d for msg %s", i, sdk.MsgTypeURL(msg)) - } - msgResponses[i] = msgResponse - msgLogs = append(msgLogs, sdk.NewABCIMessageLog(uint32(i), msgResult.Log, msgEvents)) - } - - return tx.Response{ - // GasInfo will be populated by the Gas middleware. - Log: strings.TrimSpace(msgLogs.String()), - Events: events.ToABCIEvents(), - MsgResponses: msgResponses, - }, nil -} diff --git a/x/auth/middleware/run_msgs_test.go b/x/auth/middleware/run_msgs_test.go deleted file mode 100644 index 6278d5c023d2..000000000000 --- a/x/auth/middleware/run_msgs_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package middleware_test - -import ( - "fmt" - - "github.com/gogo/protobuf/proto" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" -) - -func (s *MWTestSuite) TestRunMsgs() { - ctx := s.SetupTest(true) // setup - - msr := middleware.NewMsgServiceRouter(s.clientCtx.InterfaceRegistry) - testdata.RegisterMsgServer(msr, testdata.MsgServerImpl{}) - txHandler := middleware.NewRunMsgsTxHandler(msr, nil) - - priv, _, _ := testdata.KeyTestPubAddr() - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - txBuilder.SetMsgs(&testdata.MsgCreateDog{Dog: &testdata.Dog{Name: "Spot"}}) - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv}, []uint64{0}, []uint64{0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - txBytes, err := s.clientCtx.TxConfig.TxEncoder()(testTx) - s.Require().NoError(err) - - res, err := txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx, TxBytes: txBytes}) - s.Require().NoError(err) - s.Require().Len(res.MsgResponses, 1) - s.Require().Equal(fmt.Sprintf("/%s", proto.MessageName(&testdata.MsgCreateDogResponse{})), res.MsgResponses[0].TypeUrl) -} diff --git a/x/auth/middleware/sigverify_test.go b/x/auth/middleware/sigverify_test.go deleted file mode 100644 index a0c68062a968..000000000000 --- a/x/auth/middleware/sigverify_test.go +++ /dev/null @@ -1,411 +0,0 @@ -package middleware_test - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec/legacy" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - "github.com/cosmos/cosmos-sdk/x/auth/types" - abci "github.com/tendermint/tendermint/abci/types" -) - -func (s *MWTestSuite) TestSetPubKey() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - require := s.Require() - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.SetPubKeyMiddleware(s.app.AccountKeeper), - ) - - // keys and addresses - priv1, pub1, addr1 := testdata.KeyTestPubAddr() - priv2, pub2, addr2 := testdata.KeyTestPubAddr() - priv3, pub3, addr3 := testdata.KeyTestPubAddrSecp256R1(require) - - addrs := []sdk.AccAddress{addr1, addr2, addr3} - pubs := []cryptotypes.PubKey{pub1, pub2, pub3} - - msgs := make([]sdk.Msg, len(addrs)) - // set accounts and create msg for each address - for i, addr := range addrs { - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr) - require.NoError(acc.SetAccountNumber(uint64(i))) - s.app.AccountKeeper.SetAccount(ctx, acc) - msgs[i] = testdata.NewTestMsg(addr) - } - require.NoError(txBuilder.SetMsgs(msgs...)) - txBuilder.SetFeeAmount(testdata.NewTestFeeAmount()) - txBuilder.SetGasLimit(testdata.NewTestGasLimit()) - - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0} - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - require.NoError(err) - - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - require.NoError(err) - - // Require that all accounts have pubkey set after middleware runs - for i, addr := range addrs { - pk, err := s.app.AccountKeeper.GetPubKey(ctx, addr) - require.NoError(err, "Error on retrieving pubkey from account") - require.True(pubs[i].Equals(pk), - "Wrong Pubkey retrieved from AccountKeeper, idx=%d\nexpected=%s\n got=%s", i, pubs[i], pk) - } -} - -func (s *MWTestSuite) TestConsumeSignatureVerificationGas() { - params := types.DefaultParams() - msg := []byte{1, 2, 3, 4} - cdc := simapp.MakeTestEncodingConfig().Amino - - p := types.DefaultParams() - skR1, _ := secp256r1.GenPrivKey() - pkSet1, sigSet1 := generatePubKeysAndSignatures(5, msg, false) - multisigKey1 := kmultisig.NewLegacyAminoPubKey(2, pkSet1) - multisignature1 := multisig.NewMultisig(len(pkSet1)) - expectedCost1 := expectedGasCostByKeys(pkSet1) - for i := 0; i < len(pkSet1); i++ { - stdSig := legacytx.StdSignature{PubKey: pkSet1[i], Signature: sigSet1[i]} - sigV2, err := legacytx.StdSignatureToSignatureV2(cdc, stdSig) - s.Require().NoError(err) - err = multisig.AddSignatureV2(multisignature1, sigV2, pkSet1) - s.Require().NoError(err) - } - - type args struct { - meter sdk.GasMeter - sig signing.SignatureData - pubkey cryptotypes.PubKey - params types.Params - } - tests := []struct { - name string - args args - gasConsumed uint64 - shouldErr bool - }{ - {"PubKeyEd25519", args{sdk.NewInfiniteGasMeter(), nil, ed25519.GenPrivKey().PubKey(), params}, p.SigVerifyCostED25519, true}, - {"PubKeySecp256k1", args{sdk.NewInfiniteGasMeter(), nil, secp256k1.GenPrivKey().PubKey(), params}, p.SigVerifyCostSecp256k1, false}, - {"PubKeySecp256r1", args{sdk.NewInfiniteGasMeter(), nil, skR1.PubKey(), params}, p.SigVerifyCostSecp256r1(), false}, - {"Multisig", args{sdk.NewInfiniteGasMeter(), multisignature1, multisigKey1, params}, expectedCost1, false}, - {"unknown key", args{sdk.NewInfiniteGasMeter(), nil, nil, params}, 0, true}, - } - for _, tt := range tests { - sigV2 := signing.SignatureV2{ - PubKey: tt.args.pubkey, - Data: tt.args.sig, - Sequence: 0, // Arbitrary account sequence - } - err := middleware.DefaultSigVerificationGasConsumer(tt.args.meter, sigV2, tt.args.params) - - if tt.shouldErr { - s.Require().NotNil(err) - } else { - s.Require().Nil(err) - s.Require().Equal(tt.gasConsumed, tt.args.meter.GasConsumed(), fmt.Sprintf("%d != %d", tt.gasConsumed, tt.args.meter.GasConsumed())) - } - } -} - -func (s *MWTestSuite) TestSigVerification() { - ctx := s.SetupTest(true) // setup - - // make block height non-zero to ensure account numbers part of signBytes - ctx = ctx.WithBlockHeight(1) - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.SetPubKeyMiddleware(s.app.AccountKeeper), - middleware.SigVerificationMiddleware( - s.app.AccountKeeper, - s.clientCtx.TxConfig.SignModeHandler(), - ), - ) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - priv2, _, addr2 := testdata.KeyTestPubAddr() - priv3, _, addr3 := testdata.KeyTestPubAddr() - - addrs := []sdk.AccAddress{addr1, addr2, addr3} - - msgs := make([]sdk.Msg, len(addrs)) - // set accounts and create msg for each address - for i, addr := range addrs { - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr) - s.Require().NoError(acc.SetAccountNumber(uint64(i))) - s.app.AccountKeeper.SetAccount(ctx, acc) - msgs[i] = testdata.NewTestMsg(addr) - } - - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - - type testCase struct { - name string - privs []cryptotypes.PrivKey - accNums []uint64 - accSeqs []uint64 - recheck bool - shouldErr bool - } - testCases := []testCase{ - {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, - {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, - {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, - {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, - {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, - {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, - {"no err on recheck", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, true, false}, - } - for i, tc := range testCases { - ctx = ctx.WithIsReCheckTx(tc.recheck) - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() // Create new txBuilder for each test - - s.Require().NoError(txBuilder.SetMsgs(msgs...)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - testTx, _, err := s.createTestTx(txBuilder, tc.privs, tc.accNums, tc.accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - if tc.recheck { - _, _, err = txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{Type: abci.CheckTxType_Recheck}) - } else { - _, _, err = txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{}) - } - if tc.shouldErr { - s.Require().NotNil(err, "TestCase %d: %s did not error as expected", i, tc.name) - } else { - s.Require().Nil(err, "TestCase %d: %s errored unexpectedly. Err: %v", i, tc.name, err) - } - } -} - -// This test is exactly like the one above, but we set the codec explicitly to -// Amino. -// Once https://github.com/cosmos/cosmos-sdk/issues/6190 is in, we can remove -// this, since it'll be handled by the test matrix. -// In the meantime, we want to make double-sure amino compatibility works. -// ref: https://github.com/cosmos/cosmos-sdk/issues/7229 -func (s *MWTestSuite) TestSigVerification_ExplicitAmino() { - ctx := s.SetupTest(true) - ctx = ctx.WithBlockHeight(1) - - // Set up TxConfig. - aminoCdc := legacy.Cdc - aminoCdc.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) - - // We're using TestMsg amino encoding in some tests, so register it here. - txConfig := legacytx.StdTxConfig{Cdc: aminoCdc} - - s.clientCtx = client.Context{}. - WithTxConfig(txConfig) - - // make block height non-zero to ensure account numbers part of signBytes - ctx = ctx.WithBlockHeight(1) - - // keys and addresses - priv1, _, addr1 := testdata.KeyTestPubAddr() - priv2, _, addr2 := testdata.KeyTestPubAddr() - priv3, _, addr3 := testdata.KeyTestPubAddr() - - addrs := []sdk.AccAddress{addr1, addr2, addr3} - - msgs := make([]sdk.Msg, len(addrs)) - // set accounts and create msg for each address - for i, addr := range addrs { - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr) - s.Require().NoError(acc.SetAccountNumber(uint64(i))) - s.app.AccountKeeper.SetAccount(ctx, acc) - msgs[i] = testdata.NewTestMsg(addr) - } - - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.SetPubKeyMiddleware(s.app.AccountKeeper), - middleware.SigVerificationMiddleware( - s.app.AccountKeeper, - s.clientCtx.TxConfig.SignModeHandler(), - ), - ) - - type testCase struct { - name string - privs []cryptotypes.PrivKey - accNums []uint64 - accSeqs []uint64 - recheck bool - shouldErr bool - } - - testCases := []testCase{ - {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, - {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, - {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, - {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, - {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, - {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, - {"no err on recheck", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, true, false}, - } - - for i, tc := range testCases { - ctx = ctx.WithIsReCheckTx(tc.recheck) - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() // Create new txBuilder for each test - - s.Require().NoError(txBuilder.SetMsgs(msgs...)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - testTx, _, err := s.createTestTx(txBuilder, tc.privs, tc.accNums, tc.accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - if tc.recheck { - _, _, err = txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{Type: abci.CheckTxType_Recheck}) - } else { - _, _, err = txHandler.CheckTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}, tx.RequestCheckTx{}) - } - if tc.shouldErr { - s.Require().NotNil(err, "TestCase %d: %s did not error as expected", i, tc.name) - } else { - s.Require().Nil(err, "TestCase %d: %s errored unexpectedly. Err: %v", i, tc.name, err) - } - } -} - -func (s *MWTestSuite) TestSigIntegration() { - // generate private keys - privs := []cryptotypes.PrivKey{ - secp256k1.GenPrivKey(), - secp256k1.GenPrivKey(), - secp256k1.GenPrivKey(), - } - - params := types.DefaultParams() - initialSigCost := params.SigVerifyCostSecp256k1 - initialCost, err := s.runSigMiddlewares(params, false, privs...) - s.Require().Nil(err) - - params.SigVerifyCostSecp256k1 *= 2 - doubleCost, err := s.runSigMiddlewares(params, false, privs...) - s.Require().Nil(err) - - s.Require().Equal(initialSigCost*uint64(len(privs)), doubleCost-initialCost) -} - -func (s *MWTestSuite) runSigMiddlewares(params types.Params, _ bool, privs ...cryptotypes.PrivKey) (sdk.Gas, error) { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - // Make block-height non-zero to include accNum in SignBytes - ctx = ctx.WithBlockHeight(1) - s.app.AccountKeeper.SetParams(ctx, params) - - msgs := make([]sdk.Msg, len(privs)) - accNums := make([]uint64, len(privs)) - accSeqs := make([]uint64, len(privs)) - // set accounts and create msg for each address - for i, priv := range privs { - addr := sdk.AccAddress(priv.PubKey().Address()) - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr) - s.Require().NoError(acc.SetAccountNumber(uint64(i))) - s.app.AccountKeeper.SetAccount(ctx, acc) - msgs[i] = testdata.NewTestMsg(addr) - accNums[i] = uint64(i) - accSeqs[i] = uint64(0) - } - s.Require().NoError(txBuilder.SetMsgs(msgs...)) - - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.SetPubKeyMiddleware(s.app.AccountKeeper), - middleware.SigGasConsumeMiddleware(s.app.AccountKeeper, middleware.DefaultSigVerificationGasConsumer), - middleware.SigVerificationMiddleware( - s.app.AccountKeeper, - s.clientCtx.TxConfig.SignModeHandler(), - ), - ) - - // Determine gas consumption of txhandler with default params - before := ctx.GasMeter().GasConsumed() - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tx.Request{Tx: testTx}) - after := ctx.GasMeter().GasConsumed() - - return after - before, err -} - -func (s *MWTestSuite) TestIncrementSequenceMiddleware() { - ctx := s.SetupTest(true) // setup - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - - priv, _, addr := testdata.KeyTestPubAddr() - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr) - s.Require().NoError(acc.SetAccountNumber(uint64(50))) - s.app.AccountKeeper.SetAccount(ctx, acc) - - msgs := []sdk.Msg{testdata.NewTestMsg(addr)} - s.Require().NoError(txBuilder.SetMsgs(msgs...)) - privs := []cryptotypes.PrivKey{priv} - accNums := []uint64{s.app.AccountKeeper.GetAccount(ctx, addr).GetAccountNumber()} - accSeqs := []uint64{s.app.AccountKeeper.GetAccount(ctx, addr).GetSequence()} - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - testTx, _, err := s.createTestTx(txBuilder, privs, accNums, accSeqs, ctx.ChainID()) - s.Require().NoError(err) - - txHandler := middleware.ComposeMiddlewares( - noopTxHandler, - middleware.IncrementSequenceMiddleware(s.app.AccountKeeper), - ) - - testCases := []struct { - ctx sdk.Context - simulate bool - expectedSeq uint64 - }{ - {ctx.WithIsReCheckTx(true), false, 1}, - {ctx.WithIsCheckTx(true).WithIsReCheckTx(false), false, 2}, - {ctx.WithIsReCheckTx(true), false, 3}, - {ctx.WithIsReCheckTx(true), false, 4}, - {ctx.WithIsReCheckTx(true), true, 5}, - } - - for i, tc := range testCases { - var err error - if tc.simulate { - _, err = txHandler.SimulateTx(sdk.WrapSDKContext(tc.ctx), tx.Request{Tx: testTx}) - } else { - _, err = txHandler.DeliverTx(sdk.WrapSDKContext(tc.ctx), tx.Request{Tx: testTx}) - } - - s.Require().NoError(err, "unexpected error; tc #%d, %v", i, tc) - s.Require().Equal(tc.expectedSeq, s.app.AccountKeeper.GetAccount(ctx, addr).GetSequence()) - } -} diff --git a/x/auth/middleware/testutil_test.go b/x/auth/middleware/testutil_test.go deleted file mode 100644 index f493a463fa2a..000000000000 --- a/x/auth/middleware/testutil_test.go +++ /dev/null @@ -1,222 +0,0 @@ -package middleware_test - -import ( - "errors" - "fmt" - "testing" - - "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" - xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" -) - -// testAccount represents an account used in the tests in x/auth/middleware. -type testAccount struct { - acc authtypes.AccountI - priv cryptotypes.PrivKey - accNum uint64 -} - -// MWTestSuite is a test suite to be used with middleware tests. -type MWTestSuite struct { - suite.Suite - - app *simapp.SimApp - clientCtx client.Context - txHandler txtypes.Handler -} - -// returns context and app with params set on account keeper -func createTestApp(t *testing.T, isCheckTx bool) (*simapp.SimApp, sdk.Context) { - app := simapp.Setup(t, isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{Height: app.LastBlockHeight() + 1}).WithBlockGasMeter(sdk.NewInfiniteGasMeter()) - app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) - - return app, ctx -} - -// setupTest setups a new test, with new app and context. -func (s *MWTestSuite) SetupTest(isCheckTx bool) sdk.Context { - var ctx sdk.Context - s.app, ctx = createTestApp(s.T(), isCheckTx) - - // Set up TxConfig. - encodingConfig := simapp.MakeTestEncodingConfig() - // We're using TestMsg encoding in some tests, so register it here. - encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) - testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry) - - s.clientCtx = client.Context{}. - WithTxConfig(encodingConfig.TxConfig). - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithCodec(codec.NewAminoCodec(encodingConfig.Amino)) - - // We don't use simapp's own txHandler. For more flexibility (i.e. around - // using testdata), we create own own txHandler for this test suite. - msr := middleware.NewMsgServiceRouter(encodingConfig.InterfaceRegistry) - testdata.RegisterMsgServer(msr, testdata.MsgServerImpl{}) - legacyRouter := middleware.NewLegacyRouter() - legacyRouter.AddRoute(sdk.NewRoute((&testdata.TestMsg{}).Route(), func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - return &sdk.Result{ - MsgResponses: []*codectypes.Any{any}, - }, nil - })) - txHandler, err := middleware.NewDefaultTxHandler(middleware.TxHandlerOptions{ - Debug: s.app.Trace(), - MsgServiceRouter: msr, - LegacyRouter: legacyRouter, - AccountKeeper: s.app.AccountKeeper, - BankKeeper: s.app.BankKeeper, - FeegrantKeeper: s.app.FeeGrantKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - SigGasConsumer: middleware.DefaultSigVerificationGasConsumer, - TxDecoder: s.clientCtx.TxConfig.TxDecoder(), - }) - s.Require().NoError(err) - s.txHandler = txHandler - - return ctx -} - -// createTestAccounts creates `numAccs` accounts, and return all relevant -// information about them including their private keys. -func (s *MWTestSuite) createTestAccounts(ctx sdk.Context, numAccs int, coins sdk.Coins) []testAccount { - var accounts []testAccount - - for i := 0; i < numAccs; i++ { - priv, _, addr := testdata.KeyTestPubAddr() - acc := s.app.AccountKeeper.NewAccountWithAddress(ctx, addr) - accNum := uint64(i) - err := acc.SetAccountNumber(accNum) - s.Require().NoError(err) - s.app.AccountKeeper.SetAccount(ctx, acc) - err = s.app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, coins) - s.Require().NoError(err) - - err = s.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, coins) - s.Require().NoError(err) - - accounts = append(accounts, testAccount{acc, priv, accNum}) - } - - return accounts -} - -// createTestTx is a helper function to create a tx given multiple inputs. -func (s *MWTestSuite) createTestTx(txBuilder client.TxBuilder, privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, []byte, error) { - // First round: we gather all the signer infos. We use the "set empty - // signature" hack to do that. - var sigsV2 []signing.SignatureV2 - for i, priv := range privs { - sigV2 := signing.SignatureV2{ - PubKey: priv.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), - Signature: nil, - }, - Sequence: accSeqs[i], - } - - sigsV2 = append(sigsV2, sigV2) - } - err := txBuilder.SetSignatures(sigsV2...) - if err != nil { - return nil, nil, err - } - - // Second round: all signer infos are set, so each signer can sign. - sigsV2 = []signing.SignatureV2{} - for i, priv := range privs { - signerData := xauthsigning.SignerData{ - Address: sdk.AccAddress(priv.PubKey().Address()).String(), - ChainID: chainID, - AccountNumber: accNums[i], - Sequence: accSeqs[i], - PubKey: priv.PubKey(), - } - sigV2, err := tx.SignWithPrivKey( - s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData, - txBuilder, priv, s.clientCtx.TxConfig, accSeqs[i]) - if err != nil { - return nil, nil, err - } - - sigsV2 = append(sigsV2, sigV2) - } - err = txBuilder.SetSignatures(sigsV2...) - if err != nil { - return nil, nil, err - } - - txBytes, err := s.clientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) - if err != nil { - return nil, nil, err - } - - return txBuilder.GetTx(), txBytes, nil -} - -func (s *MWTestSuite) runTestCase(ctx sdk.Context, txBuilder client.TxBuilder, privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, accNums, accSeqs []uint64, chainID string, tc TestCase) { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { - s.Require().NoError(txBuilder.SetMsgs(msgs...)) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - - // Theoretically speaking, middleware unit tests should only test - // middlewares, but here we sometimes also test the tx creation - // process. - testTx, _, txErr := s.createTestTx(txBuilder, privs, accNums, accSeqs, chainID) - newCtx, txHandlerErr := s.txHandler.DeliverTx(sdk.WrapSDKContext(ctx), txtypes.Request{Tx: testTx}) - - if tc.expPass { - s.Require().NoError(txErr) - s.Require().NoError(txHandlerErr) - s.Require().NotNil(newCtx) - } else { - switch { - case txErr != nil: - s.Require().Error(txErr) - s.Require().True(errors.Is(txErr, tc.expErr)) - - case txHandlerErr != nil: - s.Require().Error(txHandlerErr) - s.Require().True(errors.Is(txHandlerErr, tc.expErr)) - - default: - s.Fail("expected one of txErr,txHandlerErr to be an error") - } - } - }) -} - -// TestCase represents a test case used in test tables. -type TestCase struct { - desc string - malleate func() - simulate bool - expPass bool - expErr error -} - -func TestMWTestSuite(t *testing.T) { - suite.Run(t, new(MWTestSuite)) -} diff --git a/x/auth/middleware/tips.go b/x/auth/middleware/tips.go deleted file mode 100644 index 68749b020647..000000000000 --- a/x/auth/middleware/tips.go +++ /dev/null @@ -1,69 +0,0 @@ -package middleware - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -type tipsTxHandler struct { - next tx.Handler - bankKeeper types.BankKeeper -} - -// NewTipMiddleware returns a new middleware for handling transactions with -// tips. -func NewTipMiddleware(bankKeeper types.BankKeeper) tx.Middleware { - return func(txh tx.Handler) tx.Handler { - return tipsTxHandler{txh, bankKeeper} - } -} - -var _ tx.Handler = tipsTxHandler{} - -// CheckTx implements tx.Handler.CheckTx. -func (txh tipsTxHandler) CheckTx(ctx context.Context, req tx.Request, checkTx tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - res, resCheckTx, err := txh.next.CheckTx(ctx, req, checkTx) - res, err = txh.transferTip(ctx, req, res, err) - - return res, resCheckTx, err -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (txh tipsTxHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - res, err := txh.next.DeliverTx(ctx, req) - - return txh.transferTip(ctx, req, res, err) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (txh tipsTxHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - res, err := txh.next.SimulateTx(ctx, req) - - return txh.transferTip(ctx, req, res, err) -} - -// transferTip transfers the tip from the tipper to the fee payer. -func (txh tipsTxHandler) transferTip(ctx context.Context, req tx.Request, res tx.Response, err error) (tx.Response, error) { - tipTx, ok := req.Tx.(tx.TipTx) - - // No-op if the tx doesn't have tips. - if !ok || tipTx.GetTip() == nil { - return res, err - } - - sdkCtx := sdk.UnwrapSDKContext(ctx) - tipper, err := sdk.AccAddressFromBech32(tipTx.GetTip().Tipper) - if err != nil { - return tx.Response{}, err - } - - err = txh.bankKeeper.SendCoins(sdkCtx, tipper, tipTx.FeePayer(), tipTx.GetTip().Amount) - if err != nil { - return tx.Response{}, err - } - - return res, nil -} diff --git a/x/auth/middleware/tips_test.go b/x/auth/middleware/tips_test.go deleted file mode 100644 index 769aa0c4194a..000000000000 --- a/x/auth/middleware/tips_test.go +++ /dev/null @@ -1,206 +0,0 @@ -package middleware_test - -import ( - "time" - - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/client" - clienttx "github.com/cosmos/cosmos-sdk/client/tx" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" -) - -var initialRegens = sdk.NewCoins(sdk.NewCoin("regen", sdk.NewInt(1000))) -var initialAtoms = sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(1000))) - -// setupAcctsForTips sets up 2 accounts: -// - tipper has 1000 regens -// - feePayer has 1000 atoms and 1000 regens -func (s *MWTestSuite) setupAcctsForTips(ctx sdk.Context) (sdk.Context, []testAccount) { - accts := s.createTestAccounts(ctx, 2, initialRegens) - feePayer := accts[1] - err := s.app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, initialAtoms) - s.Require().NoError(err) - err = s.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, feePayer.acc.GetAddress(), initialAtoms) - s.Require().NoError(err) - - // Create dummy proposal for tipper to vote on. - prop, err := govtypes.NewProposal([]sdk.Msg{banktypes.NewMsgSend(accts[0].acc.GetAddress(), accts[0].acc.GetAddress(), initialRegens)}, 1, "", time.Now(), time.Now().Add(time.Hour)) - s.Require().NoError(err) - s.app.GovKeeper.SetProposal(ctx, prop) - s.app.GovKeeper.ActivateVotingPeriod(ctx, prop) - - // Move to next block to commit previous data to state. - s.app.EndBlock(abci.RequestEndBlock{Height: ctx.BlockHeight()}) - s.app.Commit() - - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - s.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: ctx.BlockHeight()}}) - - return ctx, accts -} - -func (s *MWTestSuite) TestTips() { - var msg sdk.Msg - - testcases := []struct { - name string - tip sdk.Coins - fee sdk.Coins - gasLimit uint64 - expErr bool - expErrStr string - }{ - { - "wrong tip denom", - sdk.NewCoins(sdk.NewCoin("foobar", sdk.NewInt(1000))), initialAtoms, 200000, - true, "0foobar is smaller than 1000foobar: insufficient funds", - }, - { - "insufficient tip from tipper", - sdk.NewCoins(sdk.NewCoin("regen", sdk.NewInt(5000))), initialAtoms, 200000, - true, "1000regen is smaller than 5000regen: insufficient funds", - }, - { - "insufficient fees from feePayer", - initialRegens, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(5000))), 200000, - true, "1000atom is smaller than 5000atom: insufficient funds: insufficient funds", - }, - { - "insufficient gas", - initialRegens, initialAtoms, 100, - true, "out of gas in location: ReadFlat; gasWanted: 100, gasUsed: 1000: out of gas", - }, - { - "happy case", - initialRegens, initialAtoms, 200000, - false, "", - }, - } - - for _, tc := range testcases { - tc := tc - s.Run(tc.name, func() { - ctx := s.SetupTest(false) // reset - ctx, accts := s.setupAcctsForTips(ctx) - tipper, feePayer := accts[0], accts[1] - - msg = govtypes.NewMsgVote(tipper.acc.GetAddress(), 1, govtypes.OptionYes, "") - - auxSignerData := s.mkTipperAuxSignerData(tipper.priv, msg, tc.tip, signing.SignMode_SIGN_MODE_DIRECT_AUX, tipper.accNum, 0, ctx.ChainID()) - feePayerTxBuilder := s.mkFeePayerTxBuilder(s.clientCtx, auxSignerData, feePayer.priv, signing.SignMode_SIGN_MODE_DIRECT, tx.Fee{Amount: tc.fee, GasLimit: tc.gasLimit}, feePayer.accNum, 0, ctx.ChainID()) - - _, res, err := s.app.SimDeliver(s.clientCtx.TxConfig.TxEncoder(), feePayerTxBuilder.GetTx()) - - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrStr) - } else { - s.Require().NoError(err) - s.Require().NotNil(res) - - // Move to next block to commit previous data to state. - s.app.EndBlock(abci.RequestEndBlock{Height: ctx.BlockHeight()}) - s.app.Commit() - - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - s.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: ctx.BlockHeight()}}) - - // Make sure tip is correctly transferred to feepayer, and fee is paid. - expTipperRegens := initialRegens.Sub(tc.tip) - expFeePayerRegens := initialRegens.Add(tc.tip...) - expFeePayerAtoms := initialAtoms.Sub(tc.fee) - s.Require().True(expTipperRegens.AmountOf("regen").Equal(s.app.BankKeeper.GetBalance(ctx, tipper.acc.GetAddress(), "regen").Amount)) - s.Require().True(expFeePayerRegens.AmountOf("regen").Equal(s.app.BankKeeper.GetBalance(ctx, feePayer.acc.GetAddress(), "regen").Amount)) - s.Require().True(expFeePayerAtoms.AmountOf("atom").Equal(s.app.BankKeeper.GetBalance(ctx, feePayer.acc.GetAddress(), "atom").Amount)) - // Make sure MsgVote has been submitted by tipper. - votes := s.app.GovKeeper.GetAllVotes(ctx) - s.Require().Len(votes, 1) - s.Require().Equal(tipper.acc.GetAddress().String(), votes[0].Voter) - } - }) - } -} - -func (s *MWTestSuite) mkTipperAuxSignerData( - tipperPriv cryptotypes.PrivKey, msg sdk.Msg, tip sdk.Coins, - signMode signing.SignMode, accNum, accSeq uint64, chainID string, -) tx.AuxSignerData { - tipperAddr := sdk.AccAddress(tipperPriv.PubKey().Address()).String() - b := clienttx.NewAuxTxBuilder() - b.SetAddress(tipperAddr) - b.SetAccountNumber(accNum) - b.SetSequence(accSeq) - err := b.SetMsgs(msg) - s.Require().NoError(err) - b.SetTip(&tx.Tip{Amount: tip, Tipper: tipperAddr}) - err = b.SetSignMode(signMode) - s.Require().NoError(err) - b.SetSequence(accSeq) - err = b.SetPubKey(tipperPriv.PubKey()) - s.Require().NoError(err) - b.SetChainID(chainID) - - signBz, err := b.GetSignBytes() - s.Require().NoError(err) - sig, err := tipperPriv.Sign(signBz) - s.Require().NoError(err) - b.SetSignature(sig) - - auxSignerData, err := b.GetAuxSignerData() - s.Require().NoError(err) - - return auxSignerData -} - -func (s *MWTestSuite) mkFeePayerTxBuilder( - clientCtx client.Context, - auxSignerData tx.AuxSignerData, - feePayerPriv cryptotypes.PrivKey, signMode signing.SignMode, - fee tx.Fee, accNum, accSeq uint64, chainID string, -) client.TxBuilder { - txBuilder := clientCtx.TxConfig.NewTxBuilder() - err := txBuilder.AddAuxSignerData(auxSignerData) - s.Require().NoError(err) - txBuilder.SetFeePayer(sdk.AccAddress(feePayerPriv.PubKey().Address())) - txBuilder.SetFeeAmount(fee.Amount) - txBuilder.SetGasLimit(fee.GasLimit) - - // Calling SetSignatures with empty sig to populate AuthInfo. - tipperSigsV2, err := auxSignerData.GetSignatureV2() - s.Require().NoError(err) - feePayerSigV2 := signing.SignatureV2{ - PubKey: feePayerPriv.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signMode, - Signature: nil, - }} - sigsV2 := append([]signing.SignatureV2{tipperSigsV2}, feePayerSigV2) - txBuilder.SetSignatures(sigsV2...) - - // Actually sign the data. - signerData := authsigning.SignerData{ - Address: sdk.AccAddress(feePayerPriv.PubKey().Address()).String(), - ChainID: chainID, - AccountNumber: accNum, - Sequence: accSeq, - PubKey: feePayerPriv.PubKey(), - } - feePayerSigV2, err = clienttx.SignWithPrivKey( - signMode, signerData, - txBuilder, feePayerPriv, clientCtx.TxConfig, accSeq) - s.Require().NoError(err) - sigsV2 = append([]signing.SignatureV2{tipperSigsV2}, feePayerSigV2) - err = txBuilder.SetSignatures(sigsV2...) - s.Require().NoError(err) - - return txBuilder -} diff --git a/x/auth/middleware/tx.go b/x/auth/middleware/tx.go deleted file mode 100644 index f543524f3fa7..000000000000 --- a/x/auth/middleware/tx.go +++ /dev/null @@ -1,77 +0,0 @@ -package middleware - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx" -) - -type txDecoderHandler struct { - next tx.Handler - txDecoder sdk.TxDecoder -} - -// NewTxDecoderMiddleware creates a new middleware that will decode tx bytes -// into a sdk.Tx. As input request, at least one of Tx or TxBytes must be set. -// If only TxBytes is set, then TxDecoderMiddleware will populate the Tx field. -// If only Tx is set, then TxBytes will be left empty, but some middlewares -// such as signature verification might fail. -func NewTxDecoderMiddleware(txDecoder sdk.TxDecoder) tx.Middleware { - return func(txh tx.Handler) tx.Handler { - return txDecoderHandler{next: txh, txDecoder: txDecoder} - } -} - -var _ tx.Handler = gasTxHandler{} - -// CheckTx implements tx.Handler.CheckTx. -func (h txDecoderHandler) CheckTx(ctx context.Context, req tx.Request, checkReq tx.RequestCheckTx) (tx.Response, tx.ResponseCheckTx, error) { - newReq, err := h.populateReq(req) - if err != nil { - return tx.Response{}, tx.ResponseCheckTx{}, err - } - - return h.next.CheckTx(ctx, newReq, checkReq) -} - -// DeliverTx implements tx.Handler.DeliverTx. -func (h txDecoderHandler) DeliverTx(ctx context.Context, req tx.Request) (tx.Response, error) { - newReq, err := h.populateReq(req) - if err != nil { - return tx.Response{}, err - } - - return h.next.DeliverTx(ctx, newReq) -} - -// SimulateTx implements tx.Handler.SimulateTx method. -func (h txDecoderHandler) SimulateTx(ctx context.Context, req tx.Request) (tx.Response, error) { - newReq, err := h.populateReq(req) - if err != nil { - return tx.Response{}, err - } - - return h.next.SimulateTx(ctx, newReq) -} - -// populateReq takes a tx.Request, and if its Tx field is not set, then -// decodes the TxBytes and populates the decoded Tx field. It leaves -// req.TxBytes untouched. -func (h txDecoderHandler) populateReq(req tx.Request) (tx.Request, error) { - if len(req.TxBytes) == 0 && req.Tx == nil { - return tx.Request{}, sdkerrors.ErrInvalidRequest.Wrap("got empty tx request") - } - - sdkTx := req.Tx - var err error - if len(req.TxBytes) != 0 { - sdkTx, err = h.txDecoder(req.TxBytes) - if err != nil { - return tx.Request{}, err - } - } - - return tx.Request{Tx: sdkTx, TxBytes: req.TxBytes}, nil -} diff --git a/x/auth/middleware/tx_test.go b/x/auth/middleware/tx_test.go deleted file mode 100644 index 8624aadbfea2..000000000000 --- a/x/auth/middleware/tx_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package middleware_test - -import ( - "context" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" -) - -func (s *MWTestSuite) TestTxDecoderMiddleware() { - ctx := s.SetupTest(true) // setup - require := s.Require() - - // Create a tx. - priv1, _, addr1 := testdata.KeyTestPubAddr() - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - err := txBuilder.SetMsgs(testdata.NewTestMsg(addr1)) - require.NoError(err) - sdkTx, txBz, err := s.createTestTx(txBuilder, []cryptotypes.PrivKey{priv1}, []uint64{1}, []uint64{0}, ctx.ChainID()) - require.NoError(err) - - // Create a custom tx.Handler that checks that the req.Tx field is - // correctly populated. - txReqChecker := customTxHandler{func(c context.Context, r tx.Request) (tx.Response, error) { - require.NotNil(r.Tx) - require.Equal(sdkTx.GetMsgs()[0], r.Tx.GetMsgs()[0]) - return tx.Response{}, nil - }} - - testcases := []struct { - name string - req tx.Request - expErr bool - }{ - {"empty tx bz", tx.Request{}, true}, - {"tx bz and tx both given as inputs", tx.Request{Tx: sdkTx, TxBytes: txBz}, false}, - {"tx bz only given as input", tx.Request{TxBytes: txBz}, false}, - {"tx only given as input", tx.Request{Tx: sdkTx}, false}, - } - for _, tc := range testcases { - s.Run(tc.name, func() { - txHandler := middleware.ComposeMiddlewares( - txReqChecker, - middleware.NewTxDecoderMiddleware(s.clientCtx.TxConfig.TxDecoder()), - ) - _, err := txHandler.DeliverTx(sdk.WrapSDKContext(ctx), tc.req) - if tc.expErr { - require.Error(err) - } else { - require.NoError(err) - } - }) - } -} diff --git a/x/auth/migrations/legacytx/stdtx_builder.go b/x/auth/migrations/legacytx/stdtx_builder.go index 0c0454034947..35d26ce02e1f 100644 --- a/x/auth/migrations/legacytx/stdtx_builder.go +++ b/x/auth/migrations/legacytx/stdtx_builder.go @@ -190,7 +190,7 @@ func mkDecoder(unmarshaler Unmarshaler) sdk.TxDecoder { if len(txBytes) == 0 { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "tx bytes are empty") } - var tx = StdTx{} + tx := StdTx{} // StdTx.Msg is an interface. The concrete types // are registered by MakeTxCodec err := unmarshaler(txBytes, &tx) diff --git a/x/auth/migrations/legacytx/stdtx_test.go b/x/auth/migrations/legacytx/stdtx_test.go index c883a2faa2ea..2e69427c5af2 100644 --- a/x/auth/migrations/legacytx/stdtx_test.go +++ b/x/auth/migrations/legacytx/stdtx_test.go @@ -26,7 +26,7 @@ var ( ) func init() { - var amino = codec.NewLegacyAmino() + amino := codec.NewLegacyAmino() RegisterLegacyAminoCodec(amino) } diff --git a/x/auth/migrations/v034/types.go b/x/auth/migrations/v034/types.go deleted file mode 100644 index e028b0874044..000000000000 --- a/x/auth/migrations/v034/types.go +++ /dev/null @@ -1,28 +0,0 @@ -// Package v034 is used for legacy migration scripts. Actual migration scripts -// for v034 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v034 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - ModuleName = "auth" -) - -type ( - Params struct { - MaxMemoCharacters uint64 `json:"max_memo_characters"` - TxSigLimit uint64 `json:"tx_sig_limit"` - TxSizeCostPerByte uint64 `json:"tx_size_cost_per_byte"` - SigVerifyCostED25519 uint64 `json:"sig_verify_cost_ed25519"` - SigVerifyCostSecp256k1 uint64 `json:"sig_verify_cost_secp256k1"` - } - - GenesisState struct { - CollectedFees sdk.Coins `json:"collected_fees"` - Params Params `json:"params"` - } -) diff --git a/x/auth/migrations/v038/types.go b/x/auth/migrations/v038/types.go deleted file mode 100644 index be782a05bfa6..000000000000 --- a/x/auth/migrations/v038/types.go +++ /dev/null @@ -1,533 +0,0 @@ -// Package v038 is used for legacy migration scripts. Actual migration scripts -// for v038 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -package v038 - -// DONTCOVER - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "sort" - "strings" - - tmcrypto "github.com/tendermint/tendermint/crypto" - - "github.com/cosmos/cosmos-sdk/codec" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" - v034auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v034" -) - -const ( - ModuleName = "auth" -) - -type ( - // partial interface needed only for amino encoding and sanitization - Account interface { - GetAddress() sdk.AccAddress - GetAccountNumber() uint64 - GetCoins() sdk.Coins - SetCoins(sdk.Coins) error - } - - GenesisAccount interface { - Account - - Validate() error - } - - GenesisAccounts []GenesisAccount - - GenesisState struct { - Params v034auth.Params `json:"params" yaml:"params"` - Accounts GenesisAccounts `json:"accounts" yaml:"accounts"` - } - - BaseAccount struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - } - - baseAccountPretty struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey string `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - } - - BaseVestingAccount struct { - *BaseAccount - - OriginalVesting sdk.Coins `json:"original_vesting"` - DelegatedFree sdk.Coins `json:"delegated_free"` - DelegatedVesting sdk.Coins `json:"delegated_vesting"` - - EndTime int64 `json:"end_time"` - } - - vestingAccountPretty struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey string `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` - DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` - DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` - EndTime int64 `json:"end_time" yaml:"end_time"` - - // custom fields based on concrete vesting type which can be omitted - StartTime int64 `json:"start_time,omitempty" yaml:"start_time,omitempty"` - } - - ContinuousVestingAccount struct { - *BaseVestingAccount - - StartTime int64 `json:"start_time"` - } - - DelayedVestingAccount struct { - *BaseVestingAccount - } - - ModuleAccount struct { - *BaseAccount - - Name string `json:"name" yaml:"name"` - Permissions []string `json:"permissions" yaml:"permissions"` - } - - moduleAccountPretty struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey string `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - Name string `json:"name" yaml:"name"` - Permissions []string `json:"permissions" yaml:"permissions"` - } -) - -func NewGenesisState(params v034auth.Params, accounts GenesisAccounts) GenesisState { - return GenesisState{ - Params: params, - Accounts: accounts, - } -} - -func NewBaseAccountWithAddress(addr sdk.AccAddress) BaseAccount { - return BaseAccount{ - Address: addr, - } -} - -func NewBaseAccount( - address sdk.AccAddress, coins sdk.Coins, pk cryptotypes.PubKey, accountNumber, sequence uint64, -) *BaseAccount { - - return &BaseAccount{ - Address: address, - Coins: coins, - PubKey: pk, - AccountNumber: accountNumber, - Sequence: sequence, - } -} - -func (acc BaseAccount) GetAddress() sdk.AccAddress { - return acc.Address -} - -func (acc *BaseAccount) GetAccountNumber() uint64 { - return acc.AccountNumber -} - -func (acc *BaseAccount) GetCoins() sdk.Coins { - return acc.Coins -} - -func (acc *BaseAccount) SetCoins(coins sdk.Coins) error { - acc.Coins = coins - return nil -} - -func (acc BaseAccount) Validate() error { - if acc.PubKey != nil && acc.Address != nil && - !bytes.Equal(acc.PubKey.Address().Bytes(), acc.Address.Bytes()) { - return errors.New("pubkey and address pair is invalid") - } - - return nil -} - -func (acc BaseAccount) MarshalJSON() ([]byte, error) { - alias := baseAccountPretty{ - Address: acc.Address, - Coins: acc.Coins, - AccountNumber: acc.AccountNumber, - Sequence: acc.Sequence, - } - - if acc.PubKey != nil { - pks, err := legacybech32.MarshalPubKey(legacybech32.AccPK, acc.PubKey) - if err != nil { - return nil, err - } - - alias.PubKey = pks - } - - return json.Marshal(alias) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a BaseAccount. -func (acc *BaseAccount) UnmarshalJSON(bz []byte) error { - var alias baseAccountPretty - if err := json.Unmarshal(bz, &alias); err != nil { - return err - } - - if alias.PubKey != "" { - pk, err := legacybech32.UnmarshalPubKey(legacybech32.AccPK, alias.PubKey) - if err != nil { - return err - } - - acc.PubKey = pk - } - - acc.Address = alias.Address - acc.Coins = alias.Coins - acc.AccountNumber = alias.AccountNumber - acc.Sequence = alias.Sequence - - return nil -} - -func NewBaseVestingAccount( - baseAccount *BaseAccount, originalVesting, delegatedFree, delegatedVesting sdk.Coins, endTime int64, -) *BaseVestingAccount { - - return &BaseVestingAccount{ - BaseAccount: baseAccount, - OriginalVesting: originalVesting, - DelegatedFree: delegatedFree, - DelegatedVesting: delegatedVesting, - EndTime: endTime, - } -} - -func (bva BaseVestingAccount) Validate() error { - return bva.BaseAccount.Validate() -} - -// MarshalJSON returns the JSON representation of a BaseVestingAccount. -func (bva BaseVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountPretty{ - Address: bva.Address, - Coins: bva.Coins, - AccountNumber: bva.AccountNumber, - Sequence: bva.Sequence, - OriginalVesting: bva.OriginalVesting, - DelegatedFree: bva.DelegatedFree, - DelegatedVesting: bva.DelegatedVesting, - EndTime: bva.EndTime, - } - - if bva.PubKey != nil { - pks, err := legacybech32.MarshalPubKey(legacybech32.AccPK, bva.PubKey) - if err != nil { - return nil, err - } - - alias.PubKey = pks - } - - return json.Marshal(alias) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a BaseVestingAccount. -func (bva *BaseVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountPretty - if err := json.Unmarshal(bz, &alias); err != nil { - return err - } - - var ( - pk cryptotypes.PubKey - err error - ) - - if alias.PubKey != "" { - pk, err = legacybech32.UnmarshalPubKey(legacybech32.AccPK, alias.PubKey) - if err != nil { - return err - } - } - - bva.BaseAccount = NewBaseAccount(alias.Address, alias.Coins, pk, alias.AccountNumber, alias.Sequence) - bva.OriginalVesting = alias.OriginalVesting - bva.DelegatedFree = alias.DelegatedFree - bva.DelegatedVesting = alias.DelegatedVesting - bva.EndTime = alias.EndTime - - return nil -} - -func NewContinuousVestingAccountRaw(bva *BaseVestingAccount, startTime int64) *ContinuousVestingAccount { - return &ContinuousVestingAccount{ - BaseVestingAccount: bva, - StartTime: startTime, - } -} - -func (cva ContinuousVestingAccount) Validate() error { - if cva.StartTime >= cva.EndTime { - return errors.New("vesting start-time cannot be before end-time") - } - - return cva.BaseVestingAccount.Validate() -} - -// MarshalJSON returns the JSON representation of a ContinuousVestingAccount. -func (cva ContinuousVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountPretty{ - Address: cva.Address, - Coins: cva.Coins, - AccountNumber: cva.AccountNumber, - Sequence: cva.Sequence, - OriginalVesting: cva.OriginalVesting, - DelegatedFree: cva.DelegatedFree, - DelegatedVesting: cva.DelegatedVesting, - EndTime: cva.EndTime, - StartTime: cva.StartTime, - } - - if cva.PubKey != nil { - pks, err := legacybech32.MarshalPubKey(legacybech32.AccPK, cva.PubKey) - if err != nil { - return nil, err - } - - alias.PubKey = pks - } - - return json.Marshal(alias) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a ContinuousVestingAccount. -func (cva *ContinuousVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountPretty - if err := json.Unmarshal(bz, &alias); err != nil { - return err - } - - var ( - pk cryptotypes.PubKey - err error - ) - - if alias.PubKey != "" { - pk, err = legacybech32.UnmarshalPubKey(legacybech32.AccPK, alias.PubKey) - if err != nil { - return err - } - } - - cva.BaseVestingAccount = &BaseVestingAccount{ - BaseAccount: NewBaseAccount(alias.Address, alias.Coins, pk, alias.AccountNumber, alias.Sequence), - OriginalVesting: alias.OriginalVesting, - DelegatedFree: alias.DelegatedFree, - DelegatedVesting: alias.DelegatedVesting, - EndTime: alias.EndTime, - } - cva.StartTime = alias.StartTime - - return nil -} - -func NewDelayedVestingAccountRaw(bva *BaseVestingAccount) *DelayedVestingAccount { - return &DelayedVestingAccount{ - BaseVestingAccount: bva, - } -} - -func (dva DelayedVestingAccount) Validate() error { - return dva.BaseVestingAccount.Validate() -} - -// MarshalJSON returns the JSON representation of a DelayedVestingAccount. -func (dva DelayedVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountPretty{ - Address: dva.Address, - Coins: dva.Coins, - AccountNumber: dva.AccountNumber, - Sequence: dva.Sequence, - OriginalVesting: dva.OriginalVesting, - DelegatedFree: dva.DelegatedFree, - DelegatedVesting: dva.DelegatedVesting, - EndTime: dva.EndTime, - } - - if dva.PubKey != nil { - pks, err := legacybech32.MarshalPubKey(legacybech32.AccPK, dva.PubKey) - if err != nil { - return nil, err - } - - alias.PubKey = pks - } - - return json.Marshal(alias) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a DelayedVestingAccount. -func (dva *DelayedVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountPretty - if err := json.Unmarshal(bz, &alias); err != nil { - return err - } - - var ( - pk cryptotypes.PubKey - err error - ) - - if alias.PubKey != "" { - pk, err = legacybech32.UnmarshalPubKey(legacybech32.AccPK, alias.PubKey) - if err != nil { - return err - } - } - - dva.BaseVestingAccount = &BaseVestingAccount{ - BaseAccount: NewBaseAccount(alias.Address, alias.Coins, pk, alias.AccountNumber, alias.Sequence), - OriginalVesting: alias.OriginalVesting, - DelegatedFree: alias.DelegatedFree, - DelegatedVesting: alias.DelegatedVesting, - EndTime: alias.EndTime, - } - - return nil -} - -func NewModuleAddress(name string) sdk.AccAddress { - return sdk.AccAddress(tmcrypto.AddressHash([]byte(name))) -} - -func NewModuleAccount(baseAccount *BaseAccount, name string, permissions ...string) *ModuleAccount { - return &ModuleAccount{ - BaseAccount: baseAccount, - Name: name, - Permissions: permissions, - } -} - -func (ma ModuleAccount) Validate() error { - if err := ValidatePermissions(ma.Permissions...); err != nil { - return err - } - - if strings.TrimSpace(ma.Name) == "" { - return errors.New("module account name cannot be blank") - } - - if !ma.Address.Equals(sdk.AccAddress(tmcrypto.AddressHash([]byte(ma.Name)))) { - return fmt.Errorf("address %s cannot be derived from the module name '%s'", ma.Address, ma.Name) - } - - return ma.BaseAccount.Validate() -} - -// MarshalJSON returns the JSON representation of a ModuleAccount. -func (ma ModuleAccount) MarshalJSON() ([]byte, error) { - return json.Marshal(moduleAccountPretty{ - Address: ma.Address, - Coins: ma.Coins, - PubKey: "", - AccountNumber: ma.AccountNumber, - Sequence: ma.Sequence, - Name: ma.Name, - Permissions: ma.Permissions, - }) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a ModuleAccount. -func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error { - var alias moduleAccountPretty - if err := json.Unmarshal(bz, &alias); err != nil { - return err - } - - ma.BaseAccount = NewBaseAccount(alias.Address, alias.Coins, nil, alias.AccountNumber, alias.Sequence) - ma.Name = alias.Name - ma.Permissions = alias.Permissions - - return nil -} - -func ValidatePermissions(permissions ...string) error { - for _, perm := range permissions { - if strings.TrimSpace(perm) == "" { - return fmt.Errorf("module permission is empty") - } - } - - return nil -} - -func SanitizeGenesisAccounts(genAccounts GenesisAccounts) GenesisAccounts { - sort.Slice(genAccounts, func(i, j int) bool { - return genAccounts[i].GetAccountNumber() < genAccounts[j].GetAccountNumber() - }) - - for _, acc := range genAccounts { - if err := acc.SetCoins(acc.GetCoins().Sort()); err != nil { - panic(err) - } - } - - return genAccounts -} - -func ValidateGenAccounts(genAccounts GenesisAccounts) error { - addrMap := make(map[string]bool, len(genAccounts)) - for _, acc := range genAccounts { - - // check for duplicated accounts - addrStr := acc.GetAddress().String() - if _, ok := addrMap[addrStr]; ok { - return fmt.Errorf("duplicate account found in genesis state; address: %s", addrStr) - } - - addrMap[addrStr] = true - - // check account specific validation - if err := acc.Validate(); err != nil { - return fmt.Errorf("invalid account found in genesis state; address: %s, error: %s", addrStr, err.Error()) - } - } - - return nil -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cryptocodec.RegisterCrypto(cdc) - cdc.RegisterInterface((*GenesisAccount)(nil), nil) - cdc.RegisterInterface((*Account)(nil), nil) - cdc.RegisterConcrete(&BaseAccount{}, "cosmos-sdk/Account", nil) - cdc.RegisterConcrete(&BaseVestingAccount{}, "cosmos-sdk/BaseVestingAccount", nil) - cdc.RegisterConcrete(&ContinuousVestingAccount{}, "cosmos-sdk/ContinuousVestingAccount", nil) - cdc.RegisterConcrete(&DelayedVestingAccount{}, "cosmos-sdk/DelayedVestingAccount", nil) - cdc.RegisterConcrete(&ModuleAccount{}, "cosmos-sdk/ModuleAccount", nil) -} diff --git a/x/auth/migrations/v039/types.go b/x/auth/migrations/v039/types.go deleted file mode 100644 index 0f4b7f6c15bc..000000000000 --- a/x/auth/migrations/v039/types.go +++ /dev/null @@ -1,428 +0,0 @@ -package v039 - -// DONTCOVER - -import ( - "bytes" - "errors" - "fmt" - "strings" - - tmcrypto "github.com/tendermint/tendermint/crypto" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - v034auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v034" - v038auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v038" -) - -const ( - ModuleName = "auth" -) - -type ( - GenesisState struct { - Params v034auth.Params `json:"params" yaml:"params"` - Accounts v038auth.GenesisAccounts `json:"accounts" yaml:"accounts"` - } - - BaseAccount struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - } - - BaseVestingAccount struct { - *BaseAccount - - OriginalVesting sdk.Coins `json:"original_vesting"` - DelegatedFree sdk.Coins `json:"delegated_free"` - DelegatedVesting sdk.Coins `json:"delegated_vesting"` - - EndTime int64 `json:"end_time"` - } - - vestingAccountJSON struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins"` - PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` - DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` - DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` - EndTime int64 `json:"end_time" yaml:"end_time"` - - // custom fields based on concrete vesting type which can be omitted - StartTime int64 `json:"start_time,omitempty" yaml:"start_time,omitempty"` - VestingPeriods Periods `json:"vesting_periods,omitempty" yaml:"vesting_periods,omitempty"` - } - - ContinuousVestingAccount struct { - *BaseVestingAccount - - StartTime int64 `json:"start_time"` - } - - DelayedVestingAccount struct { - *BaseVestingAccount - } - - Period struct { - Length int64 `json:"length" yaml:"length"` // length of the period, in seconds - Amount sdk.Coins `json:"amount" yaml:"amount"` // amount of coins vesting during this period - } - - Periods []Period - - PeriodicVestingAccount struct { - *BaseVestingAccount - StartTime int64 `json:"start_time" yaml:"start_time"` // when the coins start to vest - VestingPeriods Periods `json:"vesting_periods" yaml:"vesting_periods"` // the vesting schedule - } - - ModuleAccount struct { - *BaseAccount - - Name string `json:"name" yaml:"name"` - Permissions []string `json:"permissions" yaml:"permissions"` - } - - moduleAccountPretty struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins"` - PubKey string `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - Name string `json:"name" yaml:"name"` - Permissions []string `json:"permissions" yaml:"permissions"` - } -) - -func NewGenesisState(params v034auth.Params, accounts v038auth.GenesisAccounts) GenesisState { - return GenesisState{ - Params: params, - Accounts: accounts, - } -} - -func NewBaseAccountWithAddress(addr sdk.AccAddress) BaseAccount { - return BaseAccount{ - Address: addr, - } -} - -func NewBaseAccount( - address sdk.AccAddress, coins sdk.Coins, pk cryptotypes.PubKey, accountNumber, sequence uint64, -) *BaseAccount { - - return &BaseAccount{ - Address: address, - Coins: coins, - PubKey: pk, - AccountNumber: accountNumber, - Sequence: sequence, - } -} - -func (acc BaseAccount) GetAddress() sdk.AccAddress { - return acc.Address -} - -func (acc *BaseAccount) GetAccountNumber() uint64 { - return acc.AccountNumber -} - -func (acc *BaseAccount) GetCoins() sdk.Coins { - return acc.Coins -} - -func (acc *BaseAccount) SetCoins(coins sdk.Coins) error { - acc.Coins = coins - return nil -} - -func (acc BaseAccount) Validate() error { - if acc.PubKey != nil && acc.Address != nil && - !bytes.Equal(acc.PubKey.Address().Bytes(), acc.Address.Bytes()) { - return errors.New("pubkey and address pair is invalid") - } - - return nil -} - -func NewBaseVestingAccount( - baseAccount *BaseAccount, originalVesting, delegatedFree, delegatedVesting sdk.Coins, endTime int64, -) *BaseVestingAccount { - - return &BaseVestingAccount{ - BaseAccount: baseAccount, - OriginalVesting: originalVesting, - DelegatedFree: delegatedFree, - DelegatedVesting: delegatedVesting, - EndTime: endTime, - } -} - -func (bva BaseVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountJSON{ - Address: bva.Address, - Coins: bva.Coins, - PubKey: bva.PubKey, - AccountNumber: bva.AccountNumber, - Sequence: bva.Sequence, - OriginalVesting: bva.OriginalVesting, - DelegatedFree: bva.DelegatedFree, - DelegatedVesting: bva.DelegatedVesting, - EndTime: bva.EndTime, - } - - return legacy.Cdc.MarshalJSON(alias) -} - -func (bva *BaseVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountJSON - if err := legacy.Cdc.UnmarshalJSON(bz, &alias); err != nil { - return err - } - - bva.BaseAccount = NewBaseAccount(alias.Address, alias.Coins, alias.PubKey, alias.AccountNumber, alias.Sequence) - bva.OriginalVesting = alias.OriginalVesting - bva.DelegatedFree = alias.DelegatedFree - bva.DelegatedVesting = alias.DelegatedVesting - bva.EndTime = alias.EndTime - - return nil -} - -func (bva BaseVestingAccount) GetEndTime() int64 { - return bva.EndTime -} - -func (bva BaseVestingAccount) Validate() error { - return bva.BaseAccount.Validate() -} - -func NewContinuousVestingAccountRaw(bva *BaseVestingAccount, startTime int64) *ContinuousVestingAccount { - return &ContinuousVestingAccount{ - BaseVestingAccount: bva, - StartTime: startTime, - } -} - -func (cva ContinuousVestingAccount) Validate() error { - if cva.StartTime >= cva.EndTime { - return errors.New("vesting start-time cannot be before end-time") - } - - return cva.BaseVestingAccount.Validate() -} - -func (cva ContinuousVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountJSON{ - Address: cva.Address, - Coins: cva.Coins, - PubKey: cva.PubKey, - AccountNumber: cva.AccountNumber, - Sequence: cva.Sequence, - OriginalVesting: cva.OriginalVesting, - DelegatedFree: cva.DelegatedFree, - DelegatedVesting: cva.DelegatedVesting, - EndTime: cva.EndTime, - StartTime: cva.StartTime, - } - - return legacy.Cdc.MarshalJSON(alias) -} - -func (cva *ContinuousVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountJSON - if err := legacy.Cdc.UnmarshalJSON(bz, &alias); err != nil { - return err - } - - cva.BaseVestingAccount = &BaseVestingAccount{ - BaseAccount: NewBaseAccount(alias.Address, alias.Coins, alias.PubKey, alias.AccountNumber, alias.Sequence), - OriginalVesting: alias.OriginalVesting, - DelegatedFree: alias.DelegatedFree, - DelegatedVesting: alias.DelegatedVesting, - EndTime: alias.EndTime, - } - cva.StartTime = alias.StartTime - - return nil -} - -func NewDelayedVestingAccountRaw(bva *BaseVestingAccount) *DelayedVestingAccount { - return &DelayedVestingAccount{ - BaseVestingAccount: bva, - } -} - -func (dva DelayedVestingAccount) Validate() error { - return dva.BaseVestingAccount.Validate() -} - -func (dva DelayedVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountJSON{ - Address: dva.Address, - Coins: dva.Coins, - PubKey: dva.PubKey, - AccountNumber: dva.AccountNumber, - Sequence: dva.Sequence, - OriginalVesting: dva.OriginalVesting, - DelegatedFree: dva.DelegatedFree, - DelegatedVesting: dva.DelegatedVesting, - EndTime: dva.EndTime, - } - - return legacy.Cdc.MarshalJSON(alias) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a DelayedVestingAccount. -func (dva *DelayedVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountJSON - if err := legacy.Cdc.UnmarshalJSON(bz, &alias); err != nil { - return err - } - - dva.BaseVestingAccount = &BaseVestingAccount{ - BaseAccount: NewBaseAccount(alias.Address, alias.Coins, alias.PubKey, alias.AccountNumber, alias.Sequence), - OriginalVesting: alias.OriginalVesting, - DelegatedFree: alias.DelegatedFree, - DelegatedVesting: alias.DelegatedVesting, - EndTime: alias.EndTime, - } - - return nil -} - -func (pva PeriodicVestingAccount) GetStartTime() int64 { - return pva.StartTime -} - -func (pva PeriodicVestingAccount) Validate() error { - if pva.GetStartTime() >= pva.GetEndTime() { - return errors.New("vesting start-time cannot be before end-time") - } - endTime := pva.StartTime - originalVesting := sdk.NewCoins() - for _, p := range pva.VestingPeriods { - endTime += p.Length - originalVesting = originalVesting.Add(p.Amount...) - } - if endTime != pva.EndTime { - return errors.New("vesting end time does not match length of all vesting periods") - } - if !originalVesting.IsEqual(pva.OriginalVesting) { - return errors.New("original vesting coins does not match the sum of all coins in vesting periods") - } - - return pva.BaseVestingAccount.Validate() -} - -func (pva PeriodicVestingAccount) MarshalJSON() ([]byte, error) { - alias := vestingAccountJSON{ - Address: pva.Address, - Coins: pva.Coins, - PubKey: pva.PubKey, - AccountNumber: pva.AccountNumber, - Sequence: pva.Sequence, - OriginalVesting: pva.OriginalVesting, - DelegatedFree: pva.DelegatedFree, - DelegatedVesting: pva.DelegatedVesting, - EndTime: pva.EndTime, - StartTime: pva.StartTime, - VestingPeriods: pva.VestingPeriods, - } - - return legacy.Cdc.MarshalJSON(alias) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a PeriodicVestingAccount. -func (pva *PeriodicVestingAccount) UnmarshalJSON(bz []byte) error { - var alias vestingAccountJSON - if err := legacy.Cdc.UnmarshalJSON(bz, &alias); err != nil { - return err - } - - pva.BaseVestingAccount = &BaseVestingAccount{ - BaseAccount: NewBaseAccount(alias.Address, alias.Coins, alias.PubKey, alias.AccountNumber, alias.Sequence), - OriginalVesting: alias.OriginalVesting, - DelegatedFree: alias.DelegatedFree, - DelegatedVesting: alias.DelegatedVesting, - EndTime: alias.EndTime, - } - pva.StartTime = alias.StartTime - pva.VestingPeriods = alias.VestingPeriods - - return nil -} - -func NewModuleAccount(baseAccount *BaseAccount, name string, permissions ...string) *ModuleAccount { - return &ModuleAccount{ - BaseAccount: baseAccount, - Name: name, - Permissions: permissions, - } -} - -func (ma ModuleAccount) Validate() error { - if err := v038auth.ValidatePermissions(ma.Permissions...); err != nil { - return err - } - - if strings.TrimSpace(ma.Name) == "" { - return errors.New("module account name cannot be blank") - } - - if x := sdk.AccAddress(tmcrypto.AddressHash([]byte(ma.Name))); !ma.Address.Equals(x) { - return fmt.Errorf("address %s cannot be derived from the module name '%s'; expected: %s", ma.Address, ma.Name, x) - } - - return ma.BaseAccount.Validate() -} - -// MarshalJSON returns the JSON representation of a ModuleAccount. -func (ma ModuleAccount) MarshalJSON() ([]byte, error) { - return legacy.Cdc.MarshalJSON(moduleAccountPretty{ - Address: ma.Address, - Coins: ma.Coins, - PubKey: "", - AccountNumber: ma.AccountNumber, - Sequence: ma.Sequence, - Name: ma.Name, - Permissions: ma.Permissions, - }) -} - -// UnmarshalJSON unmarshals raw JSON bytes into a ModuleAccount. -func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error { - var alias moduleAccountPretty - if err := legacy.Cdc.UnmarshalJSON(bz, &alias); err != nil { - return err - } - - ma.BaseAccount = NewBaseAccount(alias.Address, alias.Coins, nil, alias.AccountNumber, alias.Sequence) - ma.Name = alias.Name - ma.Permissions = alias.Permissions - - return nil -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cryptocodec.RegisterCrypto(cdc) - cdc.RegisterInterface((*v038auth.GenesisAccount)(nil), nil) - cdc.RegisterInterface((*v038auth.Account)(nil), nil) - cdc.RegisterConcrete(&BaseAccount{}, "cosmos-sdk/Account", nil) - cdc.RegisterConcrete(&BaseVestingAccount{}, "cosmos-sdk/BaseVestingAccount", nil) - cdc.RegisterConcrete(&ContinuousVestingAccount{}, "cosmos-sdk/ContinuousVestingAccount", nil) - cdc.RegisterConcrete(&DelayedVestingAccount{}, "cosmos-sdk/DelayedVestingAccount", nil) - cdc.RegisterConcrete(&PeriodicVestingAccount{}, "cosmos-sdk/PeriodicVestingAccount", nil) - cdc.RegisterConcrete(&ModuleAccount{}, "cosmos-sdk/ModuleAccount", nil) -} diff --git a/x/auth/migrations/v040/migrate.go b/x/auth/migrations/v040/migrate.go deleted file mode 100644 index 3c46f5b9acde..000000000000 --- a/x/auth/migrations/v040/migrate.go +++ /dev/null @@ -1,125 +0,0 @@ -package v040 - -import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - v039auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v039" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/types" - v040vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" -) - -// convertBaseAccount converts a 0.39 BaseAccount to a 0.40 BaseAccount. -func convertBaseAccount(old *v039auth.BaseAccount) *v040auth.BaseAccount { - var any *codectypes.Any - - if old.PubKey != nil { - var err error - any, err = codectypes.NewAnyWithValue(old.PubKey) - if err != nil { - panic(err) - } - } - - return &v040auth.BaseAccount{ - Address: old.Address.String(), - PubKey: any, - AccountNumber: old.AccountNumber, - Sequence: old.Sequence, - } -} - -// convertBaseVestingAccount converts a 0.39 BaseVestingAccount to a 0.40 BaseVestingAccount. -func convertBaseVestingAccount(old *v039auth.BaseVestingAccount) *v040vesting.BaseVestingAccount { - baseAccount := convertBaseAccount(old.BaseAccount) - - return &v040vesting.BaseVestingAccount{ - BaseAccount: baseAccount, - OriginalVesting: old.OriginalVesting, - DelegatedFree: old.DelegatedFree, - DelegatedVesting: old.DelegatedVesting, - EndTime: old.EndTime, - } -} - -// Migrate accepts exported x/auth genesis state from v0.38/v0.39 and migrates -// it to v0.40 x/auth genesis state. The migration includes: -// -// - Removing coins from account encoding. -// - Re-encode in v0.40 GenesisState. -func Migrate(authGenState v039auth.GenesisState) *v040auth.GenesisState { - // Convert v0.39 accounts to v0.40 ones. - var v040Accounts = make([]v040auth.GenesisAccount, len(authGenState.Accounts)) - for i, v039Account := range authGenState.Accounts { - switch v039Account := v039Account.(type) { - case *v039auth.BaseAccount: - { - v040Accounts[i] = convertBaseAccount(v039Account) - } - case *v039auth.ModuleAccount: - { - v040Accounts[i] = &v040auth.ModuleAccount{ - BaseAccount: convertBaseAccount(v039Account.BaseAccount), - Name: v039Account.Name, - Permissions: v039Account.Permissions, - } - } - case *v039auth.BaseVestingAccount: - { - v040Accounts[i] = convertBaseVestingAccount(v039Account) - } - case *v039auth.ContinuousVestingAccount: - { - v040Accounts[i] = &v040vesting.ContinuousVestingAccount{ - BaseVestingAccount: convertBaseVestingAccount(v039Account.BaseVestingAccount), - StartTime: v039Account.StartTime, - } - } - case *v039auth.DelayedVestingAccount: - { - v040Accounts[i] = &v040vesting.DelayedVestingAccount{ - BaseVestingAccount: convertBaseVestingAccount(v039Account.BaseVestingAccount), - } - } - case *v039auth.PeriodicVestingAccount: - { - vestingPeriods := make([]v040vesting.Period, len(v039Account.VestingPeriods)) - for j, period := range v039Account.VestingPeriods { - vestingPeriods[j] = v040vesting.Period{ - Length: period.Length, - Amount: period.Amount, - } - } - v040Accounts[i] = &v040vesting.PeriodicVestingAccount{ - BaseVestingAccount: convertBaseVestingAccount(v039Account.BaseVestingAccount), - StartTime: v039Account.StartTime, - VestingPeriods: vestingPeriods, - } - } - default: - panic(sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "got invalid type %T", v039Account)) - } - - } - - // Convert v0.40 accounts into Anys. - anys := make([]*codectypes.Any, len(v040Accounts)) - for i, v040Account := range v040Accounts { - any, err := codectypes.NewAnyWithValue(v040Account) - if err != nil { - panic(err) - } - - anys[i] = any - } - - return &v040auth.GenesisState{ - Params: v040auth.Params{ - MaxMemoCharacters: authGenState.Params.MaxMemoCharacters, - TxSigLimit: authGenState.Params.TxSigLimit, - TxSizeCostPerByte: authGenState.Params.TxSizeCostPerByte, - SigVerifyCostED25519: authGenState.Params.SigVerifyCostED25519, - SigVerifyCostSecp256k1: authGenState.Params.SigVerifyCostSecp256k1, - }, - Accounts: anys, - } -} diff --git a/x/auth/migrations/v040/migrate_test.go b/x/auth/migrations/v040/migrate_test.go deleted file mode 100644 index cc9bb532193a..000000000000 --- a/x/auth/migrations/v040/migrate_test.go +++ /dev/null @@ -1,255 +0,0 @@ -package v040_test - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - v034 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v034" - v038auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v038" - v039auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v039" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithCodec(encodingConfig.Codec) - - coins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - - // BaseAccount - pk1 := secp256k1.GenPrivKeyFromSecret([]byte("acc1")).PubKey() - acc1 := v039auth.NewBaseAccount(sdk.AccAddress(pk1.Address()), coins, pk1, 1, 0) - - // ModuleAccount - pk2 := secp256k1.GenPrivKeyFromSecret([]byte("acc2")).PubKey() - acc2 := v039auth.NewModuleAccount( - v039auth.NewBaseAccount(sdk.AccAddress(pk2.Address()), coins, pk2, 1, 0), - "module2", - "permission2", - ) - - // BaseVestingAccount - pk3 := secp256k1.GenPrivKeyFromSecret([]byte("acc3")).PubKey() - acc3 := v039auth.NewBaseVestingAccount( - v039auth.NewBaseAccount(sdk.AccAddress(pk3.Address()), coins, pk3, 1, 0), - coins, coins, coins, - 1580309973, - ) - - // ContinuousVestingAccount - pk4 := secp256k1.GenPrivKeyFromSecret([]byte("acc4")).PubKey() - acc4 := v039auth.NewContinuousVestingAccountRaw( - v039auth.NewBaseVestingAccount(v039auth.NewBaseAccount(sdk.AccAddress(pk4.Address()), coins, pk4, 1, 0), coins, nil, nil, 3160620846), - 1580309974, - ) - - // PeriodicVestingAccount - pk5 := secp256k1.GenPrivKeyFromSecret([]byte("acc5")).PubKey() - acc5 := &v039auth.PeriodicVestingAccount{ - BaseVestingAccount: v039auth.NewBaseVestingAccount(v039auth.NewBaseAccount(sdk.AccAddress(pk5.Address()), coins, pk5, 1, 0), coins, nil, nil, 3160620846), - StartTime: 1580309975, - VestingPeriods: v039auth.Periods{v039auth.Period{Length: 32, Amount: coins}}, - } - - // DelayedVestingAccount - pk6 := secp256k1.GenPrivKeyFromSecret([]byte("acc6")).PubKey() - acc6 := &v039auth.DelayedVestingAccount{ - BaseVestingAccount: v039auth.NewBaseVestingAccount(v039auth.NewBaseAccount(sdk.AccAddress(pk6.Address()), coins, pk6, 1, 0), coins, nil, nil, 3160620846), - } - - // BaseAccount with nil pubkey (coming from older genesis). - pk7 := secp256k1.GenPrivKeyFromSecret([]byte("acc7")).PubKey() - acc7 := v039auth.NewBaseAccount(sdk.AccAddress(pk7.Address()), coins, nil, 1, 0) - - gs := v039auth.GenesisState{ - Params: v034.Params{ - MaxMemoCharacters: 10, - TxSigLimit: 20, - TxSizeCostPerByte: 30, - SigVerifyCostED25519: 40, - SigVerifyCostSecp256k1: 50, - }, - Accounts: v038auth.GenesisAccounts{acc1, acc2, acc3, acc4, acc5, acc6, acc7}, - } - - migrated := v040auth.Migrate(gs) - expected := `{ - "accounts": [ - { - "@type": "/cosmos.auth.v1beta1.BaseAccount", - "account_number": "1", - "address": "cosmos13syh7de9xndv9wmklccpfvc0d8dcyvay4s6z6l", - "pub_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A8oWyJkohwy8XZ0Df92jFMBTtTPMvYJplYIrlEHTKPYk" - }, - "sequence": "0" - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "account_number": "1", - "address": "cosmos1v57fx2l2rt6ehujuu99u2fw05779m5e2ux4z2h", - "pub_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "AruDygh5HprMOpHOEato85dLgAsybMJVyxBGUa3KuWCr" - }, - "sequence": "0" - }, - "name": "module2", - "permissions": [ - "permission2" - ] - }, - { - "@type": "/cosmos.vesting.v1beta1.BaseVestingAccount", - "base_account": { - "account_number": "1", - "address": "cosmos18hnp9fjflrkeeqn4gmhjhzljusxzmjeartdckw", - "pub_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A5aEFDIdQHh0OYmNXNv1sHBNURDWWgVkXC2IALcWLLwJ" - }, - "sequence": "0" - }, - "delegated_free": [ - { - "amount": "50", - "denom": "stake" - } - ], - "delegated_vesting": [ - { - "amount": "50", - "denom": "stake" - } - ], - "end_time": "1580309973", - "original_vesting": [ - { - "amount": "50", - "denom": "stake" - } - ] - }, - { - "@type": "/cosmos.vesting.v1beta1.ContinuousVestingAccount", - "base_vesting_account": { - "base_account": { - "account_number": "1", - "address": "cosmos1t9kvvejvk6hjtddx6antck39s206csqduq3ke3", - "pub_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "AoXDzxwTnljemHxfnJcwrKqODBP6Q2l3K3U3UhVDzyah" - }, - "sequence": "0" - }, - "delegated_free": [], - "delegated_vesting": [], - "end_time": "3160620846", - "original_vesting": [ - { - "amount": "50", - "denom": "stake" - } - ] - }, - "start_time": "1580309974" - }, - { - "@type": "/cosmos.vesting.v1beta1.PeriodicVestingAccount", - "base_vesting_account": { - "base_account": { - "account_number": "1", - "address": "cosmos1s4ss9zquz7skvguechzlk3na635jdrecl0sgy2", - "pub_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A2a4P4TQ1OKzpfu0eKnCoEtmTvoiclSx0G9higenUGws" - }, - "sequence": "0" - }, - "delegated_free": [], - "delegated_vesting": [], - "end_time": "3160620846", - "original_vesting": [ - { - "amount": "50", - "denom": "stake" - } - ] - }, - "start_time": "1580309975", - "vesting_periods": [ - { - "amount": [ - { - "amount": "50", - "denom": "stake" - } - ], - "length": "32" - } - ] - }, - { - "@type": "/cosmos.vesting.v1beta1.DelayedVestingAccount", - "base_vesting_account": { - "base_account": { - "account_number": "1", - "address": "cosmos1mcc6rwrj4hswf8p9ct82c7lmf77w9tuk07rha4", - "pub_key": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "A4tuAfmZlhjK5cjp6ImR704miybHnITVNOyJORdDPFu3" - }, - "sequence": "0" - }, - "delegated_free": [], - "delegated_vesting": [], - "end_time": "3160620846", - "original_vesting": [ - { - "amount": "50", - "denom": "stake" - } - ] - } - }, - { - "@type": "/cosmos.auth.v1beta1.BaseAccount", - "account_number": "1", - "address": "cosmos16ydaqh0fcnh4qt7a3jme4mmztm2qel5axcpw00", - "pub_key": null, - "sequence": "0" - } - ], - "params": { - "max_memo_characters": "10", - "sig_verify_cost_ed25519": "40", - "sig_verify_cost_secp256k1": "50", - "tx_sig_limit": "20", - "tx_size_cost_per_byte": "30" - } -}` - - bz, err := clientCtx.Codec.MarshalJSON(migrated) - require.NoError(t, err) - - // Indent the JSON bz correctly. - var jsonObj map[string]interface{} - err = json.Unmarshal(bz, &jsonObj) - require.NoError(t, err) - indentedBz, err := json.MarshalIndent(jsonObj, "", " ") - require.NoError(t, err) - - require.Equal(t, expected, string(indentedBz)) -} diff --git a/x/auth/migrations/v040/store.go b/x/auth/migrations/v040/store.go deleted file mode 100644 index 9fb81b60a749..000000000000 --- a/x/auth/migrations/v040/store.go +++ /dev/null @@ -1,4 +0,0 @@ -package v040 - -// AddrLen defines a valid address length -const AddrLen = 20 diff --git a/x/auth/migrations/v040/types.go b/x/auth/migrations/v042/types.go similarity index 51% rename from x/auth/migrations/v040/types.go rename to x/auth/migrations/v042/types.go index 1e1f3eee9791..ecc3dc7b3c6c 100644 --- a/x/auth/migrations/v040/types.go +++ b/x/auth/migrations/v042/types.go @@ -1,5 +1,6 @@ -package v040 +package v042 const ( ModuleName = "auth" + AddrLen = 20 ) diff --git a/x/auth/migrations/v043/store.go b/x/auth/migrations/v043/store.go index f95f1b3a1bb7..a097d0ef0400 100644 --- a/x/auth/migrations/v043/store.go +++ b/x/auth/migrations/v043/store.go @@ -48,7 +48,6 @@ const ( // PLEASE DO NOT REPLICATE THIS PATTERN IN YOUR OWN APP. func migrateVestingAccounts(ctx sdk.Context, account types.AccountI, queryServer grpc.Server) (types.AccountI, error) { bondDenom, err := getBondDenom(ctx, queryServer) - if err != nil { return nil, err } @@ -64,7 +63,6 @@ func migrateVestingAccounts(ctx sdk.Context, account types.AccountI, queryServer addr, queryServer, ) - if err != nil { return nil, err } @@ -74,7 +72,6 @@ func migrateVestingAccounts(ctx sdk.Context, account types.AccountI, queryServer addr, queryServer, ) - if err != nil { return nil, err } @@ -85,7 +82,6 @@ func migrateVestingAccounts(ctx sdk.Context, account types.AccountI, queryServer bondDenom, queryServer, ) - if err != nil { return nil, err } diff --git a/x/auth/migrations/v043/store_test.go b/x/auth/migrations/v043/store_test.go index cae87b96885c..df7902c191bd 100644 --- a/x/auth/migrations/v043/store_test.go +++ b/x/auth/migrations/v043/store_test.go @@ -32,7 +32,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has vested, multiple delegations less than the total account balance", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(200))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) @@ -57,7 +56,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has vested, single delegations which exceed the vested amount", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(200))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) @@ -78,7 +76,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has vested, multiple delegations which exceed the vested amount", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(200))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) @@ -103,7 +100,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has not vested, single delegations which exceed the vested amount", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(200))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) @@ -122,7 +118,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has not vested, multiple delegations which exceed the vested amount", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(200))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().AddDate(1, 0, 0).Unix()) @@ -185,7 +180,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has vested, single delegation greater than the total account balance", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(300))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) @@ -206,7 +200,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "continuous vesting, start time after blocktime", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - startTime := ctx.BlockTime().AddDate(1, 0, 0).Unix() endTime := ctx.BlockTime().AddDate(2, 0, 0).Unix() baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) @@ -229,7 +222,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "continuous vesting, start time passed but not ended", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - startTime := ctx.BlockTime().AddDate(-1, 0, 0).Unix() endTime := ctx.BlockTime().AddDate(2, 0, 0).Unix() baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) @@ -252,7 +244,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "continuous vesting, start time and endtime passed", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - startTime := ctx.BlockTime().AddDate(-2, 0, 0).Unix() endTime := ctx.BlockTime().AddDate(-1, 0, 0).Unix() baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) @@ -275,7 +266,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "periodic vesting account, yet to be vested, some rewards delegated", func(app *simapp.SimApp, ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(100))) @@ -597,7 +587,6 @@ func TestMigrateVestingAccounts(t *testing.T) { ) }) } - } func trackingCorrected(ctx sdk.Context, t *testing.T, ak authkeeper.AccountKeeper, addr sdk.AccAddress, expDelVesting sdk.Coins, expDelFree sdk.Coins) { diff --git a/x/auth/migrations/v046/store.go b/x/auth/migrations/v046/store.go new file mode 100644 index 000000000000..8cb7c15bd6a9 --- /dev/null +++ b/x/auth/migrations/v046/store.go @@ -0,0 +1,31 @@ +package v046 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +func mapAccountAddressToAccountID(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { + store := ctx.KVStore(storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.AddressStoreKeyPrefix) + + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + var acc types.AccountI + if err := cdc.UnmarshalInterface(iterator.Value(), &acc); err != nil { + return err + } + store.Set(types.AccountNumberStoreKey(acc.GetAccountNumber()), acc.GetAddress().Bytes()) + } + + return nil +} + +// MigrateStore performs in-place store migrations from v0.45 to v0.46. The +// migration includes: +// - Add an Account number as an index to get the account address +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { + return mapAccountAddressToAccountID(ctx, storeKey, cdc) +} diff --git a/x/auth/migrations/v046/store_test.go b/x/auth/migrations/v046/store_test.go new file mode 100644 index 000000000000..48bd52d4b82a --- /dev/null +++ b/x/auth/migrations/v046/store_test.go @@ -0,0 +1,68 @@ +package v046_test + +import ( + "math/rand" + "testing" + "time" + + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// TestMigrateMapAccAddressToAccNumberKey test cases for state migration of map to accAddr to accNum +func TestMigrateMapAccAddressToAccNumberKey(t *testing.T) { + app := simapp.Setup(t, false) + + // new base account + senderPrivKey := secp256k1.GenPrivKey() + randAccNumber := uint64(rand.Intn(100000-10000) + 10000) + acc := types.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), randAccNumber, 0) + + ctx := app.BaseApp.NewContext(false, tmproto.Header{ + Time: time.Now(), + }) + + m := keeper.NewMigrator(app.AccountKeeper, app.GRPCQueryRouter()) + + // set the account to store with map acc addr to acc number + require.NoError(t, m.V45_SetAccount(ctx, acc)) + + testCases := []struct { + name string + doMigration bool + accNum uint64 + }{ + { + name: "without state migration", + doMigration: false, + accNum: acc.AccountNumber, + }, + { + name: "with state migration", + doMigration: true, + accNum: acc.AccountNumber, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + if tc.doMigration { + require.NoError(t, m.Migrate2to3(ctx)) + } + + // get the account address by acc id + accAddr := app.AccountKeeper.GetAccountAddressByID(ctx, tc.accNum) + + if tc.doMigration { + require.Equal(t, accAddr, acc.Address) + } else { + require.Equal(t, len(accAddr), 0) + } + }) + } +} diff --git a/x/auth/module.go b/x/auth/module.go index dfb125058bd9..cd15593a7c76 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -59,11 +58,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return types.ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the auth module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/auth` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the auth module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -135,6 +129,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err != nil { panic(err) } + + err = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the auth module. It returns @@ -142,28 +141,19 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.accountKeeper, genesisState) + am.accountKeeper.InitGenesis(ctx, genesisState) return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the auth // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - gs := ExportGenesis(ctx, am.accountKeeper) + gs := am.accountKeeper.ExportGenesis(ctx) return cdc.MustMarshalJSON(gs) } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } - -// BeginBlock returns the begin blocker for the auth module. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock returns the end blocker for the auth module. It returns no validator -// updates. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} +func (AppModule) ConsensusVersion() uint64 { return 3 } // AppModuleSimulation functions diff --git a/x/auth/posthandler/post.go b/x/auth/posthandler/post.go new file mode 100644 index 000000000000..8d3fb7776c63 --- /dev/null +++ b/x/auth/posthandler/post.go @@ -0,0 +1,15 @@ +package posthandler + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// HandlerOptions are the options required for constructing a default SDK PostHandler. +type HandlerOptions struct{} + +// NewPostHandler returns an empty posthandler chain. +func NewPostHandler(options HandlerOptions) (sdk.AnteHandler, error) { + postDecorators := []sdk.AnteDecorator{} + + return sdk.ChainAnteDecorators(postDecorators...), nil +} diff --git a/x/auth/posthandler/tips.go b/x/auth/posthandler/tips.go new file mode 100644 index 000000000000..f956d53e5442 --- /dev/null +++ b/x/auth/posthandler/tips.go @@ -0,0 +1,51 @@ +package posthandler + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// ValidateBasicDecorator will call tx.ValidateBasic and return any non-nil error. +// If ValidateBasic passes, decorator calls next AnteHandler in chain. Note, +// ValidateBasicDecorator decorator will not get executed on ReCheckTx since it +// is not dependent on application state. +type tipDecorator struct { + bankKeeper types.BankKeeper +} + +// NewTipDecorator returns a new decorator for handling transactions with +// tips. +// +// IMPORTANT: This decorator is still in beta, please use it at your own risk. +func NewTipDecorator(bankKeeper types.BankKeeper) sdk.AnteDecorator { + return tipDecorator{ + bankKeeper: bankKeeper, + } +} + +func (d tipDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + err := d.transferTip(ctx, tx) + if err != nil { + return ctx, err + } + + return next(ctx, tx, simulate) +} + +// transferTip transfers the tip from the tipper to the fee payer. +func (d tipDecorator) transferTip(ctx sdk.Context, sdkTx sdk.Tx) error { + tipTx, ok := sdkTx.(tx.TipTx) + + // No-op if the tx doesn't have tips. + if !ok || tipTx.GetTip() == nil { + return nil + } + + tipper, err := sdk.AccAddressFromBech32(tipTx.GetTip().Tipper) + if err != nil { + return err + } + + return d.bankKeeper.SendCoins(ctx, tipper, tipTx.FeePayer(), tipTx.GetTip().Amount) +} diff --git a/x/auth/signing/sign_mode_handler.go b/x/auth/signing/sign_mode_handler.go index 57d201dbdedd..d4faff3d05cf 100644 --- a/x/auth/signing/sign_mode_handler.go +++ b/x/auth/signing/sign_mode_handler.go @@ -42,7 +42,7 @@ type SignerData struct { // since in SIGN_MODE_DIRECT the account sequence is already in the signer // info. // - // In case of multisigs, this should be the multisig account number. + // In case of multisigs, this should be the multisig sequence. Sequence uint64 // PubKey is the public key of the signer. diff --git a/x/auth/signing/verify_test.go b/x/auth/signing/verify_test.go index 3d138e1f7742..db91bc15e06d 100644 --- a/x/auth/signing/verify_test.go +++ b/x/auth/signing/verify_test.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" + "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -42,7 +42,7 @@ func TestVerifySignature(t *testing.T) { app.AccountKeeper.SetAccount(ctx, acc1) balances := sdk.NewCoins(sdk.NewInt64Coin("atom", 200)) require.NoError(t, testutil.FundAccount(app.BankKeeper, ctx, addr, balances)) - acc, err := middleware.GetSignerAcc(ctx, app.AccountKeeper, addr) + acc, err := ante.GetSignerAcc(ctx, app.AccountKeeper, addr) require.NoError(t, err) require.NoError(t, testutil.FundAccount(app.BankKeeper, ctx, addr, balances)) diff --git a/x/auth/simulation/genesis.go b/x/auth/simulation/genesis.go index 2da36b54fa82..4b31bf7d49e0 100644 --- a/x/auth/simulation/genesis.go +++ b/x/auth/simulation/genesis.go @@ -35,7 +35,7 @@ func RandomGenesisAccounts(simState *module.SimulationState) types.GenesisAccoun continue } - initialVesting := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, simState.Rand.Int63n(simState.InitialStake))) + initialVesting := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, simState.Rand.Int63n(simState.InitialStake.Int64()))) var endTime int64 startTime := simState.GenTimestamp.Unix() diff --git a/x/auth/simulation/genesis_test.go b/x/auth/simulation/genesis_test.go index 830a264ff4c6..4b8f48ef76b0 100644 --- a/x/auth/simulation/genesis_test.go +++ b/x/auth/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -31,7 +32,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/auth/spec/03_antehandlers.md b/x/auth/spec/03_antehandlers.md index b695d8597dc5..3227d8dff276 100644 --- a/x/auth/spec/03_antehandlers.md +++ b/x/auth/spec/03_antehandlers.md @@ -5,7 +5,7 @@ order: 3 # AnteHandlers The `x/auth` module presently has no transaction handlers of its own, but does expose the special `AnteHandler`, used for performing basic validity checks on a transaction, such that it could be thrown out of the mempool. -The `AnteHandler` can be seen as a set of decorators that check transactions within the current context, per [ADR 010](https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-alpha1/docs/architecture/adr-010-modular-antehandler.md). +The `AnteHandler` can be seen as a set of decorators that check transactions within the current context, per [ADR 010](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-010-modular-antehandler.md). Note that the `AnteHandler` is called on both `CheckTx` and `DeliverTx`, as Tendermint proposers presently have the ability to include in their proposed block transactions which fail `CheckTx`. diff --git a/x/auth/spec/05_vesting.md b/x/auth/spec/05_vesting.md index ec3b3a76086a..2108c658c6a6 100644 --- a/x/auth/spec/05_vesting.md +++ b/x/auth/spec/05_vesting.md @@ -100,19 +100,19 @@ type VestingAccount interface { ### BaseVestingAccount -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L10-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/vesting/v1beta1/vesting.proto#L10-L24 ### ContinuousVestingAccount -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L35-L43 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/vesting/v1beta1/vesting.proto#L26-L34 ### DelayedVestingAccount -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L45-L53 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/vesting/v1beta1/vesting.proto#L36-L44 ### Period -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L56-L62 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/vesting/v1beta1/vesting.proto#L46-L53 ```go // Stores all vesting periods passed as part of a PeriodicVestingAccount @@ -122,7 +122,7 @@ type Periods []Period ### PeriodicVestingAccount -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L64-L73 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/vesting/v1beta1/vesting.proto#L55-L64 In order to facilitate less ad-hoc type checking and assertions and to support flexibility in account balance usage, the existing `x/bank` `ViewKeeper` interface @@ -142,7 +142,7 @@ type ViewKeeper interface { ### PermanentLockedAccount -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/vesting/v1beta1/vesting.proto#L78-L83 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/vesting/v1beta1/vesting.proto#L55-L64 ## Vesting Account Specification diff --git a/x/auth/spec/README.md b/x/auth/spec/README.md index 789c376e96fd..1090bb6baa1e 100644 --- a/x/auth/spec/README.md +++ b/x/auth/spec/README.md @@ -13,7 +13,7 @@ This document specifies the auth module of the Cosmos SDK. The auth module is responsible for specifying the base transaction and account types for an application, since the SDK itself is agnostic to these particulars. It contains -the ante handler, where all basic transaction validity checks (signatures, nonces, auxiliary fields) +the middlewares, where all basic transaction validity checks (signatures, nonces, auxiliary fields) are performed, and exposes the account keeper, which allows other modules to read, write, and modify accounts. This module is used in the Cosmos Hub. @@ -25,7 +25,6 @@ This module is used in the Cosmos Hub. 2. **[State](02_state.md)** * [Accounts](02_state.md#accounts) 3. **[AnteHandlers](03_antehandlers.md)** - * [Handlers](03_antehandlers.md#handlers) 4. **[Keepers](04_keepers.md)** * [Account Keeper](04_keepers.md#account-keeper) 5. **[Vesting](05_vesting.md)** diff --git a/x/auth/testutil/suite.go b/x/auth/testutil/suite.go index d1ef1ba5f7c9..924f2366ca3b 100644 --- a/x/auth/testutil/suite.go +++ b/x/auth/testutil/suite.go @@ -154,9 +154,11 @@ func (s *TxConfigTestSuite) TestTxBuilderSetSignatures() { s.Require().NoError(err) msigData = multisig.NewMultisig(2) multisig.AddSignature(msigData, &signingtypes.SingleSignatureData{ - SignMode: signModeHandler.DefaultMode(), Signature: mSigBz1}, 0) + SignMode: signModeHandler.DefaultMode(), Signature: mSigBz1, + }, 0) multisig.AddSignature(msigData, &signingtypes.SingleSignatureData{ - SignMode: signModeHandler.DefaultMode(), Signature: mSigBz2}, 0) + SignMode: signModeHandler.DefaultMode(), Signature: mSigBz2, + }, 0) // set signature sigData1.Signature = sigBz diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index edcfd630ca82..4a4d81492e9d 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -11,7 +11,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" + "github.com/cosmos/cosmos-sdk/x/auth/ante" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) @@ -37,7 +37,7 @@ var ( _ authsigning.Tx = &wrapper{} _ client.TxBuilder = &wrapper{} _ tx.TipTx = &wrapper{} - _ middleware.HasExtensionOptionsTx = &wrapper{} + _ ante.HasExtensionOptionsTx = &wrapper{} _ ExtensionOptionsTxBuilder = &wrapper{} _ tx.TipTx = &wrapper{} ) @@ -140,11 +140,7 @@ func (w *wrapper) GetFee() sdk.Coins { func (w *wrapper) FeePayer() sdk.AccAddress { feePayer := w.tx.AuthInfo.Fee.Payer if feePayer != "" { - payerAddr, err := sdk.AccAddressFromBech32(feePayer) - if err != nil { - panic(err) - } - return payerAddr + return sdk.MustAccAddressFromBech32(feePayer) } // use first signer as default if no payer specified return w.GetSigners()[0] @@ -153,11 +149,7 @@ func (w *wrapper) FeePayer() sdk.AccAddress { func (w *wrapper) FeeGranter() sdk.AccAddress { feePayer := w.tx.AuthInfo.Fee.Granter if feePayer != "" { - granterAddr, err := sdk.AccAddressFromBech32(feePayer) - if err != nil { - panic(err) - } - return granterAddr + return sdk.MustAccAddressFromBech32(feePayer) } return nil } diff --git a/x/auth/tx/direct_aux.go b/x/auth/tx/direct_aux.go index 475b4e2e3522..636130981377 100644 --- a/x/auth/tx/direct_aux.go +++ b/x/auth/tx/direct_aux.go @@ -30,7 +30,6 @@ func (signModeDirectAuxHandler) Modes() []signingtypes.SignMode { func (signModeDirectAuxHandler) GetSignBytes( mode signingtypes.SignMode, data signing.SignerData, tx sdk.Tx, ) ([]byte, error) { - if mode != signingtypes.SignMode_SIGN_MODE_DIRECT_AUX { return nil, fmt.Errorf("expected %s, got %s", signingtypes.SignMode_SIGN_MODE_DIRECT_AUX, mode) } diff --git a/x/auth/tx/encode_decode_test.go b/x/auth/tx/encode_decode_test.go index 5991f6653450..db6c3d995ed9 100644 --- a/x/auth/tx/encode_decode_test.go +++ b/x/auth/tx/encode_decode_test.go @@ -198,7 +198,7 @@ func TestRejectNonADR027(t *testing.T) { // bodyBz's length prefix is 5, with `5` as varint encoding. We also try a // longer varint encoding for 5: `133 00`. - longVarintBodyBz := append(append([]byte{bodyBz[0]}, byte(133), byte(00)), bodyBz[2:]...) + longVarintBodyBz := append(append([]byte{bodyBz[0]}, byte(133), byte(0o0)), bodyBz[2:]...) tests := []struct { name string @@ -259,15 +259,24 @@ func TestVarintMinLength(t *testing.T) { tests := []struct { n uint64 }{ - {1<<7 - 1}, {1 << 7}, - {1<<14 - 1}, {1 << 14}, - {1<<21 - 1}, {1 << 21}, - {1<<28 - 1}, {1 << 28}, - {1<<35 - 1}, {1 << 35}, - {1<<42 - 1}, {1 << 42}, - {1<<49 - 1}, {1 << 49}, - {1<<56 - 1}, {1 << 56}, - {1<<63 - 1}, {1 << 63}, + {1<<7 - 1}, + {1 << 7}, + {1<<14 - 1}, + {1 << 14}, + {1<<21 - 1}, + {1 << 21}, + {1<<28 - 1}, + {1 << 28}, + {1<<35 - 1}, + {1 << 35}, + {1<<42 - 1}, + {1 << 42}, + {1<<49 - 1}, + {1 << 49}, + {1<<56 - 1}, + {1 << 56}, + {1<<63 - 1}, + {1 << 63}, {math.MaxUint64}, } diff --git a/x/auth/tx/encoder.go b/x/auth/tx/encoder.go index 35cecac556eb..e594ee24cfc8 100644 --- a/x/auth/tx/encoder.go +++ b/x/auth/tx/encoder.go @@ -42,6 +42,5 @@ func DefaultJSONTxEncoder(cdc codec.ProtoCodecMarshaler) sdk.TxEncoder { } return nil, fmt.Errorf("expected %T, got %T", &wrapper{}, tx) - } } diff --git a/x/auth/tx/query.go b/x/auth/tx/query.go index a508bd32f0a0..7028a1c4f163 100644 --- a/x/auth/tx/query.go +++ b/x/auth/tx/query.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -27,11 +27,11 @@ func QueryTxsByEvents(clientCtx client.Context, events []string, page, limit int } if page <= 0 { - return nil, errors.New("page must greater than 0") + return nil, errors.New("page must be greater than 0") } if limit <= 0 { - return nil, errors.New("limit must greater than 0") + return nil, errors.New("limit must be greater than 0") } // XXX: implement ANY @@ -77,7 +77,7 @@ func QueryTx(clientCtx client.Context, hashHexStr string) (*sdk.TxResponse, erro return nil, err } - //TODO: this may not always need to be proven + // TODO: this may not always need to be proven // https://github.com/cosmos/cosmos-sdk/issues/6807 resTx, err := node.Tx(context.Background(), hash, true) if err != nil { diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 293542f4d383..7904bdcaccb2 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -3,9 +3,11 @@ package tx import ( "context" "fmt" + "strings" + "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "strings" + "github.com/cosmos/cosmos-sdk/types/query" gogogrpc "github.com/gogo/protobuf/grpc" "github.com/golang/protobuf/proto" // nolint: staticcheck @@ -51,9 +53,16 @@ func (s txServer) GetTxsEvent(ctx context.Context, req *txtypes.GetTxsEventReque return nil, status.Error(codes.InvalidArgument, "request cannot be nil") } - page, limit, err := pagination.ParsePagination(req.Pagination) - if err != nil { - return nil, err + page := int(req.Page) + // Tendermint node.TxSearch that is used for querying txs defines pages starting from 1, + // so we default to 1 if not provided in the request. + if page == 0 { + page = 1 + } + + limit := int(req.Limit) + if limit == 0 { + limit = query.DefaultLimit } orderBy := parseOrderBy(req.OrderBy) @@ -87,9 +96,7 @@ func (s txServer) GetTxsEvent(ctx context.Context, req *txtypes.GetTxsEventReque return &txtypes.GetTxsEventResponse{ Txs: txsList, TxResponses: result.Txs, - Pagination: &pagination.PageResponse{ - Total: result.TotalCount, - }, + Total: result.TotalCount, }, nil } @@ -180,7 +187,7 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith "or greater than the current height %d", req.Height, currentHeight) } - blockId, block, err := tmservice.GetProtoBlock(ctx, s.clientCtx, &req.Height) + blockID, block, err := tmservice.GetProtoBlock(ctx, s.clientCtx, &req.Height) if err != nil { return nil, err } @@ -197,7 +204,7 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith blockTxs := block.Data.Txs blockTxsLn := uint64(len(blockTxs)) txs := make([]*txtypes.Tx, 0, limit) - if offset >= blockTxsLn { + if offset >= blockTxsLn && blockTxsLn != 0 { return nil, sdkerrors.ErrInvalidRequest.Wrapf("out of range: cannot paginate %d txs with offset %d and limit %d", blockTxsLn, offset, limit) } decodeTxAt := func(i uint64) error { @@ -229,13 +236,12 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith return &txtypes.GetBlockWithTxsResponse{ Txs: txs, - BlockId: &blockId, + BlockId: &blockID, Block: block, Pagination: &pagination.PageResponse{ Total: blockTxsLn, }, }, nil - } func (s txServer) BroadcastTx(ctx context.Context, req *txtypes.BroadcastTxRequest) (*txtypes.BroadcastTxResponse, error) { diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index 28481c57c38c..ca1a0186e333 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -79,7 +79,7 @@ func (s *IntegrationTestSuite) SetupSuite() { ) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &s.txRes)) - s.Require().Equal(uint32(0), s.txRes.Code) + s.Require().Equal(uint32(0), s.txRes.Code, s.txRes) out, err = bankcli.MsgSendExec( val.ClientCtx, @@ -151,10 +151,8 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPC() { // - tx.* events: tx.fee, tx.acc_seq, tx.signature // - Sending Amount to recipient: coin_spent, coin_received, transfer and message.sender= // - Msg events: message.module=bank and message.action=/cosmos.bank.v1beta1.MsgSend - s.Require().Equal(len(res.GetResult().GetEvents()), 13) - s.Require().Len(res.GetResult().MsgResponses, 1) - // Check the result and gas used are correct. - s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. + s.Require().Equal(len(res.GetResult().GetEvents()), 13) // 1 coin recv 1 coin spent, 1 transfer, 3 messages. + s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. } }) } @@ -194,9 +192,9 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPCGateway() { err = val.ClientCtx.Codec.UnmarshalJSON(res, &result) s.Require().NoError(err) // Check the result and gas used are correct. - s.Require().Equal(len(result.GetResult().GetEvents()), 13) // See TestSimulateTx_GRPC for the 13 events. s.Require().Len(result.GetResult().MsgResponses, 1) - s.Require().True(result.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. + s.Require().Equal(len(result.GetResult().GetEvents()), 13) // See TestSimulateTx_GRPC for the 13 events. + s.Require().True(result.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, jus } }) } @@ -208,21 +206,22 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { req *tx.GetTxsEventRequest expErr bool expErrMsg string + expLen int }{ { "nil request", nil, - true, "request cannot be nil", + true, "request cannot be nil", 0, }, { "empty request", &tx.GetTxsEventRequest{}, - true, "must declare at least one event to search", + true, "must declare at least one event to search", 0, }, { "request with dummy event", &tx.GetTxsEventRequest{Events: []string{"foobar"}}, - true, "event foobar should be of the format: {eventType}.{eventAttribute}={value}", + true, "event foobar should be of the format: {eventType}.{eventAttribute}={value}", 0, }, { "request with order-by", @@ -230,33 +229,30 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { Events: []string{bankMsgSendEventAction}, OrderBy: tx.OrderBy_ORDER_BY_ASC, }, - false, "", + false, "", 3, }, { "without pagination", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction}, }, - false, "", + false, "", 3, }, { "with pagination", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction}, - Pagination: &query.PageRequest{ - CountTotal: false, - Offset: 0, - Limit: 1, - }, + Page: 2, + Limit: 2, }, - false, "", + false, "", 1, }, { "with multi events", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction, "message.module='bank'"}, }, - false, "", + false, "", 3, }, } for _, tc := range testCases { @@ -270,7 +266,7 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { s.Require().NoError(err) s.Require().GreaterOrEqual(len(grpcRes.Txs), 1) s.Require().Equal("foobar", grpcRes.Txs[0].Body.Memo) - + s.Require().Equal(len(grpcRes.Txs), tc.expLen) // Make sure fields are populated. // ref: https://github.com/cosmos/cosmos-sdk/issues/8680 // ref: https://github.com/cosmos/cosmos-sdk/issues/8681 @@ -288,54 +284,55 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPCGateway() { url string expErr bool expErrMsg string + expLen int }{ { "empty params", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs", val.APIAddress), true, - "must declare at least one event to search", + "must declare at least one event to search", 0, }, { "without pagination", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s", val.APIAddress, bankMsgSendEventAction), false, - "", + "", 3, }, { "with pagination", - fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&pagination.offset=%d&pagination.limit=%d", val.APIAddress, bankMsgSendEventAction, 0, 10), + fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&page=%d&limit=%d", val.APIAddress, bankMsgSendEventAction, 2, 2), false, - "", + "", 1, }, { "valid request: order by asc", - fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=ORDER_BY_ASC", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), + fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=1", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), false, - "", + "", 3, }, { "valid request: order by desc", - fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=ORDER_BY_DESC", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), + fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=2", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), false, - "", + "", 3, }, { "invalid request: invalid order by", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=invalid_order", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), true, - "is not a valid tx.OrderBy", + "invalid syntax", 0, }, { "expect pass with multiple-events", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), false, - "", + "", 3, }, { "expect pass with escape event", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s", val.APIAddress, "message.action%3D'/cosmos.bank.v1beta1.MsgSend'"), false, - "", + "", 3, }, } for _, tc := range testCases { @@ -351,6 +348,7 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPCGateway() { s.Require().GreaterOrEqual(len(result.Txs), 1) s.Require().Equal("foobar", result.Txs[0].Body.Memo) s.Require().NotZero(result.TxResponses[0].Height) + s.Require().Equal(len(result.Txs), tc.expLen) } }) } @@ -617,14 +615,16 @@ func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPC() { req *tx.GetBlockWithTxsRequest expErr bool expErrMsg string + expTxsLen int }{ - {"nil request", nil, true, "request cannot be nil"}, - {"empty request", &tx.GetBlockWithTxsRequest{}, true, "height must not be less than 1 or greater than the current height"}, - {"bad height", &tx.GetBlockWithTxsRequest{Height: 99999999}, true, "height must not be less than 1 or greater than the current height"}, - {"bad pagination", &tx.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 1000, Limit: 100}}, true, "out of range"}, - {"good request", &tx.GetBlockWithTxsRequest{Height: s.txHeight}, false, ""}, - {"with pagination request", &tx.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 0, Limit: 1}}, false, ""}, - {"page all request", &tx.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 0, Limit: 100}}, false, ""}, + {"nil request", nil, true, "request cannot be nil", 0}, + {"empty request", &tx.GetBlockWithTxsRequest{}, true, "height must not be less than 1 or greater than the current height", 0}, + {"bad height", &tx.GetBlockWithTxsRequest{Height: 99999999}, true, "height must not be less than 1 or greater than the current height", 0}, + {"bad pagination", &tx.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 1000, Limit: 100}}, true, "out of range", 0}, + {"good request", &tx.GetBlockWithTxsRequest{Height: s.txHeight}, false, "", 1}, + {"with pagination request", &tx.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 0, Limit: 1}}, false, "", 1}, + {"page all request", &tx.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 0, Limit: 100}}, false, "", 1}, + {"block with 0 tx", &tx.GetBlockWithTxsRequest{Height: s.txHeight - 1, Pagination: &query.PageRequest{Offset: 0, Limit: 100}}, false, "", 0}, } for _, tc := range testCases { s.Run(tc.name, func() { @@ -635,7 +635,9 @@ func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPC() { s.Require().Contains(err.Error(), tc.expErrMsg) } else { s.Require().NoError(err) - s.Require().Equal("foobar", grpcRes.Txs[0].Body.Memo) + if tc.expTxsLen > 0 { + s.Require().Equal("foobar", grpcRes.Txs[0].Body.Memo) + } s.Require().Equal(grpcRes.Block.Header.Height, tc.req.Height) if tc.req.Pagination != nil { s.Require().LessOrEqual(len(grpcRes.Txs), int(tc.req.Pagination.Limit)) diff --git a/x/auth/tx/sigs.go b/x/auth/tx/sigs.go index e2d5d63a6015..7d4716acec75 100644 --- a/x/auth/tx/sigs.go +++ b/x/auth/tx/sigs.go @@ -89,7 +89,7 @@ func ModeInfoAndSigToSignatureData(modeInfo *tx.ModeInfo, sig []byte) (signing.S } } -// decodeMultisignatures safely decodes the the raw bytes as a MultiSignature protobuf message +// decodeMultisignatures safely decodes the raw bytes as a MultiSignature protobuf message func decodeMultisignatures(bz []byte) ([][]byte, error) { multisig := cryptotypes.MultiSignature{} err := multisig.Unmarshal(bz) diff --git a/x/auth/types/account.go b/x/auth/types/account.go index 762a416b0f8a..a8331c82c8eb 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -203,7 +203,7 @@ func (ma ModuleAccount) HasPermission(permission string) bool { return false } -// GetName returns the the name of the holder's module +// GetName returns the name of the holder's module func (ma ModuleAccount) GetName() string { return ma.Name } diff --git a/x/auth/types/genesis_test.go b/x/auth/types/genesis_test.go index 1030885e799e..7e96036053fc 100644 --- a/x/auth/types/genesis_test.go +++ b/x/auth/types/genesis_test.go @@ -81,9 +81,7 @@ func TestGenesisAccountIterator(t *testing.T) { } func TestPackAccountsAny(t *testing.T) { - var ( - accounts []*codectypes.Any - ) + var accounts []*codectypes.Any testCases := []struct { msg string diff --git a/x/auth/types/keys.go b/x/auth/types/keys.go index 4cb2538f252c..e3488bbc07a2 100644 --- a/x/auth/types/keys.go +++ b/x/auth/types/keys.go @@ -24,9 +24,17 @@ var ( // param key for global account number GlobalAccountNumberKey = []byte("globalAccountNumber") + + // AccountNumberStoreKeyPrefix prefix for account-by-id store + AccountNumberStoreKeyPrefix = []byte("accountNumber") ) // AddressStoreKey turn an address to key used to get it from the account store func AddressStoreKey(addr sdk.AccAddress) []byte { return append(AddressStoreKeyPrefix, addr.Bytes()...) } + +// AccountNumberStoreKey turn an account number to key used to get the account address from account store +func AccountNumberStoreKey(accountNumber uint64) []byte { + return append(AccountNumberStoreKeyPrefix, sdk.Uint64ToBigEndian(accountNumber)...) +} diff --git a/x/auth/types/permissions_test.go b/x/auth/types/permissions_test.go index 75281a689ec3..de5c25645769 100644 --- a/x/auth/types/permissions_test.go +++ b/x/auth/types/permissions_test.go @@ -26,7 +26,6 @@ func TestHasPermission(t *testing.T) { has = permAddr.HasPermission(tc.permission) require.Equal(t, tc.expectHas, has, "test case #%d", i) } - } func TestValidatePermissions(t *testing.T) { diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 2a3f8493aa21..bbfd57379cd8 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -177,6 +177,8 @@ 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 { } @@ -343,6 +345,8 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest 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"` } @@ -387,7 +391,9 @@ func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { return nil } -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method +// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 type Bech32PrefixRequest struct { } @@ -424,7 +430,9 @@ func (m *Bech32PrefixRequest) XXX_DiscardUnknown() { var xxx_messageInfo_Bech32PrefixRequest proto.InternalMessageInfo -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method +// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 type Bech32PrefixResponse struct { Bech32Prefix string `protobuf:"bytes,1,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` } @@ -469,7 +477,9 @@ func (m *Bech32PrefixResponse) GetBech32Prefix() string { return "" } -// AddressBytesToStringRequest is the request type for AddressString rpc method +// AddressBytesToStringRequest is the request type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 type AddressBytesToStringRequest struct { AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` } @@ -514,7 +524,9 @@ func (m *AddressBytesToStringRequest) GetAddressBytes() []byte { return nil } -// AddressBytesToStringResponse is the response type for AddressString rpc method +// AddressBytesToStringResponse is the response type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 type AddressBytesToStringResponse struct { AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` } @@ -559,7 +571,9 @@ func (m *AddressBytesToStringResponse) GetAddressString() string { return "" } -// AddressStringToBytesRequest is the request type for AccountBytes rpc method +// AddressStringToBytesRequest is the request type for AccountBytes rpc method. +// +// Since: cosmos-sdk 0.46 type AddressStringToBytesRequest struct { AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` } @@ -604,7 +618,9 @@ func (m *AddressStringToBytesRequest) GetAddressString() string { return "" } -// AddressStringToBytesResponse is the response type for AddressBytes rpc method +// AddressStringToBytesResponse is the response type for AddressBytes rpc method. +// +// Since: cosmos-sdk 0.46 type AddressStringToBytesResponse struct { AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` } @@ -649,6 +665,96 @@ func (m *AddressStringToBytesResponse) GetAddressBytes() []byte { return nil } +// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +type QueryAccountAddressByIDRequest struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddressByIDRequest{} } +func (m *QueryAccountAddressByIDRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressByIDRequest) ProtoMessage() {} +func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{14} +} +func (m *QueryAccountAddressByIDRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressByIDRequest.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 *QueryAccountAddressByIDRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressByIDRequest.Merge(m, src) +} +func (m *QueryAccountAddressByIDRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressByIDRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressByIDRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressByIDRequest proto.InternalMessageInfo + +func (m *QueryAccountAddressByIDRequest) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +type QueryAccountAddressByIDResponse struct { + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (m *QueryAccountAddressByIDResponse) Reset() { *m = QueryAccountAddressByIDResponse{} } +func (m *QueryAccountAddressByIDResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressByIDResponse) ProtoMessage() {} +func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{15} +} +func (m *QueryAccountAddressByIDResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressByIDResponse.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 *QueryAccountAddressByIDResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressByIDResponse.Merge(m, src) +} +func (m *QueryAccountAddressByIDResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressByIDResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressByIDResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressByIDResponse proto.InternalMessageInfo + +func (m *QueryAccountAddressByIDResponse) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") @@ -664,63 +770,70 @@ func init() { proto.RegisterType((*AddressBytesToStringResponse)(nil), "cosmos.auth.v1beta1.AddressBytesToStringResponse") proto.RegisterType((*AddressStringToBytesRequest)(nil), "cosmos.auth.v1beta1.AddressStringToBytesRequest") proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse") + proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") + proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") } func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 814 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x4f, 0x13, 0x4d, - 0x18, 0xc7, 0xbb, 0xbc, 0xef, 0x0b, 0x7d, 0x87, 0xc2, 0x61, 0x28, 0x09, 0xef, 0x16, 0x5a, 0xb2, - 0xbc, 0x40, 0x8b, 0x74, 0x57, 0x8a, 0x17, 0x7f, 0xc4, 0x84, 0x82, 0x1a, 0x0f, 0x26, 0xb5, 0x70, - 0xf2, 0x60, 0x33, 0xdb, 0x0e, 0x4b, 0x23, 0xdd, 0x29, 0x9d, 0xad, 0xa1, 0x31, 0x24, 0xc6, 0x13, - 0x37, 0x4d, 0xfc, 0x07, 0xf0, 0x3f, 0xd0, 0x84, 0xab, 0x77, 0xc2, 0x89, 0xe8, 0xc5, 0x93, 0x31, - 0xe0, 0xc1, 0x3f, 0xc3, 0x74, 0xe6, 0xd9, 0xb6, 0x4b, 0xa6, 0xed, 0x7a, 0xa2, 0x3b, 0xf3, 0x7c, - 0xbf, 0xcf, 0x67, 0x9e, 0x67, 0x9e, 0x01, 0xa5, 0xca, 0x8c, 0xd7, 0x18, 0xb7, 0x48, 0xd3, 0xdb, - 0xb3, 0x5e, 0xae, 0xd9, 0xd4, 0x23, 0x6b, 0xd6, 0x41, 0x93, 0x36, 0x5a, 0x66, 0xbd, 0xc1, 0x3c, - 0x86, 0xa7, 0x64, 0x80, 0xd9, 0x0e, 0x30, 0x21, 0x40, 0x5f, 0x01, 0x95, 0x4d, 0x38, 0x95, 0xd1, - 0x1d, 0x6d, 0x9d, 0x38, 0x55, 0x97, 0x78, 0x55, 0xe6, 0x4a, 0x03, 0x3d, 0xee, 0x30, 0x87, 0x89, - 0x9f, 0x56, 0xfb, 0x17, 0xac, 0xfe, 0xe7, 0x30, 0xe6, 0xec, 0x53, 0x4b, 0x7c, 0xd9, 0xcd, 0x5d, - 0x8b, 0xb8, 0x90, 0x51, 0x9f, 0x85, 0x2d, 0x52, 0xaf, 0x5a, 0xc4, 0x75, 0x99, 0x27, 0xdc, 0x38, - 0xec, 0x26, 0x55, 0xc0, 0x02, 0x0e, 0x8c, 0xe5, 0x7e, 0x49, 0x66, 0x04, 0x78, 0xf1, 0x61, 0x3c, - 0x47, 0xf1, 0xa7, 0x6d, 0xd6, 0x8d, 0x72, 0x99, 0x35, 0x5d, 0x8f, 0x17, 0xe9, 0x41, 0x93, 0x72, - 0x0f, 0x3f, 0x44, 0xa8, 0x4b, 0x3d, 0xa3, 0xcd, 0x6b, 0xe9, 0xf1, 0xdc, 0x92, 0x09, 0xd2, 0xf6, - 0x11, 0x4d, 0x59, 0x10, 0xc8, 0x66, 0x16, 0x88, 0x43, 0x41, 0x5b, 0xec, 0x51, 0x1a, 0x27, 0x1a, - 0x9a, 0xbe, 0x96, 0x80, 0xd7, 0x99, 0xcb, 0x29, 0xbe, 0x8f, 0xa2, 0x04, 0xd6, 0x66, 0xb4, 0xf9, - 0xbf, 0xd2, 0xe3, 0xb9, 0xb8, 0x29, 0x4f, 0x69, 0xfa, 0x05, 0x30, 0x37, 0xdc, 0x56, 0x3e, 0x76, - 0x7e, 0x9a, 0x8d, 0x82, 0xfa, 0x71, 0xb1, 0xa3, 0xc1, 0x8f, 0x02, 0x84, 0x23, 0x82, 0x70, 0x79, - 0x28, 0xa1, 0x4c, 0x1e, 0x40, 0xdc, 0x46, 0x53, 0xbd, 0x84, 0x7e, 0x05, 0x72, 0x68, 0x8c, 0x54, - 0x2a, 0x0d, 0xca, 0xb9, 0x38, 0xfe, 0xbf, 0xf9, 0x99, 0x2f, 0xa7, 0xd9, 0x38, 0xf8, 0x6f, 0xc8, - 0x9d, 0x6d, 0xaf, 0x51, 0x75, 0x9d, 0xa2, 0x1f, 0x78, 0x27, 0x7a, 0x7c, 0x92, 0x8a, 0xfc, 0x3a, - 0x49, 0x45, 0x8c, 0x59, 0xa4, 0x0b, 0xd3, 0x27, 0xac, 0xd2, 0xdc, 0xa7, 0xd7, 0xaa, 0x6b, 0x14, - 0x20, 0x65, 0x81, 0x34, 0x48, 0xad, 0x5b, 0x92, 0xdb, 0x68, 0xb4, 0x2e, 0x56, 0xa0, 0xe0, 0x09, - 0x53, 0x71, 0xd1, 0x4c, 0x29, 0xca, 0xff, 0x7d, 0xf6, 0x3d, 0x15, 0x29, 0x82, 0xc0, 0xd8, 0x09, - 0xf6, 0xb1, 0x63, 0x79, 0x0f, 0x8d, 0x41, 0xc5, 0xc0, 0x33, 0x4c, 0x91, 0x7d, 0x89, 0x11, 0x47, - 0x38, 0xc0, 0x29, 0xe9, 0xcb, 0x28, 0xa1, 0x3c, 0x1b, 0xa4, 0xdc, 0x0a, 0xd9, 0x58, 0x7c, 0x7e, - 0x9a, 0x9d, 0x0c, 0x78, 0xf4, 0xb4, 0xd7, 0x98, 0x46, 0x53, 0x79, 0x5a, 0xde, 0x5b, 0xcf, 0x15, - 0x1a, 0x74, 0xb7, 0x7a, 0xe8, 0xe7, 0xbe, 0x8b, 0xe2, 0xc1, 0x65, 0x48, 0xba, 0x80, 0x26, 0x6c, - 0xb1, 0x5e, 0xaa, 0x8b, 0x0d, 0xd9, 0xb3, 0x62, 0xcc, 0xee, 0x09, 0x36, 0xf2, 0x28, 0x01, 0x8d, - 0xcb, 0xb7, 0x3c, 0xca, 0x77, 0x18, 0xf4, 0x0f, 0x3a, 0xbe, 0x80, 0x26, 0xa0, 0x91, 0x25, 0xbb, - 0xbd, 0x2f, 0x3c, 0x62, 0xc5, 0x18, 0xe9, 0xd1, 0x18, 0x0f, 0xd0, 0xac, 0xda, 0x03, 0x40, 0x16, - 0xd1, 0xa4, 0x6f, 0xc2, 0xc5, 0x0e, 0x90, 0xf8, 0xd6, 0x32, 0xdc, 0xd8, 0xea, 0xa0, 0xc8, 0x85, - 0x1d, 0x26, 0xec, 0x7c, 0x94, 0x90, 0x2e, 0x9b, 0x1d, 0x98, 0x6b, 0x2e, 0xdd, 0xaa, 0x0c, 0x3d, - 0x51, 0xee, 0x73, 0x14, 0xfd, 0x23, 0xfa, 0x89, 0x8f, 0x35, 0xe4, 0x5f, 0x02, 0x8e, 0x33, 0xca, - 0xcb, 0xa7, 0x7a, 0x2c, 0xf4, 0x95, 0x30, 0xa1, 0x12, 0xc9, 0x58, 0x7c, 0xf3, 0xf5, 0xe7, 0xfb, - 0x91, 0x14, 0x9e, 0xb3, 0x94, 0x8f, 0x96, 0x9f, 0xfd, 0xad, 0x86, 0xc6, 0x40, 0x8b, 0xd3, 0x43, - 0xed, 0x7d, 0x90, 0x4c, 0x88, 0x48, 0xe0, 0xb0, 0x04, 0x47, 0x06, 0x2f, 0x0f, 0xe4, 0xb0, 0x5e, - 0x41, 0xa9, 0x8e, 0xf0, 0x6b, 0x0d, 0x8d, 0xca, 0x39, 0xc0, 0xcb, 0xfd, 0xd3, 0x04, 0x26, 0x45, - 0x4f, 0x0f, 0x0f, 0x04, 0x9c, 0x05, 0x81, 0x33, 0x87, 0x13, 0x4a, 0x1c, 0x39, 0xe4, 0xf8, 0x83, - 0x86, 0x82, 0x03, 0xc3, 0xb1, 0xd5, 0x3f, 0x83, 0xf2, 0xe9, 0xd1, 0x6f, 0x86, 0x17, 0x00, 0xda, - 0xaa, 0x40, 0x5b, 0xc2, 0xff, 0x2b, 0xd1, 0x6a, 0x42, 0x54, 0xea, 0x34, 0xee, 0x58, 0x43, 0xb1, - 0xde, 0x09, 0xed, 0xd3, 0x3d, 0xc5, 0x6c, 0xf7, 0xe9, 0x9e, 0x6a, 0xdc, 0x87, 0x94, 0x4b, 0x0e, - 0x3d, 0xfe, 0xa8, 0xa1, 0xb8, 0x6a, 0x56, 0xb1, 0xba, 0x06, 0x03, 0x9e, 0x06, 0x7d, 0xed, 0x0f, - 0x14, 0x80, 0xb8, 0x2e, 0x10, 0xb3, 0xf8, 0xc6, 0x00, 0xc4, 0xce, 0xf5, 0x92, 0xe3, 0x79, 0x84, - 0x3f, 0x75, 0x91, 0x03, 0x13, 0x3d, 0x18, 0x59, 0xf5, 0x84, 0x0c, 0x46, 0x56, 0x3e, 0x17, 0xc6, - 0x2d, 0x81, 0x6c, 0xe2, 0xd5, 0x50, 0xc8, 0xf2, 0x61, 0x3a, 0xca, 0x6f, 0x9e, 0x5d, 0x26, 0xb5, - 0x8b, 0xcb, 0xa4, 0xf6, 0xe3, 0x32, 0xa9, 0xbd, 0xbb, 0x4a, 0x46, 0x2e, 0xae, 0x92, 0x91, 0x6f, - 0x57, 0xc9, 0xc8, 0xb3, 0x8c, 0x53, 0xf5, 0xf6, 0x9a, 0xb6, 0x59, 0x66, 0x35, 0xdf, 0x51, 0xfe, - 0xc9, 0xf2, 0xca, 0x0b, 0xeb, 0x50, 0xda, 0x7b, 0xad, 0x3a, 0xe5, 0xf6, 0xa8, 0xf8, 0xd7, 0xb0, - 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x15, 0x47, 0x58, 0x91, 0x7c, 0x09, 0x00, 0x00, + // 886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x4e, 0xeb, 0x46, + 0x14, 0xc6, 0xe3, 0xdc, 0x16, 0xb8, 0x73, 0x73, 0x53, 0x69, 0xc8, 0x95, 0xa8, 0xc3, 0x75, 0xae, + 0x4c, 0x81, 0x84, 0x12, 0x1b, 0x12, 0x36, 0xfd, 0xa3, 0x4a, 0x09, 0xb4, 0x15, 0x8b, 0x4a, 0xa9, + 0x61, 0xd5, 0x45, 0x23, 0x3b, 0x36, 0xc6, 0x2a, 0xf1, 0x84, 0x8c, 0x53, 0x11, 0xa1, 0x48, 0x55, + 0x57, 0xec, 0x5a, 0xa9, 0x2f, 0x40, 0xdf, 0xa0, 0x95, 0x78, 0x08, 0xc4, 0x0a, 0xb5, 0x9b, 0xae, + 0xaa, 0x0a, 0xba, 0xe8, 0xb2, 0x8f, 0x70, 0x95, 0x99, 0x63, 0x27, 0x86, 0x49, 0x62, 0x56, 0xb1, + 0x67, 0xce, 0xf9, 0xce, 0x6f, 0xce, 0x19, 0x7f, 0x41, 0x85, 0x16, 0xa1, 0x6d, 0x42, 0x75, 0xb3, + 0x17, 0x1c, 0xeb, 0xdf, 0x6f, 0x5b, 0x4e, 0x60, 0x6e, 0xeb, 0xa7, 0x3d, 0xa7, 0xdb, 0xd7, 0x3a, + 0x5d, 0x12, 0x10, 0xbc, 0xc8, 0x03, 0xb4, 0x61, 0x80, 0x06, 0x01, 0xf2, 0x06, 0x64, 0x59, 0x26, + 0x75, 0x78, 0x74, 0x94, 0xdb, 0x31, 0x5d, 0xcf, 0x37, 0x03, 0x8f, 0xf8, 0x5c, 0x40, 0xce, 0xb9, + 0xc4, 0x25, 0xec, 0x51, 0x1f, 0x3e, 0xc1, 0xea, 0xfb, 0x2e, 0x21, 0xee, 0x89, 0xa3, 0xb3, 0x37, + 0xab, 0x77, 0xa4, 0x9b, 0x3e, 0x54, 0x94, 0x97, 0x61, 0xcb, 0xec, 0x78, 0xba, 0xe9, 0xfb, 0x24, + 0x60, 0x6a, 0x14, 0x76, 0x15, 0x11, 0x30, 0x83, 0x03, 0x61, 0xbe, 0xdf, 0xe4, 0x15, 0x01, 0x9e, + 0xbd, 0xa8, 0xdf, 0xa2, 0xdc, 0xd7, 0x43, 0xd6, 0x5a, 0xab, 0x45, 0x7a, 0x7e, 0x40, 0x0d, 0xe7, + 0xb4, 0xe7, 0xd0, 0x00, 0x7f, 0x81, 0xd0, 0x88, 0x7a, 0x49, 0x7a, 0x23, 0x15, 0x5f, 0x54, 0xd6, + 0x34, 0x48, 0x1d, 0x1e, 0x51, 0xe3, 0x0d, 0x81, 0x6a, 0x5a, 0xc3, 0x74, 0x1d, 0xc8, 0x35, 0xc6, + 0x32, 0xd5, 0x4b, 0x09, 0xbd, 0x7a, 0x50, 0x80, 0x76, 0x88, 0x4f, 0x1d, 0xfc, 0x19, 0x5a, 0x30, + 0x61, 0x6d, 0x49, 0x7a, 0xf3, 0xac, 0xf8, 0xa2, 0x92, 0xd3, 0xf8, 0x29, 0xb5, 0xb0, 0x01, 0x5a, + 0xcd, 0xef, 0xd7, 0x33, 0x37, 0x57, 0xe5, 0x05, 0xc8, 0xde, 0x37, 0xa2, 0x1c, 0xfc, 0x65, 0x8c, + 0x30, 0xcd, 0x08, 0xd7, 0x67, 0x12, 0xf2, 0xe2, 0x31, 0xc4, 0x03, 0xb4, 0x38, 0x4e, 0x18, 0x76, + 0xa0, 0x82, 0xe6, 0x4d, 0xdb, 0xee, 0x3a, 0x94, 0xb2, 0xe3, 0x3f, 0xaf, 0x2f, 0xfd, 0x71, 0x55, + 0xce, 0x81, 0x7e, 0x8d, 0xef, 0x1c, 0x04, 0x5d, 0xcf, 0x77, 0x8d, 0x30, 0xf0, 0xe3, 0x85, 0x8b, + 0xcb, 0x42, 0xea, 0xbf, 0xcb, 0x42, 0x4a, 0x5d, 0x46, 0x32, 0x13, 0xfd, 0x8a, 0xd8, 0xbd, 0x13, + 0xe7, 0x41, 0x77, 0xd5, 0x06, 0x94, 0x6c, 0x98, 0x5d, 0xb3, 0x3d, 0x6a, 0xc9, 0x47, 0x68, 0xae, + 0xc3, 0x56, 0xa0, 0xe1, 0x79, 0x4d, 0x70, 0xd1, 0x34, 0x9e, 0x54, 0x7f, 0xe7, 0xfa, 0xef, 0x42, + 0xca, 0x80, 0x04, 0xf5, 0x30, 0x3e, 0xc7, 0x48, 0xf2, 0x53, 0x34, 0x0f, 0x1d, 0x03, 0xcd, 0x24, + 0x4d, 0x0e, 0x53, 0xd4, 0x1c, 0xc2, 0x31, 0x4e, 0x4e, 0xdf, 0x42, 0x79, 0xe1, 0xd9, 0xa0, 0xe4, + 0x5e, 0xc2, 0xc1, 0xe2, 0x9b, 0xab, 0x72, 0x36, 0xa6, 0x31, 0x36, 0x5e, 0xf5, 0x15, 0x5a, 0xac, + 0x3b, 0xad, 0xe3, 0x6a, 0xa5, 0xd1, 0x75, 0x8e, 0xbc, 0xb3, 0xb0, 0xf6, 0x27, 0x28, 0x17, 0x5f, + 0x86, 0xa2, 0x2b, 0xe8, 0xa5, 0xc5, 0xd6, 0x9b, 0x1d, 0xb6, 0xc1, 0x67, 0x66, 0x64, 0xac, 0xb1, + 0x60, 0xb5, 0x8e, 0xf2, 0x30, 0xb8, 0x7a, 0x3f, 0x70, 0xe8, 0x21, 0x81, 0xf9, 0xc1, 0xc4, 0x57, + 0xd0, 0x4b, 0x18, 0x64, 0xd3, 0x1a, 0xee, 0x33, 0x8d, 0x8c, 0x91, 0x31, 0xc7, 0x72, 0xd4, 0xcf, + 0xd1, 0xb2, 0x58, 0x03, 0x40, 0x56, 0x51, 0x36, 0x14, 0xa1, 0x6c, 0x07, 0x48, 0x42, 0x69, 0x1e, + 0xae, 0xee, 0x45, 0x28, 0x7c, 0xe1, 0x90, 0x30, 0xb9, 0x10, 0x25, 0xa1, 0xca, 0x6e, 0x04, 0xf3, + 0x40, 0x65, 0xd4, 0x95, 0xd9, 0x27, 0xda, 0x42, 0xca, 0xf8, 0xd5, 0x89, 0x4e, 0xb7, 0xbf, 0x17, + 0xd2, 0x64, 0x51, 0xda, 0xb3, 0x59, 0xee, 0x33, 0x23, 0xed, 0xd9, 0xaa, 0x8d, 0x0a, 0x13, 0x33, + 0xa0, 0x72, 0x0d, 0xbd, 0x07, 0xa3, 0x6c, 0x26, 0xfd, 0x8a, 0xb2, 0x66, 0x4c, 0xae, 0xf2, 0xff, + 0x73, 0xf4, 0x2e, 0x2b, 0x83, 0x2f, 0x24, 0x14, 0x5e, 0x4e, 0x8a, 0x4b, 0xc2, 0x8f, 0x42, 0x64, + 0x62, 0xf2, 0x46, 0x92, 0x50, 0x0e, 0xac, 0xae, 0xfe, 0xf8, 0xe7, 0xbf, 0xbf, 0xa4, 0x0b, 0xf8, + 0xb5, 0x2e, 0x34, 0xd3, 0xb0, 0xfa, 0x4f, 0x12, 0x9a, 0x87, 0x5c, 0x5c, 0x9c, 0x29, 0x1f, 0x82, + 0x94, 0x12, 0x44, 0x02, 0x87, 0xce, 0x38, 0x4a, 0x78, 0x7d, 0x2a, 0x87, 0x7e, 0x0e, 0x5d, 0x1d, + 0xe0, 0xdf, 0x24, 0x84, 0x1f, 0x0f, 0x02, 0x57, 0x67, 0x96, 0x7c, 0x3c, 0x68, 0x79, 0xe7, 0x69, + 0x49, 0xc9, 0x90, 0xa3, 0x0b, 0xd8, 0xf4, 0x6c, 0xfd, 0xdc, 0xb3, 0x07, 0xf8, 0x07, 0x09, 0xcd, + 0x71, 0x4b, 0xc1, 0xeb, 0x93, 0x2b, 0xc6, 0x4c, 0x47, 0x2e, 0xce, 0x0e, 0x04, 0x9c, 0x15, 0x86, + 0xf3, 0x1a, 0xe7, 0x85, 0x38, 0xdc, 0x2f, 0xf1, 0xaf, 0x12, 0x8a, 0x7b, 0x0f, 0xc5, 0xfa, 0xe4, + 0x0a, 0x42, 0x17, 0x97, 0xb7, 0x92, 0x27, 0x00, 0xda, 0x26, 0x43, 0x5b, 0xc3, 0x1f, 0x08, 0xd1, + 0xda, 0x2c, 0xa9, 0x19, 0xdd, 0xb5, 0x0b, 0x09, 0x65, 0xc6, 0xcd, 0x6e, 0xc2, 0x85, 0x13, 0xd8, + 0xe4, 0x84, 0x0b, 0x27, 0x72, 0xce, 0x19, 0xed, 0xe2, 0xfe, 0x39, 0xbc, 0x64, 0x39, 0x91, 0xed, + 0x61, 0x71, 0x0f, 0xa6, 0xb8, 0xac, 0xbc, 0xfd, 0x84, 0x0c, 0x40, 0xac, 0x32, 0xc4, 0x32, 0xfe, + 0x70, 0x0a, 0x62, 0xf4, 0x45, 0x70, 0xa7, 0x1b, 0xe0, 0xdf, 0x47, 0xc8, 0x31, 0x73, 0x9c, 0x8e, + 0x2c, 0x72, 0xe3, 0xe9, 0xc8, 0x42, 0xe7, 0x55, 0x77, 0x18, 0xb2, 0x86, 0x37, 0x13, 0x21, 0x73, + 0x8f, 0x1f, 0xd4, 0x77, 0xaf, 0xef, 0x14, 0xe9, 0xf6, 0x4e, 0x91, 0xfe, 0xb9, 0x53, 0xa4, 0x9f, + 0xef, 0x95, 0xd4, 0xed, 0xbd, 0x92, 0xfa, 0xeb, 0x5e, 0x49, 0x7d, 0x53, 0x72, 0xbd, 0xe0, 0xb8, + 0x67, 0x69, 0x2d, 0xd2, 0x0e, 0x15, 0xf9, 0x4f, 0x99, 0xda, 0xdf, 0xe9, 0x67, 0x5c, 0x3e, 0xe8, + 0x77, 0x1c, 0x6a, 0xcd, 0xb1, 0x7f, 0xd9, 0xea, 0xdb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x78, + 0xb2, 0xf3, 0xc7, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -741,15 +854,25 @@ type QueryClient interface { Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) // Account returns account details based on address. Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) + // AccountAddressByID returns account address based on account id + AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) - // Bech32 queries bech32Prefix + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) // AddressStringToBytes converts Address string to bytes + // + // Since: cosmos-sdk 0.46 AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) } @@ -779,6 +902,15 @@ func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts return out, nil } +func (c *queryClient) AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) { + out := new(QueryAccountAddressByIDResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountAddressByID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Params", in, out, opts...) @@ -832,15 +964,25 @@ type QueryServer interface { Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) // Account returns account details based on address. Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) + // AccountAddressByID returns account address based on account id + AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) - // Bech32 queries bech32Prefix + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) // AddressStringToBytes converts Address string to bytes + // + // Since: cosmos-sdk 0.46 AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) } @@ -854,6 +996,9 @@ func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccount func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") } +func (*UnimplementedQueryServer) AccountAddressByID(ctx context.Context, req *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -910,6 +1055,24 @@ func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -1012,6 +1175,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Account", Handler: _Query_Account_Handler, }, + { + MethodName: "AccountAddressByID", + Handler: _Query_AccountAddressByID_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -1475,6 +1642,64 @@ func (m *AddressStringToBytesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryAccountAddressByIDRequest) 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 *QueryAccountAddressByIDRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressByIDResponse) 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 *QueryAccountAddressByIDResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1662,6 +1887,31 @@ func (m *AddressStringToBytesResponse) Size() (n int) { return n } +func (m *QueryAccountAddressByIDRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryAccountAddressByIDResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2773,6 +3023,157 @@ func (m *AddressStringToBytesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAccountAddressByIDRequest) 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: QueryAccountAddressByIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountAddressByIDResponse) 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: QueryAccountAddressByIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", 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.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index 0911d0d5115a..e1353ae21b49 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -123,6 +123,60 @@ func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marsha } +func request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountAddressByIDRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.AccountAddressByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountAddressByIDRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.AccountAddressByID(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata @@ -337,6 +391,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AccountAddressByID_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_AccountAddressByID_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_AccountAddressByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -533,6 +610,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AccountAddressByID_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_AccountAddressByID_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_AccountAddressByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -641,6 +738,8 @@ var ( pattern_Query_Account_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", "accounts", "address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AccountAddressByID_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", "address_by_id", "id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) 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))) @@ -657,6 +756,8 @@ var ( forward_Query_Account_0 = runtime.ForwardResponseMessage + forward_Query_AccountAddressByID_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage diff --git a/x/auth/vesting/client/cli/tx.go b/x/auth/vesting/client/cli/tx.go index e64411fd7c89..3c88d04500fa 100644 --- a/x/auth/vesting/client/cli/tx.go +++ b/x/auth/vesting/client/cli/tx.go @@ -47,7 +47,7 @@ func NewMsgCreateVestingAccountCmd() *cobra.Command { Short: "Create a new vesting account funded with an allocation of tokens.", Long: `Create a new vesting account funded with an allocation of tokens. The account can either be a delayed or continuous vesting account, which is determined -by the '--delayed' flag. All vesting accouts created will have their start time +by the '--delayed' flag. All vesting accounts created will have their start time set by the committed block's time. The end_time must be provided as a UNIX epoch timestamp.`, Args: cobra.ExactArgs(3), diff --git a/x/auth/vesting/client/testutil/cli_test.go b/x/auth/vesting/client/testutil/cli_test.go index dd36a6af2d3e..1035ca750264 100644 --- a/x/auth/vesting/client/testutil/cli_test.go +++ b/x/auth/vesting/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index 272ebf2656bf..06f9b8d995ec 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -3,7 +3,6 @@ package vesting import ( "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -54,10 +53,6 @@ func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConf return nil } -// RegisterRESTRoutes registers the REST routes for the vesting module. Currently, this is a no-op. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the module's gRPC Gateway routes. Currently, this // is a no-op. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} @@ -116,14 +111,6 @@ func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONCodec, _ json.RawMess return []abci.ValidatorUpdate{} } -// BeginBlock performs a no-op. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock performs a no-op. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // ExportGenesis is always empty, as InitGenesis does nothing either. func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMessage { return am.DefaultGenesis(cdc) diff --git a/x/auth/vesting/msg_server.go b/x/auth/vesting/msg_server.go index aa7d391ea46d..afcd2681e1bb 100644 --- a/x/auth/vesting/msg_server.go +++ b/x/auth/vesting/msg_server.go @@ -3,14 +3,13 @@ package vesting import ( "context" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) @@ -53,22 +52,18 @@ func (s msgServer) CreateVestingAccount(goCtx context.Context, msg *types.MsgCre return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "account %s already exists", msg.ToAddress) } - baseAccount := ak.NewAccountWithAddress(ctx, to) - if _, ok := baseAccount.(*authtypes.BaseAccount); !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid account type; expected: BaseAccount, got: %T", baseAccount) - } - - baseVestingAccount := types.NewBaseVestingAccount(baseAccount.(*authtypes.BaseAccount), msg.Amount.Sort(), msg.EndTime) - - var acc authtypes.AccountI + baseAccount := authtypes.NewBaseAccountWithAddress(to) + baseAccount = ak.NewAccount(ctx, baseAccount).(*authtypes.BaseAccount) + baseVestingAccount := types.NewBaseVestingAccount(baseAccount, msg.Amount.Sort(), msg.EndTime) + var vestingAccount authtypes.AccountI if msg.Delayed { - acc = types.NewDelayedVestingAccountRaw(baseVestingAccount) + vestingAccount = types.NewDelayedVestingAccountRaw(baseVestingAccount) } else { - acc = types.NewContinuousVestingAccountRaw(baseVestingAccount, ctx.BlockTime().Unix()) + vestingAccount = types.NewContinuousVestingAccountRaw(baseVestingAccount, ctx.BlockTime().Unix()) } - ak.SetAccount(ctx, acc) + ak.SetAccount(ctx, vestingAccount) defer func() { telemetry.IncrCounter(1, "new", "account") @@ -125,16 +120,11 @@ func (s msgServer) CreatePermanentLockedAccount(goCtx context.Context, msg *type return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "account %s already exists", msg.ToAddress) } - baseAccountI := ak.NewAccountWithAddress(ctx, to) + baseAccount := authtypes.NewBaseAccountWithAddress(to) + baseAccount = ak.NewAccount(ctx, baseAccount).(*authtypes.BaseAccount) + vestingAccount := types.NewPermanentLockedAccount(baseAccount, msg.Amount) - baseAcc, ok := baseAccountI.(*authtypes.BaseAccount) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid account type; expected: BaseAccount, got: %T", baseAccountI) - } - - var acc authtypes.AccountI = types.NewPermanentLockedAccount(baseAcc, msg.Amount) - - ak.SetAccount(ctx, acc) + ak.SetAccount(ctx, vestingAccount) defer func() { telemetry.IncrCounter(1, "new", "account") @@ -190,11 +180,11 @@ func (s msgServer) CreatePeriodicVestingAccount(goCtx context.Context, msg *type totalCoins = totalCoins.Add(period.Amount...) } - baseAccount := ak.NewAccountWithAddress(ctx, to) + baseAccount := authtypes.NewBaseAccountWithAddress(to) + baseAccount = ak.NewAccount(ctx, baseAccount).(*authtypes.BaseAccount) + vestingAccount := types.NewPeriodicVestingAccount(baseAccount, totalCoins.Sort(), msg.StartTime, msg.VestingPeriods) - acc := types.NewPeriodicVestingAccount(baseAccount.(*authtypes.BaseAccount), totalCoins.Sort(), msg.StartTime, msg.VestingPeriods) - - ak.SetAccount(ctx, acc) + ak.SetAccount(ctx, vestingAccount) defer func() { telemetry.IncrCounter(1, "new", "account") @@ -222,5 +212,4 @@ func (s msgServer) CreatePeriodicVestingAccount(goCtx context.Context, msg *type ), ) return &types.MsgCreatePeriodicVestingAccountResponse{}, nil - } diff --git a/x/auth/vesting/types/msgs.go b/x/auth/vesting/types/msgs.go index 6c56ab3208d0..2387513cb3dd 100644 --- a/x/auth/vesting/types/msgs.go +++ b/x/auth/vesting/types/msgs.go @@ -2,6 +2,7 @@ package types import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/auth/vesting/types/tx.pb.go b/x/auth/vesting/types/tx.pb.go index bcf2bc30e4ac..96b06cdb922b 100644 --- a/x/auth/vesting/types/tx.pb.go +++ b/x/auth/vesting/types/tx.pb.go @@ -149,6 +149,8 @@ var xxx_messageInfo_MsgCreateVestingAccountResponse proto.InternalMessageInfo // MsgCreatePermanentLockedAccount defines a message that enables creating a permanent // locked account. +// +// Since: cosmos-sdk 0.46 type MsgCreatePermanentLockedAccount struct { FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` @@ -210,6 +212,8 @@ func (m *MsgCreatePermanentLockedAccount) GetAmount() github_com_cosmos_cosmos_s } // MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. +// +// Since: cosmos-sdk 0.46 type MsgCreatePermanentLockedAccountResponse struct { } @@ -250,6 +254,8 @@ var xxx_messageInfo_MsgCreatePermanentLockedAccountResponse proto.InternalMessag // MsgCreateVestingAccount defines a message that enables creating a vesting // account. +// +// Since: cosmos-sdk 0.46 type MsgCreatePeriodicVestingAccount struct { FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` @@ -320,6 +326,8 @@ func (m *MsgCreatePeriodicVestingAccount) GetVestingPeriods() []Period { // MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount // response type. +// +// Since: cosmos-sdk 0.46 type MsgCreatePeriodicVestingAccountResponse struct { } @@ -506,9 +514,13 @@ type MsgClient interface { CreateVestingAccount(ctx context.Context, in *MsgCreateVestingAccount, opts ...grpc.CallOption) (*MsgCreateVestingAccountResponse, error) // CreatePermanentLockedAccount defines a method that enables creating a permanent // locked account. + // + // Since: cosmos-sdk 0.46 CreatePermanentLockedAccount(ctx context.Context, in *MsgCreatePermanentLockedAccount, opts ...grpc.CallOption) (*MsgCreatePermanentLockedAccountResponse, error) // CreatePeriodicVestingAccount defines a method that enables creating a // periodic vesting account. + // + // Since: cosmos-sdk 0.46 CreatePeriodicVestingAccount(ctx context.Context, in *MsgCreatePeriodicVestingAccount, opts ...grpc.CallOption) (*MsgCreatePeriodicVestingAccountResponse, error) } @@ -554,9 +566,13 @@ type MsgServer interface { CreateVestingAccount(context.Context, *MsgCreateVestingAccount) (*MsgCreateVestingAccountResponse, error) // CreatePermanentLockedAccount defines a method that enables creating a permanent // locked account. + // + // Since: cosmos-sdk 0.46 CreatePermanentLockedAccount(context.Context, *MsgCreatePermanentLockedAccount) (*MsgCreatePermanentLockedAccountResponse, error) // CreatePeriodicVestingAccount defines a method that enables creating a // periodic vesting account. + // + // Since: cosmos-sdk 0.46 CreatePeriodicVestingAccount(context.Context, *MsgCreatePeriodicVestingAccount) (*MsgCreatePeriodicVestingAccountResponse, error) } diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index 1b21e882f0a9..6db8d7b29922 100644 --- a/x/auth/vesting/types/vesting_account.go +++ b/x/auth/vesting/types/vesting_account.go @@ -41,7 +41,7 @@ func NewBaseVestingAccount(baseAccount *authtypes.BaseAccount, originalVesting s // // CONTRACT: Delegated vesting coins and vestingCoins must be sorted. func (bva BaseVestingAccount) LockedCoinsFromVesting(vestingCoins sdk.Coins) sdk.Coins { - lockedCoins := vestingCoins.Sub(vestingCoins.Min(bva.DelegatedVesting)) + lockedCoins := vestingCoins.Sub(vestingCoins.Min(bva.DelegatedVesting)...) if lockedCoins == nil { return sdk.Coins{} } @@ -111,12 +111,12 @@ func (bva *BaseVestingAccount) TrackUndelegation(amount sdk.Coins) { if !x.IsZero() { xCoin := sdk.NewCoin(coin.Denom, x) - bva.DelegatedFree = bva.DelegatedFree.Sub(sdk.Coins{xCoin}) + bva.DelegatedFree = bva.DelegatedFree.Sub(xCoin) } if !y.IsZero() { yCoin := sdk.NewCoin(coin.Denom, y) - bva.DelegatedVesting = bva.DelegatedVesting.Sub(sdk.Coins{yCoin}) + bva.DelegatedVesting = bva.DelegatedVesting.Sub(yCoin) } } } @@ -193,8 +193,10 @@ func (bva BaseVestingAccount) MarshalYAML() (interface{}, error) { // Continuous Vesting Account -var _ vestexported.VestingAccount = (*ContinuousVestingAccount)(nil) -var _ authtypes.GenesisAccount = (*ContinuousVestingAccount)(nil) +var ( + _ vestexported.VestingAccount = (*ContinuousVestingAccount)(nil) + _ authtypes.GenesisAccount = (*ContinuousVestingAccount)(nil) +) // NewContinuousVestingAccountRaw creates a new ContinuousVestingAccount object from BaseVestingAccount func NewContinuousVestingAccountRaw(bva *BaseVestingAccount, startTime int64) *ContinuousVestingAccount { @@ -238,7 +240,7 @@ func (cva ContinuousVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coin s := sdk.NewDec(x).Quo(sdk.NewDec(y)) for _, ovc := range cva.OriginalVesting { - vestedAmt := ovc.Amount.ToDec().Mul(s).RoundInt() + vestedAmt := sdk.NewDecFromInt(ovc.Amount).Mul(s).RoundInt() vestedCoins = append(vestedCoins, sdk.NewCoin(ovc.Denom, vestedAmt)) } @@ -248,7 +250,7 @@ func (cva ContinuousVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coin // GetVestingCoins returns the total number of vesting coins. If no coins are // vesting, nil is returned. func (cva ContinuousVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins { - return cva.OriginalVesting.Sub(cva.GetVestedCoins(blockTime)) + return cva.OriginalVesting.Sub(cva.GetVestedCoins(blockTime)...) } // LockedCoins returns the set of coins that are not spendable (i.e. locked), @@ -307,8 +309,10 @@ func (cva ContinuousVestingAccount) MarshalYAML() (interface{}, error) { // Periodic Vesting Account -var _ vestexported.VestingAccount = (*PeriodicVestingAccount)(nil) -var _ authtypes.GenesisAccount = (*PeriodicVestingAccount)(nil) +var ( + _ vestexported.VestingAccount = (*PeriodicVestingAccount)(nil) + _ authtypes.GenesisAccount = (*PeriodicVestingAccount)(nil) +) // NewPeriodicVestingAccountRaw creates a new PeriodicVestingAccount object from BaseVestingAccount func NewPeriodicVestingAccountRaw(bva *BaseVestingAccount, startTime int64, periods Periods) *PeriodicVestingAccount { @@ -374,7 +378,7 @@ func (pva PeriodicVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coins // GetVestingCoins returns the total number of vesting coins. If no coins are // vesting, nil is returned. func (pva PeriodicVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins { - return pva.OriginalVesting.Sub(pva.GetVestedCoins(blockTime)) + return pva.OriginalVesting.Sub(pva.GetVestedCoins(blockTime)...) } // LockedCoins returns the set of coins that are not spendable (i.e. locked), @@ -451,8 +455,10 @@ func (pva PeriodicVestingAccount) MarshalYAML() (interface{}, error) { // Delayed Vesting Account -var _ vestexported.VestingAccount = (*DelayedVestingAccount)(nil) -var _ authtypes.GenesisAccount = (*DelayedVestingAccount)(nil) +var ( + _ vestexported.VestingAccount = (*DelayedVestingAccount)(nil) + _ authtypes.GenesisAccount = (*DelayedVestingAccount)(nil) +) // NewDelayedVestingAccountRaw creates a new DelayedVestingAccount object from BaseVestingAccount func NewDelayedVestingAccountRaw(bva *BaseVestingAccount) *DelayedVestingAccount { @@ -485,7 +491,7 @@ func (dva DelayedVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coins { // GetVestingCoins returns the total number of vesting coins for a delayed // vesting account. func (dva DelayedVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins { - return dva.OriginalVesting.Sub(dva.GetVestedCoins(blockTime)) + return dva.OriginalVesting.Sub(dva.GetVestedCoins(blockTime)...) } // LockedCoins returns the set of coins that are not spendable (i.e. locked), @@ -519,8 +525,10 @@ func (dva DelayedVestingAccount) String() string { //----------------------------------------------------------------------------- // Permanent Locked Vesting Account -var _ vestexported.VestingAccount = (*PermanentLockedAccount)(nil) -var _ authtypes.GenesisAccount = (*PermanentLockedAccount)(nil) +var ( + _ vestexported.VestingAccount = (*PermanentLockedAccount)(nil) + _ authtypes.GenesisAccount = (*PermanentLockedAccount)(nil) +) // NewPermanentLockedAccount returns a PermanentLockedAccount func NewPermanentLockedAccount(baseAcc *authtypes.BaseAccount, coins sdk.Coins) *PermanentLockedAccount { diff --git a/x/auth/vesting/types/vesting_account_test.go b/x/auth/vesting/types/vesting_account_test.go index 6d85b8e7580d..56ae59b05b01 100644 --- a/x/auth/vesting/types/vesting_account_test.go +++ b/x/auth/vesting/types/vesting_account_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/simapp" @@ -242,7 +242,7 @@ func TestSpendableCoinsDelVestingAcc(t *testing.T) { delegatedAmount := sdk.NewCoins(sdk.NewInt64Coin(stakeDenom, 50)) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, delegatedAmount) lockedCoins = dva.LockedCoins(now.Add(12 * time.Hour)) - require.True(t, lockedCoins.IsEqual(origCoins.Sub(delegatedAmount))) + require.True(t, lockedCoins.IsEqual(origCoins.Sub(delegatedAmount...))) } func TestTrackDelegationDelVestingAcc(t *testing.T) { @@ -362,7 +362,8 @@ func TestGetVestedCoinsPeriodicVestingAcc(t *testing.T) { vestedCoins = pva.GetVestedCoins(now.Add(18 * time.Hour)) require.Equal(t, sdk.Coins{ - sdk.NewInt64Coin(feeDenom, 750), sdk.NewInt64Coin(stakeDenom, 75)}, vestedCoins) + sdk.NewInt64Coin(feeDenom, 750), sdk.NewInt64Coin(stakeDenom, 75), + }, vestedCoins) // require 100% of coins vested vestedCoins = pva.GetVestedCoins(now.Add(48 * time.Hour)) @@ -600,7 +601,7 @@ func TestSpendableCoinsPermLockedVestingAcc(t *testing.T) { delegatedAmount := sdk.NewCoins(sdk.NewInt64Coin(stakeDenom, 50)) plva.TrackDelegation(now.Add(12*time.Hour), origCoins, delegatedAmount) lockedCoins = plva.LockedCoins(now.Add(12 * time.Hour)) - require.True(t, lockedCoins.IsEqual(origCoins.Sub(delegatedAmount))) + require.True(t, lockedCoins.IsEqual(origCoins.Sub(delegatedAmount...))) } func TestTrackDelegationPermLockedVestingAcc(t *testing.T) { @@ -809,6 +810,7 @@ func (s *VestingAccountTestSuite) TestDelayedVestingAccountMarshal() { _, err = app.AccountKeeper.UnmarshalAccount(bz[:len(bz)/2]) require.NotNil(err) } + func (s *VestingAccountTestSuite) TestPermanentLockedAccountMarshal() { app := s.app require := s.Require() diff --git a/x/authz/authorization_grant.go b/x/authz/authorization_grant.go index bd94977ab67b..4344bd3b7b58 100644 --- a/x/authz/authorization_grant.go +++ b/x/authz/authorization_grant.go @@ -14,11 +14,11 @@ import ( // which is passed into the `blockTime` arg. func NewGrant(blockTime time.Time, a Authorization, expiration *time.Time) (Grant, error) { if expiration != nil && !expiration.After(blockTime) { - return Grant{}, sdkerrors.ErrInvalidRequest.Wrapf("expiration must be after the current block time (%v), got %v", blockTime.Format(time.RFC3339), expiration.Format(time.RFC3339)) + return Grant{}, sdkerrors.Wrapf(ErrInvalidExpirationTime, "expiration must be after the current block time (%v), got %v", blockTime.Format(time.RFC3339), expiration.Format(time.RFC3339)) } msg, ok := a.(proto.Message) if !ok { - return Grant{}, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", a) + return Grant{}, sdkerrors.ErrPackAny.Wrapf("cannot proto marshal %T", a) } any, err := cdctypes.NewAnyWithValue(msg) if err != nil { @@ -30,9 +30,7 @@ func NewGrant(blockTime time.Time, a Authorization, expiration *time.Time) (Gran }, nil } -var ( - _ cdctypes.UnpackInterfacesMessage = &Grant{} -) +var _ cdctypes.UnpackInterfacesMessage = &Grant{} // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (g Grant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error { @@ -43,11 +41,12 @@ func (g Grant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error { // GetAuthorization returns the cached value from the Grant.Authorization if present. func (g Grant) GetAuthorization() (Authorization, error) { if g.Authorization == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "authorization is nil") + return nil, sdkerrors.ErrInvalidType.Wrap("authorization is nil") } - a, ok := g.Authorization.GetCachedValue().(Authorization) + av := g.Authorization.GetCachedValue() + a, ok := av.(Authorization) if !ok { - return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (Authorization)(nil), g.Authorization.GetCachedValue()) + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (Authorization)(nil), av) } return a, nil } @@ -56,7 +55,7 @@ func (g Grant) ValidateBasic() error { av := g.Authorization.GetCachedValue() a, ok := av.(Authorization) if !ok { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expected %T, got %T", (Authorization)(nil), av) + return sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (Authorization)(nil), av) } return a.ValidateBasic() } diff --git a/x/authz/authorization_grant_test.go b/x/authz/authorization_grant_test.go index 2501b5de1dba..ce14692c0b5a 100644 --- a/x/authz/authorization_grant_test.go +++ b/x/authz/authorization_grant_test.go @@ -19,7 +19,7 @@ func expecError(r *require.Assertions, expected string, received error) { func TestNewGrant(t *testing.T) { a := NewGenericAuthorization("some-type") - var tcs = []struct { + tcs := []struct { title string a Authorization blockTime time.Time @@ -40,7 +40,6 @@ func TestNewGrant(t *testing.T) { expecError(require.New(t), tc.err, err) }) } - } func unixTime(s, ns int64) *time.Time { diff --git a/x/authz/client/cli/query.go b/x/authz/client/cli/query.go index dfc997c445e4..62e40b290580 100644 --- a/x/authz/client/cli/query.go +++ b/x/authz/client/cli/query.go @@ -65,7 +65,7 @@ $ %s query %s grants cosmos1skjw.. cosmos1skjwj.. %s if err != nil { return err } - var msgAuthorized = "" + msgAuthorized := "" if len(args) >= 3 { msgAuthorized = args[2] } @@ -80,7 +80,8 @@ $ %s query %s grants cosmos1skjw.. cosmos1skjwj.. %s Granter: granter.String(), Grantee: grantee.String(), MsgTypeUrl: msgAuthorized, - Pagination: pageReq}, + Pagination: pageReq, + }, ) if err != nil { return err @@ -94,15 +95,16 @@ $ %s query %s grants cosmos1skjw.. cosmos1skjwj.. %s return cmd } +// GetQueryGranterGrants returns cmd to query for all grants for a granter. func GetQueryGranterGrants() *cobra.Command { cmd := &cobra.Command{ - Use: "granter-grants [granter-addr]", + Use: "grants-by-granter [granter-addr]", Args: cobra.ExactArgs(1), Short: "query authorization grants granted by granter", Long: strings.TrimSpace( fmt.Sprintf(`Query authorization grants granted by granter. Examples: -$ %s q %s granter-grants cosmos1skj.. +$ %s q %s grants-by-granter cosmos1skj.. `, version.AppName, authz.ModuleName), ), @@ -142,15 +144,16 @@ $ %s q %s granter-grants cosmos1skj.. return cmd } +// GetQueryGranteeGrants returns cmd to query for all grants for a grantee. func GetQueryGranteeGrants() *cobra.Command { cmd := &cobra.Command{ - Use: "grantee-grants [grantee-addr]", + Use: "grants-by-grantee [grantee-addr]", Args: cobra.ExactArgs(1), Short: "query authorization grants granted to a grantee", Long: strings.TrimSpace( fmt.Sprintf(`Query authorization grants granted to a grantee. Examples: -$ %s q %s grantee-grants cosmos1skj.. +$ %s q %s grants-by-grantee cosmos1skj.. `, version.AppName, authz.ModuleName), ), diff --git a/x/authz/client/cli/tx.go b/x/authz/client/cli/tx.go index e6f37343ffbc..d03e3d228b77 100644 --- a/x/authz/client/cli/tx.go +++ b/x/authz/client/cli/tx.go @@ -51,6 +51,7 @@ func GetTxCmd() *cobra.Command { return AuthorizationTxCmd } +// NewCmdGrantAuthorization returns a CLI command handler for creating a MsgGrant transaction. func NewCmdGrantAuthorization() *cobra.Command { cmd := &cobra.Command{ Use: "grant --from ", @@ -118,15 +119,25 @@ Examples: var delegateLimit *sdk.Coin if limit != "" { - spendLimit, err := sdk.ParseCoinsNormalized(limit) + spendLimit, err := sdk.ParseCoinNormalized(limit) if err != nil { return err } + queryClient := staking.NewQueryClient(clientCtx) - if !spendLimit.IsAllPositive() { + res, err := queryClient.Params(cmd.Context(), &staking.QueryParamsRequest{}) + if err != nil { + return err + } + + if spendLimit.Denom != res.Params.BondDenom { + return fmt.Errorf("invalid denom %s; coin denom should match the current bond denom %s", spendLimit.Denom, res.Params.BondDenom) + } + + if !spendLimit.IsPositive() { return fmt.Errorf("spend-limit should be greater than zero") } - delegateLimit = &spendLimit[0] + delegateLimit = &spendLimit } allowed, err := bech32toValidatorAddresses(allowValidators) @@ -189,6 +200,7 @@ func getExpireTime(cmd *cobra.Command) (*time.Time, error) { return &e, nil } +// NewCmdRevokeAuthorization returns a CLI command handler for creating a MsgRevoke transaction. func NewCmdRevokeAuthorization() *cobra.Command { cmd := &cobra.Command{ Use: "revoke [grantee] [msg-type-url] --from=[granter]", @@ -222,6 +234,7 @@ Example: return cmd } +// NewCmdExecAuthorization returns a CLI command handler for creating a MsgExec transaction. func NewCmdExecAuthorization() *cobra.Command { cmd := &cobra.Command{ Use: "exec [tx-json-file] --from [grantee]", @@ -235,7 +248,6 @@ Example: ), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err diff --git a/x/authz/client/testutil/grpc.go b/x/authz/client/testutil/grpc.go index 6cf5e65ab76a..20a0f7c903fc 100644 --- a/x/authz/client/testutil/grpc.go +++ b/x/authz/client/testutil/grpc.go @@ -160,7 +160,6 @@ func (s *IntegrationTestSuite) TestQueryGrantsGRPC() { s.Require().NoError(err) tc.postRun(&authorizations) } - }) } } @@ -213,7 +212,6 @@ func (s *IntegrationTestSuite) TestQueryGranterGrantsGRPC() { // FIXME: https://github.com/cosmos/cosmos-sdk/issues/10965 require.Len(authorizations.Grants, tc.numItems) } - }) } } @@ -266,7 +264,6 @@ func (s *IntegrationTestSuite) TestQueryGranteeGrantsGRPC() { // FIXME: https://github.com/cosmos/cosmos-sdk/issues/10965 require.Len(authorizations.Grants, tc.numItems) } - }) } } diff --git a/x/authz/client/testutil/query.go b/x/authz/client/testutil/query.go index 56296576507b..45921a054de6 100644 --- a/x/authz/client/testutil/query.go +++ b/x/authz/client/testutil/query.go @@ -25,7 +25,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorizations() { []string{ grantee.String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -103,7 +103,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() { []string{ grantee.String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -161,7 +161,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, - `{"@type":"/cosmos.bank.v1beta1.SendAuthorization","spend_limit":[{"denom":"steak","amount":"100"}]}`, + `{"@type":"/cosmos.bank.v1beta1.SendAuthorization","spend_limit":[{"denom":"stake","amount":"100"}]}`, }, } for _, tc := range testCases { diff --git a/x/authz/client/testutil/tx.go b/x/authz/client/testutil/tx.go index f7db4fe644be..ecac6abce78e 100644 --- a/x/authz/client/testutil/tx.go +++ b/x/authz/client/testutil/tx.go @@ -14,6 +14,7 @@ import ( clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/authz" "github.com/cosmos/cosmos-sdk/x/authz/client/cli" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" bank "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -68,7 +69,7 @@ func (s *IntegrationTestSuite) SetupSuite() { out, err := CreateGrant(val, []string{ s.grantee[1].String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -88,7 +89,7 @@ func (s *IntegrationTestSuite) SetupSuite() { out, err = CreateGrant(val, []string{ s.grantee[2].String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -104,7 +105,6 @@ func (s *IntegrationTestSuite) SetupSuite() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(int(response.Code), 0) s.Require().NotEqual(int(response.Height), 0) - } func (s *IntegrationTestSuite) createAccount(uid string) sdk.AccAddress { @@ -139,9 +139,11 @@ func (s *IntegrationTestSuite) TearDownSuite() { s.network.Cleanup() } -var typeMsgSend = bank.SendAuthorization{}.MsgTypeURL() -var typeMsgVote = sdk.MsgTypeURL(&govv1.MsgVote{}) -var typeMsgSubmitProposal = sdk.MsgTypeURL(&govv1.MsgSubmitProposal{}) +var ( + typeMsgSend = bank.SendAuthorization{}.MsgTypeURL() + typeMsgVote = sdk.MsgTypeURL(&govv1.MsgVote{}) + typeMsgSubmitProposal = sdk.MsgTypeURL(&govv1.MsgSubmitProposal{}) +) func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { val := s.network.Validators[0] @@ -155,45 +157,49 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { args []string expectedCode uint32 expectErr bool + expErrMsg string }{ { "Invalid granter Address", []string{ "grantee_addr", "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=%s", flags.FlagFrom, "granter"), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), }, 0, true, + "key not found", }, { "Invalid grantee Address", []string{ "grantee_addr", "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), }, 0, true, + "invalid separator index", }, { "Invalid expiration time", []string{ grantee.String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagBroadcastMode), fmt.Sprintf("--%s=%d", cli.FlagExpiration, pastHour), }, 0, true, + "", }, { "fail with error invalid msg-type", @@ -209,6 +215,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0x1d, false, + "", }, { "failed with error both validators not allowed", @@ -226,6 +233,92 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, true, + "cannot set both allowed & deny list", + }, + { + "invalid bond denom for tx delegate authorization allowed validators", + []string{ + grantee.String(), + "delegate", + fmt.Sprintf("--%s=100xyz", cli.FlagSpendLimit), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), + fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + 0, + true, + "invalid denom", + }, + { + "invalid bond denom for tx delegate authorization deny validators", + []string{ + grantee.String(), + "delegate", + fmt.Sprintf("--%s=100xyz", cli.FlagSpendLimit), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), + fmt.Sprintf("--%s=%s", cli.FlagDenyValidators, val.ValAddress.String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + 0, + true, + "invalid denom", + }, + { + "invalid bond denom for tx undelegate authorization", + []string{ + grantee.String(), + "unbond", + fmt.Sprintf("--%s=100xyz", cli.FlagSpendLimit), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), + fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + 0, + true, + "invalid denom", + }, + { + "invalid bond denon for tx redelegate authorization", + []string{ + grantee.String(), + "redelegate", + fmt.Sprintf("--%s=100xyz", cli.FlagSpendLimit), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), + fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + 0, + true, + "invalid denom", + }, + { + "invalid decimal coin expression with more than single coin", + []string{ + grantee.String(), + "delegate", + fmt.Sprintf("--%s=100stake,20xyz", cli.FlagSpendLimit), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), + fmt.Sprintf("--%s=%s", cli.FlagAllowedValidators, val.ValAddress.String()), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + 0, + true, + "invalid decimal coin expression", }, { "valid tx delegate authorization allowed validators", @@ -242,6 +335,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, { "valid tx delegate authorization deny validators", @@ -258,6 +352,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, { "valid tx undelegate authorization", @@ -274,6 +369,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, { "valid tx redelegate authorization", @@ -290,13 +386,14 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, { "Valid tx send authorization", []string{ grantee.String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%d", cli.FlagExpiration, twoHours), @@ -305,6 +402,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, { "Valid tx generic authorization", @@ -320,6 +418,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, { "fail when granter = grantee", @@ -335,6 +434,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, true, + "grantee and granter should be different", }, { "Valid tx with amino", @@ -351,6 +451,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { }, 0, false, + "", }, } @@ -363,6 +464,7 @@ func (s *IntegrationTestSuite) TestCLITxGrantAuthorization() { ) if tc.expectErr { s.Require().Error(err, out) + s.Require().Contains(err.Error(), tc.expErrMsg) } else { var txResp sdk.TxResponse s.Require().NoError(err) @@ -391,7 +493,7 @@ func (s *IntegrationTestSuite) TestCmdRevokeAuthorizations() { []string{ grantee.String(), "send", - fmt.Sprintf("--%s=100steak", cli.FlagSpendLimit), + fmt.Sprintf("--%s=100stake", cli.FlagSpendLimit), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -563,7 +665,7 @@ func (s *IntegrationTestSuite) TestExecAuthorizationWithExpiration() { fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }) s.Require().NoError(err) - s.Require().Contains(res.String(), "authorization not found") + s.Require().Contains(res.String(), authz.ErrNoAuthorizationFound.Error()) } func (s *IntegrationTestSuite) TestNewExecGenericAuthorized() { @@ -651,7 +753,6 @@ func (s *IntegrationTestSuite) TestNewExecGenericAuthorized() { for _, tc := range testCases { tc := tc s.Run(tc.name, func() { - cmd := cli.NewCmdExecAuthorization() clientCtx := val.ClientCtx @@ -745,7 +846,7 @@ func (s *IntegrationTestSuite) TestNewExecGrantAuthorized() { fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, - 4, + authz.ErrNoAuthorizationFound.ABCICode(), false, "", }, @@ -844,9 +945,9 @@ func (s *IntegrationTestSuite) TestExecDelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, - 4, + authz.ErrNoAuthorizationFound.ABCICode(), false, - "authorization not found", + authz.ErrNoAuthorizationFound.Error(), }, } @@ -1065,9 +1166,9 @@ func (s *IntegrationTestSuite) TestExecUndelegateAuthorization() { fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), }, - 4, + authz.ErrNoAuthorizationFound.ABCICode(), false, - "authorization not found", + authz.ErrNoAuthorizationFound.Error(), }, } diff --git a/x/authz/codec.go b/x/authz/codec.go index da8222c8ec45..77a6fa24e4f9 100644 --- a/x/authz/codec.go +++ b/x/authz/codec.go @@ -36,6 +36,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { msgservice.RegisterMsgServiceDesc(registry, MsgServiceDesc()) } + func init() { // Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be // used to properly serialize MsgGrant and MsgExec instances diff --git a/x/authz/errors.go b/x/authz/errors.go index 02251c8d6f7e..2aaac7122f9c 100644 --- a/x/authz/errors.go +++ b/x/authz/errors.go @@ -6,5 +6,20 @@ import ( // x/authz module sentinel errors var ( + // ErrNoAuthorizationFound error if there is no authorization found given a grant key + ErrNoAuthorizationFound = sdkerrors.Register(ModuleName, 2, "authorization not found") + // ErrInvalidExpirationTime error if the set expiration time is in the past ErrInvalidExpirationTime = sdkerrors.Register(ModuleName, 3, "expiration time of authorization should be more than current time") + // ErrUnknownAuthorizationType error for unknown authorization type + ErrUnknownAuthorizationType = sdkerrors.Register(ModuleName, 4, "unknown authorization type") + // ErrNoGrantKeyFound error if the requested grant key does not exist + ErrNoGrantKeyFound = sdkerrors.Register(ModuleName, 5, "grant key not found") + // ErrAuthorizationExpired error if the authorization has expired + ErrAuthorizationExpired = sdkerrors.Register(ModuleName, 6, "authorization expired") + // ErrGranteeIsGranter error if the grantee and the granter are the same + ErrGranteeIsGranter = sdkerrors.Register(ModuleName, 7, "grantee and granter should be different") + // ErrAuthorizationNumOfSigners error if an authorization message does not have only one signer + ErrAuthorizationNumOfSigners = sdkerrors.Register(ModuleName, 9, "authorization can be given to msg with only one signer") + // ErrNegativeMaxTokens error if the max tokens is negative + ErrNegativeMaxTokens = sdkerrors.Register(ModuleName, 12, "max tokens should be positive") ) diff --git a/x/authz/generic_authorization.go b/x/authz/generic_authorization.go index d6249b137a28..23853d250a7a 100644 --- a/x/authz/generic_authorization.go +++ b/x/authz/generic_authorization.go @@ -4,9 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var ( - _ Authorization = &GenericAuthorization{} -) +var _ Authorization = &GenericAuthorization{} // NewGenericAuthorization creates a new GenericAuthorization object. func NewGenericAuthorization(msgTypeURL string) *GenericAuthorization { diff --git a/x/authz/keeper/genesis.go b/x/authz/keeper/genesis.go new file mode 100644 index 000000000000..6ef975a74dfe --- /dev/null +++ b/x/authz/keeper/genesis.go @@ -0,0 +1,46 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +// InitGenesis new authz genesis +func (k Keeper) InitGenesis(ctx sdk.Context, data *authz.GenesisState) { + now := ctx.BlockTime() + for _, entry := range data.Authorization { + // ignore expired authorizations + if entry.Expiration != nil && entry.Expiration.Before(now) { + continue + } + + grantee := sdk.MustAccAddressFromBech32(entry.Grantee) + granter := sdk.MustAccAddressFromBech32(entry.Granter) + + a, ok := entry.Authorization.GetCachedValue().(authz.Authorization) + if !ok { + panic("expected authorization") + } + + err := k.SaveGrant(ctx, grantee, granter, a, entry.Expiration) + if err != nil { + panic(err) + } + } +} + +// ExportGenesis returns a GenesisState for a given context. +func (k Keeper) ExportGenesis(ctx sdk.Context) *authz.GenesisState { + var entries []authz.GrantAuthorization + k.IterateGrants(ctx, func(granter, grantee sdk.AccAddress, grant authz.Grant) bool { + entries = append(entries, authz.GrantAuthorization{ + Granter: granter.String(), + Grantee: grantee.String(), + Expiration: grant.Expiration, + Authorization: grant.Authorization, + }) + return false + }) + + return authz.NewGenesisState(entries) +} diff --git a/x/authz/keeper/grpc_query.go b/x/authz/keeper/grpc_query.go index 6f1947b1bbb7..3273ee282533 100644 --- a/x/authz/keeper/grpc_query.go +++ b/x/authz/keeper/grpc_query.go @@ -6,9 +6,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - proto "github.com/gogo/protobuf/proto" - - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" @@ -20,6 +17,7 @@ import ( var _ authz.QueryServer = Keeper{} // Authorizations implements the Query/Grants gRPC method. +// It returns grants for a granter-grantee pair. If msg type URL is set, it returns grants only for that msg type. func (k Keeper) Grants(c context.Context, req *authz.QueryGrantsRequest) (*authz.QueryGrantsResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") @@ -39,7 +37,7 @@ func (k Keeper) Grants(c context.Context, req *authz.QueryGrantsRequest) (*authz if req.MsgTypeUrl != "" { grant, found := k.getGrant(ctx, grantStoreKey(grantee, granter, req.MsgTypeUrl)) if !found { - return nil, sdkerrors.ErrNotFound.Wrapf("authorization not found for %s type", req.MsgTypeUrl) + return nil, sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "authorization not found for %s type", req.MsgTypeUrl) } authorization, err := grant.GetAuthorization() @@ -63,34 +61,22 @@ func (k Keeper) Grants(c context.Context, req *authz.QueryGrantsRequest) (*authz key := grantStoreKey(grantee, granter, "") grantsStore := prefix.NewStore(store, key) - var authorizations []*authz.Grant - pageRes, err := query.FilteredPaginate(grantsStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { - auth, err := unmarshalAuthorization(k.cdc, value) - if err != nil { - return false, err - } - + authorizations, pageRes, err := query.GenericFilteredPaginate(k.cdc, grantsStore, req.Pagination, func(key []byte, auth *authz.Grant) (*authz.Grant, error) { auth1, err := auth.GetAuthorization() if err != nil { - return false, err + return nil, err } - if accumulate { - msg, ok := auth1.(proto.Message) - if !ok { - return false, status.Errorf(codes.Internal, "can't protomarshal %T", msg) - } - - authorizationAny, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return false, status.Errorf(codes.Internal, err.Error()) - } - authorizations = append(authorizations, &authz.Grant{ - Authorization: authorizationAny, - Expiration: auth.Expiration, - }) + authorizationAny, err := codectypes.NewAnyWithValue(auth1) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) } - return true, nil + return &authz.Grant{ + Authorization: authorizationAny, + Expiration: auth.Expiration, + }, nil + }, func() *authz.Grant { + return &authz.Grant{} }) if err != nil { return nil, err @@ -117,35 +103,29 @@ func (k Keeper) GranterGrants(c context.Context, req *authz.QueryGranterGrantsRe store := ctx.KVStore(k.storeKey) authzStore := prefix.NewStore(store, grantStoreKey(nil, granter, "")) - var grants []*authz.GrantAuthorization - pageRes, err := query.FilteredPaginate(authzStore, req.Pagination, func(key []byte, value []byte, - accumulate bool) (bool, error) { - auth, err := unmarshalAuthorization(k.cdc, value) + grants, pageRes, err := query.GenericFilteredPaginate(k.cdc, authzStore, req.Pagination, func(key []byte, auth *authz.Grant) (*authz.GrantAuthorization, error) { + auth1, err := auth.GetAuthorization() if err != nil { - return false, err + return nil, err } - auth1, err := auth.GetAuthorization() + any, err := codectypes.NewAnyWithValue(auth1) if err != nil { - return false, err + return nil, status.Errorf(codes.Internal, err.Error()) } - if accumulate { - any, err := codectypes.NewAnyWithValue(auth1) - if err != nil { - return false, status.Errorf(codes.Internal, err.Error()) - } - - grantee := firstAddressFromGrantStoreKey(key) - grants = append(grants, &authz.GrantAuthorization{ - Granter: granter.String(), - Grantee: grantee.String(), - Authorization: any, - Expiration: auth.Expiration, - }) - } - return true, nil + grantee := firstAddressFromGrantStoreKey(key) + return &authz.GrantAuthorization{ + Granter: granter.String(), + Grantee: grantee.String(), + Authorization: any, + Expiration: auth.Expiration, + }, nil + + }, func() *authz.Grant { + return &authz.Grant{} }) + if err != nil { return nil, err } @@ -170,37 +150,30 @@ func (k Keeper) GranteeGrants(c context.Context, req *authz.QueryGranteeGrantsRe ctx := sdk.UnwrapSDKContext(c) store := prefix.NewStore(ctx.KVStore(k.storeKey), GrantKey) - var authorizations []*authz.GrantAuthorization - pageRes, err := query.FilteredPaginate(store, req.Pagination, func(key []byte, value []byte, - accumulate bool) (bool, error) { - auth, err := unmarshalAuthorization(k.cdc, value) + authorizations, pageRes, err := query.GenericFilteredPaginate(k.cdc, store, req.Pagination, func(key []byte, auth *authz.Grant) (*authz.GrantAuthorization, error) { + auth1, err := auth.GetAuthorization() if err != nil { - return false, err + return nil, err } granter, g, _ := parseGrantStoreKey(append(GrantKey, key...)) if !g.Equals(grantee) { - return false, nil + return nil, nil } - auth1, err := auth.GetAuthorization() + authorizationAny, err := codectypes.NewAnyWithValue(auth1) if err != nil { - return false, err - } - if accumulate { - any, err := codectypes.NewAnyWithValue(auth1) - if err != nil { - return false, status.Errorf(codes.Internal, err.Error()) - } - - authorizations = append(authorizations, &authz.GrantAuthorization{ - Authorization: any, - Expiration: auth.Expiration, - Granter: granter.String(), - Grantee: grantee.String(), - }) + return nil, status.Errorf(codes.Internal, err.Error()) } - return true, nil + + return &authz.GrantAuthorization{ + Authorization: authorizationAny, + Expiration: auth.Expiration, + Granter: granter.String(), + Grantee: grantee.String(), + }, nil + }, func() *authz.Grant { + return &authz.Grant{} }) if err != nil { return nil, err @@ -211,9 +184,3 @@ func (k Keeper) GranteeGrants(c context.Context, req *authz.QueryGranteeGrantsRe Pagination: pageRes, }, nil } - -// unmarshal an authorization from a store value -func unmarshalAuthorization(cdc codec.BinaryCodec, value []byte) (v authz.Grant, err error) { - err = cdc.Unmarshal(value, &v) - return v, err -} diff --git a/x/authz/keeper/grpc_query_test.go b/x/authz/keeper/grpc_query_test.go index d2f0b09e8b19..440859ee24b1 100644 --- a/x/authz/keeper/grpc_query_test.go +++ b/x/authz/keeper/grpc_query_test.go @@ -198,7 +198,8 @@ func (suite *TestSuite) TestGRPCQueryGranterGrants() { }, { "valid case, pagination", - func() {}, + func() { + }, false, authz.QueryGranterGrantsRequest{ Granter: addrs[0].String(), @@ -253,6 +254,15 @@ func (suite *TestSuite) TestGRPCQueryGranteeGrants() { }, 1, }, + { + "valid case, no authorization found", + func() {}, + false, + authz.QueryGranteeGrantsRequest{ + Grantee: addrs[2].String(), + }, + 0, + }, { "valid case, multiple authorization", func() { diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index a9917cf12119..3711f4a1fc4f 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -2,19 +2,20 @@ package keeper import ( "fmt" + "strconv" "time" "github.com/gogo/protobuf/proto" - + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" "github.com/cosmos/cosmos-sdk/x/authz" ) @@ -26,12 +27,12 @@ const gasCostPerIteration = uint64(20) type Keeper struct { storeKey storetypes.StoreKey cdc codec.BinaryCodec - router *middleware.MsgServiceRouter + router *baseapp.MsgServiceRouter authKeeper authkeeper.AccountKeeper } // NewKeeper constructs a message authorization Keeper -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, router *middleware.MsgServiceRouter, ak authkeeper.AccountKeeper) Keeper { +func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, router *baseapp.MsgServiceRouter, ak authkeeper.AccountKeeper) Keeper { return Keeper{ storeKey: storeKey, cdc: cdc, @@ -60,12 +61,12 @@ func (k Keeper) update(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccA skey := grantStoreKey(grantee, granter, updated.MsgTypeURL()) grant, found := k.getGrant(ctx, skey) if !found { - return sdkerrors.ErrNotFound.Wrap("authorization not found") + return authz.ErrNoAuthorizationFound } msg, ok := updated.(proto.Message) if !ok { - sdkerrors.ErrPackAny.Wrapf("cannot proto marshal %T", updated) + return sdkerrors.ErrPackAny.Wrapf("cannot proto marshal %T", updated) } any, err := codectypes.NewAnyWithValue(msg) @@ -76,30 +77,36 @@ func (k Keeper) update(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccA grant.Authorization = any store := ctx.KVStore(k.storeKey) store.Set(skey, k.cdc.MustMarshal(&grant)) + return nil } // DispatchActions attempts to execute the provided messages via authorization // grants from the message signer to the grantee. func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs []sdk.Msg) ([][]byte, error) { - var results = make([][]byte, len(msgs)) + results := make([][]byte, len(msgs)) now := ctx.BlockTime() + for i, msg := range msgs { signers := msg.GetSigners() if len(signers) != 1 { - return nil, sdkerrors.ErrInvalidRequest.Wrap("authorization can be given to msg with only one signer") + return nil, authz.ErrAuthorizationNumOfSigners } + granter := signers[0] - // if granter != grantee then check authorization.Accept, otherwise we implicitly accept. + // If granter != grantee then check authorization.Accept, otherwise we + // implicitly accept. if !granter.Equals(grantee) { - grant, found := k.getGrant(ctx, grantStoreKey(grantee, granter, sdk.MsgTypeURL(msg))) + skey := grantStoreKey(grantee, granter, sdk.MsgTypeURL(msg)) + + grant, found := k.getGrant(ctx, skey) if !found { - return nil, sdkerrors.ErrUnauthorized.Wrap("authorization not found") + return nil, sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "failed to update grant with key %s", string(skey)) } if grant.Expiration != nil && grant.Expiration.Before(now) { - return nil, sdkerrors.ErrUnauthorized.Wrap("authorization expired") + return nil, authz.ErrAuthorizationExpired } authorization, err := grant.GetAuthorization() @@ -111,6 +118,7 @@ func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs [] if err != nil { return nil, err } + if resp.Delete { err = k.DeleteGrant(ctx, grantee, granter, sdk.MsgTypeURL(msg)) } else if resp.Updated != nil { @@ -119,6 +127,7 @@ func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs [] if err != nil { return nil, err } + if !resp.Accept { return nil, sdkerrors.ErrUnauthorized } @@ -133,14 +142,19 @@ func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs [] if err != nil { return nil, sdkerrors.Wrapf(err, "failed to execute message; message %v", msg) } + results[i] = msgResp.Data // emit the events from the dispatched actions events := msgResp.Events sdkEvents := make([]sdk.Event, 0, len(events)) - for i := 0; i < len(events); i++ { - sdkEvents = append(sdkEvents, sdk.Event(events[i])) + for _, event := range events { + e := event + e.Attributes = append(e.Attributes, abci.EventAttribute{Key: []byte("authz_msg_index"), Value: []byte(strconv.Itoa(i))}) + + sdkEvents = append(sdkEvents, sdk.Event(e)) } + ctx.EventManager().EmitEvents(sdkEvents) } @@ -193,11 +207,9 @@ func (k Keeper) DeleteGrant(ctx sdk.Context, grantee sdk.AccAddress, granter sdk skey := grantStoreKey(grantee, granter, msgType) grant, found := k.getGrant(ctx, skey) if !found { - return sdkerrors.ErrNotFound.Wrap("authorization not found") + return sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "failed to delete grant with key %s", string(skey)) } - store.Delete(skey) - if grant.Expiration != nil { err := k.removeFromGrantQueue(ctx, skey, granter, grantee, *grant.Expiration) if err != nil { @@ -205,6 +217,8 @@ func (k Keeper) DeleteGrant(ctx sdk.Context, grantee sdk.AccAddress, granter sdk } } + store.Delete(skey) + return ctx.EventManager().EmitTypedEvent(&authz.EventRevoke{ MsgTypeUrl: msgType, Granter: granter.String(), @@ -242,7 +256,8 @@ func (k Keeper) GetAuthorizations(ctx sdk.Context, grantee sdk.AccAddress, grant // It should not be used in query or msg services without charging additional gas. // The iteration stops when the handler function returns true or the iterator exhaust. func (k Keeper) IterateGrants(ctx sdk.Context, - handler func(granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, grant authz.Grant) bool) { + handler func(granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, grant authz.Grant) bool, +) { store := ctx.KVStore(k.storeKey) iter := sdk.KVStorePrefixIterator(store, GrantKey) defer iter.Close() @@ -256,53 +271,6 @@ func (k Keeper) IterateGrants(ctx sdk.Context, } } -// ExportGenesis returns a GenesisState for a given context. -func (k Keeper) ExportGenesis(ctx sdk.Context) *authz.GenesisState { - var entries []authz.GrantAuthorization - k.IterateGrants(ctx, func(granter, grantee sdk.AccAddress, grant authz.Grant) bool { - entries = append(entries, authz.GrantAuthorization{ - Granter: granter.String(), - Grantee: grantee.String(), - Expiration: grant.Expiration, - Authorization: grant.Authorization, - }) - return false - }) - - return authz.NewGenesisState(entries) -} - -// InitGenesis new authz genesis -func (k Keeper) InitGenesis(ctx sdk.Context, data *authz.GenesisState) { - now := ctx.BlockTime() - for _, entry := range data.Authorization { - // ignore expired authorizations - if entry.Expiration != nil && entry.Expiration.Before(now) { - continue - } - - grantee, err := sdk.AccAddressFromBech32(entry.Grantee) - if err != nil { - panic(err) - } - - granter, err := sdk.AccAddressFromBech32(entry.Granter) - if err != nil { - panic(err) - } - - a, ok := entry.Authorization.GetCachedValue().(authz.Authorization) - if !ok { - panic("expected authorization") - } - - err = k.SaveGrant(ctx, grantee, granter, a, entry.Expiration) - if err != nil { - panic(err) - } - } -} - func (keeper Keeper) getGrantQueueItem(ctx sdk.Context, expiration time.Time, granter, grantee sdk.AccAddress) (*authz.GrantQueueItem, error) { store := ctx.KVStore(keeper.storeKey) bz := store.Get(GrantQueueKey(expiration, granter, grantee)) @@ -318,7 +286,8 @@ func (keeper Keeper) getGrantQueueItem(ctx sdk.Context, expiration time.Time, gr } func (k Keeper) setGrantQueueItem(ctx sdk.Context, expiration time.Time, - granter sdk.AccAddress, grantee sdk.AccAddress, queueItems *authz.GrantQueueItem) error { + granter sdk.AccAddress, grantee sdk.AccAddress, queueItems *authz.GrantQueueItem, +) error { store := ctx.KVStore(k.storeKey) bz, err := k.cdc.Marshal(queueItems) if err != nil { @@ -330,8 +299,7 @@ func (k Keeper) setGrantQueueItem(ctx sdk.Context, expiration time.Time, } // insertIntoGrantQueue inserts a grant key into the grant queue -func (keeper Keeper) insertIntoGrantQueue(ctx sdk.Context, granter, grantee sdk.AccAddress, msgType string, - expiration time.Time) error { +func (keeper Keeper) insertIntoGrantQueue(ctx sdk.Context, granter, grantee sdk.AccAddress, msgType string, expiration time.Time) error { queueItems, err := keeper.getGrantQueueItem(ctx, expiration, granter, grantee) if err != nil { return err @@ -355,7 +323,7 @@ func (keeper Keeper) removeFromGrantQueue(ctx sdk.Context, grantKey []byte, gran key := GrantQueueKey(expiration, granter, grantee) bz := store.Get(key) if bz == nil { - return sdkerrors.ErrLogic.Wrap("can't remove grant from the expire queue, grant key not found") + return sdkerrors.Wrap(authz.ErrNoGrantKeyFound, "can't remove grant from the expire queue, grant key not found") } var queueItem authz.GrantQueueItem @@ -366,10 +334,10 @@ func (keeper Keeper) removeFromGrantQueue(ctx sdk.Context, grantKey []byte, gran _, _, msgType := parseGrantStoreKey(grantKey) queueItems := queueItem.MsgTypeUrls - for index, typeUrl := range queueItems { + for index, typeURL := range queueItems { ctx.GasMeter().ConsumeGas(gasCostPerIteration, "grant queue") - if typeUrl == msgType { + if typeURL == msgType { end := len(queueItem.MsgTypeUrls) - 1 queueItems[index] = queueItems[end] queueItems = queueItems[:end] @@ -406,8 +374,8 @@ func (k Keeper) DequeueAndDeleteExpiredGrants(ctx sdk.Context) error { store.Delete(iterator.Key()) - for _, typeUrl := range queueItem.MsgTypeUrls { - store.Delete(grantStoreKey(grantee, granter, typeUrl)) + for _, typeURL := range queueItem.MsgTypeUrls { + store.Delete(grantStoreKey(grantee, granter, typeURL)) } } diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index de57acf71c10..645aab5dfd25 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/stretchr/testify/suite" - tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/simapp" @@ -118,7 +118,6 @@ func (s *TestSuite) TestKeeperIter() { s.Require().Contains([]sdk.AccAddress{granterAddr, granter2Addr}, granter) return true }) - } func (s *TestSuite) TestDispatchAction() { @@ -220,7 +219,7 @@ func (s *TestSuite) TestDispatchAction() { require.Len(authzs, 1) authorization := authzs[0].(*banktypes.SendAuthorization) require.NotNil(authorization) - require.Equal(authorization.SpendLimit, coins100.Sub(coins10)) + require.Equal(authorization.SpendLimit, coins100.Sub(coins10...)) }, }, { @@ -265,7 +264,6 @@ func (s *TestSuite) TestDispatchAction() { tc.postRun() }) } - } // Tests that all msg events included in an authz MsgExec tx @@ -302,9 +300,12 @@ func (s *TestSuite) TestDispatchedEvents() { result, err := app.AuthzKeeper.DispatchActions(s.ctx, granteeAddr, executeMsgs) require.NoError(err) require.NotNil(result) + events := s.ctx.EventManager().Events() + // get last 5 events (events that occur *after* the grant) events = events[len(events)-5:] + requiredEvents := map[string]bool{ "coin_spent": false, "coin_received": false, diff --git a/x/authz/keeper/keys.go b/x/authz/keeper/keys.go index 9a935e5b2778..a079b71ddd6c 100644 --- a/x/authz/keeper/keys.go +++ b/x/authz/keeper/keys.go @@ -34,14 +34,8 @@ func grantStoreKey(grantee sdk.AccAddress, granter sdk.AccAddress, msgType strin m := conv.UnsafeStrToBytes(msgType) granter = address.MustLengthPrefix(granter) grantee = address.MustLengthPrefix(grantee) + key := sdk.AppendLengthPrefixedBytes(GrantKey, granter, grantee, m) - l := 1 + len(grantee) + len(granter) + len(m) - var key = make([]byte, l) - copy(key, GrantKey) - copy(key[1:], granter) - copy(key[1+len(granter):], grantee) - copy(key[l-len(m):], m) - // fmt.Println(">>>> len", l, key) return key } @@ -49,15 +43,15 @@ func grantStoreKey(grantee sdk.AccAddress, granter sdk.AccAddress, msgType strin func parseGrantStoreKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress, msgType string) { // key is of format: // 0x01 - kv.AssertKeyAtLeastLength(key, 2) - granterAddrLen := key[1] // remove prefix key - kv.AssertKeyAtLeastLength(key, int(3+granterAddrLen)) - granterAddr = sdk.AccAddress(key[2 : 2+granterAddrLen]) - granteeAddrLen := int(key[2+granterAddrLen]) - kv.AssertKeyAtLeastLength(key, 4+int(granterAddrLen+byte(granteeAddrLen))) - granteeAddr = sdk.AccAddress(key[3+granterAddrLen : 3+granterAddrLen+byte(granteeAddrLen)]) - - return granterAddr, granteeAddr, conv.UnsafeBytesToStr(key[3+granterAddrLen+byte(granteeAddrLen):]) + + granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1, 1) // ignore key[0] since it is a prefix key + granterAddr, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) + + granteeAddrLen, granteeAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) + granteeAddr, granteeAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, granteeAddrLenEndIndex+1, int(granteeAddrLen[0])) + + kv.AssertKeyAtLeastLength(key, granteeAddrEndIndex+1) + return granterAddr, granteeAddr, conv.UnsafeBytesToStr(key[(granteeAddrEndIndex + 1):]) } // parseGrantQueueKey split expiration time, granter and grantee from the grant queue key @@ -65,20 +59,18 @@ func parseGrantQueueKey(key []byte) (time.Time, sdk.AccAddress, sdk.AccAddress, // key is of format: // 0x02 - kv.AssertKeyAtLeastLength(key, 1+lenTime) - exp, err := sdk.ParseTimeBytes(key[1 : 1+lenTime]) + expBytes, expEndIndex := sdk.ParseLengthPrefixedBytes(key, 1, lenTime) + + exp, err := sdk.ParseTimeBytes(expBytes) if err != nil { return exp, nil, nil, err } - granterAddrLen := key[1+lenTime] - kv.AssertKeyAtLeastLength(key, 1+lenTime+int(granterAddrLen)) - granter := sdk.AccAddress(key[2+lenTime : byte(2+lenTime)+granterAddrLen]) + granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, expEndIndex+1, 1) + granter, granterEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) - granteeAddrLen := key[byte(2+lenTime)+granterAddrLen] - granteeStart := byte(3+lenTime) + granterAddrLen - kv.AssertKeyAtLeastLength(key, int(granteeStart)) - grantee := sdk.AccAddress(key[granteeStart : granteeStart+granteeAddrLen]) + granteeAddrLen, granteeAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterEndIndex+1, 1) + grantee, _ := sdk.ParseLengthPrefixedBytes(key, granteeAddrLenEndIndex+1, int(granteeAddrLen[0])) return exp, granter, grantee, nil } @@ -92,13 +84,7 @@ func GrantQueueKey(expiration time.Time, granter sdk.AccAddress, grantee sdk.Acc granter = address.MustLengthPrefix(granter) grantee = address.MustLengthPrefix(grantee) - l := 1 + len(exp) + len(granter) + len(grantee) - var key = make([]byte, l) - copy(key, GrantQueuePrefix) - copy(key[1:], exp) - copy(key[1+len(exp):], granter) - copy(key[1+len(exp)+len(granter):], grantee) - return key + return sdk.AppendLengthPrefixedBytes(GrantQueuePrefix, exp, granter, grantee) } // GrantQueueTimePrefix - return grant queue time prefix diff --git a/x/authz/keeper/keys_test.go b/x/authz/keeper/keys_test.go index 7a7858f704ff..531e441511c0 100644 --- a/x/authz/keeper/keys_test.go +++ b/x/authz/keeper/keys_test.go @@ -12,9 +12,11 @@ import ( bank "github.com/cosmos/cosmos-sdk/x/bank/types" ) -var granter = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -var grantee = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -var msgType = bank.SendAuthorization{}.MsgTypeURL() +var ( + granter = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) + grantee = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) + msgType = bank.SendAuthorization{}.MsgTypeURL() +) func TestGrantkey(t *testing.T) { require := require.New(t) diff --git a/x/authz/keeper/msg_server.go b/x/authz/keeper/msg_server.go index ac81b60b6469..7f3ff113d10e 100644 --- a/x/authz/keeper/msg_server.go +++ b/x/authz/keeper/msg_server.go @@ -17,6 +17,7 @@ func (k Keeper) Grant(goCtx context.Context, msg *authz.MsgGrant) (*authz.MsgGra if err != nil { return nil, err } + // create the account if it is not in account state granteeAcc := k.authKeeper.GetAccount(ctx, grantee) if granteeAcc == nil { @@ -33,9 +34,10 @@ func (k Keeper) Grant(goCtx context.Context, msg *authz.MsgGrant) (*authz.MsgGra if err != nil { return nil, err } + t := authorization.MsgTypeURL() if k.router.HandlerByTypeURL(t) == nil { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "%s doesn't exist.", t) + return nil, sdkerrors.ErrInvalidType.Wrapf("%s doesn't exist.", t) } err = k.SaveGrant(ctx, grantee, granter, authorization, msg.Grant.Expiration) @@ -73,13 +75,16 @@ func (k Keeper) Exec(goCtx context.Context, msg *authz.MsgExec) (*authz.MsgExecR if err != nil { return nil, err } + msgs, err := msg.GetMessages() if err != nil { return nil, err } + results, err := k.DispatchActions(ctx, grantee, msgs) if err != nil { return nil, err } + return &authz.MsgExecResponse{Results: results}, nil } diff --git a/x/authz/migrations/v046/keys.go b/x/authz/migrations/v046/keys.go index b4348df3bec1..9b4c74fb9f3d 100644 --- a/x/authz/migrations/v046/keys.go +++ b/x/authz/migrations/v046/keys.go @@ -30,7 +30,7 @@ func GrantQueueKey(expiration time.Time, granter sdk.AccAddress, grantee sdk.Acc grantee = address.MustLengthPrefix(grantee) l := 1 + len(exp) + len(granter) + len(grantee) - var key = make([]byte, l) + key := make([]byte, l) copy(key, GrantQueuePrefix) copy(key[1:], exp) copy(key[1+len(exp):], granter) @@ -48,7 +48,7 @@ func GrantStoreKey(grantee sdk.AccAddress, granter sdk.AccAddress, msgType strin grantee = address.MustLengthPrefix(grantee) l := 1 + len(grantee) + len(granter) + len(m) - var key = make([]byte, l) + key := make([]byte, l) copy(key, GrantPrefix) copy(key[1:], granter) copy(key[1+len(granter):], grantee) diff --git a/x/authz/migrations/v046/keys_test.go b/x/authz/migrations/v046/keys_test.go index 05a5bd6b1b6e..9a73edbc32dd 100644 --- a/x/authz/migrations/v046/keys_test.go +++ b/x/authz/migrations/v046/keys_test.go @@ -10,9 +10,11 @@ import ( "github.com/stretchr/testify/require" ) -var granter = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -var grantee = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -var msgType = bank.SendAuthorization{}.MsgTypeURL() +var ( + granter = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) + grantee = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) + msgType = bank.SendAuthorization{}.MsgTypeURL() +) func TestGrantkey(t *testing.T) { require := require.New(t) diff --git a/x/authz/module/abci.go b/x/authz/module/abci.go index e85044a95df4..c9e6fef5e7a6 100644 --- a/x/authz/module/abci.go +++ b/x/authz/module/abci.go @@ -7,7 +7,6 @@ import ( // BeginBlocker is called at the begining of every block func BeginBlocker(ctx sdk.Context, keeper keeper.Keeper) { - // delete all the mature grants if err := keeper.DequeueAndDeleteExpiredGrants(ctx); err != nil { panic(err) diff --git a/x/authz/module/abci_test.go b/x/authz/module/abci_test.go index 5858476aeac5..9b58c5eadbc7 100644 --- a/x/authz/module/abci_test.go +++ b/x/authz/module/abci_test.go @@ -27,7 +27,7 @@ func TestExpiredGrantsQueue(t *testing.T) { expiration2 := expiration.AddDate(1, 0, 0) smallCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 10)) - var save = func(grantee sdk.AccAddress, exp *time.Time) { + save := func(grantee sdk.AccAddress, exp *time.Time) { err := app.AuthzKeeper.SaveGrant(ctx, grantee, granter, banktypes.NewSendAuthorization(smallCoins), exp) require.NoError(t, err, "Grant from %s", grantee.String()) } @@ -40,7 +40,7 @@ func TestExpiredGrantsQueue(t *testing.T) { authz.RegisterQueryServer(queryHelper, app.AuthzKeeper) queryClient := authz.NewQueryClient(queryHelper) - var checkGrants = func(ctx sdk.Context, expectedNum int) { + checkGrants := func(ctx sdk.Context, expectedNum int) { authzmodule.BeginBlocker(ctx, app.AuthzKeeper) res, err := queryClient.GranterGrants(ctx.Context(), &authz.QueryGranterGrantsRequest{ diff --git a/x/authz/module/module.go b/x/authz/module/module.go index 219969f34f36..b92deb2e3e11 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -77,10 +76,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEn return authz.ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the authz module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(_ sdkclient.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the authz module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { if err := authz.RegisterQueryHandlerClient(context.Background(), mux, authz.NewQueryClient(clientCtx)); err != nil { @@ -167,11 +162,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, am.keeper) } -// EndBlock does nothing -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // ____________________________________________________________________________ // AppModuleSimulation functions diff --git a/x/authz/msgs.go b/x/authz/msgs.go index 26c4a6178ad9..8fbe17623f52 100644 --- a/x/authz/msgs.go +++ b/x/authz/msgs.go @@ -3,13 +3,14 @@ package authz import ( "time" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" + "github.com/gogo/protobuf/proto" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" ) var ( @@ -59,7 +60,7 @@ func (msg MsgGrant) ValidateBasic() error { } if granter.Equals(grantee) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "granter and grantee cannot be same") + return ErrGranteeIsGranter } return msg.Grant.ValidateBasic() } @@ -88,7 +89,7 @@ func (msg *MsgGrant) GetAuthorization() (Authorization, error) { func (msg *MsgGrant) SetAuthorization(a Authorization) error { m, ok := a.(proto.Message) if !ok { - return sdkerrors.Wrapf(sdkerrors.ErrPackAny, "can't proto marshal %T", m) + return sdkerrors.ErrPackAny.Wrapf("can't proto marshal %T", m) } any, err := cdctypes.NewAnyWithValue(m) if err != nil { @@ -144,11 +145,11 @@ func (msg MsgRevoke) ValidateBasic() error { } if granter.Equals(grantee) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "granter and grantee cannot be same") + return ErrGranteeIsGranter } if msg.MsgTypeUrl == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "missing method name") + return sdkerrors.ErrInvalidRequest.Wrap("missing method name") } return nil @@ -194,7 +195,7 @@ func (msg MsgExec) GetMessages() ([]sdk.Msg, error) { for i, msgAny := range msg.Msgs { msg, ok := msgAny.GetCachedValue().(sdk.Msg) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "messages contains %T which is not a sdk.MsgRequest", msgAny) + return nil, sdkerrors.ErrInvalidRequest.Wrapf("messages contains %T which is not a sdk.MsgRequest", msgAny) } msgs[i] = msg } @@ -215,7 +216,7 @@ func (msg MsgExec) ValidateBasic() error { } if len(msg.Msgs) == 0 { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "messages cannot be empty") + return sdkerrors.ErrInvalidRequest.Wrapf("messages cannot be empty") } return nil diff --git a/x/authz/msgs_test.go b/x/authz/msgs_test.go index 7f85584121ed..0318225df226 100644 --- a/x/authz/msgs_test.go +++ b/x/authz/msgs_test.go @@ -1,10 +1,11 @@ package authz_test import ( - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "testing" "time" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -46,6 +47,7 @@ func TestMsgExecAuthorized(t *testing.T) { } } } + func TestMsgRevokeAuthorization(t *testing.T) { tests := []struct { title string @@ -84,21 +86,35 @@ func TestMsgGrantAuthorization(t *testing.T) { expectErr bool valBasic bool }{ - {"nil granter address", - nil, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, &now, false, false}, - {"nil grantee address", - granter, nil, &banktypes.SendAuthorization{SpendLimit: coinsPos}, &now, false, false}, - {"nil granter and grantee address", - nil, nil, &banktypes.SendAuthorization{SpendLimit: coinsPos}, &now, false, false}, - {"nil authorization should fail", - granter, grantee, nil, &now, true, false}, - {"valid test case", - granter, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, addDatePtr(&now, 1, 0), false, true}, - {"valid test case with nil expire time", - granter, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, nil, false, true}, + { + "nil granter address", + nil, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, &now, false, false, + }, + { + "nil grantee address", + granter, nil, &banktypes.SendAuthorization{SpendLimit: coinsPos}, &now, false, false, + }, + { + "nil granter and grantee address", + nil, nil, &banktypes.SendAuthorization{SpendLimit: coinsPos}, &now, false, false, + }, + { + "nil authorization should fail", + granter, grantee, nil, &now, true, false, + }, + { + "valid test case", + granter, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, addDatePtr(&now, 1, 0), false, true, + }, + { + "valid test case with nil expire time", + granter, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, nil, false, true, + }, // we don't access the block time / nor time.Now, so we don't know if it's in the past at this level. - {"past expire time should not fail", - granter, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, addDatePtr(&now, 0, -1), false, true}, + { + "past expire time should not fail", + granter, grantee, &banktypes.SendAuthorization{SpendLimit: coinsPos}, addDatePtr(&now, 0, -1), false, true, + }, } for _, tc := range tests { msg, err := authz.NewMsgGrant( diff --git a/x/authz/simulation/genesis_test.go b/x/authz/simulation/genesis_test.go index 4236b068055b..8f313be8eab1 100644 --- a/x/authz/simulation/genesis_test.go +++ b/x/authz/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -26,7 +27,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/authz/simulation/operations.go b/x/authz/simulation/operations.go index 1879522b0ce1..5a047bbf6448 100644 --- a/x/authz/simulation/operations.go +++ b/x/authz/simulation/operations.go @@ -41,8 +41,8 @@ const ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( - appParams simtypes.AppParams, cdc codec.JSONCodec, ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keeper, appCdc cdctypes.AnyUnpacker) simulation.WeightedOperations { - + appParams simtypes.AppParams, cdc codec.JSONCodec, ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keeper, appCdc cdctypes.AnyUnpacker, +) simulation.WeightedOperations { var ( weightMsgGrant int weightExec int @@ -102,7 +102,7 @@ func SimulateMsgGrant(ak authz.AccountKeeper, bk authz.BankKeeper, _ keeper.Keep return simtypes.NoOpMsg(authz.ModuleName, TypeMsgGrant, err.Error()), nil, err } - spendLimit := spendableCoins.Sub(fees) + spendLimit := spendableCoins.Sub(fees...) if spendLimit == nil { return simtypes.NoOpMsg(authz.ModuleName, TypeMsgGrant, "spend limit is nil"), nil, nil } @@ -116,8 +116,10 @@ func SimulateMsgGrant(ak authz.AccountKeeper, bk authz.BankKeeper, _ keeper.Keep if err != nil { return simtypes.NoOpMsg(authz.ModuleName, TypeMsgGrant, err.Error()), nil, err } + txCfg := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txCfg, []sdk.Msg{msg}, fees, @@ -170,7 +172,7 @@ func SimulateMsgRevoke(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Kee granterAcc, ok := simtypes.FindAccount(accs, granterAddr) if !ok { - return simtypes.NoOpMsg(authz.ModuleName, TypeMsgRevoke, "account not found"), nil, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "account not found") + return simtypes.NoOpMsg(authz.ModuleName, TypeMsgRevoke, "account not found"), nil, sdkerrors.ErrNotFound.Wrapf("account not found") } spendableCoins := bk.SpendableCoins(ctx, granterAddr) @@ -187,7 +189,8 @@ func SimulateMsgRevoke(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Kee msg := authz.NewMsgRevoke(granterAddr, granteeAddr, a.MsgTypeURL()) txCfg := simappparams.MakeTestEncodingConfig().TxConfig account := ak.GetAccount(ctx, granterAddr) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txCfg, []sdk.Msg{&msg}, fees, @@ -241,15 +244,19 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe grantee, ok := simtypes.FindAccount(accs, granteeAddr) if !ok { - return simtypes.NoOpMsg(authz.ModuleName, TypeMsgRevoke, "Account not found"), nil, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "grantee account not found") + return simtypes.NoOpMsg(authz.ModuleName, TypeMsgRevoke, "Account not found"), nil, sdkerrors.ErrNotFound.Wrapf("grantee account not found") } if _, ok := simtypes.FindAccount(accs, granterAddr); !ok { - return simtypes.NoOpMsg(authz.ModuleName, TypeMsgRevoke, "Account not found"), nil, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "granter account not found") + return simtypes.NoOpMsg(authz.ModuleName, TypeMsgRevoke, "Account not found"), nil, sdkerrors.ErrNotFound.Wrapf("granter account not found") } granterspendableCoins := bk.SpendableCoins(ctx, granterAddr) coins := simtypes.RandSubsetCoins(r, granterspendableCoins) + // if coins slice is empty, we can not create valid banktype.MsgSend + if len(coins) == 0 { + return simtypes.NoOpMsg(authz.ModuleName, TypeMsgExec, "empty coins slice"), nil, nil + } // Check send_enabled status of each sent coin denom if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { @@ -276,7 +283,8 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe txCfg := simappparams.MakeTestEncodingConfig().TxConfig granteeAcc := ak.GetAccount(ctx, granteeAddr) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txCfg, []sdk.Msg{&msgExec}, fees, diff --git a/x/authz/simulation/operations_test.go b/x/authz/simulation/operations_test.go index c1cfe27cc26b..fab35b4d63c9 100644 --- a/x/authz/simulation/operations_test.go +++ b/x/authz/simulation/operations_test.go @@ -114,7 +114,6 @@ func (suite *SimTestSuite) TestSimulateGrant() { suite.Require().Equal(granter.Address.String(), msg.Granter) suite.Require().Equal(grantee.Address.String(), msg.Grantee) suite.Require().Len(futureOperations, 0) - } func (suite *SimTestSuite) TestSimulateRevoke() { @@ -128,7 +127,8 @@ func (suite *SimTestSuite) TestSimulateRevoke() { Header: tmproto.Header{ Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash, - }}) + }, + }) initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200000) initCoins := sdk.NewCoins(sdk.NewCoin("stake", initAmt)) @@ -154,7 +154,6 @@ func (suite *SimTestSuite) TestSimulateRevoke() { suite.Require().Equal(grantee.Address.String(), msg.Grantee) suite.Require().Equal(banktypes.SendAuthorization{}.MsgTypeURL(), msg.MsgTypeUrl) suite.Require().Len(futureOperations, 0) - } func (suite *SimTestSuite) TestSimulateExec() { @@ -189,7 +188,6 @@ func (suite *SimTestSuite) TestSimulateExec() { suite.Require().True(operationMsg.OK) suite.Require().Equal(grantee.Address.String(), msg.Grantee) suite.Require().Len(futureOperations, 0) - } func TestSimTestSuite(t *testing.T) { diff --git a/x/authz/spec/01_concepts.md b/x/authz/spec/01_concepts.md index c4cc63acc4e3..ffe810b599bf 100644 --- a/x/authz/spec/01_concepts.md +++ b/x/authz/spec/01_concepts.md @@ -7,14 +7,14 @@ order: 1 ## Authorization and Grant The `x/authz` module defines interfaces and messages grant authorizations to perform actions -on behalf of one account to other accounts. The design is defined in the [ADR 030](../../../docs/architecture/adr-030-authz-module.md). +on behalf of one account to other accounts. The design is defined in the [ADR 030](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-030-authz-module.md). A *grant* is an allowance to execute a Msg by the grantee on behalf of the granter. Authorization is an interface that must be implemented by a concrete authorization logic to validate and execute grants. Authorizations are extensible and can be defined for any Msg service method even outside of the module where the Msg method is defined. See the `SendAuthorization` example in the next section for more details. **Note:** The authz module is different from the [auth (authentication)](../modules/auth/) module that is responsible for specifying the base transaction and account types. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/authz/authorizations.go#L11-L25 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/authz/authorizations.go#L11-L25 ## Built-in Authorizations @@ -24,9 +24,9 @@ The Cosmos SDK `x/authz` module comes with following authorization types: `GenericAuthorization` implements the `Authorization` interface that gives unrestricted permission to execute the provided Msg on behalf of granter's account. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/authz.proto#L14-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/authz/v1beta1/authz.proto#L13-L20 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/authz/generic_authorization.go#L18-L31 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/authz/generic_authorization.go#L16-L29 * `msg` stores Msg type URL. @@ -34,20 +34,22 @@ The Cosmos SDK `x/authz` module comes with following authorization types: `SendAuthorization` implements the `Authorization` interface for the `cosmos.bank.v1beta1.MsgSend` Msg. It takes a (positive) `SpendLimit` that specifies the maximum amount of tokens the grantee can spend. The `SpendLimit` is updated as the tokens are spent. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/bank/v1beta1/authz.proto#L10-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/bank/v1beta1/authz.proto#L10-L19 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/bank/types/send_authorization.go#L25-L40 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/bank/types/send_authorization.go#L23-L38 * `spend_limit` keeps track of how many coins are left in the authorization. ### StakeAuthorization -`StakeAuthorization` implements the `Authorization` interface for messages in the [staking module](https://docs.cosmos.network/v0.44/modules/staking/). It takes an `AuthorizationType` to specify whether you want to authorise delegating, undelegating or redelegating (i.e. these have to be authorised seperately). It also takes a `MaxTokens` that keeps track of a limit to the amount of tokens that can be delegated/undelegated/redelegated. If left empty, the amount is unlimited. Additionally, this Msg takes an `AllowList` and a `DenyList`, which allows you to select which validators you allow grantees to stake with. +`StakeAuthorization` implements the `Authorization` interface for messages in the [staking module](https://docs.cosmos.network/v0.44/modules/staking/). It takes an `AuthorizationType` to specify whether you want to authorise delegating, undelegating or redelegating (i.e. these have to be authorised seperately). It also takes a required `MaxTokens` that keeps track of a limit to the amount of tokens that can be delegated/undelegated/redelegated. If left empty, the amount is unlimited. Additionally, this Msg takes an `AllowList` or a `DenyList`, which allows you to select which validators you allow or deny grantees to stake with. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/staking/v1beta1/authz.proto#L11-L31 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/authz.proto#L10-L33 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/x/staking/types/authz.go#L18-L38 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/staking/types/authz.go#L15-L35 ## Gas In order to prevent DoS attacks, granting `StakeAuthorization`s with `x/authz` incurs gas. `StakeAuthorization` allows you to authorize another account to delegate, undelegate, or redelegate to validators. The authorizer can define a list of validators they allow or deny delegations to. The Cosmos SDK iterates over these lists and charge 10 gas for each validator in both of the lists. + +Since the state maintaining a list for granter, grantee pair with same expiration, we are iterating over the list to remove the grant (incase of any revoke of paritcular `msgType`) from the list and we are charging 20 gas per iteration. diff --git a/x/authz/spec/02_state.md b/x/authz/spec/02_state.md index 4aa7ac143234..ac5df10220d0 100644 --- a/x/authz/spec/02_state.md +++ b/x/authz/spec/02_state.md @@ -12,4 +12,12 @@ Grants are identified by combining granter address (the address bytes of the gra The grant object encapsulates an `Authorization` type and an expiration timestamp: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/authz.proto#L21-L26 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/authz/v1beta1/authz.proto#L22-L30 + +## GrantQueue + +We are maintaining a queue for authz pruning, whenever a grant created an item will be added to `GrantQueue` with a key of granter, grantee, expiration and value added as array of msg type urls. + +* GrantQueue: `0x02 | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes | expiration_bytes -> ProtocalBuffer([]string{msgTypeUrls})` + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/authz/keeper/keys.go#L78-L93 diff --git a/x/authz/spec/03_messages.md b/x/authz/spec/03_messages.md index 22007980a226..2dfca9c7c6c9 100644 --- a/x/authz/spec/03_messages.md +++ b/x/authz/spec/03_messages.md @@ -11,12 +11,12 @@ In this section we describe the processing of messages for the authz module. An authorization grant is created using the `MsgGrant` message. If there is already a grant for the `(granter, grantee, Authorization)` triple, then the new grant overwrites the previous one. To update or extend an existing grant, a new grant with the same `(granter, grantee, Authorization)` triple should be created. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L32-L37 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/authz/v1beta1/tx.proto#L32-L41 The message handling should fail if: * both granter and grantee have the same address. -* provided `Expiration` time is less than current unix timestamp. +* provided `Expiration` time is less than current unix timestamp (but a grant will be created if no `expiration` time is provided since `expiration` is optional). * provided `Grant.Authorization` is not implemented. * `Authorization.MsgTypeURL()` is not defined in the router (there is no defined handler in the app router to handle that Msg types). @@ -24,7 +24,7 @@ The message handling should fail if: A grant can be removed with the `MsgRevoke` message. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L60-L64 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/authz/v1beta1/tx.proto#L66-L72 The message handling should fail if: @@ -37,7 +37,7 @@ NOTE: The `MsgExec` message removes a grant if the grant has expired. When a grantee wants to execute a transaction on behalf of a granter, they must send `MsgExec`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L47-L53 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/authz/v1beta1/tx.proto#L51-L59 The message handling should fail if: diff --git a/x/authz/spec/README.md b/x/authz/spec/README.md index 3eda2ae6ab8c..ac73d76dba3a 100644 --- a/x/authz/spec/README.md +++ b/x/authz/spec/README.md @@ -11,7 +11,7 @@ parent: ## Abstract -`x/authz` is an implementation of a Cosmos SDK module, per [ADR 30](../../../docs/architecture/adr-030-authz-module.md), that allows +`x/authz` is an implementation of a Cosmos SDK module, per [ADR 30](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-030-authz-module.md), that allows granting arbitrary privileges from one account (the granter) to another account (the grantee). Authorizations must be granted for a particular Msg service method one by one using an implementation of the `Authorization` interface. 1. **[Concept](01_concepts.md)** diff --git a/x/bank/client/cli/tx.go b/x/bank/client/cli/tx.go index d1a774f3991c..5deb617b8952 100644 --- a/x/bank/client/cli/tx.go +++ b/x/bank/client/cli/tx.go @@ -48,6 +48,7 @@ When using '--dry-run' a key name cannot be used, only a bech32 address. if err != nil { return err } + toAddr, err := sdk.AccAddressFromBech32(args[1]) if err != nil { return err diff --git a/x/bank/client/testutil/suite.go b/x/bank/client/testutil/suite.go index 2c6c79316ffe..4afad13f5b3c 100644 --- a/x/bank/client/testutil/suite.go +++ b/x/bank/client/testutil/suite.go @@ -2,6 +2,8 @@ package testutil import ( "fmt" + "io/ioutil" + "os" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" @@ -387,6 +389,38 @@ func (s *IntegrationTestSuite) TestNewSendTxCmdGenOnly() { s.Require().Equal([]sdk.Msg{types.NewMsgSend(from, to, amount)}, tx.GetMsgs()) } +func (s *IntegrationTestSuite) TestNewSendTxCmdDryRun() { + val := s.network.Validators[0] + + clientCtx := val.ClientCtx + + from := val.Address + to := val.Address + amount := sdk.NewCoins( + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + ) + args := []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagDryRun), + } + + oldSterr := os.Stderr + r, w, _ := os.Pipe() + os.Stderr = w + + _, err := MsgSendExec(clientCtx, from, to, amount, args...) + s.Require().NoError(err) + + w.Close() + out, _ := ioutil.ReadAll(r) + os.Stderr = oldSterr + + s.Require().Regexp("gas estimate: [0-9]+", string(out)) +} + func (s *IntegrationTestSuite) TestNewSendTxCmd() { val := s.network.Validators[0] diff --git a/x/bank/keeper/genesis.go b/x/bank/keeper/genesis.go index 694fa6668e61..b83316fe3d28 100644 --- a/x/bank/keeper/genesis.go +++ b/x/bank/keeper/genesis.go @@ -16,10 +16,7 @@ func (k BaseKeeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState) { genState.Balances = types.SanitizeGenesisBalances(genState.Balances) for _, balance := range genState.Balances { - addr, err := sdk.AccAddressFromBech32(balance.Address) - if err != nil { - panic(err) - } + addr := balance.GetAddress() if err := k.initBalances(ctx, addr, balance.Coins); err != nil { panic(fmt.Errorf("error on setting balances %w", err)) diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index 032e9e5ecfff..3e77e9773d99 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -67,7 +67,6 @@ func (k BaseKeeper) AllBalances(ctx context.Context, req *types.QueryAllBalances balances = append(balances, sdk.NewCoin(string(key), amount)) return nil }) - if err != nil { return nil, status.Errorf(codes.InvalidArgument, "paginate: %v", err) } @@ -167,7 +166,6 @@ func (k BaseKeeper) DenomsMetadata(c context.Context, req *types.QueryDenomsMeta metadatas = append(metadatas, metadata) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -204,7 +202,6 @@ func (k BaseKeeper) DenomOwners( goCtx context.Context, req *types.QueryDenomOwnersRequest, ) (*types.QueryDenomOwnersResponse, error) { - if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -220,7 +217,7 @@ func (k BaseKeeper) DenomOwners( pageRes, err := query.FilteredPaginate( denomPrefixStore, req.Pagination, - func(key []byte, value []byte, accumulate bool) (bool, error) { + func(key []byte, _ []byte, accumulate bool) (bool, error) { if accumulate { address, _, err := types.AddressAndDenomFromBalancesStore(key) if err != nil { @@ -239,7 +236,6 @@ func (k BaseKeeper) DenomOwners( return true, nil }, ) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/bank/keeper/invariants.go b/x/bank/keeper/invariants.go index 52da98381fc6..dead9dca0334 100644 --- a/x/bank/keeper/invariants.go +++ b/x/bank/keeper/invariants.go @@ -52,7 +52,6 @@ func TotalSupply(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { expectedTotal := sdk.Coins{} supply, _, err := k.GetPaginatedTotalSupply(ctx, &query.PageRequest{Limit: query.MaxLimit}) - if err != nil { return sdk.FormatInvariant(types.ModuleName, "query supply", fmt.Sprintf("error querying total supply %v", err)), false diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index 40492e33a358..e25d8b809097 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -100,7 +100,6 @@ func NewBaseKeeper( paramSpace paramtypes.Subspace, blockedAddrs map[string]bool, ) BaseKeeper { - // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) @@ -318,7 +317,6 @@ func (k BaseKeeper) SetDenomMetaData(ctx sdk.Context, denomMetaData types.Metada func (k BaseKeeper) SendCoinsFromModuleToAccount( ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error { - senderAddr := k.ak.GetModuleAddress(senderModule) if senderAddr == nil { panic(sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", senderModule)) @@ -336,7 +334,6 @@ func (k BaseKeeper) SendCoinsFromModuleToAccount( func (k BaseKeeper) SendCoinsFromModuleToModule( ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins, ) error { - senderAddr := k.ak.GetModuleAddress(senderModule) if senderAddr == nil { panic(sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", senderModule)) @@ -355,7 +352,6 @@ func (k BaseKeeper) SendCoinsFromModuleToModule( func (k BaseKeeper) SendCoinsFromAccountToModule( ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error { - recipientAcc := k.ak.GetModuleAccount(ctx, recipientModule) if recipientAcc == nil { panic(sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", recipientModule)) @@ -370,7 +366,6 @@ func (k BaseKeeper) SendCoinsFromAccountToModule( func (k BaseKeeper) DelegateCoinsFromAccountToModule( ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error { - recipientAcc := k.ak.GetModuleAccount(ctx, recipientModule) if recipientAcc == nil { panic(sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", recipientModule)) @@ -389,7 +384,6 @@ func (k BaseKeeper) DelegateCoinsFromAccountToModule( func (k BaseKeeper) UndelegateCoinsFromModuleToAccount( ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error { - acc := k.ak.GetModuleAccount(ctx, senderModule) if acc == nil { panic(sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", senderModule)) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 3c181d65d9fd..8e6e137ed8ae 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" - tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/simapp" @@ -287,7 +287,7 @@ func (suite *IntegrationTestSuite) TestSupply_BurnCoins() { supplyAfterBurn, _, err := keeper.GetPaginatedTotalSupply(ctx, &query.PageRequest{}) suite.Require().NoError(err) suite.Require().Equal(sdk.NewCoins().String(), getCoinsByName(ctx, keeper, authKeeper, authtypes.Burner).String()) - suite.Require().Equal(supplyAfterInflation.Sub(initCoins), supplyAfterBurn) + suite.Require().Equal(supplyAfterInflation.Sub(initCoins...), supplyAfterBurn) // test same functionality on module account with multiple permissions suite. @@ -304,7 +304,7 @@ func (suite *IntegrationTestSuite) TestSupply_BurnCoins() { suite.Require().NoError(err) suite.Require().NoError(err) suite.Require().Equal(sdk.NewCoins().String(), getCoinsByName(ctx, keeper, authKeeper, multiPermAcc.GetName()).String()) - suite.Require().Equal(supplyAfterInflation.Sub(initCoins), supplyAfterBurn) + suite.Require().Equal(supplyAfterInflation.Sub(initCoins...), supplyAfterBurn) } func (suite *IntegrationTestSuite) TestSendCoinsNewAccount() { @@ -331,7 +331,7 @@ func (suite *IntegrationTestSuite) TestSendCoinsNewAccount() { acc2Balances := app.BankKeeper.GetAllBalances(ctx, addr2) acc1Balances = app.BankKeeper.GetAllBalances(ctx, addr1) suite.Require().Equal(sendAmt, acc2Balances) - updatedAcc1Bal := balances.Sub(sendAmt) + updatedAcc1Bal := balances.Sub(sendAmt...) suite.Require().Len(acc1Balances, len(updatedAcc1Bal)) suite.Require().Equal(acc1Balances, updatedAcc1Bal) suite.Require().NotNil(app.AccountKeeper.GetAccount(ctx, addr2)) @@ -560,15 +560,15 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() { } event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr2.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr2.String())}, ) event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()}, + abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())}, ) event2 := sdk.Event{ @@ -577,7 +577,7 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() { } event2.Attributes = append( event2.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) // events are shifted due to the funding account events @@ -631,7 +631,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { } event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) suite.Require().Equal(abci.Event(event1), events[7]) @@ -653,7 +653,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { } event2.Attributes = append( event2.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr2.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr2.String())}, ) event3 := sdk.Event{ Type: types.EventTypeTransfer, @@ -661,22 +661,22 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { } event3.Attributes = append( event3.Attributes, - abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr3.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr3.String())}, ) event3.Attributes = append( event3.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()}) + abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())}) event4 := sdk.Event{ Type: types.EventTypeTransfer, Attributes: []abci.EventAttribute{}, } event4.Attributes = append( event4.Attributes, - abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr4.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr4.String())}, ) event4.Attributes = append( event4.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()}, + abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins2.String())}, ) // events are shifted due to the funding account events suite.Require().Equal(abci.Event(event1), events[21]) @@ -713,7 +713,7 @@ func (suite *IntegrationTestSuite) TestSpendableCoins() { ctx = ctx.WithBlockTime(now.Add(12 * time.Hour)) suite.Require().NoError(app.BankKeeper.DelegateCoins(ctx, addr2, addrModule, delCoins)) - suite.Require().Equal(origCoins.Sub(delCoins), app.BankKeeper.SpendableCoins(ctx, addr1)) + suite.Require().Equal(origCoins.Sub(delCoins...), app.BankKeeper.SpendableCoins(ctx, addr1)) } func (suite *IntegrationTestSuite) TestVestingAccountSend() { @@ -806,10 +806,10 @@ func (suite *IntegrationTestSuite) TestVestingAccountReceive() { vacc = app.AccountKeeper.GetAccount(ctx, addr1).(*vesting.ContinuousVestingAccount) balances := app.BankKeeper.GetAllBalances(ctx, addr1) suite.Require().Equal(origCoins.Add(sendCoins...), balances) - suite.Require().Equal(balances.Sub(vacc.LockedCoins(now)), sendCoins) + suite.Require().Equal(balances.Sub(vacc.LockedCoins(now)...), sendCoins) // require coins are spendable plus any that have vested - suite.Require().Equal(balances.Sub(vacc.LockedCoins(now.Add(12*time.Hour))), origCoins) + suite.Require().Equal(balances.Sub(vacc.LockedCoins(now.Add(12*time.Hour))...), origCoins) } func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { @@ -845,10 +845,10 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { vacc = app.AccountKeeper.GetAccount(ctx, addr1).(*vesting.PeriodicVestingAccount) balances := app.BankKeeper.GetAllBalances(ctx, addr1) suite.Require().Equal(origCoins.Add(sendCoins...), balances) - suite.Require().Equal(balances.Sub(vacc.LockedCoins(now)), sendCoins) + suite.Require().Equal(balances.Sub(vacc.LockedCoins(now)...), sendCoins) // require coins are spendable plus any that have vested - suite.Require().Equal(balances.Sub(vacc.LockedCoins(now.Add(12*time.Hour))), origCoins) + suite.Require().Equal(balances.Sub(vacc.LockedCoins(now.Add(12*time.Hour))...), origCoins) } func (suite *IntegrationTestSuite) TestDelegateCoins() { @@ -879,7 +879,7 @@ func (suite *IntegrationTestSuite) TestDelegateCoins() { // require the ability for a non-vesting account to delegate suite.Require().NoError(app.BankKeeper.DelegateCoins(ctx, addr2, addrModule, delCoins)) - suite.Require().Equal(origCoins.Sub(delCoins), app.BankKeeper.GetAllBalances(ctx, addr2)) + suite.Require().Equal(origCoins.Sub(delCoins...), app.BankKeeper.GetAllBalances(ctx, addr2)) suite.Require().Equal(delCoins, app.BankKeeper.GetAllBalances(ctx, addrModule)) // require the ability for a vesting account to delegate @@ -945,7 +945,7 @@ func (suite *IntegrationTestSuite) TestUndelegateCoins() { err := app.BankKeeper.DelegateCoins(ctx, addr2, addrModule, delCoins) suite.Require().NoError(err) - suite.Require().Equal(origCoins.Sub(delCoins), app.BankKeeper.GetAllBalances(ctx, addr2)) + suite.Require().Equal(origCoins.Sub(delCoins...), app.BankKeeper.GetAllBalances(ctx, addr2)) suite.Require().Equal(delCoins, app.BankKeeper.GetAllBalances(ctx, addrModule)) // require the ability for a non-vesting account to undelegate @@ -957,7 +957,7 @@ func (suite *IntegrationTestSuite) TestUndelegateCoins() { // require the ability for a vesting account to delegate suite.Require().NoError(app.BankKeeper.DelegateCoins(ctx, addr1, addrModule, delCoins)) - suite.Require().Equal(origCoins.Sub(delCoins), app.BankKeeper.GetAllBalances(ctx, addr1)) + suite.Require().Equal(origCoins.Sub(delCoins...), app.BankKeeper.GetAllBalances(ctx, addr1)) suite.Require().Equal(delCoins, app.BankKeeper.GetAllBalances(ctx, addrModule)) // require the ability for a vesting account to undelegate @@ -1095,7 +1095,7 @@ func (suite *IntegrationTestSuite) TestBalanceTrackingEvents() { case types.EventTypeCoinBurn: burnedCoins, err := sdk.ParseCoinsNormalized((string)(e.Attributes[1].Value)) suite.Require().NoError(err) - supply = supply.Sub(burnedCoins) + supply = supply.Sub(burnedCoins...) case types.EventTypeCoinMint: mintedCoins, err := sdk.ParseCoinsNormalized((string)(e.Attributes[1].Value)) @@ -1107,7 +1107,7 @@ func (suite *IntegrationTestSuite) TestBalanceTrackingEvents() { suite.Require().NoError(err) spender, err := sdk.AccAddressFromBech32((string)(e.Attributes[0].Value)) suite.Require().NoError(err) - balances[spender.String()] = balances[spender.String()].Sub(coinsSpent) + balances[spender.String()] = balances[spender.String()].Sub(coinsSpent...) case types.EventTypeCoinReceived: coinsRecv, err := sdk.ParseCoinsNormalized((string)(e.Attributes[1].Value)) diff --git a/x/bank/keeper/msg_server.go b/x/bank/keeper/msg_server.go index 5d940b459e47..4e9237631d54 100644 --- a/x/bank/keeper/msg_server.go +++ b/x/bank/keeper/msg_server.go @@ -81,10 +81,8 @@ func (k msgServer) MultiSend(goCtx context.Context, msg *types.MsgMultiSend) (*t } for _, out := range msg.Outputs { - accAddr, err := sdk.AccAddressFromBech32(out.Address) - if err != nil { - panic(err) - } + accAddr := sdk.MustAccAddressFromBech32(out.Address) + if k.BlockedAddr(accAddr) { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive transactions", out.Address) } diff --git a/x/bank/keeper/send.go b/x/bank/keeper/send.go index fb68fc9c4a03..356be5ac1c93 100644 --- a/x/bank/keeper/send.go +++ b/x/bank/keeper/send.go @@ -48,7 +48,6 @@ type BaseSendKeeper struct { func NewBaseSendKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blockedAddrs map[string]bool, ) BaseSendKeeper { - return BaseSendKeeper{ BaseViewKeeper: NewBaseViewKeeper(cdc, storeKey, ak), cdc: cdc, @@ -187,7 +186,7 @@ func (k BaseSendKeeper) subUnlockedCoins(ctx sdk.Context, addr sdk.AccAddress, a locked := sdk.NewCoin(coin.Denom, lockedCoins.AmountOf(coin.Denom)) spendable := balance.Sub(locked) - _, hasNeg := sdk.Coins{spendable}.SafeSub(sdk.Coins{coin}) + _, hasNeg := sdk.Coins{spendable}.SafeSub(coin) if hasNeg { return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "%s is smaller than %s", spendable, coin) } diff --git a/x/bank/keeper/view.go b/x/bank/keeper/view.go index c6feb72786dc..cf66c1962002 100644 --- a/x/bank/keeper/view.go +++ b/x/bank/keeper/view.go @@ -192,7 +192,7 @@ func (k BaseViewKeeper) spendableCoins(ctx sdk.Context, addr sdk.AccAddress) (sp total = k.GetAllBalances(ctx, addr) locked := k.LockedCoins(ctx, addr) - spendable, hasNeg := total.SafeSub(locked) + spendable, hasNeg := total.SafeSub(locked...) if hasNeg { spendable = sdk.NewCoins() return diff --git a/x/bank/migrations/v036/types.go b/x/bank/migrations/v036/types.go deleted file mode 100644 index 081a41fc11fa..000000000000 --- a/x/bank/migrations/v036/types.go +++ /dev/null @@ -1,17 +0,0 @@ -// Package v036 is used for legacy migration scripts. Actual migration scripts -// for v036 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v036 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ModuleName = "supply" - -type ( - GenesisState struct { - Supply sdk.Coins `json:"supply" yaml:"supply"` - } -) diff --git a/x/bank/migrations/v038/types.go b/x/bank/migrations/v038/types.go deleted file mode 100644 index 563182c10725..000000000000 --- a/x/bank/migrations/v038/types.go +++ /dev/null @@ -1,16 +0,0 @@ -// Package v038 is used for legacy migration scripts. Actual migration scripts -// for v038 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -package v038 - -// DONTCOVER - -const ( - ModuleName = "bank" -) - -type ( - GenesisState struct { - SendEnabled bool `json:"send_enabled" yaml:"send_enabled"` - } -) diff --git a/x/bank/migrations/v040/keys.go b/x/bank/migrations/v040/keys.go deleted file mode 100644 index 38bb49a0032d..000000000000 --- a/x/bank/migrations/v040/keys.go +++ /dev/null @@ -1,46 +0,0 @@ -// Package v040 is copy-pasted from: -// https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/bank/types/key.go -package v040 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/kv" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" -) - -const ( - // ModuleName defines the module name - ModuleName = "bank" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey defines the module's message routing key - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName -) - -// KVStore keys -var ( - BalancesPrefix = []byte("balances") - SupplyKey = []byte{0x00} - DenomMetadataPrefix = []byte{0x1} -) - -// DenomMetadataKey returns the denomination metadata key. -func DenomMetadataKey(denom string) []byte { - d := []byte(denom) - return append(DenomMetadataPrefix, d...) -} - -// AddressFromBalancesStore returns an account address from a balances prefix -// store. The key must not contain the perfix BalancesPrefix as the prefix store -// iterator discards the actual prefix. -func AddressFromBalancesStore(key []byte) sdk.AccAddress { - kv.AssertKeyAtLeastLength(key, 1+v040auth.AddrLen) - addr := key[:v040auth.AddrLen] - kv.AssertKeyLength(addr, v040auth.AddrLen) - return sdk.AccAddress(addr) -} diff --git a/x/bank/migrations/v040/migrate.go b/x/bank/migrations/v040/migrate.go deleted file mode 100644 index 9a7f82a0705c..000000000000 --- a/x/bank/migrations/v040/migrate.go +++ /dev/null @@ -1,38 +0,0 @@ -package v040 - -import ( - v039auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v039" - v036supply "github.com/cosmos/cosmos-sdk/x/bank/migrations/v036" - v038bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v038" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// Migrate accepts exported v0.39 x/auth and v0.38 x/bank genesis state and -// migrates it to v0.40 x/bank genesis state. The migration includes: -// -// - Moving balances from x/auth to x/bank genesis state. -// - Moving supply from x/supply to x/bank genesis state. -// - Re-encode in v0.40 GenesisState. -func Migrate( - bankGenState v038bank.GenesisState, - authGenState v039auth.GenesisState, - supplyGenState v036supply.GenesisState, -) *types.GenesisState { - balances := make([]types.Balance, len(authGenState.Accounts)) - for i, acc := range authGenState.Accounts { - balances[i] = types.Balance{ - Address: acc.GetAddress().String(), - Coins: acc.GetCoins(), - } - } - - return &types.GenesisState{ - Params: types.Params{ - SendEnabled: []*types.SendEnabled{}, - DefaultSendEnabled: bankGenState.SendEnabled, - }, - Balances: balances, - Supply: supplyGenState.Supply, - DenomMetadata: []types.Metadata{}, - } -} diff --git a/x/bank/migrations/v040/migrate_test.go b/x/bank/migrations/v040/migrate_test.go deleted file mode 100644 index 2a4053e9b44e..000000000000 --- a/x/bank/migrations/v040/migrate_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package v040_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - v038auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v038" - v039auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v039" - v036supply "github.com/cosmos/cosmos-sdk/x/bank/migrations/v036" - v038bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v038" - v040bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v040" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithCodec(encodingConfig.Codec) - - coins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1, _ := sdk.AccAddressFromBech32("cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u") - acc1 := v038auth.NewBaseAccount(addr1, coins, nil, 1, 0) - - addr2, _ := sdk.AccAddressFromBech32("cosmos15v50ymp6n5dn73erkqtmq0u8adpl8d3ujv2e74") - vaac := v038auth.NewContinuousVestingAccountRaw( - v038auth.NewBaseVestingAccount( - v038auth.NewBaseAccount(addr2, coins, nil, 1, 0), coins, nil, nil, 3160620846, - ), - 1580309972, - ) - - supply := sdk.NewCoins(sdk.NewInt64Coin("stake", 1000)) - - bankGenState := v038bank.GenesisState{ - SendEnabled: true, - } - authGenState := v039auth.GenesisState{ - Accounts: v038auth.GenesisAccounts{acc1, vaac}, - } - supplyGenState := v036supply.GenesisState{ - Supply: supply, - } - - migrated := v040bank.Migrate(bankGenState, authGenState, supplyGenState) - expected := `{"params":{"send_enabled":[],"default_send_enabled":true},"balances":[{"address":"cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u","coins":[{"denom":"stake","amount":"50"}]},{"address":"cosmos15v50ymp6n5dn73erkqtmq0u8adpl8d3ujv2e74","coins":[{"denom":"stake","amount":"50"}]}],"supply":[{"denom":"stake","amount":"1000"}],"denom_metadata":[]}` - - bz, err := clientCtx.Codec.MarshalJSON(migrated) - require.NoError(t, err) - require.Equal(t, expected, string(bz)) -} diff --git a/x/bank/migrations/v040/types.go b/x/bank/migrations/v040/types.go deleted file mode 100644 index 11fdf1dfe8c5..000000000000 --- a/x/bank/migrations/v040/types.go +++ /dev/null @@ -1,31 +0,0 @@ -package v040 - -import ( - "github.com/golang/protobuf/proto" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// SupplyI defines an inflationary supply interface for modules that handle -// token supply. -// It is copy-pasted from: -// https://github.com/cosmos/cosmos-sdk/blob/v042.3/x/bank/exported/exported.go -// where we stripped off the unnecessary methods. -// -// It is used in the migration script, because we save this interface as an Any -// in the supply state. -// -// Deprecated. -type SupplyI interface { - proto.Message -} - -// RegisterInterfaces registers interfaces required for the v0.40 migrations. -func RegisterInterfaces(registry codectypes.InterfaceRegistry) { - registry.RegisterInterface( - "cosmos.bank.v1beta1.SupplyI", - (*SupplyI)(nil), - &types.Supply{}, - ) -} diff --git a/x/bank/migrations/v042/types.go b/x/bank/migrations/v042/types.go new file mode 100644 index 000000000000..ae24a0ebe9f4 --- /dev/null +++ b/x/bank/migrations/v042/types.go @@ -0,0 +1,70 @@ +package v042 + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/kv" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" + "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/golang/protobuf/proto" +) + +const ( + // ModuleName defines the module name + ModuleName = "bank" + + // StoreKey defines the primary module store key + StoreKey = ModuleName + + // RouterKey defines the module's message routing key + RouterKey = ModuleName + + // QuerierRoute defines the module's query routing key + QuerierRoute = ModuleName +) + +// KVStore keys +var ( + BalancesPrefix = []byte("balances") + SupplyKey = []byte{0x00} + DenomMetadataPrefix = []byte{0x1} +) + +// DenomMetadataKey returns the denomination metadata key. +func DenomMetadataKey(denom string) []byte { + d := []byte(denom) + return append(DenomMetadataPrefix, d...) +} + +// AddressFromBalancesStore returns an account address from a balances prefix +// store. The key must not contain the perfix BalancesPrefix as the prefix store +// iterator discards the actual prefix. +func AddressFromBalancesStore(key []byte) sdk.AccAddress { + kv.AssertKeyAtLeastLength(key, 1+v042auth.AddrLen) + addr := key[:v042auth.AddrLen] + kv.AssertKeyLength(addr, v042auth.AddrLen) + return sdk.AccAddress(addr) +} + +// SupplyI defines an inflationary supply interface for modules that handle +// token supply. +// It is copy-pasted from: +// https://github.com/cosmos/cosmos-sdk/blob/v0.42.3/x/bank/exported/exported.go +// where we stripped off the unnecessary methods. +// +// It is used in the migration script, because we save this interface as an Any +// in the supply state. +// +// Deprecated. +type SupplyI interface { + proto.Message +} + +// RegisterInterfaces registers interfaces required for the v0.40 migrations. +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterInterface( + "cosmos.bank.v1beta1.SupplyI", + (*SupplyI)(nil), + &types.Supply{}, + ) +} diff --git a/x/bank/migrations/v043/store.go b/x/bank/migrations/v043/store.go index 4c6b56e2b3ee..d745f7807cf6 100644 --- a/x/bank/migrations/v043/store.go +++ b/x/bank/migrations/v043/store.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" - v040bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" + v042bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v042" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -15,14 +15,14 @@ import ( // ref: https://github.com/cosmos/cosmos-sdk/issues/7092 func migrateSupply(store sdk.KVStore, cdc codec.BinaryCodec) error { // Old supply was stored as a single blob under the SupplyKey. - var oldSupplyI v040bank.SupplyI - err := cdc.UnmarshalInterface(store.Get(v040bank.SupplyKey), &oldSupplyI) + var oldSupplyI v042bank.SupplyI + err := cdc.UnmarshalInterface(store.Get(v042bank.SupplyKey), &oldSupplyI) if err != nil { return err } // We delete the single key holding the whole blob. - store.Delete(v040bank.SupplyKey) + store.Delete(v042bank.SupplyKey) if oldSupplyI == nil { return nil @@ -54,14 +54,14 @@ func migrateBalanceKeys(store sdk.KVStore) { // prefix ("balances") || addrBytes (20 bytes) || denomBytes // new key is of format // prefix (0x02) || addrLen (1 byte) || addrBytes || denomBytes - oldStore := prefix.NewStore(store, v040bank.BalancesPrefix) + oldStore := prefix.NewStore(store, v042bank.BalancesPrefix) oldStoreIter := oldStore.Iterator(nil, nil) defer oldStoreIter.Close() for ; oldStoreIter.Valid(); oldStoreIter.Next() { - addr := v040bank.AddressFromBalancesStore(oldStoreIter.Key()) - denom := oldStoreIter.Key()[v040auth.AddrLen:] + addr := v042bank.AddressFromBalancesStore(oldStoreIter.Key()) + denom := oldStoreIter.Key()[v042auth.AddrLen:] newStoreKey := append(CreateAccountBalancesPrefix(addr), denom...) // Set new key on store. Values don't change. diff --git a/x/bank/migrations/v043/store_test.go b/x/bank/migrations/v043/store_test.go index d1b7eae50b35..04117b3c3b32 100644 --- a/x/bank/migrations/v043/store_test.go +++ b/x/bank/migrations/v043/store_test.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v040bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v040" + v042bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v042" v043bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v043" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -26,11 +26,11 @@ func TestSupplyMigration(t *testing.T) { oldFooBarCoin := sdk.NewCoin("foobar", sdk.NewInt(0)) // to ensure the zero denom coins pruned. // Old supply was stored as a single blob under the `SupplyKey`. - var oldSupply v040bank.SupplyI + var oldSupply v042bank.SupplyI oldSupply = &types.Supply{Total: sdk.Coins{oldFooCoin, oldBarCoin, oldFooBarCoin}} oldSupplyBz, err := encCfg.Codec.MarshalInterface(oldSupply) require.NoError(t, err) - store.Set(v040bank.SupplyKey, oldSupplyBz) + store.Set(v042bank.SupplyKey, oldSupplyBz) // Run migration. err = v043bank.MigrateStore(ctx, bankKey, encCfg.Codec) @@ -74,14 +74,14 @@ func TestBalanceKeysMigration(t *testing.T) { // set 10 foo coin fooCoin := sdk.NewCoin("foo", sdk.NewInt(10)) - oldFooKey := append(append(v040bank.BalancesPrefix, addr...), []byte(fooCoin.Denom)...) + oldFooKey := append(append(v042bank.BalancesPrefix, addr...), []byte(fooCoin.Denom)...) fooBz, err := encCfg.Codec.Marshal(&fooCoin) require.NoError(t, err) store.Set(oldFooKey, fooBz) // set 0 foobar coin fooBarCoin := sdk.NewCoin("foobar", sdk.NewInt(0)) - oldKeyFooBar := append(append(v040bank.BalancesPrefix, addr...), []byte(fooBarCoin.Denom)...) + oldKeyFooBar := append(append(v042bank.BalancesPrefix, addr...), []byte(fooBarCoin.Denom)...) fooBarBz, err := encCfg.Codec.Marshal(&fooBarCoin) require.NoError(t, err) store.Set(oldKeyFooBar, fooBarBz) diff --git a/x/bank/migrations/v046/keys.go b/x/bank/migrations/v046/keys.go index 6593ad91d811..c86aae935805 100644 --- a/x/bank/migrations/v046/keys.go +++ b/x/bank/migrations/v046/keys.go @@ -1,8 +1,6 @@ package v046 -var ( - DenomAddressPrefix = []byte{0x03} -) +var DenomAddressPrefix = []byte{0x03} // CreateDenomAddressPrefix creates a prefix for a reverse index of denomination // to account balance for that denomination. diff --git a/x/bank/migrations/v046/store.go b/x/bank/migrations/v046/store.go index b24501872aea..8f4e628a11ea 100644 --- a/x/bank/migrations/v046/store.go +++ b/x/bank/migrations/v046/store.go @@ -82,7 +82,7 @@ func migrateDenomMetadata(store sdk.KVStore) error { oldKey := oldDenomMetaDataIter.Key() l := len(oldKey)/2 + 1 - var newKey = make([]byte, len(types.DenomMetadataPrefix)+l) + newKey := make([]byte, len(types.DenomMetadataPrefix)+l) // old key: prefix_bytes | denom_bytes | denom_bytes copy(newKey, types.DenomMetadataPrefix) copy(newKey[len(types.DenomMetadataPrefix):], oldKey[:l]) diff --git a/x/bank/module.go b/x/bank/module.go index 169f5b26ac4b..1db195adb264 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -7,7 +7,6 @@ import ( "math/rand" "time" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -21,7 +20,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/cosmos/cosmos-sdk/x/bank/keeper" - v040 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v040" + v040 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v042" "github.com/cosmos/cosmos-sdk/x/bank/simulation" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -61,11 +60,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo return data.Validate() } -// RegisterRESTRoutes registers the REST routes for the bank module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/bank` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the bank module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -166,15 +160,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 3 } -// BeginBlock performs a no-op. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock returns the end blocker for the bank module. It returns no validator -// updates. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the bank module. diff --git a/x/bank/simulation/genesis.go b/x/bank/simulation/genesis.go index 9031d0336451..38e3b34b30d9 100644 --- a/x/bank/simulation/genesis.go +++ b/x/bank/simulation/genesis.go @@ -43,7 +43,7 @@ func RandomGenesisBalances(simState *module.SimulationState) []types.Balance { for _, acc := range simState.Accounts { genesisBalances = append(genesisBalances, types.Balance{ Address: acc.Address.String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(simState.InitialStake))), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, simState.InitialStake)), }) } @@ -65,7 +65,7 @@ func RandomizedGenState(simState *module.SimulationState) { ) numAccs := int64(len(simState.Accounts)) - totalSupply := sdk.NewInt(simState.InitialStake * (numAccs + simState.NumBonded)) + totalSupply := simState.InitialStake.Mul(sdk.NewInt((numAccs + simState.NumBonded))) supply := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, totalSupply)) bankGenesis := types.GenesisState{ diff --git a/x/bank/simulation/genesis_test.go b/x/bank/simulation/genesis_test.go index fc31ca38e9ef..d2b38f6d06ed 100644 --- a/x/bank/simulation/genesis_test.go +++ b/x/bank/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -29,7 +30,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index 05d14a7375f7..8f6561a0585c 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -26,7 +26,6 @@ const ( func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk keeper.Keeper, ) simulation.WeightedOperations { - var weightMsgSend, weightMsgMultiSend int appParams.GetOrGenerate(cdc, OpWeightMsgSend, &weightMsgSend, nil, func(_ *rand.Rand) { @@ -61,6 +60,11 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { from, to, coins, skip := randomSendFields(r, ctx, accs, bk, ak) + // if coins slice is empty, we can not create valid types.MsgSend + if len(coins) == 0 { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, "empty coins slice"), nil, nil + } + // Check send_enabled status of each coin denom if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, err.Error()), nil, nil @@ -94,6 +98,10 @@ func SimulateMsgSendToModuleAccount(ak types.AccountKeeper, bk keeper.Keeper, mo spendable := bk.SpendableCoins(ctx, from.Address) coins := simtypes.RandSubsetCoins(r, spendable) + // if coins slice is empty, we can not create valid types.MsgSend + if len(coins) == 0 { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, "empty coins slice"), nil, nil + } // Check send_enabled status of each coin denom if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { @@ -116,7 +124,6 @@ func sendMsgSend( r *rand.Rand, app *baseapp.BaseApp, bk keeper.Keeper, ak types.AccountKeeper, msg *types.MsgSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, ) error { - var ( fees sdk.Coins err error @@ -130,7 +137,7 @@ func sendMsgSend( account := ak.GetAccount(ctx, from) spendable := bk.SpendableCoins(ctx, account.GetAddress()) - coins, hasNeg := spendable.SafeSub(msg.Amount) + coins, hasNeg := spendable.SafeSub(msg.Amount...) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -138,7 +145,8 @@ func sendMsgSend( } } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -167,7 +175,6 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - // random number of inputs/outputs between [1, 3] inputs := make([]types.Input, r.Intn(3)+1) outputs := make([]types.Output, r.Intn(3)+1) @@ -219,7 +226,7 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope // take random subset of remaining coins for output // and update remaining coins outCoins = simtypes.RandSubsetCoins(r, totalSentCoins) - totalSentCoins = totalSentCoins.Sub(outCoins) + totalSentCoins = totalSentCoins.Sub(outCoins...) } outputs[o] = types.NewOutput(outAddr.Address, outCoins) @@ -256,7 +263,6 @@ func SimulateMsgMultiSendToModuleAccount(ak types.AccountKeeper, bk keeper.Keepe r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - inputs := make([]types.Input, 2) outputs := make([]types.Output, moduleAccCount) // collect signer privKeys @@ -286,7 +292,7 @@ func SimulateMsgMultiSendToModuleAccount(ak types.AccountKeeper, bk keeper.Keepe // take random subset of remaining coins for output // and update remaining coins outCoins = simtypes.RandSubsetCoins(r, totalSentCoins) - totalSentCoins = totalSentCoins.Sub(outCoins) + totalSentCoins = totalSentCoins.Sub(outCoins...) } outputs[i] = types.NewOutput(moduleAccounts[i].Address, outCoins) @@ -323,15 +329,11 @@ func sendMsgMultiSend( r *rand.Rand, app *baseapp.BaseApp, bk keeper.Keeper, ak types.AccountKeeper, msg *types.MsgMultiSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, ) error { - accountNumbers := make([]uint64, len(msg.Inputs)) sequenceNumbers := make([]uint64, len(msg.Inputs)) for i := 0; i < len(msg.Inputs); i++ { - addr, err := sdk.AccAddressFromBech32(msg.Inputs[i].Address) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(msg.Inputs[i].Address) acc := ak.GetAccount(ctx, addr) accountNumbers[i] = acc.GetAccountNumber() sequenceNumbers[i] = acc.GetSequence() @@ -342,16 +344,13 @@ func sendMsgMultiSend( err error ) - addr, err := sdk.AccAddressFromBech32(msg.Inputs[0].Address) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(msg.Inputs[0].Address) // feePayer is the first signer, i.e. first input address feePayer := ak.GetAccount(ctx, addr) spendable := bk.SpendableCoins(ctx, feePayer.GetAddress()) - coins, hasNeg := spendable.SafeSub(msg.Inputs[0].Coins) + coins, hasNeg := spendable.SafeSub(msg.Inputs[0].Coins...) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -360,7 +359,8 @@ func sendMsgMultiSend( } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -387,7 +387,6 @@ func sendMsgMultiSend( func randomSendFields( r *rand.Rand, ctx sdk.Context, accs []simtypes.Account, bk keeper.Keeper, ak types.AccountKeeper, ) (simtypes.Account, simtypes.Account, sdk.Coins, bool) { - from, _ := simtypes.RandomAcc(r, accs) to, _ := simtypes.RandomAcc(r, accs) @@ -412,7 +411,6 @@ func randomSendFields( } func getModuleAccounts(ak types.AccountKeeper, ctx sdk.Context, moduleAccCount int) []simtypes.Account { - moduleAccounts := make([]simtypes.Account, moduleAccCount) for i := 0; i < moduleAccCount; i++ { diff --git a/x/bank/spec/02_keepers.md b/x/bank/spec/02_keepers.md index 3671819a755d..71d35942b802 100644 --- a/x/bank/spec/02_keepers.md +++ b/x/bank/spec/02_keepers.md @@ -22,7 +22,7 @@ Typically, these addresses are module accounts. If these addresses receive funds outside the expected rules of the state machine, invariants are likely to be broken and could result in a halted network. -By providing the `x/bank` module with a blocklisted set of addresses, an error occurs for the operation if a user or client attempts to directly or indirectly send funds to a blocklisted account, for example, by using [IBC](http://docs.cosmos.network/master/ibc/). +By providing the `x/bank` module with a blocklisted set of addresses, an error occurs for the operation if a user or client attempts to directly or indirectly send funds to a blocklisted account, for example, by using [IBC](https://ibc.cosmos.network). ## Common Types diff --git a/x/bank/spec/03_messages.md b/x/bank/spec/03_messages.md index 6e2913d34d76..a6d2379458cf 100644 --- a/x/bank/spec/03_messages.md +++ b/x/bank/spec/03_messages.md @@ -7,7 +7,8 @@ order: 3 ## MsgSend Send coins from one address to another. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L21-L32 The message will fail under the following conditions: @@ -17,7 +18,7 @@ The message will fail under the following conditions: ## MsgMultiSend Send coins from and to a series of different address. If any of the receiving addresses do not correspond to an existing account, a new account is created. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L33-L39 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L37-L45 The message will fail under the following conditions: diff --git a/x/bank/types/balance.go b/x/bank/types/balance.go index 78539ace6cff..3b0decadbea0 100644 --- a/x/bank/types/balance.go +++ b/x/bank/types/balance.go @@ -3,7 +3,6 @@ package types import ( "bytes" "encoding/json" - "fmt" "sort" "github.com/cosmos/cosmos-sdk/codec" @@ -15,12 +14,7 @@ var _ exported.GenesisBalance = (*Balance)(nil) // GetAddress returns the account address of the Balance object. func (b Balance) GetAddress() sdk.AccAddress { - addr, err := sdk.AccAddressFromBech32(b.Address) - if err != nil { - panic(fmt.Errorf("couldn't convert %q to account address: %v", b.Address, err)) - } - - return addr + return sdk.MustAccAddressFromBech32(b.Address) } // GetCoins returns the account coins of the Balance object. @@ -50,6 +44,7 @@ func (b balanceByAddress) Len() int { return len(b.addresses) } func (b balanceByAddress) Less(i, j int) bool { return bytes.Compare(b.addresses[i], b.addresses[j]) < 0 } + func (b balanceByAddress) Swap(i, j int) { b.addresses[i], b.addresses[j] = b.addresses[j], b.addresses[i] b.balances[i], b.balances[j] = b.balances[j], b.balances[i] diff --git a/x/bank/types/balance_test.go b/x/bank/types/balance_test.go index 10ee2a74bf6e..5219388b7c2e 100644 --- a/x/bank/types/balance_test.go +++ b/x/bank/types/balance_test.go @@ -104,7 +104,6 @@ func TestBalanceValidate(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - err := tc.balance.Validate() if tc.expErr { diff --git a/x/bank/types/events.go b/x/bank/types/events.go index 9f06b85e491c..2293083e512e 100644 --- a/x/bank/types/events.go +++ b/x/bank/types/events.go @@ -9,7 +9,7 @@ const ( EventTypeTransfer = "transfer" AttributeKeyRecipient = "recipient" - AttributeKeySender = "sender" + AttributeKeySender = sdk.AttributeKeySender AttributeValueCategory = ModuleName diff --git a/x/bank/types/genesis_test.go b/x/bank/types/genesis_test.go index fa1c836c9cbe..f13329f71427 100644 --- a/x/bank/types/genesis_test.go +++ b/x/bank/types/genesis_test.go @@ -9,7 +9,6 @@ import ( ) func TestGenesisStateValidate(t *testing.T) { - testCases := []struct { name string genesisState GenesisState @@ -146,7 +145,6 @@ func TestGenesisStateValidate(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - err := tc.genesisState.Validate() if tc.expErr { diff --git a/x/bank/types/metadata_test.go b/x/bank/types/metadata_test.go index 3d4fe0a0e634..34ff32f6a0f1 100644 --- a/x/bank/types/metadata_test.go +++ b/x/bank/types/metadata_test.go @@ -218,7 +218,6 @@ func TestMetadataValidate(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - err := tc.metadata.Validate() if tc.expErr { @@ -240,18 +239,22 @@ func TestMarshalJSONMetaData(t *testing.T) { }{ {"nil metadata", nil, `null`}, {"empty metadata", []types.Metadata{}, `[]`}, - {"non-empty coins", []types.Metadata{{ - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*types.DenomUnit{ - {"uatom", uint32(0), []string{"microatom"}}, // The default exponent value 0 is omitted in the json - {"matom", uint32(3), []string{"milliatom"}}, - {"atom", uint32(6), nil}, + { + "non-empty coins", + []types.Metadata{ + { + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*types.DenomUnit{ + {"uatom", uint32(0), []string{"microatom"}}, // The default exponent value 0 is omitted in the json + {"matom", uint32(3), []string{"milliatom"}}, + {"atom", uint32(6), nil}, + }, + Base: "uatom", + Display: "atom", + }, }, - Base: "uatom", - Display: "atom", - }, + `[{"description":"The native staking token of the Cosmos Hub.","denom_units":[{"denom":"uatom","aliases":["microatom"]},{"denom":"matom","exponent":3,"aliases":["milliatom"]},{"denom":"atom","exponent":6}],"base":"uatom","display":"atom"}]`, }, - `[{"description":"The native staking token of the Cosmos Hub.","denom_units":[{"denom":"uatom","aliases":["microatom"]},{"denom":"matom","exponent":3,"aliases":["milliatom"]},{"denom":"atom","exponent":6}],"base":"uatom","display":"atom"}]`}, } for _, tc := range testCases { diff --git a/x/bank/types/msgs_test.go b/x/bank/types/msgs_test.go index 8a22d187893e..523a57f28f38 100644 --- a/x/bank/types/msgs_test.go +++ b/x/bank/types/msgs_test.go @@ -13,7 +13,7 @@ func TestMsgSendRoute(t *testing.T) { addr1 := sdk.AccAddress([]byte("from")) addr2 := sdk.AccAddress([]byte("to")) coins := sdk.NewCoins(sdk.NewInt64Coin("atom", 10)) - var msg = NewMsgSend(addr1, addr2, coins) + msg := NewMsgSend(addr1, addr2, coins) require.Equal(t, msg.Route(), RouterKey) require.Equal(t, msg.Type(), "send") @@ -58,7 +58,7 @@ func TestMsgSendGetSignBytes(t *testing.T) { addr1 := sdk.AccAddress([]byte("input")) addr2 := sdk.AccAddress([]byte("output")) coins := sdk.NewCoins(sdk.NewInt64Coin("atom", 10)) - var msg = NewMsgSend(addr1, addr2, coins) + msg := NewMsgSend(addr1, addr2, coins) res := msg.GetSignBytes() expected := `{"type":"cosmos-sdk/MsgSend","value":{"amount":[{"amount":"10","denom":"atom"}],"from_address":"cosmos1d9h8qat57ljhcm","to_address":"cosmos1da6hgur4wsmpnjyg"}}` @@ -70,7 +70,7 @@ func TestMsgMultiSendRoute(t *testing.T) { addr1 := sdk.AccAddress([]byte("input")) addr2 := sdk.AccAddress([]byte("output")) coins := sdk.NewCoins(sdk.NewInt64Coin("atom", 10)) - var msg = MsgMultiSend{ + msg := MsgMultiSend{ Inputs: []Input{NewInput(addr1, coins)}, Outputs: []Output{NewOutput(addr2, coins)}, } @@ -189,7 +189,8 @@ func TestMsgMultiSendValidation(t *testing.T) { false, MsgMultiSend{ Inputs: []Input{NewInput(emptyAddr, atom123)}, // invalid input - Outputs: []Output{output1}}, + Outputs: []Output{output1}, + }, }, { false, @@ -242,7 +243,7 @@ func TestMsgMultiSendGetSignBytes(t *testing.T) { addr1 := sdk.AccAddress([]byte("input")) addr2 := sdk.AccAddress([]byte("output")) coins := sdk.NewCoins(sdk.NewInt64Coin("atom", 10)) - var msg = MsgMultiSend{ + msg := MsgMultiSend{ Inputs: []Input{NewInput(addr1, coins)}, Outputs: []Output{NewOutput(addr2, coins)}, } @@ -260,7 +261,7 @@ func TestMsgMultiSendGetSigners(t *testing.T) { inputs[i] = NewInput(addr, nil) addrs[i] = addr.String() } - var msg = NewMsgMultiSend(inputs, nil) + msg := NewMsgMultiSend(inputs, nil) res := msg.GetSigners() for i, signer := range res { diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index 922e7f5a27d9..80f94f5ec6ff 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -219,6 +219,8 @@ func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse { // QuerySpendableBalancesRequest defines the gRPC request structure for querying // an account's spendable balances. +// +// Since: cosmos-sdk 0.46 type QuerySpendableBalancesRequest struct { // address is the address to query spendable balances for. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -261,6 +263,8 @@ var xxx_messageInfo_QuerySpendableBalancesRequest proto.InternalMessageInfo // QuerySpendableBalancesResponse defines the gRPC response structure for querying // an account's spendable balances. +// +// Since: cosmos-sdk 0.46 type QuerySpendableBalancesResponse struct { // balances is the spendable balances of all the coins. Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` @@ -844,6 +848,8 @@ func (m *QueryDenomOwnersRequest) GetPagination() *query.PageRequest { // DenomOwner defines structure representing an account that owns or holds a // particular denominated token. It contains the account address and account // balance of the denominated token. +// +// Since: cosmos-sdk 0.46 type DenomOwner struct { // address defines the address that owns a particular denomination. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -899,6 +905,8 @@ func (m *DenomOwner) GetBalance() types.Coin { } // QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. +// +// Since: cosmos-sdk 0.46 type QueryDenomOwnersResponse struct { DenomOwners []*DenomOwner `protobuf:"bytes,1,rep,name=denom_owners,json=denomOwners,proto3" json:"denom_owners,omitempty"` // pagination defines the pagination in the response. @@ -1061,6 +1069,8 @@ type QueryClient interface { AllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) // SpendableBalances queries the spenable balance of all coins for a single // account. + // + // Since: cosmos-sdk 0.46 SpendableBalances(ctx context.Context, in *QuerySpendableBalancesRequest, opts ...grpc.CallOption) (*QuerySpendableBalancesResponse, error) // TotalSupply queries the total supply of all coins. TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, error) @@ -1075,6 +1085,8 @@ type QueryClient interface { DenomsMetadata(ctx context.Context, in *QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*QueryDenomsMetadataResponse, error) // DenomOwners queries for all account addresses that own a particular token // denomination. + // + // Since: cosmos-sdk 0.46 DenomOwners(ctx context.Context, in *QueryDenomOwnersRequest, opts ...grpc.CallOption) (*QueryDenomOwnersResponse, error) } @@ -1175,6 +1187,8 @@ type QueryServer interface { AllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) // SpendableBalances queries the spenable balance of all coins for a single // account. + // + // Since: cosmos-sdk 0.46 SpendableBalances(context.Context, *QuerySpendableBalancesRequest) (*QuerySpendableBalancesResponse, error) // TotalSupply queries the total supply of all coins. TotalSupply(context.Context, *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error) @@ -1189,6 +1203,8 @@ type QueryServer interface { DenomsMetadata(context.Context, *QueryDenomsMetadataRequest) (*QueryDenomsMetadataResponse, error) // DenomOwners queries for all account addresses that own a particular token // denomination. + // + // Since: cosmos-sdk 0.46 DenomOwners(context.Context, *QueryDenomOwnersRequest) (*QueryDenomOwnersResponse, error) } diff --git a/x/bank/types/send_authorization.go b/x/bank/types/send_authorization.go index 08a7b641fe48..7eb90b594918 100644 --- a/x/bank/types/send_authorization.go +++ b/x/bank/types/send_authorization.go @@ -6,9 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" ) -var ( - _ authz.Authorization = &SendAuthorization{} -) +var _ authz.Authorization = &SendAuthorization{} // NewSendAuthorization creates a new SendAuthorization object. func NewSendAuthorization(spendLimit sdk.Coins) *SendAuthorization { @@ -28,7 +26,7 @@ func (a SendAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.AcceptRes if !ok { return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") } - limitLeft, isNegative := a.SpendLimit.SafeSub(mSend.Amount) + limitLeft, isNegative := a.SpendLimit.SafeSub(mSend.Amount...) if isNegative { return authz.AcceptResponse{}, sdkerrors.ErrInsufficientFunds.Wrapf("requested amount is more than spend limit") } diff --git a/x/capability/keeper/keeper.go b/x/capability/keeper/keeper.go index cea524563491..708456ed3c64 100644 --- a/x/capability/keeper/keeper.go +++ b/x/capability/keeper/keeper.go @@ -197,7 +197,6 @@ func (k Keeper) GetOwners(ctx sdk.Context, index uint64) (types.CapabilityOwners // and sets the fwd and reverse keys for each owner in the memstore. // It is used during initialization from genesis. func (k Keeper) InitializeCapability(ctx sdk.Context, index uint64, owners types.CapabilityOwners) { - memStore := ctx.KVStore(k.memKey) cap := types.NewCapability(index) @@ -215,7 +214,6 @@ func (k Keeper) InitializeCapability(ctx sdk.Context, index uint64, owners types // Set the mapping from index from index to in-memory capability in the go map k.capMap[index] = cap } - } // NewCapability attempts to create a new capability with a given name. If the diff --git a/x/capability/module.go b/x/capability/module.go index f8295948d9b7..8fba1eddb3ab 100644 --- a/x/capability/module.go +++ b/x/capability/module.go @@ -6,7 +6,6 @@ import ( "math/rand" "time" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -68,10 +67,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return genState.Validate() } -// RegisterRESTRoutes registers the REST routes for the capability module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the capability module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) { } @@ -153,12 +148,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { am.keeper.InitMemStore(ctx) } -// EndBlock executes all ABCI EndBlock logic respective to the capability module. It -// returns no validator updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // GenerateGenesisState creates a randomized GenState of the capability module. func (AppModule) GenerateGenesisState(simState *module.SimulationState) { simulation.RandomizedGenState(simState) diff --git a/x/capability/simulation/genesis_test.go b/x/capability/simulation/genesis_test.go index 16d54c177a50..14eb344cc093 100644 --- a/x/capability/simulation/genesis_test.go +++ b/x/capability/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -29,7 +30,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/capability/spec/01_concepts.md b/x/capability/spec/01_concepts.md index bb236a21ea86..93ecb6354ac7 100644 --- a/x/capability/spec/01_concepts.md +++ b/x/capability/spec/01_concepts.md @@ -32,3 +32,4 @@ not own. ## Stores * MemStore +* KeyStore diff --git a/x/capability/spec/02_state.md b/x/capability/spec/02_state.md index b93de4bf4ab7..3ab713bdb90d 100644 --- a/x/capability/spec/02_state.md +++ b/x/capability/spec/02_state.md @@ -3,9 +3,24 @@ order: 2 --> # State +## In persisted KV store -## Index +1. Global unique capability index +2. Capability owners -## CapabilityOwners +Indexes: -## Capability +* Unique index: `[]byte("index") -> []byte(currentGlobalIndex)` +* Capability Index: `[]byte("capability_index") | []byte(index) -> ProtocolBuffer(CapabilityOwners)` + +## In-memory KV store + +1. Initialized flag +2. Mapping between the module and capability tuple and the capability name +3. Mapping between the module and capability name and its index + +Indexes: + +* Initialized flag: `[]byte("mem_initialized")` +* RevCapabilityKey: `[]byte(moduleName + "/rev/" + capabilityName) -> []byte(index)` +* FwdCapabilityKey: `[]byte(moduleName + "/fwd/" + capabilityPointerAddress) -> []byte(capabilityName)` diff --git a/x/capability/spec/README.md b/x/capability/spec/README.md index ec612ba97697..96a2dcbd9726 100644 --- a/x/capability/spec/README.md +++ b/x/capability/spec/README.md @@ -9,7 +9,7 @@ parent: ## Overview -`x/capability` is an implementation of a Cosmos SDK module, per [ADR 003](./../../../docs/architecture/adr-003-dynamic-capability-store.md), +`x/capability` is an implementation of a Cosmos SDK module, per [ADR 003](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-003-dynamic-capability-store.md), that allows for provisioning, tracking, and authenticating multi-owner capabilities at runtime. @@ -53,18 +53,19 @@ func NewApp(...) *App { After the keeper is created, it can be used to create scoped sub-keepers which are passed to other modules that can create, authenticate, and claim capabilities. After all the necessary scoped keepers are created and the state is loaded, the -main capability keeper must be initialized and sealed to populate the in-memory -state and to prevent further scoped keepers from being created. +main capability keeper must be sealed to prevent further scoped keepers from +being created. ```go func NewApp(...) *App { // ... - // Initialize and seal the capability keeper so all persistent capabilities - // are loaded in-memory and prevent any further modules from creating scoped + // Creating a scoped keeper + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) + + // Seal the capability keeper to prevent any further modules from creating scoped // sub-keepers. - ctx := app.BaseApp.NewContext(true, tmproto.Header{}) - app.capabilityKeeper.InitializeAndSeal(ctx) + app.capabilityKeeper.Seal() return app } diff --git a/x/capability/types/genesis_test.go b/x/capability/types/genesis_test.go index d8a02e019254..5208a2b59043 100644 --- a/x/capability/types/genesis_test.go +++ b/x/capability/types/genesis_test.go @@ -40,7 +40,6 @@ func TestValidateGenesis(t *testing.T) { } genState.Owners = append(genState.Owners, genOwner) - }, expPass: false, }, @@ -55,7 +54,6 @@ func TestValidateGenesis(t *testing.T) { } genState.Owners = append(genState.Owners, genOwner) - }, expPass: false, }, @@ -69,7 +67,6 @@ func TestValidateGenesis(t *testing.T) { } genState.Owners = append(genState.Owners, genOwner) - }, expPass: false, }, @@ -83,7 +80,6 @@ func TestValidateGenesis(t *testing.T) { } genState.Owners = append(genState.Owners, genOwner) - }, expPass: false, }, @@ -97,7 +93,6 @@ func TestValidateGenesis(t *testing.T) { } genState.Owners = append(genState.Owners, genOwner) - }, expPass: false, }, @@ -111,7 +106,6 @@ func TestValidateGenesis(t *testing.T) { } genState.Owners = append(genState.Owners, genOwner) - }, expPass: false, }, diff --git a/x/capability/types/keys.go b/x/capability/types/keys.go index aefd13ba2286..eccfba00a55f 100644 --- a/x/capability/types/keys.go +++ b/x/capability/types/keys.go @@ -23,7 +23,7 @@ var ( KeyIndex = []byte("index") // KeyPrefixIndexCapability defines a key prefix that stores index to capability - // name mappings. + // owners mappings. KeyPrefixIndexCapability = []byte("capability_index") // KeyMemInitialized defines the key that stores the initialized flag in the memory store @@ -39,7 +39,7 @@ func RevCapabilityKey(module, name string) []byte { // FwdCapabilityKey returns a forward lookup key for a given module and capability // reference. func FwdCapabilityKey(module string, cap *Capability) []byte { - return []byte(fmt.Sprintf("%s/fwd/%p", module, cap)) + return []byte(fmt.Sprintf("%s/fwd/%#016p", module, cap)) } // IndexToKey returns bytes to be used as a key for a given capability index. diff --git a/x/capability/types/keys_test.go b/x/capability/types/keys_test.go index e767c3d34222..1ac4702ba581 100644 --- a/x/capability/types/keys_test.go +++ b/x/capability/types/keys_test.go @@ -16,7 +16,7 @@ func TestRevCapabilityKey(t *testing.T) { func TestFwdCapabilityKey(t *testing.T) { cap := types.NewCapability(23) - expected := []byte(fmt.Sprintf("bank/fwd/%p", cap)) + expected := []byte(fmt.Sprintf("bank/fwd/%#016p", cap)) require.Equal(t, expected, types.FwdCapabilityKey("bank", cap)) } diff --git a/x/crisis/client/testsuite/cli_test.go b/x/crisis/client/testsuite/cli_test.go index 3c083e694726..5b3ef61c5a45 100644 --- a/x/crisis/client/testsuite/cli_test.go +++ b/x/crisis/client/testsuite/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go index b9c563d5293d..8dcf447c60e0 100644 --- a/x/crisis/keeper/keeper.go +++ b/x/crisis/keeper/keeper.go @@ -27,7 +27,6 @@ func NewKeeper( paramSpace paramtypes.Subspace, invCheckPeriod uint, supplyKeeper types.SupplyKeeper, feeCollectorName string, ) Keeper { - // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) @@ -76,7 +75,7 @@ func (k Keeper) AssertInvariants(ctx sdk.Context) { invarRoutes := k.Routes() n := len(invarRoutes) for i, ir := range invarRoutes { - logger.Info("asserting crisis invariants", "inv", fmt.Sprint(i, "/", n), "name", ir.FullRoute()) + logger.Info("asserting crisis invariants", "inv", fmt.Sprint(i+1, "/", n), "name", ir.FullRoute()) if res, stop := ir.Invar(ctx); stop { // TODO: Include app name as part of context to allow for this to be // variable. diff --git a/x/crisis/migrations/v039/types.go b/x/crisis/migrations/v039/types.go deleted file mode 100644 index 44903e349118..000000000000 --- a/x/crisis/migrations/v039/types.go +++ /dev/null @@ -1,13 +0,0 @@ -package v039 - -import sdk "github.com/cosmos/cosmos-sdk/types" - -const ( - ModuleName = "crisis" -) - -type ( - GenesisState struct { - ConstantFee sdk.Coin `json:"constant_fee" yaml:"constant_fee"` - } -) diff --git a/x/crisis/migrations/v040/migrate.go b/x/crisis/migrations/v040/migrate.go deleted file mode 100644 index ed8255723ff6..000000000000 --- a/x/crisis/migrations/v040/migrate.go +++ /dev/null @@ -1,16 +0,0 @@ -package v040 - -import ( - v039crisis "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v039" - v040crisis "github.com/cosmos/cosmos-sdk/x/crisis/types" -) - -// Migrate accepts exported v0.39 x/crisis genesis state and -// migrates it to v0.40 x/crisis genesis state. The migration includes: -// -// - Re-encode in v0.40 GenesisState. -func Migrate(crisisGenState v039crisis.GenesisState) *v040crisis.GenesisState { - return &v040crisis.GenesisState{ - ConstantFee: crisisGenState.ConstantFee, - } -} diff --git a/x/crisis/migrations/v040/types.go b/x/crisis/migrations/v040/types.go deleted file mode 100644 index 68c25e93eec1..000000000000 --- a/x/crisis/migrations/v040/types.go +++ /dev/null @@ -1,5 +0,0 @@ -package v040 - -const ( - ModuleName = "crisis" -) diff --git a/x/crisis/module.go b/x/crisis/module.go index 428e8adc1a05..6538beec4eae 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -5,7 +5,6 @@ import ( "fmt" "time" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -60,10 +59,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return types.ValidateGenesis(&data) } -// RegisterRESTRoutes registers REST routes for the crisis module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the capability module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} @@ -160,9 +155,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } -// BeginBlock performs a no-op. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - // EndBlock returns the end blocker for the crisis module. It returns no validator // updates. func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { diff --git a/x/crisis/spec/02_messages.md b/x/crisis/spec/02_messages.md index 7df7a62bb1e9..ca3b650f5ef0 100644 --- a/x/crisis/spec/02_messages.md +++ b/x/crisis/spec/02_messages.md @@ -11,7 +11,7 @@ corresponding updates to the state. Blockchain invariants can be checked using the `MsgVerifyInvariant` message. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc7/proto/cosmos/crisis/v1beta1/tx.proto#L14-L22 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/crisis/v1beta1/tx.proto#L16-L26 This message is expected to fail if: diff --git a/x/crisis/types/params.go b/x/crisis/types/params.go index 880f350f117c..03c8dd82883f 100644 --- a/x/crisis/types/params.go +++ b/x/crisis/types/params.go @@ -7,10 +7,8 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -var ( - // key for constant fee parameter - ParamStoreKeyConstantFee = []byte("ConstantFee") -) +// key for constant fee parameter +var ParamStoreKeyConstantFee = []byte("ConstantFee") // type declaration for parameters func ParamKeyTable() paramtypes.KeyTable { diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 9971bc938034..24174d9d080c 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -52,7 +52,6 @@ func newSplitAndApply( genOrBroadcastFn newGenerateOrBroadcastFunc, clientCtx client.Context, fs *pflag.FlagSet, msgs []sdk.Msg, chunkSize int, ) error { - if chunkSize == 0 { return genOrBroadcastFn(clientCtx, fs, msgs...) } @@ -75,6 +74,7 @@ func newSplitAndApply( return nil } +// NewWithdrawRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. func NewWithdrawRewardsCmd() *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -120,6 +120,7 @@ $ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj return cmd } +// NewWithdrawAllRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. func NewWithdrawAllRewardsCmd() *cobra.Command { cmd := &cobra.Command{ Use: "withdraw-all-rewards", @@ -183,6 +184,7 @@ $ %[1]s tx distribution withdraw-all-rewards --from mykey return cmd } +// NewSetWithdrawAddrCmd returns a CLI command handler for creating a MsgSetWithdrawAddress transaction. func NewSetWithdrawAddrCmd() *cobra.Command { bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() @@ -221,6 +223,7 @@ $ %s tx distribution set-withdraw-addr %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p return cmd } +// NewFundCommunityPoolCmd returns a CLI command handler for creating a MsgFundCommunityPool transaction. func NewFundCommunityPoolCmd() *cobra.Command { cmd := &cobra.Command{ Use: "fund-community-pool [amount]", diff --git a/x/distribution/client/common/common_test.go b/x/distribution/client/common/common_test.go index 3a6cf8c9b547..ff9bb88d1766 100644 --- a/x/distribution/client/common/common_test.go +++ b/x/distribution/client/common/common_test.go @@ -1,9 +1,10 @@ package common import ( - "github.com/cosmos/cosmos-sdk/codec/legacy" "testing" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" diff --git a/x/distribution/client/testutil/suite.go b/x/distribution/client/testutil/suite.go index ac912952be25..fdf9648b659e 100644 --- a/x/distribution/client/testutil/suite.go +++ b/x/distribution/client/testutil/suite.go @@ -472,7 +472,8 @@ func (s *IntegrationTestSuite) TestNewWithdrawRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), }, - true, 0, nil, []string{}, + true, 0, nil, + []string{}, }, { "valid transaction", @@ -483,7 +484,8 @@ func (s *IntegrationTestSuite) TestNewWithdrawRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), }, - false, 0, &sdk.TxResponse{}, []string{ + false, 0, &sdk.TxResponse{}, + []string{ "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", }, }, @@ -497,7 +499,8 @@ func (s *IntegrationTestSuite) TestNewWithdrawRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), }, - false, 0, &sdk.TxResponse{}, []string{ + false, 0, &sdk.TxResponse{}, + []string{ "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", }, @@ -570,7 +573,8 @@ func (s *IntegrationTestSuite) TestNewWithdrawAllRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), }, - true, 0, nil, []string{}, + true, 0, nil, + []string{}, }, { "valid transaction", @@ -580,7 +584,8 @@ func (s *IntegrationTestSuite) TestNewWithdrawAllRewardsCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), }, - false, 0, &sdk.TxResponse{}, []string{ + false, 0, &sdk.TxResponse{}, + []string{ "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", }, }, @@ -590,7 +595,6 @@ func (s *IntegrationTestSuite) TestNewWithdrawAllRewardsCmd() { tc := tc s.Run(tc.name, func() { - cmd := cli.NewWithdrawAllRewardsCmd() clientCtx := val.ClientCtx @@ -757,11 +761,13 @@ func (s *IntegrationTestSuite) TestGetCmdSubmitProposal() { }` // fund some tokens to the community pool - args := []string{sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))).String(), + args := []string{ + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String())} + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } invalidPropFile := testutil.WriteToNewTempFile(s.T(), invalidProp) cmd := cli.NewFundCommunityPoolCmd() diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go index ad9ef55ad07c..273db1314eb8 100644 --- a/x/distribution/keeper/allocation.go +++ b/x/distribution/keeper/allocation.go @@ -17,7 +17,6 @@ func (k Keeper) AllocateTokens( ctx sdk.Context, sumPreviousPrecommitPower, totalPreviousPower int64, previousProposer sdk.ConsAddress, bondedVotes []abci.VoteInfo, ) { - logger := k.Logger(ctx) // fetch and clear the collected fees for distribution, since this is diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go index 61631da5dc22..3b158c15585e 100644 --- a/x/distribution/keeper/delegation.go +++ b/x/distribution/keeper/delegation.go @@ -29,7 +29,8 @@ func (k Keeper) initializeDelegation(ctx sdk.Context, val sdk.ValAddress, del sd // calculate the rewards accrued by a delegation between two periods func (k Keeper) calculateDelegationRewardsBetween(ctx sdk.Context, val stakingtypes.ValidatorI, - startingPeriod, endingPeriod uint64, stake sdk.Dec) (rewards sdk.DecCoins) { + startingPeriod, endingPeriod uint64, stake sdk.Dec, +) (rewards sdk.DecCoins) { // sanity check if startingPeriod > endingPeriod { panic("startingPeriod cannot be greater than endingPeriod") diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index a1916913c424..7b18c0241f3b 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -117,7 +117,7 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { // allocate some rewards initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}} + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial)}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) // end period @@ -127,10 +127,10 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { rewards = app.DistrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) // rewards should be half the tokens - require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.QuoRaw(2).ToDec()}}, rewards) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial.QuoRaw(2))}}, rewards) // commission should be the other half - require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.QuoRaw(2).ToDec()}}, + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial.QuoRaw(2))}}, app.DistrKeeper.GetValidatorAccumulatedCommission(ctx, valAddrs[0]).Commission) } @@ -180,7 +180,7 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { // allocate some rewards initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}} + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial)}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) // slash the validator by 50% again @@ -202,10 +202,10 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { rewards = app.DistrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) // rewards should be half the tokens - require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}}, rewards) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial)}}, rewards) // commission should be the other half - require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}}, + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial)}}, app.DistrKeeper.GetValidatorAccumulatedCommission(ctx, valAddrs[0]).Commission) } @@ -381,7 +381,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec() + initial := sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 10)) tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -437,7 +437,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { del1 := app.StakingKeeper.Delegation(ctx, sdk.AccAddress(valAddrs[0]), valAddrs[0]) // allocate some rewards - initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 30).ToDec() + initial := sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 30)) tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go index 5cb65d760c1e..6236e74902c8 100644 --- a/x/distribution/keeper/genesis.go +++ b/x/distribution/keeper/genesis.go @@ -15,15 +15,8 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { k.SetParams(ctx, data.Params) for _, dwi := range data.DelegatorWithdrawInfos { - delegatorAddress, err := sdk.AccAddressFromBech32(dwi.DelegatorAddress) - if err != nil { - panic(err) - } - withdrawAddress, err := sdk.AccAddressFromBech32(dwi.WithdrawAddress) - if err != nil { - panic(err) - } - + delegatorAddress := sdk.MustAccAddressFromBech32(dwi.DelegatorAddress) + withdrawAddress := sdk.MustAccAddressFromBech32(dwi.WithdrawAddress) k.SetDelegatorWithdrawAddr(ctx, delegatorAddress, withdrawAddress) } @@ -72,10 +65,8 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { if err != nil { panic(err) } - delegatorAddress, err := sdk.AccAddressFromBech32(del.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(del.DelegatorAddress) + k.SetDelegatorStartingInfo(ctx, valAddr, delegatorAddress, del.StartingInfo) } for _, evt := range data.ValidatorSlashEvents { diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index 5cf71bbb102d..bbc884276a06 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -82,7 +82,6 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla } ctx := sdk.UnwrapSDKContext(c) - events := make([]types.ValidatorSlashEvent, 0) store := ctx.KVStore(k.storeKey) valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) if err != nil { @@ -90,29 +89,25 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla } slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(valAddr)) - pageRes, err := query.FilteredPaginate(slashesStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { - var result types.ValidatorSlashEvent - err := k.cdc.Unmarshal(value, &result) - - if err != nil { - return false, err - } - + events, pageRes, err := query.GenericFilteredPaginate(k.cdc, slashesStore, req.Pagination, func(key []byte, result *types.ValidatorSlashEvent) (*types.ValidatorSlashEvent, error) { if result.ValidatorPeriod < req.StartingHeight || result.ValidatorPeriod > req.EndingHeight { - return false, nil + return nil, nil } - if accumulate { - events = append(events, result) - } - return true, nil + return result, nil + }, func() *types.ValidatorSlashEvent { + return &types.ValidatorSlashEvent{} }) - if err != nil { return nil, err } - return &types.QueryValidatorSlashesResponse{Slashes: events, Pagination: pageRes}, nil + slashes := []types.ValidatorSlashEvent{} + for _, event := range events { + slashes = append(slashes, *event) + } + + return &types.QueryValidatorSlashesResponse{Slashes: slashes, Pagination: pageRes}, nil } // DelegationRewards the total rewards accrued by a delegation diff --git a/x/distribution/keeper/hooks.go b/x/distribution/keeper/hooks.go index 0c66d44e33e7..bfae8482da5e 100644 --- a/x/distribution/keeper/hooks.go +++ b/x/distribution/keeper/hooks.go @@ -113,9 +113,11 @@ func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } + func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } + func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } diff --git a/x/distribution/keeper/invariants.go b/x/distribution/keeper/invariants.go index 0a23d36be8f7..50300b977379 100644 --- a/x/distribution/keeper/invariants.go +++ b/x/distribution/keeper/invariants.go @@ -64,7 +64,6 @@ func NonNegativeOutstandingInvariant(k Keeper) sdk.Invariant { // CanWithdrawInvariant checks that current rewards can be completely withdrawn func CanWithdrawInvariant(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { - // cache, we don't want to write changes ctx, _ = ctx.CacheContext() @@ -106,7 +105,6 @@ func CanWithdrawInvariant(k Keeper) sdk.Invariant { // ReferenceCountInvariant checks that the number of historical rewards records is correct func ReferenceCountInvariant(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { - valCount := uint64(0) k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { valCount++ @@ -137,7 +135,6 @@ func ReferenceCountInvariant(k Keeper) sdk.Invariant { // is consistent with the sum of validator outstanding rewards func ModuleAccountInvariant(k Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { - var expectedCoins sdk.DecCoins k.IterateValidatorOutstandingRewards(ctx, func(_ sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool) { expectedCoins = expectedCoins.Add(rewards.Rewards...) diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 50536b2698e8..6af1ede7e5cd 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -31,7 +31,6 @@ func NewKeeper( ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, feeCollectorName string, ) Keeper { - // ensure distribution module account is set if addr := ak.GetModuleAddress(types.ModuleName); addr == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) diff --git a/x/distribution/keeper/store.go b/x/distribution/keeper/store.go index 0203ee13f672..3def35163f5c 100644 --- a/x/distribution/keeper/store.go +++ b/x/distribution/keeper/store.go @@ -331,7 +331,8 @@ func (k Keeper) SetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, heig // iterate over slash events between heights, inclusive func (k Keeper) IterateValidatorSlashEventsBetween(ctx sdk.Context, val sdk.ValAddress, startingHeight uint64, endingHeight uint64, - handler func(height uint64, event types.ValidatorSlashEvent) (stop bool)) { + handler func(height uint64, event types.ValidatorSlashEvent) (stop bool), +) { store := ctx.KVStore(k.storeKey) iter := store.Iterator( types.GetValidatorSlashEventKeyPrefix(val, startingHeight), diff --git a/x/distribution/keeper/validator.go b/x/distribution/keeper/validator.go index 3d1953c3b5fa..38654e771a0b 100644 --- a/x/distribution/keeper/validator.go +++ b/x/distribution/keeper/validator.go @@ -45,7 +45,7 @@ func (k Keeper) IncrementValidatorPeriod(ctx sdk.Context, val stakingtypes.Valid current = sdk.DecCoins{} } else { // note: necessary to truncate so we don't allow withdrawing more rewards than owed - current = rewards.Rewards.QuoDecTruncate(val.GetTokens().ToDec()) + current = rewards.Rewards.QuoDecTruncate(sdk.NewDecFromInt(val.GetTokens())) } // fetch historical rewards for last period diff --git a/x/distribution/migrations/v034/types.go b/x/distribution/migrations/v034/types.go deleted file mode 100644 index e32b92a5cf55..000000000000 --- a/x/distribution/migrations/v034/types.go +++ /dev/null @@ -1,100 +0,0 @@ -// Package v034 is used for legacy migration scripts. Actual migration scripts -// for v034 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v034 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// ---------------------------------------------------------------------------- -// Types and Constants -// ---------------------------------------------------------------------------- - -const ( - ModuleName = "distr" -) - -type ( - ValidatorAccumulatedCommission = sdk.DecCoins - - DelegatorStartingInfo struct { - PreviousPeriod uint64 `json:"previous_period"` - Stake sdk.Dec `json:"stake"` - Height uint64 `json:"height"` - } - - DelegatorWithdrawInfo struct { - DelegatorAddress sdk.AccAddress `json:"delegator_address"` - WithdrawAddress sdk.AccAddress `json:"withdraw_address"` - } - - ValidatorOutstandingRewardsRecord struct { - ValidatorAddress sdk.ValAddress `json:"validator_address"` - OutstandingRewards sdk.DecCoins `json:"outstanding_rewards"` - } - - ValidatorAccumulatedCommissionRecord struct { - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Accumulated ValidatorAccumulatedCommission `json:"accumulated"` - } - - ValidatorHistoricalRewardsRecord struct { - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Period uint64 `json:"period"` - Rewards ValidatorHistoricalRewards `json:"rewards"` - } - - ValidatorHistoricalRewards struct { - CumulativeRewardRatio sdk.DecCoins `json:"cumulative_reward_ratio"` - ReferenceCount uint16 `json:"reference_count"` - } - - ValidatorCurrentRewards struct { - Rewards sdk.DecCoins `json:"rewards"` - Period uint64 `json:"period"` - } - - ValidatorCurrentRewardsRecord struct { - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Rewards ValidatorCurrentRewards `json:"rewards"` - } - - DelegatorStartingInfoRecord struct { - DelegatorAddress sdk.AccAddress `json:"delegator_address"` - ValidatorAddress sdk.ValAddress `json:"validator_address"` - StartingInfo DelegatorStartingInfo `json:"starting_info"` - } - - ValidatorSlashEventRecord struct { - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Height uint64 `json:"height"` - Event ValidatorSlashEvent `json:"validator_slash_event"` - } - - FeePool struct { - CommunityPool sdk.DecCoins `json:"community_pool"` - } - - ValidatorSlashEvent struct { - ValidatorPeriod uint64 `json:"validator_period"` - Fraction sdk.Dec `json:"fraction"` - } - - GenesisState struct { - FeePool FeePool `json:"fee_pool"` - CommunityTax sdk.Dec `json:"community_tax"` - BaseProposerReward sdk.Dec `json:"base_proposer_reward"` - BonusProposerReward sdk.Dec `json:"bonus_proposer_reward"` - WithdrawAddrEnabled bool `json:"withdraw_addr_enabled"` - DelegatorWithdrawInfos []DelegatorWithdrawInfo `json:"delegator_withdraw_infos"` - PreviousProposer sdk.ConsAddress `json:"previous_proposer"` - OutstandingRewards []ValidatorOutstandingRewardsRecord `json:"outstanding_rewards"` - ValidatorAccumulatedCommissions []ValidatorAccumulatedCommissionRecord `json:"validator_accumulated_commissions"` - ValidatorHistoricalRewards []ValidatorHistoricalRewardsRecord `json:"validator_historical_rewards"` - ValidatorCurrentRewards []ValidatorCurrentRewardsRecord `json:"validator_current_rewards"` - DelegatorStartingInfos []DelegatorStartingInfoRecord `json:"delegator_starting_infos"` - ValidatorSlashEvents []ValidatorSlashEventRecord `json:"validator_slash_events"` - } -) diff --git a/x/distribution/migrations/v036/types.go b/x/distribution/migrations/v036/types.go deleted file mode 100644 index df1e55a99350..000000000000 --- a/x/distribution/migrations/v036/types.go +++ /dev/null @@ -1,136 +0,0 @@ -// Package v036 is used for legacy migration scripts. Actual migration scripts -// for v036 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v036 - -import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - v034distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v034" - "github.com/cosmos/cosmos-sdk/x/distribution/types" - v036gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v036" -) - -// ---------------------------------------------------------------------------- -// Types and Constants -// ---------------------------------------------------------------------------- - -const ( - ModuleName = "distribution" - - // RouterKey is the message route for distribution - RouterKey = ModuleName - - // ProposalTypeCommunityPoolSpend defines the type for a CommunityPoolSpendProposal - ProposalTypeCommunityPoolSpend = "CommunityPoolSpend" -) - -type ( - ValidatorAccumulatedCommission = sdk.DecCoins - - ValidatorSlashEventRecord struct { - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Height uint64 `json:"height"` - Period uint64 `json:"period"` - Event v034distr.ValidatorSlashEvent `json:"validator_slash_event"` - } - - GenesisState struct { - FeePool v034distr.FeePool `json:"fee_pool"` - CommunityTax sdk.Dec `json:"community_tax"` - BaseProposerReward sdk.Dec `json:"base_proposer_reward"` - BonusProposerReward sdk.Dec `json:"bonus_proposer_reward"` - WithdrawAddrEnabled bool `json:"withdraw_addr_enabled"` - DelegatorWithdrawInfos []v034distr.DelegatorWithdrawInfo `json:"delegator_withdraw_infos"` - PreviousProposer sdk.ConsAddress `json:"previous_proposer"` - OutstandingRewards []v034distr.ValidatorOutstandingRewardsRecord `json:"outstanding_rewards"` - ValidatorAccumulatedCommissions []v034distr.ValidatorAccumulatedCommissionRecord `json:"validator_accumulated_commissions"` - ValidatorHistoricalRewards []v034distr.ValidatorHistoricalRewardsRecord `json:"validator_historical_rewards"` - ValidatorCurrentRewards []v034distr.ValidatorCurrentRewardsRecord `json:"validator_current_rewards"` - DelegatorStartingInfos []v034distr.DelegatorStartingInfoRecord `json:"delegator_starting_infos"` - ValidatorSlashEvents []ValidatorSlashEventRecord `json:"validator_slash_events"` - } - - // CommunityPoolSpendProposal spends from the community pool - CommunityPoolSpendProposal struct { - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Recipient sdk.AccAddress `json:"recipient" yaml:"recipient"` - Amount sdk.Coins `json:"amount" yaml:"amount"` - } -) - -func NewGenesisState( - feePool v034distr.FeePool, communityTax, baseProposerReward, bonusProposerReward sdk.Dec, - withdrawAddrEnabled bool, dwis []v034distr.DelegatorWithdrawInfo, pp sdk.ConsAddress, - r []v034distr.ValidatorOutstandingRewardsRecord, acc []v034distr.ValidatorAccumulatedCommissionRecord, - historical []v034distr.ValidatorHistoricalRewardsRecord, cur []v034distr.ValidatorCurrentRewardsRecord, - dels []v034distr.DelegatorStartingInfoRecord, slashes []ValidatorSlashEventRecord, -) GenesisState { - - return GenesisState{ - FeePool: feePool, - CommunityTax: communityTax, - BaseProposerReward: baseProposerReward, - BonusProposerReward: bonusProposerReward, - WithdrawAddrEnabled: withdrawAddrEnabled, - DelegatorWithdrawInfos: dwis, - PreviousProposer: pp, - OutstandingRewards: r, - ValidatorAccumulatedCommissions: acc, - ValidatorHistoricalRewards: historical, - ValidatorCurrentRewards: cur, - DelegatorStartingInfos: dels, - ValidatorSlashEvents: slashes, - } -} - -var _ v036gov.Content = CommunityPoolSpendProposal{} - -// GetTitle returns the title of a community pool spend proposal. -func (csp CommunityPoolSpendProposal) GetTitle() string { return csp.Title } - -// GetDescription returns the description of a community pool spend proposal. -func (csp CommunityPoolSpendProposal) GetDescription() string { return csp.Description } - -// GetDescription returns the routing key of a community pool spend proposal. -func (csp CommunityPoolSpendProposal) ProposalRoute() string { return RouterKey } - -// ProposalType returns the type of a community pool spend proposal. -func (csp CommunityPoolSpendProposal) ProposalType() string { return ProposalTypeCommunityPoolSpend } - -// ValidateBasic runs basic stateless validity checks -func (csp CommunityPoolSpendProposal) ValidateBasic() error { - err := v036gov.ValidateAbstract(csp) - if err != nil { - return err - } - if !csp.Amount.IsValid() { - return types.ErrInvalidProposalAmount - } - if csp.Recipient.Empty() { - return types.ErrEmptyProposalRecipient - } - - return nil -} - -// String implements the Stringer interface. -func (csp CommunityPoolSpendProposal) String() string { - var b strings.Builder - b.WriteString(fmt.Sprintf(`Community Pool Spend Proposal: - Title: %s - Description: %s - Recipient: %s - Amount: %s -`, csp.Title, csp.Description, csp.Recipient, csp.Amount)) - return b.String() -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(CommunityPoolSpendProposal{}, "cosmos-sdk/CommunityPoolSpendProposal", nil) -} diff --git a/x/distribution/migrations/v038/types.go b/x/distribution/migrations/v038/types.go deleted file mode 100644 index cfdc0d508d99..000000000000 --- a/x/distribution/migrations/v038/types.go +++ /dev/null @@ -1,59 +0,0 @@ -// Package v038 is used for legacy migration scripts. Actual migration scripts -// for v038 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -package v038 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - v034distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v034" - v036distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v036" -) - -// DONTCOVER - -const ( - ModuleName = "distribution" -) - -type ( - GenesisState struct { - Params Params `json:"params" yaml:"params"` - FeePool v034distr.FeePool `json:"fee_pool"` - DelegatorWithdrawInfos []v034distr.DelegatorWithdrawInfo `json:"delegator_withdraw_infos"` - PreviousProposer sdk.ConsAddress `json:"previous_proposer" yaml:"previous_proposer"` - OutstandingRewards []v034distr.ValidatorOutstandingRewardsRecord `json:"outstanding_rewards"` - ValidatorAccumulatedCommissions []v034distr.ValidatorAccumulatedCommissionRecord `json:"validator_accumulated_commissions"` - ValidatorHistoricalRewards []v034distr.ValidatorHistoricalRewardsRecord `json:"validator_historical_rewards"` - ValidatorCurrentRewards []v034distr.ValidatorCurrentRewardsRecord `json:"validator_current_rewards"` - DelegatorStartingInfos []v034distr.DelegatorStartingInfoRecord `json:"delegator_starting_infos"` - ValidatorSlashEvents []v036distr.ValidatorSlashEventRecord `json:"validator_slash_events" yaml:"validator_slash_events"` - } - - Params struct { - CommunityTax sdk.Dec `json:"community_tax" yaml:"community_tax"` - BaseProposerReward sdk.Dec `json:"base_proposer_reward" yaml:"base_proposer_reward"` - BonusProposerReward sdk.Dec `json:"bonus_proposer_reward" yaml:"bonus_proposer_reward"` - WithdrawAddrEnabled bool `json:"withdraw_addr_enabled" yaml:"withdraw_addr_enabled"` - } -) - -func NewGenesisState( - params Params, feePool v034distr.FeePool, dwis []v034distr.DelegatorWithdrawInfo, pp sdk.ConsAddress, - r []v034distr.ValidatorOutstandingRewardsRecord, acc []v034distr.ValidatorAccumulatedCommissionRecord, - historical []v034distr.ValidatorHistoricalRewardsRecord, cur []v034distr.ValidatorCurrentRewardsRecord, - dels []v034distr.DelegatorStartingInfoRecord, slashes []v036distr.ValidatorSlashEventRecord, -) GenesisState { - - return GenesisState{ - FeePool: feePool, - Params: params, - DelegatorWithdrawInfos: dwis, - PreviousProposer: pp, - OutstandingRewards: r, - ValidatorAccumulatedCommissions: acc, - ValidatorHistoricalRewards: historical, - ValidatorCurrentRewards: cur, - DelegatorStartingInfos: dels, - ValidatorSlashEvents: slashes, - } -} diff --git a/x/distribution/migrations/v040/migrate.go b/x/distribution/migrations/v040/migrate.go deleted file mode 100644 index a5024e44a4e7..000000000000 --- a/x/distribution/migrations/v040/migrate.go +++ /dev/null @@ -1,108 +0,0 @@ -package v040 - -import ( - v038distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v038" - v040distribution "github.com/cosmos/cosmos-sdk/x/distribution/types" -) - -// Migrate accepts exported x/distribution genesis state from v0.38 and migrates it -// to v0.40 x/distribution genesis state. The migration includes: -// -// - Convert addresses from bytes to bech32 strings. -// - Re-encode in v0.40 GenesisState. -func Migrate(oldDistributionState v038distribution.GenesisState) *v040distribution.GenesisState { - newDelegatorWithdrawInfos := make([]v040distribution.DelegatorWithdrawInfo, len(oldDistributionState.DelegatorWithdrawInfos)) - for i, oldDelegatorWithdrawInfo := range oldDistributionState.DelegatorWithdrawInfos { - newDelegatorWithdrawInfos[i] = v040distribution.DelegatorWithdrawInfo{ - DelegatorAddress: oldDelegatorWithdrawInfo.DelegatorAddress.String(), - WithdrawAddress: oldDelegatorWithdrawInfo.WithdrawAddress.String(), - } - } - - newValidatorOutstandingRewards := make([]v040distribution.ValidatorOutstandingRewardsRecord, len(oldDistributionState.OutstandingRewards)) - for i, oldValidatorOutstandingReward := range oldDistributionState.OutstandingRewards { - newValidatorOutstandingRewards[i] = v040distribution.ValidatorOutstandingRewardsRecord{ - ValidatorAddress: oldValidatorOutstandingReward.ValidatorAddress.String(), - OutstandingRewards: oldValidatorOutstandingReward.OutstandingRewards, - } - } - - newValidatorAccumulatedCommissions := make([]v040distribution.ValidatorAccumulatedCommissionRecord, len(oldDistributionState.ValidatorAccumulatedCommissions)) - for i, oldValidatorAccumulatedCommission := range oldDistributionState.ValidatorAccumulatedCommissions { - newValidatorAccumulatedCommissions[i] = v040distribution.ValidatorAccumulatedCommissionRecord{ - ValidatorAddress: oldValidatorAccumulatedCommission.ValidatorAddress.String(), - Accumulated: v040distribution.ValidatorAccumulatedCommission{ - Commission: oldValidatorAccumulatedCommission.Accumulated, - }, - } - } - - newValidatorHistoricalRewards := make([]v040distribution.ValidatorHistoricalRewardsRecord, len(oldDistributionState.ValidatorHistoricalRewards)) - for i, oldValidatorHistoricalReward := range oldDistributionState.ValidatorHistoricalRewards { - newValidatorHistoricalRewards[i] = v040distribution.ValidatorHistoricalRewardsRecord{ - ValidatorAddress: oldValidatorHistoricalReward.ValidatorAddress.String(), - Period: oldValidatorHistoricalReward.Period, - Rewards: v040distribution.ValidatorHistoricalRewards{ - CumulativeRewardRatio: oldValidatorHistoricalReward.Rewards.CumulativeRewardRatio, - ReferenceCount: uint32(oldValidatorHistoricalReward.Rewards.ReferenceCount), - }, - } - } - - newValidatorCurrentRewards := make([]v040distribution.ValidatorCurrentRewardsRecord, len(oldDistributionState.ValidatorCurrentRewards)) - for i, oldValidatorCurrentReward := range oldDistributionState.ValidatorCurrentRewards { - newValidatorCurrentRewards[i] = v040distribution.ValidatorCurrentRewardsRecord{ - ValidatorAddress: oldValidatorCurrentReward.ValidatorAddress.String(), - Rewards: v040distribution.ValidatorCurrentRewards{ - Rewards: oldValidatorCurrentReward.Rewards.Rewards, - Period: oldValidatorCurrentReward.Rewards.Period, - }, - } - } - - newDelegatorStartingInfos := make([]v040distribution.DelegatorStartingInfoRecord, len(oldDistributionState.DelegatorStartingInfos)) - for i, oldDelegatorStartingInfo := range oldDistributionState.DelegatorStartingInfos { - newDelegatorStartingInfos[i] = v040distribution.DelegatorStartingInfoRecord{ - DelegatorAddress: oldDelegatorStartingInfo.DelegatorAddress.String(), - ValidatorAddress: oldDelegatorStartingInfo.ValidatorAddress.String(), - StartingInfo: v040distribution.DelegatorStartingInfo{ - PreviousPeriod: oldDelegatorStartingInfo.StartingInfo.PreviousPeriod, - Stake: oldDelegatorStartingInfo.StartingInfo.Stake, - Height: oldDelegatorStartingInfo.StartingInfo.Height, - }, - } - } - - newValidatorSlashEvents := make([]v040distribution.ValidatorSlashEventRecord, len(oldDistributionState.ValidatorSlashEvents)) - for i, oldValidatorSlashEvent := range oldDistributionState.ValidatorSlashEvents { - newValidatorSlashEvents[i] = v040distribution.ValidatorSlashEventRecord{ - ValidatorAddress: oldValidatorSlashEvent.ValidatorAddress.String(), - Height: oldValidatorSlashEvent.Height, - Period: oldValidatorSlashEvent.Period, - ValidatorSlashEvent: v040distribution.ValidatorSlashEvent{ - ValidatorPeriod: oldValidatorSlashEvent.Event.ValidatorPeriod, - Fraction: oldValidatorSlashEvent.Event.Fraction, - }, - } - } - - return &v040distribution.GenesisState{ - Params: v040distribution.Params{ - CommunityTax: oldDistributionState.Params.CommunityTax, - BaseProposerReward: oldDistributionState.Params.BaseProposerReward, - BonusProposerReward: oldDistributionState.Params.BonusProposerReward, - WithdrawAddrEnabled: oldDistributionState.Params.WithdrawAddrEnabled, - }, - FeePool: v040distribution.FeePool{ - CommunityPool: oldDistributionState.FeePool.CommunityPool, - }, - DelegatorWithdrawInfos: newDelegatorWithdrawInfos, - PreviousProposer: oldDistributionState.PreviousProposer.String(), - OutstandingRewards: newValidatorOutstandingRewards, - ValidatorAccumulatedCommissions: newValidatorAccumulatedCommissions, - ValidatorHistoricalRewards: newValidatorHistoricalRewards, - ValidatorCurrentRewards: newValidatorCurrentRewards, - DelegatorStartingInfos: newDelegatorStartingInfos, - ValidatorSlashEvents: newValidatorSlashEvents, - } -} diff --git a/x/distribution/migrations/v040/keys.go b/x/distribution/migrations/v042/types.go similarity index 86% rename from x/distribution/migrations/v040/keys.go rename to x/distribution/migrations/v042/types.go index db8b1548a343..dc5cc6c746d0 100644 --- a/x/distribution/migrations/v040/keys.go +++ b/x/distribution/migrations/v042/types.go @@ -1,13 +1,11 @@ -// Package v040 is copy-pasted from: -// https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/distribution/types/keys.go -package v040 +package legacy import ( "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" ) const ( @@ -61,7 +59,7 @@ var ( func GetValidatorOutstandingRewardsAddress(key []byte) (valAddr sdk.ValAddress) { kv.AssertKeyAtLeastLength(key, 2) addr := key[1:] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyLength(addr, v042auth.AddrLen) return sdk.ValAddress(addr) } @@ -69,29 +67,29 @@ func GetValidatorOutstandingRewardsAddress(key []byte) (valAddr sdk.ValAddress) func GetDelegatorWithdrawInfoAddress(key []byte) (delAddr sdk.AccAddress) { kv.AssertKeyAtLeastLength(key, 2) addr := key[1:] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyLength(addr, v042auth.AddrLen) return sdk.AccAddress(addr) } // gets the addresses from a delegator starting info key func GetDelegatorStartingInfoAddresses(key []byte) (valAddr sdk.ValAddress, delAddr sdk.AccAddress) { - kv.AssertKeyAtLeastLength(key, 2+v040auth.AddrLen) - addr := key[1 : 1+v040auth.AddrLen] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyAtLeastLength(key, 2+v042auth.AddrLen) + addr := key[1 : 1+v042auth.AddrLen] + kv.AssertKeyLength(addr, v042auth.AddrLen) valAddr = sdk.ValAddress(addr) - addr = key[1+v040auth.AddrLen:] - kv.AssertKeyLength(addr, v040auth.AddrLen) + addr = key[1+v042auth.AddrLen:] + kv.AssertKeyLength(addr, v042auth.AddrLen) delAddr = sdk.AccAddress(addr) return } // gets the address & period from a validator's historical rewards key func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddress, period uint64) { - kv.AssertKeyAtLeastLength(key, 2+v040auth.AddrLen) - addr := key[1 : 1+v040auth.AddrLen] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyAtLeastLength(key, 2+v042auth.AddrLen) + addr := key[1 : 1+v042auth.AddrLen] + kv.AssertKeyLength(addr, v042auth.AddrLen) valAddr = sdk.ValAddress(addr) - b := key[1+v040auth.AddrLen:] + b := key[1+v042auth.AddrLen:] kv.AssertKeyLength(addr, 8) period = binary.LittleEndian.Uint64(b) return @@ -101,7 +99,7 @@ func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddr func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress) { kv.AssertKeyAtLeastLength(key, 2) addr := key[1:] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyLength(addr, v042auth.AddrLen) return sdk.ValAddress(addr) } @@ -109,17 +107,17 @@ func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress) { func GetValidatorAccumulatedCommissionAddress(key []byte) (valAddr sdk.ValAddress) { kv.AssertKeyAtLeastLength(key, 2) addr := key[1:] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyLength(addr, v042auth.AddrLen) return sdk.ValAddress(addr) } // gets the height from a validator's slash event key func GetValidatorSlashEventAddressHeight(key []byte) (valAddr sdk.ValAddress, height uint64) { - kv.AssertKeyAtLeastLength(key, 2+v040auth.AddrLen) - addr := key[1 : 1+v040auth.AddrLen] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyAtLeastLength(key, 2+v042auth.AddrLen) + addr := key[1 : 1+v042auth.AddrLen] + kv.AssertKeyLength(addr, v042auth.AddrLen) valAddr = sdk.ValAddress(addr) - startB := 1 + v040auth.AddrLen + startB := 1 + v042auth.AddrLen kv.AssertKeyAtLeastLength(key, startB+9) b := key[startB : startB+8] // the next 8 bytes represent the height height = binary.BigEndian.Uint64(b) diff --git a/x/distribution/migrations/v043/helpers.go b/x/distribution/migrations/v043/helpers.go index 185682217809..0e846a72ffae 100644 --- a/x/distribution/migrations/v043/helpers.go +++ b/x/distribution/migrations/v043/helpers.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" ) // MigratePrefixAddress is a helper function that migrates all keys of format: @@ -19,7 +19,7 @@ func MigratePrefixAddress(store sdk.KVStore, prefixBz []byte) { for ; oldStoreIter.Valid(); oldStoreIter.Next() { addr := oldStoreIter.Key() - var newStoreKey = prefixBz + newStoreKey := prefixBz newStoreKey = append(newStoreKey, address.MustLengthPrefix(addr)...) // Set new key on store. Values don't change. @@ -39,8 +39,8 @@ func MigratePrefixAddressBytes(store sdk.KVStore, prefixBz []byte) { defer oldStoreIter.Close() for ; oldStoreIter.Valid(); oldStoreIter.Next() { - addr := oldStoreIter.Key()[:v040auth.AddrLen] - endBz := oldStoreIter.Key()[v040auth.AddrLen:] + addr := oldStoreIter.Key()[:v042auth.AddrLen] + endBz := oldStoreIter.Key()[v042auth.AddrLen:] newStoreKey := append(append(prefixBz, address.MustLengthPrefix(addr)...), endBz...) // Set new key on store. Values don't change. @@ -60,8 +60,8 @@ func MigratePrefixAddressAddress(store sdk.KVStore, prefixBz []byte) { defer oldStoreIter.Close() for ; oldStoreIter.Valid(); oldStoreIter.Next() { - addr1 := oldStoreIter.Key()[:v040auth.AddrLen] - addr2 := oldStoreIter.Key()[v040auth.AddrLen:] + addr1 := oldStoreIter.Key()[:v042auth.AddrLen] + addr2 := oldStoreIter.Key()[v042auth.AddrLen:] newStoreKey := append(append(prefixBz, address.MustLengthPrefix(addr1)...), address.MustLengthPrefix(addr2)...) // Set new key on store. Values don't change. diff --git a/x/distribution/migrations/v043/store.go b/x/distribution/migrations/v043/store.go index b757c7f2ac10..12fa534f9bf4 100644 --- a/x/distribution/migrations/v043/store.go +++ b/x/distribution/migrations/v043/store.go @@ -3,7 +3,7 @@ package v043 import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - v040distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v040" + v042distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v042" ) // MigrateStore performs in-place store migrations from v0.40 to v0.43. The @@ -12,13 +12,13 @@ import ( // - Change addresses to be length-prefixed. func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey) error { store := ctx.KVStore(storeKey) - MigratePrefixAddress(store, v040distribution.ValidatorOutstandingRewardsPrefix) - MigratePrefixAddress(store, v040distribution.DelegatorWithdrawAddrPrefix) - MigratePrefixAddressAddress(store, v040distribution.DelegatorStartingInfoPrefix) - MigratePrefixAddressBytes(store, v040distribution.ValidatorHistoricalRewardsPrefix) - MigratePrefixAddress(store, v040distribution.ValidatorCurrentRewardsPrefix) - MigratePrefixAddress(store, v040distribution.ValidatorAccumulatedCommissionPrefix) - MigratePrefixAddressBytes(store, v040distribution.ValidatorSlashEventPrefix) + MigratePrefixAddress(store, v042distribution.ValidatorOutstandingRewardsPrefix) + MigratePrefixAddress(store, v042distribution.DelegatorWithdrawAddrPrefix) + MigratePrefixAddressAddress(store, v042distribution.DelegatorStartingInfoPrefix) + MigratePrefixAddressBytes(store, v042distribution.ValidatorHistoricalRewardsPrefix) + MigratePrefixAddress(store, v042distribution.ValidatorCurrentRewardsPrefix) + MigratePrefixAddress(store, v042distribution.ValidatorAccumulatedCommissionPrefix) + MigratePrefixAddressBytes(store, v042distribution.ValidatorSlashEventPrefix) return nil } diff --git a/x/distribution/migrations/v043/store_test.go b/x/distribution/migrations/v043/store_test.go index 9804e97d2f69..9c055f72e553 100644 --- a/x/distribution/migrations/v043/store_test.go +++ b/x/distribution/migrations/v043/store_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v040distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v040" + v042distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v042" v043distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v043" "github.com/cosmos/cosmos-sdk/x/distribution/types" ) @@ -32,47 +32,47 @@ func TestStoreMigration(t *testing.T) { }{ { "FeePoolKey", - v040distribution.FeePoolKey, + v042distribution.FeePoolKey, types.FeePoolKey, }, { "ProposerKey", - v040distribution.ProposerKey, + v042distribution.ProposerKey, types.ProposerKey, }, { "ValidatorOutstandingRewards", - v040distribution.GetValidatorOutstandingRewardsKey(valAddr), + v042distribution.GetValidatorOutstandingRewardsKey(valAddr), types.GetValidatorOutstandingRewardsKey(valAddr), }, { "DelegatorWithdrawAddr", - v040distribution.GetDelegatorWithdrawAddrKey(addr2), + v042distribution.GetDelegatorWithdrawAddrKey(addr2), types.GetDelegatorWithdrawAddrKey(addr2), }, { "DelegatorStartingInfo", - v040distribution.GetDelegatorStartingInfoKey(valAddr, addr2), + v042distribution.GetDelegatorStartingInfoKey(valAddr, addr2), types.GetDelegatorStartingInfoKey(valAddr, addr2), }, { "ValidatorHistoricalRewards", - v040distribution.GetValidatorHistoricalRewardsKey(valAddr, 6), + v042distribution.GetValidatorHistoricalRewardsKey(valAddr, 6), types.GetValidatorHistoricalRewardsKey(valAddr, 6), }, { "ValidatorCurrentRewards", - v040distribution.GetValidatorCurrentRewardsKey(valAddr), + v042distribution.GetValidatorCurrentRewardsKey(valAddr), types.GetValidatorCurrentRewardsKey(valAddr), }, { "ValidatorAccumulatedCommission", - v040distribution.GetValidatorAccumulatedCommissionKey(valAddr), + v042distribution.GetValidatorAccumulatedCommissionKey(valAddr), types.GetValidatorAccumulatedCommissionKey(valAddr), }, { "ValidatorSlashEvent", - v040distribution.GetValidatorSlashEventKey(valAddr, 6, 8), + v042distribution.GetValidatorSlashEventKey(valAddr, 6, 8), types.GetValidatorSlashEventKey(valAddr, 6, 8), }, } diff --git a/x/distribution/module.go b/x/distribution/module.go index 13cf674e3be0..8a663f2ffcb8 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -21,7 +20,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/cosmos/cosmos-sdk/x/distribution/simulation" "github.com/cosmos/cosmos-sdk/x/distribution/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) var ( @@ -61,11 +59,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEn return types.ValidateGenesis(&data) } -// RegisterRESTRoutes registers the REST routes for the distribution module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/distribution` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(_ sdkclient.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the distribution module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -95,13 +88,13 @@ type AppModule struct { keeper keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper - stakingKeeper stakingkeeper.Keeper + stakingKeeper types.StakingKeeper } // NewAppModule creates a new AppModule object func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, stakingKeeper stakingkeeper.Keeper, + bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, ) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, @@ -170,12 +163,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, req, am.keeper) } -// EndBlock returns the end blocker for the distribution module. It returns no validator -// updates. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the distribution module. diff --git a/x/distribution/simulation/genesis_test.go b/x/distribution/simulation/genesis_test.go index e923fbd4c833..259f0512d7a0 100644 --- a/x/distribution/simulation/genesis_test.go +++ b/x/distribution/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,7 +31,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go index f82e921290b4..edd0aef1ff12 100644 --- a/x/distribution/simulation/operations.go +++ b/x/distribution/simulation/operations.go @@ -24,11 +24,7 @@ const ( ) // WeightedOperations returns all the operations from the module with their respective weights -func WeightedOperations( - appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, - bk types.BankKeeper, k keeper.Keeper, sk stakingkeeper.Keeper, -) simulation.WeightedOperations { - +func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simulation.WeightedOperations { var weightMsgSetWithdrawAddress int appParams.GetOrGenerate(cdc, OpWeightMsgSetWithdrawAddress, &weightMsgSetWithdrawAddress, nil, func(_ *rand.Rand) { @@ -57,6 +53,8 @@ func WeightedOperations( }, ) + stakeKeeper := sk.(stakingkeeper.Keeper) + return simulation.WeightedOperations{ simulation.NewWeightedOperation( weightMsgSetWithdrawAddress, @@ -64,15 +62,15 @@ func WeightedOperations( ), simulation.NewWeightedOperation( weightMsgWithdrawDelegationReward, - SimulateMsgWithdrawDelegatorReward(ak, bk, k, sk), + SimulateMsgWithdrawDelegatorReward(ak, bk, k, stakeKeeper), ), simulation.NewWeightedOperation( weightMsgWithdrawValidatorCommission, - SimulateMsgWithdrawValidatorCommission(ak, bk, k, sk), + SimulateMsgWithdrawValidatorCommission(ak, bk, k, stakeKeeper), ), simulation.NewWeightedOperation( weightMsgFundCommunityPool, - SimulateMsgFundCommunityPool(ak, bk, k, sk), + SimulateMsgFundCommunityPool(ak, bk, k, stakeKeeper), ), } } @@ -160,7 +158,6 @@ func SimulateMsgWithdrawValidatorCommission(ak types.AccountKeeper, bk types.Ban return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - validator, ok := stakingkeeper.RandomValidator(r, sk, ctx) if !ok { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgWithdrawValidatorCommission, "random validator is not ok"), nil, nil @@ -206,7 +203,6 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - funder, _ := simtypes.RandomAcc(r, accs) account := ak.GetAccount(ctx, funder.Address) @@ -222,7 +218,7 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k err error ) - coins, hasNeg := spendable.SafeSub(fundAmount) + coins, hasNeg := spendable.SafeSub(fundAmount...) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -233,6 +229,7 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address) txCtx := simulation.OperationInput{ + R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 4d70aab2eacf..fdde63e43caa 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -58,7 +58,6 @@ func (suite *SimTestSuite) TestWeightedOperations() { // TestSimulateMsgSetWithdrawAddress tests the normal scenario of a valid message of type TypeMsgSetWithdrawAddress. // Abonormal scenarios, where the message is created by an errors, are not tested here. func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { - // setup 3 accounts s := rand.NewSource(1) r := rand.New(s) @@ -276,7 +275,6 @@ func (suite *SimTestSuite) setupValidatorRewards(valAddress sdk.ValAddress) { // setup current revards currentRewards := distrtypes.NewValidatorCurrentRewards(decCoins, 3) suite.app.DistrKeeper.SetValidatorCurrentRewards(suite.ctx, valAddress, currentRewards) - } func TestSimTestSuite(t *testing.T) { diff --git a/x/distribution/spec/02_state.md b/x/distribution/spec/02_state.md index 2e91b52f4437..e914ce25364d 100644 --- a/x/distribution/spec/02_state.md +++ b/x/distribution/spec/02_state.md @@ -27,7 +27,7 @@ type DecCoin struct { } ``` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/distribution/v1beta1/distribution.proto#L94-L101 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/distribution/v1beta1/distribution.proto#L92-L96 ## Validator Distribution diff --git a/x/distribution/spec/04_messages.md b/x/distribution/spec/04_messages.md index b9b0b9d32e23..87d608842e5b 100644 --- a/x/distribution/spec/04_messages.md +++ b/x/distribution/spec/04_messages.md @@ -13,7 +13,7 @@ The withdraw address cannot be any of the module accounts. These accounts are bl Response: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/distribution/v1beta1/tx.proto#L31-L41 ```go func (k Keeper) SetWithdrawAddr(ctx sdk.Context, delegatorAddr sdk.AccAddress, withdrawAddr sdk.AccAddress) error @@ -63,7 +63,7 @@ The final calculated stake is equivalent to the actual staked coins in the deleg Response: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/distribution/v1beta1/tx.proto#L46-L56 ## WithdrawValidatorCommission diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index f8c9726741b2..714525f71f09 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -626,65 +626,66 @@ func init() { } var fileDescriptor_cd78a31ea281a992 = []byte{ - // 922 bytes of a gzipped FileDescriptorProto + // 941 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0x7c, 0xe3, 0x38, 0xe9, 0x6b, 0x9b, 0x7c, 0x99, 0x38, 0xa9, 0xe3, 0x56, 0x76, 0xb4, - 0x12, 0x10, 0x54, 0xc5, 0x69, 0xda, 0x5b, 0xc4, 0x25, 0x76, 0x82, 0xe0, 0xd4, 0x68, 0x83, 0x00, - 0x71, 0x59, 0x8d, 0x77, 0x27, 0xf6, 0x28, 0xbb, 0x33, 0xcb, 0xcc, 0xac, 0x93, 0x9e, 0x39, 0xf0, - 0xe3, 0x84, 0xc4, 0x05, 0x71, 0x40, 0x3d, 0x22, 0xce, 0xbd, 0x70, 0xe4, 0xd6, 0x63, 0xe9, 0x05, - 0xc4, 0x21, 0xa0, 0x44, 0x48, 0x88, 0xbf, 0x02, 0xcd, 0xce, 0x78, 0xd7, 0x81, 0x50, 0xf5, 0x10, - 0x8b, 0x93, 0x3d, 0xef, 0xcd, 0x7e, 0x7e, 0xbc, 0x79, 0xfb, 0x66, 0xa1, 0x13, 0x0a, 0x95, 0x08, - 0xb5, 0x19, 0x31, 0xa5, 0x25, 0xeb, 0x67, 0x9a, 0x09, 0xbe, 0x39, 0xda, 0xea, 0x53, 0x4d, 0xb6, - 0x2e, 0x04, 0x3b, 0xa9, 0x14, 0x5a, 0xe0, 0xdb, 0x76, 0x7f, 0xe7, 0x42, 0xca, 0xed, 0x6f, 0xd6, - 0x07, 0x62, 0x20, 0xf2, 0x7d, 0x9b, 0xe6, 0x9f, 0x7d, 0xa4, 0xd9, 0x72, 0x14, 0x7d, 0xa2, 0x68, - 0x01, 0x1d, 0x0a, 0xe6, 0x20, 0x9b, 0xab, 0x36, 0x1f, 0xd8, 0x07, 0x1d, 0x7e, 0xbe, 0xf0, 0x3e, - 0x99, 0x81, 0xda, 0x3e, 0x91, 0x24, 0x51, 0x98, 0xc0, 0xcd, 0x50, 0x24, 0x49, 0xc6, 0x99, 0x7e, - 0x14, 0x68, 0x72, 0xd2, 0x40, 0x6b, 0x68, 0xfd, 0x5a, 0xf7, 0xcd, 0xa7, 0xa7, 0xed, 0xca, 0x2f, - 0xa7, 0xed, 0xd7, 0x06, 0x4c, 0x0f, 0xb3, 0x7e, 0x27, 0x14, 0x89, 0x83, 0x70, 0x3f, 0x1b, 0x2a, - 0x3a, 0xda, 0xd4, 0x8f, 0x52, 0xaa, 0x3a, 0xbb, 0x34, 0x7c, 0xfe, 0x64, 0x03, 0x1c, 0xc3, 0x2e, - 0x0d, 0xfd, 0x1b, 0x05, 0xe4, 0xbb, 0xe4, 0x04, 0x73, 0xa8, 0x1b, 0x8d, 0x46, 0x48, 0x2a, 0x14, - 0x95, 0x81, 0xa4, 0xc7, 0x44, 0x46, 0x8d, 0xff, 0x5d, 0x01, 0x13, 0x36, 0xc8, 0xfb, 0x0e, 0xd8, - 0xcf, 0x71, 0x71, 0x0a, 0xcb, 0x7d, 0xc1, 0x33, 0xf5, 0x0f, 0xc2, 0x99, 0x2b, 0x20, 0x5c, 0xca, - 0xa1, 0xff, 0xc6, 0x78, 0x1f, 0x96, 0x8f, 0x99, 0x1e, 0x46, 0x92, 0x1c, 0x07, 0x24, 0x8a, 0x64, - 0x40, 0x39, 0xe9, 0xc7, 0x34, 0x6a, 0x54, 0xd7, 0xd0, 0xfa, 0xbc, 0xbf, 0x34, 0x4e, 0xee, 0x44, - 0x91, 0xdc, 0xb3, 0xa9, 0xed, 0xea, 0x57, 0x8f, 0xdb, 0x15, 0xef, 0x47, 0x04, 0xcd, 0xf7, 0x48, - 0xcc, 0x22, 0xa2, 0x85, 0x7c, 0x9b, 0x29, 0x2d, 0x24, 0x0b, 0x49, 0x6c, 0x71, 0x15, 0xfe, 0x0c, - 0xc1, 0xad, 0x30, 0x4b, 0xb2, 0x98, 0x68, 0x36, 0xa2, 0xce, 0x47, 0x20, 0x89, 0x66, 0xa2, 0x81, - 0xd6, 0x66, 0xd6, 0xaf, 0xdf, 0xbf, 0xe3, 0x3a, 0xad, 0x63, 0x0a, 0x31, 0xee, 0x18, 0xa3, 0xb4, - 0x27, 0x18, 0xef, 0x3e, 0x30, 0x5e, 0xbf, 0xfb, 0xb5, 0x7d, 0xf7, 0xe5, 0xbc, 0x9a, 0x67, 0x94, - 0xbf, 0x5c, 0x32, 0x5a, 0x1d, 0xbe, 0xe1, 0xc3, 0xaf, 0xc3, 0xa2, 0xa4, 0x87, 0x54, 0x52, 0x1e, - 0xd2, 0x20, 0x14, 0x19, 0xd7, 0xf9, 0x09, 0xde, 0xf4, 0x17, 0x8a, 0x70, 0xcf, 0x44, 0xbd, 0x6f, - 0x10, 0xdc, 0x2a, 0x3c, 0xf5, 0x32, 0x29, 0x29, 0xd7, 0x63, 0x43, 0x47, 0x30, 0x67, 0x4d, 0xa8, - 0xe9, 0xe9, 0x1f, 0x33, 0xe0, 0x15, 0xa8, 0xa5, 0x54, 0x32, 0x61, 0x5b, 0xad, 0xea, 0xbb, 0x95, - 0xf7, 0x25, 0x82, 0x56, 0x21, 0x70, 0x27, 0x74, 0x76, 0x69, 0xd4, 0x13, 0x49, 0xc2, 0x94, 0x62, - 0x82, 0xe3, 0x8f, 0x00, 0xc2, 0x62, 0x35, 0x3d, 0xa9, 0x13, 0x24, 0xde, 0xe7, 0x08, 0x6e, 0x17, - 0xaa, 0x1e, 0x66, 0x5a, 0x69, 0xc2, 0x23, 0xc6, 0x07, 0xff, 0x45, 0xe9, 0xbc, 0xaf, 0x11, 0x2c, - 0x15, 0x62, 0x0e, 0x62, 0xa2, 0x86, 0x7b, 0x23, 0xca, 0x35, 0x7e, 0x03, 0xfe, 0x3f, 0x1a, 0x87, - 0x03, 0x57, 0x5c, 0x94, 0x17, 0x77, 0xb1, 0x88, 0xef, 0xe7, 0x61, 0xfc, 0x01, 0xcc, 0x1f, 0x4a, - 0x12, 0x9a, 0x49, 0x76, 0x25, 0xaf, 0x7a, 0x81, 0x66, 0x2a, 0x55, 0xbf, 0x44, 0x9c, 0xc2, 0x31, - 0xac, 0x94, 0xea, 0x94, 0x49, 0x04, 0x34, 0xcf, 0xb8, 0x8a, 0xdd, 0xeb, 0xbc, 0x60, 0xcc, 0x76, - 0x2e, 0x81, 0xec, 0x56, 0x8d, 0x64, 0xbf, 0x3e, 0xba, 0x84, 0xcd, 0xbd, 0xc1, 0x1f, 0x23, 0x98, - 0x7b, 0x8b, 0xd2, 0x7d, 0x21, 0x62, 0x7c, 0x02, 0x0b, 0xe5, 0x30, 0x4d, 0x85, 0x88, 0xa7, 0x77, - 0x52, 0xe5, 0xd4, 0x36, 0xcc, 0xde, 0xef, 0x08, 0x9a, 0xbd, 0xc9, 0xc8, 0x41, 0x4a, 0x79, 0x64, - 0xc7, 0x14, 0x89, 0x71, 0x1d, 0x66, 0x35, 0xd3, 0x31, 0xb5, 0xd3, 0xdd, 0xb7, 0x0b, 0xbc, 0x06, - 0xd7, 0x23, 0xaa, 0x42, 0xc9, 0xd2, 0xf2, 0x90, 0xfc, 0xc9, 0x10, 0xbe, 0x03, 0xd7, 0x24, 0x0d, - 0x59, 0xca, 0x28, 0xd7, 0x76, 0x7c, 0xfa, 0x65, 0x00, 0x87, 0x50, 0x23, 0x49, 0x3e, 0x08, 0xaa, - 0xb9, 0xcd, 0xd5, 0x4b, 0x6d, 0xe6, 0x1e, 0xef, 0x39, 0x8f, 0xeb, 0x2f, 0xe1, 0xd1, 0x1a, 0x74, - 0xd0, 0xdb, 0x37, 0x3e, 0x7d, 0xdc, 0xae, 0x98, 0x4a, 0xff, 0x61, 0xaa, 0xfd, 0x03, 0x82, 0xe5, - 0x5d, 0x1a, 0xd3, 0x41, 0x7e, 0x18, 0x9a, 0x48, 0xcd, 0xf8, 0xe0, 0x1d, 0x7e, 0x98, 0x8f, 0xa7, - 0x54, 0xd2, 0x11, 0x13, 0x66, 0xf0, 0x4f, 0x36, 0xe6, 0xc2, 0x38, 0xec, 0xfa, 0xd2, 0x87, 0x59, - 0xa5, 0xc9, 0x11, 0xbd, 0x92, 0xa6, 0xb4, 0x50, 0xf8, 0x2e, 0xd4, 0x86, 0x94, 0x0d, 0x86, 0xb6, - 0x48, 0xd5, 0xee, 0xd2, 0x9f, 0xa7, 0xed, 0xc5, 0x50, 0x52, 0x33, 0x38, 0x79, 0x60, 0x53, 0xbe, - 0xdb, 0xe2, 0xfd, 0x84, 0x60, 0xd5, 0x79, 0x60, 0x82, 0x17, 0x6e, 0xdc, 0x5d, 0xb2, 0x07, 0xaf, - 0x94, 0x3d, 0x6c, 0x2e, 0x13, 0xaa, 0x94, 0xbb, 0x94, 0x1b, 0xcf, 0x9f, 0x6c, 0xd4, 0x1d, 0xf9, - 0x8e, 0xcd, 0x1c, 0x68, 0x69, 0x46, 0x44, 0xf9, 0x52, 0xba, 0x38, 0x66, 0x50, 0x2b, 0xae, 0xd9, - 0x29, 0xb5, 0xa0, 0x23, 0xd8, 0x9e, 0x77, 0x27, 0x84, 0xbc, 0xef, 0x11, 0xbc, 0xfa, 0xef, 0x5d, - 0xf8, 0x3e, 0xd3, 0xc3, 0x5d, 0x9a, 0x0a, 0xc5, 0xf4, 0x94, 0x1a, 0x72, 0x65, 0xa2, 0x21, 0x4d, - 0xca, 0xad, 0x70, 0x03, 0xe6, 0x22, 0x4b, 0xdc, 0x98, 0xcd, 0x13, 0xe3, 0x65, 0xa9, 0xbd, 0xfb, - 0xf0, 0xdb, 0xb3, 0x16, 0x7a, 0x7a, 0xd6, 0x42, 0xcf, 0xce, 0x5a, 0xe8, 0xb7, 0xb3, 0x16, 0xfa, - 0xe2, 0xbc, 0x55, 0x79, 0x76, 0xde, 0xaa, 0xfc, 0x7c, 0xde, 0xaa, 0x7c, 0xb8, 0xf5, 0xc2, 0xc2, - 0x9c, 0x5c, 0xfc, 0xce, 0xcb, 0xeb, 0xd4, 0xaf, 0xe5, 0xdf, 0x5a, 0x0f, 0xfe, 0x0a, 0x00, 0x00, - 0xff, 0xff, 0x68, 0x12, 0x5a, 0x76, 0x0b, 0x0a, 0x00, 0x00, + 0x17, 0xf7, 0x34, 0x8e, 0x93, 0x4e, 0xbf, 0x4d, 0xbe, 0x4c, 0x9c, 0xd4, 0x71, 0x2b, 0x3b, 0x5a, + 0x89, 0x12, 0xa8, 0xe2, 0x34, 0xed, 0x2d, 0xe2, 0x12, 0x3b, 0x41, 0x70, 0x6a, 0xb4, 0x41, 0x80, + 0xb8, 0xac, 0xc6, 0xbb, 0x2f, 0xf6, 0x28, 0xbb, 0x33, 0xcb, 0xcc, 0xac, 0x93, 0x9e, 0x7b, 0xe0, + 0xc7, 0x09, 0x89, 0x0b, 0xe2, 0x80, 0x72, 0x44, 0x9c, 0xf3, 0x0f, 0x70, 0xab, 0x38, 0x95, 0x5e, + 0x40, 0x1c, 0x02, 0x4a, 0x2e, 0x88, 0xbf, 0x02, 0xcd, 0xce, 0x78, 0xed, 0x40, 0x88, 0x7a, 0x88, + 0xc5, 0xc9, 0x9e, 0xf7, 0x66, 0x3f, 0x3f, 0xde, 0xbc, 0x7d, 0xb3, 0xb8, 0x15, 0x0a, 0x95, 0x08, + 0xb5, 0x1e, 0x31, 0xa5, 0x25, 0xeb, 0x66, 0x9a, 0x09, 0xbe, 0x3e, 0xd8, 0xe8, 0x82, 0xa6, 0x1b, + 0x17, 0x82, 0xad, 0x54, 0x0a, 0x2d, 0xc8, 0x5d, 0xbb, 0xbf, 0x75, 0x21, 0xe5, 0xf6, 0xd7, 0xab, + 0x3d, 0xd1, 0x13, 0xf9, 0xbe, 0x75, 0xf3, 0xcf, 0x3e, 0x52, 0x6f, 0x38, 0x8a, 0x2e, 0x55, 0x50, + 0x40, 0x87, 0x82, 0x39, 0xc8, 0xfa, 0xb2, 0xcd, 0x07, 0xf6, 0x41, 0x87, 0x9f, 0x2f, 0xbc, 0x4f, + 0xa7, 0x70, 0x65, 0x97, 0x4a, 0x9a, 0x28, 0x42, 0xf1, 0xed, 0x50, 0x24, 0x49, 0xc6, 0x99, 0x7e, + 0x1a, 0x68, 0x7a, 0x54, 0x43, 0x2b, 0x68, 0xf5, 0x66, 0xfb, 0xed, 0xe7, 0xa7, 0xcd, 0xd2, 0xaf, + 0xa7, 0xcd, 0xfb, 0x3d, 0xa6, 0xfb, 0x59, 0xb7, 0x15, 0x8a, 0xc4, 0x41, 0xb8, 0x9f, 0x35, 0x15, + 0x1d, 0xac, 0xeb, 0xa7, 0x29, 0xa8, 0xd6, 0x36, 0x84, 0x2f, 0x4f, 0xd6, 0xb0, 0x63, 0xd8, 0x86, + 0xd0, 0xff, 0x5f, 0x01, 0xf9, 0x3e, 0x3d, 0x22, 0x1c, 0x57, 0x8d, 0x46, 0x23, 0x24, 0x15, 0x0a, + 0x64, 0x20, 0xe1, 0x90, 0xca, 0xa8, 0x76, 0xe3, 0x1a, 0x98, 0x88, 0x41, 0xde, 0x75, 0xc0, 0x7e, + 0x8e, 0x4b, 0x52, 0xbc, 0xd8, 0x15, 0x3c, 0x53, 0xff, 0x20, 0x9c, 0xba, 0x06, 0xc2, 0x85, 0x1c, + 0xfa, 0x6f, 0x8c, 0x8f, 0xf0, 0xe2, 0x21, 0xd3, 0xfd, 0x48, 0xd2, 0xc3, 0x80, 0x46, 0x91, 0x0c, + 0x80, 0xd3, 0x6e, 0x0c, 0x51, 0xad, 0xbc, 0x82, 0x56, 0x67, 0xfd, 0x85, 0x61, 0x72, 0x2b, 0x8a, + 0xe4, 0x8e, 0x4d, 0x6d, 0x96, 0xbf, 0x3e, 0x6e, 0x96, 0xbc, 0x9f, 0x10, 0xae, 0x7f, 0x40, 0x63, + 0x16, 0x51, 0x2d, 0xe4, 0xbb, 0x4c, 0x69, 0x21, 0x59, 0x48, 0x63, 0x8b, 0xab, 0xc8, 0xe7, 0x08, + 0xdf, 0x09, 0xb3, 0x24, 0x8b, 0xa9, 0x66, 0x03, 0x70, 0x3e, 0x02, 0x49, 0x35, 0x13, 0x35, 0xb4, + 0x32, 0xb5, 0x7a, 0xeb, 0xd1, 0x3d, 0xd7, 0x69, 0x2d, 0x53, 0x88, 0x61, 0xc7, 0x18, 0xa5, 0x1d, + 0xc1, 0x78, 0xfb, 0xb1, 0xf1, 0xfa, 0xfd, 0x6f, 0xcd, 0x07, 0xaf, 0xe6, 0xd5, 0x3c, 0xa3, 0xfc, + 0xc5, 0x11, 0xa3, 0xd5, 0xe1, 0x1b, 0x3e, 0xf2, 0x06, 0x9e, 0x97, 0xb0, 0x0f, 0x12, 0x78, 0x08, + 0x41, 0x28, 0x32, 0xae, 0xf3, 0x13, 0xbc, 0xed, 0xcf, 0x15, 0xe1, 0x8e, 0x89, 0x7a, 0xdf, 0x22, + 0x7c, 0xa7, 0xf0, 0xd4, 0xc9, 0xa4, 0x04, 0xae, 0x87, 0x86, 0x0e, 0xf0, 0x8c, 0x35, 0xa1, 0x26, + 0xa7, 0x7f, 0xc8, 0x40, 0x96, 0x70, 0x25, 0x05, 0xc9, 0x84, 0x6d, 0xb5, 0xb2, 0xef, 0x56, 0xde, + 0x57, 0x08, 0x37, 0x0a, 0x81, 0x5b, 0xa1, 0xb3, 0x0b, 0x51, 0x47, 0x24, 0x09, 0x53, 0x8a, 0x09, + 0x4e, 0x3e, 0xc1, 0x38, 0x2c, 0x56, 0x93, 0x93, 0x3a, 0x46, 0xe2, 0x7d, 0x81, 0xf0, 0xdd, 0x42, + 0xd5, 0x93, 0x4c, 0x2b, 0x4d, 0x79, 0xc4, 0x78, 0xef, 0xbf, 0x28, 0x9d, 0xf7, 0x0d, 0xc2, 0x0b, + 0x85, 0x98, 0xbd, 0x98, 0xaa, 0xfe, 0xce, 0x00, 0xb8, 0x26, 0x6f, 0xe2, 0xff, 0x0f, 0x86, 0xe1, + 0xc0, 0x15, 0x17, 0xe5, 0xc5, 0x9d, 0x2f, 0xe2, 0xbb, 0x79, 0x98, 0x7c, 0x84, 0x67, 0xf7, 0x25, + 0x0d, 0xcd, 0x24, 0xbb, 0x96, 0x57, 0xbd, 0x40, 0x33, 0x95, 0xaa, 0x5e, 0x22, 0x4e, 0x91, 0x18, + 0x2f, 0x8d, 0xd4, 0x29, 0x93, 0x08, 0x20, 0xcf, 0xb8, 0x8a, 0x3d, 0x6c, 0x5d, 0x31, 0x66, 0x5b, + 0x97, 0x40, 0xb6, 0xcb, 0x46, 0xb2, 0x5f, 0x1d, 0x5c, 0xc2, 0xe6, 0xde, 0xe0, 0x67, 0x08, 0xcf, + 0xbc, 0x03, 0xb0, 0x2b, 0x44, 0x4c, 0x8e, 0xf0, 0xdc, 0x68, 0x98, 0xa6, 0x42, 0xc4, 0x93, 0x3b, + 0xa9, 0xd1, 0xd4, 0x36, 0xcc, 0xde, 0xb3, 0x1b, 0xb8, 0xde, 0x19, 0x8f, 0xec, 0xa5, 0xc0, 0x23, + 0x3b, 0xa6, 0x68, 0x4c, 0xaa, 0x78, 0x5a, 0x33, 0x1d, 0x83, 0x9d, 0xee, 0xbe, 0x5d, 0x90, 0x15, + 0x7c, 0x2b, 0x02, 0x15, 0x4a, 0x96, 0x8e, 0x0e, 0xc9, 0x1f, 0x0f, 0x91, 0x7b, 0xf8, 0xa6, 0x84, + 0x90, 0xa5, 0x0c, 0xb8, 0xb6, 0xe3, 0xd3, 0x1f, 0x05, 0x48, 0x88, 0x2b, 0x34, 0xc9, 0x07, 0x41, + 0x39, 0xb7, 0xb9, 0x7c, 0xa9, 0xcd, 0xdc, 0xe3, 0x43, 0xe7, 0x71, 0xf5, 0x15, 0x3c, 0x5a, 0x83, + 0x0e, 0x7a, 0xf3, 0xad, 0xcf, 0x8e, 0x9b, 0x25, 0x53, 0xe9, 0x3f, 0x8e, 0x9b, 0xa5, 0x1f, 0x4f, + 0xd6, 0xea, 0x8e, 0xa3, 0x27, 0x06, 0x63, 0x14, 0x5c, 0x03, 0xd7, 0xde, 0x0f, 0x08, 0x2f, 0x6e, + 0x43, 0x0c, 0xbd, 0xfc, 0xa8, 0x34, 0x95, 0x9a, 0xf1, 0xde, 0x7b, 0x7c, 0x3f, 0x1f, 0x5e, 0xa9, + 0x84, 0x01, 0x13, 0xe6, 0x5a, 0x18, 0x6f, 0xdb, 0xb9, 0x61, 0xd8, 0x75, 0xad, 0x8f, 0xa7, 0x95, + 0xa6, 0x07, 0x70, 0x2d, 0x2d, 0x6b, 0xa1, 0xc8, 0x03, 0x5c, 0xe9, 0x03, 0xeb, 0xf5, 0x6d, 0x09, + 0xcb, 0xed, 0x85, 0x3f, 0x4f, 0x9b, 0xf3, 0xa1, 0x04, 0x33, 0x56, 0x79, 0x60, 0x53, 0xbe, 0xdb, + 0xe2, 0xfd, 0x8c, 0xf0, 0xb2, 0xf3, 0xc0, 0x04, 0x2f, 0xdc, 0xb8, 0x9b, 0x66, 0x07, 0xbf, 0x36, + 0xea, 0x70, 0x73, 0xd5, 0x80, 0x52, 0xee, 0xca, 0xae, 0xbd, 0x3c, 0x59, 0xab, 0x3a, 0xf2, 0x2d, + 0x9b, 0xd9, 0xd3, 0xd2, 0x0c, 0x90, 0xd1, 0x2b, 0xeb, 0xe2, 0x84, 0xe1, 0x4a, 0x71, 0x09, 0x4f, + 0xa8, 0x41, 0x1d, 0xc1, 0xe6, 0xac, 0x3b, 0x3f, 0x64, 0x9c, 0xbd, 0xfe, 0xef, 0x3d, 0xfa, 0x21, + 0xd3, 0xfd, 0x6d, 0x48, 0x85, 0x62, 0x7a, 0x42, 0xed, 0xba, 0x34, 0xd6, 0xae, 0x26, 0xe5, 0x56, + 0xa4, 0x86, 0x67, 0x22, 0x4b, 0x5c, 0x9b, 0xce, 0x13, 0xc3, 0xe5, 0xe6, 0xfd, 0xa1, 0xf6, 0xab, + 0xfb, 0xae, 0xfd, 0xe4, 0xbb, 0xb3, 0x06, 0x7a, 0x7e, 0xd6, 0x40, 0x2f, 0xce, 0x1a, 0xe8, 0xf7, + 0xb3, 0x06, 0xfa, 0xf2, 0xbc, 0x51, 0x7a, 0x71, 0xde, 0x28, 0xfd, 0x72, 0xde, 0x28, 0x7d, 0xbc, + 0x71, 0x65, 0xd9, 0x8e, 0x2e, 0x7e, 0x23, 0xe6, 0x55, 0xec, 0x56, 0xf2, 0xef, 0xb4, 0xc7, 0x7f, + 0x05, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x8d, 0xa6, 0x48, 0x47, 0x0a, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/distribution/types/expected_keepers.go b/x/distribution/types/expected_keepers.go index 983a1673daaf..82eee3eabef4 100644 --- a/x/distribution/types/expected_keepers.go +++ b/x/distribution/types/expected_keepers.go @@ -20,8 +20,7 @@ type AccountKeeper interface { // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error @@ -37,45 +36,21 @@ type StakingKeeper interface { IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) - // iterate through bonded validators by operator address, execute func for each validator - IterateBondedValidatorsByPower(sdk.Context, - func(index int64, validator stakingtypes.ValidatorI) (stop bool)) - - // iterate through the consensus validator set of the last block by operator address, execute func for each validator - IterateLastValidators(sdk.Context, - func(index int64, validator stakingtypes.ValidatorI) (stop bool)) - Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI // get a particular validator by operator address ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI // get a particular validator by consensus address - // slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction - Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) sdk.Int - Jail(sdk.Context, sdk.ConsAddress) // jail a validator - Unjail(sdk.Context, sdk.ConsAddress) // unjail a validator - // Delegation allows for getting a particular delegation for a given validator // and delegator outside the scope of the staking module. Delegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) stakingtypes.DelegationI - // MaxValidators returns the maximum amount of bonded validators - MaxValidators(sdk.Context) uint32 - IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) - GetLastTotalPower(ctx sdk.Context) sdk.Int - GetLastValidatorPower(ctx sdk.Context, valAddr sdk.ValAddress) int64 - GetAllSDKDelegations(ctx sdk.Context) []stakingtypes.Delegation } // StakingHooks event hooks for staking validator object (noalias) type StakingHooks interface { - AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) // Must be called when a validator is created - AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) // Must be called when a validator is deleted - - BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) // Must be called when a delegation is created - BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) // Must be called when a delegation's shares are modified + AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) // Must be called when a validator is created AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) - BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) } diff --git a/x/distribution/types/fee_pool_test.go b/x/distribution/types/fee_pool_test.go index de774ca3cc0f..7eabc04d0bfa 100644 --- a/x/distribution/types/fee_pool_test.go +++ b/x/distribution/types/fee_pool_test.go @@ -10,7 +10,6 @@ import ( ) func TestValidateGenesis(t *testing.T) { - fp := types.InitialFeePool() require.Nil(t, fp.ValidateGenesis()) diff --git a/x/distribution/types/genesis.go b/x/distribution/types/genesis.go index 3aa251bba997..9ceb0737a13e 100644 --- a/x/distribution/types/genesis.go +++ b/x/distribution/types/genesis.go @@ -10,7 +10,6 @@ func NewGenesisState( acc []ValidatorAccumulatedCommissionRecord, historical []ValidatorHistoricalRewardsRecord, cur []ValidatorCurrentRewardsRecord, dels []DelegatorStartingInfoRecord, slashes []ValidatorSlashEventRecord, ) *GenesisState { - return &GenesisState{ Params: params, FeePool: fp, diff --git a/x/distribution/types/query.go b/x/distribution/types/query.go index caaf2b7860be..ef3d34ceae5a 100644 --- a/x/distribution/types/query.go +++ b/x/distribution/types/query.go @@ -15,8 +15,7 @@ type QueryDelegatorTotalRewardsResponse struct { } // NewQueryDelegatorTotalRewardsResponse constructs a QueryDelegatorTotalRewardsResponse -func NewQueryDelegatorTotalRewardsResponse(rewards []DelegationDelegatorReward, - total sdk.DecCoins) QueryDelegatorTotalRewardsResponse { +func NewQueryDelegatorTotalRewardsResponse(rewards []DelegationDelegatorReward, total sdk.DecCoins) QueryDelegatorTotalRewardsResponse { return QueryDelegatorTotalRewardsResponse{Rewards: rewards, Total: total} } @@ -34,7 +33,6 @@ func (res QueryDelegatorTotalRewardsResponse) String() string { // NewDelegationDelegatorReward constructs a DelegationDelegatorReward. //nolint:interfacer -func NewDelegationDelegatorReward(valAddr sdk.ValAddress, - reward sdk.DecCoins) DelegationDelegatorReward { +func NewDelegationDelegatorReward(valAddr sdk.ValAddress, reward sdk.DecCoins) DelegationDelegatorReward { return DelegationDelegatorReward{ValidatorAddress: valAddr.String(), Reward: reward} } diff --git a/x/epoching/spec/03_to_improve.md b/x/epoching/spec/03_to_improve.md index 4794faafc292..7215629769d0 100644 --- a/x/epoching/spec/03_to_improve.md +++ b/x/epoching/spec/03_to_improve.md @@ -35,7 +35,7 @@ In this case, unbonding should start instantly. // — the simulator should check that the sum of all the queued delegations always equals the amount kept track in the data // — Staking/Slashing/Distribution module params are being modified by governance based on vote result instantly. We should test the effect. // — — Should test to see what would happen if max_validators is changed though, in the middle of an epoch -// — we should define some new invariants that help check that everything is working smoothly with these new changes for 3 modules e.g. https://github.com/cosmos/cosmos-sdk/blob/master/x/staking/keeper/invariants.go +// — we should define some new invariants that help check that everything is working smoothly with these new changes for 3 modules e.g. https://github.com/cosmos/cosmos-sdk/blob/main/x/staking/keeper/invariants.go // — — Within Epoch, ValidationPower = ValidationPower - SlashAmount // — — When epoch actions queue is empty, EpochDelegationPool balance should be zero // — we should count all the delegation changes that happen during the epoch, and then make sure that the resulting change at the end of the epoch is actually correct diff --git a/x/evidence/client/cli/query.go b/x/evidence/client/cli/query.go index 9c987fb15e36..bf74325f949f 100644 --- a/x/evidence/client/cli/query.go +++ b/x/evidence/client/cli/query.go @@ -74,7 +74,6 @@ func queryEvidence(clientCtx client.Context, hash string) error { params := &types.QueryEvidenceRequest{EvidenceHash: decodedHash} res, err := queryClient.Evidence(context.Background(), params) - if err != nil { return err } diff --git a/x/evidence/client/testutil/cli_test.go b/x/evidence/client/testutil/cli_test.go index dd36a6af2d3e..1035ca750264 100644 --- a/x/evidence/client/testutil/cli_test.go +++ b/x/evidence/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/evidence/keeper/grpc_query.go b/x/evidence/keeper/grpc_query.go index f084c16717a0..06764fc97a64 100644 --- a/x/evidence/keeper/grpc_query.go +++ b/x/evidence/keeper/grpc_query.go @@ -79,7 +79,6 @@ func (k Keeper) AllEvidence(c context.Context, req *types.QueryAllEvidenceReques evidence = append(evidence, evidenceAny) return nil }) - if err != nil { return &types.QueryAllEvidenceResponse{}, err } diff --git a/x/evidence/keeper/grpc_query_test.go b/x/evidence/keeper/grpc_query_test.go index df760c8edfe0..b6856f19c654 100644 --- a/x/evidence/keeper/grpc_query_test.go +++ b/x/evidence/keeper/grpc_query_test.go @@ -80,9 +80,7 @@ func (suite *KeeperTestSuite) TestQueryEvidence() { } func (suite *KeeperTestSuite) TestQueryAllEvidence() { - var ( - req *types.QueryAllEvidenceRequest - ) + var req *types.QueryAllEvidenceRequest testCases := []struct { msg string diff --git a/x/evidence/keeper/keeper.go b/x/evidence/keeper/keeper.go index 366f46b83182..cbab55320d3a 100644 --- a/x/evidence/keeper/keeper.go +++ b/x/evidence/keeper/keeper.go @@ -30,7 +30,6 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, stakingKeeper types.StakingKeeper, slashingKeeper types.SlashingKeeper, ) *Keeper { - return &Keeper{ cdc: cdc, storeKey: storeKey, diff --git a/x/evidence/migrations/v038/types.go b/x/evidence/migrations/v038/types.go deleted file mode 100644 index 246754cf122f..000000000000 --- a/x/evidence/migrations/v038/types.go +++ /dev/null @@ -1,116 +0,0 @@ -// Package v038 is used for legacy migration scripts. Actual migration scripts -// for v038 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -package v038 - -import ( - "fmt" - "time" - - "github.com/tendermint/tendermint/crypto/tmhash" - tmbytes "github.com/tendermint/tendermint/libs/bytes" - "sigs.k8s.io/yaml" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// Default parameter values -const ( - ModuleName = "evidence" - DefaultParamspace = ModuleName - DefaultMaxEvidenceAge = 60 * 2 * time.Second -) - -// Evidence type constants -const ( - RouteEquivocation = "equivocation" - TypeEquivocation = "equivocation" -) - -var ( - amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/evidence module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding as Amino is - // still used for that purpose. - // - // The actual codec used for serialization should be provided to x/evidence and - // defined at the application level. - ModuleCdc = codec.NewAminoCodec(amino) -) - -// Evidence defines the contract which concrete evidence types of misbehavior -// must implement. -type Evidence interface { - Route() string - Type() string - String() string - Hash() tmbytes.HexBytes - ValidateBasic() error - - // Height at which the infraction occurred - GetHeight() int64 -} - -// Params defines the total set of parameters for the evidence module -type Params struct { - MaxEvidenceAge time.Duration `json:"max_evidence_age" yaml:"max_evidence_age"` -} - -// GenesisState defines the evidence module's genesis state. -type GenesisState struct { - Params Params `json:"params" yaml:"params"` - Evidence []Evidence `json:"evidence" yaml:"evidence"` -} - -// Assert interface implementation. -var _ Evidence = Equivocation{} - -// Equivocation implements the Evidence interface and defines evidence of double -// signing misbehavior. -type Equivocation struct { - Height int64 `json:"height" yaml:"height"` - Time time.Time `json:"time" yaml:"time"` - Power int64 `json:"power" yaml:"power"` - ConsensusAddress sdk.ConsAddress `json:"consensus_address" yaml:"consensus_address"` -} - -// Route returns the Evidence Handler route for an Equivocation type. -func (e Equivocation) Route() string { return RouteEquivocation } - -// Type returns the Evidence Handler type for an Equivocation type. -func (e Equivocation) Type() string { return TypeEquivocation } - -func (e Equivocation) String() string { - bz, _ := yaml.Marshal(e) - return string(bz) -} - -// Hash returns the hash of an Equivocation object. -func (e Equivocation) Hash() tmbytes.HexBytes { - return tmhash.Sum(ModuleCdc.LegacyAmino.MustMarshal(e)) -} - -// ValidateBasic performs basic stateless validation checks on an Equivocation object. -func (e Equivocation) ValidateBasic() error { - if e.Time.Unix() <= 0 { - return fmt.Errorf("invalid equivocation time: %s", e.Time) - } - if e.Height < 1 { - return fmt.Errorf("invalid equivocation height: %d", e.Height) - } - if e.Power < 1 { - return fmt.Errorf("invalid equivocation validator power: %d", e.Power) - } - if e.ConsensusAddress.Empty() { - return fmt.Errorf("invalid equivocation validator consensus address: %s", e.ConsensusAddress) - } - - return nil -} - -// GetHeight returns the height at time of the Equivocation infraction. -func (e Equivocation) GetHeight() int64 { - return e.Height -} diff --git a/x/evidence/migrations/v040/migrate.go b/x/evidence/migrations/v040/migrate.go deleted file mode 100644 index 1ddb1ac6f238..000000000000 --- a/x/evidence/migrations/v040/migrate.go +++ /dev/null @@ -1,48 +0,0 @@ -package v040 - -import ( - "fmt" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - v038evidence "github.com/cosmos/cosmos-sdk/x/evidence/migrations/v038" - v040evidence "github.com/cosmos/cosmos-sdk/x/evidence/types" -) - -func migrateEvidence(oldEvidence v038evidence.Evidence) *codectypes.Any { - switch oldEvidence := oldEvidence.(type) { - case v038evidence.Equivocation: - { - newEquivocation := &v040evidence.Equivocation{ - Height: oldEvidence.Height, - Time: oldEvidence.Time, - Power: oldEvidence.Power, - ConsensusAddress: oldEvidence.ConsensusAddress.String(), - } - any, err := codectypes.NewAnyWithValue(newEquivocation) - if err != nil { - panic(err) - } - - return any - } - default: - panic(fmt.Errorf("'%T' is not a valid evidence type", oldEvidence)) - } -} - -// Migrate accepts exported v0.38 x/evidence genesis state and migrates it to -// v0.40 x/evidence genesis state. The migration includes: -// -// - Removing the `Params` field. -// - Converting Equivocations into Anys. -// - Re-encode in v0.40 GenesisState. -func Migrate(evidenceState v038evidence.GenesisState) *v040evidence.GenesisState { - var newEvidences = make([]*codectypes.Any, len(evidenceState.Evidence)) - for i, oldEvidence := range evidenceState.Evidence { - newEvidences[i] = migrateEvidence(oldEvidence) - } - - return &v040evidence.GenesisState{ - Evidence: newEvidences, - } -} diff --git a/x/evidence/migrations/v040/migrate_test.go b/x/evidence/migrations/v040/migrate_test.go deleted file mode 100644 index aba5b81f9185..000000000000 --- a/x/evidence/migrations/v040/migrate_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package v040_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - v038evidence "github.com/cosmos/cosmos-sdk/x/evidence/migrations/v038" - v040evidence "github.com/cosmos/cosmos-sdk/x/evidence/migrations/v040" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithCodec(encodingConfig.Codec) - - addr1, _ := sdk.AccAddressFromBech32("cosmos1xxkueklal9vejv9unqu80w9vptyepfa95pd53u") - - evidenceGenState := v038evidence.GenesisState{ - Params: v038evidence.Params{MaxEvidenceAge: v038evidence.DefaultMaxEvidenceAge}, - Evidence: []v038evidence.Evidence{v038evidence.Equivocation{ - Height: 20, - Power: 100, - ConsensusAddress: addr1.Bytes(), - }}, - } - - migrated := v040evidence.Migrate(evidenceGenState) - expected := `{"evidence":[{"@type":"/cosmos.evidence.v1beta1.Equivocation","height":"20","time":"0001-01-01T00:00:00Z","power":"100","consensus_address":"cosmosvalcons1xxkueklal9vejv9unqu80w9vptyepfa99x2a3w"}]}` - - bz, err := clientCtx.Codec.MarshalJSON(migrated) - require.NoError(t, err) - require.Equal(t, expected, string(bz)) -} diff --git a/x/evidence/migrations/v040/types.go b/x/evidence/migrations/v040/types.go deleted file mode 100644 index 41556b96b81c..000000000000 --- a/x/evidence/migrations/v040/types.go +++ /dev/null @@ -1,6 +0,0 @@ -package v040 - -// Default parameter values -const ( - ModuleName = "evidence" -) diff --git a/x/evidence/module.go b/x/evidence/module.go index 2d65ef8ead8a..d160dd19767c 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -71,11 +70,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return gs.Validate() } -// RegisterRESTRoutes registers the evidence module's REST service handlers. -// Deprecated: RegisterRESTRoutes is deprecated. `x/evidence` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the evidence module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -176,12 +170,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, req, am.keeper) } -// EndBlock executes all ABCI EndBlock logic respective to the evidence module. It -// returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the evidence module. diff --git a/x/evidence/simulation/genesis_test.go b/x/evidence/simulation/genesis_test.go index 8cfa086adc97..4999015bfd67 100644 --- a/x/evidence/simulation/genesis_test.go +++ b/x/evidence/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -30,7 +31,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/evidence/spec/README.md b/x/evidence/spec/README.md index dd72780164e7..a6b3d92054d1 100644 --- a/x/evidence/spec/README.md +++ b/x/evidence/spec/README.md @@ -20,7 +20,7 @@ parent: ## Abstract -`x/evidence` is an implementation of a Cosmos SDK module, per [ADR 009](./../../../docs/architecture/adr-009-evidence-module.md), +`x/evidence` is an implementation of a Cosmos SDK module, per [ADR 009](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-009-evidence-module.md), that allows for the submission and handling of arbitrary evidence of misbehavior such as equivocation and counterfactual signing. diff --git a/x/evidence/types/genesis.go b/x/evidence/types/genesis.go index b274ea20714f..c7a8b1041e67 100644 --- a/x/evidence/types/genesis.go +++ b/x/evidence/types/genesis.go @@ -37,7 +37,7 @@ func DefaultGenesisState() *GenesisState { } } -// Validate performs basic gensis state validation returning an error upon any +// Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { for _, e := range gs.Evidence { diff --git a/x/evidence/types/genesis_test.go b/x/evidence/types/genesis_test.go index 339696c82e1f..d2b3e655db11 100644 --- a/x/evidence/types/genesis_test.go +++ b/x/evidence/types/genesis_test.go @@ -22,9 +22,7 @@ func TestDefaultGenesisState(t *testing.T) { } func TestNewGenesisState(t *testing.T) { - var ( - evidence []exported.Evidence - ) + var evidence []exported.Evidence testCases := []struct { msg string @@ -126,7 +124,7 @@ func TestGenesisStateValidate(t *testing.T) { } func TestUnpackInterfaces(t *testing.T) { - var gs = types.GenesisState{ + gs := types.GenesisState{ Evidence: []*codectypes.Any{{}}, } @@ -149,7 +147,6 @@ func TestUnpackInterfaces(t *testing.T) { for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.msg), func(t *testing.T) { - if tc.expPass { require.NoError(t, gs.UnpackInterfaces(tc.unpacker)) } else { diff --git a/x/evidence/types/msgs.go b/x/evidence/types/msgs.go index 94a7546167ee..89b0d414d05d 100644 --- a/x/evidence/types/msgs.go +++ b/x/evidence/types/msgs.go @@ -2,6 +2,7 @@ package types import ( "fmt" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/feegrant/basic_fee.go b/x/feegrant/basic_fee.go index 703b509b3a68..81419b6d5764 100644 --- a/x/feegrant/basic_fee.go +++ b/x/feegrant/basic_fee.go @@ -25,7 +25,7 @@ func (a *BasicAllowance) Accept(ctx sdk.Context, fee sdk.Coins, _ []sdk.Msg) (bo } if a.SpendLimit != nil { - left, invalid := a.SpendLimit.SafeSub(fee) + left, invalid := a.SpendLimit.SafeSub(fee...) if invalid { return false, sdkerrors.Wrap(ErrFeeLimitExceeded, "basic allowance") } diff --git a/x/feegrant/client/cli/query.go b/x/feegrant/client/cli/query.go index 66e26b328e18..ba01417167c7 100644 --- a/x/feegrant/client/cli/query.go +++ b/x/feegrant/client/cli/query.go @@ -67,7 +67,6 @@ $ %s query feegrant grant [granter] [grantee] Grantee: granteeAddr.String(), }, ) - if err != nil { return err } @@ -84,14 +83,14 @@ $ %s query feegrant grant [granter] [grantee] // GetCmdQueryFeeGrantsByGrantee returns cmd to query for all grants for a grantee. func GetCmdQueryFeeGrantsByGrantee() *cobra.Command { cmd := &cobra.Command{ - Use: "grants [grantee]", + Use: "grants-by-grantee [grantee]", Args: cobra.ExactArgs(1), Short: "Query all grants of a grantee", Long: strings.TrimSpace( fmt.Sprintf(`Queries all the grants for a grantee address. Example: -$ %s query feegrant grants [grantee] +$ %s query feegrant grants-by-grantee [grantee] `, version.AppName), ), RunE: func(cmd *cobra.Command, args []string) error { @@ -115,7 +114,6 @@ $ %s query feegrant grants [grantee] Pagination: pageReq, }, ) - if err != nil { return err } @@ -133,14 +131,14 @@ $ %s query feegrant grants [grantee] // GetCmdQueryFeeGrantsByGranter returns cmd to query for all grants by a granter. func GetCmdQueryFeeGrantsByGranter() *cobra.Command { cmd := &cobra.Command{ - Use: "grants [granter]", + Use: "grants-by-granter [granter]", Args: cobra.ExactArgs(1), Short: "Query all grants by a granter", Long: strings.TrimSpace( fmt.Sprintf(`Queries all the grants issued for a granter address. Example: -$ %s query feegrant grants [granter] +$ %s query feegrant grants-by-granter [granter] `, version.AppName), ), RunE: func(cmd *cobra.Command, args []string) error { @@ -164,7 +162,6 @@ $ %s query feegrant grants [granter] Pagination: pageReq, }, ) - if err != nil { return err } diff --git a/x/feegrant/client/cli/tx.go b/x/feegrant/client/cli/tx.go index 38cd58a1a2f6..12a90194ee0b 100644 --- a/x/feegrant/client/cli/tx.go +++ b/x/feegrant/client/cli/tx.go @@ -63,7 +63,6 @@ Examples: ), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - cmd.Flags().Set(flags.FlagFrom, args[0]) clientCtx, err := client.GetClientTxContext(cmd) if err != nil { diff --git a/x/feegrant/client/testutil/suite.go b/x/feegrant/client/testutil/suite.go index dc2acc3cd63c..06042e9b5f7c 100644 --- a/x/feegrant/client/testutil/suite.go +++ b/x/feegrant/client/testutil/suite.go @@ -316,7 +316,7 @@ func (s *IntegrationTestSuite) TestNewCmdFeeGrant() { alreadyExistedGrantee := s.addedGrantee clientCtx := val.ClientCtx - fromAddr, fromName, _, err := client.GetFromFields(clientCtx.Keyring, granter.String(), clientCtx.GenerateOnly) + fromAddr, fromName, _, err := client.GetFromFields(clientCtx, clientCtx.Keyring, granter.String()) s.Require().Equal(fromAddr, granter) s.Require().NoError(err) @@ -663,7 +663,7 @@ func (s *IntegrationTestSuite) TestNewCmdRevokeFeegrant() { }, commonFlags..., ), - false, 4, &sdk.TxResponse{}, + false, 38, &sdk.TxResponse{}, }, { "Valid revoke", @@ -750,17 +750,55 @@ func (s *IntegrationTestSuite) TestTxWithFeeGrant() { _, err = s.network.WaitForHeight(1) s.Require().NoError(err) - // granted fee allowance for an account which is not in state and creating - // any tx with it by using --fee-account shouldn't fail - out, err := govtestutil.MsgSubmitLegacyProposal(val.ClientCtx, grantee.String(), - "Text Proposal", "No desc", govv1beta1.ProposalTypeText, - fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String()), - ) + testcases := []struct { + name string + from string + flags []string + expErrCode uint32 + }{ + { + name: "granted fee allowance for an account which is not in state and creating any tx with it by using --fee-granter shouldn't fail", + from: grantee.String(), + flags: []string{fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String())}, + }, + { + name: "--fee-payer should also sign the tx (direct)", + from: grantee.String(), + flags: []string{fmt.Sprintf("--%s=%s", flags.FlagFeePayer, granter.String())}, + expErrCode: 4, + }, + { + name: "--fee-payer should also sign the tx (amino-json)", + from: grantee.String(), + flags: []string{ + fmt.Sprintf("--%s=%s", flags.FlagFeePayer, granter.String()), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + }, + expErrCode: 4, + }, + { + name: "use --fee-payer and --fee-granter together works", + from: grantee.String(), + flags: []string{ + fmt.Sprintf("--%s=%s", flags.FlagFeePayer, grantee.String()), + fmt.Sprintf("--%s=%s", flags.FlagFeeGranter, granter.String())}, + }, + } + + for _, tc := range testcases { + s.Run(tc.name, func() { + out, err := govtestutil.MsgSubmitLegacyProposal(val.ClientCtx, tc.from, + "Text Proposal", "No desc", govv1beta1.ProposalTypeText, + tc.flags..., + ) + s.Require().NoError(err) + + var resp sdk.TxResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) + s.Require().Equal(tc.expErrCode, resp.Code, resp) + }) + } - s.Require().NoError(err) - var resp sdk.TxResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) - s.Require().Equal(uint32(0), resp.Code) } func (s *IntegrationTestSuite) TestFilteredFeeAllowance() { diff --git a/x/feegrant/doc.go b/x/feegrant/doc.go index 514d079c074d..b0e2029ce359 100644 --- a/x/feegrant/doc.go +++ b/x/feegrant/doc.go @@ -5,7 +5,7 @@ fees from one account (key) to another account (key). Effectively, this allows for a user to pay fees using the balance of an account different from their own. Example use cases would be allowing a key on a device to pay for fees using a master wallet, or a third party service allowing users to -pay for transactions without ever really holding their own tokens. This package +pay for transactions without ever really holding their own coins. This package provides ways for specifying fee allowances such that authorizing fee payment to another account can be done with clear and safe restrictions. diff --git a/x/feegrant/feegrant.pb.go b/x/feegrant/feegrant.pb.go index 5d764e84b2a9..42d6b0f03982 100644 --- a/x/feegrant/feegrant.pb.go +++ b/x/feegrant/feegrant.pb.go @@ -32,11 +32,11 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// BasicAllowance implements Allowance with a one-time grant of tokens +// BasicAllowance implements Allowance with a one-time grant of coins // that optionally expires. The grantee can use up to SpendLimit to cover fees. type BasicAllowance struct { - // spend_limit specifies the maximum amount of tokens that can be spent - // by this allowance and will be updated as tokens are spent. If it is + // spend_limit specifies the maximum amount of coins that can be spent + // by this allowance and will be updated as coins are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. SpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"spend_limit"` // expiration specifies an optional time when this allowance expires diff --git a/x/feegrant/filtered_fee.go b/x/feegrant/filtered_fee.go index aeef392feb46..74255757fcfb 100644 --- a/x/feegrant/filtered_fee.go +++ b/x/feegrant/filtered_fee.go @@ -16,8 +16,10 @@ const ( gasCostPerIteration = uint64(10) ) -var _ FeeAllowanceI = (*AllowedMsgAllowance)(nil) -var _ types.UnpackInterfacesMessage = (*AllowedMsgAllowance)(nil) +var ( + _ FeeAllowanceI = (*AllowedMsgAllowance)(nil) + _ types.UnpackInterfacesMessage = (*AllowedMsgAllowance)(nil) +) // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (a *AllowedMsgAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error { diff --git a/x/feegrant/grant.go b/x/feegrant/grant.go index a51e65ab5e1d..f8d7823ff06a 100644 --- a/x/feegrant/grant.go +++ b/x/feegrant/grant.go @@ -8,9 +8,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -var ( - _ types.UnpackInterfacesMessage = &Grant{} -) +var _ types.UnpackInterfacesMessage = &Grant{} // NewGrant creates a new FeeAllowanceGrant. //nolint:interfacer diff --git a/x/feegrant/keeper/grpc_query.go b/x/feegrant/keeper/grpc_query.go index 87278c4c59af..50089a9c08ba 100644 --- a/x/feegrant/keeper/grpc_query.go +++ b/x/feegrant/keeper/grpc_query.go @@ -86,7 +86,6 @@ func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesReque grants = append(grants, &grant) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -107,28 +106,19 @@ func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowa ctx := sdk.UnwrapSDKContext(c) - var grants []*feegrant.Grant - store := ctx.KVStore(q.storeKey) prefixStore := prefix.NewStore(store, feegrant.FeeAllowanceKeyPrefix) - pageRes, err := query.FilteredPaginate(prefixStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { + grants, pageRes, err := query.GenericFilteredPaginate(q.cdc, prefixStore, req.Pagination, func(key []byte, grant *feegrant.Grant) (*feegrant.Grant, error) { // ParseAddressesFromFeeAllowanceKey expects the full key including the prefix. granter, _ := feegrant.ParseAddressesFromFeeAllowanceKey(append(feegrant.FeeAllowanceKeyPrefix, key...)) if !granter.Equals(granterAddr) { - return false, nil + return nil, nil } - if accumulate { - var grant feegrant.Grant - if err := q.cdc.Unmarshal(value, &grant); err != nil { - return false, err - } - grants = append(grants, &grant) - } - - return true, nil + return grant, nil + }, func() *feegrant.Grant { + return &feegrant.Grant{} }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/feegrant/keeper/grpc_query_test.go b/x/feegrant/keeper/grpc_query_test.go index 9a7b76ff1a5a..fd46c5ec0653 100644 --- a/x/feegrant/keeper/grpc_query_test.go +++ b/x/feegrant/keeper/grpc_query_test.go @@ -6,7 +6,6 @@ import ( ) func (suite *KeeperTestSuite) TestFeeAllowance() { - testCases := []struct { name string req *feegrant.QueryAllowanceRequest diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 408273f91af7..84abc4428bf4 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" + "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/feegrant" ) @@ -22,7 +22,7 @@ type Keeper struct { authKeeper feegrant.AccountKeeper } -var _ middleware.FeegrantKeeper = &Keeper{} +var _ ante.FeegrantKeeper = &Keeper{} // NewKeeper creates a fee grant Keeper func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ak feegrant.AccountKeeper) Keeper { @@ -40,7 +40,6 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { // GrantAllowance creates a new grant func (k Keeper) GrantAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error { - // create the account if it is not in account state granteeAcc := k.authKeeper.GetAccount(ctx, grantee) if granteeAcc == nil { @@ -52,8 +51,15 @@ func (k Keeper) GrantAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress, key := feegrant.FeeAllowanceKey(granter, grantee) var oldExp *time.Time - existingGrant, err := k.getGrant(ctx, grantee, granter) - if err != nil && existingGrant != nil && existingGrant.GetAllowance() != nil { + existingGrant, err := k.getGrant(ctx, granter, grantee) + + // If we didn't find any grant, we don't return any error. + // All other kinds of errors are returned. + if err != nil && !sdkerrors.IsOf(err, sdkerrors.ErrNotFound) { + return err + } + + if existingGrant != nil && existingGrant.GetAllowance() != nil { grantInfo, err := existingGrant.GetGrant() if err != nil { return err @@ -184,7 +190,7 @@ func (k Keeper) getGrant(ctx sdk.Context, granter sdk.AccAddress, grantee sdk.Ac key := feegrant.FeeAllowanceKey(granter, grantee) bz := store.Get(key) if len(bz) == 0 { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "fee-grant not found") + return nil, sdkerrors.ErrNotFound.Wrap("fee-grant not found") } var feegrant feegrant.Grant @@ -322,9 +328,8 @@ func (k Keeper) RemoveExpiredAllowances(ctx sdk.Context) { for ; iterator.Valid(); iterator.Next() { store.Delete(iterator.Key()) - expLen := len(sdk.FormatTimeBytes(ctx.BlockTime())) - // extract the fee allowance key by removing the allowance queue prefix length, expiration length from key. - store.Delete(append(feegrant.FeeAllowanceKeyPrefix, iterator.Key()[1+expLen:]...)) + granter, grantee := feegrant.ParseAddressesFromFeeAllowanceQueueKey(iterator.Key()) + store.Delete(feegrant.FeeAllowanceKey(granter, grantee)) } } diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index 933d85c7cefe..4f5500f976d4 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -46,6 +46,7 @@ func (suite *KeeperTestSuite) TestKeeperCrud() { // some helpers eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) exp := suite.sdkCtx.BlockTime().AddDate(1, 0, 0) + exp2 := suite.sdkCtx.BlockTime().AddDate(2, 0, 0) basic := &feegrant.BasicAllowance{ SpendLimit: suite.atom, Expiration: &exp, @@ -56,6 +57,11 @@ func (suite *KeeperTestSuite) TestKeeperCrud() { Expiration: &exp, } + basic3 := &feegrant.BasicAllowance{ + SpendLimit: eth, + Expiration: &exp2, + } + // let's set up some initial state here err := suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[0], suite.addrs[1], basic) suite.Require().NoError(err) @@ -85,7 +91,7 @@ func (suite *KeeperTestSuite) TestKeeperCrud() { err = suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[0], suite.addrs[2], basic) suite.Require().NoError(err) - err = suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[1], suite.addrs[2], basic2) + err = suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[1], suite.addrs[2], basic3) suite.Require().NoError(err) // end state: @@ -115,7 +121,7 @@ func (suite *KeeperTestSuite) TestKeeperCrud() { "addr modified": { granter: suite.addrs[1], grantee: suite.addrs[2], - allowance: basic2, + allowance: basic3, }, } @@ -144,7 +150,6 @@ func (suite *KeeperTestSuite) TestKeeperCrud() { _, err = suite.msgSrvr.RevokeAllowance(suite.ctx, &feegrant.MsgRevokeAllowance{Granter: suite.addrs[3].String(), Grantee: accAddr.String()}) suite.Require().NoError(err) - } func (suite *KeeperTestSuite) TestUseGrantedFee() { @@ -265,6 +270,7 @@ func (suite *KeeperTestSuite) TestPruneGrants() { eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) now := suite.sdkCtx.BlockTime() oneYearExpiry := now.AddDate(1, 0, 0) + oneDay := now.AddDate(0, 0, 1) testCases := []struct { name string @@ -273,6 +279,8 @@ func (suite *KeeperTestSuite) TestPruneGrants() { grantee sdk.AccAddress allowance feegrant.FeeAllowanceI expErrMsg string + preRun func() + postRun func() }{ { name: "grant not pruned from state", @@ -326,12 +334,108 @@ func (suite *KeeperTestSuite) TestPruneGrants() { Expiration: &oneYearExpiry, }, }, + { + name: "grant created with a day expiry & overwritten with no expiry shouldn't be pruned: no error", + ctx: suite.sdkCtx.WithBlockTime(now.AddDate(0, 0, 2)), + granter: suite.addrs[2], + grantee: suite.addrs[1], + allowance: &feegrant.BasicAllowance{ + SpendLimit: eth, + }, + preRun: func() { + // create a grant with a day expiry. + allowance := &feegrant.BasicAllowance{ + SpendLimit: suite.atom, + Expiration: &oneDay, + } + err := suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[2], suite.addrs[1], allowance) + suite.NoError(err) + }, + postRun: func() { + _, err := suite.msgSrvr.RevokeAllowance(suite.sdkCtx, &feegrant.MsgRevokeAllowance{ + Granter: suite.addrs[2].String(), + Grantee: suite.addrs[1].String(), + }) + suite.NoError(err) + }, + }, + { + name: "grant created with a day expiry & overwritten with a year expiry shouldn't be pruned: no error", + ctx: suite.sdkCtx.WithBlockTime(now.AddDate(0, 0, 2)), + granter: suite.addrs[2], + grantee: suite.addrs[1], + allowance: &feegrant.BasicAllowance{ + SpendLimit: eth, + Expiration: &oneYearExpiry, + }, + preRun: func() { + // create a grant with a day expiry. + allowance := &feegrant.BasicAllowance{ + SpendLimit: suite.atom, + Expiration: &oneDay, + } + err := suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[2], suite.addrs[1], allowance) + suite.NoError(err) + }, + postRun: func() { + _, err := suite.msgSrvr.RevokeAllowance(suite.sdkCtx, &feegrant.MsgRevokeAllowance{ + Granter: suite.addrs[2].String(), + Grantee: suite.addrs[1].String(), + }) + suite.NoError(err) + }, + }, + { + name: "grant created with a year expiry & overwritten with a day expiry should be pruned after a day: error", + ctx: suite.sdkCtx.WithBlockTime(now.AddDate(0, 0, 2)), + granter: suite.addrs[2], + grantee: suite.addrs[1], + allowance: &feegrant.BasicAllowance{ + SpendLimit: eth, + Expiration: &oneDay, + }, + preRun: func() { + // create a grant with a year expiry. + allowance := &feegrant.BasicAllowance{ + SpendLimit: suite.atom, + Expiration: &oneYearExpiry, + } + err := suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[2], suite.addrs[1], allowance) + suite.NoError(err) + }, + postRun: func() {}, + expErrMsg: "not found", + }, + { + name: "grant created with no expiry & overwritten with a day expiry should be pruned after a day: error", + ctx: suite.sdkCtx.WithBlockTime(now.AddDate(0, 0, 2)), + granter: suite.addrs[2], + grantee: suite.addrs[1], + allowance: &feegrant.BasicAllowance{ + SpendLimit: eth, + Expiration: &oneDay, + }, + preRun: func() { + // create a grant with no expiry. + allowance := &feegrant.BasicAllowance{ + SpendLimit: suite.atom, + } + err := suite.keeper.GrantAllowance(suite.sdkCtx, suite.addrs[2], suite.addrs[1], allowance) + suite.NoError(err) + }, + postRun: func() {}, + expErrMsg: "not found", + }, } for _, tc := range testCases { tc := tc suite.Run(tc.name, func() { - suite.keeper.GrantAllowance(suite.sdkCtx, tc.granter, tc.grantee, tc.allowance) + if tc.preRun != nil { + tc.preRun() + } + err := suite.keeper.GrantAllowance(suite.sdkCtx, tc.granter, tc.grantee, tc.allowance) + suite.NoError(err) suite.app.FeeGrantKeeper.RemoveExpiredAllowances(tc.ctx) grant, err := suite.keeper.GetAllowance(tc.ctx, tc.granter, tc.grantee) if tc.expErrMsg != "" { @@ -340,6 +444,9 @@ func (suite *KeeperTestSuite) TestPruneGrants() { } else { suite.NotNil(grant) } + if tc.postRun != nil { + tc.postRun() + } }) } } diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index aafebdb7d227..4fa3193e3af9 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -218,5 +218,4 @@ func (suite *KeeperTestSuite) TestRevokeAllowance() { } }) } - } diff --git a/x/feegrant/key.go b/x/feegrant/key.go index 3d2fdb56336b..9cf0e4437481 100644 --- a/x/feegrant/key.go +++ b/x/feegrant/key.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - "github.com/cosmos/cosmos-sdk/types/kv" ) const ( @@ -67,17 +66,30 @@ func AllowanceByExpTimeKey(exp *time.Time) []byte { return append(FeeAllowanceQueueKeyPrefix, sdk.FormatTimeBytes(*exp)...) } -// ParseAddressesFromFeeAllowanceKey exrtacts and returns the granter, grantee from the given key. +// ParseAddressesFromFeeAllowanceKey extracts and returns the granter, grantee from the given key. func ParseAddressesFromFeeAllowanceKey(key []byte) (granter, grantee sdk.AccAddress) { // key is of format: // 0x00 - kv.AssertKeyAtLeastLength(key, 2) - granteeAddrLen := key[1] // remove prefix key - kv.AssertKeyAtLeastLength(key, 2+int(granteeAddrLen)) - grantee = sdk.AccAddress(key[2 : 2+int(granteeAddrLen)]) - granterAddrLen := int(key[2+granteeAddrLen]) - kv.AssertKeyAtLeastLength(key, 3+int(granteeAddrLen)+int(granterAddrLen)) - granter = sdk.AccAddress(key[3+granterAddrLen : 3+int(granteeAddrLen)+int(granterAddrLen)]) + granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1, 1) // ignore key[0] since it is a prefix key + grantee, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) + + granteeAddrLen, granteeAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) + granter, _ = sdk.ParseLengthPrefixedBytes(key, granteeAddrLenEndIndex+1, int(granteeAddrLen[0])) + + return granter, grantee +} + +// ParseAddressesFromFeeAllowanceQueueKey extracts and returns the granter, grantee from the given key. +func ParseAddressesFromFeeAllowanceQueueKey(key []byte) (granter, grantee sdk.AccAddress) { + lenTime := len(sdk.FormatTimeBytes(time.Now())) + + // key is of format: + // <0x01> + granterAddrLen, granterAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, 1+lenTime, 1) // ignore key[0] since it is a prefix key + grantee, granterAddrEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrLenEndIndex+1, int(granterAddrLen[0])) + + granteeAddrLen, granteeAddrLenEndIndex := sdk.ParseLengthPrefixedBytes(key, granterAddrEndIndex+1, 1) + granter, _ = sdk.ParseLengthPrefixedBytes(key, granteeAddrLenEndIndex+1, int(granteeAddrLen[0])) return granter, grantee } diff --git a/x/feegrant/key_test.go b/x/feegrant/key_test.go index 75a7964bec32..d08b53bb05ee 100644 --- a/x/feegrant/key_test.go +++ b/x/feegrant/key_test.go @@ -2,6 +2,7 @@ package feegrant_test import ( "testing" + "time" "github.com/stretchr/testify/require" @@ -23,3 +24,20 @@ func TestMarshalAndUnmarshalFeegrantKey(t *testing.T) { require.Equal(t, granter, g1) require.Equal(t, grantee, g2) } + +func TestMarshalAndUnmarshalFeegrantKeyQueueKey(t *testing.T) { + grantee, err := sdk.AccAddressFromBech32("cosmos1qk93t4j0yyzgqgt6k5qf8deh8fq6smpn3ntu3x") + require.NoError(t, err) + granter, err := sdk.AccAddressFromBech32("cosmos1p9qh4ldfd6n0qehujsal4k7g0e37kel90rc4ts") + require.NoError(t, err) + + exp := time.Now() + expBytes := sdk.FormatTimeBytes(exp) + + key := feegrant.FeeAllowancePrefixQueue(&exp, feegrant.FeeAllowanceKey(granter, grantee)[1:]) + require.Len(t, key, len(grantee.Bytes())+len(granter.Bytes())+3+len(expBytes)) + + granter1, grantee1 := feegrant.ParseAddressesFromFeeAllowanceQueueKey(key) + require.Equal(t, granter, granter1) + require.Equal(t, grantee, grantee1) +} diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index 2246de692456..fe0c23ea53b1 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -86,10 +85,6 @@ func (a AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.Tx return feegrant.ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the feegrant module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx sdkclient.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the feegrant module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { if err := feegrant.RegisterQueryHandlerClient(context.Background(), mux, feegrant.NewQueryClient(clientCtx)); err != nil { @@ -181,9 +176,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 2 } -// BeginBlock returns the begin blocker for the feegrant module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - // EndBlock returns the end blocker for the feegrant module. It returns no validator // updates. func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { diff --git a/x/feegrant/periodic_fee.go b/x/feegrant/periodic_fee.go index 43229247ff0c..0e496ce5a93b 100644 --- a/x/feegrant/periodic_fee.go +++ b/x/feegrant/periodic_fee.go @@ -30,13 +30,13 @@ func (a *PeriodicAllowance) Accept(ctx sdk.Context, fee sdk.Coins, _ []sdk.Msg) // deduct from both the current period and the max amount var isNeg bool - a.PeriodCanSpend, isNeg = a.PeriodCanSpend.SafeSub(fee) + a.PeriodCanSpend, isNeg = a.PeriodCanSpend.SafeSub(fee...) if isNeg { return false, sdkerrors.Wrap(ErrFeeLimitExceeded, "period limit") } if a.Basic.SpendLimit != nil { - a.Basic.SpendLimit, isNeg = a.Basic.SpendLimit.SafeSub(fee) + a.Basic.SpendLimit, isNeg = a.Basic.SpendLimit.SafeSub(fee...) if isNeg { return false, sdkerrors.Wrap(ErrFeeLimitExceeded, "absolute limit") } @@ -59,7 +59,7 @@ func (a *PeriodicAllowance) tryResetPeriod(blockTime time.Time) { } // set PeriodCanSpend to the lesser of Basic.SpendLimit and PeriodSpendLimit - if _, isNeg := a.Basic.SpendLimit.SafeSub(a.PeriodSpendLimit); isNeg && !a.Basic.SpendLimit.Empty() { + if _, isNeg := a.Basic.SpendLimit.SafeSub(a.PeriodSpendLimit...); isNeg && !a.Basic.SpendLimit.Empty() { a.PeriodCanSpend = a.Basic.SpendLimit } else { a.PeriodCanSpend = a.PeriodSpendLimit diff --git a/x/feegrant/periodic_fee_test.go b/x/feegrant/periodic_fee_test.go index b6a8d39bd9dc..439ef19a0195 100644 --- a/x/feegrant/periodic_fee_test.go +++ b/x/feegrant/periodic_fee_test.go @@ -131,8 +131,8 @@ func TestPeriodicFeeValidAllow(t *testing.T) { blockTime: oneHour, accept: true, remove: false, - remainsPeriod: smallAtom.Sub(oneAtom), - remains: smallAtom.Sub(oneAtom), + remainsPeriod: smallAtom.Sub(oneAtom...), + remains: smallAtom.Sub(oneAtom...), periodReset: oneHour.Add(tenMinutes), // one step from last reset, not now }, "period reset no spend limit": { diff --git a/x/feegrant/query.pb.go b/x/feegrant/query.pb.go index d3038e9d5faa..aed09b2f2902 100644 --- a/x/feegrant/query.pb.go +++ b/x/feegrant/query.pb.go @@ -241,6 +241,8 @@ func (m *QueryAllowancesResponse) GetPagination() *query.PageResponse { } // QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. +// +// Since: cosmos-sdk 0.46 type QueryAllowancesByGranterRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines an pagination for the request. @@ -295,6 +297,8 @@ func (m *QueryAllowancesByGranterRequest) GetPagination() *query.PageRequest { } // QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. +// +// Since: cosmos-sdk 0.46 type QueryAllowancesByGranterResponse struct { // allowances that have been issued by the granter. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` @@ -416,7 +420,8 @@ type QueryClient interface { // Allowances returns all the grants for address. Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address - // Since v0.46 + // + // Since: cosmos-sdk 0.46 AllowancesByGranter(ctx context.Context, in *QueryAllowancesByGranterRequest, opts ...grpc.CallOption) (*QueryAllowancesByGranterResponse, error) } @@ -462,7 +467,8 @@ type QueryServer interface { // Allowances returns all the grants for address. Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) // AllowancesByGranter returns all the grants given by an address - // Since v0.46 + // + // Since: cosmos-sdk 0.46 AllowancesByGranter(context.Context, *QueryAllowancesByGranterRequest) (*QueryAllowancesByGranterResponse, error) } diff --git a/x/feegrant/simulation/genesis_test.go b/x/feegrant/simulation/genesis_test.go index 88f057dd0fff..44669c04be98 100644 --- a/x/feegrant/simulation/genesis_test.go +++ b/x/feegrant/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -28,7 +29,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: accounts, - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/feegrant/simulation/operations.go b/x/feegrant/simulation/operations.go index 58095c138454..652b3b2f1acd 100644 --- a/x/feegrant/simulation/operations.go +++ b/x/feegrant/simulation/operations.go @@ -28,7 +28,6 @@ func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, k keeper.Keeper, ) simulation.WeightedOperations { - var ( weightMsgGrantAllowance int weightMsgRevokeAllowance int @@ -85,7 +84,6 @@ func SimulateMsgGrantAllowance(ak feegrant.AccountKeeper, bk feegrant.BankKeeper SpendLimit: spendableCoins, Expiration: &oneYear, }, granter.Address, grantee.Address) - if err != nil { return simtypes.NoOpMsg(feegrant.ModuleName, TypeMsgGrantAllowance, err.Error()), nil, err } @@ -114,20 +112,12 @@ func SimulateMsgRevokeAllowance(ak feegrant.AccountKeeper, bk feegrant.BankKeepe return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - hasGrant := false var granterAddr sdk.AccAddress var granteeAddr sdk.AccAddress k.IterateAllFeeAllowances(ctx, func(grant feegrant.Grant) bool { - - granter, err := sdk.AccAddressFromBech32(grant.Granter) - if err != nil { - panic(err) - } - grantee, err := sdk.AccAddressFromBech32(grant.Grantee) - if err != nil { - panic(err) - } + granter := sdk.MustAccAddressFromBech32(grant.Granter) + grantee := sdk.MustAccAddressFromBech32(grant.Grantee) granterAddr = granter granteeAddr = grantee hasGrant = true diff --git a/x/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go index f958330d9810..71721becc0e7 100644 --- a/x/feegrant/simulation/operations_test.go +++ b/x/feegrant/simulation/operations_test.go @@ -32,7 +32,6 @@ func (suite *SimTestSuite) SetupTest() { suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{ Time: time.Now(), }) - } func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { diff --git a/x/feegrant/spec/01_concepts.md b/x/feegrant/spec/01_concepts.md index 523ff3e94fe0..2d9ceda89f44 100644 --- a/x/feegrant/spec/01_concepts.md +++ b/x/feegrant/spec/01_concepts.md @@ -8,11 +8,11 @@ order: 1 `Grant` is stored in the KVStore to record a grant with full context. Every grant will contain `granter`, `grantee` and what kind of `allowance` is granted. `granter` is an account address who is giving permission to `grantee` (the beneficiary account address) to pay for some or all of `grantee`'s transaction fees. `allowance` defines what kind of fee allowance (`BasicAllowance` or `PeriodicAllowance`, see below) is granted to `grantee`. `allowance` accepts an interface which implements `FeeAllowanceI`, encoded as `Any` type. There can be only one existing fee grant allowed for a `grantee` and `granter`, self grants are not allowed. -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/feegrant.proto#L75-L81 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/feegrant/v1beta1/feegrant.proto#L76-L77 `FeeAllowanceI` looks like: -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/x/feegrant/fees.go#L9-L32 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/feegrant/fees.go#L9-L32 ## Fee Allowance types @@ -26,19 +26,19 @@ There are two types of fee allowances present at the moment: `BasicAllowance` is permission for `grantee` to use fee from a `granter`'s account. If any of the `spend_limit` or `expiration` reaches its limit, the grant will be removed from the state. -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/feegrant.proto#L13-L26 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/feegrant/v1beta1/feegrant.proto#L13-L26 -* `spend_limit` is the limit of coins that are allowed to be used from the `granter` account. If it is empty, it assumes there's no spend limit, `grantee` can use any number of available tokens from `granter` account address before the expiration. +* `spend_limit` is the limit of coins that are allowed to be used from the `granter` account. If it is empty, it assumes there's no spend limit, `grantee` can use any number of available coins from `granter` account address before the expiration. * `expiration` specifies an optional time when this allowance expires. If the value is left empty, there is no expiry for the grant. -* When a grant is created with empty values for `spend_limit` and `expiration`, it is still a valid grant. It won't restrict the `grantee` to use any number of tokens from `granter` and it won't have any expiration. The only way to restrict the `grantee` is by revoking the grant. +* When a grant is created with empty values for `spend_limit` and `expiration`, it is still a valid grant. It won't restrict the `grantee` to use any number of coins from `granter` and it won't have any expiration. The only way to restrict the `grantee` is by revoking the grant. ## PeriodicAllowance `PeriodicAllowance` is a repeating fee allowance for the mentioned period, we can mention when the grant can expire as well as when a period can reset. We can also define the maximum number of coins that can be used in a mentioned period of time. -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/feegrant.proto#L28-L73 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/feegrant/v1beta1/feegrant.proto#L29-L54 * `basic` is the instance of `BasicAllowance` which is optional for periodic fee allowance. If empty, the grant will have no `expiration` and no `spend_limit`. @@ -54,7 +54,7 @@ There are two types of fee allowances present at the moment: `AllowedMsgAllowance` is a fee allowance, it can be any of `BasicFeeAllowance`, `PeriodicAllowance` but restricted only to the allowed messages mentioned by the granter. -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/feegrant.proto#L55-L65 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/feegrant/v1beta1/feegrant.proto#L56-L66 * `allowance` is either `BasicAllowance` or `PeriodicAllowance`. @@ -64,13 +64,13 @@ There are two types of fee allowances present at the moment: `feegrant` module introduces a `FeeGranter` flag for CLI for the sake of executing transactions with fee granter. When this flag is set, `clientCtx` will append the granter account address for transactions generated through CLI. -+++ https://github.com/cosmos/cosmos-sdk/blob/d97e7907f176777ed8a464006d360bb3e1a223e4/client/cmd.go#L224-L235 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/cmd.go#L236-L246 -+++ https://github.com/cosmos/cosmos-sdk/blob/d97e7907f176777ed8a464006d360bb3e1a223e4/client/tx/tx.go#L120 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/client/tx/tx.go#L109-L109 -+++ https://github.com/cosmos/cosmos-sdk/blob/d97e7907f176777ed8a464006d360bb3e1a223e4/x/auth/tx/builder.go#L268-L277 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/auth/tx/builder.go#L270-L279 -+++ https://github.com/cosmos/cosmos-sdk/blob/d97e7907f176777ed8a464006d360bb3e1a223e4/proto/cosmos/tx/v1beta1/tx.proto#L160-L181 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/tx/v1beta1/tx.proto#L196-L217 Example cmd: diff --git a/x/feegrant/spec/02_state.md b/x/feegrant/spec/02_state.md index 0c5b9177d1f9..3ff4d8c49c0d 100644 --- a/x/feegrant/spec/02_state.md +++ b/x/feegrant/spec/02_state.md @@ -12,7 +12,7 @@ Fee allowance grants are stored in the state as follows: * Grant: `0x00 | grantee_addr_len (1 byte) | grantee_addr_bytes | granter_addr_len (1 byte) | granter_addr_bytes -> ProtocolBuffer(Grant)` -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/x/feegrant/feegrant.pb.go#L221-L229 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/feegrant/feegrant.pb.go#L221-L229 ## FeeAllowanceQueue diff --git a/x/feegrant/spec/03_messages.md b/x/feegrant/spec/03_messages.md index 602dd2b7125a..a4d09619afd7 100644 --- a/x/feegrant/spec/03_messages.md +++ b/x/feegrant/spec/03_messages.md @@ -8,10 +8,10 @@ order: 3 A fee allowance grant will be created with the `MsgGrantAllowance` message. -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/tx.proto#L22-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/feegrant/v1beta1/tx.proto#L23-L36 ## Msg/RevokeAllowance An allowed grant fee allowance can be removed with the `MsgRevokeAllowance` message. -+++ https://github.com/cosmos/cosmos-sdk/blob/691032b8be0f7539ec99f8882caecefc51f33d1f/proto/cosmos/feegrant/v1beta1/tx.proto#L38-L45 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/feegrant/v1beta1/tx.proto#L41-L50 diff --git a/x/feegrant/spec/README.md b/x/feegrant/spec/README.md index b8f646f4d991..8f08a51aeb3a 100644 --- a/x/feegrant/spec/README.md +++ b/x/feegrant/spec/README.md @@ -9,7 +9,7 @@ parent: ## Abstract -This document specifies the fee grant module. For the full ADR, please see [Fee Grant ADR-029](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/docs/architecture/adr-029-fee-grant-module.md). +This document specifies the fee grant module. For the full ADR, please see [Fee Grant ADR-029](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-029-fee-grant-module.md). This module allows accounts to grant fee allowances and to use fees from their accounts. Grantees can execute any transaction without the need to maintain sufficient fees. diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index 9f01d3445b4f..4880fa375503 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -130,9 +130,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o } txFactory := tx.NewFactoryCLI(clientCtx, cmd.Flags()) - if err != nil { - return errors.Wrap(err, "error creating tx builder") - } + pub, err := key.GetAddress() if err != nil { return err @@ -220,7 +218,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o func makeOutputFilepath(rootDir, nodeID string) (string, error) { writePath := filepath.Join(rootDir, "config", "gentx") - if err := tmos.EnsureDir(writePath, 0700); err != nil { + if err := tmos.EnsureDir(writePath, 0o700); err != nil { return "", err } @@ -242,7 +240,7 @@ func readUnsignedGenTxFile(clientCtx client.Context, r io.Reader) (sdk.Tx, error } func writeSignedGenTx(clientCtx client.Context, outputDocument string, tx sdk.Tx) error { - outputFile, err := os.OpenFile(outputDocument, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0644) + outputFile, err := os.OpenFile(outputDocument, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0o644) if err != nil { return err } diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index 9e8674a84b55..c96c458c734e 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "os" + "path/filepath" "time" "github.com/cosmos/go-bip39" @@ -172,12 +173,12 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { genDoc.AppState = appState if err = genutil.ExportGenesisFile(genDoc, genFile); err != nil { - return errors.Wrap(err, "Failed to export gensis file") + return errors.Wrap(err, "Failed to export genesis file") } toPrint := newPrintInfo(config.Moniker, chainID, nodeID, "", appState) - cfg.WriteConfigFile(config.RootDir, config) + cfg.WriteConfigFile(filepath.Join(config.RootDir, "config", "config.toml"), config) return displayInfo(toPrint) }, } diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go index d5004d960d5a..705af61cace3 100644 --- a/x/genutil/client/cli/init_test.go +++ b/x/genutil/client/cli/init_test.go @@ -87,7 +87,6 @@ func TestInitCmd(t *testing.T) { } }) } - } func TestInitRecover(t *testing.T) { @@ -286,7 +285,7 @@ func TestInitConfig(t *testing.T) { // custom tx codec func makeCodec() *codec.LegacyAmino { - var cdc = codec.NewLegacyAmino() + cdc := codec.NewLegacyAmino() sdk.RegisterLegacyAminoCodec(cdc) cryptocodec.RegisterCrypto(cdc) return cdc diff --git a/x/genutil/client/cli/migrate.go b/x/genutil/client/cli/migrate.go index f27d979ad363..c16fcb843d06 100644 --- a/x/genutil/client/cli/migrate.go +++ b/x/genutil/client/cli/migrate.go @@ -14,7 +14,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - v040 "github.com/cosmos/cosmos-sdk/x/genutil/migrations/v040" v043 "github.com/cosmos/cosmos-sdk/x/genutil/migrations/v043" v046 "github.com/cosmos/cosmos-sdk/x/genutil/migrations/v046" "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -26,7 +25,6 @@ const flagGenesisTime = "genesis-time" // // Ref: https://github.com/cosmos/cosmos-sdk/issues/5041 var migrationMap = types.MigrationMap{ - "v0.42": v040.Migrate, // NOTE: v0.40, v0.41 and v0.42 are genesis compatible. "v0.43": v043.Migrate, // NOTE: v0.43, v0.44 and v0.45 are genesis compatible. "v0.46": v046.Migrate, } diff --git a/x/genutil/client/cli/validate_genesis.go b/x/genutil/client/cli/validate_genesis.go index 6c8e27dda8e0..519a5ae01f94 100644 --- a/x/genutil/client/cli/validate_genesis.go +++ b/x/genutil/client/cli/validate_genesis.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" ) -const chainUpgradeGuide = "https://docs.cosmos.network/master/migrations/chain-upgrade-guide-040.html" +const chainUpgradeGuide = "https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md" // ValidateGenesisCmd takes a genesis file, and makes sure that it is valid. func ValidateGenesisCmd(mbm module.BasicManager) *cobra.Command { diff --git a/x/genutil/client/testutil/cli_test.go b/x/genutil/client/testutil/cli_test.go index dd36a6af2d3e..1035ca750264 100644 --- a/x/genutil/client/testutil/cli_test.go +++ b/x/genutil/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/genutil/client/testutil/validate_genesis.go b/x/genutil/client/testutil/validate_genesis.go index fe34e04bbc8a..c537dbf9dcf6 100644 --- a/x/genutil/client/testutil/validate_genesis.go +++ b/x/genutil/client/testutil/validate_genesis.go @@ -93,7 +93,6 @@ func (s *IntegrationTestSuite) TestValidateGenesis() { _, err := clitestutil.ExecTestCLICmd(val0.ClientCtx, cli.ValidateGenesisCmd(nil), []string{genesisFile.Name()}) if tc.expErr { s.Require().Contains(err.Error(), "Make sure that you have correctly migrated all Tendermint consensus params") - } else { s.Require().NoError(err) } diff --git a/x/genutil/collect.go b/x/genutil/collect.go index 8b06c12f7740..5ee2685159b7 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -27,7 +27,6 @@ import ( func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, config *cfg.Config, initCfg types.InitConfig, genDoc tmtypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, ) (appState json.RawMessage, err error) { - // process genesis transactions, else create default genesis.json appGenTxs, persistentPeers, err := CollectTxs( cdc, txEncodingConfig.TxJSONDecoder(), config.Moniker, initCfg.GenTxsDir, genDoc, genBalIterator, @@ -37,7 +36,7 @@ func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodi } config.P2P.PersistentPeers = persistentPeers - cfg.WriteConfigFile(config.RootDir, config) + cfg.WriteConfigFile(filepath.Join(config.RootDir, "config", "config.toml"), config) // if there are no gen txs to be processed, return the default empty state if len(appGenTxs) == 0 { diff --git a/x/genutil/collect_test.go b/x/genutil/collect_test.go index 837e16e6fc9b..c9befdd54720 100644 --- a/x/genutil/collect_test.go +++ b/x/genutil/collect_test.go @@ -45,7 +45,7 @@ func TestCollectTxsHandlesDirectories(t *testing.T) { // 1. We'll insert a directory as the first element before JSON file. subDirPath := filepath.Join(testDir, "_adir") - if err := os.MkdirAll(subDirPath, 0755); err != nil { + if err := os.MkdirAll(subDirPath, 0o755); err != nil { t.Fatal(err) } diff --git a/x/genutil/gentx.go b/x/genutil/gentx.go index 39fa600750d1..f7e4250def1d 100644 --- a/x/genutil/gentx.go +++ b/x/genutil/gentx.go @@ -18,7 +18,6 @@ import ( func SetGenTxsInAppGenesisState( cdc codec.JSONCodec, txJSONEncoder sdk.TxEncoder, appGenesisState map[string]json.RawMessage, genTxs []sdk.Tx, ) (map[string]json.RawMessage, error) { - genesisState := types.GetGenesisStateFromAppState(cdc, appGenesisState) genTxsBz := make([]json.RawMessage, 0, len(genTxs)) @@ -41,7 +40,6 @@ func ValidateAccountInGenesis( appGenesisState map[string]json.RawMessage, genBalIterator types.GenesisBalancesIterator, addr sdk.Address, coins sdk.Coins, cdc codec.JSONCodec, ) error { - var stakingData stakingtypes.GenesisState cdc.MustUnmarshalJSON(appGenesisState[stakingtypes.ModuleName], &stakingData) bondDenom := stakingData.Params.BondDenom @@ -96,7 +94,6 @@ func DeliverGenTxs( stakingKeeper types.StakingKeeper, deliverTx deliverTxfn, txEncodingConfig client.TxEncodingConfig, ) ([]abci.ValidatorUpdate, error) { - for _, genTx := range genTxs { tx, err := txEncodingConfig.TxJSONDecoder()(genTx) if err != nil { diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index cf70d84bef38..be286051321d 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -3,7 +3,9 @@ package genutil_test import ( "encoding/json" "fmt" + "math/rand" "testing" + "time" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -17,7 +19,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -181,7 +182,7 @@ func (suite *GenTxTestSuite) TestValidateAccountInGenesis() { cdc := suite.encodingConfig.Codec suite.app.StakingKeeper.SetParams(suite.ctx, stakingtypes.DefaultParams()) - stakingGenesisState := staking.ExportGenesis(suite.ctx, suite.app.StakingKeeper) + stakingGenesisState := suite.app.StakingKeeper.ExportGenesis(suite.ctx) suite.Require().Equal(stakingGenesisState.Params, stakingtypes.DefaultParams()) stakingGenesis, err := cdc.MarshalJSON(stakingGenesisState) // TODO switch this to use Marshaler suite.Require().NoError(err) @@ -198,7 +199,6 @@ func (suite *GenTxTestSuite) TestValidateAccountInGenesis() { } else { suite.Require().Error(err) } - }) } } @@ -233,8 +233,10 @@ func (suite *GenTxTestSuite) TestDeliverGenTxs() { _ = suite.setAccountBalance(addr1, 50) _ = suite.setAccountBalance(addr2, 1) + r := rand.New(rand.NewSource(time.Now().UnixNano())) msg := banktypes.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)}) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, suite.encodingConfig.TxConfig, []sdk.Msg{msg}, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)}, diff --git a/x/genutil/migrations/v039/types.go b/x/genutil/migrations/v039/types.go deleted file mode 100644 index 12d082d1bc8a..000000000000 --- a/x/genutil/migrations/v039/types.go +++ /dev/null @@ -1,12 +0,0 @@ -package v039 - -import "encoding/json" - -const ( - ModuleName = "genutil" -) - -// GenesisState defines the raw genesis transaction in JSON -type GenesisState struct { - GenTxs []json.RawMessage `json:"gentxs" yaml:"gentxs"` -} diff --git a/x/genutil/migrations/v040/migrate.go b/x/genutil/migrations/v040/migrate.go deleted file mode 100644 index eb9686820981..000000000000 --- a/x/genutil/migrations/v040/migrate.go +++ /dev/null @@ -1,200 +0,0 @@ -package v040 - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - v039auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v039" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" - v036supply "github.com/cosmos/cosmos-sdk/x/bank/migrations/v036" - v038bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v038" - v040bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v040" - v039crisis "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v039" - v040crisis "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v040" - v036distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v036" - v038distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v038" - v040distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v040" - v038evidence "github.com/cosmos/cosmos-sdk/x/evidence/migrations/v038" - v040evidence "github.com/cosmos/cosmos-sdk/x/evidence/migrations/v040" - v039genutil "github.com/cosmos/cosmos-sdk/x/genutil/migrations/v039" - "github.com/cosmos/cosmos-sdk/x/genutil/types" - v036gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v036" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v040" - v039mint "github.com/cosmos/cosmos-sdk/x/mint/migrations/v039" - v040mint "github.com/cosmos/cosmos-sdk/x/mint/migrations/v040" - v036params "github.com/cosmos/cosmos-sdk/x/params/migrations/v036" - v039slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v039" - v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v040" - v038staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v038" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v040" - v038upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/migrations/v038" -) - -func migrateGenutil(oldGenState v039genutil.GenesisState) *types.GenesisState { - return &types.GenesisState{ - GenTxs: oldGenState.GenTxs, - } -} - -// Migrate migrates exported state from v0.39 to a v0.40 genesis state. -func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { - v039Codec := codec.NewLegacyAmino() - v039auth.RegisterLegacyAminoCodec(v039Codec) - v036gov.RegisterLegacyAminoCodec(v039Codec) - v036distr.RegisterLegacyAminoCodec(v039Codec) - v036params.RegisterLegacyAminoCodec(v039Codec) - v038upgrade.RegisterLegacyAminoCodec(v039Codec) - - v040Codec := clientCtx.Codec - - if appState[v038bank.ModuleName] != nil { - // unmarshal relative source genesis application state - var bankGenState v038bank.GenesisState - v039Codec.MustUnmarshalJSON(appState[v038bank.ModuleName], &bankGenState) - - // unmarshal x/auth genesis state to retrieve all account balances - var authGenState v039auth.GenesisState - v039Codec.MustUnmarshalJSON(appState[v039auth.ModuleName], &authGenState) - - // unmarshal x/supply genesis state to retrieve total supply - var supplyGenState v036supply.GenesisState - v039Codec.MustUnmarshalJSON(appState[v036supply.ModuleName], &supplyGenState) - - // delete deprecated x/bank genesis state - delete(appState, v038bank.ModuleName) - - // delete deprecated x/supply genesis state - delete(appState, v036supply.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040bank.ModuleName] = v040Codec.MustMarshalJSON(v040bank.Migrate(bankGenState, authGenState, supplyGenState)) - } - - // remove balances from existing accounts - if appState[v039auth.ModuleName] != nil { - // unmarshal relative source genesis application state - var authGenState v039auth.GenesisState - v039Codec.MustUnmarshalJSON(appState[v039auth.ModuleName], &authGenState) - - // delete deprecated x/auth genesis state - delete(appState, v039auth.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040auth.ModuleName] = v040Codec.MustMarshalJSON(v040auth.Migrate(authGenState)) - } - - // Migrate x/crisis. - if appState[v039crisis.ModuleName] != nil { - // unmarshal relative source genesis application state - var crisisGenState v039crisis.GenesisState - v039Codec.MustUnmarshalJSON(appState[v039crisis.ModuleName], &crisisGenState) - - // delete deprecated x/crisis genesis state - delete(appState, v039crisis.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040crisis.ModuleName] = v040Codec.MustMarshalJSON(v040crisis.Migrate(crisisGenState)) - } - - // Migrate x/distribution. - if appState[v038distr.ModuleName] != nil { - // unmarshal relative source genesis application state - var distributionGenState v038distr.GenesisState - v039Codec.MustUnmarshalJSON(appState[v038distr.ModuleName], &distributionGenState) - - // delete deprecated x/distribution genesis state - delete(appState, v038distr.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040distr.ModuleName] = v040Codec.MustMarshalJSON(v040distr.Migrate(distributionGenState)) - } - - // Migrate x/evidence. - if appState[v038evidence.ModuleName] != nil { - // unmarshal relative source genesis application state - var evidenceGenState v038evidence.GenesisState - v039Codec.MustUnmarshalJSON(appState[v038bank.ModuleName], &evidenceGenState) - - // delete deprecated x/evidence genesis state - delete(appState, v038evidence.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040evidence.ModuleName] = v040Codec.MustMarshalJSON(v040evidence.Migrate(evidenceGenState)) - } - - // Migrate x/gov. - if appState[v036gov.ModuleName] != nil { - // unmarshal relative source genesis application state - var govGenState v036gov.GenesisState - v039Codec.MustUnmarshalJSON(appState[v036gov.ModuleName], &govGenState) - - // delete deprecated x/gov genesis state - delete(appState, v036gov.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040gov.ModuleName] = v040Codec.MustMarshalJSON(v040gov.Migrate(govGenState)) - } - - // Migrate x/mint. - if appState[v039mint.ModuleName] != nil { - // unmarshal relative source genesis application state - var mintGenState v039mint.GenesisState - v039Codec.MustUnmarshalJSON(appState[v039mint.ModuleName], &mintGenState) - - // delete deprecated x/mint genesis state - delete(appState, v039mint.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040mint.ModuleName] = v040Codec.MustMarshalJSON(v040mint.Migrate(mintGenState)) - } - - // Migrate x/slashing. - if appState[v039slashing.ModuleName] != nil { - // unmarshal relative source genesis application state - var slashingGenState v039slashing.GenesisState - v039Codec.MustUnmarshalJSON(appState[v039slashing.ModuleName], &slashingGenState) - - // delete deprecated x/slashing genesis state - delete(appState, v039slashing.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040slashing.ModuleName] = v040Codec.MustMarshalJSON(v040slashing.Migrate(slashingGenState)) - } - - // Migrate x/staking. - if appState[v038staking.ModuleName] != nil { - // unmarshal relative source genesis application state - var stakingGenState v038staking.GenesisState - v039Codec.MustUnmarshalJSON(appState[v038staking.ModuleName], &stakingGenState) - - // delete deprecated x/staking genesis state - delete(appState, v038staking.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[v040staking.ModuleName] = v040Codec.MustMarshalJSON(v040staking.Migrate(stakingGenState)) - } - - // Migrate x/genutil - if appState[v039genutil.ModuleName] != nil { - // unmarshal relative source genesis application state - var genutilGenState v039genutil.GenesisState - v039Codec.MustUnmarshalJSON(appState[v039genutil.ModuleName], &genutilGenState) - - // delete deprecated x/staking genesis state - delete(appState, v039genutil.ModuleName) - - // Migrate relative source genesis application state and marshal it into - // the respective key. - appState[ModuleName] = v040Codec.MustMarshalJSON(migrateGenutil(genutilGenState)) - } - - return appState -} diff --git a/x/genutil/migrations/v040/types.go b/x/genutil/migrations/v040/types.go deleted file mode 100644 index f641dbff51e1..000000000000 --- a/x/genutil/migrations/v040/types.go +++ /dev/null @@ -1,5 +0,0 @@ -package v040 - -const ( - ModuleName = "genutil" -) diff --git a/x/genutil/migrations/v043/migrate.go b/x/genutil/migrations/v043/migrate.go index 8c37ee61d456..76676494443d 100644 --- a/x/genutil/migrations/v043/migrate.go +++ b/x/genutil/migrations/v043/migrate.go @@ -2,11 +2,11 @@ package v043 import ( "github.com/cosmos/cosmos-sdk/client" - v040bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v040" + v042bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v042" v043bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v043" bank "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v040" + v042gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -14,26 +14,26 @@ import ( // Migrate migrates exported state from v0.40 to a v0.43 genesis state. func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate x/gov. - if appState[v040gov.ModuleName] != nil { + if appState[v042gov.ModuleName] != nil { // unmarshal relative source genesis application state var oldGovState gov.GenesisState - clientCtx.Codec.MustUnmarshalJSON(appState[v040gov.ModuleName], &oldGovState) + clientCtx.Codec.MustUnmarshalJSON(appState[v042gov.ModuleName], &oldGovState) // delete deprecated x/gov genesis state - delete(appState, v040gov.ModuleName) + delete(appState, v042gov.ModuleName) // Migrate relative source genesis application state and marshal it into // the respective key. appState[v043gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(v043gov.MigrateJSON(&oldGovState)) } - if appState[v040bank.ModuleName] != nil { + if appState[v042bank.ModuleName] != nil { // unmarshal relative source genesis application state var oldBankState bank.GenesisState - clientCtx.Codec.MustUnmarshalJSON(appState[v040bank.ModuleName], &oldBankState) + clientCtx.Codec.MustUnmarshalJSON(appState[v042bank.ModuleName], &oldBankState) // delete deprecated x/bank genesis state - delete(appState, v040bank.ModuleName) + delete(appState, v042bank.ModuleName) // Migrate relative source genesis application state and marshal it into // the respective key. diff --git a/x/genutil/migrations/v046/migrate.go b/x/genutil/migrations/v046/migrate.go index 10a04fd5bd55..b3fead6961dd 100644 --- a/x/genutil/migrations/v046/migrate.go +++ b/x/genutil/migrations/v046/migrate.go @@ -5,7 +5,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil/types" v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" v046gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" - gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + v043staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v043" + v046staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v046" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // Migrate migrates exported state from v0.43 to a v0.46 genesis state. @@ -13,19 +16,37 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate x/gov. if appState[v043gov.ModuleName] != nil { // unmarshal relative source genesis application state - var oldGovState gov.GenesisState - clientCtx.Codec.MustUnmarshalJSON(appState[v043gov.ModuleName], &oldGovState) + var old govv1beta1.GenesisState + clientCtx.Codec.MustUnmarshalJSON(appState[v043gov.ModuleName], &old) // delete deprecated x/gov genesis state delete(appState, v043gov.ModuleName) // Migrate relative source genesis application state and marshal it into // the respective key. - newGovState, err := v046gov.MigrateJSON(&oldGovState) + new, err := v046gov.MigrateJSON(&old) if err != nil { panic(err) } - appState[v046gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(newGovState) + appState[v046gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(new) + } + + // Migrate x/staking. + if appState[v043staking.ModuleName] != nil { + // unmarshal relative source genesis application state + var old stakingtypes.GenesisState + clientCtx.Codec.MustUnmarshalJSON(appState[v043staking.ModuleName], &old) + + // delete deprecated x/staking genesis state + delete(appState, v043staking.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + new, err := v046staking.MigrateJSON(old) + if err != nil { + panic(err) + } + appState[v046staking.ModuleName] = clientCtx.Codec.MustMarshalJSON(&new) } return appState diff --git a/x/genutil/module.go b/x/genutil/module.go index db3071ca00c7..9640fbd83429 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -53,10 +52,6 @@ func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig cl return types.ValidateGenesis(&data, txEncodingConfig.TxJSONDecoder()) } -// RegisterRESTRoutes registers the REST routes for the genutil module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the genutil module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) { } @@ -82,7 +77,6 @@ func NewAppModule(accountKeeper types.AccountKeeper, stakingKeeper types.StakingKeeper, deliverTx deliverTxfn, txEncodingConfig client.TxEncodingConfig, ) module.AppModule { - return module.NewGenesisOnlyAppModule(AppModule{ AppModuleBasic: AppModuleBasic{}, accountKeeper: accountKeeper, @@ -97,10 +91,12 @@ func NewAppModule(accountKeeper types.AccountKeeper, func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) + validators, err := InitGenesis(ctx, am.stakingKeeper, am.deliverTx, genesisState, am.txEncodingConfig) if err != nil { panic(err) } + return validators } diff --git a/x/genutil/types/genesis_state.go b/x/genutil/types/genesis_state.go index 4a4dc957555a..9a71d50aae69 100644 --- a/x/genutil/types/genesis_state.go +++ b/x/genutil/types/genesis_state.go @@ -57,7 +57,6 @@ func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.R func SetGenesisStateInAppState( cdc codec.JSONCodec, appState map[string]json.RawMessage, genesisState *GenesisState, ) map[string]json.RawMessage { - genesisStateBz := cdc.MustMarshalJSON(genesisState) appState[ModuleName] = genesisStateBz return appState diff --git a/x/genutil/types/genesis_state_test.go b/x/genutil/types/genesis_state_test.go index 01e1db9fd330..9c225fd3f7c4 100644 --- a/x/genutil/types/genesis_state_test.go +++ b/x/genutil/types/genesis_state_test.go @@ -91,5 +91,4 @@ func TestGenesisStateFromGenFile(t *testing.T) { require.Equal(t, "matom", bankGenesis.DenomMetadata[0].GetDenomUnits()[1].GetDenom()) require.Equal(t, []string{"milliatom"}, bankGenesis.DenomMetadata[0].GetDenomUnits()[1].GetAliases()) require.Equal(t, uint32(3), bankGenesis.DenomMetadata[0].GetDenomUnits()[1].GetExponent()) - } diff --git a/x/genutil/utils.go b/x/genutil/utils.go index 251b0f398f0b..7fbdc668d8fb 100644 --- a/x/genutil/utils.go +++ b/x/genutil/utils.go @@ -1,7 +1,6 @@ package genutil import ( - "context" "encoding/json" "fmt" "path/filepath" @@ -11,6 +10,7 @@ import ( cfg "github.com/tendermint/tendermint/config" tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" tmtypes "github.com/tendermint/tendermint/types" @@ -34,7 +34,6 @@ func ExportGenesisFileWithTime( genFile, chainID string, validators []tmtypes.GenesisValidator, appState json.RawMessage, genTime time.Time, ) error { - genDoc := tmtypes.GenesisDoc{ GenesisTime: genTime, ChainID: chainID, @@ -60,36 +59,33 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin if len(mnemonic) > 0 && !bip39.IsMnemonicValid(mnemonic) { return "", nil, fmt.Errorf("invalid mnemonic") } - nodeKey, err := tmtypes.LoadOrGenNodeKey(config.NodeKeyFile()) + nodeKey, err := p2p.LoadOrGenNodeKey(config.NodeKeyFile()) if err != nil { return "", nil, err } - nodeID = string(nodeKey.ID) + nodeID = string(nodeKey.ID()) - pvKeyFile := config.PrivValidator.KeyFile() - if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0777); err != nil { + pvKeyFile := config.PrivValidatorKeyFile() + if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0o777); err != nil { return "", nil, err } - pvStateFile := config.PrivValidator.StateFile() - if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0777); err != nil { + pvStateFile := config.PrivValidatorStateFile() + if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0o777); err != nil { return "", nil, err } var filePV *privval.FilePV if len(mnemonic) == 0 { - filePV, err = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile) - if err != nil { - return "", nil, err - } + filePV = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile) } else { privKey := tmed25519.GenPrivKeyFromSecret([]byte(mnemonic)) filePV = privval.NewFilePV(privKey, pvKeyFile, pvStateFile) filePV.Save() } - tmValPubKey, err := filePV.GetPubKey(context.TODO()) + tmValPubKey, err := filePV.GetPubKey() if err != nil { return "", nil, err } diff --git a/x/genutil/utils_test.go b/x/genutil/utils_test.go index 360f930e49b9..f8337ef6c3b8 100644 --- a/x/genutil/utils_test.go +++ b/x/genutil/utils_test.go @@ -27,7 +27,7 @@ func TestInitializeNodeValidatorFilesFromMnemonic(t *testing.T) { cfg := config.TestConfig() cfg.RootDir = t.TempDir() - require.NoError(t, os.MkdirAll(filepath.Join(cfg.RootDir, "config"), 0755)) + require.NoError(t, os.MkdirAll(filepath.Join(cfg.RootDir, "config"), 0o755)) tests := []struct { name string @@ -62,9 +62,9 @@ func TestInitializeNodeValidatorFilesFromMnemonic(t *testing.T) { require.NoError(t, err) if tt.mnemonic != "" { - actualPVFile, _ := privval.LoadFilePV(cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile()) + actualPVFile := privval.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) expectedPrivateKey := tmed25519.GenPrivKeyFromSecret([]byte(tt.mnemonic)) - expectedFile := privval.NewFilePV(expectedPrivateKey, cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile()) + expectedFile := privval.NewFilePV(expectedPrivateKey, cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) require.Equal(t, expectedFile, actualPVFile) } } diff --git a/x/gov/client/cli/parse.go b/x/gov/client/cli/parse.go index e5a6cc3cb9a7..a43d7f868cea 100644 --- a/x/gov/client/cli/parse.go +++ b/x/gov/client/cli/parse.go @@ -40,12 +40,6 @@ func parseSubmitLegacyProposalFlags(fs *pflag.FlagSet) (*legacyProposal, error) if proposalFile == "" { proposalType, _ := fs.GetString(FlagProposalType) - title, _ := fs.GetString(FlagTitle) - description, _ := fs.GetString(FlagDescription) - if proposalType == "" && title == "" && description == "" { - return nil, fmt.Errorf("one of the --proposal or (--title, --description and --type) flags are required") - } - proposal.Title, _ = fs.GetString(FlagTitle) proposal.Description, _ = fs.GetString(FlagDescription) proposal.Type = govutils.NormalizeProposalType(proposalType) diff --git a/x/gov/client/cli/parse_test.go b/x/gov/client/cli/parse_test.go index e3c1afa22fd0..e80c8c7c1a49 100644 --- a/x/gov/client/cli/parse_test.go +++ b/x/gov/client/cli/parse_test.go @@ -60,17 +60,57 @@ func TestParseSubmitLegacyProposalFlags(t *testing.T) { // no --proposal, only flags fs.Set(FlagProposal, "") - fs.Set(FlagTitle, proposal1.Title) - fs.Set(FlagDescription, proposal1.Description) - fs.Set(FlagProposalType, proposal1.Type) - fs.Set(FlagDeposit, proposal1.Deposit) - proposal2, err := parseSubmitLegacyProposalFlags(fs) - - require.Nil(t, err, "unexpected error") - require.Equal(t, proposal1.Title, proposal2.Title) - require.Equal(t, proposal1.Description, proposal2.Description) - require.Equal(t, proposal1.Type, proposal2.Type) - require.Equal(t, proposal1.Deposit, proposal2.Deposit) + flagTestCases := map[string]struct { + pTitle string + pDescription string + pType string + expErr bool + errMsg string + }{ + "valid flags": { + pTitle: proposal1.Title, + pDescription: proposal1.Description, + pType: proposal1.Type, + }, + "empty type": { + pTitle: proposal1.Title, + pDescription: proposal1.Description, + expErr: true, + errMsg: "proposal type is required", + }, + "empty title": { + pDescription: proposal1.Description, + pType: proposal1.Type, + expErr: true, + errMsg: "proposal title is required", + }, + "empty description": { + pTitle: proposal1.Title, + pType: proposal1.Type, + expErr: true, + errMsg: "proposal description is required", + }, + } + for name, tc := range flagTestCases { + t.Run(name, func(t *testing.T) { + fs.Set(FlagTitle, tc.pTitle) + fs.Set(FlagDescription, tc.pDescription) + fs.Set(FlagProposalType, tc.pType) + fs.Set(FlagDeposit, proposal1.Deposit) + proposal2, err := parseSubmitLegacyProposalFlags(fs) + + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.errMsg) + } else { + require.NoError(t, err) + require.Equal(t, proposal1.Title, proposal2.Title) + require.Equal(t, proposal1.Description, proposal2.Description) + require.Equal(t, proposal1.Type, proposal2.Type) + require.Equal(t, proposal1.Deposit, proposal2.Deposit) + } + }) + } err = okJSON.Close() require.Nil(t, err, "unexpected error") diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 47fc0ce6a593..4700f8e753fa 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -90,8 +90,8 @@ $ %s query gov proposal 1 return cmd } -// GetCmdQueryProposals implements a query proposals command. Command to Get a -// Proposal Information. +// GetCmdQueryProposals implements a query proposals command. Command to Get +// Proposals Information. func GetCmdQueryProposals() *cobra.Command { cmd := &cobra.Command{ Use: "proposals", @@ -179,7 +179,7 @@ $ %s query gov proposals --page=2 --limit=100 } // GetCmdQueryVote implements the query proposal vote command. Command to Get a -// Proposal Information. +// Vote Information. func GetCmdQueryVote() *cobra.Command { cmd := &cobra.Command{ Use: "vote [proposal-id] [voter-addr]", @@ -234,7 +234,6 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk if vote.Empty() { params := v1.NewQueryVoteParams(proposalID, voterAddr) resByTxQuery, err := gcutils.QueryVoteByTxQuery(clientCtx, params) - if err != nil { return err } @@ -320,13 +319,11 @@ $ %[1]s query gov votes 1 --page=2 --limit=100 ctx, &v1.QueryVotesRequest{ProposalId: proposalID, Pagination: pageReq}, ) - if err != nil { return err } return clientCtx.PrintProto(res) - }, } @@ -337,7 +334,7 @@ $ %[1]s query gov votes 1 --page=2 --limit=100 } // GetCmdQueryDeposit implements the query proposal deposit command. Command to -// get a specific Deposit Information +// get a specific Deposit Information. func GetCmdQueryDeposit() *cobra.Command { cmd := &cobra.Command{ Use: "deposit [proposal-id] [depositer-addr]", @@ -440,7 +437,6 @@ $ %s query gov deposits 1 ctx, &v1.QueryDepositsRequest{ProposalId: proposalID, Pagination: pageReq}, ) - if err != nil { return err } diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index 4a6a37b4da8d..85e821ddebee 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -35,7 +35,7 @@ const ( FlagProposal = "proposal" ) -// ProposalFlags defines the core required fields of a proposal. It is used to +// ProposalFlags defines the core required fields of a legacy proposal. It is used to // verify that these values are not provided in conjunction with a JSON proposal // file. var ProposalFlags = []string{ @@ -47,8 +47,8 @@ var ProposalFlags = []string{ // NewTxCmd returns the transaction commands for this module // governance ModuleClient is slightly different from other ModuleClients in that -// it contains a slice of "proposal" child commands. These commands are respective -// to proposal type handlers that are implemented in other modules but are mounted +// it contains a slice of legacy "proposal" child commands. These commands are respective +// to the proposal type handlers that are implemented in other modules but are mounted // under the governance CLI (eg. parameter change proposals). func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command { govTxCmd := &cobra.Command{ @@ -81,12 +81,12 @@ func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command { // NewCmdSubmitProposal implements submitting a proposal transaction command. func NewCmdSubmitProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "submit-proposal", - Short: "Submit a proposal along with some messages and metadata", + Use: "submit-proposal [path/to/proposal.json]", + Short: "Submit a proposal along with some messages, metadata and deposit", Args: cobra.ExactArgs(1), Long: strings.TrimSpace( - fmt.Sprintf(`Submit a proposal along with some messages and metadata. -Messages, metadata and deposit are defined in a JSON file. + fmt.Sprintf(`Submit a proposal along with some messages, metadata and deposit. +They should be defined in a JSON file. Example: $ %s tx gov submit-proposal path/to/proposal.json @@ -180,7 +180,11 @@ $ %s tx gov submit-legacy-proposal --title="Test Proposal" --description="My awe return err } - content := v1beta1.ContentFromProposalType(proposal.Title, proposal.Description, proposal.Type) + content, ok := v1beta1.ContentFromProposalType(proposal.Title, proposal.Description, proposal.Type) + if !ok { + return fmt.Errorf("failed to create proposal content: unknown proposal type %s", proposal.Type) + } + msg, err := v1beta1.NewMsgSubmitProposal(content, amount, clientCtx.GetFromAddress()) if err != nil { return fmt.Errorf("invalid message: %w", err) diff --git a/x/gov/client/testutil/deposits.go b/x/gov/client/testutil/deposits.go index 8fc74ba1cdc8..ee609ac9f451 100644 --- a/x/gov/client/testutil/deposits.go +++ b/x/gov/client/testutil/deposits.go @@ -42,6 +42,7 @@ func (s *DepositTestSuite) SetupSuite() { deposits := sdk.Coins{ sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0)), + sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens), sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens.Sub(sdk.NewInt(50))), } s.deposits = deposits @@ -103,10 +104,6 @@ func (s *DepositTestSuite) TestQueryDepositsWithoutInitialDeposit() { _, err := MsgDeposit(clientCtx, val.Address.String(), proposalID, depositAmount) s.Require().NoError(err) - // waiting for voting period to end - _, err = s.network.WaitForHeight(2) - s.Require().NoError(err) - // query deposit deposit := s.queryDeposit(val, proposalID, false, "") s.Require().NotNil(deposit) @@ -120,68 +117,45 @@ func (s *DepositTestSuite) TestQueryDepositsWithoutInitialDeposit() { s.Require().Equal(sdk.Coins(deposits.Deposits[0].Amount).String(), depositAmount) } -func (s *DepositTestSuite) TestQueryProposalNotEnoughDeposits() { +func (s *DepositTestSuite) TestQueryDepositsWithInitialDeposit() { val := s.network.Validators[0] - clientCtx := val.ClientCtx proposalID := s.proposalIDs[1] + // query deposit + deposit := s.queryDeposit(val, proposalID, false, "") + s.Require().NotNil(deposit) + s.Require().Equal(sdk.Coins(deposit.Amount).String(), s.deposits[1].String()) + + // query deposits + deposits := s.queryDeposits(val, proposalID, false, "") + s.Require().NotNil(deposits) + s.Require().Len(deposits.Deposits, 1) + // verify initial deposit + s.Require().Equal(sdk.Coins(deposits.Deposits[0].Amount).String(), s.deposits[1].String()) +} + +func (s *DepositTestSuite) TestQueryProposalAfterVotingPeriod() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + proposalID := s.proposalIDs[2] + // query proposal args := []string{proposalID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)} cmd := cli.GetCmdQueryProposal() _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(err) - // waiting for deposit period to end + // waiting for deposit and voting period to end time.Sleep(20 * time.Second) // query proposal _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().Error(err) s.Require().Contains(err.Error(), fmt.Sprintf("proposal %s doesn't exist", proposalID)) -} - -func (s *DepositTestSuite) TestRejectedProposalDeposits() { - // resetting state required (proposal is getting removed from state and proposalID is not in sequence) - s.TearDownSuite() - s.SetupNewSuite() - - val := s.network.Validators[0] - clientCtx := val.ClientCtx - initialDeposit := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens) - id := 1 - proposalID := fmt.Sprintf("%d", id) - - s.submitProposal(val, initialDeposit, id) // query deposits - var deposits v1.QueryDepositsResponse - args := []string{proposalID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)} - cmd := cli.GetCmdQueryDeposits() - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) - s.Require().NoError(err) - s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(out.Bytes(), &deposits)) - s.Require().Equal(len(deposits.Deposits), 1) - // verify initial deposit - s.Require().Equal(sdk.Coins(deposits.Deposits[0].Amount).String(), initialDeposit.String()) - - // vote - _, err = MsgVote(clientCtx, val.Address.String(), proposalID, "no") - s.Require().NoError(err) - - _, err = s.network.WaitForHeight(3) - s.Require().NoError(err) - - args = []string{proposalID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)} - cmd = cli.GetCmdQueryProposal() - _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) - s.Require().NoError(err) - - // query deposits - depositsRes := s.queryDeposits(val, proposalID, false, "") - s.Require().NotNil(depositsRes) - s.Require().Len(depositsRes.Deposits, 1) - // verify initial deposit - s.Require().Equal(sdk.Coins(depositsRes.Deposits[0].Amount).String(), initialDeposit.String()) + deposits := s.queryDeposits(val, proposalID, true, "proposal 3 doesn't exist") + s.Require().Nil(deposits) } func (s *DepositTestSuite) queryDeposits(val *network.Validator, proposalID string, exceptErr bool, message string) *v1.QueryDepositsResponse { diff --git a/x/gov/client/testutil/helpers.go b/x/gov/client/testutil/helpers.go index 0e17ead4a553..6dbb0d8722cb 100644 --- a/x/gov/client/testutil/helpers.go +++ b/x/gov/client/testutil/helpers.go @@ -17,20 +17,6 @@ var commonArgs = []string{ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), } -// MsgSubmitProposal creates a tx for submit proposal -func MsgSubmitProposal(clientCtx client.Context, from, title, description, proposalType string, extraArgs ...string) (testutil.BufferWriter, error) { - args := append([]string{ - fmt.Sprintf("--%s=%s", govcli.FlagTitle, title), - fmt.Sprintf("--%s=%s", govcli.FlagDescription, description), - fmt.Sprintf("--%s=%s", govcli.FlagProposalType, proposalType), - fmt.Sprintf("--%s=%s", flags.FlagFrom, from), - }, commonArgs...) - - args = append(args, extraArgs...) - - return clitestutil.ExecTestCLICmd(clientCtx, govcli.NewCmdSubmitProposal(), args) -} - // MsgSubmitLegacyProposal creates a tx for submit legacy proposal func MsgSubmitLegacyProposal(clientCtx client.Context, from, title, description, proposalType string, extraArgs ...string) (testutil.BufferWriter, error) { args := append([]string{ diff --git a/x/gov/client/testutil/query.go b/x/gov/client/testutil/query.go new file mode 100644 index 000000000000..5f0502a8f039 --- /dev/null +++ b/x/gov/client/testutil/query.go @@ -0,0 +1,536 @@ +package testutil + +import ( + "fmt" + "strings" + + tmcli "github.com/tendermint/tendermint/libs/cli" + + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +func (s *IntegrationTestSuite) TestCmdParams() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectedOutput string + }{ + { + "json output", + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + `{"voting_params":{"voting_period":"172800000000000"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}}`, + }, + { + "text output", + []string{}, + ` +deposit_params: + max_deposit_period: "172800000000000" + min_deposit: + - amount: "10000000" + denom: stake +tally_params: + quorum: "0.334000000000000000" + threshold: "0.500000000000000000" + veto_threshold: "0.334000000000000000" +voting_params: + voting_period: "172800000000000" + `, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryParams() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + s.Require().NoError(err) + s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) + }) + } +} + +func (s *IntegrationTestSuite) TestCmdParam() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectedOutput string + }{ + { + "voting params", + []string{ + "voting", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + `{"voting_period":"172800000000000"}`, + }, + { + "tally params", + []string{ + "tallying", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, + }, + { + "deposit params", + []string{ + "deposit", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryParam() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + s.Require().NoError(err) + s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) + }) + } +} + +func (s *IntegrationTestSuite) TestCmdProposer() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedOutput string + }{ + { + "without proposal id", + []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, + ``, + }, + { + "json output", + []string{ + "1", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + fmt.Sprintf("{\"proposal_id\":\"%s\",\"proposer\":\"%s\"}", "1", val.Address.String()), + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryProposer() + clientCtx := val.ClientCtx + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdTally() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedOutput v1.TallyResult + }{ + { + "without proposal id", + []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, + v1.TallyResult{}, + }, + { + "json output", + []string{ + "2", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + v1.NewTallyResult(sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), + }, + { + "json output", + []string{ + "1", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + v1.NewTallyResult(s.cfg.BondedTokens, sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryTally() + clientCtx := val.ClientCtx + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + var tally v1.TallyResult + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &tally), out.String()) + s.Require().Equal(tally, tc.expectedOutput) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdGetProposal() { + val := s.network.Validators[0] + + title := "Text Proposal 1" + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "get non existing proposal", + []string{ + "10", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, + }, + { + "get proposal with json response", + []string{ + "1", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryProposal() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + var proposal v1.Proposal + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposal), out.String()) + s.Require().Equal(title, proposal.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdGetProposals() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "get proposals as json response", + []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + }, + { + "get proposals with invalid status", + []string{ + "--status=unknown", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryProposals() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + var proposals v1.QueryProposalsResponse + + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposals), out.String()) + s.Require().Len(proposals.Proposals, 3) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdQueryDeposits() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "get deposits of non existing proposal", + []string{ + "10", + }, + true, + }, + { + "get deposits(valid req)", + []string{ + "1", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryDeposits() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + + var deposits v1.QueryDepositsResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &deposits), out.String()) + s.Require().Len(deposits.Deposits, 1) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdQueryDeposit() { + val := s.network.Validators[0] + depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens) + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "get deposit with no depositer", + []string{ + "1", + }, + true, + }, + { + "get deposit with wrong deposit address", + []string{ + "1", + "wrong address", + }, + true, + }, + { + "get deposit (valid req)", + []string{ + "1", + val.Address.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryDeposit() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + + var deposit v1.Deposit + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &deposit), out.String()) + s.Require().Equal(depositAmount.String(), sdk.Coins(deposit.Amount).String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdQueryVotes() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "get votes with no proposal id", + []string{}, + true, + }, + { + "get votes of non existed proposal", + []string{ + "10", + }, + true, + }, + { + "vote for invalid proposal", + []string{ + "1", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryVotes() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + + var votes v1.QueryVotesResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &votes), out.String()) + s.Require().Len(votes.Votes, 1) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdQueryVote() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expVoteOptions v1.WeightedVoteOptions + }{ + { + "get vote of non existing proposal", + []string{ + "10", + val.Address.String(), + }, + true, + v1.NewNonSplitVoteOption(v1.OptionYes), + }, + { + "get vote by wrong voter", + []string{ + "1", + "wrong address", + }, + true, + v1.NewNonSplitVoteOption(v1.OptionYes), + }, + { + "vote for valid proposal", + []string{ + "1", + val.Address.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + v1.NewNonSplitVoteOption(v1.OptionYes), + }, + { + "split vote for valid proposal", + []string{ + "3", + val.Address.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + v1.WeightedVoteOptions{ + &v1.WeightedVoteOption{Option: v1.OptionYes, Weight: sdk.NewDecWithPrec(60, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionNo, Weight: sdk.NewDecWithPrec(30, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionAbstain, Weight: sdk.NewDecWithPrec(5, 2).String()}, + &v1.WeightedVoteOption{Option: v1.OptionNoWithVeto, Weight: sdk.NewDecWithPrec(5, 2).String()}, + }, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryVote() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + + var vote v1.Vote + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &vote), out.String()) + s.Require().Equal(len(vote.Options), len(tc.expVoteOptions)) + for i, option := range tc.expVoteOptions { + s.Require().Equal(option.Option, vote.Options[i].Option) + s.Require().Equal(option.Weight, vote.Options[i].Weight) + } + } + }) + } +} diff --git a/x/gov/client/testutil/suite.go b/x/gov/client/testutil/tx.go similarity index 57% rename from x/gov/client/testutil/suite.go rename to x/gov/client/testutil/tx.go index 94669734abf7..f3f5a52c4913 100644 --- a/x/gov/client/testutil/suite.go +++ b/x/gov/client/testutil/tx.go @@ -3,15 +3,12 @@ package testutil import ( "encoding/base64" "fmt" - "strings" "github.com/cosmos/cosmos-sdk/testutil" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" @@ -83,206 +80,10 @@ func (s *IntegrationTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *IntegrationTestSuite) TestCmdParams() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "json output", - []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - `{"voting_params":{"voting_period":"172800000000000"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}}`, - }, - { - "text output", - []string{}, - ` -deposit_params: - max_deposit_period: "172800000000000" - min_deposit: - - amount: "10000000" - denom: stake -tally_params: - quorum: "0.334000000000000000" - threshold: "0.500000000000000000" - veto_threshold: "0.334000000000000000" -voting_params: - voting_period: "172800000000000" - `, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParams() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - }) - } -} - -func (s *IntegrationTestSuite) TestCmdParam() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "voting params", - []string{ - "voting", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - `{"voting_period":"172800000000000"}`, - }, - { - "tally params", - []string{ - "tallying", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, - }, - { - "deposit params", - []string{ - "deposit", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParam() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - }) - } -} - -func (s *IntegrationTestSuite) TestCmdProposer() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput string - }{ - { - "without proposal id", - []string{ - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, - ``, - }, - { - "json output", - []string{ - "1", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - fmt.Sprintf("{\"proposal_id\":\"%s\",\"proposer\":\"%s\"}", "1", val.Address.String()), - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposer() - clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCmdTally() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expectedOutput v1.TallyResult - }{ - { - "without proposal id", - []string{ - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, - v1.TallyResult{}, - }, - { - "json output", - []string{ - "2", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - v1.NewTallyResult(sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), - }, - { - "json output", - []string{ - "1", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - v1.NewTallyResult(s.cfg.BondedTokens, sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryTally() - clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - var tally v1.TallyResult - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &tally), out.String()) - s.Require().Equal(tally, tc.expectedOutput) - } - }) - } -} - func (s *IntegrationTestSuite) TestNewCmdSubmitProposal() { val := s.network.Validators[0] - // Create an legacy proposal JSON, make sure it doesn't pass this new CLI + // Create a legacy proposal JSON, make sure it doesn't pass this new CLI // command. invalidProp := `{ "title": "", @@ -453,202 +254,6 @@ func (s *IntegrationTestSuite) TestNewCmdSubmitLegacyProposal() { } } -func (s *IntegrationTestSuite) TestCmdGetProposal() { - val := s.network.Validators[0] - - title := "Text Proposal 1" - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get non existing proposal", - []string{ - "10", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, - }, - { - "get proposal with json response", - []string{ - "1", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposal() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - var proposal v1.Proposal - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposal), out.String()) - s.Require().Equal(title, proposal.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCmdGetProposals() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get proposals as json response", - []string{ - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - }, - { - "get proposals with invalid status", - []string{ - "--status=unknown", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryProposals() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - var proposals v1.QueryProposalsResponse - - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposals), out.String()) - s.Require().Len(proposals.Proposals, 3) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCmdQueryDeposits() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get deposits of non existing proposal", - []string{ - "10", - }, - true, - }, - { - "get deposits(valid req)", - []string{ - "1", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDeposits() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var deposits v1.QueryDepositsResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &deposits), out.String()) - s.Require().Len(deposits.Deposits, 1) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCmdQueryDeposit() { - val := s.network.Validators[0] - depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens) - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get deposit with no depositer", - []string{ - "1", - }, - true, - }, - { - "get deposit with wrong deposit address", - []string{ - "1", - "wrong address", - }, - true, - }, - { - "get deposit (valid req)", - []string{ - "1", - val.Address.String(), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryDeposit() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var deposit v1.Deposit - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &deposit), out.String()) - s.Require().Equal(depositAmount.String(), sdk.Coins(deposit.Amount).String()) - } - }) - } -} - func (s *IntegrationTestSuite) TestNewCmdDeposit() { val := s.network.Validators[0] @@ -727,136 +332,6 @@ func (s *IntegrationTestSuite) TestNewCmdDeposit() { } } -func (s *IntegrationTestSuite) TestCmdQueryVotes() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "get votes with no proposal id", - []string{}, - true, - }, - { - "get votes of non existed proposal", - []string{ - "10", - }, - true, - }, - { - "vote for invalid proposal", - []string{ - "1", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryVotes() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var votes v1.QueryVotesResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &votes), out.String()) - s.Require().Len(votes.Votes, 1) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCmdQueryVote() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - expVoteOptions v1.WeightedVoteOptions - }{ - { - "get vote of non existing proposal", - []string{ - "10", - val.Address.String(), - }, - true, - v1.NewNonSplitVoteOption(v1.OptionYes), - }, - { - "get vote by wrong voter", - []string{ - "1", - "wrong address", - }, - true, - v1.NewNonSplitVoteOption(v1.OptionYes), - }, - { - "vote for valid proposal", - []string{ - "1", - val.Address.String(), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - v1.NewNonSplitVoteOption(v1.OptionYes), - }, - { - "split vote for valid proposal", - []string{ - "3", - val.Address.String(), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - v1.WeightedVoteOptions{ - &v1.WeightedVoteOption{Option: v1.OptionYes, Weight: sdk.NewDecWithPrec(60, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionNo, Weight: sdk.NewDecWithPrec(30, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionAbstain, Weight: sdk.NewDecWithPrec(5, 2).String()}, - &v1.WeightedVoteOption{Option: v1.OptionNoWithVeto, Weight: sdk.NewDecWithPrec(5, 2).String()}, - }, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryVote() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - - var vote v1.Vote - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &vote), out.String()) - s.Require().Equal(len(vote.Options), len(tc.expVoteOptions)) - for i, option := range tc.expVoteOptions { - s.Require().Equal(option.Option, vote.Options[i].Option) - s.Require().Equal(option.Weight, vote.Options[i].Weight) - } - } - }) - } -} - func (s *IntegrationTestSuite) TestNewCmdVote() { val := s.network.Validators[0] diff --git a/x/gov/client/utils/query.go b/x/gov/client/utils/query.go index 8c440400d8be..a624d7769556 100644 --- a/x/gov/client/utils/query.go +++ b/x/gov/client/utils/query.go @@ -34,7 +34,7 @@ func (p Proposer) String() string { } // QueryDepositsByTxQuery will query for deposits via a direct txs tags query. It -// will fetch and build deposits directly from the returned txs and return a +// will fetch and build deposits directly from the returned txs and returns a // JSON marshalled result or any error that occurred. // // NOTE: SearchTxs is used to facilitate the txs query which does not currently @@ -103,7 +103,7 @@ func QueryDepositsByTxQuery(clientCtx client.Context, params v1.QueryProposalPar } // QueryVotesByTxQuery will query for votes via a direct txs tags query. It -// will fetch and build votes directly from the returned txs and return a JSON +// will fetch and build votes directly from the returned txs and returns a JSON // marshalled result or any error that occurred. func QueryVotesByTxQuery(clientCtx client.Context, params v1.QueryProposalVotesParams) ([]byte, error) { var ( @@ -298,7 +298,6 @@ func QueryVoteByTxQuery(clientCtx client.Context, params v1.QueryVoteParams) ([] // QueryDepositByTxQuery will query for a single deposit via a direct txs tags // query. func QueryDepositByTxQuery(clientCtx client.Context, params v1.QueryDepositParams) ([]byte, error) { - // initial deposit was submitted with proposal, so must be queried separately initialDeposit, err := queryInitialDepositByTxQuery(clientCtx, params.ProposalID) if err != nil { @@ -477,7 +476,6 @@ func queryInitialDepositByTxQuery(clientCtx client.Context, proposalID uint64) ( fmt.Sprintf("%s.%s='%d'", types.EventTypeSubmitProposal, types.AttributeKeyProposalID, proposalID), }, ) - if err != nil { return v1.Deposit{}, err } diff --git a/x/gov/client/utils/query_test.go b/x/gov/client/utils/query_test.go index e5b1e9b115e0..372c15548fa5 100644 --- a/x/gov/client/utils/query_test.go +++ b/x/gov/client/utils/query_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/rpc/client/mock" - "github.com/tendermint/tendermint/rpc/coretypes" + coretypes "github.com/tendermint/tendermint/rpc/core/types" tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/client" @@ -106,7 +106,8 @@ func TestGetPaginatedVotes(t *testing.T) { }, votes: []v1.Vote{ v1.NewVote(0, acc1, v1.NewNonSplitVoteOption(v1.OptionYes), ""), - v1.NewVote(0, acc2, v1.NewNonSplitVoteOption(v1.OptionYes), "")}, + v1.NewVote(0, acc2, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + }, }, { description: "2MsgPerTx1Chunk", @@ -162,7 +163,7 @@ func TestGetPaginatedVotes(t *testing.T) { tc := tc t.Run(tc.description, func(t *testing.T) { - var marshalled = make([]tmtypes.Tx, len(tc.msgs)) + marshalled := make([]tmtypes.Tx, len(tc.msgs)) cli := TxSearchMock{txs: marshalled, txConfig: encCfg.TxConfig} clientCtx := client.Context{}. WithLegacyAmino(encCfg.Amino). diff --git a/x/gov/common_test.go b/x/gov/common_test.go index ff20ec01cb6b..d4d9bd382d4c 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -80,10 +80,8 @@ func SortByteArrays(src [][]byte) [][]byte { const contextKeyBadProposal = "contextKeyBadProposal" -var ( - pubkeys = []cryptotypes.PubKey{ - ed25519.GenPrivKey().PubKey(), - ed25519.GenPrivKey().PubKey(), - ed25519.GenPrivKey().PubKey(), - } -) +var pubkeys = []cryptotypes.PubKey{ + ed25519.GenPrivKey().PubKey(), + ed25519.GenPrivKey().PubKey(), + ed25519.GenPrivKey().PubKey(), +} diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index 72057751177e..26d933e6ffd2 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -12,14 +12,12 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/gov" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -54,9 +52,9 @@ func TestImportExportQueues(t *testing.T) { require.True(t, proposal1.Status == v1.StatusDepositPeriod) require.True(t, proposal2.Status == v1.StatusVotingPeriod) - authGenState := auth.ExportGenesis(ctx, app.AccountKeeper) + authGenState := app.AccountKeeper.ExportGenesis(ctx) bankGenState := app.BankKeeper.ExportGenesis(ctx) - stakingGenState := staking.ExportGenesis(ctx, app.StakingKeeper) + stakingGenState := app.StakingKeeper.ExportGenesis(ctx) distributionGenState := app.DistrKeeper.ExportGenesis(ctx) // export the state and import it into a new app diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index 08a4bf6de6d8..ee57d91bf257 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -26,10 +26,7 @@ func (keeper Keeper) GetDeposit(ctx sdk.Context, proposalID uint64, depositorAdd func (keeper Keeper) SetDeposit(ctx sdk.Context, deposit v1.Deposit) { store := ctx.KVStore(keeper.storeKey) bz := keeper.cdc.MustMarshal(&deposit) - depositor, err := sdk.AccAddressFromBech32(deposit.Depositor) - if err != nil { - panic(err) - } + depositor := sdk.MustAccAddressFromBech32(deposit.Depositor) store.Set(types.DepositKey(deposit.ProposalId, depositor), bz) } @@ -64,16 +61,14 @@ func (keeper Keeper) DeleteAndBurnDeposits(ctx sdk.Context, proposalID uint64) { panic(err) } - depositor, err := sdk.AccAddressFromBech32(deposit.Depositor) - if err != nil { - panic(err) - } + depositor := sdk.MustAccAddressFromBech32(deposit.Depositor) + store.Delete(types.DepositKey(proposalID, depositor)) return false }) } -// IterateAllDeposits iterates over the all the stored deposits and performs a callback function +// IterateAllDeposits iterates over all the stored deposits and performs a callback function func (keeper Keeper) IterateAllDeposits(ctx sdk.Context, cb func(deposit v1.Deposit) (stop bool)) { store := ctx.KVStore(keeper.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.DepositsKeyPrefix) @@ -91,7 +86,7 @@ func (keeper Keeper) IterateAllDeposits(ctx sdk.Context, cb func(deposit v1.Depo } } -// IterateDeposits iterates over the all the proposals deposits and performs a callback function +// IterateDeposits iterates over all the proposals deposits and performs a callback function func (keeper Keeper) IterateDeposits(ctx sdk.Context, proposalID uint64, cb func(deposit v1.Deposit) (stop bool)) { store := ctx.KVStore(keeper.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.DepositsKey(proposalID)) @@ -172,12 +167,9 @@ func (keeper Keeper) RefundAndDeleteDeposits(ctx sdk.Context, proposalID uint64) store := ctx.KVStore(keeper.storeKey) keeper.IterateDeposits(ctx, proposalID, func(deposit v1.Deposit) bool { - depositor, err := sdk.AccAddressFromBech32(deposit.Depositor) - if err != nil { - panic(err) - } + depositor := sdk.MustAccAddressFromBech32(deposit.Depositor) - err = keeper.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositor, deposit.Amount) + err := keeper.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositor, deposit.Amount) if err != nil { panic(err) } diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index 9183f16deb55..8d0a1986aae0 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -47,7 +47,7 @@ func TestDeposits(t *testing.T) { proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) require.True(t, ok) require.Equal(t, fourStake, sdk.NewCoins(proposal.TotalDeposit...)) - require.Equal(t, addr0Initial.Sub(fourStake), app.BankKeeper.GetAllBalances(ctx, TestAddrs[0])) + require.Equal(t, addr0Initial.Sub(fourStake...), app.BankKeeper.GetAllBalances(ctx, TestAddrs[0])) // Check a second deposit from same address votingStarted, err = app.GovKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fiveStake) @@ -60,7 +60,7 @@ func TestDeposits(t *testing.T) { proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) require.True(t, ok) require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(proposal.TotalDeposit...)) - require.Equal(t, addr0Initial.Sub(fourStake).Sub(fiveStake), app.BankKeeper.GetAllBalances(ctx, TestAddrs[0])) + require.Equal(t, addr0Initial.Sub(fourStake...).Sub(fiveStake...), app.BankKeeper.GetAllBalances(ctx, TestAddrs[0])) // Check third deposit from a new address votingStarted, err = app.GovKeeper.AddDeposit(ctx, proposalID, TestAddrs[1], fourStake) @@ -73,7 +73,7 @@ func TestDeposits(t *testing.T) { proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) require.True(t, ok) require.Equal(t, fourStake.Add(fiveStake...).Add(fourStake...), sdk.NewCoins(proposal.TotalDeposit...)) - require.Equal(t, addr1Initial.Sub(fourStake), app.BankKeeper.GetAllBalances(ctx, TestAddrs[1])) + require.Equal(t, addr1Initial.Sub(fourStake...), app.BankKeeper.GetAllBalances(ctx, TestAddrs[1])) // Check that proposal moved to voting period proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) @@ -109,5 +109,5 @@ func TestDeposits(t *testing.T) { app.GovKeeper.DeleteAndBurnDeposits(ctx, proposalID) deposits = app.GovKeeper.GetDeposits(ctx, proposalID) require.Len(t, deposits, 0) - require.Equal(t, addr0Initial.Sub(fourStake), app.BankKeeper.GetAllBalances(ctx, TestAddrs[0])) + require.Equal(t, addr0Initial.Sub(fourStake...), app.BankKeeper.GetAllBalances(ctx, TestAddrs[0])) } diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index b1ed49010f97..a343d53bf309 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -39,55 +39,50 @@ func (q Keeper) Proposal(c context.Context, req *v1.QueryProposalRequest) (*v1.Q // Proposals implements the Query/Proposals gRPC method func (q Keeper) Proposals(c context.Context, req *v1.QueryProposalsRequest) (*v1.QueryProposalsResponse, error) { - var filteredProposals []*v1.Proposal ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(q.storeKey) proposalStore := prefix.NewStore(store, types.ProposalsKeyPrefix) - pageRes, err := query.FilteredPaginate(proposalStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { - var p v1.Proposal - if err := q.cdc.Unmarshal(value, &p); err != nil { - return false, status.Error(codes.Internal, err.Error()) - } - - matchVoter, matchDepositor, matchStatus := true, true, true - - // match status (if supplied/valid) - if v1.ValidProposalStatus(req.ProposalStatus) { - matchStatus = p.Status == req.ProposalStatus - } + filteredProposals, pageRes, err := query.GenericFilteredPaginate( + q.cdc, + proposalStore, + req.Pagination, + func(key []byte, p *v1.Proposal) (*v1.Proposal, error) { + matchVoter, matchDepositor, matchStatus := true, true, true - // match voter address (if supplied) - if len(req.Voter) > 0 { - voter, err := sdk.AccAddressFromBech32(req.Voter) - if err != nil { - return false, err + // match status (if supplied/valid) + if v1.ValidProposalStatus(req.ProposalStatus) { + matchStatus = p.Status == req.ProposalStatus } - _, matchVoter = q.GetVote(ctx, p.Id, voter) - } + // match voter address (if supplied) + if len(req.Voter) > 0 { + voter, err := sdk.AccAddressFromBech32(req.Voter) + if err != nil { + return nil, err + } - // match depositor (if supplied) - if len(req.Depositor) > 0 { - depositor, err := sdk.AccAddressFromBech32(req.Depositor) - if err != nil { - return false, err + _, matchVoter = q.GetVote(ctx, p.Id, voter) } - _, matchDepositor = q.GetDeposit(ctx, p.Id, depositor) - } - if matchVoter && matchDepositor && matchStatus { - if accumulate { - filteredProposals = append(filteredProposals, &p) + // match depositor (if supplied) + if len(req.Depositor) > 0 { + depositor, err := sdk.AccAddressFromBech32(req.Depositor) + if err != nil { + return nil, err + } + _, matchDepositor = q.GetDeposit(ctx, p.Id, depositor) } - return true, nil - } - - return false, nil - }) + if matchVoter && matchDepositor && matchStatus { + return p, nil + } + return nil, nil + }, func() *v1.Proposal { + return &v1.Proposal{} + }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -149,7 +144,6 @@ func (q Keeper) Votes(c context.Context, req *v1.QueryVotesRequest) (*v1.QueryVo votes = append(votes, &vote) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -238,7 +232,6 @@ func (q Keeper) Deposits(c context.Context, req *v1.QueryDepositsRequest) (*v1.Q deposits = append(deposits, &deposit) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 0c27b32e6e9e..03d93544a628 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -312,6 +312,49 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { } } +func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() { + app, ctx, queryClient := suite.app, suite.ctx, suite.legacyQueryClient + + var req *v1beta1.QueryProposalsRequest + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "valid request", + func() { + req = &v1beta1.QueryProposalsRequest{} + testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal") + msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String()) + suite.Require().NoError(err) + submittedProposal, err := app.GovKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "") + suite.Require().NoError(err) + suite.Require().NotEmpty(submittedProposal) + }, + true, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + proposalRes, err := queryClient.Proposals(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(proposalRes.Proposals) + suite.Require().Equal(len(proposalRes.Proposals), 1) + } else { + suite.Require().Error(err) + suite.Require().Nil(proposalRes) + } + }) + } +} + func (suite *KeeperTestSuite) TestGRPCQueryVote() { app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.queryClient, suite.addrs @@ -426,6 +469,120 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { } } +func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { + app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.legacyQueryClient, suite.addrs + + var ( + req *v1beta1.QueryVoteRequest + expRes *v1beta1.QueryVoteResponse + proposal v1.Proposal + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = &v1beta1.QueryVoteRequest{} + }, + false, + }, + { + "zero proposal id request", + func() { + req = &v1beta1.QueryVoteRequest{ + ProposalId: 0, + Voter: addrs[0].String(), + } + }, + false, + }, + { + "empty voter request", + func() { + req = &v1beta1.QueryVoteRequest{ + ProposalId: 1, + Voter: "", + } + }, + false, + }, + { + "non existed proposal", + func() { + req = &v1beta1.QueryVoteRequest{ + ProposalId: 3, + Voter: addrs[0].String(), + } + }, + false, + }, + { + "no votes present", + func() { + var err error + proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "") + suite.Require().NoError(err) + + req = &v1beta1.QueryVoteRequest{ + ProposalId: proposal.Id, + Voter: addrs[0].String(), + } + + expRes = &v1beta1.QueryVoteResponse{} + }, + false, + }, + { + "valid request", + func() { + proposal.Status = v1.StatusVotingPeriod + app.GovKeeper.SetProposal(ctx, proposal) + suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionAbstain), "")) + + req = &v1beta1.QueryVoteRequest{ + ProposalId: proposal.Id, + Voter: addrs[0].String(), + } + + expRes = &v1beta1.QueryVoteResponse{Vote: v1beta1.Vote{ProposalId: proposal.Id, Voter: addrs[0].String(), Options: []v1beta1.WeightedVoteOption{{Option: v1beta1.OptionAbstain, Weight: sdk.MustNewDecFromStr("1.0")}}}} + }, + true, + }, + { + "wrong voter id request", + func() { + req = &v1beta1.QueryVoteRequest{ + ProposalId: proposal.Id, + Voter: addrs[1].String(), + } + + expRes = &v1beta1.QueryVoteResponse{} + }, + false, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + vote, err := queryClient.Vote(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expRes, vote) + } else { + suite.Require().Error(err) + suite.Require().Nil(vote) + } + }) + } +} + func (suite *KeeperTestSuite) TestGRPCQueryVotes() { app, ctx, queryClient := suite.app, suite.ctx, suite.queryClient @@ -901,6 +1058,108 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { } } +func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { + app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.legacyQueryClient, suite.addrs + + var ( + req *v1beta1.QueryDepositRequest + expRes *v1beta1.QueryDepositResponse + proposal v1.Proposal + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = &v1beta1.QueryDepositRequest{} + }, + false, + }, + { + "zero proposal id request", + func() { + req = &v1beta1.QueryDepositRequest{ + ProposalId: 0, + Depositor: addrs[0].String(), + } + }, + false, + }, + { + "empty deposit address request", + func() { + req = &v1beta1.QueryDepositRequest{ + ProposalId: 1, + Depositor: "", + } + }, + false, + }, + { + "non existed proposal", + func() { + req = &v1beta1.QueryDepositRequest{ + ProposalId: 2, + Depositor: addrs[0].String(), + } + }, + false, + }, + { + "no deposits proposal", + func() { + var err error + proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "") + suite.Require().NoError(err) + suite.Require().NotNil(proposal) + + req = &v1beta1.QueryDepositRequest{ + ProposalId: proposal.Id, + Depositor: addrs[0].String(), + } + }, + false, + }, + { + "valid request", + func() { + depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 20))) + deposit := v1beta1.NewDeposit(proposal.Id, addrs[0], depositCoins) + v1deposit := v1.NewDeposit(proposal.Id, addrs[0], depositCoins) + app.GovKeeper.SetDeposit(ctx, v1deposit) + + req = &v1beta1.QueryDepositRequest{ + ProposalId: proposal.Id, + Depositor: addrs[0].String(), + } + + expRes = &v1beta1.QueryDepositResponse{Deposit: deposit} + }, + true, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + deposit, err := queryClient.Deposit(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(deposit.GetDeposit(), expRes.GetDeposit()) + } else { + suite.Require().Error(err) + suite.Require().Nil(expRes) + } + }) + } +} + func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.queryClient, suite.addrs @@ -995,6 +1254,102 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { } } +func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() { + app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.legacyQueryClient, suite.addrs + + var ( + req *v1beta1.QueryDepositsRequest + expRes *v1beta1.QueryDepositsResponse + proposal v1.Proposal + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = &v1beta1.QueryDepositsRequest{} + }, + false, + }, + { + "zero proposal id request", + func() { + req = &v1beta1.QueryDepositsRequest{ + ProposalId: 0, + } + }, + false, + }, + { + "non existed proposal", + func() { + req = &v1beta1.QueryDepositsRequest{ + ProposalId: 2, + } + }, + true, + }, + { + "create a proposal and get deposits", + func() { + var err error + proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "") + suite.Require().NoError(err) + + req = &v1beta1.QueryDepositsRequest{ + ProposalId: proposal.Id, + } + }, + true, + }, + { + "get deposits with default limit", + func() { + depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 20))) + deposit1 := v1beta1.NewDeposit(proposal.Id, addrs[0], depositAmount1) + v1deposit1 := v1.NewDeposit(proposal.Id, addrs[0], depositAmount1) + app.GovKeeper.SetDeposit(ctx, v1deposit1) + + depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 30))) + deposit2 := v1beta1.NewDeposit(proposal.Id, addrs[1], depositAmount2) + v1deposit2 := v1.NewDeposit(proposal.Id, addrs[1], depositAmount2) + app.GovKeeper.SetDeposit(ctx, v1deposit2) + + deposits := v1beta1.Deposits{deposit1, deposit2} + + req = &v1beta1.QueryDepositsRequest{ + ProposalId: proposal.Id, + } + + expRes = &v1beta1.QueryDepositsResponse{ + Deposits: deposits, + } + }, + true, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + deposits, err := queryClient.Deposits(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expRes.GetDeposits(), deposits.GetDeposits()) + } else { + suite.Require().Error(err) + suite.Require().Nil(deposits) + } + }) + } +} + func (suite *KeeperTestSuite) TestGRPCQueryTally() { app, ctx, queryClient := suite.app, suite.ctx, suite.queryClient @@ -1105,3 +1460,127 @@ func (suite *KeeperTestSuite) TestGRPCQueryTally() { }) } } + +func (suite *KeeperTestSuite) TestLegacyGRPCQueryTally() { + app, ctx, queryClient := suite.app, suite.ctx, suite.legacyQueryClient + + addrs, _ := createValidators(suite.T(), ctx, app, []int64{5, 5, 5}) + + var ( + req *v1beta1.QueryTallyResultRequest + expRes *v1beta1.QueryTallyResultResponse + proposal v1.Proposal + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = &v1beta1.QueryTallyResultRequest{} + }, + false, + }, + { + "zero proposal id request", + func() { + req = &v1beta1.QueryTallyResultRequest{ProposalId: 0} + }, + false, + }, + { + "query non existed proposal", + func() { + req = &v1beta1.QueryTallyResultRequest{ProposalId: 1} + }, + false, + }, + { + "create a proposal and get tally", + func() { + var err error + proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "") + suite.Require().NoError(err) + suite.Require().NotNil(proposal) + + req = &v1beta1.QueryTallyResultRequest{ProposalId: proposal.Id} + + tallyResult := v1beta1.EmptyTallyResult() + expRes = &v1beta1.QueryTallyResultResponse{ + Tally: tallyResult, + } + }, + true, + }, + { + "request tally after few votes", + func() { + proposal.Status = v1.StatusVotingPeriod + app.GovKeeper.SetProposal(ctx, proposal) + + suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), "")) + suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.Id, addrs[1], v1.NewNonSplitVoteOption(v1.OptionYes), "")) + suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.Id, addrs[2], v1.NewNonSplitVoteOption(v1.OptionYes), "")) + + req = &v1beta1.QueryTallyResultRequest{ProposalId: proposal.Id} + + expRes = &v1beta1.QueryTallyResultResponse{ + Tally: v1beta1.TallyResult{ + Yes: sdk.NewInt(3 * 5 * 1000000), + No: sdk.NewInt(0), + Abstain: sdk.NewInt(0), + NoWithVeto: sdk.NewInt(0), + }, + } + }, + true, + }, + { + "request final tally after status changed", + func() { + proposal.Status = v1.StatusPassed + app.GovKeeper.SetProposal(ctx, proposal) + proposal, _ = app.GovKeeper.GetProposal(ctx, proposal.Id) + + req = &v1beta1.QueryTallyResultRequest{ProposalId: proposal.Id} + + expRes = &v1beta1.QueryTallyResultResponse{ + Tally: v1TallyToV1Beta1Tally(*proposal.FinalTallyResult), + } + }, + true, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + tally, err := queryClient.TallyResult(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expRes.String(), tally.String()) + } else { + suite.Require().Error(err) + suite.Require().Nil(tally) + } + }) + } +} + +func v1TallyToV1Beta1Tally(t v1.TallyResult) v1beta1.TallyResult { + yes, _ := sdk.NewIntFromString(t.YesCount) + no, _ := sdk.NewIntFromString(t.NoCount) + noWithVeto, _ := sdk.NewIntFromString(t.NoWithVetoCount) + abstain, _ := sdk.NewIntFromString(t.AbstainCount) + return v1beta1.TallyResult{ + Yes: yes, + No: no, + NoWithVeto: noWithVeto, + Abstain: abstain, + } +} diff --git a/x/gov/keeper/hooks_test.go b/x/gov/keeper/hooks_test.go index 89a6a641e126..19be117333ba 100644 --- a/x/gov/keeper/hooks_test.go +++ b/x/gov/keeper/hooks_test.go @@ -37,9 +37,11 @@ func (h *MockGovHooksReceiver) AfterProposalDeposit(ctx sdk.Context, proposalID func (h *MockGovHooksReceiver) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) { h.AfterProposalVoteValid = true } + func (h *MockGovHooksReceiver) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) { h.AfterProposalFailedMinDepositValid = true } + func (h *MockGovHooksReceiver) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64) { h.AfterProposalVotingPeriodEndedValid = true } diff --git a/x/gov/keeper/invariants.go b/x/gov/keeper/invariants.go index 5179db3d5f82..6e0f9d4e0a51 100644 --- a/x/gov/keeper/invariants.go +++ b/x/gov/keeper/invariants.go @@ -35,7 +35,11 @@ func ModuleAccountInvariant(keeper Keeper, bk types.BankKeeper) sdk.Invariant { macc := keeper.GetGovernanceAccount(ctx) balances := bk.GetAllBalances(ctx, macc.GetAddress()) - broken := !balances.IsEqual(expectedDeposits) + + // Require that the deposit balances are <= than the x/gov module's total + // balances. We use the <= operator since external funds can be sent to x/gov + // module's account and so the balance can be larger. + broken := !balances.IsAllGTE(expectedDeposits) return sdk.FormatInvariant(types.ModuleName, "deposits", fmt.Sprintf("\tgov ModuleAccount coins: %s\n\tsum of deposit amounts: %s\n", diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index bb4491eeb329..4558075f48ac 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -6,10 +6,10 @@ import ( "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/middleware" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -40,7 +40,7 @@ type Keeper struct { legacyRouter v1beta1.Router // Msg server router - router *middleware.MsgServiceRouter + router *baseapp.MsgServiceRouter config types.Config } @@ -55,10 +55,9 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace types.ParamSubspace, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, - legacyRouter v1beta1.Router, router *middleware.MsgServiceRouter, + legacyRouter v1beta1.Router, router *baseapp.MsgServiceRouter, config types.Config, ) Keeper { - // ensure governance module account is set if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) @@ -104,7 +103,7 @@ func (keeper Keeper) Logger(ctx sdk.Context) log.Logger { } // Router returns the gov keeper's router -func (keeper Keeper) Router() *middleware.MsgServiceRouter { +func (keeper Keeper) Router() *baseapp.MsgServiceRouter { return keeper.router } diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index 2b9e09895a4e..95daf0797e62 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -25,6 +25,8 @@ type KeeperTestSuite struct { queryClient v1.QueryClient legacyQueryClient v1beta1.QueryClient addrs []sdk.AccAddress + msgSrvr v1.MsgServer + legacyMsgSrvr v1beta1.MsgServer } func (suite *KeeperTestSuite) SetupTest() { @@ -50,6 +52,10 @@ func (suite *KeeperTestSuite) SetupTest() { suite.ctx = ctx suite.queryClient = queryClient suite.legacyQueryClient = legacyQueryClient + suite.msgSrvr = keeper.NewMsgServerImpl(suite.app.GovKeeper) + + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + suite.legacyMsgSrvr = keeper.NewLegacyMsgServerImpl(govAcct.String(), suite.msgSrvr) suite.addrs = simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(30000000)) } diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 848133cdce21..24e809ce31be 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -12,8 +12,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) type msgServer struct { @@ -105,16 +105,15 @@ func (k msgServer) ExecLegacyContent(goCtx context.Context, msg *v1.MsgExecLegac } return &v1.MsgExecLegacyContentResponse{}, nil - } func (k msgServer) Vote(goCtx context.Context, msg *v1.MsgVote) (*v1.MsgVoteResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - accAddr, accErr := sdk.AccAddressFromBech32(msg.Voter) - if accErr != nil { - return nil, accErr + accAddr, err := sdk.AccAddressFromBech32(msg.Voter) + if err != nil { + return nil, err } - err := k.Keeper.AddVote(ctx, msg.ProposalId, accAddr, v1.NewNonSplitVoteOption(msg.Option), msg.Metadata) + err = k.Keeper.AddVote(ctx, msg.ProposalId, accAddr, v1.NewNonSplitVoteOption(msg.Option), msg.Metadata) if err != nil { return nil, err } diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go new file mode 100644 index 000000000000..5bdd9951089e --- /dev/null +++ b/x/gov/keeper/msg_server_test.go @@ -0,0 +1,734 @@ +package keeper_test + +import ( + "strings" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +func (suite *KeeperTestSuite) TestSubmitProposalReq() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + initialDeposit := coins + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + cases := map[string]struct { + preRun func() (*v1.MsgSubmitProposal, error) + expErr bool + expErrMsg string + }{ + "metadata too long": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + initialDeposit, + proposer.String(), + strings.Repeat("1", 300), + ) + }, + expErr: true, + expErrMsg: "metadata too long", + }, + "many signers": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{testdata.NewTestMsg(govAcct, addrs[0])}, + initialDeposit, + proposer.String(), + "", + ) + }, + expErr: true, + expErrMsg: "expected gov account as only signer for proposal message", + }, + "signer isn't gov account": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{testdata.NewTestMsg(addrs[0])}, + initialDeposit, + proposer.String(), + "", + ) + }, + expErr: true, + expErrMsg: "expected gov account as only signer for proposal message", + }, + "invalid msg handler": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{testdata.NewTestMsg(govAcct)}, + initialDeposit, + proposer.String(), + "", + ) + }, + expErr: true, + expErrMsg: "proposal message not recognized by router", + }, + "all good": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + initialDeposit, + proposer.String(), + "", + ) + }, + expErr: false, + }, + "all good with min deposit": { + preRun: func() (*v1.MsgSubmitProposal, error) { + return v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + }, + expErr: false, + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + msg, err := tc.preRun() + suite.Require().NoError(err) + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + } + }) + } +} + +func (suite *KeeperTestSuite) TestVoteReq() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + proposalId := res.ProposalId + + cases := map[string]struct { + preRun func() uint64 + expErr bool + expErrMsg string + option v1.VoteOption + metadata string + voter sdk.AccAddress + }{ + "vote on inactive proposal": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + coins, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: proposer, + metadata: "", + expErr: true, + expErrMsg: "inactive proposal", + }, + "metadata too long": { + preRun: func() uint64 { + return proposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: proposer, + metadata: strings.Repeat("a", 300), + expErr: true, + expErrMsg: "metadata too long", + }, + "voter error": { + preRun: func() uint64 { + return proposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "address max length is 255", + }, + "all good": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: proposer, + metadata: "", + expErr: false, + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + pId := tc.preRun() + voteReq := v1.NewMsgVote(tc.voter, pId, tc.option, tc.metadata) + _, err := suite.msgSrvr.Vote(suite.ctx, voteReq) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestVoteWeightedReq() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + proposalId := res.ProposalId + + cases := map[string]struct { + preRun func() uint64 + vote *v1.MsgVote + expErr bool + expErrMsg string + option v1.VoteOption + metadata string + voter sdk.AccAddress + }{ + "vote on inactive proposal": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + coins, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: proposer, + metadata: "", + expErr: true, + expErrMsg: "inactive proposal", + }, + "metadata too long": { + preRun: func() uint64 { + return proposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: proposer, + metadata: strings.Repeat("a", 300), + expErr: true, + expErrMsg: "metadata too long", + }, + "voter error": { + preRun: func() uint64 { + return proposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "address max length is 255", + }, + "all good": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1.VoteOption_VOTE_OPTION_YES, + voter: proposer, + metadata: "", + expErr: false, + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + pId := tc.preRun() + voteReq := v1.NewMsgVoteWeighted(tc.voter, pId, v1.NewNonSplitVoteOption(tc.option), tc.metadata) + _, err := suite.msgSrvr.VoteWeighted(suite.ctx, voteReq) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestDepositReq() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + coins, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + pId := res.ProposalId + + cases := map[string]struct { + preRun func() uint64 + expErr bool + proposalId uint64 + depositor sdk.AccAddress + deposit sdk.Coins + options v1.WeightedVoteOptions + }{ + "wrong proposal id": { + preRun: func() uint64 { + return 0 + }, + depositor: proposer, + deposit: coins, + expErr: true, + options: v1.NewNonSplitVoteOption(v1.OptionYes), + }, + "all good": { + preRun: func() uint64 { + return pId + }, + depositor: proposer, + deposit: minDeposit, + expErr: false, + options: v1.NewNonSplitVoteOption(v1.OptionYes), + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + proposalId := tc.preRun() + depositReq := v1.NewMsgDeposit(tc.depositor, proposalId, tc.deposit) + _, err := suite.msgSrvr.Deposit(suite.ctx, depositReq) + if tc.expErr { + suite.Require().Error(err) + } else { + suite.Require().NoError(err) + } + }) + } +} + +// legacy msg server tests +func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + initialDeposit := coins + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + + cases := map[string]struct { + preRun func() (*v1beta1.MsgSubmitProposal, error) + expErr bool + }{ + "all good": { + preRun: func() (*v1beta1.MsgSubmitProposal, error) { + return v1beta1.NewMsgSubmitProposal( + v1beta1.NewTextProposal("test", "I am test"), + initialDeposit, + proposer, + ) + }, + expErr: false, + }, + "all good with min deposit": { + preRun: func() (*v1beta1.MsgSubmitProposal, error) { + return v1beta1.NewMsgSubmitProposal( + v1beta1.NewTextProposal("test", "I am test"), + minDeposit, + proposer, + ) + }, + expErr: false, + }, + } + + for name, c := range cases { + suite.Run(name, func() { + msg, err := c.preRun() + suite.Require().NoError(err) + res, err := suite.legacyMsgSrvr.SubmitProposal(suite.ctx, msg) + if c.expErr { + suite.Require().Error(err) + } else { + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + } + }) + } +} + +func (suite *KeeperTestSuite) TestLegacyMsgVote() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + proposalId := res.ProposalId + + cases := map[string]struct { + preRun func() uint64 + expErr bool + expErrMsg string + option v1beta1.VoteOption + metadata string + voter sdk.AccAddress + }{ + "vote on inactive proposal": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + coins, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1beta1.OptionYes, + voter: proposer, + metadata: "", + expErr: true, + expErrMsg: "inactive proposal", + }, + "voter error": { + preRun: func() uint64 { + return proposalId + }, + option: v1beta1.OptionYes, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "address max length is 255", + }, + "all good": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1beta1.OptionYes, + voter: proposer, + metadata: "", + expErr: false, + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + pId := tc.preRun() + voteReq := v1beta1.NewMsgVote(tc.voter, pId, tc.option) + _, err := suite.legacyMsgSrvr.Vote(suite.ctx, voteReq) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + proposalId := res.ProposalId + + cases := map[string]struct { + preRun func() uint64 + vote *v1beta1.MsgVote + expErr bool + expErrMsg string + option v1beta1.VoteOption + metadata string + voter sdk.AccAddress + }{ + "vote on inactive proposal": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + coins, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1beta1.OptionYes, + voter: proposer, + metadata: "", + expErr: true, + expErrMsg: "inactive proposal", + }, + "voter error": { + preRun: func() uint64 { + return proposalId + }, + option: v1beta1.OptionYes, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "address max length is 255", + }, + "all good": { + preRun: func() uint64 { + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + minDeposit, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + return res.ProposalId + }, + option: v1beta1.OptionYes, + voter: proposer, + metadata: "", + expErr: false, + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + pId := tc.preRun() + voteReq := v1beta1.NewMsgVoteWeighted(tc.voter, pId, v1beta1.NewNonSplitVoteOption(v1beta1.VoteOption(tc.option))) + _, err := suite.legacyMsgSrvr.VoteWeighted(suite.ctx, voteReq) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { + govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + addrs := suite.addrs + proposer := addrs[0] + + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ + FromAddress: govAcct.String(), + ToAddress: proposer.String(), + Amount: coins, + } + + msg, err := v1.NewMsgSubmitProposal( + []sdk.Msg{bankMsg}, + coins, + proposer.String(), + "", + ) + suite.Require().NoError(err) + + res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) + suite.Require().NoError(err) + suite.Require().NotNil(res.ProposalId) + pId := res.ProposalId + + cases := map[string]struct { + preRun func() uint64 + expErr bool + proposalId uint64 + depositor sdk.AccAddress + deposit sdk.Coins + options v1beta1.WeightedVoteOptions + }{ + "wrong proposal id": { + preRun: func() uint64 { + return 0 + }, + depositor: proposer, + deposit: coins, + expErr: true, + options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionYes), + }, + "all good": { + preRun: func() uint64 { + return pId + }, + depositor: proposer, + deposit: minDeposit, + expErr: false, + options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionYes), + }, + } + + for name, tc := range cases { + suite.Run(name, func() { + proposalId := tc.preRun() + depositReq := v1beta1.NewMsgDeposit(tc.depositor, proposalId, tc.deposit) + _, err := suite.legacyMsgSrvr.Deposit(suite.ctx, depositReq) + if tc.expErr { + suite.Require().Error(err) + } else { + suite.Require().NoError(err) + } + }) + } +} diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index bc8cfa98676c..64088859c684 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -10,7 +10,7 @@ import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) -// SubmitProposal create new proposal given an array of messages +// SubmitProposal creates a new proposal given an array of messages func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata string) (v1.Proposal, error) { err := keeper.assertMetadataLength(metadata) if err != nil { @@ -91,7 +91,7 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat return proposal, nil } -// GetProposal get proposal from store by ProposalID. +// GetProposal gets a proposal from store by ProposalID. // Panics if can't unmarshal the proposal. func (keeper Keeper) GetProposal(ctx sdk.Context, proposalID uint64) (v1.Proposal, bool) { store := ctx.KVStore(keeper.storeKey) @@ -109,7 +109,7 @@ func (keeper Keeper) GetProposal(ctx sdk.Context, proposalID uint64) (v1.Proposa return proposal, true } -// SetProposal set a proposal to store. +// SetProposal sets a proposal to store. // Panics if can't marshal the proposal. func (keeper Keeper) SetProposal(ctx sdk.Context, proposal v1.Proposal) { bz, err := keeper.MarshalProposal(proposal) diff --git a/x/gov/keeper/querier.go b/x/gov/keeper/querier.go index b83dc169d993..14e8bc83b2b4 100644 --- a/x/gov/keeper/querier.go +++ b/x/gov/keeper/querier.go @@ -1,5 +1,7 @@ package keeper +// DONTCOVER + import ( abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/gov/keeper/querier_test.go b/x/gov/keeper/querier_test.go index 54a3e9fec49a..d47d87f2a256 100644 --- a/x/gov/keeper/querier_test.go +++ b/x/gov/keeper/querier_test.go @@ -64,7 +64,6 @@ func getQueriedProposals( t *testing.T, ctx sdk.Context, cdc *codec.LegacyAmino, querier sdk.Querier, depositor, voter sdk.AccAddress, status v1.ProposalStatus, page, limit int, ) []*v1.Proposal { - query := abci.RequestQuery{ Path: strings.Join([]string{custom, types.QuerierRoute, v1.QueryProposals}, "/"), Data: cdc.MustMarshalJSON(v1.NewQueryProposalsParams(page, limit, status, voter, depositor)), @@ -128,8 +127,7 @@ func getQueriedVote(t *testing.T, ctx sdk.Context, cdc *codec.LegacyAmino, queri return vote } -func getQueriedVotes(t *testing.T, ctx sdk.Context, cdc *codec.LegacyAmino, querier sdk.Querier, - proposalID uint64, page, limit int) []v1.Vote { +func getQueriedVotes(t *testing.T, ctx sdk.Context, cdc *codec.LegacyAmino, querier sdk.Querier, proposalID uint64, page, limit int) []v1.Vote { query := abci.RequestQuery{ Path: strings.Join([]string{custom, types.QuerierRoute, v1.QueryVote}, "/"), Data: cdc.MustMarshalJSON(v1.NewQueryProposalVotesParams(proposalID, page, limit)), diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index 2e088272f86f..5959989b2490 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -35,11 +35,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool, keeper.IterateVotes(ctx, proposal.Id, func(vote v1.Vote) bool { // if validator, just record it in the map - voter, err := sdk.AccAddressFromBech32(vote.Voter) - - if err != nil { - panic(err) - } + voter := sdk.MustAccAddressFromBech32(vote.Voter) valAddrStr := sdk.ValAddress(voter.Bytes()).String() if val, ok := currValidators[valAddrStr]; ok { @@ -53,7 +49,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool, if val, ok := currValidators[valAddrStr]; ok { // There is no need to handle the special case that validator address equal to voter address. - // Because voter's voting power will tally again even if there will deduct voter's voting power from validator. + // Because voter's voting power will tally again even if there will be deduction of voter's voting power from validator. val.DelegatorDeductions = val.DelegatorDeductions.Add(delegation.GetShares()) currValidators[valAddrStr] = val @@ -102,7 +98,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool, } // If there is not enough quorum of votes, the proposal fails - percentVoting := totalVotingPower.Quo(keeper.sk.TotalBondedTokens(ctx).ToDec()) + percentVoting := totalVotingPower.Quo(sdk.NewDecFromInt(keeper.sk.TotalBondedTokens(ctx))) quorum, _ := sdk.NewDecFromStr(tallyParams.Quorum) if percentVoting.LT(quorum) { return false, false, tallyResults diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index 742b1cc654b7..4e2436ff84b5 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -81,14 +81,12 @@ func (keeper Keeper) GetVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.A func (keeper Keeper) SetVote(ctx sdk.Context, vote v1.Vote) { store := ctx.KVStore(keeper.storeKey) bz := keeper.cdc.MustMarshal(&vote) - addr, err := sdk.AccAddressFromBech32(vote.Voter) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(vote.Voter) + store.Set(types.VoteKey(vote.ProposalId, addr), bz) } -// IterateAllVotes iterates over the all the stored votes and performs a callback function +// IterateAllVotes iterates over all the stored votes and performs a callback function func (keeper Keeper) IterateAllVotes(ctx sdk.Context, cb func(vote v1.Vote) (stop bool)) { store := ctx.KVStore(keeper.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.VotesKeyPrefix) @@ -104,7 +102,7 @@ func (keeper Keeper) IterateAllVotes(ctx sdk.Context, cb func(vote v1.Vote) (sto } } -// IterateVotes iterates over the all the proposals votes and performs a callback function +// IterateVotes iterates over all the proposals votes and performs a callback function func (keeper Keeper) IterateVotes(ctx sdk.Context, proposalID uint64, cb func(vote v1.Vote) (stop bool)) { store := ctx.KVStore(keeper.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.VotesKey(proposalID)) diff --git a/x/gov/migrations/v034/types.go b/x/gov/migrations/v034/types.go deleted file mode 100644 index 83955badd7e8..000000000000 --- a/x/gov/migrations/v034/types.go +++ /dev/null @@ -1,334 +0,0 @@ -// Package v034 is used for legacy migration scripts. Actual migration scripts -// for v034 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v034 - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var ( - _ ProposalContent = TextProposal{} -) - -const ( - ModuleName = "gov" - - StatusNil ProposalStatus = 0x00 - StatusDepositPeriod ProposalStatus = 0x01 - StatusVotingPeriod ProposalStatus = 0x02 - StatusPassed ProposalStatus = 0x03 - StatusRejected ProposalStatus = 0x04 - StatusFailed ProposalStatus = 0x05 - - OptionEmpty VoteOption = 0x00 - OptionYes VoteOption = 0x01 - OptionAbstain VoteOption = 0x02 - OptionNo VoteOption = 0x03 - OptionNoWithVeto VoteOption = 0x04 - - ProposalTypeNil ProposalKind = 0x00 - ProposalTypeText ProposalKind = 0x01 - ProposalTypeParameterChange ProposalKind = 0x02 -) - -type ( - ProposalQueue []uint64 - - ProposalKind byte - - VoteOption byte - ProposalStatus byte - - ProposalContent interface { - GetTitle() string - GetDescription() string - ProposalType() ProposalKind - } - - Proposals []Proposal - - TextProposal struct { - Title string `json:"title"` - Description string `json:"description"` - } - - Proposal struct { - ProposalContent `json:"proposal_content"` - - ProposalID uint64 `json:"proposal_id"` - - Status ProposalStatus `json:"proposal_status"` - FinalTallyResult TallyResult `json:"final_tally_result"` - - SubmitTime time.Time `json:"submit_time"` - DepositEndTime time.Time `json:"deposit_end_time"` - TotalDeposit sdk.Coins `json:"total_deposit"` - - VotingStartTime time.Time `json:"voting_start_time"` - VotingEndTime time.Time `json:"voting_end_time"` - } - - TallyParams struct { - Quorum sdk.Dec `json:"quorum,omitempty"` - Threshold sdk.Dec `json:"threshold,omitempty"` - Veto sdk.Dec `json:"veto,omitempty"` - } - - VotingParams struct { - VotingPeriod time.Duration `json:"voting_period,omitempty"` - } - - TallyResult struct { - Yes sdk.Int `json:"yes"` - Abstain sdk.Int `json:"abstain"` - No sdk.Int `json:"no"` - NoWithVeto sdk.Int `json:"no_with_veto"` - } - - Deposits []Deposit - - Vote struct { - ProposalID uint64 `json:"proposal_id"` - Voter sdk.AccAddress `json:"voter"` - Option VoteOption `json:"option"` - } - - Votes []Vote - - DepositParams struct { - MinDeposit sdk.Coins `json:"min_deposit,omitempty"` - MaxDepositPeriod time.Duration `json:"max_deposit_period,omitempty"` - } - - Deposit struct { - ProposalID uint64 `json:"proposal_id"` - Depositor sdk.AccAddress `json:"depositor"` - Amount sdk.Coins `json:"amount"` - } - - DepositWithMetadata struct { - ProposalID uint64 `json:"proposal_id"` - Deposit Deposit `json:"deposit"` - } - - VoteWithMetadata struct { - ProposalID uint64 `json:"proposal_id"` - Vote Vote `json:"vote"` - } - - GenesisState struct { - StartingProposalID uint64 `json:"starting_proposal_id"` - Deposits []DepositWithMetadata `json:"deposits"` - Votes []VoteWithMetadata `json:"votes"` - Proposals []Proposal `json:"proposals"` - DepositParams DepositParams `json:"deposit_params"` - VotingParams VotingParams `json:"voting_params"` - TallyParams TallyParams `json:"tally_params"` - } -) - -func (tp TextProposal) GetTitle() string { return tp.Title } -func (tp TextProposal) GetDescription() string { return tp.Description } -func (tp TextProposal) ProposalType() ProposalKind { return ProposalTypeText } - -// ProposalStatusToString turns a string into a ProposalStatus -func ProposalStatusFromString(str string) (ProposalStatus, error) { - switch str { - case "DepositPeriod": - return StatusDepositPeriod, nil - - case "VotingPeriod": - return StatusVotingPeriod, nil - - case "Passed": - return StatusPassed, nil - - case "Rejected": - return StatusRejected, nil - - case "Failed": - return StatusFailed, nil - - case "": - return StatusNil, nil - - default: - return ProposalStatus(0xff), fmt.Errorf("'%s' is not a valid proposal status", str) - } -} - -func (status ProposalStatus) Marshal() ([]byte, error) { - return []byte{byte(status)}, nil -} - -func (status *ProposalStatus) Unmarshal(data []byte) error { - *status = ProposalStatus(data[0]) - return nil -} - -func (status ProposalStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(status.String()) -} - -func (status *ProposalStatus) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - - bz2, err := ProposalStatusFromString(s) - if err != nil { - return err - } - - *status = bz2 - return nil -} - -func (status ProposalStatus) String() string { - switch status { - case StatusDepositPeriod: - return "DepositPeriod" - - case StatusVotingPeriod: - return "VotingPeriod" - - case StatusPassed: - return "Passed" - - case StatusRejected: - return "Rejected" - - case StatusFailed: - return "Failed" - - default: - return "" - } -} - -func VoteOptionFromString(str string) (VoteOption, error) { - switch str { - case "Yes": - return OptionYes, nil - - case "Abstain": - return OptionAbstain, nil - - case "No": - return OptionNo, nil - - case "NoWithVeto": - return OptionNoWithVeto, nil - - default: - return VoteOption(0xff), fmt.Errorf("'%s' is not a valid vote option", str) - } -} - -func (vo VoteOption) Marshal() ([]byte, error) { - return []byte{byte(vo)}, nil -} - -func (vo *VoteOption) Unmarshal(data []byte) error { - *vo = VoteOption(data[0]) - return nil -} - -func (vo VoteOption) MarshalJSON() ([]byte, error) { - return json.Marshal(vo.String()) -} - -func (vo *VoteOption) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - - bz2, err := VoteOptionFromString(s) - if err != nil { - return err - } - - *vo = bz2 - return nil -} - -func (vo VoteOption) String() string { - switch vo { - case OptionYes: - return "Yes" - case OptionAbstain: - return "Abstain" - case OptionNo: - return "No" - case OptionNoWithVeto: - return "NoWithVeto" - default: - return "" - } -} - -func ProposalTypeFromString(str string) (ProposalKind, error) { - switch str { - case "Text": - return ProposalTypeText, nil - case "ParameterChange": - return ProposalTypeParameterChange, nil - default: - return ProposalKind(0xff), fmt.Errorf("'%s' is not a valid proposal type", str) - } -} - -func (pt ProposalKind) Marshal() ([]byte, error) { - return []byte{byte(pt)}, nil -} - -func (pt *ProposalKind) Unmarshal(data []byte) error { - *pt = ProposalKind(data[0]) - return nil -} - -func (pt ProposalKind) MarshalJSON() ([]byte, error) { - return json.Marshal(pt.String()) -} - -func (pt *ProposalKind) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - - bz2, err := ProposalTypeFromString(s) - if err != nil { - return err - } - *pt = bz2 - return nil -} - -func (pt ProposalKind) String() string { - switch pt { - case ProposalTypeText: - return "Text" - case ProposalTypeParameterChange: - return "ParameterChange" - default: - return "" - } -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterInterface((*ProposalContent)(nil), nil) - cdc.RegisterConcrete(TextProposal{}, "gov/TextProposal", nil) -} diff --git a/x/gov/migrations/v036/types.go b/x/gov/migrations/v036/types.go deleted file mode 100644 index f46d47f97b2e..000000000000 --- a/x/gov/migrations/v036/types.go +++ /dev/null @@ -1,135 +0,0 @@ -// Package v036 is used for legacy migration scripts. Actual migration scripts -// for v036 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v036 - -import ( - "fmt" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - v034gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v034" -) - -const ( - ModuleName = "gov" - RouterKey = ModuleName - - ProposalTypeText string = "Text" - - MaxDescriptionLength int = 5000 - MaxTitleLength int = 140 -) - -var ( - _ Content = TextProposal{} -) - -type ( - Proposals []Proposal - ProposalQueue []uint64 - - TextProposal struct { - Title string `json:"title"` - Description string `json:"description"` - } - - Content interface { - GetTitle() string - GetDescription() string - ProposalRoute() string - ProposalType() string - ValidateBasic() error - String() string - } - - Proposal struct { - Content `json:"content"` - - ProposalID uint64 `json:"id"` - Status v034gov.ProposalStatus `json:"proposal_status"` - FinalTallyResult v034gov.TallyResult `json:"final_tally_result"` - - SubmitTime time.Time `json:"submit_time"` - DepositEndTime time.Time `json:"deposit_end_time"` - TotalDeposit sdk.Coins `json:"total_deposit"` - - VotingStartTime time.Time `json:"voting_start_time"` - VotingEndTime time.Time `json:"voting_end_time"` - } - - GenesisState struct { - StartingProposalID uint64 `json:"starting_proposal_id"` - Deposits v034gov.Deposits `json:"deposits"` - Votes v034gov.Votes `json:"votes"` - Proposals []Proposal `json:"proposals"` - DepositParams v034gov.DepositParams `json:"deposit_params"` - VotingParams v034gov.VotingParams `json:"voting_params"` - TallyParams v034gov.TallyParams `json:"tally_params"` - } -) - -func NewGenesisState( - startingProposalID uint64, deposits v034gov.Deposits, votes v034gov.Votes, proposals []Proposal, - depositParams v034gov.DepositParams, votingParams v034gov.VotingParams, tallyParams v034gov.TallyParams, -) GenesisState { - - return GenesisState{ - StartingProposalID: startingProposalID, - Deposits: deposits, - Votes: votes, - Proposals: proposals, - DepositParams: depositParams, - VotingParams: votingParams, - TallyParams: tallyParams, - } -} - -func NewTextProposal(title, description string) Content { - return TextProposal{title, description} -} - -func (tp TextProposal) GetTitle() string { return tp.Title } -func (tp TextProposal) GetDescription() string { return tp.Description } -func (tp TextProposal) ProposalRoute() string { return RouterKey } -func (tp TextProposal) ProposalType() string { return ProposalTypeText } -func (tp TextProposal) ValidateBasic() error { return ValidateAbstract(tp) } - -func (tp TextProposal) String() string { - return fmt.Sprintf(`Text Proposal: - Title: %s - Description: %s -`, tp.Title, tp.Description) -} - -func ErrInvalidProposalContent(msg string) error { - return fmt.Errorf("invalid proposal content: %s", msg) -} - -func ValidateAbstract(c Content) error { - title := c.GetTitle() - if len(strings.TrimSpace(title)) == 0 { - return ErrInvalidProposalContent("proposal title cannot be blank") - } - if len(title) > MaxTitleLength { - return ErrInvalidProposalContent(fmt.Sprintf("proposal title is longer than max length of %d", MaxTitleLength)) - } - - description := c.GetDescription() - if len(description) == 0 { - return ErrInvalidProposalContent("proposal description cannot be blank") - } - if len(description) > MaxDescriptionLength { - return ErrInvalidProposalContent(fmt.Sprintf("proposal description is longer than max length of %d", MaxDescriptionLength)) - } - - return nil -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterInterface((*Content)(nil), nil) - cdc.RegisterConcrete(TextProposal{}, "cosmos-sdk/TextProposal", nil) -} diff --git a/x/gov/migrations/v040/migrate.go b/x/gov/migrations/v040/migrate.go deleted file mode 100644 index fff6adb103a1..000000000000 --- a/x/gov/migrations/v040/migrate.go +++ /dev/null @@ -1,208 +0,0 @@ -package v040 - -import ( - "fmt" - - proto "github.com/gogo/protobuf/proto" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - v036distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v036" - v040distr "github.com/cosmos/cosmos-sdk/x/distribution/types" - v034gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v034" - v036gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v036" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - v036params "github.com/cosmos/cosmos-sdk/x/params/migrations/v036" - v040params "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - v038upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/migrations/v038" - v040upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/types" -) - -func migrateVoteOption(oldVoteOption v034gov.VoteOption) v040gov.VoteOption { - switch oldVoteOption { - case v034gov.OptionEmpty: - return v040gov.OptionEmpty - - case v034gov.OptionYes: - return v040gov.OptionYes - - case v034gov.OptionAbstain: - return v040gov.OptionAbstain - - case v034gov.OptionNo: - return v040gov.OptionNo - - case v034gov.OptionNoWithVeto: - return v040gov.OptionNoWithVeto - - default: - panic(fmt.Errorf("'%s' is not a valid vote option", oldVoteOption)) - } -} - -func migrateProposalStatus(oldProposalStatus v034gov.ProposalStatus) v040gov.ProposalStatus { - switch oldProposalStatus { - - case v034gov.StatusNil: - return v040gov.StatusNil - - case v034gov.StatusDepositPeriod: - return v040gov.StatusDepositPeriod - - case v034gov.StatusVotingPeriod: - return v040gov.StatusVotingPeriod - - case v034gov.StatusPassed: - return v040gov.StatusPassed - - case v034gov.StatusRejected: - return v040gov.StatusRejected - - case v034gov.StatusFailed: - return v040gov.StatusFailed - - default: - panic(fmt.Errorf("'%s' is not a valid proposal status", oldProposalStatus)) - } -} - -func migrateContent(oldContent v036gov.Content) *codectypes.Any { - var protoProposal proto.Message - - switch oldContent := oldContent.(type) { - case v036gov.TextProposal: - { - protoProposal = &v040gov.TextProposal{ - Title: oldContent.Title, - Description: oldContent.Description, - } - // Convert the content into Any. - contentAny, err := codectypes.NewAnyWithValue(protoProposal) - if err != nil { - panic(err) - } - - return contentAny - } - case v036distr.CommunityPoolSpendProposal: - { - protoProposal = &v040distr.CommunityPoolSpendProposal{ - Title: oldContent.Title, - Description: oldContent.Description, - Recipient: oldContent.Recipient.String(), - Amount: oldContent.Amount, - } - } - case v038upgrade.CancelSoftwareUpgradeProposal: - { - protoProposal = &v040upgrade.CancelSoftwareUpgradeProposal{ - Description: oldContent.Description, - Title: oldContent.Title, - } - } - case v038upgrade.SoftwareUpgradeProposal: - { - protoProposal = &v040upgrade.SoftwareUpgradeProposal{ - Description: oldContent.Description, - Title: oldContent.Title, - Plan: v040upgrade.Plan{ - Name: oldContent.Plan.Name, - Height: oldContent.Plan.Height, - Info: oldContent.Plan.Info, - }, - } - } - case v036params.ParameterChangeProposal: - { - newChanges := make([]v040params.ParamChange, len(oldContent.Changes)) - for i, oldChange := range oldContent.Changes { - newChanges[i] = v040params.ParamChange{ - Subspace: oldChange.Subspace, - Key: oldChange.Key, - Value: oldChange.Value, - } - } - - protoProposal = &v040params.ParameterChangeProposal{ - Description: oldContent.Description, - Title: oldContent.Title, - Changes: newChanges, - } - } - default: - panic(fmt.Errorf("%T is not a valid proposal content type", oldContent)) - } - - // Convert the content into Any. - contentAny, err := codectypes.NewAnyWithValue(protoProposal) - if err != nil { - panic(err) - } - - return contentAny -} - -// Migrate accepts exported v0.36 x/gov genesis state and migrates it to -// v0.40 x/gov genesis state. The migration includes: -// -// - Convert vote option & proposal status from byte to enum. -// - Migrate proposal content to Any. -// - Convert addresses from bytes to bech32 strings. -// - Re-encode in v0.40 GenesisState. -func Migrate(oldGovState v036gov.GenesisState) *v040gov.GenesisState { - newDeposits := make([]v040gov.Deposit, len(oldGovState.Deposits)) - for i, oldDeposit := range oldGovState.Deposits { - newDeposits[i] = v040gov.Deposit{ - ProposalId: oldDeposit.ProposalID, - Depositor: oldDeposit.Depositor.String(), - Amount: oldDeposit.Amount, - } - } - - newVotes := make([]v040gov.Vote, len(oldGovState.Votes)) - for i, oldVote := range oldGovState.Votes { - newVotes[i] = v040gov.Vote{ - ProposalId: oldVote.ProposalID, - Voter: oldVote.Voter.String(), - Option: migrateVoteOption(oldVote.Option), - } - } - - newProposals := make([]v040gov.Proposal, len(oldGovState.Proposals)) - for i, oldProposal := range oldGovState.Proposals { - newProposals[i] = v040gov.Proposal{ - ProposalId: oldProposal.ProposalID, - Content: migrateContent(oldProposal.Content), - Status: migrateProposalStatus(oldProposal.Status), - FinalTallyResult: v040gov.TallyResult{ - Yes: oldProposal.FinalTallyResult.Yes, - Abstain: oldProposal.FinalTallyResult.Abstain, - No: oldProposal.FinalTallyResult.No, - NoWithVeto: oldProposal.FinalTallyResult.NoWithVeto, - }, - SubmitTime: oldProposal.SubmitTime, - DepositEndTime: oldProposal.DepositEndTime, - TotalDeposit: oldProposal.TotalDeposit, - VotingStartTime: oldProposal.VotingStartTime, - VotingEndTime: oldProposal.VotingEndTime, - } - } - - return &v040gov.GenesisState{ - StartingProposalId: oldGovState.StartingProposalID, - Deposits: newDeposits, - Votes: newVotes, - Proposals: newProposals, - DepositParams: v040gov.DepositParams{ - MinDeposit: oldGovState.DepositParams.MinDeposit, - MaxDepositPeriod: oldGovState.DepositParams.MaxDepositPeriod, - }, - VotingParams: v040gov.VotingParams{ - VotingPeriod: oldGovState.VotingParams.VotingPeriod, - }, - TallyParams: v040gov.TallyParams{ - Quorum: oldGovState.TallyParams.Quorum, - Threshold: oldGovState.TallyParams.Threshold, - VetoThreshold: oldGovState.TallyParams.Veto, - }, - } -} diff --git a/x/gov/migrations/v040/migrate_test.go b/x/gov/migrations/v040/migrate_test.go deleted file mode 100644 index 6aeace7b1444..000000000000 --- a/x/gov/migrations/v040/migrate_test.go +++ /dev/null @@ -1,239 +0,0 @@ -package v040_test - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - v036distr "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v036" - v036gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v036" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v040" - v036params "github.com/cosmos/cosmos-sdk/x/params/migrations/v036" - v038upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/migrations/v038" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithCodec(encodingConfig.Codec) - - recipient, err := sdk.AccAddressFromBech32("cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh") - require.NoError(t, err) - govGenState := v036gov.GenesisState{ - Proposals: []v036gov.Proposal{ - { - Content: v036gov.TextProposal{ - Title: "foo_text", - Description: "bar_text", - }, - }, - { - Content: v036distr.CommunityPoolSpendProposal{ - Title: "foo_community", - Description: "bar_community", - Recipient: recipient, - Amount: sdk.NewCoins(sdk.NewCoin("footoken", sdk.NewInt(2))), - }, - }, - { - Content: v038upgrade.CancelSoftwareUpgradeProposal{ - Title: "foo_cancel_upgrade", - Description: "bar_cancel_upgrade", - }, - }, - { - Content: v038upgrade.SoftwareUpgradeProposal{ - Title: "foo_software_upgrade", - Description: "bar_software_upgrade", - Plan: v038upgrade.Plan{ - Name: "foo_upgrade_name", - Height: 123, - Info: "foo_upgrade_info", - }, - }, - }, - { - Content: v036params.ParameterChangeProposal{ - Title: "foo_param_change", - Description: "bar_param_change", - Changes: []v036params.ParamChange{ - { - Subspace: "foo_param_change_subspace", - Key: "foo_param_change_key", - Subkey: "foo_param_change_subkey", - Value: "foo_param_change_value", - }, - }, - }, - }, - }, - } - - migrated := v040gov.Migrate(govGenState) - - bz, err := clientCtx.Codec.MarshalJSON(migrated) - require.NoError(t, err) - - // Indent the JSON bz correctly. - var jsonObj map[string]interface{} - err = json.Unmarshal(bz, &jsonObj) - require.NoError(t, err) - indentedBz, err := json.MarshalIndent(jsonObj, "", "\t") - require.NoError(t, err) - - // Make sure about: - // - TextProposal has correct JSON. - // - CommunityPoolSpendProposal has correct JSON. - // - CancelSoftwareUpgradeProposal has correct JSON. - // - SoftwareUpgradeProposal has correct JSON. - // - ParameterChangeProposal has correct JSON. - expected := `{ - "deposit_params": { - "max_deposit_period": "0s", - "min_deposit": [] - }, - "deposits": [], - "proposals": [ - { - "content": { - "@type": "/cosmos.gov.v1beta1.TextProposal", - "description": "bar_text", - "title": "foo_text" - }, - "deposit_end_time": "0001-01-01T00:00:00Z", - "final_tally_result": { - "abstain": "0", - "no": "0", - "no_with_veto": "0", - "yes": "0" - }, - "proposal_id": "0", - "status": "PROPOSAL_STATUS_UNSPECIFIED", - "submit_time": "0001-01-01T00:00:00Z", - "total_deposit": [], - "voting_end_time": "0001-01-01T00:00:00Z", - "voting_start_time": "0001-01-01T00:00:00Z" - }, - { - "content": { - "@type": "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal", - "amount": [ - { - "amount": "2", - "denom": "footoken" - } - ], - "description": "bar_community", - "recipient": "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh", - "title": "foo_community" - }, - "deposit_end_time": "0001-01-01T00:00:00Z", - "final_tally_result": { - "abstain": "0", - "no": "0", - "no_with_veto": "0", - "yes": "0" - }, - "proposal_id": "0", - "status": "PROPOSAL_STATUS_UNSPECIFIED", - "submit_time": "0001-01-01T00:00:00Z", - "total_deposit": [], - "voting_end_time": "0001-01-01T00:00:00Z", - "voting_start_time": "0001-01-01T00:00:00Z" - }, - { - "content": { - "@type": "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", - "description": "bar_cancel_upgrade", - "title": "foo_cancel_upgrade" - }, - "deposit_end_time": "0001-01-01T00:00:00Z", - "final_tally_result": { - "abstain": "0", - "no": "0", - "no_with_veto": "0", - "yes": "0" - }, - "proposal_id": "0", - "status": "PROPOSAL_STATUS_UNSPECIFIED", - "submit_time": "0001-01-01T00:00:00Z", - "total_deposit": [], - "voting_end_time": "0001-01-01T00:00:00Z", - "voting_start_time": "0001-01-01T00:00:00Z" - }, - { - "content": { - "@type": "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", - "description": "bar_software_upgrade", - "plan": { - "height": "123", - "info": "foo_upgrade_info", - "name": "foo_upgrade_name", - "time": "0001-01-01T00:00:00Z", - "upgraded_client_state": null - }, - "title": "foo_software_upgrade" - }, - "deposit_end_time": "0001-01-01T00:00:00Z", - "final_tally_result": { - "abstain": "0", - "no": "0", - "no_with_veto": "0", - "yes": "0" - }, - "proposal_id": "0", - "status": "PROPOSAL_STATUS_UNSPECIFIED", - "submit_time": "0001-01-01T00:00:00Z", - "total_deposit": [], - "voting_end_time": "0001-01-01T00:00:00Z", - "voting_start_time": "0001-01-01T00:00:00Z" - }, - { - "content": { - "@type": "/cosmos.params.v1beta1.ParameterChangeProposal", - "changes": [ - { - "key": "foo_param_change_key", - "subspace": "foo_param_change_subspace", - "value": "foo_param_change_value" - } - ], - "description": "bar_param_change", - "title": "foo_param_change" - }, - "deposit_end_time": "0001-01-01T00:00:00Z", - "final_tally_result": { - "abstain": "0", - "no": "0", - "no_with_veto": "0", - "yes": "0" - }, - "proposal_id": "0", - "status": "PROPOSAL_STATUS_UNSPECIFIED", - "submit_time": "0001-01-01T00:00:00Z", - "total_deposit": [], - "voting_end_time": "0001-01-01T00:00:00Z", - "voting_start_time": "0001-01-01T00:00:00Z" - } - ], - "starting_proposal_id": "0", - "tally_params": { - "quorum": "0", - "threshold": "0", - "veto_threshold": "0" - }, - "votes": [], - "voting_params": { - "voting_period": "0s" - } -}` - - require.Equal(t, expected, string(indentedBz)) -} diff --git a/x/gov/migrations/v040/keys.go b/x/gov/migrations/v042/types.go similarity index 97% rename from x/gov/migrations/v040/keys.go rename to x/gov/migrations/v042/types.go index 5b8a6536cafa..417b2401fac6 100644 --- a/x/gov/migrations/v040/keys.go +++ b/x/gov/migrations/v042/types.go @@ -1,6 +1,7 @@ +package v042 + // Package v040 is copy-pasted from: // https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/gov/types/keys.go -package v040 import ( "encoding/binary" @@ -8,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" ) const ( @@ -153,7 +154,7 @@ func splitKeyWithTime(key []byte) (proposalID uint64, endTime time.Time) { } func splitKeyWithAddress(key []byte) (proposalID uint64, addr sdk.AccAddress) { - kv.AssertKeyLength(key[1:], 8+v040auth.AddrLen) + kv.AssertKeyLength(key[1:], 8+v042auth.AddrLen) kv.AssertKeyAtLeastLength(key, 10) proposalID = GetProposalIDFromBytes(key[1:9]) diff --git a/x/gov/migrations/v043/store_test.go b/x/gov/migrations/v043/store_test.go index 56d2ae2d815b..1ae662d818eb 100644 --- a/x/gov/migrations/v043/store_test.go +++ b/x/gov/migrations/v043/store_test.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v040" + v042gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -40,32 +40,32 @@ func TestMigrateStore(t *testing.T) { }{ { "ProposalKey", - v040gov.ProposalKey(proposalID), dummyValue, + v042gov.ProposalKey(proposalID), dummyValue, types.ProposalKey(proposalID), dummyValue, }, { "ActiveProposalQueue", - v040gov.ActiveProposalQueueKey(proposalID, now), dummyValue, + v042gov.ActiveProposalQueueKey(proposalID, now), dummyValue, types.ActiveProposalQueueKey(proposalID, now), dummyValue, }, { "InactiveProposalQueue", - v040gov.InactiveProposalQueueKey(proposalID, now), dummyValue, + v042gov.InactiveProposalQueueKey(proposalID, now), dummyValue, types.InactiveProposalQueueKey(proposalID, now), dummyValue, }, { "ProposalIDKey", - v040gov.ProposalIDKey, dummyValue, + v042gov.ProposalIDKey, dummyValue, types.ProposalIDKey, dummyValue, }, { "DepositKey", - v040gov.DepositKey(proposalID, addr1), dummyValue, + v042gov.DepositKey(proposalID, addr1), dummyValue, types.DepositKey(proposalID, addr1), dummyValue, }, { "VotesKeyPrefix", - v040gov.VoteKey(proposalID, addr1), oldVoteValue, + v042gov.VoteKey(proposalID, addr1), oldVoteValue, types.VoteKey(proposalID, addr1), newVoteValue, }, } diff --git a/x/gov/migrations/v046/convert.go b/x/gov/migrations/v046/convert.go index edeb839acc17..a3f383006b5c 100644 --- a/x/gov/migrations/v046/convert.go +++ b/x/gov/migrations/v046/convert.go @@ -6,8 +6,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // ConvertToLegacyProposal takes a new proposal and attempts to convert it to the diff --git a/x/gov/migrations/v046/convert_test.go b/x/gov/migrations/v046/convert_test.go new file mode 100644 index 000000000000..64375e796aef --- /dev/null +++ b/x/gov/migrations/v046/convert_test.go @@ -0,0 +1,174 @@ +package v046_test + +import ( + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/stretchr/testify/require" +) + +func TestConvertToLegacyProposal(t *testing.T) { + propTime := time.Unix(1e9, 0) + legacyContentMsg, err := v1.NewLegacyContent(v1beta1.NewTextProposal("title", "description"), "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh") + require.NoError(t, err) + msgs := []sdk.Msg{legacyContentMsg} + msgsAny, err := tx.SetMsgs(msgs) + require.NoError(t, err) + proposal := v1.Proposal{ + Id: 1, + Status: v1.StatusDepositPeriod, + Messages: msgsAny, + SubmitTime: &propTime, + DepositEndTime: &propTime, + VotingStartTime: &propTime, + VotingEndTime: &propTime, + Metadata: "proposal metadata", + } + + testCases := map[string]struct { + tallyResult v1.TallyResult + expErr bool + }{ + "valid": { + tallyResult: v1.EmptyTallyResult(), + }, + "invalid final tally result": { + tallyResult: v1.TallyResult{}, + expErr: true, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + proposal.FinalTallyResult = &tc.tallyResult + v1beta1Proposal, err := v046.ConvertToLegacyProposal(proposal) + if tc.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, v1beta1Proposal.ProposalId, proposal.Id) + require.Equal(t, v1beta1Proposal.VotingStartTime, *proposal.VotingStartTime) + require.Equal(t, v1beta1Proposal.VotingEndTime, *proposal.VotingEndTime) + require.Equal(t, v1beta1Proposal.SubmitTime, *proposal.SubmitTime) + require.Equal(t, v1beta1Proposal.DepositEndTime, *proposal.DepositEndTime) + require.Equal(t, v1beta1Proposal.FinalTallyResult.Yes, sdk.NewInt(0)) + require.Equal(t, v1beta1Proposal.FinalTallyResult.No, sdk.NewInt(0)) + require.Equal(t, v1beta1Proposal.FinalTallyResult.NoWithVeto, sdk.NewInt(0)) + require.Equal(t, v1beta1Proposal.FinalTallyResult.Abstain, sdk.NewInt(0)) + } + }) + } +} + +func TestConvertToLegacyTallyResult(t *testing.T) { + tallyResult := v1.EmptyTallyResult() + testCases := map[string]struct { + tallyResult v1.TallyResult + expErr bool + }{ + "valid": { + tallyResult: tallyResult, + }, + "invalid yes count": { + tallyResult: v1.TallyResult{ + YesCount: "invalid", + NoCount: tallyResult.NoCount, + AbstainCount: tallyResult.AbstainCount, + NoWithVetoCount: tallyResult.NoWithVetoCount, + }, + expErr: true, + }, + "invalid no count": { + tallyResult: v1.TallyResult{ + YesCount: tallyResult.YesCount, + NoCount: "invalid", + AbstainCount: tallyResult.AbstainCount, + NoWithVetoCount: tallyResult.NoWithVetoCount, + }, + expErr: true, + }, + "invalid abstain count": { + tallyResult: v1.TallyResult{ + YesCount: tallyResult.YesCount, + NoCount: tallyResult.NoCount, + AbstainCount: "invalid", + NoWithVetoCount: tallyResult.NoWithVetoCount, + }, + expErr: true, + }, + "invalid no with veto count": { + tallyResult: v1.TallyResult{ + YesCount: tallyResult.YesCount, + NoCount: tallyResult.NoCount, + AbstainCount: tallyResult.AbstainCount, + NoWithVetoCount: "invalid", + }, + expErr: true, + }, + } + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + _, err := v046.ConvertToLegacyTallyResult(&tc.tallyResult) + if tc.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestConvertToLegacyVote(t *testing.T) { + vote := v1.Vote{ + ProposalId: 1, + Voter: "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh", + Metadata: "vote metadata", + } + + testCases := map[string]struct { + options []*v1.WeightedVoteOption + expErr bool + }{ + "valid": { + options: v1.NewNonSplitVoteOption(v1.OptionYes), + }, + "invalid options": { + options: []*v1.WeightedVoteOption{{Option: 1, Weight: "invalid"}}, + expErr: true, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + vote.Options = tc.options + v1beta1Vote, err := v046.ConvertToLegacyVote(vote) + if tc.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, v1beta1Vote.ProposalId, vote.ProposalId) + require.Equal(t, v1beta1Vote.Voter, vote.Voter) + require.Equal(t, v1beta1Vote.Options[0].Option, v1beta1.OptionYes) + require.Equal(t, v1beta1Vote.Options[0].Weight, sdk.NewDec(1)) + } + }) + } +} + +func TestConvertToLegacyDeposit(t *testing.T) { + deposit := v1.Deposit{ + ProposalId: 1, + Depositor: "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh", + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1))), + } + + v1beta1Deposit := v046.ConvertToLegacyDeposit(&deposit) + require.Equal(t, v1beta1Deposit.ProposalId, deposit.ProposalId) + require.Equal(t, v1beta1Deposit.Depositor, deposit.Depositor) + require.Equal(t, v1beta1Deposit.Amount[0], deposit.Amount[0]) +} diff --git a/x/gov/migrations/v046/store.go b/x/gov/migrations/v046/store.go index 20f367fedeb0..c0ad36dfb4b7 100644 --- a/x/gov/migrations/v046/store.go +++ b/x/gov/migrations/v046/store.go @@ -5,14 +5,14 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - v040 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v040" + v042 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // migrateProposals migrates all legacy proposals into MsgExecLegacyContent // proposals. func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { - propStore := prefix.NewStore(store, v040.ProposalsKeyPrefix) + propStore := prefix.NewStore(store, v042.ProposalsKeyPrefix) iter := propStore.Iterator(nil, nil) defer iter.Close() diff --git a/x/gov/migrations/v046/store_test.go b/x/gov/migrations/v046/store_test.go index 71f73b318f02..a9318f9390a9 100644 --- a/x/gov/migrations/v046/store_test.go +++ b/x/gov/migrations/v046/store_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v040" + v042gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" v046gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -36,20 +36,20 @@ func TestMigrateStore(t *testing.T) { prop2Bz, err := cdc.Marshal(&prop2) require.NoError(t, err) - store.Set(v040gov.ProposalKey(prop1.ProposalId), prop1Bz) - store.Set(v040gov.ProposalKey(prop2.ProposalId), prop2Bz) + store.Set(v042gov.ProposalKey(prop1.ProposalId), prop1Bz) + store.Set(v042gov.ProposalKey(prop2.ProposalId), prop2Bz) // Run migrations. err = v046gov.MigrateStore(ctx, govKey, cdc) require.NoError(t, err) var newProp1 v1.Proposal - err = cdc.Unmarshal(store.Get(v040gov.ProposalKey(prop1.ProposalId)), &newProp1) + err = cdc.Unmarshal(store.Get(v042gov.ProposalKey(prop1.ProposalId)), &newProp1) require.NoError(t, err) compareProps(t, prop1, newProp1) var newProp2 v1.Proposal - err = cdc.Unmarshal(store.Get(v040gov.ProposalKey(prop2.ProposalId)), &newProp2) + err = cdc.Unmarshal(store.Get(v042gov.ProposalKey(prop2.ProposalId)), &newProp2) require.NoError(t, err) compareProps(t, prop2, newProp2) } diff --git a/x/gov/module.go b/x/gov/module.go index 875c00437752..a495bfea2b0d 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -8,7 +8,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -74,11 +73,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return v1.ValidateGenesis(&data) } -// RegisterRESTRoutes registers the REST routes for the gov module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/gov` legacy REST implementation -// has been removed from the SDK. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := v1.RegisterQueryHandlerClient(context.Background(), mux, v1.NewQueryClient(clientCtx)); err != nil { @@ -199,9 +193,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 3 } -// BeginBlock performs a no-op. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - // EndBlock returns the end blocker for the gov module. It returns no validator // updates. func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { diff --git a/x/gov/simulation/decoder_test.go b/x/gov/simulation/decoder_test.go index 3f0d68a38263..7d9ac2e5bc90 100644 --- a/x/gov/simulation/decoder_test.go +++ b/x/gov/simulation/decoder_test.go @@ -27,7 +27,8 @@ func TestDecodeStore(t *testing.T) { dec := simulation.NewDecodeStore(cdc) endTime := time.Now().UTC() - content := v1beta1.ContentFromProposalType("test", "test", v1beta1.ProposalTypeText) + content, ok := v1beta1.ContentFromProposalType("test", "test", v1beta1.ProposalTypeText) + require.True(t, ok) proposalA, err := v1beta1.NewProposal(content, 1, endTime, endTime.Add(24*time.Hour)) require.NoError(t, err) proposalB, err := v1beta1.NewProposal(content, 2, endTime, endTime.Add(24*time.Hour)) diff --git a/x/gov/simulation/genesis_test.go b/x/gov/simulation/genesis_test.go index 7167769b8e38..281487751e38 100644 --- a/x/gov/simulation/genesis_test.go +++ b/x/gov/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,7 +19,7 @@ import ( ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. -// Abonormal scenarios are not tested here. +// Abnormal scenarios are not tested here. func TestRandomizedGenState(t *testing.T) { interfaceRegistry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(interfaceRegistry) @@ -32,7 +33,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index e619dfabc96e..91ed7f525350 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -39,7 +39,6 @@ func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, wContents []simtypes.WeightedProposalContent, ) simulation.WeightedOperations { - var ( weightMsgDeposit int weightMsgVote int @@ -161,7 +160,7 @@ func SimulateMsgSubmitProposal( spendable := bk.SpendableCoins(ctx, account.GetAddress()) var fees sdk.Coins - coins, hasNeg := spendable.SafeSub(deposit) + coins, hasNeg := spendable.SafeSub(deposit...) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -170,7 +169,8 @@ func SimulateMsgSubmitProposal( } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -248,7 +248,7 @@ func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Ke spendable := bk.SpendableCoins(ctx, account.GetAddress()) var fees sdk.Coins - coins, hasNeg := spendable.SafeSub(deposit) + coins, hasNeg := spendable.SafeSub(deposit...) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -257,6 +257,7 @@ func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Ke } txCtx := simulation.OperationInput{ + R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, @@ -278,7 +279,8 @@ func SimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keepe } func operationSimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, - simAccount simtypes.Account, proposalIDInt int64) simtypes.Operation { + simAccount simtypes.Account, proposalIDInt int64, +) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -331,7 +333,8 @@ func SimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k keep } func operationSimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, - simAccount simtypes.Account, proposalIDInt int64) simtypes.Operation { + simAccount simtypes.Account, proposalIDInt int64, +) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -419,7 +422,8 @@ func randomDeposit(r *rand.Rand, ctx sdk.Context, // that matches a given Status. // It does not provide a default ID. func randomProposalID(r *rand.Rand, k keeper.Keeper, - ctx sdk.Context, status v1.ProposalStatus) (proposalID uint64, found bool) { + ctx sdk.Context, status v1.ProposalStatus, +) (proposalID uint64, found bool) { proposalID, _ = k.GetProposalID(ctx) switch { diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index e119ef78c6d7..59c19d870707 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -50,10 +50,8 @@ func mockWeightedProposalContent(n int) []simtypes.WeightedProposalContent { wpc := make([]simtypes.WeightedProposalContent, n) for i := 0; i < n; i++ { wpc[i] = MockWeightedProposalContent{i} - } return wpc - } // TestWeightedOperations tests the weights of the operations. @@ -98,7 +96,7 @@ func TestWeightedOperations(t *testing.T) { } // TestSimulateMsgSubmitProposal tests the normal scenario of a valid message of type TypeMsgSubmitProposal. -// Abnormal scenarios, where the message is created by an errors are not tested here. +// Abnormal scenarios, where errors occur, are not tested here. func TestSimulateMsgSubmitProposal(t *testing.T) { app, ctx := createTestApp(t, false) @@ -130,7 +128,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { } // TestSimulateMsgDeposit tests the normal scenario of a valid message of type TypeMsgDeposit. -// Abnormal scenarios, where the message is created by an errors are not tested here. +// Abnormal scenarios, where errors occur, are not tested here. func TestSimulateMsgDeposit(t *testing.T) { app, ctx := createTestApp(t, false) blockTime := time.Now().UTC() @@ -176,7 +174,7 @@ func TestSimulateMsgDeposit(t *testing.T) { } // TestSimulateMsgVote tests the normal scenario of a valid message of type TypeMsgVote. -// Abnormal scenarios, where the message is created by an errors are not tested here. +// Abnormal scenarios, where errors occur, are not tested here. func TestSimulateMsgVote(t *testing.T) { app, ctx := createTestApp(t, false) blockTime := time.Now().UTC() @@ -220,7 +218,7 @@ func TestSimulateMsgVote(t *testing.T) { } // TestSimulateMsgVoteWeighted tests the normal scenario of a valid message of type TypeMsgVoteWeighted. -// Abnormal scenarios, where the message is created by an errors are not tested here. +// Abnormal scenarios, where errors occur, are not tested here. func TestSimulateMsgVoteWeighted(t *testing.T) { app, ctx := createTestApp(t, false) blockTime := time.Now().UTC() diff --git a/x/gov/spec/01_concepts.md b/x/gov/spec/01_concepts.md index c1e3ed830dea..39b39d13af05 100644 --- a/x/gov/spec/01_concepts.md +++ b/x/gov/spec/01_concepts.md @@ -67,7 +67,7 @@ according to the final tally of the proposal: * All refunded or burned deposits are removed from the state. Events are issued when burning or refunding a deposit. -## Voting +## Vote ### Participants @@ -118,15 +118,15 @@ option that casts a `NoWithVeto` vote._ ### Weighted Votes -[ADR-037](../../../docs/architecture/adr-037-gov-split-vote.md) introduces the weighted vote feature which allows a staker to split their votes into several voting options. For example, it could use 70% of its voting power to vote Yes and 30% of its voting power to vote No. +[ADR-037](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-037-gov-split-vote.md) introduces the weighted vote feature which allows a staker to split their votes into several voting options. For example, it could use 70% of its voting power to vote Yes and 30% of its voting power to vote No. Often times the entity owning that address might not be a single individual. For example, a company might have different stakeholders who want to vote differently, and so it makes sense to allow them to split their voting power. Currently, it is not possible for them to do "passthrough voting" and giving their users voting rights over their tokens. However, with this system, exchanges can poll their users for voting preferences, and then vote on-chain proportionally to the results of the poll. To represent weighted vote on chain, we use the following Protobuf message. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-alpha1/proto/cosmos/gov/v1beta1/gov.proto#L32-L40 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1beta1/gov.proto#L33-L43 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-alpha1/proto/cosmos/gov/v1beta1/gov.proto#L126-L137 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1beta1/gov.proto#L136-L150 For a weighted vote to be valid, the `options` field must not contain duplicate vote options, and the sum of weights of all options must be equal to 1. @@ -140,12 +140,19 @@ casted on a proposal for the result to be valid. Threshold is defined as the minimum proportion of `Yes` votes (excluding `Abstain` votes) for the proposal to be accepted. -Initially, the threshold is set at 50% with a possibility to veto if more than -1/3rd of votes (excluding `Abstain` votes) are `NoWithVeto` votes. This means -that proposals are accepted if the proportion of `Yes` votes (excluding -`Abstain` votes) at the end of the voting period is superior to 50% and if the -proportion of `NoWithVeto` votes is inferior to 1/3 (excluding `Abstain` -votes). +Initially, the threshold is set at 50% of `Yes` votes, excluding `Abstain` +votes. A possibility to veto exists if more than 1/3rd of all votes are +`NoWithVeto` votes. Note, both of these values are derived from the `TallyParams` +on-chain parameter, which is modifiable by governance. +This means that proposals are accepted iff: + +* There exist bonded tokens. +* Quorum has been achieved. +* The proportion of `Abstain` votes is inferior to 1/1. +* The proportion of `NoWithVeto` votes is inferior to 1/3, including + `Abstain` votes. +* The proportion of `Yes` votes, excluding `Abstain` votes, at the end of + the voting period is superior to 1/2. ### Inheritance @@ -156,7 +163,7 @@ If a delegator does not vote, it will inherit its validator vote. * If the delegator votes after its validator, it will override its validator vote with its own. If the proposal is urgent, it is possible that the vote will close before delegators have a chance to react and - override their validator's vote. This is not a problem, as proposals require more than 2/3rd of the total voting power to pass before the end of the voting period. If more than 2/3rd of validators collude, they can censor the votes of delegators anyway. + override their validator's vote. This is not a problem, as proposals require more than 2/3rd of the total voting power to pass before the end of the voting period. Because as little as 1/3 + 1 validation power could collude to censor transactions, non-collusion is already assumed for ranges exceeding this threshold. ### Validator’s punishment for non-voting @@ -169,8 +176,8 @@ Later, we may add permissioned keys that could only sign txs from certain module ## Software Upgrade If proposals are of type `SoftwareUpgradeProposal`, then nodes need to upgrade -their software to the new version that was voted. This process is divided in -two steps. +their software to the new version that was voted. This process is divided into +two steps: ### Signal @@ -193,4 +200,4 @@ 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. -_Note: Not clear how the flip is handled programmatically._ +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. diff --git a/x/gov/spec/02_state.md b/x/gov/spec/02_state.md index 06e1e6908e9e..66514ec2c54c 100644 --- a/x/gov/spec/02_state.md +++ b/x/gov/spec/02_state.md @@ -12,15 +12,15 @@ to resolve and then execute if the proposal passes. `Proposal`'s are identified unique id and contains a series of timestamps: `submit_time`, `deposit_end_time`, `voting_start_time`, `voting_end_time` which track the lifecycle of a proposal -+++ https://github.com/cosmos/cosmos-sdk/blob/4a129832eb16f37a89e97652a669f0cdc9196ca9/proto/cosmos/gov/v1beta2/gov.proto#L42-L52 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/gov.proto#L42-L59 A proposal will generally require more than just a set of messages to explain its purpose but need some greater justification and allow a means for interested participants -to discuss and debate the proposal. In most cases, it is encouraged to have an off-chain -system that supports the on-chain governance process. To accommodate for this, a -proposal contains a special `metadata` field, an array of bytes, which can be used to -add context to the proposal. The `metadata` field allows custom use for networks, however, -it is expected that the field contain a URL or some form of CID using a system such as +to discuss and debate the proposal. +In most cases, **it is encouraged to have an off-chain system that supports the on-chain governance process**. +To accommodate for this, a proposal contains a special **`metadata`** field, an array of bytes, +which can be used to add context to the proposal. The `metadata` field allows custom use for networks, +however, it is expected that the field contains a URL or some form of CID using a system such as [IPFS](https://docs.ipfs.io/concepts/content-addressing/). To support the case of interoperability across networks, the SDK recommends that the `metadata` represents the following `JSON` template: @@ -37,7 +37,7 @@ the following `JSON` template: This makes it far easier for clients to support multiple networks. The metadata has a maximum length that is chosen by the app developer, and -passed into the gov keeper as a config. +passed into the gov keeper as a config. The default maximum length in the SDK is 255 characters. ### Writing a module that uses governance @@ -58,15 +58,15 @@ parameter set has to be created and the previous one rendered inactive. ### DepositParams -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/gov/v1beta1/gov.proto#L127-L145 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/gov.proto#L102-L112 ### VotingParams -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/gov/v1beta1/gov.proto#L147-L156 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/gov.proto#L114-L118 ### TallyParams -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/gov/v1beta1/gov.proto#L158-L183 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/gov.proto#L120-L132 Parameters are stored in a global `GlobalParams` KVStore. @@ -93,7 +93,7 @@ type ProposalStatus byte const ( - StatusNil ProposalStatus = 0x00 + StatusNil ProposalStatus = 0x00 StatusDepositPeriod ProposalStatus = 0x01 // Proposal is submitted. Participants can deposit on it but not vote StatusVotingPeriod ProposalStatus = 0x02 // MinDeposit is reached, participants can vote StatusPassed ProposalStatus = 0x03 // Proposal passed and successfully executed @@ -104,7 +104,7 @@ const ( ## Deposit -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/gov/v1beta1/gov.proto#L43-L53 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/gov.proto#L34-L40 ## ValidatorGovInfo @@ -119,8 +119,7 @@ This type is used in a temp map when tallying ## Stores -_Stores are KVStores in the multi-store. The key to find the store is the first -parameter in the list_` +_Note: Stores are KVStores in the multi-store. The key to find the store is the first parameter in the list_ We will use one KVStore `Governance` to store two mappings: @@ -177,7 +176,7 @@ And the pseudocode for the `ProposalProcessingQueue`: tallyingParam = load(GlobalParams, 'TallyingParam') - // Update tally if validator voted they voted + // Update tally if validator voted for each validator in validators if tmpValMap(validator).HasVoted proposal.updateTally(tmpValMap(validator).Vote, (validator.TotalShares - tmpValMap(validator).Minus)) @@ -206,3 +205,13 @@ And the pseudocode for the `ProposalProcessingQueue`: store(Governance, , proposal) ``` + +## Legacy Proposal + +A legacy proposal is the old implementation of governance proposal. +Contrary to proposal that can contain any messages, a legacy proposal allows to submit a set of pre-defined proposals. +These proposal are defined by their types. + +While proposals should use the new implementation of the governance proposal, we need still to use legacy proposal in order to submit a `software-upgrade` and a `cancel-software-upgrade` proposal. + +More information on how to submit proposals in the [client section](07_client.md). diff --git a/x/gov/spec/03_messages.md b/x/gov/spec/03_messages.md index 04fcbf1d9d69..405931da5070 100644 --- a/x/gov/spec/03_messages.md +++ b/x/gov/spec/03_messages.md @@ -9,7 +9,7 @@ order: 3 Proposals can be submitted by any account via a `MsgSubmitProposal` transaction. -+++ https://github.com/cosmos/cosmos-sdk/blob/ab9545527d630fe38761aa61cc5c95eabd68e0e6/proto/cosmos/gov/v1beta2/tx.proto#L34-L44 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/tx.proto#L33-L43 All `sdk.Msgs` passed into the `messages` field of a `MsgSubmitProposal` message must be registered in the app's `MsgServiceRouter`. Each of these messages must @@ -78,7 +78,7 @@ Once a proposal is submitted, if `Proposal.TotalDeposit < ActiveParam.MinDeposit`, Atom holders can send `MsgDeposit` transactions to increase the proposal's deposit. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/gov/v1beta1/tx.proto#L61-L72 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/tx.proto#L90-L97 **State modifications:** @@ -108,7 +108,7 @@ upon receiving txGovDeposit from sender do // There is no proposal for this proposalID throw - if (txGovDeposit.Deposit.Atoms <= 0) OR (sender.AtomBalance < txGovDeposit.Deposit.Atoms) OR (proposal.CurrentStatus != ProposalStatusOpen) + if (txGovDeposit.Deposit.Atoms <= 0) OR (sender.AtomBalance < txGovDeposit.Deposit.Atoms) OR (proposal.CurrentStatus != ProposalStatusOpen) // deposit is negative or null // OR sender has insufficient funds @@ -144,7 +144,7 @@ Once `ActiveParam.MinDeposit` is reached, voting period starts. From there, bonded Atom holders are able to send `MsgVote` transactions to cast their vote on the proposal. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/gov/v1beta1/tx.proto#L46-L56 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/gov/v1/tx.proto#L64-L72 **State modifications:** diff --git a/x/gov/spec/07_client.md b/x/gov/spec/07_client.md index 578d80ad2275..00aa57e57859 100644 --- a/x/gov/spec/07_client.md +++ b/x/gov/spec/07_client.md @@ -135,28 +135,28 @@ simd query gov proposal 1 Example Output: ```bash -messages: [ - { - '@type': /cosmos.bank.v1beta1.MsgSend - from_address: "cosmos1..", - to_address: "cosmos1..", - amount: "100atom" - } -], -deposit_end_time: "2021-09-17T23:36:18.254995423Z" +deposit_end_time: "2022-03-30T11:50:20.819676256Z" final_tally_result: - abstain: "0" - "no": "0" - no_with_veto: "0" - "yes": "0" -proposal_id: "1" + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "0" +id: "1" +messages: +- '@type': /cosmos.bank.v1beta1.MsgSend + amount: + - amount: "10" + denom: stake + from_address: cosmos1.. + to_address: cosmos1.. +metadata: AQ== status: PROPOSAL_STATUS_DEPOSIT_PERIOD -submit_time: "2021-09-15T23:36:18.254995423Z" +submit_time: "2022-03-28T11:50:20.819676256Z" total_deposit: -- amount: "100" +- amount: "10" denom: stake -voting_end_time: "0001-01-01T00:00:00Z" -voting_start_time: "0001-01-01T00:00:00Z" +voting_end_time: null +voting_start_time: null ``` #### proposals @@ -178,26 +178,52 @@ Example Output: ```bash pagination: next_key: null - total: "1" + total: "0" proposals: -- content: - '@type': /cosmos.gov.v1beta1.TextProposal - description: testing, testing, 1, 2, 3 - title: Test Proposal - deposit_end_time: "2021-09-17T23:36:18.254995423Z" +- deposit_end_time: "2022-03-30T11:50:20.819676256Z" final_tally_result: - abstain: "0" - "no": "0" - no_with_veto: "0" - "yes": "0" - proposal_id: "1" + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "0" + id: "1" + messages: + - '@type': /cosmos.bank.v1beta1.MsgSend + amount: + - amount: "10" + denom: stake + from_address: cosmos1.. + to_address: cosmos1.. + metadata: AQ== status: PROPOSAL_STATUS_DEPOSIT_PERIOD - submit_time: "2021-09-15T23:36:18.254995423Z" + submit_time: "2022-03-28T11:50:20.819676256Z" total_deposit: - - amount: "100" + - amount: "10" + denom: stake + voting_end_time: null + voting_start_time: null +- deposit_end_time: "2022-03-30T14:02:41.165025015Z" + final_tally_result: + abstain_count: "0" + no_count: "0" + no_with_veto_count: "0" + yes_count: "0" + id: "2" + messages: + - '@type': /cosmos.bank.v1beta1.MsgSend + amount: + - amount: "10" + denom: stake + from_address: cosmos1.. + to_address: cosmos1.. + metadata: AQ== + status: PROPOSAL_STATUS_DEPOSIT_PERIOD + submit_time: "2022-03-28T14:02:41.165025015Z" + total_deposit: + - amount: "10" denom: stake - voting_end_time: "0001-01-01T00:00:00Z" - voting_start_time: "0001-01-01T00:00:00Z" + voting_end_time: null + voting_start_time: null ``` #### proposer @@ -218,7 +244,7 @@ Example Output: ```bash proposal_id: "1" -proposer: cosmos1r0tllwu5c9dtgwg3wr28lpvf76hg85f5zmh9l2 +proposer: cosmos1.. ``` #### tally @@ -295,7 +321,7 @@ votes: - option: VOTE_OPTION_YES weight: "1.000000000000000000" proposal_id: "1" - voter: cosmos1r0tllwu5c9dtgwg3wr28lpvf76hg85f5zmh9l2 + voter: cosmos1.. ``` ### Transactions @@ -322,34 +348,66 @@ simd tx gov deposit 1 10000000stake --from cosmos1.. #### submit-proposal -The `submit-proposal` command allows users to submit a governance proposal and to optionally include an initial deposit. +The `submit-proposal` command allows users to submit a governance proposal along with some messages and metadata. +Messages, metadata and deposit are defined in a JSON file. + +```bash +simd tx gov submit-proposal [path-to-proposal-json] [flags] +``` + +Example: + +```bash +simd tx gov submit-proposal /path/to/proposal.json --from cosmos1.. +``` + +where `proposal.json` contains: + +```json +{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1...", // The gov module module address + "to_address": "cosmos1...", + "amount":[{"denom": "stake","amount": "10"}] + } + ], + "metadata": "AQ==", + "deposit": "10stake" +} +``` + +#### submit-legacy-proposal + +The `submit-legacy-proposal` command allows users to submit a governance legacy proposal along with an initial deposit. ```bash -simd tx gov submit-proposal [command] [flags] +simd tx gov submit-legacy-proposal [command] [flags] ``` Example: ```bash -simd tx gov submit-proposal --title="Test Proposal" --description="testing, testing, 1, 2, 3" --type="Text" --deposit="10000000stake" --from cosmos1.. +simd tx gov submit-legacy-proposal --title="Test Proposal" --description="testing" --type="Text" --deposit="100000000stake" --from cosmos1.. ``` Example (`cancel-software-upgrade`): ```bash -simd tx gov submit-proposal cancel-software-upgrade --title="Test Proposal" --description="testing, testing, 1, 2, 3" --deposit="10000000stake" --from cosmos1.. +simd tx gov submit-legacy-proposal cancel-software-upgrade --title="Test Proposal" --description="testing" --deposit="100000000stake" --from cosmos1.. ``` Example (`community-pool-spend`): ```bash -simd tx gov submit-proposal community-pool-spend proposal.json --from cosmos1.. +simd tx gov submit-legacy-proposal community-pool-spend proposal.json --from cosmos1.. ``` ```json { "title": "Test Proposal", - "description": "testing, testing, 1, 2, 3", + "description": "testing, 1, 2, 3", "recipient": "cosmos1..", "amount": "10000000stake", "deposit": "10000000stake" @@ -359,7 +417,7 @@ simd tx gov submit-proposal community-pool-spend proposal.json --from cosmos1.. Example (`param-change`): ```bash -simd tx gov submit-proposal param-change proposal.json --from cosmos1.. +simd tx gov submit-legacy-proposal param-change proposal.json --from cosmos1.. ``` ```json @@ -380,7 +438,7 @@ simd tx gov submit-proposal param-change proposal.json --from cosmos1.. Example (`software-upgrade`): ```bash -simd tx gov submit-proposal software-upgrade v2 --title="Test Proposal" --description="testing, testing, 1, 2, 3" --upgrade-height 1000000 --from cosmos1.. +simd tx gov submit-legacy-proposal software-upgrade v2 --title="Test Proposal" --description="testing, testing, 1, 2, 3" --upgrade-height 1000000 --from cosmos1.. ``` #### vote @@ -402,13 +460,13 @@ simd tx gov vote 1 yes --from cosmos1.. The `weighted-vote` command allows users to submit a weighted vote for a given governance proposal. ```bash -simd tx gov weighted-vote [proposal-id] [weighted-options] +simd tx gov weighted-vote [proposal-id] [weighted-options] [flags] ``` Example: ```bash -simd tx gov weighted-vote 1 yes=0.5,no=0.5 --from cosmos1 +simd tx gov weighted-vote 1 yes=0.5,no=0.5 --from cosmos1.. ``` ## gRPC @@ -419,6 +477,8 @@ A user can query the `gov` module using gRPC endpoints. The `Proposal` endpoint allows users to query a given proposal. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Proposal ``` @@ -460,10 +520,59 @@ Example Output: } ``` +Using v1: + +```bash +cosmos.gov.v1.Query/Proposal +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id":"1"}' \ + localhost:9090 \ + cosmos.gov.v1.Query/Proposal +``` + +Example Output: + +```bash +{ + "proposal": { + "id": "1", + "messages": [ + {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"10"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} + ], + "status": "PROPOSAL_STATUS_VOTING_PERIOD", + "finalTallyResult": { + "yesCount": "0", + "abstainCount": "0", + "noCount": "0", + "noWithVetoCount": "0" + }, + "submitTime": "2022-03-28T11:50:20.819676256Z", + "depositEndTime": "2022-03-30T11:50:20.819676256Z", + "totalDeposit": [ + { + "denom": "stake", + "amount": "10000000" + } + ], + "votingStartTime": "2022-03-28T14:25:26.644857113Z", + "votingEndTime": "2022-03-30T14:25:26.644857113Z", + "metadata": "AQ==" + } +} +``` + + ### Proposals The `Proposals` endpoint allows users to query all proposals with optional filters. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Proposals ``` @@ -483,7 +592,6 @@ Example Output: "proposals": [ { "proposalId": "1", - "content": {"@type":"/cosmos.gov.v1beta1.TextProposal","description":"testing, testing, 1, 2, 3","title":"Test Proposal"}, "status": "PROPOSAL_STATUS_VOTING_PERIOD", "finalTallyResult": { "yes": "0", @@ -491,20 +599,19 @@ Example Output: "no": "0", "noWithVeto": "0" }, - "submitTime": "2021-09-16T19:40:08.712440474Z", - "depositEndTime": "2021-09-18T19:40:08.712440474Z", + "submitTime": "2022-03-28T11:50:20.819676256Z", + "depositEndTime": "2022-03-30T11:50:20.819676256Z", "totalDeposit": [ { "denom": "stake", - "amount": "10000000" + "amount": "10000000010" } ], - "votingStartTime": "2021-09-16T19:40:08.712440474Z", - "votingEndTime": "2021-09-18T19:40:08.712440474Z" + "votingStartTime": "2022-03-28T14:25:26.644857113Z", + "votingEndTime": "2022-03-30T14:25:26.644857113Z" }, { "proposalId": "2", - "content": {"@type":"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal","description":"Test Proposal","title":"testing, testing, 1, 2, 3"}, "status": "PROPOSAL_STATUS_DEPOSIT_PERIOD", "finalTallyResult": { "yes": "0", @@ -512,8 +619,14 @@ Example Output: "no": "0", "noWithVeto": "0" }, - "submitTime": "2021-09-17T18:26:57.866854713Z", - "depositEndTime": "2021-09-19T18:26:57.866854713Z", + "submitTime": "2022-03-28T14:02:41.165025015Z", + "depositEndTime": "2022-03-30T14:02:41.165025015Z", + "totalDeposit": [ + { + "denom": "stake", + "amount": "10" + } + ], "votingStartTime": "0001-01-01T00:00:00Z", "votingEndTime": "0001-01-01T00:00:00Z" } @@ -522,12 +635,87 @@ Example Output: "total": "2" } } + +``` + +Using v1: + +```bash +cosmos.gov.v1.Query/Proposals +``` + +Example: + +```bash +grpcurl -plaintext \ + localhost:9090 \ + cosmos.gov.v1.Query/Proposals +``` + +Example Output: + +```bash +{ + "proposals": [ + { + "id": "1", + "messages": [ + {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"10"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} + ], + "status": "PROPOSAL_STATUS_VOTING_PERIOD", + "finalTallyResult": { + "yesCount": "0", + "abstainCount": "0", + "noCount": "0", + "noWithVetoCount": "0" + }, + "submitTime": "2022-03-28T11:50:20.819676256Z", + "depositEndTime": "2022-03-30T11:50:20.819676256Z", + "totalDeposit": [ + { + "denom": "stake", + "amount": "10000000010" + } + ], + "votingStartTime": "2022-03-28T14:25:26.644857113Z", + "votingEndTime": "2022-03-30T14:25:26.644857113Z", + "metadata": "AQ==" + }, + { + "id": "2", + "messages": [ + {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"10"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} + ], + "status": "PROPOSAL_STATUS_DEPOSIT_PERIOD", + "finalTallyResult": { + "yesCount": "0", + "abstainCount": "0", + "noCount": "0", + "noWithVetoCount": "0" + }, + "submitTime": "2022-03-28T14:02:41.165025015Z", + "depositEndTime": "2022-03-30T14:02:41.165025015Z", + "totalDeposit": [ + { + "denom": "stake", + "amount": "10" + } + ], + "metadata": "AQ==" + } + ], + "pagination": { + "total": "2" + } +} ``` ### Vote The `Vote` endpoint allows users to query a vote for a given proposal. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Vote ``` @@ -559,10 +747,45 @@ Example Output: } ``` +Using v1: + +```bash +cosmos.gov.v1.Query/Vote +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id":"1","voter":"cosmos1.."}' \ + localhost:9090 \ + cosmos.gov.v1.Query/Vote +``` + +Example Output: + +```bash +{ + "vote": { + "proposalId": "1", + "voter": "cosmos1..", + "option": "VOTE_OPTION_YES", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "1.000000000000000000" + } + ] + } +} +``` + ### Votes The `Votes` endpoint allows users to query all votes for a given proposal. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Votes ``` @@ -584,7 +807,6 @@ Example Output: { "proposalId": "1", "voter": "cosmos1..", - "option": "VOTE_OPTION_YES", "options": [ { "option": "VOTE_OPTION_YES", @@ -599,12 +821,51 @@ Example Output: } ``` +Using v1: + +```bash +cosmos.gov.v1.Query/Votes +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id":"1"}' \ + localhost:9090 \ + cosmos.gov.v1.Query/Votes +``` + +Example Output: + +```bash +{ + "votes": [ + { + "proposalId": "1", + "voter": "cosmos1..", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "1.000000000000000000" + } + ] + } + ], + "pagination": { + "total": "1" + } +} +``` + ### Params The `Params` endpoint allows users to query all parameters for the `gov` module. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Params ``` @@ -636,10 +897,37 @@ Example Output: } ``` +Using v1: + +```bash +cosmos.gov.v1.Query/Params +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"params_type":"voting"}' \ + localhost:9090 \ + cosmos.gov.v1.Query/Params +``` + +Example Output: + +```bash +{ + "votingParams": { + "votingPeriod": "172800s" + } +} +``` + ### Deposit The `Deposit` endpoint allows users to query a deposit for a given proposal from a given depositor. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Deposit ``` @@ -670,10 +958,44 @@ Example Output: } ``` +Using v1: + +```bash +cosmos.gov.v1.Query/Deposit +``` + +Example: + +```bash +grpcurl -plaintext \ + '{"proposal_id":"1","depositor":"cosmos1.."}' \ + localhost:9090 \ + cosmos.gov.v1.Query/Deposit +``` + +Example Output: + +```bash +{ + "deposit": { + "proposalId": "1", + "depositor": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10000000" + } + ] + } +} +``` + ### deposits The `Deposits` endpoint allows users to query all deposits for a given proposal. +Using legacy v1beta1: + ```bash cosmos.gov.v1beta1.Query/Deposits ``` @@ -709,12 +1031,10 @@ Example Output: } ``` -### TallyResult - -The `TallyResult` endpoint allows users to query the tally of a given proposal. +Using v1: ```bash -cosmos.gov.v1beta1.Query/TallyResult +cosmos.gov.v1.Query/Deposits ``` Example: @@ -723,30 +1043,101 @@ Example: grpcurl -plaintext \ -d '{"proposal_id":"1"}' \ localhost:9090 \ - cosmos.gov.v1beta1.Query/TallyResult + cosmos.gov.v1.Query/Deposits ``` Example Output: ```bash { - "tally": { - "yes": "1000000", - "abstain": "0", - "no": "0", - "noWithVeto": "0" - } -} -``` - -## REST - -A user can query the `gov` module using REST endpoints. - + "deposits": [ + { + "proposalId": "1", + "depositor": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10000000" + } + ] + } + ], + "pagination": { + "total": "1" + } +} +``` + +### TallyResult + +The `TallyResult` endpoint allows users to query the tally of a given proposal. + +Using legacy v1beta1: + +```bash +cosmos.gov.v1beta1.Query/TallyResult +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id":"1"}' \ + localhost:9090 \ + cosmos.gov.v1beta1.Query/TallyResult +``` + +Example Output: + +```bash +{ + "tally": { + "yes": "1000000", + "abstain": "0", + "no": "0", + "noWithVeto": "0" + } +} +``` + +Using v1: + +```bash +cosmos.gov.v1.Query/TallyResult +``` + +Example: + +```bash +grpcurl -plaintext \ + -d '{"proposal_id":"1"}' \ + localhost:9090 \ + cosmos.gov.v1.Query/TallyResult +``` + +Example Output: + +```bash +{ + "tally": { + "yes": "1000000", + "abstain": "0", + "no": "0", + "noWithVeto": "0" + } +} +``` + +## REST + +A user can query the `gov` module using REST endpoints. + ### proposal The `proposals` endpoint allows users to query a given proposal. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals/{proposal_id} ``` @@ -763,11 +1154,7 @@ Example Output: { "proposal": { "proposal_id": "1", - "content": { - "@type": "/cosmos.gov.v1beta1.TextProposal", - "title": "Test Proposal", - "description": "testing, testing, 1, 2, 3" - }, + "content": null, "status": "PROPOSAL_STATUS_VOTING_PERIOD", "final_tally_result": { "yes": "0", @@ -775,16 +1162,69 @@ Example Output: "no": "0", "no_with_veto": "0" }, - "submit_time": "2021-09-16T19:40:08.712440474Z", - "deposit_end_time": "2021-09-18T19:40:08.712440474Z", + "submit_time": "2022-03-28T11:50:20.819676256Z", + "deposit_end_time": "2022-03-30T11:50:20.819676256Z", + "total_deposit": [ + { + "denom": "stake", + "amount": "10000000010" + } + ], + "voting_start_time": "2022-03-28T14:25:26.644857113Z", + "voting_end_time": "2022-03-30T14:25:26.644857113Z" + } +} +``` + +Using v1: + +```bash +/cosmos/gov/v1/proposals/{proposal_id} +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals/1 +``` + +Example Output: + +```bash +{ + "proposal": { + "id": "1", + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1..", + "to_address": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10" + } + ] + } + ], + "status": "PROPOSAL_STATUS_VOTING_PERIOD", + "final_tally_result": { + "yes_count": "0", + "abstain_count": "0", + "no_count": "0", + "no_with_veto_count": "0" + }, + "submit_time": "2022-03-28T11:50:20.819676256Z", + "deposit_end_time": "2022-03-30T11:50:20.819676256Z", "total_deposit": [ { "denom": "stake", "amount": "10000000" } ], - "voting_start_time": "2021-09-16T19:40:08.712440474Z", - "voting_end_time": "2021-09-18T19:40:08.712440474Z" + "voting_start_time": "2022-03-28T14:25:26.644857113Z", + "voting_end_time": "2022-03-30T14:25:26.644857113Z", + "metadata": "AQ==" } } ``` @@ -793,6 +1233,8 @@ Example Output: The `proposals` endpoint also allows users to query all proposals with optional filters. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals ``` @@ -810,11 +1252,7 @@ Example Output: "proposals": [ { "proposal_id": "1", - "content": { - "@type": "/cosmos.gov.v1beta1.TextProposal", - "title": "Test Proposal", - "description": "testing, testing, 1, 2, 3" - }, + "content": null, "status": "PROPOSAL_STATUS_VOTING_PERIOD", "final_tally_result": { "yes": "0", @@ -822,24 +1260,20 @@ Example Output: "no": "0", "no_with_veto": "0" }, - "submit_time": "2021-09-16T19:40:08.712440474Z", - "deposit_end_time": "2021-09-18T19:40:08.712440474Z", + "submit_time": "2022-03-28T11:50:20.819676256Z", + "deposit_end_time": "2022-03-30T11:50:20.819676256Z", "total_deposit": [ { "denom": "stake", "amount": "10000000" } ], - "voting_start_time": "2021-09-16T19:40:08.712440474Z", - "voting_end_time": "2021-09-18T19:40:08.712440474Z" + "voting_start_time": "2022-03-28T14:25:26.644857113Z", + "voting_end_time": "2022-03-30T14:25:26.644857113Z" }, { "proposal_id": "2", - "content": { - "@type": "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", - "title": "Test Proposal", - "description": "testing, testing, 1, 2, 3" - }, + "content": null, "status": "PROPOSAL_STATUS_DEPOSIT_PERIOD", "final_tally_result": { "yes": "0", @@ -847,9 +1281,13 @@ Example Output: "no": "0", "no_with_veto": "0" }, - "submit_time": "2021-09-17T18:26:57.866854713Z", - "deposit_end_time": "2021-09-19T18:26:57.866854713Z", + "submit_time": "2022-03-28T14:02:41.165025015Z", + "deposit_end_time": "2022-03-30T14:02:41.165025015Z", "total_deposit": [ + { + "denom": "stake", + "amount": "10" + } ], "voting_start_time": "0001-01-01T00:00:00Z", "voting_end_time": "0001-01-01T00:00:00Z" @@ -862,10 +1300,105 @@ Example Output: } ``` +Using v1: + +```bash +/cosmos/gov/v1/proposals +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals +``` + +Example Output: + +```bash +{ + "proposals": [ + { + "id": "1", + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1..", + "to_address": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10" + } + ] + } + ], + "status": "PROPOSAL_STATUS_VOTING_PERIOD", + "final_tally_result": { + "yes_count": "0", + "abstain_count": "0", + "no_count": "0", + "no_with_veto_count": "0" + }, + "submit_time": "2022-03-28T11:50:20.819676256Z", + "deposit_end_time": "2022-03-30T11:50:20.819676256Z", + "total_deposit": [ + { + "denom": "stake", + "amount": "10000000010" + } + ], + "voting_start_time": "2022-03-28T14:25:26.644857113Z", + "voting_end_time": "2022-03-30T14:25:26.644857113Z", + "metadata": "AQ==" + }, + { + "id": "2", + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1..", + "to_address": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10" + } + ] + } + ], + "status": "PROPOSAL_STATUS_DEPOSIT_PERIOD", + "final_tally_result": { + "yes_count": "0", + "abstain_count": "0", + "no_count": "0", + "no_with_veto_count": "0" + }, + "submit_time": "2022-03-28T14:02:41.165025015Z", + "deposit_end_time": "2022-03-30T14:02:41.165025015Z", + "total_deposit": [ + { + "denom": "stake", + "amount": "10" + } + ], + "voting_start_time": null, + "voting_end_time": null, + "metadata": "AQ==" + } + ], + "pagination": { + "next_key": null, + "total": "2" + } +} +``` + ### voter vote The `votes` endpoint allows users to query a vote for a given proposal. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} ``` @@ -894,10 +1427,42 @@ Example Output: } ``` +Using v1: + +```bash +/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter} +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals/1/votes/cosmos1.. +``` + +Example Output: + +```bash +{ + "vote": { + "proposal_id": "1", + "voter": "cosmos1..", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "1.000000000000000000" + } + ], + "metadata": "" + } +} +``` + ### votes The `votes` endpoint allows users to query all votes for a given proposal. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals/{proposal_id}/votes ``` @@ -932,12 +1497,50 @@ Example Output: } ``` +Using v1: + +```bash +/cosmos/gov/v1/proposals/{proposal_id}/votes +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals/1/votes +``` + +Example Output: + +```bash +{ + "votes": [ + { + "proposal_id": "1", + "voter": "cosmos1..", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "1.000000000000000000" + } + ], + "metadata": "" + } + ], + "pagination": { + "next_key": null, + "total": "1" + } +} +``` + ### params The `params` endpoint allows users to query all parameters for the `gov` module. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/params/{params_type} ``` @@ -968,10 +1571,44 @@ Example Output: } ``` +Using v1: + +```bash +/cosmos/gov/v1/params/{params_type} +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/params/voting +``` + +Example Output: + +```bash +{ + "voting_params": { + "voting_period": "172800s" + }, + "deposit_params": { + "min_deposit": [ + ], + "max_deposit_period": "0s" + }, + "tally_params": { + "quorum": "0.000000000000000000", + "threshold": "0.000000000000000000", + "veto_threshold": "0.000000000000000000" + } +} +``` + ### deposits The `deposits` endpoint allows users to query a deposit for a given proposal from a given depositor. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} ``` @@ -999,10 +1636,41 @@ Example Output: } ``` +Using v1: + +```bash +/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor} +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals/1/deposits/cosmos1.. +``` + +Example Output: + +```bash +{ + "deposit": { + "proposal_id": "1", + "depositor": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10000000" + } + ] + } +} +``` + ### proposal deposits The `deposits` endpoint allows users to query all deposits for a given proposal. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits ``` @@ -1036,10 +1704,47 @@ Example Output: } ``` +Using v1: + +```bash +/cosmos/gov/v1/proposals/{proposal_id}/deposits +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals/1/deposits +``` + +Example Output: + +```bash +{ + "deposits": [ + { + "proposal_id": "1", + "depositor": "cosmos1..", + "amount": [ + { + "denom": "stake", + "amount": "10000000" + } + ] + } + ], + "pagination": { + "next_key": null, + "total": "1" + } +} +``` + ### tally The `tally` endpoint allows users to query the tally of a given proposal. +Using legacy v1beta1: + ```bash /cosmos/gov/v1beta1/proposals/{proposal_id}/tally ``` @@ -1062,3 +1767,28 @@ Example Output: } } ``` + +Using v1: + +```bash +/cosmos/gov/v1/proposals/{proposal_id}/tally +``` + +Example: + +```bash +curl localhost:1317/cosmos/gov/v1/proposals/1/tally +``` + +Example Output: + +```bash +{ + "tally": { + "yes": "1000000", + "abstain": "0", + "no": "0", + "no_with_veto": "0" + } +} +``` diff --git a/x/gov/spec/README.md b/x/gov/spec/README.md index 897e9f936097..f0e1af55fb05 100644 --- a/x/gov/spec/README.md +++ b/x/gov/spec/README.md @@ -37,6 +37,7 @@ staking token of the chain. 1. **[Concepts](01_concepts.md)** * [Proposal submission](01_concepts.md#proposal-submission) + * [Deposit](01_concepts.md#Deposit) * [Vote](01_concepts.md#vote) * [Software Upgrade](01_concepts.md#software-upgrade) 2. **[State](02_state.md)** diff --git a/x/gov/types/hooks.go b/x/gov/types/hooks.go index e90b19a08395..0a361687d9d2 100644 --- a/x/gov/types/hooks.go +++ b/x/gov/types/hooks.go @@ -30,11 +30,13 @@ func (h MultiGovHooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, vot h[i].AfterProposalVote(ctx, proposalID, voterAddr) } } + func (h MultiGovHooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) { for i := range h { h[i].AfterProposalFailedMinDeposit(ctx, proposalID) } } + func (h MultiGovHooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64) { for i := range h { h[i].AfterProposalVotingPeriodEnded(ctx, proposalID) diff --git a/x/gov/types/keys_test.go b/x/gov/types/keys_test.go index 30266f8f4d78..351863e9bfe4 100644 --- a/x/gov/types/keys_test.go +++ b/x/gov/types/keys_test.go @@ -37,7 +37,6 @@ func TestProposalKeys(t *testing.T) { } func TestDepositKeys(t *testing.T) { - key := DepositsKey(2) proposalID := SplitProposalKey(key) require.Equal(t, int(proposalID), 2) @@ -49,7 +48,6 @@ func TestDepositKeys(t *testing.T) { } func TestVoteKeys(t *testing.T) { - key := VotesKey(2) proposalID := SplitProposalKey(key) require.Equal(t, int(proposalID), 2) diff --git a/x/gov/types/v1/genesis.go b/x/gov/types/v1/genesis.go index b05c582f59f0..0e661b4a2014 100644 --- a/x/gov/types/v1/genesis.go +++ b/x/gov/types/v1/genesis.go @@ -38,7 +38,7 @@ func (data GenesisState) Empty() bool { // ValidateGenesis checks if parameters are within valid ranges func ValidateGenesis(data *GenesisState) error { if data.StartingProposalId == 0 { - return errors.New("Starting proposal id must be greater than 0") + return errors.New("starting proposal id must be greater than 0") } if err := validateTallyParams(*data.TallyParams); err != nil { diff --git a/x/gov/types/v1/genesis_test.go b/x/gov/types/v1/genesis_test.go index e54c2ea5c628..16b90087833f 100644 --- a/x/gov/types/v1/genesis_test.go +++ b/x/gov/types/v1/genesis_test.go @@ -3,7 +3,7 @@ package v1_test import ( "testing" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/stretchr/testify/require" ) @@ -14,3 +14,72 @@ func TestEmptyGenesis(t *testing.T) { state2 := v1.DefaultGenesisState() require.False(t, state2.Empty()) } + +func TestValidateGenesis(t *testing.T) { + depositParams := v1.DefaultDepositParams() + votingParams := v1.DefaultVotingParams() + tallyParams := v1.DefaultTallyParams() + + testCases := []struct { + name string + genesisState *v1.GenesisState + expErr bool + }{ + { + name: "valid", + genesisState: v1.DefaultGenesisState(), + }, + { + name: "invalid StartingProposalId", + genesisState: &v1.GenesisState{ + StartingProposalId: 0, + DepositParams: &depositParams, + VotingParams: &votingParams, + TallyParams: &tallyParams, + }, + expErr: true, + }, + { + name: "invalid TallyParams", + genesisState: &v1.GenesisState{ + StartingProposalId: v1.DefaultStartingProposalID, + DepositParams: &depositParams, + VotingParams: &votingParams, + TallyParams: &v1.TallyParams{}, + }, + expErr: true, + }, + { + name: "invalid VotingParams", + genesisState: &v1.GenesisState{ + StartingProposalId: v1.DefaultStartingProposalID, + DepositParams: &depositParams, + VotingParams: &v1.VotingParams{}, + TallyParams: &tallyParams, + }, + expErr: true, + }, + { + name: "invalid DepositParams", + genesisState: &v1.GenesisState{ + StartingProposalId: v1.DefaultStartingProposalID, + DepositParams: &v1.DepositParams{}, + VotingParams: &votingParams, + TallyParams: &tallyParams, + }, + expErr: true, + }, + } + + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + err := v1.ValidateGenesis(tc.genesisState) + if tc.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index ce404ad3e060..36b207454fff 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -75,7 +75,7 @@ func (VoteOption) EnumDescriptor() ([]byte, []int) { type ProposalStatus int32 const ( - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit // period. diff --git a/x/gov/types/v1/msgs_test.go b/x/gov/types/v1/msgs_test.go index 21d25bc20662..ad53ac5bf43e 100644 --- a/x/gov/types/v1/msgs_test.go +++ b/x/gov/types/v1/msgs_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) var ( diff --git a/x/gov/types/v1/proposal.go b/x/gov/types/v1/proposal.go index 514968bf85a4..63982fef0432 100644 --- a/x/gov/types/v1/proposal.go +++ b/x/gov/types/v1/proposal.go @@ -24,7 +24,6 @@ const ( // NewProposal creates a new Proposal instance func NewProposal(messages []sdk.Msg, id uint64, metadata string, submitTime, depositEndTime time.Time) (Proposal, error) { - msgs, err := sdktx.SetMsgs(messages) if err != nil { return Proposal{}, err diff --git a/x/gov/types/v1/proposals_test.go b/x/gov/types/v1/proposals_test.go index ab7ec4057db4..1f808bdefbaf 100644 --- a/x/gov/types/v1/proposals_test.go +++ b/x/gov/types/v1/proposals_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func TestProposalStatus_Format(t *testing.T) { diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index c120b6d45c53..2a7bbcc2fdf6 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -253,7 +253,7 @@ func (m *QueryProposalsResponse) GetPagination() *query.PageResponse { type QueryVoteRequest struct { // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter defines the oter address for the proposals. + // voter defines the voter address for the proposals. Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` } diff --git a/x/gov/types/v1/tally.go b/x/gov/types/v1/tally.go index cadb33f024e8..6613f640f6e5 100644 --- a/x/gov/types/v1/tally.go +++ b/x/gov/types/v1/tally.go @@ -15,8 +15,8 @@ type ValidatorGovInfo struct { // NewValidatorGovInfo creates a ValidatorGovInfo instance func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens sdk.Int, delegatorShares, - delegatorDeductions sdk.Dec, options WeightedVoteOptions) ValidatorGovInfo { - + delegatorDeductions sdk.Dec, options WeightedVoteOptions, +) ValidatorGovInfo { return ValidatorGovInfo{ Address: address, BondedTokens: bondedTokens, diff --git a/x/gov/types/v1beta1/gov.pb.go b/x/gov/types/v1beta1/gov.pb.go index 26d7447f3c5c..3fc60128b151 100644 --- a/x/gov/types/v1beta1/gov.pb.go +++ b/x/gov/types/v1beta1/gov.pb.go @@ -76,7 +76,7 @@ func (VoteOption) EnumDescriptor() ([]byte, []int) { type ProposalStatus int32 const ( - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. StatusNil ProposalStatus = 0 // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit // period. diff --git a/x/gov/types/v1beta1/msgs.go b/x/gov/types/v1beta1/msgs.go index cd5d886aed9c..9083ae9435cf 100644 --- a/x/gov/types/v1beta1/msgs.go +++ b/x/gov/types/v1beta1/msgs.go @@ -2,6 +2,7 @@ package v1beta1 import ( "fmt" + "github.com/gogo/protobuf/proto" "sigs.k8s.io/yaml" diff --git a/x/gov/types/v1beta1/msgs_test.go b/x/gov/types/v1beta1/msgs_test.go index 3d571a6559fc..bf6e78528c42 100644 --- a/x/gov/types/v1beta1/msgs_test.go +++ b/x/gov/types/v1beta1/msgs_test.go @@ -43,8 +43,11 @@ func TestMsgSubmitProposal(t *testing.T) { } for i, tc := range tests { + content, ok := ContentFromProposalType(tc.title, tc.description, tc.proposalType) + require.True(t, ok) + msg, err := NewMsgSubmitProposal( - ContentFromProposalType(tc.title, tc.description, tc.proposalType), + content, tc.initialDeposit, tc.proposerAddr, ) diff --git a/x/gov/types/v1beta1/proposal.go b/x/gov/types/v1beta1/proposal.go index bf735b276b29..6946a40216c4 100644 --- a/x/gov/types/v1beta1/proposal.go +++ b/x/gov/types/v1beta1/proposal.go @@ -246,14 +246,12 @@ func RegisterProposalType(ty string) { } // ContentFromProposalType returns a Content object based on the proposal type. -func ContentFromProposalType(title, desc, ty string) Content { - switch ty { - case ProposalTypeText: - return NewTextProposal(title, desc) - - default: - return nil +func ContentFromProposalType(title, desc, ty string) (Content, bool) { + if strings.EqualFold(ty, ProposalTypeText) { + return NewTextProposal(title, desc), true } + + return nil, false } // IsValidProposalType returns a boolean determining if the proposal type is diff --git a/x/gov/types/v1beta1/proposals_test.go b/x/gov/types/v1beta1/proposals_test.go index fd328b3ca471..2a29fda28753 100644 --- a/x/gov/types/v1beta1/proposals_test.go +++ b/x/gov/types/v1beta1/proposals_test.go @@ -1,16 +1,17 @@ -package v1beta1 +package v1beta1_test import ( "fmt" "testing" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/require" ) func TestProposalStatus_Format(t *testing.T) { - statusDepositPeriod, _ := ProposalStatusFromString("PROPOSAL_STATUS_DEPOSIT_PERIOD") + statusDepositPeriod, _ := v1beta1.ProposalStatusFromString("PROPOSAL_STATUS_DEPOSIT_PERIOD") tests := []struct { - pt ProposalStatus + pt v1beta1.ProposalStatus sprintFArgs string expectedStringOutput string }{ @@ -22,3 +23,36 @@ func TestProposalStatus_Format(t *testing.T) { require.Equal(t, tt.expectedStringOutput, got) } } + +func TestContentFromProposalType(t *testing.T) { + tests := []struct { + proposalType string + expectedType string + }{ + { + proposalType: "TextProposal", + expectedType: "", + }, + { + proposalType: "text", + expectedType: v1beta1.ProposalTypeText, + }, + { + proposalType: "Text", + expectedType: v1beta1.ProposalTypeText, + }, + } + + for _, test := range tests { + content, ok := v1beta1.ContentFromProposalType("title", "foo", test.proposalType) + if test.expectedType == "" { + require.False(t, ok) + continue + } + + require.True(t, ok) + require.NotNil(t, content) + require.Equal(t, test.expectedType, content.ProposalType()) + } + +} diff --git a/x/gov/types/v1beta1/query.pb.go b/x/gov/types/v1beta1/query.pb.go index 3d3ccae4bfad..d50d02d22af8 100644 --- a/x/gov/types/v1beta1/query.pb.go +++ b/x/gov/types/v1beta1/query.pb.go @@ -226,7 +226,7 @@ func (m *QueryProposalsResponse) GetPagination() *query.PageResponse { type QueryVoteRequest struct { // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // voter defines the oter address for the proposals. + // voter defines the voter address for the proposals. Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` } diff --git a/x/gov/types/v1beta1/tally.go b/x/gov/types/v1beta1/tally.go index c0f09a88ba0b..616ca6b7bb7c 100644 --- a/x/gov/types/v1beta1/tally.go +++ b/x/gov/types/v1beta1/tally.go @@ -17,8 +17,8 @@ type ValidatorGovInfo struct { // NewValidatorGovInfo creates a ValidatorGovInfo instance func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens sdk.Int, delegatorShares, - delegatorDeductions sdk.Dec, options WeightedVoteOptions) ValidatorGovInfo { - + delegatorDeductions sdk.Dec, options WeightedVoteOptions, +) ValidatorGovInfo { return ValidatorGovInfo{ Address: address, BondedTokens: bondedTokens, diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index 3a3602f874ca..d5dfbadfe8ab 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -3,7 +3,6 @@ package cli import ( "fmt" "strconv" - "strings" "github.com/spf13/cobra" @@ -53,18 +52,12 @@ func TxCmd(name string) *cobra.Command { // MsgCreateGroupCmd creates a CLI command for Msg/CreateGroup. func MsgCreateGroupCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group [admin] [metadata] [members-json-file]", - Short: "Create a group which is an aggregation " + - "of member accounts with associated weights and " + - "an administrator account. Note, the '--from' flag is " + - "ignored as it is implied from [admin].", - Long: strings.TrimSpace( - fmt.Sprintf(`Create a group which is an aggregation of member accounts with associated weights and -an administrator account. Note, the '--from' flag is ignored as it is implied from [admin]. -Members accounts can be given through a members JSON file that contains an array of members. - -Example: -$ %s tx group create-group [admin] [metadata] [members-json-file] + Use: "create-group [admin] [metadata] [members-json-file]", + Short: "Create a group which is an aggregation of member accounts with associated weights and an administrator account.", + Long: `Create a group which is an aggregation of member accounts with associated weights and an administrator account. +Note, the '--from' flag is ignored as it is implied from [admin]. Members accounts can be given through a members JSON file that contains an array of members.`, + Example: fmt.Sprintf(` +%s tx group create-group [admin] [metadata] [members-json-file] Where members.json contains: @@ -81,11 +74,7 @@ Where members.json contains: "metadata": "some metadata" } ] -} -`, - version.AppName, - ), - ), +}`, version.AppName), Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -98,7 +87,7 @@ Where members.json contains: return err } - members, err := parseMembers(clientCtx, args[2]) + members, err := parseMembers(args[2]) if err != nil { return err } @@ -126,11 +115,8 @@ func MsgUpdateGroupMembersCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-group-members [admin] [group-id] [members-json-file]", Short: "Update a group's members. Set a member's weight to \"0\" to delete it.", - Long: strings.TrimSpace( - fmt.Sprintf(`Update a group's members - -Example: -$ %s tx group update-group-members [admin] [group-id] [members-json-file] + Example: fmt.Sprintf(` +%s tx group update-group-members [admin] [group-id] [members-json-file] Where members.json contains: @@ -150,10 +136,7 @@ Where members.json contains: } Set a member's weight to "0" to delete it. -`, - version.AppName, - ), - ), +`, version.AppName), Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -166,7 +149,7 @@ Set a member's weight to "0" to delete it. return err } - members, err := parseMembers(clientCtx, args[2]) + members, err := parseMembers(args[2]) if err != nil { return err } @@ -277,20 +260,14 @@ func MsgUpdateGroupMetadataCmd() *cobra.Command { // MsgCreateGroupWithPolicyCmd creates a CLI command for Msg/CreateGroupWithPolicy. func MsgCreateGroupWithPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy]", - Short: "Create a group with policy which is an aggregation " + - "of member accounts with associated weights, " + - "an administrator account and a decision policy. Note, the '--from' flag is " + - "ignored as it is implied from [admin].", - Long: strings.TrimSpace( - fmt.Sprintf(`Create a group with policy which is an aggregation of member accounts with associated weights, + Use: "create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy-json-file]", + Short: "Create a group with policy which is an aggregation of member accounts with associated weights, an administrator account and decision policy.", + Long: `Create a group with policy which is an aggregation of member accounts with associated weights, an administrator account and decision policy. Note, the '--from' flag is ignored as it is implied from [admin]. Members accounts can be given through a members JSON file that contains an array of members. -If group-policy-as-admin flag is set to true, the admin of the newly created group and group policy is set with the group policy address itself. - -Example: -$ %s tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] \ -'{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"1s"}' +If group-policy-as-admin flag is set to true, the admin of the newly created group and group policy is set with the group policy address itself.`, + Example: fmt.Sprintf(` +%s tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] members.json policy.json where members.json contains: @@ -308,10 +285,18 @@ where members.json contains: } ] } -`, - version.AppName, - ), - ), + +and policy.json contains: + +{ + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", + "threshold": "1", + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } +} +`, version.AppName), Args: cobra.MinimumNArgs(5), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -329,13 +314,13 @@ where members.json contains: return err } - members, err := parseMembers(clientCtx, args[3]) + members, err := parseMembers(args[3]) if err != nil { return err } - var policy group.DecisionPolicy - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[4]), &policy); err != nil { + policy, err := parseDecisionPolicy(clientCtx.Codec, args[4]) + if err != nil { return err } @@ -367,25 +352,32 @@ where members.json contains: // MsgCreateGroupPolicyCmd creates a CLI command for Msg/CreateGroupPolicy. func MsgCreateGroupPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group-policy [admin] [group-id] [metadata] [decision-policy]", - Short: "Create a group policy which is an account " + - "associated with a group and a decision policy. " + - "Note, the '--from' flag is " + - "ignored as it is implied from [admin].", - Long: strings.TrimSpace( - fmt.Sprintf(`Create a group policy which is an account associated with a group and a decision policy. -Note, the '--from' flag is ignored as it is implied from [admin]. - -Example: -$ %s tx group create-group-policy [admin] [group-id] [metadata] \ -'{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"1s"}' - -Here, we can use percentage decision policy when needed, where 0 < percentage <= 1. -Ex: '{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", "timeout":"1s"}' -`, - version.AppName, - ), - ), + Use: "create-group-policy [admin] [group-id] [metadata] [decision-policy-json-file]", + Short: `Create a group policy which is an account associated with a group and a decision policy. Note, the '--from' flag is ignored as it is implied from [admin].`, + Example: fmt.Sprintf(` +%s tx group create-group-policy [admin] [group-id] [metadata] policy.json + +where policy.json contains: + +{ + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", + "threshold": "1", + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } +} + +Here, we can use percentage decision policy when needed, where 0 < percentage <= 1: + +{ + "@type": "/cosmos.group.v1.PercentageDecisionPolicy", + "percentage": "0.5", + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } +}`, version.AppName), Args: cobra.ExactArgs(4), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -403,8 +395,8 @@ Ex: '{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", " return err } - var policy group.DecisionPolicy - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[3]), &policy); err != nil { + policy, err := parseDecisionPolicy(clientCtx.Codec, args[3]) + if err != nil { return err } @@ -448,9 +440,9 @@ func MsgUpdateGroupPolicyAdminCmd() *cobra.Command { } msg := &group.MsgUpdateGroupPolicyAdmin{ - Admin: clientCtx.GetFromAddress().String(), - Address: args[1], - NewAdmin: args[2], + Admin: clientCtx.GetFromAddress().String(), + GroupPolicyAddress: args[1], + NewAdmin: args[2], } if err = msg.ValidateBasic(); err != nil { return fmt.Errorf("message validation failed: %w", err) @@ -468,7 +460,7 @@ func MsgUpdateGroupPolicyAdminCmd() *cobra.Command { // MsgUpdateGroupPolicyDecisionPolicyCmd creates a CLI command for Msg/UpdateGroupPolicyDecisionPolicy. func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-group-policy-decision-policy [admin] [group-policy-account] [decision-policy]", + Use: "update-group-policy-decision-policy [admin] [group-policy-account] [decision-policy-json-file]", Short: "Update a group policy's decision policy", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { @@ -482,8 +474,8 @@ func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { return err } - var policy group.DecisionPolicy - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[2]), &policy); err != nil { + policy, err := parseDecisionPolicy(clientCtx.Codec, args[2]) + if err != nil { return err } @@ -492,7 +484,7 @@ func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { return err } - msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest( + msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicy( clientCtx.GetFromAddress(), accountAddress, policy, @@ -532,9 +524,9 @@ func MsgUpdateGroupPolicyMetadataCmd() *cobra.Command { } msg := &group.MsgUpdateGroupPolicyMetadata{ - Admin: clientCtx.GetFromAddress().String(), - Address: args[1], - Metadata: args[2], + Admin: clientCtx.GetFromAddress().String(), + GroupPolicyAddress: args[1], + Metadata: args[2], } if err = msg.ValidateBasic(); err != nil { return fmt.Errorf("message validation failed: %w", err) @@ -554,13 +546,11 @@ func MsgSubmitProposalCmd() *cobra.Command { cmd := &cobra.Command{ Use: "submit-proposal [proposal_json_file]", Short: "Submit a new proposal", - Long: fmt.Sprintf(`Submit a new proposal. - + Long: `Submit a new proposal. Parameters: - msg_tx_json_file: path to json file with messages that will be executed if the proposal is accepted. - -Example: - $ %s tx gov submit-proposal path/to/proposal.json + msg_tx_json_file: path to json file with messages that will be executed if the proposal is accepted.`, + Example: fmt.Sprintf(` +%s tx group submit-proposal path/to/proposal.json Where proposal.json contains: @@ -575,7 +565,7 @@ Example: "amount":[{"denom": "stake","amount": "10"}] } ], - "metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata + "metadata": "4pIMOgIGx1vZGU=", // base64-encoded metadata "proposers": ["cosmos1...", "cosmos1..."], }`, version.AppName), Args: cobra.ExactArgs(1), @@ -601,7 +591,7 @@ Example: execStr, _ := cmd.Flags().GetString(FlagExec) - msg, err := group.NewMsgSubmitProposalRequest( + msg, err := group.NewMsgSubmitProposal( prop.GroupPolicyAddress, prop.Proposers, msgs, @@ -636,7 +626,7 @@ func MsgWithdrawProposalCmd() *cobra.Command { Parameters: proposal-id: unique ID of the proposal. group-policy-admin-or-proposer: either admin of the group policy or one the proposer of the proposal. - (note: --from flag will be ignored here) + Note: --from flag will be ignored here. `, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -763,7 +753,7 @@ func MsgExecCmd() *cobra.Command { msg := &group.MsgExec{ ProposalId: proposalID, - Signer: clientCtx.GetFromAddress().String(), + Executor: clientCtx.GetFromAddress().String(), } if err != nil { return err @@ -786,14 +776,13 @@ func MsgExecCmd() *cobra.Command { func MsgLeaveGroupCmd() *cobra.Command { cmd := &cobra.Command{ Use: "leave-group [member-address] [group-id]", - Short: "remove member from the group", - Long: ` remove member from the group + Short: "Remove member from the group", + Long: `Remove member from the group Parameters: group-id: unique id of the group member-address: account address of the group member - Note, the '--from' flag is - ignored as it is implied from [member-address] + Note, the '--from' flag is ignored as it is implied from [member-address] `, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/group/client/cli/util.go b/x/group/client/cli/util.go index e7ac27998524..53b49acedcb1 100644 --- a/x/group/client/cli/util.go +++ b/x/group/client/cli/util.go @@ -2,17 +2,35 @@ package cli import ( "encoding/json" + "fmt" "io/ioutil" "os" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/group" ) -func parseMembers(clientCtx client.Context, membersFile string) ([]group.Member, error) { - members := group.Members{} +func parseDecisionPolicy(cdc codec.Codec, decisionPolicyFile string) (group.DecisionPolicy, error) { + if decisionPolicyFile == "" { + return nil, fmt.Errorf("decision policy is required") + } + + contents, err := ioutil.ReadFile(decisionPolicyFile) + if err != nil { + return nil, err + } + + var policy group.DecisionPolicy + if err := cdc.UnmarshalInterfaceJSON(contents, &policy); err != nil { + return nil, fmt.Errorf("failed to parse decision policy: %w", err) + } + + return policy, nil +} + +func parseMembers(membersFile string) ([]group.MemberRequest, error) { + members := group.MemberRequests{} if membersFile == "" { return members.Members, nil @@ -23,7 +41,7 @@ func parseMembers(clientCtx client.Context, membersFile string) ([]group.Member, return nil, err } - err = clientCtx.Codec.UnmarshalJSON(contents, &members) + err = json.Unmarshal(contents, &members) if err != nil { return nil, err } diff --git a/x/group/client/testutil/query.go b/x/group/client/testutil/query.go index 43ef6c585074..74c152b50978 100644 --- a/x/group/client/testutil/query.go +++ b/x/group/client/testutil/query.go @@ -327,7 +327,11 @@ func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { s.Require().Equal(s.groupPolicies[0].Admin, g.Admin) s.Require().Equal(s.groupPolicies[0].Metadata, g.Metadata) s.Require().Equal(s.groupPolicies[0].Version, g.Version) - s.Require().Equal(s.groupPolicies[0].GetDecisionPolicy(), g.GetDecisionPolicy()) + dp1, err := s.groupPolicies[0].GetDecisionPolicy() + s.Require().NoError(err) + dp2, err := g.GetDecisionPolicy() + s.Require().NoError(err) + s.Require().Equal(dp1, dp2) } }) } @@ -398,7 +402,11 @@ func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { s.Require().Equal(res.GroupPolicies[i].Metadata, tc.expectGroupPolicies[i].Metadata) s.Require().Equal(res.GroupPolicies[i].Version, tc.expectGroupPolicies[i].Version) s.Require().Equal(res.GroupPolicies[i].Admin, tc.expectGroupPolicies[i].Admin) - s.Require().Equal(res.GroupPolicies[i].GetDecisionPolicy(), tc.expectGroupPolicies[i].GetDecisionPolicy()) + dp1, err := s.groupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + dp2, err := tc.expectGroupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + s.Require().Equal(dp1, dp2) } } }) @@ -470,7 +478,11 @@ func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { s.Require().Equal(res.GroupPolicies[i].Metadata, tc.expectGroupPolicies[i].Metadata) s.Require().Equal(res.GroupPolicies[i].Version, tc.expectGroupPolicies[i].Version) s.Require().Equal(res.GroupPolicies[i].Admin, tc.expectGroupPolicies[i].Admin) - s.Require().Equal(res.GroupPolicies[i].GetDecisionPolicy(), tc.expectGroupPolicies[i].GetDecisionPolicy()) + dp1, err := s.groupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + dp2, err := tc.expectGroupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + s.Require().Equal(dp1, dp2) } } }) @@ -758,7 +770,7 @@ func (s *IntegrationTestSuite) TestTallyResult() { member := s.voter - var commonFlags = []string{ + commonFlags := []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), @@ -781,7 +793,7 @@ func (s *IntegrationTestSuite) TestTallyResult() { var txResp sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().Equal(uint32(0), txResp.Code, out.String()) - proposalId := s.getProposalIdFromTxResponse(txResp) + proposalID := s.getProposalIDFromTxResponse(txResp) testCases := []struct { name string @@ -816,7 +828,7 @@ func (s *IntegrationTestSuite) TestTallyResult() { { "valid proposal id with no votes", []string{ - proposalId, + proposalID, fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, @@ -860,5 +872,4 @@ func (s *IntegrationTestSuite) TestTallyResult() { } }) } - } diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 6fb7725ed81b..7a0381a83f58 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/gogo/protobuf/proto" + "github.com/google/uuid" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" @@ -35,6 +36,7 @@ type IntegrationTestSuite struct { proposal *group.Proposal vote *group.Vote voter *group.Member + commonFlags []string } const validMetadata = "metadata" @@ -48,6 +50,12 @@ func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") + s.commonFlags = []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + var err error s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg) s.Require().NoError(err) @@ -75,12 +83,6 @@ func (s *IntegrationTestSuite) SetupSuite() { ) s.Require().NoError(err) - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } - memberWeight := "3" // create a group validMembers := fmt.Sprintf(` @@ -101,12 +103,12 @@ func (s *IntegrationTestSuite) SetupSuite() { validMetadata, validMembersFile.Name(), }, - commonFlags..., + s.commonFlags..., ), ) s.Require().NoError(err, out.String()) - var txResp = sdk.TxResponse{} + txResp := sdk.TxResponse{} s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().Equal(uint32(0), txResp.Code, out.String()) @@ -118,20 +120,8 @@ func (s *IntegrationTestSuite) SetupSuite() { if threshold > 3 { threshold = 3 } - out, err = cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateGroupPolicyCmd(), - append( - []string{ - val.Address.String(), - "1", - validMetadata, - fmt.Sprintf("{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"%d\", \"windows\":{\"voting_period\":\"30000s\"}}", threshold), - }, - commonFlags..., - ), - ) - s.Require().NoError(err, out.String()) - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) - s.Require().Equal(uint32(0), txResp.Code, out.String()) + + s.createGroupThresholdPolicyWithBalance(val.Address.String(), "1", threshold, 1000) out, err = cli.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) s.Require().NoError(err, out.String()) @@ -144,9 +134,9 @@ func (s *IntegrationTestSuite) SetupSuite() { val.Address.String(), "1", validMetadata, - fmt.Sprintf("{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"%f\", \"windows\":{\"voting_period\":\"30000s\"}}", percentage), + testutil.WriteToNewTempFile(s.T(), fmt.Sprintf(`{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"%f", "windows":{"voting_period":"30000s"}}`, percentage)).Name(), }, - commonFlags..., + s.commonFlags..., ), ) s.Require().NoError(err, out.String()) @@ -170,7 +160,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.groupPolicies[0].Address, val.Address.String(), ""), }, - commonFlags..., + s.commonFlags..., ), ) s.Require().NoError(err, out.String()) @@ -186,7 +176,7 @@ func (s *IntegrationTestSuite) SetupSuite() { "VOTE_OPTION_YES", "", }, - commonFlags..., + s.commonFlags..., ), ) s.Require().NoError(err, out.String()) @@ -223,11 +213,6 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } validMembers := fmt.Sprintf(`{"members": [{ "address": "%s", @@ -271,7 +256,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { "", validMembersFile.Name(), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -287,7 +272,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { validMembersFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -302,7 +287,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { strings.Repeat("a", 256), "", }, - commonFlags..., + s.commonFlags..., ), true, "group metadata: limit exceeded", @@ -317,7 +302,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { "null", invalidMembersAddressFile.Name(), }, - commonFlags..., + s.commonFlags..., ), true, "message validation failed: address: empty address string is not allowed", @@ -332,7 +317,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { "null", invalidMembersWeightFile.Name(), }, - commonFlags..., + s.commonFlags..., ), true, "expected a positive decimal, got 0: invalid decimal string", @@ -347,7 +332,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroup() { "null", invalidMembersMetadataFile.Name(), }, - commonFlags..., + s.commonFlags..., ), true, "member metadata: limit exceeded", @@ -381,11 +366,6 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() { clientCtx := val.ClientCtx require := s.Require() - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } groupIDs := make([]string, 2) for i := 0; i < 2; i++ { @@ -402,14 +382,14 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() { validMetadata, validMembersFile.Name(), }, - commonFlags..., + s.commonFlags..., ), ) require.NoError(err, out.String()) var txResp sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().Equal(uint32(0), txResp.Code, out.String()) - groupIDs[i] = s.getGroupIdFromTxResponse(txResp) + groupIDs[i] = s.getGroupIDFromTxResponse(txResp) } testCases := []struct { @@ -428,7 +408,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() { groupIDs[0], s.network.Validators[1].Address.String(), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -444,7 +424,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() { s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -459,7 +439,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() { "", s.network.Validators[1].Address.String(), }, - commonFlags..., + s.commonFlags..., ), true, "strconv.ParseUint: parsing \"\": invalid syntax", @@ -474,7 +454,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAdmin() { "12345", s.network.Validators[1].Address.String(), }, - commonFlags..., + s.commonFlags..., ), true, "not found", @@ -507,11 +487,6 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMetadata() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } testCases := []struct { name string @@ -526,10 +501,10 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMetadata() { append( []string{ val.Address.String(), - "2", + "1", validMetadata, }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -541,11 +516,11 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMetadata() { append( []string{ val.Address.String(), - "2", + "1", validMetadata, fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -560,7 +535,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMetadata() { strconv.FormatUint(s.group.Id, 10), strings.Repeat("a", 256), }, - commonFlags..., + s.commonFlags..., ), true, "group metadata: limit exceeded", @@ -593,11 +568,12 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } + + weights := []string{"1", "1", "1"} + accounts := s.createAccounts(3) + + groupID := s.createGroupWithMembers(weights, accounts) + groupPolicyAddress := s.createGroupThresholdPolicyWithBalance(accounts[0], groupID, 3, 100) validUpdatedMembersFileName := testutil.WriteToNewTempFile(s.T(), fmt.Sprintf(`{"members": [{ "address": "%s", @@ -607,13 +583,13 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "address": "%s", "weight": "1", "metadata": "%s" - }]}`, val.Address.String(), validMetadata, s.groupPolicies[0].Address, validMetadata)).Name() + }]}`, accounts[0], validMetadata, groupPolicyAddress, validMetadata)).Name() invalidMembersMetadata := fmt.Sprintf(`{"members": [{ "address": "%s", "weight": "1", "metadata": "%s" - }]}`, val.Address.String(), tooLongMetadata) + }]}`, accounts[0], tooLongMetadata) invalidMembersMetadataFileName := testutil.WriteToNewTempFile(s.T(), invalidMembersMetadata).Name() testCases := []struct { @@ -628,11 +604,11 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "correct data", append( []string{ - val.Address.String(), - "2", + accounts[0], + groupID, validUpdatedMembersFileName, }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -643,8 +619,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "with amino-json", append( []string{ - val.Address.String(), - "2", + accounts[0], + groupID, testutil.WriteToNewTempFile(s.T(), fmt.Sprintf(`{"members": [{ "address": "%s", "weight": "2", @@ -652,7 +628,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { }]}`, s.groupPolicies[0].Address, validMetadata)).Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -663,11 +639,11 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "group member metadata too long", append( []string{ - val.Address.String(), - strconv.FormatUint(s.group.Id, 10), + accounts[0], + groupID, invalidMembersMetadataFileName, }, - commonFlags..., + s.commonFlags..., ), true, "group member metadata: limit exceeded", @@ -678,11 +654,11 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "group doesn't exist", append( []string{ - val.Address.String(), + accounts[0], "12345", validUpdatedMembersFileName, }, - commonFlags..., + s.commonFlags..., ), true, "not found", @@ -715,11 +691,8 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } + + validMembers := fmt.Sprintf(`{"members": [{ "address": "%s", @@ -747,6 +720,8 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { }]}`, val.Address.String(), tooLongMetadata) invalidMembersMetadataFile := testutil.WriteToNewTempFile(s.T(), invalidMembersMetadata) + thresholdDecisionPolicyFile := testutil.WriteToNewTempFile(s.T(), `{"@type": "/cosmos.group.v1.ThresholdDecisionPolicy","threshold": "1","windows": {"voting_period":"1s"}}`) + testCases := []struct { name string args []string @@ -763,10 +738,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -781,10 +756,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, true), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -799,11 +774,11 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -818,10 +793,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { strings.Repeat("a", 256), validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, - commonFlags..., + s.commonFlags..., ), true, "group metadata: limit exceeded", @@ -836,10 +811,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, strings.Repeat("a", 256), validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, - commonFlags..., + s.commonFlags..., ), true, "group policy metadata: limit exceeded", @@ -854,10 +829,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, invalidMembersAddressFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, - commonFlags..., + s.commonFlags..., ), true, "message validation failed: address: empty address string is not allowed", @@ -872,10 +847,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, invalidMembersWeightFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, - commonFlags..., + s.commonFlags..., ), true, "expected a positive decimal, got 0: invalid decimal string", @@ -890,10 +865,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, invalidMembersMetadataFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, - commonFlags..., + s.commonFlags..., ), true, "member metadata: limit exceeded", @@ -926,14 +901,11 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { wrongAdmin := s.network.Validators[1].Address clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } groupID := s.group.Id + thresholdDecisionPolicyFile := testutil.WriteToNewTempFile(s.T(), `{"@type": "/cosmos.group.v1.ThresholdDecisionPolicy","threshold": "1","windows": {"voting_period":"1s"}}`) + testCases := []struct { name string args []string @@ -949,9 +921,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -965,9 +937,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"0.5\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", "windows":{"voting_period":"1s"}}`).Name(), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -981,10 +953,10 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -998,9 +970,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { wrongAdmin.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, - commonFlags..., + s.commonFlags..., ), true, "key not found", @@ -1014,9 +986,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), strings.Repeat("a", 500), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, - commonFlags..., + s.commonFlags..., ), true, "group policy metadata: limit exceeded", @@ -1030,9 +1002,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), "10", validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, - commonFlags..., + s.commonFlags..., ), true, "not found", @@ -1046,9 +1018,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"-0.5\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"-0.5", "windows":{"voting_period":"1s"}}`).Name(), }, - commonFlags..., + s.commonFlags..., ), true, "expected a positive decimal", @@ -1062,9 +1034,9 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"2\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"2", "windows":{"voting_period":"1s"}}`).Name(), }, - commonFlags..., + s.commonFlags..., ), true, "percentage must be > 0 and <= 1", @@ -1099,11 +1071,9 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyAdmin() { clientCtx := val.ClientCtx groupPolicy := s.groupPolicies[3] - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } + + commonFlags := s.commonFlags + commonFlags = append(commonFlags, fmt.Sprintf("--%s=%d", flags.FlagGas, 300000)) testCases := []struct { name string @@ -1202,11 +1172,9 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { clientCtx := val.ClientCtx groupPolicy := s.groupPolicies[2] - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } + + commonFlags := s.commonFlags + commonFlags = append(commonFlags, fmt.Sprintf("--%s=%d", flags.FlagGas, 300000)) testCases := []struct { name string @@ -1222,7 +1190,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"40000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"40000s"}}`).Name(), }, commonFlags..., ), @@ -1237,7 +1205,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"0.5\", \"windows\":{\"voting_period\":\"40000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", "windows":{"voting_period":"40000s"}}`).Name(), }, commonFlags..., ), @@ -1252,7 +1220,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"50000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"50000s"}}`).Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, commonFlags..., @@ -1268,7 +1236,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ newAdmin.String(), groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"1s"}}`).Name(), }, commonFlags..., ), @@ -1283,7 +1251,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, newAdmin.String(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"1s"}}`).Name(), }, commonFlags..., ), @@ -1298,7 +1266,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"-0.5\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"-0.5", "windows":{"voting_period":"1s"}}`).Name(), }, commonFlags..., ), @@ -1313,7 +1281,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"2\", \"windows\":{\"voting_period\":\"40000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"2", "windows":{"voting_period":"40000s"}}`).Name(), }, commonFlags..., ), @@ -1350,11 +1318,9 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyMetadata() { clientCtx := val.ClientCtx groupPolicy := s.groupPolicies[2] - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } + + commonFlags := s.commonFlags + commonFlags = append(commonFlags, fmt.Sprintf("--%s=%d", flags.FlagGas, 300000)) testCases := []struct { name string @@ -1466,11 +1432,6 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } testCases := []struct { name string @@ -1490,7 +1451,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { "", ), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1508,7 +1469,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { ), fmt.Sprintf("--%s=try", client.FlagExec), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1525,7 +1486,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { ""), fmt.Sprintf("--%s=try", client.FlagExec), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1543,7 +1504,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { ), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1560,7 +1521,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { tooLongMetadata, ), }, - commonFlags..., + s.commonFlags..., ), true, "metadata: limit exceeded", @@ -1576,10 +1537,10 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { val.Address.String(), s.groupPolicies[0].Address, ""), }, - commonFlags..., + s.commonFlags..., ), true, - "msg does not have group policy authorization: unauthorized", + "msg does not have group policy authorization", nil, 0, }, @@ -1593,7 +1554,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { "", ), }, - commonFlags..., + s.commonFlags..., ), true, "invalid.info: key not found", @@ -1610,7 +1571,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { "", ), }, - commonFlags..., + s.commonFlags..., ), true, "group policy: decoding bech32 failed", @@ -1627,7 +1588,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { "", ), }, - commonFlags..., + s.commonFlags..., ), true, "group policy: not found", @@ -1660,24 +1621,25 @@ func (s *IntegrationTestSuite) TestTxVote() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } ids := make([]string, 4) + weights := []string{"1", "1", "1"} + accounts := s.createAccounts(3) + + groupID := s.createGroupWithMembers(weights, accounts) + groupPolicyAddress := s.createGroupThresholdPolicyWithBalance(accounts[0], groupID, 3, 100) for i := 0; i < 4; i++ { out, err := cli.ExecTestCLICmd(val.ClientCtx, client.MsgSubmitProposalCmd(), append( []string{ s.createCLIProposal( - s.groupPolicies[1].Address, val.Address.String(), - s.groupPolicies[1].Address, val.Address.String(), - ""), + groupPolicyAddress, accounts[0], + groupPolicyAddress, accounts[0], + "", + ), }, - commonFlags..., + s.commonFlags..., ), ) s.Require().NoError(err, out.String()) @@ -1685,7 +1647,7 @@ func (s *IntegrationTestSuite) TestTxVote() { var txResp sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().Equal(uint32(0), txResp.Code, out.String()) - ids[i] = s.getProposalIdFromTxResponse(txResp) + ids[i] = s.getProposalIDFromTxResponse(txResp) } testCases := []struct { @@ -1701,11 +1663,11 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ ids[0], - val.Address.String(), + accounts[0], "VOTE_OPTION_YES", "", }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1717,12 +1679,12 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ ids[1], - val.Address.String(), + accounts[0], "VOTE_OPTION_YES", "", fmt.Sprintf("--%s=try", client.FlagExec), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1734,12 +1696,12 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ ids[2], - val.Address.String(), + accounts[0], "VOTE_OPTION_NO", "", fmt.Sprintf("--%s=try", client.FlagExec), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1751,12 +1713,12 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ ids[3], - val.Address.String(), + accounts[0], "VOTE_OPTION_YES", "", fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1768,11 +1730,11 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ "abcd", - val.Address.String(), + accounts[0], "VOTE_OPTION_YES", "", }, - commonFlags..., + s.commonFlags..., ), true, "invalid syntax", @@ -1784,11 +1746,11 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ "1234", - val.Address.String(), + accounts[0], "VOTE_OPTION_YES", "", }, - commonFlags..., + s.commonFlags..., ), true, "proposal: not found", @@ -1800,11 +1762,11 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ "2", - val.Address.String(), + accounts[0], "VOTE_OPTION_YES", tooLongMetadata, }, - commonFlags..., + s.commonFlags..., ), true, "metadata: limit exceeded", @@ -1816,11 +1778,11 @@ func (s *IntegrationTestSuite) TestTxVote() { append( []string{ "2", - val.Address.String(), + accounts[0], "INVALID_VOTE_OPTION", "", }, - commonFlags..., + s.commonFlags..., ), true, "not a valid vote option", @@ -1853,11 +1815,6 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { val := s.network.Validators[0] clientCtx := val.ClientCtx - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } ids := make([]string, 2) @@ -1870,7 +1827,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { s.groupPolicies[1].Address, val.Address.String(), ""), }, - commonFlags..., + s.commonFlags..., ), ) s.Require().NoError(err, out.String()) @@ -1878,7 +1835,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { var txResp sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().Equal(uint32(0), txResp.Code, out.String()) - ids[i] = s.getProposalIdFromTxResponse(txResp) + ids[i] = s.getProposalIDFromTxResponse(txResp) } testCases := []struct { @@ -1896,7 +1853,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { ids[0], val.Address.String(), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -1910,7 +1867,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { ids[0], val.Address.String(), }, - commonFlags..., + s.commonFlags..., ), true, "cannot withdraw a proposal with the status of PROPOSAL_STATUS_WITHDRAWN", @@ -1924,7 +1881,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { "222", "wrongAdmin", }, - commonFlags..., + s.commonFlags..., ), true, "not found", @@ -1938,7 +1895,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { "abc", val.Address.String(), }, - commonFlags..., + s.commonFlags..., ), true, "invalid syntax", @@ -1952,7 +1909,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { ids[1], "wrongAdmin", }, - commonFlags..., + s.commonFlags..., ), true, "key not found", @@ -1981,7 +1938,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawProposal() { } } -func (s *IntegrationTestSuite) getProposalIdFromTxResponse(txResp sdk.TxResponse) string { +func (s *IntegrationTestSuite) getProposalIDFromTxResponse(txResp sdk.TxResponse) string { s.Require().Greater(len(txResp.Logs), 0) s.Require().NotNil(txResp.Logs[0].Events) events := txResp.Logs[0].Events @@ -2001,11 +1958,6 @@ func (s *IntegrationTestSuite) TestTxExec() { clientCtx := val.ClientCtx require := s.Require() - var commonFlags = []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } var proposalIDs []string // create proposals and vote @@ -2019,7 +1971,7 @@ func (s *IntegrationTestSuite) TestTxExec() { "", ), }, - commonFlags..., + s.commonFlags..., ), ) require.NoError(err, out.String()) @@ -2027,7 +1979,7 @@ func (s *IntegrationTestSuite) TestTxExec() { var txResp sdk.TxResponse require.NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) require.Equal(uint32(0), txResp.Code, out.String()) - proposalID := s.getProposalIdFromTxResponse(txResp) + proposalID := s.getProposalIDFromTxResponse(txResp) proposalIDs = append(proposalIDs, proposalID) out, err = cli.ExecTestCLICmd(val.ClientCtx, client.MsgVoteCmd(), @@ -2038,7 +1990,7 @@ func (s *IntegrationTestSuite) TestTxExec() { "VOTE_OPTION_YES", "", }, - commonFlags..., + s.commonFlags..., ), ) require.NoError(err, out.String()) @@ -2059,7 +2011,7 @@ func (s *IntegrationTestSuite) TestTxExec() { proposalIDs[0], fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -2074,7 +2026,7 @@ func (s *IntegrationTestSuite) TestTxExec() { fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -2088,7 +2040,7 @@ func (s *IntegrationTestSuite) TestTxExec() { "abcd", fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), }, - commonFlags..., + s.commonFlags..., ), true, "invalid syntax", @@ -2102,7 +2054,7 @@ func (s *IntegrationTestSuite) TestTxExec() { "1234", fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), }, - commonFlags..., + s.commonFlags..., ), true, "proposal: not found", @@ -2136,31 +2088,8 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { clientCtx := val.ClientCtx require := s.Require() - commonFlags := []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } - // create 3 accounts with some tokens - members := make([]string, 3) - for i := 1; i <= 3; i++ { - info, _, err := clientCtx.Keyring.NewMnemonic(fmt.Sprintf("member%d", i), keyring.English, sdk.FullFundraiserPath, - keyring.DefaultBIP39Passphrase, hd.Secp256k1) - require.NoError(err) - - pk, err := info.GetPubKey() - require.NoError(err) - - account := sdk.AccAddress(pk.Address()) - members[i-1] = account.String() - - _, err = banktestutil.MsgSendExec(clientCtx, val.Address, account, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(100))), - commonFlags..., - ) - require.NoError(err) - } + members := s.createAccounts(3) // create a group with three members validMembers := fmt.Sprintf(`{"members": [{ @@ -2184,13 +2113,13 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { validMetadata, validMembersFile.Name(), }, - commonFlags..., + s.commonFlags..., ), ) require.NoError(err, out.String()) var txResp sdk.TxResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) - groupID := s.getGroupIdFromTxResponse(txResp) + groupID := s.getGroupIDFromTxResponse(txResp) // create group policy out, err = cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupPolicyCmd(), @@ -2199,9 +2128,9 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { val.Address.String(), groupID, "AQ==", - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"3\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"3", "windows":{"voting_period":"1s"}}`).Name(), }, - commonFlags..., + s.commonFlags..., ), ) require.NoError(err, out.String()) @@ -2227,7 +2156,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), }, - commonFlags..., + s.commonFlags..., ), true, "key not found", @@ -2240,7 +2169,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { "40", fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), }, - commonFlags..., + s.commonFlags..., ), true, "group: not found", @@ -2253,7 +2182,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -2266,7 +2195,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), }, - commonFlags..., + s.commonFlags..., ), true, "is not part of group", @@ -2279,7 +2208,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, members[1]), }, - commonFlags..., + s.commonFlags..., ), false, "", @@ -2303,7 +2232,213 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { } } -func (s *IntegrationTestSuite) getGroupIdFromTxResponse(txResp sdk.TxResponse) string { +func (s *IntegrationTestSuite) TestExecProposalsWhenMemberLeavesOrIsUpdated() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + weights := []string{"1", "1", "2"} + accounts := s.createAccounts(3) + testCases := []struct { + name string + votes []string + members []string + malleate func(groupID string) error + expectLogErr bool + errMsg string + respType proto.Message + }{ + { + "member leaves while all others vote yes", + []string{"VOTE_OPTION_YES", "VOTE_OPTION_YES", "VOTE_OPTION_YES"}, + accounts, + func(groupID string) error { + leavingMemberIdx := 1 + args := append( + []string{ + accounts[leavingMemberIdx], + groupID, + + fmt.Sprintf("--%s=%s", flags.FlagFrom, accounts[leavingMemberIdx]), + }, + s.commonFlags..., + ) + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgLeaveGroupCmd(), args) + s.Require().NoError(err, out.String()) + var resp sdk.TxResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) + s.Require().Equal(uint32(0), resp.Code, out.String()) + + return err + }, + false, + "", + &sdk.TxResponse{}, + }, + { + "member leaves while all others vote yes and no", + []string{"VOTE_OPTION_NO", "VOTE_OPTION_YES", "VOTE_OPTION_YES"}, + accounts, + func(groupID string) error { + leavingMemberIdx := 1 + args := append( + []string{ + accounts[leavingMemberIdx], + groupID, + + fmt.Sprintf("--%s=%s", flags.FlagFrom, accounts[leavingMemberIdx]), + }, + s.commonFlags..., + ) + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgLeaveGroupCmd(), args) + s.Require().NoError(err, out.String()) + var resp sdk.TxResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) + s.Require().Equal(uint32(0), resp.Code, out.String()) + + return err + }, + true, + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + &sdk.TxResponse{}, + }, + { + "member that leaves does affect the threshold policy outcome", + []string{"VOTE_OPTION_YES", "VOTE_OPTION_YES"}, + accounts, + func(groupID string) error { + leavingMemberIdx := 2 + args := append( + []string{ + accounts[leavingMemberIdx], + groupID, + + fmt.Sprintf("--%s=%s", flags.FlagFrom, accounts[leavingMemberIdx]), + }, + s.commonFlags..., + ) + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgLeaveGroupCmd(), args) + s.Require().NoError(err, out.String()) + var resp sdk.TxResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) + s.Require().Equal(uint32(0), resp.Code, out.String()) + + return err + }, + false, + "", + &sdk.TxResponse{}, + }, + { + "update group policy voids the proposal", + []string{"VOTE_OPTION_YES", "VOTE_OPTION_NO"}, + accounts, + func(groupID string) error { + updateGroup := s.newValidMembers(weights[0:1], accounts[0:1]) + + updateGroupByte, err := json.Marshal(updateGroup) + s.Require().NoError(err) + + validUpdateMemberFileName := testutil.WriteToNewTempFile(s.T(), string(updateGroupByte)).Name() + + args := append( + []string{ + accounts[0], + groupID, + validUpdateMemberFileName, + }, + s.commonFlags..., + ) + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgUpdateGroupMembersCmd(), args) + s.Require().NoError(err, out.String()) + var resp sdk.TxResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) + s.Require().Equal(uint32(0), resp.Code, out.String()) + + return err + }, + true, + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmdSubmitProposal := client.MsgSubmitProposalCmd() + cmdMsgExec := client.MsgExecCmd() + + groupID := s.createGroupWithMembers(weights, accounts) + groupPolicyAddress := s.createGroupThresholdPolicyWithBalance(accounts[0], groupID, 3, 100) + + // Submit proposal + proposal := s.createCLIProposal( + groupPolicyAddress, tc.members[0], + groupPolicyAddress, tc.members[0], + "", + ) + submitProposalArgs := append([]string{ + proposal, + }, + s.commonFlags..., + ) + var submitProposalResp sdk.TxResponse + out, err := cli.ExecTestCLICmd(clientCtx, cmdSubmitProposal, submitProposalArgs) + s.Require().NoError(err, out.String()) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &submitProposalResp), out.String()) + proposalID := s.getProposalIDFromTxResponse(submitProposalResp) + + for i, vote := range tc.votes { + memberAddress := tc.members[i] + out, err = cli.ExecTestCLICmd(val.ClientCtx, client.MsgVoteCmd(), + append( + []string{ + proposalID, + memberAddress, + vote, + "", + }, + s.commonFlags..., + ), + ) + + var txResp sdk.TxResponse + s.Require().NoError(err, out.String()) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) + s.Require().Equal(uint32(0), txResp.Code, out.String()) + + } + + err = tc.malleate(groupID) + s.Require().NoError(err) + + err = s.network.WaitForNextBlock() + s.Require().NoError(err) + + args := append( + []string{ + proposalID, + fmt.Sprintf("--%s=%s", flags.FlagFrom, tc.members[0]), + }, + s.commonFlags..., + ) + out, err = cli.ExecTestCLICmd(clientCtx, cmdMsgExec, args) + s.Require().NoError(err) + + var execResp sdk.TxResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &execResp), out.String()) + + if tc.expectLogErr { + s.Require().Contains(execResp.RawLog, tc.errMsg) + } + + }) + } + +} + +func (s *IntegrationTestSuite) getGroupIDFromTxResponse(txResp sdk.TxResponse) string { s.Require().Greater(len(txResp.Logs), 0) s.Require().NotNil(txResp.Logs[0].Events) events := txResp.Logs[0].Events @@ -2327,7 +2462,7 @@ func (s *IntegrationTestSuite) createCLIProposal(groupPolicyAddress, proposer, s msg := banktypes.MsgSend{ FromAddress: sendFrom, ToAddress: sendTo, - Amount: sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))), + Amount: sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(20))), } msgJSON, err := s.cfg.Codec.MarshalInterfaceJSON(&msg) s.Require().NoError(err) @@ -2344,3 +2479,135 @@ func (s *IntegrationTestSuite) createCLIProposal(groupPolicyAddress, proposer, s return testutil.WriteToNewTempFile(s.T(), string(bz)).Name() } + +func (s *IntegrationTestSuite) createAccounts(quantity int) []string { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + accounts := make([]string, quantity) + + for i := 1; i <= quantity; i++ { + memberNumber := uuid.New().String() + + info, _, err := clientCtx.Keyring.NewMnemonic(fmt.Sprintf("member%s", memberNumber), keyring.English, sdk.FullFundraiserPath, + keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + + pk, err := info.GetPubKey() + s.Require().NoError(err) + + account := sdk.AccAddress(pk.Address()) + accounts[i-1] = account.String() + + _, err = banktestutil.MsgSendExec( + val.ClientCtx, + val.Address, + account, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(2000))), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + ) + s.Require().NoError(err) + s.Require().NoError(err) + } + return accounts +} + +func (s *IntegrationTestSuite) createGroupWithMembers(membersWeight, membersAddress []string) string { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + s.Require().Equal(len(membersWeight), len(membersAddress)) + + membersValid := s.newValidMembers(membersWeight, membersAddress) + membersByte, err := json.Marshal(membersValid) + + s.Require().NoError(err) + + validMembersFile := testutil.WriteToNewTempFile(s.T(), string(membersByte)) + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupCmd(), + append( + []string{ + membersAddress[0], + validMetadata, + validMembersFile.Name(), + }, + s.commonFlags..., + ), + ) + s.Require().NoError(err, out.String()) + var txResp sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) + return s.getGroupIDFromTxResponse(txResp) +} + +func (s *IntegrationTestSuite) createGroupThresholdPolicyWithBalance(adminAddress, groupID string, threshold int, tokens int64) string { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupPolicyCmd(), + append( + []string{ + adminAddress, + groupID, + validMetadata, + testutil.WriteToNewTempFile(s.T(), fmt.Sprintf(`{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"%d", "windows":{"voting_period":"30000s"}}`, threshold)).Name(), + }, + s.commonFlags..., + ), + ) + var txResp = sdk.TxResponse{} + s.Require().NoError(err, out.String()) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) + s.Require().Equal(uint32(0), txResp.Code, out.String()) + + out, err = cli.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{groupID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + s.Require().NoError(err, out.String()) + + var res group.QueryGroupPoliciesByGroupResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + groupPolicyAddress := res.GroupPolicies[0].Address + + addr, err := sdk.AccAddressFromBech32(groupPolicyAddress) + s.Require().NoError(err) + _, err = banktestutil.MsgSendExec(clientCtx, val.Address, addr, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(tokens))), + s.commonFlags..., + ) + s.Require().NoError(err) + return groupPolicyAddress +} + +// fundAllGroupPolicies sends tokens to all group policies of a given group ID. +func (s *IntegrationTestSuite) fundAllGroupPolicies(groupID string, tokens sdk.Coin) { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + out, err := cli.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{groupID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + s.Require().NoError(err, out.String()) + var res group.QueryGroupPoliciesByGroupResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + for _, policy := range res.GroupPolicies { + address := policy.Address + addr, err := sdk.AccAddressFromBech32(address) + s.Require().NoError(err) + _, err = banktestutil.MsgSendExec(clientCtx, val.Address, addr, + sdk.NewCoins(tokens), + s.commonFlags..., + ) + s.Require().NoError(err) + } +} + +func (s *IntegrationTestSuite) newValidMembers(weights, membersAddress []string) group.MemberRequests { + s.Require().Equal(len(weights), len(membersAddress)) + membersValid := group.MemberRequests{} + for i, address := range membersAddress { + membersValid.Members = append(membersValid.Members, group.MemberRequest{ + Address: address, + Weight: weights[i], + Metadata: validMetadata, + }) + } + return membersValid +} diff --git a/x/group/events.pb.go b/x/group/events.pb.go index 0d13f3470779..3cbcb2d491d6 100644 --- a/x/group/events.pb.go +++ b/x/group/events.pb.go @@ -351,6 +351,8 @@ type EventExec struct { ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` // result is the proposal execution result. Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` + // logs contains error logs in case the execution result is FAILURE. + Logs string `protobuf:"bytes,3,opt,name=logs,proto3" json:"logs,omitempty"` } func (m *EventExec) Reset() { *m = EventExec{} } @@ -400,6 +402,13 @@ func (m *EventExec) GetResult() ProposalExecutorResult { return PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED } +func (m *EventExec) GetLogs() string { + if m != nil { + return m.Logs + } + return "" +} + // EventLeaveGroup is an event emitted when group member leaves the group. type EventLeaveGroup struct { // group_id is the unique ID of the group. @@ -470,7 +479,7 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1/events.proto", fileDescriptor_e8d753981546f032) } var fileDescriptor_e8d753981546f032 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto + // 382 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xc8, 0xea, 0x81, 0x65, 0xf5, @@ -485,15 +494,16 @@ var fileDescriptor_e8d753981546f032 = []byte{ 0x94, 0x9b, 0x59, 0x12, 0x50, 0x94, 0x5f, 0x90, 0x5f, 0x9c, 0x98, 0x23, 0x24, 0xcf, 0xc5, 0x5d, 0x00, 0x65, 0x23, 0x3c, 0xc4, 0x05, 0x13, 0xf2, 0x4c, 0x51, 0xb2, 0xe0, 0x12, 0x05, 0xeb, 0x0b, 0xcf, 0x2c, 0xc9, 0x48, 0x29, 0x4a, 0x2c, 0x27, 0x5e, 0xa7, 0x0e, 0x17, 0x27, 0x58, 0x67, 0x58, - 0x7e, 0x49, 0x2a, 0x61, 0xd5, 0xb9, 0x50, 0xd5, 0xae, 0x15, 0xa9, 0xc9, 0x04, 0x55, 0x0b, 0xd9, - 0x73, 0xb1, 0x15, 0xa5, 0x16, 0x97, 0xe6, 0x94, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x19, 0xa9, - 0xeb, 0xa1, 0xa5, 0x10, 0x3d, 0x98, 0x3b, 0x41, 0xe6, 0x95, 0x96, 0xe4, 0x17, 0x05, 0x81, 0x95, - 0x07, 0x41, 0xb5, 0x29, 0x25, 0x70, 0xf1, 0x83, 0xad, 0xf3, 0x49, 0x4d, 0x2c, 0x23, 0x18, 0xb1, - 0xc8, 0x01, 0xce, 0x44, 0x64, 0x80, 0x3b, 0xd9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, - 0x1c, 0x43, 0x94, 0x4a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0x34, 0xe9, - 0x42, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0x48, 0xca, 0x4d, 0x62, 0x03, 0xa7, 0x58, 0x63, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x94, 0x89, 0xaf, 0x1a, 0x03, 0x00, 0x00, + 0x7e, 0x49, 0x2a, 0x61, 0xd5, 0x8d, 0x8c, 0x50, 0xe5, 0xae, 0x15, 0xa9, 0xc9, 0x04, 0x95, 0x0b, + 0xd9, 0x73, 0xb1, 0x15, 0xa5, 0x16, 0x97, 0xe6, 0x94, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x19, + 0xa9, 0xeb, 0xa1, 0x25, 0x11, 0x3d, 0x98, 0x43, 0x41, 0xe6, 0x95, 0x96, 0xe4, 0x17, 0x05, 0x81, + 0x95, 0x07, 0x41, 0xb5, 0x09, 0x09, 0x71, 0xb1, 0xe4, 0xe4, 0xa7, 0x17, 0x4b, 0x30, 0x83, 0x02, + 0x30, 0x08, 0xcc, 0x56, 0x4a, 0xe0, 0xe2, 0x07, 0x3b, 0xc1, 0x27, 0x35, 0xb1, 0x8c, 0x60, 0x6c, + 0x23, 0xc7, 0x02, 0x13, 0x91, 0xb1, 0xe0, 0x64, 0x77, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, + 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, + 0x72, 0x0c, 0x51, 0x2a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xd0, 0xf4, + 0x0c, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x20, 0xc9, 0x39, 0x89, 0x0d, 0x9c, 0x8c, 0x8d, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xc0, 0x98, 0xf8, 0x2f, 0x03, 0x00, 0x00, } func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) { @@ -716,6 +726,13 @@ func (m *EventExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Logs) > 0 { + i -= len(m.Logs) + copy(dAtA[i:], m.Logs) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Logs))) + i-- + dAtA[i] = 0x1a + } if m.Result != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.Result)) i-- @@ -873,6 +890,10 @@ func (m *EventExec) Size() (n int) { if m.Result != 0 { n += 1 + sovEvents(uint64(m.Result)) } + l = len(m.Logs) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1474,6 +1495,38 @@ func (m *EventExec) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/group/genesis.go b/x/group/genesis.go index 80952a64893c..0c1c0c7d73c0 100644 --- a/x/group/genesis.go +++ b/x/group/genesis.go @@ -54,8 +54,8 @@ func (s GenesisState) Validate() error { for _, p := range s.Proposals { // check that group policy with proposal address exists - if _, exists := groupPolicies[p.Address]; !exists { - return sdkerrors.Wrap(sdkerrors.ErrNotFound, fmt.Sprintf("group policy account with address %s doesn't correspond to proposal address", p.Address)) + if _, exists := groupPolicies[p.GroupPolicyAddress]; !exists { + return sdkerrors.Wrap(sdkerrors.ErrNotFound, fmt.Sprintf("group policy account with address %s doesn't correspond to proposal address", p.GroupPolicyAddress)) } if err := p.ValidateBasic(); err != nil { diff --git a/x/group/genesis_test.go b/x/group/genesis_test.go index 2300836d6faf..cf43ed699d41 100644 --- a/x/group/genesis_test.go +++ b/x/group/genesis_test.go @@ -18,7 +18,6 @@ var ( ) func TestGenesisStateValidate(t *testing.T) { - submittedAt := time.Now().UTC() timeout := submittedAt.Add(time.Second * 1).UTC() @@ -55,7 +54,7 @@ func TestGenesisStateValidate(t *testing.T) { proposal := &Proposal{ Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -63,8 +62,7 @@ func TestGenesisStateValidate(t *testing.T) { memberAddr.String(), }, SubmitTime: submittedAt, - Status: PROPOSAL_STATUS_CLOSED, - Result: PROPOSAL_RESULT_ACCEPTED, + Status: PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: TallyResult{ YesCount: "1", NoCount: "0", @@ -376,7 +374,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 0, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -403,7 +401,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: "invalid address", + GroupPolicyAddress: "invalid address", Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -430,7 +428,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 0, GroupPolicyVersion: 1, @@ -457,7 +455,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 0, @@ -484,7 +482,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -492,8 +490,7 @@ func TestGenesisStateValidate(t *testing.T) { memberAddr.String(), }, SubmitTime: submittedAt, - Status: PROPOSAL_STATUS_CLOSED, - Result: PROPOSAL_RESULT_ACCEPTED, + Status: PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: TallyResult{ YesCount: "-1", NoCount: "0", @@ -523,7 +520,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -531,8 +528,7 @@ func TestGenesisStateValidate(t *testing.T) { memberAddr.String(), }, SubmitTime: submittedAt, - Status: PROPOSAL_STATUS_CLOSED, - Result: PROPOSAL_RESULT_ACCEPTED, + Status: PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: TallyResult{ YesCount: "0", NoCount: "-1", @@ -562,7 +558,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -570,8 +566,7 @@ func TestGenesisStateValidate(t *testing.T) { memberAddr.String(), }, SubmitTime: submittedAt, - Status: PROPOSAL_STATUS_CLOSED, - Result: PROPOSAL_RESULT_ACCEPTED, + Status: PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: TallyResult{ YesCount: "0", NoCount: "0", @@ -601,7 +596,7 @@ func TestGenesisStateValidate(t *testing.T) { Proposals: []*Proposal{ { Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -609,8 +604,7 @@ func TestGenesisStateValidate(t *testing.T) { memberAddr.String(), }, SubmitTime: submittedAt, - Status: PROPOSAL_STATUS_CLOSED, - Result: PROPOSAL_RESULT_ACCEPTED, + Status: PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: TallyResult{ YesCount: "0", NoCount: "0", @@ -742,7 +736,6 @@ func TestGenesisStateValidate(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - err := tc.genesisState.Validate() if tc.expErr { require.Error(t, err) diff --git a/x/group/internal/math/dec_test.go b/x/group/internal/math/dec_test.go index 73807f767104..6bf0edb5afe0 100644 --- a/x/group/internal/math/dec_test.go +++ b/x/group/internal/math/dec_test.go @@ -75,6 +75,9 @@ func TestDec(t *testing.T) { require.NoError(t, err) require.True(t, res.IsEqual(minusFivePointZero)) + _, err = four.Quo(zero) + require.Error(t, err) + res, err = four.Quo(two) require.NoError(t, err) require.True(t, res.IsEqual(two)) diff --git a/x/group/internal/orm/genesis.go b/x/group/internal/orm/genesis.go index 93460dcee80f..60a4c3ec78df 100644 --- a/x/group/internal/orm/genesis.go +++ b/x/group/internal/orm/genesis.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// TableExportable +// TableExportable defines the methods to import and export a table. type TableExportable interface { // Export stores all the values in the table in the passed // ModelSlicePtr. If the table has an associated sequence, then its diff --git a/x/group/internal/orm/index.go b/x/group/internal/orm/index.go index aff63c6e248d..f19de60d3e40 100644 --- a/x/group/internal/orm/index.go +++ b/x/group/internal/orm/index.go @@ -132,18 +132,11 @@ func (i MultiKeyIndex) GetPaginated(store sdk.KVStore, searchKey interface{}, pa // // CONTRACT: No writes may happen within a domain while an iterator exists over it. func (i MultiKeyIndex) PrefixScan(store sdk.KVStore, startI interface{}, endI interface{}) (Iterator, error) { - start, err := getPrefixScanKeyBytes(startI) - if err != nil { - return nil, err - } - end, err := getPrefixScanKeyBytes(endI) + start, end, err := getStartEndBz(startI, endI) if err != nil { return nil, err } - if start != nil && end != nil && bytes.Compare(start, end) >= 0 { - return NewInvalidIterator(), sdkerrors.Wrap(errors.ErrORMInvalidArgument, "start must be less than end") - } pStore := prefix.NewStore(store, []byte{i.prefix}) it := pStore.Iterator(start, end) return indexIterator{store: store, it: it, rowGetter: i.rowGetter, indexKey: i.indexKey}, nil @@ -159,21 +152,33 @@ func (i MultiKeyIndex) PrefixScan(store sdk.KVStore, startI interface{}, endI in // // CONTRACT: No writes may happen within a domain while an iterator exists over it. func (i MultiKeyIndex) ReversePrefixScan(store sdk.KVStore, startI interface{}, endI interface{}) (Iterator, error) { - start, err := getPrefixScanKeyBytes(startI) + start, end, err := getStartEndBz(startI, endI) if err != nil { return nil, err } + + pStore := prefix.NewStore(store, []byte{i.prefix}) + it := pStore.ReverseIterator(start, end) + return indexIterator{store: store, it: it, rowGetter: i.rowGetter, indexKey: i.indexKey}, nil +} + +// getStartEndBz gets the start and end bytes to be passed into the SDK store +// iterator. +func getStartEndBz(startI interface{}, endI interface{}) ([]byte, []byte, error) { + start, err := getPrefixScanKeyBytes(startI) + if err != nil { + return nil, nil, err + } end, err := getPrefixScanKeyBytes(endI) if err != nil { - return nil, err + return nil, nil, err } if start != nil && end != nil && bytes.Compare(start, end) >= 0 { - return NewInvalidIterator(), sdkerrors.Wrap(errors.ErrORMInvalidArgument, "start must be less than end") + return nil, nil, sdkerrors.Wrap(errors.ErrORMInvalidArgument, "start must be less than end") } - pStore := prefix.NewStore(store, []byte{i.prefix}) - it := pStore.ReverseIterator(start, end) - return indexIterator{store: store, it: it, rowGetter: i.rowGetter, indexKey: i.indexKey}, nil + + return start, end, nil } func getPrefixScanKeyBytes(keyI interface{}) ([]byte, error) { diff --git a/x/group/internal/orm/indexer.go b/x/group/internal/orm/indexer.go index 67b3f13d2cc1..a2dc8e6fed95 100644 --- a/x/group/internal/orm/indexer.go +++ b/x/group/internal/orm/indexer.go @@ -129,10 +129,8 @@ func uniqueKeysAddFunc(store sdk.KVStore, secondaryIndexKey interface{}, rowID R return sdkerrors.Wrap(errors.ErrORMInvalidArgument, "empty index key") } - it := store.Iterator(PrefixRange(secondaryIndexKeyBytes)) - defer it.Close() - if it.Valid() { - return errors.ErrORMUniqueConstraint + if err := checkUniqueIndexKey(store, secondaryIndexKeyBytes); err != nil { + return err } indexKey, err := buildKeyFromParts([]interface{}{secondaryIndexKey, []byte(rowID)}) @@ -144,6 +142,16 @@ func uniqueKeysAddFunc(store sdk.KVStore, secondaryIndexKey interface{}, rowID R return nil } +// checkUniqueIndexKey checks that the given secondary index key is unique +func checkUniqueIndexKey(store sdk.KVStore, secondaryIndexKeyBytes []byte) error { + it := store.Iterator(PrefixRange(secondaryIndexKeyBytes)) + defer it.Close() + if it.Valid() { + return errors.ErrORMUniqueConstraint + } + return nil +} + // multiKeyAddFunc allows multiple entries for a key func multiKeyAddFunc(store sdk.KVStore, secondaryIndexKey interface{}, rowID RowID) error { secondaryIndexKeyBytes, err := keyPartBytes(secondaryIndexKey, false) diff --git a/x/group/internal/orm/indexer_test.go b/x/group/internal/orm/indexer_test.go index d574fb63fd04..79278418c924 100644 --- a/x/group/internal/orm/indexer_test.go +++ b/x/group/internal/orm/indexer_test.go @@ -239,6 +239,7 @@ func TestIndexerOnDelete(t *testing.T) { }) } } + func TestIndexerOnUpdate(t *testing.T) { myRowID := EncodeSequence(1) @@ -377,7 +378,6 @@ func TestUniqueKeyAddFunc(t *testing.T) { expErr *sdkerrors.Error expExistingEntry []byte }{ - "create when not exists": { srcKey: []byte("my-index-key"), expExistingEntry: append(AddLengthPrefix([]byte("my-index-key")), myRowID...), @@ -421,7 +421,6 @@ func TestMultiKeyAddFunc(t *testing.T) { expErr *sdkerrors.Error expExistingEntry []byte }{ - "create when not exists": { srcKey: []byte("my-index-key"), expExistingEntry: append(AddLengthPrefix([]byte("my-index-key")), myRowID...), diff --git a/x/group/internal/orm/iterator.go b/x/group/internal/orm/iterator.go index ae61d61c48e4..71c3b32272ae 100644 --- a/x/group/internal/orm/iterator.go +++ b/x/group/internal/orm/iterator.go @@ -155,7 +155,7 @@ func Paginate( return nil, err } - var end = offset + limit + end := offset + limit var count uint64 var nextKey []byte for { diff --git a/x/group/internal/orm/iterator_test.go b/x/group/internal/orm/iterator_test.go index b2abbaaa403c..bbafa34a11f7 100644 --- a/x/group/internal/orm/iterator_test.go +++ b/x/group/internal/orm/iterator_test.go @@ -317,7 +317,6 @@ func TestPaginate(t *testing.T) { assert.EqualValues(t, spec.expPageRes.Total, res.Total) assert.EqualValues(t, spec.expPageRes.NextKey, res.NextKey) } - }) } diff --git a/x/group/internal/orm/primary_key.go b/x/group/internal/orm/primary_key.go index 46abfd0dbe63..7655c5a9d535 100644 --- a/x/group/internal/orm/primary_key.go +++ b/x/group/internal/orm/primary_key.go @@ -33,9 +33,9 @@ type PrimaryKeyed interface { // the primary key. The PrimaryKey function will encode and concatenate // the fields to build the primary key. // - // PrimaryKey parts can be []byte, string, and integer types. []byte is + // PrimaryKey parts can be []byte, string, and uint64 types. []byte is // encoded with a length prefix, strings are null-terminated, and - // integers are encoded using 8 byte big endian. + // uint64 are encoded using 8 byte big endian. // // IMPORTANT: []byte parts are encoded with a single byte length prefix, // so cannot be longer than 255 bytes. diff --git a/x/group/internal/orm/primary_key_test.go b/x/group/internal/orm/primary_key_test.go index 498e973c0c98..66adb3240d1c 100644 --- a/x/group/internal/orm/primary_key_test.go +++ b/x/group/internal/orm/primary_key_test.go @@ -223,7 +223,6 @@ func TestContains(t *testing.T) { src PrimaryKeyed exp bool }{ - "same object": {src: &obj, exp: true}, "clone": { src: &testdata.TableModel{ diff --git a/x/group/internal/orm/sequence_property_test.go b/x/group/internal/orm/sequence_property_test.go index c0e7dce2ebf4..2d3d9c10a2fd 100644 --- a/x/group/internal/orm/sequence_property_test.go +++ b/x/group/internal/orm/sequence_property_test.go @@ -56,7 +56,7 @@ func (m *sequenceMachine) NextVal(t *rapid.T) { // CurVal is one of the model commands. It checks that the current value of the // sequence matches the model. func (m *sequenceMachine) CurVal(t *rapid.T) { - // Check the the current value matches the model + // Check the current value matches the model require.Equal(t, m.state, m.seq.CurVal(m.store)) } diff --git a/x/group/internal/orm/spec/01_table.md b/x/group/internal/orm/spec/01_table.md index 7e7237f9d054..28352ba2e5c5 100644 --- a/x/group/internal/orm/spec/01_table.md +++ b/x/group/internal/orm/spec/01_table.md @@ -2,7 +2,7 @@ A table can be built given a `codec.ProtoMarshaler` model type, a prefix to access the underlying prefix store used to store table data as well as a `Codec` for marshalling/unmarshalling. -+++ https://github.com/cosmos/cosmos-sdk/blob/9f78f16ae75cc42fc5fe636bde18a453ba74831f/x/group/internal/orm/table.go#L24-L30 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/table.go#L30-L36 In the prefix store, entities should be stored by an unique identifier called `RowID` which can be based either on an `uint64` auto-increment counter, string or dynamic size bytes. Regular CRUD operations can be performed on a table, these methods take a `sdk.KVStore` as parameter to get the table prefix store. @@ -10,9 +10,9 @@ Regular CRUD operations can be performed on a table, these methods take a `sdk.K The `table` struct does not: * enforce uniqueness of the `RowID` -* enforce prefix uniqueness of keys, i.e. not allowing one key to be a prefix - of another +* enforce prefix uniqueness of keys, i.e. not allowing one key to be a prefix of another * optimize Gas usage conditions + The `table` struct is private, so that we only have custom tables built on top of it, that do satisfy these requirements. `table` provides methods for exporting (using a [`PrefixScan` `Iterator`](03_iterator_pagination.md#iterator)) and importing genesis data. For the import to be successful, objects have to be aware of their primary key by implementing the [`PrimaryKeyed`](#primarykeyed) interface. @@ -21,7 +21,7 @@ The `table` struct is private, so that we only have custom tables built on top o `AutoUInt64Table` is a table type with an auto incrementing `uint64` ID. -+++ https://github.com/cosmos/cosmos-sdk/blob/9f78f16ae75cc42fc5fe636bde18a453ba74831f/x/group/internal/orm/auto_uint64.go#L11-L14 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/auto_uint64.go#L15-L18 It's based on the `Sequence` struct which is a persistent unique key generator based on a counter encoded using 8 byte big endian. @@ -33,7 +33,7 @@ It's based on the `Sequence` struct which is a persistent unique key generator b The model provided for creating a `PrimaryKeyTable` should implement the `PrimaryKeyed` interface: -+++ https://github.com/cosmos/cosmos-sdk/blob/9f78f16ae75cc42fc5fe636bde18a453ba74831f/x/group/internal/orm/primary_key.go#L28-L41 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/primary_key.go#L30-L44 `PrimaryKeyFields()` method returns the list of key parts for a given object. The primary key parts can be []byte, string, and `uint64` types. @@ -42,6 +42,6 @@ The primary key parts can be []byte, string, and `uint64` types. Key parts, except the last part, follow these rules: -* []byte is encoded with a single byte length prefix +* []byte is encoded with a single byte length prefix (which means the max []byte length is 255) * strings are null-terminated * `uint64` are encoded using 8 byte big endian. diff --git a/x/group/internal/orm/spec/02_secondary_index.md b/x/group/internal/orm/spec/02_secondary_index.md index fd25a606f571..7111bf69b2cf 100644 --- a/x/group/internal/orm/spec/02_secondary_index.md +++ b/x/group/internal/orm/spec/02_secondary_index.md @@ -2,19 +2,19 @@ Secondary indexes can be used on `Indexable` [tables](01_table.md). Indeed, those tables implement the `Indexable` interface that provides a set of functions that can be called by indexes to register and interact with the tables, like callback functions that are called on entries creation, update or deletion to create, update or remove corresponding entries in the table secondary indexes. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/types.go#L88-L92 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/types.go#L88-L93 ## MultiKeyIndex A `MultiKeyIndex` is an index where multiple entries can point to the same underlying object. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/index.go#L25-L31 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/index.go#L26-L32 Internally, it uses an `Indexer` that manages the persistence of the index based on searchable keys and create/update/delete operations. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/index.go#L15-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/index.go#L15-L20 -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/indexer.go#L15-L18 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/indexer.go#L15-L19 The currently used implementation of an `indexer`, `Indexer`, relies on an `IndexerFunc` that should be provided when instantiating the index. Based on the source object, this function returns one or multiple index keys as `[]interface{}`. Such secondary index keys should be bytes, string or `uint64` in order to be handled properly by the [key codec](01_table.md#key-codec) which defines specific encoding for those types. In the index prefix store, the keys are built based on the source object's `RowID` and its secondary index key(s) using the key codec and the values are set as empty bytes. diff --git a/x/group/internal/orm/spec/03_iterator_pagination.md b/x/group/internal/orm/spec/03_iterator_pagination.md index ac0839623321..4205d9e8b484 100644 --- a/x/group/internal/orm/spec/03_iterator_pagination.md +++ b/x/group/internal/orm/spec/03_iterator_pagination.md @@ -6,15 +6,15 @@ Both [tables](01_table.md) and [secondary indexes](02_secondary_index.md) suppor An `Iterator` allows iteration through a sequence of key value pairs. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/types.go#L77-L83 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/types.go#L77-L85 Tables rely on a `typeSafeIterator` that is used by `PrefixScan` and `ReversePrefixScan` `table` methods to iterate through a range of `RowID`s. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/table.go#235-L239 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/table.go#L285-L290 Secondary indexes rely on an `indexIterator` that can strip the `RowID` from the full index key in order to get the underlying value in the table prefix store. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/index.go#L227-L232 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/index.go#L232-L238 Under the hood, both use a prefix store `Iterator` (alias for tm-db `Iterator`). @@ -23,6 +23,6 @@ Under the hood, both use a prefix store `Iterator` (alias for tm-db `Iterator`). The `Paginate` function does pagination given an [`Iterator`](#iterator) and a `query.PageRequest`, and returns a `query.PageResponse`. It unmarshals the results into the provided dest interface that should be a pointer to a slice of models. -+++ https://github.com/cosmos/cosmos-sdk/blob/430163ed4eefcc0d67b706411ffc0b7c5414cd90/x/group/internal/orm/iterator.go#L117-L216 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/internal/orm/iterator.go#L102-L220 Secondary indexes have a `GetPaginated` method that returns an `Iterator` for the given searched secondary index key, starting from the `query.PageRequest` key if provided. It's important to note that this `query.PageRequest` key should be a `RowID` (that could have been returned by a previous paginated request). The returned `Iterator` can then be used with the `Paginate` function and the same `query.PageRequest`. diff --git a/x/group/internal/orm/table.go b/x/group/internal/orm/table.go index 89e6a8db1a0d..4d6987bd73b2 100644 --- a/x/group/internal/orm/table.go +++ b/x/group/internal/orm/table.go @@ -149,7 +149,7 @@ func assertValid(obj codec.ProtoMarshaler) error { func (a table) Delete(store sdk.KVStore, rowID RowID) error { pStore := prefix.NewStore(store, a.prefix[:]) - var oldValue = reflect.New(a.model).Interface().(codec.ProtoMarshaler) + oldValue := reflect.New(a.model).Interface().(codec.ProtoMarshaler) if err := a.GetOne(store, rowID, oldValue); err != nil { return sdkerrors.Wrap(err, "load old value") } @@ -170,9 +170,7 @@ func (a table) Has(store sdk.KVStore, key RowID) bool { return false } pStore := prefix.NewStore(store, a.prefix[:]) - it := pStore.Iterator(PrefixRange(key)) - defer it.Close() - return it.Valid() + return pStore.Has(key) } // GetOne load the object persisted for the given RowID into the dest parameter. @@ -252,11 +250,9 @@ func (a table) Export(store sdk.KVStore, dest ModelSlicePtr) (uint64, error) { // data should be a slice of structs that implement PrimaryKeyed. func (a table) Import(store sdk.KVStore, data interface{}, _ uint64) error { // Clear all data - pStore := prefix.NewStore(store, a.prefix[:]) - it := pStore.Iterator(nil, nil) - defer it.Close() - for ; it.Valid(); it.Next() { - if err := a.Delete(store, it.Key()); err != nil { + keys := a.keys(store) + for _, key := range keys { + if err := a.Delete(store, key); err != nil { return err } } @@ -282,6 +278,18 @@ func (a table) Import(store sdk.KVStore, data interface{}, _ uint64) error { return nil } +func (a table) keys(store sdk.KVStore) [][]byte { + pStore := prefix.NewStore(store, a.prefix[:]) + it := pStore.Iterator(nil, nil) + defer it.Close() + + var keys [][]byte + for ; it.Valid(); it.Next() { + keys = append(keys, it.Key()) + } + return keys +} + // typeSafeIterator is initialized with a type safe RowGetter only. type typeSafeIterator struct { store sdk.KVStore diff --git a/x/group/internal/orm/table_test.go b/x/group/internal/orm/table_test.go index 44146c7fea8f..164fecda3648 100644 --- a/x/group/internal/orm/table_test.go +++ b/x/group/internal/orm/table_test.go @@ -97,7 +97,7 @@ func TestCreate(t *testing.T) { ctx := NewMockContext() store := ctx.KVStore(sdk.NewKVStoreKey("test")) - var anyPrefix = [2]byte{0x10} + anyPrefix := [2]byte{0x10} myTable, err := newTable(anyPrefix, &testdata.TableModel{}, cdc) require.NoError(t, err) @@ -154,7 +154,7 @@ func TestUpdate(t *testing.T) { ctx := NewMockContext() store := ctx.KVStore(sdk.NewKVStoreKey("test")) - var anyPrefix = [2]byte{0x10} + anyPrefix := [2]byte{0x10} myTable, err := newTable(anyPrefix, &testdata.TableModel{}, cdc) require.NoError(t, err) @@ -203,7 +203,7 @@ func TestDelete(t *testing.T) { ctx := NewMockContext() store := ctx.KVStore(sdk.NewKVStoreKey("test")) - var anyPrefix = [2]byte{0x10} + anyPrefix := [2]byte{0x10} myTable, err := newTable(anyPrefix, &testdata.TableModel{}, cdc) require.NoError(t, err) diff --git a/x/group/internal/orm/types.go b/x/group/internal/orm/types.go index b5ca93b0ee95..a98bcdee64ab 100644 --- a/x/group/internal/orm/types.go +++ b/x/group/internal/orm/types.go @@ -113,12 +113,12 @@ func NewTypeSafeRowGetter(prefixKey [2]byte, model reflect.Type, cdc codec.Codec } pStore := prefix.NewStore(store, prefixKey[:]) - it := pStore.Iterator(PrefixRange(rowID)) - defer it.Close() - if !it.Valid() { + bz := pStore.Get(rowID) + if len(bz) == 0 { return sdkerrors.ErrNotFound } - return cdc.Unmarshal(it.Value(), dest) + + return cdc.Unmarshal(bz, dest) } } diff --git a/x/group/internal/orm/types_test.go b/x/group/internal/orm/types_test.go index 9ef2472611c9..130f31bdde95 100644 --- a/x/group/internal/orm/types_test.go +++ b/x/group/internal/orm/types_test.go @@ -18,7 +18,7 @@ import ( func TestTypeSafeRowGetter(t *testing.T) { storeKey := sdk.NewKVStoreKey("test") ctx := NewMockContext() - var prefixKey = [2]byte{0x2} + prefixKey := [2]byte{0x2} store := prefix.NewStore(ctx.KVStore(storeKey), prefixKey[:]) md := testdata.TableModel{ Id: 1, diff --git a/x/group/keeper/genesis.go b/x/group/keeper/genesis.go index 311809de39c1..2e0766ed716e 100644 --- a/x/group/keeper/genesis.go +++ b/x/group/keeper/genesis.go @@ -40,7 +40,6 @@ func (k Keeper) InitGenesis(ctx types.Context, cdc codec.JSONCodec, data json.Ra } return []abci.ValidatorUpdate{} - } func (k Keeper) ExportGenesis(ctx types.Context, cdc codec.JSONCodec) *group.GenesisState { diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index fe824025df0e..59a101bf3c09 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -2,7 +2,6 @@ package keeper_test import ( "context" - "encoding/json" "testing" "time" @@ -81,7 +80,7 @@ func (s *GenesisTestSuite) TestInitExportGenesis() { proposal := &group.Proposal{ Id: 1, - Address: accAddr.String(), + GroupPolicyAddress: accAddr.String(), Metadata: "proposal metadata", GroupVersion: 1, GroupPolicyVersion: 1, @@ -89,8 +88,7 @@ func (s *GenesisTestSuite) TestInitExportGenesis() { memberAddr.String(), }, SubmitTime: submittedAt, - Status: group.PROPOSAL_STATUS_CLOSED, - Result: group.PROPOSAL_RESULT_ACCEPTED, + Status: group.PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: group.TallyResult{ YesCount: "1", NoCount: "0", @@ -193,7 +191,6 @@ func (s *GenesisTestSuite) TestInitExportGenesis() { s.Require().Equal(genesisState.GroupSeq, exportedGenesisState.GroupSeq) s.Require().Equal(genesisState.GroupPolicySeq, exportedGenesisState.GroupPolicySeq) s.Require().Equal(genesisState.ProposalSeq, exportedGenesisState.ProposalSeq) - } func (s *GenesisTestSuite) assertGroupPoliciesEqual(g *group.GroupPolicyInfo, other *group.GroupPolicyInfo) { @@ -203,22 +200,29 @@ func (s *GenesisTestSuite) assertGroupPoliciesEqual(g *group.GroupPolicyInfo, ot require.Equal(g.Admin, other.Admin) require.Equal(g.Metadata, other.Metadata) require.Equal(g.Version, other.Version) - require.Equal(g.GetDecisionPolicy(), other.GetDecisionPolicy()) + dp1, err := g.GetDecisionPolicy() + require.NoError(err) + dp2, err := other.GetDecisionPolicy() + require.NoError(err) + require.Equal(dp1, dp2) } func (s *GenesisTestSuite) assertProposalsEqual(g *group.Proposal, other *group.Proposal) { require := s.Require() require.Equal(g.Id, other.Id) - require.Equal(g.Address, other.Address) + require.Equal(g.GroupPolicyAddress, other.GroupPolicyAddress) require.Equal(g.Metadata, other.Metadata) require.Equal(g.Proposers, other.Proposers) require.Equal(g.SubmitTime, other.SubmitTime) require.Equal(g.GroupVersion, other.GroupVersion) require.Equal(g.GroupPolicyVersion, other.GroupPolicyVersion) require.Equal(g.Status, other.Status) - require.Equal(g.Result, other.Result) require.Equal(g.FinalTallyResult, other.FinalTallyResult) require.Equal(g.VotingPeriodEnd, other.VotingPeriodEnd) require.Equal(g.ExecutorResult, other.ExecutorResult) - require.Equal(g.GetMsgs(), other.GetMsgs()) + msgs1, err := g.GetMsgs() + require.NoError(err) + msgs2, err := other.GetMsgs() + require.NoError(err) + require.Equal(msgs1, msgs2) } diff --git a/x/group/keeper/grpc_query.go b/x/group/keeper/grpc_query.go index 483e05e57e20..ff26844dde56 100644 --- a/x/group/keeper/grpc_query.go +++ b/x/group/keeper/grpc_query.go @@ -16,10 +16,11 @@ import ( var _ group.QueryServer = Keeper{} -func (q Keeper) GroupInfo(goCtx context.Context, request *group.QueryGroupInfoRequest) (*group.QueryGroupInfoResponse, error) { +// GroupInfo queries info about a group. +func (k Keeper) GroupInfo(goCtx context.Context, request *group.QueryGroupInfoRequest) (*group.QueryGroupInfoResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) groupID := request.GroupId - groupInfo, err := q.getGroupInfo(ctx, groupID) + groupInfo, err := k.getGroupInfo(ctx, groupID) if err != nil { return nil, sdkerrors.Wrap(err, "group") } @@ -27,15 +28,16 @@ func (q Keeper) GroupInfo(goCtx context.Context, request *group.QueryGroupInfoRe return &group.QueryGroupInfoResponse{Info: &groupInfo}, nil } -func (q Keeper) getGroupInfo(ctx sdk.Context, id uint64) (group.GroupInfo, error) { +func (k Keeper) getGroupInfo(ctx sdk.Context, id uint64) (group.GroupInfo, error) { var obj group.GroupInfo - _, err := q.groupTable.GetOne(ctx.KVStore(q.key), id, &obj) + _, err := k.groupTable.GetOne(ctx.KVStore(k.key), id, &obj) return obj, err } -func (q Keeper) GroupPolicyInfo(goCtx context.Context, request *group.QueryGroupPolicyInfoRequest) (*group.QueryGroupPolicyInfoResponse, error) { +// GroupPolicyInfo queries info about a group policy. +func (k Keeper) GroupPolicyInfo(goCtx context.Context, request *group.QueryGroupPolicyInfoRequest) (*group.QueryGroupPolicyInfoResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - groupPolicyInfo, err := q.getGroupPolicyInfo(ctx, request.Address) + groupPolicyInfo, err := k.getGroupPolicyInfo(ctx, request.Address) if err != nil { return nil, sdkerrors.Wrap(err, "group policy") } @@ -43,15 +45,16 @@ func (q Keeper) GroupPolicyInfo(goCtx context.Context, request *group.QueryGroup return &group.QueryGroupPolicyInfoResponse{Info: &groupPolicyInfo}, nil } -func (q Keeper) getGroupPolicyInfo(ctx sdk.Context, accountAddress string) (group.GroupPolicyInfo, error) { +func (k Keeper) getGroupPolicyInfo(ctx sdk.Context, accountAddress string) (group.GroupPolicyInfo, error) { var obj group.GroupPolicyInfo - return obj, q.groupPolicyTable.GetOne(ctx.KVStore(q.key), orm.PrimaryKey(&group.GroupPolicyInfo{Address: accountAddress}), &obj) + return obj, k.groupPolicyTable.GetOne(ctx.KVStore(k.key), orm.PrimaryKey(&group.GroupPolicyInfo{Address: accountAddress}), &obj) } -func (q Keeper) GroupMembers(goCtx context.Context, request *group.QueryGroupMembersRequest) (*group.QueryGroupMembersResponse, error) { +// GroupMembers queries all members of a group. +func (k Keeper) GroupMembers(goCtx context.Context, request *group.QueryGroupMembersRequest) (*group.QueryGroupMembersResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) groupID := request.GroupId - it, err := q.getGroupMembers(ctx, groupID, request.Pagination) + it, err := k.getGroupMembers(ctx, groupID, request.Pagination) if err != nil { return nil, err } @@ -68,17 +71,18 @@ func (q Keeper) GroupMembers(goCtx context.Context, request *group.QueryGroupMem }, nil } -func (q Keeper) getGroupMembers(ctx sdk.Context, id uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.groupMemberByGroupIndex.GetPaginated(ctx.KVStore(q.key), id, pageRequest) +func (k Keeper) getGroupMembers(ctx sdk.Context, id uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.groupMemberByGroupIndex.GetPaginated(ctx.KVStore(k.key), id, pageRequest) } -func (q Keeper) GroupsByAdmin(goCtx context.Context, request *group.QueryGroupsByAdminRequest) (*group.QueryGroupsByAdminResponse, error) { +// GroupsByAdmin queries all groups where a given address is admin. +func (k Keeper) GroupsByAdmin(goCtx context.Context, request *group.QueryGroupsByAdminRequest) (*group.QueryGroupsByAdminResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Admin) if err != nil { return nil, err } - it, err := q.getGroupsByAdmin(ctx, addr, request.Pagination) + it, err := k.getGroupsByAdmin(ctx, addr, request.Pagination) if err != nil { return nil, err } @@ -95,14 +99,15 @@ func (q Keeper) GroupsByAdmin(goCtx context.Context, request *group.QueryGroupsB }, nil } -func (q Keeper) getGroupsByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.groupByAdminIndex.GetPaginated(ctx.KVStore(q.key), admin.Bytes(), pageRequest) +func (k Keeper) getGroupsByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.groupByAdminIndex.GetPaginated(ctx.KVStore(k.key), admin.Bytes(), pageRequest) } -func (q Keeper) GroupPoliciesByGroup(goCtx context.Context, request *group.QueryGroupPoliciesByGroupRequest) (*group.QueryGroupPoliciesByGroupResponse, error) { +// GroupPoliciesByGroup queries all groups policies of a given group. +func (k Keeper) GroupPoliciesByGroup(goCtx context.Context, request *group.QueryGroupPoliciesByGroupRequest) (*group.QueryGroupPoliciesByGroupResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) groupID := request.GroupId - it, err := q.getGroupPoliciesByGroup(ctx, groupID, request.Pagination) + it, err := k.getGroupPoliciesByGroup(ctx, groupID, request.Pagination) if err != nil { return nil, err } @@ -119,17 +124,19 @@ func (q Keeper) GroupPoliciesByGroup(goCtx context.Context, request *group.Query }, nil } -func (q Keeper) getGroupPoliciesByGroup(ctx sdk.Context, id uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.groupPolicyByGroupIndex.GetPaginated(ctx.KVStore(q.key), id, pageRequest) +func (k Keeper) getGroupPoliciesByGroup(ctx sdk.Context, id uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.groupPolicyByGroupIndex.GetPaginated(ctx.KVStore(k.key), id, pageRequest) } -func (q Keeper) GroupPoliciesByAdmin(goCtx context.Context, request *group.QueryGroupPoliciesByAdminRequest) (*group.QueryGroupPoliciesByAdminResponse, error) { +// GroupPoliciesByAdmin queries all groups policies where a given address is +// admin. +func (k Keeper) GroupPoliciesByAdmin(goCtx context.Context, request *group.QueryGroupPoliciesByAdminRequest) (*group.QueryGroupPoliciesByAdminResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Admin) if err != nil { return nil, err } - it, err := q.getGroupPoliciesByAdmin(ctx, addr, request.Pagination) + it, err := k.getGroupPoliciesByAdmin(ctx, addr, request.Pagination) if err != nil { return nil, err } @@ -146,14 +153,15 @@ func (q Keeper) GroupPoliciesByAdmin(goCtx context.Context, request *group.Query }, nil } -func (q Keeper) getGroupPoliciesByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.groupPolicyByAdminIndex.GetPaginated(ctx.KVStore(q.key), admin.Bytes(), pageRequest) +func (k Keeper) getGroupPoliciesByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.groupPolicyByAdminIndex.GetPaginated(ctx.KVStore(k.key), admin.Bytes(), pageRequest) } -func (q Keeper) Proposal(goCtx context.Context, request *group.QueryProposalRequest) (*group.QueryProposalResponse, error) { +// Proposal queries a proposal. +func (k Keeper) Proposal(goCtx context.Context, request *group.QueryProposalRequest) (*group.QueryProposalResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) proposalID := request.ProposalId - proposal, err := q.getProposal(ctx, proposalID) + proposal, err := k.getProposal(ctx, proposalID) if err != nil { return nil, err } @@ -161,13 +169,14 @@ func (q Keeper) Proposal(goCtx context.Context, request *group.QueryProposalRequ return &group.QueryProposalResponse{Proposal: &proposal}, nil } -func (q Keeper) ProposalsByGroupPolicy(goCtx context.Context, request *group.QueryProposalsByGroupPolicyRequest) (*group.QueryProposalsByGroupPolicyResponse, error) { +// Proposal queries all proposals of a group policy. +func (k Keeper) ProposalsByGroupPolicy(goCtx context.Context, request *group.QueryProposalsByGroupPolicyRequest) (*group.QueryProposalsByGroupPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Address) if err != nil { return nil, err } - it, err := q.getProposalsByGroupPolicy(ctx, addr, request.Pagination) + it, err := k.getProposalsByGroupPolicy(ctx, addr, request.Pagination) if err != nil { return nil, err } @@ -184,26 +193,27 @@ func (q Keeper) ProposalsByGroupPolicy(goCtx context.Context, request *group.Que }, nil } -func (q Keeper) getProposalsByGroupPolicy(ctx sdk.Context, account sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.proposalByGroupPolicyIndex.GetPaginated(ctx.KVStore(q.key), account.Bytes(), pageRequest) +func (k Keeper) getProposalsByGroupPolicy(ctx sdk.Context, account sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.proposalByGroupPolicyIndex.GetPaginated(ctx.KVStore(k.key), account.Bytes(), pageRequest) } -func (q Keeper) getProposal(ctx sdk.Context, proposalID uint64) (group.Proposal, error) { +func (k Keeper) getProposal(ctx sdk.Context, proposalID uint64) (group.Proposal, error) { var p group.Proposal - if _, err := q.proposalTable.GetOne(ctx.KVStore(q.key), proposalID, &p); err != nil { + if _, err := k.proposalTable.GetOne(ctx.KVStore(k.key), proposalID, &p); err != nil { return group.Proposal{}, sdkerrors.Wrap(err, "load proposal") } return p, nil } -func (q Keeper) VoteByProposalVoter(goCtx context.Context, request *group.QueryVoteByProposalVoterRequest) (*group.QueryVoteByProposalVoterResponse, error) { +// VoteByProposalVoter queries a vote given a voter and a proposal ID. +func (k Keeper) VoteByProposalVoter(goCtx context.Context, request *group.QueryVoteByProposalVoterRequest) (*group.QueryVoteByProposalVoterResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Voter) if err != nil { return nil, err } proposalID := request.ProposalId - vote, err := q.getVote(ctx, proposalID, addr) + vote, err := k.getVote(ctx, proposalID, addr) if err != nil { return nil, err } @@ -212,10 +222,11 @@ func (q Keeper) VoteByProposalVoter(goCtx context.Context, request *group.QueryV }, nil } -func (q Keeper) VotesByProposal(goCtx context.Context, request *group.QueryVotesByProposalRequest) (*group.QueryVotesByProposalResponse, error) { +// VotesByProposal queries all votes on a proposal. +func (k Keeper) VotesByProposal(goCtx context.Context, request *group.QueryVotesByProposalRequest) (*group.QueryVotesByProposalResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) proposalID := request.ProposalId - it, err := q.getVotesByProposal(ctx, proposalID, request.Pagination) + it, err := k.getVotesByProposal(ctx, proposalID, request.Pagination) if err != nil { return nil, err } @@ -232,13 +243,14 @@ func (q Keeper) VotesByProposal(goCtx context.Context, request *group.QueryVotes }, nil } -func (q Keeper) VotesByVoter(goCtx context.Context, request *group.QueryVotesByVoterRequest) (*group.QueryVotesByVoterResponse, error) { +// VotesByProposal queries all votes of a voter. +func (k Keeper) VotesByVoter(goCtx context.Context, request *group.QueryVotesByVoterRequest) (*group.QueryVotesByVoterResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Voter) if err != nil { return nil, err } - it, err := q.getVotesByVoter(ctx, addr, request.Pagination) + it, err := k.getVotesByVoter(ctx, addr, request.Pagination) if err != nil { return nil, err } @@ -255,7 +267,8 @@ func (q Keeper) VotesByVoter(goCtx context.Context, request *group.QueryVotesByV }, nil } -func (q Keeper) GroupsByMember(goCtx context.Context, request *group.QueryGroupsByMemberRequest) (*group.QueryGroupsByMemberResponse, error) { +// GroupsByMember queries all groups where the given address is a member of. +func (k Keeper) GroupsByMember(goCtx context.Context, request *group.QueryGroupsByMemberRequest) (*group.QueryGroupsByMemberResponse, error) { if request == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -266,7 +279,7 @@ func (q Keeper) GroupsByMember(goCtx context.Context, request *group.QueryGroups return nil, err } - iter, err := q.groupMemberByMemberIndex.GetPaginated(ctx.KVStore(q.key), member.Bytes(), request.Pagination) + iter, err := k.groupMemberByMemberIndex.GetPaginated(ctx.KVStore(k.key), member.Bytes(), request.Pagination) if err != nil { return nil, err } @@ -279,7 +292,7 @@ func (q Keeper) GroupsByMember(goCtx context.Context, request *group.QueryGroups var groups []*group.GroupInfo for _, gm := range members { - groupInfo, err := q.getGroupInfo(ctx, gm.GroupId) + groupInfo, err := k.getGroupInfo(ctx, gm.GroupId) if err != nil { return nil, err } @@ -292,24 +305,25 @@ func (q Keeper) GroupsByMember(goCtx context.Context, request *group.QueryGroups }, nil } -func (q Keeper) getVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) (group.Vote, error) { +func (k Keeper) getVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) (group.Vote, error) { var v group.Vote - return v, q.voteTable.GetOne(ctx.KVStore(q.key), orm.PrimaryKey(&group.Vote{ProposalId: proposalID, Voter: voter.String()}), &v) + return v, k.voteTable.GetOne(ctx.KVStore(k.key), orm.PrimaryKey(&group.Vote{ProposalId: proposalID, Voter: voter.String()}), &v) } -func (q Keeper) getVotesByProposal(ctx sdk.Context, proposalID uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.voteByProposalIndex.GetPaginated(ctx.KVStore(q.key), proposalID, pageRequest) +func (k Keeper) getVotesByProposal(ctx sdk.Context, proposalID uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.voteByProposalIndex.GetPaginated(ctx.KVStore(k.key), proposalID, pageRequest) } -func (q Keeper) getVotesByVoter(ctx sdk.Context, voter sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.voteByVoterIndex.GetPaginated(ctx.KVStore(q.key), voter.Bytes(), pageRequest) +func (k Keeper) getVotesByVoter(ctx sdk.Context, voter sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { + return k.voteByVoterIndex.GetPaginated(ctx.KVStore(k.key), voter.Bytes(), pageRequest) } -func (q Keeper) TallyResult(goCtx context.Context, request *group.QueryTallyResultRequest) (*group.QueryTallyResultResponse, error) { +// TallyResult computes the live tally result of a proposal. +func (k Keeper) TallyResult(goCtx context.Context, request *group.QueryTallyResultRequest) (*group.QueryTallyResultResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - proposalId := request.ProposalId + proposalID := request.ProposalId - proposal, err := q.getProposal(ctx, proposalId) + proposal, err := k.getProposal(ctx, proposalID) if err != nil { return nil, err } @@ -319,11 +333,11 @@ func (q Keeper) TallyResult(goCtx context.Context, request *group.QueryTallyResu } var policyInfo group.GroupPolicyInfo - if policyInfo, err = q.getGroupPolicyInfo(ctx, proposal.Address); err != nil { + if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress); err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } - tallyResult, err := q.Tally(ctx, proposal, policyInfo.GroupId) + tallyResult, err := k.Tally(ctx, proposal, policyInfo.GroupId) if err != nil { return nil, err } diff --git a/x/group/keeper/grpc_query_test.go b/x/group/keeper/grpc_query_test.go index c9d91e728c26..21b390be9b0b 100644 --- a/x/group/keeper/grpc_query_test.go +++ b/x/group/keeper/grpc_query_test.go @@ -23,7 +23,7 @@ func TestQueryGroupsByMember(t *testing.T) { addrs := simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.NewInt(30000000)) // Initial group, group policy and balance setup - members := []group.Member{ + members := []group.MemberRequest{ {Address: addrs[2].String(), Weight: "1"}, {Address: addrs[3].String(), Weight: "2"}, } _, err := app.GroupKeeper.CreateGroup(sdkCtx, &group.MsgCreateGroup{ @@ -32,7 +32,7 @@ func TestQueryGroupsByMember(t *testing.T) { }) require.NoError(t, err) - members = []group.Member{ + members = []group.MemberRequest{ {Address: addrs[3].String(), Weight: "1"}, {Address: addrs[4].String(), Weight: "2"}, } _, err = app.GroupKeeper.CreateGroup(sdkCtx, &group.MsgCreateGroup{ diff --git a/x/group/keeper/invariants.go b/x/group/keeper/invariants.go index 9b98e69f897a..2008fd3c9347 100644 --- a/x/group/keeper/invariants.go +++ b/x/group/keeper/invariants.go @@ -14,7 +14,7 @@ import ( const weightInvariant = "Group-TotalWeight" -// RegisterInvariants registers all group invariants +// RegisterInvariants registers all group invariants. func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper) { ir.RegisterRoute(group.ModuleName, weightInvariant, GroupTotalWeightInvariant(keeper)) } @@ -28,7 +28,6 @@ func GroupTotalWeightInvariant(keeper Keeper) sdk.Invariant { } func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, groupTable orm.AutoUInt64Table, groupMemberByGroupIndex orm.Index) (string, bool) { - var msg string var broken bool @@ -73,7 +72,7 @@ func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, g return msg, broken } - curMemWeight, err := groupmath.NewNonNegativeDecFromString(groupMember.GetMember().GetWeight()) + curMemWeight, err := groupmath.NewPositiveDecFromString(groupMember.GetMember().GetWeight()) if err != nil { msg += fmt.Sprintf("error while parsing non-nengative decimal for group member %s\n%v\n", groupMember.Member.Address, err) return msg, broken diff --git a/x/group/keeper/invariants_test.go b/x/group/keeper/invariants_test.go index c21565203dd8..013f5e3a651b 100644 --- a/x/group/keeper/invariants_test.go +++ b/x/group/keeper/invariants_test.go @@ -47,7 +47,6 @@ func (s *invariantTestSuite) SetupSuite() { s.ctx = sdkCtx s.cdc = cdc s.key = key - } func (s *invariantTestSuite) TestGroupTotalWeightInvariant() { diff --git a/x/group/keeper/keeper.go b/x/group/keeper/keeper.go index 7177eefba9dc..de2ecfcc58ab 100644 --- a/x/group/keeper/keeper.go +++ b/x/group/keeper/keeper.go @@ -6,11 +6,11 @@ import ( "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - authmiddleware "github.com/cosmos/cosmos-sdk/x/auth/middleware" "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/cosmos-sdk/x/group/errors" "github.com/cosmos/cosmos-sdk/x/group/internal/orm" @@ -75,12 +75,13 @@ type Keeper struct { voteByProposalIndex orm.Index voteByVoterIndex orm.Index - router *authmiddleware.MsgServiceRouter + router *baseapp.MsgServiceRouter config group.Config } -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.Codec, router *authmiddleware.MsgServiceRouter, accKeeper group.AccountKeeper, config group.Config) Keeper { +// NewKeeper creates a new group keeper. +func NewKeeper(storeKey storetypes.StoreKey, cdc codec.Codec, router *baseapp.MsgServiceRouter, accKeeper group.AccountKeeper, config group.Config) Keeper { k := Keeper{ key: storeKey, router: router, @@ -159,7 +160,7 @@ func NewKeeper(storeKey storetypes.StoreKey, cdc codec.Codec, router *authmiddle panic(err.Error()) } k.proposalByGroupPolicyIndex, err = orm.NewIndex(proposalTable, ProposalByGroupPolicyIndexPrefix, func(value interface{}) ([]interface{}, error) { - account := value.(*group.Proposal).Address + account := value.(*group.Proposal).GroupPolicyAddress addr, err := sdk.AccAddressFromBech32(account) if err != nil { return nil, err @@ -210,7 +211,6 @@ func NewKeeper(storeKey storetypes.StoreKey, cdc codec.Codec, router *authmiddle k.config = config return k - } // Logger returns a module-specific logger. @@ -223,18 +223,17 @@ func (k Keeper) GetGroupSequence(ctx sdk.Context) uint64 { return k.groupTable.Sequence().CurVal(ctx.KVStore(k.key)) } -// iterateProposalsByVPEnd iterates over all proposals whose voting_period_end is after the `endTime` time argument. -func (k Keeper) iterateProposalsByVPEnd(ctx sdk.Context, endTime time.Time, cb func(proposal group.Proposal) (bool, error)) error { +// proposalsByVPEnd returns all proposals whose voting_period_end is after the `endTime` time argument. +func (k Keeper) proposalsByVPEnd(ctx sdk.Context, endTime time.Time) (proposals []group.Proposal, err error) { timeBytes := sdk.FormatTimeBytes(endTime) it, err := k.proposalsByVotingPeriodEnd.PrefixScan(ctx.KVStore(k.key), nil, timeBytes) - if err != nil { - return err + return proposals, err } defer it.Close() for { - // Important: this following line cannot outside the for loop. + // Important: this following line cannot be outside of the for loop. // It seems that when one unmarshals into the same `group.Proposal` // reference, then gogoproto somehow "adds" the new bytes to the old // object for some fields. When running simulations, for proposals with @@ -249,19 +248,12 @@ func (k Keeper) iterateProposalsByVPEnd(ctx sdk.Context, endTime time.Time, cb f break } if err != nil { - return err - } - - stop, err := cb(proposal) - if err != nil { - return err - } - if stop { - break + return proposals, err } + proposals = append(proposals, proposal) } - return nil + return proposals, nil } // pruneProposal deletes a proposal from state. @@ -277,26 +269,60 @@ func (k Keeper) pruneProposal(ctx sdk.Context, proposalID uint64) error { return nil } -// pruneVotes prunes all votes for a proposal from state. -func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) error { - store := ctx.KVStore(k.key) - it, err := k.voteByProposalIndex.Get(store, proposalID) +// abortProposals iterates through all proposals by group policy index +// and marks submitted proposals as aborted. +func (k Keeper) abortProposals(ctx sdk.Context, groupPolicyAddr sdk.AccAddress) error { + proposals, err := k.proposalsByGroupPolicy(ctx, groupPolicyAddr) if err != nil { return err } - defer it.Close() + for _, proposalInfo := range proposals { + // Mark all proposals still in the voting phase as aborted. + if proposalInfo.Status == group.PROPOSAL_STATUS_SUBMITTED { + proposalInfo.Status = group.PROPOSAL_STATUS_ABORTED + + if err := k.proposalTable.Update(ctx.KVStore(k.key), proposalInfo.Id, &proposalInfo); err != nil { + return err + } + } + } + return nil +} + +// proposalsByGroupPolicy returns all proposals for a given group policy. +func (k Keeper) proposalsByGroupPolicy(ctx sdk.Context, groupPolicyAddr sdk.AccAddress) ([]group.Proposal, error) { + proposalIt, err := k.proposalByGroupPolicyIndex.Get(ctx.KVStore(k.key), groupPolicyAddr.Bytes()) + if err != nil { + return nil, err + } + defer proposalIt.Close() + + var proposals []group.Proposal for { - var vote group.Vote - _, err = it.LoadNext(&vote) + var proposalInfo group.Proposal + _, err = proposalIt.LoadNext(&proposalInfo) if errors.ErrORMIteratorDone.Is(err) { break } if err != nil { - return err + return proposals, err } - err = k.voteTable.Delete(store, &vote) + proposals = append(proposals, proposalInfo) + } + return proposals, nil +} + +// pruneVotes prunes all votes for a proposal from state. +func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) error { + votes, err := k.votesByProposal(ctx, proposalID) + if err != nil { + return err + } + + for _, v := range votes { + err = k.voteTable.Delete(ctx.KVStore(k.key), &v) if err != nil { return err } @@ -305,46 +331,84 @@ func (k Keeper) pruneVotes(ctx sdk.Context, proposalID uint64) error { return nil } +// votesByProposal returns all votes for a given proposal. +func (k Keeper) votesByProposal(ctx sdk.Context, proposalID uint64) ([]group.Vote, error) { + it, err := k.voteByProposalIndex.Get(ctx.KVStore(k.key), proposalID) + if err != nil { + return nil, err + } + defer it.Close() + + var votes []group.Vote + for { + var vote group.Vote + _, err = it.LoadNext(&vote) + if errors.ErrORMIteratorDone.Is(err) { + break + } + if err != nil { + return votes, err + } + votes = append(votes, vote) + } + return votes, nil +} + // PruneProposals prunes all proposals that are expired, i.e. whose // `voting_period + max_execution_period` is greater than the current block // time. func (k Keeper) PruneProposals(ctx sdk.Context) error { - err := k.iterateProposalsByVPEnd(ctx, ctx.BlockTime().Add(-k.config.MaxExecutionPeriod), func(proposal group.Proposal) (bool, error) { + proposals, err := k.proposalsByVPEnd(ctx, ctx.BlockTime().Add(-k.config.MaxExecutionPeriod)) + if err != nil { + return nil + } + for _, proposal := range proposals { err := k.pruneProposal(ctx, proposal.Id) if err != nil { - return true, err + return err } - - return false, nil - }) - if err != nil { - return err } return nil } -func (k Keeper) UpdateTallyOfVPEndProposals(ctx sdk.Context) error { - return k.iterateProposalsByVPEnd(ctx, ctx.BlockTime(), func(proposal group.Proposal) (bool, error) { - policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.Address) +// TallyProposalsAtVPEnd iterates over all proposals whose voting period +// has ended, tallies their votes, prunes them, and updates the proposal's +// `FinalTallyResult` field. +func (k Keeper) TallyProposalsAtVPEnd(ctx sdk.Context) error { + proposals, err := k.proposalsByVPEnd(ctx, ctx.BlockTime()) + if err != nil { + return nil + } + for _, proposal := range proposals { + policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress) if err != nil { - return true, sdkerrors.Wrap(err, "group policy") + return sdkerrors.Wrap(err, "group policy") } electorate, err := k.getGroupInfo(ctx, policyInfo.GroupId) if err != nil { - return true, sdkerrors.Wrap(err, "group") - } - - err = k.doTallyAndUpdate(ctx, &proposal, electorate, policyInfo) - if err != nil { - return true, sdkerrors.Wrap(err, "doTallyAndUpdate") + return sdkerrors.Wrap(err, "group") } - if err := k.proposalTable.Update(ctx.KVStore(k.key), proposal.Id, &proposal); err != nil { - return true, sdkerrors.Wrap(err, "proposal update") + if proposal.Status == group.PROPOSAL_STATUS_ABORTED || proposal.Status == group.PROPOSAL_STATUS_WITHDRAWN { + proposalID := proposal.Id + if err := k.pruneProposal(ctx, proposalID); err != nil { + return err + } + if err := k.pruneVotes(ctx, proposalID); err != nil { + return err + } + } else { + err = k.doTallyAndUpdate(ctx, &proposal, electorate, policyInfo) + if err != nil { + return sdkerrors.Wrap(err, "doTallyAndUpdate") + } + + if err := k.proposalTable.Update(ctx.KVStore(k.key), proposal.Id, &proposal); err != nil { + return sdkerrors.Wrap(err, "proposal update") + } } - - return false, nil - }) + } + return nil } diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 9aa677513312..a485a38b17b8 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/stretchr/testify/suite" - tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -51,7 +51,7 @@ func (s *TestSuite) SetupTest() { s.addrs = simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.NewInt(30000000)) // Initial group, group policy and balance setup - members := []group.Member{ + members := []group.MemberRequest{ {Address: s.addrs[4].String(), Weight: "1"}, {Address: s.addrs[1].String(), Weight: "2"}, } groupRes, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ @@ -85,6 +85,40 @@ func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(TestSuite)) } +// Testing a deadlock issue when querying group members +// https://github.com/cosmos/cosmos-sdk/issues/12111 +func (s *TestSuite) TestCreateGroupWithLotsOfMembers() { + for i := 50; i < 70; i++ { + membersResp := s.createGroupAndGetMembers(i) + s.Require().Equal(len(membersResp), i) + } +} + +func (s *TestSuite) createGroupAndGetMembers(numMembers int) []*group.GroupMember { + addressPool := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, numMembers, sdk.NewInt(30000000)) + members := make([]group.MemberRequest, numMembers) + for i := 0; i < len(members); i++ { + members[i] = group.MemberRequest{ + Address: addressPool[i].String(), + Weight: "1", + } + } + + g, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ + Admin: members[0].Address, + Members: members, + }) + s.Require().NoErrorf(err, "failed to create group with %d members", len(members)) + s.T().Logf("group %d created with %d members", g.GroupId, len(members)) + + groupMemberResp, err := s.keeper.GroupMembers(s.ctx, &group.QueryGroupMembersRequest{GroupId: g.GroupId}) + s.Require().NoError(err) + + s.T().Logf("got %d members from group %d", len(groupMemberResp.Members), g.GroupId) + + return groupMemberResp.Members +} + func (s *TestSuite) TestCreateGroup() { addrs := s.addrs addr1 := addrs[0] @@ -92,14 +126,12 @@ func (s *TestSuite) TestCreateGroup() { addr5 := addrs[4] addr6 := addrs[5] - members := []group.Member{{ + members := []group.MemberRequest{{ Address: addr5.String(), Weight: "1", - AddedAt: s.blockTime, }, { Address: addr6.String(), Weight: "2", - AddedAt: s.blockTime, }} expGroups := []*group.GroupInfo{ @@ -142,7 +174,7 @@ func (s *TestSuite) TestCreateGroup() { "member metadata too long": { req: &group.MsgCreateGroup{ Admin: addr1.String(), - Members: []group.Member{{ + Members: []group.MemberRequest{{ Address: addr3.String(), Weight: "1", Metadata: strings.Repeat("a", 256), @@ -153,7 +185,7 @@ func (s *TestSuite) TestCreateGroup() { "zero member weight": { req: &group.MsgCreateGroup{ Admin: addr1.String(), - Members: []group.Member{{ + Members: []group.MemberRequest{{ Address: addr3.String(), Weight: "0", }}, @@ -166,6 +198,7 @@ func (s *TestSuite) TestCreateGroup() { for msg, spec := range specs { spec := spec s.Run(msg, func() { + blockTime := sdk.UnwrapSDKContext(s.ctx).BlockTime() res, err := s.keeper.CreateGroup(s.ctx, spec.req) if spec.expErr { s.Require().Error(err) @@ -204,7 +237,7 @@ func (s *TestSuite) TestCreateGroup() { s.Assert().Equal(members[i].Metadata, loadedMembers[i].Member.Metadata) s.Assert().Equal(members[i].Address, loadedMembers[i].Member.Address) s.Assert().Equal(members[i].Weight, loadedMembers[i].Member.Weight) - s.Assert().Equal(members[i].AddedAt, loadedMembers[i].Member.AddedAt) + s.Assert().Equal(blockTime, loadedMembers[i].Member.AddedAt) s.Assert().Equal(id, loadedMembers[i].GroupId) } @@ -223,7 +256,6 @@ func (s *TestSuite) TestCreateGroup() { } }) } - } func (s *TestSuite) TestUpdateGroupAdmin() { @@ -233,10 +265,9 @@ func (s *TestSuite) TestUpdateGroupAdmin() { addr3 := addrs[2] addr4 := addrs[3] - members := []group.Member{{ + members := []group.MemberRequest{{ Address: addr1.String(), Weight: "1", - AddedAt: s.blockTime, }} oldAdmin := addr2.String() newAdmin := addr3.String() @@ -398,7 +429,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { member1 := addr5.String() member2 := addr6.String() - members := []group.Member{{ + members := []group.MemberRequest{{ Address: member1, Weight: "1", }} @@ -421,7 +452,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: myAdmin, - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: member2, Weight: "2", }}, @@ -438,6 +469,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { Member: &group.Member{ Address: member2, Weight: "2", + AddedAt: s.sdkCtx.BlockTime(), }, GroupId: groupID, }, @@ -445,6 +477,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { Member: &group.Member{ Address: member1, Weight: "1", + AddedAt: s.blockTime, }, GroupId: groupID, }, @@ -454,7 +487,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: myAdmin, - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: member1, Weight: "2", }}, @@ -472,6 +505,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { Member: &group.Member{ Address: member1, Weight: "2", + AddedAt: s.blockTime, }, }, }, @@ -480,7 +514,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: myAdmin, - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: member1, Weight: "1", }}, @@ -498,6 +532,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { Member: &group.Member{ Address: member1, Weight: "1", + AddedAt: s.blockTime, }, }, }, @@ -506,7 +541,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: myAdmin, - MemberUpdates: []group.Member{ + MemberUpdates: []group.MemberRequest{ { Address: member1, Weight: "0", @@ -529,6 +564,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { Member: &group.Member{ Address: member2, Weight: "1", + AddedAt: s.sdkCtx.BlockTime(), }, }}, }, @@ -536,7 +572,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: myAdmin, - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: member1, Weight: "0", }}, @@ -554,7 +590,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: myAdmin, - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: addr4.String(), Weight: "0", }}, @@ -579,7 +615,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: addr3.String(), - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: member1, Weight: "2", }}, @@ -604,7 +640,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { req: &group.MsgUpdateGroupMembers{ GroupId: 999, Admin: myAdmin, - MemberUpdates: []group.Member{{ + MemberUpdates: []group.MemberRequest{{ Address: member1, Weight: "2", }}, @@ -660,6 +696,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { s.Assert().Equal(spec.expMembers[i].Member.Metadata, loadedMembers[i].Member.Metadata) s.Assert().Equal(spec.expMembers[i].Member.Address, loadedMembers[i].Member.Address) s.Assert().Equal(spec.expMembers[i].Member.Weight, loadedMembers[i].Member.Weight) + s.Assert().Equal(spec.expMembers[i].Member.AddedAt, loadedMembers[i].Member.AddedAt) s.Assert().Equal(spec.expMembers[i].GroupId, loadedMembers[i].GroupId) } }) @@ -673,14 +710,12 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { addr5 := addrs[4] addr6 := addrs[5] - members := []group.Member{{ + members := []group.MemberRequest{{ Address: addr5.String(), Weight: "1", - AddedAt: s.blockTime, }, { Address: addr6.String(), Weight: "2", - AddedAt: s.blockTime, }} specs := map[string]struct { @@ -746,7 +781,7 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { "member metadata too long": { req: &group.MsgCreateGroupWithPolicy{ Admin: addr1.String(), - Members: []group.Member{{ + Members: []group.MemberRequest{{ Address: addr3.String(), Weight: "1", Metadata: strings.Repeat("a", 256), @@ -764,7 +799,7 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { "zero member weight": { req: &group.MsgCreateGroupWithPolicy{ Admin: addr1.String(), - Members: []group.Member{{ + Members: []group.MemberRequest{{ Address: addr3.String(), Weight: "0", }}, @@ -799,6 +834,7 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { err := spec.req.SetDecisionPolicy(spec.policy) s.Require().NoError(err) + blockTime := sdk.UnwrapSDKContext(s.ctx).BlockTime() res, err := s.keeper.CreateGroupWithPolicy(s.ctx, spec.req) if spec.expErr { s.Require().Error(err) @@ -838,7 +874,7 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { s.Assert().Equal(members[i].Metadata, loadedMembers[i].Member.Metadata) s.Assert().Equal(members[i].Address, loadedMembers[i].Member.Address) s.Assert().Equal(members[i].Weight, loadedMembers[i].Member.Weight) - s.Assert().Equal(members[i].AddedAt, loadedMembers[i].Member.AddedAt) + s.Assert().Equal(blockTime, loadedMembers[i].Member.AddedAt) s.Assert().Equal(id, loadedMembers[i].GroupId) } @@ -850,7 +886,9 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { s.Assert().Equal(groupPolicyAddr, groupPolicy.Address) s.Assert().Equal(id, groupPolicy.GroupId) s.Assert().Equal(spec.req.GroupPolicyMetadata, groupPolicy.Metadata) - s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupPolicy.GetDecisionPolicy()) + dp, err := groupPolicy.GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), dp) if spec.req.GroupPolicyAsAdmin { s.Assert().NotEqual(spec.req.Admin, groupPolicy.Admin) s.Assert().Equal(groupPolicyAddr, groupPolicy.Admin) @@ -859,7 +897,6 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { } }) } - } func (s *TestSuite) TestCreateGroupPolicy() { @@ -1007,9 +1044,13 @@ func (s *TestSuite) TestCreateGroupPolicy() { s.Assert().Equal(uint64(1), groupPolicy.Version) percentageDecisionPolicy, ok := spec.policy.(*group.PercentageDecisionPolicy) if ok { - s.Assert().Equal(percentageDecisionPolicy, groupPolicy.GetDecisionPolicy()) + dp, err := groupPolicy.GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(percentageDecisionPolicy, dp) } else { - s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupPolicy.GetDecisionPolicy()) + dp, err := groupPolicy.GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), dp) } }) } @@ -1036,9 +1077,9 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() { }{ "with wrong admin": { req: &group.MsgUpdateGroupPolicyAdmin{ - Admin: addr5.String(), - Address: groupPolicyAddr, - NewAdmin: newAdmin.String(), + Admin: addr5.String(), + GroupPolicyAddress: groupPolicyAddr, + NewAdmin: newAdmin.String(), }, expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), @@ -1052,9 +1093,9 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() { }, "with wrong group policy": { req: &group.MsgUpdateGroupPolicyAdmin{ - Admin: admin.String(), - Address: addr5.String(), - NewAdmin: newAdmin.String(), + Admin: admin.String(), + GroupPolicyAddress: addr5.String(), + NewAdmin: newAdmin.String(), }, expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), @@ -1068,9 +1109,9 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() { }, "correct data": { req: &group.MsgUpdateGroupPolicyAdmin{ - Admin: admin.String(), - Address: groupPolicyAddr, - NewAdmin: newAdmin.String(), + Admin: admin.String(), + GroupPolicyAddress: groupPolicyAddr, + NewAdmin: newAdmin.String(), }, expGroupPolicy: &group.GroupPolicyInfo{ Admin: newAdmin.String(), @@ -1124,32 +1165,32 @@ func (s *TestSuite) TestUpdateGroupPolicyMetadata() { }{ "with wrong admin": { req: &group.MsgUpdateGroupPolicyMetadata{ - Admin: addr5.String(), - Address: groupPolicyAddr, + Admin: addr5.String(), + GroupPolicyAddress: groupPolicyAddr, }, expGroupPolicy: &group.GroupPolicyInfo{}, expErr: true, }, "with wrong group policy": { req: &group.MsgUpdateGroupPolicyMetadata{ - Admin: admin.String(), - Address: addr5.String(), + Admin: admin.String(), + GroupPolicyAddress: addr5.String(), }, expGroupPolicy: &group.GroupPolicyInfo{}, expErr: true, }, "with comment too long": { req: &group.MsgUpdateGroupPolicyMetadata{ - Admin: admin.String(), - Address: addr5.String(), + Admin: admin.String(), + GroupPolicyAddress: addr5.String(), }, expGroupPolicy: &group.GroupPolicyInfo{}, expErr: true, }, "correct data": { req: &group.MsgUpdateGroupPolicyMetadata{ - Admin: admin.String(), - Address: groupPolicyAddr, + Admin: admin.String(), + GroupPolicyAddress: groupPolicyAddr, }, expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), @@ -1205,8 +1246,8 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { }{ "with wrong admin": { req: &group.MsgUpdateGroupPolicyDecisionPolicy{ - Admin: addr5.String(), - Address: groupPolicyAddr, + Admin: addr5.String(), + GroupPolicyAddress: groupPolicyAddr, }, policy: policy, expGroupPolicy: &group.GroupPolicyInfo{}, @@ -1214,8 +1255,8 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { }, "with wrong group policy": { req: &group.MsgUpdateGroupPolicyDecisionPolicy{ - Admin: admin.String(), - Address: addr5.String(), + Admin: admin.String(), + GroupPolicyAddress: addr5.String(), }, policy: policy, expGroupPolicy: &group.GroupPolicyInfo{}, @@ -1223,8 +1264,8 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { }, "correct data": { req: &group.MsgUpdateGroupPolicyDecisionPolicy{ - Admin: admin.String(), - Address: groupPolicyAddr, + Admin: admin.String(), + GroupPolicyAddress: groupPolicyAddr, }, policy: group.NewThresholdDecisionPolicy( "2", @@ -1246,8 +1287,8 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { return s.createGroupAndGroupPolicy(admin, nil, policy) }, req: &group.MsgUpdateGroupPolicyDecisionPolicy{ - Admin: admin.String(), - Address: groupPolicyAddr, + Admin: admin.String(), + GroupPolicyAddress: groupPolicyAddr, }, policy: group.NewPercentageDecisionPolicy( "0.5", @@ -1277,7 +1318,7 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { spec.expGroupPolicy.GroupId = groupId // update req with new group policy addr - spec.req.Address = policyAddr1 + spec.req.GroupPolicyAddress = policyAddr1 } err = spec.req.SetDecisionPolicy(spec.policy) @@ -1370,7 +1411,11 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() { s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata) s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version) s.Assert().Equal(policyAccs[i].CreatedAt, expectAccs[i].CreatedAt) - s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) + dp1, err := policyAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + dp2, err := expectAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(dp1, dp2) } // query group policy by admin @@ -1389,7 +1434,11 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() { s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata) s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version) s.Assert().Equal(policyAccs[i].CreatedAt, expectAccs[i].CreatedAt) - s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) + dp1, err := policyAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + dp2, err := expectAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(dp1, dp2) } } @@ -1425,9 +1474,8 @@ func (s *TestSuite) TestSubmitProposal() { bigThresholdAddr := bigThresholdRes.Address defaultProposal := group.Proposal{ - Address: accountAddr.String(), - Status: group.PROPOSAL_STATUS_SUBMITTED, - Result: group.PROPOSAL_RESULT_UNFINALIZED, + GroupPolicyAddress: accountAddr.String(), + Status: group.PROPOSAL_STATUS_SUBMITTED, FinalTallyResult: group.TallyResult{ YesCount: "0", NoCount: "0", @@ -1445,16 +1493,16 @@ func (s *TestSuite) TestSubmitProposal() { }{ "all good with minimal fields set": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr2.String()}, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String()}, }, expProposal: defaultProposal, postRun: func(sdkCtx sdk.Context) {}, }, "all good with good msg payload": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr2.String()}, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String()}, }, msgs: []sdk.Msg{&banktypes.MsgSend{ FromAddress: accountAddr.String(), @@ -1466,9 +1514,9 @@ func (s *TestSuite) TestSubmitProposal() { }, "metadata too long": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr2.String()}, - Metadata: strings.Repeat("a", 256), + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String()}, + Metadata: strings.Repeat("a", 256), }, expErr: true, postRun: func(sdkCtx sdk.Context) {}, @@ -1482,55 +1530,54 @@ func (s *TestSuite) TestSubmitProposal() { }, "existing group policy required": { req: &group.MsgSubmitProposal{ - Address: addr1.String(), - Proposers: []string{addr2.String()}, + GroupPolicyAddress: addr1.String(), + Proposers: []string{addr2.String()}, }, expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, "decision policy threshold > total group weight": { req: &group.MsgSubmitProposal{ - Address: bigThresholdAddr, - Proposers: []string{addr2.String()}, + GroupPolicyAddress: bigThresholdAddr, + Proposers: []string{addr2.String()}, }, expErr: false, expProposal: group.Proposal{ - Address: bigThresholdAddr, - Status: group.PROPOSAL_STATUS_SUBMITTED, - Result: group.PROPOSAL_RESULT_UNFINALIZED, - FinalTallyResult: group.DefaultTallyResult(), - ExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + GroupPolicyAddress: bigThresholdAddr, + Status: group.PROPOSAL_STATUS_SUBMITTED, + FinalTallyResult: group.DefaultTallyResult(), + ExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, postRun: func(sdkCtx sdk.Context) {}, }, "only group members can create a proposal": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr4.String()}, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr4.String()}, }, expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, "all proposers must be in group": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr2.String(), addr4.String()}, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String(), addr4.String()}, }, expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, "admin that is not a group member can not create proposal": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr1.String()}, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr1.String()}, }, expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, "reject msgs that are not authz by group policy": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr2.String()}, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String()}, }, msgs: []sdk.Msg{&testdata.TestMsg{Signers: []string{addr1.String()}}}, expErr: true, @@ -1538,15 +1585,14 @@ func (s *TestSuite) TestSubmitProposal() { }, "with try exec": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr2.String()}, - Exec: group.Exec_EXEC_TRY, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr2.String()}, + Exec: group.Exec_EXEC_TRY, }, msgs: []sdk.Msg{msgSend}, expProposal: group.Proposal{ - Address: accountAddr.String(), - Status: group.PROPOSAL_STATUS_CLOSED, - Result: group.PROPOSAL_RESULT_ACCEPTED, + GroupPolicyAddress: accountAddr.String(), + Status: group.PROPOSAL_STATUS_ACCEPTED, FinalTallyResult: group.TallyResult{ YesCount: "2", NoCount: "0", @@ -1564,15 +1610,14 @@ func (s *TestSuite) TestSubmitProposal() { }, "with try exec, not enough yes votes for proposal to pass": { req: &group.MsgSubmitProposal{ - Address: accountAddr.String(), - Proposers: []string{addr5.String()}, - Exec: group.Exec_EXEC_TRY, + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addr5.String()}, + Exec: group.Exec_EXEC_TRY, }, msgs: []sdk.Msg{msgSend}, expProposal: group.Proposal{ - Address: accountAddr.String(), - Status: group.PROPOSAL_STATUS_SUBMITTED, - Result: group.PROPOSAL_RESULT_UNFINALIZED, + GroupPolicyAddress: accountAddr.String(), + Status: group.PROPOSAL_STATUS_SUBMITTED, FinalTallyResult: group.TallyResult{ YesCount: "0", // Since tally doesn't pass Allow(), we consider the proposal not final NoCount: "0", @@ -1604,22 +1649,23 @@ func (s *TestSuite) TestSubmitProposal() { s.Require().NoError(err) proposal := proposalRes.Proposal - s.Assert().Equal(spec.expProposal.Address, proposal.Address) + s.Assert().Equal(spec.expProposal.GroupPolicyAddress, proposal.GroupPolicyAddress) s.Assert().Equal(spec.req.Metadata, proposal.Metadata) s.Assert().Equal(spec.req.Proposers, proposal.Proposers) s.Assert().Equal(s.blockTime, proposal.SubmitTime) s.Assert().Equal(uint64(1), proposal.GroupVersion) s.Assert().Equal(uint64(1), proposal.GroupPolicyVersion) s.Assert().Equal(spec.expProposal.Status, proposal.Status) - s.Assert().Equal(spec.expProposal.Result, proposal.Result) s.Assert().Equal(spec.expProposal.FinalTallyResult, proposal.FinalTallyResult) s.Assert().Equal(spec.expProposal.ExecutorResult, proposal.ExecutorResult) s.Assert().Equal(s.blockTime.Add(time.Second), proposal.VotingPeriodEnd) + msgs, err := proposal.GetMsgs() + s.Assert().NoError(err) if spec.msgs == nil { // then empty list is ok - s.Assert().Len(proposal.GetMsgs(), 0) + s.Assert().Len(msgs, 0) } else { - s.Assert().Equal(spec.msgs, proposal.GetMsgs()) + s.Assert().Equal(spec.msgs, msgs) } } @@ -1632,7 +1678,6 @@ func (s *TestSuite) TestWithdrawProposal() { addrs := s.addrs addr2 := addrs[1] addr5 := addrs[4] - groupPolicy := s.groupPolicyAddr msgSend := &banktypes.MsgSend{ FromAddress: s.groupPolicyAddr.String(), @@ -1689,7 +1734,7 @@ func (s *TestSuite) TestWithdrawProposal() { return submitProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers) }, proposalId: proposalID, - admin: groupPolicy.String(), + admin: proposers[0], }, } for msg, spec := range specs { @@ -1723,9 +1768,9 @@ func (s *TestSuite) TestVote() { addr3 := addrs[2] addr4 := addrs[3] addr5 := addrs[4] - members := []group.Member{ - {Address: addr4.String(), Weight: "1", AddedAt: s.blockTime}, - {Address: addr3.String(), Weight: "2", AddedAt: s.blockTime}, + members := []group.MemberRequest{ + {Address: addr4.String(), Weight: "1"}, + {Address: addr3.String(), Weight: "2"}, } groupRes, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ Admin: addr1.String(), @@ -1755,9 +1800,9 @@ func (s *TestSuite) TestVote() { s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, s.sdkCtx, groupPolicy, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) req := &group.MsgSubmitProposal{ - Address: accountAddr, - Proposers: []string{addr4.String()}, - Messages: nil, + GroupPolicyAddress: accountAddr, + Proposers: []string{addr4.String()}, + Messages: nil, } err = req.SetMsgs([]sdk.Msg{&banktypes.MsgSend{ FromAddress: accountAddr, @@ -1777,15 +1822,13 @@ func (s *TestSuite) TestVote() { s.Require().NoError(err) proposals := proposalsRes.Proposals s.Require().Equal(len(proposals), 1) - s.Assert().Equal(req.Address, proposals[0].Address) + s.Assert().Equal(req.GroupPolicyAddress, proposals[0].GroupPolicyAddress) s.Assert().Equal(req.Metadata, proposals[0].Metadata) s.Assert().Equal(req.Proposers, proposals[0].Proposers) s.Assert().Equal(s.blockTime, proposals[0].SubmitTime) - s.Assert().Equal(uint64(1), proposals[0].GroupVersion) s.Assert().Equal(uint64(1), proposals[0].GroupPolicyVersion) s.Assert().Equal(group.PROPOSAL_STATUS_SUBMITTED, proposals[0].Status) - s.Assert().Equal(group.PROPOSAL_RESULT_UNFINALIZED, proposals[0].Result) s.Assert().Equal(group.DefaultTallyResult(), proposals[0].FinalTallyResult) specs := map[string]struct { @@ -1796,7 +1839,6 @@ func (s *TestSuite) TestVote() { doBefore func(ctx context.Context) postRun func(sdkCtx sdk.Context) expProposalStatus group.ProposalStatus // expected after tallying - expResult group.ProposalResult // expected after tallying expExecutorResult group.ProposalExecutorResult // expected after tallying expErr bool }{ @@ -1813,7 +1855,6 @@ func (s *TestSuite) TestVote() { NoWithVetoCount: "0", }, expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED, - expResult: group.PROPOSAL_RESULT_UNFINALIZED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, postRun: func(sdkCtx sdk.Context) {}, }, @@ -1831,8 +1872,7 @@ func (s *TestSuite) TestVote() { NoWithVetoCount: "0", }, isFinal: true, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, postRun: func(sdkCtx sdk.Context) { fromBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, groupPolicy) @@ -1855,7 +1895,6 @@ func (s *TestSuite) TestVote() { NoWithVetoCount: "0", }, expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED, - expResult: group.PROPOSAL_RESULT_UNFINALIZED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, postRun: func(sdkCtx sdk.Context) {}, }, @@ -1872,7 +1911,6 @@ func (s *TestSuite) TestVote() { NoWithVetoCount: "0", }, expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED, - expResult: group.PROPOSAL_RESULT_UNFINALIZED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, postRun: func(sdkCtx sdk.Context) {}, }, @@ -1889,7 +1927,6 @@ func (s *TestSuite) TestVote() { NoWithVetoCount: "0", }, expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED, - expResult: group.PROPOSAL_RESULT_UNFINALIZED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, postRun: func(sdkCtx sdk.Context) {}, }, @@ -1906,7 +1943,6 @@ func (s *TestSuite) TestVote() { NoWithVetoCount: "1", }, expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED, - expResult: group.PROPOSAL_RESULT_UNFINALIZED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, postRun: func(sdkCtx sdk.Context) {}, }, @@ -1922,8 +1958,7 @@ func (s *TestSuite) TestVote() { AbstainCount: "0", NoWithVetoCount: "0", }, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, postRun: func(sdkCtx sdk.Context) {}, }, @@ -2117,7 +2152,6 @@ func (s *TestSuite) TestVote() { proposal := proposalRes.Proposal if spec.isFinal { s.Assert().Equal(spec.expTallyResult, proposal.FinalTallyResult) - s.Assert().Equal(spec.expResult, proposal.Result) s.Assert().Equal(spec.expProposalStatus, proposal.Status) s.Assert().Equal(spec.expExecutorResult, proposal.ExecutorResult) } else { @@ -2137,10 +2171,10 @@ func (s *TestSuite) TestVote() { s.T().Log("test tally result should not take into account the member who left the group") require := s.Require() - members = []group.Member{ - {Address: addr2.String(), Weight: "3", AddedAt: s.blockTime}, - {Address: addr3.String(), Weight: "2", AddedAt: s.blockTime}, - {Address: addr4.String(), Weight: "1", AddedAt: s.blockTime}, + members = []group.MemberRequest{ + {Address: addr2.String(), Weight: "3"}, + {Address: addr3.String(), Weight: "2"}, + {Address: addr4.String(), Weight: "1"}, } reqCreate := &group.MsgCreateGroupWithPolicy{ Admin: addr1.String(), @@ -2161,8 +2195,8 @@ func (s *TestSuite) TestVote() { policyAddr := result.GroupPolicyAddress groupID := result.GroupId reqProposal := &group.MsgSubmitProposal{ - Address: policyAddr, - Proposers: []string{addr4.String()}, + GroupPolicyAddress: policyAddr, + Proposers: []string{addr4.String()}, } require.NoError(reqProposal.SetMsgs([]sdk.Msg{&banktypes.MsgSend{ FromAddress: policyAddr, @@ -2220,7 +2254,6 @@ func (s *TestSuite) TestExecProposal() { setupProposal func(ctx context.Context) uint64 expErr bool expProposalStatus group.ProposalStatus - expProposalResult group.ProposalResult expExecutorResult group.ProposalExecutorResult expBalance bool expFromBalances sdk.Coin @@ -2231,8 +2264,7 @@ func (s *TestSuite) TestExecProposal() { msgs := []sdk.Msg{msgSend1} return submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_YES) }, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, expBalance: true, expFromBalances: sdk.NewInt64Coin("test", 9900), @@ -2243,8 +2275,7 @@ func (s *TestSuite) TestExecProposal() { msgs := []sdk.Msg{msgSend1, msgSend1} return submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_YES) }, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, expBalance: true, expFromBalances: sdk.NewInt64Coin("test", 9800), @@ -2255,8 +2286,7 @@ func (s *TestSuite) TestExecProposal() { msgs := []sdk.Msg{msgSend1} return submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_NO) }, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_REJECTED, + expProposalStatus: group.PROPOSAL_STATUS_REJECTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, "open proposal must not fail": { @@ -2264,7 +2294,6 @@ func (s *TestSuite) TestExecProposal() { return submitProposal(ctx, s, []sdk.Msg{msgSend1}, proposers) }, expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED, - expProposalResult: group.PROPOSAL_RESULT_UNFINALIZED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, "existing proposal required": { @@ -2279,8 +2308,7 @@ func (s *TestSuite) TestExecProposal() { return submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_NO) }, srcBlockTime: s.blockTime.Add(time.Second), - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_REJECTED, + expProposalStatus: group.PROPOSAL_STATUS_REJECTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, "Decision policy also applied after timeout": { @@ -2289,21 +2317,19 @@ func (s *TestSuite) TestExecProposal() { return submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_NO) }, srcBlockTime: s.blockTime.Add(time.Second).Add(time.Millisecond), - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_REJECTED, + expProposalStatus: group.PROPOSAL_STATUS_REJECTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, "prevent double execution when successful": { setupProposal: func(ctx context.Context) uint64 { myProposalID := submitProposalAndVote(ctx, s, []sdk.Msg{msgSend1}, proposers, group.VOTE_OPTION_YES) - _, err := s.keeper.Exec(ctx, &group.MsgExec{Signer: addr1.String(), ProposalId: myProposalID}) + _, err := s.keeper.Exec(ctx, &group.MsgExec{Executor: addr1.String(), ProposalId: myProposalID}) s.Require().NoError(err) return myProposalID }, expErr: true, // since proposal is pruned after a successful MsgExec - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, expBalance: true, expFromBalances: sdk.NewInt64Coin("test", 9900), @@ -2314,8 +2340,7 @@ func (s *TestSuite) TestExecProposal() { msgs := []sdk.Msg{msgSend1, msgSend2} return submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_YES) }, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_FAILURE, }, "executable when failed before": { @@ -2323,15 +2348,14 @@ func (s *TestSuite) TestExecProposal() { msgs := []sdk.Msg{msgSend2} myProposalID := submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_YES) - _, err := s.keeper.Exec(ctx, &group.MsgExec{Signer: addr1.String(), ProposalId: myProposalID}) + _, err := s.keeper.Exec(ctx, &group.MsgExec{Executor: addr1.String(), ProposalId: myProposalID}) s.Require().NoError(err) sdkCtx := sdk.UnwrapSDKContext(ctx) s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, sdkCtx, s.groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) return myProposalID }, - expProposalStatus: group.PROPOSAL_STATUS_CLOSED, - expProposalResult: group.PROPOSAL_RESULT_ACCEPTED, + expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, }, } @@ -2347,7 +2371,7 @@ func (s *TestSuite) TestExecProposal() { } ctx = sdk.WrapSDKContext(sdkCtx) - _, err := s.keeper.Exec(ctx, &group.MsgExec{Signer: addr1.String(), ProposalId: proposalID}) + _, err := s.keeper.Exec(ctx, &group.MsgExec{Executor: addr1.String(), ProposalId: proposalID}) if spec.expErr { s.Require().Error(err) return @@ -2361,12 +2385,8 @@ func (s *TestSuite) TestExecProposal() { s.Require().NoError(err) proposal := res.Proposal - exp := group.ProposalResult_name[int32(spec.expProposalResult)] - got := group.ProposalResult_name[int32(proposal.Result)] - s.Assert().Equal(exp, got) - - exp = group.ProposalStatus_name[int32(spec.expProposalStatus)] - got = group.ProposalStatus_name[int32(proposal.Status)] + exp := group.ProposalStatus_name[int32(spec.expProposalStatus)] + got := group.ProposalStatus_name[int32(proposal.Status)] s.Assert().Equal(exp, got) exp = group.ProposalExecutorResult_name[int32(spec.expExecutorResult)] @@ -2454,12 +2474,14 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() { setupProposal: func(ctx context.Context) uint64 { myProposalID := submitProposal(ctx, s, []sdk.Msg{msgSend1}, proposers) _, err := s.keeper.UpdateGroupPolicyMetadata(ctx, &group.MsgUpdateGroupPolicyMetadata{ - Admin: addr1.String(), - Address: s.groupPolicyAddr.String(), + Admin: addr1.String(), + GroupPolicyAddress: s.groupPolicyAddr.String(), }) s.Require().NoError(err) return myProposalID }, + expErr: true, // since proposal status will be `aborted` when group policy is modified + expErrMsg: "not possible to exec with proposal status", expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, "proposal exists when rollback all msg updates on failure": { @@ -2474,7 +2496,7 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() { msgs := []sdk.Msg{msgSend2} myProposalID := submitProposalAndVote(ctx, s, msgs, proposers, group.VOTE_OPTION_YES) - _, err := s.keeper.Exec(ctx, &group.MsgExec{Signer: addr1.String(), ProposalId: myProposalID}) + _, err := s.keeper.Exec(ctx, &group.MsgExec{Executor: addr1.String(), ProposalId: myProposalID}) s.Require().NoError(err) sdkCtx := sdk.UnwrapSDKContext(ctx) s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, sdkCtx, s.groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) @@ -2497,9 +2519,10 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() { } ctx = sdk.WrapSDKContext(sdkCtx) - _, err := s.keeper.Exec(ctx, &group.MsgExec{Signer: addr1.String(), ProposalId: proposalID}) + _, err := s.keeper.Exec(ctx, &group.MsgExec{Executor: addr1.String(), ProposalId: proposalID}) if spec.expErr { s.Require().Error(err) + s.Require().Contains(err.Error(), spec.expErrMsg) return } s.Require().NoError(err) @@ -2531,7 +2554,6 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() { func (s *TestSuite) TestProposalsByVPEnd() { addrs := s.addrs addr2 := addrs[1] - groupPolicy := s.groupPolicyAddr votingPeriod := s.policy.GetVotingPeriod() ctx := s.sdkCtx @@ -2546,46 +2568,42 @@ func (s *TestSuite) TestProposalsByVPEnd() { proposers := []string{addr2.String()} specs := map[string]struct { - preRun func(sdkCtx sdk.Context) uint64 - proposalId uint64 - admin string - expErrMsg string - newCtx sdk.Context - tallyRes group.TallyResult - expStatus group.ProposalStatus - expExecutorResult group.ProposalResult + preRun func(sdkCtx sdk.Context) uint64 + proposalId uint64 + admin string + expErrMsg string + newCtx sdk.Context + tallyRes group.TallyResult + expStatus group.ProposalStatus }{ - "tally updated after voting power end": { + "tally updated after voting period end": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposal(sdkCtx, s, []sdk.Msg{msgSend}, proposers) }, - admin: proposers[0], - newCtx: ctx.WithBlockTime(now.Add(votingPeriod).Add(time.Hour)), - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx.WithBlockTime(now.Add(votingPeriod).Add(time.Hour)), + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_REJECTED, }, "tally within voting period": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers) }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, - "tally within voting period(with votes)": { + "tally within voting period (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, proposers, group.VOTE_OPTION_YES) }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, - "tally after voting period(with votes)": { + "tally after voting period (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, proposers, group.VOTE_OPTION_YES) }, @@ -2597,42 +2615,54 @@ func (s *TestSuite) TestProposalsByVPEnd() { NoWithVetoCount: "0", AbstainCount: "0", }, - expStatus: group.PROPOSAL_STATUS_CLOSED, - expExecutorResult: group.PROPOSAL_RESULT_ACCEPTED, + expStatus: group.PROPOSAL_STATUS_ACCEPTED, }, - "tally of closed proposal": { + "tally after voting period (not passing)": { + preRun: func(sdkCtx sdk.Context) uint64 { + // `s.addrs[4]` has weight 1 + return submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, []string{s.addrs[4].String()}, group.VOTE_OPTION_YES) + }, + admin: proposers[0], + newCtx: ctx.WithBlockTime(now.Add(votingPeriod).Add(time.Hour)), + tallyRes: group.TallyResult{ + YesCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + AbstainCount: "0", + }, + expStatus: group.PROPOSAL_STATUS_REJECTED, + }, + "tally of withdrawn proposal": { preRun: func(sdkCtx sdk.Context) uint64 { pId := submitProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers) _, err := s.keeper.WithdrawProposal(s.ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicy.String(), + Address: proposers[0], }) s.Require().NoError(err) return pId }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_WITHDRAWN, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_WITHDRAWN, }, - "tally of closed proposal (with votes)": { + "tally of withdrawn proposal (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { pId := submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, proposers, group.VOTE_OPTION_YES) _, err := s.keeper.WithdrawProposal(s.ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicy.String(), + Address: proposers[0], }) s.Require().NoError(err) return pId }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_WITHDRAWN, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_WITHDRAWN, }, } @@ -2655,7 +2685,6 @@ func (s *TestSuite) TestProposalsByVPEnd() { s.Require().NoError(err) s.Require().Equal(resp.GetProposal().FinalTallyResult, spec.tallyRes) s.Require().Equal(resp.GetProposal().Status, spec.expStatus) - s.Require().Equal(resp.GetProposal().Result, spec.expExecutorResult) }) } } @@ -2671,24 +2700,21 @@ func (s *TestSuite) TestLeaveGroup() { admin3 := addrs[6] require := s.Require() - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "1", Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), }, { Address: member2.String(), Weight: "2", Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), }, { Address: member3.String(), Weight: "3", Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), }, } policy := group.NewThresholdDecisionPolicy( @@ -2698,28 +2724,25 @@ func (s *TestSuite) TestLeaveGroup() { ) _, groupID1 := s.createGroupAndGroupPolicy(admin1, members, policy) - members = []group.Member{ + members = []group.MemberRequest{ { Address: member1.String(), Weight: "1", Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), }, } _, groupID2 := s.createGroupAndGroupPolicy(admin2, members, nil) - members = []group.Member{ + members = []group.MemberRequest{ { Address: member1.String(), Weight: "1", Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), }, { Address: member2.String(), Weight: "2", Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), }, } policy = &group.PercentageDecisionPolicy{ @@ -2840,12 +2863,60 @@ func (s *TestSuite) TestLeaveGroup() { } } +func (s *TestSuite) TestPruneProposals() { + addrs := s.addrs + expirationTime := time.Hour * 24 * 15 // 15 days + groupID := s.groupID + accountAddr := s.groupPolicyAddr + + msgSend := &banktypes.MsgSend{ + FromAddress: s.groupPolicyAddr.String(), + ToAddress: addrs[0].String(), + Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)}, + } + + policyReq := &group.MsgCreateGroupPolicy{ + Admin: addrs[0].String(), + GroupId: groupID, + } + + policy := group.NewThresholdDecisionPolicy("100", time.Microsecond, time.Microsecond) + err := policyReq.SetDecisionPolicy(policy) + s.Require().NoError(err) + _, err = s.keeper.CreateGroupPolicy(s.ctx, policyReq) + s.Require().NoError(err) + + req := &group.MsgSubmitProposal{ + GroupPolicyAddress: accountAddr.String(), + Proposers: []string{addrs[1].String()}, + } + err = req.SetMsgs([]sdk.Msg{msgSend}) + s.Require().NoError(err) + submittedProposal, err := s.keeper.SubmitProposal(s.ctx, req) + s.Require().NoError(err) + queryProposal := group.QueryProposalRequest{ProposalId: submittedProposal.ProposalId} + prePrune, err := s.keeper.Proposal(s.ctx, &queryProposal) + s.Require().NoError(err) + s.Require().Equal(prePrune.Proposal.Id, submittedProposal.ProposalId) + // Move Forward in time for 15 days, after voting period end + max_execution_period + s.sdkCtx = s.sdkCtx.WithBlockTime(s.sdkCtx.BlockTime().Add(expirationTime)) + + // Prune Expired Proposals + err = s.keeper.PruneProposals(s.sdkCtx) + s.Require().NoError(err) + postPrune, err := s.keeper.Proposal(s.ctx, &queryProposal) + s.Require().Nil(postPrune) + s.Require().Error(err) + s.Require().Contains(err.Error(), "load proposal: not found") +} + func submitProposal( ctx context.Context, s *TestSuite, msgs []sdk.Msg, - proposers []string) uint64 { + proposers []string, +) uint64 { proposalReq := &group.MsgSubmitProposal{ - Address: s.groupPolicyAddr.String(), - Proposers: proposers, + GroupPolicyAddress: s.groupPolicyAddr.String(), + Proposers: proposers, } err := proposalReq.SetMsgs(msgs) s.Require().NoError(err) @@ -2857,7 +2928,8 @@ func submitProposal( func submitProposalAndVote( ctx context.Context, s *TestSuite, msgs []sdk.Msg, - proposers []string, voteOption group.VoteOption) uint64 { + proposers []string, voteOption group.VoteOption, +) uint64 { s.Require().Greater(len(proposers), 0) myProposalID := submitProposal(ctx, s, msgs, proposers) @@ -2872,7 +2944,7 @@ func submitProposalAndVote( func (s *TestSuite) createGroupAndGroupPolicy( admin sdk.AccAddress, - members []group.Member, + members []group.MemberRequest, policy group.DecisionPolicy, ) (policyAddr string, groupID uint64) { groupRes, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 06c8f008f178..a4f7fe2e2a84 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -4,9 +4,6 @@ import ( "context" "encoding/binary" "fmt" - "reflect" - - gogotypes "github.com/gogo/protobuf/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" @@ -20,14 +17,14 @@ import ( var _ group.MsgServer = Keeper{} -// TODO: Revisit this once we have propoer gas fee framework. +// TODO: Revisit this once we have proper gas fee framework. // Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054, https://github.com/cosmos/cosmos-sdk/discussions/9072 const gasCostPerIteration = uint64(20) func (k Keeper) CreateGroup(goCtx context.Context, req *group.MsgCreateGroup) (*group.MsgCreateGroupResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) metadata := req.Metadata - members := group.Members{Members: req.Members} + members := group.MemberRequests{Members: req.Members} admin := req.Admin if err := members.ValidateBasic(); err != nil { @@ -108,7 +105,8 @@ func (k Keeper) UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGr if err := k.assertMetadataLength(req.MemberUpdates[i].Metadata, "group member metadata"); err != nil { return err } - groupMember := group.GroupMember{GroupId: req.GroupId, + groupMember := group.GroupMember{ + GroupId: req.GroupId, Member: &group.Member{ Address: req.MemberUpdates[i].Address, Weight: req.MemberUpdates[i].Weight, @@ -140,7 +138,7 @@ func (k Keeper) UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGr return sdkerrors.Wrap(sdkerrors.ErrNotFound, "unknown member") } - previousMemberWeight, err := math.NewNonNegativeDecFromString(prevGroupMember.Member.Weight) + previousMemberWeight, err := math.NewPositiveDecFromString(prevGroupMember.Member.Weight) if err != nil { return err } @@ -159,22 +157,25 @@ func (k Keeper) UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGr } // If group member already exists, handle update if found { - previousMemberWeight, err := math.NewNonNegativeDecFromString(prevGroupMember.Member.Weight) + previousMemberWeight, err := math.NewPositiveDecFromString(prevGroupMember.Member.Weight) if err != nil { return err } - // Subtract previous weight from the group total weight. + // Substract previous weight from the group total weight. totalWeight, err = math.SubNonNegative(totalWeight, previousMemberWeight) if err != nil { return err } // Save updated group member in the groupMemberTable. + groupMember.Member.AddedAt = prevGroupMember.Member.AddedAt if err := k.groupMemberTable.Update(ctx.KVStore(k.key), &groupMember); err != nil { return sdkerrors.Wrap(err, "add member") } - // else handle create. - } else if err := k.groupMemberTable.Create(ctx.KVStore(k.key), &groupMember); err != nil { - return sdkerrors.Wrap(err, "add member") + } else { // else handle create. + groupMember.Member.AddedAt = ctx.BlockTime() + if err := k.groupMemberTable.Create(ctx.KVStore(k.key), &groupMember); err != nil { + return sdkerrors.Wrap(err, "add member") + } } // In both cases (handle + update), we need to add the new member's weight to the group total weight. totalWeight, err = totalWeight.Add(newMemberWeight) @@ -247,12 +248,12 @@ func (k Keeper) CreateGroupWithPolicy(goCtx context.Context, req *group.MsgCreat if err != nil { return nil, sdkerrors.Wrap(err, "group response") } - groupId := groupRes.GroupId + groupID := groupRes.GroupId var groupPolicyAddr sdk.AccAddress groupPolicyRes, err := k.CreateGroupPolicy(goCtx, &group.MsgCreateGroupPolicy{ Admin: req.Admin, - GroupId: groupId, + GroupId: groupID, Metadata: req.GroupPolicyMetadata, DecisionPolicy: req.DecisionPolicy, }) @@ -269,7 +270,7 @@ func (k Keeper) CreateGroupWithPolicy(goCtx context.Context, req *group.MsgCreat if req.GroupPolicyAsAdmin { updateAdminReq := &group.MsgUpdateGroupAdmin{ - GroupId: groupId, + GroupId: groupID, Admin: req.Admin, NewAdmin: groupPolicyAddress, } @@ -279,9 +280,9 @@ func (k Keeper) CreateGroupWithPolicy(goCtx context.Context, req *group.MsgCreat } updatePolicyAddressReq := &group.MsgUpdateGroupPolicyAdmin{ - Admin: req.Admin, - Address: groupPolicyAddress, - NewAdmin: groupPolicyAddress, + Admin: req.Admin, + GroupPolicyAddress: groupPolicyAddress, + NewAdmin: groupPolicyAddress, } _, err = k.UpdateGroupPolicyAdmin(goCtx, updatePolicyAddressReq) if err != nil { @@ -289,7 +290,7 @@ func (k Keeper) CreateGroupWithPolicy(goCtx context.Context, req *group.MsgCreat } } - return &group.MsgCreateGroupWithPolicyResponse{GroupId: groupId, GroupPolicyAddress: groupPolicyAddress}, nil + return &group.MsgCreateGroupWithPolicyResponse{GroupId: groupID, GroupPolicyAddress: groupPolicyAddress}, nil } func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGroupPolicy) (*group.MsgCreateGroupPolicyResponse, error) { @@ -298,7 +299,10 @@ func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGro if err != nil { return nil, sdkerrors.Wrap(err, "request admin") } - policy := req.GetDecisionPolicy() + policy, err := req.GetDecisionPolicy() + if err != nil { + return nil, sdkerrors.Wrap(err, "request decision policy") + } groupID := req.GetGroupID() metadata := req.GetMetadata() @@ -326,17 +330,19 @@ func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGro // Generate account address of group policy. var accountAddr sdk.AccAddress - // loop here in the rare case of a collision + // loop here in the rare case where a ADR-028-derived address creates a + // collision with an existing address. for { nextAccVal := k.groupPolicySeq.NextVal(ctx.KVStore(k.key)) - var buf = make([]byte, 8) + buf := make([]byte, 8) binary.BigEndian.PutUint64(buf, nextAccVal) parentAcc := address.Module(group.ModuleName, []byte{GroupPolicyTablePrefix}) accountAddr = address.Derive(parentAcc, buf) if k.accKeeper.GetAccount(ctx, accountAddr) != nil { - // handle a rare collision + // handle a rare collision, in which case we just go on to the + // next sequence value and derive a new address. continue } acc := k.accKeeper.NewAccount(ctx, &authtypes.ModuleAccount{ @@ -383,7 +389,7 @@ func (k Keeper) UpdateGroupPolicyAdmin(goCtx context.Context, req *group.MsgUpda return k.groupPolicyTable.Update(ctx.KVStore(k.key), groupPolicy) } - err := k.doUpdateGroupPolicy(ctx, req.Address, req.Admin, action, "group policy admin updated") + err := k.doUpdateGroupPolicy(ctx, req.GroupPolicyAddress, req.Admin, action, "group policy admin updated") if err != nil { return nil, err } @@ -393,7 +399,10 @@ func (k Keeper) UpdateGroupPolicyAdmin(goCtx context.Context, req *group.MsgUpda func (k Keeper) UpdateGroupPolicyDecisionPolicy(goCtx context.Context, req *group.MsgUpdateGroupPolicyDecisionPolicy) (*group.MsgUpdateGroupPolicyDecisionPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - policy := req.GetDecisionPolicy() + policy, err := req.GetDecisionPolicy() + if err != nil { + return nil, err + } action := func(groupPolicy *group.GroupPolicyInfo) error { g, err := k.getGroupInfo(ctx, groupPolicy.GroupId) @@ -415,7 +424,7 @@ func (k Keeper) UpdateGroupPolicyDecisionPolicy(goCtx context.Context, req *grou return k.groupPolicyTable.Update(ctx.KVStore(k.key), groupPolicy) } - err := k.doUpdateGroupPolicy(ctx, req.Address, req.Admin, action, "group policy's decision policy updated") + err = k.doUpdateGroupPolicy(ctx, req.GroupPolicyAddress, req.Admin, action, "group policy's decision policy updated") if err != nil { return nil, err } @@ -437,7 +446,7 @@ func (k Keeper) UpdateGroupPolicyMetadata(goCtx context.Context, req *group.MsgU return nil, err } - err := k.doUpdateGroupPolicy(ctx, req.Address, req.Admin, action, "group policy metadata updated") + err := k.doUpdateGroupPolicy(ctx, req.GroupPolicyAddress, req.Admin, action, "group policy metadata updated") if err != nil { return nil, err } @@ -447,19 +456,22 @@ func (k Keeper) UpdateGroupPolicyMetadata(goCtx context.Context, req *group.MsgU func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitProposal) (*group.MsgSubmitProposalResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - accountAddress, err := sdk.AccAddressFromBech32(req.Address) + groupPolicyAddr, err := sdk.AccAddressFromBech32(req.GroupPolicyAddress) if err != nil { return nil, sdkerrors.Wrap(err, "request account address of group policy") } metadata := req.Metadata proposers := req.Proposers - msgs := req.GetMsgs() + msgs, err := req.GetMsgs() + if err != nil { + return nil, sdkerrors.Wrap(err, "request msgs") + } if err := k.assertMetadataLength(metadata, "metadata"); err != nil { return nil, err } - policyAcc, err := k.getGroupPolicyInfo(ctx, req.Address) + policyAcc, err := k.getGroupPolicyInfo(ctx, req.GroupPolicyAddress) if err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } @@ -477,13 +489,13 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos } // Check that if the messages require signers, they are all equal to the given account address of group policy. - if err := ensureMsgAuthZ(msgs, accountAddress); err != nil { + if err := ensureMsgAuthZ(msgs, groupPolicyAddr); err != nil { return nil, err } - policy := policyAcc.GetDecisionPolicy() - if policy == nil { - return nil, sdkerrors.Wrap(errors.ErrEmpty, "nil policy") + policy, err := policyAcc.GetDecisionPolicy() + if err != nil { + return nil, sdkerrors.Wrap(err, "proposal group policy decision policy") } // Prevent proposal that can not succeed. @@ -494,13 +506,12 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos m := &group.Proposal{ Id: k.proposalTable.Sequence().PeekNextVal(ctx.KVStore(k.key)), - Address: req.Address, + GroupPolicyAddress: req.GroupPolicyAddress, Metadata: metadata, Proposers: proposers, SubmitTime: ctx.BlockTime(), GroupVersion: g.Version, GroupPolicyVersion: policyAcc.Version, - Result: group.PROPOSAL_RESULT_UNFINALIZED, Status: group.PROPOSAL_STATUS_SUBMITTED, ExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, VotingPeriodEnd: ctx.BlockTime().Add(policy.GetVotingPeriod()), // The voting window begins as soon as the proposal is submitted. @@ -532,7 +543,7 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos Option: group.VOTE_OPTION_YES, }) if err != nil { - return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrap(err, "The proposal was created but failed on vote") + return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrapf(err, "the proposal was created but failed on vote for voter %s", proposers[i]) } } @@ -541,10 +552,10 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos ProposalId: id, // We consider the first proposer as the MsgExecRequest signer // but that could be revisited (eg using the group policy) - Signer: proposers[0], + Executor: proposers[0], }) if err != nil { - return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrap(err, "The proposal was created but failed on exec") + return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrap(err, "the proposal was created but failed on exec") } } @@ -567,40 +578,18 @@ func (k Keeper) WithdrawProposal(goCtx context.Context, req *group.MsgWithdrawPr } var policyInfo group.GroupPolicyInfo - if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.Address); err != nil { + if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress); err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } - storeUpdates := func() (*group.MsgWithdrawProposalResponse, error) { - if err := k.proposalTable.Update(ctx.KVStore(k.key), id, &proposal); err != nil { - return nil, err - } - return &group.MsgWithdrawProposalResponse{}, nil - } - - // check address is the group policy admin. - if address == policyInfo.Address { - err = ctx.EventManager().EmitTypedEvent(&group.EventWithdrawProposal{ProposalId: id}) - if err != nil { - return nil, err - } - - proposal.Result = group.PROPOSAL_RESULT_UNFINALIZED - proposal.Status = group.PROPOSAL_STATUS_WITHDRAWN - return storeUpdates() - } - - // if address is not group policy admin then check whether he is in proposers list. - validProposer := false - for _, proposer := range proposal.Proposers { - if proposer == address { - validProposer = true - break - } + // check address is the group policy admin he is in proposers list.. + if address != policyInfo.Admin && !isProposer(proposal, address) { + return nil, sdkerrors.Wrapf(errors.ErrUnauthorized, "given address is neither group policy admin nor in proposers: %s", address) } - if !validProposer { - return nil, sdkerrors.Wrapf(errors.ErrUnauthorized, "given address is neither group policy admin nor in proposers: %s", address) + proposal.Status = group.PROPOSAL_STATUS_WITHDRAWN + if err := k.proposalTable.Update(ctx.KVStore(k.key), id, &proposal); err != nil { + return nil, err } err = ctx.EventManager().EmitTypedEvent(&group.EventWithdrawProposal{ProposalId: id}) @@ -608,9 +597,7 @@ func (k Keeper) WithdrawProposal(goCtx context.Context, req *group.MsgWithdrawPr return nil, err } - proposal.Result = group.PROPOSAL_RESULT_UNFINALIZED - proposal.Status = group.PROPOSAL_STATUS_WITHDRAWN - return storeUpdates() + return &group.MsgWithdrawProposalResponse{}, nil } func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteResponse, error) { @@ -635,9 +622,8 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR return nil, sdkerrors.Wrap(errors.ErrExpired, "voting period has ended already") } - var policyInfo group.GroupPolicyInfo - - if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.Address); err != nil { + policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress) + if err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } @@ -650,7 +636,7 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR voterAddr := req.Voter voter := group.GroupMember{GroupId: electorate.Id, Member: &group.Member{Address: voterAddr}} if err := k.groupMemberTable.GetOne(ctx.KVStore(k.key), orm.PrimaryKey(&voter), &voter); err != nil { - return nil, sdkerrors.Wrapf(err, "address: %s", voterAddr) + return nil, sdkerrors.Wrapf(err, "voter address: %s", voterAddr) } newVote := group.Vote{ ProposalId: id, @@ -675,7 +661,7 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR if req.Exec == group.Exec_EXEC_TRY { _, err = k.Exec(sdk.WrapSDKContext(ctx), &group.MsgExec{ ProposalId: id, - Signer: voterAddr, + Executor: voterAddr, }) if err != nil { return nil, err @@ -685,15 +671,11 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR return &group.MsgVoteResponse{}, nil } -// doTallyAndUpdate performs a tally, and updates the proposal's -// `FinalTallyResult` field only if the tally is final. +// doTallyAndUpdate performs a tally, and, if the tally result is final, then: +// - updates the proposal's `Status` and `FinalTallyResult` fields, +// - prune all the votes. func (k Keeper) doTallyAndUpdate(ctx sdk.Context, p *group.Proposal, electorate group.GroupInfo, policyInfo group.GroupPolicyInfo) error { - policy := policyInfo.GetDecisionPolicy() - pSubmittedAt, err := gogotypes.TimestampProto(p.SubmitTime) - if err != nil { - return err - } - submittedAt, err := gogotypes.TimestampFromProto(pSubmittedAt) + policy, err := policyInfo.GetDecisionPolicy() if err != nil { return err } @@ -703,21 +685,25 @@ func (k Keeper) doTallyAndUpdate(ctx sdk.Context, p *group.Proposal, electorate return err } - result, err := policy.Allow(tallyResult, electorate.TotalWeight, ctx.BlockTime().Sub(submittedAt)) + sinceSubmission := ctx.BlockTime().Sub(p.SubmitTime) // duration passed since proposal submission. + result, err := policy.Allow(tallyResult, electorate.TotalWeight, sinceSubmission) + // If the result was final (i.e. enough votes to pass) or if the voting + // period ended, then we consider the proposal as final. + isFinal := result.Final || ctx.BlockTime().After(p.VotingPeriodEnd) + switch { case err != nil: return sdkerrors.Wrap(err, "policy allow") - case result.Final: + + case isFinal: if err := k.pruneVotes(ctx, p.Id); err != nil { return err } p.FinalTallyResult = tallyResult if result.Allow { - p.Result = group.PROPOSAL_RESULT_ACCEPTED - p.Status = group.PROPOSAL_STATUS_CLOSED + p.Status = group.PROPOSAL_STATUS_ACCEPTED } else { - p.Result = group.PROPOSAL_RESULT_REJECTED - p.Status = group.PROPOSAL_STATUS_CLOSED + p.Status = group.PROPOSAL_STATUS_REJECTED } } @@ -734,32 +720,18 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR return nil, err } - if proposal.Status != group.PROPOSAL_STATUS_SUBMITTED && proposal.Status != group.PROPOSAL_STATUS_CLOSED { - return nil, sdkerrors.Wrapf(errors.ErrInvalid, "not possible with proposal status %s", proposal.Status.String()) + if proposal.Status != group.PROPOSAL_STATUS_SUBMITTED && proposal.Status != group.PROPOSAL_STATUS_ACCEPTED { + return nil, sdkerrors.Wrapf(errors.ErrInvalid, "not possible to exec with proposal status %s", proposal.Status.String()) } - var policyInfo group.GroupPolicyInfo - if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.Address); err != nil { + policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress) + if err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } - storeUpdates := func() (*group.MsgExecResponse, error) { - store := ctx.KVStore(k.key) - - // If proposal has successfully run, delete it from state. - if proposal.ExecutorResult == group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { - if err := k.pruneProposal(ctx, proposal.Id); err != nil { - return nil, err - } - } else { - if err := k.proposalTable.Update(store, id, &proposal); err != nil { - return nil, err - } - } - - return &group.MsgExecResponse{}, nil - } - + // If proposal is still in SUBMITTED phase, it means that the voting period + // didn't end yet, and tallying hasn't been done. In this case, we need to + // tally first. if proposal.Status == group.PROPOSAL_STATUS_SUBMITTED { electorate, err := k.getGroupInfo(ctx, policyInfo.GroupId) if err != nil { @@ -772,8 +744,8 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR } // Execute proposal payload. - if proposal.Status == group.PROPOSAL_STATUS_CLOSED && proposal.Result == group.PROPOSAL_RESULT_ACCEPTED && proposal.ExecutorResult != group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { - logger := ctx.Logger().With("module", fmt.Sprintf("x/%s", group.ModuleName)) + var logs string + if proposal.Status == group.PROPOSAL_STATUS_ACCEPTED && proposal.ExecutorResult != group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { // Caching context so that we don't update the store in case of failure. ctx, flush := ctx.CacheContext() @@ -784,8 +756,8 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR _, err = k.doExecuteMsgs(ctx, k.router, proposal, addr) if err != nil { proposal.ExecutorResult = group.PROPOSAL_EXECUTOR_RESULT_FAILURE - proposalType := reflect.TypeOf(proposal).String() - logger.Info("proposal execution failed", "cause", err, "type", proposalType, "proposalID", id) + logs = fmt.Sprintf("proposal execution failed on proposal %d, because of error %s", id, err.Error()) + k.Logger(ctx).Info("proposal execution failed", "cause", err, "proposalID", id) } else { proposal.ExecutorResult = group.PROPOSAL_EXECUTOR_RESULT_SUCCESS flush() @@ -793,20 +765,30 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR } // Update proposal in proposalTable - res, err := storeUpdates() - if err != nil { - return nil, err + // If proposal has successfully run, delete it from state. + if proposal.ExecutorResult == group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { + if err := k.pruneProposal(ctx, proposal.Id); err != nil { + return nil, err + } + } else { + store := ctx.KVStore(k.key) + if err := k.proposalTable.Update(store, id, &proposal); err != nil { + return nil, err + } } err = ctx.EventManager().EmitTypedEvent(&group.EventExec{ ProposalId: id, + Logs: logs, Result: proposal.ExecutorResult, }) if err != nil { return nil, err } - return res, nil + return &group.MsgExecResponse{ + Result: proposal.ExecutorResult, + }, nil } // LeaveGroup implements the MsgServer/LeaveGroup method. @@ -835,7 +817,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - memberWeight, err := math.NewNonNegativeDecFromString(gm.Member.Weight) + memberWeight, err := math.NewPositiveDecFromString(gm.Member.Weight) if err != nil { return nil, err } @@ -852,11 +834,13 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr // update group weight groupInfo.TotalWeight = updatedWeight.String() - if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { + groupInfo.Version++ + + if err := k.validateDecisionPolicies(ctx, groupInfo); err != nil { return nil, err } - if err := k.validateDecisionPolicies(ctx, groupInfo); err != nil { + if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { return nil, err } @@ -888,8 +872,10 @@ type authNGroupReq interface { GetAdmin() string } -type actionFn func(m *group.GroupInfo) error -type groupPolicyActionFn func(m *group.GroupPolicyInfo) error +type ( + actionFn func(m *group.GroupInfo) error + groupPolicyActionFn func(m *group.GroupPolicyInfo) error +) // doUpdateGroupPolicy first makes sure that the group policy admin initiated the group policy update, // before performing the group policy update and emitting an event. @@ -899,6 +885,11 @@ func (k Keeper) doUpdateGroupPolicy(ctx sdk.Context, groupPolicy string, admin s return sdkerrors.Wrap(err, "load group policy") } + groupPolicyAddr, err := sdk.AccAddressFromBech32(groupPolicy) + if err != nil { + return sdkerrors.Wrap(err, "group policy address") + } + groupPolicyAdmin, err := sdk.AccAddressFromBech32(admin) if err != nil { return sdkerrors.Wrap(err, "group policy admin") @@ -913,6 +904,10 @@ func (k Keeper) doUpdateGroupPolicy(ctx sdk.Context, groupPolicy string, admin s return sdkerrors.Wrap(err, note) } + if err = k.abortProposals(ctx, groupPolicyAddr); err != nil { + return err + } + err = ctx.EventManager().EmitTypedEvent(&group.EventUpdateGroupPolicy{Address: admin}) if err != nil { return err @@ -938,8 +933,8 @@ func (k Keeper) doUpdateGroup(ctx sdk.Context, req authNGroupReq, action actionF } // doAuthenticated makes sure that the group admin initiated the request, -// and perform the provided action on the -func (k Keeper) doAuthenticated(ctx sdk.Context, req authNGroupReq, action actionFn, note string) error { +// and perform the provided action on the group. +func (k Keeper) doAuthenticated(ctx sdk.Context, req authNGroupReq, action actionFn, errNote string) error { group, err := k.getGroupInfo(ctx, req.GetGroupID()) if err != nil { return err @@ -953,10 +948,10 @@ func (k Keeper) doAuthenticated(ctx sdk.Context, req authNGroupReq, action actio return sdkerrors.Wrap(err, "request admin") } if !admin.Equals(reqAdmin) { - return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "not group admin") + return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "not group admin; got %s, expected %s", req.GetAdmin(), group.Admin) } if err := action(&group); err != nil { - return sdkerrors.Wrap(err, note) + return sdkerrors.Wrap(err, errNote) } return nil } @@ -997,3 +992,14 @@ func (k Keeper) validateDecisionPolicies(ctx sdk.Context, g group.GroupInfo) err return nil } + +// isProposer checks that an address is a proposer of a given proposal. +func isProposer(proposal group.Proposal, address string) bool { + for _, proposer := range proposal.Proposers { + if proposer == address { + return true + } + } + + return false +} diff --git a/x/group/keeper/proposal_executor.go b/x/group/keeper/proposal_executor.go index 917ac575d53a..29d9d1e8bed9 100644 --- a/x/group/keeper/proposal_executor.go +++ b/x/group/keeper/proposal_executor.go @@ -1,16 +1,18 @@ package keeper import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" - authmiddleware "github.com/cosmos/cosmos-sdk/x/auth/middleware" "github.com/cosmos/cosmos-sdk/x/group" grouperrors "github.com/cosmos/cosmos-sdk/x/group/errors" ) // doExecuteMsgs routes the messages to the registered handlers. Messages are limited to those that require no authZ or -// by the account of group policy only. Otherwise this gives access to other peoples accounts as the sdk ant handler is bypassed -func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgServiceRouter, proposal group.Proposal, groupPolicyAcc sdk.AccAddress) ([]sdk.Result, error) { +// by the account of group policy only. Otherwise this gives access to other peoples accounts as the sdk middlewares are bypassed +func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *baseapp.MsgServiceRouter, proposal group.Proposal, groupPolicyAcc sdk.AccAddress) ([]sdk.Result, error) { // Ensure it's not too late to execute the messages. // After https://github.com/cosmos/cosmos-sdk/issues/11245, proposals should // be pruned automatically, so this function should not even be called, as @@ -21,7 +23,10 @@ func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgService return nil, grouperrors.ErrExpired.Wrapf("proposal expired on %s", expiryDate) } - msgs := proposal.GetMsgs() + msgs, err := proposal.GetMsgs() + if err != nil { + return nil, err + } results := make([]sdk.Result, len(msgs)) if err := ensureMsgAuthZ(msgs, groupPolicyAcc); err != nil { @@ -34,21 +39,29 @@ func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgService } r, err := handler(ctx, msg) if err != nil { - return nil, errors.Wrapf(err, "message %q at position %d", msg, i) + return nil, errors.Wrapf(err, "message %s at position %d", sdk.MsgTypeURL(msg), i) } - if r != nil { - results[i] = *r + // Handler should always return non-nil sdk.Result. + if r == nil { + return nil, fmt.Errorf("got nil sdk.Result for message %q at position %d", msg, i) } + + results[i] = *r } return results, nil } -// ensureMsgAuthZ checks that if a message requires signers that all of them are equal to the given account address of group policy. +// ensureMsgAuthZ checks that if a message requires signers that all of them +// are equal to the given account address of group policy. func ensureMsgAuthZ(msgs []sdk.Msg, groupPolicyAcc sdk.AccAddress) error { for i := range msgs { + // In practice, GetSigners() should return a non-empty array without + // duplicates, so the code below is equivalent to: + // `msgs[i].GetSigners()[0] == groupPolicyAcc` + // but we prefer to loop through all GetSigners just to be sure. for _, acct := range msgs[i].GetSigners() { if !groupPolicyAcc.Equals(acct) { - return errors.Wrap(errors.ErrUnauthorized, "msg does not have group policy authorization") + return errors.Wrapf(errors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAcc.String(), acct.String()) } } } diff --git a/x/group/keeper/tally.go b/x/group/keeper/tally.go index 2f1a21629a68..d3ffedfd5ed7 100644 --- a/x/group/keeper/tally.go +++ b/x/group/keeper/tally.go @@ -10,14 +10,17 @@ import ( // Tally is a function that tallies a proposal by iterating through its votes, // and returns the tally result without modifying the proposal or any state. -func (q Keeper) Tally(ctx sdk.Context, p group.Proposal, groupId uint64) (group.TallyResult, error) { +func (k Keeper) Tally(ctx sdk.Context, p group.Proposal, groupID uint64) (group.TallyResult, error) { // If proposal has already been tallied and updated, then its status is - // closed, in which case we just return the previously stored result. - if p.Status == group.PROPOSAL_STATUS_CLOSED { + // accepted/rejected, in which case we just return the previously stored result. + // + // In all other cases (including withdrawn, aborted...) we do the tally + // again. + if p.Status == group.PROPOSAL_STATUS_ACCEPTED || p.Status == group.PROPOSAL_STATUS_REJECTED { return p.FinalTallyResult, nil } - it, err := q.voteByProposalIndex.Get(ctx.KVStore(q.key), p.Id) + it, err := k.voteByProposalIndex.Get(ctx.KVStore(k.key), p.Id) if err != nil { return group.TallyResult{}, err } @@ -36,8 +39,8 @@ func (q Keeper) Tally(ctx sdk.Context, p group.Proposal, groupId uint64) (group. } var member group.GroupMember - err := q.groupMemberTable.GetOne(ctx.KVStore(q.key), orm.PrimaryKey(&group.GroupMember{ - GroupId: groupId, + err := k.groupMemberTable.GetOne(ctx.KVStore(k.key), orm.PrimaryKey(&group.GroupMember{ + GroupId: groupID, Member: &group.Member{Address: vote.Voter}, }), &member) diff --git a/x/group/module/abci.go b/x/group/module/abci.go index 36354d1e88ac..4e3817f804b1 100644 --- a/x/group/module/abci.go +++ b/x/group/module/abci.go @@ -6,7 +6,7 @@ import ( ) func EndBlocker(ctx sdk.Context, k keeper.Keeper) { - if err := k.UpdateTallyOfVPEndProposals(ctx); err != nil { + if err := k.TallyProposalsAtVPEnd(ctx); err != nil { panic(err) } pruneProposals(ctx, k) diff --git a/x/group/module/abci_test.go b/x/group/module/abci_test.go index 4393a7258ebe..fd298c14b54d 100644 --- a/x/group/module/abci_test.go +++ b/x/group/module/abci_test.go @@ -26,7 +26,7 @@ func TestEndBlockerPruning(t *testing.T) { addr3 := addrs[2] // Initial group, group policy and balance setup - members := []group.Member{ + members := []group.MemberRequest{ {Address: addr1.String(), Weight: "1"}, {Address: addr2.String(), Weight: "2"}, } @@ -34,9 +34,16 @@ func TestEndBlockerPruning(t *testing.T) { Admin: addr1.String(), Members: members, }) + require.NoError(t, err) + groupRes2, err := app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ + Admin: addr2.String(), + Members: members, + }) require.NoError(t, err) + groupID := groupRes.GroupId + groupID2 := groupRes2.GroupId policy := group.NewThresholdDecisionPolicy( "2", @@ -54,30 +61,58 @@ func TestEndBlockerPruning(t *testing.T) { policyRes, err := app.GroupKeeper.CreateGroupPolicy(ctx, policyReq) require.NoError(t, err) + policy2 := group.NewThresholdDecisionPolicy( + "1", + time.Second, + 0, + ) + + policyReq2 := &group.MsgCreateGroupPolicy{ + Admin: addr2.String(), + GroupId: groupID2, + } + + err = policyReq2.SetDecisionPolicy(policy2) + require.NoError(t, err) + policyRes2, err := app.GroupKeeper.CreateGroupPolicy(ctx, policyReq2) + require.NoError(t, err) + groupPolicyAddr, err := sdk.AccAddressFromBech32(policyRes.Address) require.NoError(t, err) require.NoError(t, testutil.FundAccount(app.BankKeeper, ctx, groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) + groupPolicyAddr2, err := sdk.AccAddressFromBech32(policyRes2.Address) + require.NoError(t, err) + require.NoError(t, testutil.FundAccount(app.BankKeeper, ctx, groupPolicyAddr2, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) + + votingPeriod := policy.GetVotingPeriod() + msgSend1 := &banktypes.MsgSend{ FromAddress: groupPolicyAddr.String(), ToAddress: addr2.String(), Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)}, } + msgSend2 := &banktypes.MsgSend{ + FromAddress: groupPolicyAddr2.String(), + ToAddress: addr2.String(), + Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)}, + } proposers := []string{addr2.String()} specs := map[string]struct { - srcBlockTime time.Time - setupProposal func(ctx context.Context) uint64 + setupProposal func(ctx sdk.Context) uint64 expErr bool expErrMsg string + newCtx sdk.Context expExecutorResult group.ProposalExecutorResult + expStatus group.ProposalStatus }{ "proposal pruned after executor result success": { - setupProposal: func(ctx context.Context) uint64 { + setupProposal: func(ctx sdk.Context) uint64 { msgs := []sdk.Msg{msgSend1} pID, err := submitProposalAndVote(app, ctx, msgs, proposers, groupPolicyAddr, group.VOTE_OPTION_YES) require.NoError(t, err) - _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Signer: addr3.String(), ProposalId: pID}) + _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Executor: addr3.String(), ProposalId: pID}) require.NoError(t, err) sdkCtx := sdk.UnwrapSDKContext(ctx) require.NoError(t, testutil.FundAccount(app.BankKeeper, sdkCtx, groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) @@ -85,14 +120,15 @@ func TestEndBlockerPruning(t *testing.T) { return pID }, expErrMsg: "load proposal: not found", + newCtx: ctx, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, }, "proposal with multiple messages pruned when executed with result success": { - setupProposal: func(ctx context.Context) uint64 { + setupProposal: func(ctx sdk.Context) uint64 { msgs := []sdk.Msg{msgSend1, msgSend1} pID, err := submitProposalAndVote(app, ctx, msgs, proposers, groupPolicyAddr, group.VOTE_OPTION_YES) require.NoError(t, err) - _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Signer: addr3.String(), ProposalId: pID}) + _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Executor: addr3.String(), ProposalId: pID}) require.NoError(t, err) sdkCtx := sdk.UnwrapSDKContext(ctx) require.NoError(t, testutil.FundAccount(app.BankKeeper, sdkCtx, groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) @@ -100,83 +136,172 @@ func TestEndBlockerPruning(t *testing.T) { return pID }, expErrMsg: "load proposal: not found", + newCtx: ctx, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, }, "proposal not pruned when not executed and rejected": { - setupProposal: func(ctx context.Context) uint64 { + setupProposal: func(ctx sdk.Context) uint64 { msgs := []sdk.Msg{msgSend1} pID, err := submitProposalAndVote(app, ctx, msgs, proposers, groupPolicyAddr, group.VOTE_OPTION_NO) require.NoError(t, err) - _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Signer: addr3.String(), ProposalId: pID}) + _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Executor: addr3.String(), ProposalId: pID}) require.NoError(t, err) sdkCtx := sdk.UnwrapSDKContext(ctx) require.NoError(t, testutil.FundAccount(app.BankKeeper, sdkCtx, groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) return pID }, + newCtx: ctx, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + expStatus: group.PROPOSAL_STATUS_REJECTED, }, "open proposal is not pruned which must not fail ": { - setupProposal: func(ctx context.Context) uint64 { + setupProposal: func(ctx sdk.Context) uint64 { pID, err := submitProposal(app, ctx, []sdk.Msg{msgSend1}, proposers, groupPolicyAddr) require.NoError(t, err) - _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Signer: addr3.String(), ProposalId: pID}) + _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Executor: addr3.String(), ProposalId: pID}) require.NoError(t, err) sdkCtx := sdk.UnwrapSDKContext(ctx) require.NoError(t, testutil.FundAccount(app.BankKeeper, sdkCtx, groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) return pID }, + newCtx: ctx, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, "proposal not pruned with group policy modified before tally": { - setupProposal: func(ctx context.Context) uint64 { + setupProposal: func(ctx sdk.Context) uint64 { pID, err := submitProposal(app, ctx, []sdk.Msg{msgSend1}, proposers, groupPolicyAddr) require.NoError(t, err) _, err = app.GroupKeeper.UpdateGroupPolicyMetadata(ctx, &group.MsgUpdateGroupPolicyMetadata{ - Admin: addr1.String(), - Address: groupPolicyAddr.String(), + Admin: addr1.String(), + GroupPolicyAddress: groupPolicyAddr.String(), }) require.NoError(t, err) - _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Signer: addr3.String(), ProposalId: pID}) - require.NoError(t, err) + _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Executor: addr3.String(), ProposalId: pID}) + require.Error(t, err) // since proposal with status Aborted cannot be executed sdkCtx := sdk.UnwrapSDKContext(ctx) require.NoError(t, testutil.FundAccount(app.BankKeeper, sdkCtx, groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) return pID }, + newCtx: ctx, expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + expStatus: group.PROPOSAL_STATUS_ABORTED, }, "pruned when proposal is executable when failed before": { - setupProposal: func(ctx context.Context) uint64 { + setupProposal: func(ctx sdk.Context) uint64 { msgs := []sdk.Msg{msgSend1} pID, err := submitProposalAndVote(app, ctx, msgs, proposers, groupPolicyAddr, group.VOTE_OPTION_YES) require.NoError(t, err) - _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Signer: addrs[2].String(), ProposalId: pID}) + _, err = app.GroupKeeper.Exec(ctx, &group.MsgExec{Executor: addrs[2].String(), ProposalId: pID}) require.NoError(t, err) return pID }, + newCtx: ctx, expErrMsg: "load proposal: not found", expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS, }, + "proposal with status withdrawn is pruned after voting period end": { + setupProposal: func(sdkCtx sdk.Context) uint64 { + pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend1}, proposers, groupPolicyAddr) + require.NoError(t, err) + _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ + ProposalId: pId, + Address: proposers[0], + }) + require.NoError(t, err) + return pId + }, + newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), + expErrMsg: "load proposal: not found", + expStatus: group.PROPOSAL_STATUS_WITHDRAWN, + }, + "proposal with status withdrawn is not pruned (before voting period)": { + setupProposal: func(sdkCtx sdk.Context) uint64 { + pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend1}, proposers, groupPolicyAddr) + require.NoError(t, err) + _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ + ProposalId: pId, + Address: proposers[0], + }) + require.NoError(t, err) + return pId + }, + newCtx: ctx, + expErrMsg: "", + expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + expStatus: group.PROPOSAL_STATUS_WITHDRAWN, + }, + "proposal with status aborted is pruned after voting period end (due to updated group policy decision policy)": { + setupProposal: func(sdkCtx sdk.Context) uint64 { + pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend2}, proposers, groupPolicyAddr2) + require.NoError(t, err) + + policy := group.NewThresholdDecisionPolicy("3", time.Second, 0) + msg := &group.MsgUpdateGroupPolicyDecisionPolicy{ + Admin: addrs[1].String(), + GroupPolicyAddress: groupPolicyAddr2.String(), + } + err = msg.SetDecisionPolicy(policy) + require.NoError(t, err) + _, err = app.GroupKeeper.UpdateGroupPolicyDecisionPolicy(ctx, msg) + require.NoError(t, err) + + return pId + }, + newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), + expErrMsg: "load proposal: not found", + expStatus: group.PROPOSAL_STATUS_ABORTED, + expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + }, + "proposal with status aborted is not pruned before voting period end (due to updated group policy)": { + setupProposal: func(sdkCtx sdk.Context) uint64 { + pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend2}, proposers, groupPolicyAddr2) + require.NoError(t, err) + + policy := group.NewThresholdDecisionPolicy("3", time.Second, 0) + msg := &group.MsgUpdateGroupPolicyDecisionPolicy{ + Admin: addrs[1].String(), + GroupPolicyAddress: groupPolicyAddr2.String(), + } + err = msg.SetDecisionPolicy(policy) + require.NoError(t, err) + _, err = app.GroupKeeper.UpdateGroupPolicyDecisionPolicy(ctx, msg) + require.NoError(t, err) + + return pId + }, + newCtx: ctx, + expErrMsg: "", + expStatus: group.PROPOSAL_STATUS_ABORTED, + expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, + }, } for msg, spec := range specs { spec := spec t.Run(msg, func(t *testing.T) { proposalID := spec.setupProposal(ctx) - module.EndBlocker(ctx, app.GroupKeeper) + module.EndBlocker(spec.newCtx, app.GroupKeeper) + if spec.expErrMsg != "" && spec.expExecutorResult != group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { + _, err = app.GroupKeeper.Proposal(spec.newCtx, &group.QueryProposalRequest{ProposalId: proposalID}) + require.Error(t, err) + require.Contains(t, err.Error(), spec.expErrMsg) + return + } if spec.expExecutorResult == group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { // Make sure proposal is deleted from state - _, err = app.GroupKeeper.Proposal(ctx, &group.QueryProposalRequest{ProposalId: proposalID}) + _, err = app.GroupKeeper.Proposal(spec.newCtx, &group.QueryProposalRequest{ProposalId: proposalID}) require.Contains(t, err.Error(), spec.expErrMsg) res, err := app.GroupKeeper.VotesByProposal(ctx, &group.QueryVotesByProposalRequest{ProposalId: proposalID}) require.NoError(t, err) require.Empty(t, res.GetVotes()) } else { // Check that proposal and votes exists - res, err := app.GroupKeeper.Proposal(ctx, &group.QueryProposalRequest{ProposalId: proposalID}) + res, err := app.GroupKeeper.Proposal(spec.newCtx, &group.QueryProposalRequest{ProposalId: proposalID}) require.NoError(t, err) _, err = app.GroupKeeper.VotesByProposal(ctx, &group.QueryVotesByProposalRequest{ProposalId: res.Proposal.Id}) require.NoError(t, err) @@ -185,20 +310,21 @@ func TestEndBlockerPruning(t *testing.T) { exp := group.ProposalExecutorResult_name[int32(spec.expExecutorResult)] got := group.ProposalExecutorResult_name[int32(res.Proposal.ExecutorResult)] assert.Equal(t, exp, got) + + require.Equal(t, res.GetProposal().Status, spec.expStatus) } }) } - } -func TestEndBlocker(t *testing.T) { +func TestEndBlockerTallying(t *testing.T) { app := simapp.Setup(t, false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) addrs := simapp.AddTestAddrsIncremental(app, ctx, 4, sdk.NewInt(30000000)) // Initial group, group policy and balance setup - members := []group.Member{ + members := []group.MemberRequest{ {Address: addrs[1].String(), Weight: "1"}, {Address: addrs[2].String(), Weight: "2"}, } @@ -240,26 +366,23 @@ func TestEndBlocker(t *testing.T) { proposers := []string{addrs[2].String()} specs := map[string]struct { - preRun func(sdkCtx sdk.Context) uint64 - proposalId uint64 - admin string - expErrMsg string - newCtx sdk.Context - tallyRes group.TallyResult - expStatus group.ProposalStatus - expExecutorResult group.ProposalResult + preRun func(sdkCtx sdk.Context) uint64 + admin string + expErrMsg string + newCtx sdk.Context + tallyRes group.TallyResult + expStatus group.ProposalStatus }{ - "tally updated after voting power end": { + "tally updated after voting period end": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr) require.NoError(t, err) return pId }, - admin: proposers[0], - newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_REJECTED, }, "tally within voting period": { preRun: func(sdkCtx sdk.Context) uint64 { @@ -268,11 +391,10 @@ func TestEndBlocker(t *testing.T) { return pId }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, "tally within voting period(with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { @@ -281,11 +403,28 @@ func TestEndBlocker(t *testing.T) { return pId }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_SUBMITTED, + }, + "tally after voting period (not passing)": { + preRun: func(sdkCtx sdk.Context) uint64 { + // `addrs[1]` has weight 1 + pId, err := submitProposalAndVote(app, ctx, []sdk.Msg{msgSend}, []string{addrs[1].String()}, groupPolicyAddr, group.VOTE_OPTION_YES) + require.NoError(t, err) + + return pId + }, + admin: proposers[0], + newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), + tallyRes: group.TallyResult{ + YesCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + AbstainCount: "0", + }, + expStatus: group.PROPOSAL_STATUS_REJECTED, }, "tally after voting period(with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { @@ -302,46 +441,43 @@ func TestEndBlocker(t *testing.T) { NoWithVetoCount: "0", AbstainCount: "0", }, - expStatus: group.PROPOSAL_STATUS_CLOSED, - expExecutorResult: group.PROPOSAL_RESULT_ACCEPTED, + expStatus: group.PROPOSAL_STATUS_ACCEPTED, }, - "tally of closed proposal": { + "tally of withdrawn proposal": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr) require.NoError(t, err) _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicyAddr.String(), + Address: proposers[0], }) require.NoError(t, err) return pId }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_WITHDRAWN, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_WITHDRAWN, }, - "tally of closed proposal (with votes)": { + "tally of withdrawn proposal (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposalAndVote(app, ctx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr, group.VOTE_OPTION_YES) require.NoError(t, err) _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicyAddr.String(), + Address: proposers[0], }) require.NoError(t, err) return pId }, - admin: proposers[0], - newCtx: ctx, - tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_WITHDRAWN, - expExecutorResult: group.PROPOSAL_RESULT_UNFINALIZED, + admin: proposers[0], + newCtx: ctx, + tallyRes: group.DefaultTallyResult(), + expStatus: group.PROPOSAL_STATUS_WITHDRAWN, }, } @@ -364,17 +500,14 @@ func TestEndBlocker(t *testing.T) { require.NoError(t, err) require.Equal(t, resp.GetProposal().FinalTallyResult, spec.tallyRes) require.Equal(t, resp.GetProposal().Status, spec.expStatus) - require.Equal(t, resp.GetProposal().Result, spec.expExecutorResult) }) } } -func submitProposal( - app *simapp.SimApp, ctx context.Context, msgs []sdk.Msg, - proposers []string, groupPolicyAddr sdk.AccAddress) (uint64, error) { +func submitProposal(app *simapp.SimApp, ctx context.Context, msgs []sdk.Msg, proposers []string, groupPolicyAddr sdk.AccAddress) (uint64, error) { proposalReq := &group.MsgSubmitProposal{ - Address: groupPolicyAddr.String(), - Proposers: proposers, + GroupPolicyAddress: groupPolicyAddr.String(), + Proposers: proposers, } err := proposalReq.SetMsgs(msgs) if err != nil { @@ -391,7 +524,8 @@ func submitProposal( func submitProposalAndVote( app *simapp.SimApp, ctx context.Context, msgs []sdk.Msg, - proposers []string, groupPolicyAddr sdk.AccAddress, voteOption group.VoteOption) (uint64, error) { + proposers []string, groupPolicyAddr sdk.AccAddress, voteOption group.VoteOption, +) (uint64, error) { myProposalID, err := submitProposal(app, ctx, msgs, proposers, groupPolicyAddr) if err != nil { return 0, err diff --git a/x/group/module/module.go b/x/group/module/module.go index 086728422ed4..800292789a31 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -97,10 +96,6 @@ func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // RegisterLegacyAminoCodec registers the group module's types for the given codec. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} -// RegisterRESTRoutes registers the REST routes for the group module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(_ sdkclient.Context, _ *mux.Router) {} - // Name returns the group module's name. func (AppModule) Name() string { return group.ModuleName @@ -152,8 +147,6 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} - // EndBlock implements the group module's EndBlock. func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { EndBlocker(ctx, am.keeper) diff --git a/x/group/msgs.go b/x/group/msgs.go index d8a0b16c4f9b..639bcda1de37 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -1,8 +1,6 @@ package group import ( - "fmt" - proto "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" @@ -28,10 +26,8 @@ func (m MsgCreateGroup) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgCreateGroup. func (m MsgCreateGroup) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -42,19 +38,15 @@ func (m MsgCreateGroup) ValidateBasic() error { return sdkerrors.Wrap(err, "admin") } - return m.validateMembers() + return strictValidateMembers(m.Members) } -func (m MsgCreateGroup) validateMembers() error { - - err := validateMembers(m.Members) - if err != nil { - return err - } - return nil -} - -func (m Member) ValidateBasic() error { +// ValidateBasic performs stateless validation on a group member, such as +// making sure the address is well-formed, and the weight is non-negative. +// Note: in state, a member's weight MUST be positive. However, in some Msgs, +// it's possible to set a zero member weight, for example in +// MsgUpdateGroupMembers to denote that we're removing a member. +func (m MemberRequest) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.Address) if err != nil { return sdkerrors.Wrap(err, "address") @@ -84,10 +76,8 @@ func (m MsgUpdateGroupAdmin) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgUpdateGroupAdmin. func (m MsgUpdateGroupAdmin) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -134,10 +124,8 @@ func (m MsgUpdateGroupMetadata) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgUpdateGroupMetadata. func (m MsgUpdateGroupMetadata) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -145,7 +133,6 @@ func (m MsgUpdateGroupMetadata) GetSigners() []sdk.AccAddress { func (m MsgUpdateGroupMetadata) ValidateBasic() error { if m.GroupId == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "group id") - } _, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { @@ -178,10 +165,8 @@ var _ sdk.Msg = &MsgUpdateGroupMembers{} // GetSigners returns the expected signers for a MsgUpdateGroupMembers. func (m MsgUpdateGroupMembers) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -189,7 +174,6 @@ func (m MsgUpdateGroupMembers) GetSigners() []sdk.AccAddress { func (m MsgUpdateGroupMembers) ValidateBasic() error { if m.GroupId == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "group id") - } _, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { @@ -199,7 +183,7 @@ func (m MsgUpdateGroupMembers) ValidateBasic() error { if len(m.MemberUpdates) == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "member updates") } - members := Members{Members: m.MemberUpdates} + members := MemberRequests{Members: m.MemberUpdates} if err := members.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "members") } @@ -210,16 +194,18 @@ func (m *MsgUpdateGroupMembers) GetGroupID() uint64 { return m.GroupId } -var _ sdk.Msg = &MsgCreateGroupWithPolicy{} -var _ types.UnpackInterfacesMessage = MsgCreateGroupWithPolicy{} +var ( + _ sdk.Msg = &MsgCreateGroupWithPolicy{} + _ types.UnpackInterfacesMessage = MsgCreateGroupWithPolicy{} +) // NewMsgCreateGroupWithPolicy creates a new MsgCreateGroupWithPolicy. -func NewMsgCreateGroupWithPolicy(admin string, members []Member, group_metadata string, group_policy_metadata string, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error) { +func NewMsgCreateGroupWithPolicy(admin string, members []MemberRequest, groupMetadata string, groupPolicyMetadata string, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error) { m := &MsgCreateGroupWithPolicy{ Admin: admin, Members: members, - GroupMetadata: group_metadata, - GroupPolicyMetadata: group_policy_metadata, + GroupMetadata: groupMetadata, + GroupPolicyMetadata: groupPolicyMetadata, GroupPolicyAsAdmin: groupPolicyAsAdmin, } err := m.SetDecisionPolicy(decisionPolicy) @@ -229,20 +215,16 @@ func NewMsgCreateGroupWithPolicy(admin string, members []Member, group_metadata return m, nil } -func (m *MsgCreateGroupWithPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgCreateGroupWithPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), m.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + return decisionPolicy, nil } func (m *MsgCreateGroupWithPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { - msg, ok := decisionPolicy.(proto.Message) - if !ok { - return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) + any, err := types.NewAnyWithValue(decisionPolicy) if err != nil { return err } @@ -273,10 +255,7 @@ func (m MsgCreateGroupWithPolicy) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgCreateGroupWithPolicy. func (m MsgCreateGroupWithPolicy) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) return []sdk.AccAddress{admin} } @@ -286,24 +265,15 @@ func (m MsgCreateGroupWithPolicy) ValidateBasic() error { if err != nil { return sdkerrors.Wrap(err, "admin") } - policy := m.GetDecisionPolicy() - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + policy, err := m.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "decision policy") } if err := policy.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "decision policy") } - return m.validateMembers() -} - -func (m MsgCreateGroupWithPolicy) validateMembers() error { - - err := validateMembers(m.Members) - if err != nil { - return err - } - return nil + return strictValidateMembers(m.Members) } var _ sdk.Msg = &MsgCreateGroupPolicy{} @@ -340,9 +310,9 @@ func (m MsgCreateGroupPolicy) ValidateBasic() error { return sdkerrors.Wrap(errors.ErrEmpty, "group id") } - policy := m.GetDecisionPolicy() - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + policy, err := m.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "decision policy") } if err := policy.ValidateBasic(); err != nil { @@ -368,10 +338,8 @@ func (m MsgUpdateGroupPolicyAdmin) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgUpdateGroupPolicyAdmin. func (m MsgUpdateGroupPolicyAdmin) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -387,7 +355,7 @@ func (m MsgUpdateGroupPolicyAdmin) ValidateBasic() error { return sdkerrors.Wrap(err, "new admin") } - _, err = sdk.AccAddressFromBech32(m.Address) + _, err = sdk.AccAddressFromBech32(m.GroupPolicyAddress) if err != nil { return sdkerrors.Wrap(err, "group policy") } @@ -398,13 +366,16 @@ func (m MsgUpdateGroupPolicyAdmin) ValidateBasic() error { return nil } -var _ sdk.Msg = &MsgUpdateGroupPolicyDecisionPolicy{} -var _ types.UnpackInterfacesMessage = MsgUpdateGroupPolicyDecisionPolicy{} +var ( + _ sdk.Msg = &MsgUpdateGroupPolicyDecisionPolicy{} + _ types.UnpackInterfacesMessage = MsgUpdateGroupPolicyDecisionPolicy{} +) -func NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error) { +// NewMsgUpdateGroupPolicyDecisionPolicy creates a new MsgUpdateGroupPolicyDecisionPolicy. +func NewMsgUpdateGroupPolicyDecisionPolicy(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error) { m := &MsgUpdateGroupPolicyDecisionPolicy{ - Admin: admin.String(), - Address: address.String(), + Admin: admin.String(), + GroupPolicyAddress: address.String(), } err := m.SetDecisionPolicy(decisionPolicy) if err != nil { @@ -443,10 +414,8 @@ func (m MsgUpdateGroupPolicyDecisionPolicy) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgUpdateGroupPolicyDecisionPolicy. func (m MsgUpdateGroupPolicyDecisionPolicy) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -457,14 +426,14 @@ func (m MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic() error { return sdkerrors.Wrap(err, "admin") } - _, err = sdk.AccAddressFromBech32(m.Address) + _, err = sdk.AccAddressFromBech32(m.GroupPolicyAddress) if err != nil { return sdkerrors.Wrap(err, "group policy") } - policy := m.GetDecisionPolicy() - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + policy, err := m.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "decision policy") } if err := policy.ValidateBasic(); err != nil { @@ -474,12 +443,13 @@ func (m MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic() error { return nil } -func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), m.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + + return decisionPolicy, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -505,10 +475,8 @@ func (m MsgUpdateGroupPolicyMetadata) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgUpdateGroupPolicyMetadata. func (m MsgUpdateGroupPolicyMetadata) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Admin) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Admin) + return []sdk.AccAddress{admin} } @@ -519,7 +487,7 @@ func (m MsgUpdateGroupPolicyMetadata) ValidateBasic() error { return sdkerrors.Wrap(err, "admin") } - _, err = sdk.AccAddressFromBech32(m.Address) + _, err = sdk.AccAddressFromBech32(m.GroupPolicyAddress) if err != nil { return sdkerrors.Wrap(err, "group policy") } @@ -527,8 +495,10 @@ func (m MsgUpdateGroupPolicyMetadata) ValidateBasic() error { return nil } -var _ sdk.Msg = &MsgCreateGroupPolicy{} -var _ types.UnpackInterfacesMessage = MsgCreateGroupPolicy{} +var ( + _ sdk.Msg = &MsgCreateGroupPolicy{} + _ types.UnpackInterfacesMessage = MsgCreateGroupPolicy{} +) // NewMsgCreateGroupPolicy creates a new MsgCreateGroupPolicy. func NewMsgCreateGroupPolicy(admin sdk.AccAddress, group uint64, metadata string, decisionPolicy DecisionPolicy) (*MsgCreateGroupPolicy, error) { @@ -556,20 +526,16 @@ func (m *MsgCreateGroupPolicy) GetMetadata() string { return m.Metadata } -func (m *MsgCreateGroupPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgCreateGroupPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), m.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + return decisionPolicy, nil } func (m *MsgCreateGroupPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { - msg, ok := decisionPolicy.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) + any, err := types.NewAnyWithValue(decisionPolicy) if err != nil { return err } @@ -585,13 +551,13 @@ func (m MsgCreateGroupPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error var _ sdk.Msg = &MsgSubmitProposal{} -// NewMsgSubmitProposalRequest creates a new MsgSubmitProposal. -func NewMsgSubmitProposalRequest(address string, proposers []string, msgs []sdk.Msg, metadata string, exec Exec) (*MsgSubmitProposal, error) { +// NewMsgSubmitProposal creates a new MsgSubmitProposal. +func NewMsgSubmitProposal(address string, proposers []string, msgs []sdk.Msg, metadata string, exec Exec) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ - Address: address, - Proposers: proposers, - Metadata: metadata, - Exec: exec, + GroupPolicyAddress: address, + Proposers: proposers, + Metadata: metadata, + Exec: exec, } err := m.SetMsgs(msgs) if err != nil { @@ -615,20 +581,19 @@ func (m MsgSubmitProposal) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgSubmitProposal. func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - addrs := make([]sdk.AccAddress, len(m.Proposers)) - for i, proposer := range m.Proposers { - addr, err := sdk.AccAddressFromBech32(proposer) - if err != nil { - panic(err) - } - addrs[i] = addr + addrs, err := m.getProposerAccAddresses() + if err != nil { + panic(err) } + return addrs } -// ValidateBasic does a sanity check on the provided data +// ValidateBasic does a sanity check on the provided proposal, such as +// verifying proposer addresses, and performing ValidateBasic on each +// individual `sdk.Msg`. func (m MsgSubmitProposal) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(m.Address) + _, err := sdk.AccAddressFromBech32(m.GroupPolicyAddress) if err != nil { return sdkerrors.Wrap(err, "group policy") } @@ -636,19 +601,21 @@ func (m MsgSubmitProposal) ValidateBasic() error { if len(m.Proposers) == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "proposers") } - addrs := make([]sdk.AccAddress, len(m.Proposers)) - for i, proposer := range m.Proposers { - addr, err := sdk.AccAddressFromBech32(proposer) - if err != nil { - return sdkerrors.Wrap(err, "proposers") - } - addrs[i] = addr + + addrs, err := m.getProposerAccAddresses() + if err != nil { + return sdkerrors.Wrap(err, "group proposers") } - if err := AccAddresses(addrs).ValidateBasic(); err != nil { + + if err := accAddresses(addrs).ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "proposers") } - msgs := m.GetMsgs() + msgs, err := m.GetMsgs() + if err != nil { + return err + } + for i, msg := range msgs { if err := msg.ValidateBasic(); err != nil { return sdkerrors.Wrapf(err, "msg %d", i) @@ -657,6 +624,20 @@ func (m MsgSubmitProposal) ValidateBasic() error { return nil } +// getProposerAccAddresses returns the proposers as `[]sdk.AccAddress`. +func (m *MsgSubmitProposal) getProposerAccAddresses() ([]sdk.AccAddress, error) { + addrs := make([]sdk.AccAddress, len(m.Proposers)) + for i, proposer := range m.Proposers { + addr, err := sdk.AccAddressFromBech32(proposer) + if err != nil { + return nil, sdkerrors.Wrap(err, "proposers") + } + addrs[i] = addr + } + + return addrs, nil +} + // SetMsgs packs msgs into Any's func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { anys, err := tx.SetMsgs(msgs) @@ -668,12 +649,8 @@ func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { } // GetMsgs unpacks m.Messages Any's into sdk.Msg's -func (m MsgSubmitProposal) GetMsgs() []sdk.Msg { - msgs, err := tx.GetMsgs(m.Messages, "proposal") - if err != nil { - panic(err) - } - return msgs +func (m MsgSubmitProposal) GetMsgs() ([]sdk.Msg, error) { + return tx.GetMsgs(m.Messages, "proposal") } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -696,10 +673,8 @@ func (m MsgWithdrawProposal) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgWithdrawProposal. func (m MsgWithdrawProposal) GetSigners() []sdk.AccAddress { - admin, err := sdk.AccAddressFromBech32(m.Address) - if err != nil { - panic(err) - } + admin := sdk.MustAccAddressFromBech32(m.Address) + return []sdk.AccAddress{admin} } @@ -734,10 +709,8 @@ func (m MsgVote) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgVote. func (m MsgVote) GetSigners() []sdk.AccAddress { - addr, err := sdk.AccAddressFromBech32(m.Voter) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(m.Voter) + return []sdk.AccAddress{addr} } @@ -776,16 +749,14 @@ func (m MsgExec) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgExec. func (m MsgExec) GetSigners() []sdk.AccAddress { - signer, err := sdk.AccAddressFromBech32(m.Signer) - if err != nil { - panic(err) - } + signer := sdk.MustAccAddressFromBech32(m.Executor) + return []sdk.AccAddress{signer} } // ValidateBasic does a sanity check on the provided data func (m MsgExec) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(m.Signer) + _, err := sdk.AccAddressFromBech32(m.Executor) if err != nil { return sdkerrors.Wrap(err, "signer") } @@ -812,10 +783,8 @@ func (m MsgLeaveGroup) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgLeaveGroup func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress { - signer, err := sdk.AccAddressFromBech32(m.Address) - if err != nil { - panic(err) - } + signer := sdk.MustAccAddressFromBech32(m.Address) + return []sdk.AccAddress{signer} } @@ -832,24 +801,19 @@ func (m MsgLeaveGroup) ValidateBasic() error { return nil } -func validateMembers(members []Member) error { - index := make(map[string]struct{}, len(members)) - for i := range members { - member := members[i] - _, err := sdk.AccAddressFromBech32(member.Address) - if err != nil { - return sdkerrors.Wrap(err, "address") - } +// strictValidateMembers performs ValidateBasic on Members, but also checks +// that all members weights are positive (whereas `Members{members}.ValidateBasic()` +// only checks that they are non-negative. +func strictValidateMembers(members []MemberRequest) error { + err := MemberRequests{members}.ValidateBasic() + if err != nil { + return err + } - if _, err := math.NewPositiveDecFromString(member.Weight); err != nil { + for _, m := range members { + if _, err := math.NewPositiveDecFromString(m.Weight); err != nil { return sdkerrors.Wrap(err, "weight") } - - addr := member.Address - if _, exists := index[addr]; exists { - return sdkerrors.Wrapf(errors.ErrDuplicate, "address: %s", addr) - } - index[addr] = struct{}{} } return nil diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 190a7750bb72..5242f6ca79b9 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -38,7 +38,7 @@ func TestMsgCreateGroup(t *testing.T) { "invalid member address", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: "invalid address", }, @@ -51,7 +51,7 @@ func TestMsgCreateGroup(t *testing.T) { "negitive member's weight not allowed", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: member1.String(), Weight: "-1", @@ -59,13 +59,13 @@ func TestMsgCreateGroup(t *testing.T) { }, }, true, - "expected a positive decimal", + "expected a non-negative decimal", }, { "zero member's weight not allowed", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: member1.String(), Weight: "0", @@ -79,7 +79,7 @@ func TestMsgCreateGroup(t *testing.T) { "duplicate member not allowed", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -99,7 +99,7 @@ func TestMsgCreateGroup(t *testing.T) { "valid test case with single member", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -114,7 +114,7 @@ func TestMsgCreateGroup(t *testing.T) { "minimum fields", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{}, + Members: []group.MemberRequest{}, }, false, "", @@ -123,7 +123,7 @@ func TestMsgCreateGroup(t *testing.T) { "valid test case with multiple members", &group.MsgCreateGroup{ Admin: admin.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -303,7 +303,7 @@ func TestMsgUpdateGroupMembers(t *testing.T) { &group.MsgUpdateGroupMembers{ GroupId: 1, Admin: admin.String(), - MemberUpdates: []group.Member{}, + MemberUpdates: []group.MemberRequest{}, }, true, "member updates: value is empty", @@ -313,7 +313,7 @@ func TestMsgUpdateGroupMembers(t *testing.T) { &group.MsgUpdateGroupMembers{ GroupId: 1, Admin: admin.String(), - MemberUpdates: []group.Member{ + MemberUpdates: []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -329,7 +329,7 @@ func TestMsgUpdateGroupMembers(t *testing.T) { &group.MsgUpdateGroupMembers{ GroupId: 1, Admin: admin.String(), - MemberUpdates: []group.Member{ + MemberUpdates: []group.MemberRequest{ { Address: member1.String(), Weight: "0", @@ -368,7 +368,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { func() *group.MsgCreateGroupWithPolicy { admin := "admin" policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -386,7 +386,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { "invalid member address", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: "invalid_address", Weight: "1", @@ -404,7 +404,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { "negative member's weight not allowed", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "-1", @@ -416,13 +416,13 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { return req }, true, - "expected a positive decimal", + "expected a non-negative decimal", }, { "zero member's weight not allowed", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "0", @@ -440,7 +440,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { "duplicate member not allowed", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -463,7 +463,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { "invalid threshold policy", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("-1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -481,7 +481,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { "valid test case with single member", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -499,7 +499,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { "valid test case with multiple members", func() *group.MsgCreateGroupWithPolicy { policy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - members := []group.Member{ + members := []group.MemberRequest{ { Address: member1.String(), Weight: "1", @@ -692,23 +692,23 @@ func TestMsgCreateGroupPolicy(t *testing.T) { func TestMsgUpdateGroupPolicyDecisionPolicy(t *testing.T) { validPolicy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - msg1, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member1, validPolicy) + msg1, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member1, validPolicy) require.NoError(t, err) invalidPolicy := group.NewThresholdDecisionPolicy("-1", time.Second, 0) - msg2, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member2, invalidPolicy) + msg2, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member2, invalidPolicy) require.NoError(t, err) validPercentagePolicy := group.NewPercentageDecisionPolicy("0.7", time.Second, 0) - msg3, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member3, validPercentagePolicy) + msg3, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member3, validPercentagePolicy) require.NoError(t, err) invalidPercentagePolicy := group.NewPercentageDecisionPolicy("-0.1", time.Second, 0) - msg4, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member4, invalidPercentagePolicy) + msg4, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member4, invalidPercentagePolicy) require.NoError(t, err) invalidPercentagePolicy2 := group.NewPercentageDecisionPolicy("2", time.Second, 0) - msg5, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member5, invalidPercentagePolicy2) + msg5, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member5, invalidPercentagePolicy2) require.NoError(t, err) testCases := []struct { @@ -728,8 +728,8 @@ func TestMsgUpdateGroupPolicyDecisionPolicy(t *testing.T) { { "group policy: invalid bech32 address", &group.MsgUpdateGroupPolicyDecisionPolicy{ - Admin: admin.String(), - Address: "address", + Admin: admin.String(), + GroupPolicyAddress: "address", }, true, "group policy: decoding bech32 failed", @@ -737,8 +737,8 @@ func TestMsgUpdateGroupPolicyDecisionPolicy(t *testing.T) { { "group policy: invalid bech32 address", &group.MsgUpdateGroupPolicyDecisionPolicy{ - Admin: admin.String(), - Address: "address", + Admin: admin.String(), + GroupPolicyAddress: "address", }, true, "group policy: decoding bech32 failed", @@ -808,9 +808,9 @@ func TestMsgUpdateGroupPolicyAdmin(t *testing.T) { { "policy address: invalid bech32 address", &group.MsgUpdateGroupPolicyAdmin{ - Admin: admin.String(), - NewAdmin: member1.String(), - Address: "address", + Admin: admin.String(), + NewAdmin: member1.String(), + GroupPolicyAddress: "address", }, true, "group policy: decoding bech32 failed", @@ -818,9 +818,9 @@ func TestMsgUpdateGroupPolicyAdmin(t *testing.T) { { "new admin: invalid bech32 address", &group.MsgUpdateGroupPolicyAdmin{ - Admin: admin.String(), - Address: admin.String(), - NewAdmin: "new-admin", + Admin: admin.String(), + GroupPolicyAddress: admin.String(), + NewAdmin: "new-admin", }, true, "new admin: decoding bech32 failed", @@ -828,9 +828,9 @@ func TestMsgUpdateGroupPolicyAdmin(t *testing.T) { { "same old and new admin", &group.MsgUpdateGroupPolicyAdmin{ - Admin: admin.String(), - Address: admin.String(), - NewAdmin: admin.String(), + Admin: admin.String(), + GroupPolicyAddress: admin.String(), + NewAdmin: admin.String(), }, true, "new and old admin are same", @@ -838,9 +838,9 @@ func TestMsgUpdateGroupPolicyAdmin(t *testing.T) { { "valid test", &group.MsgUpdateGroupPolicyAdmin{ - Admin: admin.String(), - Address: admin.String(), - NewAdmin: member1.String(), + Admin: admin.String(), + GroupPolicyAddress: admin.String(), + NewAdmin: member1.String(), }, false, "", @@ -880,8 +880,8 @@ func TestMsgUpdateGroupPolicyMetadata(t *testing.T) { { "group policy address: invalid bech32 address", &group.MsgUpdateGroupPolicyMetadata{ - Admin: admin.String(), - Address: "address", + Admin: admin.String(), + GroupPolicyAddress: "address", }, true, "group policy: decoding bech32 failed", @@ -889,9 +889,9 @@ func TestMsgUpdateGroupPolicyMetadata(t *testing.T) { { "valid testcase", &group.MsgUpdateGroupPolicyMetadata{ - Admin: admin.String(), - Address: member1.String(), - Metadata: "metadata", + Admin: admin.String(), + GroupPolicyAddress: member1.String(), + Metadata: "metadata", }, false, "", @@ -923,7 +923,7 @@ func TestMsgSubmitProposal(t *testing.T) { { "invalid group policy address", &group.MsgSubmitProposal{ - Address: "address", + GroupPolicyAddress: "address", }, true, "group policy: decoding bech32 failed", @@ -931,7 +931,7 @@ func TestMsgSubmitProposal(t *testing.T) { { "proposers required", &group.MsgSubmitProposal{ - Address: admin.String(), + GroupPolicyAddress: admin.String(), }, true, "proposers: value is empty", @@ -939,8 +939,8 @@ func TestMsgSubmitProposal(t *testing.T) { { "valid testcase", &group.MsgSubmitProposal{ - Address: admin.String(), - Proposers: []string{member1.String(), member2.String()}, + GroupPolicyAddress: admin.String(), + Proposers: []string{member1.String(), member2.String()}, }, false, "", @@ -1080,7 +1080,7 @@ func TestMsgExec(t *testing.T) { { "invalid signer address", &group.MsgExec{ - Signer: "signer", + Executor: "signer", }, true, "signer: decoding bech32 failed", @@ -1088,7 +1088,7 @@ func TestMsgExec(t *testing.T) { { "proposal is required", &group.MsgExec{ - Signer: admin.String(), + Executor: admin.String(), }, true, "proposal id: value is empty", @@ -1096,7 +1096,7 @@ func TestMsgExec(t *testing.T) { { "valid testcase", &group.MsgExec{ - Signer: admin.String(), + Executor: admin.String(), ProposalId: 1, }, false, @@ -1145,7 +1145,7 @@ func TestMsgLeaveGroup(t *testing.T) { "valid testcase", &group.MsgLeaveGroup{ Address: admin.String(), - GroupId: 1, + GroupId: 1, }, false, "", diff --git a/x/group/proposal.go b/x/group/proposal.go index 9764a1da908c..3b3870af2829 100644 --- a/x/group/proposal.go +++ b/x/group/proposal.go @@ -6,12 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx" ) -func (p *Proposal) GetMsgs() []sdk.Msg { - msgs, err := tx.GetMsgs(p.Messages, "proposal") - if err != nil { - panic(err) - } - return msgs +func (p *Proposal) GetMsgs() ([]sdk.Msg, error) { + return tx.GetMsgs(p.Messages, "proposal") } func (p *Proposal) SetMsgs(msgs []sdk.Msg) error { diff --git a/x/group/query.pb.go b/x/group/query.pb.go index e274b18585c9..47cfd7fccd98 100644 --- a/x/group/query.pb.go +++ b/x/group/query.pb.go @@ -1530,7 +1530,11 @@ type QueryClient interface { VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error) // GroupsByMember queries groups by member address. GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error) - // TallyResult queries the tally of a proposal votes. + // TallyResult returns the tally result of a proposal. If the proposal is + // still in voting period, then this query computes the current tally state, + // which might not be final. On the other hand, if the proposal is final, + // then it simply returns the `final_tally_result` state stored in the + // proposal itself. TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) } @@ -1685,7 +1689,11 @@ type QueryServer interface { VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) // GroupsByMember queries groups by member address. GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error) - // TallyResult queries the tally of a proposal votes. + // TallyResult returns the tally result of a proposal. If the proposal is + // still in voting period, then this query computes the current tally state, + // which might not be final. On the other hand, if the proposal is final, + // then it simply returns the `final_tally_result` state stored in the + // proposal itself. TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) } diff --git a/x/group/simulation/genesis.go b/x/group/simulation/genesis.go index afd283a06832..7f30a4fc7303 100644 --- a/x/group/simulation/genesis.go +++ b/x/group/simulation/genesis.go @@ -86,11 +86,10 @@ func getProposals(r *rand.Rand, simState *module.SimulationState, groupPolicies proposal := &group.Proposal{ Id: uint64(i + 1), Proposers: proposers, - Address: groupPolicyAddress, + GroupPolicyAddress: groupPolicyAddress, GroupVersion: uint64(i + 1), GroupPolicyVersion: uint64(i + 1), Status: group.PROPOSAL_STATUS_SUBMITTED, - Result: group.PROPOSAL_RESULT_ACCEPTED, FinalTallyResult: group.TallyResult{ YesCount: "1", NoCount: "1", @@ -148,7 +147,6 @@ func getVoteOption(index int) group.VoteOption { // RandomizedGenState generates a random GenesisState for the group module. func RandomizedGenState(simState *module.SimulationState) { - // groups var groups []*group.GroupInfo simState.AppParams.GetOrGenerate( diff --git a/x/group/simulation/genesis_test.go b/x/group/simulation/genesis_test.go index cf7b1cda6733..f87a5eb18f13 100644 --- a/x/group/simulation/genesis_test.go +++ b/x/group/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -26,7 +27,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } @@ -42,5 +43,4 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, int(groupGenesis.ProposalSeq), len(simState.Accounts)) require.Len(t, groupGenesis.Proposals, len(simState.Accounts)) require.Len(t, groupGenesis.Votes, len(simState.Accounts)) - } diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 4bcdcc67ad68..36875b55cc8b 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -81,7 +81,8 @@ const ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper, appCdc cdctypes.AnyUnpacker) simulation.WeightedOperations { + bk group.BankKeeper, k keeper.Keeper, appCdc cdctypes.AnyUnpacker, +) simulation.WeightedOperations { var ( weightMsgCreateGroup int weightMsgUpdateGroupAdmin int @@ -243,7 +244,8 @@ func WeightedOperations( // SimulateMsgCreateGroup generates a MsgCreateGroup with random values func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { acc, _ := simtypes.RandomAcc(r, accounts) account := ak.GetAccount(ctx, acc.Address) accAddr := acc.Address.String() @@ -258,7 +260,8 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype msg := &group.MsgCreateGroup{Admin: accAddr, Members: members, Metadata: simtypes.RandStringOfLength(r, 10)} txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -284,7 +287,8 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype // SimulateMsgCreateGroupWithPolicy generates a MsgCreateGroupWithPolicy with random values func SimulateMsgCreateGroupWithPolicy(ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { acc, _ := simtypes.RandomAcc(r, accounts) account := ak.GetAccount(ctx, acc.Address) accAddr := acc.Address.String() @@ -316,7 +320,8 @@ func SimulateMsgCreateGroupWithPolicy(ak group.AccountKeeper, bk group.BankKeepe } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -342,7 +347,8 @@ func SimulateMsgCreateGroupWithPolicy(ak group.AccountKeeper, bk group.BankKeepe // SimulateMsgCreateGroupPolicy generates a NewMsgCreateGroupPolicy with random values func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { groupInfo, acc, account, err := randomGroup(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgCreateGroupPolicy, ""), nil, err @@ -374,7 +380,8 @@ func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -401,7 +408,8 @@ func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k // SimulateMsgSubmitProposal generates a NewMsgSubmitProposal with random values func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { g, groupPolicy, _, _, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgSubmitProposal, ""), nil, err @@ -416,7 +424,10 @@ func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k ke groupPolicyAddr := groupPolicy.Address // Return a no-op if we know the proposal cannot be created - policy := groupPolicy.GetDecisionPolicy() + policy, err := groupPolicy.GetDecisionPolicy() + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgSubmitProposal, ""), nil, nil + } err = policy.Validate(*g, group.DefaultConfig()) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgSubmitProposal, ""), nil, nil @@ -439,13 +450,14 @@ func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k ke } msg := group.MsgSubmitProposal{ - Address: groupPolicyAddr, - Proposers: []string{acc.Address.String()}, - Metadata: simtypes.RandStringOfLength(r, 10), + GroupPolicyAddress: groupPolicyAddr, + Proposers: []string{acc.Address.String()}, + Metadata: simtypes.RandStringOfLength(r, 10), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -471,7 +483,8 @@ func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k ke // SimulateMsgUpdateGroupAdmin generates a MsgUpdateGroupAdmin with random values func SimulateMsgUpdateGroupAdmin(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { groupInfo, acc, account, err := randomGroup(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupAdmin, ""), nil, err @@ -503,7 +516,8 @@ func SimulateMsgUpdateGroupAdmin(ak group.AccountKeeper, bk group.BankKeeper, k } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -529,7 +543,8 @@ func SimulateMsgUpdateGroupAdmin(ak group.AccountKeeper, bk group.BankKeeper, k // SimulateMsgUpdateGroupMetadata generates a MsgUpdateGroupMetadata with random values func SimulateMsgUpdateGroupMetadata(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { groupInfo, acc, account, err := randomGroup(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupMetadata, ""), nil, err @@ -552,7 +567,8 @@ func SimulateMsgUpdateGroupMetadata(ak group.AccountKeeper, bk group.BankKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -577,9 +593,11 @@ func SimulateMsgUpdateGroupMetadata(ak group.AccountKeeper, bk group.BankKeeper, // SimulateMsgUpdateGroupMembers generates a MsgUpdateGroupMembers with random values func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { + bk group.BankKeeper, k keeper.Keeper, +) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { groupInfo, acc, account, err := randomGroup(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupMembers, ""), nil, err @@ -602,7 +620,7 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupMembers, "group members"), nil, err } - // set existing radnom group member weight to zero to remove from the group + // set existing random group member weight to zero to remove from the group existigMembers := res.Members if len(existigMembers) > 0 { memberToRemove := existigMembers[r.Intn(len(existigMembers))] @@ -618,7 +636,7 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, if !isDuplicateMember { m := memberToRemove.Member m.Weight = "0" - members = append(members, *m) + members = append(members, group.MemberToMemberRequest(m)) } } @@ -629,7 +647,8 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -655,7 +674,8 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, // SimulateMsgUpdateGroupPolicyAdmin generates a MsgUpdateGroupPolicyAdmin with random values func SimulateMsgUpdateGroupPolicyAdmin(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { _, groupPolicy, acc, account, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyAdmin, ""), nil, err @@ -681,13 +701,14 @@ func SimulateMsgUpdateGroupPolicyAdmin(ak group.AccountKeeper, bk group.BankKeep } msg := group.MsgUpdateGroupPolicyAdmin{ - Admin: acc.Address.String(), - Address: groupPolicyAddr, - NewAdmin: newAdmin.Address.String(), + Admin: acc.Address.String(), + GroupPolicyAddress: groupPolicyAddr, + NewAdmin: newAdmin.Address.String(), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -710,11 +731,13 @@ func SimulateMsgUpdateGroupPolicyAdmin(ak group.AccountKeeper, bk group.BankKeep } } -// // SimulateMsgUpdateGroupPolicyDecisionPolicy generates a NewMsgUpdateGroupPolicyDecisionPolicyRequest with random values +// // SimulateMsgUpdateGroupPolicyDecisionPolicy generates a NewMsgUpdateGroupPolicyDecisionPolicy with random values func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { + bk group.BankKeeper, k keeper.Keeper, +) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { _, groupPolicy, acc, account, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyDecisionPolicy, ""), nil, err @@ -735,7 +758,7 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyDecisionPolicy, fmt.Sprintf("fail to decide bech32 address: %s", err.Error())), nil, nil } - msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(acc.Address, groupPolicyBech32, &group.ThresholdDecisionPolicy{ + msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(acc.Address, groupPolicyBech32, &group.ThresholdDecisionPolicy{ Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Windows: &group.DecisionPolicyWindows{ VotingPeriod: time.Second * time.Duration(simtypes.RandIntBetween(r, 100, 1000)), @@ -746,7 +769,8 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -770,9 +794,11 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, // // SimulateMsgUpdateGroupPolicyMetadata generates a MsgUpdateGroupPolicyMetadata with random values func SimulateMsgUpdateGroupPolicyMetadata(ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { + bk group.BankKeeper, k keeper.Keeper, +) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { _, groupPolicy, acc, account, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyMetadata, ""), nil, err @@ -789,13 +815,14 @@ func SimulateMsgUpdateGroupPolicyMetadata(ak group.AccountKeeper, } msg := group.MsgUpdateGroupPolicyMetadata{ - Admin: acc.Address.String(), - Address: groupPolicyAddr, - Metadata: simtypes.RandStringOfLength(r, 10), + Admin: acc.Address.String(), + GroupPolicyAddress: groupPolicyAddr, + Metadata: simtypes.RandStringOfLength(r, 10), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -820,9 +847,11 @@ func SimulateMsgUpdateGroupPolicyMetadata(ak group.AccountKeeper, // SimulateMsgWithdrawProposal generates a MsgWithdrawProposal with random values func SimulateMsgWithdrawProposal(ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { + bk group.BankKeeper, k keeper.Keeper, +) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { g, groupPolicy, _, _, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, ""), nil, err @@ -837,7 +866,10 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, groupPolicyAddr := groupPolicy.Address ctx := sdk.WrapSDKContext(sdkCtx) - policy := groupPolicy.GetDecisionPolicy() + policy, err := groupPolicy.GetDecisionPolicy() + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, err.Error()), nil, nil + } err = policy.Validate(*g, group.DefaultConfig()) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, err.Error()), nil, nil @@ -892,7 +924,8 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -902,7 +935,6 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, []uint64{proposerAcc.GetSequence()}, proposer.PrivKey, ) - if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyMetadata, "unable to generate mock tx"), nil, err } @@ -922,9 +954,11 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, // SimulateMsgVote generates a MsgVote with random values func SimulateMsgVote(ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { + bk group.BankKeeper, k keeper.Keeper, +) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { g, groupPolicy, _, _, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgVote, ""), nil, err @@ -996,7 +1030,8 @@ func SimulateMsgVote(ak group.AccountKeeper, Metadata: simtypes.RandStringOfLength(r, 10), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -1025,9 +1060,11 @@ func SimulateMsgVote(ak group.AccountKeeper, // // SimulateMsgExec generates a MsgExec with random values func SimulateMsgExec(ak group.AccountKeeper, - bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { + bk group.BankKeeper, k keeper.Keeper, +) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { _, groupPolicy, acc, account, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { return simtypes.NoOpMsg(TypeMsgExec, TypeMsgExec, ""), nil, err @@ -1056,7 +1093,7 @@ func SimulateMsgExec(ak group.AccountKeeper, proposalID := -1 for _, proposal := range proposals { - if proposal.Status == group.PROPOSAL_STATUS_CLOSED { + if proposal.Status == group.PROPOSAL_STATUS_ACCEPTED { proposalID = int(proposal.Id) break } @@ -1069,10 +1106,11 @@ func SimulateMsgExec(ak group.AccountKeeper, msg := group.MsgExec{ ProposalId: uint64(proposalID), - Signer: acc.Address.String(), + Executor: acc.Address.String(), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{&msg}, fees, @@ -1101,8 +1139,8 @@ func SimulateMsgExec(ak group.AccountKeeper, // SimulateMsgLeaveGroup generates a MsgLeaveGroup with random values func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation { return func( - r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { ctx := sdk.WrapSDKContext(sdkCtx) groupInfo, policyInfo, _, _, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) if err != nil { @@ -1134,7 +1172,8 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txGen, []sdk.Msg{msg}, fees, @@ -1158,7 +1197,8 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban } func randomGroup(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, - ctx sdk.Context, accounts []simtypes.Account) (groupInfo *group.GroupInfo, acc simtypes.Account, account authtypes.AccountI, err error) { + ctx sdk.Context, accounts []simtypes.Account, +) (groupInfo *group.GroupInfo, acc simtypes.Account, account authtypes.AccountI, err error) { groupID := k.GetGroupSequence(ctx) switch { @@ -1195,7 +1235,8 @@ func randomGroup(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, } func randomGroupPolicy(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, - ctx sdk.Context, accounts []simtypes.Account) (groupInfo *group.GroupInfo, groupPolicyInfo *group.GroupPolicyInfo, acc simtypes.Account, account authtypes.AccountI, err error) { + ctx sdk.Context, accounts []simtypes.Account, +) (groupInfo *group.GroupInfo, groupPolicyInfo *group.GroupPolicyInfo, acc simtypes.Account, account authtypes.AccountI, err error) { groupInfo, _, _, err = randomGroup(r, k, ak, ctx, accounts) if err != nil { return nil, nil, simtypes.Account{}, nil, err @@ -1226,7 +1267,8 @@ func randomGroupPolicy(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, } func randomMember(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, - ctx context.Context, accounts []simtypes.Account, groupID uint64) (acc simtypes.Account, account authtypes.AccountI, err error) { + ctx context.Context, accounts []simtypes.Account, groupID uint64, +) (acc simtypes.Account, account authtypes.AccountI, err error) { res, err := k.GroupMembers(ctx, &group.QueryGroupMembersRequest{ GroupId: groupID, }) @@ -1268,9 +1310,9 @@ func findAccount(accounts []simtypes.Account, addr string) (idx int) { return idx } -func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { +func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.MemberRequest { if len(accounts) == 1 { - return []group.Member{ + return []group.MemberRequest{ { Address: accounts[0].Address.String(), Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), @@ -1285,10 +1327,10 @@ func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { } membersLen := simtypes.RandIntBetween(r, 1, max) - members := make([]group.Member, membersLen) + members := make([]group.MemberRequest, membersLen) for i := 0; i < membersLen; i++ { - members[i] = group.Member{ + members[i] = group.MemberRequest{ Address: accounts[i].Address.String(), Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Metadata: simtypes.RandStringOfLength(r, 10), diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index 169a6237e104..90476db47fd6 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -162,7 +162,7 @@ func (suite *SimTestSuite) TestSimulateCreateGroupPolicy() { _, err := suite.app.GroupKeeper.CreateGroup(sdk.WrapSDKContext(suite.ctx), &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -205,7 +205,7 @@ func (suite *SimTestSuite) TestSimulateSubmitProposal() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -242,7 +242,7 @@ func (suite *SimTestSuite) TestSimulateSubmitProposal() { err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().NoError(err) suite.Require().True(operationMsg.OK) - suite.Require().Equal(groupPolicyRes.Address, msg.Address) + suite.Require().Equal(groupPolicyRes.Address, msg.GroupPolicyAddress) suite.Require().Len(futureOperations, 0) } @@ -259,7 +259,7 @@ func (suite *SimTestSuite) TestWithdrawProposal() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: addr, - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: addr, Weight: "1", @@ -280,7 +280,7 @@ func (suite *SimTestSuite) TestWithdrawProposal() { suite.Require().NoError(err) // setup a proposal - proposalReq, err := group.NewMsgSubmitProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ + proposalReq, err := group.NewMsgSubmitProposal(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ &banktypes.MsgSend{ FromAddress: groupPolicyRes.Address, ToAddress: addr, @@ -325,7 +325,7 @@ func (suite *SimTestSuite) TestSimulateVote() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: addr, - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: addr, Weight: "1", @@ -347,7 +347,7 @@ func (suite *SimTestSuite) TestSimulateVote() { suite.Require().NoError(err) // setup a proposal - proposalReq, err := group.NewMsgSubmitProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ + proposalReq, err := group.NewMsgSubmitProposal(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ &banktypes.MsgSend{ FromAddress: groupPolicyRes.Address, ToAddress: addr, @@ -392,7 +392,7 @@ func (suite *SimTestSuite) TestSimulateExec() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: addr, - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: addr, Weight: "1", @@ -413,7 +413,7 @@ func (suite *SimTestSuite) TestSimulateExec() { suite.Require().NoError(err) // setup a proposal - proposalReq, err := group.NewMsgSubmitProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ + proposalReq, err := group.NewMsgSubmitProposal(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ &banktypes.MsgSend{ FromAddress: groupPolicyRes.Address, ToAddress: addr, @@ -450,7 +450,7 @@ func (suite *SimTestSuite) TestSimulateExec() { err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().NoError(err) suite.Require().True(operationMsg.OK) - suite.Require().Equal(addr, msg.Signer) + suite.Require().Equal(addr, msg.Executor) suite.Require().Len(futureOperations, 0) } @@ -465,7 +465,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupAdmin() { _, err := suite.app.GroupKeeper.CreateGroup(sdk.WrapSDKContext(suite.ctx), &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -507,7 +507,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupMetadata() { _, err := suite.app.GroupKeeper.CreateGroup(sdk.WrapSDKContext(suite.ctx), &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -549,7 +549,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupMembers() { _, err := suite.app.GroupKeeper.CreateGroup(sdk.WrapSDKContext(suite.ctx), &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -592,7 +592,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyAdmin() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -629,7 +629,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyAdmin() { err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().NoError(err) suite.Require().True(operationMsg.OK) - suite.Require().Equal(groupPolicyRes.Address, msg.Address) + suite.Require().Equal(groupPolicyRes.Address, msg.GroupPolicyAddress) suite.Require().Len(futureOperations, 0) } @@ -645,7 +645,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyDecisionPolicy() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -682,7 +682,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyDecisionPolicy() { err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().NoError(err) suite.Require().True(operationMsg.OK) - suite.Require().Equal(groupPolicyRes.Address, msg.Address) + suite.Require().Equal(groupPolicyRes.Address, msg.GroupPolicyAddress) suite.Require().Len(futureOperations, 0) } @@ -698,7 +698,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyMetadata() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: acc.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: acc.Address.String(), Weight: "1", @@ -735,7 +735,7 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyMetadata() { err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().NoError(err) suite.Require().True(operationMsg.OK) - suite.Require().Equal(groupPolicyRes.Address, msg.Address) + suite.Require().Equal(groupPolicyRes.Address, msg.GroupPolicyAddress) suite.Require().Len(futureOperations, 0) } @@ -756,7 +756,7 @@ func (suite *SimTestSuite) TestSimulateLeaveGroup() { groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, &group.MsgCreateGroup{ Admin: admin.Address.String(), - Members: []group.Member{ + Members: []group.MemberRequest{ { Address: member1.Address.String(), Weight: "1", diff --git a/x/group/spec/01_concepts.md b/x/group/spec/01_concepts.md index 0194f7184744..07d42b10c784 100644 --- a/x/group/spec/01_concepts.md +++ b/x/group/spec/01_concepts.md @@ -10,7 +10,8 @@ A group is simply an aggregation of accounts with associated weights. It is not an account and doesn't have a balance. It doesn't in and of itself have any sort of voting or decision weight. It does have an "administrator" which has the ability to add, remove and update members in the group. Note that a -group policy account could be an administrator of a group. +group policy account could be an administrator of a group, and that the +administrator doesn't necessarily have to be a member of the group. ## Group Policy @@ -30,16 +31,23 @@ A decision policy is the mechanism by which members of a group can vote on proposals, as well as the rules that dictate whether a proposal should pass or not based on its tally outcome. -All decision policies generally would have a mininum execution perdio and a +All decision policies generally would have a mininum execution period and a maximum voting window. The minimum execution period is the minimum amount of time -that must pass in order for a proposal to potentially be executed, and it may -be set to 0. The maximum voting window is the maximum time that a proposal may -be voted on before it is closed. +that must pass after submission in order for a proposal to potentially be executed, and it may +be set to 0. The maximum voting window is the maximum time after submission that a proposal may +be voted on before it is tallied. The chain developer also defines an app-wide maximum execution period, which is the maximum amount of time after a proposal's voting period end where users are allowed to execute a proposal. +The current group module comes shipped with two decision policies: threshold +and percentage. Any chain developer can extend upon these two, by creating +custom decision policies, as long as they adhere to the `DecisionPolicy` +interface: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/x/group/types.go#L27-L41 + ### Threshold decision policy A threshold decision policy defines a threshold of yes votes (based on a tally @@ -56,46 +64,75 @@ weights get updated. ## Proposal -Any member of a group can submit a proposal for a group policy account to decide upon. +Any member(s) of a group can submit a proposal for a group policy account to decide upon. A proposal consists of a set of messages that will be executed if the proposal passes as well as any metadata associated with the proposal. -## Voting +### Voting There are four choices to choose while voting - yes, no, abstain and veto. Not -all decision policies will support them. Votes can contain some optional metadata. +all decision policies will take the four choices into account. Votes can contain some optional metadata. In the current implementation, the voting window begins as soon as a proposal -is submitted. +is submitted, and the end is defined by the group policy's decision policy. + +### Withdrawing Proposals + +Proposals can be withdrawn any time before the voting period end, either by the +admin of the group policy or by one of the proposers. Once withdrawn, it is +marked as `PROPOSAL_STATUS_WITHDRAWN`, and no more voting or execution is +allowed on it. -## Tallying +### Aborted Proposals + +If the group policy is updated during the voting period of the proposal, then +the proposal is marked as `PROPOSAL_STATUS_ABORTED`, and no more voting or +execution is allowed on it. This is because the group policy defines the rules +of proposal voting and execution, so if those rules change during the lifecycle +of a proposal, then the proposal should be marked as stale. + +### Tallying Tallying is the counting of all votes on a proposal. It happens only once in the lifecycle of a proposal, but can be triggered by two factors, whichever happens first: -- either someone tries to execute the proposal (see next section), which can +* either someone tries to execute the proposal (see next section), which can happen on a `Msg/Exec` transaction, or a `Msg/{SubmitProposal,Vote}` transaction with the `Exec` field set. When a proposal execution is attempted, a tally is done first to make sure the proposal passes. -- or on `EndBlock` when the proposal's voting period end just passed. +* or on `EndBlock` when the proposal's voting period end just passed. If the tally result passes the decision policy's rules, then the proposal is -marked as `STATUS_CLOSED`, so no more voting is allowed anymore, and the tally -result is persisted to state. +marked as `PROPOSAL_STATUS_ACCEPTED`, or else it is marked as +`PROPOSAL_STATUS_REJECTED`. In any case, no more voting is allowed anymore, and the tally +result is persisted to state in the proposal's `FinalTallyResult`. -## Executing Proposals +### Executing Proposals Proposals are executed only when the tallying is done, and the group account's -decision policy allows the proposal to pass based on the tally outcome. +decision policy allows the proposal to pass based on the tally outcome. They +are marked by the status `PROPOSAL_STATUS_ACCEPTED`. Execution must happen +before a duration of `MaxExecutionPeriod` (set by the chain developer) after +each proposal's voting period end. Proposals will not be automatically executed by the chain in this current design, but rather a user must submit a `Msg/Exec` transaction to attempt to execute the -proposal based on the current votes and decision policy. +proposal based on the current votes and decision policy. Any user (not only the +group members) can execute proposals that have been accepted, and execution fees are +paid by the proposal executor. It's also possible to try to execute a proposal immediately on creation or on new votes using the `Exec` field of `Msg/SubmitProposal` and `Msg/Vote` requests. In the former case, proposers signatures are considered as yes votes. -For now, if the proposal can't be executed, it'll still be opened for new votes and -could be executed later on. +In these cases, if the proposal can't be executed (i.e. it didn't pass the +decision policy's rules), it will still be opened for new votes and +could be tallied and executed later on. + +A successful proposal execution will have its `ExecutorResult` marked as +`PROPOSAL_EXECUTOR_RESULT_SUCCESS`. The proposal will be automatically pruned +after execution. On the other hand, a failed proposal execution will be marked +as `PROPOSAL_EXECUTOR_RESULT_FAILURE`. Such a proposal can be re-executed +multiple times, until it expires after `MaxExecutionPeriod` after voting period +end. ## Pruning @@ -103,17 +140,18 @@ Proposals and votes are automatically pruned to avoid state bloat. Votes are pruned: -- either after a successful tally, i.e. a tally whose result passes the decision +* either after a successful tally, i.e. a tally whose result passes the decision policy's rules, which can be trigged by a `Msg/Exec` or a - `Msg/{SubmitProposal,Vote}` with the `Exec` field, -- or on `EndBlock` right after the proposal's voting period end, + `Msg/{SubmitProposal,Vote}` with the `Exec` field set, +* or on `EndBlock` right after the proposal's voting period end. This applies to proposals with status `aborted` or `withdrawn` too. whichever happens first. Proposals are pruned: -- either after a successful proposal execution, -- or on `EndBlock` right after the proposal's `voting_period_end` + +* on `EndBlock` whose proposal status is `withdrawn` or `aborted` on proposal's voting period end before tallying, +* and either after a successful proposal execution, +* or on `EndBlock` right after the proposal's `voting_period_end` + `max_execution_period` (defined as an app-wide configuration) is passed, whichever happens first. diff --git a/x/group/spec/03_messages.md b/x/group/spec/03_messages.md index dc526725046b..c0b9b0fd7381 100644 --- a/x/group/spec/03_messages.md +++ b/x/group/spec/03_messages.md @@ -6,134 +6,154 @@ order: 3 ## Msg/CreateGroup -A new group can be created with the `MsgCreateGroup`, which has an admin address, a list of members and some optional metadata bytes. +A new group can be created with the `MsgCreateGroup`, which has an admin address, a list of members and some optional metadata. The metadata has a maximum length that is chosen by the app developer, and passed into the group keeper as a config. -+++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L54-L65 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L66-L78 -It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. +It's expected to fail if + +* metadata length is greater than `MaxMetadataLen` + config +* members are not correctly set (e.g. wrong address format, duplicates, or with 0 weight). ## Msg/UpdateGroupMembers Group members can be updated with the `UpdateGroupMembers`. -+++https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L74-L86 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L87-L100 In the list of `MemberUpdates`, an existing member can be removed by setting its weight to 0. -It's expecting to fail if the signer is not the admin of the group. +It's expected to fail if: + +* the signer is not the admin of the group. +* for any one of the associated group policies, if its decision policy's `Validate()` method fails against the updated group. ## Msg/UpdateGroupAdmin The `UpdateGroupAdmin` can be used to update a group admin. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L91-L102 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L105-L117 -It's expecting to fail if the signer is not the admin of the group. +It's expected to fail if the signer is not the admin of the group. ## Msg/UpdateGroupMetadata The `UpdateGroupMetadata` can be used to update a group metadata. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L107-L118 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L122-L134 -It's expecting to fail if: +It's expected to fail if: * new metadata length is greater than `MaxMetadataLen` config. * the signer is not the admin of the group. ## Msg/CreateGroupPolicy -A new group policy can be created with the `MsgCreateGroupPolicy`, which has an admin address, a group id, a decision policy and some optional metadata bytes. +A new group policy can be created with the `MsgCreateGroupPolicy`, which has an admin address, a group id, a decision policy and some optional metadata. + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L143-L160 -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L127-L142 +It's expected to fail if: -It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. +* the signer is not the admin of the group. +* metadata length is greater than `MaxMetadataLen` config. +* the decision policy's `Validate()` method doesn't pass against the group. ## Msg/CreateGroupWithPolicy -A new group with policy can be created with the `MsgCreateGroupWithPolicy`, which has an admin address, a list of members, a decision policy, a group policy as admin field to optionally set group and group policy admin with group policy address and some optional metadata bytes for group and group policy. +A new group with policy can be created with the `MsgCreateGroupWithPolicy`, which has an admin address, a list of members, a decision policy, a `group_policy_as_admin` field to optionally set group and group policy admin with group policy address and some optional metadata for group and group policy. -+++ https://github.com/cosmos/cosmos-sdk/blob/likhita/MsgCreateGroupWithPolicy/proto/cosmos/group/v1beta1/tx.proto#L167-L188 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L183-L206 -It's expecting to fail if group metadata or group policy metadata length is greater than some `MaxMetadataLength`. +It's expected to fail for the same reasons as `Msg/CreateGroup` and `Msg/CreateGroupPolicy`. ## Msg/UpdateGroupPolicyAdmin The `UpdateGroupPolicyAdmin` can be used to update a group policy admin. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L151-L162 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L169-L181 -It's expecting to fail if the signer is not the admin of the group policy. +It's expected to fail if the signer is not the admin of the group policy. ## Msg/UpdateGroupPolicyDecisionPolicy The `UpdateGroupPolicyDecisionPolicy` can be used to update a decision policy. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L167-L179 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L219-L235 + +It's expected to fail if: -It's expecting to fail if the signer is not the admin of the group policy. +* the signer is not the admin of the group policy. +* the new decision policy's `Validate()` method doesn't pass against the group. ## Msg/UpdateGroupPolicyMetadata The `UpdateGroupPolicyMetadata` can be used to update a group policy metadata. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L184-L195 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L240-L252 -It's expecting to fail if: +It's expected to fail if: * new metadata length is greater than `MaxMetadataLen` config. * the signer is not the admin of the group. -## Msg/CreateProposal +## Msg/SubmitProposal -A new proposal can be created with the `MsgCreateProposal`, which has a group policy account address, a list of proposers addresses, a list of messages to execute if the proposal is accepted and some optional metadata bytes. +A new proposal can be created with the `MsgSubmitProposal`, which has a group policy account address, a list of proposers addresses, a list of messages to execute if the proposal is accepted and some optional metadata. An optional `Exec` value can be provided to try to execute the proposal immediately after proposal creation. Proposers signatures are considered as yes votes in this case. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L218-L239 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L275-L298 -It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. +It's expected to fail if: + +* metadata length is greater than `MaxMetadataLen` config. +* if any of the proposers is not a group member. ## Msg/WithdrawProposal -A proposal can be withdrawn using `MsgWithdrawProposal` which has a `address` (can be either proposer or policy admin) and a `proposal_id` (which has to be withdrawn). +A proposal can be withdrawn using `MsgWithdrawProposal` which has an `address` (can be either a proposer or the group policy admin) and a `proposal_id` (which has to be withdrawn). -+++ https://github.com/cosmos/cosmos-sdk/blob/f2d6f0e4bb1a9bd7f7ae3cdc4702c9d3d1fc0329/proto/cosmos/group/v1beta1/tx.proto#L251-L258 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L307-L316 -It's expecting to fail if: +It's expected to fail if: -* the signer is neither policy address nor proposer of the proposal. +* the signer is neither the group policy admin nor proposer of the proposal. * the proposal is already closed or aborted. ## Msg/Vote -A new vote can be created with the `MsgVote`, given a proposal id, a voter address, a choice (yes, no, veto or abstain) and some optional metadata bytes. +A new vote can be created with the `MsgVote`, given a proposal id, a voter address, a choice (yes, no, veto or abstain) and some optional metadata. An optional `Exec` value can be provided to try to execute the proposal immediately after voting. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L248-L265 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L321-L339 + +It's expected to fail if: -It's expecting to fail if metadata length is greater than `MaxMetadataLen` config. +* metadata length is greater than `MaxMetadataLen` config. +* the proposal is not in voting period anymore. ## Msg/Exec A proposal can be executed with the `MsgExec`. -+++ https://github.com/cosmos/cosmos-sdk/blob/9aef070625e9676d7c0acb212c17ae9dba3c32dc/proto/cosmos/group/v1beta1/tx.proto#L270-L278 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L341-L353 The messages that are part of this proposal won't be executed if: -* the proposal has not been accepted. -* the proposal status is not closed. +* the proposal has not been accepted by the group policy. * the proposal has already been successfully executed. ## Msg/LeaveGroup The `MsgLeaveGroup` allows group member to leave a group. -+++ https://github.com/cosmos/cosmos-sdk/blob/a635fd78663d04c5de23f4d032e5a3abea1b005a/proto/cosmos/group/v1beta1/tx.proto#L352-L361 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/group/v1/tx.proto#L362-L370 -It's expecting to fail if: +It's expected to fail if: * the group member is not part of the group. +* for any one of the associated group policies, if its decision policy's `Validate()` method fails against the updated group. diff --git a/x/group/spec/04_events.md b/x/group/spec/04_events.md index 1918a7099bd8..ca4e2fdf20bb 100644 --- a/x/group/spec/04_events.md +++ b/x/group/spec/04_events.md @@ -8,56 +8,65 @@ The group module emits the following events: ## EventCreateGroup -| Type | Attribute Key | Attribute Value | -|---------------------------------------|---------------|---------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/CreateGroup | -| cosmos.group.v1beta1.EventCreateGroup | group_id | {groupId} | +| Type | Attribute Key | Attribute Value | +| -------------------------------- | ------------- | -------------------------------- | +| message | action | /cosmos.group.v1.Msg/CreateGroup | +| cosmos.group.v1.EventCreateGroup | group_id | {groupId} | ## EventUpdateGroup -| Type | Attribute Key | Attribute Value | -|---------------------------------------|---------------|-----------------------------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/UpdateGroup{Admin\|Metadata\|Members} | -| cosmos.group.v1beta1.EventUpdateGroup | group_id | {groupId} | +| Type | Attribute Key | Attribute Value | +| -------------------------------- | ------------- | ---------------------------------------------------------- | +| message | action | /cosmos.group.v1.Msg/UpdateGroup{Admin\|Metadata\|Members} | +| cosmos.group.v1.EventUpdateGroup | group_id | {groupId} | ## EventCreateGroupPolicy -| Type | Attribute Key | Attribute Value | -|----------------------------------------------|---------------|----------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/CreateGroupPolicy | -| cosmos.group.v1beta1.EventCreateGroupPolicy | address | {groupPolicyAddress} | +| Type | Attribute Key | Attribute Value | +| -------------------------------------- | ------------- | -------------------------------------- | +| message | action | /cosmos.group.v1.Msg/CreateGroupPolicy | +| cosmos.group.v1.EventCreateGroupPolicy | address | {groupPolicyAddress} | ## EventUpdateGroupPolicy -| Type | Attribute Key | Attribute Value | -|----------------------------------------------|---------------|-------------------------------------------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/UpdateGroupPolicy{Admin\|Metadata\|DecisionPolicy} | -| cosmos.group.v1beta1.EventUpdateGroupPolicy | address | {groupPolicyAddress} | +| Type | Attribute Key | Attribute Value | +| -------------------------------------- | ------------- | ----------------------------------------------------------------------- | +| message | action | /cosmos.group.v1.Msg/UpdateGroupPolicy{Admin\|Metadata\|DecisionPolicy} | +| cosmos.group.v1.EventUpdateGroupPolicy | address | {groupPolicyAddress} | ## EventCreateProposal -| Type | Attribute Key | Attribute Value | -|------------------------------------------|---------------|------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/CreateProposal | -| cosmos.group.v1beta1.EventCreateProposal | proposal_id | {proposalId} | +| Type | Attribute Key | Attribute Value | +| ----------------------------------- | ------------- | ----------------------------------- | +| message | action | /cosmos.group.v1.Msg/CreateProposal | +| cosmos.group.v1.EventCreateProposal | proposal_id | {proposalId} | ## EventWithdrawProposal -| Type | Attribute Key | Attribute Value | -|--------------------------------------------|---------------|--------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/WithdrawProposal | -| cosmos.group.v1beta1.EventWithdrawProposal | proposal_id | {proposalId} | +| Type | Attribute Key | Attribute Value | +| ------------------------------------- | ------------- | ------------------------------------- | +| message | action | /cosmos.group.v1.Msg/WithdrawProposal | +| cosmos.group.v1.EventWithdrawProposal | proposal_id | {proposalId} | ## EventVote -| Type | Attribute Key | Attribute Value | -|--------------------------------|---------------|--------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/Vote | -| cosmos.group.v1beta1.EventVote | proposal_id | {proposalId} | +| Type | Attribute Key | Attribute Value | +| ------------------------- | ------------- | ------------------------- | +| message | action | /cosmos.group.v1.Msg/Vote | +| cosmos.group.v1.EventVote | proposal_id | {proposalId} | ## EventExec -| Type | Attribute Key | Attribute Value | -|--------------------------------|---------------|--------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/Exec | -| cosmos.group.v1beta1.EventExec | proposal_id | {proposalId} | +| Type | Attribute Key | Attribute Value | +| ------------------------- | ------------- | ------------------------- | +| message | action | /cosmos.group.v1.Msg/Exec | +| cosmos.group.v1.EventExec | proposal_id | {proposalId} | +| cosmos.group.v1.EventExec | logs | {logs_string} | + +## EventLeaveGroup + +| Type | Attribute Key | Attribute Value | +| ------------------------------- | ------------- | ------------------------------- | +| message | action | /cosmos.group.v1.Msg/LeaveGroup | +| cosmos.group.v1.EventLeaveGroup | proposal_id | {proposalId} | +| cosmos.group.v1.EventLeaveGroup | address | {address} | diff --git a/x/group/spec/05_client.md b/x/group/spec/05_client.md index 97db94944861..c39e503fd7e8 100644 --- a/x/group/spec/05_client.md +++ b/x/group/spec/05_client.md @@ -60,9 +60,11 @@ Example Output: address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" - timeout: 600s + windows: + min_execution_period: 0s + voting_period: 432000s group_id: "1" metadata: AQ== version: "1" @@ -145,7 +147,7 @@ simd query group group-policies-by-group [group-id] [flags] Example: ```bash -simd query group group-policies-by-group 1 +simd query group group-policies-by-group 1 ``` Example Output: @@ -155,18 +157,22 @@ group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" - timeout: 600s + windows: + min_execution_period: 0s + voting_period: 432000s group_id: "1" metadata: AQ== version: "1" - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" - timeout: 600s + windows: + min_execution_period: 0s + voting_period: 432000s group_id: "1" metadata: AQ== version: "1" @@ -196,18 +202,22 @@ group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" - timeout: 600s + windows: + min_execution_period: 0s + voting_period: 432000s group_id: "1" metadata: AQ== version: "1" - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" - timeout: 600s + windows: + min_execution_period: 0s + voting_period: 432000s group_id: "1" metadata: AQ== version: "1" @@ -252,7 +262,9 @@ proposal: result: RESULT_UNFINALIZED status: STATUS_SUBMITTED submitted_at: "2021-12-17T07:06:26.310638964Z" - timeout: "2021-12-17T07:06:27.310638964Z" + windows: + min_execution_period: 0s + voting_period: 432000s vote_state: abstain_count: "0" no_count: "0" @@ -299,7 +311,9 @@ proposals: result: RESULT_UNFINALIZED status: STATUS_SUBMITTED submitted_at: "2021-12-17T07:06:26.310638964Z" - timeout: "2021-12-17T07:06:27.310638964Z" + windows: + min_execution_period: 0s + voting_period: 432000s vote_state: abstain_count: "0" no_count: "0" @@ -343,7 +357,7 @@ simd query group votes-by-proposal [proposal-id] [flags] Example: ```bash -simd query group votes-by-proposal 1 +simd query group votes-by-proposal 1 ``` Example Output: @@ -408,7 +422,7 @@ simd tx group create-group [admin] [metadata] [members-json-file] Example: ```bash -simd tx group create-group cosmos1.. "AQ==" members.json +simd tx group create-group cosmos1.. "AQ==" members.json ``` #### update-group-admin @@ -455,7 +469,7 @@ simd tx group update-group-metadata cosmos1.. 1 "AQ==" #### create-group-policy -The `create-group-policy` command allows users to create a group policy which is an account associated with a group and a decision policy. +The `create-group-policy` command allows users to create a group policy which is an account associated with a group and a decision policy. ```bash simd tx group create-group-policy [admin] [group-id] [metadata] [decision-policy] [flags] @@ -464,10 +478,9 @@ simd tx group create-group-policy [admin] [group-id] [metadata] [decision-policy Example: ```bash -simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"600s"}' +simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` - #### create-group-with-policy The `create-group-with-policy` command allows users to create a group which is an aggregation of member accounts with associated weights and an administrator account with decision policy. If the `--group-policy-as-admin` flag is set to `true`, the group policy address becomes the group and group policy admin. @@ -479,7 +492,7 @@ simd tx group create-group-with-policy [admin] [group-metadata] [group-policy-me Example: ```bash -simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"600s"}' +simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` #### update-group-policy-admin @@ -521,7 +534,7 @@ simd tx group update-group-policy-decision-policy [admin] [group-policy-account Example: ```bash -simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"2", "timeout":"1000s"}' +simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"2", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` #### create-proposal @@ -552,7 +565,7 @@ Example: simd tx group withdraw-proposal 1 cosmos1.. ``` -#### vote +#### vote The `vote` command allows users to vote on a proposal. @@ -594,7 +607,6 @@ Example: simd tx group leave-group cosmos1... 1 ``` - ## gRPC A user can query the `group` module using gRPC endpoints. @@ -604,14 +616,14 @@ A user can query the `group` module using gRPC endpoints. The `GroupInfo` endpoint allows users to query for group info by given group id. ```bash -cosmos.group.v1beta1.Query/GroupInfo +cosmos.group.v1.Query/GroupInfo ``` -Example: +Example: ```bash grpcurl -plaintext \ - -d '{"group_id":1}' localhost:9090 cosmos.group.v1beta1.Query/GroupInfo + -d '{"group_id":1}' localhost:9090 cosmos.group.v1.Query/GroupInfo ``` Example Output: @@ -633,14 +645,14 @@ Example Output: The `GroupPolicyInfo` endpoint allows users to query for group policy info by account address of group policy. ```bash -cosmos.group.v1beta1.Query/GroupPolicyInfo +cosmos.group.v1.Query/GroupPolicyInfo ``` Example: ```bash grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupPolicyInfo + -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupPolicyInfo ``` Example Output: @@ -652,7 +664,7 @@ Example Output: "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","timeout":"600s"}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows": {"voting_period": "120h", "min_execution_period": "0s"}}, } } ``` @@ -662,14 +674,14 @@ Example Output: The `GroupMembers` endpoint allows users to query for group members by group id with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupMembers +cosmos.group.v1.Query/GroupMembers ``` Example: ```bash grpcurl -plaintext \ - -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/GroupMembers + -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1.Query/GroupMembers ``` Example Output: @@ -703,14 +715,14 @@ Example Output: The `GroupsByAdmin` endpoint allows users to query for groups by admin account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupsByAdmin +cosmos.group.v1.Query/GroupsByAdmin ``` Example: ```bash grpcurl -plaintext \ - -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupsByAdmin + -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupsByAdmin ``` Example Output: @@ -744,14 +756,14 @@ Example Output: The `GroupPoliciesByGroup` endpoint allows users to query for group policies by group id with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupPoliciesByGroup +cosmos.group.v1.Query/GroupPoliciesByGroup ``` Example: ```bash grpcurl -plaintext \ - -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/GroupPoliciesByGroup + -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1.Query/GroupPoliciesByGroup ``` Example Output: @@ -764,14 +776,14 @@ Example Output: "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","timeout":"600s"}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, }, { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","timeout":"600s"}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, } ], "pagination": { @@ -785,14 +797,14 @@ Example Output: The `GroupPoliciesByAdmin` endpoint allows users to query for group policies by admin account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupPoliciesByAdmin +cosmos.group.v1.Query/GroupPoliciesByAdmin ``` Example: ```bash grpcurl -plaintext \ - -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupPoliciesByAdmin + -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupPoliciesByAdmin ``` Example Output: @@ -805,14 +817,14 @@ Example Output: "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","timeout":"600s"}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, }, { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","timeout":"600s"}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, } ], "pagination": { @@ -826,14 +838,14 @@ Example Output: The `Proposal` endpoint allows users to query for proposal by id. ```bash -cosmos.group.v1beta1.Query/Proposal +cosmos.group.v1.Query/Proposal ``` Example: ```bash grpcurl -plaintext \ - -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/Proposal + -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1.Query/Proposal ``` Example Output: @@ -857,7 +869,10 @@ Example Output: "abstainCount": "0", "vetoCount": "0" }, - "timeout": "2021-12-17T07:06:27.310638964Z", + "windows": { + "min_execution_period": "0s", + "voting_period": "432000s" + }, "executorResult": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"100000000"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} @@ -871,14 +886,14 @@ Example Output: The `ProposalsByGroupPolicy` endpoint allows users to query for proposals by account address of group policy with pagination flags. ```bash -cosmos.group.v1beta1.Query/ProposalsByGroupPolicy +cosmos.group.v1.Query/ProposalsByGroupPolicy ``` Example: ```bash grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/ProposalsByGroupPolicy + -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/ProposalsByGroupPolicy ``` Example Output: @@ -903,7 +918,10 @@ Example Output: "abstainCount": "0", "vetoCount": "0" }, - "timeout": "2021-12-17T08:13:27.099649352Z", + "windows": { + "min_execution_period": "0s", + "voting_period": "432000s" + }, "executorResult": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"100000000"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} @@ -921,14 +939,14 @@ Example Output: The `VoteByProposalVoter` endpoint allows users to query for vote by proposal id and voter account address. ```bash -cosmos.group.v1beta1.Query/VoteByProposalVoter +cosmos.group.v1.Query/VoteByProposalVoter ``` Example: ```bash grpcurl -plaintext \ - -d '{"proposal_id":"1","voter":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/VoteByProposalVoter + -d '{"proposal_id":"1","voter":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/VoteByProposalVoter ``` Example Output: @@ -949,14 +967,14 @@ Example Output: The `VotesByProposal` endpoint allows users to query for votes by proposal id with pagination flags. ```bash -cosmos.group.v1beta1.Query/VotesByProposal +cosmos.group.v1.Query/VotesByProposal ``` Example: ```bash grpcurl -plaintext \ - -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/VotesByProposal + -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1.Query/VotesByProposal ``` Example Output: @@ -982,14 +1000,14 @@ Example Output: The `VotesByVoter` endpoint allows users to query for votes by voter account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/VotesByVoter +cosmos.group.v1.Query/VotesByVoter ``` Example: ```bash grpcurl -plaintext \ - -d '{"voter":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/VotesByVoter + -d '{"voter":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/VotesByVoter ``` Example Output: @@ -1067,9 +1085,12 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", - "timeout": "600s" + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } }, } } @@ -1184,9 +1205,12 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", - "timeout": "600s" + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } }, }, { @@ -1196,9 +1220,12 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", - "timeout": "600s" + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } }, } ], @@ -1235,9 +1262,12 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", - "timeout": "600s" + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } }, }, { @@ -1247,9 +1277,12 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", - "timeout": "600s" + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } }, } ], @@ -1295,7 +1328,10 @@ Example Output: "abstain_count": "0", "veto_count": "0" }, - "timeout": "2021-12-17T07:06:27.310638964Z", + "windows": { + "min_execution_period": "0s", + "voting_period": "432000s" + }, "executor_result": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ { @@ -1351,7 +1387,10 @@ Example Output: "abstain_count": "0", "veto_count": "0" }, - "timeout": "2021-12-17T08:13:27.099649352Z", + "windows": { + "min_execution_period": "0s", + "voting_period": "432000s" + }, "executor_result": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ { diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 0f3dee3a2f75..a2407e87dc44 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -68,7 +68,7 @@ type MsgCreateGroup struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` // members defines the group members. - Members []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` + Members []MemberRequest `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` // metadata is any arbitrary metadata to attached to the group. Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` } @@ -113,7 +113,7 @@ func (m *MsgCreateGroup) GetAdmin() string { return "" } -func (m *MsgCreateGroup) GetMembers() []Member { +func (m *MsgCreateGroup) GetMembers() []MemberRequest { if m != nil { return m.Members } @@ -181,7 +181,7 @@ type MsgUpdateGroupMembers struct { GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // member_updates is the list of members to update, // set weight to 0 to remove a member. - MemberUpdates []Member `protobuf:"bytes,3,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"` + MemberUpdates []MemberRequest `protobuf:"bytes,3,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"` } func (m *MsgUpdateGroupMembers) Reset() { *m = MsgUpdateGroupMembers{} } @@ -231,7 +231,7 @@ func (m *MsgUpdateGroupMembers) GetGroupId() uint64 { return 0 } -func (m *MsgUpdateGroupMembers) GetMemberUpdates() []Member { +func (m *MsgUpdateGroupMembers) GetMemberUpdates() []MemberRequest { if m != nil { return m.MemberUpdates } @@ -572,8 +572,8 @@ func (m *MsgCreateGroupPolicyResponse) GetAddress() string { type MsgUpdateGroupPolicyAdmin struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the account address of the group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // group_policy_address is the account address of the group policy. + GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` // new_admin is the new group policy admin. NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` } @@ -618,9 +618,9 @@ func (m *MsgUpdateGroupPolicyAdmin) GetAdmin() string { return "" } -func (m *MsgUpdateGroupPolicyAdmin) GetAddress() string { +func (m *MsgUpdateGroupPolicyAdmin) GetGroupPolicyAddress() string { if m != nil { - return m.Address + return m.GroupPolicyAddress } return "" } @@ -637,12 +637,13 @@ type MsgCreateGroupWithPolicy struct { // admin is the account address of the group and group policy admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` // members defines the group members. - Members []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` + Members []MemberRequest `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` // group_metadata is any arbitrary metadata attached to the group. GroupMetadata string `protobuf:"bytes,3,opt,name=group_metadata,json=groupMetadata,proto3" json:"group_metadata,omitempty"` // group_policy_metadata is any arbitrary metadata attached to the group policy. GroupPolicyMetadata string `protobuf:"bytes,4,opt,name=group_policy_metadata,json=groupPolicyMetadata,proto3" json:"group_policy_metadata,omitempty"` - // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group and group policy admin. + // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group + // and group policy admin. GroupPolicyAsAdmin bool `protobuf:"varint,5,opt,name=group_policy_as_admin,json=groupPolicyAsAdmin,proto3" json:"group_policy_as_admin,omitempty"` // decision_policy specifies the group policy's decision policy. DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` @@ -777,8 +778,8 @@ var xxx_messageInfo_MsgUpdateGroupPolicyAdminResponse proto.InternalMessageInfo type MsgUpdateGroupPolicyDecisionPolicy struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the account address of group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // group_policy_address is the account address of group policy. + GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` // decision_policy is the updated group policy's decision policy. DecisionPolicy *types.Any `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` } @@ -861,8 +862,8 @@ var xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicyResponse proto.InternalMes type MsgUpdateGroupPolicyMetadata struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the account address of group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // group_policy_address is the account address of group policy. + GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` // metadata is the updated group policy metadata. Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` } @@ -907,9 +908,9 @@ func (m *MsgUpdateGroupPolicyMetadata) GetAdmin() string { return "" } -func (m *MsgUpdateGroupPolicyMetadata) GetAddress() string { +func (m *MsgUpdateGroupPolicyMetadata) GetGroupPolicyAddress() string { if m != nil { - return m.Address + return m.GroupPolicyAddress } return "" } @@ -960,8 +961,8 @@ var xxx_messageInfo_MsgUpdateGroupPolicyMetadataResponse proto.InternalMessageIn // MsgSubmitProposal is the Msg/SubmitProposal request type. type MsgSubmitProposal struct { - // address is the account address of group policy. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // group_policy_address is the account address of group policy. + GroupPolicyAddress string `protobuf:"bytes,1,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` // proposers are the account addresses of the proposers. // Proposers signatures will be counted as yes votes. Proposers []string `protobuf:"bytes,2,rep,name=proposers,proto3" json:"proposers,omitempty"` @@ -1270,8 +1271,8 @@ var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo type MsgExec struct { // proposal is the unique ID of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // signer is the account address used to execute the proposal. - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + // executor is the account address used to execute the proposal. + Executor string `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"` } func (m *MsgExec) Reset() { *m = MsgExec{} } @@ -1314,15 +1315,17 @@ func (m *MsgExec) GetProposalId() uint64 { return 0 } -func (m *MsgExec) GetSigner() string { +func (m *MsgExec) GetExecutor() string { if m != nil { - return m.Signer + return m.Executor } return "" } // MsgExecResponse is the Msg/Exec request type. type MsgExecResponse struct { + // result is the final result of the proposal execution. + Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` } func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } @@ -1358,6 +1361,13 @@ func (m *MsgExecResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo +func (m *MsgExecResponse) GetResult() ProposalExecutorResult { + if m != nil { + return m.Result + } + return PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED +} + // MsgLeaveGroup is the Msg/LeaveGroup request type. type MsgLeaveGroup struct { // address is the account address of the group member. @@ -1485,84 +1495,87 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1/tx.proto", fileDescriptor_6b8d3d629f136420) } var fileDescriptor_6b8d3d629f136420 = []byte{ - // 1232 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0xe3, 0x54, - 0x14, 0xce, 0x6d, 0x32, 0x7d, 0x9c, 0x4c, 0xd3, 0xd6, 0x4d, 0xa7, 0xa9, 0x3b, 0x93, 0x04, 0xd3, - 0xe9, 0x74, 0xa2, 0xa9, 0x33, 0x4d, 0x35, 0x42, 0x2a, 0x08, 0xa9, 0x2f, 0x50, 0x11, 0x81, 0xe2, - 0xce, 0x30, 0xc0, 0x26, 0xb8, 0xb1, 0xc7, 0x63, 0x68, 0x72, 0xad, 0x5c, 0xa7, 0x8f, 0x25, 0xac, - 0x40, 0x6c, 0x90, 0xf8, 0x03, 0x20, 0x76, 0xac, 0x58, 0xf4, 0x17, 0xc0, 0x66, 0xc4, 0x6a, 0xc4, - 0x8a, 0x15, 0x1a, 0xb5, 0x0b, 0x24, 0xd8, 0xf1, 0x0b, 0x90, 0xef, 0xb5, 0x6f, 0xec, 0xc4, 0xa9, - 0xdd, 0x50, 0xcd, 0xaa, 0xb5, 0xcf, 0x77, 0x1e, 0xdf, 0x39, 0xe7, 0x9e, 0x7b, 0x1c, 0xc8, 0xd5, - 0x31, 0x69, 0x60, 0x52, 0x36, 0x5a, 0xb8, 0x6d, 0x95, 0x0f, 0x57, 0xca, 0xf6, 0xb1, 0x6c, 0xb5, - 0xb0, 0x8d, 0x85, 0x09, 0x26, 0x91, 0xa9, 0x44, 0x3e, 0x5c, 0x11, 0xb3, 0x06, 0x36, 0x30, 0x95, - 0x95, 0x9d, 0xff, 0x18, 0x4c, 0x9c, 0x63, 0xb0, 0x1a, 0x13, 0xb8, 0x3a, 0xae, 0xc8, 0xc0, 0xd8, - 0x38, 0xd0, 0xcb, 0xf4, 0x69, 0xbf, 0xfd, 0xa4, 0xac, 0x36, 0x4f, 0x5c, 0xd1, 0x7c, 0x8f, 0xdb, - 0x13, 0x4b, 0xf7, 0xf4, 0x66, 0x5d, 0x61, 0x83, 0x18, 0x8e, 0xa8, 0x41, 0x0c, 0x26, 0x90, 0x7e, - 0x40, 0x90, 0xa9, 0x12, 0x63, 0xb3, 0xa5, 0xab, 0xb6, 0xfe, 0xb6, 0xa3, 0x2a, 0xc8, 0x70, 0x4d, - 0xd5, 0x1a, 0x66, 0x33, 0x87, 0x8a, 0x68, 0x69, 0x6c, 0x23, 0xf7, 0xfb, 0xe9, 0x72, 0xd6, 0x0d, - 0x62, 0x5d, 0xd3, 0x5a, 0x3a, 0x21, 0x7b, 0x76, 0xcb, 0x6c, 0x1a, 0x0a, 0x83, 0x09, 0xaf, 0xc1, - 0x48, 0x43, 0x6f, 0xec, 0xeb, 0x2d, 0x92, 0x1b, 0x2a, 0x26, 0x97, 0xd2, 0x95, 0x59, 0xb9, 0x8b, - 0xa7, 0x5c, 0xa5, 0xf2, 0x8d, 0xd4, 0xb3, 0x3f, 0x0b, 0x09, 0xc5, 0x43, 0x0b, 0x22, 0x8c, 0x36, - 0x74, 0x5b, 0xd5, 0x54, 0x5b, 0xcd, 0x25, 0x1d, 0x5f, 0x0a, 0x7f, 0x5e, 0x83, 0x2f, 0xff, 0xfa, - 0xb9, 0xc4, 0x1c, 0x48, 0xab, 0x70, 0x23, 0x18, 0xa2, 0xa2, 0x13, 0x0b, 0x37, 0x89, 0x2e, 0xcc, - 0xc1, 0x28, 0xf5, 0x51, 0x33, 0x35, 0x1a, 0x6d, 0x4a, 0x19, 0xa1, 0xcf, 0x3b, 0x9a, 0x74, 0x8a, - 0x60, 0xa6, 0x4a, 0x8c, 0x47, 0x96, 0xe6, 0x69, 0x55, 0x5d, 0xb7, 0x97, 0xe5, 0xe7, 0x77, 0x32, - 0x14, 0x70, 0x22, 0x6c, 0x41, 0x86, 0x91, 0xa9, 0xb5, 0xa9, 0x1f, 0x92, 0x4b, 0xc6, 0xc9, 0xc0, - 0x38, 0x53, 0x62, 0xb1, 0x91, 0x00, 0xd7, 0x02, 0xdc, 0x0a, 0x8d, 0xda, 0xa3, 0x2c, 0xfd, 0x88, - 0x60, 0x3a, 0x88, 0x58, 0xa7, 0x51, 0x5e, 0x21, 0xab, 0x07, 0x30, 0xd6, 0xd4, 0x8f, 0x6a, 0xcc, - 0x5c, 0x32, 0xc2, 0xdc, 0x68, 0x53, 0x3f, 0xa2, 0x11, 0x04, 0x68, 0xdc, 0x82, 0xf9, 0x90, 0x20, - 0x39, 0x89, 0x6f, 0x10, 0x2d, 0x69, 0x80, 0x26, 0x2b, 0xfc, 0x55, 0xf2, 0x88, 0xdb, 0x5f, 0x45, - 0xc8, 0x87, 0x07, 0xc3, 0xe3, 0x7d, 0x81, 0x20, 0x1b, 0x6c, 0xc1, 0x5d, 0x7c, 0x60, 0xd6, 0x4f, - 0x5e, 0x52, 0xb4, 0xc2, 0x07, 0x30, 0xa1, 0xe9, 0x75, 0x93, 0x98, 0xb8, 0x59, 0xb3, 0xa8, 0xe7, - 0x5c, 0xaa, 0x88, 0x96, 0xd2, 0x95, 0xac, 0xcc, 0x06, 0x82, 0xec, 0x0d, 0x04, 0x79, 0xbd, 0x79, - 0xb2, 0x21, 0xfc, 0x76, 0xba, 0x9c, 0xd9, 0x72, 0x15, 0x58, 0xa4, 0x4a, 0x46, 0x0b, 0x3c, 0xaf, - 0x65, 0xbe, 0xfa, 0xbe, 0x90, 0xf0, 0x25, 0x41, 0x81, 0x9b, 0x61, 0x0c, 0xf9, 0x51, 0xab, 0xc0, - 0x88, 0xca, 0x18, 0x45, 0x72, 0xf5, 0x80, 0xd2, 0x2f, 0x08, 0xe6, 0x82, 0x99, 0x65, 0x46, 0x07, - 0xeb, 0x58, 0x5f, 0x04, 0x43, 0x31, 0x23, 0xb8, 0x8a, 0x56, 0xfe, 0x7b, 0x08, 0x72, 0xc1, 0xcc, - 0x3c, 0x36, 0xed, 0xa7, 0x03, 0xd6, 0x7f, 0xe0, 0x59, 0x79, 0x1b, 0x32, 0xac, 0x71, 0xba, 0x7a, - 0x64, 0xdc, 0x08, 0x9c, 0x9e, 0x0a, 0xcc, 0x30, 0x18, 0xeb, 0x92, 0x0e, 0x3a, 0x45, 0xd1, 0xd3, - 0x46, 0xa7, 0x08, 0x5c, 0x67, 0xa5, 0x4b, 0x47, 0x25, 0x6e, 0xbe, 0xae, 0x15, 0xd1, 0xd2, 0xa8, - 0x22, 0xf8, 0x74, 0xd6, 0x09, 0x2b, 0x5d, 0x48, 0x3f, 0x0e, 0xff, 0xcf, 0x7e, 0x4c, 0x39, 0xfd, - 0x28, 0x7d, 0x8d, 0xa0, 0xd8, 0x2f, 0xd9, 0x31, 0xa6, 0xbe, 0xf0, 0x0e, 0x64, 0x83, 0x5c, 0x62, - 0x36, 0x4c, 0x80, 0xa4, 0xdb, 0xbd, 0xaf, 0xc2, 0x2b, 0x7d, 0x9b, 0x97, 0x4f, 0x86, 0x7f, 0x10, - 0x48, 0x61, 0xa8, 0x20, 0xdb, 0x97, 0xd2, 0xeb, 0x21, 0x45, 0x49, 0x5e, 0xf1, 0x90, 0xb8, 0x07, - 0xa5, 0x68, 0xb2, 0x3c, 0x37, 0x3f, 0x21, 0x3a, 0x53, 0x7a, 0xe0, 0x03, 0xcf, 0xfa, 0x41, 0xb2, - 0x12, 0xf7, 0x12, 0x58, 0x84, 0x85, 0x8b, 0x62, 0xe5, 0xa4, 0xfe, 0x45, 0x30, 0x55, 0x25, 0xc6, - 0x5e, 0x7b, 0xbf, 0x61, 0xda, 0xbb, 0x2d, 0x6c, 0x61, 0xa2, 0x1e, 0x0c, 0x32, 0x1d, 0x85, 0x9b, - 0x30, 0x66, 0x51, 0x7d, 0x6f, 0x1a, 0x8c, 0x29, 0x9d, 0x17, 0x17, 0x5e, 0x07, 0xf7, 0x1d, 0x19, - 0x21, 0xaa, 0xa1, 0x93, 0x5c, 0x8a, 0x8e, 0x91, 0xd0, 0x12, 0x2b, 0x1c, 0x25, 0xdc, 0x85, 0x94, - 0x7e, 0xac, 0xd7, 0xe9, 0x91, 0xce, 0x54, 0x66, 0x7a, 0x86, 0xce, 0xf6, 0xb1, 0x5e, 0x57, 0x28, - 0x64, 0x4d, 0xf0, 0x6a, 0xde, 0x09, 0x46, 0x7a, 0x83, 0xce, 0xf1, 0x20, 0x67, 0x7e, 0x1c, 0x0b, - 0x90, 0xb6, 0xdc, 0x77, 0x9d, 0x13, 0x09, 0xde, 0xab, 0x1d, 0x4d, 0xfa, 0x8c, 0x6e, 0x2c, 0xce, - 0x41, 0xd6, 0x5a, 0xea, 0x11, 0xcf, 0x59, 0x94, 0xde, 0x20, 0xe5, 0x76, 0x17, 0x8f, 0x6e, 0x5f, - 0xbc, 0x7a, 0x67, 0x08, 0x46, 0xaa, 0xc4, 0xf8, 0x10, 0xdb, 0xd1, 0x71, 0x3b, 0xed, 0x79, 0x88, - 0x6d, 0xbd, 0x15, 0xe9, 0x9d, 0xc1, 0x84, 0x55, 0x18, 0xc6, 0x96, 0x6d, 0x62, 0x76, 0xd3, 0x64, - 0x2a, 0xf3, 0x3d, 0x69, 0x76, 0xfc, 0xbe, 0x4f, 0x21, 0x8a, 0x0b, 0x0d, 0xd4, 0x39, 0xd5, 0x55, - 0xe7, 0x4b, 0x54, 0x8d, 0xb5, 0x32, 0x8d, 0x43, 0x9a, 0x82, 0x09, 0x97, 0x23, 0xe7, 0x6d, 0x52, - 0xda, 0x0e, 0x3e, 0x9a, 0xf6, 0x7d, 0x18, 0x26, 0xa6, 0xd1, 0x8c, 0xc1, 0xdb, 0xc5, 0xad, 0xa5, - 0x1d, 0xe7, 0xee, 0x83, 0xeb, 0x9d, 0x86, 0xe6, 0x79, 0x3f, 0x80, 0xf1, 0x2a, 0x31, 0xde, 0xd5, - 0xd5, 0x43, 0xf7, 0x13, 0x63, 0x90, 0xe3, 0xd2, 0x7f, 0x75, 0x5a, 0xbb, 0xee, 0xf8, 0xe7, 0x2d, - 0x30, 0x4b, 0x17, 0xff, 0x8e, 0x37, 0x2f, 0x8c, 0x52, 0x09, 0x52, 0x34, 0x03, 0x59, 0x98, 0xdc, - 0xfe, 0x68, 0x7b, 0xb3, 0xf6, 0xe8, 0xbd, 0xbd, 0xdd, 0xed, 0xcd, 0x9d, 0xb7, 0x76, 0xb6, 0xb7, - 0x26, 0x13, 0xc2, 0x75, 0x18, 0xa5, 0x6f, 0x1f, 0x2a, 0x1f, 0x4f, 0xa2, 0xca, 0xaf, 0x69, 0x48, - 0x56, 0x89, 0x21, 0x3c, 0x86, 0xb4, 0xff, 0xdb, 0xa8, 0xd0, 0x7b, 0x5d, 0x07, 0x6e, 0x2b, 0xf1, - 0x4e, 0x04, 0x80, 0x9f, 0x9a, 0x03, 0x10, 0x42, 0xbe, 0x4d, 0x16, 0xc3, 0xd4, 0x7b, 0x71, 0xa2, - 0x1c, 0x0f, 0xc7, 0xbd, 0x3d, 0x81, 0xc9, 0x9e, 0x2f, 0x86, 0x85, 0x08, 0x1b, 0x14, 0x25, 0xde, - 0x8b, 0x83, 0xe2, 0x7e, 0x30, 0x4c, 0x87, 0x2d, 0xf5, 0x77, 0x22, 0xc3, 0x65, 0x40, 0xb1, 0x1c, - 0x13, 0xc8, 0x1d, 0x9a, 0x30, 0xd5, 0xbb, 0x95, 0xdf, 0x8e, 0x28, 0x02, 0x83, 0x89, 0xcb, 0xb1, - 0x60, 0xdc, 0x55, 0x1b, 0x66, 0xc2, 0x97, 0xc0, 0xbb, 0x11, 0x76, 0x3a, 0x50, 0x71, 0x25, 0x36, - 0x94, 0xbb, 0x3d, 0x86, 0x1b, 0x7d, 0x16, 0xe8, 0x52, 0x44, 0xb2, 0x7c, 0x58, 0xb1, 0x12, 0x1f, - 0xcb, 0x3d, 0x7f, 0x87, 0xa0, 0x10, 0xb5, 0xd8, 0xac, 0xc6, 0xb2, 0x1b, 0x54, 0x12, 0x5f, 0x1f, - 0x40, 0x89, 0x47, 0xf5, 0x05, 0x82, 0xb9, 0xfe, 0x2b, 0xc5, 0x72, 0x2c, 0xd3, 0xbc, 0xdf, 0x1e, - 0x5c, 0x0a, 0xce, 0x63, 0xf8, 0x14, 0x32, 0x5d, 0x0b, 0x80, 0x14, 0x66, 0x28, 0x88, 0x11, 0x4b, - 0xd1, 0x18, 0xff, 0x81, 0xed, 0xb9, 0x30, 0x43, 0x0f, 0x6c, 0x37, 0x2a, 0xfc, 0xc0, 0xf6, 0xbb, - 0x10, 0x85, 0x0d, 0x48, 0xd1, 0xcb, 0x30, 0x17, 0xa6, 0xe5, 0x48, 0xc4, 0x62, 0x3f, 0x89, 0xdf, - 0x06, 0x9d, 0xab, 0xa1, 0x36, 0x1c, 0x49, 0xb8, 0x0d, 0xff, 0x15, 0x21, 0x3c, 0x04, 0xf0, 0xdd, - 0x0f, 0xf9, 0x30, 0x7c, 0x47, 0x2e, 0x2e, 0x5e, 0x2c, 0xf7, 0xac, 0x6e, 0xbc, 0xf9, 0xec, 0x2c, - 0x8f, 0x9e, 0x9f, 0xe5, 0xd1, 0x8b, 0xb3, 0x3c, 0xfa, 0xf6, 0x3c, 0x9f, 0x78, 0x7e, 0x9e, 0x4f, - 0xfc, 0x71, 0x9e, 0x4f, 0x7c, 0xb2, 0x60, 0x98, 0xf6, 0xd3, 0xf6, 0xbe, 0x5c, 0xc7, 0x0d, 0xf7, - 0x17, 0x36, 0xf7, 0xcf, 0x32, 0xd1, 0x3e, 0x2f, 0x1f, 0xb3, 0x5f, 0xd1, 0xf6, 0x87, 0xe9, 0x3a, - 0xb5, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x4b, 0x31, 0x90, 0xd3, 0x13, 0x00, 0x00, + // 1276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0xb6, 0x6c, 0x37, 0x71, 0x9e, 0x1b, 0x27, 0x51, 0x9c, 0xd6, 0x51, 0x5a, 0xdb, 0x88, 0x34, + 0x49, 0x3d, 0x8d, 0x4c, 0x1c, 0x7a, 0x09, 0x4c, 0x99, 0x24, 0x35, 0x4c, 0x00, 0x43, 0x46, 0x69, + 0x29, 0x70, 0x31, 0x8a, 0xb5, 0x55, 0x35, 0xd8, 0x96, 0xd1, 0xca, 0x89, 0x73, 0x84, 0x13, 0xd0, + 0x0b, 0x33, 0xfd, 0x03, 0xcc, 0x70, 0xe1, 0xc8, 0xa1, 0x37, 0x6e, 0x70, 0xe9, 0x70, 0xea, 0x70, + 0x62, 0x38, 0x30, 0x4c, 0x72, 0xe0, 0xca, 0x4f, 0x60, 0xb4, 0x2b, 0xad, 0x2d, 0x5b, 0x8e, 0x14, + 0xe3, 0xc2, 0xa9, 0xb5, 0xde, 0xf7, 0xde, 0xfb, 0xbe, 0xb7, 0x6f, 0xf7, 0xed, 0x06, 0x32, 0x35, + 0x03, 0x37, 0x0c, 0x5c, 0xd4, 0x4c, 0xa3, 0xdd, 0x2a, 0x1e, 0x6d, 0x14, 0xad, 0x8e, 0xd4, 0x32, + 0x0d, 0xcb, 0xe0, 0x67, 0xa8, 0x45, 0x22, 0x16, 0xe9, 0x68, 0x43, 0x48, 0x6b, 0x86, 0x66, 0x10, + 0x5b, 0xd1, 0xfe, 0x1f, 0x85, 0x09, 0x8b, 0x14, 0x56, 0xa5, 0x06, 0xc7, 0xc7, 0x31, 0x69, 0x86, + 0xa1, 0xd5, 0x51, 0x91, 0xfc, 0x3a, 0x6c, 0x3f, 0x2c, 0x2a, 0xcd, 0x13, 0xc7, 0xb4, 0x34, 0x90, + 0xf6, 0xa4, 0x85, 0x5c, 0xbf, 0xab, 0x8e, 0xb1, 0x81, 0x35, 0xdb, 0xd4, 0xc0, 0x1a, 0x35, 0x88, + 0xdf, 0x73, 0x90, 0xaa, 0x60, 0x6d, 0xd7, 0x44, 0x8a, 0x85, 0xde, 0xb2, 0x5d, 0x79, 0x09, 0x2e, + 0x29, 0x6a, 0x43, 0x6f, 0x66, 0xb8, 0x3c, 0xb7, 0x36, 0xb5, 0x93, 0xf9, 0xf5, 0xe9, 0x7a, 0xda, + 0x21, 0xb1, 0xad, 0xaa, 0x26, 0xc2, 0xf8, 0xc0, 0x32, 0xf5, 0xa6, 0x26, 0x53, 0x18, 0x7f, 0x07, + 0x26, 0x1b, 0xa8, 0x71, 0x88, 0x4c, 0x9c, 0x89, 0xe6, 0x63, 0x6b, 0xc9, 0x52, 0x56, 0xea, 0xd3, + 0x29, 0x55, 0x88, 0x5d, 0x46, 0x9f, 0xb5, 0x11, 0xb6, 0x76, 0xe2, 0xcf, 0xfe, 0xc8, 0x45, 0x64, + 0xd7, 0x89, 0x17, 0x20, 0xd1, 0x40, 0x96, 0xa2, 0x2a, 0x96, 0x92, 0x89, 0xd9, 0x29, 0x65, 0xf6, + 0x7b, 0x0b, 0xbe, 0xf8, 0xeb, 0x87, 0x02, 0xcd, 0x23, 0x6e, 0xc2, 0x15, 0x2f, 0x53, 0x19, 0xe1, + 0x96, 0xd1, 0xc4, 0x88, 0x5f, 0x84, 0x04, 0x49, 0x55, 0xd5, 0x55, 0x42, 0x3a, 0x2e, 0x4f, 0x92, + 0xdf, 0x7b, 0xaa, 0xf8, 0x23, 0x07, 0x0b, 0x15, 0xac, 0xdd, 0x6f, 0xa9, 0xae, 0x57, 0xc5, 0x49, + 0x7b, 0x51, 0x99, 0xbd, 0x49, 0xa2, 0x9e, 0x24, 0xfc, 0x3b, 0x90, 0xa2, 0x62, 0xaa, 0x6d, 0x92, + 0x07, 0x67, 0x62, 0x17, 0x28, 0xc4, 0x34, 0xf5, 0xa5, 0x14, 0xb1, 0x47, 0x72, 0x0e, 0xae, 0xfb, + 0x92, 0x77, 0x95, 0x8b, 0xdf, 0x71, 0x30, 0xef, 0x45, 0x6c, 0x13, 0xb2, 0x63, 0x14, 0x77, 0x1b, + 0xa6, 0x9a, 0xe8, 0xb8, 0x4a, 0xc3, 0xc5, 0x02, 0xc2, 0x25, 0x9a, 0xe8, 0x98, 0x30, 0xf0, 0xc8, + 0xb8, 0x0e, 0x4b, 0x3e, 0x24, 0x99, 0x88, 0xc7, 0x1c, 0x59, 0x59, 0x8f, 0x4c, 0xba, 0xfe, 0xe3, + 0xd4, 0x11, 0xb6, 0xcd, 0xf2, 0x90, 0xf5, 0x27, 0xc3, 0xf8, 0xfe, 0xcd, 0x41, 0xda, 0xdb, 0x89, + 0xfb, 0x46, 0x5d, 0xaf, 0x9d, 0xfc, 0x47, 0x6c, 0x79, 0x05, 0x66, 0x54, 0x54, 0xd3, 0xb1, 0x6e, + 0x34, 0xab, 0x2d, 0x92, 0x39, 0x13, 0xcf, 0x73, 0x6b, 0xc9, 0x52, 0x5a, 0xa2, 0xc7, 0x83, 0xe4, + 0x1e, 0x0f, 0xd2, 0x76, 0xf3, 0x64, 0x47, 0xfc, 0xe5, 0xe9, 0x7a, 0xb6, 0xbf, 0x11, 0xef, 0x3a, + 0x01, 0x28, 0x73, 0x39, 0xa5, 0x7a, 0x7e, 0x6f, 0xa5, 0xbe, 0xfc, 0x36, 0x17, 0xe9, 0x29, 0x8a, + 0x0c, 0xd7, 0xfc, 0x14, 0xb3, 0x1d, 0x58, 0x82, 0x49, 0x85, 0x2a, 0x0c, 0xd4, 0xee, 0x02, 0xc5, + 0xdf, 0x39, 0x58, 0xf4, 0x56, 0x9a, 0x06, 0x1d, 0xad, 0x83, 0xdf, 0x86, 0x34, 0xad, 0x25, 0xad, + 0x48, 0xd5, 0xa5, 0x13, 0x0d, 0x70, 0xe7, 0xb5, 0xde, 0xcc, 0xc4, 0x32, 0x8e, 0x96, 0x7f, 0x1c, + 0x83, 0x8c, 0xb7, 0x62, 0x0f, 0x74, 0xeb, 0xd1, 0x88, 0x7d, 0xf2, 0x6f, 0x4f, 0xd8, 0x1b, 0x90, + 0xa2, 0xb5, 0xe9, 0x6b, 0xa9, 0x69, 0xcd, 0xb3, 0xd9, 0x4a, 0xb0, 0xe0, 0x29, 0x21, 0x43, 0xc7, + 0x09, 0x7a, 0xbe, 0xa7, 0x52, 0xcc, 0x67, 0xa3, 0xcf, 0x47, 0xc1, 0x4e, 0xd9, 0x2e, 0xe5, 0xb9, + 0xb5, 0x84, 0xb7, 0xba, 0x98, 0xae, 0xac, 0x4f, 0xfb, 0x4e, 0xbc, 0xe0, 0xf6, 0xfd, 0x8a, 0x83, + 0xfc, 0xb0, 0xd5, 0x08, 0x31, 0x45, 0xc6, 0xd9, 0x5c, 0xe2, 0xcb, 0xf0, 0xd2, 0xd0, 0xae, 0x67, + 0x47, 0xcc, 0x93, 0x28, 0x88, 0x7e, 0x28, 0xaf, 0xee, 0xff, 0x75, 0x93, 0xf8, 0x2c, 0x63, 0xec, + 0x05, 0x2f, 0xe3, 0x2d, 0x28, 0x04, 0x17, 0x85, 0xd5, 0xf0, 0x27, 0x8e, 0x1c, 0x5a, 0x03, 0xf0, + 0x91, 0x87, 0xcb, 0x38, 0xab, 0x17, 0x76, 0x1a, 0xad, 0xc0, 0xf2, 0x79, 0x1a, 0x98, 0xd8, 0xaf, + 0xa3, 0x30, 0x57, 0xc1, 0xda, 0x41, 0xfb, 0xb0, 0xa1, 0x5b, 0xfb, 0xa6, 0xd1, 0x32, 0xb0, 0x52, + 0x1f, 0xca, 0x98, 0x1b, 0x81, 0xf1, 0x35, 0x98, 0x6a, 0x91, 0xb8, 0xee, 0x31, 0x34, 0x25, 0x77, + 0x3f, 0x9c, 0x3b, 0xaf, 0x5e, 0xb1, 0x6d, 0x18, 0x2b, 0x1a, 0xc2, 0x99, 0x38, 0x39, 0xbf, 0x7c, + 0x5b, 0x44, 0x66, 0x28, 0xfe, 0x26, 0xc4, 0x51, 0x07, 0xd5, 0xc8, 0x21, 0x92, 0x2a, 0x2d, 0x0c, + 0x9c, 0x76, 0xe5, 0x0e, 0xaa, 0xc9, 0x04, 0xb2, 0xc5, 0xbb, 0x3d, 0xd2, 0x25, 0x23, 0xbe, 0x4e, + 0x06, 0x8b, 0xb7, 0x16, 0x6c, 0x9b, 0xe7, 0x20, 0xd9, 0x72, 0xbe, 0x75, 0x77, 0x3a, 0xb8, 0x9f, + 0xf6, 0x54, 0xb1, 0x43, 0xae, 0x54, 0xf6, 0x01, 0xa1, 0x9a, 0xca, 0x31, 0xab, 0x65, 0x90, 0x5f, + 0xef, 0x0c, 0x8c, 0x86, 0x9c, 0x81, 0x5b, 0x97, 0x6d, 0xe6, 0x6c, 0x22, 0xd2, 0x7b, 0x52, 0x7f, + 0x66, 0xb6, 0xc6, 0xa7, 0x1c, 0x4c, 0x56, 0xb0, 0xf6, 0x81, 0x61, 0x05, 0xab, 0xb0, 0x9b, 0xfb, + 0xc8, 0xb0, 0x90, 0x19, 0xc8, 0x85, 0xc2, 0xf8, 0x4d, 0x98, 0x30, 0x5a, 0x96, 0x6e, 0xd0, 0x81, + 0x97, 0x2a, 0x2d, 0x0d, 0x14, 0xdd, 0xce, 0xfb, 0x3e, 0x81, 0xc8, 0x0e, 0xd4, 0xb3, 0xea, 0xf1, + 0xbe, 0x55, 0xbf, 0xc0, 0x1a, 0xd2, 0x86, 0x27, 0x3c, 0xc4, 0x39, 0x98, 0x71, 0x34, 0x32, 0xdd, + 0x0d, 0x22, 0xdb, 0xc6, 0x07, 0xcb, 0x7e, 0x15, 0x12, 0x76, 0xc8, 0xb6, 0x65, 0x04, 0x2b, 0x67, + 0xc8, 0xad, 0xa4, 0x4d, 0x60, 0x02, 0xeb, 0x5a, 0x13, 0x99, 0xa2, 0x4c, 0x18, 0x10, 0x7a, 0x6e, + 0xcf, 0xbc, 0x01, 0x13, 0x26, 0xc2, 0xed, 0xba, 0x45, 0x62, 0xa6, 0x4a, 0xab, 0x03, 0x6a, 0xdc, + 0xc5, 0x2a, 0x3b, 0x21, 0x65, 0x02, 0x97, 0x1d, 0x37, 0xb1, 0x0e, 0xd3, 0x15, 0xac, 0xbd, 0x8b, + 0x94, 0x23, 0xe7, 0x91, 0x35, 0xc2, 0x85, 0xe9, 0x9c, 0xeb, 0x62, 0x5f, 0x1f, 0x5d, 0x25, 0x6f, + 0x9e, 0x6e, 0x36, 0x57, 0x47, 0xa1, 0x00, 0x71, 0x52, 0xc6, 0x34, 0xcc, 0x96, 0x3f, 0x2c, 0xef, + 0x56, 0xef, 0xbf, 0x77, 0xb0, 0x5f, 0xde, 0xdd, 0x7b, 0x73, 0xaf, 0x7c, 0x77, 0x36, 0xc2, 0x5f, + 0x86, 0x04, 0xf9, 0x7a, 0x4f, 0xfe, 0x68, 0x96, 0x2b, 0xfd, 0x9c, 0x84, 0x58, 0x05, 0x6b, 0xfc, + 0x03, 0x48, 0xf6, 0xbe, 0x0e, 0x73, 0x83, 0x57, 0x0f, 0xcf, 0x60, 0x15, 0x56, 0x03, 0x00, 0xac, + 0xa8, 0x75, 0xe0, 0x7d, 0x9e, 0x65, 0x2b, 0x7e, 0xee, 0x83, 0x38, 0x41, 0x0a, 0x87, 0x63, 0xd9, + 0x1e, 0xc2, 0xec, 0xc0, 0x2b, 0x69, 0x39, 0x20, 0x06, 0x41, 0x09, 0xb7, 0xc2, 0xa0, 0x58, 0x1e, + 0x03, 0xe6, 0xfd, 0x1e, 0x32, 0xab, 0x81, 0x74, 0x29, 0x50, 0x28, 0x86, 0x04, 0xb2, 0x84, 0x3a, + 0xcc, 0x0d, 0xbe, 0x44, 0x6e, 0x04, 0x2c, 0x02, 0x85, 0x09, 0xeb, 0xa1, 0x60, 0x2c, 0x55, 0x1b, + 0x16, 0xfc, 0x2f, 0xb4, 0x37, 0x03, 0xe2, 0x74, 0xa1, 0xc2, 0x46, 0x68, 0x28, 0x4b, 0xdb, 0x81, + 0x2b, 0x43, 0x1e, 0x09, 0x85, 0x80, 0x62, 0xf5, 0x60, 0x85, 0x52, 0x78, 0x2c, 0xcb, 0xfc, 0x84, + 0x83, 0x5c, 0xd0, 0x1d, 0x6c, 0x33, 0x54, 0x5c, 0xaf, 0x93, 0xf0, 0xda, 0x08, 0x4e, 0x8c, 0xd5, + 0xe7, 0x1c, 0x2c, 0x0e, 0xbf, 0xd5, 0xac, 0x87, 0x0a, 0xcd, 0xfa, 0xed, 0xf6, 0x85, 0xe0, 0x8c, + 0xc3, 0x27, 0x90, 0xea, 0xbb, 0x6b, 0x88, 0x7e, 0x81, 0xbc, 0x18, 0xa1, 0x10, 0x8c, 0xe9, 0xdd, + 0xb0, 0x03, 0x33, 0xd8, 0x77, 0xc3, 0xf6, 0xa3, 0xfc, 0x37, 0xec, 0xb0, 0xa9, 0xca, 0xef, 0x40, + 0x9c, 0x4c, 0xd4, 0x8c, 0x9f, 0x97, 0x6d, 0x11, 0xf2, 0xc3, 0x2c, 0xbd, 0x31, 0xc8, 0xb9, 0xea, + 0x1b, 0xc3, 0xb6, 0xf8, 0xc7, 0xf0, 0xcc, 0x98, 0x7b, 0x00, 0x3d, 0xf3, 0x21, 0xeb, 0x87, 0xef, + 0xda, 0x85, 0x95, 0xf3, 0xed, 0x6e, 0xd4, 0x9d, 0x3b, 0xcf, 0x4e, 0xb3, 0xdc, 0xf3, 0xd3, 0x2c, + 0xf7, 0xe7, 0x69, 0x96, 0xfb, 0xe6, 0x2c, 0x1b, 0x79, 0x7e, 0x96, 0x8d, 0xfc, 0x76, 0x96, 0x8d, + 0x7c, 0xbc, 0xac, 0xe9, 0xd6, 0xa3, 0xf6, 0xa1, 0x54, 0x33, 0x1a, 0xce, 0xdf, 0x18, 0x9d, 0x7f, + 0xd6, 0xb1, 0xfa, 0x69, 0xb1, 0x43, 0xff, 0x8e, 0x78, 0x38, 0x41, 0x6e, 0x68, 0x9b, 0xff, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xee, 0x01, 0x59, 0xf1, 0xd5, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1597,7 +1610,7 @@ type MsgClient interface { UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) // SubmitProposal submits a new proposal. SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) // Vote allows a voter to vote on a proposal. Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) @@ -1763,7 +1776,7 @@ type MsgServer interface { UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) // SubmitProposal submits a new proposal. SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) // Vote allows a voter to vote on a proposal. Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) @@ -2533,10 +2546,10 @@ func (m *MsgUpdateGroupPolicyAdmin) MarshalToSizedBuffer(dAtA []byte) (int, erro i-- dAtA[i] = 0x1a } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.GroupPolicyAddress) > 0 { + i -= len(m.GroupPolicyAddress) + copy(dAtA[i:], m.GroupPolicyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupPolicyAddress))) i-- dAtA[i] = 0x12 } @@ -2720,10 +2733,10 @@ func (m *MsgUpdateGroupPolicyDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) ( i-- dAtA[i] = 0x1a } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.GroupPolicyAddress) > 0 { + i -= len(m.GroupPolicyAddress) + copy(dAtA[i:], m.GroupPolicyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupPolicyAddress))) i-- dAtA[i] = 0x12 } @@ -2787,10 +2800,10 @@ func (m *MsgUpdateGroupPolicyMetadata) MarshalToSizedBuffer(dAtA []byte) (int, e i-- dAtA[i] = 0x1a } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.GroupPolicyAddress) > 0 { + i -= len(m.GroupPolicyAddress) + copy(dAtA[i:], m.GroupPolicyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupPolicyAddress))) i-- dAtA[i] = 0x12 } @@ -2882,10 +2895,10 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.GroupPolicyAddress) > 0 { + i -= len(m.GroupPolicyAddress) + copy(dAtA[i:], m.GroupPolicyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GroupPolicyAddress))) i-- dAtA[i] = 0xa } @@ -3073,10 +3086,10 @@ func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + if len(m.Executor) > 0 { + i -= len(m.Executor) + copy(dAtA[i:], m.Executor) + i = encodeVarintTx(dAtA, i, uint64(len(m.Executor))) i-- dAtA[i] = 0x12 } @@ -3108,6 +3121,11 @@ func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Result != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x10 + } return len(dAtA) - i, nil } @@ -3351,7 +3369,7 @@ func (m *MsgUpdateGroupPolicyAdmin) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) + l = len(m.GroupPolicyAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3431,7 +3449,7 @@ func (m *MsgUpdateGroupPolicyDecisionPolicy) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) + l = len(m.GroupPolicyAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3461,7 +3479,7 @@ func (m *MsgUpdateGroupPolicyMetadata) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) + l = len(m.GroupPolicyAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3487,7 +3505,7 @@ func (m *MsgSubmitProposal) Size() (n int) { } var l int _ = l - l = len(m.Address) + l = len(m.GroupPolicyAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3594,7 +3612,7 @@ func (m *MsgExec) Size() (n int) { if m.ProposalId != 0 { n += 1 + sovTx(uint64(m.ProposalId)) } - l = len(m.Signer) + l = len(m.Executor) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3607,6 +3625,9 @@ func (m *MsgExecResponse) Size() (n int) { } var l int _ = l + if m.Result != 0 { + n += 1 + sovTx(uint64(m.Result)) + } return n } @@ -3731,7 +3752,7 @@ func (m *MsgCreateGroup) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Members = append(m.Members, Member{}) + m.Members = append(m.Members, MemberRequest{}) if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3967,7 +3988,7 @@ func (m *MsgUpdateGroupMembers) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MemberUpdates = append(m.MemberUpdates, Member{}) + m.MemberUpdates = append(m.MemberUpdates, MemberRequest{}) if err := m.MemberUpdates[len(m.MemberUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4723,7 +4744,7 @@ func (m *MsgUpdateGroupPolicyAdmin) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4751,7 +4772,7 @@ func (m *MsgUpdateGroupPolicyAdmin) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -4896,7 +4917,7 @@ func (m *MsgCreateGroupWithPolicy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Members = append(m.Members, Member{}) + m.Members = append(m.Members, MemberRequest{}) if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5256,7 +5277,7 @@ func (m *MsgUpdateGroupPolicyDecisionPolicy) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5284,7 +5305,7 @@ func (m *MsgUpdateGroupPolicyDecisionPolicy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5456,7 +5477,7 @@ func (m *MsgUpdateGroupPolicyMetadata) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5484,7 +5505,7 @@ func (m *MsgUpdateGroupPolicyMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5620,7 +5641,7 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5648,7 +5669,7 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -6279,7 +6300,7 @@ func (m *MsgExec) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Executor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6307,7 +6328,7 @@ func (m *MsgExec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = string(dAtA[iNdEx:postIndex]) + m.Executor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6359,6 +6380,25 @@ func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + m.Result = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= ProposalExecutorResult(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/group/types.go b/x/group/types.go index 6dcab3c33848..f6b757f4d70d 100644 --- a/x/group/types.go +++ b/x/group/types.go @@ -4,8 +4,6 @@ import ( "fmt" "time" - proto "github.com/gogo/protobuf/proto" - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -15,8 +13,14 @@ import ( "github.com/cosmos/cosmos-sdk/x/group/internal/orm" ) +// DecisionPolicyResult is the result of whether a proposal passes or not a +// decision policy. type DecisionPolicyResult struct { + // Allow determines if the proposal is allowed to pass. Allow bool + // Final determines if the tally result is final or not. If final, then + // votes are pruned, and the tally result is saved in the proposal's + // `FinalTallyResult` field. Final bool } @@ -68,16 +72,16 @@ func (p ThresholdDecisionPolicy) Allow(tallyResult TallyResult, totalPower strin threshold, err := math.NewPositiveDecFromString(p.Threshold) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "threshold") } yesCount, err := math.NewNonNegativeDecFromString(tallyResult.YesCount) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "yes count") } totalPowerDec, err := math.NewNonNegativeDecFromString(totalPower) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "total power") } // the real threshold of the policy is `min(threshold,total_weight)`. If @@ -181,15 +185,15 @@ func (p PercentageDecisionPolicy) Allow(tally TallyResult, totalPower string, si percentage, err := math.NewPositiveDecFromString(p.Percentage) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "percentage") } yesCount, err := math.NewNonNegativeDecFromString(tally.YesCount) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "yes count") } totalPowerDec, err := math.NewNonNegativeDecFromString(totalPower) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "total power") } yesPercentage, err := yesCount.Quo(totalPowerDec) @@ -227,7 +231,8 @@ var _ orm.Validateable = GroupPolicyInfo{} // NewGroupPolicyInfo creates a new GroupPolicyInfo instance func NewGroupPolicyInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddress, metadata string, - version uint64, decisionPolicy DecisionPolicy, createdAt time.Time) (GroupPolicyInfo, error) { + version uint64, decisionPolicy DecisionPolicy, createdAt time.Time, +) (GroupPolicyInfo, error) { p := GroupPolicyInfo{ Address: address.String(), GroupId: group, @@ -246,11 +251,7 @@ func NewGroupPolicyInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddre } func (g *GroupPolicyInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { - msg, ok := decisionPolicy.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %T", msg) - } - any, err := codectypes.NewAnyWithValue(msg) + any, err := codectypes.NewAnyWithValue(decisionPolicy) if err != nil { return err } @@ -258,12 +259,13 @@ func (g *GroupPolicyInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error return nil } -func (g GroupPolicyInfo) GetDecisionPolicy() DecisionPolicy { +func (g GroupPolicyInfo) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := g.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), g.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + + return decisionPolicy, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -296,10 +298,8 @@ func (g GroupInfo) ValidateBasic() error { } func (g GroupPolicyInfo) PrimaryKeyFields() []interface{} { - addr, err := sdk.AccAddressFromBech32(g.Address) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(g.Address) + return []interface{}{addr.Bytes()} } @@ -323,11 +323,11 @@ func (g GroupPolicyInfo) ValidateBasic() error { if g.Version == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "group policy version") } - policy := g.GetDecisionPolicy() - - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "group policy's decision policy") + policy, err := g.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "group policy decision policy") } + if err := policy.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "group policy's decision policy") } @@ -335,10 +335,8 @@ func (g GroupPolicyInfo) ValidateBasic() error { } func (g GroupMember) PrimaryKeyFields() []interface{} { - addr, err := sdk.AccAddressFromBech32(g.Member.Address) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(g.Member.Address) + return []interface{}{g.GroupId, addr.Bytes()} } @@ -347,19 +345,30 @@ func (g GroupMember) ValidateBasic() error { return sdkerrors.Wrap(errors.ErrEmpty, "group member's group id") } - err := g.Member.ValidateBasic() + err := MemberToMemberRequest(g.Member).ValidateBasic() if err != nil { return sdkerrors.Wrap(err, "group member") } return nil } -func (p Proposal) ValidateBasic() error { +// MemberToMemberRequest converts a `Member` (used for storage) +// to a `MemberRequest` (used in requests). The only difference +// between the two is that `MemberRequest` doesn't have any `AddedAt` field +// since it cannot be set as part of requests. +func MemberToMemberRequest(m *Member) MemberRequest { + return MemberRequest{ + Address: m.Address, + Weight: m.Weight, + Metadata: m.Metadata, + } +} +func (p Proposal) ValidateBasic() error { if p.Id == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "proposal id") } - _, err := sdk.AccAddressFromBech32(p.Address) + _, err := sdk.AccAddressFromBech32(p.GroupPolicyAddress) if err != nil { return sdkerrors.Wrap(err, "proposal group policy address") } @@ -389,17 +398,14 @@ func (p Proposal) ValidateBasic() error { } func (v Vote) PrimaryKeyFields() []interface{} { - addr, err := sdk.AccAddressFromBech32(v.Voter) - if err != nil { - panic(err) - } + addr := sdk.MustAccAddressFromBech32(v.Voter) + return []interface{}{v.ProposalId, addr.Bytes()} } var _ orm.Validateable = Vote{} func (v Vote) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(v.Voter) if err != nil { return sdkerrors.Wrap(err, "voter") diff --git a/x/group/types.pb.go b/x/group/types.pb.go index 7da01bbd141b..5815d7da7138 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -34,7 +34,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type VoteOption int32 const ( - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + // VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + // return an error. VOTE_OPTION_UNSPECIFIED VoteOption = 0 // VOTE_OPTION_YES defines a yes vote option. VOTE_OPTION_YES VoteOption = 1 @@ -76,31 +77,38 @@ type ProposalStatus int32 const ( // An empty value is invalid and not allowed. PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 - // Initial status of a proposal when persisted. + // Initial status of a proposal when submitted. PROPOSAL_STATUS_SUBMITTED ProposalStatus = 1 - // Final status of a proposal when the final tally was executed. - PROPOSAL_STATUS_CLOSED ProposalStatus = 2 - // Final status of a proposal when the group was modified before the final tally. - PROPOSAL_STATUS_ABORTED ProposalStatus = 3 - // A proposal can be deleted before the voting start time by the owner. When this happens the final status - // is Withdrawn. - PROPOSAL_STATUS_WITHDRAWN ProposalStatus = 4 + // Final status of a proposal when the final tally is done and the outcome + // passes the group policy's decision policy. + PROPOSAL_STATUS_ACCEPTED ProposalStatus = 2 + // Final status of a proposal when the final tally is done and the outcome + // is rejected by the group policy's decision policy. + PROPOSAL_STATUS_REJECTED ProposalStatus = 3 + // Final status of a proposal when the group policy is modified before the + // final tally. + PROPOSAL_STATUS_ABORTED ProposalStatus = 4 + // A proposal can be withdrawn before the voting start time by the owner. + // When this happens the final status is Withdrawn. + PROPOSAL_STATUS_WITHDRAWN ProposalStatus = 5 ) var ProposalStatus_name = map[int32]string{ 0: "PROPOSAL_STATUS_UNSPECIFIED", 1: "PROPOSAL_STATUS_SUBMITTED", - 2: "PROPOSAL_STATUS_CLOSED", - 3: "PROPOSAL_STATUS_ABORTED", - 4: "PROPOSAL_STATUS_WITHDRAWN", + 2: "PROPOSAL_STATUS_ACCEPTED", + 3: "PROPOSAL_STATUS_REJECTED", + 4: "PROPOSAL_STATUS_ABORTED", + 5: "PROPOSAL_STATUS_WITHDRAWN", } var ProposalStatus_value = map[string]int32{ "PROPOSAL_STATUS_UNSPECIFIED": 0, "PROPOSAL_STATUS_SUBMITTED": 1, - "PROPOSAL_STATUS_CLOSED": 2, - "PROPOSAL_STATUS_ABORTED": 3, - "PROPOSAL_STATUS_WITHDRAWN": 4, + "PROPOSAL_STATUS_ACCEPTED": 2, + "PROPOSAL_STATUS_REJECTED": 3, + "PROPOSAL_STATUS_ABORTED": 4, + "PROPOSAL_STATUS_WITHDRAWN": 5, } func (x ProposalStatus) String() string { @@ -111,42 +119,6 @@ func (ProposalStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f5bddd15d7a54a9d, []int{1} } -// ProposalResult defines types of proposal results. -type ProposalResult int32 - -const ( - // An empty value is invalid and not allowed - PROPOSAL_RESULT_UNSPECIFIED ProposalResult = 0 - // Until a final tally has happened the status is unfinalized - PROPOSAL_RESULT_UNFINALIZED ProposalResult = 1 - // Final result of the tally - PROPOSAL_RESULT_ACCEPTED ProposalResult = 2 - // Final result of the tally - PROPOSAL_RESULT_REJECTED ProposalResult = 3 -) - -var ProposalResult_name = map[int32]string{ - 0: "PROPOSAL_RESULT_UNSPECIFIED", - 1: "PROPOSAL_RESULT_UNFINALIZED", - 2: "PROPOSAL_RESULT_ACCEPTED", - 3: "PROPOSAL_RESULT_REJECTED", -} - -var ProposalResult_value = map[string]int32{ - "PROPOSAL_RESULT_UNSPECIFIED": 0, - "PROPOSAL_RESULT_UNFINALIZED": 1, - "PROPOSAL_RESULT_ACCEPTED": 2, - "PROPOSAL_RESULT_REJECTED": 3, -} - -func (x ProposalResult) String() string { - return proto.EnumName(ProposalResult_name, int32(x)) -} - -func (ProposalResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f5bddd15d7a54a9d, []int{2} -} - // ProposalExecutorResult defines types of proposal executor results. type ProposalExecutorResult int32 @@ -180,17 +152,17 @@ func (x ProposalExecutorResult) String() string { } func (ProposalExecutorResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f5bddd15d7a54a9d, []int{3} + return fileDescriptor_f5bddd15d7a54a9d, []int{2} } // Member represents a group member with an account address, -// non-zero weight and metadata. +// non-zero weight, metadata and added_at timestamp. type Member struct { // address is the member's account address. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // weight is the member's voting weight that should be greater than 0. Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - // metadata is any arbitrary metadata to attached to the member. + // metadata is any arbitrary metadata attached to the member. Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // added_at is a timestamp specifying when a member was added. AddedAt time.Time `protobuf:"bytes,4,opt,name=added_at,json=addedAt,proto3,stdtime" json:"added_at"` @@ -257,24 +229,30 @@ func (m *Member) GetAddedAt() time.Time { return time.Time{} } -// Members defines a repeated slice of Member objects. -type Members struct { - // members is the list of members. - Members []Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` +// MemberRequest represents a group member to be used in Msg server requests. +// Contrary to `Member`, it doesn't have any `added_at` field +// since this field cannot be set as part of requests. +type MemberRequest struct { + // address is the member's account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // weight is the member's voting weight that should be greater than 0. + Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` + // metadata is any arbitrary metadata attached to the member. + Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` } -func (m *Members) Reset() { *m = Members{} } -func (m *Members) String() string { return proto.CompactTextString(m) } -func (*Members) ProtoMessage() {} -func (*Members) Descriptor() ([]byte, []int) { +func (m *MemberRequest) Reset() { *m = MemberRequest{} } +func (m *MemberRequest) String() string { return proto.CompactTextString(m) } +func (*MemberRequest) ProtoMessage() {} +func (*MemberRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f5bddd15d7a54a9d, []int{1} } -func (m *Members) XXX_Unmarshal(b []byte) error { +func (m *MemberRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Members) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MemberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Members.Marshal(b, m, deterministic) + return xxx_messageInfo_MemberRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -284,28 +262,48 @@ func (m *Members) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Members) XXX_Merge(src proto.Message) { - xxx_messageInfo_Members.Merge(m, src) +func (m *MemberRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberRequest.Merge(m, src) } -func (m *Members) XXX_Size() int { +func (m *MemberRequest) XXX_Size() int { return m.Size() } -func (m *Members) XXX_DiscardUnknown() { - xxx_messageInfo_Members.DiscardUnknown(m) +func (m *MemberRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MemberRequest.DiscardUnknown(m) } -var xxx_messageInfo_Members proto.InternalMessageInfo +var xxx_messageInfo_MemberRequest proto.InternalMessageInfo -func (m *Members) GetMembers() []Member { +func (m *MemberRequest) GetAddress() string { if m != nil { - return m.Members + return m.Address } - return nil + return "" } -// ThresholdDecisionPolicy implements the DecisionPolicy interface +func (m *MemberRequest) GetWeight() string { + if m != nil { + return m.Weight + } + return "" +} + +func (m *MemberRequest) GetMetadata() string { + if m != nil { + return m.Metadata + } + return "" +} + +// ThresholdDecisionPolicy is a decision policy where a proposal passes when it +// satisfies the two following conditions: +// 1. The sum of all `YES` voters' weights is greater or equal than the defined +// `threshold`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. type ThresholdDecisionPolicy struct { - // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. + // threshold is the minimum weighted sum of `YES` votes that must be met or + // exceeded for a proposal to succeed. Threshold string `protobuf:"bytes,1,opt,name=threshold,proto3" json:"threshold,omitempty"` // windows defines the different windows for voting and execution. Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"` @@ -358,9 +356,15 @@ func (m *ThresholdDecisionPolicy) GetWindows() *DecisionPolicyWindows { return nil } -// PercentageDecisionPolicy implements the DecisionPolicy interface +// PercentageDecisionPolicy is a decision policy where a proposal passes when +// it satisfies the two following conditions: +// 1. The percentage of all `YES` voters' weights out of the total group weight +// is greater or equal than the given `percentage`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. type PercentageDecisionPolicy struct { - // percentage is the minimum percentage the weighted sum of yes votes must meet for a proposal to succeed. + // percentage is the minimum percentage the weighted sum of `YES` votes must + // meet for a proposal to succeed. Percentage string `protobuf:"bytes,1,opt,name=percentage,proto3" json:"percentage,omitempty"` // windows defines the different windows for voting and execution. Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"` @@ -687,40 +691,39 @@ var xxx_messageInfo_GroupPolicyInfo proto.InternalMessageInfo type Proposal struct { // id is the unique id of the proposal. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // address is the account address of group policy. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // group_policy_address is the account address of group policy. + GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"` // metadata is any arbitrary metadata to attached to the proposal. Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // proposers are the account addresses of the proposers. Proposers []string `protobuf:"bytes,4,rep,name=proposers,proto3" json:"proposers,omitempty"` // submit_time is a timestamp specifying when a proposal was submitted. SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"` - // group_version tracks the version of the group that this proposal corresponds to. - // When group membership is changed, existing proposals from previous group versions will become invalid. + // group_version tracks the version of the group at proposal submission. + // This field is here for informational purposes only. GroupVersion uint64 `protobuf:"varint,6,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"` - // group_policy_version tracks the version of the group policy that this proposal corresponds to. - // When a decision policy is changed, existing proposals from previous policy versions will become invalid. + // group_policy_version tracks the version of the group policy at proposal submission. + // When a decision policy is changed, existing proposals from previous policy + // versions will become invalid with the `ABORTED` status. + // This field is here for informational purposes only. GroupPolicyVersion uint64 `protobuf:"varint,7,opt,name=group_policy_version,json=groupPolicyVersion,proto3" json:"group_policy_version,omitempty"` // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. Status ProposalStatus `protobuf:"varint,8,opt,name=status,proto3,enum=cosmos.group.v1.ProposalStatus" json:"status,omitempty"` - // result is the final result based on the votes and election rule. Initial value is unfinalized. - // The result is persisted so that clients can always rely on this state and not have to replicate the logic. - Result ProposalResult `protobuf:"varint,9,opt,name=result,proto3,enum=cosmos.group.v1.ProposalResult" json:"result,omitempty"` // final_tally_result contains the sums of all weighted votes for this - // proposal for each vote option, after tallying. When querying a proposal - // via gRPC, this field is not populated until the proposal's voting period - // has ended. - FinalTallyResult TallyResult `protobuf:"bytes,10,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"` + // proposal for each vote option. It is empty at submission, and only + // populated after tallying, at voting period end or at proposal execution, + // whichever happens first. + FinalTallyResult TallyResult `protobuf:"bytes,9,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"` // voting_period_end is the timestamp before which voting must be done. // Unless a successfull MsgExec is called before (to execute a proposal whose // tally is successful before the voting period ends), tallying will be done - // at this point, and the `final_tally_result`, as well - // as `status` and `result` fields will be accordingly updated. - VotingPeriodEnd time.Time `protobuf:"bytes,11,opt,name=voting_period_end,json=votingPeriodEnd,proto3,stdtime" json:"voting_period_end"` - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. - ExecutorResult ProposalExecutorResult `protobuf:"varint,12,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"executor_result,omitempty"` - // messages is a list of Msgs that will be executed if the proposal passes. - Messages []*types.Any `protobuf:"bytes,13,rep,name=messages,proto3" json:"messages,omitempty"` + // at this point, and the `final_tally_result`and `status` fields will be + // accordingly updated. + VotingPeriodEnd time.Time `protobuf:"bytes,10,opt,name=voting_period_end,json=votingPeriodEnd,proto3,stdtime" json:"voting_period_end"` + // executor_result is the final result of the proposal execution. Initial value is NotRun. + ExecutorResult ProposalExecutorResult `protobuf:"varint,11,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"executor_result,omitempty"` + // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + Messages []*types.Any `protobuf:"bytes,12,rep,name=messages,proto3" json:"messages,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } @@ -762,7 +765,7 @@ type TallyResult struct { YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` // abstain_count is the weighted sum of abstainers. AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"` - // no is the weighted sum of no votes. + // no_count is the weighted sum of no votes. NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"` // no_with_veto_count is the weighted sum of veto. NoWithVetoCount string `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3" json:"no_with_veto_count,omitempty"` @@ -886,10 +889,9 @@ func (m *Vote) GetSubmitTime() time.Time { func init() { proto.RegisterEnum("cosmos.group.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos.group.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) - proto.RegisterEnum("cosmos.group.v1.ProposalResult", ProposalResult_name, ProposalResult_value) proto.RegisterEnum("cosmos.group.v1.ProposalExecutorResult", ProposalExecutorResult_name, ProposalExecutorResult_value) proto.RegisterType((*Member)(nil), "cosmos.group.v1.Member") - proto.RegisterType((*Members)(nil), "cosmos.group.v1.Members") + proto.RegisterType((*MemberRequest)(nil), "cosmos.group.v1.MemberRequest") proto.RegisterType((*ThresholdDecisionPolicy)(nil), "cosmos.group.v1.ThresholdDecisionPolicy") proto.RegisterType((*PercentageDecisionPolicy)(nil), "cosmos.group.v1.PercentageDecisionPolicy") proto.RegisterType((*DecisionPolicyWindows)(nil), "cosmos.group.v1.DecisionPolicyWindows") @@ -904,91 +906,89 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1/types.proto", fileDescriptor_f5bddd15d7a54a9d) } var fileDescriptor_f5bddd15d7a54a9d = []byte{ - // 1340 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x3a, 0x8e, 0x3f, 0x9e, 0x53, 0xdb, 0x4c, 0x43, 0xb3, 0xf9, 0xc0, 0x0e, 0xa6, 0x82, - 0xa8, 0xa8, 0x76, 0xeb, 0x4a, 0x54, 0xea, 0x01, 0xb0, 0x9d, 0x2d, 0x35, 0x4a, 0x6d, 0xb3, 0xbb, - 0x4e, 0x68, 0x2f, 0xab, 0x8d, 0x77, 0xea, 0xac, 0xb0, 0x77, 0xac, 0xdd, 0x71, 0x52, 0xff, 0x07, - 0xbd, 0x20, 0x7a, 0xe0, 0xc0, 0x05, 0xa9, 0x12, 0x77, 0x24, 0xa4, 0x1e, 0x10, 0x7f, 0x41, 0xc5, - 0xa9, 0xe2, 0xc4, 0x09, 0xaa, 0xf6, 0x52, 0x4e, 0xfc, 0x0b, 0x68, 0x67, 0x66, 0x1d, 0x7f, 0xc5, - 0xb4, 0x15, 0x9c, 0xe2, 0x79, 0xef, 0xf7, 0xde, 0xfc, 0xde, 0xe7, 0x64, 0x61, 0xb3, 0x4d, 0xbc, - 0x1e, 0xf1, 0x8a, 0x1d, 0x97, 0x0c, 0xfa, 0xc5, 0xe3, 0xab, 0x45, 0x3a, 0xec, 0x63, 0xaf, 0xd0, - 0x77, 0x09, 0x25, 0x28, 0xcd, 0x95, 0x05, 0xa6, 0x2c, 0x1c, 0x5f, 0xdd, 0x58, 0xed, 0x90, 0x0e, - 0x61, 0xba, 0xa2, 0xff, 0x8b, 0xc3, 0x36, 0xb2, 0x1d, 0x42, 0x3a, 0x5d, 0x5c, 0x64, 0xa7, 0xc3, - 0xc1, 0xbd, 0xa2, 0x35, 0x70, 0x4d, 0x6a, 0x13, 0x47, 0xe8, 0x73, 0xd3, 0x7a, 0x6a, 0xf7, 0xb0, - 0x47, 0xcd, 0x5e, 0x5f, 0x00, 0xd6, 0xf9, 0x3d, 0x06, 0xf7, 0x2c, 0x2e, 0x15, 0xaa, 0x69, 0x5b, - 0xd3, 0x19, 0x72, 0x55, 0xfe, 0x27, 0x09, 0xa2, 0xb7, 0x71, 0xef, 0x10, 0xbb, 0xa8, 0x04, 0x31, - 0xd3, 0xb2, 0x5c, 0xec, 0x79, 0xb2, 0xb4, 0x2d, 0xed, 0x24, 0x2a, 0xf2, 0x6f, 0x8f, 0x2f, 0xaf, - 0x0a, 0x47, 0x65, 0xae, 0xd1, 0xa8, 0x6b, 0x3b, 0x1d, 0x35, 0x00, 0xa2, 0x0b, 0x10, 0x3d, 0xc1, - 0x76, 0xe7, 0x88, 0xca, 0x61, 0xdf, 0x44, 0x15, 0x27, 0xb4, 0x01, 0xf1, 0x1e, 0xa6, 0xa6, 0x65, - 0x52, 0x53, 0x5e, 0x62, 0x9a, 0xd1, 0x19, 0x7d, 0x02, 0x71, 0xd3, 0xb2, 0xb0, 0x65, 0x98, 0x54, - 0x8e, 0x6c, 0x4b, 0x3b, 0xc9, 0xd2, 0x46, 0x81, 0x13, 0x2c, 0x04, 0x04, 0x0b, 0x7a, 0x10, 0x5c, - 0x25, 0xfe, 0xe4, 0x8f, 0x5c, 0xe8, 0xe1, 0x9f, 0x39, 0x89, 0x5d, 0x8a, 0xad, 0x32, 0xcd, 0x57, - 0x20, 0xc6, 0x29, 0x7b, 0xe8, 0x3a, 0xc4, 0x7a, 0xfc, 0xa7, 0x2c, 0x6d, 0x2f, 0xed, 0x24, 0x4b, - 0x6b, 0x85, 0xa9, 0x74, 0x17, 0x38, 0xb4, 0x12, 0xf1, 0xfd, 0xa8, 0x01, 0x3a, 0xff, 0xb5, 0x04, - 0x6b, 0xfa, 0x91, 0x8b, 0xbd, 0x23, 0xd2, 0xb5, 0x76, 0x71, 0xdb, 0xf6, 0x6c, 0xe2, 0x34, 0x49, - 0xd7, 0x6e, 0x0f, 0xd1, 0x16, 0x24, 0x68, 0xa0, 0xe2, 0xa9, 0x50, 0x4f, 0x05, 0xe8, 0x53, 0x88, - 0x9d, 0xd8, 0x8e, 0x45, 0x4e, 0x3c, 0x16, 0x73, 0xb2, 0xf4, 0xfe, 0xcc, 0x95, 0x93, 0xfe, 0x0e, - 0x38, 0x5a, 0x0d, 0xcc, 0x6e, 0xa0, 0x5f, 0x1f, 0x5f, 0x4e, 0x4d, 0x62, 0xf2, 0x0f, 0x25, 0x90, - 0x9b, 0xd8, 0x6d, 0x63, 0x87, 0x9a, 0x1d, 0x3c, 0x45, 0x28, 0x0b, 0xd0, 0x1f, 0xe9, 0x04, 0xa3, - 0x31, 0xc9, 0xff, 0x44, 0xe9, 0x67, 0x09, 0xde, 0x9e, 0x6b, 0x86, 0x6e, 0xc1, 0xb9, 0x63, 0x42, - 0x6d, 0xa7, 0x63, 0xf4, 0xb1, 0x6b, 0x13, 0x9e, 0xa4, 0x64, 0x69, 0x7d, 0xa6, 0x8c, 0xbb, 0xa2, - 0x87, 0x79, 0x15, 0xbf, 0xf3, 0xab, 0xb8, 0xc2, 0x2d, 0x9b, 0xcc, 0x10, 0xb5, 0x60, 0xb5, 0x67, - 0x3b, 0x06, 0xbe, 0x8f, 0xdb, 0x03, 0x1f, 0x18, 0x38, 0x0c, 0xbf, 0xba, 0x43, 0xd4, 0xb3, 0x1d, - 0x25, 0xb0, 0xe7, 0x6e, 0xf3, 0x7f, 0x49, 0x90, 0xf8, 0xcc, 0x0f, 0xbd, 0xe6, 0xdc, 0x23, 0x28, - 0x05, 0x61, 0x9b, 0x73, 0x8c, 0xa8, 0x61, 0xdb, 0x42, 0x05, 0x58, 0x36, 0xad, 0x9e, 0xed, 0xf0, - 0x9e, 0x5d, 0xd0, 0xe6, 0x1c, 0xb6, 0xb0, 0x99, 0x65, 0x88, 0x1d, 0x63, 0xd7, 0x4f, 0x11, 0xeb, - 0xe5, 0x88, 0x1a, 0x1c, 0xd1, 0xbb, 0xb0, 0x42, 0x09, 0x35, 0xbb, 0x86, 0x18, 0x90, 0x65, 0x66, - 0x99, 0x64, 0xb2, 0x03, 0x3e, 0x25, 0x55, 0x80, 0xb6, 0x8b, 0x4d, 0xca, 0x67, 0x21, 0xfa, 0x1a, - 0xb3, 0x90, 0x10, 0x76, 0x65, 0x9a, 0xbf, 0x03, 0x49, 0x16, 0xaa, 0x98, 0xe2, 0x75, 0x88, 0xb3, - 0xa2, 0x1b, 0xa3, 0x90, 0x63, 0xec, 0x5c, 0xb3, 0x50, 0x11, 0xa2, 0xbc, 0xfd, 0x45, 0x7a, 0xcf, - 0x9a, 0x15, 0x55, 0xc0, 0xf2, 0x2f, 0xc3, 0x90, 0x66, 0xbe, 0x79, 0xf9, 0x59, 0x32, 0xdf, 0x64, - 0x4b, 0x8c, 0x73, 0x0a, 0x4f, 0x72, 0x1a, 0xd5, 0x62, 0xe9, 0xf5, 0x6b, 0x11, 0x39, 0xbb, 0x16, - 0xcb, 0x93, 0xb5, 0xf8, 0x02, 0xd2, 0x96, 0xe8, 0x64, 0xa3, 0xcf, 0x62, 0x11, 0xd9, 0x5e, 0x9d, - 0xc9, 0x76, 0xd9, 0x19, 0x56, 0xe6, 0x4c, 0x83, 0x9a, 0xb2, 0x26, 0x67, 0x72, 0xb2, 0x76, 0xb1, - 0x37, 0xaa, 0xdd, 0x8d, 0xf8, 0x83, 0x47, 0xb9, 0xd0, 0xcb, 0x47, 0x39, 0x29, 0xff, 0x6c, 0x19, - 0xe2, 0x4d, 0x97, 0xf4, 0x89, 0x67, 0x76, 0x67, 0x1a, 0x76, 0x2c, 0xe7, 0xe1, 0x57, 0xcd, 0xf9, - 0xa2, 0xa6, 0xfd, 0x08, 0x12, 0x7d, 0x76, 0x97, 0xbf, 0x37, 0x23, 0xdb, 0x4b, 0x0b, 0x3d, 0x9e, - 0x42, 0x91, 0x02, 0x49, 0x6f, 0x70, 0xd8, 0xb3, 0xa9, 0xe1, 0x3f, 0x3e, 0x2c, 0xc9, 0xaf, 0x1a, - 0x34, 0x70, 0x43, 0x5f, 0x85, 0xde, 0x83, 0x73, 0xbc, 0x1d, 0x82, 0x6a, 0x45, 0x59, 0xa4, 0x2b, - 0x4c, 0xb8, 0x2f, 0x4a, 0x76, 0x05, 0x56, 0x39, 0x88, 0xd7, 0x6b, 0x84, 0x8d, 0x31, 0x2c, 0xea, - 0x9c, 0xb6, 0x65, 0x60, 0x71, 0x1d, 0xa2, 0x1e, 0x35, 0xe9, 0xc0, 0x93, 0xe3, 0xdb, 0xd2, 0x4e, - 0xaa, 0x94, 0x9b, 0x69, 0xef, 0x20, 0xc1, 0x1a, 0x83, 0xa9, 0x02, 0xee, 0x1b, 0xba, 0xd8, 0x1b, - 0x74, 0xa9, 0x9c, 0xf8, 0x17, 0x43, 0x95, 0xc1, 0x54, 0x01, 0x47, 0x4d, 0x40, 0xf7, 0x6c, 0xc7, - 0xec, 0x1a, 0xd4, 0xec, 0x76, 0x87, 0x86, 0x70, 0x02, 0x2c, 0x2d, 0x5b, 0x33, 0x4e, 0x74, 0x1f, - 0xc4, 0x3d, 0x88, 0xd7, 0x28, 0xc3, 0xac, 0xc7, 0xe4, 0xa8, 0x09, 0x6f, 0x4d, 0x6c, 0x56, 0x03, - 0x3b, 0x96, 0x9c, 0x7c, 0x8d, 0x3c, 0xa7, 0xc7, 0xd7, 0xab, 0xe2, 0x58, 0xa8, 0x09, 0x69, 0xbe, - 0x5d, 0x89, 0x1b, 0x10, 0x5c, 0x61, 0x51, 0x7e, 0x70, 0x66, 0x94, 0x8a, 0xc0, 0x8b, 0x68, 0x53, - 0x78, 0xe2, 0x8c, 0xae, 0xf8, 0x9d, 0xe5, 0x79, 0x66, 0x07, 0x7b, 0xf2, 0x39, 0xf6, 0xe8, 0xce, - 0x9d, 0x22, 0x75, 0x84, 0xba, 0x11, 0xf1, 0xdb, 0x3c, 0xff, 0xbd, 0x04, 0xc9, 0xf1, 0x58, 0x37, - 0x21, 0x31, 0xc4, 0x9e, 0xd1, 0x26, 0x03, 0x87, 0x8a, 0x47, 0x2d, 0x3e, 0xc4, 0x5e, 0xd5, 0x3f, - 0xfb, 0x3d, 0x62, 0x1e, 0x7a, 0xd4, 0xb4, 0x1d, 0x01, 0xe0, 0xff, 0x5f, 0xac, 0x08, 0x21, 0x07, - 0xad, 0x43, 0xdc, 0x21, 0x42, 0xcf, 0x7b, 0x3c, 0xe6, 0x10, 0xae, 0xfa, 0x10, 0x90, 0x43, 0x8c, - 0x13, 0x9b, 0x1e, 0x19, 0xc7, 0x98, 0x06, 0x20, 0xbe, 0x31, 0xd2, 0x0e, 0x39, 0xb0, 0xe9, 0xd1, - 0x3e, 0xa6, 0x1c, 0x2c, 0xf8, 0xfd, 0x2d, 0x41, 0x64, 0x9f, 0x50, 0x8c, 0x72, 0x90, 0xec, 0x8b, - 0x54, 0x9c, 0x6e, 0x51, 0x08, 0x44, 0x7c, 0x69, 0x1d, 0x13, 0x2a, 0xf6, 0xe8, 0xc2, 0xa5, 0xc5, - 0x60, 0xe8, 0x1a, 0x44, 0x49, 0xdf, 0x7f, 0x9e, 0x18, 0xcb, 0x54, 0x69, 0x73, 0x26, 0xf5, 0xfe, - 0xbd, 0x0d, 0x06, 0x51, 0x05, 0x74, 0xe1, 0xa6, 0xfb, 0x6f, 0x06, 0xf1, 0xd2, 0x37, 0x12, 0xc0, - 0xe9, 0xcd, 0x68, 0x13, 0xd6, 0xf6, 0x1b, 0xba, 0x62, 0x34, 0x9a, 0x7a, 0xad, 0x51, 0x37, 0x5a, - 0x75, 0xad, 0xa9, 0x54, 0x6b, 0x37, 0x6b, 0xca, 0x6e, 0x26, 0x84, 0xce, 0x43, 0x7a, 0x5c, 0x79, - 0x47, 0xd1, 0x32, 0x12, 0x5a, 0x83, 0xf3, 0xe3, 0xc2, 0x72, 0x45, 0xd3, 0xcb, 0xb5, 0x7a, 0x26, - 0x8c, 0x10, 0xa4, 0xc6, 0x15, 0xf5, 0x46, 0x66, 0x09, 0x6d, 0x81, 0x3c, 0x29, 0x33, 0x0e, 0x6a, - 0xfa, 0x2d, 0x63, 0x5f, 0xd1, 0x1b, 0x99, 0xc8, 0x46, 0xe4, 0xc1, 0x0f, 0xd9, 0xd0, 0xa5, 0x1f, - 0x25, 0x48, 0x4d, 0x4e, 0x29, 0xca, 0xc1, 0x66, 0x53, 0x6d, 0x34, 0x1b, 0x5a, 0x79, 0xcf, 0xd0, - 0xf4, 0xb2, 0xde, 0xd2, 0xa6, 0x98, 0xbd, 0x03, 0xeb, 0xd3, 0x00, 0xad, 0x55, 0xb9, 0x5d, 0xd3, - 0x75, 0x65, 0x37, 0x23, 0xa1, 0x0d, 0xb8, 0x30, 0xad, 0xae, 0xee, 0x35, 0x34, 0x65, 0x37, 0x13, - 0xf6, 0x23, 0x9e, 0xd6, 0x95, 0x2b, 0x0d, 0xd5, 0x37, 0x5c, 0x9a, 0xe7, 0xd7, 0x27, 0xbc, 0xab, - 0x96, 0x0f, 0xea, 0x23, 0xc2, 0xdf, 0x8e, 0x11, 0x16, 0x7d, 0x3d, 0x4e, 0x58, 0x55, 0xb4, 0xd6, - 0x9e, 0x3e, 0x45, 0x78, 0x2e, 0xe0, 0x66, 0xad, 0x5e, 0xde, 0xab, 0xdd, 0x65, 0x94, 0xb7, 0x40, - 0x9e, 0x06, 0x94, 0xab, 0x55, 0xa5, 0xa9, 0x33, 0xd2, 0x73, 0xb4, 0xaa, 0xf2, 0xb9, 0x52, 0x65, - 0xac, 0x05, 0xad, 0x5f, 0x24, 0xb8, 0x30, 0x7f, 0x9c, 0xd1, 0x0e, 0x5c, 0x1c, 0x99, 0x2b, 0x5f, - 0x2a, 0xd5, 0x96, 0xde, 0x50, 0xe7, 0xf3, 0xbc, 0x08, 0xdb, 0x67, 0x22, 0xeb, 0x0d, 0xdd, 0x50, - 0x5b, 0xf5, 0x8c, 0xb4, 0x10, 0xa5, 0xb5, 0xaa, 0x55, 0x45, 0xd3, 0x32, 0xe1, 0x85, 0xa8, 0x9b, - 0xe5, 0xda, 0x5e, 0x4b, 0x55, 0x02, 0xf2, 0x95, 0x8f, 0x9f, 0x3c, 0xcf, 0x4a, 0x4f, 0x9f, 0x67, - 0xa5, 0x67, 0xcf, 0xb3, 0xd2, 0xc3, 0x17, 0xd9, 0xd0, 0xd3, 0x17, 0xd9, 0xd0, 0xef, 0x2f, 0xb2, - 0xa1, 0xbb, 0x17, 0x3b, 0x36, 0x3d, 0x1a, 0x1c, 0x16, 0xda, 0xa4, 0x27, 0xbe, 0x70, 0xc4, 0x9f, - 0xcb, 0x9e, 0xf5, 0x55, 0xf1, 0x3e, 0xff, 0x00, 0x3b, 0x8c, 0xb2, 0x01, 0xb8, 0xf6, 0x4f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0xf6, 0x78, 0x70, 0x97, 0x0d, 0x00, 0x00, + // 1299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xda, 0x8e, 0x3f, 0x5e, 0xa7, 0xb6, 0x99, 0x86, 0x66, 0x93, 0x14, 0x3b, 0x98, 0x0a, + 0xa2, 0xa2, 0xd8, 0x6d, 0x2a, 0x81, 0xd4, 0x03, 0x60, 0x3b, 0x5b, 0xea, 0xaa, 0xb5, 0xad, 0xdd, + 0x75, 0x42, 0xb9, 0xac, 0x36, 0xde, 0xe9, 0x66, 0x85, 0xbd, 0x63, 0x76, 0xc7, 0x49, 0xfd, 0x0f, + 0x7a, 0x41, 0xf4, 0xc8, 0x05, 0xa9, 0x12, 0xbf, 0x00, 0xa9, 0x07, 0xc4, 0x85, 0x6b, 0xd5, 0x03, + 0xaa, 0x38, 0x71, 0x02, 0xd4, 0x5e, 0xe0, 0xc4, 0x95, 0x23, 0xda, 0x99, 0xd9, 0xc4, 0x1f, 0x89, + 0x69, 0x2a, 0xe0, 0x94, 0xcc, 0x3c, 0xcf, 0xfb, 0xce, 0xf3, 0x7e, 0xae, 0x0c, 0x6b, 0x5d, 0xe2, + 0xf7, 0x89, 0x5f, 0xb1, 0x3d, 0x32, 0x1c, 0x54, 0x0e, 0xae, 0x56, 0xe8, 0x68, 0x80, 0xfd, 0xf2, + 0xc0, 0x23, 0x94, 0xa0, 0x1c, 0x07, 0xcb, 0x0c, 0x2c, 0x1f, 0x5c, 0x5d, 0x5d, 0xb2, 0x89, 0x4d, + 0x18, 0x56, 0x09, 0xfe, 0xe3, 0xb4, 0xd5, 0x82, 0x4d, 0x88, 0xdd, 0xc3, 0x15, 0x76, 0xda, 0x1b, + 0xde, 0xab, 0x58, 0x43, 0xcf, 0xa4, 0x0e, 0x71, 0x05, 0x5e, 0x9c, 0xc6, 0xa9, 0xd3, 0xc7, 0x3e, + 0x35, 0xfb, 0x03, 0x41, 0x58, 0xe1, 0xef, 0x18, 0xdc, 0xb3, 0x78, 0x54, 0x40, 0xd3, 0xb6, 0xa6, + 0x3b, 0xe2, 0x50, 0xe9, 0x5b, 0x09, 0x12, 0x77, 0x70, 0x7f, 0x0f, 0x7b, 0x68, 0x0b, 0x92, 0xa6, + 0x65, 0x79, 0xd8, 0xf7, 0x65, 0x69, 0x5d, 0xda, 0x48, 0xd7, 0xe4, 0x9f, 0x1e, 0x6f, 0x2e, 0x09, + 0x47, 0x55, 0x8e, 0x68, 0xd4, 0x73, 0x5c, 0x5b, 0x0d, 0x89, 0xe8, 0x02, 0x24, 0x0e, 0xb1, 0x63, + 0xef, 0x53, 0x39, 0x1a, 0x98, 0xa8, 0xe2, 0x84, 0x56, 0x21, 0xd5, 0xc7, 0xd4, 0xb4, 0x4c, 0x6a, + 0xca, 0x31, 0x86, 0x1c, 0x9d, 0xd1, 0x87, 0x90, 0x32, 0x2d, 0x0b, 0x5b, 0x86, 0x49, 0xe5, 0xf8, + 0xba, 0xb4, 0x91, 0xd9, 0x5a, 0x2d, 0x73, 0x81, 0xe5, 0x50, 0x60, 0x59, 0x0f, 0x83, 0xab, 0xa5, + 0x9e, 0xfc, 0x52, 0x8c, 0x3c, 0xfc, 0xb5, 0x28, 0xb1, 0x47, 0xb1, 0x55, 0xa5, 0xa5, 0x43, 0x38, + 0xc7, 0x25, 0xab, 0xf8, 0xf3, 0x21, 0xf6, 0xe9, 0xff, 0xa5, 0xbc, 0xf4, 0x85, 0x04, 0xcb, 0xfa, + 0xbe, 0x87, 0xfd, 0x7d, 0xd2, 0xb3, 0xb6, 0x71, 0xd7, 0xf1, 0x1d, 0xe2, 0xb6, 0x49, 0xcf, 0xe9, + 0x8e, 0xd0, 0x45, 0x48, 0xd3, 0x10, 0xe2, 0x2a, 0xd4, 0xe3, 0x0b, 0xf4, 0x11, 0x24, 0x0f, 0x1d, + 0xd7, 0x22, 0x87, 0x3e, 0x7b, 0x2e, 0xb3, 0xf5, 0x76, 0x79, 0xaa, 0x2d, 0xca, 0x93, 0xfe, 0x76, + 0x39, 0x5b, 0x0d, 0xcd, 0xae, 0xa3, 0xa7, 0x8f, 0x37, 0xb3, 0x93, 0x9c, 0xd2, 0x43, 0x09, 0xe4, + 0x36, 0xf6, 0xba, 0xd8, 0xa5, 0xa6, 0x8d, 0xa7, 0x04, 0x15, 0x00, 0x06, 0x47, 0x98, 0x50, 0x34, + 0x76, 0xf3, 0x1f, 0x49, 0xfa, 0x4e, 0x82, 0xd7, 0x4f, 0x34, 0x43, 0x37, 0xe1, 0xdc, 0x01, 0xa1, + 0x8e, 0x6b, 0x1b, 0x03, 0xec, 0x39, 0x84, 0x27, 0x29, 0xb3, 0xb5, 0x32, 0x53, 0xfb, 0x6d, 0xd1, + 0xf8, 0xbc, 0xf4, 0x5f, 0x05, 0xa5, 0x5f, 0xe4, 0x96, 0x6d, 0x66, 0x88, 0x3a, 0xb0, 0xd4, 0x77, + 0x5c, 0x03, 0xdf, 0xc7, 0xdd, 0x61, 0x40, 0x0c, 0x1d, 0x46, 0x5f, 0xde, 0x21, 0xea, 0x3b, 0xae, + 0x12, 0xda, 0x73, 0xb7, 0xa5, 0x3f, 0x24, 0x48, 0x7f, 0x1c, 0x84, 0xde, 0x70, 0xef, 0x11, 0x94, + 0x85, 0xa8, 0xc3, 0x35, 0xc6, 0xd5, 0xa8, 0x63, 0xa1, 0x32, 0x2c, 0x98, 0x56, 0xdf, 0x71, 0x79, + 0xbb, 0xcc, 0xe9, 0x30, 0x4e, 0x9b, 0x3b, 0x01, 0x32, 0x24, 0x0f, 0xb0, 0x17, 0xa4, 0x88, 0x0d, + 0x40, 0x5c, 0x0d, 0x8f, 0xe8, 0x4d, 0x58, 0xa4, 0x84, 0x9a, 0x3d, 0x43, 0xf4, 0xe6, 0x02, 0xb3, + 0xcc, 0xb0, 0xbb, 0x5d, 0xde, 0xa0, 0x75, 0x80, 0xae, 0x87, 0x4d, 0xca, 0x07, 0x28, 0x71, 0x86, + 0x01, 0x4a, 0x0b, 0xbb, 0x2a, 0x2d, 0xdd, 0x85, 0x0c, 0x0b, 0x55, 0x8c, 0xfe, 0x0a, 0xa4, 0x58, + 0xd1, 0x8d, 0xa3, 0x90, 0x93, 0xec, 0xdc, 0xb0, 0x50, 0x05, 0x12, 0x7d, 0x46, 0x12, 0xe9, 0x5d, + 0x9e, 0xe9, 0x12, 0x31, 0x8b, 0x82, 0x56, 0xfa, 0x2b, 0x0a, 0x39, 0xe6, 0x9b, 0x97, 0x9f, 0x25, + 0xf3, 0x55, 0x06, 0x74, 0x5c, 0x53, 0x74, 0x52, 0xd3, 0x51, 0x2d, 0x62, 0x67, 0xaf, 0x45, 0xfc, + 0xf4, 0x5a, 0x2c, 0x4c, 0xd6, 0xc2, 0x84, 0x9c, 0x25, 0x3a, 0xd9, 0x18, 0xb0, 0x58, 0x44, 0xb6, + 0x97, 0x66, 0xb2, 0x5d, 0x75, 0x47, 0xb5, 0xd2, 0xd3, 0xc7, 0x9b, 0x85, 0xf9, 0x13, 0xa4, 0x66, + 0xad, 0xc9, 0x19, 0x9d, 0xac, 0x65, 0xf2, 0x95, 0x6a, 0x79, 0x3d, 0xf5, 0xe0, 0x51, 0x31, 0xf2, + 0xfb, 0xa3, 0xa2, 0x54, 0xfa, 0x61, 0x01, 0x52, 0x6d, 0x8f, 0x0c, 0x88, 0x6f, 0xf6, 0x66, 0x1a, + 0xf8, 0x16, 0x2c, 0xf1, 0x7c, 0xf2, 0x58, 0x8c, 0xb0, 0x20, 0xff, 0xd4, 0xcf, 0xc8, 0x3e, 0x2e, + 0xa6, 0x40, 0xe6, 0x36, 0xf7, 0x7b, 0x90, 0x1e, 0x30, 0x0d, 0xd8, 0xf3, 0xe5, 0xf8, 0x7a, 0x6c, + 0xae, 0xf3, 0x63, 0x2a, 0x52, 0x20, 0xe3, 0x0f, 0xf7, 0xfa, 0x0e, 0x35, 0x82, 0x2f, 0x1b, 0x2b, + 0xc6, 0xcb, 0x26, 0x03, 0xb8, 0x61, 0x00, 0xa1, 0xb7, 0xe0, 0x1c, 0x0f, 0x33, 0xac, 0x6a, 0x82, + 0x65, 0x60, 0x91, 0x5d, 0xee, 0x88, 0xd2, 0x5e, 0x99, 0xca, 0x45, 0xc8, 0x4d, 0x32, 0xee, 0x78, + 0xc4, 0xa1, 0xc5, 0xfb, 0x90, 0xf0, 0xa9, 0x49, 0x87, 0xbe, 0x9c, 0x5a, 0x97, 0x36, 0xb2, 0x5b, + 0xc5, 0x99, 0x31, 0x08, 0x13, 0xaf, 0x31, 0x9a, 0x2a, 0xe8, 0xa8, 0x0d, 0xe8, 0x9e, 0xe3, 0x9a, + 0x3d, 0x83, 0x9a, 0xbd, 0xde, 0xc8, 0xf0, 0xb0, 0x3f, 0xec, 0x51, 0x39, 0xcd, 0xa2, 0xbb, 0x38, + 0xe3, 0x44, 0x0f, 0x48, 0x2a, 0xe3, 0xd4, 0xe2, 0x41, 0x7c, 0x6a, 0x9e, 0x59, 0x8f, 0xdd, 0xa3, + 0x36, 0xbc, 0x36, 0xb1, 0x48, 0x0d, 0xec, 0x5a, 0x32, 0x9c, 0x21, 0x5d, 0xb9, 0xf1, 0x6d, 0xaa, + 0xb8, 0x16, 0x6a, 0x43, 0x8e, 0x2f, 0x53, 0xe2, 0x85, 0x02, 0x33, 0x2c, 0xca, 0x77, 0x4e, 0x8d, + 0x52, 0x11, 0x7c, 0xae, 0x49, 0xcd, 0xe2, 0x89, 0x33, 0xba, 0x12, 0x34, 0x88, 0xef, 0x9b, 0x36, + 0xf6, 0xe5, 0xc5, 0xf5, 0xd8, 0x69, 0x43, 0xa3, 0x1e, 0xb1, 0xae, 0xc7, 0x83, 0x2e, 0x2e, 0x7d, + 0x2d, 0x41, 0x66, 0x3c, 0xd6, 0x35, 0x48, 0x8f, 0xb0, 0x6f, 0x74, 0xc9, 0xd0, 0xa5, 0xe2, 0x1b, + 0x96, 0x1a, 0x61, 0xbf, 0x1e, 0x9c, 0x83, 0x52, 0x9b, 0x7b, 0x3e, 0x35, 0x1d, 0x57, 0x10, 0xf8, + 0x97, 0x7c, 0x51, 0x5c, 0x72, 0xd2, 0x0a, 0xa4, 0x5c, 0x22, 0x70, 0xde, 0xaa, 0x49, 0x97, 0x70, + 0xe8, 0x5d, 0x40, 0x2e, 0x31, 0x0e, 0x1d, 0xba, 0x6f, 0x1c, 0x60, 0x1a, 0x92, 0xf8, 0x82, 0xc8, + 0xb9, 0x64, 0xd7, 0xa1, 0xfb, 0x3b, 0x98, 0x72, 0xb2, 0xd0, 0xf7, 0xa7, 0x04, 0xf1, 0x1d, 0x42, + 0x31, 0x2a, 0x42, 0x66, 0x20, 0x52, 0x71, 0xbc, 0x34, 0x21, 0xbc, 0xe2, 0x3b, 0xea, 0x80, 0x50, + 0xb1, 0x36, 0xe7, 0xee, 0x28, 0x46, 0x43, 0xd7, 0x20, 0x41, 0x06, 0xc1, 0xd7, 0x88, 0xa9, 0xcc, + 0x6e, 0xad, 0xcd, 0xa4, 0x3e, 0x78, 0xb7, 0xc5, 0x28, 0xaa, 0xa0, 0xce, 0x5d, 0x6c, 0xff, 0xce, + 0x3c, 0x5d, 0xfe, 0x52, 0x02, 0x38, 0x7e, 0x19, 0xad, 0xc1, 0xf2, 0x4e, 0x4b, 0x57, 0x8c, 0x56, + 0x5b, 0x6f, 0xb4, 0x9a, 0x46, 0xa7, 0xa9, 0xb5, 0x95, 0x7a, 0xe3, 0x46, 0x43, 0xd9, 0xce, 0x47, + 0xd0, 0x79, 0xc8, 0x8d, 0x83, 0x77, 0x15, 0x2d, 0x2f, 0xa1, 0x65, 0x38, 0x3f, 0x7e, 0x59, 0xad, + 0x69, 0x7a, 0xb5, 0xd1, 0xcc, 0x47, 0x11, 0x82, 0xec, 0x38, 0xd0, 0x6c, 0xe5, 0x63, 0xe8, 0x22, + 0xc8, 0x93, 0x77, 0xc6, 0x6e, 0x43, 0xbf, 0x69, 0xec, 0x28, 0x7a, 0x2b, 0x1f, 0x5f, 0x8d, 0x3f, + 0xf8, 0xa6, 0x10, 0xb9, 0xfc, 0xa3, 0x04, 0xd9, 0xc9, 0x61, 0x43, 0x45, 0x58, 0x6b, 0xab, 0xad, + 0x76, 0x4b, 0xab, 0xde, 0x36, 0x34, 0xbd, 0xaa, 0x77, 0xb4, 0x29, 0x65, 0x6f, 0xc0, 0xca, 0x34, + 0x41, 0xeb, 0xd4, 0xee, 0x34, 0x74, 0x5d, 0xd9, 0xce, 0x4b, 0xc1, 0xb3, 0xd3, 0x70, 0xb5, 0x5e, + 0x57, 0xda, 0x01, 0x1a, 0x3d, 0x09, 0x55, 0x95, 0x5b, 0x4a, 0x3d, 0x40, 0x63, 0x41, 0x46, 0x66, + 0x6c, 0x6b, 0x2d, 0x35, 0x00, 0xe3, 0x27, 0xbd, 0x1b, 0x04, 0xb4, 0xad, 0x56, 0x77, 0x9b, 0xf9, + 0x05, 0x11, 0xd0, 0xf7, 0x12, 0x5c, 0x38, 0x79, 0xae, 0xd0, 0x06, 0x5c, 0x3a, 0xb2, 0x57, 0x3e, + 0x51, 0xea, 0x1d, 0xbd, 0xa5, 0x1a, 0xaa, 0xa2, 0x75, 0x6e, 0xeb, 0x53, 0x11, 0x5e, 0x82, 0xf5, + 0x53, 0x99, 0xcd, 0x96, 0x6e, 0xa8, 0x9d, 0x66, 0x5e, 0x9a, 0xcb, 0xd2, 0x3a, 0xf5, 0xba, 0xa2, + 0x69, 0xf9, 0xe8, 0x5c, 0xd6, 0x8d, 0x6a, 0xe3, 0x76, 0x47, 0x55, 0xf2, 0x31, 0x2e, 0xbe, 0xf6, + 0xc1, 0x93, 0xe7, 0x05, 0xe9, 0xd9, 0xf3, 0x82, 0xf4, 0xdb, 0xf3, 0x82, 0xf4, 0xf0, 0x45, 0x21, + 0xf2, 0xec, 0x45, 0x21, 0xf2, 0xf3, 0x8b, 0x42, 0xe4, 0xd3, 0x4b, 0xb6, 0x43, 0xf7, 0x87, 0x7b, + 0xe5, 0x2e, 0xe9, 0x8b, 0x9f, 0x23, 0xe2, 0xcf, 0xa6, 0x6f, 0x7d, 0x56, 0xb9, 0xcf, 0x7f, 0x2d, + 0xed, 0x25, 0x58, 0x27, 0x5e, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xea, 0x13, 0x0f, 0x14, 0x44, + 0x0d, 0x00, 0x00, } func (this *GroupPolicyInfo) Equal(that interface{}) bool { @@ -1085,7 +1085,7 @@ func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Members) Marshal() (dAtA []byte, err error) { +func (m *MemberRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1095,29 +1095,36 @@ func (m *Members) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Members) MarshalTo(dAtA []byte) (int, error) { +func (m *MemberRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Members) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MemberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Weight) > 0 { + i -= len(m.Weight) + copy(dAtA[i:], m.Weight) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Weight))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1452,13 +1459,13 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x6a + dAtA[i] = 0x62 } } if m.ExecutorResult != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ExecutorResult)) i-- - dAtA[i] = 0x60 + dAtA[i] = 0x58 } n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingPeriodEnd, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingPeriodEnd):]) if err10 != nil { @@ -1467,7 +1474,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n10 i = encodeVarintTypes(dAtA, i, uint64(n10)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x52 { size, err := m.FinalTallyResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1477,12 +1484,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 - if m.Result != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Result)) - i-- - dAtA[i] = 0x48 - } + dAtA[i] = 0x4a if m.Status != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Status)) i-- @@ -1522,10 +1524,10 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + if len(m.GroupPolicyAddress) > 0 { + i -= len(m.GroupPolicyAddress) + copy(dAtA[i:], m.GroupPolicyAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupPolicyAddress))) i-- dAtA[i] = 0x12 } @@ -1677,17 +1679,23 @@ func (m *Member) Size() (n int) { return n } -func (m *Members) Size() (n int) { +func (m *MemberRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Weight) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } return n } @@ -1826,7 +1834,7 @@ func (m *Proposal) Size() (n int) { if m.Id != 0 { n += 1 + sovTypes(uint64(m.Id)) } - l = len(m.Address) + l = len(m.GroupPolicyAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } @@ -1851,9 +1859,6 @@ func (m *Proposal) Size() (n int) { if m.Status != 0 { n += 1 + sovTypes(uint64(m.Status)) } - if m.Result != 0 { - n += 1 + sovTypes(uint64(m.Result)) - } l = m.FinalTallyResult.Size() n += 1 + l + sovTypes(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingPeriodEnd) @@ -2105,7 +2110,7 @@ func (m *Member) Unmarshal(dAtA []byte) error { } return nil } -func (m *Members) Unmarshal(dAtA []byte) error { +func (m *MemberRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2128,17 +2133,17 @@ func (m *Members) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Members: wiretype end group for non-group") + return fmt.Errorf("proto: MemberRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Members: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MemberRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -2148,25 +2153,87 @@ func (m *Members) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Members = append(m.Members, Member{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Weight = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3166,7 +3233,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3194,7 +3261,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.GroupPolicyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -3351,25 +3418,6 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } } case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - m.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Result |= ProposalResult(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", wireType) } @@ -3402,7 +3450,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 11: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriodEnd", wireType) } @@ -3435,7 +3483,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 12: + case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExecutorResult", wireType) } @@ -3454,7 +3502,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { break } } - case 13: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) } diff --git a/x/group/typesupport.go b/x/group/typesupport.go index f89dc2c3b83b..1b94a8b466de 100644 --- a/x/group/typesupport.go +++ b/x/group/typesupport.go @@ -6,7 +6,15 @@ import ( "github.com/cosmos/cosmos-sdk/x/group/errors" ) -func (ms Members) ValidateBasic() error { +// MemberRequests defines a repeated slice of MemberRequest objects. +type MemberRequests struct { + Members []MemberRequest +} + +// ValidateBasic performs stateless validation on an array of members. On top +// of validating each member individually, it also makes sure there are no +// duplicate addresses. +func (ms MemberRequests) ValidateBasic() error { index := make(map[string]struct{}, len(ms.Members)) for i := range ms.Members { member := ms.Members[i] @@ -22,11 +30,11 @@ func (ms Members) ValidateBasic() error { return nil } -type AccAddresses []sdk.AccAddress +type accAddresses []sdk.AccAddress // ValidateBasic verifies that there's no duplicate address. // Individual account address validation has to be done separately. -func (a AccAddresses) ValidateBasic() error { +func (a accAddresses) ValidateBasic() error { index := make(map[string]struct{}, len(a)) for i := range a { accAddr := a[i] diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go index 792fa8a6798f..6bf31ba5a179 100644 --- a/x/mint/client/cli/query.go +++ b/x/mint/client/cli/query.go @@ -45,7 +45,6 @@ func GetCmdQueryParams() *cobra.Command { params := &types.QueryParamsRequest{} res, err := queryClient.Params(cmd.Context(), params) - if err != nil { return err } @@ -75,7 +74,6 @@ func GetCmdQueryInflation() *cobra.Command { params := &types.QueryInflationRequest{} res, err := queryClient.Inflation(cmd.Context(), params) - if err != nil { return err } @@ -105,7 +103,6 @@ func GetCmdQueryAnnualProvisions() *cobra.Command { params := &types.QueryAnnualProvisionsRequest{} res, err := queryClient.AnnualProvisions(cmd.Context(), params) - if err != nil { return err } diff --git a/x/mint/client/testutil/cli_test.go b/x/mint/client/testutil/cli_test.go index dd36a6af2d3e..1035ca750264 100644 --- a/x/mint/client/testutil/cli_test.go +++ b/x/mint/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/mint/genesis.go b/x/mint/keeper/genesis.go similarity index 63% rename from x/mint/genesis.go rename to x/mint/keeper/genesis.go index be7ac61d5019..c6a120bee7fe 100644 --- a/x/mint/genesis.go +++ b/x/mint/keeper/genesis.go @@ -1,20 +1,19 @@ -package mint +package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/mint/keeper" "github.com/cosmos/cosmos-sdk/x/mint/types" ) // InitGenesis new mint genesis -func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, ak types.AccountKeeper, data *types.GenesisState) { +func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) { keeper.SetMinter(ctx, data.Minter) keeper.SetParams(ctx, data.Params) ak.GetModuleAccount(ctx, types.ModuleName) } // ExportGenesis returns a GenesisState for a given context and keeper. -func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { +func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { minter := keeper.GetMinter(ctx) params := keeper.GetParams(ctx) return types.NewGenesisState(minter, params) diff --git a/x/mint/migrations/v039/types.go b/x/mint/migrations/v039/types.go deleted file mode 100644 index 10b351b7fb8f..000000000000 --- a/x/mint/migrations/v039/types.go +++ /dev/null @@ -1,31 +0,0 @@ -package v039 - -import sdk "github.com/cosmos/cosmos-sdk/types" - -const ( - ModuleName = "mint" -) - -type ( - // Minter represents the minting state. - Minter struct { - Inflation sdk.Dec `json:"inflation" yaml:"inflation"` // current annual inflation rate - AnnualProvisions sdk.Dec `json:"annual_provisions" yaml:"annual_provisions"` // current annual expected provisions - } - - // mint parameters - Params struct { - MintDenom string `json:"mint_denom" yaml:"mint_denom"` // type of coin to mint - InflationRateChange sdk.Dec `json:"inflation_rate_change" yaml:"inflation_rate_change"` // maximum annual change in inflation rate - InflationMax sdk.Dec `json:"inflation_max" yaml:"inflation_max"` // maximum inflation rate - InflationMin sdk.Dec `json:"inflation_min" yaml:"inflation_min"` // minimum inflation rate - GoalBonded sdk.Dec `json:"goal_bonded" yaml:"goal_bonded"` // goal of percent bonded atoms - BlocksPerYear uint64 `json:"blocks_per_year" yaml:"blocks_per_year"` // expected blocks per year - } - - // GenesisState - minter state - GenesisState struct { - Minter Minter `json:"minter" yaml:"minter"` // minter object - Params Params `json:"params" yaml:"params"` // inflation params - } -) diff --git a/x/mint/migrations/v040/migrate.go b/x/mint/migrations/v040/migrate.go deleted file mode 100644 index 66eb0f000100..000000000000 --- a/x/mint/migrations/v040/migrate.go +++ /dev/null @@ -1,27 +0,0 @@ -package v040 - -import ( - v039mint "github.com/cosmos/cosmos-sdk/x/mint/migrations/v039" - v040mint "github.com/cosmos/cosmos-sdk/x/mint/types" -) - -// Migrate accepts exported v0.39 x/mint genesis state and -// migrates it to v0.40 x/mint genesis state. The migration includes: -// -// - Re-encode in v0.40 GenesisState. -func Migrate(mintGenState v039mint.GenesisState) *v040mint.GenesisState { - return &v040mint.GenesisState{ - Minter: v040mint.Minter{ - Inflation: mintGenState.Minter.Inflation, - AnnualProvisions: mintGenState.Minter.AnnualProvisions, - }, - Params: v040mint.Params{ - MintDenom: mintGenState.Params.MintDenom, - InflationRateChange: mintGenState.Params.InflationRateChange, - InflationMax: mintGenState.Params.InflationMax, - InflationMin: mintGenState.Params.InflationMin, - GoalBonded: mintGenState.Params.GoalBonded, - BlocksPerYear: mintGenState.Params.BlocksPerYear, - }, - } -} diff --git a/x/mint/migrations/v040/types.go b/x/mint/migrations/v040/types.go deleted file mode 100644 index d725b48c34fb..000000000000 --- a/x/mint/migrations/v040/types.go +++ /dev/null @@ -1,5 +0,0 @@ -package v040 - -const ( - ModuleName = "mint" -) diff --git a/x/mint/module.go b/x/mint/module.go index be5ba7fdf2f9..3e6231053fb9 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -63,11 +62,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return types.ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the mint module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/mint` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -142,14 +136,14 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.keeper, am.authKeeper, &genesisState) + am.keeper.InitGenesis(ctx, am.authKeeper, &genesisState) return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the mint // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - gs := ExportGenesis(ctx, am.keeper) + gs := am.keeper.ExportGenesis(ctx) return cdc.MustMarshalJSON(gs) } @@ -161,12 +155,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { BeginBlocker(ctx, am.keeper, am.inflationCalculator) } -// EndBlock returns the end blocker for the mint module. It returns no validator -// updates. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the mint module. diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go index ac57da7acc06..93abcff65d95 100644 --- a/x/mint/simulation/genesis_test.go +++ b/x/mint/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -31,7 +32,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/mint/simulation/params_test.go b/x/mint/simulation/params_test.go index 6bc0f624cf37..3334fbd51a97 100644 --- a/x/mint/simulation/params_test.go +++ b/x/mint/simulation/params_test.go @@ -34,5 +34,4 @@ func TestParamChangest(t *testing.T) { require.Equal(t, expected[i].simValue, p.SimValue()(r)) require.Equal(t, expected[i].subspace, p.Subspace()) } - } diff --git a/x/mint/spec/02_state.md b/x/mint/spec/02_state.md index b5acd5264846..2fa04b1ef876 100644 --- a/x/mint/spec/02_state.md +++ b/x/mint/spec/02_state.md @@ -10,7 +10,7 @@ The minter is a space for holding current inflation information. * Minter: `0x00 -> ProtocolBuffer(minter)` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc7/proto/cosmos/mint/v1beta1/mint.proto#L8-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/mint/v1beta1/mint.proto#L9-L23 ## Params @@ -18,4 +18,4 @@ Minting params are held in the global params store. * Params: `mint/params -> legacy_amino(params)` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc7/proto/cosmos/mint/v1beta1/mint.proto#L21-L53 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/mint/v1beta1/mint.proto#L25-L57 diff --git a/x/mint/spec/03_begin_block.md b/x/mint/spec/03_begin_block.md index ede3d2c328a6..67bd7d8a8f53 100644 --- a/x/mint/spec/03_begin_block.md +++ b/x/mint/spec/03_begin_block.md @@ -7,7 +7,19 @@ order: 3 Minting parameters are recalculated and inflation paid at the beginning of each block. -## NextInflationRate +## Inflation rate calculation + +Inflation rate is calculated using an "inflation calculation function" that's +passed to the `NewAppModule` function. If no function is passed, then the SDK's +default inflation function will be used (`NextInflationRate`). In case a custom +inflation calculation logic is needed, this can be achieved by defining and +passing a function that matches `InflationCalculationFn`'s signature. + +```go +type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec) sdk.Dec +``` + +### NextInflationRate The target annual inflation rate is recalculated each block. The inflation is also subject to a rate change (positive or negative) diff --git a/x/mint/types/codec.go b/x/mint/types/codec.go index b436c10298d5..a7067d90c2c5 100644 --- a/x/mint/types/codec.go +++ b/x/mint/types/codec.go @@ -5,9 +5,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" ) -var ( - amino = codec.NewLegacyAmino() -) +var amino = codec.NewLegacyAmino() func init() { cryptocodec.RegisterCrypto(amino) diff --git a/x/mint/types/minter_test.go b/x/mint/types/minter_test.go index 4abedb51cd05..04de803a2e5e 100644 --- a/x/mint/types/minter_test.go +++ b/x/mint/types/minter_test.go @@ -25,12 +25,16 @@ func TestNextInflation(t *testing.T) { // 100% bonded, starting at 20% inflation and being reduced // (1 - (1/0.67))*(0.13/8667) - {sdk.OneDec(), sdk.NewDecWithPrec(20, 2), - sdk.OneDec().Sub(sdk.OneDec().Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr)}, + { + sdk.OneDec(), sdk.NewDecWithPrec(20, 2), + sdk.OneDec().Sub(sdk.OneDec().Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr), + }, // 50% bonded, starting at 10% inflation and being increased - {sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(10, 2), - sdk.OneDec().Sub(sdk.NewDecWithPrec(5, 1).Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr)}, + { + sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(10, 2), + sdk.OneDec().Sub(sdk.NewDecWithPrec(5, 1).Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr), + }, // test 7% minimum stop (testing with 100% bonded) {sdk.OneDec(), sdk.NewDecWithPrec(7, 2), sdk.ZeroDec()}, @@ -115,7 +119,6 @@ func BenchmarkNextInflation(b *testing.B) { for n := 0; n < b.N; n++ { minter.NextInflationRate(params, bondedRatio) } - } // Next annual provisions benchmarking @@ -130,5 +133,4 @@ func BenchmarkNextAnnualProvisions(b *testing.B) { for n := 0; n < b.N; n++ { minter.NextAnnualProvisions(params, totalSupply) } - } diff --git a/x/mint/types/params.go b/x/mint/types/params.go index c5bf838ac3f6..69a909af05bc 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -29,7 +29,6 @@ func ParamKeyTable() paramtypes.KeyTable { func NewParams( mintDenom string, inflationRateChange, inflationMax, inflationMin, goalBonded sdk.Dec, blocksPerYear uint64, ) Params { - return Params{ MintDenom: mintDenom, InflationRateChange: inflationRateChange, @@ -80,7 +79,6 @@ func (p Params) Validate() error { } return nil - } // String implements the Stringer interface. @@ -171,8 +169,8 @@ func validateGoalBonded(i interface{}) error { return fmt.Errorf("invalid parameter type: %T", i) } - if v.IsNegative() { - return fmt.Errorf("goal bonded cannot be negative: %s", v) + if v.IsNegative() || v.IsZero() { + return fmt.Errorf("goal bonded must be positive: %s", v) } if v.GT(sdk.OneDec()) { return fmt.Errorf("goal bonded too large: %s", v) diff --git a/x/nft/client/testutil/grpc.go b/x/nft/client/testutil/grpc.go index 8d98182c5b7d..11ba5b777240 100644 --- a/x/nft/client/testutil/grpc.go +++ b/x/nft/client/testutil/grpc.go @@ -12,7 +12,7 @@ func (s *IntegrationTestSuite) TestQueryBalanceGRPC() { testCases := []struct { name string args struct { - ClassId string + ClassID string Owner string } expectErr bool @@ -22,10 +22,10 @@ func (s *IntegrationTestSuite) TestQueryBalanceGRPC() { { name: "fail not exist class id", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: "invalid_class_id", + ClassID: "invalid_class_id", Owner: s.owner.String(), }, expectErr: true, @@ -35,10 +35,10 @@ func (s *IntegrationTestSuite) TestQueryBalanceGRPC() { { name: "fail not exist owner", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: ExpNFT.ClassId, + ClassID: ExpNFT.ClassId, Owner: s.owner.String(), }, expectErr: false, @@ -47,10 +47,10 @@ func (s *IntegrationTestSuite) TestQueryBalanceGRPC() { { name: "success", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: ExpNFT.ClassId, + ClassID: ExpNFT.ClassId, Owner: val.Address.String(), }, expectErr: false, @@ -59,7 +59,7 @@ func (s *IntegrationTestSuite) TestQueryBalanceGRPC() { } balanceURL := val.APIAddress + "/cosmos/nft/v1beta1/balance/%s/%s" for _, tc := range testCases { - uri := fmt.Sprintf(balanceURL, tc.args.Owner, tc.args.ClassId) + uri := fmt.Sprintf(balanceURL, tc.args.Owner, tc.args.ClassID) s.Run(tc.name, func() { resp, _ := rest.GetRequest(uri) if tc.expectErr { @@ -80,8 +80,8 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { testCases := []struct { name string args struct { - ClassId string - Id string + ClassID string + ID string } expectErr bool errMsg string @@ -90,11 +90,11 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { { name: "class id is invalid", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: "invalid_class_id", - Id: ExpNFT.Id, + ClassID: "invalid_class_id", + ID: ExpNFT.Id, }, expectErr: true, errMsg: "invalid class id", @@ -103,11 +103,11 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { { name: "class id does not exist", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: "class-id", - Id: ExpNFT.Id, + ClassID: "class-id", + ID: ExpNFT.Id, }, expectErr: false, expectResult: "", @@ -115,11 +115,11 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { { name: "nft id is invalid", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: ExpNFT.ClassId, - Id: "invalid_nft_id", + ClassID: ExpNFT.ClassId, + ID: "invalid_nft_id", }, expectErr: true, expectResult: "", @@ -127,11 +127,11 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { { name: "nft id does not exist", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: ExpNFT.ClassId, - Id: "nft-id", + ClassID: ExpNFT.ClassId, + ID: "nft-id", }, expectErr: false, expectResult: "", @@ -139,11 +139,11 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { { name: "nft exist", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: ExpNFT.ClassId, - Id: ExpNFT.Id, + ClassID: ExpNFT.ClassId, + ID: ExpNFT.Id, }, expectErr: false, expectResult: val.Address.String(), @@ -151,7 +151,7 @@ func (s *IntegrationTestSuite) TestQueryOwnerGRPC() { } ownerURL := val.APIAddress + "/cosmos/nft/v1beta1/owner/%s/%s" for _, tc := range testCases { - uri := fmt.Sprintf(ownerURL, tc.args.ClassId, tc.args.Id) + uri := fmt.Sprintf(ownerURL, tc.args.ClassID, tc.args.ID) s.Run(tc.name, func() { resp, err := rest.GetRequest(uri) if tc.expectErr { @@ -173,7 +173,7 @@ func (s *IntegrationTestSuite) TestQuerySupplyGRPC() { testCases := []struct { name string args struct { - ClassId string + ClassID string } expectErr bool errMsg string @@ -182,9 +182,9 @@ func (s *IntegrationTestSuite) TestQuerySupplyGRPC() { { name: "class id is invalid", args: struct { - ClassId string + ClassID string }{ - ClassId: "invalid_class_id", + ClassID: "invalid_class_id", }, expectErr: true, errMsg: "invalid class id", @@ -193,9 +193,9 @@ func (s *IntegrationTestSuite) TestQuerySupplyGRPC() { { name: "class id does not exist", args: struct { - ClassId string + ClassID string }{ - ClassId: "class-id", + ClassID: "class-id", }, expectErr: false, expectResult: 0, @@ -203,9 +203,9 @@ func (s *IntegrationTestSuite) TestQuerySupplyGRPC() { { name: "class id exist", args: struct { - ClassId string + ClassID string }{ - ClassId: ExpNFT.ClassId, + ClassID: ExpNFT.ClassId, }, expectErr: false, expectResult: 1, @@ -213,7 +213,7 @@ func (s *IntegrationTestSuite) TestQuerySupplyGRPC() { } supplyURL := val.APIAddress + "/cosmos/nft/v1beta1/supply/%s" for _, tc := range testCases { - uri := fmt.Sprintf(supplyURL, tc.args.ClassId) + uri := fmt.Sprintf(supplyURL, tc.args.ClassID) s.Run(tc.name, func() { resp, err := rest.GetRequest(uri) if tc.expectErr { @@ -234,7 +234,7 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { testCases := []struct { name string args struct { - ClassId string + ClassID string Owner string } expectErr bool @@ -244,7 +244,7 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { { name: "classID and owner are both empty", args: struct { - ClassId string + ClassID string Owner string }{}, errorMsg: "must provide at least one of classID or owner", @@ -254,10 +254,10 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { { name: "classID is invalid", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: "invalid_class_id", + ClassID: "invalid_class_id", }, expectErr: true, expectResult: []*nft.NFT{}, @@ -265,10 +265,10 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { { name: "classID does not exist", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: "class-id", + ClassID: "class-id", }, expectErr: false, expectResult: []*nft.NFT{}, @@ -276,10 +276,10 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { { name: "success query by classID", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: ExpNFT.ClassId, + ClassID: ExpNFT.ClassId, }, expectErr: false, expectResult: []*nft.NFT{&ExpNFT}, @@ -287,7 +287,7 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { { name: "success query by owner", args: struct { - ClassId string + ClassID string Owner string }{ Owner: val.Address.String(), @@ -298,10 +298,10 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { { name: "success query by owner and classID", args: struct { - ClassId string + ClassID string Owner string }{ - ClassId: ExpNFT.ClassId, + ClassID: ExpNFT.ClassId, Owner: val.Address.String(), }, expectErr: false, @@ -310,7 +310,7 @@ func (s *IntegrationTestSuite) TestQueryNFTsGRPC() { } nftsOfClassURL := val.APIAddress + "/cosmos/nft/v1beta1/nfts?class_id=%s&owner=%s" for _, tc := range testCases { - uri := fmt.Sprintf(nftsOfClassURL, tc.args.ClassId, tc.args.Owner) + uri := fmt.Sprintf(nftsOfClassURL, tc.args.ClassID, tc.args.Owner) s.Run(tc.name, func() { resp, err := rest.GetRequest(uri) if tc.expectErr { @@ -331,8 +331,8 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() { testCases := []struct { name string args struct { - ClassId string - Id string + ClassID string + ID string } expectErr bool errorMsg string @@ -340,11 +340,11 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() { { name: "class id is invalid", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: "invalid_class_id", - Id: ExpNFT.Id, + ClassID: "invalid_class_id", + ID: ExpNFT.Id, }, expectErr: true, errorMsg: "invalid class id", @@ -352,11 +352,11 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() { { name: "class id does not exist", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: "class", - Id: ExpNFT.Id, + ClassID: "class", + ID: ExpNFT.Id, }, expectErr: true, errorMsg: "not found nft", @@ -364,11 +364,11 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() { { name: "nft id is invalid", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: ExpNFT.ClassId, - Id: "invalid_nft_id", + ClassID: ExpNFT.ClassId, + ID: "invalid_nft_id", }, expectErr: true, errorMsg: "invalid nft id", @@ -376,11 +376,11 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() { { name: "nft id does not exist", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: ExpNFT.ClassId, - Id: "nft-id", + ClassID: ExpNFT.ClassId, + ID: "nft-id", }, expectErr: true, errorMsg: "not found nft", @@ -388,18 +388,18 @@ func (s *IntegrationTestSuite) TestQueryNFTGRPC() { { name: "exist nft", args: struct { - ClassId string - Id string + ClassID string + ID string }{ - ClassId: ExpNFT.ClassId, - Id: ExpNFT.Id, + ClassID: ExpNFT.ClassId, + ID: ExpNFT.Id, }, expectErr: false, }, } nftURL := val.APIAddress + "/cosmos/nft/v1beta1/nfts/%s/%s" for _, tc := range testCases { - uri := fmt.Sprintf(nftURL, tc.args.ClassId, tc.args.Id) + uri := fmt.Sprintf(nftURL, tc.args.ClassID, tc.args.ID) s.Run(tc.name, func() { resp, err := rest.GetRequest(uri) if tc.expectErr { @@ -420,7 +420,7 @@ func (s *IntegrationTestSuite) TestQueryClassGRPC() { testCases := []struct { name string args struct { - ClassId string + ClassID string } expectErr bool errorMsg string @@ -428,9 +428,9 @@ func (s *IntegrationTestSuite) TestQueryClassGRPC() { { name: "class id does not exist", args: struct { - ClassId string + ClassID string }{ - ClassId: "class-id", + ClassID: "class-id", }, expectErr: true, errorMsg: "not found class", @@ -438,16 +438,16 @@ func (s *IntegrationTestSuite) TestQueryClassGRPC() { { name: "class id exist", args: struct { - ClassId string + ClassID string }{ - ClassId: ExpNFT.ClassId, + ClassID: ExpNFT.ClassId, }, expectErr: false, }, } classURL := val.APIAddress + "/cosmos/nft/v1beta1/classes/%s" for _, tc := range testCases { - uri := fmt.Sprintf(classURL, tc.args.ClassId) + uri := fmt.Sprintf(classURL, tc.args.ClassID) s.Run(tc.name, func() { resp, err := rest.GetRequest(uri) if tc.expectErr { diff --git a/x/nft/keeper/genesis.go b/x/nft/keeper/genesis.go index f8cf05184c0c..116bf0bd2494 100644 --- a/x/nft/keeper/genesis.go +++ b/x/nft/keeper/genesis.go @@ -13,14 +13,10 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *nft.GenesisState) { if err := k.SaveClass(ctx, *class); err != nil { panic(err) } - } for _, entry := range data.Entries { for _, nft := range entry.Nfts { - owner, err := sdk.AccAddressFromBech32(entry.Owner) - if err != nil { - panic(err) - } + owner := sdk.MustAccAddressFromBech32(entry.Owner) if err := k.Mint(ctx, *nft, owner); err != nil { panic(err) diff --git a/x/nft/keeper/grpc_query.go b/x/nft/keeper/grpc_query.go index f79641326e4c..e22fdf0b4a22 100644 --- a/x/nft/keeper/grpc_query.go +++ b/x/nft/keeper/grpc_query.go @@ -151,7 +151,6 @@ func (k Keeper) NFT(goCtx context.Context, r *nft.QueryNFTRequest) (*nft.QueryNF return nil, nft.ErrNFTNotExists.Wrapf("not found nft: class: %s, id: %s", r.ClassId, r.Id) } return &nft.QueryNFTResponse{Nft: &n}, nil - } // Class return an NFT class based on its id @@ -191,7 +190,6 @@ func (k Keeper) Classes(goCtx context.Context, r *nft.QueryClassesRequest) (*nft classes = append(classes, &class) return nil }) - if err != nil { return nil, err } diff --git a/x/nft/keeper/grpc_query_test.go b/x/nft/keeper/grpc_query_test.go index 20d0f0afbc7c..6f6090e5dd93 100644 --- a/x/nft/keeper/grpc_query_test.go +++ b/x/nft/keeper/grpc_query_test.go @@ -16,9 +16,7 @@ func TestGRPCQuery(t *testing.T) { } func (s *TestSuite) TestBalance() { - var ( - req *nft.QueryBalanceRequest - ) + var req *nft.QueryBalanceRequest testCases := []struct { msg string malleate func(index int, require *require.Assertions) @@ -169,9 +167,7 @@ func (s *TestSuite) TestOwner() { } func (s *TestSuite) TestSupply() { - var ( - req *nft.QuerySupplyRequest - ) + var req *nft.QuerySupplyRequest testCases := []struct { msg string malleate func(index int, require *require.Assertions) @@ -252,6 +248,7 @@ func (s *TestSuite) TestSupply() { }) } } + func (s *TestSuite) TestNFTs() { var ( req *nft.QueryNFTsRequest diff --git a/x/nft/keeper/keeper_test.go b/x/nft/keeper/keeper_test.go index 7e03f79eb582..5de7e2f7b2b9 100644 --- a/x/nft/keeper/keeper_test.go +++ b/x/nft/keeper/keeper_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/stretchr/testify/suite" - tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/simapp" @@ -279,7 +279,7 @@ func (s *TestSuite) TestTransfer() { err = s.app.NFTKeeper.Mint(s.ctx, expNFT, s.addrs[0]) s.Require().NoError(err) - //valid owner + // valid owner err = s.app.NFTKeeper.Transfer(s.ctx, testClassID, testID, s.addrs[1]) s.Require().NoError(err) diff --git a/x/nft/keeper/keys.go b/x/nft/keeper/keys.go index 6c65581db2d1..51df6e5c36a5 100644 --- a/x/nft/keeper/keys.go +++ b/x/nft/keeper/keys.go @@ -55,7 +55,7 @@ func nftOfClassByOwnerStoreKey(owner sdk.AccAddress, classID string) []byte { owner = address.MustLengthPrefix(owner) classIDBz := conv.UnsafeStrToBytes(classID) - var key = make([]byte, len(NFTOfClassByOwnerKey)+len(owner)+len(Delimiter)+len(classIDBz)+len(Delimiter)) + key := make([]byte, len(NFTOfClassByOwnerKey)+len(owner)+len(Delimiter)+len(classIDBz)+len(Delimiter)) copy(key, NFTOfClassByOwnerKey) copy(key[len(NFTOfClassByOwnerKey):], owner) copy(key[len(NFTOfClassByOwnerKey)+len(owner):], Delimiter) @@ -70,7 +70,7 @@ func nftOfClassByOwnerStoreKey(owner sdk.AccAddress, classID string) []byte { func prefixNftOfClassByOwnerStoreKey(owner sdk.AccAddress) []byte { owner = address.MustLengthPrefix(owner) - var key = make([]byte, len(NFTOfClassByOwnerKey)+len(owner)+len(Delimiter)) + key := make([]byte, len(NFTOfClassByOwnerKey)+len(owner)+len(Delimiter)) copy(key, NFTOfClassByOwnerKey) copy(key[len(NFTOfClassByOwnerKey):], owner) copy(key[len(NFTOfClassByOwnerKey)+len(owner):], Delimiter) @@ -97,7 +97,7 @@ func ownerStoreKey(classID, nftID string) []byte { classIDBz := conv.UnsafeStrToBytes(classID) nftIDBz := conv.UnsafeStrToBytes(nftID) - var key = make([]byte, len(OwnerKey)+len(classIDBz)+len(Delimiter)+len(nftIDBz)) + key := make([]byte, len(OwnerKey)+len(classIDBz)+len(Delimiter)+len(nftIDBz)) copy(key, OwnerKey) copy(key[len(OwnerKey):], classIDBz) copy(key[len(OwnerKey)+len(classIDBz):], Delimiter) diff --git a/x/nft/keeper/nft.go b/x/nft/keeper/nft.go index c3fb583db9d5..336aff41b677 100644 --- a/x/nft/keeper/nft.go +++ b/x/nft/keeper/nft.go @@ -20,6 +20,12 @@ func (k Keeper) Mint(ctx sdk.Context, token nft.NFT, receiver sdk.AccAddress) er k.setNFT(ctx, token) k.setOwner(ctx, token.ClassId, token.Id, receiver) k.incrTotalSupply(ctx, token.ClassId) + + ctx.EventManager().EmitTypedEvent(&nft.EventMint{ + ClassId: token.ClassId, + Id: token.Id, + Owner: receiver.String(), + }) return nil } @@ -40,6 +46,11 @@ func (k Keeper) Burn(ctx sdk.Context, classID string, nftID string) error { k.deleteOwner(ctx, classID, nftID, owner) k.decrTotalSupply(ctx, classID) + ctx.EventManager().EmitTypedEvent(&nft.EventBurn{ + ClassId: classID, + Id: nftID, + Owner: owner.String(), + }) return nil } @@ -62,7 +73,8 @@ func (k Keeper) Update(ctx sdk.Context, token nft.NFT) error { func (k Keeper) Transfer(ctx sdk.Context, classID string, nftID string, - receiver sdk.AccAddress) error { + receiver sdk.AccAddress, +) error { if !k.HasClass(ctx, classID) { return sdkerrors.Wrap(nft.ErrClassNotExists, classID) } diff --git a/x/nft/module/module.go b/x/nft/module/module.go index 0b456e55c33c..63999d68157e 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -71,10 +70,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config sdkclient.TxEn return nft.ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the nft module. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx sdkclient.Context, r *mux.Router) { -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the nft module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { if err := nft.RegisterQueryHandlerClient(context.Background(), mux, nft.NewQueryClient(clientCtx)); err != nil { @@ -157,13 +152,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} - -// EndBlock does nothing -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // ____________________________________________________________________________ // AppModuleSimulation functions diff --git a/x/nft/msgs.go b/x/nft/msgs.go index 4b85199cdc04..ec648e5f498c 100644 --- a/x/nft/msgs.go +++ b/x/nft/msgs.go @@ -10,9 +10,7 @@ const ( TypeMsgSend = "send" ) -var ( - _ sdk.Msg = &MsgSend{} -) +var _ sdk.Msg = &MsgSend{} // ValidateBasic implements the Msg.ValidateBasic method. func (m MsgSend) ValidateBasic() error { diff --git a/x/nft/simulation/genesis_test.go b/x/nft/simulation/genesis_test.go index cfd3d1f6fde7..3586229497a0 100644 --- a/x/nft/simulation/genesis_test.go +++ b/x/nft/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -26,7 +27,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/x/nft/simulation/operations.go b/x/nft/simulation/operations.go index d430c3c12e78..c4e9f501ac72 100644 --- a/x/nft/simulation/operations.go +++ b/x/nft/simulation/operations.go @@ -27,9 +27,7 @@ const ( WeightSend = 100 ) -var ( - TypeMsgSend = sdk.MsgTypeURL(&nft.MsgSend{}) -) +var TypeMsgSend = sdk.MsgTypeURL(&nft.MsgSend{}) // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( @@ -38,11 +36,9 @@ func WeightedOperations( cdc codec.JSONCodec, ak nft.AccountKeeper, bk nft.BankKeeper, - k keeper.Keeper) simulation.WeightedOperations { - - var ( - weightMsgSend int - ) + k keeper.Keeper, +) simulation.WeightedOperations { + var weightMsgSend int appParams.GetOrGenerate(cdc, OpWeightMsgSend, &weightMsgSend, nil, func(_ *rand.Rand) { @@ -63,7 +59,8 @@ func SimulateMsgSend( cdc *codec.ProtoCodec, ak nft.AccountKeeper, bk nft.BankKeeper, - k keeper.Keeper) simtypes.Operation { + k keeper.Keeper, +) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { @@ -81,7 +78,7 @@ func SimulateMsgSend( return simtypes.NoOpMsg(nft.ModuleName, TypeMsgSend, err.Error()), nil, err } - spendLimit := spendableCoins.Sub(fees) + spendLimit := spendableCoins.Sub(fees...) if spendLimit == nil { return simtypes.NoOpMsg(nft.ModuleName, TypeMsgSend, "spend limit is nil"), nil, nil } @@ -99,7 +96,8 @@ func SimulateMsgSend( } txCfg := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + r, txCfg, []sdk.Msg{msg}, fees, diff --git a/x/nft/simulation/operations_test.go b/x/nft/simulation/operations_test.go index dd222ecbbc9a..0a500f5a971c 100644 --- a/x/nft/simulation/operations_test.go +++ b/x/nft/simulation/operations_test.go @@ -107,7 +107,6 @@ func (suite *SimTestSuite) TestSimulateMsgSend() { suite.app.AppCodec().UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) suite.Require().Len(futureOperations, 0) - } func TestSimTestSuite(t *testing.T) { diff --git a/x/nft/spec/01_concepts.md b/x/nft/spec/01_concepts.md new file mode 100644 index 000000000000..ae4bbd99f7c9 --- /dev/null +++ b/x/nft/spec/01_concepts.md @@ -0,0 +1,13 @@ + + +# Concepts + +## Class + +`x/nft` module defines a struct `Class` to describe the common characteristics of a class of nft, under this class, you can create a variety of nft, which is equivalent to an erc721 contract for Ethereum. The design is defined in the [ADR 043](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-043-nft-module.md). + +## NFT + +The full name of NFT is Non-Fungible Tokens. Because of the irreplaceable nature of NFT, it means that it can be used to represent unique things. The nft implemented by this module is fully compatible with Ethereum ERC721 standard. diff --git a/x/nft/spec/02_state.md b/x/nft/spec/02_state.md new file mode 100644 index 000000000000..6edb0c1d0c59 --- /dev/null +++ b/x/nft/spec/02_state.md @@ -0,0 +1,35 @@ + + +# State + +## Class + +Class is mainly composed of `id`, `name`, `symbol`, `description`, `uri`, `uri_hash`,`data` where `id` is the unique identifier of the class, similar to the Ethereum ERC721 contract address, the others are optional. + +* Class: `0x01 | classID | -> ProtocolBuffer(Class)` + +## NFT + +NFT is mainly composed of `class_id`, `id`, `uri`, `uri_hash` and `data`. Among them, `class_id` and `id` are two-tuples that identify the uniqueness of nft, `uri` and `uri_hash` is optional, which identifies the off-chain storage location of the nft, and `data` is an Any type. Use Any chain of `x/nft` modules can be customized by extending this field + +* NFT: `0x02 | classID | 0x00 | nftID |-> ProtocolBuffer(NFT)` + +## NFTOfClassByOwner + +NFTOfClassByOwner is mainly to realize the function of querying all nfts using classID and owner, without other redundant functions. + +* NFTOfClassByOwner: `0x03 | owner | 0x00 | classID | 0x00 | nftID |-> 0x01` + +## Owner + +Since there is no extra field in NFT to indicate the owner of nft, an additional key-value pair is used to save the ownership of nft. With the transfer of nft, the key-value pair is updated synchronously. + +* OwnerKey: `0x04 | classID | 0x00 | nftID |-> owner` + +## TotalSupply + +TotalSupply is responsible for tracking the number of all nfts under a certain class. Mint operation is performed under the changed class, supply increases by one, burn operation, and supply decreases by one. + +* OwnerKey: `0x05 | classID |-> totalSupply` diff --git a/x/nft/spec/03_messages.md b/x/nft/spec/03_messages.md new file mode 100644 index 000000000000..fd1ce0c321e6 --- /dev/null +++ b/x/nft/spec/03_messages.md @@ -0,0 +1,17 @@ + + +# Messages + +In this section we describe the processing of messages for the nft module. + +## MsgSend + +You can use the `MsgSend` message to transfer the ownership of nft. This is a function provided by the `x/nft` module. Of course, you can use the `Transfer` method to implement your own transfer logic, but you need to pay extra attention to the transfer permissions. + +The message handling should fail if: + +* provided `ClassID` is not exist. +* provided `Id` is not exist. +* provided `Sender` is not the owner of nft. diff --git a/x/nft/spec/04_events.md b/x/nft/spec/04_events.md new file mode 100644 index 000000000000..a831c8b7b216 --- /dev/null +++ b/x/nft/spec/04_events.md @@ -0,0 +1,3 @@ +# Events + +The nft module emits proto events defined in [the Protobuf reference](https://buf.build/cosmos/cosmos-sdk/docs/main:cosmos.nft.v1beta1). diff --git a/x/nft/spec/README.md b/x/nft/spec/README.md new file mode 100644 index 000000000000..570a15058c35 --- /dev/null +++ b/x/nft/spec/README.md @@ -0,0 +1,22 @@ + + +# `nft` + +## Contents + +## Abstract + +`x/nft` is an implementation of a Cosmos SDK module, per [ADR 43](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-043-nft-module.md), that allows you to create nft classification, create nft, transfer nft, update nft, and support various queries by integrating the module. It is fully compatible with the ERC721 specification. + +1. **[Concept](01_concepts.md)** + * [Class](01_concepts.md#Class) + * [NFT](01_concepts.md#NFT) +2. **[State](02_state.md)** +3. **[Messages](03_messages.md)** + * [MsgSend](03_messages.md#MsgSend) +4. **[Events](04_events.md)** diff --git a/x/params/client/testutil/cli_test.go b/x/params/client/testutil/cli_test.go index dd36a6af2d3e..1035ca750264 100644 --- a/x/params/client/testutil/cli_test.go +++ b/x/params/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/params/keeper/grpc_query.go b/x/params/keeper/grpc_query.go index d918dc002a38..48fd9ec68694 100644 --- a/x/params/keeper/grpc_query.go +++ b/x/params/keeper/grpc_query.go @@ -41,7 +41,6 @@ func (k Keeper) Subspaces( goCtx context.Context, req *proposal.QuerySubspacesRequest, ) (*proposal.QuerySubspacesResponse, error) { - if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } diff --git a/x/params/migrations/v036/types.go b/x/params/migrations/v036/types.go deleted file mode 100644 index 0e0b408ddab5..000000000000 --- a/x/params/migrations/v036/types.go +++ /dev/null @@ -1,175 +0,0 @@ -// Package v036 is used for legacy migration scripts. Actual migration scripts -// for v036 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -package v036 - -import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/codec" - v036gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v036" -) - -const ( - // ModuleName defines the name of the module - ModuleName = "params" - - // RouterKey defines the routing key for a ParameterChangeProposal - RouterKey = "params" -) - -const ( - // ProposalTypeChange defines the type for a ParameterChangeProposal - ProposalTypeChange = "ParameterChange" -) - -// Param module codespace constants -const ( - DefaultCodespace = "params" - - CodeUnknownSubspace = 1 - CodeSettingParameter = 2 - CodeEmptyData = 3 -) - -// Assert ParameterChangeProposal implements v036gov.Content at compile-time -var _ v036gov.Content = ParameterChangeProposal{} - -// ParameterChangeProposal defines a proposal which contains multiple parameter -// changes. -type ParameterChangeProposal struct { - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Changes []ParamChange `json:"changes" yaml:"changes"` -} - -func NewParameterChangeProposal(title, description string, changes []ParamChange) ParameterChangeProposal { - return ParameterChangeProposal{title, description, changes} -} - -// GetTitle returns the title of a parameter change proposal. -func (pcp ParameterChangeProposal) GetTitle() string { return pcp.Title } - -// GetDescription returns the description of a parameter change proposal. -func (pcp ParameterChangeProposal) GetDescription() string { return pcp.Description } - -// GetDescription returns the routing key of a parameter change proposal. -func (pcp ParameterChangeProposal) ProposalRoute() string { return RouterKey } - -// ProposalType returns the type of a parameter change proposal. -func (pcp ParameterChangeProposal) ProposalType() string { return ProposalTypeChange } - -// ValidateBasic validates the parameter change proposal -func (pcp ParameterChangeProposal) ValidateBasic() error { - err := v036gov.ValidateAbstract(pcp) - if err != nil { - return err - } - - return ValidateChanges(pcp.Changes) -} - -// String implements the Stringer interface. -func (pcp ParameterChangeProposal) String() string { - var b strings.Builder - - b.WriteString(fmt.Sprintf(`Parameter Change Proposal: - Title: %s - Description: %s - Changes: -`, pcp.Title, pcp.Description)) - - for _, pc := range pcp.Changes { - b.WriteString(fmt.Sprintf(` Param Change: - Subspace: %s - Key: %s - Subkey: %X - Value: %X -`, pc.Subspace, pc.Key, pc.Subkey, pc.Value)) - } - - return b.String() -} - -// ParamChange defines a parameter change. -type ParamChange struct { - Subspace string `json:"subspace" yaml:"subspace"` - Key string `json:"key" yaml:"key"` - Subkey string `json:"subkey,omitempty" yaml:"subkey,omitempty"` - Value string `json:"value" yaml:"value"` -} - -func NewParamChange(subspace, key, value string) ParamChange { - return ParamChange{subspace, key, "", value} -} - -func NewParamChangeWithSubkey(subspace, key, subkey, value string) ParamChange { - return ParamChange{subspace, key, subkey, value} -} - -// String implements the Stringer interface. -func (pc ParamChange) String() string { - return fmt.Sprintf(`Param Change: - Subspace: %s - Key: %s - Subkey: %X - Value: %X -`, pc.Subspace, pc.Key, pc.Subkey, pc.Value) -} - -// ValidateChange performs basic validation checks over a set of ParamChange. It -// returns an error if any ParamChange is invalid. -func ValidateChanges(changes []ParamChange) error { - if len(changes) == 0 { - return ErrEmptyChanges(DefaultCodespace) - } - - for _, pc := range changes { - if len(pc.Subspace) == 0 { - return ErrEmptySubspace(DefaultCodespace) - } - if len(pc.Key) == 0 { - return ErrEmptyKey(DefaultCodespace) - } - if len(pc.Value) == 0 { - return ErrEmptyValue(DefaultCodespace) - } - } - - return nil -} - -// ErrUnknownSubspace returns an unknown subspace error. -func ErrUnknownSubspace(codespace string, space string) error { - return fmt.Errorf("unknown subspace %s", space) -} - -// ErrSettingParameter returns an error for failing to set a parameter. -func ErrSettingParameter(codespace string, key, subkey, value, msg string) error { - return fmt.Errorf("error setting parameter %s on %s (%s): %s", value, key, subkey, msg) -} - -// ErrEmptyChanges returns an error for empty parameter changes. -func ErrEmptyChanges(codespace string) error { - return fmt.Errorf("submitted parameter changes are empty") -} - -// ErrEmptySubspace returns an error for an empty subspace. -func ErrEmptySubspace(codespace string) error { - return fmt.Errorf("parameter subspace is empty") -} - -// ErrEmptyKey returns an error for when an empty key is given. -func ErrEmptyKey(codespace string) error { - return fmt.Errorf("parameter key is empty") -} - -// ErrEmptyValue returns an error for when an empty key is given. -func ErrEmptyValue(codespace string) error { - return fmt.Errorf("parameter value is empty") -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(ParameterChangeProposal{}, "cosmos-sdk/ParameterChangeProposal", nil) -} diff --git a/x/params/module.go b/x/params/module.go index f17ab2199d44..ab8192d2a7f7 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -51,10 +50,6 @@ func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, config client.TxEncodin return nil } -// RegisterRESTRoutes registers the REST routes for the params module. -// Deprecated: RegisterRESTRoutes is deprecated. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the params module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := proposal.RegisterQueryHandlerClient(context.Background(), mux, proposal.NewQueryClient(clientCtx)); err != nil { @@ -116,7 +111,6 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { proposal.RegisterQueryServer(cfg.QueryServer(), am.keeper) - } // ProposalContents returns all the params content functions used to @@ -145,11 +139,3 @@ func (am AppModule) ExportGenesis(_ sdk.Context, _ codec.JSONCodec) json.RawMess // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } - -// BeginBlock performs a no-op. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock performs a no-op. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} diff --git a/x/params/types/consensus_params.go b/x/params/types/consensus_params.go index 4c7edb562090..fe27f7e8d9aa 100644 --- a/x/params/types/consensus_params.go +++ b/x/params/types/consensus_params.go @@ -1,6 +1,7 @@ package types import ( + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -14,7 +15,7 @@ import ( func ConsensusParamsKeyTable() KeyTable { return NewKeyTable( NewParamSetPair( - baseapp.ParamStoreKeyBlockParams, tmproto.BlockParams{}, baseapp.ValidateBlockParams, + baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams, ), NewParamSetPair( baseapp.ParamStoreKeyEvidenceParams, tmproto.EvidenceParams{}, baseapp.ValidateEvidenceParams, diff --git a/x/params/types/proposal/params.pb.go b/x/params/types/proposal/params.pb.go index 1681b3960e63..332b3bc27e11 100644 --- a/x/params/types/proposal/params.pb.go +++ b/x/params/types/proposal/params.pb.go @@ -5,6 +5,7 @@ package proposal import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -133,27 +134,28 @@ func init() { } var fileDescriptor_53a944ecb0483e4c = []byte{ - // 307 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, - 0x34, 0x84, 0x72, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0x21, 0x6a, 0xf4, 0xa0, 0x82, - 0x50, 0x35, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x15, 0xfa, 0x20, 0x16, 0x44, 0xb1, 0xd2, - 0x7c, 0x46, 0x2e, 0xf1, 0x00, 0x90, 0xc2, 0xd4, 0x92, 0xd4, 0x22, 0xe7, 0x8c, 0xc4, 0xbc, 0xf4, - 0xd4, 0x80, 0xa2, 0xfc, 0x82, 0xfc, 0xe2, 0xc4, 0x1c, 0x21, 0x11, 0x2e, 0xd6, 0x92, 0xcc, 0x92, - 0x9c, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x08, 0x47, 0x48, 0x81, 0x8b, 0x3b, 0x25, - 0xb5, 0x38, 0xb9, 0x28, 0xb3, 0xa0, 0x24, 0x33, 0x3f, 0x4f, 0x82, 0x09, 0x2c, 0x87, 0x2c, 0x24, - 0xe4, 0xc4, 0xc5, 0x9e, 0x0c, 0x36, 0xa9, 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x49, - 0x0f, 0xab, 0x93, 0xf4, 0xc0, 0x16, 0x43, 0x2c, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, - 0xa6, 0xd1, 0x8a, 0xa3, 0x63, 0x81, 0x3c, 0xc3, 0x8c, 0x05, 0xf2, 0x0c, 0x4a, 0xe1, 0x5c, 0xdc, - 0x48, 0xea, 0x84, 0xa4, 0xb8, 0x38, 0x8a, 0x4b, 0x93, 0x8a, 0x0b, 0x12, 0x93, 0x61, 0xee, 0x82, - 0xf3, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0xa1, 0x4e, 0x02, 0x31, 0x41, 0x5e, 0x28, 0x4b, - 0xcc, 0x29, 0x4d, 0x95, 0x60, 0x86, 0x78, 0x01, 0xcc, 0xb1, 0x62, 0x01, 0x19, 0xec, 0x14, 0xb4, - 0xe2, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, - 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x99, 0xa4, - 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0x03, 0x1d, 0x42, 0xe9, 0x16, - 0xa7, 0x64, 0xeb, 0x57, 0xc0, 0x62, 0xa0, 0xa4, 0xb2, 0x20, 0xb5, 0x58, 0xbf, 0x00, 0x1a, 0x64, - 0x49, 0x6c, 0xe0, 0x50, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x26, 0x09, 0x3d, 0xa8, - 0x01, 0x00, 0x00, + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0xbb, 0x6e, 0xc2, 0x30, + 0x14, 0x8d, 0x1b, 0xfa, 0x32, 0x4b, 0x15, 0x51, 0x35, 0xcd, 0x60, 0x50, 0x86, 0x8a, 0x85, 0x44, + 0xb4, 0x9d, 0x18, 0xe1, 0x07, 0x10, 0x4b, 0xa5, 0x2e, 0x95, 0x13, 0xac, 0x10, 0x01, 0xb9, 0x56, + 0x6c, 0x50, 0xf9, 0x83, 0x8e, 0x1d, 0x3b, 0x32, 0xf6, 0x03, 0xba, 0x76, 0x47, 0x9d, 0x18, 0x3b, + 0x55, 0x55, 0xf8, 0x91, 0x2a, 0xb6, 0x83, 0x18, 0x3a, 0xf9, 0x9e, 0x7b, 0xcf, 0xb9, 0x8f, 0x63, + 0xec, 0xc7, 0x20, 0xe6, 0x20, 0x42, 0x4e, 0x73, 0x3a, 0x17, 0xe1, 0xb2, 0x1b, 0x31, 0x49, 0xbb, + 0x06, 0x06, 0x3c, 0x07, 0x09, 0xce, 0xa5, 0xe6, 0x04, 0x26, 0x69, 0x38, 0x5e, 0x23, 0x81, 0x04, + 0x14, 0x23, 0x2c, 0x23, 0x4d, 0xf6, 0xae, 0x35, 0xf9, 0x49, 0x17, 0x2a, 0x65, 0x09, 0xfc, 0x4f, + 0x84, 0xaf, 0x86, 0x65, 0x0f, 0x26, 0x59, 0x3e, 0x98, 0xd0, 0x2c, 0x61, 0xc3, 0x1c, 0x38, 0x08, + 0x3a, 0x73, 0x1a, 0xf8, 0x58, 0xa6, 0x72, 0xc6, 0x5c, 0xd4, 0x42, 0xed, 0xf3, 0x91, 0x06, 0x4e, + 0x0b, 0xd7, 0xc7, 0x4c, 0xc4, 0x79, 0xca, 0x65, 0x0a, 0x99, 0x7b, 0xa4, 0x6a, 0x87, 0x29, 0xa7, + 0x8f, 0x4f, 0x63, 0xd5, 0x49, 0xb8, 0x76, 0xcb, 0x6e, 0xd7, 0x6f, 0xfd, 0xe0, 0xdf, 0x6d, 0x03, + 0x35, 0x58, 0x0f, 0xed, 0xd7, 0x36, 0x3f, 0x4d, 0x6b, 0x54, 0x09, 0x7b, 0x37, 0x2f, 0xeb, 0xa6, + 0xf5, 0xb6, 0x6e, 0x5a, 0x5f, 0x1f, 0x1d, 0xcf, 0xa8, 0x13, 0x58, 0xee, 0xa5, 0x03, 0xc8, 0x24, + 0xcb, 0xa4, 0xff, 0x80, 0xeb, 0x07, 0x5d, 0x1c, 0x0f, 0x9f, 0x89, 0x45, 0x24, 0x38, 0x8d, 0xab, + 0xad, 0xf7, 0xd8, 0xb9, 0xc0, 0xf6, 0x94, 0xad, 0xcc, 0xc2, 0x65, 0x58, 0x1e, 0xb8, 0xa4, 0xb3, + 0x05, 0x73, 0x6d, 0x7d, 0xa0, 0x02, 0xbd, 0x5a, 0x39, 0xb6, 0x3f, 0x7a, 0x2f, 0x08, 0xda, 0x14, + 0x04, 0x6d, 0x0b, 0x82, 0x7e, 0x0b, 0x82, 0x5e, 0x77, 0xc4, 0xda, 0xee, 0x88, 0xf5, 0xbd, 0x23, + 0xd6, 0xe3, 0x7d, 0x92, 0xca, 0xc9, 0x22, 0x0a, 0x62, 0x98, 0x1b, 0x3f, 0xcd, 0xd3, 0x11, 0xe3, + 0x69, 0xf8, 0x5c, 0x7d, 0x9d, 0x5c, 0x71, 0x26, 0x42, 0x6e, 0x0c, 0x8d, 0x4e, 0x94, 0xe7, 0x77, + 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xe6, 0xc7, 0x90, 0xe1, 0x01, 0x00, 0x00, } func (this *ParameterChangeProposal) Equal(that interface{}) bool { diff --git a/x/params/types/proposal/query.pb.go b/x/params/types/proposal/query.pb.go index 229f4f8e9bb0..25bacb04795e 100644 --- a/x/params/types/proposal/query.pb.go +++ b/x/params/types/proposal/query.pb.go @@ -132,6 +132,8 @@ func (m *QueryParamsResponse) GetParam() ParamChange { // QuerySubspacesRequest defines a request type for querying for all registered // subspaces and all keys for a subspace. +// +// Since: cosmos-sdk 0.46 type QuerySubspacesRequest struct { } @@ -170,6 +172,8 @@ var xxx_messageInfo_QuerySubspacesRequest proto.InternalMessageInfo // QuerySubspacesResponse defines the response types for querying for all // registered subspaces and all keys for a subspace. +// +// Since: cosmos-sdk 0.46 type QuerySubspacesResponse struct { Subspaces []*Subspace `protobuf:"bytes,1,rep,name=subspaces,proto3" json:"subspaces,omitempty"` } @@ -216,6 +220,8 @@ func (m *QuerySubspacesResponse) GetSubspaces() []*Subspace { // Subspace defines a parameter subspace name and all the keys that exist for // the subspace. +// +// Since: cosmos-sdk 0.46 type Subspace struct { Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` @@ -324,6 +330,8 @@ type QueryClient interface { // key. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Subspaces queries for all registered subspaces and all keys for a subspace. + // + // Since: cosmos-sdk 0.46 Subspaces(ctx context.Context, in *QuerySubspacesRequest, opts ...grpc.CallOption) (*QuerySubspacesResponse, error) } @@ -359,6 +367,8 @@ type QueryServer interface { // key. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Subspaces queries for all registered subspaces and all keys for a subspace. + // + // Since: cosmos-sdk 0.46 Subspaces(context.Context, *QuerySubspacesRequest) (*QuerySubspacesResponse, error) } diff --git a/x/simulation/event_stats.go b/x/simulation/event_stats.go index 9618385b8ffc..675380e8215a 100644 --- a/x/simulation/event_stats.go +++ b/x/simulation/event_stats.go @@ -48,7 +48,7 @@ func (es EventStats) ExportJSON(path string) { panic(err) } - err = os.WriteFile(path, bz, 0600) + err = os.WriteFile(path, bz, 0o600) if err != nil { panic(err) } diff --git a/x/simulation/log.go b/x/simulation/log.go index ba22b2af4a7e..b22709b65414 100644 --- a/x/simulation/log.go +++ b/x/simulation/log.go @@ -40,7 +40,6 @@ func (lw *StandardLogWriter) PrintLogs() { for i := 0; i < len(lw.OpEntries); i++ { writeEntry := fmt.Sprintf("%s\n", (lw.OpEntries[i]).MustMarshal()) _, err := f.WriteString(writeEntry) - if err != nil { panic("Failed to write logs to file") } diff --git a/x/simulation/mock_tendermint.go b/x/simulation/mock_tendermint.go index 55c2ca544465..7d7f1dc99725 100644 --- a/x/simulation/mock_tendermint.go +++ b/x/simulation/mock_tendermint.go @@ -86,7 +86,6 @@ func updateValidators( updates []abci.ValidatorUpdate, event func(route, op, evResult string), ) map[string]mockValidator { - for _, update := range updates { str := fmt.Sprintf("%X", update.PubKey.GetEd25519()) @@ -100,7 +99,6 @@ func updateValidators( } else if _, ok := current[str]; ok { // validator already exists event("end_block", "validator_updates", "updated") - } else { // Set this new validator current[str] = mockValidator{ @@ -119,7 +117,8 @@ func updateValidators( func RandomRequestBeginBlock(r *rand.Rand, params Params, validators mockValidators, pastTimes []time.Time, pastVoteInfos [][]abci.VoteInfo, - event func(route, op, evResult string), header tmproto.Header) abci.RequestBeginBlock { + event func(route, op, evResult string), header tmproto.Header, +) abci.RequestBeginBlock { if len(validators) == 0 { return abci.RequestBeginBlock{ Header: header, diff --git a/x/simulation/params.go b/x/simulation/params.go index acc7d9b6d8f7..51dfb6439f10 100644 --- a/x/simulation/params.go +++ b/x/simulation/params.go @@ -5,6 +5,7 @@ import ( "fmt" "math/rand" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" @@ -150,7 +151,7 @@ func (w WeightedProposalContent) ContentSimulatorFn() simulation.ContentSimulato // Param change proposals // randomConsensusParams returns random simulation consensus parameters, it extracts the Evidence from the Staking genesis state. -func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *tmproto.ConsensusParams { +func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *abci.ConsensusParams { var genesisState map[string]json.RawMessage err := json.Unmarshal(appState, &genesisState) if err != nil { @@ -158,8 +159,8 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO } stakingGenesisState := stakingtypes.GetGenesisStateFromAppState(cdc, genesisState) - consensusParams := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + consensusParams := &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxBytes: int64(simulation.RandIntBetween(r, 20000000, 30000000)), MaxGas: -1, }, diff --git a/x/simulation/params_test.go b/x/simulation/params_test.go index d0b538c26e4d..90eb4f22a0a4 100644 --- a/x/simulation/params_test.go +++ b/x/simulation/params_test.go @@ -43,8 +43,7 @@ func TestNewWeightedProposalContent(t *testing.T) { require.Equal(t, content, pContent.ContentSimulatorFn()(nil, ctx, nil)) } -type testContent struct { -} +type testContent struct{} func (t testContent) GetTitle() string { return "" } func (t testContent) GetDescription() string { return "" } diff --git a/x/simulation/simulate.go b/x/simulation/simulate.go index 9b8c433be10a..cd792659bd15 100644 --- a/x/simulation/simulate.go +++ b/x/simulation/simulate.go @@ -31,7 +31,6 @@ func initChain( config simulation.Config, cdc codec.JSONCodec, ) (mockValidators, time.Time, []simulation.Account, string) { - appState, accounts, chainID, genesisTimestamp := appStateFn(r, accounts, config) consensusParams := randomConsensusParams(r, appState, cdc) req := abci.RequestInitChain{ @@ -256,8 +255,8 @@ type blockSimFn func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, func createBlockSimulator(testingMode bool, tb testing.TB, w io.Writer, params Params, event func(route, op, evResult string), ops WeightedOperations, operationQueue OperationQueue, timeOperationQueue []simulation.FutureOperation, - logWriter LogWriter, config simulation.Config) blockSimFn { - + logWriter LogWriter, config simulation.Config, +) blockSimFn { lastBlockSizeState := 0 // state for [4 * uniform distribution] blocksize := 0 selectOp := ops.getSelectOpFn() @@ -324,8 +323,8 @@ Comment: %s`, func runQueuedOperations(queueOps map[int][]simulation.Operation, height int, tb testing.TB, r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simulation.Account, logWriter LogWriter, - event func(route, op, evResult string), lean bool, chainID string) (numOpsRan int, allFutureOps []simulation.FutureOperation) { - + event func(route, op, evResult string), lean bool, chainID string, +) (numOpsRan int, allFutureOps []simulation.FutureOperation) { queuedOp, ok := queueOps[height] if !ok { return 0, nil @@ -361,8 +360,8 @@ func runQueuedTimeOperations(queueOps []simulation.FutureOperation, height int, currentTime time.Time, tb testing.TB, r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simulation.Account, logWriter LogWriter, event func(route, op, evResult string), - lean bool, chainID string) (numOpsRan int, allFutureOps []simulation.FutureOperation) { - + lean bool, chainID string, +) (numOpsRan int, allFutureOps []simulation.FutureOperation) { // Keep all future operations allFutureOps = make([]simulation.FutureOperation, 0) diff --git a/x/simulation/util.go b/x/simulation/util.go index 498c056ebdab..09278e6aeb8e 100644 --- a/x/simulation/util.go +++ b/x/simulation/util.go @@ -85,7 +85,7 @@ func GenAndDeliverTxWithRandFees(txCtx OperationInput) (simtypes.OperationMsg, [ var fees sdk.Coins var err error - coins, hasNeg := spendable.SafeSub(txCtx.CoinsSpentInMsg) + coins, hasNeg := spendable.SafeSub(txCtx.CoinsSpentInMsg...) if hasNeg { return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "message doesn't leave room for fees"), nil, err } @@ -100,7 +100,8 @@ func GenAndDeliverTxWithRandFees(txCtx OperationInput) (simtypes.OperationMsg, [ // GenAndDeliverTx generates a transactions and delivers it. func GenAndDeliverTx(txCtx OperationInput, fees sdk.Coins) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { account := txCtx.AccountKeeper.GetAccount(txCtx.Context, txCtx.SimAccount.Address) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + txCtx.R, txCtx.TxGen, []sdk.Msg{txCtx.Msg}, fees, @@ -110,7 +111,6 @@ func GenAndDeliverTx(txCtx OperationInput, fees sdk.Coins) (simtypes.OperationMs []uint64{account.GetSequence()}, txCtx.SimAccount.PrivKey, ) - if err != nil { return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "unable to generate mock tx"), nil, err } @@ -121,5 +121,4 @@ func GenAndDeliverTx(txCtx OperationInput, fees sdk.Coins) (simtypes.OperationMs } return simtypes.NewOperationMsg(txCtx.Msg, true, "", txCtx.Cdc), nil, nil - } diff --git a/x/slashing/client/cli/query.go b/x/slashing/client/cli/query.go index 08ae03301fbc..500a490d64eb 100644 --- a/x/slashing/client/cli/query.go +++ b/x/slashing/client/cli/query.go @@ -30,7 +30,6 @@ func GetQueryCmd() *cobra.Command { ) return slashingQueryCmd - } // GetCmdQuerySigningInfo implements the command to query signing info. diff --git a/x/slashing/client/cli/tx.go b/x/slashing/client/cli/tx.go index 6ef7f56c2925..bcb7836e6d7d 100644 --- a/x/slashing/client/cli/tx.go +++ b/x/slashing/client/cli/tx.go @@ -24,6 +24,7 @@ func NewTxCmd() *cobra.Command { return slashingTxCmd } +// NewUnjailTxCmd returns a CLI command handler for creating a MsgUnjail transaction. func NewUnjailTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: "unjail", diff --git a/x/slashing/client/testutil/cli_test.go b/x/slashing/client/testutil/cli_test.go index dd36a6af2d3e..1035ca750264 100644 --- a/x/slashing/client/testutil/cli_test.go +++ b/x/slashing/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/slashing/init_test.go b/x/slashing/init_test.go index a2217cfda7b0..b9bbfe694e26 100644 --- a/x/slashing/init_test.go +++ b/x/slashing/init_test.go @@ -4,7 +4,5 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var ( - // The default power validators are initialized to have within tests - InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) -) +// The default power validators are initialized to have within tests +var InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) diff --git a/x/slashing/keeper/common_test.go b/x/slashing/keeper/common_test.go index 91a972ed1110..4e4be93b91e8 100644 --- a/x/slashing/keeper/common_test.go +++ b/x/slashing/keeper/common_test.go @@ -2,7 +2,5 @@ package keeper_test import sdk "github.com/cosmos/cosmos-sdk/types" -var ( - // The default power validators are initialized to have within tests - InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) -) +// The default power validators are initialized to have within tests +var InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) diff --git a/x/slashing/genesis.go b/x/slashing/keeper/genesis.go similarity index 87% rename from x/slashing/genesis.go rename to x/slashing/keeper/genesis.go index 2c8b6675762b..469947ed38f1 100644 --- a/x/slashing/genesis.go +++ b/x/slashing/keeper/genesis.go @@ -1,15 +1,14 @@ -package slashing +package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/slashing/keeper" "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // InitGenesis initialize default parameters // and the keeper's address to pubkey map -func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, stakingKeeper types.StakingKeeper, data *types.GenesisState) { +func (keeper Keeper) InitGenesis(ctx sdk.Context, stakingKeeper types.StakingKeeper, data *types.GenesisState) { stakingKeeper.IterateValidators(ctx, func(index int64, validator stakingtypes.ValidatorI) bool { consPk, err := validator.ConsPubKey() @@ -45,7 +44,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, stakingKeeper types.Stak // ExportGenesis writes the current store values // to a genesis file, which can be imported again // with InitGenesis -func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisState) { +func (keeper Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState) { params := keeper.GetParams(ctx) signingInfos := make([]types.SigningInfo, 0) missedBlocks := make([]types.ValidatorMissedBlocks, 0) diff --git a/x/slashing/genesis_test.go b/x/slashing/keeper/genesis_test.go similarity index 91% rename from x/slashing/genesis_test.go rename to x/slashing/keeper/genesis_test.go index 7cd0792bde4f..3cea49ea3863 100644 --- a/x/slashing/genesis_test.go +++ b/x/slashing/keeper/genesis_test.go @@ -1,4 +1,4 @@ -package slashing_test +package keeper_test import ( "testing" @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/slashing/testslashing" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -29,7 +28,7 @@ func TestExportAndInitGenesis(t *testing.T) { app.SlashingKeeper.SetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0]), info1) app.SlashingKeeper.SetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[1]), info2) - genesisState := slashing.ExportGenesis(ctx, app.SlashingKeeper) + genesisState := app.SlashingKeeper.ExportGenesis(ctx) require.Equal(t, genesisState.Params, testslashing.TestParams()) require.Len(t, genesisState.SigningInfos, 2) @@ -45,7 +44,8 @@ func TestExportAndInitGenesis(t *testing.T) { newInfo1, ok := app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) require.NotEqual(t, info1, newInfo1) // Initialise genesis with genesis state before tombstone - slashing.InitGenesis(ctx, app.SlashingKeeper, app.StakingKeeper, genesisState) + + app.SlashingKeeper.InitGenesis(ctx, app.StakingKeeper, genesisState) // Validator isTombstoned should return false as GenesisState is initialised ok = app.SlashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(addrDels[0])) diff --git a/x/slashing/keeper/grpc_query_test.go b/x/slashing/keeper/grpc_query_test.go index ddb6694d0463..5a8733babeef 100644 --- a/x/slashing/keeper/grpc_query_test.go +++ b/x/slashing/keeper/grpc_query_test.go @@ -91,7 +91,7 @@ func (suite *SlashingTestSuite) TestGRPCSigningInfos() { }) // verify all values are returned without pagination - var infoResp, err = queryClient.SigningInfos(gocontext.Background(), + infoResp, err := queryClient.SigningInfos(gocontext.Background(), &types.QuerySigningInfosRequest{Pagination: nil}) suite.NoError(err) suite.Equal(signingInfos, infoResp.Info) diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index 09d1afe02fac..a306f76c210d 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -11,9 +11,11 @@ import ( func (k Keeper) AfterValidatorBonded(ctx sdk.Context, address sdk.ConsAddress, _ sdk.ValAddress) error { // Update the signing info start height or create a new signing info - _, found := k.GetValidatorSigningInfo(ctx, address) - if !found { - signingInfo := types.NewValidatorSigningInfo( + signingInfo, found := k.GetValidatorSigningInfo(ctx, address) + if found { + signingInfo.StartHeight = ctx.BlockHeight() + } else { + signingInfo = types.NewValidatorSigningInfo( address, ctx.BlockHeight(), 0, @@ -21,9 +23,10 @@ func (k Keeper) AfterValidatorBonded(ctx sdk.Context, address sdk.ConsAddress, _ false, 0, ) - k.SetValidatorSigningInfo(ctx, address, signingInfo) } + k.SetValidatorSigningInfo(ctx, address, signingInfo) + return nil } @@ -74,17 +77,27 @@ func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) er func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { return nil } + +func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { + return nil +} + func (h Hooks) BeforeDelegationCreated(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } + func (h Hooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } + func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } + func (h Hooks) AfterDelegationModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error { return nil } + +func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error { + return nil +} diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 7385c1f4d7e2..03869e3a74c9 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -179,7 +179,6 @@ func TestHandleAlreadyJailed(t *testing.T) { // Ensure that missed blocks are tracked correctly and that // the start height of the signing info is reset correctly func TestValidatorDippingInAndOut(t *testing.T) { - // initial setup // TestParams set the SignedBlocksWindow to 1000 and MaxMissedBlocksPerWindow to 500 app := simapp.Setup(t, false) @@ -200,7 +199,9 @@ func TestValidatorDippingInAndOut(t *testing.T) { valAddr := sdk.ValAddress(addr) tstaking.CreateValidatorWithValPower(valAddr, val, power, true) - staking.EndBlocker(ctx, app.StakingKeeper) + validatorUpdates := staking.EndBlocker(ctx, app.StakingKeeper) + require.Equal(t, 2, len(validatorUpdates)) + tstaking.CheckValidator(valAddr, stakingtypes.Bonded, false) // 100 first blocks OK height := int64(0) @@ -210,22 +211,23 @@ func TestValidatorDippingInAndOut(t *testing.T) { } // kick first validator out of validator set - tstaking.CreateValidatorWithValPower(sdk.ValAddress(pks[1].Address()), pks[1], 101, true) - validatorUpdates := staking.EndBlocker(ctx, app.StakingKeeper) + tstaking.CreateValidatorWithValPower(sdk.ValAddress(pks[1].Address()), pks[1], power+1, true) + validatorUpdates = staking.EndBlocker(ctx, app.StakingKeeper) require.Equal(t, 2, len(validatorUpdates)) + tstaking.CheckValidator(sdk.ValAddress(pks[1].Address()), stakingtypes.Bonded, false) tstaking.CheckValidator(valAddr, stakingtypes.Unbonding, false) // 600 more blocks happened - height = 700 + height = height + 600 ctx = ctx.WithBlockHeight(height) // validator added back in - tstaking.DelegateWithPower(sdk.AccAddress(pks[2].Address()), sdk.ValAddress(pks[0].Address()), 50) + tstaking.DelegateWithPower(sdk.AccAddress(pks[2].Address()), valAddr, 50) validatorUpdates = staking.EndBlocker(ctx, app.StakingKeeper) require.Equal(t, 2, len(validatorUpdates)) tstaking.CheckValidator(valAddr, stakingtypes.Bonded, false) - newPower := int64(150) + newPower := power + 50 // validator misses a block app.SlashingKeeper.HandleValidatorSignature(ctx, val.Address(), newPower, false) @@ -234,9 +236,9 @@ func TestValidatorDippingInAndOut(t *testing.T) { // shouldn't be jailed/kicked yet tstaking.CheckValidator(valAddr, stakingtypes.Bonded, false) - // validator misses 500 more blocks, 501 total - latest := height - for ; height < latest+500; height++ { + // validator misses an additional 500 more blocks, after the cooling off period of SignedBlockWindow (here 1000 blocks). + latest := app.SlashingKeeper.SignedBlocksWindow(ctx) + height + for ; height < latest+app.SlashingKeeper.MinSignedPerWindow(ctx); height++ { ctx = ctx.WithBlockHeight(height) app.SlashingKeeper.HandleValidatorSignature(ctx, val.Address(), newPower, false) } @@ -248,13 +250,9 @@ func TestValidatorDippingInAndOut(t *testing.T) { // check all the signing information signInfo, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, consAddr) require.True(t, found) - require.Equal(t, int64(0), signInfo.MissedBlocksCounter) - require.Equal(t, int64(0), signInfo.IndexOffset) - // array should be cleared - for offset := int64(0); offset < app.SlashingKeeper.SignedBlocksWindow(ctx); offset++ { - missed := app.SlashingKeeper.GetValidatorMissedBlockBitArray(ctx, consAddr, offset) - require.False(t, missed) - } + require.Equal(t, int64(700), signInfo.StartHeight) + require.Equal(t, int64(499), signInfo.MissedBlocksCounter) + require.Equal(t, int64(499), signInfo.IndexOffset) // some blocks pass height = int64(5000) @@ -262,16 +260,21 @@ func TestValidatorDippingInAndOut(t *testing.T) { // validator rejoins and starts signing again app.StakingKeeper.Unjail(ctx, consAddr) + app.SlashingKeeper.HandleValidatorSignature(ctx, val.Address(), newPower, true) - height++ // validator should not be kicked since we reset counter/array when it was jailed staking.EndBlocker(ctx, app.StakingKeeper) tstaking.CheckValidator(valAddr, stakingtypes.Bonded, false) - // validator misses 501 blocks - latest = height - for ; height < latest+501; height++ { + // check start height is correctly set + signInfo, found = app.SlashingKeeper.GetValidatorSigningInfo(ctx, consAddr) + require.True(t, found) + require.Equal(t, height, signInfo.StartHeight) + + // validator misses 501 blocks after SignedBlockWindow period (1000 blocks) + latest = app.SlashingKeeper.SignedBlocksWindow(ctx) + height + for ; height < latest+app.SlashingKeeper.MinSignedPerWindow(ctx); height++ { ctx = ctx.WithBlockHeight(height) app.SlashingKeeper.HandleValidatorSignature(ctx, val.Address(), newPower, false) } diff --git a/x/slashing/keeper/signing_info.go b/x/slashing/keeper/signing_info.go index ed15ae3e4ff3..d65b773ebc66 100644 --- a/x/slashing/keeper/signing_info.go +++ b/x/slashing/keeper/signing_info.go @@ -39,8 +39,8 @@ func (k Keeper) SetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress // IterateValidatorSigningInfos iterates over the stored ValidatorSigningInfo func (k Keeper) IterateValidatorSigningInfos(ctx sdk.Context, - handler func(address sdk.ConsAddress, info types.ValidatorSigningInfo) (stop bool)) { - + handler func(address sdk.ConsAddress, info types.ValidatorSigningInfo) (stop bool), +) { store := ctx.KVStore(k.storeKey) iter := sdk.KVStorePrefixIterator(store, types.ValidatorSigningInfoKeyPrefix) defer iter.Close() @@ -71,8 +71,8 @@ func (k Keeper) GetValidatorMissedBlockBitArray(ctx sdk.Context, address sdk.Con // IterateValidatorMissedBlockBitArray iterates over the signed blocks window // and performs a callback function func (k Keeper) IterateValidatorMissedBlockBitArray(ctx sdk.Context, - address sdk.ConsAddress, handler func(index int64, missed bool) (stop bool)) { - + address sdk.ConsAddress, handler func(index int64, missed bool) (stop bool), +) { store := ctx.KVStore(k.storeKey) index := int64(0) // Array may be sparse diff --git a/x/slashing/migrations/v039/types.go b/x/slashing/migrations/v039/types.go deleted file mode 100644 index 34eed337173b..000000000000 --- a/x/slashing/migrations/v039/types.go +++ /dev/null @@ -1,79 +0,0 @@ -package v039 - -import ( - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - ModuleName = "slashing" -) - -// Default parameter namespace -const ( - DefaultParamspace = ModuleName - DefaultSignedBlocksWindow = int64(100) - DefaultDowntimeJailDuration = 60 * 10 * time.Second -) - -var ( - DefaultMinSignedPerWindow = sdk.NewDecWithPrec(5, 1) - DefaultSlashFractionDoubleSign = sdk.NewDec(1).Quo(sdk.NewDec(20)) - DefaultSlashFractionDowntime = sdk.NewDec(1).Quo(sdk.NewDec(100)) -) - -// Params - used for initializing default parameter for slashing at genesis -type Params struct { - SignedBlocksWindow int64 `json:"signed_blocks_window" yaml:"signed_blocks_window"` - MinSignedPerWindow sdk.Dec `json:"min_signed_per_window" yaml:"min_signed_per_window"` - DowntimeJailDuration time.Duration `json:"downtime_jail_duration" yaml:"downtime_jail_duration"` - SlashFractionDoubleSign sdk.Dec `json:"slash_fraction_double_sign" yaml:"slash_fraction_double_sign"` - SlashFractionDowntime sdk.Dec `json:"slash_fraction_downtime" yaml:"slash_fraction_downtime"` -} - -// NewParams creates a new Params object -func NewParams( - signedBlocksWindow int64, minSignedPerWindow sdk.Dec, downtimeJailDuration time.Duration, - slashFractionDoubleSign, slashFractionDowntime sdk.Dec, -) Params { - - return Params{ - SignedBlocksWindow: signedBlocksWindow, - MinSignedPerWindow: minSignedPerWindow, - DowntimeJailDuration: downtimeJailDuration, - SlashFractionDoubleSign: slashFractionDoubleSign, - SlashFractionDowntime: slashFractionDowntime, - } -} - -// DefaultParams defines the parameters for this module -func DefaultParams() Params { - return NewParams( - DefaultSignedBlocksWindow, DefaultMinSignedPerWindow, DefaultDowntimeJailDuration, - DefaultSlashFractionDoubleSign, DefaultSlashFractionDowntime, - ) -} - -// ValidatorSigningInfo defines the signing info for a validator -type ValidatorSigningInfo struct { - Address sdk.ConsAddress `json:"address" yaml:"address"` // validator consensus address - StartHeight int64 `json:"start_height" yaml:"start_height"` // height at which validator was first a candidate OR was unjailed - IndexOffset int64 `json:"index_offset" yaml:"index_offset"` // index offset into signed block bit array - JailedUntil time.Time `json:"jailed_until" yaml:"jailed_until"` // timestamp validator cannot be unjailed until - Tombstoned bool `json:"tombstoned" yaml:"tombstoned"` // whether or not a validator has been tombstoned (killed out of validator set) - MissedBlocksCounter int64 `json:"missed_blocks_counter" yaml:"missed_blocks_counter"` // missed blocks counter (to avoid scanning the array every time) -} - -// MissedBlock -type MissedBlock struct { - Index int64 `json:"index" yaml:"index"` - Missed bool `json:"missed" yaml:"missed"` -} - -// GenesisState - all slashing state that must be provided at genesis -type GenesisState struct { - Params Params `json:"params" yaml:"params"` - SigningInfos map[string]ValidatorSigningInfo `json:"signing_infos" yaml:"signing_infos"` - MissedBlocks map[string][]MissedBlock `json:"missed_blocks" yaml:"missed_blocks"` -} diff --git a/x/slashing/migrations/v040/migrate.go b/x/slashing/migrations/v040/migrate.go deleted file mode 100644 index 0dbd227425c0..000000000000 --- a/x/slashing/migrations/v040/migrate.go +++ /dev/null @@ -1,64 +0,0 @@ -package v040 - -import ( - "sort" - - v039slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v039" - v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/types" -) - -// Migrate accepts exported x/slashing genesis state from v0.39 and migrates it -// to v0.40 x/slashing genesis state. The migration includes: -// -// - Chaning SigningInfos and MissedBlocks from map to array. -// - Convert addresses from bytes to bech32 strings. -// - Re-encode in v0.40 GenesisState. -func Migrate(oldGenState v039slashing.GenesisState) *v040slashing.GenesisState { - // Note that the two following `for` loop over a map's keys, so are not - // deterministic. - var newSigningInfos = make([]v040slashing.SigningInfo, 0, len(oldGenState.SigningInfos)) - for address, signingInfo := range oldGenState.SigningInfos { - newSigningInfos = append(newSigningInfos, v040slashing.SigningInfo{ - Address: address, - ValidatorSigningInfo: v040slashing.ValidatorSigningInfo{ - Address: signingInfo.Address.String(), - StartHeight: signingInfo.StartHeight, - IndexOffset: signingInfo.IndexOffset, - JailedUntil: signingInfo.JailedUntil, - Tombstoned: signingInfo.Tombstoned, - MissedBlocksCounter: signingInfo.MissedBlocksCounter, - }, - }) - } - var newValidatorMissedBlocks = make([]v040slashing.ValidatorMissedBlocks, 0, len(oldGenState.MissedBlocks)) - for address, validatorMissedBlocks := range oldGenState.MissedBlocks { - var newMissedBlocks = make([]v040slashing.MissedBlock, len(validatorMissedBlocks)) - for i, missedBlock := range validatorMissedBlocks { - newMissedBlocks[i] = v040slashing.MissedBlock{ - Index: missedBlock.Index, - Missed: missedBlock.Missed, - } - } - - newValidatorMissedBlocks = append(newValidatorMissedBlocks, v040slashing.ValidatorMissedBlocks{ - Address: address, - MissedBlocks: newMissedBlocks, - }) - } - - // We sort these two arrays by address, so that we get determinstic states. - sort.Slice(newSigningInfos, func(i, j int) bool { return newSigningInfos[i].Address < newSigningInfos[j].Address }) - sort.Slice(newValidatorMissedBlocks, func(i, j int) bool { return newValidatorMissedBlocks[i].Address < newValidatorMissedBlocks[j].Address }) - - return &v040slashing.GenesisState{ - Params: v040slashing.Params{ - SignedBlocksWindow: oldGenState.Params.SignedBlocksWindow, - MinSignedPerWindow: oldGenState.Params.MinSignedPerWindow, - DowntimeJailDuration: oldGenState.Params.DowntimeJailDuration, - SlashFractionDoubleSign: oldGenState.Params.SlashFractionDoubleSign, - SlashFractionDowntime: oldGenState.Params.SlashFractionDowntime, - }, - SigningInfos: newSigningInfos, - MissedBlocks: newValidatorMissedBlocks, - } -} diff --git a/x/slashing/migrations/v040/migrate_test.go b/x/slashing/migrations/v040/migrate_test.go deleted file mode 100644 index 2f2bc66615f2..000000000000 --- a/x/slashing/migrations/v040/migrate_test.go +++ /dev/null @@ -1,140 +0,0 @@ -package v040_test - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - v039slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v039" - v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v040" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithCodec(encodingConfig.Codec) - - addr1, err := sdk.ConsAddressFromBech32("cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685") - require.NoError(t, err) - addr2, err := sdk.ConsAddressFromBech32("cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph") - require.NoError(t, err) - - gs := v039slashing.GenesisState{ - Params: v039slashing.DefaultParams(), - SigningInfos: map[string]v039slashing.ValidatorSigningInfo{ - "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph": { - Address: addr2, - IndexOffset: 615501, - MissedBlocksCounter: 1, - Tombstoned: false, - }, - "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685": { - Address: addr1, - IndexOffset: 2, - MissedBlocksCounter: 2, - Tombstoned: false, - }, - }, - MissedBlocks: map[string][]v039slashing.MissedBlock{ - "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph": { - { - Index: 2, - Missed: true, - }, - }, - "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685": { - { - Index: 3, - Missed: true, - }, - { - Index: 4, - Missed: true, - }, - }, - }, - } - - migrated := v040slashing.Migrate(gs) - // Check that in `signing_infos` and `missed_blocks`, the address - // cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685 - // should always come before the address - // cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph - // (in alphabetic order, basically). - expected := `{ - "missed_blocks": [ - { - "address": "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685", - "missed_blocks": [ - { - "index": "3", - "missed": true - }, - { - "index": "4", - "missed": true - } - ] - }, - { - "address": "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph", - "missed_blocks": [ - { - "index": "2", - "missed": true - } - ] - } - ], - "params": { - "downtime_jail_duration": "600s", - "min_signed_per_window": "0.500000000000000000", - "signed_blocks_window": "100", - "slash_fraction_double_sign": "0.050000000000000000", - "slash_fraction_downtime": "0.010000000000000000" - }, - "signing_infos": [ - { - "address": "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685", - "validator_signing_info": { - "address": "cosmosvalcons104cjmxkrg8y8lmrp25de02e4zf00zle4mzs685", - "index_offset": "2", - "jailed_until": "0001-01-01T00:00:00Z", - "missed_blocks_counter": "2", - "start_height": "0", - "tombstoned": false - } - }, - { - "address": "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph", - "validator_signing_info": { - "address": "cosmosvalcons10e4c5p6qk0sycy9u6u43t7csmlx9fyadr9yxph", - "index_offset": "615501", - "jailed_until": "0001-01-01T00:00:00Z", - "missed_blocks_counter": "1", - "start_height": "0", - "tombstoned": false - } - } - ] -}` - - bz, err := clientCtx.Codec.MarshalJSON(migrated) - require.NoError(t, err) - - // Indent the JSON bz correctly. - var jsonObj map[string]interface{} - err = json.Unmarshal(bz, &jsonObj) - require.NoError(t, err) - indentedBz, err := json.MarshalIndent(jsonObj, "", " ") - require.NoError(t, err) - - require.Equal(t, expected, string(indentedBz)) -} diff --git a/x/slashing/migrations/v040/keys.go b/x/slashing/migrations/v042/types.go similarity index 94% rename from x/slashing/migrations/v040/keys.go rename to x/slashing/migrations/v042/types.go index 367ead65e5cc..0089afe732fd 100644 --- a/x/slashing/migrations/v040/keys.go +++ b/x/slashing/migrations/v042/types.go @@ -1,13 +1,13 @@ // Package v040 is copy-pasted from: // https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/slashing/types/keys.go -package v040 +package legacy import ( "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" ) const ( @@ -47,7 +47,7 @@ func ValidatorSigningInfoKey(v sdk.ConsAddress) []byte { func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress) { kv.AssertKeyAtLeastLength(key, 2) addr := key[1:] - kv.AssertKeyLength(addr, v040auth.AddrLen) + kv.AssertKeyLength(addr, v042auth.AddrLen) return sdk.ConsAddress(addr) } diff --git a/x/slashing/migrations/v043/store.go b/x/slashing/migrations/v043/store.go index 15da0982e27c..d9d44664c18f 100644 --- a/x/slashing/migrations/v043/store.go +++ b/x/slashing/migrations/v043/store.go @@ -4,7 +4,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" v043distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v043" - v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v040" + v042slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v042" ) // MigrateStore performs in-place store migrations from v0.40 to v0.43. The @@ -13,9 +13,9 @@ import ( // - Change addresses to be length-prefixed. func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey) error { store := ctx.KVStore(storeKey) - v043distribution.MigratePrefixAddress(store, v040slashing.ValidatorSigningInfoKeyPrefix) - v043distribution.MigratePrefixAddressBytes(store, v040slashing.ValidatorMissedBlockBitArrayKeyPrefix) - v043distribution.MigratePrefixAddress(store, v040slashing.AddrPubkeyRelationKeyPrefix) + v043distribution.MigratePrefixAddress(store, v042slashing.ValidatorSigningInfoKeyPrefix) + v043distribution.MigratePrefixAddressBytes(store, v042slashing.ValidatorMissedBlockBitArrayKeyPrefix) + v043distribution.MigratePrefixAddress(store, v042slashing.AddrPubkeyRelationKeyPrefix) return nil } diff --git a/x/slashing/migrations/v043/store_test.go b/x/slashing/migrations/v043/store_test.go index 962e7af9d56a..17aa3387c2c2 100644 --- a/x/slashing/migrations/v043/store_test.go +++ b/x/slashing/migrations/v043/store_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v040" + v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v042" v043slashing "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v043" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) diff --git a/x/slashing/module.go b/x/slashing/module.go index cf51b57066ad..06b5b3ef6223 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -21,7 +20,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/slashing/keeper" "github.com/cosmos/cosmos-sdk/x/slashing/simulation" "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) var ( @@ -68,11 +66,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return types.ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the slashing module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/slashing` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the slashig module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -97,11 +90,11 @@ type AppModule struct { keeper keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper - stakingKeeper stakingkeeper.Keeper + stakingKeeper types.StakingKeeper } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk stakingkeeper.Keeper) AppModule { +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, keeper: keeper, @@ -148,14 +141,14 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.keeper, am.stakingKeeper, &genesisState) + am.keeper.InitGenesis(ctx, am.stakingKeeper, &genesisState) return []abci.ValidatorUpdate{} } // ExportGenesis returns the exported genesis state as raw bytes for the slashing // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - gs := ExportGenesis(ctx, am.keeper) + gs := am.keeper.ExportGenesis(ctx) return cdc.MustMarshalJSON(gs) } @@ -167,12 +160,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, req, am.keeper) } -// EndBlock returns the end blocker for the slashing module. It returns no validator -// updates. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the slashing module. diff --git a/x/slashing/simulation/genesis_test.go b/x/slashing/simulation/genesis_test.go index a386588d8369..55bce42a84a6 100644 --- a/x/slashing/simulation/genesis_test.go +++ b/x/slashing/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -32,7 +33,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } @@ -52,7 +53,6 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, time.Duration(34800000000000), slashingGenesis.Params.DowntimeJailDuration) require.Len(t, slashingGenesis.MissedBlocks, 0) require.Len(t, slashingGenesis.SigningInfos, 0) - } // TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index a4c82e0f4af4..23be89b1b21f 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -24,9 +24,8 @@ const ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, - bk types.BankKeeper, k keeper.Keeper, sk stakingkeeper.Keeper, + bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper, ) simulation.WeightedOperations { - var weightMsgUnjail int appParams.GetOrGenerate(cdc, OpWeightMsgUnjail, &weightMsgUnjail, nil, func(_ *rand.Rand) { @@ -37,7 +36,7 @@ func WeightedOperations( return simulation.WeightedOperations{ simulation.NewWeightedOperation( weightMsgUnjail, - SimulateMsgUnjail(ak, bk, k, sk), + SimulateMsgUnjail(ak, bk, k, sk.(stakingkeeper.Keeper)), ), } } @@ -48,7 +47,6 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - validator, ok := stakingkeeper.RandomValidator(r, sk, ctx) if !ok { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUnjail, "validator is not ok"), nil, nil // skip @@ -88,9 +86,10 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee msg := types.NewMsgUnjail(validator.GetOperator()) - txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( - txGen, + txCfg := simappparams.MakeTestEncodingConfig().TxConfig + tx, err := helpers.GenSignedMockTx( + r, + txCfg, []sdk.Msg{msg}, fees, helpers.DefaultGenTxGas, @@ -103,7 +102,7 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate mock tx"), nil, err } - _, res, err := app.SimDeliver(txGen.TxEncoder(), tx) + _, res, err := app.SimDeliver(txCfg.TxEncoder(), tx) // result should fail if: // - validator cannot be unjailed due to tombstone diff --git a/x/slashing/spec/01_concepts.md b/x/slashing/spec/01_concepts.md index 9505706f90d3..ea7c6b319bae 100644 --- a/x/slashing/spec/01_concepts.md +++ b/x/slashing/spec/01_concepts.md @@ -43,16 +43,14 @@ _Vu_ : validator unbonded ### Single Double Sign Infraction -<-----------------> -[----------C1----D1,Vu-----] +\[----------C1----D1,Vu-----\] A single infraction is committed then later discovered, at which point the validator is unbonded and slashed at the full amount for the infraction. ### Multiple Double Sign Infractions -<---------------------------> -[----------C1--C2---C3---D1,D2,D3Vu-----] +\[----------C1--C2---C3---D1,D2,D3Vu-----\] Multiple infractions are committed and then later discovered, at which point the validator is jailed and slashed for only one infraction. Because the validator diff --git a/x/slashing/spec/02_state.md b/x/slashing/spec/02_state.md index a0298b57499e..50aa0e14100e 100644 --- a/x/slashing/spec/02_state.md +++ b/x/slashing/spec/02_state.md @@ -48,4 +48,4 @@ bonded validator. The `SignedBlocksWindow` parameter defines the size The information stored for tracking validator liveness is as follows: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/slashing/v1beta1/slashing.proto#L11-L33 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/slashing/v1beta1/slashing.proto#L12-L33 diff --git a/x/slashing/spec/05_hooks.md b/x/slashing/spec/05_hooks.md index d1234e58ee05..a839689429a8 100644 --- a/x/slashing/spec/05_hooks.md +++ b/x/slashing/spec/05_hooks.md @@ -21,6 +21,8 @@ The following hooks impact the slashing state: Upon successful first-time bonding of a new validator, we create a new `ValidatorSigningInfo` structure for the now-bonded validator, which `StartHeight` of the current block. +If the validator was out of the validator set and gets bonded again, its new bonded height is set. + ```go onValidatorBonded(address sdk.ValAddress) @@ -32,7 +34,10 @@ onValidatorBonded(address sdk.ValAddress) JailedUntil : time.Unix(0, 0), Tombstone : false, MissedBloskCounter : 0 + } else { + signingInfo.StartHeight = CurrentHeight } + setValidatorSigningInfo(signingInfo) } diff --git a/x/slashing/types/genesis.go b/x/slashing/types/genesis.go index 9b427e725ac3..b891dec80e8b 100644 --- a/x/slashing/types/genesis.go +++ b/x/slashing/types/genesis.go @@ -11,7 +11,6 @@ import ( func NewGenesisState( params Params, signingInfos []SigningInfo, missedBlocks []ValidatorMissedBlocks, ) *GenesisState { - return &GenesisState{ Params: params, SigningInfos: signingInfos, diff --git a/x/slashing/types/msg.go b/x/slashing/types/msg.go index 91a15f72dbd4..e5e0ec0f24f2 100644 --- a/x/slashing/types/msg.go +++ b/x/slashing/types/msg.go @@ -34,7 +34,7 @@ func (msg MsgUnjail) GetSignBytes() []byte { return sdk.MustSortJSON(bz) } -// ValidateBasic validity check for the AnteHandler +// ValidateBasic does a sanity check on the provided message func (msg MsgUnjail) ValidateBasic() error { if _, err := sdk.ValAddressFromBech32(msg.ValidatorAddr); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("validator input address: %s", err) diff --git a/x/slashing/types/params.go b/x/slashing/types/params.go index aa9cd559e7db..ad1d98c37f15 100644 --- a/x/slashing/types/params.go +++ b/x/slashing/types/params.go @@ -39,7 +39,6 @@ func NewParams( signedBlocksWindow int64, minSignedPerWindow sdk.Dec, downtimeJailDuration time.Duration, slashFractionDoubleSign, slashFractionDowntime sdk.Dec, ) Params { - return Params{ SignedBlocksWindow: signedBlocksWindow, MinSignedPerWindow: minSignedPerWindow, diff --git a/x/slashing/types/signing_info.go b/x/slashing/types/signing_info.go index 43a052d22f7d..d9b00da199e6 100644 --- a/x/slashing/types/signing_info.go +++ b/x/slashing/types/signing_info.go @@ -14,7 +14,6 @@ func NewValidatorSigningInfo( condAddr sdk.ConsAddress, startHeight, indexOffset int64, jailedUntil time.Time, tombstoned bool, missedBlocksCounter int64, ) ValidatorSigningInfo { - return ValidatorSigningInfo{ Address: condAddr.String(), StartHeight: startHeight, diff --git a/x/staking/app_test.go b/x/staking/app_test.go index a97954254826..5a3bd723cb9c 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -26,7 +26,6 @@ func checkDelegation( t *testing.T, app *simapp.SimApp, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, expFound bool, expShares sdk.Dec, ) { - ctxCheck := app.BaseApp.NewContext(true, tmproto.Header{}) delegation, found := app.StakingKeeper.GetDelegation(ctxCheck, delegatorAddr, validatorAddr) if expFound { @@ -107,7 +106,7 @@ func TestStakingMsgs(t *testing.T) { require.NoError(t, err) simapp.CheckBalance(t, app, addr2, sdk.Coins{genCoin.Sub(bondCoin)}) - checkDelegation(t, app, addr2, sdk.ValAddress(addr1), true, bondTokens.ToDec()) + checkDelegation(t, app, addr2, sdk.ValAddress(addr1), true, sdk.NewDecFromInt(bondTokens)) // begin unbonding beginUnbondingMsg := types.NewMsgUndelegate(addr2, sdk.ValAddress(addr1), bondCoin) diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 6a9d5393120f..f184d27d6a94 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -51,6 +51,7 @@ func NewTxCmd() *cobra.Command { return stakingTxCmd } +// NewCreateValidatorCmd returns a CLI command handler for creating a MsgCreateValidator transaction. func NewCreateValidatorCmd() *cobra.Command { cmd := &cobra.Command{ Use: "create-validator", @@ -90,6 +91,7 @@ func NewCreateValidatorCmd() *cobra.Command { return cmd } +// NewEditValidatorCmd returns a CLI command handler for creating a MsgEditValidator transaction. func NewEditValidatorCmd() *cobra.Command { cmd := &cobra.Command{ Use: "edit-validator", @@ -145,6 +147,7 @@ func NewEditValidatorCmd() *cobra.Command { return cmd } +// NewDelegateCmd returns a CLI command handler for creating a MsgDelegate transaction. func NewDelegateCmd() *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -188,6 +191,7 @@ $ %s tx staking delegate %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --f return cmd } +// NewRedelegateCmd returns a CLI command handler for creating a MsgBeginRedelegate transaction. func NewRedelegateCmd() *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -236,6 +240,7 @@ $ %s tx staking redelegate %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj %s1l2rsakp3 return cmd } +// NewUnbondCmd returns a CLI command handler for creating a MsgUndelegate transaction. func NewUnbondCmd() *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -279,6 +284,7 @@ $ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from return cmd } +// NewCancelUnbondingDelegation returns a CLI command handler for creating a MsgCancelUnbondingDelegation transaction. func NewCancelUnbondingDelegation() *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -549,7 +555,6 @@ func PrepareConfigForTxCreateValidator(flagSet *flag.FlagSet, moniker, nodeID, c func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorConfig, txBldr tx.Factory, generateOnly bool) (tx.Factory, sdk.Msg, error) { amounstStr := config.Amount amount, err := sdk.ParseCoinNormalized(amounstStr) - if err != nil { return txBldr, nil, err } @@ -568,7 +573,6 @@ func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorC maxRateStr := config.CommissionMaxRate maxChangeRateStr := config.CommissionMaxChangeRate commissionRates, err := buildCommissionRates(rateStr, maxRateStr, maxChangeRateStr) - if err != nil { return txBldr, nil, err } diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index a7eb30fde3c2..243780bc6e03 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -43,25 +43,29 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { return }, expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.2", "0.01", "1"), - }, { + }, + { name: "Custom amount", fsModify: func(fs *pflag.FlagSet) { fs.Set(FlagAmount, "2000stake") }, expectedCfg: mkTxValCfg("2000stake", "0.1", "0.2", "0.01", "1"), - }, { + }, + { name: "Custom commission rate", fsModify: func(fs *pflag.FlagSet) { fs.Set(FlagCommissionRate, "0.54") }, expectedCfg: mkTxValCfg(defaultAmount, "0.54", "0.2", "0.01", "1"), - }, { + }, + { name: "Custom commission max rate", fsModify: func(fs *pflag.FlagSet) { fs.Set(FlagCommissionMaxRate, "0.89") }, expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.89", "0.01", "1"), - }, { + }, + { name: "Custom commission max change rate", fsModify: func(fs *pflag.FlagSet) { fs.Set(FlagCommissionMaxChangeRate, "0.55") diff --git a/x/staking/client/testutil/suite.go b/x/staking/client/testutil/suite.go index 879808868eb9..92323b07e462 100644 --- a/x/staking/client/testutil/suite.go +++ b/x/staking/client/testutil/suite.go @@ -1468,7 +1468,7 @@ func (s *IntegrationTestSuite) TestBlockResults() { require.NoError(err) // Create a HTTP rpc client. - rpcClient, err := http.New(val.RPCAddress) + rpcClient, err := http.New(val.RPCAddress, "/websocket") require.NoError(err) // Loop until we find a block result with the correct validator updates. diff --git a/x/staking/client/testutil/test_helpers.go b/x/staking/client/testutil/test_helpers.go index 3a31ea004f3d..0fa752e05720 100644 --- a/x/staking/client/testutil/test_helpers.go +++ b/x/staking/client/testutil/test_helpers.go @@ -18,9 +18,7 @@ var commonArgs = []string{ } // MsgRedelegateExec creates a redelegate message. -func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stringer, - extraArgs ...string) (testutil.BufferWriter, error) { - +func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { args := []string{ src.String(), dst.String(), @@ -36,8 +34,8 @@ func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stri // MsgUnbondExec creates a unbond message. func MsgUnbondExec(clientCtx client.Context, from fmt.Stringer, valAddress, - amount fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { - + amount fmt.Stringer, extraArgs ...string, +) (testutil.BufferWriter, error) { args := []string{ valAddress.String(), amount.String(), diff --git a/x/staking/genesis.go b/x/staking/genesis.go index c019359c3526..5b94b8adf48b 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -3,7 +3,6 @@ package staking import ( "fmt" - abci "github.com/tendermint/tendermint/abci/types" tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -12,201 +11,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// InitGenesis sets the pool and parameters for the provided keeper. For each -// validator in data, it sets that validator in the keeper along with manually -// setting the indexes. In addition, it also sets any delegations found in -// data. Finally, it updates the bonded validators. -// Returns final validator set after applying all declaration and delegations -func InitGenesis( - ctx sdk.Context, keeper keeper.Keeper, accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, data *types.GenesisState, -) (res []abci.ValidatorUpdate) { - bondedTokens := sdk.ZeroInt() - notBondedTokens := sdk.ZeroInt() - - // We need to pretend to be "n blocks before genesis", where "n" is the - // validator update delay, so that e.g. slashing periods are correctly - // initialized for the validator set e.g. with a one-block offset - the - // first TM block is at height 1, so state updates applied from - // genesis.json are in block 0. - ctx = ctx.WithBlockHeight(1 - sdk.ValidatorUpdateDelay) - - keeper.SetParams(ctx, data.Params) - keeper.SetLastTotalPower(ctx, data.LastTotalPower) - - for _, validator := range data.Validators { - keeper.SetValidator(ctx, validator) - - // Manually set indices for the first time - keeper.SetValidatorByConsAddr(ctx, validator) - keeper.SetValidatorByPowerIndex(ctx, validator) - - // Call the creation hook if not exported - if !data.Exported { - if err := keeper.AfterValidatorCreated(ctx, validator.GetOperator()); err != nil { - panic(err) - } - } - - // update timeslice if necessary - if validator.IsUnbonding() { - keeper.InsertUnbondingValidatorQueue(ctx, validator) - } - - switch validator.GetStatus() { - case types.Bonded: - bondedTokens = bondedTokens.Add(validator.GetTokens()) - case types.Unbonding, types.Unbonded: - notBondedTokens = notBondedTokens.Add(validator.GetTokens()) - default: - panic("invalid validator status") - } - } - - for _, delegation := range data.Delegations { - delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) - if err != nil { - panic(err) - } - - // Call the before-creation hook if not exported - if !data.Exported { - if err := keeper.BeforeDelegationCreated(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { - panic(err) - } - } - - keeper.SetDelegation(ctx, delegation) - - // Call the after-modification hook if not exported - if !data.Exported { - if err := keeper.AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { - panic(err) - } - } - } - - for _, ubd := range data.UnbondingDelegations { - keeper.SetUnbondingDelegation(ctx, ubd) - - for _, entry := range ubd.Entries { - keeper.InsertUBDQueue(ctx, ubd, entry.CompletionTime) - notBondedTokens = notBondedTokens.Add(entry.Balance) - } - } - - for _, red := range data.Redelegations { - keeper.SetRedelegation(ctx, red) - - for _, entry := range red.Entries { - keeper.InsertRedelegationQueue(ctx, red, entry.CompletionTime) - } - } - - bondedCoins := sdk.NewCoins(sdk.NewCoin(data.Params.BondDenom, bondedTokens)) - notBondedCoins := sdk.NewCoins(sdk.NewCoin(data.Params.BondDenom, notBondedTokens)) - - // check if the unbonded and bonded pools accounts exists - bondedPool := keeper.GetBondedPool(ctx) - if bondedPool == nil { - panic(fmt.Sprintf("%s module account has not been set", types.BondedPoolName)) - } - - // TODO: remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 - bondedBalance := bankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - if bondedBalance.IsZero() { - accountKeeper.SetModuleAccount(ctx, bondedPool) - } - - // if balance is different from bonded coins panic because genesis is most likely malformed - if !bondedBalance.IsEqual(bondedCoins) { - panic(fmt.Sprintf("bonded pool balance is different from bonded coins: %s <-> %s", bondedBalance, bondedCoins)) - } - - notBondedPool := keeper.GetNotBondedPool(ctx) - if notBondedPool == nil { - panic(fmt.Sprintf("%s module account has not been set", types.NotBondedPoolName)) - } - - notBondedBalance := bankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) - if notBondedBalance.IsZero() { - accountKeeper.SetModuleAccount(ctx, notBondedPool) - } - - // If balance is different from non bonded coins panic because genesis is most - // likely malformed. - if !notBondedBalance.IsEqual(notBondedCoins) { - panic(fmt.Sprintf("not bonded pool balance is different from not bonded coins: %s <-> %s", notBondedBalance, notBondedCoins)) - } - - // don't need to run Tendermint updates if we exported - if data.Exported { - for _, lv := range data.LastValidatorPowers { - valAddr, err := sdk.ValAddressFromBech32(lv.Address) - if err != nil { - panic(err) - } - - keeper.SetLastValidatorPower(ctx, valAddr, lv.Power) - validator, found := keeper.GetValidator(ctx, valAddr) - - if !found { - panic(fmt.Sprintf("validator %s not found", lv.Address)) - } - - update := validator.ABCIValidatorUpdate(keeper.PowerReduction(ctx)) - update.Power = lv.Power // keep the next-val-set offset, use the last power for the first block - res = append(res, update) - } - } else { - var err error - - res, err = keeper.ApplyAndReturnValidatorSetUpdates(ctx) - if err != nil { - panic(err) - } - } - - return res -} - -// ExportGenesis returns a GenesisState for a given context and keeper. The -// GenesisState will contain the pool, params, validators, and bonds found in -// the keeper. -func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { - var unbondingDelegations []types.UnbondingDelegation - - keeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd types.UnbondingDelegation) (stop bool) { - unbondingDelegations = append(unbondingDelegations, ubd) - return false - }) - - var redelegations []types.Redelegation - - keeper.IterateRedelegations(ctx, func(_ int64, red types.Redelegation) (stop bool) { - redelegations = append(redelegations, red) - return false - }) - - var lastValidatorPowers []types.LastValidatorPower - - keeper.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) { - lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addr.String(), Power: power}) - return false - }) - - return &types.GenesisState{ - Params: keeper.GetParams(ctx), - LastTotalPower: keeper.GetLastTotalPower(ctx), - LastValidatorPowers: lastValidatorPowers, - Validators: keeper.GetAllValidators(ctx), - Delegations: keeper.GetAllDelegations(ctx), - UnbondingDelegations: unbondingDelegations, - Redelegations: redelegations, - Exported: true, - } -} - // WriteValidators returns a slice of bonded genesis validators. func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []tmtypes.GenesisValidator, err error) { keeper.IterateLastValidators(ctx, func(_ int64, validator types.ValidatorI) (stop bool) { diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index df6120b04361..6f4a8ad8bda0 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -1,218 +1,17 @@ package staking_test import ( - "fmt" - "log" "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/testutil" "github.com/cosmos/cosmos-sdk/x/staking" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func bootstrapGenesisTest(t *testing.T, numAddrs int) (*simapp.SimApp, sdk.Context, []sdk.AccAddress) { - _, app, ctx := getBaseSimappWithCustomKeeper(t) - - addrDels, _ := generateAddresses(app, ctx, numAddrs, sdk.NewInt(10000)) - return app, ctx, addrDels -} - -func TestInitGenesis(t *testing.T) { - app, ctx, addrs := bootstrapGenesisTest(t, 10) - - valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) - - params := app.StakingKeeper.GetParams(ctx) - validators := app.StakingKeeper.GetAllValidators(ctx) - require.Len(t, validators, 1) - var delegations []types.Delegation - - pk0, err := codectypes.NewAnyWithValue(PKs[0]) - require.NoError(t, err) - - pk1, err := codectypes.NewAnyWithValue(PKs[1]) - require.NoError(t, err) - - // initialize the validators - bondedVal1 := types.Validator{ - OperatorAddress: sdk.ValAddress(addrs[0]).String(), - ConsensusPubkey: pk0, - Status: types.Bonded, - Tokens: valTokens, - DelegatorShares: valTokens.ToDec(), - Description: types.NewDescription("hoop", "", "", "", ""), - } - bondedVal2 := types.Validator{ - OperatorAddress: sdk.ValAddress(addrs[1]).String(), - ConsensusPubkey: pk1, - Status: types.Bonded, - Tokens: valTokens, - DelegatorShares: valTokens.ToDec(), - Description: types.NewDescription("bloop", "", "", "", ""), - } - - // append new bonded validators to the list - validators = append(validators, bondedVal1, bondedVal2) - log.Printf("%#v", len(validators)) - // mint coins in the bonded pool representing the validators coins - i2 := len(validators) - 1 // -1 to exclude genesis validator - require.NoError(t, - testutil.FundModuleAccount( - app.BankKeeper, - ctx, - types.BondedPoolName, - sdk.NewCoins( - sdk.NewCoin(params.BondDenom, valTokens.MulRaw((int64)(i2))), - ), - ), - ) - genesisDelegations := app.StakingKeeper.GetAllDelegations(ctx) - delegations = append(delegations, genesisDelegations...) - - genesisState := types.NewGenesisState(params, validators, delegations) - vals := staking.InitGenesis(ctx, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, genesisState) - - actualGenesis := staking.ExportGenesis(ctx, app.StakingKeeper) - require.Equal(t, genesisState.Params, actualGenesis.Params) - require.Equal(t, genesisState.Delegations, actualGenesis.Delegations) - require.EqualValues(t, app.StakingKeeper.GetAllValidators(ctx), actualGenesis.Validators) - - // Ensure validators have addresses. - vals2, err := staking.WriteValidators(ctx, app.StakingKeeper) - require.NoError(t, err) - for _, val := range vals2 { - require.NotEmpty(t, val.Address) - } - - // now make sure the validators are bonded and intra-tx counters are correct - resVal, found := app.StakingKeeper.GetValidator(ctx, sdk.ValAddress(addrs[0])) - require.True(t, found) - require.Equal(t, types.Bonded, resVal.Status) - - resVal, found = app.StakingKeeper.GetValidator(ctx, sdk.ValAddress(addrs[1])) - require.True(t, found) - require.Equal(t, types.Bonded, resVal.Status) - - abcivals := make([]abci.ValidatorUpdate, len(vals)) - - validators = validators[1:] // remove genesis validator - for i, val := range validators { - abcivals[i] = val.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)) - } - - require.Equal(t, abcivals, vals) -} - -func TestInitGenesis_PoolsBalanceMismatch(t *testing.T) { - app := simapp.Setup(t, false) - ctx := app.NewContext(false, tmproto.Header{}) - - consPub, err := codectypes.NewAnyWithValue(PKs[0]) - require.NoError(t, err) - - // create mock validator - validator := types.Validator{ - OperatorAddress: sdk.ValAddress("12345678901234567890").String(), - ConsensusPubkey: consPub, - Jailed: false, - Tokens: sdk.NewInt(10), - DelegatorShares: sdk.NewInt(10).ToDec(), - Description: types.NewDescription("bloop", "", "", "", ""), - } - // valid params - params := types.Params{ - UnbondingTime: 10000, - MaxValidators: 1, - MaxEntries: 10, - BondDenom: "stake", - } - - // test - - require.Panics(t, func() { - // setting validator status to bonded so the balance counts towards bonded pool - validator.Status = types.Bonded - staking.InitGenesis(ctx, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, &types.GenesisState{ - Params: params, - Validators: []types.Validator{validator}, - }) - }, "should panic because bonded pool balance is different from bonded pool coins") - - require.Panics(t, func() { - // setting validator status to unbonded so the balance counts towards not bonded pool - validator.Status = types.Unbonded - staking.InitGenesis(ctx, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, &types.GenesisState{ - Params: params, - Validators: []types.Validator{validator}, - }) - }, "should panic because not bonded pool balance is different from not bonded pool coins") -} - -func TestInitGenesisLargeValidatorSet(t *testing.T) { - size := 200 - require.True(t, size > 100) - - app, ctx, addrs := bootstrapGenesisTest(t, 200) - genesisValidators := app.StakingKeeper.GetAllValidators(ctx) - - params := app.StakingKeeper.GetParams(ctx) - delegations := []types.Delegation{} - validators := make([]types.Validator, size) - var err error - - bondedPoolAmt := sdk.ZeroInt() - for i := range validators { - validators[i], err = types.NewValidator(sdk.ValAddress(addrs[i]), - PKs[i], types.NewDescription(fmt.Sprintf("#%d", i), "", "", "", "")) - require.NoError(t, err) - validators[i].Status = types.Bonded - - tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) - if i < 100 { - tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 2) - } - validators[i].Tokens = tokens - validators[i].DelegatorShares = tokens.ToDec() - // add bonded coins - bondedPoolAmt = bondedPoolAmt.Add(tokens) - } - - validators = append(validators, genesisValidators...) - - genesisState := types.NewGenesisState(params, validators, delegations) - - // mint coins in the bonded pool representing the validators coins - require.NoError(t, - testutil.FundModuleAccount( - app.BankKeeper, - ctx, - types.BondedPoolName, - sdk.NewCoins(sdk.NewCoin(params.BondDenom, bondedPoolAmt)), - ), - ) - - vals := staking.InitGenesis(ctx, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, genesisState) - - abcivals := make([]abci.ValidatorUpdate, 100) - for i, val := range validators[:100] { - abcivals[i] = val.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)) - } - - // remove genesis validator - vals = vals[:100] - require.Equal(t, abcivals, vals) -} - func TestValidateGenesis(t *testing.T) { genValidators1 := make([]types.Validator, 1, 5) pk := ed25519.GenPrivKey().PubKey() @@ -244,9 +43,11 @@ func TestValidateGenesis(t *testing.T) { for _, tt := range tests { tt := tt + t.Run(tt.name, func(t *testing.T) { genesisState := types.DefaultGenesisState() tt.mutate(genesisState) + if tt.wantErr { assert.Error(t, staking.ValidateGenesis(genesisState)) } else { diff --git a/x/staking/keeper/alias_functions.go b/x/staking/keeper/alias_functions.go index 36c2d23661c6..59c4d23be2e8 100644 --- a/x/staking/keeper/alias_functions.go +++ b/x/staking/keeper/alias_functions.go @@ -114,7 +114,8 @@ func (k Keeper) Delegation(ctx sdk.Context, addrDel sdk.AccAddress, addrVal sdk. // iterate through all of the delegations from a delegator func (k Keeper) IterateDelegations(ctx sdk.Context, delAddr sdk.AccAddress, - fn func(index int64, del types.DelegationI) (stop bool)) { + fn func(index int64, del types.DelegationI) (stop bool), +) { store := ctx.KVStore(k.storeKey) delegatorPrefixKey := types.GetDelegationsKey(delAddr) diff --git a/x/staking/keeper/common_test.go b/x/staking/keeper/common_test.go index 6833ea4c0baf..ad31204ba43b 100644 --- a/x/staking/keeper/common_test.go +++ b/x/staking/keeper/common_test.go @@ -13,9 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -var ( - PKs = simapp.CreateTestPubKeys(500) -) +var PKs = simapp.CreateTestPubKeys(500) func init() { sdk.DefaultPowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index 097c3b037e95..a7af75af4448 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -11,8 +11,7 @@ import ( ) // GetDelegation returns a specific delegation. -func (k Keeper) GetDelegation(ctx sdk.Context, - delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation types.Delegation, found bool) { +func (k Keeper) GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation types.Delegation, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetDelegationKey(delAddr, valAddr) @@ -71,8 +70,7 @@ func (k Keeper) GetValidatorDelegations(ctx sdk.Context, valAddr sdk.ValAddress) // GetDelegatorDelegations returns a given amount of all the delegations from a // delegator. -func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, - maxRetrieve uint16) (delegations []types.Delegation) { +func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (delegations []types.Delegation) { delegations = make([]types.Delegation, maxRetrieve) store := ctx.KVStore(k.storeKey) delegatorPrefixKey := types.GetDelegationsKey(delegator) @@ -92,10 +90,7 @@ func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddres // SetDelegation sets a delegation. func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation) { - delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) store := ctx.KVStore(k.storeKey) b := types.MustMarshalDelegation(k.cdc, delegation) @@ -104,10 +99,8 @@ func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation) { // RemoveDelegation removes a delegation func (k Keeper) RemoveDelegation(ctx sdk.Context, delegation types.Delegation) error { - delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + // TODO: Consider calling hooks outside of the store wrapper functions, it's unobvious. if err := k.BeforeDelegationRemoved(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { return err @@ -119,8 +112,7 @@ func (k Keeper) RemoveDelegation(ctx sdk.Context, delegation types.Delegation) e } // GetUnbondingDelegations returns a given amount of all the delegator unbonding-delegations. -func (k Keeper) GetUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, - maxRetrieve uint16) (unbondingDelegations []types.UnbondingDelegation) { +func (k Keeper) GetUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (unbondingDelegations []types.UnbondingDelegation) { unbondingDelegations = make([]types.UnbondingDelegation, maxRetrieve) store := ctx.KVStore(k.storeKey) @@ -140,9 +132,7 @@ func (k Keeper) GetUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddres } // GetUnbondingDelegation returns a unbonding delegation. -func (k Keeper) GetUnbondingDelegation( - ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, -) (ubd types.UnbondingDelegation, found bool) { +func (k Keeper) GetUnbondingDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubd types.UnbondingDelegation, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetUBDKey(delAddr, valAddr) value := store.Get(key) @@ -269,8 +259,7 @@ func (k Keeper) IterateDelegatorRedelegations(ctx sdk.Context, delegator sdk.Acc } // HasMaxUnbondingDelegationEntries - check if unbonding delegation has maximum number of entries. -func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, - delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool { +func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool { ubd, found := k.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) if !found { return false @@ -281,10 +270,8 @@ func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, // SetUnbondingDelegation sets the unbonding delegation and associated index. func (k Keeper) SetUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDelegation) { - delegatorAddress, err := sdk.AccAddressFromBech32(ubd.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(ubd.DelegatorAddress) + store := ctx.KVStore(k.storeKey) bz := types.MustMarshalUBD(k.cdc, ubd) addr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) @@ -298,10 +285,7 @@ func (k Keeper) SetUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDeleg // RemoveUnbondingDelegation removes the unbonding delegation object and associated index. func (k Keeper) RemoveUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDelegation) { - delegatorAddress, err := sdk.AccAddressFromBech32(ubd.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(ubd.DelegatorAddress) store := ctx.KVStore(k.storeKey) addr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) @@ -359,8 +343,7 @@ func (k Keeper) SetUBDQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys // InsertUBDQueue inserts an unbonding delegation to the appropriate timeslice // in the unbonding queue. -func (k Keeper) InsertUBDQueue(ctx sdk.Context, ubd types.UnbondingDelegation, - completionTime time.Time) { +func (k Keeper) InsertUBDQueue(ctx sdk.Context, ubd types.UnbondingDelegation, completionTime time.Time) { dvPair := types.DVPair{DelegatorAddress: ubd.DelegatorAddress, ValidatorAddress: ubd.ValidatorAddress} timeSlice := k.GetUBDQueueTimeSlice(ctx, completionTime) @@ -402,8 +385,7 @@ func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (m } // GetRedelegations returns a given amount of all the delegator redelegations. -func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, - maxRetrieve uint16) (redelegations []types.Redelegation) { +func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (redelegations []types.Redelegation) { redelegations = make([]types.Redelegation, maxRetrieve) store := ctx.KVStore(k.storeKey) @@ -423,8 +405,7 @@ func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, } // GetRedelegation returns a redelegation. -func (k Keeper) GetRedelegation(ctx sdk.Context, - delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) (red types.Redelegation, found bool) { +func (k Keeper) GetRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) (red types.Redelegation, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetREDKey(delAddr, valSrcAddr, valDstAddr) @@ -457,8 +438,7 @@ func (k Keeper) GetRedelegationsFromSrcValidator(ctx sdk.Context, valAddr sdk.Va } // HasReceivingRedelegation checks if validator is receiving a redelegation. -func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, - delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool { +func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool { store := ctx.KVStore(k.storeKey) prefix := types.GetREDsByDelToValDstIndexKey(delAddr, valDstAddr) @@ -469,9 +449,7 @@ func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, } // HasMaxRedelegationEntries checks if redelegation has maximum number of entries. -func (k Keeper) HasMaxRedelegationEntries(ctx sdk.Context, - delegatorAddr sdk.AccAddress, validatorSrcAddr, - validatorDstAddr sdk.ValAddress) bool { +func (k Keeper) HasMaxRedelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress) bool { red, found := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) if !found { return false @@ -482,10 +460,7 @@ func (k Keeper) HasMaxRedelegationEntries(ctx sdk.Context, // SetRedelegation set a redelegation and associated index. func (k Keeper) SetRedelegation(ctx sdk.Context, red types.Redelegation) { - delegatorAddress, err := sdk.AccAddressFromBech32(red.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(red.DelegatorAddress) store := ctx.KVStore(k.storeKey) bz := types.MustMarshalRED(k.cdc, red) @@ -509,7 +484,8 @@ func (k Keeper) SetRedelegationEntry(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance sdk.Int, - sharesSrc, sharesDst sdk.Dec) types.Redelegation { + sharesSrc, sharesDst sdk.Dec, +) types.Redelegation { red, found := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) if found { red.AddEntry(creationHeight, minTime, balance, sharesDst) @@ -541,10 +517,8 @@ func (k Keeper) IterateRedelegations(ctx sdk.Context, fn func(index int64, red t // RemoveRedelegation removes a redelegation object and associated index. func (k Keeper) RemoveRedelegation(ctx sdk.Context, red types.Redelegation) { - delegatorAddress, err := sdk.AccAddressFromBech32(red.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(red.DelegatorAddress) + store := ctx.KVStore(k.storeKey) valSrcAddr, err := sdk.ValAddressFromBech32(red.ValidatorSrcAddress) if err != nil { @@ -588,13 +562,13 @@ func (k Keeper) SetRedelegationQueueTimeSlice(ctx sdk.Context, timestamp time.Ti // InsertRedelegationQueue insert an redelegation delegation to the appropriate // timeslice in the redelegation queue. -func (k Keeper) InsertRedelegationQueue(ctx sdk.Context, red types.Redelegation, - completionTime time.Time) { +func (k Keeper) InsertRedelegationQueue(ctx sdk.Context, red types.Redelegation, completionTime time.Time) { timeSlice := k.GetRedelegationQueueTimeSlice(ctx, completionTime) dvvTriplet := types.DVVTriplet{ DelegatorAddress: red.DelegatorAddress, ValidatorSrcAddress: red.ValidatorSrcAddress, - ValidatorDstAddress: red.ValidatorDstAddress} + ValidatorDstAddress: red.ValidatorDstAddress, + } if len(timeSlice) == 0 { k.SetRedelegationQueueTimeSlice(ctx, completionTime, []types.DVVTriplet{dvvTriplet}) @@ -664,10 +638,7 @@ func (k Keeper) Delegate( return sdk.ZeroDec(), err } - delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) // if subtractAccount is true then we are // performing a delegation and not a redelegation, thus the source tokens are diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 345121e4ed60..04d67c143c5f 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -31,7 +31,7 @@ func TestDelegation(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 3, sdk.NewInt(10000)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) - //construct the validators + // construct the validators amts := []sdk.Int{sdk.NewInt(9), sdk.NewInt(8), sdk.NewInt(7)} var validators [3]types.Validator for i, amt := range amts { @@ -221,7 +221,7 @@ func TestUnbondDelegation(t *testing.T) { app.StakingKeeper.SetDelegation(ctx, delegation) bondTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - amount, err := app.StakingKeeper.Unbond(ctx, delAddrs[0], valAddrs[0], bondTokens.ToDec()) + amount, err := app.StakingKeeper.Unbond(ctx, delAddrs[0], valAddrs[0], sdk.NewDecFromInt(bondTokens)) require.NoError(t, err) require.Equal(t, bondTokens, amount) // shares to be added to an unbonding delegation @@ -325,7 +325,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) - //create a validator with a self-delegation + // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) validator.MinSelfDelegation = delTokens @@ -364,7 +364,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { app.StakingKeeper.SetDelegation(ctx, delegation) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], app.StakingKeeper.TokensFromConsensusPower(ctx, 6).ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 6))) require.NoError(t, err) // end block @@ -385,7 +385,7 @@ func TestUndelegateFromUnbondingValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - //create a validator with a self-delegation + // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) @@ -433,7 +433,7 @@ func TestUndelegateFromUnbondingValidator(t *testing.T) { // unbond the all self-delegation to put validator in unbonding state val0AccAddr := sdk.AccAddress(addrVals[0]) - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], delTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.NewDecFromInt(delTokens)) require.NoError(t, err) // end block @@ -508,7 +508,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { ctx = ctx.WithBlockTime(time.Unix(333, 0)) // unbond the all self-delegation to put validator in unbonding state - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], valTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.NewDecFromInt(valTokens)) require.NoError(t, err) // end block @@ -531,12 +531,12 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { // unbond some of the other delegation's shares unbondTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], unbondTokens.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], sdk.NewDecFromInt(unbondTokens)) require.NoError(t, err) // unbond rest of the other delegation's shares remainingTokens := delTokens.Sub(unbondTokens) - _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], remainingTokens.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], sdk.NewDecFromInt(remainingTokens)) require.NoError(t, err) // now validator should be deleted from state @@ -557,7 +557,7 @@ func TestUnbondingAllDelegationFromValidator(t *testing.T) { require.NoError(t, testutil.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), delCoins)) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - //create a validator with a self-delegation + // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) @@ -592,14 +592,14 @@ func TestUnbondingAllDelegationFromValidator(t *testing.T) { ctx = ctx.WithBlockTime(time.Unix(333, 0)) // unbond the all self-delegation to put validator in unbonding state - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], valTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.NewDecFromInt(valTokens)) require.NoError(t, err) // end block applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) // unbond all the remaining delegation - _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], delTokens.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], sdk.NewDecFromInt(delTokens)) require.NoError(t, err) // validator should still be in state and still be in unbonding state @@ -806,7 +806,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { require.NoError(t, testutil.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoins)) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - //create a validator with a self-delegation + // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) @@ -836,7 +836,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { delegation := types.NewDelegation(addrDels[0], addrVals[0], issuedShares) app.StakingKeeper.SetDelegation(ctx, delegation) - _, err := app.StakingKeeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[1], delTokens.ToDec()) + _, err := app.StakingKeeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[1], sdk.NewDecFromInt(delTokens)) require.NoError(t, err) // end block @@ -862,7 +862,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { require.NoError(t, testutil.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoins)) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - //create a validator with a self-delegation + // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) @@ -897,7 +897,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { ctx = ctx.WithBlockHeader(header) // unbond the all self-delegation to put validator in unbonding state - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], delTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.NewDecFromInt(delTokens)) require.NoError(t, err) // end block @@ -909,7 +909,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { params := app.StakingKeeper.GetParams(ctx) require.True(t, blockTime.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) - //change the context + // change the context header = ctx.BlockHeader() blockHeight2 := int64(20) header.Height = blockHeight2 @@ -919,7 +919,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { // unbond some of the other delegation's shares redelegateTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegateTokens.ToDec()) + _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], sdk.NewDecFromInt(redelegateTokens)) require.NoError(t, err) // retrieve the unbonding delegation @@ -944,7 +944,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { require.NoError(t, testutil.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoins)) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - //create a validator with a self-delegation + // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) @@ -976,7 +976,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { ctx = ctx.WithBlockTime(time.Unix(333, 0)) // unbond the all self-delegation to put validator in unbonding state - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], delTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.NewDecFromInt(delTokens)) require.NoError(t, err) // end block @@ -993,7 +993,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { // redelegate some of the delegation's shares redelegationTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegationTokens.ToDec()) + _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], sdk.NewDecFromInt(redelegationTokens)) require.NoError(t, err) // no red should have been found diff --git a/x/staking/keeper/genesis.go b/x/staking/keeper/genesis.go new file mode 100644 index 000000000000..b47e32de1b3e --- /dev/null +++ b/x/staking/keeper/genesis.go @@ -0,0 +1,201 @@ +package keeper + +import ( + "fmt" + + abci "github.com/tendermint/tendermint/abci/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// InitGenesis sets the pool and parameters for the provided keeper. For each +// validator in data, it sets that validator in the keeper along with manually +// setting the indexes. In addition, it also sets any delegations found in +// data. Finally, it updates the bonded validators. +// Returns final validator set after applying all declaration and delegations +func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []abci.ValidatorUpdate) { + bondedTokens := sdk.ZeroInt() + notBondedTokens := sdk.ZeroInt() + + // We need to pretend to be "n blocks before genesis", where "n" is the + // validator update delay, so that e.g. slashing periods are correctly + // initialized for the validator set e.g. with a one-block offset - the + // first TM block is at height 1, so state updates applied from + // genesis.json are in block 0. + ctx = ctx.WithBlockHeight(1 - sdk.ValidatorUpdateDelay) + + k.SetParams(ctx, data.Params) + k.SetLastTotalPower(ctx, data.LastTotalPower) + + for _, validator := range data.Validators { + k.SetValidator(ctx, validator) + + // Manually set indices for the first time + k.SetValidatorByConsAddr(ctx, validator) + k.SetValidatorByPowerIndex(ctx, validator) + + // Call the creation hook if not exported + if !data.Exported { + if err := k.AfterValidatorCreated(ctx, validator.GetOperator()); err != nil { + panic(err) + } + } + + // update timeslice if necessary + if validator.IsUnbonding() { + k.InsertUnbondingValidatorQueue(ctx, validator) + } + + switch validator.GetStatus() { + case types.Bonded: + bondedTokens = bondedTokens.Add(validator.GetTokens()) + + case types.Unbonding, types.Unbonded: + notBondedTokens = notBondedTokens.Add(validator.GetTokens()) + + default: + panic("invalid validator status") + } + } + + for _, delegation := range data.Delegations { + delegatorAddress := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + + // Call the before-creation hook if not exported + if !data.Exported { + if err := k.BeforeDelegationCreated(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { + panic(err) + } + } + + k.SetDelegation(ctx, delegation) + + // Call the after-modification hook if not exported + if !data.Exported { + if err := k.AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()); err != nil { + panic(err) + } + } + } + + for _, ubd := range data.UnbondingDelegations { + k.SetUnbondingDelegation(ctx, ubd) + + for _, entry := range ubd.Entries { + k.InsertUBDQueue(ctx, ubd, entry.CompletionTime) + notBondedTokens = notBondedTokens.Add(entry.Balance) + } + } + + for _, red := range data.Redelegations { + k.SetRedelegation(ctx, red) + + for _, entry := range red.Entries { + k.InsertRedelegationQueue(ctx, red, entry.CompletionTime) + } + } + + bondedCoins := sdk.NewCoins(sdk.NewCoin(data.Params.BondDenom, bondedTokens)) + notBondedCoins := sdk.NewCoins(sdk.NewCoin(data.Params.BondDenom, notBondedTokens)) + + // check if the unbonded and bonded pools accounts exists + bondedPool := k.GetBondedPool(ctx) + if bondedPool == nil { + panic(fmt.Sprintf("%s module account has not been set", types.BondedPoolName)) + } + + // TODO: remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 + bondedBalance := k.bankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) + if bondedBalance.IsZero() { + k.authKeeper.SetModuleAccount(ctx, bondedPool) + } + + // if balance is different from bonded coins panic because genesis is most likely malformed + if !bondedBalance.IsEqual(bondedCoins) { + panic(fmt.Sprintf("bonded pool balance is different from bonded coins: %s <-> %s", bondedBalance, bondedCoins)) + } + + notBondedPool := k.GetNotBondedPool(ctx) + if notBondedPool == nil { + panic(fmt.Sprintf("%s module account has not been set", types.NotBondedPoolName)) + } + + notBondedBalance := k.bankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) + if notBondedBalance.IsZero() { + k.authKeeper.SetModuleAccount(ctx, notBondedPool) + } + + // If balance is different from non bonded coins panic because genesis is most + // likely malformed. + if !notBondedBalance.IsEqual(notBondedCoins) { + panic(fmt.Sprintf("not bonded pool balance is different from not bonded coins: %s <-> %s", notBondedBalance, notBondedCoins)) + } + + // don't need to run Tendermint updates if we exported + if data.Exported { + for _, lv := range data.LastValidatorPowers { + valAddr, err := sdk.ValAddressFromBech32(lv.Address) + if err != nil { + panic(err) + } + + k.SetLastValidatorPower(ctx, valAddr, lv.Power) + validator, found := k.GetValidator(ctx, valAddr) + + if !found { + panic(fmt.Sprintf("validator %s not found", lv.Address)) + } + + update := validator.ABCIValidatorUpdate(k.PowerReduction(ctx)) + update.Power = lv.Power // keep the next-val-set offset, use the last power for the first block + res = append(res, update) + } + } else { + var err error + + res, err = k.ApplyAndReturnValidatorSetUpdates(ctx) + if err != nil { + panic(err) + } + } + + return res +} + +// ExportGenesis returns a GenesisState for a given context and keeper. The +// GenesisState will contain the pool, params, validators, and bonds found in +// the keeper. +func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + var unbondingDelegations []types.UnbondingDelegation + + k.IterateUnbondingDelegations(ctx, func(_ int64, ubd types.UnbondingDelegation) (stop bool) { + unbondingDelegations = append(unbondingDelegations, ubd) + return false + }) + + var redelegations []types.Redelegation + + k.IterateRedelegations(ctx, func(_ int64, red types.Redelegation) (stop bool) { + redelegations = append(redelegations, red) + return false + }) + + var lastValidatorPowers []types.LastValidatorPower + + k.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) { + lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addr.String(), Power: power}) + return false + }) + + return &types.GenesisState{ + Params: k.GetParams(ctx), + LastTotalPower: k.GetLastTotalPower(ctx), + LastValidatorPowers: lastValidatorPowers, + Validators: k.GetAllValidators(ctx), + Delegations: k.GetAllDelegations(ctx), + UnbondingDelegations: unbondingDelegations, + Redelegations: redelegations, + Exported: true, + } +} diff --git a/x/staking/keeper/genesis_test.go b/x/staking/keeper/genesis_test.go new file mode 100644 index 000000000000..908e301decfa --- /dev/null +++ b/x/staking/keeper/genesis_test.go @@ -0,0 +1,219 @@ +package keeper_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/bank/testutil" + "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func bootstrapGenesisTest(t *testing.T, numAddrs int) (*simapp.SimApp, sdk.Context, []sdk.AccAddress) { + app := simapp.Setup(t, false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + + addrDels, _ := generateAddresses(app, ctx, numAddrs) + return app, ctx, addrDels +} + +func TestInitGenesis(t *testing.T) { + app, ctx, addrs := bootstrapGenesisTest(t, 10) + + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) + + params := app.StakingKeeper.GetParams(ctx) + validators := app.StakingKeeper.GetAllValidators(ctx) + require.Len(t, validators, 1) + var delegations []types.Delegation + + pk0, err := codectypes.NewAnyWithValue(PKs[0]) + require.NoError(t, err) + + pk1, err := codectypes.NewAnyWithValue(PKs[1]) + require.NoError(t, err) + + // initialize the validators + bondedVal1 := types.Validator{ + OperatorAddress: sdk.ValAddress(addrs[0]).String(), + ConsensusPubkey: pk0, + Status: types.Bonded, + Tokens: valTokens, + DelegatorShares: sdk.NewDecFromInt(valTokens), + Description: types.NewDescription("hoop", "", "", "", ""), + } + bondedVal2 := types.Validator{ + OperatorAddress: sdk.ValAddress(addrs[1]).String(), + ConsensusPubkey: pk1, + Status: types.Bonded, + Tokens: valTokens, + DelegatorShares: sdk.NewDecFromInt(valTokens), + Description: types.NewDescription("bloop", "", "", "", ""), + } + + // append new bonded validators to the list + validators = append(validators, bondedVal1, bondedVal2) + + // mint coins in the bonded pool representing the validators coins + i2 := len(validators) - 1 // -1 to exclude genesis validator + require.NoError(t, + testutil.FundModuleAccount( + app.BankKeeper, + ctx, + types.BondedPoolName, + sdk.NewCoins( + sdk.NewCoin(params.BondDenom, valTokens.MulRaw((int64)(i2))), + ), + ), + ) + + genesisDelegations := app.StakingKeeper.GetAllDelegations(ctx) + delegations = append(delegations, genesisDelegations...) + + genesisState := types.NewGenesisState(params, validators, delegations) + vals := app.StakingKeeper.InitGenesis(ctx, genesisState) + + actualGenesis := app.StakingKeeper.ExportGenesis(ctx) + require.Equal(t, genesisState.Params, actualGenesis.Params) + require.Equal(t, genesisState.Delegations, actualGenesis.Delegations) + require.EqualValues(t, app.StakingKeeper.GetAllValidators(ctx), actualGenesis.Validators) + + // Ensure validators have addresses. + vals2, err := staking.WriteValidators(ctx, app.StakingKeeper) + require.NoError(t, err) + + for _, val := range vals2 { + require.NotEmpty(t, val.Address) + } + + // now make sure the validators are bonded and intra-tx counters are correct + resVal, found := app.StakingKeeper.GetValidator(ctx, sdk.ValAddress(addrs[0])) + require.True(t, found) + require.Equal(t, types.Bonded, resVal.Status) + + resVal, found = app.StakingKeeper.GetValidator(ctx, sdk.ValAddress(addrs[1])) + require.True(t, found) + require.Equal(t, types.Bonded, resVal.Status) + + abcivals := make([]abci.ValidatorUpdate, len(vals)) + + validators = validators[1:] // remove genesis validator + for i, val := range validators { + abcivals[i] = val.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)) + } + + require.Equal(t, abcivals, vals) +} + +func TestInitGenesis_PoolsBalanceMismatch(t *testing.T) { + app := simapp.Setup(t, false) + ctx := app.NewContext(false, tmproto.Header{}) + + consPub, err := codectypes.NewAnyWithValue(PKs[0]) + require.NoError(t, err) + + validator := types.Validator{ + OperatorAddress: sdk.ValAddress("12345678901234567890").String(), + ConsensusPubkey: consPub, + Jailed: false, + Tokens: sdk.NewInt(10), + DelegatorShares: sdk.NewDecFromInt(sdk.NewInt(10)), + Description: types.NewDescription("bloop", "", "", "", ""), + } + + params := types.Params{ + UnbondingTime: 10000, + MaxValidators: 1, + MaxEntries: 10, + BondDenom: "stake", + } + + require.Panics(t, func() { + // setting validator status to bonded so the balance counts towards bonded pool + validator.Status = types.Bonded + app.StakingKeeper.InitGenesis(ctx, &types.GenesisState{ + Params: params, + Validators: []types.Validator{validator}, + }) + }, + "should panic because bonded pool balance is different from bonded pool coins", + ) + + require.Panics(t, func() { + // setting validator status to unbonded so the balance counts towards not bonded pool + validator.Status = types.Unbonded + app.StakingKeeper.InitGenesis(ctx, &types.GenesisState{ + Params: params, + Validators: []types.Validator{validator}, + }) + }, + "should panic because not bonded pool balance is different from not bonded pool coins", + ) +} + +func TestInitGenesisLargeValidatorSet(t *testing.T) { + size := 200 + require.True(t, size > 100) + + app, ctx, addrs := bootstrapGenesisTest(t, 200) + genesisValidators := app.StakingKeeper.GetAllValidators(ctx) + + params := app.StakingKeeper.GetParams(ctx) + delegations := []types.Delegation{} + validators := make([]types.Validator, size) + + var err error + + bondedPoolAmt := sdk.ZeroInt() + for i := range validators { + validators[i], err = types.NewValidator( + sdk.ValAddress(addrs[i]), + PKs[i], + types.NewDescription(fmt.Sprintf("#%d", i), "", "", "", ""), + ) + require.NoError(t, err) + validators[i].Status = types.Bonded + + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) + if i < 100 { + tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 2) + } + + validators[i].Tokens = tokens + validators[i].DelegatorShares = sdk.NewDecFromInt(tokens) + + // add bonded coins + bondedPoolAmt = bondedPoolAmt.Add(tokens) + } + + validators = append(validators, genesisValidators...) + genesisState := types.NewGenesisState(params, validators, delegations) + + // mint coins in the bonded pool representing the validators coins + require.NoError(t, + testutil.FundModuleAccount( + app.BankKeeper, + ctx, + types.BondedPoolName, + sdk.NewCoins(sdk.NewCoin(params.BondDenom, bondedPoolAmt)), + ), + ) + + vals := app.StakingKeeper.InitGenesis(ctx, genesisState) + + abcivals := make([]abci.ValidatorUpdate, 100) + for i, val := range validators[:100] { + abcivals[i] = val.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)) + } + + // remove genesis validator + vals = vals[:100] + require.Equal(t, abcivals, vals) +} diff --git a/x/staking/keeper/grpc_query.go b/x/staking/keeper/grpc_query.go index 8fa16354d48e..9bbed760fc97 100644 --- a/x/staking/keeper/grpc_query.go +++ b/x/staking/keeper/grpc_query.go @@ -31,34 +31,30 @@ func (k Querier) Validators(c context.Context, req *types.QueryValidatorsRequest return nil, status.Errorf(codes.InvalidArgument, "invalid validator status %s", req.Status) } - var validators types.Validators ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) valStore := prefix.NewStore(store, types.ValidatorsKey) - pageRes, err := query.FilteredPaginate(valStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { - val, err := types.UnmarshalValidator(k.cdc, value) - if err != nil { - return false, err - } - + validators, pageRes, err := query.GenericFilteredPaginate(k.cdc, valStore, req.Pagination, func(key []byte, val *types.Validator) (*types.Validator, error) { if req.Status != "" && !strings.EqualFold(val.GetStatus().String(), req.Status) { - return false, nil - } - - if accumulate { - validators = append(validators, val) + return nil, nil } - return true, nil + return val, nil + }, func() *types.Validator { + return &types.Validator{} }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryValidatorsResponse{Validators: validators, Pagination: pageRes}, nil + vals := types.Validators{} + for _, val := range validators { + vals = append(vals, *val) + } + + return &types.QueryValidatorsResponse{Validators: vals, Pagination: pageRes}, nil } // Validator queries validator info for given validator address @@ -94,42 +90,41 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } - var delegations []types.Delegation ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) valStore := prefix.NewStore(store, types.DelegationKey) - pageRes, err := query.FilteredPaginate(valStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { - delegation, err := types.UnmarshalDelegation(k.cdc, value) - if err != nil { - return false, err - } - + delegations, pageRes, err := query.GenericFilteredPaginate(k.cdc, valStore, req.Pagination, func(key []byte, delegation *types.Delegation) (*types.Delegation, error) { valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) if err != nil { - return false, err + return nil, err } if !delegation.GetValidatorAddr().Equals(valAddr) { - return false, nil + return nil, nil } - if accumulate { - delegations = append(delegations, delegation) - } - return true, nil + return delegation, nil + }, func() *types.Delegation { + return &types.Delegation{} }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - delResponses, err := DelegationsToDelegationResponses(ctx, k.Keeper, delegations) + dels := types.Delegations{} + for _, d := range delegations { + dels = append(dels, *d) + } + + delResponses, err := DelegationsToDelegationResponses(ctx, k.Keeper, dels) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryValidatorDelegationsResponse{ - DelegationResponses: delResponses, Pagination: pageRes}, nil + DelegationResponses: delResponses, Pagination: pageRes, + }, nil } // ValidatorUnbondingDelegations queries unbonding delegations of a validator @@ -287,7 +282,6 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat } return &types.QueryDelegatorDelegationsResponse{DelegationResponses: delegationResps, Pagination: pageRes}, nil - } // DelegatorValidator queries validator info for given delegator validator pair @@ -354,7 +348,8 @@ func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.Que } return &types.QueryDelegatorUnbondingDelegationsResponse{ - UnbondingResponses: unbondingDelegations, Pagination: pageRes}, nil + UnbondingResponses: unbondingDelegations, Pagination: pageRes, + }, nil } // HistoricalInfo queries the historical info for given height @@ -439,7 +434,6 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato validators = append(validators, validator) return nil }) - if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -471,7 +465,6 @@ func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types. } func queryRedelegation(ctx sdk.Context, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, err error) { - delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) if err != nil { return nil, err diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index 8bb355571cd2..09cdb5e47cea 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -56,8 +56,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidators() { { "valid request", func() { - req = &types.QueryValidatorsRequest{Status: types.Bonded.String(), - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + req = &types.QueryValidatorsRequest{ + Status: types.Bonded.String(), + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, true, 1, @@ -149,7 +151,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorValidators() { func() { req = &types.QueryDelegatorValidatorsRequest{ DelegatorAddr: addrs[0].String(), - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, true, }, @@ -321,8 +324,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorDelegations() { { "valid request", func() { - req = &types.QueryDelegatorDelegationsRequest{DelegatorAddr: addrAcc.String(), - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + req = &types.QueryDelegatorDelegationsRequest{ + DelegatorAddr: addrAcc.String(), + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, func(suite *KeeperTestSuite, response *types.QueryDelegatorDelegationsResponse) { suite.Equal(uint64(2), response.Pagination.Total) @@ -384,8 +389,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorDelegations() { { "valid request", func() { - req = &types.QueryValidatorDelegationsRequest{ValidatorAddr: addrVal1, - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + req = &types.QueryValidatorDelegationsRequest{ + ValidatorAddr: addrVal1, + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, true, false, @@ -422,7 +429,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryUnbondingDelegation() { unbondingTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) valAddr, err1 := sdk.ValAddressFromBech32(addrVal2) suite.NoError(err1) - _, err := app.StakingKeeper.Undelegate(ctx, addrAcc2, valAddr, unbondingTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, addrAcc2, valAddr, sdk.NewDecFromInt(unbondingTokens)) suite.NoError(err) unbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc2, valAddr) @@ -451,7 +458,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryUnbondingDelegation() { "valid request", func() { req = &types.QueryUnbondingDelegationRequest{ - DelegatorAddr: addrAcc2.String(), ValidatorAddr: addrVal2} + DelegatorAddr: addrAcc2.String(), ValidatorAddr: addrVal2, + } }, true, }, @@ -480,11 +488,11 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() { unbondingTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) valAddr1, err1 := sdk.ValAddressFromBech32(addrVal) suite.NoError(err1) - _, err := app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr1, unbondingTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr1, sdk.NewDecFromInt(unbondingTokens)) suite.NoError(err) valAddr2, err1 := sdk.ValAddressFromBech32(addrVal2) suite.NoError(err1) - _, err = app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr2, unbondingTokens.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr2, sdk.NewDecFromInt(unbondingTokens)) suite.NoError(err) unbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc, valAddr1) @@ -515,8 +523,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() { { "valid request", func() { - req = &types.QueryDelegatorUnbondingDelegationsRequest{DelegatorAddr: addrAcc.String(), - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + req = &types.QueryDelegatorUnbondingDelegationsRequest{ + DelegatorAddr: addrAcc.String(), + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, true, false, @@ -632,7 +642,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegations() { applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) rdAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator(), rdAmount.ToDec()) + _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator(), sdk.NewDecFromInt(rdAmount)) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) @@ -657,8 +667,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegations() { { "request redelegations with non existent pairs", func() { - req = &types.QueryRedelegationsRequest{DelegatorAddr: addrAcc.String(), SrcValidatorAddr: val3.String(), - DstValidatorAddr: val4.String()} + req = &types.QueryRedelegationsRequest{ + DelegatorAddr: addrAcc.String(), SrcValidatorAddr: val3.String(), + DstValidatorAddr: val4.String(), + } }, false, true, @@ -668,7 +680,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegations() { func() { req = &types.QueryRedelegationsRequest{ DelegatorAddr: addrAcc1.String(), SrcValidatorAddr: val1.OperatorAddress, - DstValidatorAddr: val2.OperatorAddress, Pagination: &query.PageRequest{}} + DstValidatorAddr: val2.OperatorAddress, Pagination: &query.PageRequest{}, + } }, true, false, @@ -678,7 +691,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegations() { func() { req = &types.QueryRedelegationsRequest{ DelegatorAddr: addrAcc1.String(), SrcValidatorAddr: val1.OperatorAddress, - Pagination: &query.PageRequest{}} + Pagination: &query.PageRequest{}, + } }, true, false, @@ -688,7 +702,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegations() { func() { req = &types.QueryRedelegationsRequest{ SrcValidatorAddr: val1.GetOperator().String(), - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, true, false, @@ -724,7 +739,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { // undelegate undelAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) - _, err := app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), undelAmount.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), sdk.NewDecFromInt(undelAmount)) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) @@ -746,7 +761,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { func() { req = &types.QueryValidatorUnbondingDelegationsRequest{ ValidatorAddr: val1.GetOperator().String(), - Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} + Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, + } }, true, }, diff --git a/x/staking/keeper/invariants.go b/x/staking/keeper/invariants.go index ed88ec62518e..7ebc427c11b0 100644 --- a/x/staking/keeper/invariants.go +++ b/x/staking/keeper/invariants.go @@ -164,20 +164,30 @@ func DelegatorSharesInvariant(k Keeper) sdk.Invariant { ) validators := k.GetAllValidators(ctx) + validatorsDelegationShares := map[string]sdk.Dec{} + + // initialize a map: validator -> its delegation shares for _, validator := range validators { - valTotalDelShares := validator.GetDelegatorShares() - totalDelShares := sdk.ZeroDec() + validatorsDelegationShares[validator.GetOperator().String()] = sdk.ZeroDec() + } - delegations := k.GetValidatorDelegations(ctx, validator.GetOperator()) - for _, delegation := range delegations { - totalDelShares = totalDelShares.Add(delegation.Shares) - } + // iterate through all the delegations to calculate the total delegation shares for each validator + delegations := k.GetAllDelegations(ctx) + for _, delegation := range delegations { + delegationValidatorAddr := delegation.GetValidatorAddr().String() + validatorDelegationShares := validatorsDelegationShares[delegationValidatorAddr] + validatorsDelegationShares[delegationValidatorAddr] = validatorDelegationShares.Add(delegation.Shares) + } - if !valTotalDelShares.Equal(totalDelShares) { + // for each validator, check if its total delegation shares calculated from the step above equals to its expected delegation shares + for _, validator := range validators { + expValTotalDelShares := validator.GetDelegatorShares() + calculatedValTotalDelShares := validatorsDelegationShares[validator.GetOperator().String()] + if !calculatedValTotalDelShares.Equal(expValTotalDelShares) { broken = true msg += fmt.Sprintf("broken delegator shares invariance:\n"+ "\tvalidator.DelegatorShares: %v\n"+ - "\tsum of Delegator.Shares: %v\n", valTotalDelShares, totalDelShares) + "\tsum of Delegator.Shares: %v\n", expValTotalDelShares, calculatedValTotalDelShares) } } diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index f15074d63bb4..610acf4cb030 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -53,17 +53,18 @@ func (suite *KeeperTestSuite) SetupTest() { suite.app, suite.ctx, suite.queryClient, suite.addrs, suite.vals = app, ctx, queryClient, addrs, validators } + func TestParams(t *testing.T) { app := simapp.Setup(t, false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) expParams := types.DefaultParams() - //check that the empty keeper loads the default + // check that the empty keeper loads the default resParams := app.StakingKeeper.GetParams(ctx) require.True(t, expParams.Equal(resParams)) - //modify a params, save, and retrieve + // modify a params, save, and retrieve expParams.MaxValidators = 777 app.StakingKeeper.SetParams(ctx, expParams) resParams = app.StakingKeeper.GetParams(ctx) diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 3e4ad4417d1b..cf74b61ea02f 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -9,7 +9,6 @@ import ( "google.golang.org/grpc/status" "github.com/armon/go-metrics" - tmstrings "github.com/tendermint/tendermint/libs/strings" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/telemetry" @@ -70,7 +69,15 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa cp := ctx.ConsensusParams() if cp != nil && cp.Validator != nil { - if !tmstrings.StringInSlice(pk.Type(), cp.Validator.PubKeyTypes) { + pkType := pk.Type() + hasKeyType := false + for _, keyType := range cp.Validator.PubKeyTypes { + if pkType == keyType { + hasKeyType = true + break + } + } + if !hasKeyType { return nil, sdkerrors.Wrapf( types.ErrValidatorPubKeyTypeNotSupported, "got: %s, expected: %s", pk.Type(), cp.Validator.PubKeyTypes, diff --git a/x/staking/keeper/pool.go b/x/staking/keeper/pool.go index c24c87632358..b281b45784dc 100644 --- a/x/staking/keeper/pool.go +++ b/x/staking/keeper/pool.go @@ -71,7 +71,7 @@ func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int { func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec { stakeSupply := k.StakingTokenSupply(ctx) if stakeSupply.IsPositive() { - return k.TotalBondedTokens(ctx).ToDec().QuoInt(stakeSupply) + return sdk.NewDecFromInt(k.TotalBondedTokens(ctx)).QuoInt(stakeSupply) } return sdk.ZeroDec() diff --git a/x/staking/keeper/querier.go b/x/staking/keeper/querier.go index 06bab770467d..b3ec7e18d92f 100644 --- a/x/staking/keeper/querier.go +++ b/x/staking/keeper/querier.go @@ -190,7 +190,6 @@ func queryDelegatorDelegations(ctx sdk.Context, req abci.RequestQuery, k Keeper, delegations := k.GetAllDelegatorDelegations(ctx, params.DelegatorAddr) delegationResps, err := DelegationsToDelegationResponses(ctx, k, delegations) - if err != nil { return nil, err } @@ -497,10 +496,8 @@ func RedelegationsToRedelegationResponses( panic(err) } - delegatorAddress, err := sdk.AccAddressFromBech32(redel.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(redel.DelegatorAddress) + val, found := k.GetValidator(ctx, valDstAddr) if !found { return nil, types.ErrNoValidatorFound diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index f50e95a1833e..ac5b1eed5a56 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -351,7 +351,7 @@ func TestQueryDelegation(t *testing.T) { // Query unbonding delegation unbondingTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - _, err = app.StakingKeeper.Undelegate(ctx, addrAcc2, val1.GetOperator(), unbondingTokens.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrAcc2, val1.GetOperator(), sdk.NewDecFromInt(unbondingTokens)) require.NoError(t, err) queryBondParams = types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2.String(), ValidatorAddr: addrVal1.String()} @@ -404,8 +404,7 @@ func TestQueryDelegation(t *testing.T) { // Query redelegation redelegationTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), - val2.GetOperator(), redelegationTokens.ToDec()) + _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), sdk.NewDecFromInt(redelegationTokens)) require.NoError(t, err) redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator()) require.True(t, found) @@ -509,7 +508,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { // Undelegate for _, addr := range addrs { delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) - _, err := app.StakingKeeper.Undelegate(ctx, addr, val1.GetOperator(), delTokens.ToDec()) + _, err := app.StakingKeeper.Undelegate(ctx, addr, val1.GetOperator(), sdk.NewDecFromInt(delTokens)) require.NoError(t, err) } @@ -559,7 +558,7 @@ func TestQueryRedelegations(t *testing.T) { applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) rdAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), rdAmount.ToDec()) + _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), sdk.NewDecFromInt(rdAmount)) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -631,7 +630,7 @@ func TestQueryUnbondingDelegation(t *testing.T) { // undelegate undelAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) - _, err = app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), undelAmount.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), sdk.NewDecFromInt(undelAmount)) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 279af3a85a35..75e22ca49fb2 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -30,7 +30,7 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh // Amount of slashing = slash slashFactor * power at time of infraction amount := k.TokensFromConsensusPower(ctx, power) - slashAmountDec := amount.ToDec().Mul(slashFactor) + slashAmountDec := sdk.NewDecFromInt(amount).Mul(slashFactor) slashAmount := slashAmountDec.TruncateInt() // ref https://github.com/cosmos/cosmos-sdk/issues/1348 @@ -108,7 +108,7 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh // we need to calculate the *effective* slash fraction for distribution if validator.Tokens.IsPositive() { - effectiveFraction := tokensToBurn.ToDec().QuoRoundUp(validator.Tokens.ToDec()) + effectiveFraction := sdk.NewDecFromInt(tokensToBurn).QuoRoundUp(sdk.NewDecFromInt(validator.Tokens)) // possible if power has changed if effectiveFraction.GT(sdk.OneDec()) { effectiveFraction = sdk.OneDec() @@ -165,7 +165,8 @@ func (k Keeper) Unjail(ctx sdk.Context, consAddr sdk.ConsAddress) { // (the amount actually slashed may be less if there's // insufficient stake remaining) func (k Keeper) SlashUnbondingDelegation(ctx sdk.Context, unbondingDelegation types.UnbondingDelegation, - infractionHeight int64, slashFactor sdk.Dec) (totalSlashAmount sdk.Int) { + infractionHeight int64, slashFactor sdk.Dec, +) (totalSlashAmount sdk.Int) { now := ctx.BlockHeader().Time totalSlashAmount = sdk.ZeroInt() burnedAmount := sdk.ZeroInt() @@ -218,7 +219,8 @@ func (k Keeper) SlashUnbondingDelegation(ctx sdk.Context, unbondingDelegation ty // insufficient stake remaining) // NOTE this is only slashing for prior infractions from the source validator func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, redelegation types.Redelegation, - infractionHeight int64, slashFactor sdk.Dec) (totalSlashAmount sdk.Int) { + infractionHeight int64, slashFactor sdk.Dec, +) (totalSlashAmount sdk.Int) { now := ctx.BlockHeader().Time totalSlashAmount = sdk.ZeroInt() bondedBurnedAmount, notBondedBurnedAmount := sdk.ZeroInt(), sdk.ZeroInt() @@ -251,10 +253,7 @@ func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, panic(err) } - delegatorAddress, err := sdk.AccAddressFromBech32(redelegation.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(redelegation.DelegatorAddress) delegation, found := k.GetDelegation(ctx, delegatorAddress, valDstAddr) if !found { diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 8b987d0e8d5e..ea83aab9dce2 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -112,7 +112,7 @@ func TestSlashUnbondingDelegation(t *testing.T) { // balance decreased require.Equal(t, sdk.NewInt(5), ubd.Entries[0].Balance) newUnbondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) - diffTokens := oldUnbondedPoolBalances.Sub(newUnbondedPoolBalances) + diffTokens := oldUnbondedPoolBalances.Sub(newUnbondedPoolBalances...) require.True(t, diffTokens.AmountOf(app.StakingKeeper.BondDenom(ctx)).Equal(sdk.NewInt(5))) } @@ -180,7 +180,7 @@ func TestSlashRedelegation(t *testing.T) { // pool bonded tokens should decrease burnedCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), slashAmount)) - require.Equal(t, balances.Sub(burnedCoins), app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress())) + require.Equal(t, balances.Sub(burnedCoins...), app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress())) } // tests Slash at a future height (must panic) @@ -220,7 +220,7 @@ func TestSlashAtNegativeHeight(t *testing.T) { // pool bonded shares decreased newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) + diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(app.StakingKeeper.BondDenom(ctx)) require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 5).String(), diffTokens.String()) } @@ -251,7 +251,7 @@ func TestSlashValidatorAtCurrentHeight(t *testing.T) { // pool bonded shares decreased newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) + diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(app.StakingKeeper.BondDenom(ctx)) require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 5).String(), diffTokens.String()) } @@ -290,7 +290,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) + diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(app.StakingKeeper.BondDenom(ctx)) require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 3), diffTokens) // read updated validator @@ -316,7 +316,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned again newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) + diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(app.StakingKeeper.BondDenom(ctx)) require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 6), diffTokens) // read updated validator @@ -342,7 +342,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned again newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) + diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(app.StakingKeeper.BondDenom(ctx)) require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 9), diffTokens) // read updated validator @@ -368,7 +368,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // just 1 bonded token burned again since that's all the validator now has newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) + diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances...).AmountOf(app.StakingKeeper.BondDenom(ctx)) require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 10), diffTokens) // apply TM updates @@ -390,12 +390,11 @@ func TestSlashWithRedelegation(t *testing.T) { // set a redelegation rdTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, - time.Unix(0, 0), rdTokens, rdTokens.ToDec()) + rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdTokens, sdk.NewDecFromInt(rdTokens)) app.StakingKeeper.SetRedelegation(ctx, rd) // set the associated delegation - del := types.NewDelegation(addrDels[0], addrVals[1], rdTokens.ToDec()) + del := types.NewDelegation(addrDels[0], addrVals[1], sdk.NewDecFromInt(rdTokens)) app.StakingKeeper.SetDelegation(ctx, del) // update bonded tokens @@ -416,7 +415,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, fraction) }) - burnAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(fraction).TruncateInt() + burnAmount := sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 10)).Mul(fraction).TruncateInt() bondedPool = app.StakingKeeper.GetBondedPool(ctx) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) @@ -482,7 +481,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec()) }) - burnAmount = app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(sdk.OneDec()).TruncateInt() + burnAmount = sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 10)).Mul(sdk.OneDec()).TruncateInt() burnAmount = burnAmount.Sub(sdk.OneDec().MulInt(rdTokens).TruncateInt()) // read updated pool @@ -543,13 +542,11 @@ func TestSlashBoth(t *testing.T) { // set a redelegation with expiration timestamp beyond which the // redelegation shouldn't be slashed rdATokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - rdA := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, - time.Unix(0, 0), rdATokens, - rdATokens.ToDec()) + rdA := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdATokens, sdk.NewDecFromInt(rdATokens)) app.StakingKeeper.SetRedelegation(ctx, rdA) // set the associated delegation - delA := types.NewDelegation(addrDels[0], addrVals[1], rdATokens.ToDec()) + delA := types.NewDelegation(addrDels[0], addrVals[1], sdk.NewDecFromInt(rdATokens)) app.StakingKeeper.SetDelegation(ctx, delA) // set an unbonding delegation with expiration timestamp (beyond which the @@ -582,7 +579,7 @@ func TestSlashBoth(t *testing.T) { app.StakingKeeper.Slash(ctx, consAddr0, 10, 10, fraction) burnedNotBondedAmount := fraction.MulInt(ubdATokens).TruncateInt() - burnedBondAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(fraction).TruncateInt() + burnedBondAmount := sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 10)).Mul(fraction).TruncateInt() burnedBondAmount = burnedBondAmount.Sub(burnedNotBondedAmount) // read updated pool diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 7392936f5421..22f699366119 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -39,10 +39,8 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { if err != nil { panic(err) } - delegatorAddress, err := sdk.AccAddressFromBech32(dvPair.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(dvPair.DelegatorAddress) + balances, err := k.CompleteUnbonding(ctx, delegatorAddress, addr) if err != nil { continue @@ -69,10 +67,8 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { if err != nil { panic(err) } - delegatorAddress, err := sdk.AccAddressFromBech32(dvvTriplet.DelegatorAddress) - if err != nil { - panic(err) - } + delegatorAddress := sdk.MustAccAddressFromBech32(dvvTriplet.DelegatorAddress) + balances, err := k.CompleteRedelegation( ctx, delegatorAddress, diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index 8539cbe0ec8a..9b51577c5a06 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -96,7 +96,8 @@ func (k Keeper) SetNewValidatorByPowerIndex(ctx sdk.Context, validator types.Val // Update the tokens of an existing validator, update the validators power index key func (k Keeper) AddValidatorTokensAndShares(ctx sdk.Context, validator types.Validator, - tokensToAdd sdk.Int) (valOut types.Validator, addedShares sdk.Dec) { + tokensToAdd sdk.Int, +) (valOut types.Validator, addedShares sdk.Dec) { k.DeleteValidatorByPowerIndex(ctx, validator) validator, addedShares = validator.AddTokensFromDel(tokensToAdd) k.SetValidator(ctx, validator) @@ -107,7 +108,8 @@ func (k Keeper) AddValidatorTokensAndShares(ctx sdk.Context, validator types.Val // Update the tokens of an existing validator, update the validators power index key func (k Keeper) RemoveValidatorTokensAndShares(ctx sdk.Context, validator types.Validator, - sharesToRemove sdk.Dec) (valOut types.Validator, removedTokens sdk.Int) { + sharesToRemove sdk.Dec, +) (valOut types.Validator, removedTokens sdk.Int) { k.DeleteValidatorByPowerIndex(ctx, validator) validator, removedTokens = validator.RemoveDelShares(sharesToRemove) k.SetValidator(ctx, validator) @@ -118,7 +120,8 @@ func (k Keeper) RemoveValidatorTokensAndShares(ctx sdk.Context, validator types. // Update the tokens of an existing validator, update the validators power index key func (k Keeper) RemoveValidatorTokens(ctx sdk.Context, - validator types.Validator, tokensToRemove sdk.Int) types.Validator { + validator types.Validator, tokensToRemove sdk.Int, +) types.Validator { k.DeleteValidatorByPowerIndex(ctx, validator) validator = validator.RemoveTokens(tokensToRemove) k.SetValidator(ctx, validator) @@ -130,7 +133,8 @@ func (k Keeper) RemoveValidatorTokens(ctx sdk.Context, // UpdateValidatorCommission attempts to update a validator's commission rate. // An error is returned if the new commission rate is invalid. func (k Keeper) UpdateValidatorCommission(ctx sdk.Context, - validator types.Validator, newRate sdk.Dec) (types.Commission, error) { + validator types.Validator, newRate sdk.Dec, +) (types.Commission, error) { commission := validator.Commission blockTime := ctx.BlockHeader().Time diff --git a/x/staking/keeper/validator_bench_test.go b/x/staking/keeper/validator_bench_test.go index 54a616c90e50..ea727b72457d 100644 --- a/x/staking/keeper/validator_bench_test.go +++ b/x/staking/keeper/validator_bench_test.go @@ -5,10 +5,10 @@ import "testing" func BenchmarkGetValidator(b *testing.B) { // 900 is the max number we are allowed to use in order to avoid simapp.CreateTestPubKeys // panic: encoding/hex: odd length hex string - var powersNumber = 900 + powersNumber := 900 var totalPower int64 = 0 - var powers = make([]int64, powersNumber) + powers := make([]int64, powersNumber) for i := range powers { powers[i] = int64(i) totalPower += int64(i) diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index c4109a9f3ddf..ffa6d595854f 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -196,7 +196,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { // validator and next in line cliff validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, nextCliffVal) shares := app.StakingKeeper.TokensFromConsensusPower(ctx, 21) - nextCliffVal, _ = nextCliffVal.RemoveDelShares(shares.ToDec()) + nextCliffVal, _ = nextCliffVal.RemoveDelShares(sdk.NewDecFromInt(shares)) nextCliffVal = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, nextCliffVal, true) expectedValStatus := map[int]types.BondStatus{ @@ -252,7 +252,7 @@ func TestSlashToZeroPowerRemoved(t *testing.T) { func TestValidatorBasics(t *testing.T) { app, ctx, _, addrVals := bootstrapValidatorTest(t, 1000, 20) - //construct the validators + // construct the validators var validators [3]types.Validator powers := []int64{9, 8, 7} for i, power := range powers { @@ -300,7 +300,7 @@ func TestValidatorBasics(t *testing.T) { // modify a records, save, and retrieve validators[0].Status = types.Bonded validators[0].Tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validators[0].DelegatorShares = validators[0].Tokens.ToDec() + validators[0].DelegatorShares = sdk.NewDecFromInt(validators[0].Tokens) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], true) resVal, found = app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) @@ -357,7 +357,8 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { app.StakingKeeper.PowerReduction(ctx).MulRaw(100), app.StakingKeeper.PowerReduction(ctx), app.StakingKeeper.PowerReduction(ctx).MulRaw(400), - app.StakingKeeper.PowerReduction(ctx).MulRaw(200)} + app.StakingKeeper.PowerReduction(ctx).MulRaw(200), + } n := len(amts) var validators [5]types.Validator for i, amt := range amts { @@ -450,7 +451,8 @@ func TestGetValidatorSortingMixed(t *testing.T) { app.StakingKeeper.PowerReduction(ctx).MulRaw(100), app.StakingKeeper.PowerReduction(ctx), app.StakingKeeper.PowerReduction(ctx).MulRaw(400), - app.StakingKeeper.PowerReduction(ctx).MulRaw(200)} + app.StakingKeeper.PowerReduction(ctx).MulRaw(200), + } var validators [5]types.Validator for i, amt := range amts { @@ -881,8 +883,8 @@ func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { // tendermintUpdate set: {c1, c3} -> {c1', c3'} delTokens1 := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) delTokens2 := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) - validators[0], _ = validators[0].RemoveDelShares(delTokens1.ToDec()) - validators[1], _ = validators[1].RemoveDelShares(delTokens2.ToDec()) + validators[0], _ = validators[0].RemoveDelShares(sdk.NewDecFromInt(delTokens1)) + validators[1], _ = validators[1].RemoveDelShares(sdk.NewDecFromInt(delTokens2)) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) @@ -950,7 +952,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { app.StakingKeeper.SetValidator(ctx, validator) - validator, _ = validator.RemoveDelShares(amt.ToDec()) + validator, _ = validator.RemoveDelShares(sdk.NewDecFromInt(amt)) app.StakingKeeper.SetValidator(ctx, validator) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validator) diff --git a/x/staking/migrations/v034/types.go b/x/staking/migrations/v034/types.go deleted file mode 100644 index 868a6901f8a7..000000000000 --- a/x/staking/migrations/v034/types.go +++ /dev/null @@ -1,190 +0,0 @@ -// Package v034 is used for legacy migration scripts. Actual migration scripts -// for v034 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v034 - -import ( - "time" - - "github.com/cosmos/cosmos-sdk/codec/legacy" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" -) - -const ( - ModuleName = "staking" -) - -// staking constants -const ( - Unbonded BondStatus = 0x00 - Unbonding BondStatus = 0x01 - Bonded BondStatus = 0x02 - - BondStatusUnbonded = "Unbonded" - BondStatusUnbonding = "Unbonding" - BondStatusBonded = "Bonded" -) - -type ( - // BondStatus is the status of a validator - BondStatus byte - - Pool struct { - NotBondedTokens sdk.Int `json:"not_bonded_tokens"` - BondedTokens sdk.Int `json:"bonded_tokens"` - } - - Params struct { - UnbondingTime time.Duration `json:"unbonding_time"` - MaxValidators uint16 `json:"max_validators"` - MaxEntries uint16 `json:"max_entries"` - BondDenom string `json:"bond_denom"` - } - - LastValidatorPower struct { - Address sdk.ValAddress - Power int64 - } - - Description struct { - Moniker string `json:"moniker"` - Identity string `json:"identity"` - Website string `json:"website"` - Details string `json:"details"` - } - - Commission struct { - Rate sdk.Dec `json:"rate"` - MaxRate sdk.Dec `json:"max_rate"` - MaxChangeRate sdk.Dec `json:"max_change_rate"` - UpdateTime time.Time `json:"update_time"` - } - - bechValidator struct { - OperatorAddress sdk.ValAddress `json:"operator_address"` // the bech32 address of the validator's operator - ConsPubKey string `json:"consensus_pubkey"` // the bech32 consensus public key of the validator - Jailed bool `json:"jailed"` // has the validator been jailed from bonded status? - Status BondStatus `json:"status"` // validator status (bonded/unbonding/unbonded) - Tokens sdk.Int `json:"tokens"` // delegated tokens (incl. self-delegation) - DelegatorShares sdk.Dec `json:"delegator_shares"` // total shares issued to a validator's delegators - Description Description `json:"description"` // description terms for the validator - UnbondingHeight int64 `json:"unbonding_height"` // if unbonding, height at which this validator has begun unbonding - UnbondingCompletionTime time.Time `json:"unbonding_time"` // if unbonding, min time for the validator to complete unbonding - Commission Commission `json:"commission"` // commission parameters - MinSelfDelegation sdk.Int `json:"min_self_delegation"` // minimum self delegation - } - - Validator struct { - OperatorAddress sdk.ValAddress `json:"operator_address"` - ConsPubKey cryptotypes.PubKey `json:"consensus_pubkey"` - Jailed bool `json:"jailed"` - Status BondStatus `json:"status"` - Tokens sdk.Int `json:"tokens"` - DelegatorShares sdk.Dec `json:"delegator_shares"` - Description Description `json:"description"` - UnbondingHeight int64 `json:"unbonding_height"` - UnbondingCompletionTime time.Time `json:"unbonding_time"` - Commission Commission `json:"commission"` - MinSelfDelegation sdk.Int `json:"min_self_delegation"` - } - - Validators []Validator - - Delegation struct { - DelegatorAddress sdk.AccAddress `json:"delegator_address"` - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Shares sdk.Dec `json:"shares"` - } - - Delegations []Delegation - - UnbondingDelegationEntry struct { - CreationHeight int64 `json:"creation_height"` - CompletionTime time.Time `json:"completion_time"` - InitialBalance sdk.Int `json:"initial_balance"` - Balance sdk.Int `json:"balance"` - } - - UnbondingDelegation struct { - DelegatorAddress sdk.AccAddress `json:"delegator_address"` - ValidatorAddress sdk.ValAddress `json:"validator_address"` - Entries []UnbondingDelegationEntry `json:"entries"` - } - - RedelegationEntry struct { - CreationHeight int64 `json:"creation_height"` - CompletionTime time.Time `json:"completion_time"` - InitialBalance sdk.Int `json:"initial_balance"` - SharesDst sdk.Dec `json:"shares_dst"` - } - - Redelegation struct { - DelegatorAddress sdk.AccAddress `json:"delegator_address"` - ValidatorSrcAddress sdk.ValAddress `json:"validator_src_address"` - ValidatorDstAddress sdk.ValAddress `json:"validator_dst_address"` - Entries []RedelegationEntry `json:"entries"` - } - - GenesisState struct { - Pool Pool `json:"pool"` - Params Params `json:"params"` - LastTotalPower sdk.Int `json:"last_total_power"` - LastValidatorPowers []LastValidatorPower `json:"last_validator_powers"` - Validators Validators `json:"validators"` - Delegations Delegations `json:"delegations"` - UnbondingDelegations []UnbondingDelegation `json:"unbonding_delegations"` - Redelegations []Redelegation `json:"redelegations"` - Exported bool `json:"exported"` - } -) - -func (v Validator) MarshalJSON() ([]byte, error) { - bechConsPubKey, err := legacybech32.MarshalPubKey(legacybech32.ConsPK, v.ConsPubKey) - if err != nil { - return nil, err - } - - return legacy.Cdc.MarshalJSON(bechValidator{ - OperatorAddress: v.OperatorAddress, - ConsPubKey: bechConsPubKey, - Jailed: v.Jailed, - Status: v.Status, - Tokens: v.Tokens, - DelegatorShares: v.DelegatorShares, - Description: v.Description, - UnbondingHeight: v.UnbondingHeight, - UnbondingCompletionTime: v.UnbondingCompletionTime, - MinSelfDelegation: v.MinSelfDelegation, - Commission: v.Commission, - }) -} - -// UnmarshalJSON unmarshals the validator from JSON using Bech32 -func (v *Validator) UnmarshalJSON(data []byte) error { - bv := &bechValidator{} - if err := legacy.Cdc.UnmarshalJSON(data, bv); err != nil { - return err - } - consPubKey, err := legacybech32.UnmarshalPubKey(legacybech32.ConsPK, bv.ConsPubKey) - if err != nil { - return err - } - - *v = Validator{ - OperatorAddress: bv.OperatorAddress, - ConsPubKey: consPubKey, - Jailed: bv.Jailed, - Tokens: bv.Tokens, - Status: bv.Status, - DelegatorShares: bv.DelegatorShares, - Description: bv.Description, - UnbondingHeight: bv.UnbondingHeight, - UnbondingCompletionTime: bv.UnbondingCompletionTime, - Commission: bv.Commission, - MinSelfDelegation: bv.MinSelfDelegation, - } - return nil -} diff --git a/x/staking/migrations/v036/types.go b/x/staking/migrations/v036/types.go deleted file mode 100644 index c954add072e7..000000000000 --- a/x/staking/migrations/v036/types.go +++ /dev/null @@ -1,137 +0,0 @@ -// Package v036 is used for legacy migration scripts. Actual migration scripts -// for v036 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v036 - -import ( - "time" - - "github.com/cosmos/cosmos-sdk/codec/legacy" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" - v034staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v034" -) - -const ( - ModuleName = "staking" -) - -type ( - Commission struct { - CommissionRates `json:"commission_rates" yaml:"commission_rates"` - UpdateTime time.Time `json:"update_time" yaml:"update_time"` - } - - CommissionRates struct { - Rate sdk.Dec `json:"rate" yaml:"rate"` - MaxRate sdk.Dec `json:"max_rate" yaml:"max_rate"` - MaxChangeRate sdk.Dec `json:"max_change_rate" yaml:"max_change_rate"` - } - - Validator struct { - OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` - ConsPubKey cryptotypes.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` - Jailed bool `json:"jailed" yaml:"jailed"` - Status v034staking.BondStatus `json:"status" yaml:"status"` - Tokens sdk.Int `json:"tokens" yaml:"tokens"` - DelegatorShares sdk.Dec `json:"delegator_shares" yaml:"delegator_shares"` - Description v034staking.Description `json:"description" yaml:"description"` - UnbondingHeight int64 `json:"unbonding_height" yaml:"unbonding_height"` - UnbondingCompletionTime time.Time `json:"unbonding_time" yaml:"unbonding_time"` - Commission Commission `json:"commission" yaml:"commission"` - MinSelfDelegation sdk.Int `json:"min_self_delegation" yaml:"min_self_delegation"` - } - - bechValidator struct { - OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` - ConsPubKey string `json:"consensus_pubkey" yaml:"consensus_pubkey"` - Jailed bool `json:"jailed" yaml:"jailed"` - Status v034staking.BondStatus `json:"status" yaml:"status"` - Tokens sdk.Int `json:"tokens" yaml:"tokens"` - DelegatorShares sdk.Dec `json:"delegator_shares" yaml:"delegator_shares"` - Description v034staking.Description `json:"description" yaml:"description"` - UnbondingHeight int64 `json:"unbonding_height" yaml:"unbonding_height"` - UnbondingCompletionTime time.Time `json:"unbonding_time" yaml:"unbonding_time"` - Commission Commission `json:"commission" yaml:"commission"` - MinSelfDelegation sdk.Int `json:"min_self_delegation" yaml:"min_self_delegation"` - } - - Validators []Validator - - GenesisState struct { - Params v034staking.Params `json:"params"` - LastTotalPower sdk.Int `json:"last_total_power"` - LastValidatorPowers []v034staking.LastValidatorPower `json:"last_validator_powers"` - Validators Validators `json:"validators"` - Delegations v034staking.Delegations `json:"delegations"` - UnbondingDelegations []v034staking.UnbondingDelegation `json:"unbonding_delegations"` - Redelegations []v034staking.Redelegation `json:"redelegations"` - Exported bool `json:"exported"` - } -) - -func NewGenesisState( - params v034staking.Params, lastTotalPower sdk.Int, lastValPowers []v034staking.LastValidatorPower, - validators Validators, delegations v034staking.Delegations, - ubds []v034staking.UnbondingDelegation, reds []v034staking.Redelegation, exported bool, -) GenesisState { - - return GenesisState{ - Params: params, - LastTotalPower: lastTotalPower, - LastValidatorPowers: lastValPowers, - Validators: validators, - Delegations: delegations, - UnbondingDelegations: ubds, - Redelegations: reds, - Exported: exported, - } -} - -func (v Validator) MarshalJSON() ([]byte, error) { - bechConsPubKey, err := legacybech32.MarshalPubKey(legacybech32.ConsPK, v.ConsPubKey) - if err != nil { - return nil, err - } - - return legacy.Cdc.MarshalJSON(bechValidator{ - OperatorAddress: v.OperatorAddress, - ConsPubKey: bechConsPubKey, - Jailed: v.Jailed, - Status: v.Status, - Tokens: v.Tokens, - DelegatorShares: v.DelegatorShares, - Description: v.Description, - UnbondingHeight: v.UnbondingHeight, - UnbondingCompletionTime: v.UnbondingCompletionTime, - MinSelfDelegation: v.MinSelfDelegation, - Commission: v.Commission, - }) -} - -func (v *Validator) UnmarshalJSON(data []byte) error { - bv := &bechValidator{} - if err := legacy.Cdc.UnmarshalJSON(data, bv); err != nil { - return err - } - consPubKey, err := legacybech32.UnmarshalPubKey(legacybech32.ConsPK, bv.ConsPubKey) - if err != nil { - return err - } - *v = Validator{ - OperatorAddress: bv.OperatorAddress, - ConsPubKey: consPubKey, - Jailed: bv.Jailed, - Tokens: bv.Tokens, - Status: bv.Status, - DelegatorShares: bv.DelegatorShares, - Description: bv.Description, - UnbondingHeight: bv.UnbondingHeight, - UnbondingCompletionTime: bv.UnbondingCompletionTime, - Commission: bv.Commission, - MinSelfDelegation: bv.MinSelfDelegation, - } - return nil -} diff --git a/x/staking/migrations/v038/types.go b/x/staking/migrations/v038/types.go deleted file mode 100644 index 027b3e693a8a..000000000000 --- a/x/staking/migrations/v038/types.go +++ /dev/null @@ -1,163 +0,0 @@ -// Package v038 is used for legacy migration scripts. Actual migration scripts -// for v038 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -// DONTCOVER -package v038 - -import ( - "time" - - "github.com/cosmos/cosmos-sdk/codec/legacy" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" - v034staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v034" - v036staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v036" -) - -const ( - ModuleName = "staking" -) - -type ( - Description struct { - Moniker string `json:"moniker" yaml:"moniker"` - Identity string `json:"identity" yaml:"identity"` - Website string `json:"website" yaml:"website"` - SecurityContact string `json:"security_contact" yaml:"security_contact"` - Details string `json:"details" yaml:"details"` - } - - Validator struct { - OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` - ConsPubKey cryptotypes.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` - Jailed bool `json:"jailed" yaml:"jailed"` - Status v034staking.BondStatus `json:"status" yaml:"status"` - Tokens sdk.Int `json:"tokens" yaml:"tokens"` - DelegatorShares sdk.Dec `json:"delegator_shares" yaml:"delegator_shares"` - Description Description `json:"description" yaml:"description"` - UnbondingHeight int64 `json:"unbonding_height" yaml:"unbonding_height"` - UnbondingCompletionTime time.Time `json:"unbonding_time" yaml:"unbonding_time"` - Commission v036staking.Commission `json:"commission" yaml:"commission"` - MinSelfDelegation sdk.Int `json:"min_self_delegation" yaml:"min_self_delegation"` - } - - bechValidator struct { - OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` - ConsPubKey string `json:"consensus_pubkey" yaml:"consensus_pubkey"` - Jailed bool `json:"jailed" yaml:"jailed"` - Status v034staking.BondStatus `json:"status" yaml:"status"` - Tokens sdk.Int `json:"tokens" yaml:"tokens"` - DelegatorShares sdk.Dec `json:"delegator_shares" yaml:"delegator_shares"` - Description Description `json:"description" yaml:"description"` - UnbondingHeight int64 `json:"unbonding_height" yaml:"unbonding_height"` - UnbondingCompletionTime time.Time `json:"unbonding_time" yaml:"unbonding_time"` - Commission v036staking.Commission `json:"commission" yaml:"commission"` - MinSelfDelegation sdk.Int `json:"min_self_delegation" yaml:"min_self_delegation"` - } - - Validators []Validator - - Params struct { - UnbondingTime time.Duration `json:"unbonding_time" yaml:"unbonding_time"` // time duration of unbonding - MaxValidators uint16 `json:"max_validators" yaml:"max_validators"` // maximum number of validators (max uint16 = 65535) - MaxEntries uint16 `json:"max_entries" yaml:"max_entries"` // max entries for either unbonding delegation or redelegation (per pair/trio) - HistoricalEntries uint16 `json:"historical_entries" yaml:"historical_entries"` // number of historical entries to persist - BondDenom string `json:"bond_denom" yaml:"bond_denom"` // bondable coin denomination - } - - GenesisState struct { - Params Params `json:"params"` - LastTotalPower sdk.Int `json:"last_total_power"` - LastValidatorPowers []v034staking.LastValidatorPower `json:"last_validator_powers"` - Validators Validators `json:"validators"` - Delegations v034staking.Delegations `json:"delegations"` - UnbondingDelegations []v034staking.UnbondingDelegation `json:"unbonding_delegations"` - Redelegations []v034staking.Redelegation `json:"redelegations"` - Exported bool `json:"exported"` - } -) - -// NewDescription creates a new Description object -func NewDescription(moniker, identity, website, securityContact, details string) Description { - return Description{ - Moniker: moniker, - Identity: identity, - Website: website, - SecurityContact: securityContact, - Details: details, - } -} - -// NewGenesisState creates a new GenesisState object -func NewGenesisState( - params v034staking.Params, lastTotalPower sdk.Int, lastValPowers []v034staking.LastValidatorPower, - validators Validators, delegations v034staking.Delegations, - ubds []v034staking.UnbondingDelegation, reds []v034staking.Redelegation, exported bool, -) GenesisState { - - return GenesisState{ - Params: Params{ - UnbondingTime: params.UnbondingTime, - MaxValidators: params.MaxValidators, - MaxEntries: params.MaxEntries, - BondDenom: params.BondDenom, - HistoricalEntries: 0, - }, - LastTotalPower: lastTotalPower, - LastValidatorPowers: lastValPowers, - Validators: validators, - Delegations: delegations, - UnbondingDelegations: ubds, - Redelegations: reds, - Exported: exported, - } -} - -// MarshalJSON marshals the validator to JSON using Bech32 -func (v Validator) MarshalJSON() ([]byte, error) { - bechConsPubKey, err := legacybech32.MarshalPubKey(legacybech32.ConsPK, v.ConsPubKey) - if err != nil { - return nil, err - } - - return legacy.Cdc.MarshalJSON(bechValidator{ - OperatorAddress: v.OperatorAddress, - ConsPubKey: bechConsPubKey, - Jailed: v.Jailed, - Status: v.Status, - Tokens: v.Tokens, - DelegatorShares: v.DelegatorShares, - Description: v.Description, - UnbondingHeight: v.UnbondingHeight, - UnbondingCompletionTime: v.UnbondingCompletionTime, - MinSelfDelegation: v.MinSelfDelegation, - Commission: v.Commission, - }) -} - -// UnmarshalJSON unmarshals the validator from JSON using Bech32 -func (v *Validator) UnmarshalJSON(data []byte) error { - bv := &bechValidator{} - if err := legacy.Cdc.UnmarshalJSON(data, bv); err != nil { - return err - } - consPubKey, err := legacybech32.UnmarshalPubKey(legacybech32.ConsPK, bv.ConsPubKey) - if err != nil { - return err - } - *v = Validator{ - OperatorAddress: bv.OperatorAddress, - ConsPubKey: consPubKey, - Jailed: bv.Jailed, - Tokens: bv.Tokens, - Status: bv.Status, - DelegatorShares: bv.DelegatorShares, - Description: bv.Description, - UnbondingHeight: bv.UnbondingHeight, - UnbondingCompletionTime: bv.UnbondingCompletionTime, - Commission: bv.Commission, - MinSelfDelegation: bv.MinSelfDelegation, - } - return nil -} diff --git a/x/staking/migrations/v040/genesis.pb.go b/x/staking/migrations/v040/genesis.pb.go deleted file mode 100644 index af9e607d28ac..000000000000 --- a/x/staking/migrations/v040/genesis.pb.go +++ /dev/null @@ -1,944 +0,0 @@ -// Package v040 is taken from: -// https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/genesis.pb.go -// by copy-pasted only the relevants parts for Genesis. -// nolint -package v040 - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the staking module's genesis state. -type GenesisState struct { - // params defines all the paramaters of related to deposit. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_total_power" yaml:"last_total_power"` - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - LastValidatorPowers []LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers" yaml:"last_validator_powers"` - // delegations defines the validator set at genesis. - Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` - // delegations defines the delegations active at genesis. - Delegations []Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"` - // unbonding_delegations defines the unbonding delegations active at genesis. - UnbondingDelegations []UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations" yaml:"unbonding_delegations"` - // redelegations defines the redelegations active at genesis. - Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` - Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_9b3dec8894f2831b, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetLastValidatorPowers() []LastValidatorPower { - if m != nil { - return m.LastValidatorPowers - } - return nil -} - -func (m *GenesisState) GetValidators() []Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *GenesisState) GetDelegations() []Delegation { - if m != nil { - return m.Delegations - } - return nil -} - -func (m *GenesisState) GetUnbondingDelegations() []UnbondingDelegation { - if m != nil { - return m.UnbondingDelegations - } - return nil -} - -func (m *GenesisState) GetRedelegations() []Redelegation { - if m != nil { - return m.Redelegations - } - return nil -} - -func (m *GenesisState) GetExported() bool { - if m != nil { - return m.Exported - } - return false -} - -// LastValidatorPower required for validator set update logic. -type LastValidatorPower struct { - // address is the address of the validator. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // power defines the power of the validator. - Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` -} - -func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } -func (m *LastValidatorPower) String() string { return proto.CompactTextString(m) } -func (*LastValidatorPower) ProtoMessage() {} -func (*LastValidatorPower) Descriptor() ([]byte, []int) { - return fileDescriptor_9b3dec8894f2831b, []int{1} -} -func (m *LastValidatorPower) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LastValidatorPower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LastValidatorPower.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 *LastValidatorPower) XXX_Merge(src proto.Message) { - xxx_messageInfo_LastValidatorPower.Merge(m, src) -} -func (m *LastValidatorPower) XXX_Size() int { - return m.Size() -} -func (m *LastValidatorPower) XXX_DiscardUnknown() { - xxx_messageInfo_LastValidatorPower.DiscardUnknown(m) -} - -var xxx_messageInfo_LastValidatorPower proto.InternalMessageInfo - -func init() { - // proto.RegisterType((*GenesisState)(nil), "cosmos.staking.v1beta1.GenesisState") - // proto.RegisterType((*LastValidatorPower)(nil), "cosmos.staking.v1beta1.LastValidatorPower") -} - -func init() { - // proto.RegisterFile("cosmos/staking/v1beta1/genesis.proto", fileDescriptor_9b3dec8894f2831b) -} - -var fileDescriptor_9b3dec8894f2831b = []byte{ - // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0x7d, 0xa4, 0x49, 0xc3, 0xa5, 0x20, 0x74, 0xa4, 0x60, 0x45, 0xc8, 0x0e, 0x56, 0x84, - 0x22, 0x5e, 0x6c, 0xb5, 0x6c, 0x15, 0x53, 0x84, 0xa8, 0x8a, 0x10, 0x8a, 0x8e, 0x97, 0x81, 0x25, - 0xba, 0xd4, 0x27, 0x63, 0xd5, 0xf1, 0x59, 0x7e, 0x2e, 0xa5, 0xdd, 0x11, 0x62, 0xe4, 0x23, 0xf4, - 0xe3, 0x74, 0xec, 0xc0, 0x80, 0x18, 0x2c, 0x94, 0x2c, 0xcc, 0xfd, 0x04, 0xc8, 0xe7, 0x17, 0x4c, - 0x52, 0x33, 0x25, 0x77, 0xfa, 0xfd, 0x7f, 0x7f, 0xfb, 0xfc, 0x1c, 0x1e, 0x1c, 0x0a, 0x98, 0x09, - 0x70, 0x40, 0xb2, 0x23, 0x3f, 0xf4, 0x9c, 0xe3, 0x9d, 0x29, 0x97, 0x6c, 0xc7, 0xf1, 0x78, 0xc8, - 0xc1, 0x07, 0x3b, 0x8a, 0x85, 0x14, 0xe4, 0x4e, 0x46, 0xd9, 0x39, 0x65, 0xe7, 0x54, 0xaf, 0xeb, - 0x09, 0x4f, 0x28, 0xc4, 0x49, 0xff, 0x65, 0x74, 0xaf, 0xce, 0x59, 0xa4, 0x15, 0x65, 0x7d, 0x6f, - 0xe2, 0xad, 0xfd, 0xac, 0xe5, 0x8d, 0x64, 0x92, 0x93, 0x67, 0xb8, 0x15, 0xb1, 0x98, 0xcd, 0x40, - 0x47, 0x7d, 0x34, 0xec, 0xec, 0x1a, 0xf6, 0xd5, 0xad, 0xf6, 0x58, 0x51, 0xa3, 0x8d, 0xf3, 0xc4, - 0xd4, 0x68, 0x9e, 0x21, 0x80, 0x6f, 0x05, 0x0c, 0xe4, 0x44, 0x0a, 0xc9, 0x82, 0x49, 0x24, 0x3e, - 0xf1, 0x58, 0xbf, 0xd6, 0x47, 0xc3, 0xad, 0xd1, 0x41, 0xca, 0xfd, 0x4c, 0xcc, 0x07, 0x9e, 0x2f, - 0x3f, 0xce, 0xa7, 0xf6, 0xa1, 0x98, 0x39, 0xf9, 0x13, 0x66, 0x3f, 0x4f, 0xc0, 0x3d, 0x72, 0xe4, - 0x69, 0xc4, 0xc1, 0x3e, 0x08, 0xe5, 0x65, 0x62, 0xde, 0x3d, 0x65, 0xb3, 0x60, 0xcf, 0x5a, 0xf5, - 0x59, 0xf4, 0x66, 0xba, 0xf5, 0x36, 0xdd, 0x19, 0xa7, 0x1b, 0xe4, 0x33, 0xc2, 0xdb, 0x8a, 0x3a, - 0x66, 0x81, 0xef, 0x32, 0x29, 0xe2, 0x8c, 0x04, 0xbd, 0xd1, 0x6f, 0x0c, 0x3b, 0xbb, 0x0f, 0xeb, - 0x5e, 0xe1, 0x15, 0x03, 0xf9, 0xbe, 0xc8, 0x28, 0xd7, 0x68, 0x90, 0x3e, 0xe6, 0x65, 0x62, 0xde, - 0xab, 0x94, 0xaf, 0x6a, 0x2d, 0x7a, 0x3b, 0x58, 0x4b, 0x02, 0xd9, 0xc7, 0xb8, 0x24, 0x41, 0xdf, - 0x50, 0xd5, 0xf7, 0xeb, 0xaa, 0xcb, 0x70, 0x7e, 0x80, 0x95, 0x28, 0x79, 0x89, 0x3b, 0x2e, 0x0f, - 0xb8, 0xc7, 0xa4, 0x2f, 0x42, 0xd0, 0x9b, 0xca, 0x64, 0xd5, 0x99, 0x9e, 0x97, 0x68, 0xae, 0xaa, - 0x86, 0xc9, 0x17, 0x84, 0xb7, 0xe7, 0xe1, 0x54, 0x84, 0xae, 0x1f, 0x7a, 0x93, 0xaa, 0xb6, 0xa5, - 0xb4, 0x8f, 0xea, 0xb4, 0xef, 0x8a, 0x50, 0xc5, 0xbf, 0x72, 0x38, 0x57, 0x7a, 0x2d, 0xda, 0x9d, - 0xaf, 0x47, 0x81, 0x8c, 0xf1, 0x8d, 0x98, 0x57, 0xfb, 0x37, 0x55, 0xff, 0xa0, 0xae, 0x9f, 0x56, - 0xe0, 0xfc, 0xc5, 0xfe, 0x15, 0x90, 0x1e, 0x6e, 0xf3, 0x93, 0x48, 0xc4, 0x92, 0xbb, 0x7a, 0xbb, - 0x8f, 0x86, 0x6d, 0x5a, 0xae, 0xad, 0xd7, 0x98, 0xac, 0x7f, 0x5c, 0xa2, 0xe3, 0x4d, 0xe6, 0xba, - 0x31, 0x87, 0x6c, 0xb8, 0xaf, 0xd3, 0x62, 0x49, 0xba, 0xb8, 0xf9, 0x77, 0x58, 0x1b, 0x34, 0x5b, - 0xec, 0xb5, 0xbf, 0x9e, 0x99, 0xda, 0xef, 0x33, 0x53, 0x1b, 0xbd, 0x38, 0x5f, 0x18, 0xe8, 0x62, - 0x61, 0xa0, 0x5f, 0x0b, 0x03, 0x7d, 0x5b, 0x1a, 0xda, 0xc5, 0xd2, 0xd0, 0x7e, 0x2c, 0x0d, 0xed, - 0xc3, 0xe3, 0xff, 0xce, 0xf3, 0x49, 0x79, 0xfd, 0xd4, 0x64, 0x4f, 0x5b, 0xea, 0xd6, 0x3d, 0xfd, - 0x13, 0x00, 0x00, 0xff, 0xff, 0xff, 0x85, 0xad, 0xc8, 0xf1, 0x03, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Exported { - i-- - if m.Exported { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.Redelegations) > 0 { - for iNdEx := len(m.Redelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Redelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.UnbondingDelegations) > 0 { - for iNdEx := len(m.UnbondingDelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbondingDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Delegations) > 0 { - for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.LastValidatorPowers) > 0 { - for iNdEx := len(m.LastValidatorPowers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LastValidatorPowers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - { - size := m.LastTotalPower.Size() - i -= size - if _, err := m.LastTotalPower.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LastValidatorPower) 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 *LastValidatorPower) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Power != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Power)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.LastTotalPower.Size() - n += 1 + l + sovGenesis(uint64(l)) - if len(m.LastValidatorPowers) > 0 { - for _, e := range m.LastValidatorPowers { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Delegations) > 0 { - for _, e := range m.Delegations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.UnbondingDelegations) > 0 { - for _, e := range m.UnbondingDelegations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Redelegations) > 0 { - for _, e := range m.Redelegations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.Exported { - n += 2 - } - return n -} - -func (m *LastValidatorPower) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Power != 0 { - n += 1 + sovGenesis(uint64(m.Power)) - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTotalPower", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTotalPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastValidatorPowers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastValidatorPowers = append(m.LastValidatorPowers, LastValidatorPower{}) - if err := m.LastValidatorPowers[len(m.LastValidatorPowers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Delegations = append(m.Delegations, Delegation{}) - if err := m.Delegations[len(m.Delegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnbondingDelegations = append(m.UnbondingDelegations, UnbondingDelegation{}) - if err := m.UnbondingDelegations[len(m.UnbondingDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Redelegations = append(m.Redelegations, Redelegation{}) - if err := m.Redelegations[len(m.Redelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exported", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exported = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LastValidatorPower: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LastValidatorPower: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - m.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/staking/migrations/v040/migrate.go b/x/staking/migrations/v040/migrate.go deleted file mode 100644 index 6616e71a6123..000000000000 --- a/x/staking/migrations/v040/migrate.go +++ /dev/null @@ -1,140 +0,0 @@ -package v040 - -import ( - "fmt" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - v034staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v034" - v038staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v038" -) - -func migrateBondStatus(oldStatus v034staking.BondStatus) BondStatus { - switch oldStatus { - case v034staking.Unbonded: - return Unbonded - - case v034staking.Unbonding: - return Unbonding - - case v034staking.Bonded: - return Bonded - - default: - panic(fmt.Errorf("invalid bond status %d", oldStatus)) - } -} - -// Migrate accepts exported v0.38 x/staking genesis state and migrates it to -// v0.40 x/staking genesis state. The migration includes: -// -// - Convert addresses from bytes to bech32 strings. -// - Update BondStatus staking constants. -// - Re-encode in v0.40 GenesisState. -func Migrate(stakingState v038staking.GenesisState) *GenesisState { - newLastValidatorPowers := make([]LastValidatorPower, len(stakingState.LastValidatorPowers)) - for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { - newLastValidatorPowers[i] = LastValidatorPower{ - Address: oldLastValidatorPower.Address.String(), - Power: oldLastValidatorPower.Power, - } - } - - newValidators := make([]Validator, len(stakingState.Validators)) - for i, oldValidator := range stakingState.Validators { - pkAny, err := codectypes.NewAnyWithValue(oldValidator.ConsPubKey) - if err != nil { - panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) - } - newValidators[i] = Validator{ - OperatorAddress: oldValidator.OperatorAddress.String(), - ConsensusPubkey: pkAny, - Jailed: oldValidator.Jailed, - Status: migrateBondStatus(oldValidator.Status), - Tokens: oldValidator.Tokens, - DelegatorShares: oldValidator.DelegatorShares, - Description: Description{ - Moniker: oldValidator.Description.Moniker, - Identity: oldValidator.Description.Identity, - Website: oldValidator.Description.Website, - SecurityContact: oldValidator.Description.SecurityContact, - Details: oldValidator.Description.Details, - }, - UnbondingHeight: oldValidator.UnbondingHeight, - UnbondingTime: oldValidator.UnbondingCompletionTime, - Commission: Commission{ - CommissionRates: CommissionRates{ - Rate: oldValidator.Commission.Rate, - MaxRate: oldValidator.Commission.MaxRate, - MaxChangeRate: oldValidator.Commission.MaxChangeRate, - }, - UpdateTime: oldValidator.Commission.UpdateTime, - }, - MinSelfDelegation: oldValidator.MinSelfDelegation, - } - } - - newDelegations := make([]Delegation, len(stakingState.Delegations)) - for i, oldDelegation := range stakingState.Delegations { - newDelegations[i] = Delegation{ - DelegatorAddress: oldDelegation.DelegatorAddress.String(), - ValidatorAddress: oldDelegation.ValidatorAddress.String(), - Shares: oldDelegation.Shares, - } - } - - newUnbondingDelegations := make([]UnbondingDelegation, len(stakingState.UnbondingDelegations)) - for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { - newEntries := make([]UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) - for j, oldEntry := range oldUnbondingDelegation.Entries { - newEntries[j] = UnbondingDelegationEntry{ - CreationHeight: oldEntry.CreationHeight, - CompletionTime: oldEntry.CompletionTime, - InitialBalance: oldEntry.InitialBalance, - Balance: oldEntry.Balance, - } - } - - newUnbondingDelegations[i] = UnbondingDelegation{ - DelegatorAddress: oldUnbondingDelegation.DelegatorAddress.String(), - ValidatorAddress: oldUnbondingDelegation.ValidatorAddress.String(), - Entries: newEntries, - } - } - - newRedelegations := make([]Redelegation, len(stakingState.Redelegations)) - for i, oldRedelegation := range stakingState.Redelegations { - newEntries := make([]RedelegationEntry, len(oldRedelegation.Entries)) - for j, oldEntry := range oldRedelegation.Entries { - newEntries[j] = RedelegationEntry{ - CreationHeight: oldEntry.CreationHeight, - CompletionTime: oldEntry.CompletionTime, - InitialBalance: oldEntry.InitialBalance, - SharesDst: oldEntry.SharesDst, - } - } - - newRedelegations[i] = Redelegation{ - DelegatorAddress: oldRedelegation.DelegatorAddress.String(), - ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress.String(), - ValidatorDstAddress: oldRedelegation.ValidatorDstAddress.String(), - Entries: newEntries, - } - } - - return &GenesisState{ - Params: Params{ - UnbondingTime: stakingState.Params.UnbondingTime, - MaxValidators: uint32(stakingState.Params.MaxValidators), - MaxEntries: uint32(stakingState.Params.MaxEntries), - HistoricalEntries: uint32(stakingState.Params.HistoricalEntries), - BondDenom: stakingState.Params.BondDenom, - }, - LastTotalPower: stakingState.LastTotalPower, - LastValidatorPowers: newLastValidatorPowers, - Validators: newValidators, - Delegations: newDelegations, - UnbondingDelegations: newUnbondingDelegations, - Redelegations: newRedelegations, - Exported: stakingState.Exported, - } -} diff --git a/x/staking/migrations/v040/migrate_test.go b/x/staking/migrations/v040/migrate_test.go deleted file mode 100644 index 6835c97579b4..000000000000 --- a/x/staking/migrations/v040/migrate_test.go +++ /dev/null @@ -1,96 +0,0 @@ -package v040_test - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/simapp" - v034staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v034" - v038staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v038" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v040" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithCodec(encodingConfig.Codec) - - consPubKey := ed25519.GenPrivKeyFromSecret([]byte("val0")).PubKey() - stakingGenState := v038staking.GenesisState{ - Validators: v038staking.Validators{v038staking.Validator{ - ConsPubKey: consPubKey, - Status: v034staking.Unbonded, - }}, - } - - migrated := v040staking.Migrate(stakingGenState) - - bz, err := clientCtx.Codec.MarshalJSON(migrated) - require.NoError(t, err) - - // Indent the JSON bz correctly. - var jsonObj map[string]interface{} - err = json.Unmarshal(bz, &jsonObj) - require.NoError(t, err) - indentedBz, err := json.MarshalIndent(jsonObj, "", " ") - require.NoError(t, err) - - // Make sure about: - // - consensus_pubkey: should be an any - // - validator's status should be 1 (new unbonded) - expected := `{ - "delegations": [], - "exported": false, - "last_total_power": "0", - "last_validator_powers": [], - "params": { - "bond_denom": "", - "historical_entries": 0, - "max_entries": 0, - "max_validators": 0, - "unbonding_time": "0s" - }, - "redelegations": [], - "unbonding_delegations": [], - "validators": [ - { - "commission": { - "commission_rates": { - "max_change_rate": "0", - "max_rate": "0", - "rate": "0" - }, - "update_time": "0001-01-01T00:00:00Z" - }, - "consensus_pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "KTeVrjP7NJIufvgMJsQRxZjfFyD+Exda6O7x+oxIvmA=" - }, - "delegator_shares": "0", - "description": { - "details": "", - "identity": "", - "moniker": "", - "security_contact": "", - "website": "" - }, - "jailed": false, - "min_self_delegation": "0", - "operator_address": "", - "status": "BOND_STATUS_UNBONDED", - "tokens": "0", - "unbonding_height": "0", - "unbonding_time": "0001-01-01T00:00:00Z" - } - ] -}` - - require.Equal(t, expected, string(indentedBz)) -} diff --git a/x/staking/migrations/v040/staking.pb.go b/x/staking/migrations/v040/staking.pb.go deleted file mode 100644 index 3200520a71a4..000000000000 --- a/x/staking/migrations/v040/staking.pb.go +++ /dev/null @@ -1,6525 +0,0 @@ -// Package v040 is taken from: -// https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/staking.pb.go -// nolint -package v040 - -import ( - bytes "bytes" - compress_gzip "compress/gzip" - fmt "fmt" - io "io" - io_ioutil "io/ioutil" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" - time "time" - - types1 "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types2 "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/timestamp" - _ "github.com/regen-network/cosmos-proto" - types "github.com/tendermint/tendermint/proto/tendermint/types" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// BondStatus is the status of a validator. -type BondStatus int32 - -const ( - // UNSPECIFIED defines an invalid validator status. - Unspecified BondStatus = 0 - // UNBONDED defines a validator that is not bonded. - Unbonded BondStatus = 1 - // UNBONDING defines a validator that is unbonding. - Unbonding BondStatus = 2 - // BONDED defines a validator that is bonded. - Bonded BondStatus = 3 -) - -var BondStatus_name = map[int32]string{ - 0: "BOND_STATUS_UNSPECIFIED", - 1: "BOND_STATUS_UNBONDED", - 2: "BOND_STATUS_UNBONDING", - 3: "BOND_STATUS_BONDED", -} - -var BondStatus_value = map[string]int32{ - "BOND_STATUS_UNSPECIFIED": 0, - "BOND_STATUS_UNBONDED": 1, - "BOND_STATUS_UNBONDING": 2, - "BOND_STATUS_BONDED": 3, -} - -func (x BondStatus) String() string { - return proto.EnumName(BondStatus_name, int32(x)) -} - -func (BondStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{0} -} - -// HistoricalInfo contains header and validator information for a given block. -// It is stored as part of staking module's state, which persists the `n` most -// recent HistoricalInfo -// (`n` is set by the staking module's `historical_entries` parameter). -type HistoricalInfo struct { - Header types.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` - Valset []Validator `protobuf:"bytes,2,rep,name=valset,proto3" json:"valset"` -} - -func (m *HistoricalInfo) Reset() { *m = HistoricalInfo{} } -func (m *HistoricalInfo) String() string { return proto.CompactTextString(m) } -func (*HistoricalInfo) ProtoMessage() {} -func (*HistoricalInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{0} -} -func (m *HistoricalInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HistoricalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HistoricalInfo.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 *HistoricalInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistoricalInfo.Merge(m, src) -} -func (m *HistoricalInfo) XXX_Size() int { - return m.Size() -} -func (m *HistoricalInfo) XXX_DiscardUnknown() { - xxx_messageInfo_HistoricalInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_HistoricalInfo proto.InternalMessageInfo - -func (m *HistoricalInfo) GetHeader() types.Header { - if m != nil { - return m.Header - } - return types.Header{} -} - -func (m *HistoricalInfo) GetValset() []Validator { - if m != nil { - return m.Valset - } - return nil -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -type CommissionRates struct { - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` - MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` - MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` -} - -func (m *CommissionRates) Reset() { *m = CommissionRates{} } -func (*CommissionRates) ProtoMessage() {} -func (*CommissionRates) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{1} -} -func (m *CommissionRates) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommissionRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommissionRates.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 *CommissionRates) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommissionRates.Merge(m, src) -} -func (m *CommissionRates) XXX_Size() int { - return m.Size() -} -func (m *CommissionRates) XXX_DiscardUnknown() { - xxx_messageInfo_CommissionRates.DiscardUnknown(m) -} - -var xxx_messageInfo_CommissionRates proto.InternalMessageInfo - -// Commission defines commission parameters for a given validator. -type Commission struct { - CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` - UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` -} - -func (m *Commission) Reset() { *m = Commission{} } -func (*Commission) ProtoMessage() {} -func (*Commission) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{2} -} -func (m *Commission) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Commission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Commission.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 *Commission) XXX_Merge(src proto.Message) { - xxx_messageInfo_Commission.Merge(m, src) -} -func (m *Commission) XXX_Size() int { - return m.Size() -} -func (m *Commission) XXX_DiscardUnknown() { - xxx_messageInfo_Commission.DiscardUnknown(m) -} - -var xxx_messageInfo_Commission proto.InternalMessageInfo - -func (m *Commission) GetUpdateTime() time.Time { - if m != nil { - return m.UpdateTime - } - return time.Time{} -} - -// Description defines a validator description. -type Description struct { - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` - Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` - SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` - Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` -} - -func (m *Description) Reset() { *m = Description{} } -func (*Description) ProtoMessage() {} -func (*Description) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{3} -} -func (m *Description) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Description.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 *Description) XXX_Merge(src proto.Message) { - xxx_messageInfo_Description.Merge(m, src) -} -func (m *Description) XXX_Size() int { - return m.Size() -} -func (m *Description) XXX_DiscardUnknown() { - xxx_messageInfo_Description.DiscardUnknown(m) -} - -var xxx_messageInfo_Description proto.InternalMessageInfo - -func (m *Description) GetMoniker() string { - if m != nil { - return m.Moniker - } - return "" -} - -func (m *Description) GetIdentity() string { - if m != nil { - return m.Identity - } - return "" -} - -func (m *Description) GetWebsite() string { - if m != nil { - return m.Website - } - return "" -} - -func (m *Description) GetSecurityContact() string { - if m != nil { - return m.SecurityContact - } - return "" -} - -func (m *Description) GetDetails() string { - if m != nil { - return m.Details - } - return "" -} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -type Validator struct { - OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` - ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` - Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` - Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` - DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` - Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` - UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` - UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` - Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{4} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.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 *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -// ValAddresses defines a repeated set of validator addresses. -type ValAddresses struct { - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` -} - -func (m *ValAddresses) Reset() { *m = ValAddresses{} } -func (*ValAddresses) ProtoMessage() {} -func (*ValAddresses) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{5} -} -func (m *ValAddresses) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValAddresses.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 *ValAddresses) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValAddresses.Merge(m, src) -} -func (m *ValAddresses) XXX_Size() int { - return m.Size() -} -func (m *ValAddresses) XXX_DiscardUnknown() { - xxx_messageInfo_ValAddresses.DiscardUnknown(m) -} - -var xxx_messageInfo_ValAddresses proto.InternalMessageInfo - -func (m *ValAddresses) GetAddresses() []string { - if m != nil { - return m.Addresses - } - return nil -} - -// DVPair is struct that just has a delegator-validator pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a DVPair can -// be used to construct the key to getting an UnbondingDelegation from state. -type DVPair struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` -} - -func (m *DVPair) Reset() { *m = DVPair{} } -func (*DVPair) ProtoMessage() {} -func (*DVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{6} -} -func (m *DVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DVPair.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 *DVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_DVPair.Merge(m, src) -} -func (m *DVPair) XXX_Size() int { - return m.Size() -} -func (m *DVPair) XXX_DiscardUnknown() { - xxx_messageInfo_DVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_DVPair proto.InternalMessageInfo - -// DVPairs defines an array of DVPair objects. -type DVPairs struct { - Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` -} - -func (m *DVPairs) Reset() { *m = DVPairs{} } -func (m *DVPairs) String() string { return proto.CompactTextString(m) } -func (*DVPairs) ProtoMessage() {} -func (*DVPairs) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{7} -} -func (m *DVPairs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DVPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DVPairs.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 *DVPairs) XXX_Merge(src proto.Message) { - xxx_messageInfo_DVPairs.Merge(m, src) -} -func (m *DVPairs) XXX_Size() int { - return m.Size() -} -func (m *DVPairs) XXX_DiscardUnknown() { - xxx_messageInfo_DVPairs.DiscardUnknown(m) -} - -var xxx_messageInfo_DVPairs proto.InternalMessageInfo - -func (m *DVPairs) GetPairs() []DVPair { - if m != nil { - return m.Pairs - } - return nil -} - -// DVVTriplet is struct that just has a delegator-validator-validator triplet -// with no other data. It is intended to be used as a marshalable pointer. For -// example, a DVVTriplet can be used to construct the key to getting a -// Redelegation from state. -type DVVTriplet struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` -} - -func (m *DVVTriplet) Reset() { *m = DVVTriplet{} } -func (*DVVTriplet) ProtoMessage() {} -func (*DVVTriplet) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{8} -} -func (m *DVVTriplet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DVVTriplet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DVVTriplet.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 *DVVTriplet) XXX_Merge(src proto.Message) { - xxx_messageInfo_DVVTriplet.Merge(m, src) -} -func (m *DVVTriplet) XXX_Size() int { - return m.Size() -} -func (m *DVVTriplet) XXX_DiscardUnknown() { - xxx_messageInfo_DVVTriplet.DiscardUnknown(m) -} - -var xxx_messageInfo_DVVTriplet proto.InternalMessageInfo - -// DVVTriplets defines an array of DVVTriplet objects. -type DVVTriplets struct { - Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"` -} - -func (m *DVVTriplets) Reset() { *m = DVVTriplets{} } -func (m *DVVTriplets) String() string { return proto.CompactTextString(m) } -func (*DVVTriplets) ProtoMessage() {} -func (*DVVTriplets) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{9} -} -func (m *DVVTriplets) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DVVTriplets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DVVTriplets.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 *DVVTriplets) XXX_Merge(src proto.Message) { - xxx_messageInfo_DVVTriplets.Merge(m, src) -} -func (m *DVVTriplets) XXX_Size() int { - return m.Size() -} -func (m *DVVTriplets) XXX_DiscardUnknown() { - xxx_messageInfo_DVVTriplets.DiscardUnknown(m) -} - -var xxx_messageInfo_DVVTriplets proto.InternalMessageInfo - -func (m *DVVTriplets) GetTriplets() []DVVTriplet { - if m != nil { - return m.Triplets - } - return nil -} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -type Delegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` -} - -func (m *Delegation) Reset() { *m = Delegation{} } -func (*Delegation) ProtoMessage() {} -func (*Delegation) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{10} -} -func (m *Delegation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Delegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Delegation.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 *Delegation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Delegation.Merge(m, src) -} -func (m *Delegation) XXX_Size() int { - return m.Size() -} -func (m *Delegation) XXX_DiscardUnknown() { - xxx_messageInfo_Delegation.DiscardUnknown(m) -} - -var xxx_messageInfo_Delegation proto.InternalMessageInfo - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -type UnbondingDelegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` -} - -func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } -func (*UnbondingDelegation) ProtoMessage() {} -func (*UnbondingDelegation) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{11} -} -func (m *UnbondingDelegation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnbondingDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbondingDelegation.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 *UnbondingDelegation) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbondingDelegation.Merge(m, src) -} -func (m *UnbondingDelegation) XXX_Size() int { - return m.Size() -} -func (m *UnbondingDelegation) XXX_DiscardUnknown() { - xxx_messageInfo_UnbondingDelegation.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbondingDelegation proto.InternalMessageInfo - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -type UnbondingDelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` - InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` -} - -func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } -func (*UnbondingDelegationEntry) ProtoMessage() {} -func (*UnbondingDelegationEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{12} -} -func (m *UnbondingDelegationEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnbondingDelegationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbondingDelegationEntry.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 *UnbondingDelegationEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbondingDelegationEntry.Merge(m, src) -} -func (m *UnbondingDelegationEntry) XXX_Size() int { - return m.Size() -} -func (m *UnbondingDelegationEntry) XXX_DiscardUnknown() { - xxx_messageInfo_UnbondingDelegationEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbondingDelegationEntry proto.InternalMessageInfo - -func (m *UnbondingDelegationEntry) GetCreationHeight() int64 { - if m != nil { - return m.CreationHeight - } - return 0 -} - -func (m *UnbondingDelegationEntry) GetCompletionTime() time.Time { - if m != nil { - return m.CompletionTime - } - return time.Time{} -} - -// RedelegationEntry defines a redelegation object with relevant metadata. -type RedelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` - InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` -} - -func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } -func (*RedelegationEntry) ProtoMessage() {} -func (*RedelegationEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{13} -} -func (m *RedelegationEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedelegationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedelegationEntry.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 *RedelegationEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedelegationEntry.Merge(m, src) -} -func (m *RedelegationEntry) XXX_Size() int { - return m.Size() -} -func (m *RedelegationEntry) XXX_DiscardUnknown() { - xxx_messageInfo_RedelegationEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_RedelegationEntry proto.InternalMessageInfo - -func (m *RedelegationEntry) GetCreationHeight() int64 { - if m != nil { - return m.CreationHeight - } - return 0 -} - -func (m *RedelegationEntry) GetCompletionTime() time.Time { - if m != nil { - return m.CompletionTime - } - return time.Time{} -} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -type Redelegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` - Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` -} - -func (m *Redelegation) Reset() { *m = Redelegation{} } -func (*Redelegation) ProtoMessage() {} -func (*Redelegation) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{14} -} -func (m *Redelegation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Redelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Redelegation.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 *Redelegation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Redelegation.Merge(m, src) -} -func (m *Redelegation) XXX_Size() int { - return m.Size() -} -func (m *Redelegation) XXX_DiscardUnknown() { - xxx_messageInfo_Redelegation.DiscardUnknown(m) -} - -var xxx_messageInfo_Redelegation proto.InternalMessageInfo - -// Params defines the parameters for the staking module. -type Params struct { - UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` - MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` - MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` - HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` - BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{15} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetUnbondingTime() time.Duration { - if m != nil { - return m.UnbondingTime - } - return 0 -} - -func (m *Params) GetMaxValidators() uint32 { - if m != nil { - return m.MaxValidators - } - return 0 -} - -func (m *Params) GetMaxEntries() uint32 { - if m != nil { - return m.MaxEntries - } - return 0 -} - -func (m *Params) GetHistoricalEntries() uint32 { - if m != nil { - return m.HistoricalEntries - } - return 0 -} - -func (m *Params) GetBondDenom() string { - if m != nil { - return m.BondDenom - } - return "" -} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -type DelegationResponse struct { - Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` - Balance types2.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` -} - -func (m *DelegationResponse) Reset() { *m = DelegationResponse{} } -func (*DelegationResponse) ProtoMessage() {} -func (*DelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{16} -} -func (m *DelegationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegationResponse.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 *DelegationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegationResponse.Merge(m, src) -} -func (m *DelegationResponse) XXX_Size() int { - return m.Size() -} -func (m *DelegationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DelegationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegationResponse proto.InternalMessageInfo - -func (m *DelegationResponse) GetDelegation() Delegation { - if m != nil { - return m.Delegation - } - return Delegation{} -} - -func (m *DelegationResponse) GetBalance() types2.Coin { - if m != nil { - return m.Balance - } - return types2.Coin{} -} - -// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -// contains a balance in addition to shares which is more suitable for client -// responses. -type RedelegationEntryResponse struct { - RedelegationEntry RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry"` - Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` -} - -func (m *RedelegationEntryResponse) Reset() { *m = RedelegationEntryResponse{} } -func (m *RedelegationEntryResponse) String() string { return proto.CompactTextString(m) } -func (*RedelegationEntryResponse) ProtoMessage() {} -func (*RedelegationEntryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{17} -} -func (m *RedelegationEntryResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedelegationEntryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedelegationEntryResponse.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 *RedelegationEntryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedelegationEntryResponse.Merge(m, src) -} -func (m *RedelegationEntryResponse) XXX_Size() int { - return m.Size() -} -func (m *RedelegationEntryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RedelegationEntryResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RedelegationEntryResponse proto.InternalMessageInfo - -func (m *RedelegationEntryResponse) GetRedelegationEntry() RedelegationEntry { - if m != nil { - return m.RedelegationEntry - } - return RedelegationEntry{} -} - -// RedelegationResponse is equivalent to a Redelegation except that its entries -// contain a balance in addition to shares which is more suitable for client -// responses. -type RedelegationResponse struct { - Redelegation Redelegation `protobuf:"bytes,1,opt,name=redelegation,proto3" json:"redelegation"` - Entries []RedelegationEntryResponse `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"` -} - -func (m *RedelegationResponse) Reset() { *m = RedelegationResponse{} } -func (m *RedelegationResponse) String() string { return proto.CompactTextString(m) } -func (*RedelegationResponse) ProtoMessage() {} -func (*RedelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{18} -} -func (m *RedelegationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedelegationResponse.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 *RedelegationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedelegationResponse.Merge(m, src) -} -func (m *RedelegationResponse) XXX_Size() int { - return m.Size() -} -func (m *RedelegationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RedelegationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RedelegationResponse proto.InternalMessageInfo - -func (m *RedelegationResponse) GetRedelegation() Redelegation { - if m != nil { - return m.Redelegation - } - return Redelegation{} -} - -func (m *RedelegationResponse) GetEntries() []RedelegationEntryResponse { - if m != nil { - return m.Entries - } - return nil -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -type Pool struct { - NotBondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` - BondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` -} - -func (m *Pool) Reset() { *m = Pool{} } -func (m *Pool) String() string { return proto.CompactTextString(m) } -func (*Pool) ProtoMessage() {} -func (*Pool) Descriptor() ([]byte, []int) { - return fileDescriptor_64c30c6cf92913c9, []int{19} -} -func (m *Pool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Pool.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Pool) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pool.Merge(m, src) -} -func (m *Pool) XXX_Size() int { - return m.Size() -} -func (m *Pool) XXX_DiscardUnknown() { - xxx_messageInfo_Pool.DiscardUnknown(m) -} - -var xxx_messageInfo_Pool proto.InternalMessageInfo - -func init() { - // proto.RegisterEnum("cosmos.staking.v1beta1.BondStatus", BondStatus_name, BondStatus_value) - // proto.RegisterType((*HistoricalInfo)(nil), "cosmos.staking.v1beta1.HistoricalInfo") - // proto.RegisterType((*CommissionRates)(nil), "cosmos.staking.v1beta1.CommissionRates") - // proto.RegisterType((*Commission)(nil), "cosmos.staking.v1beta1.Commission") - // proto.RegisterType((*Description)(nil), "cosmos.staking.v1beta1.Description") - // proto.RegisterType((*Validator)(nil), "cosmos.staking.v1beta1.Validator") - // proto.RegisterType((*ValAddresses)(nil), "cosmos.staking.v1beta1.ValAddresses") - // proto.RegisterType((*DVPair)(nil), "cosmos.staking.v1beta1.DVPair") - // proto.RegisterType((*DVPairs)(nil), "cosmos.staking.v1beta1.DVPairs") - // proto.RegisterType((*DVVTriplet)(nil), "cosmos.staking.v1beta1.DVVTriplet") - // proto.RegisterType((*DVVTriplets)(nil), "cosmos.staking.v1beta1.DVVTriplets") - // proto.RegisterType((*Delegation)(nil), "cosmos.staking.v1beta1.Delegation") - // proto.RegisterType((*UnbondingDelegation)(nil), "cosmos.staking.v1beta1.UnbondingDelegation") - // proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos.staking.v1beta1.UnbondingDelegationEntry") - // proto.RegisterType((*RedelegationEntry)(nil), "cosmos.staking.v1beta1.RedelegationEntry") - // proto.RegisterType((*Redelegation)(nil), "cosmos.staking.v1beta1.Redelegation") - // proto.RegisterType((*Params)(nil), "cosmos.staking.v1beta1.Params") - // proto.RegisterType((*DelegationResponse)(nil), "cosmos.staking.v1beta1.DelegationResponse") - // proto.RegisterType((*RedelegationEntryResponse)(nil), "cosmos.staking.v1beta1.RedelegationEntryResponse") - // proto.RegisterType((*RedelegationResponse)(nil), "cosmos.staking.v1beta1.RedelegationResponse") - // proto.RegisterType((*Pool)(nil), "cosmos.staking.v1beta1.Pool") -} - -func init() { - proto.RegisterFile("cosmos/staking/v1beta1/staking.proto", fileDescriptor_64c30c6cf92913c9) -} - -var fileDescriptor_64c30c6cf92913c9 = []byte{ - // 1796 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6c, 0x23, 0x49, - 0x15, 0x76, 0x3b, 0x5e, 0xc7, 0x7e, 0x4e, 0xe2, 0xa4, 0x26, 0x33, 0xeb, 0x98, 0xc1, 0xed, 0x6d, - 0x56, 0x4b, 0x40, 0xbb, 0x0e, 0x93, 0x45, 0x8b, 0xc8, 0x05, 0xc6, 0x71, 0x86, 0x58, 0xbb, 0x0c, - 0xa1, 0x93, 0x09, 0x12, 0xac, 0xb0, 0xca, 0xdd, 0x15, 0xa7, 0x89, 0xbb, 0xdb, 0x74, 0x95, 0x87, - 0x58, 0xda, 0x03, 0xc7, 0x65, 0x10, 0x62, 0xb9, 0xed, 0x65, 0xa4, 0x91, 0xf6, 0xba, 0x12, 0x17, - 0xc4, 0x95, 0xeb, 0x02, 0x97, 0xe1, 0x86, 0x10, 0x32, 0x68, 0xe6, 0x82, 0x38, 0x21, 0x1f, 0x10, - 0x37, 0x50, 0xfd, 0xf4, 0x4f, 0xda, 0xf1, 0xcc, 0x78, 0xb4, 0x87, 0x91, 0xd8, 0x4b, 0xe2, 0x7a, - 0xf5, 0xde, 0xf7, 0xea, 0xfd, 0xd6, 0xab, 0x86, 0x57, 0x2d, 0x9f, 0xba, 0x3e, 0xdd, 0xa2, 0x0c, - 0x9f, 0x39, 0x5e, 0x6f, 0xeb, 0xee, 0x8d, 0x2e, 0x61, 0xf8, 0x46, 0xb8, 0x6e, 0x0c, 0x02, 0x9f, - 0xf9, 0xe8, 0x9a, 0xe4, 0x6a, 0x84, 0x54, 0xc5, 0x55, 0x5d, 0xef, 0xf9, 0x3d, 0x5f, 0xb0, 0x6c, - 0xf1, 0x5f, 0x92, 0xbb, 0xba, 0xd1, 0xf3, 0xfd, 0x5e, 0x9f, 0x6c, 0x89, 0x55, 0x77, 0x78, 0xb2, - 0x85, 0xbd, 0x91, 0xda, 0xaa, 0xa5, 0xb7, 0xec, 0x61, 0x80, 0x99, 0xe3, 0x7b, 0x6a, 0x5f, 0x4f, - 0xef, 0x33, 0xc7, 0x25, 0x94, 0x61, 0x77, 0x10, 0x62, 0xcb, 0x93, 0x74, 0xa4, 0x52, 0x75, 0x2c, - 0x85, 0xad, 0x4c, 0xe9, 0x62, 0x4a, 0x22, 0x3b, 0x2c, 0xdf, 0x09, 0xb1, 0xaf, 0x33, 0xe2, 0xd9, - 0x24, 0x70, 0x1d, 0x8f, 0x6d, 0xb1, 0xd1, 0x80, 0x50, 0xf9, 0x57, 0xee, 0x1a, 0x3f, 0xd3, 0x60, - 0x65, 0xdf, 0xa1, 0xcc, 0x0f, 0x1c, 0x0b, 0xf7, 0xdb, 0xde, 0x89, 0x8f, 0xde, 0x82, 0xfc, 0x29, - 0xc1, 0x36, 0x09, 0x2a, 0x5a, 0x5d, 0xdb, 0x2c, 0x6d, 0x57, 0x1a, 0x31, 0x42, 0x43, 0xca, 0xee, - 0x8b, 0xfd, 0x66, 0xee, 0x93, 0xb1, 0x9e, 0x31, 0x15, 0x37, 0xfa, 0x06, 0xe4, 0xef, 0xe2, 0x3e, - 0x25, 0xac, 0x92, 0xad, 0x2f, 0x6c, 0x96, 0xb6, 0x5f, 0x69, 0x5c, 0xee, 0xbe, 0xc6, 0x31, 0xee, - 0x3b, 0x36, 0x66, 0x7e, 0x04, 0x20, 0xc5, 0x8c, 0x5f, 0x67, 0xa1, 0xbc, 0xeb, 0xbb, 0xae, 0x43, - 0xa9, 0xe3, 0x7b, 0x26, 0x66, 0x84, 0xa2, 0x26, 0xe4, 0x02, 0xcc, 0x88, 0x38, 0x4a, 0xb1, 0xd9, - 0xe0, 0xfc, 0x7f, 0x19, 0xeb, 0xaf, 0xf5, 0x1c, 0x76, 0x3a, 0xec, 0x36, 0x2c, 0xdf, 0x55, 0xce, - 0x50, 0xff, 0xde, 0xa0, 0xf6, 0x99, 0xb2, 0xaf, 0x45, 0x2c, 0x53, 0xc8, 0xa2, 0x77, 0xa1, 0xe0, - 0xe2, 0xf3, 0x8e, 0xc0, 0xc9, 0x0a, 0x9c, 0x9b, 0xf3, 0xe1, 0x4c, 0xc6, 0x7a, 0x79, 0x84, 0xdd, - 0xfe, 0x8e, 0x11, 0xe2, 0x18, 0xe6, 0xa2, 0x8b, 0xcf, 0xf9, 0x11, 0xd1, 0x00, 0xca, 0x9c, 0x6a, - 0x9d, 0x62, 0xaf, 0x47, 0xa4, 0x92, 0x05, 0xa1, 0x64, 0x7f, 0x6e, 0x25, 0xd7, 0x62, 0x25, 0x09, - 0x38, 0xc3, 0x5c, 0x76, 0xf1, 0xf9, 0xae, 0x20, 0x70, 0x8d, 0x3b, 0x85, 0x0f, 0x1f, 0xe8, 0x99, - 0x7f, 0x3c, 0xd0, 0x35, 0xe3, 0x4f, 0x1a, 0x40, 0xec, 0x31, 0xf4, 0x2e, 0xac, 0x5a, 0xd1, 0x4a, - 0xc8, 0x52, 0x15, 0xc3, 0x2f, 0xce, 0x8a, 0x45, 0xca, 0xdf, 0xcd, 0x02, 0x3f, 0xf4, 0xc3, 0xb1, - 0xae, 0x99, 0x65, 0x2b, 0x15, 0x8a, 0x1f, 0x40, 0x69, 0x38, 0xb0, 0x31, 0x23, 0x1d, 0x9e, 0x9d, - 0xc2, 0x93, 0xa5, 0xed, 0x6a, 0x43, 0xa6, 0x6e, 0x23, 0x4c, 0xdd, 0xc6, 0x51, 0x98, 0xba, 0xcd, - 0x1a, 0xc7, 0x9a, 0x8c, 0x75, 0x24, 0xcd, 0x4a, 0x08, 0x1b, 0x1f, 0xfc, 0x4d, 0xd7, 0x4c, 0x90, - 0x14, 0x2e, 0x90, 0xb0, 0xe9, 0xf7, 0x1a, 0x94, 0x5a, 0x84, 0x5a, 0x81, 0x33, 0xe0, 0x15, 0x82, - 0x2a, 0xb0, 0xe8, 0xfa, 0x9e, 0x73, 0xa6, 0xf2, 0xb1, 0x68, 0x86, 0x4b, 0x54, 0x85, 0x82, 0x63, - 0x13, 0x8f, 0x39, 0x6c, 0x24, 0xe3, 0x6a, 0x46, 0x6b, 0x2e, 0xf5, 0x13, 0xd2, 0xa5, 0x4e, 0x18, - 0x0d, 0x33, 0x5c, 0xa2, 0x5b, 0xb0, 0x4a, 0x89, 0x35, 0x0c, 0x1c, 0x36, 0xea, 0x58, 0xbe, 0xc7, - 0xb0, 0xc5, 0x2a, 0x39, 0x11, 0xb0, 0xcf, 0x4d, 0xc6, 0xfa, 0xcb, 0xf2, 0xac, 0x69, 0x0e, 0xc3, - 0x2c, 0x87, 0xa4, 0x5d, 0x49, 0xe1, 0x1a, 0x6c, 0xc2, 0xb0, 0xd3, 0xa7, 0x95, 0x97, 0xa4, 0x06, - 0xb5, 0x4c, 0xd8, 0xf2, 0xf1, 0x22, 0x14, 0xa3, 0x6c, 0xe7, 0x9a, 0xfd, 0x01, 0x09, 0xf8, 0xef, - 0x0e, 0xb6, 0xed, 0x80, 0x50, 0xaa, 0xf2, 0x3a, 0xa1, 0x39, 0xcd, 0x61, 0x98, 0xe5, 0x90, 0x74, - 0x53, 0x52, 0x10, 0xe3, 0x61, 0xf6, 0x28, 0xf1, 0xe8, 0x90, 0x76, 0x06, 0xc3, 0xee, 0x19, 0x19, - 0xa9, 0x68, 0xac, 0x4f, 0x45, 0xe3, 0xa6, 0x37, 0x6a, 0xbe, 0x19, 0xa3, 0xa7, 0xe5, 0x8c, 0x3f, - 0xfc, 0xe6, 0x8d, 0x75, 0x95, 0x1a, 0x56, 0x30, 0x1a, 0x30, 0xbf, 0x71, 0x30, 0xec, 0xbe, 0x4d, - 0x46, 0x3c, 0xfc, 0x8a, 0xf5, 0x40, 0x70, 0xa2, 0x6b, 0x90, 0xff, 0x11, 0x76, 0xfa, 0xc4, 0x16, - 0x0e, 0x2d, 0x98, 0x6a, 0x85, 0x76, 0x20, 0x4f, 0x19, 0x66, 0x43, 0x2a, 0xbc, 0xb8, 0xb2, 0x6d, - 0xcc, 0x4a, 0xb5, 0xa6, 0xef, 0xd9, 0x87, 0x82, 0xd3, 0x54, 0x12, 0xe8, 0x16, 0xe4, 0x99, 0x7f, - 0x46, 0x3c, 0xe5, 0xc2, 0xb9, 0xea, 0xbb, 0xed, 0x31, 0x53, 0x49, 0x73, 0x8f, 0xd8, 0xa4, 0x4f, - 0x7a, 0xc2, 0x71, 0xf4, 0x14, 0x07, 0x84, 0x56, 0xf2, 0x02, 0xb1, 0x3d, 0x77, 0x11, 0x2a, 0x4f, - 0xa5, 0xf1, 0x0c, 0xb3, 0x1c, 0x91, 0x0e, 0x05, 0x05, 0xbd, 0x0d, 0x25, 0x3b, 0x4e, 0xd4, 0xca, - 0xa2, 0x08, 0xc1, 0x17, 0x66, 0x99, 0x9f, 0xc8, 0x69, 0xd5, 0xf7, 0x92, 0xd2, 0x3c, 0x39, 0x86, - 0x5e, 0xd7, 0xf7, 0x6c, 0xc7, 0xeb, 0x75, 0x4e, 0x89, 0xd3, 0x3b, 0x65, 0x95, 0x42, 0x5d, 0xdb, - 0x5c, 0x48, 0x26, 0x47, 0x9a, 0xc3, 0x30, 0xcb, 0x11, 0x69, 0x5f, 0x50, 0x90, 0x0d, 0x2b, 0x31, - 0x97, 0x28, 0xd4, 0xe2, 0x53, 0x0b, 0xf5, 0x15, 0x55, 0xa8, 0x57, 0xd3, 0x5a, 0xe2, 0x5a, 0x5d, - 0x8e, 0x88, 0x5c, 0x0c, 0xed, 0x03, 0xc4, 0xed, 0xa1, 0x02, 0x42, 0x83, 0xf1, 0xf4, 0x1e, 0xa3, - 0x0c, 0x4f, 0xc8, 0xa2, 0xf7, 0xe0, 0x8a, 0xeb, 0x78, 0x1d, 0x4a, 0xfa, 0x27, 0x1d, 0xe5, 0x60, - 0x0e, 0x59, 0x12, 0xd1, 0x7b, 0x67, 0xbe, 0x7c, 0x98, 0x8c, 0xf5, 0xaa, 0x6a, 0xa1, 0xd3, 0x90, - 0x86, 0xb9, 0xe6, 0x3a, 0xde, 0x21, 0xe9, 0x9f, 0xb4, 0x22, 0xda, 0xce, 0xd2, 0xfb, 0x0f, 0xf4, - 0x8c, 0x2a, 0xd7, 0x8c, 0xf1, 0x16, 0x2c, 0x1d, 0xe3, 0xbe, 0x2a, 0x33, 0x42, 0xd1, 0x75, 0x28, - 0xe2, 0x70, 0x51, 0xd1, 0xea, 0x0b, 0x9b, 0x45, 0x33, 0x26, 0xc8, 0x32, 0xff, 0xe9, 0x5f, 0xeb, - 0x9a, 0xf1, 0xb1, 0x06, 0xf9, 0xd6, 0xf1, 0x01, 0x76, 0x02, 0xd4, 0x86, 0xb5, 0x38, 0x73, 0x2e, - 0x16, 0xf9, 0xf5, 0xc9, 0x58, 0xaf, 0xa4, 0x93, 0x2b, 0xaa, 0xf2, 0x38, 0x81, 0xc3, 0x32, 0x6f, - 0xc3, 0xda, 0xdd, 0xb0, 0x77, 0x44, 0x50, 0xd9, 0x34, 0xd4, 0x14, 0x8b, 0x61, 0xae, 0x46, 0x34, - 0x05, 0x95, 0x32, 0x73, 0x0f, 0x16, 0xe5, 0x69, 0x29, 0xda, 0x81, 0x97, 0x06, 0xfc, 0x87, 0xb0, - 0xae, 0xb4, 0x5d, 0x9b, 0x99, 0xbc, 0x82, 0x5f, 0x85, 0x4f, 0x8a, 0x18, 0xbf, 0xca, 0x02, 0xb4, - 0x8e, 0x8f, 0x8f, 0x02, 0x67, 0xd0, 0x27, 0xec, 0xd3, 0xb4, 0xfc, 0x08, 0xae, 0xc6, 0x66, 0xd1, - 0xc0, 0x4a, 0x59, 0x5f, 0x9f, 0x8c, 0xf5, 0xeb, 0x69, 0xeb, 0x13, 0x6c, 0x86, 0x79, 0x25, 0xa2, - 0x1f, 0x06, 0xd6, 0xa5, 0xa8, 0x36, 0x65, 0x11, 0xea, 0xc2, 0x6c, 0xd4, 0x04, 0x5b, 0x12, 0xb5, - 0x45, 0xd9, 0xe5, 0xae, 0x3d, 0x84, 0x52, 0xec, 0x12, 0x8a, 0x5a, 0x50, 0x60, 0xea, 0xb7, 0xf2, - 0xb0, 0x31, 0xdb, 0xc3, 0xa1, 0x98, 0xf2, 0x72, 0x24, 0x69, 0xfc, 0x47, 0x03, 0x88, 0x73, 0xf6, - 0xc5, 0x4c, 0x31, 0xde, 0xca, 0x55, 0xe3, 0x5d, 0x78, 0xae, 0x51, 0x4d, 0x49, 0xa7, 0xfc, 0xf9, - 0xf3, 0x2c, 0x5c, 0xb9, 0x13, 0x76, 0x9e, 0x17, 0xde, 0x07, 0x07, 0xb0, 0x48, 0x3c, 0x16, 0x38, - 0xc2, 0x09, 0x3c, 0xda, 0x5f, 0x99, 0x15, 0xed, 0x4b, 0x6c, 0xda, 0xf3, 0x58, 0x30, 0x52, 0xb1, - 0x0f, 0x61, 0x52, 0xde, 0xf8, 0xe5, 0x02, 0x54, 0x66, 0x49, 0xa2, 0x5d, 0x28, 0x5b, 0x01, 0x11, - 0x84, 0xf0, 0xfe, 0xd0, 0xc4, 0xfd, 0x51, 0x8d, 0x27, 0xcb, 0x14, 0x83, 0x61, 0xae, 0x84, 0x14, - 0x75, 0x7b, 0xf4, 0x80, 0x8f, 0x7d, 0x3c, 0xed, 0x38, 0xd7, 0x33, 0xce, 0x79, 0x86, 0xba, 0x3e, - 0x42, 0x25, 0x17, 0x01, 0xe4, 0xfd, 0xb1, 0x12, 0x53, 0xc5, 0x05, 0xf2, 0x63, 0x28, 0x3b, 0x9e, - 0xc3, 0x1c, 0xdc, 0xef, 0x74, 0x71, 0x1f, 0x7b, 0xd6, 0xf3, 0x4c, 0xcd, 0xb2, 0xe5, 0x2b, 0xb5, - 0x29, 0x38, 0xc3, 0x5c, 0x51, 0x94, 0xa6, 0x24, 0xa0, 0x7d, 0x58, 0x0c, 0x55, 0xe5, 0x9e, 0x6b, - 0xda, 0x08, 0xc5, 0x13, 0x03, 0xde, 0x2f, 0x16, 0x60, 0xcd, 0x24, 0xf6, 0x67, 0xa1, 0x98, 0x2f, - 0x14, 0xdf, 0x06, 0x90, 0xe5, 0xce, 0x1b, 0xec, 0x73, 0x44, 0x83, 0x37, 0x8c, 0xa2, 0x44, 0x68, - 0x51, 0x96, 0x88, 0xc7, 0x38, 0x0b, 0x4b, 0xc9, 0x78, 0xfc, 0x9f, 0xde, 0x4a, 0xa8, 0x1d, 0x77, - 0xa2, 0x9c, 0xe8, 0x44, 0x5f, 0x9a, 0xd5, 0x89, 0xa6, 0xb2, 0xf7, 0xc9, 0x2d, 0xe8, 0xdf, 0x59, - 0xc8, 0x1f, 0xe0, 0x00, 0xbb, 0x14, 0x59, 0x53, 0x93, 0xa6, 0x7c, 0x6b, 0x6e, 0x4c, 0xe5, 0x67, - 0x4b, 0x7d, 0xed, 0x78, 0xca, 0xa0, 0xf9, 0xe1, 0x25, 0x83, 0xe6, 0x37, 0x61, 0x85, 0x3f, 0x87, - 0x23, 0x1b, 0xa5, 0xb7, 0x97, 0x9b, 0x1b, 0x31, 0xca, 0xc5, 0x7d, 0xf9, 0x5a, 0x8e, 0x1e, 0x5d, - 0x14, 0x7d, 0x0d, 0x4a, 0x9c, 0x23, 0x6e, 0xcc, 0x5c, 0xfc, 0x5a, 0xfc, 0x2c, 0x4d, 0x6c, 0x1a, - 0x26, 0xb8, 0xf8, 0x7c, 0x4f, 0x2e, 0xd0, 0x3b, 0x80, 0x4e, 0xa3, 0x2f, 0x23, 0x9d, 0xd8, 0x9d, - 0x5c, 0xfe, 0xf3, 0x93, 0xb1, 0xbe, 0x21, 0xe5, 0xa7, 0x79, 0x0c, 0x73, 0x2d, 0x26, 0x86, 0x68, - 0x5f, 0x05, 0xe0, 0x76, 0x75, 0x6c, 0xe2, 0xf9, 0xae, 0x7a, 0xee, 0x5c, 0x9d, 0x8c, 0xf5, 0x35, - 0x89, 0x12, 0xef, 0x19, 0x66, 0x91, 0x2f, 0x5a, 0xfc, 0x77, 0x22, 0xb3, 0x3f, 0xd2, 0x00, 0xc5, - 0x2d, 0xdf, 0x24, 0x74, 0xc0, 0xdf, 0x67, 0x7c, 0x10, 0x4f, 0x4c, 0xcd, 0xda, 0x93, 0x07, 0xf1, - 0x58, 0x3e, 0x1c, 0xc4, 0x13, 0x95, 0xf2, 0xf5, 0xb8, 0x3d, 0x66, 0x55, 0x1c, 0x15, 0x4c, 0x17, - 0x53, 0x92, 0x18, 0xe6, 0x9d, 0x50, 0x7a, 0xaa, 0x1f, 0x66, 0x8c, 0x3f, 0x6a, 0xb0, 0x31, 0x95, - 0x51, 0xd1, 0x61, 0x7f, 0x08, 0x28, 0x48, 0x6c, 0x0a, 0x7f, 0x8d, 0xd4, 0xa1, 0xe7, 0x4e, 0xd0, - 0xb5, 0x60, 0xaa, 0xef, 0x7e, 0x7a, 0x1d, 0x3e, 0x27, 0x7c, 0xfe, 0x3b, 0x0d, 0xd6, 0x93, 0xea, - 0x23, 0x43, 0x6e, 0xc3, 0x52, 0x52, 0xbb, 0x32, 0xe1, 0xd5, 0x67, 0x31, 0x41, 0x9d, 0xfe, 0x82, - 0x3c, 0xfa, 0x6e, 0x5c, 0xae, 0xf2, 0xdb, 0xd9, 0x8d, 0x67, 0xf6, 0x46, 0x78, 0xa6, 0x74, 0xd9, - 0xe6, 0x44, 0x3c, 0xfe, 0xab, 0x41, 0xee, 0xc0, 0xf7, 0xfb, 0xc8, 0x87, 0x35, 0xcf, 0x67, 0x1d, - 0x9e, 0x59, 0xc4, 0xee, 0xa8, 0x47, 0xb7, 0xec, 0x83, 0xbb, 0xf3, 0x39, 0xe9, 0x9f, 0x63, 0x7d, - 0x1a, 0xca, 0x2c, 0x7b, 0x3e, 0x6b, 0x0a, 0xca, 0x91, 0x7c, 0x92, 0xbf, 0x07, 0xcb, 0x17, 0x95, - 0xc9, 0x2e, 0xf9, 0xbd, 0xb9, 0x95, 0x5d, 0x84, 0x99, 0x8c, 0xf5, 0xf5, 0xb8, 0x62, 0x22, 0xb2, - 0x61, 0x2e, 0x75, 0x13, 0xda, 0x77, 0x0a, 0x3c, 0x7e, 0xff, 0x7a, 0xa0, 0x6b, 0x5f, 0xfe, 0xad, - 0x06, 0x10, 0x7f, 0x79, 0x40, 0xaf, 0xc3, 0xcb, 0xcd, 0xef, 0xdc, 0x6e, 0x75, 0x0e, 0x8f, 0x6e, - 0x1e, 0xdd, 0x39, 0xec, 0xdc, 0xb9, 0x7d, 0x78, 0xb0, 0xb7, 0xdb, 0xbe, 0xd5, 0xde, 0x6b, 0xad, - 0x66, 0xaa, 0xe5, 0x7b, 0xf7, 0xeb, 0xa5, 0x3b, 0x1e, 0x1d, 0x10, 0xcb, 0x39, 0x71, 0x88, 0x8d, - 0x5e, 0x83, 0xf5, 0x8b, 0xdc, 0x7c, 0xb5, 0xd7, 0x5a, 0xd5, 0xaa, 0x4b, 0xf7, 0xee, 0xd7, 0x0b, - 0x72, 0x16, 0x23, 0x36, 0xda, 0x84, 0xab, 0xd3, 0x7c, 0xed, 0xdb, 0xdf, 0x5a, 0xcd, 0x56, 0x97, - 0xef, 0xdd, 0xaf, 0x17, 0xa3, 0xa1, 0x0d, 0x19, 0x80, 0x92, 0x9c, 0x0a, 0x6f, 0xa1, 0x0a, 0xf7, - 0xee, 0xd7, 0xf3, 0xd2, 0x81, 0xd5, 0xdc, 0xfb, 0x1f, 0xd5, 0x32, 0xcd, 0x5b, 0x9f, 0x3c, 0xaa, - 0x69, 0x0f, 0x1f, 0xd5, 0xb4, 0xbf, 0x3f, 0xaa, 0x69, 0x1f, 0x3c, 0xae, 0x65, 0x1e, 0x3e, 0xae, - 0x65, 0xfe, 0xfc, 0xb8, 0x96, 0xf9, 0xfe, 0xeb, 0x4f, 0xf4, 0xdd, 0x79, 0xf4, 0x51, 0x5b, 0x78, - 0xb1, 0x9b, 0x17, 0x6d, 0xf8, 0xcd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x48, 0x4c, 0x86, - 0xf3, 0x16, 0x00, 0x00, -} - -func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - return StakingDescription() -} -func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 9603 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, - 0x71, 0xd8, 0xcd, 0xee, 0x02, 0xd8, 0x6d, 0x2c, 0x80, 0xc5, 0x03, 0xee, 0x6e, 0x6f, 0x79, 0x04, - 0xc0, 0xe1, 0xd7, 0xf1, 0x48, 0x02, 0xe4, 0x91, 0x77, 0x24, 0xf7, 0x24, 0xd2, 0x58, 0x60, 0x0f, - 0x07, 0x1e, 0xbe, 0x38, 0x00, 0x8e, 0xd4, 0x87, 0xb3, 0x35, 0x98, 0x7d, 0x58, 0x0c, 0xb1, 0x3b, - 0x33, 0x9c, 0x99, 0xbd, 0x3b, 0x50, 0x52, 0x15, 0x2d, 0x29, 0x8a, 0x44, 0xc7, 0x91, 0x14, 0xb9, - 0x1c, 0x89, 0xd6, 0x29, 0x92, 0xe5, 0x44, 0x8e, 0xac, 0xc4, 0x1f, 0x52, 0x94, 0x38, 0x49, 0x55, - 0xa4, 0x24, 0x8e, 0x25, 0xa5, 0xe2, 0x92, 0x2a, 0xae, 0xc4, 0x71, 0x25, 0x67, 0x87, 0x52, 0x39, - 0x8c, 0xa2, 0xc4, 0xf2, 0x59, 0x4e, 0x9c, 0x52, 0xa5, 0x92, 0x7a, 0x5f, 0xf3, 0xb5, 0x1f, 0xb3, - 0x0b, 0xdd, 0x49, 0x72, 0x9c, 0x5f, 0xd8, 0xd7, 0xaf, 0xbb, 0x5f, 0xbf, 0x7e, 0xfd, 0xba, 0xfb, - 0x7d, 0x0d, 0xe0, 0x9f, 0x9f, 0x87, 0x99, 0x9a, 0x69, 0xd6, 0xea, 0x78, 0xce, 0xb2, 0x4d, 0xd7, - 0xdc, 0x69, 0xee, 0xce, 0x55, 0xb1, 0xa3, 0xd9, 0xba, 0xe5, 0x9a, 0xf6, 0x2c, 0x85, 0xa1, 0x31, - 0x86, 0x31, 0x2b, 0x30, 0xe4, 0x55, 0x18, 0xbf, 0xa0, 0xd7, 0xf1, 0xa2, 0x87, 0xb8, 0x89, 0x5d, - 0xf4, 0x24, 0xa4, 0x76, 0xf5, 0x3a, 0xce, 0x4b, 0x33, 0xc9, 0x53, 0xc3, 0x67, 0xee, 0x99, 0x8d, - 0x10, 0xcd, 0x86, 0x29, 0x36, 0x08, 0x58, 0xa1, 0x14, 0xf2, 0xb7, 0x52, 0x30, 0xd1, 0xa6, 0x16, - 0x21, 0x48, 0x19, 0x6a, 0x83, 0x70, 0x94, 0x4e, 0x65, 0x14, 0xfa, 0x1b, 0xe5, 0x61, 0xc8, 0x52, - 0xb5, 0x7d, 0xb5, 0x86, 0xf3, 0x09, 0x0a, 0x16, 0x45, 0x34, 0x05, 0x50, 0xc5, 0x16, 0x36, 0xaa, - 0xd8, 0xd0, 0x0e, 0xf2, 0xc9, 0x99, 0xe4, 0xa9, 0x8c, 0x12, 0x80, 0xa0, 0x07, 0x61, 0xdc, 0x6a, - 0xee, 0xd4, 0x75, 0xad, 0x12, 0x40, 0x83, 0x99, 0xe4, 0xa9, 0x01, 0x25, 0xc7, 0x2a, 0x16, 0x7d, - 0xe4, 0xfb, 0x61, 0xec, 0x2a, 0x56, 0xf7, 0x83, 0xa8, 0xc3, 0x14, 0x75, 0x94, 0x80, 0x03, 0x88, - 0x0b, 0x90, 0x6d, 0x60, 0xc7, 0x51, 0x6b, 0xb8, 0xe2, 0x1e, 0x58, 0x38, 0x9f, 0xa2, 0xbd, 0x9f, - 0x69, 0xe9, 0x7d, 0xb4, 0xe7, 0xc3, 0x9c, 0x6a, 0xeb, 0xc0, 0xc2, 0x68, 0x1e, 0x32, 0xd8, 0x68, - 0x36, 0x18, 0x87, 0x81, 0x0e, 0xfa, 0x2b, 0x1b, 0xcd, 0x46, 0x94, 0x4b, 0x9a, 0x90, 0x71, 0x16, - 0x43, 0x0e, 0xb6, 0xaf, 0xe8, 0x1a, 0xce, 0x0f, 0x52, 0x06, 0xf7, 0xb7, 0x30, 0xd8, 0x64, 0xf5, - 0x51, 0x1e, 0x82, 0x0e, 0x2d, 0x40, 0x06, 0x5f, 0x73, 0xb1, 0xe1, 0xe8, 0xa6, 0x91, 0x1f, 0xa2, - 0x4c, 0xee, 0x6d, 0x33, 0x8a, 0xb8, 0x5e, 0x8d, 0xb2, 0xf0, 0xe9, 0xd0, 0x39, 0x18, 0x32, 0x2d, - 0x57, 0x37, 0x0d, 0x27, 0x9f, 0x9e, 0x91, 0x4e, 0x0d, 0x9f, 0x39, 0xd9, 0xd6, 0x10, 0xd6, 0x19, - 0x8e, 0x22, 0x90, 0xd1, 0x32, 0xe4, 0x1c, 0xb3, 0x69, 0x6b, 0xb8, 0xa2, 0x99, 0x55, 0x5c, 0xd1, - 0x8d, 0x5d, 0x33, 0x9f, 0xa1, 0x0c, 0xa6, 0x5b, 0x3b, 0x42, 0x11, 0x17, 0xcc, 0x2a, 0x5e, 0x36, - 0x76, 0x4d, 0x65, 0xd4, 0x09, 0x95, 0xd1, 0x31, 0x18, 0x74, 0x0e, 0x0c, 0x57, 0xbd, 0x96, 0xcf, - 0x52, 0x0b, 0xe1, 0x25, 0xf9, 0x37, 0x06, 0x61, 0xac, 0x17, 0x13, 0x3b, 0x0f, 0x03, 0xbb, 0xa4, - 0x97, 0xf9, 0x44, 0x3f, 0x3a, 0x60, 0x34, 0x61, 0x25, 0x0e, 0x1e, 0x52, 0x89, 0xf3, 0x30, 0x6c, - 0x60, 0xc7, 0xc5, 0x55, 0x66, 0x11, 0xc9, 0x1e, 0x6d, 0x0a, 0x18, 0x51, 0xab, 0x49, 0xa5, 0x0e, - 0x65, 0x52, 0x2f, 0xc0, 0x98, 0x27, 0x52, 0xc5, 0x56, 0x8d, 0x9a, 0xb0, 0xcd, 0xb9, 0x38, 0x49, - 0x66, 0xcb, 0x82, 0x4e, 0x21, 0x64, 0xca, 0x28, 0x0e, 0x95, 0xd1, 0x22, 0x80, 0x69, 0x60, 0x73, - 0xb7, 0x52, 0xc5, 0x5a, 0x3d, 0x9f, 0xee, 0xa0, 0xa5, 0x75, 0x82, 0xd2, 0xa2, 0x25, 0x93, 0x41, - 0xb5, 0x3a, 0x7a, 0xca, 0x37, 0xb5, 0xa1, 0x0e, 0x96, 0xb2, 0xca, 0x26, 0x59, 0x8b, 0xb5, 0x6d, - 0xc3, 0xa8, 0x8d, 0x89, 0xdd, 0xe3, 0x2a, 0xef, 0x59, 0x86, 0x0a, 0x31, 0x1b, 0xdb, 0x33, 0x85, - 0x93, 0xb1, 0x8e, 0x8d, 0xd8, 0xc1, 0x22, 0xba, 0x1b, 0x3c, 0x40, 0x85, 0x9a, 0x15, 0x50, 0x2f, - 0x94, 0x15, 0xc0, 0x35, 0xb5, 0x81, 0x0b, 0x2f, 0xc3, 0x68, 0x58, 0x3d, 0x68, 0x12, 0x06, 0x1c, - 0x57, 0xb5, 0x5d, 0x6a, 0x85, 0x03, 0x0a, 0x2b, 0xa0, 0x1c, 0x24, 0xb1, 0x51, 0xa5, 0x5e, 0x6e, - 0x40, 0x21, 0x3f, 0xd1, 0x4f, 0xf8, 0x1d, 0x4e, 0xd2, 0x0e, 0xdf, 0xd7, 0x3a, 0xa2, 0x21, 0xce, - 0xd1, 0x7e, 0x17, 0x9e, 0x80, 0x91, 0x50, 0x07, 0x7a, 0x6d, 0x5a, 0x7e, 0x27, 0x1c, 0x6d, 0xcb, - 0x1a, 0xbd, 0x00, 0x93, 0x4d, 0x43, 0x37, 0x5c, 0x6c, 0x5b, 0x36, 0x26, 0x16, 0xcb, 0x9a, 0xca, - 0xff, 0xe7, 0xa1, 0x0e, 0x36, 0xb7, 0x1d, 0xc4, 0x66, 0x5c, 0x94, 0x89, 0x66, 0x2b, 0xf0, 0x74, - 0x26, 0xfd, 0xc6, 0x50, 0xee, 0x95, 0x57, 0x5e, 0x79, 0x25, 0x21, 0x7f, 0x79, 0x10, 0x26, 0xdb, - 0xcd, 0x99, 0xb6, 0xd3, 0xf7, 0x18, 0x0c, 0x1a, 0xcd, 0xc6, 0x0e, 0xb6, 0xa9, 0x92, 0x06, 0x14, - 0x5e, 0x42, 0xf3, 0x30, 0x50, 0x57, 0x77, 0x70, 0x3d, 0x9f, 0x9a, 0x91, 0x4e, 0x8d, 0x9e, 0x79, - 0xb0, 0xa7, 0x59, 0x39, 0xbb, 0x42, 0x48, 0x14, 0x46, 0x89, 0x9e, 0x86, 0x14, 0x77, 0xd1, 0x84, - 0xc3, 0xe9, 0xde, 0x38, 0x90, 0xb9, 0xa4, 0x50, 0x3a, 0x74, 0x07, 0x64, 0xc8, 0x5f, 0x66, 0x1b, - 0x83, 0x54, 0xe6, 0x34, 0x01, 0x10, 0xbb, 0x40, 0x05, 0x48, 0xd3, 0x69, 0x52, 0xc5, 0x22, 0xb4, - 0x79, 0x65, 0x62, 0x58, 0x55, 0xbc, 0xab, 0x36, 0xeb, 0x6e, 0xe5, 0x8a, 0x5a, 0x6f, 0x62, 0x6a, - 0xf0, 0x19, 0x25, 0xcb, 0x81, 0x97, 0x09, 0x0c, 0x4d, 0xc3, 0x30, 0x9b, 0x55, 0xba, 0x51, 0xc5, - 0xd7, 0xa8, 0xf7, 0x1c, 0x50, 0xd8, 0x44, 0x5b, 0x26, 0x10, 0xd2, 0xfc, 0x8b, 0x8e, 0x69, 0x08, - 0xd3, 0xa4, 0x4d, 0x10, 0x00, 0x6d, 0xfe, 0x89, 0xa8, 0xe3, 0xbe, 0xb3, 0x7d, 0xf7, 0x5a, 0xe6, - 0xd2, 0xfd, 0x30, 0x46, 0x31, 0x1e, 0xe3, 0x43, 0xaf, 0xd6, 0xf3, 0xe3, 0x33, 0xd2, 0xa9, 0xb4, - 0x32, 0xca, 0xc0, 0xeb, 0x1c, 0x2a, 0x7f, 0x31, 0x01, 0x29, 0xea, 0x58, 0xc6, 0x60, 0x78, 0xeb, - 0x2d, 0x1b, 0xe5, 0xca, 0xe2, 0xfa, 0x76, 0x69, 0xa5, 0x9c, 0x93, 0xd0, 0x28, 0x00, 0x05, 0x5c, - 0x58, 0x59, 0x9f, 0xdf, 0xca, 0x25, 0xbc, 0xf2, 0xf2, 0xda, 0xd6, 0xb9, 0xc7, 0x73, 0x49, 0x8f, - 0x60, 0x9b, 0x01, 0x52, 0x41, 0x84, 0xc7, 0xce, 0xe4, 0x06, 0x50, 0x0e, 0xb2, 0x8c, 0xc1, 0xf2, - 0x0b, 0xe5, 0xc5, 0x73, 0x8f, 0xe7, 0x06, 0xc3, 0x90, 0xc7, 0xce, 0xe4, 0x86, 0xd0, 0x08, 0x64, - 0x28, 0xa4, 0xb4, 0xbe, 0xbe, 0x92, 0x4b, 0x7b, 0x3c, 0x37, 0xb7, 0x94, 0xe5, 0xb5, 0xa5, 0x5c, - 0xc6, 0xe3, 0xb9, 0xa4, 0xac, 0x6f, 0x6f, 0xe4, 0xc0, 0xe3, 0xb0, 0x5a, 0xde, 0xdc, 0x9c, 0x5f, - 0x2a, 0xe7, 0x86, 0x3d, 0x8c, 0xd2, 0x5b, 0xb6, 0xca, 0x9b, 0xb9, 0x6c, 0x48, 0xac, 0xc7, 0xce, - 0xe4, 0x46, 0xbc, 0x26, 0xca, 0x6b, 0xdb, 0xab, 0xb9, 0x51, 0x34, 0x0e, 0x23, 0xac, 0x09, 0x21, - 0xc4, 0x58, 0x04, 0x74, 0xee, 0xf1, 0x5c, 0xce, 0x17, 0x84, 0x71, 0x19, 0x0f, 0x01, 0xce, 0x3d, - 0x9e, 0x43, 0xf2, 0x02, 0x0c, 0x50, 0x33, 0x44, 0x08, 0x46, 0x57, 0xe6, 0x4b, 0xe5, 0x95, 0xca, - 0xfa, 0xc6, 0xd6, 0xf2, 0xfa, 0xda, 0xfc, 0x4a, 0x4e, 0xf2, 0x61, 0x4a, 0xf9, 0xb9, 0xed, 0x65, - 0xa5, 0xbc, 0x98, 0x4b, 0x04, 0x61, 0x1b, 0xe5, 0xf9, 0xad, 0xf2, 0x62, 0x2e, 0x29, 0x6b, 0x30, - 0xd9, 0xce, 0xa1, 0xb6, 0x9d, 0x42, 0x01, 0x5b, 0x48, 0x74, 0xb0, 0x05, 0xca, 0x2b, 0x6a, 0x0b, - 0xf2, 0x37, 0x13, 0x30, 0xd1, 0x26, 0xa8, 0xb4, 0x6d, 0xe4, 0x19, 0x18, 0x60, 0xb6, 0xcc, 0xc2, - 0xec, 0x03, 0x6d, 0xa3, 0x13, 0xb5, 0xec, 0x96, 0x50, 0x4b, 0xe9, 0x82, 0xa9, 0x46, 0xb2, 0x43, - 0xaa, 0x41, 0x58, 0xb4, 0x18, 0xec, 0x4f, 0xb6, 0x38, 0x7f, 0x16, 0x1f, 0xcf, 0xf5, 0x12, 0x1f, - 0x29, 0xac, 0xbf, 0x20, 0x30, 0xd0, 0x26, 0x08, 0x9c, 0x87, 0xf1, 0x16, 0x46, 0x3d, 0x3b, 0xe3, - 0xf7, 0x48, 0x90, 0xef, 0xa4, 0x9c, 0x18, 0x97, 0x98, 0x08, 0xb9, 0xc4, 0xf3, 0x51, 0x0d, 0xde, - 0xd5, 0x79, 0x10, 0x5a, 0xc6, 0xfa, 0x33, 0x12, 0x1c, 0x6b, 0x9f, 0x52, 0xb6, 0x95, 0xe1, 0x69, - 0x18, 0x6c, 0x60, 0x77, 0xcf, 0x14, 0x69, 0xd5, 0x7d, 0x6d, 0x82, 0x35, 0xa9, 0x8e, 0x0e, 0x36, - 0xa7, 0x0a, 0x46, 0xfb, 0x64, 0xa7, 0xbc, 0x90, 0x49, 0xd3, 0x22, 0xe9, 0x07, 0x12, 0x70, 0xb4, - 0x2d, 0xf3, 0xb6, 0x82, 0xde, 0x09, 0xa0, 0x1b, 0x56, 0xd3, 0x65, 0xa9, 0x13, 0xf3, 0xc4, 0x19, - 0x0a, 0xa1, 0xce, 0x8b, 0x78, 0xd9, 0xa6, 0xeb, 0xd5, 0x27, 0x69, 0x3d, 0x30, 0x10, 0x45, 0x78, - 0xd2, 0x17, 0x34, 0x45, 0x05, 0x9d, 0xea, 0xd0, 0xd3, 0x16, 0xc3, 0x7c, 0x04, 0x72, 0x5a, 0x5d, - 0xc7, 0x86, 0x5b, 0x71, 0x5c, 0x1b, 0xab, 0x0d, 0xdd, 0xa8, 0xd1, 0x50, 0x93, 0x2e, 0x0e, 0xec, - 0xaa, 0x75, 0x07, 0x2b, 0x63, 0xac, 0x7a, 0x53, 0xd4, 0x12, 0x0a, 0x6a, 0x40, 0x76, 0x80, 0x62, - 0x30, 0x44, 0xc1, 0xaa, 0x3d, 0x0a, 0xf9, 0xc3, 0x19, 0x18, 0x0e, 0x24, 0xe0, 0xe8, 0x2e, 0xc8, - 0xbe, 0xa8, 0x5e, 0x51, 0x2b, 0x62, 0x51, 0xc5, 0x34, 0x31, 0x4c, 0x60, 0x1b, 0x7c, 0x61, 0xf5, - 0x08, 0x4c, 0x52, 0x14, 0xb3, 0xe9, 0x62, 0xbb, 0xa2, 0xd5, 0x55, 0xc7, 0xa1, 0x4a, 0x4b, 0x53, - 0x54, 0x44, 0xea, 0xd6, 0x49, 0xd5, 0x82, 0xa8, 0x41, 0x67, 0x61, 0x82, 0x52, 0x34, 0x9a, 0x75, - 0x57, 0xb7, 0xea, 0xb8, 0x42, 0x96, 0x79, 0x0e, 0x0d, 0x39, 0x9e, 0x64, 0xe3, 0x04, 0x63, 0x95, - 0x23, 0x10, 0x89, 0x1c, 0xb4, 0x08, 0x77, 0x52, 0xb2, 0x1a, 0x36, 0xb0, 0xad, 0xba, 0xb8, 0x82, - 0x5f, 0x6a, 0xaa, 0x75, 0xa7, 0xa2, 0x1a, 0xd5, 0xca, 0x9e, 0xea, 0xec, 0xe5, 0x27, 0x09, 0x83, - 0x52, 0x22, 0x2f, 0x29, 0x27, 0x08, 0xe2, 0x12, 0xc7, 0x2b, 0x53, 0xb4, 0x79, 0xa3, 0x7a, 0x51, - 0x75, 0xf6, 0x50, 0x11, 0x8e, 0x51, 0x2e, 0x8e, 0x6b, 0xeb, 0x46, 0xad, 0xa2, 0xed, 0x61, 0x6d, - 0xbf, 0xd2, 0x74, 0x77, 0x9f, 0xcc, 0xdf, 0x11, 0x6c, 0x9f, 0x4a, 0xb8, 0x49, 0x71, 0x16, 0x08, - 0xca, 0xb6, 0xbb, 0xfb, 0x24, 0xda, 0x84, 0x2c, 0x19, 0x8c, 0x86, 0xfe, 0x32, 0xae, 0xec, 0x9a, - 0x36, 0x8d, 0xa1, 0xa3, 0x6d, 0x5c, 0x53, 0x40, 0x83, 0xb3, 0xeb, 0x9c, 0x60, 0xd5, 0xac, 0xe2, - 0xe2, 0xc0, 0xe6, 0x46, 0xb9, 0xbc, 0xa8, 0x0c, 0x0b, 0x2e, 0x17, 0x4c, 0x9b, 0x18, 0x54, 0xcd, - 0xf4, 0x14, 0x3c, 0xcc, 0x0c, 0xaa, 0x66, 0x0a, 0xf5, 0x9e, 0x85, 0x09, 0x4d, 0x63, 0x7d, 0xd6, - 0xb5, 0x0a, 0x5f, 0x8c, 0x39, 0xf9, 0x5c, 0x48, 0x59, 0x9a, 0xb6, 0xc4, 0x10, 0xb8, 0x8d, 0x3b, - 0xe8, 0x29, 0x38, 0xea, 0x2b, 0x2b, 0x48, 0x38, 0xde, 0xd2, 0xcb, 0x28, 0xe9, 0x59, 0x98, 0xb0, - 0x0e, 0x5a, 0x09, 0x51, 0xa8, 0x45, 0xeb, 0x20, 0x4a, 0xf6, 0x04, 0x4c, 0x5a, 0x7b, 0x56, 0x2b, - 0xdd, 0xe9, 0x20, 0x1d, 0xb2, 0xf6, 0xac, 0x28, 0xe1, 0xbd, 0x74, 0x65, 0x6e, 0x63, 0x4d, 0x75, - 0x71, 0x35, 0x7f, 0x3c, 0x88, 0x1e, 0xa8, 0x40, 0xb3, 0x90, 0xd3, 0xb4, 0x0a, 0x36, 0xd4, 0x9d, - 0x3a, 0xae, 0xa8, 0x36, 0x36, 0x54, 0x27, 0x3f, 0x4d, 0x91, 0x53, 0xae, 0xdd, 0xc4, 0xca, 0xa8, - 0xa6, 0x95, 0x69, 0xe5, 0x3c, 0xad, 0x43, 0xa7, 0x61, 0xdc, 0xdc, 0x79, 0x51, 0x63, 0x16, 0x59, - 0xb1, 0x6c, 0xbc, 0xab, 0x5f, 0xcb, 0xdf, 0x43, 0xd5, 0x3b, 0x46, 0x2a, 0xa8, 0x3d, 0x6e, 0x50, - 0x30, 0x7a, 0x00, 0x72, 0x9a, 0xb3, 0xa7, 0xda, 0x16, 0x75, 0xc9, 0x8e, 0xa5, 0x6a, 0x38, 0x7f, - 0x2f, 0x43, 0x65, 0xf0, 0x35, 0x01, 0x26, 0x33, 0xc2, 0xb9, 0xaa, 0xef, 0xba, 0x82, 0xe3, 0xfd, - 0x6c, 0x46, 0x50, 0x18, 0xe7, 0x76, 0x0a, 0x72, 0x44, 0x13, 0xa1, 0x86, 0x4f, 0x51, 0xb4, 0x51, - 0x6b, 0xcf, 0x0a, 0xb6, 0x7b, 0x37, 0x8c, 0x10, 0x4c, 0xbf, 0xd1, 0x07, 0x58, 0xe2, 0x66, 0xed, - 0x05, 0x5a, 0x7c, 0x1c, 0x8e, 0x11, 0xa4, 0x06, 0x76, 0xd5, 0xaa, 0xea, 0xaa, 0x01, 0xec, 0x87, - 0x28, 0x36, 0x51, 0xfb, 0x2a, 0xaf, 0x0c, 0xc9, 0x69, 0x37, 0x77, 0x0e, 0x3c, 0xc3, 0x7a, 0x98, - 0xc9, 0x49, 0x60, 0xc2, 0xb4, 0x6e, 0x5b, 0x72, 0x2e, 0x17, 0x21, 0x1b, 0xb4, 0x7b, 0x94, 0x01, - 0x66, 0xf9, 0x39, 0x89, 0x24, 0x41, 0x0b, 0xeb, 0x8b, 0x24, 0x7d, 0x79, 0x6b, 0x39, 0x97, 0x20, - 0x69, 0xd4, 0xca, 0xf2, 0x56, 0xb9, 0xa2, 0x6c, 0xaf, 0x6d, 0x2d, 0xaf, 0x96, 0x73, 0xc9, 0x40, - 0x62, 0xff, 0x6c, 0x2a, 0x7d, 0x5f, 0xee, 0x7e, 0xf9, 0x1b, 0x09, 0x18, 0x0d, 0xaf, 0xd4, 0xd0, - 0x9b, 0xe0, 0xb8, 0xd8, 0x56, 0x71, 0xb0, 0x5b, 0xb9, 0xaa, 0xdb, 0x74, 0x42, 0x36, 0x54, 0x16, - 0x1c, 0x3d, 0xfb, 0x99, 0xe4, 0x58, 0x9b, 0xd8, 0x7d, 0x5e, 0xb7, 0xc9, 0x74, 0x6b, 0xa8, 0x2e, - 0x5a, 0x81, 0x69, 0xc3, 0xac, 0x38, 0xae, 0x6a, 0x54, 0x55, 0xbb, 0x5a, 0xf1, 0x37, 0xb4, 0x2a, - 0xaa, 0xa6, 0x61, 0xc7, 0x31, 0x59, 0x20, 0xf4, 0xb8, 0x9c, 0x34, 0xcc, 0x4d, 0x8e, 0xec, 0x47, - 0x88, 0x79, 0x8e, 0x1a, 0x31, 0xdf, 0x64, 0x27, 0xf3, 0xbd, 0x03, 0x32, 0x0d, 0xd5, 0xaa, 0x60, - 0xc3, 0xb5, 0x0f, 0x68, 0x7e, 0x9e, 0x56, 0xd2, 0x0d, 0xd5, 0x2a, 0x93, 0xf2, 0x0f, 0x65, 0x99, - 0xf4, 0x6c, 0x2a, 0x9d, 0xce, 0x65, 0x9e, 0x4d, 0xa5, 0x33, 0x39, 0x90, 0x5f, 0x4f, 0x42, 0x36, - 0x98, 0xaf, 0x93, 0xe5, 0x8f, 0x46, 0x23, 0x96, 0x44, 0x7d, 0xda, 0xdd, 0x5d, 0xb3, 0xfb, 0xd9, - 0x05, 0x12, 0xca, 0x8a, 0x83, 0x2c, 0x39, 0x56, 0x18, 0x25, 0x49, 0x23, 0x88, 0xb1, 0x61, 0x96, - 0x8c, 0xa4, 0x15, 0x5e, 0x42, 0x4b, 0x30, 0xf8, 0xa2, 0x43, 0x79, 0x0f, 0x52, 0xde, 0xf7, 0x74, - 0xe7, 0xfd, 0xec, 0x26, 0x65, 0x9e, 0x79, 0x76, 0xb3, 0xb2, 0xb6, 0xae, 0xac, 0xce, 0xaf, 0x28, - 0x9c, 0x1c, 0x9d, 0x80, 0x54, 0x5d, 0x7d, 0xf9, 0x20, 0x1c, 0xf4, 0x28, 0xa8, 0xd7, 0x41, 0x38, - 0x01, 0xa9, 0xab, 0x58, 0xdd, 0x0f, 0x87, 0x1a, 0x0a, 0xba, 0x8d, 0x93, 0x61, 0x0e, 0x06, 0xa8, - 0xbe, 0x10, 0x00, 0xd7, 0x58, 0xee, 0x08, 0x4a, 0x43, 0x6a, 0x61, 0x5d, 0x21, 0x13, 0x22, 0x07, - 0x59, 0x06, 0xad, 0x6c, 0x2c, 0x97, 0x17, 0xca, 0xb9, 0x84, 0x7c, 0x16, 0x06, 0x99, 0x12, 0xc8, - 0x64, 0xf1, 0xd4, 0x90, 0x3b, 0xc2, 0x8b, 0x9c, 0x87, 0x24, 0x6a, 0xb7, 0x57, 0x4b, 0x65, 0x25, - 0x97, 0x08, 0x0f, 0x75, 0x2a, 0x37, 0x20, 0x3b, 0x90, 0x0d, 0xe6, 0xe1, 0x3f, 0x9c, 0xc5, 0xf8, - 0x97, 0x24, 0x18, 0x0e, 0xe4, 0xd5, 0x24, 0x21, 0x52, 0xeb, 0x75, 0xf3, 0x6a, 0x45, 0xad, 0xeb, - 0xaa, 0xc3, 0x4d, 0x03, 0x28, 0x68, 0x9e, 0x40, 0x7a, 0x1d, 0xba, 0x1f, 0xd2, 0x14, 0x19, 0xc8, - 0x0d, 0xca, 0x9f, 0x90, 0x20, 0x17, 0x4d, 0x6c, 0x23, 0x62, 0x4a, 0x3f, 0x4a, 0x31, 0xe5, 0x8f, - 0x4b, 0x30, 0x1a, 0xce, 0x66, 0x23, 0xe2, 0xdd, 0xf5, 0x23, 0x15, 0xef, 0x0f, 0x12, 0x30, 0x12, - 0xca, 0x61, 0x7b, 0x95, 0xee, 0x25, 0x18, 0xd7, 0xab, 0xb8, 0x61, 0x99, 0x2e, 0x36, 0xb4, 0x83, - 0x4a, 0x1d, 0x5f, 0xc1, 0xf5, 0xbc, 0x4c, 0x9d, 0xc6, 0x5c, 0xf7, 0x2c, 0x79, 0x76, 0xd9, 0xa7, - 0x5b, 0x21, 0x64, 0xc5, 0x89, 0xe5, 0xc5, 0xf2, 0xea, 0xc6, 0xfa, 0x56, 0x79, 0x6d, 0xe1, 0x2d, - 0x95, 0xed, 0xb5, 0x4b, 0x6b, 0xeb, 0xcf, 0xaf, 0x29, 0x39, 0x3d, 0x82, 0x76, 0x1b, 0xa7, 0xfd, - 0x06, 0xe4, 0xa2, 0x42, 0xa1, 0xe3, 0xd0, 0x4e, 0xac, 0xdc, 0x11, 0x34, 0x01, 0x63, 0x6b, 0xeb, - 0x95, 0xcd, 0xe5, 0xc5, 0x72, 0xa5, 0x7c, 0xe1, 0x42, 0x79, 0x61, 0x6b, 0x93, 0xed, 0x7b, 0x78, - 0xd8, 0x5b, 0xa1, 0x09, 0x2e, 0xbf, 0x96, 0x84, 0x89, 0x36, 0x92, 0xa0, 0x79, 0xbe, 0x62, 0x61, - 0x8b, 0xa8, 0x87, 0x7b, 0x91, 0x7e, 0x96, 0xe4, 0x0c, 0x1b, 0xaa, 0xed, 0xf2, 0x05, 0xce, 0x03, - 0x40, 0xb4, 0x64, 0xb8, 0xfa, 0xae, 0x8e, 0x6d, 0xbe, 0x9f, 0xc4, 0x96, 0x31, 0x63, 0x3e, 0x9c, - 0x6d, 0x29, 0x3d, 0x04, 0xc8, 0x32, 0x1d, 0xdd, 0xd5, 0xaf, 0xe0, 0x8a, 0x6e, 0x88, 0xcd, 0x27, - 0xb2, 0xac, 0x49, 0x29, 0x39, 0x51, 0xb3, 0x6c, 0xb8, 0x1e, 0xb6, 0x81, 0x6b, 0x6a, 0x04, 0x9b, - 0x38, 0xf3, 0xa4, 0x92, 0x13, 0x35, 0x1e, 0xf6, 0x5d, 0x90, 0xad, 0x9a, 0x4d, 0x92, 0xeb, 0x31, - 0x3c, 0x12, 0x3b, 0x24, 0x65, 0x98, 0xc1, 0x3c, 0x14, 0x9e, 0xc5, 0xfb, 0xbb, 0x5e, 0x59, 0x65, - 0x98, 0xc1, 0x18, 0xca, 0xfd, 0x30, 0xa6, 0xd6, 0x6a, 0x36, 0x61, 0x2e, 0x18, 0xb1, 0x75, 0xc9, - 0xa8, 0x07, 0xa6, 0x88, 0x85, 0x67, 0x21, 0x2d, 0xf4, 0x40, 0x42, 0x35, 0xd1, 0x44, 0xc5, 0x62, - 0x8b, 0xed, 0xc4, 0xa9, 0x8c, 0x92, 0x36, 0x44, 0xe5, 0x5d, 0x90, 0xd5, 0x9d, 0x8a, 0xbf, 0x89, - 0x9f, 0x98, 0x49, 0x9c, 0x4a, 0x2b, 0xc3, 0xba, 0xe3, 0x6d, 0x80, 0xca, 0x9f, 0x49, 0xc0, 0x68, - 0xf8, 0x10, 0x02, 0x2d, 0x42, 0xba, 0x6e, 0x6a, 0x2a, 0x35, 0x2d, 0x76, 0x02, 0x76, 0x2a, 0xe6, - 0xdc, 0x62, 0x76, 0x85, 0xe3, 0x2b, 0x1e, 0x65, 0xe1, 0xb7, 0x25, 0x48, 0x0b, 0x30, 0x3a, 0x06, - 0x29, 0x4b, 0x75, 0xf7, 0x28, 0xbb, 0x81, 0x52, 0x22, 0x27, 0x29, 0xb4, 0x4c, 0xe0, 0x8e, 0xa5, - 0x1a, 0xd4, 0x04, 0x38, 0x9c, 0x94, 0xc9, 0xb8, 0xd6, 0xb1, 0x5a, 0xa5, 0x8b, 0x1e, 0xb3, 0xd1, - 0xc0, 0x86, 0xeb, 0x88, 0x71, 0xe5, 0xf0, 0x05, 0x0e, 0x46, 0x0f, 0xc2, 0xb8, 0x6b, 0xab, 0x7a, - 0x3d, 0x84, 0x9b, 0xa2, 0xb8, 0x39, 0x51, 0xe1, 0x21, 0x17, 0xe1, 0x84, 0xe0, 0x5b, 0xc5, 0xae, - 0xaa, 0xed, 0xe1, 0xaa, 0x4f, 0x34, 0x48, 0x37, 0x37, 0x8e, 0x73, 0x84, 0x45, 0x5e, 0x2f, 0x68, - 0xe5, 0x6f, 0x48, 0x30, 0x2e, 0x96, 0x69, 0x55, 0x4f, 0x59, 0xab, 0x00, 0xaa, 0x61, 0x98, 0x6e, - 0x50, 0x5d, 0xad, 0xa6, 0xdc, 0x42, 0x37, 0x3b, 0xef, 0x11, 0x29, 0x01, 0x06, 0x85, 0x06, 0x80, - 0x5f, 0xd3, 0x51, 0x6d, 0xd3, 0x30, 0xcc, 0x4f, 0x98, 0xe8, 0x31, 0x25, 0x5b, 0xd8, 0x03, 0x03, - 0x91, 0xf5, 0x1c, 0x9a, 0x84, 0x81, 0x1d, 0x5c, 0xd3, 0x0d, 0xbe, 0x6f, 0xcc, 0x0a, 0x62, 0xfb, - 0x25, 0xe5, 0x6d, 0xbf, 0x94, 0x3e, 0x28, 0xc1, 0x84, 0x66, 0x36, 0xa2, 0xf2, 0x96, 0x72, 0x91, - 0xdd, 0x05, 0xe7, 0xa2, 0xf4, 0xd6, 0xa7, 0x6b, 0xba, 0xbb, 0xd7, 0xdc, 0x99, 0xd5, 0xcc, 0xc6, - 0x5c, 0xcd, 0xac, 0xab, 0x46, 0xcd, 0x3f, 0x67, 0xa5, 0x3f, 0xb4, 0x87, 0x6b, 0xd8, 0x78, 0xb8, - 0x66, 0x06, 0x4e, 0x5d, 0xcf, 0xfb, 0x3f, 0xff, 0x4c, 0x92, 0x7e, 0x21, 0x91, 0x5c, 0xda, 0x28, - 0x7d, 0x36, 0x51, 0x58, 0x62, 0xcd, 0x6d, 0x08, 0xf5, 0x28, 0x78, 0xb7, 0x8e, 0x35, 0xd2, 0x65, - 0xf8, 0xf6, 0x83, 0x30, 0x59, 0x33, 0x6b, 0x26, 0xe5, 0x38, 0x47, 0x7e, 0xf1, 0x93, 0xdb, 0x8c, - 0x07, 0x2d, 0xc4, 0x1e, 0xf3, 0x16, 0xd7, 0x60, 0x82, 0x23, 0x57, 0xe8, 0xd1, 0x11, 0x5b, 0xd8, - 0xa0, 0xae, 0xbb, 0x6a, 0xf9, 0x5f, 0xfb, 0x16, 0x0d, 0xe8, 0xca, 0x38, 0x27, 0x25, 0x75, 0x6c, - 0xed, 0x53, 0x54, 0xe0, 0x68, 0x88, 0x1f, 0x9b, 0xb6, 0xd8, 0x8e, 0xe1, 0xf8, 0x9b, 0x9c, 0xe3, - 0x44, 0x80, 0xe3, 0x26, 0x27, 0x2d, 0x2e, 0xc0, 0x48, 0x3f, 0xbc, 0xfe, 0x25, 0xe7, 0x95, 0xc5, - 0x41, 0x26, 0x4b, 0x30, 0x46, 0x99, 0x68, 0x4d, 0xc7, 0x35, 0x1b, 0xd4, 0x27, 0x76, 0x67, 0xf3, - 0x5b, 0xdf, 0x62, 0xf3, 0x68, 0x94, 0x90, 0x2d, 0x78, 0x54, 0xc5, 0x22, 0xd0, 0xd3, 0xb2, 0x2a, - 0xd6, 0xea, 0x31, 0x1c, 0xbe, 0xc2, 0x05, 0xf1, 0xf0, 0x8b, 0x97, 0x61, 0x92, 0xfc, 0xa6, 0x2e, - 0x2b, 0x28, 0x49, 0xfc, 0x16, 0x5c, 0xfe, 0x1b, 0xef, 0x61, 0x53, 0x75, 0xc2, 0x63, 0x10, 0x90, - 0x29, 0x30, 0x8a, 0x35, 0xec, 0xba, 0xd8, 0x76, 0x2a, 0x6a, 0xbd, 0x9d, 0x78, 0x81, 0x3d, 0x8c, - 0xfc, 0xc7, 0xbe, 0x13, 0x1e, 0xc5, 0x25, 0x46, 0x39, 0x5f, 0xaf, 0x17, 0xb7, 0xe1, 0x78, 0x1b, - 0xab, 0xe8, 0x81, 0xe7, 0x6b, 0x9c, 0xe7, 0x64, 0x8b, 0x65, 0x10, 0xb6, 0x1b, 0x20, 0xe0, 0xde, - 0x58, 0xf6, 0xc0, 0xf3, 0xe7, 0x39, 0x4f, 0xc4, 0x69, 0xc5, 0x90, 0x12, 0x8e, 0xcf, 0xc2, 0xf8, - 0x15, 0x6c, 0xef, 0x98, 0x0e, 0xdf, 0x37, 0xea, 0x81, 0xdd, 0xc7, 0x39, 0xbb, 0x31, 0x4e, 0x48, - 0x37, 0x92, 0x08, 0xaf, 0xa7, 0x20, 0xbd, 0xab, 0x6a, 0xb8, 0x07, 0x16, 0xd7, 0x39, 0x8b, 0x21, - 0x82, 0x4f, 0x48, 0xe7, 0x21, 0x5b, 0x33, 0x79, 0xd4, 0x8a, 0x27, 0xff, 0x04, 0x27, 0x1f, 0x16, - 0x34, 0x9c, 0x85, 0x65, 0x5a, 0xcd, 0x3a, 0x09, 0x69, 0xf1, 0x2c, 0xfe, 0xa6, 0x60, 0x21, 0x68, - 0x38, 0x8b, 0x3e, 0xd4, 0xfa, 0x49, 0xc1, 0xc2, 0x09, 0xe8, 0xf3, 0x19, 0x18, 0x36, 0x8d, 0xfa, - 0x81, 0x69, 0xf4, 0x22, 0xc4, 0xa7, 0x38, 0x07, 0xe0, 0x24, 0x84, 0xc1, 0x79, 0xc8, 0xf4, 0x3a, - 0x10, 0x7f, 0xeb, 0x3b, 0x62, 0x7a, 0x88, 0x11, 0x58, 0x82, 0x31, 0xe1, 0xa0, 0x74, 0xd3, 0xe8, - 0x81, 0xc5, 0xdf, 0xe6, 0x2c, 0x46, 0x03, 0x64, 0xbc, 0x1b, 0x2e, 0x76, 0xdc, 0x1a, 0xee, 0x85, - 0xc9, 0x67, 0x44, 0x37, 0x38, 0x09, 0x57, 0xe5, 0x0e, 0x36, 0xb4, 0xbd, 0xde, 0x38, 0xfc, 0x92, - 0x50, 0xa5, 0xa0, 0x21, 0x2c, 0x16, 0x60, 0xa4, 0xa1, 0xda, 0xce, 0x9e, 0x5a, 0xef, 0x69, 0x38, - 0xfe, 0x0e, 0xe7, 0x91, 0xf5, 0x88, 0xb8, 0x46, 0x9a, 0x46, 0x3f, 0x6c, 0x3e, 0x2b, 0x34, 0x12, - 0x20, 0xe3, 0x53, 0xcf, 0x71, 0xe9, 0x26, 0x5b, 0x3f, 0xdc, 0x7e, 0x59, 0x4c, 0x3d, 0x46, 0xbb, - 0x1a, 0xe4, 0x78, 0x1e, 0x32, 0x8e, 0xfe, 0x72, 0x4f, 0x6c, 0x3e, 0x27, 0x46, 0x9a, 0x12, 0x10, - 0xe2, 0xb7, 0xc0, 0x89, 0xb6, 0x61, 0xa2, 0x07, 0x66, 0x7f, 0x97, 0x33, 0x3b, 0xd6, 0x26, 0x54, - 0x70, 0x97, 0xd0, 0x2f, 0xcb, 0xbf, 0x27, 0x5c, 0x02, 0x8e, 0xf0, 0xda, 0x20, 0xeb, 0x08, 0x47, - 0xdd, 0xed, 0x4f, 0x6b, 0xbf, 0x22, 0xb4, 0xc6, 0x68, 0x43, 0x5a, 0xdb, 0x82, 0x63, 0x9c, 0x63, - 0x7f, 0xe3, 0xfa, 0xab, 0xc2, 0xb1, 0x32, 0xea, 0xed, 0xf0, 0xe8, 0xbe, 0x0d, 0x0a, 0x9e, 0x3a, - 0x45, 0xc2, 0xea, 0x54, 0x1a, 0xaa, 0xd5, 0x03, 0xe7, 0x5f, 0xe3, 0x9c, 0x85, 0xc7, 0xf7, 0x32, - 0x5e, 0x67, 0x55, 0xb5, 0x08, 0xf3, 0x17, 0x20, 0x2f, 0x98, 0x37, 0x0d, 0x1b, 0x6b, 0x66, 0xcd, - 0xd0, 0x5f, 0xc6, 0xd5, 0x1e, 0x58, 0xff, 0x7a, 0x64, 0xa8, 0xb6, 0x03, 0xe4, 0x84, 0xf3, 0x32, - 0xe4, 0xbc, 0x5c, 0xa5, 0xa2, 0x37, 0x2c, 0xd3, 0x76, 0x63, 0x38, 0x7e, 0x5e, 0x8c, 0x94, 0x47, - 0xb7, 0x4c, 0xc9, 0x8a, 0x65, 0x60, 0x27, 0xcf, 0xbd, 0x9a, 0xe4, 0x17, 0x38, 0xa3, 0x11, 0x9f, - 0x8a, 0x3b, 0x0e, 0xcd, 0x6c, 0x58, 0xaa, 0xdd, 0x8b, 0xff, 0xfb, 0xfb, 0xc2, 0x71, 0x70, 0x12, - 0xee, 0x38, 0xdc, 0x03, 0x0b, 0x93, 0x68, 0xdf, 0x03, 0x87, 0x2f, 0x0a, 0xc7, 0x21, 0x68, 0x38, - 0x0b, 0x91, 0x30, 0xf4, 0xc0, 0xe2, 0x1f, 0x08, 0x16, 0x82, 0x86, 0xb0, 0x78, 0xce, 0x0f, 0xb4, - 0x36, 0xae, 0xe9, 0x8e, 0x6b, 0xb3, 0x34, 0xb9, 0x3b, 0xab, 0x7f, 0xf8, 0x9d, 0x70, 0x12, 0xa6, - 0x04, 0x48, 0x89, 0x27, 0xe2, 0xdb, 0xae, 0x74, 0x15, 0x15, 0x2f, 0xd8, 0x6f, 0x08, 0x4f, 0x14, - 0x20, 0x23, 0xb2, 0x05, 0x32, 0x44, 0xa2, 0x76, 0x8d, 0xac, 0x1d, 0x7a, 0x60, 0xf7, 0x8f, 0x22, - 0xc2, 0x6d, 0x0a, 0x5a, 0xc2, 0x33, 0x90, 0xff, 0x34, 0x8d, 0x7d, 0x7c, 0xd0, 0x93, 0x75, 0xfe, - 0xe3, 0x48, 0xfe, 0xb3, 0xcd, 0x28, 0x99, 0x0f, 0x19, 0x8b, 0xe4, 0x53, 0x28, 0xee, 0x9e, 0x51, - 0xfe, 0xa7, 0xbe, 0xc7, 0xfb, 0x1b, 0x4e, 0xa7, 0x8a, 0x2b, 0xc4, 0xc8, 0xc3, 0x49, 0x4f, 0x3c, - 0xb3, 0xf7, 0x7c, 0xcf, 0xb3, 0xf3, 0x50, 0xce, 0x53, 0xbc, 0x00, 0x23, 0xa1, 0x84, 0x27, 0x9e, - 0xd5, 0x7b, 0x39, 0xab, 0x6c, 0x30, 0xdf, 0x29, 0x9e, 0x85, 0x14, 0x49, 0x5e, 0xe2, 0xc9, 0xff, - 0x32, 0x27, 0xa7, 0xe8, 0xc5, 0x37, 0x43, 0x5a, 0x24, 0x2d, 0xf1, 0xa4, 0xef, 0xe3, 0xa4, 0x1e, - 0x09, 0x21, 0x17, 0x09, 0x4b, 0x3c, 0xf9, 0x5f, 0x11, 0xe4, 0x82, 0x84, 0x90, 0xf7, 0xae, 0xc2, - 0x2f, 0xfd, 0x74, 0x8a, 0x07, 0x1d, 0xa1, 0xbb, 0xf3, 0x30, 0xc4, 0x33, 0x95, 0x78, 0xea, 0x0f, - 0xf0, 0xc6, 0x05, 0x45, 0xf1, 0x09, 0x18, 0xe8, 0x51, 0xe1, 0x3f, 0xc3, 0x49, 0x19, 0x7e, 0x71, - 0x01, 0x86, 0x03, 0xd9, 0x49, 0x3c, 0xf9, 0x5f, 0xe3, 0xe4, 0x41, 0x2a, 0x22, 0x3a, 0xcf, 0x4e, - 0xe2, 0x19, 0x7c, 0x50, 0x88, 0xce, 0x29, 0x88, 0xda, 0x44, 0x62, 0x12, 0x4f, 0xfd, 0x21, 0xa1, - 0x75, 0x41, 0x52, 0x7c, 0x06, 0x32, 0x5e, 0xb0, 0x89, 0xa7, 0xff, 0x30, 0xa7, 0xf7, 0x69, 0x88, - 0x06, 0x02, 0xc1, 0x2e, 0x9e, 0xc5, 0x5f, 0x17, 0x1a, 0x08, 0x50, 0x91, 0x69, 0x14, 0x4d, 0x60, - 0xe2, 0x39, 0x7d, 0x44, 0x4c, 0xa3, 0x48, 0xfe, 0x42, 0x46, 0x93, 0xfa, 0xfc, 0x78, 0x16, 0x3f, - 0x2b, 0x46, 0x93, 0xe2, 0x13, 0x31, 0xa2, 0x19, 0x41, 0x3c, 0x8f, 0xbf, 0x21, 0xc4, 0x88, 0x24, - 0x04, 0xc5, 0x0d, 0x40, 0xad, 0xd9, 0x40, 0x3c, 0xbf, 0x8f, 0x72, 0x7e, 0xe3, 0x2d, 0xc9, 0x40, - 0xf1, 0x79, 0x38, 0xd6, 0x3e, 0x13, 0x88, 0xe7, 0xfa, 0xb1, 0xef, 0x45, 0xd6, 0x6e, 0xc1, 0x44, - 0xa0, 0xb8, 0xe5, 0x87, 0x94, 0x60, 0x16, 0x10, 0xcf, 0xf6, 0xb5, 0xef, 0x85, 0x1d, 0x77, 0x30, - 0x09, 0x28, 0xce, 0x03, 0xf8, 0x01, 0x38, 0x9e, 0xd7, 0xc7, 0x39, 0xaf, 0x00, 0x11, 0x99, 0x1a, - 0x3c, 0xfe, 0xc6, 0xd3, 0x5f, 0x17, 0x53, 0x83, 0x53, 0x90, 0xa9, 0x21, 0x42, 0x6f, 0x3c, 0xf5, - 0x27, 0xc4, 0xd4, 0x10, 0x24, 0xc4, 0xb2, 0x03, 0xd1, 0x2d, 0x9e, 0xc3, 0xa7, 0x84, 0x65, 0x07, - 0xa8, 0x8a, 0x6b, 0x30, 0xde, 0x12, 0x10, 0xe3, 0x59, 0xfd, 0x02, 0x67, 0x95, 0x8b, 0xc6, 0xc3, - 0x60, 0xf0, 0xe2, 0xc1, 0x30, 0x9e, 0xdb, 0xa7, 0x23, 0xc1, 0x8b, 0xc7, 0xc2, 0xe2, 0x79, 0x48, - 0x1b, 0xcd, 0x7a, 0x9d, 0x4c, 0x1e, 0xd4, 0xfd, 0x6e, 0x60, 0xfe, 0xbf, 0x7c, 0x9f, 0x6b, 0x47, - 0x10, 0x14, 0xcf, 0xc2, 0x00, 0x6e, 0xec, 0xe0, 0x6a, 0x1c, 0xe5, 0xb7, 0xbf, 0x2f, 0x1c, 0x26, - 0xc1, 0x2e, 0x3e, 0x03, 0xc0, 0xb6, 0x46, 0xe8, 0xf1, 0x60, 0x0c, 0xed, 0x7f, 0xfd, 0x3e, 0xbf, - 0x8c, 0xe3, 0x93, 0xf8, 0x0c, 0xd8, 0xd5, 0x9e, 0xee, 0x0c, 0xbe, 0x13, 0x66, 0x40, 0x47, 0xe4, - 0x29, 0x18, 0x7a, 0xd1, 0x31, 0x0d, 0x57, 0xad, 0xc5, 0x51, 0xff, 0x37, 0x4e, 0x2d, 0xf0, 0x89, - 0xc2, 0x1a, 0xa6, 0x8d, 0x5d, 0xb5, 0xe6, 0xc4, 0xd1, 0xfe, 0x77, 0x4e, 0xeb, 0x11, 0x10, 0x62, - 0x4d, 0x75, 0xdc, 0x5e, 0xfa, 0xfd, 0x47, 0x82, 0x58, 0x10, 0x10, 0xa1, 0xc9, 0xef, 0x7d, 0x7c, - 0x10, 0x47, 0xfb, 0x5d, 0x21, 0x34, 0xc7, 0x2f, 0xbe, 0x19, 0x32, 0xe4, 0x27, 0xbb, 0x61, 0x17, - 0x43, 0xfc, 0xc7, 0x9c, 0xd8, 0xa7, 0x20, 0x2d, 0x3b, 0x6e, 0xd5, 0xd5, 0xe3, 0x95, 0x7d, 0x93, - 0x8f, 0xb4, 0xc0, 0x2f, 0xce, 0xc3, 0xb0, 0xe3, 0x56, 0xab, 0x4d, 0x9e, 0x9f, 0xc6, 0x90, 0xff, - 0xc9, 0xf7, 0xbd, 0x2d, 0x0b, 0x8f, 0x86, 0x8c, 0xf6, 0xd5, 0x7d, 0xd7, 0x32, 0xe9, 0x11, 0x48, - 0x1c, 0x87, 0xef, 0x71, 0x0e, 0x01, 0x92, 0xe2, 0x02, 0x64, 0x49, 0x5f, 0x6c, 0x6c, 0x61, 0x7a, - 0x5e, 0x15, 0xc3, 0xe2, 0x4f, 0xb9, 0x02, 0x42, 0x44, 0xa5, 0x9f, 0xfc, 0xca, 0xeb, 0x53, 0xd2, - 0xd7, 0x5f, 0x9f, 0x92, 0xfe, 0xe0, 0xf5, 0x29, 0xe9, 0x43, 0xdf, 0x9c, 0x3a, 0xf2, 0xf5, 0x6f, - 0x4e, 0x1d, 0xf9, 0xdd, 0x6f, 0x4e, 0x1d, 0x69, 0xbf, 0x6d, 0x0c, 0x4b, 0xe6, 0x92, 0xc9, 0x36, - 0x8c, 0xdf, 0x2a, 0x87, 0xb6, 0x8b, 0x6b, 0xa6, 0xbf, 0x5b, 0xeb, 0x2d, 0x72, 0xe0, 0x4f, 0x25, - 0xb2, 0x60, 0x0e, 0xef, 0xe5, 0xaa, 0xc6, 0x41, 0x87, 0xb7, 0x3a, 0x85, 0xb6, 0x1b, 0xc3, 0xf2, - 0x9b, 0x20, 0x39, 0x6f, 0x1c, 0xa0, 0x13, 0xcc, 0xe7, 0x55, 0x9a, 0x76, 0x9d, 0xdf, 0xfc, 0x1a, - 0x22, 0xe5, 0x6d, 0xbb, 0x8e, 0x26, 0xfd, 0xeb, 0x99, 0xd2, 0xa9, 0x2c, 0xbf, 0x73, 0x59, 0x4c, - 0x7d, 0xf7, 0x53, 0xd3, 0x47, 0x4a, 0xfb, 0xd1, 0x1e, 0x7e, 0x29, 0xb6, 0x97, 0xe9, 0x79, 0xe3, - 0x80, 0x76, 0x72, 0x43, 0x7a, 0xeb, 0x00, 0x69, 0xc3, 0x11, 0x1b, 0xdb, 0x53, 0xd1, 0x8d, 0xed, - 0xe7, 0x71, 0xbd, 0x7e, 0xc9, 0x30, 0xaf, 0x1a, 0x5b, 0x04, 0x6d, 0x67, 0x90, 0x5d, 0x23, 0x86, - 0xbf, 0x9a, 0x80, 0xa9, 0x96, 0x3d, 0x6c, 0x3e, 0xf2, 0x9d, 0x1e, 0x2a, 0x15, 0x21, 0xbd, 0x28, - 0x0c, 0x2a, 0x0f, 0x43, 0x0e, 0xd6, 0x4c, 0xa3, 0xea, 0xd0, 0xae, 0x26, 0x15, 0x51, 0x24, 0x5d, - 0x35, 0x54, 0xc3, 0x74, 0xf8, 0xed, 0x48, 0x56, 0x28, 0xfd, 0xac, 0xd4, 0xdf, 0x38, 0x8e, 0x88, - 0x96, 0x44, 0x37, 0x4f, 0x77, 0xdb, 0xfb, 0xa7, 0x2a, 0xf0, 0xe4, 0x0f, 0xec, 0xf3, 0xf7, 0xaa, - 0x8e, 0x0f, 0x25, 0x60, 0x3a, 0xaa, 0x0e, 0x32, 0x8f, 0x1c, 0x57, 0x6d, 0x58, 0x9d, 0xf4, 0x71, - 0x1e, 0x32, 0x5b, 0x02, 0xa7, 0x6f, 0x85, 0xfc, 0x5c, 0x9f, 0x0a, 0x19, 0xf5, 0x9a, 0x12, 0x1a, - 0x79, 0x30, 0x5e, 0x23, 0x5e, 0x17, 0x0e, 0xa1, 0x92, 0x77, 0x27, 0xe1, 0x84, 0x66, 0x3a, 0x0d, - 0xd3, 0xa9, 0x30, 0x83, 0x67, 0x05, 0xae, 0x8c, 0x6c, 0xb0, 0xaa, 0x87, 0xe3, 0x90, 0x8b, 0x30, - 0x4a, 0x9d, 0x02, 0xdd, 0x08, 0xa6, 0x7e, 0x38, 0x36, 0x74, 0x7e, 0xf5, 0xdf, 0x0e, 0xd0, 0x49, - 0x34, 0xe2, 0x11, 0xd2, 0x9b, 0x2e, 0x5b, 0x30, 0xa9, 0x37, 0xac, 0x3a, 0xa6, 0x47, 0x62, 0x15, - 0xaf, 0x2e, 0x9e, 0xdf, 0xd7, 0x38, 0xbf, 0x09, 0x9f, 0x7c, 0x59, 0x50, 0x17, 0x57, 0x60, 0x5c, - 0xd5, 0x34, 0x6c, 0x85, 0x58, 0xc6, 0x38, 0x2c, 0x21, 0x60, 0x8e, 0x53, 0x7a, 0xdc, 0x4a, 0xcf, - 0x74, 0x1a, 0xdb, 0xb7, 0xde, 0x1b, 0x18, 0x34, 0x1b, 0xd7, 0xb0, 0xf1, 0xb0, 0x81, 0xdd, 0xab, - 0xa6, 0xbd, 0xcf, 0xd5, 0xfb, 0x30, 0x6b, 0x4a, 0x0c, 0xc2, 0x7b, 0x93, 0x30, 0xc5, 0x2a, 0xe6, - 0x76, 0x54, 0x07, 0xcf, 0x5d, 0x79, 0x74, 0x07, 0xbb, 0xea, 0xa3, 0x73, 0x9a, 0xa9, 0x8b, 0x69, - 0x3a, 0xc1, 0xc7, 0x85, 0xd4, 0xcf, 0xf2, 0xfa, 0x0e, 0x7e, 0x6a, 0x09, 0x52, 0x0b, 0xa6, 0x6e, - 0x10, 0x8b, 0xac, 0x62, 0xc3, 0x6c, 0x70, 0x2f, 0xc5, 0x0a, 0xe8, 0x6e, 0x18, 0x54, 0x1b, 0x66, - 0xd3, 0x70, 0xd9, 0x69, 0x5e, 0x69, 0xf8, 0x2b, 0x37, 0xa6, 0x8f, 0xfc, 0xde, 0x8d, 0xe9, 0xe4, - 0xb2, 0xe1, 0x2a, 0xbc, 0xaa, 0x98, 0x7a, 0xe3, 0x93, 0xd3, 0x92, 0xfc, 0x2c, 0x0c, 0x2d, 0x62, - 0xed, 0x30, 0xbc, 0x16, 0xb1, 0x16, 0xe1, 0xf5, 0x00, 0xa4, 0x97, 0x0d, 0x97, 0xdd, 0x20, 0xbe, - 0x13, 0x92, 0xba, 0xc1, 0x2e, 0xa5, 0x45, 0xda, 0x27, 0x70, 0x82, 0xba, 0x88, 0x35, 0x0f, 0xb5, - 0x8a, 0xb5, 0x28, 0x2a, 0x61, 0x4f, 0xe0, 0xa5, 0xc5, 0xdf, 0xfd, 0x4f, 0x53, 0x47, 0x5e, 0x79, - 0x7d, 0xea, 0x48, 0xc7, 0x91, 0x08, 0x46, 0x07, 0xae, 0x62, 0x3e, 0x04, 0x4e, 0x75, 0x7f, 0xce, - 0x0d, 0xcd, 0x85, 0xcf, 0xa6, 0xe0, 0x4e, 0xfa, 0x78, 0xc4, 0x6e, 0xe8, 0x86, 0x3b, 0xa7, 0xd9, - 0x07, 0x96, 0x4b, 0xc3, 0x89, 0xb9, 0xcb, 0x47, 0x61, 0xdc, 0xaf, 0x9e, 0x65, 0xd5, 0x1d, 0xc6, - 0x60, 0x17, 0x06, 0x36, 0x08, 0x1d, 0x51, 0x9c, 0x6b, 0xba, 0x6a, 0x9d, 0xbb, 0x0b, 0x56, 0x20, - 0x50, 0xf6, 0xe0, 0x24, 0xc1, 0xa0, 0xba, 0x78, 0x6b, 0x52, 0xc7, 0xea, 0x2e, 0xbb, 0xb7, 0x9b, - 0xa4, 0x21, 0x24, 0x4d, 0x00, 0xf4, 0x8a, 0xee, 0x24, 0x0c, 0xa8, 0x4d, 0x76, 0xe4, 0x9c, 0x24, - 0xb1, 0x85, 0x16, 0xe4, 0x4b, 0x30, 0xc4, 0x8f, 0xb9, 0x50, 0x0e, 0x92, 0xfb, 0xf8, 0x80, 0xb6, - 0x93, 0x55, 0xc8, 0x4f, 0x34, 0x0b, 0x03, 0x54, 0x78, 0xfe, 0x20, 0x21, 0x3f, 0xdb, 0x22, 0xfd, - 0x2c, 0x15, 0x52, 0x61, 0x68, 0xf2, 0xb3, 0x90, 0x5e, 0x34, 0x1b, 0xba, 0x61, 0x86, 0xb9, 0x65, - 0x18, 0x37, 0x2a, 0xb3, 0xd5, 0xe4, 0x63, 0xad, 0xb0, 0x02, 0x3a, 0x06, 0x83, 0xec, 0x1e, 0x37, - 0x3f, 0x36, 0xe7, 0x25, 0x79, 0x01, 0x86, 0x28, 0xef, 0x75, 0x0b, 0x21, 0xfe, 0x02, 0x88, 0x5f, - 0x18, 0xa7, 0x6e, 0x81, 0xb3, 0x4f, 0xf8, 0xc2, 0x22, 0x48, 0x55, 0x55, 0x57, 0xe5, 0xfd, 0xa6, - 0xbf, 0xe5, 0xa7, 0x21, 0xcd, 0x99, 0x38, 0xe8, 0x0c, 0x24, 0x4d, 0xcb, 0xe1, 0x07, 0xdf, 0x85, - 0x4e, 0x5d, 0x59, 0xb7, 0x4a, 0x29, 0x62, 0x25, 0x0a, 0x41, 0x2e, 0x29, 0x1d, 0xcd, 0xe2, 0xc9, - 0x80, 0x59, 0x04, 0x86, 0x3c, 0xf0, 0x93, 0x0d, 0x69, 0x8b, 0x39, 0x78, 0xc6, 0xf2, 0xa9, 0x04, - 0x4c, 0x05, 0x6a, 0xaf, 0x60, 0x9b, 0xac, 0xf5, 0x98, 0x45, 0x71, 0x6b, 0x41, 0x01, 0x21, 0x79, - 0x7d, 0x07, 0x73, 0x79, 0x33, 0x24, 0xe7, 0x2d, 0x0b, 0x15, 0x20, 0xcd, 0x0e, 0xb8, 0x4d, 0x66, - 0x2f, 0x29, 0xc5, 0x2b, 0x93, 0x3a, 0xc7, 0xdc, 0x75, 0xaf, 0xaa, 0xb6, 0xf7, 0xd4, 0x49, 0x94, - 0xe5, 0xa7, 0x20, 0xb3, 0x60, 0x1a, 0x0e, 0x36, 0x9c, 0x26, 0x0d, 0x44, 0x3b, 0x75, 0x53, 0xdb, - 0xe7, 0x1c, 0x58, 0x81, 0x28, 0x5c, 0xb5, 0x2c, 0x4a, 0x99, 0x52, 0xc8, 0x4f, 0x36, 0x2f, 0x4b, - 0x9b, 0x1d, 0x55, 0xf4, 0x54, 0xff, 0x2a, 0xe2, 0x9d, 0xf4, 0x74, 0xf4, 0xbf, 0x25, 0x38, 0xd9, - 0x3a, 0xa1, 0xf6, 0xf1, 0x81, 0xd3, 0xef, 0x7c, 0x7a, 0x01, 0x32, 0x1b, 0xf4, 0xbd, 0xf1, 0x25, - 0x7c, 0x80, 0x0a, 0x30, 0x84, 0xab, 0x67, 0xce, 0x9e, 0x7d, 0xf4, 0x29, 0x66, 0xed, 0x17, 0x8f, - 0x28, 0x02, 0x80, 0xa6, 0x20, 0xe3, 0x60, 0xcd, 0x3a, 0x73, 0xf6, 0xdc, 0xfe, 0xa3, 0xcc, 0xbc, - 0x2e, 0x1e, 0x51, 0x7c, 0x50, 0x31, 0x4d, 0x7a, 0xfd, 0xc6, 0xa7, 0xa6, 0xa5, 0xd2, 0x00, 0x24, - 0x9d, 0x66, 0xe3, 0xb6, 0xda, 0xc8, 0x6b, 0x03, 0x30, 0x13, 0xa4, 0xa4, 0xd1, 0xfa, 0x8a, 0x5a, - 0xd7, 0xab, 0xaa, 0xff, 0x52, 0x3c, 0x17, 0xd0, 0x01, 0xc5, 0x68, 0xaf, 0x82, 0x42, 0x57, 0x4d, - 0xca, 0xbf, 0x2e, 0x41, 0xf6, 0xb2, 0xe0, 0xbc, 0x89, 0x5d, 0x74, 0x1e, 0xc0, 0x6b, 0x49, 0x4c, - 0x9b, 0x3b, 0x66, 0xa3, 0x6d, 0xcd, 0x7a, 0x34, 0x4a, 0x00, 0x1d, 0x3d, 0x41, 0x0d, 0xd1, 0x32, - 0x1d, 0xfe, 0xfc, 0x25, 0x86, 0xd4, 0x43, 0x46, 0x0f, 0x01, 0xa2, 0x1e, 0xae, 0x72, 0xc5, 0x74, - 0x75, 0xa3, 0x56, 0xb1, 0xcc, 0xab, 0xfc, 0x51, 0x61, 0x52, 0xc9, 0xd1, 0x9a, 0xcb, 0xb4, 0x62, - 0x83, 0xc0, 0x89, 0xd0, 0x19, 0x8f, 0x0b, 0xc9, 0xad, 0xd4, 0x6a, 0xd5, 0xc6, 0x8e, 0xc3, 0x9d, - 0x98, 0x28, 0xa2, 0xf3, 0x30, 0x64, 0x35, 0x77, 0x2a, 0xc2, 0x63, 0x0c, 0x9f, 0x39, 0xd9, 0x6e, - 0xfe, 0x0b, 0xfb, 0xe0, 0x1e, 0x60, 0xd0, 0x6a, 0xee, 0x10, 0x6b, 0xb9, 0x0b, 0xb2, 0x6d, 0x84, - 0x19, 0xbe, 0xe2, 0xcb, 0x41, 0x9f, 0xb9, 0xf3, 0x1e, 0x54, 0x2c, 0x5b, 0x37, 0x6d, 0xdd, 0x3d, - 0xa0, 0xb7, 0x57, 0x92, 0x4a, 0x4e, 0x54, 0x6c, 0x70, 0xb8, 0xbc, 0x0f, 0x63, 0x9b, 0x34, 0xb7, - 0xf0, 0x25, 0x3f, 0xeb, 0xcb, 0x27, 0xc5, 0xcb, 0xd7, 0x51, 0xb2, 0x44, 0x8b, 0x64, 0xa5, 0xe7, - 0x3a, 0x5a, 0xe7, 0x13, 0xfd, 0x5b, 0x67, 0x38, 0xda, 0xfd, 0xd1, 0x89, 0xd0, 0xe4, 0xe4, 0xa9, - 0x64, 0xc0, 0x7d, 0xf5, 0x6a, 0x98, 0x71, 0x29, 0x75, 0xa1, 0x7b, 0x50, 0x2d, 0xc4, 0xb8, 0xd1, - 0x42, 0xec, 0x14, 0x92, 0x9f, 0x82, 0x91, 0x0d, 0xd5, 0x76, 0x37, 0xb1, 0x7b, 0x11, 0xab, 0x55, - 0x6c, 0x87, 0xa3, 0xee, 0x88, 0x88, 0xba, 0x08, 0x52, 0x34, 0xb4, 0xb2, 0xa8, 0x43, 0x7f, 0xcb, - 0x7b, 0x90, 0xa2, 0x37, 0xd8, 0xbc, 0x88, 0xcc, 0x29, 0x58, 0x44, 0x26, 0xbe, 0xf4, 0xc0, 0xc5, - 0x8e, 0x58, 0xd0, 0xd1, 0x02, 0x7a, 0x5c, 0xc4, 0xd5, 0x64, 0xf7, 0xb8, 0xca, 0x0d, 0x91, 0x47, - 0xd7, 0x3a, 0x0c, 0x95, 0x88, 0x2b, 0x5e, 0x5e, 0xf4, 0x04, 0x91, 0x7c, 0x41, 0xd0, 0x2a, 0x8c, - 0x59, 0xaa, 0xed, 0xd2, 0xab, 0xfb, 0x7b, 0xb4, 0x17, 0xdc, 0xd6, 0xa7, 0x5b, 0x67, 0x5e, 0xa8, - 0xb3, 0xbc, 0x95, 0x11, 0x2b, 0x08, 0x94, 0xff, 0x30, 0x05, 0x83, 0x5c, 0x19, 0x6f, 0x86, 0x21, - 0xae, 0x56, 0x6e, 0x9d, 0x77, 0xce, 0xb6, 0x06, 0xa6, 0x59, 0x2f, 0x80, 0x70, 0x7e, 0x82, 0x06, - 0xdd, 0x07, 0x69, 0x6d, 0x4f, 0xd5, 0x8d, 0x8a, 0x5e, 0x15, 0x69, 0xde, 0xeb, 0x37, 0xa6, 0x87, - 0x16, 0x08, 0x6c, 0x79, 0x51, 0x19, 0xa2, 0x95, 0xcb, 0x55, 0x92, 0x09, 0xec, 0x61, 0xbd, 0xb6, - 0xe7, 0xf2, 0x19, 0xc6, 0x4b, 0xe8, 0x49, 0x48, 0x11, 0x83, 0xe0, 0x0f, 0xbb, 0x0a, 0x2d, 0xc9, - 0xb6, 0xb7, 0xe2, 0x29, 0xa5, 0x49, 0xc3, 0x1f, 0xfa, 0xfd, 0x69, 0x49, 0xa1, 0x14, 0x68, 0x01, - 0x46, 0xea, 0xaa, 0xe3, 0x56, 0x68, 0x04, 0x23, 0xcd, 0x0f, 0x50, 0x16, 0x27, 0x5a, 0x15, 0xc2, - 0x15, 0xcb, 0x45, 0x1f, 0x26, 0x54, 0x0c, 0x54, 0x45, 0xa7, 0x20, 0x47, 0x99, 0x68, 0x66, 0xa3, - 0xa1, 0xbb, 0x2c, 0xb7, 0x1a, 0xa4, 0x7a, 0x1f, 0x25, 0xf0, 0x05, 0x0a, 0xa6, 0x19, 0xd6, 0x1d, - 0x90, 0xa1, 0x4f, 0x49, 0x28, 0x0a, 0xbb, 0x36, 0x99, 0x26, 0x00, 0x5a, 0x79, 0x3f, 0x8c, 0xf9, - 0xfe, 0x91, 0xa1, 0xa4, 0x19, 0x17, 0x1f, 0x4c, 0x11, 0x1f, 0x81, 0x49, 0x03, 0x5f, 0xa3, 0x17, - 0x39, 0x43, 0xd8, 0x19, 0x8a, 0x8d, 0x48, 0xdd, 0xe5, 0x30, 0xc5, 0xbd, 0x30, 0xaa, 0x09, 0xe5, - 0x33, 0x5c, 0xa0, 0xb8, 0x23, 0x1e, 0x94, 0xa2, 0x9d, 0x80, 0xb4, 0x6a, 0x59, 0x0c, 0x61, 0x98, - 0xfb, 0x47, 0xcb, 0xa2, 0x55, 0xa7, 0x61, 0x9c, 0xf6, 0xd1, 0xc6, 0x4e, 0xb3, 0xee, 0x72, 0x26, - 0x59, 0x8a, 0x33, 0x46, 0x2a, 0x14, 0x06, 0xa7, 0xb8, 0x77, 0xc3, 0x08, 0xbe, 0xa2, 0x57, 0xb1, - 0xa1, 0x61, 0x86, 0x37, 0x42, 0xf1, 0xb2, 0x02, 0x48, 0x91, 0x1e, 0x00, 0xcf, 0xef, 0x55, 0x84, - 0x4f, 0x1e, 0x65, 0xfc, 0x04, 0x7c, 0x9e, 0x81, 0xe5, 0x3c, 0xa4, 0x16, 0x55, 0x57, 0x25, 0x09, - 0x86, 0x7b, 0x8d, 0x05, 0x9a, 0xac, 0x42, 0x7e, 0xca, 0x6f, 0x24, 0x20, 0x75, 0xd9, 0x74, 0x31, - 0x7a, 0x2c, 0x90, 0x00, 0x8e, 0xb6, 0xb3, 0xe7, 0x4d, 0xbd, 0x66, 0xe0, 0xea, 0xaa, 0x53, 0x0b, - 0xbc, 0xfb, 0xf6, 0xcd, 0x29, 0x11, 0x32, 0xa7, 0x49, 0x18, 0xb0, 0xcd, 0xa6, 0x51, 0x15, 0x37, - 0x0e, 0x69, 0x01, 0x95, 0x21, 0xed, 0x59, 0x49, 0x2a, 0xce, 0x4a, 0xc6, 0x88, 0x95, 0x10, 0x1b, - 0xe6, 0x00, 0x65, 0x68, 0x87, 0x1b, 0x4b, 0x09, 0x32, 0x9e, 0xf3, 0xe2, 0xd6, 0xd6, 0x9b, 0xc1, - 0xfa, 0x64, 0x24, 0x98, 0x78, 0x63, 0xef, 0x29, 0x8f, 0x59, 0x5c, 0xce, 0xab, 0xe0, 0xda, 0x0b, - 0x99, 0x15, 0x7f, 0x83, 0x3e, 0x44, 0xfb, 0xe5, 0x9b, 0x15, 0x7b, 0x87, 0x7e, 0x12, 0x32, 0x8e, - 0x5e, 0x33, 0x54, 0xb7, 0x69, 0x63, 0x6e, 0x79, 0x3e, 0x40, 0xfe, 0x92, 0x04, 0x83, 0xcc, 0x92, - 0x03, 0x7a, 0x93, 0xda, 0xeb, 0x2d, 0xd1, 0x49, 0x6f, 0xc9, 0xc3, 0xeb, 0x6d, 0x1e, 0xc0, 0x13, - 0xc6, 0xe1, 0x4f, 0x83, 0xdb, 0x64, 0x0c, 0x4c, 0xc4, 0x4d, 0xbd, 0xc6, 0x27, 0x6a, 0x80, 0x48, - 0xfe, 0x8f, 0x12, 0x49, 0x62, 0x79, 0x3d, 0x9a, 0x87, 0x11, 0x21, 0x57, 0x65, 0xb7, 0xae, 0xd6, - 0xb8, 0xed, 0xdc, 0xd9, 0x51, 0xb8, 0x0b, 0x75, 0xb5, 0xa6, 0x0c, 0x73, 0x79, 0x48, 0xa1, 0xfd, - 0x38, 0x24, 0x3a, 0x8c, 0x43, 0x68, 0xe0, 0x93, 0x87, 0x1b, 0xf8, 0xd0, 0x10, 0xa5, 0xa2, 0x43, - 0xf4, 0xf9, 0x04, 0x5d, 0xcc, 0x58, 0xa6, 0xa3, 0xd6, 0x7f, 0x18, 0x33, 0xe2, 0x0e, 0xc8, 0x58, - 0x66, 0xbd, 0xc2, 0x6a, 0xd8, 0x4d, 0xdc, 0xb4, 0x65, 0xd6, 0x95, 0x96, 0x61, 0x1f, 0xb8, 0x45, - 0xd3, 0x65, 0xf0, 0x16, 0x68, 0x6d, 0x28, 0xaa, 0x35, 0x1b, 0xb2, 0x4c, 0x15, 0x3c, 0x96, 0x3d, - 0x42, 0x74, 0x40, 0x83, 0xa3, 0xd4, 0x1a, 0x7b, 0x99, 0xd8, 0x0c, 0x53, 0xe1, 0x78, 0x84, 0x82, - 0xb9, 0xfe, 0x76, 0xab, 0xe0, 0xa0, 0x59, 0x2a, 0x1c, 0x4f, 0xfe, 0x39, 0x09, 0x60, 0x85, 0x68, - 0x96, 0xf6, 0x97, 0x44, 0x21, 0x87, 0x8a, 0x50, 0x09, 0xb5, 0x3c, 0xd5, 0x69, 0xd0, 0x78, 0xfb, - 0x59, 0x27, 0x28, 0xf7, 0x02, 0x8c, 0xf8, 0xc6, 0xe8, 0x60, 0x21, 0xcc, 0x54, 0x97, 0xac, 0x7a, - 0x13, 0xbb, 0x4a, 0xf6, 0x4a, 0xa0, 0x24, 0xff, 0x33, 0x09, 0x32, 0x54, 0xa6, 0x55, 0xec, 0xaa, - 0xa1, 0x31, 0x94, 0x0e, 0x3f, 0x86, 0x77, 0x02, 0x30, 0x36, 0x8e, 0xfe, 0x32, 0xe6, 0x96, 0x95, - 0xa1, 0x90, 0x4d, 0xfd, 0x65, 0x8c, 0xce, 0x79, 0x0a, 0x4f, 0x76, 0x57, 0xb8, 0xc8, 0xba, 0xb9, - 0xda, 0x8f, 0xc3, 0x10, 0xfd, 0x94, 0xce, 0x35, 0x87, 0x27, 0xd2, 0x83, 0x46, 0xb3, 0xb1, 0x75, - 0xcd, 0x91, 0x5f, 0x84, 0xa1, 0xad, 0x6b, 0x6c, 0x6f, 0xe4, 0x0e, 0xc8, 0xd8, 0xa6, 0xc9, 0x63, - 0x32, 0xcb, 0x85, 0xd2, 0x04, 0x40, 0x43, 0x90, 0xd8, 0x0f, 0x48, 0xf8, 0xfb, 0x01, 0xfe, 0x86, - 0x46, 0xb2, 0xa7, 0x0d, 0x8d, 0xd3, 0xff, 0x4e, 0x82, 0xe1, 0x80, 0x7f, 0x40, 0x8f, 0xc2, 0xd1, - 0xd2, 0xca, 0xfa, 0xc2, 0xa5, 0xca, 0xf2, 0x62, 0xe5, 0xc2, 0xca, 0xfc, 0x92, 0xff, 0xd6, 0xa4, - 0x70, 0xec, 0xd5, 0xeb, 0x33, 0x28, 0x80, 0xbb, 0x6d, 0xec, 0x1b, 0xe6, 0x55, 0x03, 0xcd, 0xc1, - 0x64, 0x98, 0x64, 0xbe, 0xb4, 0x59, 0x5e, 0xdb, 0xca, 0x49, 0x85, 0xa3, 0xaf, 0x5e, 0x9f, 0x19, - 0x0f, 0x50, 0xcc, 0xef, 0x38, 0xd8, 0x70, 0x5b, 0x09, 0x16, 0xd6, 0x57, 0x57, 0x97, 0xb7, 0x72, - 0x89, 0x16, 0x02, 0xee, 0xb0, 0x1f, 0x80, 0xf1, 0x30, 0xc1, 0xda, 0xf2, 0x4a, 0x2e, 0x59, 0x40, - 0xaf, 0x5e, 0x9f, 0x19, 0x0d, 0x60, 0xaf, 0xe9, 0xf5, 0x42, 0xfa, 0xfd, 0x9f, 0x9e, 0x3a, 0xf2, - 0x4b, 0xbf, 0x38, 0x25, 0x91, 0x9e, 0x8d, 0x84, 0x7c, 0x04, 0x7a, 0x08, 0x8e, 0x6f, 0x2e, 0x2f, - 0xad, 0x95, 0x17, 0x2b, 0xab, 0x9b, 0x4b, 0x15, 0xf6, 0x8d, 0x0d, 0xaf, 0x77, 0x63, 0xaf, 0x5e, - 0x9f, 0x19, 0xe6, 0x5d, 0xea, 0x84, 0xbd, 0xa1, 0x94, 0x2f, 0xaf, 0x6f, 0x95, 0x73, 0x12, 0xc3, - 0xde, 0xb0, 0xf1, 0x15, 0xd3, 0x65, 0xdf, 0xda, 0x7a, 0x04, 0x4e, 0xb4, 0xc1, 0xf6, 0x3a, 0x36, - 0xfe, 0xea, 0xf5, 0x99, 0x91, 0x0d, 0x1b, 0xb3, 0xf9, 0x43, 0x29, 0x66, 0x21, 0xdf, 0x4a, 0xb1, - 0xbe, 0xb1, 0xbe, 0x39, 0xbf, 0x92, 0x9b, 0x29, 0xe4, 0x5e, 0xbd, 0x3e, 0x93, 0x15, 0xce, 0x90, - 0xe0, 0xfb, 0x3d, 0xbb, 0x9d, 0x2b, 0x9e, 0x3f, 0x79, 0x18, 0xee, 0xe1, 0x7b, 0x80, 0x8e, 0xab, - 0xee, 0xeb, 0x46, 0xcd, 0xdb, 0x69, 0xe5, 0x65, 0xbe, 0xf2, 0x39, 0xc6, 0x37, 0x5b, 0x05, 0xb4, - 0xeb, 0x7e, 0x6b, 0xa1, 0xf3, 0xc9, 0x52, 0x21, 0xe6, 0xf0, 0x25, 0x7e, 0xe9, 0xd4, 0x79, 0x6f, - 0xbe, 0x10, 0xb3, 0x63, 0x5c, 0xe8, 0xba, 0xb8, 0x93, 0x3f, 0x20, 0xc1, 0xe8, 0x45, 0xdd, 0x71, - 0x4d, 0x5b, 0xd7, 0xd4, 0x3a, 0x7d, 0x61, 0x72, 0xae, 0x57, 0xdf, 0x1a, 0x99, 0xea, 0xcf, 0xc0, - 0xe0, 0x15, 0xb5, 0xce, 0x9c, 0x5a, 0x92, 0x7e, 0x10, 0xa3, 0xbd, 0xfa, 0x7c, 0xd7, 0x26, 0x18, - 0x30, 0x32, 0xf9, 0x57, 0x12, 0x30, 0x46, 0x27, 0x83, 0xc3, 0x3e, 0x95, 0x44, 0xd6, 0x58, 0x25, - 0x48, 0xd9, 0xaa, 0xcb, 0x37, 0x0d, 0x4b, 0xb3, 0x7c, 0xe7, 0xf7, 0xbe, 0xf8, 0xdd, 0xdc, 0xd9, - 0x45, 0xac, 0x29, 0x94, 0x16, 0xbd, 0x1d, 0xd2, 0x0d, 0xf5, 0x5a, 0x85, 0xf2, 0x61, 0x2b, 0x97, - 0xf9, 0xfe, 0xf8, 0xdc, 0xbc, 0x31, 0x3d, 0x76, 0xa0, 0x36, 0xea, 0x45, 0x59, 0xf0, 0x91, 0x95, - 0xa1, 0x86, 0x7a, 0x8d, 0x88, 0x88, 0x2c, 0x18, 0x23, 0x50, 0x6d, 0x4f, 0x35, 0x6a, 0x98, 0x35, - 0x42, 0xb7, 0x40, 0x4b, 0x17, 0xfb, 0x6e, 0xe4, 0x98, 0xdf, 0x48, 0x80, 0x9d, 0xac, 0x8c, 0x34, - 0xd4, 0x6b, 0x0b, 0x14, 0x40, 0x5a, 0x2c, 0xa6, 0x3f, 0xfa, 0xc9, 0xe9, 0x23, 0x74, 0x37, 0xfd, - 0x1b, 0x12, 0x80, 0xaf, 0x31, 0xf4, 0x76, 0xc8, 0x69, 0x5e, 0x89, 0xd2, 0x3a, 0x7c, 0x0c, 0xef, - 0xef, 0x34, 0x16, 0x11, 0x7d, 0xb3, 0xd8, 0xfc, 0xf5, 0x1b, 0xd3, 0x92, 0x32, 0xa6, 0x45, 0x86, - 0xe2, 0x6d, 0x30, 0xdc, 0xb4, 0xaa, 0xaa, 0x8b, 0x2b, 0x74, 0x1d, 0x97, 0x88, 0x8d, 0xf3, 0x53, - 0x84, 0xd7, 0xcd, 0x1b, 0xd3, 0x88, 0x75, 0x2b, 0x40, 0x2c, 0xd3, 0xe8, 0x0f, 0x0c, 0x42, 0x08, - 0x02, 0x7d, 0xfa, 0xaa, 0x04, 0xc3, 0x8b, 0x81, 0x9b, 0x5e, 0x79, 0x18, 0x6a, 0x98, 0x86, 0xbe, - 0xcf, 0xed, 0x31, 0xa3, 0x88, 0x22, 0x2a, 0x40, 0x9a, 0x3d, 0xba, 0x73, 0x0f, 0xc4, 0x56, 0xa8, - 0x28, 0x13, 0xaa, 0xab, 0x78, 0xc7, 0xd1, 0xc5, 0x68, 0x28, 0xa2, 0x88, 0x2e, 0x40, 0xce, 0xc1, - 0x5a, 0xd3, 0xd6, 0xdd, 0x83, 0x8a, 0x66, 0x1a, 0xae, 0xaa, 0xb9, 0xec, 0xf9, 0x56, 0xe9, 0x8e, - 0x9b, 0x37, 0xa6, 0x8f, 0x33, 0x59, 0xa3, 0x18, 0xb2, 0x32, 0x26, 0x40, 0x0b, 0x0c, 0x42, 0x5a, - 0xa8, 0x62, 0x57, 0xd5, 0xeb, 0x4e, 0x9e, 0x1d, 0x0c, 0x89, 0x62, 0xa0, 0x2f, 0x9f, 0x1b, 0x0a, - 0x6e, 0x6c, 0x5d, 0x80, 0x9c, 0x69, 0x61, 0x3b, 0x94, 0x88, 0x4a, 0xd1, 0x96, 0xa3, 0x18, 0xb2, - 0x32, 0x26, 0x40, 0x22, 0x49, 0x75, 0xc9, 0x30, 0x8b, 0x85, 0xa2, 0xd5, 0xdc, 0xf1, 0xf7, 0xc3, - 0x26, 0x5b, 0x46, 0x63, 0xde, 0x38, 0x28, 0x3d, 0xe6, 0x73, 0x8f, 0xd2, 0xc9, 0x5f, 0xfb, 0xc2, - 0xc3, 0x93, 0xdc, 0x34, 0xfc, 0xfd, 0xa9, 0x4b, 0xf8, 0x80, 0x0c, 0x3f, 0x47, 0xdd, 0xa0, 0x98, - 0x24, 0xed, 0x7c, 0x51, 0xd5, 0xeb, 0xe2, 0x19, 0xb2, 0xc2, 0x4b, 0xa8, 0x08, 0x83, 0x8e, 0xab, - 0xba, 0x4d, 0x87, 0x7f, 0x1c, 0x4c, 0xee, 0x64, 0x6a, 0x25, 0xd3, 0xa8, 0x6e, 0x52, 0x4c, 0x85, - 0x53, 0xa0, 0x0b, 0x30, 0xe8, 0x9a, 0xfb, 0xd8, 0xe0, 0x2a, 0xec, 0x6b, 0x7e, 0xd3, 0x73, 0x2a, - 0x46, 0x4d, 0x34, 0x52, 0xc5, 0x75, 0x5c, 0x63, 0x69, 0xd5, 0x9e, 0x4a, 0x56, 0x1f, 0xf4, 0x1b, - 0x61, 0xa5, 0xe5, 0xbe, 0x27, 0x21, 0xd7, 0x54, 0x94, 0x9f, 0xac, 0x8c, 0x79, 0xa0, 0x4d, 0x0a, - 0x41, 0x97, 0x42, 0x57, 0x12, 0xf9, 0x87, 0xf4, 0xee, 0xee, 0xd4, 0xfd, 0x80, 0x4d, 0x8b, 0xfd, - 0x89, 0xe0, 0x85, 0xc6, 0x0b, 0x90, 0x6b, 0x1a, 0x3b, 0xa6, 0x41, 0xdf, 0x0a, 0xf2, 0xfc, 0x9e, - 0xac, 0xef, 0x92, 0x41, 0xe3, 0x88, 0x62, 0xc8, 0xca, 0x98, 0x07, 0xba, 0xc8, 0x56, 0x01, 0x55, - 0x18, 0xf5, 0xb1, 0xe8, 0x44, 0xcd, 0xc4, 0x4e, 0xd4, 0xbb, 0xf8, 0x44, 0x3d, 0x1a, 0x6d, 0xc5, - 0x9f, 0xab, 0x23, 0x1e, 0x90, 0x90, 0xa1, 0x8b, 0x00, 0xbe, 0x7b, 0xa0, 0xfb, 0x14, 0xc3, 0x9d, - 0x07, 0xde, 0xf7, 0x31, 0x62, 0xbd, 0xe7, 0xd3, 0xa2, 0x77, 0xc2, 0x44, 0x43, 0x37, 0x2a, 0x0e, - 0xae, 0xef, 0x56, 0xb8, 0x82, 0x09, 0x4b, 0xfa, 0xa9, 0x97, 0xd2, 0x4a, 0x7f, 0xf6, 0x70, 0xf3, - 0xc6, 0x74, 0x81, 0xbb, 0xd0, 0x56, 0x96, 0xb2, 0x32, 0xde, 0xd0, 0x8d, 0x4d, 0x5c, 0xdf, 0x5d, - 0xf4, 0x60, 0xc5, 0xec, 0xfb, 0x3f, 0x39, 0x7d, 0x84, 0x4f, 0xd7, 0x23, 0xf2, 0x39, 0xba, 0x77, - 0xce, 0xa7, 0x19, 0x76, 0xc8, 0x9a, 0x44, 0x15, 0x05, 0xba, 0xa3, 0x91, 0x51, 0x7c, 0x00, 0x9b, - 0xe6, 0xaf, 0xfc, 0x87, 0x19, 0x49, 0xfe, 0x9c, 0x04, 0x83, 0x8b, 0x97, 0x37, 0x54, 0xdd, 0x46, - 0xcb, 0x30, 0xee, 0x5b, 0x4e, 0x78, 0x92, 0x9f, 0xbc, 0x79, 0x63, 0x3a, 0x1f, 0x35, 0x2e, 0x6f, - 0x96, 0xfb, 0x06, 0x2c, 0xa6, 0xf9, 0x72, 0xa7, 0x85, 0x6b, 0x88, 0x55, 0x0b, 0x8a, 0xdc, 0xba, - 0xac, 0x8d, 0x74, 0xb3, 0x0c, 0x43, 0x4c, 0x5a, 0x07, 0x15, 0x61, 0xc0, 0x22, 0x3f, 0xf8, 0xc1, - 0xc0, 0x54, 0x47, 0xe3, 0xa5, 0xf8, 0xde, 0x46, 0x26, 0x21, 0x91, 0x3f, 0x9c, 0x00, 0x58, 0xbc, - 0x7c, 0x79, 0xcb, 0xd6, 0xad, 0x3a, 0x76, 0x6f, 0x65, 0xcf, 0xb7, 0xe0, 0x68, 0x60, 0x95, 0x64, - 0x6b, 0x91, 0xde, 0xcf, 0xdc, 0xbc, 0x31, 0x7d, 0x32, 0xda, 0xfb, 0x00, 0x9a, 0xac, 0x4c, 0xf8, - 0xeb, 0x25, 0x5b, 0x6b, 0xcb, 0xb5, 0xea, 0xb8, 0x1e, 0xd7, 0x64, 0x67, 0xae, 0x01, 0xb4, 0x20, - 0xd7, 0x45, 0xc7, 0x6d, 0xaf, 0xda, 0x4d, 0x18, 0xf6, 0x55, 0xe2, 0xa0, 0x45, 0x48, 0xbb, 0xfc, - 0x37, 0xd7, 0xb0, 0xdc, 0x59, 0xc3, 0x82, 0x8c, 0x6b, 0xd9, 0xa3, 0x94, 0xff, 0x4c, 0x02, 0xf0, - 0x6d, 0xf6, 0xc7, 0xd3, 0xc4, 0x88, 0x2b, 0xe7, 0x8e, 0x37, 0x79, 0xa8, 0x54, 0x8d, 0x53, 0x47, - 0xf4, 0xf9, 0xd3, 0x09, 0x98, 0xd8, 0x16, 0x9e, 0xe7, 0xc7, 0x5e, 0x07, 0x1b, 0x30, 0x84, 0x0d, - 0xd7, 0xd6, 0xa9, 0x12, 0xc8, 0x68, 0x3f, 0xd2, 0x69, 0xb4, 0xdb, 0xf4, 0x89, 0x7e, 0xec, 0x46, - 0x6c, 0xba, 0x73, 0x36, 0x11, 0x6d, 0x7c, 0x30, 0x09, 0xf9, 0x4e, 0x94, 0x68, 0x01, 0xc6, 0x34, - 0x1b, 0x53, 0x40, 0x25, 0xb8, 0xf3, 0x57, 0x2a, 0xf8, 0x99, 0x65, 0x04, 0x41, 0x56, 0x46, 0x05, - 0x84, 0x47, 0x8f, 0x1a, 0x90, 0xb4, 0x8f, 0x98, 0x1d, 0xc1, 0xea, 0x31, 0xcf, 0x93, 0x79, 0xf8, - 0x10, 0x8d, 0x84, 0x19, 0xb0, 0xf8, 0x31, 0xea, 0x43, 0x69, 0x00, 0x79, 0x09, 0xc6, 0x74, 0x43, - 0x77, 0x75, 0xb5, 0x5e, 0xd9, 0x51, 0xeb, 0xaa, 0xa1, 0x1d, 0x26, 0x6b, 0x66, 0x2e, 0x9f, 0x37, - 0x1b, 0x61, 0x27, 0x2b, 0xa3, 0x1c, 0x52, 0x62, 0x00, 0x74, 0x11, 0x86, 0x44, 0x53, 0xa9, 0x43, - 0x65, 0x1b, 0x82, 0x3c, 0x90, 0xe0, 0xfd, 0x4c, 0x12, 0xc6, 0x15, 0x5c, 0xfd, 0xff, 0x43, 0xd1, - 0xdf, 0x50, 0xac, 0x02, 0xb0, 0xe9, 0x4e, 0x1c, 0xec, 0x21, 0x46, 0x83, 0x38, 0x8c, 0x0c, 0xe3, - 0xb0, 0xe8, 0xb8, 0x81, 0xf1, 0xb8, 0x91, 0x80, 0x6c, 0x70, 0x3c, 0xfe, 0x82, 0x46, 0x25, 0xb4, - 0xec, 0x7b, 0xa2, 0x14, 0xff, 0x44, 0x68, 0x07, 0x4f, 0xd4, 0x62, 0xbd, 0xdd, 0x5d, 0xd0, 0xff, - 0x48, 0xc0, 0xe0, 0x86, 0x6a, 0xab, 0x0d, 0x07, 0x69, 0x2d, 0x99, 0xa6, 0xd8, 0x7e, 0x6c, 0xf9, - 0x10, 0x34, 0xdf, 0xed, 0x88, 0x49, 0x34, 0x3f, 0xda, 0x26, 0xd1, 0xfc, 0x09, 0x18, 0x25, 0xcb, - 0xe1, 0xc0, 0x15, 0x06, 0xa2, 0xed, 0x91, 0xd2, 0x09, 0x9f, 0x4b, 0xb8, 0x9e, 0xad, 0x96, 0x2f, - 0x07, 0xef, 0x30, 0x0c, 0x13, 0x0c, 0xdf, 0x31, 0x13, 0xf2, 0x63, 0xfe, 0xb2, 0x34, 0x50, 0x29, - 0x2b, 0xd0, 0x50, 0xaf, 0x95, 0x59, 0x01, 0xad, 0x00, 0xda, 0xf3, 0x76, 0x46, 0x2a, 0xbe, 0x3a, - 0x09, 0xfd, 0x9d, 0x37, 0x6f, 0x4c, 0x9f, 0x60, 0xf4, 0xad, 0x38, 0xb2, 0x32, 0xee, 0x03, 0x05, - 0xb7, 0xc7, 0x01, 0x48, 0xbf, 0x2a, 0xec, 0xfa, 0x1c, 0x5b, 0xee, 0x1c, 0xbd, 0x79, 0x63, 0x7a, - 0x9c, 0x71, 0xf1, 0xeb, 0x64, 0x25, 0x43, 0x0a, 0x8b, 0xe4, 0x77, 0xc0, 0xb2, 0x3f, 0x2d, 0x01, - 0xf2, 0x5d, 0xbe, 0x82, 0x1d, 0x8b, 0xac, 0xcf, 0x48, 0x22, 0x1e, 0xc8, 0x9a, 0xa5, 0xee, 0x89, - 0xb8, 0x4f, 0x2f, 0x12, 0xf1, 0xc0, 0x4c, 0x79, 0xca, 0x77, 0x8f, 0x09, 0x3e, 0x8e, 0x6d, 0xee, - 0x1a, 0xce, 0x2e, 0x98, 0xba, 0xa0, 0x6e, 0xf1, 0x87, 0x47, 0xe4, 0x7f, 0x25, 0xc1, 0x89, 0x16, - 0x8b, 0xf2, 0x84, 0xfd, 0x4b, 0x80, 0xec, 0x40, 0x25, 0xff, 0xde, 0x1b, 0x13, 0xba, 0x6f, 0x03, - 0x1d, 0xb7, 0x5b, 0xfc, 0xee, 0xad, 0xf3, 0xf0, 0xec, 0xb2, 0xe2, 0x3f, 0x95, 0x60, 0x32, 0xd8, - 0xbc, 0xd7, 0x91, 0x35, 0xc8, 0x06, 0x5b, 0xe7, 0x5d, 0xb8, 0xa7, 0x97, 0x2e, 0x70, 0xe9, 0x43, - 0xf4, 0xe8, 0x39, 0x7f, 0xba, 0xb2, 0xbd, 0xb3, 0x47, 0x7b, 0xd6, 0x86, 0x90, 0x29, 0x3a, 0x6d, - 0x53, 0x74, 0x3c, 0xfe, 0x8f, 0x04, 0xa9, 0x0d, 0xd3, 0xac, 0x23, 0x13, 0xc6, 0x0d, 0xd3, 0xad, - 0x10, 0xcb, 0xc2, 0xd5, 0x0a, 0x5f, 0x74, 0x33, 0x3f, 0xb8, 0xd0, 0x9f, 0x92, 0xbe, 0x7d, 0x63, - 0xba, 0x95, 0x95, 0x32, 0x66, 0x98, 0x6e, 0x89, 0x42, 0xb6, 0xd8, 0x92, 0xfc, 0x9d, 0x30, 0x12, - 0x6e, 0x8c, 0x79, 0xc9, 0xe7, 0xfb, 0x6e, 0x2c, 0xcc, 0xe6, 0xe6, 0x8d, 0xe9, 0x49, 0x7f, 0xc6, - 0x78, 0x60, 0x59, 0xc9, 0xee, 0x04, 0x5a, 0x67, 0xd7, 0xbb, 0xbe, 0xfb, 0xc9, 0x69, 0xe9, 0xf4, - 0x17, 0x25, 0x00, 0x7f, 0xe7, 0x01, 0x3d, 0x04, 0xc7, 0x4b, 0xeb, 0x6b, 0x8b, 0x95, 0xcd, 0xad, - 0xf9, 0xad, 0xed, 0xcd, 0xca, 0xf6, 0xda, 0xe6, 0x46, 0x79, 0x61, 0xf9, 0xc2, 0x72, 0x79, 0xd1, - 0xdf, 0x1e, 0x77, 0x2c, 0xac, 0xe9, 0xbb, 0x3a, 0xae, 0xa2, 0xfb, 0x60, 0x32, 0x8c, 0x4d, 0x4a, - 0xe5, 0xc5, 0x9c, 0x54, 0xc8, 0xbe, 0x7a, 0x7d, 0x26, 0xcd, 0x72, 0x31, 0x5c, 0x45, 0xa7, 0xe0, - 0x68, 0x2b, 0xde, 0xf2, 0xda, 0x52, 0x2e, 0x51, 0x18, 0x79, 0xf5, 0xfa, 0x4c, 0xc6, 0x4b, 0xda, - 0x90, 0x0c, 0x28, 0x88, 0xc9, 0xf9, 0x25, 0x0b, 0xf0, 0xea, 0xf5, 0x99, 0x41, 0xa6, 0xc0, 0x42, - 0xea, 0xfd, 0x9f, 0x9e, 0x3a, 0x52, 0xba, 0xd0, 0x71, 0x03, 0xfc, 0xa1, 0xae, 0xba, 0xbb, 0xe6, - 0x6d, 0x6a, 0x87, 0x77, 0xbd, 0xff, 0x78, 0xa8, 0xe3, 0xae, 0x77, 0x0d, 0x1b, 0xd8, 0xd1, 0x9d, - 0x43, 0xed, 0x7a, 0xf7, 0xb4, 0x93, 0x2e, 0xff, 0xce, 0x00, 0x64, 0x97, 0x58, 0x2b, 0x64, 0x20, - 0x30, 0x7a, 0x13, 0x0c, 0x5a, 0x34, 0x8c, 0x78, 0xc7, 0x68, 0x1d, 0x0c, 0x9e, 0x05, 0x1b, 0xef, - 0x2e, 0x17, 0x0b, 0x3d, 0x0e, 0xbf, 0xcc, 0xc1, 0xee, 0x98, 0xf9, 0xb7, 0xa6, 0xb2, 0x7d, 0xed, - 0xf7, 0xb0, 0x9c, 0x85, 0x6f, 0xad, 0x44, 0xf9, 0xc9, 0xec, 0x5e, 0xc8, 0x16, 0x81, 0xb0, 0xdb, - 0x61, 0xef, 0x95, 0xe0, 0x28, 0xc5, 0xf2, 0x03, 0x31, 0xc5, 0x14, 0xc9, 0xfe, 0xe9, 0x4e, 0x5d, - 0x58, 0x51, 0x1d, 0xff, 0xae, 0x07, 0xbb, 0xcf, 0x75, 0x0f, 0x0f, 0x84, 0x27, 0x03, 0x8d, 0x47, - 0xd9, 0xca, 0xca, 0x44, 0xbd, 0x85, 0xd2, 0x41, 0x4b, 0xa1, 0x0b, 0x7d, 0xa9, 0xfe, 0xb6, 0xda, - 0x83, 0x97, 0xfb, 0x9e, 0x85, 0x61, 0xdf, 0x97, 0x38, 0xfc, 0xff, 0x53, 0xf4, 0x1e, 0x3b, 0x82, - 0xc4, 0xe8, 0x7d, 0x12, 0x1c, 0xf5, 0xa3, 0x79, 0x90, 0x2d, 0xfb, 0x3f, 0x1e, 0x0f, 0xf6, 0xb1, - 0x10, 0x8a, 0x2a, 0xa7, 0x2d, 0x5f, 0x59, 0x99, 0x6c, 0xb6, 0x92, 0x92, 0x25, 0xd8, 0x48, 0xd0, - 0xb3, 0x3a, 0x79, 0xf1, 0xa9, 0xba, 0xde, 0x5d, 0x73, 0x98, 0x01, 0xfb, 0xdf, 0x02, 0x96, 0x69, - 0xbb, 0xb8, 0x4a, 0x37, 0xe4, 0xd2, 0x8a, 0x57, 0x96, 0xd7, 0x00, 0xb5, 0x0e, 0x6e, 0xf4, 0x02, - 0x63, 0xc6, 0xbf, 0xc0, 0x38, 0x09, 0x03, 0xc1, 0x2b, 0x7e, 0xac, 0x50, 0x4c, 0xbf, 0x9f, 0x87, - 0xcf, 0x5b, 0x3e, 0xe7, 0xff, 0x45, 0x02, 0x4e, 0x07, 0x8f, 0x87, 0x5e, 0x6a, 0x62, 0xfb, 0xc0, - 0x9b, 0xa2, 0x96, 0x5a, 0xd3, 0x8d, 0xe0, 0x1b, 0xa0, 0x13, 0xc1, 0x80, 0x4f, 0x71, 0x85, 0x9e, - 0x64, 0x03, 0x86, 0x37, 0xd4, 0x1a, 0x56, 0xf0, 0x4b, 0x4d, 0xec, 0xb8, 0x6d, 0x2e, 0x99, 0x1f, - 0x83, 0x41, 0x73, 0x77, 0x57, 0x1c, 0x69, 0xa7, 0x14, 0x5e, 0x22, 0x5d, 0xae, 0xeb, 0x0d, 0x9d, - 0xdd, 0x06, 0x4b, 0x29, 0xac, 0x80, 0xa6, 0x61, 0x58, 0x33, 0x9b, 0x06, 0x9f, 0x71, 0xf9, 0x94, - 0xf8, 0x00, 0x44, 0xd3, 0x60, 0x33, 0x4e, 0x7e, 0x06, 0xb2, 0xac, 0x3d, 0x1e, 0x71, 0x4f, 0x40, - 0x9a, 0x5e, 0xa7, 0xf2, 0x5b, 0x1d, 0x22, 0xe5, 0x4b, 0xec, 0x42, 0x3a, 0xe3, 0xc2, 0x1a, 0x66, - 0x85, 0x52, 0xa9, 0xa3, 0x2a, 0x4f, 0xc5, 0xbb, 0x06, 0xa6, 0x28, 0x4f, 0x8d, 0xbf, 0x39, 0x00, - 0x47, 0xf9, 0x09, 0x9d, 0x6a, 0xe9, 0x73, 0x7b, 0xae, 0x2b, 0x5e, 0x09, 0x01, 0x4f, 0x75, 0x55, - 0x4b, 0x97, 0x0f, 0x20, 0x75, 0xd1, 0x75, 0x2d, 0x74, 0x1a, 0x06, 0xec, 0x66, 0x1d, 0x8b, 0x1d, - 0x1f, 0x6f, 0x4f, 0x5e, 0xb5, 0xf4, 0x59, 0x82, 0xa0, 0x34, 0xeb, 0x58, 0x61, 0x28, 0xa8, 0x0c, - 0xd3, 0xbb, 0xcd, 0x7a, 0xfd, 0xa0, 0x52, 0xc5, 0xf4, 0x7f, 0xf7, 0x78, 0x5f, 0xbf, 0xc7, 0xd7, - 0x2c, 0x55, 0x7c, 0x43, 0x8f, 0xe8, 0xe6, 0x24, 0x45, 0x5b, 0xa4, 0x58, 0xe2, 0xcb, 0xf7, 0x65, - 0x81, 0x23, 0xff, 0x5e, 0x02, 0xd2, 0x82, 0x35, 0xbd, 0x21, 0x8e, 0xeb, 0x58, 0x73, 0x4d, 0x71, - 0x62, 0xe2, 0x95, 0x11, 0x82, 0x64, 0x8d, 0x0f, 0x51, 0xe6, 0xe2, 0x11, 0x85, 0x14, 0x08, 0xcc, - 0xbb, 0xb7, 0x4f, 0x60, 0x56, 0x93, 0x8c, 0x5a, 0xca, 0x32, 0xc5, 0xd2, 0xec, 0xe2, 0x11, 0x85, - 0x96, 0x50, 0x1e, 0x06, 0xc9, 0xcc, 0x70, 0xd9, 0x87, 0x09, 0x09, 0x9c, 0x97, 0xd1, 0x31, 0x18, - 0xb0, 0x54, 0x57, 0x63, 0x57, 0xea, 0x48, 0x05, 0x2b, 0xa2, 0x27, 0x60, 0x90, 0x3d, 0x08, 0x8d, - 0xfe, 0x63, 0x0c, 0xa2, 0x0c, 0xf6, 0xe5, 0x2d, 0x22, 0xf7, 0x86, 0xea, 0xba, 0xd8, 0x36, 0x08, - 0x43, 0x86, 0x8e, 0x10, 0xa4, 0x76, 0xcc, 0xea, 0x01, 0xff, 0x67, 0x1d, 0xf4, 0x37, 0xff, 0xef, - 0x00, 0xd4, 0x1e, 0x2a, 0xb4, 0x92, 0xfd, 0x8f, 0xa2, 0xac, 0x00, 0x96, 0x08, 0x52, 0x19, 0x26, - 0xd4, 0x6a, 0x55, 0x67, 0xff, 0x37, 0xa3, 0xb2, 0xa3, 0x53, 0x0f, 0xe1, 0xd0, 0xff, 0x40, 0xd5, - 0x69, 0x2c, 0x90, 0x4f, 0x50, 0xe2, 0xf8, 0xa5, 0x0c, 0x0c, 0x59, 0x4c, 0x28, 0xf9, 0x3c, 0x8c, - 0xb7, 0x48, 0x4a, 0xe4, 0xdb, 0xd7, 0x8d, 0xaa, 0x78, 0xcc, 0x40, 0x7e, 0x13, 0x18, 0xfd, 0x7a, - 0x1e, 0x3b, 0x8b, 0xa2, 0xbf, 0x4b, 0xef, 0xee, 0xfc, 0xf0, 0x6b, 0x34, 0xf0, 0xf0, 0x4b, 0xb5, - 0xf4, 0x52, 0x86, 0xf2, 0xe7, 0xcf, 0xbd, 0xe6, 0x79, 0x05, 0x7b, 0xea, 0x35, 0x6b, 0xda, 0x35, - 0x12, 0xa5, 0x45, 0xf4, 0x25, 0x55, 0xaa, 0xa5, 0x3b, 0xd4, 0x1c, 0xfd, 0xaf, 0xf9, 0x39, 0xe7, - 0x03, 0xbf, 0xe9, 0x23, 0xb0, 0xd4, 0xd2, 0xfc, 0xc6, 0xb2, 0x67, 0xc7, 0x5f, 0x4e, 0xc0, 0xc9, - 0x80, 0x1d, 0x07, 0x90, 0x5b, 0xcd, 0xb9, 0xd0, 0xde, 0xe2, 0x7b, 0x78, 0xfc, 0x75, 0x09, 0x52, - 0x04, 0x1f, 0xc5, 0x7c, 0xbb, 0x3f, 0xff, 0xab, 0x5f, 0xfb, 0x27, 0x72, 0xf8, 0xd4, 0x2a, 0x34, - 0x2a, 0x94, 0x49, 0xe9, 0x7d, 0xbd, 0xeb, 0x2f, 0xe7, 0x7f, 0xc8, 0xd0, 0xb9, 0x75, 0x6a, 0x8c, - 0xea, 0xf0, 0x5b, 0x67, 0x41, 0xee, 0x90, 0xf2, 0x30, 0x8f, 0xd9, 0x3d, 0x89, 0xea, 0xc3, 0x1d, - 0x77, 0xba, 0xff, 0xdf, 0x6d, 0x04, 0x7b, 0x4c, 0xc7, 0xae, 0xc1, 0xb1, 0xe7, 0x48, 0xdb, 0xfe, - 0x32, 0x59, 0x38, 0xf6, 0x63, 0xde, 0x69, 0x9e, 0xc4, 0xff, 0x01, 0x98, 0x38, 0xa9, 0x03, 0x5f, - 0x3e, 0xbe, 0x40, 0xbc, 0x6f, 0xb6, 0x63, 0xbc, 0x98, 0x0d, 0x04, 0x0b, 0x25, 0x40, 0x29, 0xff, - 0xb2, 0x04, 0xc7, 0x5b, 0x9a, 0xe6, 0x3e, 0x7e, 0xa9, 0xcd, 0x53, 0x85, 0x43, 0x65, 0x36, 0x4b, - 0x6d, 0x84, 0xbd, 0x3f, 0x56, 0x58, 0x26, 0x45, 0x48, 0xda, 0xa7, 0xe1, 0x68, 0x58, 0x58, 0xa1, - 0xa6, 0x7b, 0x61, 0x34, 0xbc, 0x23, 0xcc, 0xd5, 0x35, 0x12, 0xda, 0x13, 0x96, 0x2b, 0x51, 0x3d, - 0x7b, 0x7d, 0x2d, 0x43, 0xc6, 0x43, 0xe5, 0x29, 0x70, 0xcf, 0x5d, 0xf5, 0x29, 0xe5, 0x0f, 0x4b, - 0x30, 0x13, 0x6e, 0x21, 0x90, 0x0c, 0xf5, 0x27, 0xec, 0x2d, 0x1b, 0xe2, 0x37, 0x24, 0xb8, 0xab, - 0x8b, 0x4c, 0x5c, 0x01, 0x2f, 0xc3, 0x64, 0x60, 0x27, 0x40, 0xb8, 0x70, 0x31, 0xec, 0xa7, 0xe3, - 0xd3, 0x50, 0x6f, 0xe1, 0x7b, 0x07, 0x51, 0xca, 0x67, 0x7f, 0x7f, 0x7a, 0xa2, 0xb5, 0xce, 0x51, - 0x26, 0x5a, 0x57, 0xef, 0xb7, 0xd0, 0x3e, 0x5e, 0x93, 0xe0, 0x81, 0x70, 0x57, 0xdb, 0xe4, 0xb3, - 0x3f, 0xaa, 0x71, 0xf8, 0xf7, 0x12, 0x9c, 0xee, 0x45, 0x38, 0x3e, 0x20, 0x3b, 0x30, 0xe1, 0x67, - 0xda, 0xd1, 0xf1, 0xe8, 0x2b, 0x7f, 0x67, 0x56, 0x8a, 0x3c, 0x6e, 0xb7, 0x41, 0xf1, 0x16, 0x9f, - 0x58, 0xc1, 0x21, 0xf7, 0x94, 0x1c, 0xde, 0xcd, 0x15, 0x4a, 0x0e, 0xed, 0xe7, 0xb6, 0x19, 0x8b, - 0x44, 0x9b, 0xb1, 0xf0, 0x53, 0x73, 0xf9, 0x0a, 0xf7, 0x5b, 0x6d, 0xf6, 0xe0, 0xde, 0x06, 0x13, - 0x6d, 0x4c, 0x99, 0xcf, 0xea, 0x3e, 0x2c, 0x59, 0x41, 0xad, 0xc6, 0x2a, 0x1f, 0xc0, 0x34, 0x6d, - 0xb7, 0x8d, 0xa2, 0x6f, 0x77, 0x97, 0x1b, 0xdc, 0xb7, 0xb4, 0x6d, 0x9a, 0xf7, 0x7d, 0x19, 0x06, - 0xd9, 0x38, 0xf3, 0xee, 0x1e, 0xc2, 0x50, 0x38, 0x03, 0xf9, 0xe7, 0x85, 0x2f, 0x5b, 0x14, 0x62, - 0xb7, 0x9f, 0x43, 0xbd, 0xf4, 0xf5, 0x16, 0xcd, 0xa1, 0x80, 0x32, 0xbe, 0x21, 0xbc, 0x5a, 0x7b, - 0xe9, 0xb8, 0x3a, 0xb4, 0x5b, 0xe6, 0xd5, 0x98, 0x6e, 0x6e, 0xaf, 0xfb, 0xfa, 0x45, 0xe1, 0xbe, - 0xbc, 0x3e, 0xc5, 0xb8, 0xaf, 0x1f, 0x8d, 0xea, 0x3d, 0x47, 0x16, 0x23, 0xe6, 0x9f, 0x47, 0x47, - 0xf6, 0x5d, 0x09, 0x4e, 0xd0, 0xbe, 0x05, 0x37, 0x22, 0xfa, 0x55, 0xf9, 0x43, 0x80, 0x1c, 0x5b, - 0xab, 0xb4, 0x9d, 0xdd, 0x39, 0xc7, 0xd6, 0x2e, 0x87, 0xe2, 0xcb, 0x43, 0x80, 0xaa, 0xa1, 0xed, - 0x26, 0x8a, 0xcd, 0x6e, 0xc9, 0xe5, 0xaa, 0x81, 0xdd, 0x8c, 0x36, 0xc3, 0x99, 0xba, 0x05, 0xc3, - 0xf9, 0x75, 0x09, 0x0a, 0xed, 0xba, 0xcc, 0x87, 0x4f, 0x87, 0x63, 0xa1, 0x43, 0x82, 0xe8, 0x08, - 0x3e, 0xd4, 0xcb, 0x56, 0x4e, 0x64, 0x1a, 0x1d, 0xb5, 0xf1, 0xed, 0xce, 0x03, 0xa6, 0xc3, 0x16, - 0xda, 0x9a, 0x59, 0xff, 0xc8, 0xa6, 0xcf, 0x17, 0x5a, 0xfc, 0xea, 0x9f, 0x8b, 0xdc, 0xfb, 0x1a, - 0x4c, 0x75, 0x90, 0xfa, 0x76, 0xc7, 0xbd, 0xbd, 0x8e, 0x83, 0x79, 0xab, 0xd3, 0xf7, 0xc7, 0xf9, - 0x4c, 0x08, 0xdf, 0xc0, 0x0e, 0xac, 0xc5, 0xda, 0x3d, 0xe1, 0x92, 0xdf, 0x02, 0x77, 0xb4, 0xa5, - 0xe2, 0xb2, 0x15, 0x21, 0xb5, 0xa7, 0x3b, 0x2e, 0x17, 0xeb, 0xbe, 0x4e, 0x62, 0x45, 0xa8, 0x29, - 0x8d, 0x8c, 0x20, 0x47, 0x59, 0x6f, 0x98, 0x66, 0x9d, 0x8b, 0x21, 0x5f, 0x82, 0xf1, 0x00, 0x8c, - 0x37, 0x72, 0x0e, 0x52, 0x96, 0xc9, 0x3f, 0x4f, 0x30, 0x7c, 0xe6, 0x64, 0xc7, 0xdd, 0x7b, 0xd3, - 0xac, 0xf3, 0x6e, 0x53, 0x7c, 0x79, 0x12, 0x10, 0x63, 0x46, 0x37, 0xf2, 0x45, 0x13, 0x9b, 0x30, - 0x11, 0x82, 0xf2, 0x46, 0x7e, 0xa0, 0x43, 0x82, 0x33, 0xdf, 0x3e, 0x0a, 0x03, 0x94, 0x2b, 0xfa, - 0x98, 0x04, 0x10, 0x38, 0x11, 0x9e, 0xed, 0xc4, 0xa6, 0xfd, 0x9a, 0xb8, 0x30, 0xd7, 0x33, 0x3e, - 0xcf, 0xd9, 0x4e, 0xbf, 0xfb, 0xdf, 0x7c, 0xeb, 0x23, 0x89, 0x7b, 0x90, 0x3c, 0xd7, 0x61, 0x35, - 0x1e, 0x98, 0x2f, 0x9f, 0x09, 0xbd, 0x7d, 0x7f, 0xb8, 0xb7, 0xa6, 0x84, 0x64, 0xb3, 0xbd, 0xa2, - 0x73, 0xc1, 0xce, 0x53, 0xc1, 0xce, 0xa2, 0xc7, 0xe2, 0x05, 0x9b, 0x7b, 0x47, 0x78, 0xd2, 0xbc, - 0x0b, 0xfd, 0x8e, 0x04, 0x93, 0xed, 0x96, 0x74, 0xe8, 0xc9, 0xde, 0xa4, 0x68, 0x4d, 0x29, 0x0a, - 0x4f, 0x1d, 0x82, 0x92, 0x77, 0x65, 0x89, 0x76, 0x65, 0x1e, 0x3d, 0x73, 0x88, 0xae, 0xcc, 0x05, - 0xf7, 0xf7, 0xff, 0x97, 0x04, 0x77, 0x76, 0x5d, 0x21, 0xa1, 0xf9, 0xde, 0xa4, 0xec, 0x92, 0x3b, - 0x15, 0x4a, 0x3f, 0x08, 0x0b, 0xde, 0xe3, 0xe7, 0x68, 0x8f, 0x2f, 0xa1, 0xe5, 0xc3, 0xf4, 0xb8, - 0xed, 0x21, 0x0a, 0xfa, 0xad, 0xf0, 0xcd, 0xc2, 0xee, 0xe6, 0xd4, 0xb2, 0xf0, 0x88, 0x99, 0x18, - 0xad, 0x49, 0xad, 0xfc, 0x02, 0xed, 0x82, 0x82, 0x36, 0x7e, 0xc0, 0x41, 0x9b, 0x7b, 0x47, 0xd8, - 0xf1, 0xbf, 0x0b, 0xfd, 0x4f, 0xa9, 0xfd, 0x45, 0xc1, 0x27, 0xba, 0x8a, 0xd8, 0x79, 0x51, 0x55, - 0x78, 0xb2, 0x7f, 0x42, 0xde, 0xc9, 0x06, 0xed, 0x64, 0x0d, 0xe1, 0x5b, 0xdd, 0xc9, 0xb6, 0x83, - 0x88, 0xbe, 0x2a, 0xc1, 0x64, 0xbb, 0x35, 0x49, 0xcc, 0xb4, 0xec, 0xb2, 0xc8, 0x8a, 0x99, 0x96, - 0xdd, 0x16, 0x40, 0xf2, 0x9b, 0x68, 0xe7, 0xcf, 0xa1, 0xc7, 0x3b, 0x75, 0xbe, 0xeb, 0x28, 0x92, - 0xb9, 0xd8, 0x35, 0xc9, 0x8f, 0x99, 0x8b, 0xbd, 0xac, 0x63, 0x62, 0xe6, 0x62, 0x4f, 0x6b, 0x8c, - 0xf8, 0xb9, 0xe8, 0xf5, 0xac, 0xc7, 0x61, 0x74, 0xd0, 0x97, 0x25, 0x18, 0x09, 0x65, 0xc4, 0xe8, - 0xd1, 0xae, 0x82, 0xb6, 0x5b, 0x30, 0x14, 0xce, 0xf4, 0x43, 0xc2, 0xfb, 0xb2, 0x4c, 0xfb, 0xb2, - 0x80, 0xe6, 0x0f, 0xd3, 0x97, 0xf0, 0x59, 0xe9, 0xd7, 0x25, 0x98, 0x68, 0x93, 0x65, 0xc6, 0xcc, - 0xc2, 0xce, 0x49, 0x73, 0xe1, 0xc9, 0xfe, 0x09, 0x79, 0xaf, 0x2e, 0xd0, 0x5e, 0xfd, 0x04, 0x7a, - 0xfa, 0x30, 0xbd, 0x0a, 0xc4, 0xe7, 0x1b, 0xfe, 0xbd, 0xab, 0x40, 0x3b, 0xe8, 0x5c, 0x9f, 0x82, - 0x89, 0x0e, 0x3d, 0xd1, 0x37, 0x1d, 0xef, 0xcf, 0xf3, 0xb4, 0x3f, 0xcf, 0xa1, 0xf5, 0x1f, 0xac, - 0x3f, 0xad, 0x61, 0xfd, 0xf3, 0xad, 0x2f, 0x00, 0xbb, 0x5b, 0x51, 0xdb, 0x64, 0xb5, 0xf0, 0x58, - 0x5f, 0x34, 0xbc, 0x53, 0x4f, 0xd2, 0x4e, 0x9d, 0x41, 0x8f, 0x74, 0xea, 0x54, 0xe0, 0x72, 0x9d, - 0x6e, 0xec, 0x9a, 0x73, 0xef, 0x60, 0x29, 0xf0, 0xbb, 0xd0, 0x4f, 0x89, 0x8b, 0x4d, 0xa7, 0xba, - 0xb6, 0x1b, 0xc8, 0x63, 0x0b, 0x0f, 0xf4, 0x80, 0xc9, 0xe5, 0xba, 0x87, 0xca, 0x35, 0x85, 0x4e, - 0x76, 0x92, 0x8b, 0xe4, 0xb2, 0xe8, 0x03, 0x92, 0x77, 0x17, 0xf2, 0x74, 0x77, 0xde, 0xc1, 0x64, - 0xb7, 0xf0, 0x60, 0x4f, 0xb8, 0x5c, 0x92, 0xfb, 0xa8, 0x24, 0x33, 0x68, 0xaa, 0xa3, 0x24, 0x2c, - 0xf5, 0xbd, 0xd5, 0x37, 0x07, 0x5e, 0x3d, 0x0e, 0xd3, 0x1d, 0x5a, 0x74, 0xaf, 0xc5, 0x9c, 0x71, - 0x75, 0x79, 0x08, 0x1b, 0xfb, 0xd0, 0xb5, 0xc3, 0xd3, 0xda, 0xc3, 0x3f, 0x7f, 0xed, 0xed, 0x40, - 0xec, 0x5f, 0xa7, 0x00, 0xad, 0x3a, 0xb5, 0x05, 0x1b, 0xb3, 0x7f, 0x7a, 0xc7, 0x67, 0x79, 0xe4, - 0x85, 0x97, 0xf4, 0x03, 0xbd, 0xf0, 0x5a, 0x0d, 0xbd, 0x99, 0x4a, 0xf4, 0xf7, 0x2e, 0xb3, 0xe7, - 0x87, 0x53, 0xc9, 0x1f, 0xca, 0xc3, 0xa9, 0xf6, 0xf7, 0xaa, 0x53, 0xb7, 0xee, 0x01, 0xc6, 0xc0, - 0x61, 0x1f, 0xa1, 0xf0, 0xf7, 0x90, 0x83, 0x5d, 0xde, 0x43, 0xe6, 0x3b, 0x3e, 0x7a, 0xe4, 0xd4, - 0xe8, 0xac, 0xf8, 0x80, 0xef, 0x50, 0x6f, 0x37, 0x61, 0xf9, 0x17, 0x7e, 0xfd, 0x2d, 0x84, 0x93, - 0x50, 0x68, 0x35, 0x27, 0x6f, 0x52, 0x7f, 0x24, 0x09, 0xb9, 0x55, 0xa7, 0x56, 0xae, 0xea, 0xee, - 0x6d, 0xb2, 0xb5, 0x67, 0x3a, 0x3f, 0x6a, 0x41, 0x37, 0x6f, 0x4c, 0x8f, 0x32, 0x9d, 0x76, 0xd1, - 0x64, 0x03, 0xc6, 0x22, 0x4f, 0x89, 0xb9, 0x65, 0x2d, 0x1e, 0xe6, 0x45, 0x73, 0x84, 0x95, 0x4c, - 0xdf, 0x20, 0x04, 0xec, 0x1b, 0x5d, 0x6b, 0x6f, 0xcc, 0xcc, 0xa0, 0x2e, 0xde, 0xce, 0x17, 0x80, - 0xfe, 0x98, 0x15, 0x20, 0x1f, 0x1d, 0x14, 0x6f, 0xc4, 0xfe, 0x50, 0x82, 0xe1, 0x55, 0x47, 0xa4, - 0x82, 0xf8, 0xc7, 0xf4, 0xfd, 0xd1, 0x13, 0xde, 0x77, 0x58, 0x93, 0xbd, 0xd9, 0xad, 0xf8, 0x36, - 0xab, 0xaf, 0x84, 0xa3, 0x30, 0x11, 0xe8, 0xa7, 0xd7, 0xff, 0xdf, 0x4e, 0x50, 0xff, 0x58, 0xc2, - 0x35, 0xdd, 0xf0, 0xb2, 0x48, 0xfc, 0x17, 0xf5, 0x75, 0x85, 0xaf, 0xe7, 0xd4, 0x61, 0xf5, 0xbc, - 0x4f, 0x1d, 0x44, 0x44, 0x9f, 0xde, 0xc6, 0xd7, 0x6a, 0xeb, 0xdb, 0x1f, 0xa9, 0x8f, 0xcf, 0xea, - 0x44, 0x5e, 0xf8, 0xc8, 0x6f, 0x48, 0x30, 0xb2, 0xea, 0xd4, 0xb6, 0x8d, 0xea, 0xff, 0xf3, 0xf6, - 0xbb, 0x0b, 0x47, 0x43, 0x3d, 0xbd, 0x4d, 0x2a, 0x3d, 0xf3, 0x5a, 0x0a, 0x92, 0xab, 0x4e, 0x0d, - 0xbd, 0x04, 0x63, 0xd1, 0xa4, 0xa1, 0x63, 0x2e, 0xd8, 0x1a, 0x11, 0x3a, 0xaf, 0xd7, 0x3a, 0x47, - 0x0f, 0xb4, 0x0f, 0x23, 0xe1, 0xc8, 0x71, 0xaa, 0x0b, 0x93, 0x10, 0x66, 0xe1, 0x91, 0x5e, 0x31, - 0xbd, 0xc6, 0xde, 0x0e, 0x69, 0xcf, 0xe9, 0xdd, 0xdd, 0x85, 0x5a, 0x20, 0x75, 0xce, 0x6e, 0xdb, - 0xb8, 0x15, 0xa2, 0xbd, 0xa8, 0x4b, 0xe9, 0xa6, 0xbd, 0x08, 0x6e, 0x57, 0xed, 0x75, 0x9a, 0x5a, - 0x3b, 0x00, 0x81, 0x79, 0x70, 0x6f, 0x17, 0x0e, 0x3e, 0x5a, 0xe1, 0xe1, 0x9e, 0xd0, 0xbc, 0x43, - 0xa7, 0x5b, 0x9c, 0x8c, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xca, 0x34, 0x9e, 0x6a, - 0x94, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := compress_gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := io_ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -func (this *CommissionRates) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommissionRates) - if !ok { - that2, ok := that.(CommissionRates) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Rate.Equal(that1.Rate) { - return false - } - if !this.MaxRate.Equal(that1.MaxRate) { - return false - } - if !this.MaxChangeRate.Equal(that1.MaxChangeRate) { - return false - } - return true -} -func (this *Commission) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Commission) - if !ok { - that2, ok := that.(Commission) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.CommissionRates.Equal(&that1.CommissionRates) { - return false - } - if !this.UpdateTime.Equal(that1.UpdateTime) { - return false - } - return true -} -func (this *Description) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Description) - if !ok { - that2, ok := that.(Description) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Moniker != that1.Moniker { - return false - } - if this.Identity != that1.Identity { - return false - } - if this.Website != that1.Website { - return false - } - if this.SecurityContact != that1.SecurityContact { - return false - } - if this.Details != that1.Details { - return false - } - return true -} -func (this *UnbondingDelegationEntry) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UnbondingDelegationEntry) - if !ok { - that2, ok := that.(UnbondingDelegationEntry) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.CreationHeight != that1.CreationHeight { - return false - } - if !this.CompletionTime.Equal(that1.CompletionTime) { - return false - } - if !this.InitialBalance.Equal(that1.InitialBalance) { - return false - } - if !this.Balance.Equal(that1.Balance) { - return false - } - return true -} -func (this *RedelegationEntry) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedelegationEntry) - if !ok { - that2, ok := that.(RedelegationEntry) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.CreationHeight != that1.CreationHeight { - return false - } - if !this.CompletionTime.Equal(that1.CompletionTime) { - return false - } - if !this.InitialBalance.Equal(that1.InitialBalance) { - return false - } - if !this.SharesDst.Equal(that1.SharesDst) { - return false - } - return true -} -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UnbondingTime != that1.UnbondingTime { - return false - } - if this.MaxValidators != that1.MaxValidators { - return false - } - if this.MaxEntries != that1.MaxEntries { - return false - } - if this.HistoricalEntries != that1.HistoricalEntries { - return false - } - if this.BondDenom != that1.BondDenom { - return false - } - return true -} -func (this *RedelegationEntryResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedelegationEntryResponse) - if !ok { - that2, ok := that.(RedelegationEntryResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RedelegationEntry.Equal(&that1.RedelegationEntry) { - return false - } - if !this.Balance.Equal(that1.Balance) { - return false - } - return true -} -func (this *Pool) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Pool) - if !ok { - that2, ok := that.(Pool) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.NotBondedTokens.Equal(that1.NotBondedTokens) { - return false - } - if !this.BondedTokens.Equal(that1.BondedTokens) { - return false - } - return true -} -func (m *HistoricalInfo) 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 *HistoricalInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistoricalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Valset) > 0 { - for iNdEx := len(m.Valset) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Valset[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CommissionRates) 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 *CommissionRates) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommissionRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxChangeRate.Size() - i -= size - if _, err := m.MaxChangeRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.MaxRate.Size() - i -= size - if _, err := m.MaxRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.Rate.Size() - i -= size - if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Commission) 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 *Commission) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintStaking(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x12 - { - size, err := m.CommissionRates.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Description) 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 *Description) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Details) > 0 { - i -= len(m.Details) - copy(dAtA[i:], m.Details) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Details))) - i-- - dAtA[i] = 0x2a - } - if len(m.SecurityContact) > 0 { - i -= len(m.SecurityContact) - copy(dAtA[i:], m.SecurityContact) - i = encodeVarintStaking(dAtA, i, uint64(len(m.SecurityContact))) - i-- - dAtA[i] = 0x22 - } - if len(m.Website) > 0 { - i -= len(m.Website) - copy(dAtA[i:], m.Website) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Website))) - i-- - dAtA[i] = 0x1a - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x12 - } - if len(m.Moniker) > 0 { - i -= len(m.Moniker) - copy(dAtA[i:], m.Moniker) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Moniker))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Validator) 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 *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MinSelfDelegation.Size() - i -= size - if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - { - size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintStaking(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x4a - if m.UnbondingHeight != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingHeight)) - i-- - dAtA[i] = 0x40 - } - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size := m.DelegatorShares.Size() - i -= size - if _, err := m.DelegatorShares.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.Tokens.Size() - i -= size - if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.Status != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x20 - } - if m.Jailed { - i-- - if m.Jailed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.ConsensusPubkey != nil { - { - size, err := m.ConsensusPubkey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.OperatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValAddresses) 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 *ValAddresses) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DVPair) 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 *DVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DVPairs) 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 *DVPairs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DVPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Pairs) > 0 { - for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DVVTriplet) 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 *DVVTriplet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DVVTriplet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorDstAddress) > 0 { - i -= len(m.ValidatorDstAddress) - copy(dAtA[i:], m.ValidatorDstAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorSrcAddress) > 0 { - i -= len(m.ValidatorSrcAddress) - copy(dAtA[i:], m.ValidatorSrcAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DVVTriplets) 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 *DVVTriplets) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DVVTriplets) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Triplets) > 0 { - for iNdEx := len(m.Triplets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Triplets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Delegation) 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 *Delegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Shares.Size() - i -= size - if _, err := m.Shares.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbondingDelegation) 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 *UnbondingDelegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbondingDelegationEntry) 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 *UnbondingDelegationEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingDelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Balance.Size() - i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.InitialBalance.Size() - i -= size - if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err8 != nil { - return 0, err8 - } - i -= n8 - i = encodeVarintStaking(dAtA, i, uint64(n8)) - i-- - dAtA[i] = 0x12 - if m.CreationHeight != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RedelegationEntry) 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 *RedelegationEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.SharesDst.Size() - i -= size - if _, err := m.SharesDst.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.InitialBalance.Size() - i -= size - if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err9 != nil { - return 0, err9 - } - i -= n9 - i = encodeVarintStaking(dAtA, i, uint64(n9)) - i-- - dAtA[i] = 0x12 - if m.CreationHeight != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Redelegation) 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 *Redelegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Redelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.ValidatorDstAddress) > 0 { - i -= len(m.ValidatorDstAddress) - copy(dAtA[i:], m.ValidatorDstAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorSrcAddress) > 0 { - i -= len(m.ValidatorSrcAddress) - copy(dAtA[i:], m.ValidatorSrcAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BondDenom) > 0 { - i -= len(m.BondDenom) - copy(dAtA[i:], m.BondDenom) - i = encodeVarintStaking(dAtA, i, uint64(len(m.BondDenom))) - i-- - dAtA[i] = 0x2a - } - if m.HistoricalEntries != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.HistoricalEntries)) - i-- - dAtA[i] = 0x20 - } - if m.MaxEntries != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.MaxEntries)) - i-- - dAtA[i] = 0x18 - } - if m.MaxValidators != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.MaxValidators)) - i-- - dAtA[i] = 0x10 - } - n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintStaking(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DelegationResponse) 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 *DelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Delegation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RedelegationEntryResponse) 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 *RedelegationEntryResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedelegationEntryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Balance.Size() - i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.RedelegationEntry.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RedelegationResponse) 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 *RedelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Redelegation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Pool) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Pool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.BondedTokens.Size() - i -= size - if _, err := m.BondedTokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.NotBondedTokens.Size() - i -= size - if _, err := m.NotBondedTokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { - offset -= sovStaking(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *HistoricalInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Header.Size() - n += 1 + l + sovStaking(uint64(l)) - if len(m.Valset) > 0 { - for _, e := range m.Valset { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *CommissionRates) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Rate.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.MaxRate.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.MaxChangeRate.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Commission) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.CommissionRates.Size() - n += 1 + l + sovStaking(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Description) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Moniker) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.Website) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.SecurityContact) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.Details) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OperatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - if m.ConsensusPubkey != nil { - l = m.ConsensusPubkey.Size() - n += 1 + l + sovStaking(uint64(l)) - } - if m.Jailed { - n += 2 - } - if m.Status != 0 { - n += 1 + sovStaking(uint64(m.Status)) - } - l = m.Tokens.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.DelegatorShares.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.Description.Size() - n += 1 + l + sovStaking(uint64(l)) - if m.UnbondingHeight != 0 { - n += 1 + sovStaking(uint64(m.UnbondingHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) - n += 1 + l + sovStaking(uint64(l)) - l = m.Commission.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.MinSelfDelegation.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *ValAddresses) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *DVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - return n -} - -func (m *DVPairs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Pairs) > 0 { - for _, e := range m.Pairs { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *DVVTriplet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorDstAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - return n -} - -func (m *DVVTriplets) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Triplets) > 0 { - for _, e := range m.Triplets { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *Delegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = m.Shares.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *UnbondingDelegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *UnbondingDelegationEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreationHeight != 0 { - n += 1 + sovStaking(uint64(m.CreationHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovStaking(uint64(l)) - l = m.InitialBalance.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.Balance.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *RedelegationEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreationHeight != 0 { - n += 1 + sovStaking(uint64(m.CreationHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovStaking(uint64(l)) - l = m.InitialBalance.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.SharesDst.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Redelegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorDstAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) - n += 1 + l + sovStaking(uint64(l)) - if m.MaxValidators != 0 { - n += 1 + sovStaking(uint64(m.MaxValidators)) - } - if m.MaxEntries != 0 { - n += 1 + sovStaking(uint64(m.MaxEntries)) - } - if m.HistoricalEntries != 0 { - n += 1 + sovStaking(uint64(m.HistoricalEntries)) - } - l = len(m.BondDenom) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - return n -} - -func (m *DelegationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Delegation.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.Balance.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *RedelegationEntryResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.RedelegationEntry.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.Balance.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *RedelegationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Redelegation.Size() - n += 1 + l + sovStaking(uint64(l)) - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *Pool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.NotBondedTokens.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.BondedTokens.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func sovStaking(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStaking(x uint64) (n int) { - return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ValAddresses) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ValAddresses{`, - `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, - `}`, - }, "") - return s -} -func valueToStringStaking(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *HistoricalInfo) 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 ErrIntOverflowStaking - } - 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: HistoricalInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HistoricalInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Valset = append(m.Valset, Validator{}) - if err := m.Valset[len(m.Valset)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommissionRates) 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 ErrIntOverflowStaking - } - 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: CommissionRates: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommissionRates: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxChangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Commission) 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 ErrIntOverflowStaking - } - 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: Commission: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Commission: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommissionRates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommissionRates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Description) 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 ErrIntOverflowStaking - } - 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: Description: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Website = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SecurityContact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Details = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validator) 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 ErrIntOverflowStaking - } - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusPubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsensusPubkey == nil { - m.ConsensusPubkey = &types1.Any{} - } - if err := m.ConsensusPubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Jailed = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= BondStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DelegatorShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) - } - m.UnbondingHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValAddresses) 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 ErrIntOverflowStaking - } - 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: ValAddresses: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DVPair) 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 ErrIntOverflowStaking - } - 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: DVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DVPairs) 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 ErrIntOverflowStaking - } - 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: DVPairs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DVPairs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pairs = append(m.Pairs, DVPair{}) - if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DVVTriplet) 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 ErrIntOverflowStaking - } - 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: DVVTriplet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DVVTriplet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DVVTriplets) 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 ErrIntOverflowStaking - } - 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: DVVTriplets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DVVTriplets: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Triplets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Triplets = append(m.Triplets, DVVTriplet{}) - if err := m.Triplets[len(m.Triplets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Delegation) 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 ErrIntOverflowStaking - } - 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: Delegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbondingDelegation) 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 ErrIntOverflowStaking - } - 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: UnbondingDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbondingDelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, UnbondingDelegationEntry{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbondingDelegationEntry) 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 ErrIntOverflowStaking - } - 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: UnbondingDelegationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbondingDelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - m.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedelegationEntry) 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 ErrIntOverflowStaking - } - 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: RedelegationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - m.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SharesDst", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SharesDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Redelegation) 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 ErrIntOverflowStaking - } - 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: Redelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Redelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, RedelegationEntry{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) - } - m.MaxValidators = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxValidators |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) - } - m.MaxEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) - } - m.HistoricalEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistoricalEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BondDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegationResponse) 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 ErrIntOverflowStaking - } - 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: DelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Delegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedelegationEntryResponse) 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 ErrIntOverflowStaking - } - 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: RedelegationEntryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedelegationEntryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedelegationEntry", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RedelegationEntry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedelegationResponse) 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 ErrIntOverflowStaking - } - 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: RedelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redelegation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Redelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, RedelegationEntryResponse{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Pool) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Pool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotBondedTokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NotBondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondedTokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - 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 ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStaking(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStaking - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStaking - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStaking - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStaking - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStaking - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStaking - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStaking = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStaking = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStaking = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/staking/migrations/v040/types.go b/x/staking/migrations/v040/types.go deleted file mode 100644 index ba3be48cb6e6..000000000000 --- a/x/staking/migrations/v040/types.go +++ /dev/null @@ -1,205 +0,0 @@ -package v040 - -import ( - "fmt" - "strings" - "time" - - "sigs.k8s.io/yaml" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// Staking params default values -const ( - // DefaultUnbondingTime reflects three weeks in seconds as the default - // unbonding time. - // TODO: Justify our choice of default here. - DefaultUnbondingTime time.Duration = time.Hour * 24 * 7 * 3 - - // Default maximum number of bonded validators - DefaultMaxValidators uint32 = 100 - - // Default maximum entries in a UBD/RED pair - DefaultMaxEntries uint32 = 7 - - // DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this - // value by not adding the staking module to the application module manager's - // SetOrderBeginBlockers. - DefaultHistoricalEntries uint32 = 10000 -) - -// NewParams creates a new Params instance -func NewParams(unbondingTime time.Duration, maxValidators, maxEntries, historicalEntries uint32, bondDenom string) Params { - return Params{ - UnbondingTime: unbondingTime, - MaxValidators: maxValidators, - MaxEntries: maxEntries, - HistoricalEntries: historicalEntries, - BondDenom: bondDenom, - } -} - -// String returns a human readable string representation of the parameters. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} - -func DefaultParams() Params { - return NewParams( - DefaultUnbondingTime, - DefaultMaxValidators, - DefaultMaxEntries, - DefaultHistoricalEntries, - sdk.DefaultBondDenom, - ) -} - -// String implements the Stringer interface for a Commission object. -func (c Commission) String() string { - out, _ := yaml.Marshal(c) - return string(out) -} - -// String implements the Stringer interface for a CommissionRates object. -func (cr CommissionRates) String() string { - out, _ := yaml.Marshal(cr) - return string(out) -} - -// String implements the Stringer interface for a DVPair object. -func (dv DVPair) String() string { - out, _ := yaml.Marshal(dv) - return string(out) -} - -// String implements the Stringer interface for a DVVTriplet object. -func (dvv DVVTriplet) String() string { - out, _ := yaml.Marshal(dvv) - return string(out) -} - -// String returns a human readable string representation of a Delegation. -func (d Delegation) String() string { - out, _ := yaml.Marshal(d) - return string(out) -} - -// Delegations is a collection of delegations -type Delegations []Delegation - -func (d Delegations) String() (out string) { - for _, del := range d { - out += del.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// String implements the stringer interface for a UnbondingDelegationEntry. -func (e UnbondingDelegationEntry) String() string { - out, _ := yaml.Marshal(e) - return string(out) -} - -// String returns a human readable string representation of an UnbondingDelegation. -func (ubd UnbondingDelegation) String() string { - out := fmt.Sprintf(`Unbonding Delegations between: - Delegator: %s - Validator: %s - Entries:`, ubd.DelegatorAddress, ubd.ValidatorAddress) - for i, entry := range ubd.Entries { - out += fmt.Sprintf(` Unbonding Delegation %d: - Creation Height: %v - Min time to unbond (unix): %v - Expected balance: %s`, i, entry.CreationHeight, - entry.CompletionTime, entry.Balance) - } - - return out -} - -// UnbondingDelegations is a collection of UnbondingDelegation -type UnbondingDelegations []UnbondingDelegation - -func (ubds UnbondingDelegations) String() (out string) { - for _, u := range ubds { - out += u.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// String implements the Stringer interface for a RedelegationEntry object. -func (e RedelegationEntry) String() string { - out, _ := yaml.Marshal(e) - return string(out) -} - -// String returns a human readable string representation of a Redelegation. -func (red Redelegation) String() string { - out := fmt.Sprintf(`Redelegations between: - Delegator: %s - Source Validator: %s - Destination Validator: %s - Entries: -`, - red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress, - ) - - for i, entry := range red.Entries { - out += fmt.Sprintf(` Redelegation Entry #%d: - Creation height: %v - Min time to unbond (unix): %v - Dest Shares: %s -`, - i, entry.CreationHeight, entry.CompletionTime, entry.SharesDst, - ) - } - - return strings.TrimRight(out, "\n") -} - -// Redelegations are a collection of Redelegation -type Redelegations []Redelegation - -func (d Redelegations) String() (out string) { - for _, red := range d { - out += red.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// String implements the Stringer interface for DelegationResponse. -func (d DelegationResponse) String() string { - return fmt.Sprintf("%s\n Balance: %s", d.Delegation.String(), d.Balance) -} - -// String implements the Stringer interface for a Validator object. -func (v Validator) String() string { - out, _ := yaml.Marshal(v) - return string(out) -} - -func (v Validator) TokensFromShares(shares sdk.Dec) sdk.Dec { - return (shares.MulInt(v.Tokens)).Quo(v.DelegatorShares) -} - -// Validators is a collection of Validator -type Validators []Validator - -func (v Validators) String() (out string) { - for _, val := range v { - out += val.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// String implements the Stringer interface for a Description object. -func (d Description) String() string { - out, _ := yaml.Marshal(d) - return string(out) -} diff --git a/x/staking/migrations/v040/keys.go b/x/staking/migrations/v042/types.go similarity index 78% rename from x/staking/migrations/v040/keys.go rename to x/staking/migrations/v042/types.go index 27e2f9eae02b..097c9ca8bc14 100644 --- a/x/staking/migrations/v040/keys.go +++ b/x/staking/migrations/v042/types.go @@ -1,6 +1,4 @@ -// Package v040 is copy-pasted from: -// https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/staking/types/keys.go -package v040 +package v042 import ( "bytes" @@ -11,22 +9,27 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" "github.com/cosmos/cosmos-sdk/x/staking/types" ) +// Staking params default values const ( - // ModuleName is the name of the staking module - ModuleName = "staking" + // DefaultUnbondingTime reflects three weeks in seconds as the default + // unbonding time. + // TODO: Justify our choice of default here. + DefaultUnbondingTime time.Duration = time.Hour * 24 * 7 * 3 - // StoreKey is the string store representation - StoreKey = ModuleName + // Default maximum number of bonded validators + DefaultMaxValidators uint32 = 100 - // QuerierRoute is the querier route for the staking module - QuerierRoute = ModuleName + // Default maximum entries in a UBD/RED pair + DefaultMaxEntries uint32 = 7 - // RouterKey is the msg router key for the staking module - RouterKey = ModuleName + // DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this + // value by not adding the staking module to the application module manager's + // SetOrderBeginBlockers. + DefaultHistoricalEntries uint32 = 10000 ) var ( @@ -87,7 +90,7 @@ func GetValidatorsByPowerIndexKey(validator types.Validator) []byte { powerBytesLen := len(powerBytes) // 8 // key is of format prefix || powerbytes || addrBytes - key := make([]byte, 1+powerBytesLen+v040auth.AddrLen) + key := make([]byte, 1+powerBytesLen+v042auth.AddrLen) key[0] = ValidatorsByPowerIndexKey[0] copy(key[1:powerBytesLen+1], powerBytes) @@ -111,46 +114,104 @@ func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { return append(LastValidatorPowerKey, operator...) } -// parse the validators operator address from power rank key -func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) { - powerBytesLen := 8 - kv.AssertKeyLength(key, 1+powerBytesLen+v040auth.AddrLen) +// GetREDKey returns a key prefix for indexing a redelegation from a delegator +// and source validator to a destination validator. +func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + key := make([]byte, 1+v042auth.AddrLen*3) - operAddr = sdk.CopyBytes(key[powerBytesLen+1:]) + copy(key[0:v042auth.AddrLen+1], GetREDsKey(delAddr.Bytes())) + copy(key[v042auth.AddrLen+1:2*v042auth.AddrLen+1], valSrcAddr.Bytes()) + copy(key[2*v042auth.AddrLen+1:3*v042auth.AddrLen+1], valDstAddr.Bytes()) - for i, b := range operAddr { - operAddr[i] = ^b - } + return key +} + +// gets the index-key for a redelegation, stored by source-validator-index +// VALUE: none (key rearrangement used) +func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + REDSFromValsSrcKey := GetREDsFromValSrcIndexKey(valSrcAddr) + offset := len(REDSFromValsSrcKey) + + // key is of the form REDSFromValsSrcKey || delAddr || valDstAddr + key := make([]byte, len(REDSFromValsSrcKey)+2*v042auth.AddrLen) + copy(key[0:offset], REDSFromValsSrcKey) + copy(key[offset:offset+v042auth.AddrLen], delAddr.Bytes()) + copy(key[offset+v042auth.AddrLen:offset+2*v042auth.AddrLen], valDstAddr.Bytes()) - return operAddr + return key } -// GetValidatorQueueKey returns the prefix key used for getting a set of unbonding -// validators whose unbonding completion occurs at the given time and height. -func GetValidatorQueueKey(timestamp time.Time, height int64) []byte { - heightBz := sdk.Uint64ToBigEndian(uint64(height)) - timeBz := sdk.FormatTimeBytes(timestamp) - timeBzL := len(timeBz) - prefixL := len(ValidatorQueueKey) +// gets the index-key for a redelegation, stored by destination-validator-index +// VALUE: none (key rearrangement used) +func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + REDSToValsDstKey := GetREDsToValDstIndexKey(valDstAddr) + offset := len(REDSToValsDstKey) - bz := make([]byte, prefixL+8+timeBzL+8) + // key is of the form REDSToValsDstKey || delAddr || valSrcAddr + key := make([]byte, len(REDSToValsDstKey)+2*v042auth.AddrLen) + copy(key[0:offset], REDSToValsDstKey) + copy(key[offset:offset+v042auth.AddrLen], delAddr.Bytes()) + copy(key[offset+v042auth.AddrLen:offset+2*v042auth.AddrLen], valSrcAddr.Bytes()) - // copy the prefix - copy(bz[:prefixL], ValidatorQueueKey) + return key +} - // copy the encoded time bytes length - copy(bz[prefixL:prefixL+8], sdk.Uint64ToBigEndian(uint64(timeBzL))) +// GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey +func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte { + // note that first byte is prefix byte + kv.AssertKeyLength(indexKey, 3*v042auth.AddrLen+1) - // copy the encoded time bytes - copy(bz[prefixL+8:prefixL+8+timeBzL], timeBz) + valSrcAddr := indexKey[1 : v042auth.AddrLen+1] + delAddr := indexKey[v042auth.AddrLen+1 : 2*v042auth.AddrLen+1] + valDstAddr := indexKey[2*v042auth.AddrLen+1 : 3*v042auth.AddrLen+1] - // copy the encoded height - copy(bz[prefixL+8+timeBzL:], heightBz) + return GetREDKey(delAddr, valSrcAddr, valDstAddr) +} - return bz +// GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey +func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte { + // note that first byte is prefix byte + kv.AssertKeyLength(indexKey, 3*v042auth.AddrLen+1) + + valDstAddr := indexKey[1 : v042auth.AddrLen+1] + delAddr := indexKey[v042auth.AddrLen+1 : 2*v042auth.AddrLen+1] + valSrcAddr := indexKey[2*v042auth.AddrLen+1 : 3*v042auth.AddrLen+1] + + return GetREDKey(delAddr, valSrcAddr, valDstAddr) +} + +func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte { + return append(RedelegationByValDstIndexKey, valDstAddr.Bytes()...) +} + +// GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to +// a source validator. +func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte { + return append(RedelegationByValSrcIndexKey, valSrcAddr.Bytes()...) +} + +// GetREDsKey returns a key prefix for indexing a redelegation from a delegator +// address. +func GetREDsKey(delAddr sdk.AccAddress) []byte { + return append(RedelegationKey, delAddr.Bytes()...) +} + +// gets the prefix for all unbonding delegations from a delegator +func GetUBDsKey(delAddr sdk.AccAddress) []byte { + return append(UnbondingDelegationKey, delAddr.Bytes()...) +} + +// gets the prefix keyspace for the indexes of unbonding delegations for a validator +func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte { + return append(UnbondingDelegationByValIndexKey, valAddr.Bytes()...) +} + +// gets the prefix for all unbonding delegations from a delegator +func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { + bz := sdk.FormatTimeBytes(timestamp) + return append(UnbondingQueueKey, bz...) } -// ParseValidatorQueueKey returns the encoded time and height from a key created // from GetValidatorQueueKey. func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error) { prefixL := len(ValidatorQueueKey) @@ -198,95 +259,38 @@ func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte func GetUBDKeyFromValIndexKey(indexKey []byte) []byte { kv.AssertKeyAtLeastLength(indexKey, 2) addrs := indexKey[1:] // remove prefix bytes - kv.AssertKeyLength(addrs, 2*v040auth.AddrLen) + kv.AssertKeyLength(addrs, 2*v042auth.AddrLen) - kv.AssertKeyAtLeastLength(addrs, v040auth.AddrLen+1) - valAddr := addrs[:v040auth.AddrLen] - delAddr := addrs[v040auth.AddrLen:] + kv.AssertKeyAtLeastLength(addrs, v042auth.AddrLen+1) + valAddr := addrs[:v042auth.AddrLen] + delAddr := addrs[v042auth.AddrLen:] return GetUBDKey(delAddr, valAddr) } -// gets the prefix for all unbonding delegations from a delegator -func GetUBDsKey(delAddr sdk.AccAddress) []byte { - return append(UnbondingDelegationKey, delAddr.Bytes()...) -} - -// gets the prefix keyspace for the indexes of unbonding delegations for a validator -func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte { - return append(UnbondingDelegationByValIndexKey, valAddr.Bytes()...) -} - -// gets the prefix for all unbonding delegations from a delegator -func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { - bz := sdk.FormatTimeBytes(timestamp) - return append(UnbondingQueueKey, bz...) -} - -// GetREDKey returns a key prefix for indexing a redelegation from a delegator -// and source validator to a destination validator. -func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - key := make([]byte, 1+v040auth.AddrLen*3) - - copy(key[0:v040auth.AddrLen+1], GetREDsKey(delAddr.Bytes())) - copy(key[v040auth.AddrLen+1:2*v040auth.AddrLen+1], valSrcAddr.Bytes()) - copy(key[2*v040auth.AddrLen+1:3*v040auth.AddrLen+1], valDstAddr.Bytes()) - - return key -} - -// gets the index-key for a redelegation, stored by source-validator-index -// VALUE: none (key rearrangement used) -func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - REDSFromValsSrcKey := GetREDsFromValSrcIndexKey(valSrcAddr) - offset := len(REDSFromValsSrcKey) - - // key is of the form REDSFromValsSrcKey || delAddr || valDstAddr - key := make([]byte, len(REDSFromValsSrcKey)+2*v040auth.AddrLen) - copy(key[0:offset], REDSFromValsSrcKey) - copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) - copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valDstAddr.Bytes()) - - return key -} - -// gets the index-key for a redelegation, stored by destination-validator-index -// VALUE: none (key rearrangement used) -func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - REDSToValsDstKey := GetREDsToValDstIndexKey(valDstAddr) - offset := len(REDSToValsDstKey) - - // key is of the form REDSToValsDstKey || delAddr || valSrcAddr - key := make([]byte, len(REDSToValsDstKey)+2*v040auth.AddrLen) - copy(key[0:offset], REDSToValsDstKey) - copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) - copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valSrcAddr.Bytes()) - - return key -} +// GetValidatorQueueKey returns the prefix key used for getting a set of unbonding +// validators whose unbonding completion occurs at the given time and height. +func GetValidatorQueueKey(timestamp time.Time, height int64) []byte { + heightBz := sdk.Uint64ToBigEndian(uint64(height)) + timeBz := sdk.FormatTimeBytes(timestamp) + timeBzL := len(timeBz) + prefixL := len(ValidatorQueueKey) -// GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey -func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte { - // note that first byte is prefix byte - kv.AssertKeyLength(indexKey, 3*v040auth.AddrLen+1) + bz := make([]byte, prefixL+8+timeBzL+8) - valSrcAddr := indexKey[1 : v040auth.AddrLen+1] - delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] - valDstAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + // copy the prefix + copy(bz[:prefixL], ValidatorQueueKey) - return GetREDKey(delAddr, valSrcAddr, valDstAddr) -} + // copy the encoded time bytes length + copy(bz[prefixL:prefixL+8], sdk.Uint64ToBigEndian(uint64(timeBzL))) -// GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey -func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte { - // note that first byte is prefix byte - kv.AssertKeyLength(indexKey, 3*v040auth.AddrLen+1) + // copy the encoded time bytes + copy(bz[prefixL+8:prefixL+8+timeBzL], timeBz) - valDstAddr := indexKey[1 : v040auth.AddrLen+1] - delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] - valSrcAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + // copy the encoded height + copy(bz[prefixL+8+timeBzL:], heightBz) - return GetREDKey(delAddr, valSrcAddr, valDstAddr) + return bz } // GetRedelegationTimeKey returns a key prefix for indexing an unbonding @@ -296,30 +300,6 @@ func GetRedelegationTimeKey(timestamp time.Time) []byte { return append(RedelegationQueueKey, bz...) } -// GetREDsKey returns a key prefix for indexing a redelegation from a delegator -// address. -func GetREDsKey(delAddr sdk.AccAddress) []byte { - return append(RedelegationKey, delAddr.Bytes()...) -} - -// GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to -// a source validator. -func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte { - return append(RedelegationByValSrcIndexKey, valSrcAddr.Bytes()...) -} - -// GetREDsToValDstIndexKey returns a key prefix for indexing a redelegation to a -// destination (target) validator. -func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte { - return append(RedelegationByValDstIndexKey, valDstAddr.Bytes()...) -} - -// GetREDsByDelToValDstIndexKey returns a key prefix for indexing a redelegation -// from an address to a source validator. -func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte { - return append(GetREDsToValDstIndexKey(valDstAddr), delAddr.Bytes()...) -} - // GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects. func GetHistoricalInfoKey(height int64) []byte { return append(HistoricalInfoKey, []byte(strconv.FormatInt(height, 10))...) diff --git a/x/staking/migrations/v043/keys.go b/x/staking/migrations/v043/keys.go new file mode 100644 index 000000000000..bca943d8aec8 --- /dev/null +++ b/x/staking/migrations/v043/keys.go @@ -0,0 +1,6 @@ +package v043 + +const ( + // ModuleName is the name of the module + ModuleName = "staking" +) diff --git a/x/staking/migrations/v043/store.go b/x/staking/migrations/v043/store.go index 2ebcbb8686de..620d9b6a1a07 100644 --- a/x/staking/migrations/v043/store.go +++ b/x/staking/migrations/v043/store.go @@ -5,9 +5,9 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v040" + v042auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v042" v043distribution "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v043" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v040" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v042" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -22,9 +22,9 @@ func migratePrefixAddressAddressAddress(store sdk.KVStore, prefixBz []byte) { defer oldStoreIter.Close() for ; oldStoreIter.Valid(); oldStoreIter.Next() { - addr1 := oldStoreIter.Key()[:v040auth.AddrLen] - addr2 := oldStoreIter.Key()[v040auth.AddrLen : 2*v040auth.AddrLen] - addr3 := oldStoreIter.Key()[2*v040auth.AddrLen:] + addr1 := oldStoreIter.Key()[:v042auth.AddrLen] + addr2 := oldStoreIter.Key()[v042auth.AddrLen : 2*v042auth.AddrLen] + addr3 := oldStoreIter.Key()[2*v042auth.AddrLen:] newStoreKey := append(append(append( prefixBz, address.MustLengthPrefix(addr1)...), address.MustLengthPrefix(addr2)...), address.MustLengthPrefix(addr3)..., diff --git a/x/staking/migrations/v043/store_test.go b/x/staking/migrations/v043/store_test.go index 756590a5dc19..920ff55067de 100644 --- a/x/staking/migrations/v043/store_test.go +++ b/x/staking/migrations/v043/store_test.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v040" + v042staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v042" v043staking "github.com/cosmos/cosmos-sdk/x/staking/migrations/v043" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -41,77 +41,77 @@ func TestStoreMigration(t *testing.T) { }{ { "LastValidatorPowerKey", - v040staking.GetLastValidatorPowerKey(valAddr1), + v042staking.GetLastValidatorPowerKey(valAddr1), types.GetLastValidatorPowerKey(valAddr1), }, { "LastTotalPowerKey", - v040staking.LastTotalPowerKey, + v042staking.LastTotalPowerKey, types.LastTotalPowerKey, }, { "ValidatorsKey", - v040staking.GetValidatorKey(valAddr1), + v042staking.GetValidatorKey(valAddr1), types.GetValidatorKey(valAddr1), }, { "ValidatorsByConsAddrKey", - v040staking.GetValidatorByConsAddrKey(consAddr), + v042staking.GetValidatorByConsAddrKey(consAddr), types.GetValidatorByConsAddrKey(consAddr), }, { "ValidatorsByPowerIndexKey", - v040staking.GetValidatorsByPowerIndexKey(val), + v042staking.GetValidatorsByPowerIndexKey(val), types.GetValidatorsByPowerIndexKey(val, sdk.DefaultPowerReduction), }, { "DelegationKey", - v040staking.GetDelegationKey(addr4, valAddr1), + v042staking.GetDelegationKey(addr4, valAddr1), types.GetDelegationKey(addr4, valAddr1), }, { "UnbondingDelegationKey", - v040staking.GetUBDKey(addr4, valAddr1), + v042staking.GetUBDKey(addr4, valAddr1), types.GetUBDKey(addr4, valAddr1), }, { "UnbondingDelegationByValIndexKey", - v040staking.GetUBDByValIndexKey(addr4, valAddr1), + v042staking.GetUBDByValIndexKey(addr4, valAddr1), types.GetUBDByValIndexKey(addr4, valAddr1), }, { "RedelegationKey", - v040staking.GetREDKey(addr4, valAddr1, valAddr2), + v042staking.GetREDKey(addr4, valAddr1, valAddr2), types.GetREDKey(addr4, valAddr1, valAddr2), }, { "RedelegationByValSrcIndexKey", - v040staking.GetREDByValSrcIndexKey(addr4, valAddr1, valAddr2), + v042staking.GetREDByValSrcIndexKey(addr4, valAddr1, valAddr2), types.GetREDByValSrcIndexKey(addr4, valAddr1, valAddr2), }, { "RedelegationByValDstIndexKey", - v040staking.GetREDByValDstIndexKey(addr4, valAddr1, valAddr2), + v042staking.GetREDByValDstIndexKey(addr4, valAddr1, valAddr2), types.GetREDByValDstIndexKey(addr4, valAddr1, valAddr2), }, { "UnbondingQueueKey", - v040staking.GetUnbondingDelegationTimeKey(now), + v042staking.GetUnbondingDelegationTimeKey(now), types.GetUnbondingDelegationTimeKey(now), }, { "RedelegationQueueKey", - v040staking.GetRedelegationTimeKey(now), + v042staking.GetRedelegationTimeKey(now), types.GetRedelegationTimeKey(now), }, { "ValidatorQueueKey", - v040staking.GetValidatorQueueKey(now, 4), + v042staking.GetValidatorQueueKey(now, 4), types.GetValidatorQueueKey(now, 4), }, { "HistoricalInfoKey", - v040staking.GetHistoricalInfoKey(4), + v042staking.GetHistoricalInfoKey(4), types.GetHistoricalInfoKey(4), }, } diff --git a/x/staking/migrations/v046/json.go b/x/staking/migrations/v046/json.go new file mode 100644 index 000000000000..e3be292a2c74 --- /dev/null +++ b/x/staking/migrations/v046/json.go @@ -0,0 +1,13 @@ +package v046 + +import "github.com/cosmos/cosmos-sdk/x/staking/types" + +// MigrateJSON accepts exported v0.43 x/stakinng genesis state and migrates it to +// v0.46 x/staking genesis state. The migration includes: +// +// - Add MinCommissionRate param. +func MigrateJSON(oldState types.GenesisState) (types.GenesisState, error) { + oldState.Params.MinCommissionRate = types.DefaultMinCommissionRate + + return oldState, nil +} diff --git a/x/staking/migrations/v046/json_test.go b/x/staking/migrations/v046/json_test.go new file mode 100644 index 000000000000..df1d8db94329 --- /dev/null +++ b/x/staking/migrations/v046/json_test.go @@ -0,0 +1,57 @@ +package v046_test + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/simapp" + v046 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v046" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func TestMigrateJSON(t *testing.T) { + encodingConfig := simapp.MakeTestEncodingConfig() + clientCtx := client.Context{}. + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithCodec(encodingConfig.Codec) + + oldState := types.DefaultGenesisState() + + newState, err := v046.MigrateJSON(*oldState) + require.NoError(t, err) + + bz, err := clientCtx.Codec.MarshalJSON(&newState) + require.NoError(t, err) + + // Indent the JSON bz correctly. + var jsonObj map[string]interface{} + err = json.Unmarshal(bz, &jsonObj) + require.NoError(t, err) + indentedBz, err := json.MarshalIndent(jsonObj, "", "\t") + require.NoError(t, err) + + // Make sure about new param MinCommissionRate. + expected := `{ + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "stake", + "historical_entries": 10000, + "max_entries": 7, + "max_validators": 100, + "min_commission_rate": "0.000000000000000000", + "unbonding_time": "1814400s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [] +}` + + require.Equal(t, expected, string(indentedBz)) +} diff --git a/x/staking/migrations/v046/keys.go b/x/staking/migrations/v046/keys.go new file mode 100644 index 000000000000..f937f1593058 --- /dev/null +++ b/x/staking/migrations/v046/keys.go @@ -0,0 +1,6 @@ +package v046 + +const ( + // ModuleName is the name of the module + ModuleName = "staking" +) diff --git a/x/staking/migrations/v046/store.go b/x/staking/migrations/v046/store.go index 20825ec26029..e2be22cbb1ff 100644 --- a/x/staking/migrations/v046/store.go +++ b/x/staking/migrations/v046/store.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// MigrateStore performs in-place store migrations from v0.43/v0.44 to v0.45. +// MigrateStore performs in-place store migrations from v0.43/v0.44/v0.45 to v0.46. // The migration includes: // // - Setting the MinCommissionRate param in the paramstore @@ -19,6 +19,10 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar } func migrateParamsStore(ctx sdk.Context, paramstore paramtypes.Subspace) { - paramstore.WithKeyTable(types.ParamKeyTable()) - paramstore.Set(ctx, types.KeyMinCommissionRate, types.DefaultMinCommissionRate) + if paramstore.HasKeyTable() { + paramstore.Set(ctx, types.KeyMinCommissionRate, types.DefaultMinCommissionRate) + } else { + paramstore.WithKeyTable(types.ParamKeyTable()) + paramstore.Set(ctx, types.KeyMinCommissionRate, types.DefaultMinCommissionRate) + } } diff --git a/x/staking/module.go b/x/staking/module.go index 39665347c994..93b41daef60a 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -24,7 +23,7 @@ import ( ) const ( - consensusVersion uint64 = 4 + consensusVersion uint64 = 3 ) var ( @@ -71,11 +70,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return ValidateGenesis(&data) } -// RegisterRESTRoutes registers the REST routes for the staking module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/staking` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the staking module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -155,14 +149,13 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. cdc.MustUnmarshalJSON(data, &genesisState) - return InitGenesis(ctx, am.keeper, am.accountKeeper, am.bankKeeper, &genesisState) + return am.keeper.InitGenesis(ctx, &genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the staking // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - gs := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(gs) + return cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx)) } // ConsensusVersion implements AppModule/ConsensusVersion. diff --git a/x/staking/module_test.go b/x/staking/module_test.go index 8784893634b6..3f1e5d916883 100644 --- a/x/staking/module_test.go +++ b/x/staking/module_test.go @@ -23,7 +23,7 @@ func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { genesisState := simapp.GenesisStateWithSingleValidator(t, app) stateBytes, err := tmjson.Marshal(genesisState) require.NoError(t, err) - + app.InitChain( abcitypes.RequestInitChain{ AppStateBytes: stateBytes, diff --git a/x/staking/simulation/genesis.go b/x/staking/simulation/genesis.go index f8737f7f7e0a..afd393c1c778 100644 --- a/x/staking/simulation/genesis.go +++ b/x/staking/simulation/genesis.go @@ -89,11 +89,11 @@ func RandomizedGenState(simState *module.SimulationState) { if err != nil { panic(err) } - validator.Tokens = sdk.NewInt(simState.InitialStake) - validator.DelegatorShares = sdk.NewDec(simState.InitialStake) + validator.Tokens = simState.InitialStake + validator.DelegatorShares = sdk.NewDecFromInt(simState.InitialStake) validator.Commission = commission - delegation := types.NewDelegation(simState.Accounts[i].Address, valAddr, sdk.NewDec(simState.InitialStake)) + delegation := types.NewDelegation(simState.Accounts[i].Address, valAddr, sdk.NewDecFromInt(simState.InitialStake)) validators = append(validators, validator) delegations = append(delegations, delegation) diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index b7dae7dfb97f..dd60652a87bb 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -32,7 +33,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), } @@ -94,9 +95,10 @@ func TestRandomizedGenState1(t *testing.T) { Rand: r, NumBonded: 4, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: sdkmath.NewInt(1000), GenState: make(map[string]json.RawMessage), - }, "invalid memory address or nil pointer dereference"}, + }, "invalid memory address or nil pointer dereference", + }, } for _, tt := range tests { diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index 1a702b150c35..c28b489d6a51 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -135,7 +135,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k var fees sdk.Coins - coins, hasNeg := spendable.SafeSub(sdk.Coins{selfDelegation}) + coins, hasNeg := spendable.SafeSub(selfDelegation) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -164,6 +164,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k } txCtx := simulation.OperationInput{ + R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, @@ -277,7 +278,7 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K var fees sdk.Coins - coins, hasNeg := spendable.SafeSub(sdk.Coins{bondAmt}) + coins, hasNeg := spendable.SafeSub(bondAmt) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -288,6 +289,7 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K msg := types.NewMsgDelegate(simAccount.Address, val.GetOperator(), bondAmt) txCtx := simulation.OperationInput{ + R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, @@ -419,10 +421,7 @@ func SimulateMsgCancelUnbondingDelegate(ak types.AccountKeeper, bk types.BankKee return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "delegator receiving balance is negative"), nil, nil } - cancelBondAmt, err := simtypes.RandPositiveInt(r, unbondingDelegationEntry.Balance) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "invalid cancelBondAmt amount"), nil, err - } + cancelBondAmt := simtypes.RandomAmount(r, unbondingDelegationEntry.Balance) if cancelBondAmt.IsZero() { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "cancelBondAmt amount is zero"), nil, nil diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 2c04abe875a8..aa07bafe0649 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -46,7 +46,8 @@ func TestWeightedOperations(t *testing.T) { weight int opMsgRoute string opMsgName string - }{{simappparams.DefaultWeightMsgCreateValidator, types.ModuleName, types.TypeMsgCreateValidator}, + }{ + {simappparams.DefaultWeightMsgCreateValidator, types.ModuleName, types.TypeMsgCreateValidator}, {simappparams.DefaultWeightMsgEditValidator, types.ModuleName, types.TypeMsgEditValidator}, {simappparams.DefaultWeightMsgDelegate, types.ModuleName, types.TypeMsgDelegate}, {simappparams.DefaultWeightMsgUndelegate, types.ModuleName, types.TypeMsgUndelegate}, @@ -380,5 +381,4 @@ func setupValidatorRewards(app *simapp.SimApp, ctx sdk.Context, valAddress sdk.V // setup current revards currentRewards := distrtypes.NewValidatorCurrentRewards(decCoins, 3) app.DistrKeeper.SetValidatorCurrentRewards(ctx, valAddress, currentRewards) - } diff --git a/x/staking/spec/01_state.md b/x/staking/spec/01_state.md index 1dad2be91780..fb3c1825bfcd 100644 --- a/x/staking/spec/01_state.md +++ b/x/staking/spec/01_state.md @@ -20,9 +20,7 @@ Store entries prefixed with "Last" must remain unchanged until EndBlock. Params is a module-wide configuration structure that stores system parameters and defines overall functioning of the staking module. -* Params: `Paramsspace("staking") -> legacy_amino(params)` - -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/proto/cosmos/staking/v1beta1/staking.proto#L230-L241 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L285-L306 ## Validator @@ -75,9 +73,9 @@ is updated during the validator set update process which takes place in [`EndBlo Each validator's state is stored in a `Validator` struct: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L65-L99 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L78-L127 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L24-L63 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L24-L76 ## Delegation @@ -91,7 +89,7 @@ funds are held in a `Delegation` data structure. It is owned by one delegator, and is associated with the shares for one validator. The sender of the transaction is the owner of the bond. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L159-L170 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L187-L205 ### Delegator Shares @@ -130,7 +128,7 @@ slashed. A UnbondingDelegation object is created every time an unbonding is initiated. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L172-L198 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L207-L220 ## Redelegation @@ -158,13 +156,13 @@ A redelegation object is created every time a redelegation occurs. To prevent * and, the (re)delegator is attempting to create a _new_ redelegation where the source validator for this new redelegation is `Validator X`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L200-L228 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L245-L283 ## Queues All queues objects are sorted by timestamp. The time used within any queue is first rounded to the nearest nanosecond then sorted. The sortable time format -used is a slight modification of the RFC3339Nano and uses the the format string +used is a slight modification of the RFC3339Nano and uses the format string `"2006-01-02T15:04:05.000000000"`. Notably this format: * right pads all zeros @@ -180,7 +178,7 @@ delegations queue is kept. * UnbondingDelegation: `0x41 | format(time) -> []DVPair` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L123-L133 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L151-L161 ### RedelegationQueue @@ -189,7 +187,7 @@ kept. * RedelegationQueue: `0x42 | format(time) -> []DVVTriplet` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L140-L152 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L168-L179 ### ValidatorQueue @@ -208,7 +206,7 @@ that multiple validators exist in the queue at the same location. HistoricalInfo objects are stored and pruned at each block such that the staking keeper persists the `n` most recent historical info defined by staking module parameter: `HistoricalEntries`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L15-L22 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/staking.proto#L15-L22 At each BeginBlock, the staking keeper will persist the current Header and the Validators that committed the current block in a `HistoricalInfo` object. The Validators are sorted on their address to ensure that diff --git a/x/staking/spec/02_state_transitions.md b/x/staking/spec/02_state_transitions.md index 1eda63bc8c20..9e9efffaeaa2 100644 --- a/x/staking/spec/02_state_transitions.md +++ b/x/staking/spec/02_state_transitions.md @@ -91,6 +91,12 @@ Delegation may be called. shares from the `BondedPool` to the `NotBondedPool` `ModuleAccount` * remove the validator if it is unbonded and there are no more delegation shares. +### Cancel an `UnbondingDelegation` Entry +When a `cancel unbond delegation` occurs both the `validator`, the `delegation` and an `UnbondingDelegationQueue` state will be updated. +* if cancel unbonding delegation amount equals to the `UnbondingDelegation` entry `balance`, then the `UnbondingDelegation` entry deleted from `UnbondingDelegationQueue`. +* if the `cancel unbonding delegation amount is less than the `UnbondingDelegation` entry balance, then the `UnbondingDelegation` entry will be updated with new balance in the `UnbondingDelegationQueue`. +* cancel `amount` is [Delegated](02_state_transitions.md#delegations) back to the original `validator`. + ### Complete Unbonding For undelegations which do not complete immediately, the following operations diff --git a/x/staking/spec/03_messages.md b/x/staking/spec/03_messages.md index 27c307b24994..a0222d36dfeb 100644 --- a/x/staking/spec/03_messages.md +++ b/x/staking/spec/03_messages.md @@ -11,9 +11,9 @@ In this section we describe the processing of the staking messages and the corre A validator is created using the `MsgCreateValidator` message. The validator must be created with an initial delegation from the operator. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L16-L17 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L18-L19 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L35-L51 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L43-L65 This message is expected to fail if: @@ -36,9 +36,9 @@ in the first end-block. The `Description`, `CommissionRate` of a validator can be updated using the `MsgEditValidator` message. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L19-L20 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L21-L22 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L56-L76 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L70-L88 This message is expected to fail if: @@ -55,9 +55,9 @@ Within this message the delegator provides coins, and in return receives some amount of their validator's (newly created) delegator-shares that are assigned to `Delegation.Shares`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L22-L24 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L24-L26 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L93-L104 This message is expected to fail if: @@ -87,13 +87,13 @@ will not be added to the power index until it is unjailed. The `MsgUndelegate` message allows delegators to undelegate their tokens from validator. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L30-L32 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L32-L34 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L128-L139 This message returns a response containing the completion time of the undelegation: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L123-L126 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L128-L144 This message is expected to fail if: @@ -116,19 +116,40 @@ When this message is processed the following actions occur: ![Unbond sequence](../../../docs/uml/svg/unbond_sequence.svg) +## MsgCancelUnbondingDelegation + +The `MsgCancelUnbondingDelegation` message allows delegators to cancel the `unbondingDelegation` entry and deleagate back to a previous validator. + ++++ hhttps://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L36-L40 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L146-L165 + +This message is expected to fail if: + +* the `unbondingDelegation` entry is already processed. +* the `cancel unbonding delegation` amount is greater than the `unbondingDelegation` entry balance. +* the `cancel unbonding delegation` height doesn't exists in the `unbondingDelegationQueue` of the delegator. + +When this message is processed the following actions occur: + +* if the `unbondingDelegation` Entry balance is zero + * in this condition `unbondingDelegation` entry will be removed from `unbondingDelegationQueue`. + * otherwise `unbondingDelegationQueue` will be updated with new `unbondingDelegation` entry balance and initial balance +* the validator's `DelegatorShares` and the delegation's `Shares` are both increased by the message `Amount`. + ## MsgBeginRedelegate The redelegation command allows delegators to instantly switch validators. Once the unbonding period has passed, the redelegation is automatically completed in the EndBlocker. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L26-L28 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L28-L30 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L109-L121 This message returns a response containing the completion time of the redelegation: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L107-L110 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/staking/v1beta1/tx.proto#L123-L126 This message is expected to fail if: diff --git a/x/staking/spec/07_events.md b/x/staking/spec/07_events.md index 3f9203033cd2..eeeb84c4b902 100644 --- a/x/staking/spec/07_events.md +++ b/x/staking/spec/07_events.md @@ -63,6 +63,18 @@ The staking module emits the following events: * [0] Time is formatted in the RFC3339 standard +### MsgCancelUnbondingDelegation + +| Type | Attribute Key | Attribute Value | +| ----------------------------- | ------------------ | ------------------------------------| +| cancel_unbonding_delegation | validator | {validatorAddress} | +| cancel_unbonding_delegation | delegator | {delegatorAddress} | +| cancel_unbonding_delegation | amount | {cancelUnbondingDelegationAmount} | +| cancel_unbonding_delegation | creation_height | {unbondingCreationHeight} | +| message | module | staking | +| message | action | cancel_unbond | +| message | sender | {senderAddress} | + ### MsgBeginRedelegate | Type | Attribute Key | Attribute Value | diff --git a/x/staking/spec/09_client.md b/x/staking/spec/09_client.md index 608705352cfc..0c3383d01446 100644 --- a/x/staking/spec/09_client.md +++ b/x/staking/spec/09_client.md @@ -712,6 +712,19 @@ Example: ```bash simd tx staking unbond cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from mykey ``` +#### cancel unbond +The command `cancel-unbond` allow users to cancel the unbonding delegation entry and delegate back to the original validator. + +Usage: +```bash +simd tx staking cancel-unbond [validator-addr] [amount] [creation-height] +``` + +Example: +```bash +simd tx staking cancel-unbond cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake 123123 --from mykey +``` + ## gRPC diff --git a/x/staking/spec/README.md b/x/staking/spec/README.md index 688fd810afbb..08c21234e427 100644 --- a/x/staking/spec/README.md +++ b/x/staking/spec/README.md @@ -42,6 +42,7 @@ network. * [MsgEditValidator](03_messages.md#msgeditvalidator) * [MsgDelegate](03_messages.md#msgdelegate) * [MsgUndelegate](03_messages.md#msgundelegate) + * [MsgCancelUnbondingDelegation](03_messages.md#msgcancelunbondingdelegation) * [MsgBeginRedelegate](03_messages.md#msgbeginredelegate) 4. **[Begin-Block](04_begin_block.md)** * [Historical Info Tracking](04_begin_block.md#historical-info-tracking) diff --git a/x/staking/types/authz.go b/x/staking/types/authz.go index e26712ade2e4..1f9016cdbb6e 100644 --- a/x/staking/types/authz.go +++ b/x/staking/types/authz.go @@ -10,14 +10,11 @@ import ( // Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054, https://github.com/cosmos/cosmos-sdk/discussions/9072 const gasCostPerIteration = uint64(10) -// Normalized Msg type URLs -var ( - _ authz.Authorization = &StakeAuthorization{} -) +var _ authz.Authorization = &StakeAuthorization{} // NewStakeAuthorization creates a new StakeAuthorization object. func NewStakeAuthorization(allowed []sdk.ValAddress, denied []sdk.ValAddress, authzType AuthorizationType, amount *sdk.Coin) (*StakeAuthorization, error) { - allowedValidators, deniedValidators, err := validateAndBech32fy(allowed, denied) + allowedValidators, deniedValidators, err := validateAllowAndDenyValidators(allowed, denied) if err != nil { return nil, err } @@ -48,10 +45,10 @@ func (a StakeAuthorization) MsgTypeURL() string { func (a StakeAuthorization) ValidateBasic() error { if a.MaxTokens != nil && a.MaxTokens.IsNegative() { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "negative coin amount: %v", a.MaxTokens) + return sdkerrors.Wrapf(authz.ErrNegativeMaxTokens, "negative coin amount: %v", a.MaxTokens) } if a.AuthorizationType == AuthorizationType_AUTHORIZATION_TYPE_UNSPECIFIED { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "unknown authorization type") + return authz.ErrUnknownAuthorizationType } return nil @@ -90,7 +87,7 @@ func (a StakeAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.AcceptRe for _, validator := range denyList { ctx.GasMeter().ConsumeGas(gasCostPerIteration, "stake authorization") if validator == validatorAddress { - return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf(" cannot delegate/undelegate to %s validator", validator) + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("cannot delegate/undelegate to %s validator", validator) } } @@ -99,24 +96,26 @@ func (a StakeAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.AcceptRe } if a.MaxTokens == nil { - return authz.AcceptResponse{Accept: true, Delete: false, - Updated: &StakeAuthorization{Validators: a.GetValidators(), AuthorizationType: a.GetAuthorizationType()}}, nil + return authz.AcceptResponse{ + Accept: true, Delete: false, + Updated: &StakeAuthorization{Validators: a.GetValidators(), AuthorizationType: a.GetAuthorizationType()}, + }, nil } - // check sufficient balance exists. - if _, isNegative := sdk.NewCoins(*a.MaxTokens).SafeSub(sdk.NewCoins(amount)); isNegative { - return authz.AcceptResponse{}, sdkerrors.ErrInsufficientFunds.Wrapf("amount is more than max tokens") + limitLeft, err := a.MaxTokens.SafeSub(amount) + if err != nil { + return authz.AcceptResponse{}, err } - - limitLeft := a.MaxTokens.Sub(amount) if limitLeft.IsZero() { return authz.AcceptResponse{Accept: true, Delete: true}, nil } - return authz.AcceptResponse{Accept: true, Delete: false, - Updated: &StakeAuthorization{Validators: a.GetValidators(), AuthorizationType: a.GetAuthorizationType(), MaxTokens: &limitLeft}}, nil + return authz.AcceptResponse{ + Accept: true, Delete: false, + Updated: &StakeAuthorization{Validators: a.GetValidators(), AuthorizationType: a.GetAuthorizationType(), MaxTokens: &limitLeft}, + }, nil } -func validateAndBech32fy(allowed []sdk.ValAddress, denied []sdk.ValAddress) ([]string, []string, error) { +func validateAllowAndDenyValidators(allowed []sdk.ValAddress, denied []sdk.ValAddress) ([]string, []string, error) { if len(allowed) == 0 && len(denied) == 0 { return nil, nil, sdkerrors.ErrInvalidRequest.Wrap("both allowed & deny list cannot be empty") } @@ -141,6 +140,7 @@ func validateAndBech32fy(allowed []sdk.ValAddress, denied []sdk.ValAddress) ([]s return nil, deniedValidators, nil } +// Normalized Msg type URLs func normalizeAuthzType(authzType AuthorizationType) (string, error) { switch authzType { case AuthorizationType_AUTHORIZATION_TYPE_DELEGATE: @@ -150,6 +150,6 @@ func normalizeAuthzType(authzType AuthorizationType) (string, error) { case AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE: return sdk.MsgTypeURL(&MsgBeginRedelegate{}), nil default: - return "", sdkerrors.ErrInvalidType.Wrapf("unknown authorization type %T", authzType) + return "", sdkerrors.Wrapf(authz.ErrUnknownAuthorizationType, "cannot normalize authz type with %T", authzType) } } diff --git a/x/staking/types/authz_test.go b/x/staking/types/authz_test.go index 1f649f0a28a4..b794618b744b 100644 --- a/x/staking/types/authz_test.go +++ b/x/staking/types/authz_test.go @@ -94,7 +94,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_AllowList{ AllowList: &stakingtypes.StakeAuthorization_Validators{Address: validators1_2}, - }, MaxTokens: &coin50, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE}, + }, MaxTokens: &coin50, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, + }, }, { "delegate: testing with invalid validator", @@ -119,7 +120,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_AllowList{ AllowList: &stakingtypes.StakeAuthorization_Validators{Address: validators1_2}, - }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE}, + }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, + }, }, { "delegate: fail validator denied", @@ -144,7 +146,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_DenyList{ DenyList: &stakingtypes.StakeAuthorization_Validators{Address: []string{val1.String()}}, - }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE}, + }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_DELEGATE, + }, }, { "undelegate: expect 0 remaining coins", @@ -169,7 +172,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_AllowList{ AllowList: &stakingtypes.StakeAuthorization_Validators{Address: validators1_2}, - }, MaxTokens: &coin50, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE}, + }, MaxTokens: &coin50, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, + }, }, { "undelegate: testing with invalid validator", @@ -194,7 +198,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_AllowList{ AllowList: &stakingtypes.StakeAuthorization_Validators{Address: validators1_2}, - }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE}, + }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_UNDELEGATE, + }, }, { "undelegate: fail cannot undelegate, permission denied", @@ -231,7 +236,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_AllowList{ AllowList: &stakingtypes.StakeAuthorization_Validators{Address: validators1_2}, - }, MaxTokens: &coin50, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE}, + }, MaxTokens: &coin50, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, + }, }, { "redelegate: testing with invalid validator", @@ -256,7 +262,8 @@ func TestAuthzAuthorizations(t *testing.T) { &stakingtypes.StakeAuthorization{ Validators: &stakingtypes.StakeAuthorization_AllowList{ AllowList: &stakingtypes.StakeAuthorization_Validators{Address: validators1_2}, - }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE}, + }, MaxTokens: nil, AuthorizationType: stakingtypes.AuthorizationType_AUTHORIZATION_TYPE_REDELEGATE, + }, }, { "redelegate: fail cannot undelegate, permission denied", diff --git a/x/staking/types/delegation.go b/x/staking/types/delegation.go index f3412b5f8344..39a45d41d67f 100644 --- a/x/staking/types/delegation.go +++ b/x/staking/types/delegation.go @@ -60,12 +60,11 @@ func UnmarshalDelegation(cdc codec.BinaryCodec, value []byte) (delegation Delega } func (d Delegation) GetDelegatorAddr() sdk.AccAddress { - delAddr, err := sdk.AccAddressFromBech32(d.DelegatorAddress) - if err != nil { - panic(err) - } + delAddr := sdk.MustAccAddressFromBech32(d.DelegatorAddress) + return delAddr } + func (d Delegation) GetValidatorAddr() sdk.ValAddress { addr, err := sdk.ValAddressFromBech32(d.ValidatorAddress) if err != nil { @@ -350,7 +349,8 @@ func NewRedelegationResponse( // NewRedelegationEntryResponse creates a new RedelegationEntryResponse instance. func NewRedelegationEntryResponse( - creationHeight int64, completionTime time.Time, sharesDst sdk.Dec, initialBalance, balance sdk.Int) RedelegationEntryResponse { + creationHeight int64, completionTime time.Time, sharesDst sdk.Dec, initialBalance, balance sdk.Int, +) RedelegationEntryResponse { return RedelegationEntryResponse{ RedelegationEntry: NewRedelegationEntry(creationHeight, completionTime, initialBalance, sharesDst), Balance: balance, diff --git a/x/staking/types/historical_info_test.go b/x/staking/types/historical_info_test.go index 66d3105897e1..da47623ac0c2 100644 --- a/x/staking/types/historical_info_test.go +++ b/x/staking/types/historical_info_test.go @@ -1,12 +1,13 @@ package types_test import ( - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" "math/rand" "sort" "testing" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/x/staking/types/hooks.go b/x/staking/types/hooks.go index 33838bcaa030..93e0d21cc085 100644 --- a/x/staking/types/hooks.go +++ b/x/staking/types/hooks.go @@ -22,6 +22,7 @@ func (h MultiStakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.Va return nil } + func (h MultiStakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeValidatorModified(ctx, valAddr); err != nil { @@ -30,6 +31,7 @@ func (h MultiStakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk. } return nil } + func (h MultiStakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorRemoved(ctx, consAddr, valAddr); err != nil { @@ -38,6 +40,7 @@ func (h MultiStakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.C } return nil } + func (h MultiStakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorBonded(ctx, consAddr, valAddr); err != nil { @@ -46,6 +49,7 @@ func (h MultiStakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.Co } return nil } + func (h MultiStakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterValidatorBeginUnbonding(ctx, consAddr, valAddr); err != nil { @@ -54,6 +58,7 @@ func (h MultiStakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAdd } return nil } + func (h MultiStakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { @@ -62,6 +67,7 @@ func (h MultiStakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk. } return nil } + func (h MultiStakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeDelegationSharesModified(ctx, delAddr, valAddr); err != nil { @@ -70,6 +76,7 @@ func (h MultiStakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAd } return nil } + func (h MultiStakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].BeforeDelegationRemoved(ctx, delAddr, valAddr); err != nil { @@ -78,6 +85,7 @@ func (h MultiStakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk. } return nil } + func (h MultiStakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { for i := range h { if err := h[i].AfterDelegationModified(ctx, delAddr, valAddr); err != nil { @@ -86,6 +94,7 @@ func (h MultiStakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk. } return nil } + func (h MultiStakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error { for i := range h { if err := h[i].BeforeValidatorSlashed(ctx, valAddr, fraction); err != nil { diff --git a/x/staking/types/keys_test.go b/x/staking/types/keys_test.go index 35667f949da5..20269e671baf 100644 --- a/x/staking/types/keys_test.go +++ b/x/staking/types/keys_test.go @@ -56,12 +56,18 @@ func TestGetREDByValDstIndexKey(t *testing.T) { valDstAddr sdk.ValAddress wantHex string }{ - {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr1), - "361463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f08609"}, - {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr2), sdk.ValAddress(keysAddr3), - "36143ab62f0d93849be495e21e3e9013a517038f45bd1463d771218209d8bd03c482f69dfba57310f08609145ef3b5f25c54946d4a89fc0d09d2f126614540f2"}, - {sdk.AccAddress(keysAddr2), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr3), - "36143ab62f0d93849be495e21e3e9013a517038f45bd145ef3b5f25c54946d4a89fc0d09d2f126614540f21463d771218209d8bd03c482f69dfba57310f08609"}, + { + sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr1), + "361463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f08609", + }, + { + sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr2), sdk.ValAddress(keysAddr3), + "36143ab62f0d93849be495e21e3e9013a517038f45bd1463d771218209d8bd03c482f69dfba57310f08609145ef3b5f25c54946d4a89fc0d09d2f126614540f2", + }, + { + sdk.AccAddress(keysAddr2), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr3), + "36143ab62f0d93849be495e21e3e9013a517038f45bd145ef3b5f25c54946d4a89fc0d09d2f126614540f21463d771218209d8bd03c482f69dfba57310f08609", + }, } for i, tt := range tests { got := hex.EncodeToString(types.GetREDByValDstIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) @@ -77,12 +83,18 @@ func TestGetREDByValSrcIndexKey(t *testing.T) { valDstAddr sdk.ValAddress wantHex string }{ - {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr1), - "351463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f08609"}, - {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr2), sdk.ValAddress(keysAddr3), - "35145ef3b5f25c54946d4a89fc0d09d2f126614540f21463d771218209d8bd03c482f69dfba57310f08609143ab62f0d93849be495e21e3e9013a517038f45bd"}, - {sdk.AccAddress(keysAddr2), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr3), - "351463d771218209d8bd03c482f69dfba57310f08609145ef3b5f25c54946d4a89fc0d09d2f126614540f2143ab62f0d93849be495e21e3e9013a517038f45bd"}, + { + sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr1), + "351463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f08609", + }, + { + sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr2), sdk.ValAddress(keysAddr3), + "35145ef3b5f25c54946d4a89fc0d09d2f126614540f21463d771218209d8bd03c482f69dfba57310f08609143ab62f0d93849be495e21e3e9013a517038f45bd", + }, + { + sdk.AccAddress(keysAddr2), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr3), + "351463d771218209d8bd03c482f69dfba57310f08609145ef3b5f25c54946d4a89fc0d09d2f126614540f2143ab62f0d93849be495e21e3e9013a517038f45bd", + }, } for i, tt := range tests { got := hex.EncodeToString(types.GetREDByValSrcIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) diff --git a/x/staking/types/params.go b/x/staking/types/params.go index cb9def63e00e..191b66e4c809 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -32,10 +32,8 @@ const ( DefaultHistoricalEntries uint32 = 10000 ) -var ( - // DefaultMinCommissionRate is set to 0% - DefaultMinCommissionRate = sdk.ZeroDec() -) +// DefaultMinCommissionRate is set to 0% +var DefaultMinCommissionRate = sdk.ZeroDec() var ( KeyUnbondingTime = []byte("UnbondingTime") diff --git a/x/staking/types/query.pb.go b/x/staking/types/query.pb.go index e1c04fd8666f..2e40de8c6f20 100644 --- a/x/staking/types/query.pb.go +++ b/x/staking/types/query.pb.go @@ -189,7 +189,7 @@ func (m *QueryValidatorRequest) GetValidatorAddr() string { // QueryValidatorResponse is response type for the Query/Validator RPC method type QueryValidatorResponse struct { - // validator defines the the validator info. + // validator defines the validator info. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` } @@ -988,7 +988,7 @@ var xxx_messageInfo_QueryDelegatorValidatorsRequest proto.InternalMessageInfo // QueryDelegatorValidatorsResponse is response type for the // Query/DelegatorValidators RPC method. type QueryDelegatorValidatorsResponse struct { - // validators defines the the validators' info of a delegator. + // validators defines the validators' info of a delegator. Validators []Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` // pagination defines the pagination in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -1086,7 +1086,7 @@ var xxx_messageInfo_QueryDelegatorValidatorRequest proto.InternalMessageInfo // QueryDelegatorValidatorResponse response type for the // Query/DelegatorValidator RPC method. type QueryDelegatorValidatorResponse struct { - // validator defines the the validator info. + // validator defines the validator info. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` } diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index dff78e00659d..1e9fcfca7d2f 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -333,6 +333,8 @@ type Validator struct { // commission defines the commission parameters. Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` // min_self_delegation is the validator's self declared minimum self delegation. + // + // Since: cosmos-sdk 0.46 MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation"` } @@ -1254,476 +1256,505 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 7499 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0xbc, 0x6b, 0x70, 0x24, 0xd7, - 0x75, 0x1f, 0x8e, 0x79, 0x60, 0x30, 0x73, 0x66, 0x30, 0x68, 0x5c, 0x60, 0x77, 0x67, 0x41, 0x12, - 0x00, 0x87, 0x8f, 0x5d, 0xbe, 0xb0, 0xe4, 0x92, 0xbb, 0xcb, 0x9d, 0xb5, 0xc4, 0xff, 0xbc, 0x16, - 0xc4, 0x2e, 0x1e, 0xc3, 0x1e, 0x60, 0xf9, 0xf0, 0xdf, 0xe9, 0x6a, 0xf4, 0x5c, 0x0c, 0x9a, 0xe8, - 0xe9, 0x6e, 0x77, 0xf7, 0xec, 0x2e, 0x58, 0x4e, 0x8a, 0x2e, 0xe5, 0x21, 0x6d, 0x2a, 0x8e, 0x1c, - 0xa7, 0x62, 0x59, 0xd6, 0x2a, 0x94, 0xe5, 0x44, 0x8e, 0xa2, 0x3c, 0x6c, 0x29, 0x4a, 0x1c, 0x57, - 0x12, 0x25, 0xa9, 0x24, 0xb2, 0x3e, 0xa4, 0x64, 0x7f, 0x88, 0xed, 0x3c, 0x18, 0x87, 0x52, 0x25, - 0x8c, 0xa2, 0xc4, 0x8e, 0xc2, 0x54, 0x25, 0xa5, 0x52, 0x2a, 0x75, 0x5f, 0xfd, 0x98, 0x07, 0x66, - 0xb0, 0x59, 0xca, 0xae, 0xf2, 0x27, 0x4c, 0x9f, 0x7b, 0x7e, 0xbf, 0x3e, 0xf7, 0xdc, 0x73, 0xcf, - 0x3d, 0xf7, 0x76, 0x37, 0xe0, 0x9f, 0x5e, 0x81, 0xe5, 0xb6, 0x65, 0xb5, 0x0d, 0x7c, 0xce, 0x76, - 0x2c, 0xcf, 0xda, 0xed, 0xee, 0x9d, 0x6b, 0x61, 0x57, 0x73, 0x74, 0xdb, 0xb3, 0x9c, 0x15, 0x2a, - 0x43, 0x33, 0x4c, 0x63, 0x45, 0x68, 0x14, 0x37, 0x60, 0xf6, 0xaa, 0x6e, 0xe0, 0x9a, 0xaf, 0xd8, - 0xc4, 0x1e, 0x7a, 0x11, 0x92, 0x7b, 0xba, 0x81, 0x0b, 0xb1, 0xe5, 0xc4, 0xd9, 0xec, 0xf9, 0x47, - 0x57, 0x7a, 0x40, 0x2b, 0x51, 0x44, 0x83, 0x88, 0x65, 0x8a, 0x28, 0x7e, 0x3b, 0x09, 0x73, 0x03, - 0x5a, 0x11, 0x82, 0xa4, 0xa9, 0x76, 0x08, 0x63, 0xec, 0x6c, 0x46, 0xa6, 0xbf, 0x51, 0x01, 0xa6, - 0x6c, 0x55, 0x3b, 0x50, 0xdb, 0xb8, 0x10, 0xa7, 0x62, 0x71, 0x89, 0x16, 0x01, 0x5a, 0xd8, 0xc6, - 0x66, 0x0b, 0x9b, 0xda, 0x61, 0x21, 0xb1, 0x9c, 0x38, 0x9b, 0x91, 0x43, 0x12, 0xf4, 0x14, 0xcc, - 0xda, 0xdd, 0x5d, 0x43, 0xd7, 0x94, 0x90, 0x1a, 0x2c, 0x27, 0xce, 0x4e, 0xca, 0x12, 0x6b, 0xa8, - 0x05, 0xca, 0x67, 0x60, 0xe6, 0x16, 0x56, 0x0f, 0xc2, 0xaa, 0x59, 0xaa, 0x9a, 0x27, 0xe2, 0x90, - 0x62, 0x15, 0x72, 0x1d, 0xec, 0xba, 0x6a, 0x1b, 0x2b, 0xde, 0xa1, 0x8d, 0x0b, 0x49, 0xda, 0xfb, - 0xe5, 0xbe, 0xde, 0xf7, 0xf6, 0x3c, 0xcb, 0x51, 0xdb, 0x87, 0x36, 0x46, 0x65, 0xc8, 0x60, 0xb3, - 0xdb, 0x61, 0x0c, 0x93, 0x43, 0xfc, 0x57, 0x37, 0xbb, 0x9d, 0x5e, 0x96, 0x34, 0x81, 0x71, 0x8a, - 0x29, 0x17, 0x3b, 0x37, 0x75, 0x0d, 0x17, 0x52, 0x94, 0xe0, 0x4c, 0x1f, 0x41, 0x93, 0xb5, 0xf7, - 0x72, 0x08, 0x1c, 0xaa, 0x42, 0x06, 0xdf, 0xf6, 0xb0, 0xe9, 0xea, 0x96, 0x59, 0x98, 0xa2, 0x24, - 0x8f, 0x0d, 0x18, 0x45, 0x6c, 0xb4, 0x7a, 0x29, 0x02, 0x1c, 0xba, 0x08, 0x53, 0x96, 0xed, 0xe9, - 0x96, 0xe9, 0x16, 0xd2, 0xcb, 0xb1, 0xb3, 0xd9, 0xf3, 0x0f, 0x0e, 0x0c, 0x84, 0x2d, 0xa6, 0x23, - 0x0b, 0x65, 0xb4, 0x06, 0x92, 0x6b, 0x75, 0x1d, 0x0d, 0x2b, 0x9a, 0xd5, 0xc2, 0x8a, 0x6e, 0xee, - 0x59, 0x85, 0x0c, 0x25, 0x58, 0xea, 0xef, 0x08, 0x55, 0xac, 0x5a, 0x2d, 0xbc, 0x66, 0xee, 0x59, - 0x72, 0xde, 0x8d, 0x5c, 0xa3, 0x93, 0x90, 0x72, 0x0f, 0x4d, 0x4f, 0xbd, 0x5d, 0xc8, 0xd1, 0x08, - 0xe1, 0x57, 0xc5, 0x5f, 0x4d, 0xc1, 0xcc, 0x38, 0x21, 0x76, 0x05, 0x26, 0xf7, 0x48, 0x2f, 0x0b, - 0xf1, 0xe3, 0xf8, 0x80, 0x61, 0xa2, 0x4e, 0x4c, 0xdd, 0xa3, 0x13, 0xcb, 0x90, 0x35, 0xb1, 0xeb, - 0xe1, 0x16, 0x8b, 0x88, 0xc4, 0x98, 0x31, 0x05, 0x0c, 0xd4, 0x1f, 0x52, 0xc9, 0x7b, 0x0a, 0xa9, - 0xd7, 0x60, 0xc6, 0x37, 0x49, 0x71, 0x54, 0xb3, 0x2d, 0x62, 0xf3, 0xdc, 0x28, 0x4b, 0x56, 0xea, - 0x02, 0x27, 0x13, 0x98, 0x9c, 0xc7, 0x91, 0x6b, 0x54, 0x03, 0xb0, 0x4c, 0x6c, 0xed, 0x29, 0x2d, - 0xac, 0x19, 0x85, 0xf4, 0x10, 0x2f, 0x6d, 0x11, 0x95, 0x3e, 0x2f, 0x59, 0x4c, 0xaa, 0x19, 0xe8, - 0x72, 0x10, 0x6a, 0x53, 0x43, 0x22, 0x65, 0x83, 0x4d, 0xb2, 0xbe, 0x68, 0xdb, 0x81, 0xbc, 0x83, - 0x49, 0xdc, 0xe3, 0x16, 0xef, 0x59, 0x86, 0x1a, 0xb1, 0x32, 0xb2, 0x67, 0x32, 0x87, 0xb1, 0x8e, - 0x4d, 0x3b, 0xe1, 0x4b, 0xf4, 0x08, 0xf8, 0x02, 0x85, 0x86, 0x15, 0xd0, 0x2c, 0x94, 0x13, 0xc2, - 0x4d, 0xb5, 0x83, 0x17, 0xde, 0x82, 0x7c, 0xd4, 0x3d, 0x68, 0x1e, 0x26, 0x5d, 0x4f, 0x75, 0x3c, - 0x1a, 0x85, 0x93, 0x32, 0xbb, 0x40, 0x12, 0x24, 0xb0, 0xd9, 0xa2, 0x59, 0x6e, 0x52, 0x26, 0x3f, - 0xd1, 0xff, 0x17, 0x74, 0x38, 0x41, 0x3b, 0xfc, 0x78, 0xff, 0x88, 0x46, 0x98, 0x7b, 0xfb, 0xbd, - 0x70, 0x09, 0xa6, 0x23, 0x1d, 0x18, 0xf7, 0xd6, 0xc5, 0x9f, 0x80, 0x13, 0x03, 0xa9, 0xd1, 0x6b, - 0x30, 0xdf, 0x35, 0x75, 0xd3, 0xc3, 0x8e, 0xed, 0x60, 0x12, 0xb1, 0xec, 0x56, 0x85, 0xff, 0x34, - 0x35, 0x24, 0xe6, 0x76, 0xc2, 0xda, 0x8c, 0x45, 0x9e, 0xeb, 0xf6, 0x0b, 0x9f, 0xcc, 0xa4, 0xdf, - 0x9f, 0x92, 0xde, 0x7e, 0xfb, 0xed, 0xb7, 0xe3, 0xc5, 0x7f, 0x9c, 0x82, 0xf9, 0x41, 0x73, 0x66, - 0xe0, 0xf4, 0x3d, 0x09, 0x29, 0xb3, 0xdb, 0xd9, 0xc5, 0x0e, 0x75, 0xd2, 0xa4, 0xcc, 0xaf, 0x50, - 0x19, 0x26, 0x0d, 0x75, 0x17, 0x1b, 0x85, 0xe4, 0x72, 0xec, 0x6c, 0xfe, 0xfc, 0x53, 0x63, 0xcd, - 0xca, 0x95, 0x75, 0x02, 0x91, 0x19, 0x12, 0x7d, 0x14, 0x92, 0x3c, 0x45, 0x13, 0x86, 0x27, 0xc7, - 0x63, 0x20, 0x73, 0x49, 0xa6, 0x38, 0xf4, 0x00, 0x64, 0xc8, 0x5f, 0x16, 0x1b, 0x29, 0x6a, 0x73, - 0x9a, 0x08, 0x48, 0x5c, 0xa0, 0x05, 0x48, 0xd3, 0x69, 0xd2, 0xc2, 0x62, 0x69, 0xf3, 0xaf, 0x49, - 0x60, 0xb5, 0xf0, 0x9e, 0xda, 0x35, 0x3c, 0xe5, 0xa6, 0x6a, 0x74, 0x31, 0x0d, 0xf8, 0x8c, 0x9c, - 0xe3, 0xc2, 0x1b, 0x44, 0x86, 0x96, 0x20, 0xcb, 0x66, 0x95, 0x6e, 0xb6, 0xf0, 0x6d, 0x9a, 0x3d, - 0x27, 0x65, 0x36, 0xd1, 0xd6, 0x88, 0x84, 0xdc, 0xfe, 0x4d, 0xd7, 0x32, 0x45, 0x68, 0xd2, 0x5b, - 0x10, 0x01, 0xbd, 0xfd, 0xa5, 0xde, 0xc4, 0xfd, 0xd0, 0xe0, 0xee, 0xf5, 0xcd, 0xa5, 0x33, 0x30, - 0x43, 0x35, 0x9e, 0xe7, 0x43, 0xaf, 0x1a, 0x85, 0xd9, 0xe5, 0xd8, 0xd9, 0xb4, 0x9c, 0x67, 0xe2, - 0x2d, 0x2e, 0x2d, 0x7e, 0x35, 0x0e, 0x49, 0x9a, 0x58, 0x66, 0x20, 0xbb, 0xfd, 0x7a, 0xa3, 0xae, - 0xd4, 0xb6, 0x76, 0x2a, 0xeb, 0x75, 0x29, 0x86, 0xf2, 0x00, 0x54, 0x70, 0x75, 0x7d, 0xab, 0xbc, - 0x2d, 0xc5, 0xfd, 0xeb, 0xb5, 0xcd, 0xed, 0x8b, 0x2f, 0x48, 0x09, 0x1f, 0xb0, 0xc3, 0x04, 0xc9, - 0xb0, 0xc2, 0xf3, 0xe7, 0xa5, 0x49, 0x24, 0x41, 0x8e, 0x11, 0xac, 0xbd, 0x56, 0xaf, 0x5d, 0x7c, - 0x41, 0x4a, 0x45, 0x25, 0xcf, 0x9f, 0x97, 0xa6, 0xd0, 0x34, 0x64, 0xa8, 0xa4, 0xb2, 0xb5, 0xb5, - 0x2e, 0xa5, 0x7d, 0xce, 0xe6, 0xb6, 0xbc, 0xb6, 0xb9, 0x2a, 0x65, 0x7c, 0xce, 0x55, 0x79, 0x6b, - 0xa7, 0x21, 0x81, 0xcf, 0xb0, 0x51, 0x6f, 0x36, 0xcb, 0xab, 0x75, 0x29, 0xeb, 0x6b, 0x54, 0x5e, - 0xdf, 0xae, 0x37, 0xa5, 0x5c, 0xc4, 0xac, 0xe7, 0xcf, 0x4b, 0xd3, 0xfe, 0x2d, 0xea, 0x9b, 0x3b, - 0x1b, 0x52, 0x1e, 0xcd, 0xc2, 0x34, 0xbb, 0x85, 0x30, 0x62, 0xa6, 0x47, 0x74, 0xf1, 0x05, 0x49, - 0x0a, 0x0c, 0x61, 0x2c, 0xb3, 0x11, 0xc1, 0xc5, 0x17, 0x24, 0x54, 0xac, 0xc2, 0x24, 0x0d, 0x43, - 0x84, 0x20, 0xbf, 0x5e, 0xae, 0xd4, 0xd7, 0x95, 0xad, 0xc6, 0xf6, 0xda, 0xd6, 0x66, 0x79, 0x5d, - 0x8a, 0x05, 0x32, 0xb9, 0xfe, 0xca, 0xce, 0x9a, 0x5c, 0xaf, 0x49, 0xf1, 0xb0, 0xac, 0x51, 0x2f, - 0x6f, 0xd7, 0x6b, 0x52, 0xa2, 0xa8, 0xc1, 0xfc, 0xa0, 0x84, 0x3a, 0x70, 0x0a, 0x85, 0x62, 0x21, - 0x3e, 0x24, 0x16, 0x28, 0x57, 0x6f, 0x2c, 0x14, 0xbf, 0x15, 0x87, 0xb9, 0x01, 0x8b, 0xca, 0xc0, - 0x9b, 0xbc, 0x04, 0x93, 0x2c, 0x96, 0xd9, 0x32, 0xfb, 0xc4, 0xc0, 0xd5, 0x89, 0x46, 0x76, 0xdf, - 0x52, 0x4b, 0x71, 0xe1, 0x52, 0x23, 0x31, 0xa4, 0xd4, 0x20, 0x14, 0x7d, 0x01, 0xfb, 0x63, 0x7d, - 0xc9, 0x9f, 0xad, 0x8f, 0x17, 0xc7, 0x59, 0x1f, 0xa9, 0xec, 0x78, 0x8b, 0xc0, 0xe4, 0x80, 0x45, - 0xe0, 0x0a, 0xcc, 0xf6, 0x11, 0x8d, 0x9d, 0x8c, 0x3f, 0x16, 0x83, 0xc2, 0x30, 0xe7, 0x8c, 0x48, - 0x89, 0xf1, 0x48, 0x4a, 0xbc, 0xd2, 0xeb, 0xc1, 0x87, 0x87, 0x0f, 0x42, 0xdf, 0x58, 0x7f, 0x21, - 0x06, 0x27, 0x07, 0x97, 0x94, 0x03, 0x6d, 0xf8, 0x28, 0xa4, 0x3a, 0xd8, 0xdb, 0xb7, 0x44, 0x59, - 0xf5, 0xf8, 0x80, 0xc5, 0x9a, 0x34, 0xf7, 0x0e, 0x36, 0x47, 0x85, 0x57, 0xfb, 0xc4, 0xb0, 0xba, - 0x90, 0x59, 0xd3, 0x67, 0xe9, 0x27, 0xe2, 0x70, 0x62, 0x20, 0xf9, 0x40, 0x43, 0x1f, 0x02, 0xd0, - 0x4d, 0xbb, 0xeb, 0xb1, 0xd2, 0x89, 0x65, 0xe2, 0x0c, 0x95, 0xd0, 0xe4, 0x45, 0xb2, 0x6c, 0xd7, - 0xf3, 0xdb, 0x13, 0xb4, 0x1d, 0x98, 0x88, 0x2a, 0xbc, 0x18, 0x18, 0x9a, 0xa4, 0x86, 0x2e, 0x0e, - 0xe9, 0x69, 0x5f, 0x60, 0x3e, 0x0b, 0x92, 0x66, 0xe8, 0xd8, 0xf4, 0x14, 0xd7, 0x73, 0xb0, 0xda, - 0xd1, 0xcd, 0x36, 0x5d, 0x6a, 0xd2, 0xa5, 0xc9, 0x3d, 0xd5, 0x70, 0xb1, 0x3c, 0xc3, 0x9a, 0x9b, - 0xa2, 0x95, 0x20, 0x68, 0x00, 0x39, 0x21, 0x44, 0x2a, 0x82, 0x60, 0xcd, 0x3e, 0xa2, 0xf8, 0xd3, - 0x19, 0xc8, 0x86, 0x0a, 0x70, 0xf4, 0x30, 0xe4, 0xde, 0x54, 0x6f, 0xaa, 0x8a, 0xd8, 0x54, 0x31, - 0x4f, 0x64, 0x89, 0xac, 0xc1, 0x37, 0x56, 0xcf, 0xc2, 0x3c, 0x55, 0xb1, 0xba, 0x1e, 0x76, 0x14, - 0xcd, 0x50, 0x5d, 0x97, 0x3a, 0x2d, 0x4d, 0x55, 0x11, 0x69, 0xdb, 0x22, 0x4d, 0x55, 0xd1, 0x82, - 0x2e, 0xc0, 0x1c, 0x45, 0x74, 0xba, 0x86, 0xa7, 0xdb, 0x06, 0x56, 0xc8, 0x36, 0xcf, 0xa5, 0x4b, - 0x8e, 0x6f, 0xd9, 0x2c, 0xd1, 0xd8, 0xe0, 0x0a, 0xc4, 0x22, 0x17, 0xd5, 0xe0, 0x21, 0x0a, 0x6b, - 0x63, 0x13, 0x3b, 0xaa, 0x87, 0x15, 0xfc, 0xe3, 0x5d, 0xd5, 0x70, 0x15, 0xd5, 0x6c, 0x29, 0xfb, - 0xaa, 0xbb, 0x5f, 0x98, 0x27, 0x04, 0x95, 0x78, 0x21, 0x26, 0x9f, 0x26, 0x8a, 0xab, 0x5c, 0xaf, - 0x4e, 0xd5, 0xca, 0x66, 0xeb, 0x65, 0xd5, 0xdd, 0x47, 0x25, 0x38, 0x49, 0x59, 0x5c, 0xcf, 0xd1, - 0xcd, 0xb6, 0xa2, 0xed, 0x63, 0xed, 0x40, 0xe9, 0x7a, 0x7b, 0x2f, 0x16, 0x1e, 0x08, 0xdf, 0x9f, - 0x5a, 0xd8, 0xa4, 0x3a, 0x55, 0xa2, 0xb2, 0xe3, 0xed, 0xbd, 0x88, 0x9a, 0x90, 0x23, 0x83, 0xd1, - 0xd1, 0xdf, 0xc2, 0xca, 0x9e, 0xe5, 0xd0, 0x35, 0x34, 0x3f, 0x20, 0x35, 0x85, 0x3c, 0xb8, 0xb2, - 0xc5, 0x01, 0x1b, 0x56, 0x0b, 0x97, 0x26, 0x9b, 0x8d, 0x7a, 0xbd, 0x26, 0x67, 0x05, 0xcb, 0x55, - 0xcb, 0x21, 0x01, 0xd5, 0xb6, 0x7c, 0x07, 0x67, 0x59, 0x40, 0xb5, 0x2d, 0xe1, 0xde, 0x0b, 0x30, - 0xa7, 0x69, 0xac, 0xcf, 0xba, 0xa6, 0xf0, 0xcd, 0x98, 0x5b, 0x90, 0x22, 0xce, 0xd2, 0xb4, 0x55, - 0xa6, 0xc0, 0x63, 0xdc, 0x45, 0x97, 0xe1, 0x44, 0xe0, 0xac, 0x30, 0x70, 0xb6, 0xaf, 0x97, 0xbd, - 0xd0, 0x0b, 0x30, 0x67, 0x1f, 0xf6, 0x03, 0x51, 0xe4, 0x8e, 0xf6, 0x61, 0x2f, 0xec, 0x12, 0xcc, - 0xdb, 0xfb, 0x76, 0x3f, 0xee, 0xc9, 0x30, 0x0e, 0xd9, 0xfb, 0x76, 0x2f, 0xf0, 0x31, 0xba, 0x33, - 0x77, 0xb0, 0xa6, 0x7a, 0xb8, 0x55, 0x38, 0x15, 0x56, 0x0f, 0x35, 0xa0, 0x15, 0x90, 0x34, 0x4d, - 0xc1, 0xa6, 0xba, 0x6b, 0x60, 0x45, 0x75, 0xb0, 0xa9, 0xba, 0x85, 0x25, 0xaa, 0x9c, 0xf4, 0x9c, - 0x2e, 0x96, 0xf3, 0x9a, 0x56, 0xa7, 0x8d, 0x65, 0xda, 0x86, 0x9e, 0x84, 0x59, 0x6b, 0xf7, 0x4d, - 0x8d, 0x45, 0xa4, 0x62, 0x3b, 0x78, 0x4f, 0xbf, 0x5d, 0x78, 0x94, 0xba, 0x77, 0x86, 0x34, 0xd0, - 0x78, 0x6c, 0x50, 0x31, 0x7a, 0x02, 0x24, 0xcd, 0xdd, 0x57, 0x1d, 0x9b, 0xa6, 0x64, 0xd7, 0x56, - 0x35, 0x5c, 0x78, 0x8c, 0xa9, 0x32, 0xf9, 0xa6, 0x10, 0x93, 0x19, 0xe1, 0xde, 0xd2, 0xf7, 0x3c, - 0xc1, 0x78, 0x86, 0xcd, 0x08, 0x2a, 0xe3, 0x6c, 0x67, 0x41, 0x22, 0x9e, 0x88, 0xdc, 0xf8, 0x2c, - 0x55, 0xcb, 0xdb, 0xfb, 0x76, 0xf8, 0xbe, 0x8f, 0xc0, 0x34, 0xd1, 0x0c, 0x6e, 0xfa, 0x04, 0x2b, - 0xdc, 0xec, 0xfd, 0xd0, 0x1d, 0x5f, 0x80, 0x93, 0x44, 0xa9, 0x83, 0x3d, 0xb5, 0xa5, 0x7a, 0x6a, - 0x48, 0xfb, 0x69, 0xaa, 0x4d, 0xdc, 0xbe, 0xc1, 0x1b, 0x23, 0x76, 0x3a, 0xdd, 0xdd, 0x43, 0x3f, - 0xb0, 0x9e, 0x61, 0x76, 0x12, 0x99, 0x08, 0xad, 0x0f, 0xad, 0x38, 0x2f, 0x96, 0x20, 0x17, 0x8e, - 0x7b, 0x94, 0x01, 0x16, 0xf9, 0x52, 0x8c, 0x14, 0x41, 0xd5, 0xad, 0x1a, 0x29, 0x5f, 0xde, 0xa8, - 0x4b, 0x71, 0x52, 0x46, 0xad, 0xaf, 0x6d, 0xd7, 0x15, 0x79, 0x67, 0x73, 0x7b, 0x6d, 0xa3, 0x2e, - 0x25, 0x42, 0x85, 0xfd, 0xb5, 0x64, 0xfa, 0x71, 0xe9, 0x0c, 0xa9, 0x1a, 0xf2, 0xd1, 0x9d, 0x1a, - 0xfa, 0x11, 0x38, 0x25, 0x8e, 0x55, 0x5c, 0xec, 0x29, 0xb7, 0x74, 0x87, 0x4e, 0xc8, 0x8e, 0xca, - 0x16, 0x47, 0x3f, 0x7e, 0xe6, 0xb9, 0x56, 0x13, 0x7b, 0xaf, 0xea, 0x0e, 0x99, 0x6e, 0x1d, 0xd5, - 0x43, 0xeb, 0xb0, 0x64, 0x5a, 0x8a, 0xeb, 0xa9, 0x66, 0x4b, 0x75, 0x5a, 0x4a, 0x70, 0xa0, 0xa5, - 0xa8, 0x9a, 0x86, 0x5d, 0xd7, 0x62, 0x0b, 0xa1, 0xcf, 0xf2, 0xa0, 0x69, 0x35, 0xb9, 0x72, 0xb0, - 0x42, 0x94, 0xb9, 0x6a, 0x4f, 0xf8, 0x26, 0x86, 0x85, 0xef, 0x03, 0x90, 0xe9, 0xa8, 0xb6, 0x82, - 0x4d, 0xcf, 0x39, 0xa4, 0xf5, 0x79, 0x5a, 0x4e, 0x77, 0x54, 0xbb, 0x4e, 0xae, 0x7f, 0x28, 0xdb, - 0xa4, 0x6b, 0xc9, 0x74, 0x52, 0x9a, 0xbc, 0x96, 0x4c, 0x4f, 0x4a, 0xa9, 0x6b, 0xc9, 0x74, 0x4a, - 0x9a, 0xba, 0x96, 0x4c, 0xa7, 0xa5, 0xcc, 0xb5, 0x64, 0x3a, 0x23, 0x41, 0xf1, 0xbd, 0x04, 0xe4, - 0xc2, 0x15, 0x3c, 0xd9, 0x10, 0x69, 0x74, 0x0d, 0x8b, 0xd1, 0x2c, 0xf7, 0xc8, 0x91, 0xf5, 0xfe, - 0x4a, 0x95, 0x2c, 0x6e, 0xa5, 0x14, 0x2b, 0x97, 0x65, 0x86, 0x24, 0x85, 0x05, 0x09, 0x3f, 0xcc, - 0xca, 0x93, 0xb4, 0xcc, 0xaf, 0xd0, 0x2a, 0xa4, 0xde, 0x74, 0x29, 0x77, 0x8a, 0x72, 0x3f, 0x7a, - 0x34, 0xf7, 0xb5, 0x26, 0x25, 0xcf, 0x5c, 0x6b, 0x2a, 0x9b, 0x5b, 0xf2, 0x46, 0x79, 0x5d, 0xe6, - 0x70, 0x74, 0x1a, 0x92, 0x86, 0xfa, 0xd6, 0x61, 0x74, 0x19, 0xa4, 0xa2, 0x71, 0x87, 0xe5, 0x34, - 0x24, 0x6f, 0x61, 0xf5, 0x20, 0xba, 0xf8, 0x50, 0xd1, 0x87, 0x38, 0x3d, 0xce, 0xc1, 0x24, 0xf5, - 0x17, 0x02, 0xe0, 0x1e, 0x93, 0x26, 0x50, 0x1a, 0x92, 0xd5, 0x2d, 0x99, 0x4c, 0x11, 0x09, 0x72, - 0x4c, 0xaa, 0x34, 0xd6, 0xea, 0xd5, 0xba, 0x14, 0x2f, 0x5e, 0x80, 0x14, 0x73, 0x02, 0x99, 0x3e, - 0xbe, 0x1b, 0xa4, 0x09, 0x7e, 0xc9, 0x39, 0x62, 0xa2, 0x75, 0x67, 0xa3, 0x52, 0x97, 0xa5, 0x78, - 0xdf, 0xe0, 0x17, 0x5d, 0xc8, 0x85, 0x2b, 0xf3, 0x1f, 0xce, 0xf6, 0xfc, 0x6b, 0x31, 0xc8, 0x86, - 0x2a, 0x6d, 0x52, 0x22, 0xa9, 0x86, 0x61, 0xdd, 0x52, 0x54, 0x43, 0x57, 0x5d, 0x1e, 0x1a, 0x40, - 0x45, 0x65, 0x22, 0x19, 0x77, 0xe8, 0x7e, 0x48, 0x93, 0x66, 0x52, 0x4a, 0x15, 0x3f, 0x1b, 0x03, - 0xa9, 0xb7, 0xd4, 0xed, 0x31, 0x33, 0xf6, 0x07, 0x69, 0x66, 0xf1, 0x33, 0x31, 0xc8, 0x47, 0xeb, - 0xdb, 0x1e, 0xf3, 0x1e, 0xfe, 0x03, 0x35, 0xef, 0x77, 0xe3, 0x30, 0x1d, 0xa9, 0x6a, 0xc7, 0xb5, - 0xee, 0xc7, 0x61, 0x56, 0x6f, 0xe1, 0x8e, 0x6d, 0x79, 0xd8, 0xd4, 0x0e, 0x15, 0x03, 0xdf, 0xc4, - 0x46, 0xa1, 0x48, 0x93, 0xc6, 0xb9, 0xa3, 0xeb, 0xe6, 0x95, 0xb5, 0x00, 0xb7, 0x4e, 0x60, 0xa5, - 0xb9, 0xb5, 0x5a, 0x7d, 0xa3, 0xb1, 0xb5, 0x5d, 0xdf, 0xac, 0xbe, 0xae, 0xec, 0x6c, 0x5e, 0xdf, - 0xdc, 0x7a, 0x75, 0x53, 0x96, 0xf4, 0x1e, 0xb5, 0x0f, 0x71, 0xda, 0x37, 0x40, 0xea, 0x35, 0x0a, - 0x9d, 0x82, 0x41, 0x66, 0x49, 0x13, 0x68, 0x0e, 0x66, 0x36, 0xb7, 0x94, 0xe6, 0x5a, 0xad, 0xae, - 0xd4, 0xaf, 0x5e, 0xad, 0x57, 0xb7, 0x9b, 0xec, 0x24, 0xc4, 0xd7, 0xde, 0x8e, 0x4c, 0xf0, 0xe2, - 0xa7, 0x13, 0x30, 0x37, 0xc0, 0x12, 0x54, 0xe6, 0x7b, 0x18, 0xb6, 0xad, 0x7a, 0x66, 0x1c, 0xeb, - 0x57, 0x48, 0x15, 0xd1, 0x50, 0x1d, 0x8f, 0x6f, 0x79, 0x9e, 0x00, 0xe2, 0x25, 0xd3, 0xd3, 0xf7, - 0x74, 0xec, 0xf0, 0x13, 0x26, 0xb6, 0xb1, 0x99, 0x09, 0xe4, 0xec, 0x90, 0xe9, 0x69, 0x40, 0xb6, - 0xe5, 0xea, 0x9e, 0x7e, 0x13, 0x2b, 0xba, 0x29, 0x8e, 0xa3, 0xc8, 0x46, 0x27, 0x29, 0x4b, 0xa2, - 0x65, 0xcd, 0xf4, 0x7c, 0x6d, 0x13, 0xb7, 0xd5, 0x1e, 0x6d, 0x92, 0xcc, 0x13, 0xb2, 0x24, 0x5a, - 0x7c, 0xed, 0x87, 0x21, 0xd7, 0xb2, 0xba, 0xa4, 0xfa, 0x63, 0x7a, 0x64, 0xed, 0x88, 0xc9, 0x59, - 0x26, 0xf3, 0x55, 0x78, 0x5d, 0x1f, 0x9c, 0x83, 0xe5, 0xe4, 0x2c, 0x93, 0x31, 0x95, 0x33, 0x30, - 0xa3, 0xb6, 0xdb, 0x0e, 0x21, 0x17, 0x44, 0x6c, 0xa7, 0x92, 0xf7, 0xc5, 0x54, 0x71, 0xe1, 0x1a, - 0xa4, 0x85, 0x1f, 0xc8, 0xe2, 0x4d, 0x3c, 0xa1, 0xd8, 0x6c, 0xfb, 0x1d, 0x3f, 0x9b, 0x91, 0xd3, - 0xa6, 0x68, 0x7c, 0x18, 0x72, 0xba, 0xab, 0x04, 0xc7, 0xfa, 0xf1, 0xe5, 0xf8, 0xd9, 0xb4, 0x9c, - 0xd5, 0x5d, 0xff, 0x48, 0xb4, 0xf8, 0x85, 0x38, 0xe4, 0xa3, 0x8f, 0x25, 0x50, 0x0d, 0xd2, 0x86, - 0xa5, 0xa9, 0x34, 0xb4, 0xd8, 0x33, 0xb1, 0xb3, 0x23, 0x9e, 0x64, 0xac, 0xac, 0x73, 0x7d, 0xd9, - 0x47, 0x2e, 0xfc, 0xcb, 0x18, 0xa4, 0x85, 0x18, 0x9d, 0x84, 0xa4, 0xad, 0x7a, 0xfb, 0x94, 0x6e, - 0xb2, 0x12, 0x97, 0x62, 0x32, 0xbd, 0x26, 0x72, 0xd7, 0x56, 0x4d, 0x1a, 0x02, 0x5c, 0x4e, 0xae, - 0xc9, 0xb8, 0x1a, 0x58, 0x6d, 0xd1, 0x6d, 0x90, 0xd5, 0xe9, 0x60, 0xd3, 0x73, 0xc5, 0xb8, 0x72, - 0x79, 0x95, 0x8b, 0xd1, 0x53, 0x30, 0xeb, 0x39, 0xaa, 0x6e, 0x44, 0x74, 0x93, 0x54, 0x57, 0x12, - 0x0d, 0xbe, 0x72, 0x09, 0x4e, 0x0b, 0xde, 0x16, 0xf6, 0x54, 0x6d, 0x1f, 0xb7, 0x02, 0x50, 0x8a, - 0x1e, 0x77, 0x9c, 0xe2, 0x0a, 0x35, 0xde, 0x2e, 0xb0, 0xc5, 0xdf, 0x88, 0xc1, 0xac, 0xd8, 0xb8, - 0xb5, 0x7c, 0x67, 0x6d, 0x00, 0xa8, 0xa6, 0x69, 0x79, 0x61, 0x77, 0xf5, 0x87, 0x72, 0x1f, 0x6e, - 0xa5, 0xec, 0x83, 0xe4, 0x10, 0xc1, 0x42, 0x07, 0x20, 0x68, 0x19, 0xea, 0xb6, 0x25, 0xc8, 0xf2, - 0x67, 0x4e, 0xf4, 0xc1, 0x25, 0xdb, 0xea, 0x03, 0x13, 0x91, 0x1d, 0x1e, 0x9a, 0x87, 0xc9, 0x5d, - 0xdc, 0xd6, 0x4d, 0x7e, 0x92, 0xcc, 0x2e, 0xc4, 0x81, 0x4c, 0xd2, 0x3f, 0x90, 0xa9, 0xfc, 0x09, - 0x98, 0xd3, 0xac, 0x4e, 0xaf, 0xb9, 0x15, 0xa9, 0xe7, 0xb8, 0xc1, 0x7d, 0x39, 0xf6, 0xc6, 0x33, - 0x5c, 0xa9, 0x6d, 0x19, 0xaa, 0xd9, 0x5e, 0xb1, 0x9c, 0x76, 0xf0, 0xe0, 0x95, 0x54, 0x3c, 0x6e, - 0xe8, 0xf1, 0xab, 0xbd, 0xfb, 0xbf, 0x62, 0xb1, 0x5f, 0x88, 0x27, 0x56, 0x1b, 0x95, 0x2f, 0xc6, - 0x17, 0x56, 0x19, 0xb0, 0x21, 0x9c, 0x21, 0xe3, 0x3d, 0x03, 0x6b, 0xa4, 0x83, 0xf0, 0x9d, 0xa7, - 0x60, 0xbe, 0x6d, 0xb5, 0x2d, 0xca, 0x74, 0x8e, 0xfc, 0xe2, 0x4f, 0x6e, 0x33, 0xbe, 0x74, 0x61, - 0xe4, 0x63, 0xde, 0xd2, 0x26, 0xcc, 0x71, 0x65, 0x85, 0x3e, 0x3a, 0x62, 0x1b, 0x1b, 0x74, 0xe4, - 0xa9, 0x5a, 0xe1, 0x97, 0xbf, 0x4d, 0x97, 0x6f, 0x79, 0x96, 0x43, 0x49, 0x1b, 0xdb, 0xfb, 0x94, - 0x64, 0x38, 0x11, 0xe1, 0x63, 0x93, 0x14, 0x3b, 0x23, 0x18, 0xff, 0x19, 0x67, 0x9c, 0x0b, 0x31, - 0x36, 0x39, 0xb4, 0x54, 0x85, 0xe9, 0xe3, 0x70, 0xfd, 0x73, 0xce, 0x95, 0xc3, 0x61, 0x92, 0x55, - 0x98, 0xa1, 0x24, 0x5a, 0xd7, 0xf5, 0xac, 0x0e, 0xcd, 0x80, 0x47, 0xd3, 0xfc, 0x8b, 0x6f, 0xb3, - 0x59, 0x93, 0x27, 0xb0, 0xaa, 0x8f, 0x2a, 0x95, 0x80, 0x3e, 0x2d, 0x6b, 0x61, 0xcd, 0x18, 0xc1, - 0xf0, 0x75, 0x6e, 0x88, 0xaf, 0x5f, 0xba, 0x01, 0xf3, 0xe4, 0x37, 0x4d, 0x50, 0x61, 0x4b, 0x46, - 0x1f, 0xc1, 0x15, 0x7e, 0xe3, 0x63, 0x6c, 0x62, 0xce, 0xf9, 0x04, 0x21, 0x9b, 0x42, 0xa3, 0xd8, - 0xc6, 0x9e, 0x87, 0x1d, 0x57, 0x51, 0x8d, 0x41, 0xe6, 0x85, 0xce, 0x30, 0x0a, 0x3f, 0xf7, 0xdd, - 0xe8, 0x28, 0xae, 0x32, 0x64, 0xd9, 0x30, 0x4a, 0x3b, 0x70, 0x6a, 0x40, 0x54, 0x8c, 0xc1, 0xf9, - 0x69, 0xce, 0x39, 0xdf, 0x17, 0x19, 0x84, 0xb6, 0x01, 0x42, 0xee, 0x8f, 0xe5, 0x18, 0x9c, 0x3f, - 0xcf, 0x39, 0x11, 0xc7, 0x8a, 0x21, 0x25, 0x8c, 0xd7, 0x60, 0xf6, 0x26, 0x76, 0x76, 0x2d, 0x97, - 0x9f, 0x1b, 0x8d, 0x41, 0xf7, 0x19, 0x4e, 0x37, 0xc3, 0x81, 0xf4, 0x20, 0x89, 0x70, 0x5d, 0x86, - 0xf4, 0x9e, 0xaa, 0xe1, 0x31, 0x28, 0xee, 0x72, 0x8a, 0x29, 0xa2, 0x4f, 0xa0, 0x65, 0xc8, 0xb5, - 0x2d, 0xbe, 0x46, 0x8d, 0x86, 0x7f, 0x96, 0xc3, 0xb3, 0x02, 0xc3, 0x29, 0x6c, 0xcb, 0xee, 0x1a, - 0x64, 0x01, 0x1b, 0x4d, 0xf1, 0x97, 0x05, 0x85, 0xc0, 0x70, 0x8a, 0x63, 0xb8, 0xf5, 0x1d, 0x41, - 0xe1, 0x86, 0xfc, 0xf9, 0x12, 0x64, 0x2d, 0xd3, 0x38, 0xb4, 0xcc, 0x71, 0x8c, 0xf8, 0x1c, 0x67, - 0x00, 0x0e, 0x21, 0x04, 0x57, 0x20, 0x33, 0xee, 0x40, 0xfc, 0x95, 0xef, 0x8a, 0xe9, 0x21, 0x46, - 0x60, 0x15, 0x66, 0x44, 0x82, 0xd2, 0x2d, 0x73, 0x0c, 0x8a, 0xbf, 0xca, 0x29, 0xf2, 0x21, 0x18, - 0xef, 0x86, 0x87, 0x5d, 0xaf, 0x8d, 0xc7, 0x21, 0xf9, 0x82, 0xe8, 0x06, 0x87, 0x70, 0x57, 0xee, - 0x62, 0x53, 0xdb, 0x1f, 0x8f, 0xe1, 0x97, 0x84, 0x2b, 0x05, 0x86, 0x50, 0x54, 0x61, 0xba, 0xa3, - 0x3a, 0xee, 0xbe, 0x6a, 0x8c, 0x35, 0x1c, 0x7f, 0x8d, 0x73, 0xe4, 0x7c, 0x10, 0xf7, 0x48, 0xd7, - 0x3c, 0x0e, 0xcd, 0x17, 0x85, 0x47, 0x42, 0x30, 0x3e, 0xf5, 0x5c, 0x8f, 0x1e, 0xb2, 0x1d, 0x87, - 0xed, 0xaf, 0x8b, 0xa9, 0xc7, 0xb0, 0x1b, 0x61, 0xc6, 0x2b, 0x90, 0x71, 0xf5, 0xb7, 0xc6, 0xa2, - 0xf9, 0x92, 0x18, 0x69, 0x0a, 0x20, 0xe0, 0xd7, 0xe1, 0xf4, 0xc0, 0x65, 0x62, 0x0c, 0xb2, 0xbf, - 0xc1, 0xc9, 0x4e, 0x0e, 0x58, 0x2a, 0x78, 0x4a, 0x38, 0x2e, 0xe5, 0xdf, 0x14, 0x29, 0x01, 0xf7, - 0x70, 0x35, 0xc8, 0xae, 0xc1, 0x55, 0xf7, 0x8e, 0xe7, 0xb5, 0xbf, 0x25, 0xbc, 0xc6, 0xb0, 0x11, - 0xaf, 0x6d, 0xc3, 0x49, 0xce, 0x78, 0xbc, 0x71, 0xfd, 0xdb, 0x22, 0xb1, 0x32, 0xf4, 0x4e, 0x74, - 0x74, 0x7f, 0x14, 0x16, 0x7c, 0x77, 0x8a, 0xf2, 0xd4, 0x55, 0x3a, 0xaa, 0x3d, 0x06, 0xf3, 0x2f, - 0x73, 0x66, 0x91, 0xf1, 0xfd, 0xfa, 0xd6, 0xdd, 0x50, 0x6d, 0x42, 0xfe, 0x1a, 0x14, 0x04, 0x79, - 0xd7, 0x74, 0xb0, 0x66, 0xb5, 0x4d, 0xfd, 0x2d, 0xdc, 0x1a, 0x83, 0xfa, 0x57, 0x7a, 0x86, 0x6a, - 0x27, 0x04, 0x27, 0xcc, 0x6b, 0x20, 0xf9, 0xb5, 0x8a, 0xa2, 0x77, 0x6c, 0xcb, 0xf1, 0x46, 0x30, - 0x7e, 0x59, 0x8c, 0x94, 0x8f, 0x5b, 0xa3, 0xb0, 0x52, 0x1d, 0xd8, 0x93, 0xe7, 0x71, 0x43, 0xf2, - 0x2b, 0x9c, 0x68, 0x3a, 0x40, 0xf1, 0xc4, 0xa1, 0x59, 0x1d, 0x5b, 0x75, 0xc6, 0xc9, 0x7f, 0x7f, - 0x47, 0x24, 0x0e, 0x0e, 0xe1, 0x89, 0x83, 0x54, 0x74, 0x64, 0xb5, 0x1f, 0x83, 0xe1, 0xab, 0x22, - 0x71, 0x08, 0x0c, 0xa7, 0x10, 0x05, 0xc3, 0x18, 0x14, 0x7f, 0x57, 0x50, 0x08, 0x0c, 0xa1, 0x78, - 0x25, 0x58, 0x68, 0x1d, 0xdc, 0xd6, 0x5d, 0xcf, 0x61, 0x45, 0xf1, 0xd1, 0x54, 0x7f, 0xef, 0xbb, - 0xd1, 0x22, 0x4c, 0x0e, 0x41, 0x49, 0x26, 0xe2, 0xc7, 0xae, 0x74, 0xcf, 0x34, 0xda, 0xb0, 0x5f, - 0x15, 0x99, 0x28, 0x04, 0x23, 0xb6, 0x85, 0x2a, 0x44, 0xe2, 0x76, 0x8d, 0xec, 0x14, 0xc6, 0xa0, - 0xfb, 0xfb, 0x3d, 0xc6, 0x35, 0x05, 0x96, 0x70, 0x86, 0xea, 0x9f, 0xae, 0x79, 0x80, 0x0f, 0xc7, - 0x8a, 0xce, 0x5f, 0xeb, 0xa9, 0x7f, 0x76, 0x18, 0x92, 0xe5, 0x90, 0x99, 0x9e, 0x7a, 0x0a, 0x8d, - 0x7a, 0xcf, 0xa8, 0xf0, 0x93, 0x1f, 0xf0, 0xfe, 0x46, 0xcb, 0xa9, 0xd2, 0x3a, 0x09, 0xf2, 0x68, - 0xd1, 0x33, 0x9a, 0xec, 0x63, 0x1f, 0xf8, 0x71, 0x1e, 0xa9, 0x79, 0x4a, 0x57, 0x61, 0x3a, 0x52, - 0xf0, 0x8c, 0xa6, 0xfa, 0x93, 0x9c, 0x2a, 0x17, 0xae, 0x77, 0x4a, 0x17, 0x20, 0x49, 0x8a, 0x97, - 0xd1, 0xf0, 0x3f, 0xc5, 0xe1, 0x54, 0xbd, 0xf4, 0x11, 0x48, 0x8b, 0xa2, 0x65, 0x34, 0xf4, 0x4f, - 0x73, 0xa8, 0x0f, 0x21, 0x70, 0x51, 0xb0, 0x8c, 0x86, 0xff, 0x19, 0x01, 0x17, 0x10, 0x02, 0x1f, - 0xdf, 0x85, 0x5f, 0xfb, 0xb3, 0x49, 0xbe, 0xe8, 0x08, 0xdf, 0x5d, 0x81, 0x29, 0x5e, 0xa9, 0x8c, - 0x46, 0x7f, 0x82, 0xdf, 0x5c, 0x20, 0x4a, 0x97, 0x60, 0x72, 0x4c, 0x87, 0xff, 0x39, 0x0e, 0x65, - 0xfa, 0xa5, 0x2a, 0x64, 0x43, 0xd5, 0xc9, 0x68, 0xf8, 0x4f, 0x71, 0x78, 0x18, 0x45, 0x4c, 0xe7, - 0xd5, 0xc9, 0x68, 0x82, 0x3f, 0x2f, 0x4c, 0xe7, 0x08, 0xe2, 0x36, 0x51, 0x98, 0x8c, 0x46, 0x7f, - 0x52, 0x78, 0x5d, 0x40, 0x4a, 0x2f, 0x41, 0xc6, 0x5f, 0x6c, 0x46, 0xe3, 0x7f, 0x9a, 0xe3, 0x03, - 0x0c, 0xf1, 0x40, 0x68, 0xb1, 0x1b, 0x4d, 0xf1, 0x17, 0x84, 0x07, 0x42, 0x28, 0x32, 0x8d, 0x7a, - 0x0b, 0x98, 0xd1, 0x4c, 0x3f, 0x23, 0xa6, 0x51, 0x4f, 0xfd, 0x42, 0x46, 0x93, 0xe6, 0xfc, 0xd1, - 0x14, 0x7f, 0x51, 0x8c, 0x26, 0xd5, 0x27, 0x66, 0xf4, 0x56, 0x04, 0xa3, 0x39, 0x7e, 0x56, 0x98, - 0xd1, 0x53, 0x10, 0x94, 0x1a, 0x80, 0xfa, 0xab, 0x81, 0xd1, 0x7c, 0x9f, 0xe2, 0x7c, 0xb3, 0x7d, - 0xc5, 0x40, 0xe9, 0x55, 0x38, 0x39, 0xb8, 0x12, 0x18, 0xcd, 0xfa, 0x73, 0x1f, 0xf4, 0xec, 0xdd, - 0xc2, 0x85, 0x40, 0x69, 0x3b, 0x58, 0x52, 0xc2, 0x55, 0xc0, 0x68, 0xda, 0x4f, 0x7f, 0x10, 0x4d, - 0xdc, 0xe1, 0x22, 0xa0, 0x54, 0x06, 0x08, 0x16, 0xe0, 0xd1, 0x5c, 0x9f, 0xe1, 0x5c, 0x21, 0x10, - 0x99, 0x1a, 0x7c, 0xfd, 0x1d, 0x8d, 0xbf, 0x2b, 0xa6, 0x06, 0x47, 0x90, 0xa9, 0x21, 0x96, 0xde, - 0xd1, 0xe8, 0xcf, 0x8a, 0xa9, 0x21, 0x20, 0x24, 0xb2, 0x43, 0xab, 0xdb, 0x68, 0x86, 0xcf, 0x89, - 0xc8, 0x0e, 0xa1, 0x4a, 0x9b, 0x30, 0xdb, 0xb7, 0x20, 0x8e, 0xa6, 0xfa, 0x05, 0x4e, 0x25, 0xf5, - 0xae, 0x87, 0xe1, 0xc5, 0x8b, 0x2f, 0x86, 0xa3, 0xd9, 0x3e, 0xdf, 0xb3, 0x78, 0xf1, 0xb5, 0xb0, - 0x74, 0x05, 0xd2, 0x66, 0xd7, 0x30, 0xc8, 0xe4, 0x41, 0x47, 0xbf, 0x1b, 0x58, 0xf8, 0xcf, 0xdf, - 0xe7, 0xde, 0x11, 0x80, 0xd2, 0x05, 0x98, 0xc4, 0x9d, 0x5d, 0xdc, 0x1a, 0x85, 0xfc, 0xce, 0xf7, - 0x45, 0xc2, 0x24, 0xda, 0xa5, 0x97, 0x00, 0xd8, 0xd1, 0x08, 0x7d, 0x18, 0x38, 0x02, 0xfb, 0x5f, - 0xbe, 0xcf, 0x5f, 0xc6, 0x09, 0x20, 0x01, 0x01, 0x7b, 0xb5, 0xe7, 0x68, 0x82, 0xef, 0x46, 0x09, - 0xe8, 0x88, 0x5c, 0x86, 0xa9, 0x37, 0x5d, 0xcb, 0xf4, 0xd4, 0xf6, 0x28, 0xf4, 0x7f, 0xe5, 0x68, - 0xa1, 0x4f, 0x1c, 0xd6, 0xb1, 0x1c, 0xec, 0xa9, 0x6d, 0x77, 0x14, 0xf6, 0xbf, 0x71, 0xac, 0x0f, - 0x20, 0x60, 0x4d, 0x75, 0xbd, 0x71, 0xfa, 0xfd, 0x7b, 0x02, 0x2c, 0x00, 0xc4, 0x68, 0xf2, 0xfb, - 0x00, 0x1f, 0x8e, 0xc2, 0xfe, 0xbe, 0x30, 0x9a, 0xeb, 0x97, 0x3e, 0x02, 0x19, 0xf2, 0x93, 0xbd, - 0x61, 0x37, 0x02, 0xfc, 0xdf, 0x39, 0x38, 0x40, 0x90, 0x3b, 0xbb, 0x5e, 0xcb, 0xd3, 0x47, 0x3b, - 0xfb, 0x7b, 0x7c, 0xa4, 0x85, 0x7e, 0xa9, 0x0c, 0x59, 0xd7, 0x6b, 0xb5, 0xba, 0xbc, 0x3e, 0x1d, - 0x01, 0xff, 0x1f, 0xdf, 0xf7, 0x8f, 0x2c, 0x7c, 0x0c, 0x19, 0xed, 0x5b, 0x07, 0x9e, 0x6d, 0xd1, - 0x07, 0x1e, 0xa3, 0x18, 0x3e, 0xe0, 0x0c, 0x21, 0x48, 0xa9, 0x0a, 0x39, 0xd2, 0x17, 0x07, 0xdb, - 0x98, 0x3e, 0x9d, 0x1a, 0x41, 0xf1, 0x3f, 0xb9, 0x03, 0x22, 0xa0, 0xca, 0x8f, 0x7d, 0xfd, 0xbd, - 0xc5, 0xd8, 0x37, 0xdf, 0x5b, 0x8c, 0xfd, 0xee, 0x7b, 0x8b, 0xb1, 0x4f, 0x7e, 0x6b, 0x71, 0xe2, - 0x9b, 0xdf, 0x5a, 0x9c, 0xf8, 0xed, 0x6f, 0x2d, 0x4e, 0x0c, 0x3e, 0x25, 0x86, 0x55, 0x6b, 0xd5, - 0x62, 0xe7, 0xc3, 0x6f, 0x14, 0xdb, 0xba, 0xb7, 0xdf, 0xdd, 0x5d, 0xd1, 0xac, 0x0e, 0x3d, 0xc6, - 0x0d, 0x4e, 0x6b, 0xfd, 0x4d, 0x0e, 0xfc, 0x20, 0x46, 0x36, 0xcc, 0xd1, 0xb3, 0x5c, 0xd5, 0x3c, - 0x1c, 0xf6, 0xad, 0xce, 0x45, 0x48, 0x94, 0xcd, 0x43, 0x74, 0x9a, 0x65, 0x37, 0xa5, 0xeb, 0x18, - 0xfc, 0x1d, 0xaf, 0x29, 0x72, 0xbd, 0xe3, 0x18, 0x68, 0x3e, 0x78, 0x11, 0x33, 0x76, 0x36, 0xc7, - 0xdf, 0xae, 0xac, 0xfc, 0x54, 0xec, 0x78, 0xdd, 0x48, 0x97, 0xcd, 0x43, 0xda, 0x8b, 0x46, 0xec, - 0x8d, 0xa7, 0x47, 0x1e, 0x72, 0x1f, 0x98, 0xd6, 0x2d, 0x93, 0x98, 0x6d, 0xef, 0x8a, 0x03, 0xee, - 0xc5, 0xde, 0x03, 0xee, 0x57, 0xb1, 0x61, 0x5c, 0x27, 0x7a, 0xdb, 0x04, 0xb2, 0x9b, 0x62, 0xaf, - 0x13, 0xc3, 0xcf, 0xc4, 0x61, 0xb1, 0xef, 0x2c, 0x9b, 0x47, 0xc0, 0x30, 0x27, 0x94, 0x20, 0x5d, - 0x13, 0x81, 0x55, 0x80, 0x29, 0x17, 0x6b, 0x96, 0xd9, 0x72, 0xa9, 0x23, 0x12, 0xb2, 0xb8, 0x24, - 0x8e, 0x30, 0x55, 0xd3, 0x72, 0xf9, 0x5b, 0x92, 0xec, 0xa2, 0xf2, 0xf3, 0xc7, 0x74, 0xc4, 0xb4, - 0xb8, 0x93, 0xf0, 0xc6, 0x73, 0x63, 0x7a, 0x43, 0x74, 0x22, 0x72, 0xec, 0x3f, 0xae, 0x57, 0x7e, - 0x36, 0x0e, 0x4b, 0xbd, 0x5e, 0x21, 0xd3, 0xca, 0xf5, 0xd4, 0x8e, 0x3d, 0xcc, 0x2d, 0x57, 0x20, - 0xb3, 0x2d, 0x74, 0x8e, 0xed, 0x97, 0xbb, 0xc7, 0xf4, 0x4b, 0xde, 0xbf, 0x95, 0x70, 0xcc, 0xf9, - 0x31, 0x1d, 0xe3, 0xf7, 0xe3, 0x9e, 0x3c, 0xf3, 0xbf, 0x53, 0x70, 0x5a, 0xb3, 0xdc, 0x8e, 0xe5, - 0x2a, 0xec, 0xf9, 0x08, 0xbb, 0xe0, 0x3e, 0xc9, 0x85, 0x9b, 0x46, 0x3f, 0x24, 0x29, 0x5e, 0x87, - 0xb9, 0x35, 0x92, 0x2a, 0xc8, 0x16, 0x28, 0x78, 0xbc, 0x33, 0xf0, 0x45, 0xd2, 0xe5, 0x48, 0xb5, - 0xcf, 0x1f, 0x2f, 0x85, 0x45, 0xc5, 0x9f, 0x8c, 0x81, 0xd4, 0xd4, 0x54, 0x43, 0x75, 0xfe, 0x5f, - 0xa9, 0xd0, 0x25, 0x00, 0xfa, 0x01, 0x52, 0xf0, 0xc5, 0x50, 0xfe, 0x7c, 0x61, 0x25, 0xdc, 0xb9, - 0x15, 0x76, 0x27, 0xfa, 0x39, 0x42, 0x86, 0xea, 0x92, 0x9f, 0x4f, 0xbe, 0x06, 0x10, 0x34, 0xa0, - 0x07, 0xe0, 0x54, 0xb3, 0x5a, 0x5e, 0x2f, 0xcb, 0x0a, 0x7b, 0xb3, 0x7d, 0xb3, 0xd9, 0xa8, 0x57, - 0xd7, 0xae, 0xae, 0xd5, 0x6b, 0xd2, 0x04, 0x3a, 0x09, 0x28, 0xdc, 0xe8, 0xbf, 0x94, 0x72, 0x02, - 0x66, 0xc3, 0x72, 0xf6, 0x7a, 0x7c, 0x9c, 0x94, 0x89, 0x7a, 0xc7, 0x36, 0x30, 0x7d, 0xee, 0xa7, - 0xe8, 0xc2, 0x6b, 0xa3, 0x2b, 0x90, 0x5f, 0xff, 0x57, 0xec, 0x95, 0xe9, 0xb9, 0x00, 0xee, 0xfb, - 0xbc, 0xb4, 0x0e, 0xb3, 0xaa, 0xa6, 0x61, 0x3b, 0x42, 0x39, 0x22, 0x4f, 0x13, 0x42, 0xfa, 0x24, - 0x93, 0x23, 0x03, 0xb6, 0x4b, 0x90, 0x72, 0x69, 0xef, 0x47, 0x51, 0x7c, 0x83, 0x53, 0x70, 0xf5, - 0x92, 0x09, 0xb3, 0xa4, 0xec, 0x53, 0x1d, 0x1c, 0x32, 0xe3, 0xe8, 0x43, 0x86, 0x7f, 0xf0, 0xe5, - 0x67, 0xe9, 0x73, 0xcd, 0x87, 0xa3, 0xc3, 0x32, 0x20, 0x9c, 0x64, 0x89, 0x73, 0x07, 0x86, 0x62, - 0xc8, 0x8b, 0xfb, 0x71, 0x83, 0x8f, 0xbe, 0xd9, 0x3f, 0xe4, 0x37, 0x5b, 0x1c, 0x14, 0x03, 0xa1, - 0x3b, 0x4d, 0x73, 0x56, 0xd6, 0x50, 0xa9, 0x0f, 0x9b, 0xd3, 0x6f, 0x3c, 0x15, 0x5a, 0x9a, 0x18, - 0x25, 0xff, 0xf3, 0x0c, 0x65, 0xbe, 0x12, 0xbe, 0x8d, 0x3f, 0xf7, 0x7e, 0x2b, 0x01, 0x8b, 0x5c, - 0x79, 0x57, 0x75, 0xf1, 0xb9, 0x9b, 0xcf, 0xed, 0x62, 0x4f, 0x7d, 0xee, 0x9c, 0x66, 0xe9, 0x22, - 0x57, 0xcf, 0xf1, 0xe9, 0x48, 0xda, 0x57, 0x78, 0xfb, 0xc2, 0xc0, 0xa7, 0x99, 0x0b, 0xc3, 0xa7, - 0x71, 0x71, 0x07, 0x92, 0x55, 0x4b, 0x37, 0x49, 0xaa, 0x6a, 0x61, 0xd3, 0xea, 0xf0, 0xd9, 0xc3, - 0x2e, 0xd0, 0x73, 0x90, 0x52, 0x3b, 0x56, 0xd7, 0xf4, 0xd8, 0xcc, 0xa9, 0x9c, 0xfe, 0xfa, 0xbb, - 0x4b, 0x13, 0xff, 0xfa, 0xdd, 0xa5, 0xc4, 0x9a, 0xe9, 0xfd, 0xe6, 0x57, 0x9e, 0x01, 0x4e, 0xb5, - 0x66, 0x7a, 0x32, 0x57, 0x2c, 0x25, 0xdf, 0x7f, 0x67, 0x29, 0x56, 0x7c, 0x0d, 0xa6, 0x6a, 0x58, - 0xbb, 0x17, 0xe6, 0x1a, 0xd6, 0x42, 0xcc, 0x35, 0xac, 0xf5, 0x30, 0x5f, 0x82, 0xf4, 0x9a, 0xe9, - 0xb1, 0xb7, 0xd0, 0x9f, 0x82, 0x84, 0x6e, 0xb2, 0x17, 0x1b, 0x8f, 0xb4, 0x8d, 0x68, 0x11, 0x60, - 0x0d, 0x6b, 0x3e, 0xb0, 0x85, 0xb5, 0x5e, 0x60, 0xff, 0xad, 0x89, 0x56, 0xa5, 0xf6, 0xdb, 0xff, - 0x61, 0x71, 0xe2, 0xed, 0xf7, 0x16, 0x27, 0x86, 0x0e, 0x71, 0x71, 0xe8, 0x10, 0xbb, 0xad, 0x03, - 0x96, 0x91, 0xfd, 0x91, 0xfd, 0x62, 0x12, 0x1e, 0xa2, 0x1f, 0x27, 0x39, 0x1d, 0xdd, 0xf4, 0xce, - 0x69, 0xce, 0xa1, 0xed, 0xd1, 0x72, 0xc5, 0xda, 0xe3, 0x03, 0x3b, 0x1b, 0x34, 0xaf, 0xb0, 0xe6, - 0xc1, 0xc3, 0x5a, 0xdc, 0x83, 0xc9, 0x06, 0xc1, 0x11, 0x17, 0x7b, 0x96, 0xa7, 0x1a, 0x7c, 0xfd, - 0x61, 0x17, 0x44, 0xca, 0x3e, 0x68, 0x8a, 0x33, 0xa9, 0x2e, 0xbe, 0x65, 0x32, 0xb0, 0xba, 0xc7, - 0xde, 0x0b, 0x4f, 0xd0, 0xc2, 0x25, 0x4d, 0x04, 0xf4, 0x15, 0xf0, 0x79, 0x98, 0x54, 0xbb, 0xec, - 0x05, 0x86, 0x04, 0xa9, 0x68, 0xe8, 0x45, 0xf1, 0x3a, 0x4c, 0xf1, 0xc7, 0xa8, 0x48, 0x82, 0xc4, - 0x01, 0x3e, 0xa4, 0xf7, 0xc9, 0xc9, 0xe4, 0x27, 0x5a, 0x81, 0x49, 0x6a, 0x3c, 0xff, 0xe0, 0xa5, - 0xb0, 0xd2, 0x67, 0xfd, 0x0a, 0x35, 0x52, 0x66, 0x6a, 0xc5, 0x6b, 0x90, 0xae, 0x59, 0x1d, 0xdd, - 0xb4, 0xa2, 0x6c, 0x19, 0xc6, 0x46, 0x6d, 0xb6, 0xbb, 0x3c, 0x2a, 0x64, 0x76, 0x81, 0x4e, 0x42, - 0x8a, 0x7d, 0x27, 0xc0, 0x5f, 0xc2, 0xe0, 0x57, 0xc5, 0x2a, 0x4c, 0x51, 0xee, 0x2d, 0x9b, 0x24, - 0x7f, 0xff, 0x95, 0xcc, 0x0c, 0xff, 0x6a, 0x8c, 0xd3, 0xc7, 0x03, 0x63, 0x11, 0x24, 0x5b, 0xaa, - 0xa7, 0xf2, 0x7e, 0xd3, 0xdf, 0xc5, 0x8f, 0x42, 0x9a, 0x93, 0xb8, 0xe8, 0x3c, 0x24, 0x2c, 0xdb, - 0xe5, 0xaf, 0x51, 0x2c, 0x0c, 0xeb, 0xca, 0x96, 0x5d, 0x49, 0x92, 0x98, 0x91, 0x89, 0x72, 0x45, - 0x1e, 0x1a, 0x16, 0x2f, 0x86, 0xc2, 0x22, 0x34, 0xe4, 0xa1, 0x9f, 0x6c, 0x48, 0xfb, 0xc2, 0xc1, - 0x0f, 0x96, 0xcf, 0xc5, 0x61, 0x31, 0xd4, 0x7a, 0x13, 0x3b, 0xae, 0x6e, 0x99, 0x2c, 0xa2, 0x78, - 0xb4, 0xa0, 0x90, 0x91, 0xbc, 0x7d, 0x48, 0xb8, 0x7c, 0x04, 0x12, 0x65, 0xdb, 0x46, 0x0b, 0x90, - 0xa6, 0xd7, 0x9a, 0xc5, 0xe2, 0x25, 0x29, 0xfb, 0xd7, 0xa4, 0xcd, 0xb5, 0xf6, 0xbc, 0x5b, 0xaa, - 0xe3, 0x7f, 0x4a, 0x27, 0xae, 0x8b, 0x97, 0x21, 0x53, 0xb5, 0x4c, 0x17, 0x9b, 0x6e, 0x97, 0x56, - 0x36, 0xbb, 0x86, 0xa5, 0x1d, 0x70, 0x06, 0x76, 0x41, 0x1c, 0xae, 0xda, 0x36, 0x45, 0x26, 0x65, - 0xf2, 0x93, 0xcd, 0xd9, 0x4a, 0x73, 0xa8, 0x8b, 0x2e, 0x1f, 0xdf, 0x45, 0xbc, 0x93, 0xbe, 0x8f, - 0x7e, 0x10, 0x83, 0x07, 0xfb, 0x27, 0xd4, 0x01, 0x3e, 0x74, 0x8f, 0x3b, 0x9f, 0x5e, 0x83, 0x4c, - 0x83, 0x7e, 0xcf, 0x7e, 0x1d, 0x1f, 0xa2, 0x05, 0x98, 0xc2, 0xad, 0xf3, 0x17, 0x2e, 0x3c, 0x77, - 0x99, 0x45, 0xfb, 0xcb, 0x13, 0xb2, 0x10, 0xa0, 0x45, 0xc8, 0xb8, 0x58, 0xb3, 0xcf, 0x5f, 0xb8, - 0x78, 0xf0, 0x1c, 0x0b, 0xaf, 0x97, 0x27, 0xe4, 0x40, 0x54, 0x4a, 0x93, 0x5e, 0xbf, 0xff, 0xb9, - 0xa5, 0x58, 0x65, 0x12, 0x12, 0x6e, 0xb7, 0xf3, 0xa1, 0xc6, 0xc8, 0xa7, 0x27, 0x61, 0x39, 0x8c, - 0xa4, 0xf5, 0xdf, 0x4d, 0xd5, 0xd0, 0x5b, 0x6a, 0xf0, 0x9f, 0x08, 0xa4, 0x90, 0x0f, 0xa8, 0xc6, - 0x90, 0x95, 0xe2, 0x48, 0x4f, 0x16, 0x7f, 0x25, 0x06, 0xb9, 0x1b, 0x82, 0xb9, 0x89, 0x3d, 0x74, - 0x05, 0xc0, 0xbf, 0x93, 0x98, 0x36, 0x0f, 0xac, 0xf4, 0xde, 0x6b, 0xc5, 0xc7, 0xc8, 0x21, 0x75, - 0x74, 0x89, 0x06, 0xa2, 0x6d, 0xb9, 0xfc, 0xf3, 0xaa, 0x11, 0x50, 0x5f, 0x19, 0x3d, 0x0d, 0x88, - 0x66, 0x38, 0xe5, 0xa6, 0xe5, 0xe9, 0x66, 0x5b, 0xb1, 0xad, 0x5b, 0xfc, 0xa3, 0xd5, 0x84, 0x2c, - 0xd1, 0x96, 0x1b, 0xb4, 0xa1, 0x41, 0xe4, 0xc4, 0xe8, 0x8c, 0xcf, 0x42, 0x8a, 0x75, 0xb5, 0xd5, - 0x72, 0xb0, 0xeb, 0xf2, 0x24, 0x26, 0x2e, 0xd1, 0x15, 0x98, 0xb2, 0xbb, 0xbb, 0x8a, 0xc8, 0x18, - 0xd9, 0xf3, 0x0f, 0x0e, 0x9a, 0xff, 0x22, 0x3e, 0x78, 0x06, 0x48, 0xd9, 0xdd, 0x5d, 0x12, 0x2d, - 0x0f, 0x43, 0x6e, 0x80, 0x31, 0xd9, 0x9b, 0x81, 0x1d, 0xf4, 0xdf, 0x28, 0xf0, 0x1e, 0x28, 0xb6, - 0xa3, 0x5b, 0x8e, 0xee, 0x1d, 0xd2, 0x77, 0xa1, 0x12, 0xb2, 0x24, 0x1a, 0x1a, 0x5c, 0x5e, 0x3c, - 0x80, 0x99, 0x26, 0x2d, 0xe2, 0x02, 0xcb, 0x2f, 0x04, 0xf6, 0xc5, 0x46, 0xdb, 0x37, 0xd4, 0xb2, - 0x78, 0x9f, 0x65, 0x95, 0x57, 0x86, 0x46, 0xe7, 0xa5, 0xe3, 0x47, 0x67, 0x74, 0xb5, 0xfb, 0xbd, - 0xd3, 0x91, 0xc9, 0xc9, 0x82, 0x33, 0x9c, 0xbe, 0xc6, 0x0d, 0xcc, 0x51, 0x7b, 0xb4, 0x85, 0xa3, - 0x17, 0xd5, 0x85, 0x11, 0x69, 0x74, 0x61, 0xe4, 0x14, 0x2a, 0x5e, 0x86, 0xe9, 0x86, 0xea, 0x78, - 0x4d, 0xec, 0xbd, 0x8c, 0xd5, 0x16, 0x76, 0xa2, 0xab, 0xee, 0xb4, 0x58, 0x75, 0x11, 0x24, 0xe9, - 0xd2, 0xca, 0x56, 0x1d, 0xfa, 0xbb, 0xb8, 0x0f, 0x49, 0xfa, 0x3e, 0xa4, 0xbf, 0x22, 0x73, 0x04, - 0x5b, 0x91, 0x49, 0x2e, 0x3d, 0xf4, 0xb0, 0x2b, 0x8e, 0x11, 0xe8, 0x05, 0x7a, 0x41, 0xac, 0xab, - 0x89, 0xa3, 0xd7, 0x55, 0x1e, 0x88, 0x7c, 0x75, 0x35, 0x60, 0xaa, 0x42, 0x52, 0xf1, 0x5a, 0xcd, - 0x37, 0x24, 0x16, 0x18, 0x82, 0x36, 0x60, 0xc6, 0x56, 0x1d, 0x8f, 0x7e, 0x1a, 0xb2, 0x4f, 0x7b, - 0xc1, 0x63, 0x7d, 0xa9, 0x7f, 0xe6, 0x45, 0x3a, 0xcb, 0xef, 0x32, 0x6d, 0x87, 0x85, 0xc5, 0xff, - 0x98, 0x84, 0x14, 0x77, 0xc6, 0x47, 0x60, 0x8a, 0xbb, 0x95, 0x47, 0xe7, 0x43, 0x2b, 0xfd, 0x0b, - 0xd3, 0x8a, 0xbf, 0x80, 0x70, 0x3e, 0x81, 0x41, 0x8f, 0x43, 0x5a, 0xdb, 0x57, 0x75, 0x53, 0xd1, - 0x5b, 0xbc, 0x20, 0xcc, 0xbe, 0xf7, 0xee, 0xd2, 0x54, 0x95, 0xc8, 0xd6, 0x6a, 0xf2, 0x14, 0x6d, - 0x5c, 0x6b, 0x91, 0x4a, 0x60, 0x1f, 0xeb, 0xed, 0x7d, 0x8f, 0xcf, 0x30, 0x7e, 0x85, 0x5e, 0x84, - 0x24, 0x09, 0x08, 0xfe, 0xe1, 0xe0, 0x42, 0x5f, 0x85, 0xef, 0x6f, 0xa1, 0x2b, 0x69, 0x72, 0xe3, - 0x4f, 0xfe, 0xfb, 0xa5, 0x98, 0x4c, 0x11, 0xa8, 0x0a, 0xd3, 0x86, 0xea, 0x7a, 0x0a, 0x5d, 0xc1, - 0xc8, 0xed, 0x27, 0x29, 0xc5, 0xe9, 0x7e, 0x87, 0x70, 0xc7, 0x72, 0xd3, 0xb3, 0x04, 0xc5, 0x44, - 0x2d, 0x74, 0x16, 0x24, 0x4a, 0xa2, 0x59, 0x9d, 0x8e, 0xee, 0xb1, 0xda, 0x2a, 0x45, 0xfd, 0x9e, - 0x27, 0xf2, 0x2a, 0x15, 0xd3, 0x0a, 0xeb, 0x01, 0xc8, 0xd0, 0x4f, 0x95, 0xa8, 0x0a, 0x7b, 0x09, - 0x37, 0x4d, 0x04, 0xb4, 0xf1, 0x0c, 0xcc, 0x04, 0xf9, 0x91, 0xa9, 0xa4, 0x19, 0x4b, 0x20, 0xa6, - 0x8a, 0xcf, 0xc2, 0xbc, 0x89, 0x6f, 0xd3, 0xd7, 0x82, 0x23, 0xda, 0x19, 0xaa, 0x8d, 0x48, 0xdb, - 0x8d, 0x28, 0xe2, 0x31, 0xc8, 0x6b, 0xc2, 0xf9, 0x4c, 0x17, 0xa8, 0xee, 0xb4, 0x2f, 0xa5, 0x6a, - 0xa7, 0x21, 0xad, 0xda, 0x36, 0x53, 0xc8, 0xf2, 0xfc, 0x68, 0xdb, 0xb4, 0xe9, 0x49, 0x98, 0xa5, - 0x7d, 0x74, 0xb0, 0xdb, 0x35, 0x3c, 0x4e, 0x92, 0xa3, 0x3a, 0x33, 0xa4, 0x41, 0x66, 0x72, 0xaa, - 0xfb, 0x08, 0x4c, 0xe3, 0x9b, 0x7a, 0x0b, 0x9b, 0x1a, 0x66, 0x7a, 0xd3, 0x54, 0x2f, 0x27, 0x84, - 0x54, 0xe9, 0x09, 0xf0, 0xf3, 0x9e, 0x22, 0x72, 0x72, 0x9e, 0xf1, 0x09, 0x79, 0x99, 0x89, 0x8b, - 0x05, 0x48, 0xd6, 0x54, 0x4f, 0x25, 0x05, 0x86, 0x77, 0x9b, 0x2d, 0x34, 0x39, 0x99, 0xfc, 0x2c, - 0xbe, 0x1f, 0x87, 0xe4, 0x0d, 0xcb, 0xc3, 0xe8, 0xf9, 0x50, 0x01, 0x98, 0x1f, 0x14, 0xcf, 0x4d, - 0xbd, 0x6d, 0xe2, 0xd6, 0x86, 0xdb, 0x0e, 0xfd, 0x5f, 0x81, 0x20, 0x9c, 0xe2, 0x91, 0x70, 0x9a, - 0x87, 0x49, 0xc7, 0xea, 0x9a, 0x2d, 0xf1, 0xfe, 0x2a, 0xbd, 0x40, 0x75, 0x48, 0xfb, 0x51, 0x92, - 0x1c, 0x15, 0x25, 0x33, 0x24, 0x4a, 0x48, 0x0c, 0x73, 0x81, 0x3c, 0xb5, 0xcb, 0x83, 0xa5, 0x02, - 0x19, 0x3f, 0x79, 0xf1, 0x68, 0x1b, 0x2f, 0x60, 0x03, 0x18, 0x59, 0x4c, 0xfc, 0xb1, 0xf7, 0x9d, - 0xc7, 0x22, 0x4e, 0xf2, 0x1b, 0xb8, 0xf7, 0x22, 0x61, 0xc5, 0xff, 0xc7, 0xc1, 0x14, 0xed, 0x57, - 0x10, 0x56, 0xec, 0xff, 0x1c, 0x3c, 0x08, 0x19, 0x57, 0x6f, 0x9b, 0xaa, 0xd7, 0x75, 0x30, 0x8f, - 0xbc, 0x40, 0x50, 0xfc, 0x5a, 0x0c, 0x52, 0x2c, 0x92, 0x43, 0x7e, 0x8b, 0x0d, 0xf6, 0x5b, 0x7c, - 0x98, 0xdf, 0x12, 0xf7, 0xee, 0xb7, 0x32, 0x80, 0x6f, 0x8c, 0xcb, 0x3f, 0x3d, 0x1f, 0x50, 0x31, - 0x30, 0x13, 0x9b, 0x7a, 0x9b, 0x4f, 0xd4, 0x10, 0xa8, 0xf8, 0xef, 0x62, 0xa4, 0x88, 0xe5, 0xed, - 0xa8, 0x0c, 0xd3, 0xc2, 0x2e, 0x65, 0xcf, 0x50, 0xdb, 0x3c, 0x76, 0x1e, 0x1a, 0x6a, 0xdc, 0x55, - 0x43, 0x6d, 0xcb, 0x59, 0x6e, 0x0f, 0xb9, 0x18, 0x3c, 0x0e, 0xf1, 0x21, 0xe3, 0x10, 0x19, 0xf8, - 0xc4, 0xbd, 0x0d, 0x7c, 0x64, 0x88, 0x92, 0xbd, 0x43, 0xf4, 0xe5, 0x38, 0xdd, 0xcc, 0xd8, 0x96, - 0xab, 0x1a, 0x3f, 0x8c, 0x19, 0xf1, 0x00, 0x64, 0x6c, 0xcb, 0x50, 0x58, 0x0b, 0x7b, 0xaf, 0x3b, - 0x6d, 0x5b, 0x86, 0xdc, 0x37, 0xec, 0x93, 0xf7, 0x69, 0xba, 0xa4, 0xee, 0x83, 0xd7, 0xa6, 0x7a, - 0xbd, 0xe6, 0x40, 0x8e, 0xb9, 0x82, 0xaf, 0x65, 0xcf, 0x12, 0x1f, 0xd0, 0xc5, 0x31, 0xd6, 0xbf, - 0xf6, 0x32, 0xb3, 0x99, 0xa6, 0xcc, 0xf5, 0x08, 0x82, 0xa5, 0xfe, 0x41, 0xbb, 0xe0, 0x70, 0x58, - 0xca, 0x5c, 0xaf, 0xf8, 0x97, 0x62, 0x00, 0xeb, 0xc4, 0xb3, 0xb4, 0xbf, 0x64, 0x15, 0x72, 0xa9, - 0x09, 0x4a, 0xe4, 0xce, 0x8b, 0xc3, 0x06, 0x8d, 0xdf, 0x3f, 0xe7, 0x86, 0xed, 0xae, 0xc2, 0x74, - 0x10, 0x8c, 0x2e, 0x16, 0xc6, 0x2c, 0x1e, 0x51, 0x55, 0x37, 0xb1, 0x27, 0xe7, 0x6e, 0x86, 0xae, - 0x8a, 0xff, 0x24, 0x06, 0x19, 0x6a, 0xd3, 0x06, 0xf6, 0xd4, 0xc8, 0x18, 0xc6, 0xee, 0x7d, 0x0c, - 0x1f, 0x02, 0x60, 0x34, 0xae, 0xfe, 0x16, 0xe6, 0x91, 0x95, 0xa1, 0x92, 0xa6, 0xfe, 0x16, 0x46, - 0x17, 0x7d, 0x87, 0x27, 0x8e, 0x76, 0xb8, 0xa8, 0xba, 0xb9, 0xdb, 0x4f, 0xc1, 0x14, 0xfd, 0x57, - 0x4d, 0xb7, 0x5d, 0x5e, 0x48, 0xa7, 0xcc, 0x6e, 0x67, 0xfb, 0xb6, 0x5b, 0x7c, 0x13, 0xa6, 0xb6, - 0x6f, 0xb3, 0xb3, 0x91, 0x07, 0x20, 0xe3, 0x58, 0x16, 0x5f, 0x93, 0x59, 0x2d, 0x94, 0x26, 0x02, - 0xba, 0x04, 0x89, 0xf3, 0x80, 0x78, 0x70, 0x1e, 0x10, 0x1c, 0x68, 0x24, 0xc6, 0x3a, 0xd0, 0x78, - 0xf2, 0xb7, 0x62, 0x90, 0x0d, 0xe5, 0x07, 0xf4, 0x1c, 0x9c, 0xa8, 0xac, 0x6f, 0x55, 0xaf, 0x2b, - 0x6b, 0x35, 0xe5, 0xea, 0x7a, 0x79, 0x35, 0xf8, 0x72, 0x69, 0xe1, 0xe4, 0x9d, 0xbb, 0xcb, 0x28, - 0xa4, 0xbb, 0x63, 0xd2, 0x73, 0x7a, 0x74, 0x0e, 0xe6, 0xa3, 0x90, 0x72, 0xa5, 0x59, 0xdf, 0xdc, - 0x96, 0x62, 0x0b, 0x27, 0xee, 0xdc, 0x5d, 0x9e, 0x0d, 0x21, 0xca, 0xbb, 0x2e, 0x36, 0xbd, 0x7e, - 0x40, 0x75, 0x6b, 0x63, 0x63, 0x6d, 0x5b, 0x8a, 0xf7, 0x01, 0x78, 0xc2, 0x7e, 0x02, 0x66, 0xa3, - 0x80, 0xcd, 0xb5, 0x75, 0x29, 0xb1, 0x80, 0xee, 0xdc, 0x5d, 0xce, 0x87, 0xb4, 0x37, 0x75, 0x63, - 0x21, 0xfd, 0xf1, 0xcf, 0x2f, 0x4e, 0xfc, 0xd2, 0x2f, 0x2e, 0xc6, 0x48, 0xcf, 0xa6, 0x23, 0x39, - 0x02, 0x3d, 0x0d, 0xa7, 0x9a, 0x6b, 0xab, 0x9b, 0xf5, 0x9a, 0xb2, 0xd1, 0x5c, 0x15, 0x27, 0xdd, - 0xa2, 0x77, 0x33, 0x77, 0xee, 0x2e, 0x67, 0x79, 0x97, 0x86, 0x69, 0x37, 0xe4, 0xfa, 0x8d, 0xad, - 0xed, 0xba, 0x14, 0x63, 0xda, 0x0d, 0x07, 0xdf, 0xb4, 0x3c, 0xf6, 0xbf, 0xdc, 0x9e, 0x85, 0xd3, - 0x03, 0xb4, 0xfd, 0x8e, 0xcd, 0xde, 0xb9, 0xbb, 0x3c, 0xdd, 0x70, 0x30, 0x9b, 0x3f, 0x14, 0xb1, - 0x02, 0x85, 0x7e, 0xc4, 0x56, 0x63, 0xab, 0x59, 0x5e, 0x97, 0x96, 0x17, 0xa4, 0x3b, 0x77, 0x97, - 0x73, 0x22, 0x19, 0x12, 0xfd, 0xa0, 0x67, 0x1f, 0xe6, 0x8e, 0xe7, 0xfd, 0xa7, 0xe0, 0x51, 0x7e, - 0x06, 0xe8, 0x7a, 0xea, 0x81, 0x6e, 0xb6, 0xfd, 0xc3, 0x5b, 0x7e, 0xcd, 0x77, 0x3e, 0x27, 0xf9, - 0x39, 0xa3, 0x90, 0x8e, 0x38, 0xc2, 0x1d, 0xfa, 0xe4, 0x72, 0x61, 0xc4, 0x43, 0xbd, 0xd1, 0x5b, - 0xa7, 0xe1, 0xc7, 0xc3, 0x0b, 0x23, 0x0e, 0xa1, 0x17, 0x8e, 0xdc, 0xdc, 0x15, 0x3f, 0x11, 0x83, - 0xfc, 0xcb, 0xba, 0xeb, 0x59, 0x8e, 0xae, 0xa9, 0x06, 0xfd, 0x5e, 0xe9, 0xe2, 0xb8, 0xb9, 0xb5, - 0x67, 0xaa, 0xbf, 0x04, 0xa9, 0x9b, 0xaa, 0xc1, 0x92, 0x5a, 0xf8, 0x59, 0x40, 0xaf, 0xfb, 0x82, - 0xd4, 0x26, 0x08, 0x18, 0xac, 0xf8, 0xa5, 0x38, 0xcc, 0xd0, 0xc9, 0xe0, 0xb2, 0x7f, 0xc5, 0x45, - 0xf6, 0x58, 0x0d, 0x48, 0x3a, 0xaa, 0xc7, 0x0f, 0x0d, 0x2b, 0x3f, 0xc2, 0xcf, 0x81, 0x1f, 0x1f, - 0x7d, 0x9a, 0xbb, 0xd2, 0x7f, 0x54, 0x4c, 0x99, 0xd0, 0xab, 0x90, 0xee, 0xa8, 0xb7, 0x15, 0xca, - 0x1a, 0xbf, 0x0f, 0xac, 0x53, 0x1d, 0xf5, 0x36, 0xb1, 0x15, 0xb5, 0x60, 0x86, 0x10, 0x6b, 0xfb, - 0xaa, 0xd9, 0xc6, 0x8c, 0x3f, 0x71, 0x1f, 0xf8, 0xa7, 0x3b, 0xea, 0xed, 0x2a, 0xe5, 0x24, 0x77, - 0x29, 0xa5, 0x3f, 0xf5, 0xce, 0xd2, 0x04, 0x3d, 0x66, 0xff, 0xb5, 0x18, 0x40, 0xe0, 0x2e, 0xf4, - 0xff, 0x83, 0xa4, 0xf9, 0x57, 0xf4, 0xf6, 0x2e, 0x1f, 0xc0, 0x33, 0xc3, 0x06, 0xa2, 0xc7, 0xd9, - 0x6c, 0x61, 0xfe, 0xe6, 0xbb, 0x4b, 0x31, 0x79, 0x46, 0xeb, 0x19, 0x87, 0x3a, 0x64, 0xbb, 0x76, - 0x4b, 0xf5, 0xb0, 0x42, 0x37, 0x71, 0xf1, 0x63, 0x2c, 0xf2, 0xc0, 0x80, 0xa4, 0x29, 0x64, 0xfd, - 0x97, 0x62, 0x90, 0xad, 0x85, 0x1e, 0xf2, 0x15, 0x60, 0xaa, 0x63, 0x99, 0xfa, 0x01, 0x0f, 0xbb, - 0x8c, 0x2c, 0x2e, 0xd1, 0x02, 0xa4, 0xd9, 0x97, 0x9a, 0xde, 0xa1, 0x38, 0xf1, 0x14, 0xd7, 0x04, - 0x75, 0x0b, 0xef, 0xba, 0xba, 0xf0, 0xb5, 0x2c, 0x2e, 0xc9, 0xd6, 0xc5, 0xc5, 0x5a, 0xd7, 0xd1, - 0xbd, 0x43, 0x45, 0xb3, 0x4c, 0x4f, 0xd5, 0x3c, 0xfe, 0xcd, 0xdf, 0x8c, 0x90, 0x57, 0x99, 0x98, - 0x90, 0xb4, 0xb0, 0xa7, 0xea, 0x86, 0x5b, 0x60, 0x0f, 0xc2, 0xc4, 0x65, 0xc8, 0xdc, 0x5f, 0x4f, - 0x85, 0x8f, 0xa8, 0xaa, 0x20, 0x59, 0x36, 0x76, 0x22, 0x25, 0x25, 0x8b, 0xd0, 0xc2, 0x6f, 0x7e, - 0xe5, 0x99, 0x79, 0xee, 0x6e, 0x5e, 0x54, 0xb2, 0x97, 0x5a, 0xe5, 0x19, 0x81, 0x10, 0xb5, 0xe6, - 0xeb, 0x64, 0xc0, 0xc4, 0x7e, 0xcf, 0xee, 0xee, 0x06, 0xc7, 0x5a, 0xf3, 0x7d, 0x7e, 0x2d, 0x9b, - 0x87, 0x95, 0xc2, 0x37, 0x02, 0xea, 0xe0, 0x2c, 0xe9, 0x3a, 0x3e, 0x24, 0xa3, 0xc5, 0x79, 0x1a, - 0x94, 0x86, 0x94, 0x88, 0x6f, 0xaa, 0xba, 0x21, 0x3e, 0x40, 0x97, 0xf9, 0x15, 0x2a, 0x41, 0xca, - 0xf5, 0x54, 0xaf, 0xeb, 0xf2, 0x7f, 0x14, 0x57, 0x1c, 0x16, 0x19, 0x15, 0xcb, 0x6c, 0x35, 0xa9, - 0xa6, 0xcc, 0x11, 0x68, 0x1b, 0x52, 0x9e, 0x75, 0x80, 0x4d, 0xee, 0xa4, 0x63, 0x45, 0xf5, 0x80, - 0x67, 0x51, 0x8c, 0x0b, 0xb5, 0x41, 0x6a, 0x61, 0x03, 0xb7, 0x59, 0x41, 0xb4, 0xaf, 0x92, 0x7d, - 0x43, 0xea, 0x3e, 0xcc, 0x9a, 0x19, 0x9f, 0xb5, 0x49, 0x49, 0xd1, 0xf5, 0xe8, 0x63, 0x66, 0xf6, - 0x5f, 0x15, 0x1f, 0x19, 0xd6, 0xff, 0x50, 0x64, 0x8a, 0xc3, 0x84, 0xf0, 0x13, 0xe9, 0x27, 0x40, - 0xea, 0x9a, 0xbb, 0x96, 0x49, 0x3f, 0x13, 0xe5, 0xc5, 0x78, 0x9a, 0x96, 0x37, 0x33, 0xbe, 0xfc, - 0x65, 0x56, 0x95, 0x5f, 0x87, 0x7c, 0xa0, 0x4a, 0xe7, 0x4e, 0xe6, 0x18, 0x73, 0x67, 0xda, 0xc7, - 0x92, 0x56, 0xf4, 0x32, 0x40, 0x30, 0x31, 0xe9, 0xf1, 0x40, 0x76, 0xf8, 0x18, 0x06, 0xb3, 0x5b, - 0x6c, 0xb3, 0x02, 0x2c, 0x32, 0x60, 0xae, 0xa3, 0x9b, 0x8a, 0x8b, 0x8d, 0x3d, 0x85, 0xbb, 0x8a, - 0x50, 0x66, 0xef, 0xc3, 0xd0, 0xce, 0x76, 0x74, 0xb3, 0x89, 0x8d, 0xbd, 0x9a, 0x4f, 0x5b, 0xca, - 0x7d, 0xfc, 0x9d, 0xa5, 0x09, 0x3e, 0x97, 0x26, 0x8a, 0x0d, 0x7a, 0x44, 0xcd, 0xa7, 0x01, 0x76, - 0xd1, 0x45, 0xc8, 0xa8, 0xe2, 0x82, 0x1e, 0x1c, 0x1c, 0x35, 0x8d, 0x02, 0x55, 0x36, 0x3b, 0xdf, - 0xfe, 0xb7, 0xcb, 0xb1, 0xe2, 0x2f, 0xc6, 0x20, 0x55, 0xbb, 0xd1, 0x50, 0x75, 0x07, 0xd5, 0x61, - 0x36, 0x08, 0xa8, 0x71, 0xe7, 0x66, 0x10, 0x83, 0x62, 0x72, 0xd6, 0x87, 0xed, 0x1a, 0x8f, 0xa4, - 0xe9, 0xdd, 0x4f, 0xf6, 0x74, 0xbc, 0x0e, 0x53, 0xcc, 0x4a, 0x17, 0x95, 0x60, 0xd2, 0x26, 0x3f, - 0xf8, 0x89, 0xfc, 0xe2, 0xd0, 0x40, 0xa4, 0xfa, 0xfe, 0x09, 0x22, 0x81, 0x14, 0x7f, 0x10, 0x03, - 0xa8, 0xdd, 0xb8, 0xb1, 0xed, 0xe8, 0xb6, 0x81, 0xbd, 0xfb, 0xd5, 0xe3, 0x75, 0x38, 0x11, 0xda, - 0x9a, 0x38, 0xda, 0xd8, 0xbd, 0x9e, 0x0b, 0x36, 0x27, 0x8e, 0x36, 0x90, 0xad, 0xe5, 0x7a, 0x3e, - 0x5b, 0x62, 0x6c, 0xb6, 0x9a, 0xeb, 0x0d, 0x76, 0x63, 0x13, 0xb2, 0x41, 0xf7, 0x5d, 0x54, 0x83, - 0xb4, 0xc7, 0x7f, 0x73, 0x6f, 0x16, 0x87, 0x7b, 0x53, 0xc0, 0xb8, 0x47, 0x7d, 0x64, 0xf1, 0xff, - 0x10, 0xa7, 0xfa, 0x11, 0xfb, 0x87, 0x2b, 0x8c, 0x48, 0xee, 0xe5, 0xb9, 0xf1, 0x7e, 0x54, 0x14, - 0x9c, 0xab, 0xc7, 0xab, 0x1f, 0x8b, 0xc3, 0xdc, 0x8e, 0xc8, 0x36, 0x7f, 0x68, 0x3d, 0xd1, 0x80, - 0x29, 0x6c, 0x7a, 0x8e, 0x4e, 0x5d, 0x41, 0xc6, 0xfa, 0xd9, 0x61, 0x63, 0x3d, 0xa0, 0x2f, 0xf4, - 0xff, 0x15, 0x89, 0x73, 0x6d, 0x4e, 0xd3, 0xe3, 0x85, 0x7f, 0x13, 0x87, 0xc2, 0x30, 0x24, 0x3a, - 0x03, 0x33, 0x9a, 0x83, 0xa9, 0x40, 0x89, 0x1c, 0xae, 0xe5, 0x85, 0x98, 0x27, 0xfd, 0x0d, 0x20, - 0x05, 0x14, 0x09, 0x2c, 0xa2, 0x7a, 0xec, 0x8a, 0x29, 0x1f, 0x80, 0x69, 0xda, 0xc7, 0x30, 0xa3, - 0x9b, 0xba, 0xa7, 0xab, 0x86, 0xb2, 0xab, 0x1a, 0xaa, 0xa9, 0xdd, 0x4b, 0x65, 0xd9, 0x9f, 0xa8, - 0xf3, 0x9c, 0xb4, 0xc2, 0x38, 0xd1, 0x0d, 0x98, 0x12, 0xf4, 0xc9, 0xfb, 0x40, 0x2f, 0xc8, 0x42, - 0x55, 0xd4, 0xef, 0xc4, 0x61, 0x56, 0xc6, 0xad, 0x3f, 0x5a, 0x6e, 0xfd, 0x51, 0x00, 0x36, 0xe1, - 0x48, 0x1e, 0xbc, 0x07, 0xcf, 0xf6, 0x4f, 0xe0, 0x0c, 0xe3, 0xab, 0xb9, 0x5e, 0xc8, 0xb7, 0xdf, - 0x88, 0x43, 0x2e, 0xec, 0xdb, 0x3f, 0x02, 0xeb, 0x02, 0x5a, 0x0b, 0xb2, 0x41, 0x92, 0xff, 0xa7, - 0xd5, 0x21, 0xd9, 0xa0, 0x2f, 0xea, 0x8e, 0x4e, 0x03, 0xdf, 0x8b, 0x43, 0xaa, 0xa1, 0x3a, 0x6a, - 0xc7, 0x45, 0xd7, 0xfa, 0x0a, 0x38, 0x71, 0xca, 0xd6, 0xf7, 0xff, 0xb4, 0xf9, 0xa6, 0x9e, 0x85, - 0xdc, 0xa7, 0x06, 0xd4, 0x6f, 0x8f, 0x41, 0x9e, 0x6c, 0x11, 0x43, 0x0f, 0xe4, 0xe3, 0xf4, 0x31, - 0x23, 0xd9, 0xe3, 0x05, 0x4f, 0x83, 0xd0, 0x12, 0x64, 0x89, 0x5a, 0x90, 0xe8, 0x88, 0x0e, 0x74, - 0xd4, 0xdb, 0x75, 0x26, 0x41, 0xcf, 0x00, 0xda, 0xf7, 0x37, 0xed, 0x4a, 0xe0, 0x02, 0xa2, 0x37, - 0x1b, 0xb4, 0x08, 0xf5, 0x87, 0x00, 0x88, 0x15, 0x0a, 0x7b, 0xc9, 0x8b, 0xed, 0x71, 0x32, 0x44, - 0x52, 0xa3, 0x2f, 0x7a, 0xfd, 0x04, 0xab, 0x05, 0x7b, 0x76, 0x8f, 0xbc, 0x0c, 0x5f, 0x3f, 0x5e, - 0xa4, 0x7e, 0xef, 0xdd, 0xa5, 0x85, 0x43, 0xb5, 0x63, 0x94, 0x8a, 0x03, 0x28, 0x8b, 0xb4, 0x36, - 0x8c, 0xee, 0x3a, 0x43, 0x11, 0xfc, 0xf9, 0x18, 0xa0, 0x20, 0xe5, 0xca, 0xd8, 0xb5, 0xc9, 0xb6, - 0x86, 0x14, 0xbd, 0xa1, 0x0a, 0x35, 0x76, 0x74, 0xd1, 0x1b, 0xe0, 0x45, 0xd1, 0x1b, 0x9a, 0x11, - 0x97, 0x83, 0x04, 0x17, 0xe7, 0x63, 0x38, 0xe0, 0x0d, 0xbd, 0x95, 0xaa, 0xa5, 0x0b, 0x74, 0x5f, - 0x0e, 0x9b, 0x28, 0xfe, 0x4e, 0x0c, 0x4e, 0xf7, 0x45, 0x93, 0x6f, 0xec, 0x1f, 0x03, 0xe4, 0x84, - 0x1a, 0xf9, 0xbf, 0xcc, 0x63, 0x46, 0x1f, 0x3b, 0x38, 0x67, 0x9d, 0xbe, 0x5c, 0xf9, 0x61, 0xe5, - 0x68, 0xf6, 0xe6, 0xde, 0x3f, 0x8a, 0xc1, 0x7c, 0xd8, 0x18, 0xbf, 0x5b, 0x9b, 0x90, 0x0b, 0xdb, - 0xc2, 0x3b, 0xf4, 0xe8, 0x38, 0x1d, 0xe2, 0x7d, 0x89, 0xe0, 0xd1, 0x2b, 0xc1, 0xc4, 0x65, 0x87, - 0x45, 0xcf, 0x8d, 0xed, 0x1b, 0x61, 0x53, 0xef, 0x04, 0x4e, 0x8a, 0x2a, 0x26, 0xd9, 0xb0, 0x2c, - 0x03, 0xfd, 0x71, 0x98, 0x35, 0x2d, 0x4f, 0x21, 0x51, 0x8e, 0x5b, 0x0a, 0xdf, 0xb9, 0xb2, 0xec, - 0xf7, 0xca, 0xf1, 0x5c, 0xf6, 0x9d, 0x77, 0x97, 0xfa, 0xa9, 0x7a, 0xfc, 0x38, 0x63, 0x5a, 0x5e, - 0x85, 0xb6, 0x6f, 0xb3, 0x7d, 0xad, 0x03, 0xd3, 0xd1, 0x5b, 0xb3, 0x6c, 0xb9, 0x71, 0xec, 0x5b, - 0x4f, 0x1f, 0x75, 0xdb, 0xdc, 0x6e, 0xe8, 0x9e, 0xec, 0x9d, 0xa6, 0xdf, 0x7f, 0x67, 0x29, 0xf6, - 0xe4, 0x57, 0x63, 0x00, 0xc1, 0x16, 0x1e, 0x3d, 0x0d, 0xa7, 0x2a, 0x5b, 0x9b, 0x35, 0xa5, 0xb9, - 0x5d, 0xde, 0xde, 0x69, 0x46, 0xdf, 0x7c, 0x16, 0x67, 0xc2, 0xae, 0x8d, 0x35, 0x7d, 0x4f, 0xc7, - 0x2d, 0xf4, 0x38, 0xcc, 0x47, 0xb5, 0xc9, 0x55, 0xbd, 0x26, 0xc5, 0x16, 0x72, 0x77, 0xee, 0x2e, - 0xa7, 0x59, 0x75, 0x84, 0x5b, 0xe8, 0x2c, 0x9c, 0xe8, 0xd7, 0x5b, 0xdb, 0x5c, 0x95, 0xe2, 0x0b, - 0xd3, 0x77, 0xee, 0x2e, 0x67, 0xfc, 0x32, 0x0a, 0x15, 0x01, 0x85, 0x35, 0x39, 0x5f, 0x62, 0x01, - 0xee, 0xdc, 0x5d, 0x4e, 0x31, 0xb7, 0x2d, 0x24, 0x3f, 0xfe, 0xf9, 0xc5, 0x89, 0xca, 0xd5, 0xa1, - 0xa7, 0xbe, 0x4f, 0x1f, 0xe9, 0xb1, 0xdb, 0xfe, 0x49, 0x6e, 0xe4, 0xa8, 0xf7, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0xdf, 0xc6, 0xe4, 0x92, 0x04, 0x66, 0x00, 0x00, + // 7968 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7d, 0x79, 0x70, 0x24, 0xd7, + 0x79, 0x1f, 0xe6, 0xc0, 0x60, 0xe6, 0x9b, 0xc1, 0xa0, 0xf1, 0x80, 0xdd, 0x9d, 0x05, 0x49, 0x00, + 0x1c, 0x1e, 0xbb, 0xbc, 0xb0, 0xe4, 0x92, 0xbb, 0xcb, 0x9d, 0x95, 0x44, 0x0d, 0x30, 0xb3, 0xd8, + 0xd9, 0xc5, 0x31, 0xec, 0x01, 0x96, 0x87, 0xe3, 0x74, 0x35, 0x7a, 0x1e, 0x06, 0x4d, 0xf4, 0x74, + 0xb7, 0xba, 0x7b, 0x76, 0x01, 0x96, 0x93, 0xa2, 0x4b, 0x39, 0xa4, 0x4d, 0xc5, 0x91, 0xe3, 0x54, + 0x2c, 0xcb, 0x5a, 0x85, 0xb2, 0x9c, 0xc8, 0x51, 0x94, 0xc3, 0x96, 0xa2, 0xc4, 0x71, 0x25, 0x51, + 0x92, 0x4a, 0x22, 0xab, 0x2a, 0x29, 0xd9, 0x7f, 0xc4, 0x76, 0x0e, 0xc6, 0xa1, 0x54, 0x09, 0xa3, + 0x28, 0x89, 0xa3, 0x30, 0x55, 0x49, 0xa9, 0x94, 0x72, 0xbd, 0xab, 0x8f, 0x39, 0x30, 0x03, 0x7a, + 0x49, 0xbb, 0x4a, 0x7f, 0x2d, 0xde, 0x7b, 0xdf, 0xf7, 0xeb, 0xef, 0x7d, 0xef, 0xbb, 0xde, 0x7b, + 0xdd, 0xb3, 0xf0, 0xcf, 0xae, 0xc0, 0x62, 0xcb, 0xb2, 0x5a, 0x06, 0x3e, 0x67, 0x3b, 0x96, 0x67, + 0xed, 0x74, 0x76, 0xcf, 0x35, 0xb1, 0xab, 0x39, 0xba, 0xed, 0x59, 0xce, 0x12, 0xed, 0x43, 0x53, + 0x8c, 0x62, 0x49, 0x50, 0x14, 0xd7, 0x61, 0xfa, 0xaa, 0x6e, 0xe0, 0x8a, 0x4f, 0xd8, 0xc0, 0x1e, + 0x7a, 0x1e, 0x92, 0xbb, 0xba, 0x81, 0x0b, 0xb1, 0xc5, 0xc4, 0xd9, 0xec, 0xf9, 0x87, 0x97, 0xba, + 0x98, 0x96, 0xa2, 0x1c, 0x75, 0xd2, 0x2d, 0x53, 0x8e, 0xe2, 0x77, 0x92, 0x30, 0xd3, 0x67, 0x14, + 0x21, 0x48, 0x9a, 0x6a, 0x9b, 0x20, 0xc6, 0xce, 0x66, 0x64, 0xfa, 0x37, 0x2a, 0xc0, 0x84, 0xad, + 0x6a, 0xfb, 0x6a, 0x0b, 0x17, 0xe2, 0xb4, 0x5b, 0x34, 0xd1, 0x3c, 0x40, 0x13, 0xdb, 0xd8, 0x6c, + 0x62, 0x53, 0x3b, 0x2c, 0x24, 0x16, 0x13, 0x67, 0x33, 0x72, 0xa8, 0x07, 0x3d, 0x01, 0xd3, 0x76, + 0x67, 0xc7, 0xd0, 0x35, 0x25, 0x44, 0x06, 0x8b, 0x89, 0xb3, 0xe3, 0xb2, 0xc4, 0x06, 0x2a, 0x01, + 0xf1, 0x19, 0x98, 0xba, 0x8d, 0xd5, 0xfd, 0x30, 0x69, 0x96, 0x92, 0xe6, 0x49, 0x77, 0x88, 0x70, + 0x05, 0x72, 0x6d, 0xec, 0xba, 0x6a, 0x0b, 0x2b, 0xde, 0xa1, 0x8d, 0x0b, 0x49, 0x3a, 0xfb, 0xc5, + 0x9e, 0xd9, 0x77, 0xcf, 0x3c, 0xcb, 0xb9, 0xb6, 0x0e, 0x6d, 0x8c, 0xca, 0x90, 0xc1, 0x66, 0xa7, + 0xcd, 0x10, 0xc6, 0x07, 0xe8, 0xaf, 0x6a, 0x76, 0xda, 0xdd, 0x28, 0x69, 0xc2, 0xc6, 0x21, 0x26, + 0x5c, 0xec, 0xdc, 0xd2, 0x35, 0x5c, 0x48, 0x51, 0x80, 0x33, 0x3d, 0x00, 0x0d, 0x36, 0xde, 0x8d, + 0x21, 0xf8, 0xd0, 0x0a, 0x64, 0xf0, 0x81, 0x87, 0x4d, 0x57, 0xb7, 0xcc, 0xc2, 0x04, 0x05, 0x79, + 0xa4, 0xcf, 0x2a, 0x62, 0xa3, 0xd9, 0x0d, 0x11, 0xf0, 0xa1, 0x8b, 0x30, 0x61, 0xd9, 0x9e, 0x6e, + 0x99, 0x6e, 0x21, 0xbd, 0x18, 0x3b, 0x9b, 0x3d, 0x7f, 0x7f, 0x5f, 0x43, 0xd8, 0x64, 0x34, 0xb2, + 0x20, 0x46, 0x35, 0x90, 0x5c, 0xab, 0xe3, 0x68, 0x58, 0xd1, 0xac, 0x26, 0x56, 0x74, 0x73, 0xd7, + 0x2a, 0x64, 0x28, 0xc0, 0x42, 0xef, 0x44, 0x28, 0xe1, 0x8a, 0xd5, 0xc4, 0x35, 0x73, 0xd7, 0x92, + 0xf3, 0x6e, 0xa4, 0x8d, 0x4e, 0x42, 0xca, 0x3d, 0x34, 0x3d, 0xf5, 0xa0, 0x90, 0xa3, 0x16, 0xc2, + 0x5b, 0xc5, 0x5f, 0x4d, 0xc1, 0xd4, 0x28, 0x26, 0x76, 0x05, 0xc6, 0x77, 0xc9, 0x2c, 0x0b, 0xf1, + 0xe3, 0xe8, 0x80, 0xf1, 0x44, 0x95, 0x98, 0x7a, 0x8f, 0x4a, 0x2c, 0x43, 0xd6, 0xc4, 0xae, 0x87, + 0x9b, 0xcc, 0x22, 0x12, 0x23, 0xda, 0x14, 0x30, 0xa6, 0x5e, 0x93, 0x4a, 0xbe, 0x27, 0x93, 0x7a, + 0x19, 0xa6, 0x7c, 0x91, 0x14, 0x47, 0x35, 0x5b, 0xc2, 0x36, 0xcf, 0x0d, 0x93, 0x64, 0xa9, 0x2a, + 0xf8, 0x64, 0xc2, 0x26, 0xe7, 0x71, 0xa4, 0x8d, 0x2a, 0x00, 0x96, 0x89, 0xad, 0x5d, 0xa5, 0x89, + 0x35, 0xa3, 0x90, 0x1e, 0xa0, 0xa5, 0x4d, 0x42, 0xd2, 0xa3, 0x25, 0x8b, 0xf5, 0x6a, 0x06, 0xba, + 0x1c, 0x98, 0xda, 0xc4, 0x00, 0x4b, 0x59, 0x67, 0x4e, 0xd6, 0x63, 0x6d, 0xdb, 0x90, 0x77, 0x30, + 0xb1, 0x7b, 0xdc, 0xe4, 0x33, 0xcb, 0x50, 0x21, 0x96, 0x86, 0xce, 0x4c, 0xe6, 0x6c, 0x6c, 0x62, + 0x93, 0x4e, 0xb8, 0x89, 0x1e, 0x02, 0xbf, 0x43, 0xa1, 0x66, 0x05, 0x34, 0x0a, 0xe5, 0x44, 0xe7, + 0x86, 0xda, 0xc6, 0x73, 0xaf, 0x43, 0x3e, 0xaa, 0x1e, 0x34, 0x0b, 0xe3, 0xae, 0xa7, 0x3a, 0x1e, + 0xb5, 0xc2, 0x71, 0x99, 0x35, 0x90, 0x04, 0x09, 0x6c, 0x36, 0x69, 0x94, 0x1b, 0x97, 0xc9, 0x9f, + 0xe8, 0xa3, 0xc1, 0x84, 0x13, 0x74, 0xc2, 0x8f, 0xf6, 0xae, 0x68, 0x04, 0xb9, 0x7b, 0xde, 0x73, + 0x97, 0x60, 0x32, 0x32, 0x81, 0x51, 0x1f, 0x5d, 0xfc, 0x09, 0x38, 0xd1, 0x17, 0x1a, 0xbd, 0x0c, + 0xb3, 0x1d, 0x53, 0x37, 0x3d, 0xec, 0xd8, 0x0e, 0x26, 0x16, 0xcb, 0x1e, 0x55, 0xf8, 0x2f, 0x13, + 0x03, 0x6c, 0x6e, 0x3b, 0x4c, 0xcd, 0x50, 0xe4, 0x99, 0x4e, 0x6f, 0xe7, 0xe3, 0x99, 0xf4, 0x3b, + 0x13, 0xd2, 0x1b, 0x6f, 0xbc, 0xf1, 0x46, 0xbc, 0xf8, 0x4f, 0x52, 0x30, 0xdb, 0xcf, 0x67, 0xfa, + 0xba, 0xef, 0x49, 0x48, 0x99, 0x9d, 0xf6, 0x0e, 0x76, 0xa8, 0x92, 0xc6, 0x65, 0xde, 0x42, 0x65, + 0x18, 0x37, 0xd4, 0x1d, 0x6c, 0x14, 0x92, 0x8b, 0xb1, 0xb3, 0xf9, 0xf3, 0x4f, 0x8c, 0xe4, 0x95, + 0x4b, 0x6b, 0x84, 0x45, 0x66, 0x9c, 0xe8, 0x23, 0x90, 0xe4, 0x21, 0x9a, 0x20, 0x3c, 0x3e, 0x1a, + 0x02, 0xf1, 0x25, 0x99, 0xf2, 0xa1, 0xfb, 0x20, 0x43, 0xfe, 0x65, 0xb6, 0x91, 0xa2, 0x32, 0xa7, + 0x49, 0x07, 0xb1, 0x0b, 0x34, 0x07, 0x69, 0xea, 0x26, 0x4d, 0x2c, 0x52, 0x9b, 0xdf, 0x26, 0x86, + 0xd5, 0xc4, 0xbb, 0x6a, 0xc7, 0xf0, 0x94, 0x5b, 0xaa, 0xd1, 0xc1, 0xd4, 0xe0, 0x33, 0x72, 0x8e, + 0x77, 0xde, 0x24, 0x7d, 0x68, 0x01, 0xb2, 0xcc, 0xab, 0x74, 0xb3, 0x89, 0x0f, 0x68, 0xf4, 0x1c, + 0x97, 0x99, 0xa3, 0xd5, 0x48, 0x0f, 0x79, 0xfc, 0x6b, 0xae, 0x65, 0x0a, 0xd3, 0xa4, 0x8f, 0x20, + 0x1d, 0xf4, 0xf1, 0x97, 0xba, 0x03, 0xf7, 0x03, 0xfd, 0xa7, 0xd7, 0xe3, 0x4b, 0x67, 0x60, 0x8a, + 0x52, 0x3c, 0xcb, 0x97, 0x5e, 0x35, 0x0a, 0xd3, 0x8b, 0xb1, 0xb3, 0x69, 0x39, 0xcf, 0xba, 0x37, + 0x79, 0x6f, 0xf1, 0x6b, 0x71, 0x48, 0xd2, 0xc0, 0x32, 0x05, 0xd9, 0xad, 0x57, 0xea, 0x55, 0xa5, + 0xb2, 0xb9, 0xbd, 0xbc, 0x56, 0x95, 0x62, 0x28, 0x0f, 0x40, 0x3b, 0xae, 0xae, 0x6d, 0x96, 0xb7, + 0xa4, 0xb8, 0xdf, 0xae, 0x6d, 0x6c, 0x5d, 0x7c, 0x4e, 0x4a, 0xf8, 0x0c, 0xdb, 0xac, 0x23, 0x19, + 0x26, 0x78, 0xf6, 0xbc, 0x34, 0x8e, 0x24, 0xc8, 0x31, 0x80, 0xda, 0xcb, 0xd5, 0xca, 0xc5, 0xe7, + 0xa4, 0x54, 0xb4, 0xe7, 0xd9, 0xf3, 0xd2, 0x04, 0x9a, 0x84, 0x0c, 0xed, 0x59, 0xde, 0xdc, 0x5c, + 0x93, 0xd2, 0x3e, 0x66, 0x63, 0x4b, 0xae, 0x6d, 0xac, 0x4a, 0x19, 0x1f, 0x73, 0x55, 0xde, 0xdc, + 0xae, 0x4b, 0xe0, 0x23, 0xac, 0x57, 0x1b, 0x8d, 0xf2, 0x6a, 0x55, 0xca, 0xfa, 0x14, 0xcb, 0xaf, + 0x6c, 0x55, 0x1b, 0x52, 0x2e, 0x22, 0xd6, 0xb3, 0xe7, 0xa5, 0x49, 0xff, 0x11, 0xd5, 0x8d, 0xed, + 0x75, 0x29, 0x8f, 0xa6, 0x61, 0x92, 0x3d, 0x42, 0x08, 0x31, 0xd5, 0xd5, 0x75, 0xf1, 0x39, 0x49, + 0x0a, 0x04, 0x61, 0x28, 0xd3, 0x91, 0x8e, 0x8b, 0xcf, 0x49, 0xa8, 0xb8, 0x02, 0xe3, 0xd4, 0x0c, + 0x11, 0x82, 0xfc, 0x5a, 0x79, 0xb9, 0xba, 0xa6, 0x6c, 0xd6, 0xb7, 0x6a, 0x9b, 0x1b, 0xe5, 0x35, + 0x29, 0x16, 0xf4, 0xc9, 0xd5, 0x17, 0xb7, 0x6b, 0x72, 0xb5, 0x22, 0xc5, 0xc3, 0x7d, 0xf5, 0x6a, + 0x79, 0xab, 0x5a, 0x91, 0x12, 0x45, 0x0d, 0x66, 0xfb, 0x05, 0xd4, 0xbe, 0x2e, 0x14, 0xb2, 0x85, + 0xf8, 0x00, 0x5b, 0xa0, 0x58, 0xdd, 0xb6, 0x50, 0xfc, 0x76, 0x1c, 0x66, 0xfa, 0x24, 0x95, 0xbe, + 0x0f, 0x79, 0x01, 0xc6, 0x99, 0x2d, 0xb3, 0x34, 0xfb, 0x58, 0xdf, 0xec, 0x44, 0x2d, 0xbb, 0x27, + 0xd5, 0x52, 0xbe, 0x70, 0xa9, 0x91, 0x18, 0x50, 0x6a, 0x10, 0x88, 0x1e, 0x83, 0xfd, 0xf1, 0x9e, + 0xe0, 0xcf, 0xf2, 0xe3, 0xc5, 0x51, 0xf2, 0x23, 0xed, 0x3b, 0x5e, 0x12, 0x18, 0xef, 0x93, 0x04, + 0xae, 0xc0, 0x74, 0x0f, 0xd0, 0xc8, 0xc1, 0xf8, 0xe3, 0x31, 0x28, 0x0c, 0x52, 0xce, 0x90, 0x90, + 0x18, 0x8f, 0x84, 0xc4, 0x2b, 0xdd, 0x1a, 0x7c, 0x70, 0xf0, 0x22, 0xf4, 0xac, 0xf5, 0x17, 0x63, + 0x70, 0xb2, 0x7f, 0x49, 0xd9, 0x57, 0x86, 0x8f, 0x40, 0xaa, 0x8d, 0xbd, 0x3d, 0x4b, 0x94, 0x55, + 0x8f, 0xf6, 0x49, 0xd6, 0x64, 0xb8, 0x7b, 0xb1, 0x39, 0x57, 0x38, 0xdb, 0x27, 0x06, 0xd5, 0x85, + 0x4c, 0x9a, 0x1e, 0x49, 0x3f, 0x19, 0x87, 0x13, 0x7d, 0xc1, 0xfb, 0x0a, 0xfa, 0x00, 0x80, 0x6e, + 0xda, 0x1d, 0x8f, 0x95, 0x4e, 0x2c, 0x12, 0x67, 0x68, 0x0f, 0x0d, 0x5e, 0x24, 0xca, 0x76, 0x3c, + 0x7f, 0x3c, 0x41, 0xc7, 0x81, 0x75, 0x51, 0x82, 0xe7, 0x03, 0x41, 0x93, 0x54, 0xd0, 0xf9, 0x01, + 0x33, 0xed, 0x31, 0xcc, 0xa7, 0x41, 0xd2, 0x0c, 0x1d, 0x9b, 0x9e, 0xe2, 0x7a, 0x0e, 0x56, 0xdb, + 0xba, 0xd9, 0xa2, 0xa9, 0x26, 0x5d, 0x1a, 0xdf, 0x55, 0x0d, 0x17, 0xcb, 0x53, 0x6c, 0xb8, 0x21, + 0x46, 0x09, 0x07, 0x35, 0x20, 0x27, 0xc4, 0x91, 0x8a, 0x70, 0xb0, 0x61, 0x9f, 0xa3, 0xf8, 0xd3, + 0x19, 0xc8, 0x86, 0x0a, 0x70, 0xf4, 0x20, 0xe4, 0x5e, 0x53, 0x6f, 0xa9, 0x8a, 0xd8, 0x54, 0x31, + 0x4d, 0x64, 0x49, 0x5f, 0x9d, 0x6f, 0xac, 0x9e, 0x86, 0x59, 0x4a, 0x62, 0x75, 0x3c, 0xec, 0x28, + 0x9a, 0xa1, 0xba, 0x2e, 0x55, 0x5a, 0x9a, 0x92, 0x22, 0x32, 0xb6, 0x49, 0x86, 0x56, 0xc4, 0x08, + 0xba, 0x00, 0x33, 0x94, 0xa3, 0xdd, 0x31, 0x3c, 0xdd, 0x36, 0xb0, 0x42, 0xb6, 0x79, 0x2e, 0x4d, + 0x39, 0xbe, 0x64, 0xd3, 0x84, 0x62, 0x9d, 0x13, 0x10, 0x89, 0x5c, 0x54, 0x81, 0x07, 0x28, 0x5b, + 0x0b, 0x9b, 0xd8, 0x51, 0x3d, 0xac, 0xe0, 0x8f, 0x75, 0x54, 0xc3, 0x55, 0x54, 0xb3, 0xa9, 0xec, + 0xa9, 0xee, 0x5e, 0x61, 0x96, 0x00, 0x2c, 0xc7, 0x0b, 0x31, 0xf9, 0x34, 0x21, 0x5c, 0xe5, 0x74, + 0x55, 0x4a, 0x56, 0x36, 0x9b, 0xd7, 0x54, 0x77, 0x0f, 0x95, 0xe0, 0x24, 0x45, 0x71, 0x3d, 0x47, + 0x37, 0x5b, 0x8a, 0xb6, 0x87, 0xb5, 0x7d, 0xa5, 0xe3, 0xed, 0x3e, 0x5f, 0xb8, 0x2f, 0xfc, 0x7c, + 0x2a, 0x61, 0x83, 0xd2, 0xac, 0x10, 0x92, 0x6d, 0x6f, 0xf7, 0x79, 0xd4, 0x80, 0x1c, 0x59, 0x8c, + 0xb6, 0xfe, 0x3a, 0x56, 0x76, 0x2d, 0x87, 0xe6, 0xd0, 0x7c, 0x9f, 0xd0, 0x14, 0xd2, 0xe0, 0xd2, + 0x26, 0x67, 0x58, 0xb7, 0x9a, 0xb8, 0x34, 0xde, 0xa8, 0x57, 0xab, 0x15, 0x39, 0x2b, 0x50, 0xae, + 0x5a, 0x0e, 0x31, 0xa8, 0x96, 0xe5, 0x2b, 0x38, 0xcb, 0x0c, 0xaa, 0x65, 0x09, 0xf5, 0x5e, 0x80, + 0x19, 0x4d, 0x63, 0x73, 0xd6, 0x35, 0x85, 0x6f, 0xc6, 0xdc, 0x82, 0x14, 0x51, 0x96, 0xa6, 0xad, + 0x32, 0x02, 0x6e, 0xe3, 0x2e, 0xba, 0x0c, 0x27, 0x02, 0x65, 0x85, 0x19, 0xa7, 0x7b, 0x66, 0xd9, + 0xcd, 0x7a, 0x01, 0x66, 0xec, 0xc3, 0x5e, 0x46, 0x14, 0x79, 0xa2, 0x7d, 0xd8, 0xcd, 0x76, 0x09, + 0x66, 0xed, 0x3d, 0xbb, 0x97, 0xef, 0xf1, 0x30, 0x1f, 0xb2, 0xf7, 0xec, 0x6e, 0xc6, 0x47, 0xe8, + 0xce, 0xdc, 0xc1, 0x9a, 0xea, 0xe1, 0x66, 0xe1, 0x54, 0x98, 0x3c, 0x34, 0x80, 0x96, 0x40, 0xd2, + 0x34, 0x05, 0x9b, 0xea, 0x8e, 0x81, 0x15, 0xd5, 0xc1, 0xa6, 0xea, 0x16, 0x16, 0x28, 0x71, 0xd2, + 0x73, 0x3a, 0x58, 0xce, 0x6b, 0x5a, 0x95, 0x0e, 0x96, 0xe9, 0x18, 0x7a, 0x1c, 0xa6, 0xad, 0x9d, + 0xd7, 0x34, 0x66, 0x91, 0x8a, 0xed, 0xe0, 0x5d, 0xfd, 0xa0, 0xf0, 0x30, 0x55, 0xef, 0x14, 0x19, + 0xa0, 0xf6, 0x58, 0xa7, 0xdd, 0xe8, 0x31, 0x90, 0x34, 0x77, 0x4f, 0x75, 0x6c, 0x1a, 0x92, 0x5d, + 0x5b, 0xd5, 0x70, 0xe1, 0x11, 0x46, 0xca, 0xfa, 0x37, 0x44, 0x37, 0xf1, 0x08, 0xf7, 0xb6, 0xbe, + 0xeb, 0x09, 0xc4, 0x33, 0xcc, 0x23, 0x68, 0x1f, 0x47, 0x3b, 0x0b, 0x12, 0xd1, 0x44, 0xe4, 0xc1, + 0x67, 0x29, 0x59, 0xde, 0xde, 0xb3, 0xc3, 0xcf, 0x7d, 0x08, 0x26, 0x09, 0x65, 0xf0, 0xd0, 0xc7, + 0x58, 0xe1, 0x66, 0xef, 0x85, 0x9e, 0xf8, 0x1c, 0x9c, 0x24, 0x44, 0x6d, 0xec, 0xa9, 0x4d, 0xd5, + 0x53, 0x43, 0xd4, 0x4f, 0x52, 0x6a, 0xa2, 0xf6, 0x75, 0x3e, 0x18, 0x91, 0xd3, 0xe9, 0xec, 0x1c, + 0xfa, 0x86, 0xf5, 0x14, 0x93, 0x93, 0xf4, 0x09, 0xd3, 0x7a, 0xdf, 0x8a, 0xf3, 0x62, 0x09, 0x72, + 0x61, 0xbb, 0x47, 0x19, 0x60, 0x96, 0x2f, 0xc5, 0x48, 0x11, 0xb4, 0xb2, 0x59, 0x21, 0xe5, 0xcb, + 0xab, 0x55, 0x29, 0x4e, 0xca, 0xa8, 0xb5, 0xda, 0x56, 0x55, 0x91, 0xb7, 0x37, 0xb6, 0x6a, 0xeb, + 0x55, 0x29, 0x11, 0x2a, 0xec, 0xaf, 0x27, 0xd3, 0x8f, 0x4a, 0x67, 0x48, 0xd5, 0x90, 0x8f, 0xee, + 0xd4, 0xd0, 0x87, 0xe0, 0x94, 0x38, 0x56, 0x71, 0xb1, 0xa7, 0xdc, 0xd6, 0x1d, 0xea, 0x90, 0x6d, + 0x95, 0x25, 0x47, 0xdf, 0x7e, 0x66, 0x39, 0x55, 0x03, 0x7b, 0x2f, 0xe9, 0x0e, 0x71, 0xb7, 0xb6, + 0xea, 0xa1, 0x35, 0x58, 0x30, 0x2d, 0xc5, 0xf5, 0x54, 0xb3, 0xa9, 0x3a, 0x4d, 0x25, 0x38, 0xd0, + 0x52, 0x54, 0x4d, 0xc3, 0xae, 0x6b, 0xb1, 0x44, 0xe8, 0xa3, 0xdc, 0x6f, 0x5a, 0x0d, 0x4e, 0x1c, + 0x64, 0x88, 0x32, 0x27, 0xed, 0x32, 0xdf, 0xc4, 0x20, 0xf3, 0xbd, 0x0f, 0x32, 0x6d, 0xd5, 0x56, + 0xb0, 0xe9, 0x39, 0x87, 0xb4, 0x3e, 0x4f, 0xcb, 0xe9, 0xb6, 0x6a, 0x57, 0x49, 0xfb, 0x03, 0xd9, + 0x26, 0x5d, 0x4f, 0xa6, 0x93, 0xd2, 0xf8, 0xf5, 0x64, 0x7a, 0x5c, 0x4a, 0x5d, 0x4f, 0xa6, 0x53, + 0xd2, 0xc4, 0xf5, 0x64, 0x3a, 0x2d, 0x65, 0xae, 0x27, 0xd3, 0x19, 0x09, 0x8a, 0x6f, 0x27, 0x20, + 0x17, 0xae, 0xe0, 0xc9, 0x86, 0x48, 0xa3, 0x39, 0x2c, 0x46, 0xa3, 0xdc, 0x43, 0x47, 0xd6, 0xfb, + 0x4b, 0x2b, 0x24, 0xb9, 0x95, 0x52, 0xac, 0x5c, 0x96, 0x19, 0x27, 0x29, 0x2c, 0x88, 0xf9, 0x61, + 0x56, 0x9e, 0xa4, 0x65, 0xde, 0x42, 0xab, 0x90, 0x7a, 0xcd, 0xa5, 0xd8, 0x29, 0x8a, 0xfd, 0xf0, + 0xd1, 0xd8, 0xd7, 0x1b, 0x14, 0x3c, 0x73, 0xbd, 0xa1, 0x6c, 0x6c, 0xca, 0xeb, 0xe5, 0x35, 0x99, + 0xb3, 0xa3, 0xd3, 0x90, 0x34, 0xd4, 0xd7, 0x0f, 0xa3, 0x69, 0x90, 0x76, 0x8d, 0xba, 0x2c, 0xa7, + 0x21, 0x79, 0x1b, 0xab, 0xfb, 0xd1, 0xe4, 0x43, 0xbb, 0xde, 0x47, 0xf7, 0x38, 0x07, 0xe3, 0x54, + 0x5f, 0x08, 0x80, 0x6b, 0x4c, 0x1a, 0x43, 0x69, 0x48, 0xae, 0x6c, 0xca, 0xc4, 0x45, 0x24, 0xc8, + 0xb1, 0x5e, 0xa5, 0x5e, 0xab, 0xae, 0x54, 0xa5, 0x78, 0xf1, 0x02, 0xa4, 0x98, 0x12, 0x88, 0xfb, + 0xf8, 0x6a, 0x90, 0xc6, 0x78, 0x93, 0x63, 0xc4, 0xc4, 0xe8, 0xf6, 0xfa, 0x72, 0x55, 0x96, 0xe2, + 0x3d, 0x8b, 0x5f, 0x74, 0x21, 0x17, 0xae, 0xcc, 0x3f, 0x98, 0xed, 0xf9, 0xd7, 0x63, 0x90, 0x0d, + 0x55, 0xda, 0xa4, 0x44, 0x52, 0x0d, 0xc3, 0xba, 0xad, 0xa8, 0x86, 0xae, 0xba, 0xdc, 0x34, 0x80, + 0x76, 0x95, 0x49, 0xcf, 0xa8, 0x4b, 0xf7, 0x01, 0x39, 0xcd, 0xb8, 0x94, 0x2a, 0x7e, 0x2e, 0x06, + 0x52, 0x77, 0xa9, 0xdb, 0x25, 0x66, 0xec, 0x0f, 0x53, 0xcc, 0xe2, 0x67, 0x63, 0x90, 0x8f, 0xd6, + 0xb7, 0x5d, 0xe2, 0x3d, 0xf8, 0x87, 0x2a, 0xde, 0xef, 0xc6, 0x61, 0x32, 0x52, 0xd5, 0x8e, 0x2a, + 0xdd, 0xc7, 0x60, 0x5a, 0x6f, 0xe2, 0xb6, 0x6d, 0x79, 0xd8, 0xd4, 0x0e, 0x15, 0x03, 0xdf, 0xc2, + 0x46, 0xa1, 0x48, 0x83, 0xc6, 0xb9, 0xa3, 0xeb, 0xe6, 0xa5, 0x5a, 0xc0, 0xb7, 0x46, 0xd8, 0x4a, + 0x33, 0xb5, 0x4a, 0x75, 0xbd, 0xbe, 0xb9, 0x55, 0xdd, 0x58, 0x79, 0x45, 0xd9, 0xde, 0xb8, 0xb1, + 0xb1, 0xf9, 0xd2, 0x86, 0x2c, 0xe9, 0x5d, 0x64, 0xef, 0xa3, 0xdb, 0xd7, 0x41, 0xea, 0x16, 0x0a, + 0x9d, 0x82, 0x7e, 0x62, 0x49, 0x63, 0x68, 0x06, 0xa6, 0x36, 0x36, 0x95, 0x46, 0xad, 0x52, 0x55, + 0xaa, 0x57, 0xaf, 0x56, 0x57, 0xb6, 0x1a, 0xec, 0x24, 0xc4, 0xa7, 0xde, 0x8a, 0x38, 0x78, 0xf1, + 0x33, 0x09, 0x98, 0xe9, 0x23, 0x09, 0x2a, 0xf3, 0x3d, 0x0c, 0xdb, 0x56, 0x3d, 0x35, 0x8a, 0xf4, + 0x4b, 0xa4, 0x8a, 0xa8, 0xab, 0x8e, 0xc7, 0xb7, 0x3c, 0x8f, 0x01, 0xd1, 0x92, 0xe9, 0xe9, 0xbb, + 0x3a, 0x76, 0xf8, 0x09, 0x13, 0xdb, 0xd8, 0x4c, 0x05, 0xfd, 0xec, 0x90, 0xe9, 0x49, 0x40, 0xb6, + 0xe5, 0xea, 0x9e, 0x7e, 0x0b, 0x2b, 0xba, 0x29, 0x8e, 0xa3, 0xc8, 0x46, 0x27, 0x29, 0x4b, 0x62, + 0xa4, 0x66, 0x7a, 0x3e, 0xb5, 0x89, 0x5b, 0x6a, 0x17, 0x35, 0x09, 0xe6, 0x09, 0x59, 0x12, 0x23, + 0x3e, 0xf5, 0x83, 0x90, 0x6b, 0x5a, 0x1d, 0x52, 0xfd, 0x31, 0x3a, 0x92, 0x3b, 0x62, 0x72, 0x96, + 0xf5, 0xf9, 0x24, 0xbc, 0xae, 0x0f, 0xce, 0xc1, 0x72, 0x72, 0x96, 0xf5, 0x31, 0x92, 0x33, 0x30, + 0xa5, 0xb6, 0x5a, 0x0e, 0x01, 0x17, 0x40, 0x6c, 0xa7, 0x92, 0xf7, 0xbb, 0x29, 0xe1, 0xdc, 0x75, + 0x48, 0x0b, 0x3d, 0x90, 0xe4, 0x4d, 0x34, 0xa1, 0xd8, 0x6c, 0xfb, 0x1d, 0x3f, 0x9b, 0x91, 0xd3, + 0xa6, 0x18, 0x7c, 0x10, 0x72, 0xba, 0xab, 0x04, 0xc7, 0xfa, 0xf1, 0xc5, 0xf8, 0xd9, 0xb4, 0x9c, + 0xd5, 0x5d, 0xff, 0x48, 0xb4, 0xf8, 0xc5, 0x38, 0xe4, 0xa3, 0xd7, 0x12, 0xa8, 0x02, 0x69, 0xc3, + 0xd2, 0x54, 0x6a, 0x5a, 0xec, 0x4e, 0xec, 0xec, 0x90, 0x9b, 0x8c, 0xa5, 0x35, 0x4e, 0x2f, 0xfb, + 0x9c, 0x73, 0xff, 0x3a, 0x06, 0x69, 0xd1, 0x8d, 0x4e, 0x42, 0xd2, 0x56, 0xbd, 0x3d, 0x0a, 0x37, + 0xbe, 0x1c, 0x97, 0x62, 0x32, 0x6d, 0x93, 0x7e, 0xd7, 0x56, 0x4d, 0x6a, 0x02, 0xbc, 0x9f, 0xb4, + 0xc9, 0xba, 0x1a, 0x58, 0x6d, 0xd2, 0x6d, 0x90, 0xd5, 0x6e, 0x63, 0xd3, 0x73, 0xc5, 0xba, 0xf2, + 0xfe, 0x15, 0xde, 0x8d, 0x9e, 0x80, 0x69, 0xcf, 0x51, 0x75, 0x23, 0x42, 0x9b, 0xa4, 0xb4, 0x92, + 0x18, 0xf0, 0x89, 0x4b, 0x70, 0x5a, 0xe0, 0x36, 0xb1, 0xa7, 0x6a, 0x7b, 0xb8, 0x19, 0x30, 0xa5, + 0xe8, 0x71, 0xc7, 0x29, 0x4e, 0x50, 0xe1, 0xe3, 0x82, 0xb7, 0xf8, 0x1b, 0x31, 0x98, 0x16, 0x1b, + 0xb7, 0xa6, 0xaf, 0xac, 0x75, 0x00, 0xd5, 0x34, 0x2d, 0x2f, 0xac, 0xae, 0x5e, 0x53, 0xee, 0xe1, + 0x5b, 0x2a, 0xfb, 0x4c, 0x72, 0x08, 0x60, 0xae, 0x0d, 0x10, 0x8c, 0x0c, 0x54, 0xdb, 0x02, 0x64, + 0xf9, 0x9d, 0x13, 0xbd, 0xb8, 0x64, 0x5b, 0x7d, 0x60, 0x5d, 0x64, 0x87, 0x87, 0x66, 0x61, 0x7c, + 0x07, 0xb7, 0x74, 0x93, 0x9f, 0x24, 0xb3, 0x86, 0x38, 0x90, 0x49, 0xfa, 0x07, 0x32, 0xcb, 0x7f, + 0x12, 0x66, 0x34, 0xab, 0xdd, 0x2d, 0xee, 0xb2, 0xd4, 0x75, 0xdc, 0xe0, 0x5e, 0x8b, 0xbd, 0xfa, + 0x14, 0x27, 0x6a, 0x59, 0x86, 0x6a, 0xb6, 0x96, 0x2c, 0xa7, 0x15, 0x5c, 0xbc, 0x92, 0x8a, 0xc7, + 0x0d, 0x5d, 0xbf, 0xda, 0x3b, 0xff, 0x37, 0x16, 0xfb, 0x85, 0x78, 0x62, 0xb5, 0xbe, 0xfc, 0xa5, + 0xf8, 0xdc, 0x2a, 0x63, 0xac, 0x0b, 0x65, 0xc8, 0x78, 0xd7, 0xc0, 0x1a, 0x99, 0x20, 0x7c, 0xf7, + 0x09, 0x98, 0x6d, 0x59, 0x2d, 0x8b, 0x22, 0x9d, 0x23, 0x7f, 0xf1, 0x9b, 0xdb, 0x8c, 0xdf, 0x3b, + 0x37, 0xf4, 0x9a, 0xb7, 0xb4, 0x01, 0x33, 0x9c, 0x58, 0xa1, 0x57, 0x47, 0x6c, 0x63, 0x83, 0x8e, + 0x3c, 0x55, 0x2b, 0xfc, 0xf2, 0x77, 0x68, 0xfa, 0x96, 0xa7, 0x39, 0x2b, 0x19, 0x63, 0x7b, 0x9f, + 0x92, 0x0c, 0x27, 0x22, 0x78, 0xcc, 0x49, 0xb1, 0x33, 0x04, 0xf1, 0x9f, 0x73, 0xc4, 0x99, 0x10, + 0x62, 0x83, 0xb3, 0x96, 0x56, 0x60, 0xf2, 0x38, 0x58, 0xff, 0x82, 0x63, 0xe5, 0x70, 0x18, 0x64, + 0x15, 0xa6, 0x28, 0x88, 0xd6, 0x71, 0x3d, 0xab, 0x4d, 0x23, 0xe0, 0xd1, 0x30, 0xff, 0xf2, 0x3b, + 0xcc, 0x6b, 0xf2, 0x84, 0x6d, 0xc5, 0xe7, 0x2a, 0x95, 0x80, 0xde, 0x96, 0x35, 0xb1, 0x66, 0x0c, + 0x41, 0xf8, 0x06, 0x17, 0xc4, 0xa7, 0x2f, 0xdd, 0x84, 0x59, 0xf2, 0x37, 0x0d, 0x50, 0x61, 0x49, + 0x86, 0x1f, 0xc1, 0x15, 0x7e, 0xe3, 0xe3, 0xcc, 0x31, 0x67, 0x7c, 0x80, 0x90, 0x4c, 0xa1, 0x55, + 0x6c, 0x61, 0xcf, 0xc3, 0x8e, 0xab, 0xa8, 0x46, 0x3f, 0xf1, 0x42, 0x67, 0x18, 0x85, 0x9f, 0xfb, + 0x5e, 0x74, 0x15, 0x57, 0x19, 0x67, 0xd9, 0x30, 0x4a, 0xdb, 0x70, 0xaa, 0x8f, 0x55, 0x8c, 0x80, + 0xf9, 0x19, 0x8e, 0x39, 0xdb, 0x63, 0x19, 0x04, 0xb6, 0x0e, 0xa2, 0xdf, 0x5f, 0xcb, 0x11, 0x30, + 0x7f, 0x9e, 0x63, 0x22, 0xce, 0x2b, 0x96, 0x94, 0x20, 0x5e, 0x87, 0xe9, 0x5b, 0xd8, 0xd9, 0xb1, + 0x5c, 0x7e, 0x6e, 0x34, 0x02, 0xdc, 0x67, 0x39, 0xdc, 0x14, 0x67, 0xa4, 0x07, 0x49, 0x04, 0xeb, + 0x32, 0xa4, 0x77, 0x55, 0x0d, 0x8f, 0x00, 0x71, 0x97, 0x43, 0x4c, 0x10, 0x7a, 0xc2, 0x5a, 0x86, + 0x5c, 0xcb, 0xe2, 0x39, 0x6a, 0x38, 0xfb, 0xe7, 0x38, 0x7b, 0x56, 0xf0, 0x70, 0x08, 0xdb, 0xb2, + 0x3b, 0x06, 0x49, 0x60, 0xc3, 0x21, 0xfe, 0x8a, 0x80, 0x10, 0x3c, 0x1c, 0xe2, 0x18, 0x6a, 0x7d, + 0x53, 0x40, 0xb8, 0x21, 0x7d, 0xbe, 0x00, 0x59, 0xcb, 0x34, 0x0e, 0x2d, 0x73, 0x14, 0x21, 0x3e, + 0xcf, 0x11, 0x80, 0xb3, 0x10, 0x80, 0x2b, 0x90, 0x19, 0x75, 0x21, 0xfe, 0xea, 0xf7, 0x84, 0x7b, + 0x88, 0x15, 0x58, 0x85, 0x29, 0x11, 0xa0, 0x74, 0xcb, 0x1c, 0x01, 0xe2, 0xaf, 0x71, 0x88, 0x7c, + 0x88, 0x8d, 0x4f, 0xc3, 0xc3, 0xae, 0xd7, 0xc2, 0xa3, 0x80, 0x7c, 0x51, 0x4c, 0x83, 0xb3, 0x70, + 0x55, 0xee, 0x60, 0x53, 0xdb, 0x1b, 0x0d, 0xe1, 0x97, 0x84, 0x2a, 0x05, 0x0f, 0x81, 0x58, 0x81, + 0xc9, 0xb6, 0xea, 0xb8, 0x7b, 0xaa, 0x31, 0xd2, 0x72, 0xfc, 0x75, 0x8e, 0x91, 0xf3, 0x99, 0xb8, + 0x46, 0x3a, 0xe6, 0x71, 0x60, 0xbe, 0x24, 0x34, 0x12, 0x62, 0xe3, 0xae, 0xe7, 0x7a, 0xf4, 0x90, + 0xed, 0x38, 0x68, 0x7f, 0x43, 0xb8, 0x1e, 0xe3, 0x5d, 0x0f, 0x23, 0x5e, 0x81, 0x8c, 0xab, 0xbf, + 0x3e, 0x12, 0xcc, 0x97, 0xc5, 0x4a, 0x53, 0x06, 0xc2, 0xfc, 0x0a, 0x9c, 0xee, 0x9b, 0x26, 0x46, + 0x00, 0xfb, 0x9b, 0x1c, 0xec, 0x64, 0x9f, 0x54, 0xc1, 0x43, 0xc2, 0x71, 0x21, 0xff, 0x96, 0x08, + 0x09, 0xb8, 0x0b, 0xab, 0x4e, 0x76, 0x0d, 0xae, 0xba, 0x7b, 0x3c, 0xad, 0xfd, 0x6d, 0xa1, 0x35, + 0xc6, 0x1b, 0xd1, 0xda, 0x16, 0x9c, 0xe4, 0x88, 0xc7, 0x5b, 0xd7, 0xbf, 0x23, 0x02, 0x2b, 0xe3, + 0xde, 0x8e, 0xae, 0xee, 0x8f, 0xc1, 0x9c, 0xaf, 0x4e, 0x51, 0x9e, 0xba, 0x4a, 0x5b, 0xb5, 0x47, + 0x40, 0xfe, 0x65, 0x8e, 0x2c, 0x22, 0xbe, 0x5f, 0xdf, 0xba, 0xeb, 0xaa, 0x4d, 0xc0, 0x5f, 0x86, + 0x82, 0x00, 0xef, 0x98, 0x0e, 0xd6, 0xac, 0x96, 0xa9, 0xbf, 0x8e, 0x9b, 0x23, 0x40, 0xff, 0x4a, + 0xd7, 0x52, 0x6d, 0x87, 0xd8, 0x09, 0x72, 0x0d, 0x24, 0xbf, 0x56, 0x51, 0xf4, 0xb6, 0x6d, 0x39, + 0xde, 0x10, 0xc4, 0xaf, 0x88, 0x95, 0xf2, 0xf9, 0x6a, 0x94, 0xad, 0x54, 0x05, 0x76, 0xf3, 0x3c, + 0xaa, 0x49, 0x7e, 0x95, 0x03, 0x4d, 0x06, 0x5c, 0x3c, 0x70, 0x68, 0x56, 0xdb, 0x56, 0x9d, 0x51, + 0xe2, 0xdf, 0xdf, 0x15, 0x81, 0x83, 0xb3, 0xf0, 0xc0, 0x41, 0x2a, 0x3a, 0x92, 0xed, 0x47, 0x40, + 0xf8, 0x9a, 0x08, 0x1c, 0x82, 0x87, 0x43, 0x88, 0x82, 0x61, 0x04, 0x88, 0xbf, 0x27, 0x20, 0x04, + 0x0f, 0x81, 0x78, 0x31, 0x48, 0xb4, 0x0e, 0x6e, 0xe9, 0xae, 0xe7, 0xb0, 0xa2, 0xf8, 0x68, 0xa8, + 0xbf, 0xff, 0xbd, 0x68, 0x11, 0x26, 0x87, 0x58, 0x49, 0x24, 0xe2, 0xc7, 0xae, 0x74, 0xcf, 0x34, + 0x5c, 0xb0, 0x5f, 0x15, 0x91, 0x28, 0xc4, 0x46, 0x64, 0x0b, 0x55, 0x88, 0x44, 0xed, 0x1a, 0xd9, + 0x29, 0x8c, 0x00, 0xf7, 0x0f, 0xba, 0x84, 0x6b, 0x08, 0x5e, 0x82, 0x19, 0xaa, 0x7f, 0x3a, 0xe6, + 0x3e, 0x3e, 0x1c, 0xc9, 0x3a, 0x7f, 0xad, 0xab, 0xfe, 0xd9, 0x66, 0x9c, 0x2c, 0x86, 0x4c, 0x75, + 0xd5, 0x53, 0x68, 0xd8, 0x7b, 0x46, 0x85, 0x9f, 0x7c, 0x97, 0xcf, 0x37, 0x5a, 0x4e, 0x95, 0xd6, + 0x88, 0x91, 0x47, 0x8b, 0x9e, 0xe1, 0x60, 0x1f, 0x7f, 0xd7, 0xb7, 0xf3, 0x48, 0xcd, 0x53, 0xba, + 0x0a, 0x93, 0x91, 0x82, 0x67, 0x38, 0xd4, 0x9f, 0xe2, 0x50, 0xb9, 0x70, 0xbd, 0x53, 0xba, 0x00, + 0x49, 0x52, 0xbc, 0x0c, 0x67, 0xff, 0xd3, 0x9c, 0x9d, 0x92, 0x97, 0x3e, 0x0c, 0x69, 0x51, 0xb4, + 0x0c, 0x67, 0xfd, 0x33, 0x9c, 0xd5, 0x67, 0x21, 0xec, 0xa2, 0x60, 0x19, 0xce, 0xfe, 0x67, 0x05, + 0xbb, 0x60, 0x21, 0xec, 0xa3, 0xab, 0xf0, 0xeb, 0x7f, 0x2e, 0xc9, 0x93, 0x8e, 0xd0, 0xdd, 0x15, + 0x98, 0xe0, 0x95, 0xca, 0x70, 0xee, 0x4f, 0xf2, 0x87, 0x0b, 0x8e, 0xd2, 0x25, 0x18, 0x1f, 0x51, + 0xe1, 0x7f, 0x9e, 0xb3, 0x32, 0xfa, 0xd2, 0x0a, 0x64, 0x43, 0xd5, 0xc9, 0x70, 0xf6, 0x9f, 0xe2, + 0xec, 0x61, 0x2e, 0x22, 0x3a, 0xaf, 0x4e, 0x86, 0x03, 0xfc, 0x05, 0x21, 0x3a, 0xe7, 0x20, 0x6a, + 0x13, 0x85, 0xc9, 0x70, 0xee, 0x4f, 0x09, 0xad, 0x0b, 0x96, 0xd2, 0x0b, 0x90, 0xf1, 0x93, 0xcd, + 0x70, 0xfe, 0x9f, 0xe6, 0xfc, 0x01, 0x0f, 0xd1, 0x40, 0x28, 0xd9, 0x0d, 0x87, 0xf8, 0x8b, 0x42, + 0x03, 0x21, 0x2e, 0xe2, 0x46, 0xdd, 0x05, 0xcc, 0x70, 0xa4, 0x9f, 0x11, 0x6e, 0xd4, 0x55, 0xbf, + 0x90, 0xd5, 0xa4, 0x31, 0x7f, 0x38, 0xc4, 0x5f, 0x12, 0xab, 0x49, 0xe9, 0x89, 0x18, 0xdd, 0x15, + 0xc1, 0x70, 0x8c, 0x9f, 0x15, 0x62, 0x74, 0x15, 0x04, 0xa5, 0x3a, 0xa0, 0xde, 0x6a, 0x60, 0x38, + 0xde, 0xa7, 0x39, 0xde, 0x74, 0x4f, 0x31, 0x50, 0x7a, 0x09, 0x4e, 0xf6, 0xaf, 0x04, 0x86, 0xa3, + 0xfe, 0xdc, 0xbb, 0x5d, 0x7b, 0xb7, 0x70, 0x21, 0x50, 0xda, 0x0a, 0x52, 0x4a, 0xb8, 0x0a, 0x18, + 0x0e, 0xfb, 0x99, 0x77, 0xa3, 0x81, 0x3b, 0x5c, 0x04, 0x94, 0xca, 0x00, 0x41, 0x02, 0x1e, 0x8e, + 0xf5, 0x59, 0x8e, 0x15, 0x62, 0x22, 0xae, 0xc1, 0xf3, 0xef, 0x70, 0xfe, 0xbb, 0xc2, 0x35, 0x38, + 0x07, 0x71, 0x0d, 0x91, 0x7a, 0x87, 0x73, 0x7f, 0x4e, 0xb8, 0x86, 0x60, 0x21, 0x96, 0x1d, 0xca, + 0x6e, 0xc3, 0x11, 0x3e, 0x2f, 0x2c, 0x3b, 0xc4, 0x55, 0xda, 0x80, 0xe9, 0x9e, 0x84, 0x38, 0x1c, + 0xea, 0x17, 0x38, 0x94, 0xd4, 0x9d, 0x0f, 0xc3, 0xc9, 0x8b, 0x27, 0xc3, 0xe1, 0x68, 0x5f, 0xe8, + 0x4a, 0x5e, 0x3c, 0x17, 0x96, 0xae, 0x40, 0xda, 0xec, 0x18, 0x06, 0x71, 0x1e, 0x74, 0xf4, 0xbb, + 0x81, 0x85, 0xff, 0xfa, 0x03, 0xae, 0x1d, 0xc1, 0x50, 0xba, 0x00, 0xe3, 0xb8, 0xbd, 0x83, 0x9b, + 0xc3, 0x38, 0xbf, 0xfb, 0x03, 0x11, 0x30, 0x09, 0x75, 0xe9, 0x05, 0x00, 0x76, 0x34, 0x42, 0x2f, + 0x03, 0x87, 0xf0, 0xfe, 0xb7, 0x1f, 0xf0, 0x97, 0x71, 0x02, 0x96, 0x00, 0x80, 0xbd, 0xda, 0x73, + 0x34, 0xc0, 0xf7, 0xa2, 0x00, 0x74, 0x45, 0x2e, 0xc3, 0xc4, 0x6b, 0xae, 0x65, 0x7a, 0x6a, 0x6b, + 0x18, 0xf7, 0x7f, 0xe7, 0xdc, 0x82, 0x9e, 0x28, 0xac, 0x6d, 0x39, 0xd8, 0x53, 0x5b, 0xee, 0x30, + 0xde, 0xff, 0xc1, 0x79, 0x7d, 0x06, 0xc2, 0xac, 0xa9, 0xae, 0x37, 0xca, 0xbc, 0xff, 0xa7, 0x60, + 0x16, 0x0c, 0x44, 0x68, 0xf2, 0xf7, 0x3e, 0x3e, 0x1c, 0xc6, 0xfb, 0x7b, 0x42, 0x68, 0x4e, 0x5f, + 0xfa, 0x30, 0x64, 0xc8, 0x9f, 0xec, 0x0d, 0xbb, 0x21, 0xcc, 0xff, 0x8b, 0x33, 0x07, 0x1c, 0xe4, + 0xc9, 0xae, 0xd7, 0xf4, 0xf4, 0xe1, 0xca, 0xfe, 0x3e, 0x5f, 0x69, 0x41, 0x5f, 0x2a, 0x43, 0xd6, + 0xf5, 0x9a, 0xcd, 0x0e, 0xaf, 0x4f, 0x87, 0xb0, 0xff, 0xef, 0x1f, 0xf8, 0x47, 0x16, 0x3e, 0x0f, + 0x59, 0xed, 0xdb, 0xfb, 0x9e, 0x6d, 0xd1, 0x0b, 0x8f, 0x61, 0x08, 0xef, 0x72, 0x84, 0x10, 0x4b, + 0x69, 0x05, 0x72, 0x64, 0x2e, 0x0e, 0xb6, 0x31, 0xbd, 0x9d, 0x1a, 0x02, 0xf1, 0x7f, 0xb8, 0x02, + 0x22, 0x4c, 0xcb, 0x3f, 0xfe, 0x8d, 0xb7, 0xe7, 0x63, 0xdf, 0x7a, 0x7b, 0x3e, 0xf6, 0xbb, 0x6f, + 0xcf, 0xc7, 0x3e, 0xf5, 0xed, 0xf9, 0xb1, 0x6f, 0x7d, 0x7b, 0x7e, 0xec, 0xb7, 0xbf, 0x3d, 0x3f, + 0xd6, 0xff, 0x94, 0x18, 0x56, 0xad, 0x55, 0x8b, 0x9d, 0x0f, 0xbf, 0x5a, 0x6c, 0xe9, 0xde, 0x5e, + 0x67, 0x67, 0x49, 0xb3, 0xda, 0xf4, 0x18, 0x37, 0x38, 0xad, 0xf5, 0x37, 0x39, 0xf0, 0xc3, 0x18, + 0xd9, 0x30, 0x47, 0xcf, 0x72, 0x55, 0xf3, 0x70, 0xd0, 0xb7, 0x3a, 0x17, 0x21, 0x51, 0x36, 0x0f, + 0xd1, 0x69, 0x16, 0xdd, 0x94, 0x8e, 0x63, 0xf0, 0x77, 0xbc, 0x26, 0x48, 0x7b, 0xdb, 0x31, 0xd0, + 0x6c, 0xf0, 0x22, 0x66, 0xec, 0x6c, 0x8e, 0xbf, 0x5d, 0xb9, 0xfc, 0x53, 0xb1, 0xe3, 0x4d, 0x23, + 0x5d, 0x36, 0x0f, 0xe9, 0x2c, 0xea, 0xb1, 0x57, 0x9f, 0x1c, 0x7a, 0xc8, 0xbd, 0x6f, 0x5a, 0xb7, + 0x4d, 0x22, 0xb6, 0xbd, 0x23, 0x0e, 0xb8, 0xe7, 0xbb, 0x0f, 0xb8, 0x5f, 0xc2, 0x86, 0x71, 0x83, + 0xd0, 0x6d, 0x11, 0x96, 0x9d, 0x14, 0x7b, 0x9d, 0x18, 0x7e, 0x26, 0x0e, 0xf3, 0x3d, 0x67, 0xd9, + 0xdc, 0x02, 0x06, 0x29, 0xa1, 0x04, 0xe9, 0x8a, 0x30, 0xac, 0x02, 0x4c, 0xb8, 0x58, 0xb3, 0xcc, + 0xa6, 0x4b, 0x15, 0x91, 0x90, 0x45, 0x93, 0x28, 0xc2, 0x54, 0x4d, 0xcb, 0xe5, 0x6f, 0x49, 0xb2, + 0xc6, 0xf2, 0xcf, 0x1f, 0x53, 0x11, 0x93, 0xe2, 0x49, 0x42, 0x1b, 0xcf, 0x8c, 0xa8, 0x0d, 0x31, + 0x89, 0xc8, 0xb1, 0xff, 0xa8, 0x5a, 0xf9, 0xd9, 0x38, 0x2c, 0x74, 0x6b, 0x85, 0xb8, 0x95, 0xeb, + 0xa9, 0x6d, 0x7b, 0x90, 0x5a, 0xae, 0x40, 0x66, 0x4b, 0xd0, 0x1c, 0x5b, 0x2f, 0x77, 0x8f, 0xa9, + 0x97, 0xbc, 0xff, 0x28, 0xa1, 0x98, 0xf3, 0x23, 0x2a, 0xc6, 0x9f, 0xc7, 0x7b, 0xd2, 0xcc, 0xff, + 0x4b, 0xc1, 0x69, 0xcd, 0x72, 0xdb, 0x96, 0xab, 0xb0, 0xfb, 0x11, 0xd6, 0xe0, 0x3a, 0xc9, 0x85, + 0x87, 0x86, 0x5f, 0x92, 0x14, 0x6f, 0xc0, 0x4c, 0x8d, 0x84, 0x0a, 0xb2, 0x05, 0x0a, 0xae, 0x77, + 0xfa, 0xbe, 0x48, 0xba, 0x18, 0xa9, 0xf6, 0xf9, 0xf5, 0x52, 0xb8, 0xab, 0xf8, 0x93, 0x31, 0x90, + 0x1a, 0x9a, 0x6a, 0xa8, 0xce, 0x1f, 0x14, 0x0a, 0x5d, 0x02, 0xa0, 0x1f, 0x20, 0x05, 0x5f, 0x0c, + 0xe5, 0xcf, 0x17, 0x96, 0xc2, 0x93, 0x5b, 0x62, 0x4f, 0xa2, 0x9f, 0x23, 0x64, 0x28, 0x2d, 0xf9, + 0xf3, 0xf1, 0x97, 0x01, 0x82, 0x01, 0x74, 0x1f, 0x9c, 0x6a, 0xac, 0x94, 0xd7, 0xca, 0xb2, 0xc2, + 0xde, 0x6c, 0xdf, 0x68, 0xd4, 0xab, 0x2b, 0xb5, 0xab, 0xb5, 0x6a, 0x45, 0x1a, 0x43, 0x27, 0x01, + 0x85, 0x07, 0xfd, 0x97, 0x52, 0x4e, 0xc0, 0x74, 0xb8, 0x9f, 0xbd, 0x1e, 0x1f, 0x27, 0x65, 0xa2, + 0xde, 0xb6, 0x0d, 0x4c, 0xef, 0xfd, 0x14, 0x5d, 0x68, 0x6d, 0x78, 0x05, 0xf2, 0xeb, 0xff, 0x86, + 0xbd, 0x32, 0x3d, 0x13, 0xb0, 0xfb, 0x3a, 0x2f, 0xad, 0xc1, 0xb4, 0xaa, 0x69, 0xd8, 0x8e, 0x40, + 0x0e, 0x89, 0xd3, 0x04, 0x90, 0xde, 0x64, 0x72, 0xce, 0x00, 0xed, 0x12, 0xa4, 0x5c, 0x3a, 0xfb, + 0x61, 0x10, 0xdf, 0xe4, 0x10, 0x9c, 0xbc, 0x64, 0xc2, 0x34, 0x29, 0xfb, 0x54, 0x07, 0x87, 0xc4, + 0x38, 0xfa, 0x90, 0xe1, 0x1f, 0x7e, 0xe5, 0x69, 0x7a, 0xaf, 0xf9, 0x60, 0x74, 0x59, 0xfa, 0x98, + 0x93, 0x2c, 0x71, 0xec, 0x40, 0x50, 0x0c, 0x79, 0xf1, 0x3c, 0x2e, 0xf0, 0xd1, 0x0f, 0xfb, 0x47, + 0xfc, 0x61, 0xf3, 0xfd, 0x6c, 0x20, 0xf4, 0xa4, 0x49, 0x8e, 0xca, 0x06, 0x96, 0xab, 0x83, 0x7c, + 0xfa, 0xd5, 0x27, 0x42, 0xa9, 0x89, 0x41, 0xf2, 0x7f, 0x9e, 0xa2, 0xc8, 0x57, 0xc2, 0x8f, 0xf1, + 0x7d, 0xef, 0xb7, 0x12, 0x30, 0xcf, 0x89, 0x77, 0x54, 0x17, 0x9f, 0xbb, 0xf5, 0xcc, 0x0e, 0xf6, + 0xd4, 0x67, 0xce, 0x69, 0x96, 0x2e, 0x62, 0xf5, 0x0c, 0x77, 0x47, 0x32, 0xbe, 0xc4, 0xc7, 0xe7, + 0xfa, 0xde, 0x66, 0xce, 0x0d, 0x76, 0xe3, 0xe2, 0x36, 0x24, 0x57, 0x2c, 0xdd, 0x24, 0xa1, 0xaa, + 0x89, 0x4d, 0xab, 0xcd, 0xbd, 0x87, 0x35, 0xd0, 0x33, 0x90, 0x52, 0xdb, 0x56, 0xc7, 0xf4, 0x98, + 0xe7, 0x2c, 0x9f, 0xfe, 0xc6, 0x5b, 0x0b, 0x63, 0xff, 0xf6, 0xad, 0x85, 0x44, 0xcd, 0xf4, 0x7e, + 0xf3, 0xab, 0x4f, 0x01, 0x87, 0xaa, 0x99, 0x9e, 0xcc, 0x09, 0x4b, 0xc9, 0x77, 0xde, 0x5c, 0x88, + 0x15, 0x5f, 0x86, 0x89, 0x0a, 0xd6, 0xde, 0x0b, 0x72, 0x05, 0x6b, 0x21, 0xe4, 0x0a, 0xd6, 0xba, + 0x90, 0x2f, 0x41, 0xba, 0x66, 0x7a, 0xec, 0x2d, 0xf4, 0x27, 0x20, 0xa1, 0x9b, 0xec, 0xc5, 0xc6, + 0x23, 0x65, 0x23, 0x54, 0x84, 0xb1, 0x82, 0x35, 0x9f, 0xb1, 0x89, 0xb5, 0x6e, 0xc6, 0xde, 0x47, + 0x13, 0xaa, 0xe5, 0xca, 0x6f, 0xff, 0xa7, 0xf9, 0xb1, 0x37, 0xde, 0x9e, 0x1f, 0x1b, 0xb8, 0xc4, + 0xc5, 0x81, 0x4b, 0xec, 0x36, 0xf7, 0x59, 0x44, 0xf6, 0x57, 0xf6, 0x4b, 0x49, 0x78, 0x80, 0x7e, + 0x9c, 0xe4, 0xb4, 0x75, 0xd3, 0x3b, 0xa7, 0x39, 0x87, 0xb6, 0x47, 0xcb, 0x15, 0x6b, 0x97, 0x2f, + 0xec, 0x74, 0x30, 0xbc, 0xc4, 0x86, 0xfb, 0x2f, 0x6b, 0x71, 0x17, 0xc6, 0xeb, 0x84, 0x8f, 0xa8, + 0xd8, 0xb3, 0x3c, 0xd5, 0xe0, 0xf9, 0x87, 0x35, 0x48, 0x2f, 0xfb, 0xa0, 0x29, 0xce, 0x7a, 0x75, + 0xf1, 0x2d, 0x93, 0x81, 0xd5, 0x5d, 0xf6, 0x5e, 0x78, 0x82, 0x16, 0x2e, 0x69, 0xd2, 0x41, 0x5f, + 0x01, 0x9f, 0x85, 0x71, 0xb5, 0xc3, 0x5e, 0x60, 0x48, 0x90, 0x8a, 0x86, 0x36, 0x8a, 0x37, 0x60, + 0x82, 0x5f, 0xa3, 0x22, 0x09, 0x12, 0xfb, 0xf8, 0x90, 0x3e, 0x27, 0x27, 0x93, 0x3f, 0xd1, 0x12, + 0x8c, 0x53, 0xe1, 0xf9, 0x07, 0x2f, 0x85, 0xa5, 0x1e, 0xe9, 0x97, 0xa8, 0x90, 0x32, 0x23, 0x2b, + 0x5e, 0x87, 0x74, 0xc5, 0x6a, 0xeb, 0xa6, 0x15, 0x45, 0xcb, 0x30, 0x34, 0x2a, 0xb3, 0xdd, 0xe1, + 0x56, 0x21, 0xb3, 0x06, 0x3a, 0x09, 0x29, 0xf6, 0x9d, 0x00, 0x7f, 0x09, 0x83, 0xb7, 0x8a, 0x2b, + 0x30, 0x41, 0xb1, 0x37, 0x6d, 0x12, 0xfc, 0xfd, 0x57, 0x32, 0x33, 0xfc, 0xab, 0x31, 0x0e, 0x1f, + 0x0f, 0x84, 0x45, 0x90, 0x6c, 0xaa, 0x9e, 0xca, 0xe7, 0x4d, 0xff, 0x2e, 0x7e, 0x04, 0xd2, 0x1c, + 0xc4, 0x45, 0xe7, 0x21, 0x61, 0xd9, 0x2e, 0x7f, 0x8d, 0x62, 0x6e, 0xd0, 0x54, 0x36, 0xed, 0xe5, + 0x24, 0xb1, 0x19, 0x99, 0x10, 0x2f, 0xcb, 0x03, 0xcd, 0xe2, 0xf9, 0x90, 0x59, 0x84, 0x96, 0x3c, + 0xf4, 0x27, 0x5b, 0xd2, 0x1e, 0x73, 0xf0, 0x8d, 0xe5, 0xf3, 0x71, 0x98, 0x0f, 0x8d, 0xde, 0xc2, + 0x8e, 0xab, 0x5b, 0x26, 0xb3, 0x28, 0x6e, 0x2d, 0x28, 0x24, 0x24, 0x1f, 0x1f, 0x60, 0x2e, 0x1f, + 0x86, 0x44, 0xd9, 0xb6, 0xd1, 0x1c, 0xa4, 0x69, 0x5b, 0xb3, 0x98, 0xbd, 0x24, 0x65, 0xbf, 0x4d, + 0xc6, 0x5c, 0x6b, 0xd7, 0xbb, 0xad, 0x3a, 0xfe, 0xa7, 0x74, 0xa2, 0x5d, 0xbc, 0x0c, 0x99, 0x15, + 0xcb, 0x74, 0xb1, 0xe9, 0x76, 0x68, 0x65, 0xb3, 0x63, 0x58, 0xda, 0x3e, 0x47, 0x60, 0x0d, 0xa2, + 0x70, 0xd5, 0xb6, 0x29, 0x67, 0x52, 0x26, 0x7f, 0x32, 0x9f, 0x5d, 0x6e, 0x0c, 0x54, 0xd1, 0xe5, + 0xe3, 0xab, 0x88, 0x4f, 0xd2, 0xd7, 0xd1, 0x0f, 0x63, 0x70, 0x7f, 0xaf, 0x43, 0xed, 0xe3, 0x43, + 0xf7, 0xb8, 0xfe, 0xf4, 0x32, 0x64, 0xea, 0xf4, 0x7b, 0xf6, 0x1b, 0xf8, 0x10, 0xcd, 0xc1, 0x04, + 0x6e, 0x9e, 0xbf, 0x70, 0xe1, 0x99, 0xcb, 0xcc, 0xda, 0xaf, 0x8d, 0xc9, 0xa2, 0x03, 0xcd, 0x43, + 0xc6, 0xc5, 0x9a, 0x7d, 0xfe, 0xc2, 0xc5, 0xfd, 0x67, 0x98, 0x79, 0x5d, 0x1b, 0x93, 0x83, 0xae, + 0x52, 0x9a, 0xcc, 0xfa, 0x9d, 0xcf, 0x2f, 0xc4, 0x96, 0xc7, 0x21, 0xe1, 0x76, 0xda, 0xef, 0xab, + 0x8d, 0x7c, 0x66, 0x1c, 0x16, 0xc3, 0x9c, 0xb4, 0xfe, 0xbb, 0xa5, 0x1a, 0x7a, 0x53, 0x0d, 0x7e, + 0x89, 0x40, 0x0a, 0xe9, 0x80, 0x52, 0x0c, 0xc8, 0x14, 0x47, 0x6a, 0xb2, 0xf8, 0x2b, 0x31, 0xc8, + 0xdd, 0x14, 0xc8, 0x0d, 0xec, 0xa1, 0x2b, 0x00, 0xfe, 0x93, 0x84, 0xdb, 0xdc, 0xb7, 0xd4, 0xfd, + 0xac, 0x25, 0x9f, 0x47, 0x0e, 0x91, 0xa3, 0x4b, 0xd4, 0x10, 0x6d, 0xcb, 0xe5, 0x9f, 0x57, 0x0d, + 0x61, 0xf5, 0x89, 0xd1, 0x93, 0x80, 0x68, 0x84, 0x53, 0x6e, 0x59, 0x9e, 0x6e, 0xb6, 0x14, 0xdb, + 0xba, 0xcd, 0x3f, 0x5a, 0x4d, 0xc8, 0x12, 0x1d, 0xb9, 0x49, 0x07, 0xea, 0xa4, 0x9f, 0x08, 0x9d, + 0xf1, 0x51, 0x48, 0xb1, 0xae, 0x36, 0x9b, 0x0e, 0x76, 0x5d, 0x1e, 0xc4, 0x44, 0x13, 0x5d, 0x81, + 0x09, 0xbb, 0xb3, 0xa3, 0x88, 0x88, 0x91, 0x3d, 0x7f, 0x7f, 0x3f, 0xff, 0x17, 0xf6, 0xc1, 0x23, + 0x40, 0xca, 0xee, 0xec, 0x10, 0x6b, 0x79, 0x10, 0x72, 0x7d, 0x84, 0xc9, 0xde, 0x0a, 0xe4, 0xa0, + 0x3f, 0xa3, 0xc0, 0x67, 0xa0, 0xd8, 0x8e, 0x6e, 0x39, 0xba, 0x77, 0x48, 0xdf, 0x85, 0x4a, 0xc8, + 0x92, 0x18, 0xa8, 0xf3, 0xfe, 0xe2, 0x3e, 0x4c, 0x35, 0x68, 0x11, 0x17, 0x48, 0x7e, 0x21, 0x90, + 0x2f, 0x36, 0x5c, 0xbe, 0x81, 0x92, 0xc5, 0x7b, 0x24, 0x5b, 0x7e, 0x71, 0xa0, 0x75, 0x5e, 0x3a, + 0xbe, 0x75, 0x46, 0xb3, 0xdd, 0x77, 0x1f, 0x89, 0x38, 0x27, 0x33, 0xce, 0x70, 0xf8, 0x1a, 0xd5, + 0x30, 0x87, 0xed, 0xd1, 0xe6, 0x8e, 0x4e, 0xaa, 0x73, 0x43, 0xc2, 0xe8, 0xdc, 0x50, 0x17, 0x2a, + 0x5e, 0x86, 0xc9, 0xba, 0xea, 0x78, 0x0d, 0xec, 0x5d, 0xc3, 0x6a, 0x13, 0x3b, 0xd1, 0xac, 0x3b, + 0x29, 0xb2, 0x2e, 0x82, 0x24, 0x4d, 0xad, 0x2c, 0xeb, 0xd0, 0xbf, 0x8b, 0x7b, 0x90, 0xa4, 0xef, + 0x43, 0xfa, 0x19, 0x99, 0x73, 0xb0, 0x8c, 0x4c, 0x62, 0xe9, 0xa1, 0x87, 0x5d, 0x71, 0x8c, 0x40, + 0x1b, 0xe8, 0x39, 0x91, 0x57, 0x13, 0x47, 0xe7, 0x55, 0x6e, 0x88, 0x3c, 0xbb, 0x1a, 0x30, 0xb1, + 0x4c, 0x42, 0x71, 0xad, 0xe2, 0x0b, 0x12, 0x0b, 0x04, 0x41, 0xeb, 0x30, 0x65, 0xab, 0x8e, 0x47, + 0x3f, 0x0d, 0xd9, 0xa3, 0xb3, 0xe0, 0xb6, 0xbe, 0xd0, 0xeb, 0x79, 0x91, 0xc9, 0xf2, 0xa7, 0x4c, + 0xda, 0xe1, 0xce, 0xe2, 0x7f, 0x4e, 0x42, 0x8a, 0x2b, 0xe3, 0xc3, 0x30, 0xc1, 0xd5, 0xca, 0xad, + 0xf3, 0x81, 0xa5, 0xde, 0xc4, 0xb4, 0xe4, 0x27, 0x10, 0x8e, 0x27, 0x78, 0xd0, 0xa3, 0x90, 0xd6, + 0xf6, 0x54, 0xdd, 0x54, 0xf4, 0x26, 0x2f, 0x08, 0xb3, 0x6f, 0xbf, 0xb5, 0x30, 0xb1, 0x42, 0xfa, + 0x6a, 0x15, 0x79, 0x82, 0x0e, 0xd6, 0x9a, 0xa4, 0x12, 0xd8, 0xc3, 0x7a, 0x6b, 0xcf, 0xe3, 0x1e, + 0xc6, 0x5b, 0xe8, 0x79, 0x48, 0x12, 0x83, 0xe0, 0x1f, 0x0e, 0xce, 0xf5, 0x54, 0xf8, 0xfe, 0x16, + 0x7a, 0x39, 0x4d, 0x1e, 0xfc, 0xa9, 0xff, 0xb8, 0x10, 0x93, 0x29, 0x07, 0x5a, 0x81, 0x49, 0x43, + 0x75, 0x3d, 0x85, 0x66, 0x30, 0xf2, 0xf8, 0x71, 0x0a, 0x71, 0xba, 0x57, 0x21, 0x5c, 0xb1, 0x5c, + 0xf4, 0x2c, 0xe1, 0x62, 0x5d, 0x4d, 0x74, 0x16, 0x24, 0x0a, 0xa2, 0x59, 0xed, 0xb6, 0xee, 0xb1, + 0xda, 0x2a, 0x45, 0xf5, 0x9e, 0x27, 0xfd, 0x2b, 0xb4, 0x9b, 0x56, 0x58, 0xf7, 0x41, 0x86, 0x7e, + 0xaa, 0x44, 0x49, 0xd8, 0x4b, 0xb8, 0x69, 0xd2, 0x41, 0x07, 0xcf, 0xc0, 0x54, 0x10, 0x1f, 0x19, + 0x49, 0x9a, 0xa1, 0x04, 0xdd, 0x94, 0xf0, 0x69, 0x98, 0x35, 0xf1, 0x01, 0x7d, 0x2d, 0x38, 0x42, + 0x9d, 0xa1, 0xd4, 0x88, 0x8c, 0xdd, 0x8c, 0x72, 0x3c, 0x02, 0x79, 0x4d, 0x28, 0x9f, 0xd1, 0x02, + 0xa5, 0x9d, 0xf4, 0x7b, 0x29, 0xd9, 0x69, 0x48, 0xab, 0xb6, 0xcd, 0x08, 0xb2, 0x3c, 0x3e, 0xda, + 0x36, 0x1d, 0x7a, 0x1c, 0xa6, 0xe9, 0x1c, 0x1d, 0xec, 0x76, 0x0c, 0x8f, 0x83, 0xe4, 0x28, 0xcd, + 0x14, 0x19, 0x90, 0x59, 0x3f, 0xa5, 0x7d, 0x08, 0x26, 0xf1, 0x2d, 0xbd, 0x89, 0x4d, 0x0d, 0x33, + 0xba, 0x49, 0x4a, 0x97, 0x13, 0x9d, 0x94, 0xe8, 0x31, 0xf0, 0xe3, 0x9e, 0x22, 0x62, 0x72, 0x9e, + 0xe1, 0x89, 0xfe, 0x32, 0xeb, 0x2e, 0xbe, 0x15, 0x83, 0x64, 0x45, 0xf5, 0x54, 0x52, 0x61, 0x78, + 0x07, 0x2c, 0xd3, 0xe4, 0x64, 0xf2, 0x27, 0xfa, 0x28, 0xa4, 0x05, 0x2a, 0x77, 0x95, 0xf9, 0xde, + 0xa5, 0xab, 0x72, 0x8a, 0x35, 0xdd, 0xf5, 0xf8, 0xfa, 0xf9, 0x5c, 0xe8, 0x43, 0x90, 0xe6, 0x57, + 0x09, 0xae, 0x6f, 0x3f, 0x3d, 0x08, 0x7c, 0xa7, 0x2d, 0x0c, 0xd7, 0xe7, 0x20, 0x4b, 0x61, 0x39, + 0x7a, 0x4b, 0x37, 0x55, 0x43, 0x71, 0x3f, 0xd6, 0xa1, 0xfb, 0x4c, 0xfd, 0x75, 0xf6, 0xae, 0x76, + 0x52, 0x46, 0x62, 0xac, 0x41, 0x87, 0x1a, 0xfa, 0xeb, 0xd8, 0x77, 0xcc, 0x54, 0x28, 0x42, 0x7c, + 0x2a, 0x0e, 0x27, 0x2a, 0x1d, 0xdb, 0xd0, 0x35, 0xd5, 0xc3, 0x37, 0x2d, 0x0f, 0x0b, 0x89, 0xd1, + 0x53, 0x90, 0xba, 0x65, 0x79, 0x58, 0x51, 0xb9, 0x5f, 0x9d, 0xec, 0x93, 0x23, 0x2d, 0x0f, 0xcb, + 0xe3, 0x84, 0xaa, 0xec, 0x93, 0xef, 0x70, 0xc7, 0x3e, 0x92, 0x7c, 0xf9, 0x78, 0xa9, 0x34, 0x62, + 0x9f, 0x9c, 0x94, 0x25, 0xb0, 0xc0, 0x3e, 0x19, 0xe1, 0x32, 0x64, 0xfc, 0xf8, 0xcc, 0x1d, 0x6a, + 0x34, 0x9f, 0x0c, 0xd8, 0x8a, 0xff, 0x2a, 0x0e, 0xa7, 0xd7, 0x88, 0x73, 0xaf, 0xd0, 0x6f, 0x77, + 0xcb, 0x9e, 0xa7, 0x6a, 0xfb, 0xbe, 0x5a, 0x6a, 0x30, 0xad, 0x59, 0xe6, 0xae, 0xa1, 0x6b, 0x54, + 0xee, 0xa0, 0x18, 0xed, 0xca, 0x8b, 0x6c, 0xca, 0x14, 0x87, 0x3a, 0xab, 0x2c, 0x85, 0xd8, 0x68, + 0x0f, 0x31, 0x56, 0xe2, 0xb7, 0x96, 0xa9, 0xf0, 0xd0, 0xc2, 0x52, 0x64, 0x8e, 0x75, 0x5e, 0x63, + 0x01, 0x66, 0x03, 0x66, 0x77, 0x0e, 0x5f, 0x57, 0x4d, 0x4f, 0x37, 0x71, 0xc8, 0xed, 0xf8, 0x4f, + 0xcc, 0x1c, 0x59, 0xb8, 0xcc, 0xf8, 0x8c, 0x81, 0x4f, 0x0e, 0x50, 0x7c, 0x72, 0x80, 0xe2, 0xef, + 0x85, 0x3e, 0xbf, 0x13, 0x83, 0xb4, 0xaf, 0x3e, 0x15, 0x4e, 0x35, 0x85, 0xb9, 0x29, 0xd4, 0x60, + 0x7c, 0x27, 0x62, 0x4a, 0x3c, 0xd3, 0x3b, 0xa3, 0xbe, 0xf6, 0x79, 0x6d, 0x4c, 0x3e, 0xd1, 0xec, + 0x6b, 0xb8, 0x26, 0xdc, 0x6f, 0x10, 0xd5, 0x29, 0xfc, 0xd3, 0x6c, 0x95, 0x2e, 0x60, 0xf0, 0x1c, + 0x66, 0x9f, 0x4f, 0x0c, 0x58, 0xac, 0x7e, 0x8b, 0x7e, 0x6d, 0x4c, 0x3e, 0x6d, 0x0c, 0x1a, 0xe4, + 0xa5, 0x76, 0x71, 0x0d, 0x72, 0x61, 0x6f, 0x27, 0xde, 0x1d, 0x9a, 0x5a, 0xa2, 0xbf, 0x77, 0xfb, + 0x20, 0x5d, 0xb1, 0x81, 0xec, 0x56, 0x85, 0xe7, 0xa3, 0x8f, 0xc0, 0xa4, 0xf0, 0x7a, 0xc5, 0xd0, + 0x5d, 0x8f, 0xc3, 0x9d, 0x1e, 0x18, 0x2c, 0x64, 0xf1, 0x0b, 0x57, 0x2e, 0x91, 0xa4, 0xf8, 0x51, + 0x98, 0xe0, 0x03, 0xa4, 0x28, 0xf3, 0xbf, 0x55, 0x25, 0x39, 0x87, 0xe5, 0xe8, 0xac, 0xdf, 0x57, + 0x6b, 0xfa, 0x5b, 0xd5, 0x78, 0x68, 0xab, 0xfa, 0x32, 0x9c, 0x24, 0x51, 0xb0, 0x7c, 0x4b, 0xd5, + 0x0d, 0x75, 0x47, 0x37, 0x74, 0xef, 0x90, 0xa7, 0xdf, 0xfb, 0x20, 0xe3, 0x58, 0xb7, 0x15, 0xc7, + 0xb2, 0x3c, 0x11, 0x1d, 0xd3, 0x8e, 0x75, 0x5b, 0x26, 0x6d, 0xf2, 0x34, 0xcd, 0x32, 0x3a, 0x6d, + 0x93, 0x8f, 0xc7, 0xe9, 0x78, 0x96, 0xf5, 0x51, 0x92, 0xe2, 0x3b, 0x71, 0x48, 0x92, 0xd5, 0x43, + 0xcf, 0x86, 0xf6, 0xd1, 0xf9, 0x7e, 0x65, 0x41, 0x43, 0x6f, 0x99, 0xb8, 0xb9, 0xee, 0xb6, 0x42, + 0x3f, 0xcf, 0x12, 0x64, 0xe5, 0x78, 0x24, 0x2b, 0xcf, 0xc2, 0xb8, 0x63, 0x75, 0xcc, 0xa6, 0xf8, + 0x0c, 0x80, 0x36, 0x50, 0x15, 0xd2, 0x7e, 0xb2, 0x4d, 0x0e, 0x4b, 0xb6, 0x53, 0x64, 0x41, 0x48, + 0x29, 0xc0, 0x3b, 0xe4, 0x89, 0x1d, 0x9e, 0x73, 0xef, 0x81, 0x4f, 0x90, 0x9a, 0x3c, 0x08, 0x68, + 0x22, 0x07, 0xb1, 0xb8, 0x2c, 0xf9, 0x03, 0x3c, 0x09, 0x45, 0xa3, 0x1f, 0xab, 0xe3, 0x26, 0xe8, + 0xbc, 0x82, 0xe8, 0xc7, 0x7e, 0x2e, 0xe6, 0x7e, 0xc8, 0xb8, 0x7a, 0xcb, 0x54, 0xbd, 0x8e, 0x83, + 0x79, 0x02, 0x0f, 0x3a, 0x8a, 0x5f, 0x8f, 0x41, 0x8a, 0x15, 0x04, 0x21, 0xbd, 0xc5, 0xfa, 0xeb, + 0x2d, 0x3e, 0x48, 0x6f, 0x89, 0xf7, 0xae, 0xb7, 0x32, 0x80, 0x2f, 0x8c, 0xcb, 0x7f, 0xc1, 0xa3, + 0x4f, 0xfc, 0x62, 0x22, 0x36, 0xf4, 0x16, 0xf7, 0x89, 0x10, 0x53, 0xf1, 0x3f, 0xc4, 0x20, 0xe3, + 0x8f, 0xa3, 0x32, 0x4c, 0x0a, 0xb9, 0x94, 0x5d, 0x43, 0x6d, 0x71, 0xdb, 0x79, 0x60, 0xa0, 0x70, + 0x57, 0x0d, 0xb5, 0x25, 0x67, 0xb9, 0x3c, 0xa4, 0xd1, 0x7f, 0x1d, 0xe2, 0x03, 0xd6, 0x21, 0xb2, + 0xf0, 0x89, 0xf7, 0xb6, 0xf0, 0x91, 0x25, 0x4a, 0x76, 0x2f, 0xd1, 0x57, 0xe2, 0xf4, 0x4c, 0xc8, + 0xb6, 0x5c, 0xd5, 0xf8, 0x20, 0x3c, 0xe2, 0x3e, 0xc8, 0xd8, 0x96, 0xa1, 0xb0, 0x11, 0xf6, 0x79, + 0x4c, 0xda, 0xb6, 0x0c, 0xb9, 0x67, 0xd9, 0xc7, 0xef, 0x91, 0xbb, 0xa4, 0xee, 0x81, 0xd6, 0x26, + 0xba, 0xb5, 0xe6, 0x40, 0x8e, 0xa9, 0x82, 0xc7, 0xa4, 0xa7, 0x89, 0x0e, 0xe8, 0x1e, 0x23, 0xd6, + 0xbb, 0x85, 0x61, 0x62, 0x33, 0x4a, 0x99, 0xd3, 0x11, 0x0e, 0x56, 0x41, 0xf7, 0x3b, 0x4c, 0x0c, + 0x9b, 0xa5, 0xcc, 0xe9, 0x8a, 0x7f, 0x39, 0x06, 0x10, 0x24, 0x77, 0x52, 0xcc, 0xbb, 0x54, 0x04, + 0x25, 0xf2, 0xe4, 0xf9, 0x41, 0x8b, 0xc6, 0x9f, 0x9f, 0x73, 0xc3, 0x72, 0xaf, 0xc0, 0x64, 0x60, + 0x8c, 0x2e, 0x16, 0xc2, 0xcc, 0x1f, 0x91, 0xe3, 0x1b, 0xd8, 0x93, 0x73, 0xb7, 0x42, 0xad, 0xe2, + 0x3f, 0x8d, 0x41, 0x86, 0xca, 0xb4, 0x8e, 0x3d, 0x35, 0xb2, 0x86, 0xb1, 0xf7, 0xbe, 0x86, 0x0f, + 0x00, 0x30, 0x18, 0x5a, 0x61, 0x32, 0xcb, 0xca, 0xd0, 0x1e, 0x5a, 0x58, 0x5e, 0xf4, 0x15, 0x9e, + 0x38, 0x5a, 0xe1, 0xe2, 0xf0, 0x82, 0xab, 0xfd, 0x14, 0x4c, 0xd0, 0x5f, 0xbc, 0x3b, 0x70, 0x79, + 0x01, 0x92, 0x32, 0x3b, 0xed, 0xad, 0x03, 0xb7, 0x68, 0xc2, 0xc4, 0xd6, 0x01, 0x3b, 0x62, 0x3e, + 0x32, 0xc1, 0x04, 0xb9, 0x2a, 0x21, 0x72, 0x15, 0x3a, 0x0f, 0x29, 0xba, 0x25, 0x15, 0x25, 0x52, + 0x9f, 0xac, 0xbb, 0xb1, 0xbe, 0xc5, 0x8e, 0x86, 0x39, 0x65, 0x71, 0x15, 0xb2, 0xeb, 0xaa, 0x61, + 0xd0, 0xb7, 0x01, 0xb6, 0xe8, 0xaf, 0x45, 0xf8, 0xa5, 0xb5, 0x77, 0xa0, 0x84, 0x76, 0xb3, 0x79, + 0xd1, 0xbf, 0x75, 0x40, 0xb7, 0x12, 0x79, 0x88, 0x7b, 0x07, 0x3c, 0x60, 0xc4, 0xbd, 0x83, 0x22, + 0x86, 0xb4, 0x00, 0x1f, 0xf9, 0x47, 0xe2, 0x66, 0x61, 0xdc, 0xb4, 0x9a, 0x98, 0xc9, 0x9b, 0x93, + 0x59, 0x23, 0x7a, 0x5c, 0x9e, 0x8c, 0x1e, 0x97, 0x3f, 0xfe, 0x5b, 0x31, 0xc8, 0x86, 0x62, 0x1a, + 0x7a, 0x06, 0x4e, 0x2c, 0xaf, 0x6d, 0xae, 0xdc, 0x50, 0x6a, 0x15, 0xe5, 0xea, 0x5a, 0x79, 0x35, + 0xf8, 0x68, 0x75, 0xee, 0xe4, 0x9d, 0xbb, 0x8b, 0x28, 0x44, 0xbb, 0x6d, 0xd2, 0x2b, 0x5a, 0x74, + 0x0e, 0x66, 0xa3, 0x2c, 0xe5, 0xe5, 0x46, 0x75, 0x63, 0x4b, 0x8a, 0xcd, 0x9d, 0xb8, 0x73, 0x77, + 0x71, 0x3a, 0xc4, 0x51, 0xde, 0x71, 0xb1, 0xe9, 0xf5, 0x32, 0xac, 0x6c, 0xae, 0xaf, 0xd7, 0xb6, + 0xa4, 0x78, 0x0f, 0x03, 0x4f, 0x32, 0x8f, 0xc1, 0x74, 0x94, 0x61, 0xa3, 0xb6, 0x26, 0x25, 0xe6, + 0xd0, 0x9d, 0xbb, 0x8b, 0xf9, 0x10, 0xf5, 0x86, 0x6e, 0xcc, 0xa5, 0x3f, 0xf1, 0x85, 0xf9, 0xb1, + 0x5f, 0xfa, 0xc5, 0xf9, 0x18, 0x99, 0xd9, 0x64, 0x24, 0xae, 0xa1, 0x27, 0xe1, 0x54, 0xa3, 0xb6, + 0xba, 0x51, 0xad, 0x28, 0xeb, 0x8d, 0x55, 0x71, 0xc9, 0x29, 0x66, 0x37, 0x75, 0xe7, 0xee, 0x62, + 0x96, 0x4f, 0x69, 0x10, 0x75, 0x5d, 0xae, 0xde, 0xdc, 0xdc, 0xaa, 0x4a, 0x31, 0x46, 0x5d, 0x77, + 0x30, 0xa9, 0x3b, 0x29, 0xf5, 0xd3, 0x70, 0xba, 0x0f, 0xb5, 0x3f, 0xb1, 0xe9, 0x3b, 0x77, 0x17, + 0x27, 0xeb, 0x0e, 0x66, 0x3e, 0x4f, 0x39, 0x96, 0xa0, 0xd0, 0xcb, 0xb1, 0x59, 0xdf, 0x6c, 0x94, + 0xd7, 0xa4, 0xc5, 0x39, 0xe9, 0xce, 0xdd, 0xc5, 0x9c, 0x08, 0xe0, 0x84, 0x3e, 0x98, 0xd9, 0xfb, + 0x79, 0xd8, 0xf5, 0xce, 0x13, 0xf0, 0x30, 0xbf, 0xfe, 0x71, 0x3d, 0x75, 0x5f, 0x37, 0x5b, 0xfe, + 0xbd, 0x1d, 0x6f, 0xf3, 0x43, 0xaf, 0x93, 0xfc, 0x8a, 0x49, 0xf4, 0x0e, 0xb9, 0xbd, 0x1b, 0xf8, + 0xd2, 0xca, 0xdc, 0x90, 0xf7, 0x39, 0x86, 0x9f, 0x9a, 0x0d, 0xbe, 0x19, 0x9c, 0x1b, 0x72, 0xff, + 0x38, 0x77, 0xe4, 0xb9, 0x5e, 0xf1, 0x93, 0x31, 0xc8, 0x5f, 0xd3, 0x5d, 0xcf, 0x72, 0x74, 0x4d, + 0x35, 0xe8, 0xa7, 0xaa, 0x17, 0x47, 0xcd, 0x07, 0x5d, 0xe1, 0xe9, 0x05, 0x48, 0xdd, 0x52, 0x0d, + 0x16, 0x88, 0xc3, 0xd7, 0xc0, 0xdd, 0xea, 0x0b, 0xc2, 0xb1, 0x00, 0x60, 0x6c, 0xc5, 0x2f, 0xc7, + 0x61, 0x8a, 0x3a, 0x83, 0xcb, 0x7e, 0x85, 0xd1, 0xc3, 0x2e, 0xaa, 0x43, 0xd2, 0x51, 0x3d, 0x7e, + 0x5f, 0xb4, 0xfc, 0x21, 0x7e, 0x05, 0xf8, 0xe8, 0xf0, 0x8b, 0xbc, 0xa5, 0xde, 0x5b, 0x42, 0x8a, + 0x84, 0x5e, 0x82, 0x74, 0x5b, 0x3d, 0x50, 0x28, 0x6a, 0xfc, 0x1e, 0xa0, 0x4e, 0xb4, 0xd5, 0x03, + 0x22, 0x2b, 0x6a, 0xc2, 0x14, 0x01, 0xd6, 0xf6, 0x54, 0xb3, 0x85, 0x19, 0x7e, 0xe2, 0x1e, 0xe0, + 0x4f, 0xb6, 0xd5, 0x83, 0x15, 0x8a, 0x49, 0x9e, 0x52, 0x4a, 0x7f, 0xfa, 0xcd, 0x85, 0x31, 0x7a, + 0xc3, 0xfa, 0x6b, 0x31, 0x80, 0x40, 0x5d, 0xe8, 0x8f, 0x81, 0xa4, 0xf9, 0x2d, 0xfa, 0x78, 0xd7, + 0xdf, 0x23, 0x0e, 0x58, 0x88, 0x2e, 0x65, 0xb3, 0x62, 0xe2, 0x5b, 0x6f, 0x2d, 0xc4, 0xe4, 0x29, + 0xad, 0x6b, 0x1d, 0xaa, 0x90, 0xed, 0xd8, 0x4d, 0xb2, 0x0b, 0xa5, 0xe7, 0x77, 0xf1, 0x63, 0x14, + 0x26, 0xc0, 0x18, 0xc9, 0x50, 0x48, 0xfa, 0x2f, 0xc7, 0x20, 0x5b, 0x09, 0xbd, 0xdf, 0x51, 0x80, + 0x89, 0xb6, 0x65, 0xea, 0xfb, 0xdc, 0xec, 0x32, 0xb2, 0x68, 0xa2, 0x39, 0x48, 0xb3, 0x8f, 0xf4, + 0xbd, 0x43, 0x71, 0xd9, 0x25, 0xda, 0x84, 0xeb, 0x36, 0xde, 0x71, 0x75, 0xa1, 0x6b, 0x59, 0x34, + 0xd1, 0x63, 0x20, 0xb9, 0x58, 0xeb, 0x38, 0xba, 0x77, 0xa8, 0x68, 0x96, 0xe9, 0xa9, 0x9a, 0xc7, + 0x3f, 0xf7, 0x9e, 0x12, 0xfd, 0x2b, 0xac, 0x9b, 0x80, 0x34, 0xb1, 0xa7, 0xea, 0x86, 0x5b, 0x60, + 0xef, 0x40, 0x88, 0x66, 0x48, 0xdc, 0x5f, 0x4f, 0x85, 0x6f, 0x27, 0x56, 0x40, 0xb2, 0x6c, 0xec, + 0x44, 0xca, 0x60, 0x66, 0xa1, 0x85, 0xdf, 0xfc, 0xea, 0x53, 0xb3, 0x5c, 0xdd, 0xbc, 0x10, 0x66, + 0xdf, 0x33, 0xc8, 0x53, 0x82, 0x43, 0xd4, 0xc7, 0xaf, 0x90, 0x05, 0x13, 0x47, 0x7d, 0x76, 0x67, + 0x27, 0xb8, 0xd1, 0x98, 0xed, 0xd1, 0x6b, 0xd9, 0x3c, 0x5c, 0x2e, 0x7c, 0x33, 0x80, 0x0e, 0xae, + 0x11, 0x6e, 0xe0, 0x43, 0xb2, 0x5a, 0x1c, 0xa7, 0x4e, 0x61, 0x48, 0x59, 0xfb, 0x9a, 0xaa, 0x1b, + 0xe2, 0xb7, 0x47, 0x64, 0xde, 0x42, 0x25, 0x48, 0xb9, 0x9e, 0xea, 0x75, 0x5c, 0xfe, 0x1b, 0xa1, + 0xc5, 0x41, 0x96, 0xb1, 0x6c, 0x99, 0xcd, 0x06, 0xa5, 0x94, 0x39, 0x07, 0xda, 0x82, 0x94, 0x67, + 0xed, 0x63, 0x93, 0x2b, 0xe9, 0x58, 0x56, 0xdd, 0xe7, 0x35, 0x04, 0x86, 0x85, 0x5a, 0x20, 0x35, + 0xb1, 0x81, 0x5b, 0xac, 0x88, 0xdb, 0x53, 0xc9, 0x5e, 0x27, 0x75, 0x0f, 0xbc, 0x66, 0xca, 0x47, + 0x6d, 0x50, 0x50, 0x74, 0x23, 0xfa, 0x86, 0x11, 0xfb, 0x41, 0xdd, 0x87, 0x06, 0xcd, 0x3f, 0x64, + 0x99, 0xe2, 0x1c, 0x39, 0xfc, 0x32, 0xd2, 0x63, 0x20, 0x75, 0xcc, 0x1d, 0xcb, 0xa4, 0xbf, 0x10, + 0xc0, 0x37, 0x10, 0x69, 0x5a, 0x92, 0x4d, 0xf9, 0xfd, 0xfc, 0x40, 0xea, 0x06, 0xe4, 0x03, 0x52, + 0xea, 0x3b, 0x99, 0x63, 0xf8, 0xce, 0xa4, 0xcf, 0x4b, 0x46, 0xd1, 0x35, 0x80, 0xc0, 0x31, 0xe9, + 0xc9, 0x70, 0x76, 0xf0, 0x1a, 0x06, 0xde, 0x2d, 0xb6, 0x86, 0x01, 0x2f, 0x32, 0x60, 0xa6, 0xad, + 0x9b, 0x8a, 0x8b, 0x8d, 0x5d, 0x85, 0xab, 0x8a, 0x40, 0x66, 0xef, 0xc1, 0xd2, 0x4e, 0xb7, 0x75, + 0xb3, 0x81, 0x8d, 0xdd, 0x8a, 0x0f, 0x5b, 0xca, 0x7d, 0xe2, 0xcd, 0x85, 0x31, 0xee, 0x4b, 0x63, + 0xc5, 0x3a, 0xbd, 0x9d, 0xe4, 0x6e, 0x80, 0x5d, 0x74, 0x11, 0x32, 0xaa, 0x68, 0xd0, 0x9a, 0xf5, + 0x28, 0x37, 0x0a, 0x48, 0x99, 0x77, 0xbe, 0xf1, 0xef, 0x17, 0x63, 0xc5, 0x5f, 0x8c, 0x41, 0xaa, + 0x72, 0xb3, 0xae, 0xea, 0x0e, 0xaa, 0xc2, 0x74, 0x60, 0x50, 0xa3, 0xfa, 0x66, 0x60, 0x83, 0xc2, + 0x39, 0xab, 0x83, 0x76, 0xba, 0x47, 0xc2, 0x74, 0xef, 0x81, 0xbb, 0x26, 0x5e, 0x85, 0x09, 0x26, + 0xa5, 0x8b, 0x4a, 0x30, 0x6e, 0x93, 0x3f, 0xf8, 0xe1, 0xd4, 0xfc, 0x40, 0x43, 0xa4, 0xf4, 0xfe, + 0xe5, 0x11, 0x61, 0x29, 0xfe, 0x30, 0x06, 0x50, 0xb9, 0x79, 0x73, 0xcb, 0xd1, 0x6d, 0x03, 0x7b, + 0xf7, 0x6a, 0xc6, 0x6b, 0x70, 0x22, 0xb4, 0x9d, 0x72, 0xb4, 0x91, 0x67, 0x3d, 0x13, 0x6c, 0xa8, + 0x1c, 0xad, 0x2f, 0x5a, 0xd3, 0xf5, 0x7c, 0xb4, 0xc4, 0xc8, 0x68, 0x15, 0xd7, 0xeb, 0xaf, 0xc6, + 0x06, 0x64, 0x83, 0xe9, 0xbb, 0xa8, 0x02, 0x69, 0x8f, 0xff, 0xcd, 0xb5, 0x59, 0x1c, 0xac, 0x4d, + 0xc1, 0x26, 0x4e, 0x10, 0x05, 0x67, 0xf1, 0xff, 0x13, 0xa5, 0xfa, 0x16, 0xfb, 0x47, 0xcb, 0x8c, + 0x48, 0xec, 0xe5, 0xb1, 0xf1, 0x5e, 0x54, 0x14, 0x1c, 0xab, 0x4b, 0xab, 0x1f, 0x8f, 0xc3, 0xcc, + 0xb6, 0x88, 0x36, 0x7f, 0x64, 0x35, 0x51, 0x87, 0x09, 0x6c, 0x7a, 0x8e, 0x8e, 0xc5, 0x7e, 0xf5, + 0xe9, 0x41, 0x6b, 0xdd, 0x67, 0x2e, 0xf4, 0xa7, 0xea, 0xc4, 0x95, 0x26, 0x87, 0xe9, 0xd2, 0xc2, + 0xbf, 0x8b, 0x43, 0x61, 0x10, 0x27, 0x3a, 0x03, 0x53, 0x9a, 0x83, 0x69, 0x87, 0x12, 0x39, 0x10, + 0xcc, 0x8b, 0x6e, 0x1e, 0xf4, 0xd7, 0x81, 0x14, 0x50, 0xc4, 0xb0, 0x08, 0xe9, 0xb1, 0x2b, 0xa6, + 0x7c, 0xc0, 0x4c, 0xc3, 0x3e, 0x86, 0x29, 0xdd, 0xd4, 0x3d, 0x5d, 0x35, 0x94, 0x1d, 0xd5, 0x50, + 0xc5, 0x15, 0xda, 0x1f, 0x34, 0x50, 0xe7, 0x39, 0xe8, 0x32, 0xc3, 0x44, 0x37, 0x61, 0x42, 0xc0, + 0x27, 0xef, 0x01, 0xbc, 0x00, 0x0b, 0x55, 0x51, 0xbf, 0x13, 0x87, 0x69, 0x19, 0x37, 0x7f, 0xb4, + 0xd4, 0xfa, 0x63, 0x00, 0xcc, 0xe1, 0x48, 0x1c, 0x7c, 0x0f, 0x9a, 0xed, 0x75, 0xe0, 0x0c, 0xc3, + 0xab, 0xb8, 0x5e, 0x48, 0xb7, 0xdf, 0x8c, 0x43, 0x2e, 0xac, 0xdb, 0x1f, 0x81, 0xbc, 0x80, 0x6a, + 0x41, 0x34, 0x48, 0xf2, 0x1f, 0xd9, 0x1e, 0x10, 0x0d, 0x7a, 0xac, 0xee, 0xe8, 0x30, 0xf0, 0xfd, + 0x38, 0xa4, 0xea, 0xaa, 0xa3, 0xb6, 0x5d, 0x74, 0xbd, 0xa7, 0x80, 0x13, 0x27, 0x83, 0x3d, 0xff, + 0x95, 0x02, 0xdf, 0xd4, 0x33, 0x93, 0xfb, 0x74, 0x9f, 0xfa, 0xed, 0x11, 0xc8, 0x93, 0x2d, 0x62, + 0xe8, 0x5e, 0x32, 0x4e, 0xdf, 0x30, 0x21, 0x7b, 0xbc, 0xd0, 0xa5, 0xe3, 0x02, 0x64, 0x09, 0x59, + 0x10, 0xe8, 0x08, 0x0d, 0xb4, 0xd5, 0x83, 0x2a, 0xeb, 0x41, 0x4f, 0x01, 0xda, 0xf3, 0x37, 0xed, + 0x4a, 0xa0, 0x02, 0x42, 0x37, 0x1d, 0x8c, 0x08, 0xf2, 0x07, 0x00, 0x88, 0x14, 0x0a, 0x7b, 0xbf, + 0x97, 0xed, 0x71, 0x32, 0xa4, 0xa7, 0x42, 0xdf, 0xf1, 0xfd, 0x09, 0x56, 0x0b, 0x76, 0xed, 0x1e, + 0x79, 0x19, 0xbe, 0x76, 0x3c, 0x4b, 0xfd, 0xfe, 0x5b, 0x0b, 0x73, 0x87, 0x6a, 0xdb, 0x28, 0x15, + 0xfb, 0x40, 0x16, 0x69, 0x6d, 0x18, 0xdd, 0x75, 0x86, 0x2c, 0xf8, 0x0b, 0x31, 0x40, 0x41, 0xc8, + 0x95, 0xb1, 0x6b, 0x93, 0x6d, 0x0d, 0x29, 0x7a, 0x43, 0x15, 0x6a, 0xec, 0xe8, 0xa2, 0x37, 0xe0, + 0x17, 0x45, 0x6f, 0xc8, 0x23, 0x2e, 0x07, 0x01, 0x2e, 0xce, 0xd7, 0xb0, 0xcf, 0xcb, 0xd9, 0x4b, + 0x2b, 0x96, 0x2e, 0xb8, 0x7b, 0x62, 0xd8, 0x58, 0xf1, 0x77, 0x62, 0x70, 0xba, 0xc7, 0x9a, 0x7c, + 0x61, 0xff, 0x38, 0x20, 0x27, 0x34, 0xc8, 0x7f, 0x2d, 0x95, 0x09, 0x7d, 0x6c, 0xe3, 0x9c, 0x76, + 0x7a, 0x62, 0xe5, 0xfb, 0x15, 0xa3, 0xd9, 0x4b, 0xdb, 0xff, 0x38, 0x06, 0xb3, 0x61, 0x61, 0xfc, + 0x69, 0x6d, 0x40, 0x2e, 0x2c, 0x0b, 0x9f, 0xd0, 0xc3, 0xa3, 0x4c, 0x88, 0xcf, 0x25, 0xc2, 0x8f, + 0x5e, 0x0c, 0x1c, 0x97, 0x1d, 0x16, 0x3d, 0x33, 0xb2, 0x6e, 0x84, 0x4c, 0xdd, 0x0e, 0x9c, 0x14, + 0x55, 0x4c, 0xb2, 0x6e, 0x59, 0x06, 0xfa, 0x13, 0x30, 0x6d, 0x5a, 0x9e, 0x42, 0xac, 0x1c, 0x37, + 0x15, 0xbe, 0x73, 0x65, 0xd1, 0xef, 0xc5, 0xe3, 0xa9, 0xec, 0xbb, 0x6f, 0x2d, 0xf4, 0x42, 0x75, + 0xe9, 0x71, 0xca, 0xb4, 0xbc, 0x65, 0x3a, 0xbe, 0xc5, 0xf6, 0xb5, 0x0e, 0x4c, 0x46, 0x1f, 0xcd, + 0xa2, 0xe5, 0xfa, 0xb1, 0x1f, 0x3d, 0x79, 0xd4, 0x63, 0x73, 0x3b, 0xa1, 0x67, 0xb2, 0xd7, 0x59, + 0x7f, 0xef, 0xcd, 0x85, 0xd8, 0xe3, 0x5f, 0x8b, 0x01, 0x04, 0x5b, 0x78, 0xf4, 0x24, 0x9c, 0x5a, + 0xde, 0xdc, 0xa8, 0x28, 0x8d, 0xad, 0xf2, 0xd6, 0x76, 0x23, 0xfa, 0xd1, 0x8b, 0x38, 0x13, 0x76, + 0x6d, 0xac, 0xe9, 0xbb, 0x3a, 0x6e, 0xa2, 0x47, 0x61, 0x36, 0x4a, 0x4d, 0x5a, 0xd5, 0x8a, 0x14, + 0x9b, 0xcb, 0xdd, 0xb9, 0xbb, 0x98, 0x66, 0xd5, 0x11, 0x6e, 0xa2, 0xb3, 0x70, 0xa2, 0x97, 0xae, + 0xb6, 0xb1, 0x2a, 0xc5, 0xe7, 0x26, 0xef, 0xdc, 0x5d, 0xcc, 0xf8, 0x65, 0x14, 0x2a, 0x02, 0x0a, + 0x53, 0x72, 0xbc, 0xc4, 0x1c, 0xdc, 0xb9, 0xbb, 0x98, 0x62, 0x6a, 0x9b, 0x4b, 0x7e, 0xe2, 0x0b, + 0xf3, 0x63, 0xcb, 0x57, 0x07, 0x9e, 0xfa, 0x3e, 0x79, 0xa4, 0xc6, 0x0e, 0xfc, 0x93, 0xdc, 0xc8, + 0x51, 0xef, 0xef, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xd1, 0x0f, 0xa7, 0xff, 0x6b, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) diff --git a/x/staking/types/tx.pb.go b/x/staking/types/tx.pb.go index 750593b36f58..040c6a9233f4 100644 --- a/x/staking/types/tx.pb.go +++ b/x/staking/types/tx.pb.go @@ -452,6 +452,8 @@ func (m *MsgUndelegateResponse) GetCompletionTime() time.Time { } // MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +// +// Since: cosmos-sdk 0.46 type MsgCancelUnbondingDelegation struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` @@ -495,6 +497,8 @@ func (m *MsgCancelUnbondingDelegation) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelUnbondingDelegation proto.InternalMessageInfo // MsgCancelUnbondingDelegationResponse +// +// Since: cosmos-sdk 0.46 type MsgCancelUnbondingDelegationResponse struct { } @@ -638,6 +642,8 @@ type MsgClient interface { Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation // and delegate back to previous validator. + // + // Since: cosmos-sdk 0.46 CancelUnbondingDelegation(ctx context.Context, in *MsgCancelUnbondingDelegation, opts ...grpc.CallOption) (*MsgCancelUnbondingDelegationResponse, error) } @@ -720,6 +726,8 @@ type MsgServer interface { Undelegate(context.Context, *MsgUndelegate) (*MsgUndelegateResponse, error) // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation // and delegate back to previous validator. + // + // Since: cosmos-sdk 0.46 CancelUnbondingDelegation(context.Context, *MsgCancelUnbondingDelegation) (*MsgCancelUnbondingDelegationResponse, error) } diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 79bd2a4f55b1..4296181ec9b5 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -342,7 +342,7 @@ func (v Validator) SharesFromTokensTruncated(amt sdk.Int) (sdk.Dec, error) { return sdk.ZeroDec(), ErrInsufficientShares } - return v.GetDelegatorShares().MulInt(amt).QuoTruncate(v.GetTokens().ToDec()), nil + return v.GetDelegatorShares().MulInt(amt).QuoTruncate(sdk.NewDecFromInt(v.GetTokens())), nil } // get the bonded tokens which the validator holds @@ -382,7 +382,7 @@ func (v Validator) AddTokensFromDel(amount sdk.Int) (Validator, sdk.Dec) { var issuedShares sdk.Dec if v.DelegatorShares.IsZero() { // the first delegation to a validator sets the exchange rate to one - issuedShares = amount.ToDec() + issuedShares = sdk.NewDecFromInt(amount) } else { shares, err := v.SharesFromTokens(amount) if err != nil { @@ -452,7 +452,6 @@ func (v *Validator) MinEqual(other *Validator) bool { v.Jailed == other.Jailed && v.MinSelfDelegation.Equal(other.MinSelfDelegation) && v.ConsensusPubkey.Equal(other.ConsensusPubkey) - } // Equal checks if the receiver equals the parameter @@ -484,7 +483,6 @@ func (v Validator) ConsPubKey() (cryptotypes.PubKey, error) { } return pk, nil - } // TmConsPublicKey casts Validator.ConsensusPubkey to tmprotocrypto.PubKey. diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 8601fbeec723..6e3172e51db2 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -121,7 +121,6 @@ func TestAddTokensValidatorUnbonding(t *testing.T) { } func TestAddTokensValidatorUnbonded(t *testing.T) { - validator := newValidator(t, valAddr1, pk1) validator = validator.UpdateStatus(types.Unbonded) validator, delShares := validator.AddTokensFromDel(sdk.NewInt(10)) diff --git a/x/upgrade/abci.go b/x/upgrade/abci.go index f390a873d134..5212cd9e2ed5 100644 --- a/x/upgrade/abci.go +++ b/x/upgrade/abci.go @@ -35,7 +35,14 @@ func BeginBlocker(k keeper.Keeper, ctx sdk.Context, _ abci.RequestBeginBlock) { // 3. If the plan is ready and skip upgrade height is set for current height. if !found || !plan.ShouldExecute(ctx) || (plan.ShouldExecute(ctx) && k.IsSkipHeight(ctx.BlockHeight())) { if lastAppliedPlan != "" && !k.HasHandler(lastAppliedPlan) { - panic(fmt.Sprintf("Wrong app version %d, upgrade handler is missing for %s upgrade plan", ctx.ConsensusParams().Version.AppVersion, lastAppliedPlan)) + var appVersion uint64 + + cp := ctx.ConsensusParams() + if cp != nil && cp.Version != nil { + appVersion = cp.Version.AppVersion + } + + panic(fmt.Sprintf("Wrong app version %d, upgrade handler is missing for %s upgrade plan", appVersion, lastAppliedPlan)) } } } diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index 8f3b8f52dbfd..aa38e8ab5dad 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -24,7 +24,7 @@ import ( ) type TestSuite struct { - module module.AppModule + module module.BeginBlockAppModule keeper keeper.Keeper querier sdk.Querier handler govtypes.Handler diff --git a/x/upgrade/client/cli/parse.go b/x/upgrade/client/cli/parse.go index 2844e73dcdf6..8272266b6fb1 100644 --- a/x/upgrade/client/cli/parse.go +++ b/x/upgrade/client/cli/parse.go @@ -4,26 +4,26 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/client/cli" gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/spf13/cobra" + "github.com/spf13/pflag" ) -func parseArgsToContent(cmd *cobra.Command, name string) (gov.Content, error) { - title, err := cmd.Flags().GetString(cli.FlagTitle) +func parseArgsToContent(fs *pflag.FlagSet, name string) (gov.Content, error) { + title, err := fs.GetString(cli.FlagTitle) if err != nil { return nil, err } - description, err := cmd.Flags().GetString(cli.FlagDescription) + description, err := fs.GetString(cli.FlagDescription) if err != nil { return nil, err } - height, err := cmd.Flags().GetInt64(FlagUpgradeHeight) + height, err := fs.GetInt64(FlagUpgradeHeight) if err != nil { return nil, err } - info, err := cmd.Flags().GetString(FlagUpgradeInfo) + info, err := fs.GetString(FlagUpgradeInfo) if err != nil { return nil, err } diff --git a/x/upgrade/client/cli/parse_test.go b/x/upgrade/client/cli/parse_test.go new file mode 100644 index 000000000000..b5ce54e4b179 --- /dev/null +++ b/x/upgrade/client/cli/parse_test.go @@ -0,0 +1,40 @@ +package cli + +import ( + "strconv" + "testing" + + "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/stretchr/testify/require" +) + +func TestParseArgsToContent(t *testing.T) { + fs := NewCmdSubmitLegacyUpgradeProposal().Flags() + + proposal := types.SoftwareUpgradeProposal{ + Title: "proposal title", + Description: "proposal description", + Plan: types.Plan{ + Name: "plan name", + Height: 123456, + Info: "plan info", + }, + } + + fs.Set(cli.FlagTitle, proposal.Title) + fs.Set(cli.FlagDescription, proposal.Description) + fs.Set(FlagUpgradeHeight, strconv.FormatInt(proposal.Plan.Height, 10)) + fs.Set(FlagUpgradeInfo, proposal.Plan.Info) + + content, err := parseArgsToContent(fs, proposal.Plan.Name) + require.NoError(t, err) + + p, ok := content.(*types.SoftwareUpgradeProposal) + require.Equal(t, ok, true) + require.Equal(t, p.Title, proposal.Title) + require.Equal(t, p.Description, proposal.Description) + require.Equal(t, p.Plan.Name, proposal.Plan.Name) + require.Equal(t, p.Plan.Height, proposal.Plan.Height) + require.Equal(t, p.Plan.Info, proposal.Plan.Info) +} diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index b4ad5e366806..6a54d8db3838 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -38,19 +38,19 @@ func GetTxCmd() *cobra.Command { // Deprecated: please use NewCmdSubmitUpgradeProposal instead. func NewCmdSubmitLegacyUpgradeProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "legacy-software-upgrade [name] (--upgrade-height [height]) (--upgrade-info [info]) [flags]", + Use: "software-upgrade [name] (--upgrade-height [height]) (--upgrade-info [info]) [flags]", Args: cobra.ExactArgs(1), Short: "Submit a software upgrade proposal", Long: "Submit a software upgrade along with an initial deposit.\n" + "Please specify a unique name and height for the upgrade to take effect.\n" + - "You may include info to reference a binary download link, in a format compatible with: https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor", + "You may include info to reference a binary download link, in a format compatible with: https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } name := args[0] - content, err := parseArgsToContent(cmd, name) + content, err := parseArgsToContent(cmd.Flags(), name) if err != nil { return err } @@ -108,7 +108,7 @@ func NewCmdSubmitLegacyUpgradeProposal() *cobra.Command { // Deprecated: please use NewCmdSubmitCancelUpgradeProposal instead. func NewCmdSubmitLegacyCancelUpgradeProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "legacy-cancel-software-upgrade [flags]", + Use: "cancel-software-upgrade [flags]", Args: cobra.ExactArgs(0), Short: "Cancel the current software upgrade proposal", Long: "Cancel a software upgrade along with an initial deposit.", @@ -163,7 +163,7 @@ func NewCmdSubmitLegacyCancelUpgradeProposal() *cobra.Command { // If a DAEMON_NAME env var is set, that is used. // Otherwise, the last part of the currently running executable is used. func getDefaultDaemonName() string { - // DAEMON_NAME is specifically used here to correspond with the Comsovisor setup env vars. + // DAEMON_NAME is specifically used here to correspond with the Cosmovisor setup env vars. name := os.Getenv("DAEMON_NAME") if len(name) == 0 { _, name = filepath.Split(os.Args[0]) diff --git a/x/upgrade/client/proposal_handler.go b/x/upgrade/client/proposal_handler.go index 082924787441..fb4a879fffec 100644 --- a/x/upgrade/client/proposal_handler.go +++ b/x/upgrade/client/proposal_handler.go @@ -5,5 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade/client/cli" ) -var LegacyProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyUpgradeProposal) -var LegacyCancelProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyCancelUpgradeProposal) +var ( + LegacyProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyUpgradeProposal) + LegacyCancelProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyCancelUpgradeProposal) +) diff --git a/x/upgrade/client/testutil/suite.go b/x/upgrade/client/testutil/suite.go index 7611c8bb8fd5..d5e21ce47ae6 100644 --- a/x/upgrade/client/testutil/suite.go +++ b/x/upgrade/client/testutil/suite.go @@ -86,7 +86,6 @@ func (s *IntegrationTestSuite) TestModuleVersionsCLI() { for _, tc := range testCases { s.Run(fmt.Sprintf("Case %s", tc.msg), func() { - expect := mv if tc.expPass { if tc.single { diff --git a/x/upgrade/doc.go b/x/upgrade/doc.go index b9d696914f94..b66fe38c1db0 100644 --- a/x/upgrade/doc.go +++ b/x/upgrade/doc.go @@ -30,7 +30,7 @@ and gracefully exit. Generally the application binary will restart on exit, but then will execute this BeginBlocker again and exit, causing a restart loop. Either the operator can manually install the new software, or you can make use of an external watcher daemon to possibly download and then switch binaries, -also potentially doing a backup. An example of such a daemon is https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc5/cosmovisor +also potentially doing a backup. An example of such a daemon is https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor described below under "Automation". When the binary restarts with the upgraded version (here v0.40.0), it will detect we have registered the @@ -106,10 +106,10 @@ to lose connectivity with the exiting nodes, thus this module prefers to just ha Automation and Plan.Info -We have deprecated calling out to scripts, instead with propose https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc5/cosmovisor +We have deprecated calling out to scripts, instead with propose https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor as a model for a watcher daemon that can launch simd as a subprocess and then read the upgrade log message to swap binaries as needed. You can pass in information into Plan.Info according to the format -specified here https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc5/cosmovisor/README.md#auto-download . +specified here https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md#auto-download . This will allow a properly configured cosmsod daemon to auto-download new binaries and auto-upgrade. As noted there, this is intended more for full nodes than validators. diff --git a/x/upgrade/keeper/grpc_query.go b/x/upgrade/keeper/grpc_query.go index 5757a05f996f..3c9e667ac935 100644 --- a/x/upgrade/keeper/grpc_query.go +++ b/x/upgrade/keeper/grpc_query.go @@ -71,7 +71,7 @@ func (k Keeper) ModuleVersions(c context.Context, req *types.QueryModuleVersions }, nil } -// Authority implementsthe the Query/Authority gRPC method, returning the account capable of performing upgrades +// Authority implements the Query/Authority gRPC method, returning the account capable of performing upgrades func (k Keeper) Authority(c context.Context, req *types.QueryAuthorityRequest) (*types.QueryAuthorityResponse, error) { return &types.QueryAuthorityResponse{Address: k.authority}, nil } diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index fc8f0ecccbf7..19fee1054ec9 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -198,7 +198,6 @@ func (s *KeeperTestSuite) TestSetUpgradedClient() { s.Require().False(exists, "invalid case: %s retrieved valid client state", tc.name) } } - } // Test that the protocol version successfully increments after an diff --git a/x/upgrade/keeper/msg_server_test.go b/x/upgrade/keeper/msg_server_test.go index 00af9e06563e..a83cdc09b7ac 100644 --- a/x/upgrade/keeper/msg_server_test.go +++ b/x/upgrade/keeper/msg_server_test.go @@ -57,6 +57,58 @@ func (s *KeeperTestSuite) TestSoftwareUpgrade() { if tc.expectErr { s.Require().Error(err) s.Require().Contains(err.Error(), tc.errMsg) + } else { + s.Require().NoError(err) + plan, found := s.app.UpgradeKeeper.GetUpgradePlan(s.ctx) + s.Require().Equal(true, found) + s.Require().Equal(tc.req.Plan, plan) + } + }) + } +} + +func (s *KeeperTestSuite) TestCancelUpgrade() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + err := s.app.UpgradeKeeper.ScheduleUpgrade(s.ctx, types.Plan{ + Name: "some name", + Info: "some info", + Height: 123450000, + }) + s.Require().NoError(err) + + testCases := []struct { + name string + req *types.MsgCancelUpgrade + expectErr bool + errMsg string + }{ + { + "unauthorized authority address", + &types.MsgCancelUpgrade{ + Authority: s.addrs[0].String(), + }, + true, + "expected gov account as only signer for proposal message", + }, + { + "upgrade cancelled successfully", + &types.MsgCancelUpgrade{ + Authority: govAccAddr, + }, + false, + "", + }, + } + for _, tc := range testCases { + s.Run(tc.name, func() { + _, err := s.msgSrvr.CancelUpgrade(s.ctx, tc.req) + if tc.expectErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.errMsg) + } else { + s.Require().NoError(err) + _, found := s.app.UpgradeKeeper.GetUpgradePlan(s.ctx) + s.Require().Equal(false, found) } }) } diff --git a/x/upgrade/migrations/v038/types.go b/x/upgrade/migrations/v038/types.go deleted file mode 100644 index 1a3ebd0ff623..000000000000 --- a/x/upgrade/migrations/v038/types.go +++ /dev/null @@ -1,170 +0,0 @@ -// Package v038 is used for legacy migration scripts. Actual migration scripts -// for v038 have been removed, but the v039->v042 migration script still -// references types from this file, so we're keeping it for now. -package v038 - -import ( - "fmt" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - v036gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v036" -) - -const ( - // ModuleName is the name of this module - ModuleName = "upgrade" - - // RouterKey is used to route governance proposals - RouterKey = ModuleName - - // StoreKey is the prefix under which we store this module's data - StoreKey = ModuleName - - // QuerierKey is used to handle abci_query requests - QuerierKey = ModuleName -) - -// Plan specifies information about a planned upgrade and when it should occur -type Plan struct { - // Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any - // special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been - // set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height - // is reached and the software will exit. - Name string `json:"name,omitempty"` - - // The time after which the upgrade must be performed. - // Leave set to its zero value to use a pre-defined Height instead. - Time time.Time `json:"time,omitempty"` - - // The height at which the upgrade must be performed. - // Only used if Time is not set. - Height int64 `json:"height,omitempty"` - - // Any application specific upgrade info to be included on-chain - // such as a git commit that validators could automatically upgrade to - Info string `json:"info,omitempty"` -} - -func (p Plan) String() string { - due := p.DueAt() - dueUp := strings.ToUpper(due[0:1]) + due[1:] - return fmt.Sprintf(`Upgrade Plan - Name: %s - %s - Info: %s`, p.Name, dueUp, p.Info) -} - -// ValidateBasic does basic validation of a Plan -func (p Plan) ValidateBasic() error { - if len(p.Name) == 0 { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "name cannot be empty") - } - if p.Height < 0 { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "height cannot be negative") - } - isValidTime := p.Time.Unix() > 0 - if !isValidTime && p.Height == 0 { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "must set either time or height") - } - if isValidTime && p.Height != 0 { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "cannot set both time and height") - } - - return nil -} - -// ShouldExecute returns true if the Plan is ready to execute given the current context -func (p Plan) ShouldExecute(ctx sdk.Context) bool { - if p.Time.Unix() > 0 { - return !ctx.BlockTime().Before(p.Time) - } - if p.Height > 0 { - return p.Height <= ctx.BlockHeight() - } - return false -} - -// DueAt is a string representation of when this plan is due to be executed -func (p Plan) DueAt() string { - if p.Time.Unix() > 0 { - return fmt.Sprintf("time: %s", p.Time.UTC().Format(time.RFC3339)) - } - return fmt.Sprintf("height: %d", p.Height) -} - -const ( - ProposalTypeSoftwareUpgrade string = "SoftwareUpgrade" - ProposalTypeCancelSoftwareUpgrade string = "CancelSoftwareUpgrade" -) - -// Software Upgrade Proposals -type SoftwareUpgradeProposal struct { - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Plan Plan `json:"plan" yaml:"plan"` -} - -func NewSoftwareUpgradeProposal(title, description string, plan Plan) v036gov.Content { - return SoftwareUpgradeProposal{title, description, plan} -} - -// Implements Proposal Interface -var _ v036gov.Content = SoftwareUpgradeProposal{} - -func (sup SoftwareUpgradeProposal) GetTitle() string { return sup.Title } -func (sup SoftwareUpgradeProposal) GetDescription() string { return sup.Description } -func (sup SoftwareUpgradeProposal) ProposalRoute() string { return RouterKey } -func (sup SoftwareUpgradeProposal) ProposalType() string { return ProposalTypeSoftwareUpgrade } -func (sup SoftwareUpgradeProposal) ValidateBasic() error { - if err := sup.Plan.ValidateBasic(); err != nil { - return err - } - return v036gov.ValidateAbstract(sup) -} - -func (sup SoftwareUpgradeProposal) String() string { - return fmt.Sprintf(`Software Upgrade Proposal: - Title: %s - Description: %s -`, sup.Title, sup.Description) -} - -// Cancel Software Upgrade Proposals -type CancelSoftwareUpgradeProposal struct { - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` -} - -func NewCancelSoftwareUpgradeProposal(title, description string) v036gov.Content { - return CancelSoftwareUpgradeProposal{title, description} -} - -// Implements Proposal Interface -var _ v036gov.Content = CancelSoftwareUpgradeProposal{} - -func (sup CancelSoftwareUpgradeProposal) GetTitle() string { return sup.Title } -func (sup CancelSoftwareUpgradeProposal) GetDescription() string { return sup.Description } -func (sup CancelSoftwareUpgradeProposal) ProposalRoute() string { return RouterKey } -func (sup CancelSoftwareUpgradeProposal) ProposalType() string { - return ProposalTypeCancelSoftwareUpgrade -} -func (sup CancelSoftwareUpgradeProposal) ValidateBasic() error { - return v036gov.ValidateAbstract(sup) -} - -func (sup CancelSoftwareUpgradeProposal) String() string { - return fmt.Sprintf(`Cancel Software Upgrade Proposal: - Title: %s - Description: %s -`, sup.Title, sup.Description) -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(SoftwareUpgradeProposal{}, "cosmos-sdk/SoftwareUpgradeProposal", nil) - cdc.RegisterConcrete(CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal", nil) -} diff --git a/x/upgrade/module.go b/x/upgrade/module.go index d262653d93d0..9a31d21241b4 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -45,11 +44,6 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterLegacyAminoCodec(cdc) } -// RegisterRESTRoutes registers the REST routes for the upgrade module. -// Deprecated: RegisterRESTRoutes is deprecated. `x/upgrade` legacy REST implementation -// has been removed from the SDK. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the upgrade module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { @@ -139,8 +133,3 @@ func (AppModule) ConsensusVersion() uint64 { return consensusVersion } func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(am.keeper, ctx, req) } - -// EndBlock does nothing -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} diff --git a/x/upgrade/plan/downloader.go b/x/upgrade/plan/downloader.go index 0879b8badbfe..7686b7aec823 100644 --- a/x/upgrade/plan/downloader.go +++ b/x/upgrade/plan/downloader.go @@ -88,7 +88,7 @@ func EnsureBinary(path string) error { } // Make sure all executable bits are set. oldMode := info.Mode().Perm() - newMode := oldMode | 0111 // Set the three execute bits to on (a+x). + newMode := oldMode | 0o111 // Set the three execute bits to on (a+x). if oldMode != newMode { return os.Chmod(path, newMode) } diff --git a/x/upgrade/plan/downloader_test.go b/x/upgrade/plan/downloader_test.go index 6e10b6de4c78..3d50e9f13a44 100644 --- a/x/upgrade/plan/downloader_test.go +++ b/x/upgrade/plan/downloader_test.go @@ -24,7 +24,7 @@ type DownloaderTestSuite struct { func (s *DownloaderTestSuite) SetupTest() { s.Home = s.T().TempDir() - s.Assert().NoError(os.MkdirAll(filepath.Join(s.Home, "src"), 0777), "creating src/ dir") + s.Assert().NoError(os.MkdirAll(filepath.Join(s.Home, "src"), 0o777), "creating src/ dir") s.T().Logf("Home: [%s]", s.Home) } @@ -115,7 +115,7 @@ func requireFileExistsAndIsExecutable(t *testing.T, path string) { require.NoError(t, err, "stat error") perm := info.Mode().Perm() // Checks if at least one executable bit is set (user, group, or other) - isExe := perm&0111 != 0 + isExe := perm&0o111 != 0 require.True(t, isExe, "is executable: permissions = %s", perm) } @@ -219,9 +219,9 @@ func (s *DownloaderTestSuite) TestDownloadUpgrade() { func (s *DownloaderTestSuite) TestEnsureBinary() { nonExeName := s.saveSrcTestFile(NewTestFile("non-exe.txt", "Not executable")) - s.Require().NoError(os.Chmod(nonExeName, 0600), "chmod error nonExeName") + s.Require().NoError(os.Chmod(nonExeName, 0o600), "chmod error nonExeName") isExeName := s.saveSrcTestFile(NewTestFile("is-exe.sh", "#!/bin/bash\necho 'executing'\n")) - s.Require().NoError(os.Chmod(isExeName, 0777), "chmod error isExeName") + s.Require().NoError(os.Chmod(isExeName, 0o777), "chmod error isExeName") s.T().Run("file does not exist", func(t *testing.T) { name := filepath.Join(s.Home, "does-not-exist.txt") diff --git a/x/upgrade/spec/01_concepts.md b/x/upgrade/spec/01_concepts.md index 826290a11800..10ff5ad3611d 100644 --- a/x/upgrade/spec/01_concepts.md +++ b/x/upgrade/spec/01_concepts.md @@ -67,7 +67,7 @@ not defined on a per-module basis. Registering this `StoreLoader` is done via func UpgradeStoreLoader (upgradeHeight int64, storeUpgrades *store.StoreUpgrades) baseapp.StoreLoader ``` -If there's a planned upgrade and the upgrade height is reached, the old binary writes `Plan` to the disk before panic'ing. +If there's a planned upgrade and the upgrade height is reached, the old binary writes `Plan` to the disk before panicking. This information is critical to ensure the `StoreUpgrades` happens smoothly at correct height and expected upgrade. It eliminiates the chances for the new binary to execute `StoreUpgrades` multiple @@ -82,7 +82,7 @@ This proposal prescribes to the standard governance process. If the proposal pas the `Plan`, which targets a specific `Handler`, is persisted and scheduled. The upgrade can be delayed or hastened by updating the `Plan.Height` in a new proposal. -+++ https://github.com/cosmos/cosmos-sdk/blob/08ddb217c176abe31c96af9d5f6c4c6fc645c4d4/proto/cosmos/upgrade/v1beta1/tx.proto#L19-L28 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/upgrade/v1beta1/tx.proto#L24-L36 ### Cancelling Upgrade Proposals @@ -92,6 +92,8 @@ remove the scheduled upgrade `Plan`. Of course this requires that the upgrade was known to be a bad idea well before the upgrade itself, to allow time for a vote. ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0-rc1/proto/cosmos/upgrade/v1beta1/tx.proto#L43-L51 + If such a possibility is desired, the upgrade height is to be `2 * (VotingPeriod + DepositPeriod) + (SafetyDelta)` from the beginning of the upgrade proposal. The `SafetyDelta` is the time available from the success of an diff --git a/x/upgrade/types/msgs.go b/x/upgrade/types/msgs.go index c0e4e810f8a3..86dc6a1338b2 100644 --- a/x/upgrade/types/msgs.go +++ b/x/upgrade/types/msgs.go @@ -61,7 +61,7 @@ func (m *MsgCancelUpgrade) ValidateBasic() error { return nil } -// GetSigners returns the expected signers for MsgSoftwareUpgrade. +// GetSigners returns the expected signers for MsgCancelUpgrade. func (m *MsgCancelUpgrade) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) return []sdk.AccAddress{addr} diff --git a/x/upgrade/types/plan_test.go b/x/upgrade/types/plan_test.go index bbd969eae0b3..724f68bf0525 100644 --- a/x/upgrade/types/plan_test.go +++ b/x/upgrade/types/plan_test.go @@ -105,7 +105,6 @@ func TestPlanValid(t *testing.T) { } }) } - } func TestShouldExecute(t *testing.T) { @@ -115,7 +114,6 @@ func TestShouldExecute(t *testing.T) { ctxHeight int64 expected bool }{ - "past height": { p: types.Plan{ Name: "do-good", diff --git a/x/upgrade/types/proposal.go b/x/upgrade/types/proposal.go index 987ccf978824..60a11fe7e8fd 100644 --- a/x/upgrade/types/proposal.go +++ b/x/upgrade/types/proposal.go @@ -54,6 +54,7 @@ func (csup *CancelSoftwareUpgradeProposal) ProposalRoute() string { return Rout func (csup *CancelSoftwareUpgradeProposal) ProposalType() string { return ProposalTypeCancelSoftwareUpgrade } + func (csup *CancelSoftwareUpgradeProposal) ValidateBasic() error { return gov.ValidateAbstract(csup) } diff --git a/x/upgrade/types/proposal_test.go b/x/upgrade/types/proposal_test.go index 7f56c6beaac9..4e6233a2d373 100644 --- a/x/upgrade/types/proposal_test.go +++ b/x/upgrade/types/proposal_test.go @@ -71,7 +71,6 @@ func TestContentAccessors(t *testing.T) { assert.Equal(t, tc.typ, unwrap.Prop.ProposalType()) assert.Equal(t, "upgrade", unwrap.Prop.ProposalRoute()) assert.Equal(t, tc.str, unwrap.Prop.String()) - }) } diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index c1b30fa3d5a4..e84c333051b0 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -582,6 +582,8 @@ type QueryClient interface { // Since: cosmos-sdk 0.43 ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error) // Returns the account with authority to conduct upgrades + // + // Since: cosmos-sdk 0.46 Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) } @@ -657,6 +659,8 @@ type QueryServer interface { // Since: cosmos-sdk 0.43 ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) // Returns the account with authority to conduct upgrades + // + // Since: cosmos-sdk 0.46 Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error) } diff --git a/x/upgrade/types/storeloader_test.go b/x/upgrade/types/storeloader_test.go index 341a2ffe30da..6aaefa69d198 100644 --- a/x/upgrade/types/storeloader_test.go +++ b/x/upgrade/types/storeloader_test.go @@ -14,6 +14,7 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/baseapp" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -34,8 +35,8 @@ func defaultLogger() log.Logger { } func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { - rs := rootmulti.NewStore(db) - rs.SetPruning(storetypes.PruneNothing) + rs := rootmulti.NewStore(db, log.NewNopLogger()) + rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) key := sdk.NewKVStoreKey(storeKey) rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) err := rs.LoadLatestVersion() @@ -51,8 +52,8 @@ func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { } func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte) { - rs := rootmulti.NewStore(db) - rs.SetPruning(storetypes.PruneNothing) + rs := rootmulti.NewStore(db, log.NewNopLogger()) + rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) key := sdk.NewKVStoreKey(storeKey) rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) err := rs.LoadLatestVersion() @@ -81,7 +82,7 @@ func TestSetLoader(t *testing.T) { data, err := json.Marshal(upgradeInfo) require.NoError(t, err) - err = os.WriteFile(upgradeInfoFilePath, data, 0644) + err = os.WriteFile(upgradeInfoFilePath, data, 0o644) require.NoError(t, err) // make sure it exists before running everything @@ -122,9 +123,9 @@ func TestSetLoader(t *testing.T) { initStore(t, db, tc.origStoreKey, k, v) // load the app with the existing db - opts := []func(*baseapp.BaseApp){baseapp.SetPruning(storetypes.PruneNothing)} + opts := []func(*baseapp.BaseApp){baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing))} - origapp := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, opts...) + origapp := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) origapp.MountStores(sdk.NewKVStoreKey(tc.origStoreKey)) err := origapp.LoadLatestVersion() require.Nil(t, err) @@ -140,7 +141,7 @@ func TestSetLoader(t *testing.T) { } // load the new app with the original app db - app := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, opts...) + app := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) app.MountStores(sdk.NewKVStoreKey(tc.loadStoreKey)) err = app.LoadLatestVersion() require.Nil(t, err) diff --git a/x/upgrade/types/upgrade.pb.go b/x/upgrade/types/upgrade.pb.go index 8a35a8729002..1c4167f9fdd3 100644 --- a/x/upgrade/types/upgrade.pb.go +++ b/x/upgrade/types/upgrade.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -228,36 +229,38 @@ func init() { } var fileDescriptor_ccf2a7d4d7b48dca = []byte{ - // 453 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbb, 0x6f, 0xd4, 0x30, - 0x18, 0x8f, 0xdb, 0xb4, 0x50, 0x9f, 0x58, 0xcc, 0x51, 0xcc, 0x09, 0x92, 0xd3, 0x89, 0xe1, 0x06, - 0x48, 0xd4, 0x22, 0x31, 0xdc, 0xc6, 0x75, 0x40, 0x42, 0x20, 0x55, 0x29, 0x30, 0xb0, 0x54, 0xbe, - 0xc4, 0x97, 0xb3, 0x70, 0xec, 0x28, 0x76, 0x0a, 0xf7, 0x5f, 0x74, 0x41, 0x62, 0xec, 0x9f, 0x73, - 0x63, 0x47, 0xc4, 0xc0, 0xe3, 0x6e, 0xe1, 0xcf, 0x40, 0xb6, 0x63, 0xc4, 0xa3, 0x23, 0x53, 0xbe, - 0xef, 0xcb, 0xef, 0xf1, 0x3d, 0x0c, 0xef, 0xe7, 0x52, 0x55, 0x52, 0xa5, 0x6d, 0x5d, 0x36, 0xa4, - 0xa0, 0xe9, 0xd9, 0xc1, 0x8c, 0x6a, 0x72, 0xe0, 0xf3, 0xa4, 0x6e, 0xa4, 0x96, 0x68, 0xdf, 0xa1, - 0x12, 0x5f, 0xed, 0x50, 0x83, 0x3b, 0xa5, 0x94, 0x25, 0xa7, 0xa9, 0x45, 0xcd, 0xda, 0x79, 0x4a, - 0xc4, 0xd2, 0x51, 0x06, 0xfd, 0x52, 0x96, 0xd2, 0x86, 0xa9, 0x89, 0xba, 0x6a, 0xfc, 0x37, 0x41, - 0xb3, 0x8a, 0x2a, 0x4d, 0xaa, 0xda, 0x01, 0x46, 0x9f, 0x01, 0x0c, 0x8f, 0x39, 0x11, 0x08, 0xc1, - 0x50, 0x90, 0x8a, 0x62, 0x30, 0x04, 0xe3, 0xbd, 0xcc, 0xc6, 0x68, 0x02, 0x43, 0x83, 0xc7, 0x5b, - 0x43, 0x30, 0xee, 0x1d, 0x0e, 0x12, 0x27, 0x96, 0x78, 0xb1, 0xe4, 0xa5, 0x17, 0x9b, 0xc2, 0xd5, - 0x97, 0x38, 0x38, 0xff, 0x1a, 0x03, 0x0c, 0x32, 0xcb, 0x41, 0xfb, 0x70, 0x77, 0x41, 0x59, 0xb9, - 0xd0, 0x78, 0x7b, 0x08, 0xc6, 0xdb, 0x59, 0x97, 0x19, 0x1f, 0x26, 0xe6, 0x12, 0x87, 0xce, 0xc7, - 0xc4, 0xe8, 0x39, 0xbc, 0xd5, 0x4d, 0x5a, 0x9c, 0xe6, 0x9c, 0x51, 0xa1, 0x4f, 0x95, 0x26, 0x9a, - 0xe2, 0x1d, 0x6b, 0xdc, 0xff, 0xc7, 0xf8, 0x89, 0x58, 0x4e, 0xb7, 0x30, 0xc8, 0x6e, 0x7a, 0xda, - 0x91, 0x65, 0x9d, 0x18, 0xd2, 0xe4, 0xfa, 0xc7, 0x8b, 0x38, 0xf8, 0x71, 0x11, 0x83, 0xd1, 0x07, - 0x00, 0x6f, 0x9f, 0xc8, 0xb9, 0x7e, 0x47, 0x1a, 0xfa, 0xca, 0x21, 0x8f, 0x1b, 0x59, 0x4b, 0x45, - 0x38, 0xea, 0xc3, 0x1d, 0xcd, 0x34, 0xf7, 0x03, 0xbb, 0x04, 0x0d, 0x61, 0xaf, 0xa0, 0x2a, 0x6f, - 0x58, 0xad, 0x99, 0x14, 0x76, 0xf0, 0xbd, 0xec, 0xf7, 0x12, 0x7a, 0x0c, 0xc3, 0x9a, 0x13, 0x61, - 0xa7, 0xea, 0x1d, 0xde, 0x4d, 0xae, 0xbe, 0x54, 0x62, 0x76, 0x3a, 0x0d, 0xcd, 0x56, 0x32, 0x8b, - 0x9f, 0x40, 0xdf, 0x15, 0x06, 0xa3, 0x1c, 0xde, 0x3b, 0x22, 0x22, 0xa7, 0xfc, 0x3f, 0x37, 0xf7, - 0x87, 0xc9, 0x53, 0x78, 0xe3, 0x85, 0x2c, 0x5a, 0x4e, 0x5f, 0xd3, 0x46, 0x99, 0xce, 0xaf, 0xba, - 0x30, 0x86, 0xd7, 0xce, 0xdc, 0x6f, 0x2b, 0x17, 0x66, 0x3e, 0xb5, 0x5b, 0x04, 0x46, 0x6a, 0xfa, - 0x6c, 0xf5, 0x3d, 0x0a, 0x56, 0xeb, 0x08, 0x5c, 0xae, 0x23, 0xf0, 0x6d, 0x1d, 0x81, 0xf3, 0x4d, - 0x14, 0x5c, 0x6e, 0xa2, 0xe0, 0xd3, 0x26, 0x0a, 0xde, 0x3c, 0x28, 0x99, 0x5e, 0xb4, 0xb3, 0x24, - 0x97, 0x55, 0xda, 0xbd, 0x6d, 0xf7, 0x79, 0xa8, 0x8a, 0xb7, 0xe9, 0xfb, 0x5f, 0x0f, 0x5d, 0x2f, - 0x6b, 0xaa, 0x66, 0xbb, 0xf6, 0x84, 0x8f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x55, 0x74, 0xf2, - 0xb7, 0x07, 0x03, 0x00, 0x00, + // 483 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xc7, 0x7d, 0xad, 0x5b, 0xe8, 0x45, 0x2c, 0x26, 0x94, 0x6b, 0x04, 0x76, 0x14, 0x31, 0x64, + 0xa0, 0xb6, 0x5a, 0x24, 0x86, 0x6c, 0x24, 0x03, 0x12, 0x02, 0xa9, 0x72, 0x81, 0x81, 0x25, 0xba, + 0xd8, 0x17, 0xc7, 0xc2, 0xbe, 0xc7, 0xf2, 0x5d, 0x02, 0x19, 0xf9, 0x06, 0x1d, 0x19, 0xfb, 0x1d, + 0xe0, 0x43, 0x44, 0x4c, 0x1d, 0x11, 0x03, 0x2f, 0xc9, 0xc2, 0xc7, 0x40, 0xf7, 0xe2, 0x0a, 0x41, + 0x17, 0x24, 0x26, 0x3f, 0xcf, 0xf9, 0xff, 0xf7, 0xef, 0x79, 0x39, 0xe3, 0x7b, 0x09, 0x88, 0x12, + 0x44, 0x34, 0xaf, 0xb2, 0x9a, 0xa6, 0x2c, 0x5a, 0x1c, 0x4d, 0x98, 0xa4, 0x47, 0x4d, 0x1e, 0x56, + 0x35, 0x48, 0xf0, 0xf6, 0x8d, 0x2a, 0x6c, 0x4e, 0xad, 0xaa, 0x73, 0x90, 0x01, 0x64, 0x05, 0x8b, + 0xb4, 0x6a, 0x32, 0x9f, 0x46, 0x94, 0x2f, 0x8d, 0xa5, 0xd3, 0xce, 0x20, 0x03, 0x1d, 0x46, 0x2a, + 0xb2, 0xa7, 0xc1, 0x9f, 0x06, 0x99, 0x97, 0x4c, 0x48, 0x5a, 0x56, 0x56, 0x70, 0x60, 0x48, 0x63, + 0xe3, 0xb4, 0x58, 0x9d, 0xf4, 0xbe, 0x20, 0xec, 0x9e, 0x14, 0x94, 0x7b, 0x1e, 0x76, 0x39, 0x2d, + 0x19, 0x41, 0x5d, 0xd4, 0xdf, 0x8b, 0x75, 0xec, 0x0d, 0xb0, 0xab, 0x3e, 0x45, 0xb6, 0xba, 0xa8, + 0xdf, 0x3a, 0xee, 0x84, 0x86, 0x13, 0x36, 0x9c, 0xf0, 0x79, 0xc3, 0x19, 0xe2, 0xd5, 0xd7, 0xc0, + 0x39, 0xfb, 0x16, 0x20, 0x82, 0x62, 0xed, 0xf1, 0xf6, 0xf1, 0xee, 0x8c, 0xe5, 0xd9, 0x4c, 0x92, + 0xed, 0x2e, 0xea, 0x6f, 0xc7, 0x36, 0x53, 0x9c, 0x9c, 0x4f, 0x81, 0xb8, 0x86, 0xa3, 0x62, 0xef, + 0x29, 0xbe, 0x65, 0x87, 0x90, 0x8e, 0x93, 0x22, 0x67, 0x5c, 0x8e, 0x85, 0xa4, 0x92, 0x91, 0x1d, + 0x0d, 0x6e, 0xff, 0x05, 0x7e, 0xc4, 0x97, 0xc3, 0x2d, 0x82, 0xe2, 0x9b, 0x8d, 0x6d, 0xa4, 0x5d, + 0xa7, 0xca, 0x34, 0xb8, 0xfe, 0xfe, 0x3c, 0x70, 0x7e, 0x9e, 0x07, 0xa8, 0xf7, 0x01, 0xe1, 0xdb, + 0xa7, 0x30, 0x95, 0x6f, 0x68, 0xcd, 0x5e, 0x18, 0xe5, 0x49, 0x0d, 0x15, 0x08, 0x5a, 0x78, 0x6d, + 0xbc, 0x23, 0x73, 0x59, 0x34, 0x0d, 0x9b, 0xc4, 0xeb, 0xe2, 0x56, 0xca, 0x44, 0x52, 0xe7, 0x95, + 0xcc, 0x81, 0xeb, 0xc6, 0xf7, 0xe2, 0xdf, 0x8f, 0xbc, 0x87, 0xd8, 0xad, 0x0a, 0xca, 0x75, 0x57, + 0xad, 0xe3, 0x3b, 0xe1, 0xd5, 0x4b, 0x0c, 0xd5, 0x4c, 0x87, 0xae, 0x9a, 0x4a, 0xac, 0xf5, 0x83, + 0x7e, 0x53, 0xd5, 0xa7, 0x8f, 0x87, 0x1d, 0x6b, 0xca, 0x60, 0x71, 0x69, 0x18, 0x01, 0x97, 0x8c, + 0x4b, 0x82, 0x7a, 0xef, 0x10, 0xbe, 0x3b, 0xa2, 0x3c, 0x61, 0xc5, 0x7f, 0xae, 0xfd, 0x1f, 0x6a, + 0x78, 0x8c, 0x6f, 0x3c, 0x83, 0x74, 0x5e, 0xb0, 0x97, 0xac, 0x16, 0xaa, 0xed, 0xab, 0xae, 0x07, + 0xc1, 0xd7, 0x16, 0xe6, 0xb5, 0x86, 0xb9, 0x71, 0x93, 0xea, 0x15, 0x20, 0x05, 0x1a, 0x3e, 0x59, + 0xfd, 0xf0, 0x9d, 0xd5, 0xda, 0x47, 0x17, 0x6b, 0x1f, 0x7d, 0x5f, 0xfb, 0xe8, 0x6c, 0xe3, 0x3b, + 0x17, 0x1b, 0xdf, 0xf9, 0xbc, 0xf1, 0x9d, 0x57, 0xf7, 0xb3, 0x5c, 0xce, 0xe6, 0x93, 0x30, 0x81, + 0xd2, 0x5e, 0x4b, 0xfb, 0x38, 0x14, 0xe9, 0xeb, 0xe8, 0xed, 0xe5, 0x0f, 0x24, 0x97, 0x15, 0x13, + 0x93, 0x5d, 0xbd, 0xff, 0x07, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x06, 0xec, 0xeb, 0xea, 0x5f, + 0x03, 0x00, 0x00, } func (this *Plan) Equal(that interface{}) bool {